Remove trailing '-' from the last QTDP action packet
[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 the has_more
4         predicate in the QTDP action list iteration.
5
6 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
7
8         * remote.c (remote_target::download_tracepoint): Fix indentation
9         in for block.
10
11 2018-08-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
12
13         * proc-api.c (_initialize_proc_api): Remove c, unused.
14         * procfs.c (procfs_init_inferior): Remove signals, unused.
15         (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
16         unused.
17
18 2018-08-06  Sergey Korolev  <s.korolev@ndmsystems.com>
19             Andrew Burgess  <andrew.burgess@embecosm.com>
20
21         * linux-nat.c (linux_nat_target::follow_fork): Avoid using
22         'W_STOPCODE (0)' as this could be ambiguous.
23
24 2018-08-03  Sergio Durigan Junior  <sergiodj@redhat.com>
25
26         * ser-tcp.c (net_open): Fix thinko when deciding whether to
27         disable TCP's Nagle algorithm (use "ai_protocol" instead of
28         "ai_socktype").
29
30 2018-08-02  Tom Tromey  <tom@tromey.com>
31
32         PR symtab/16842.
33         * dwarf2read.c (read_func_scope): Set symtab on template parameter
34         symbols.
35         (process_structure_scope): Likewise.
36
37 2018-08-02  Xavier Roirand  <roirand@adacore.com>
38
39         PR gdb/22629:
40         * darwin-nat.c (darwin_kill_inferior): Fix handling of
41         kill inferior.
42
43 2018-08-02  Tom Tromey  <tom@tromey.com>
44
45         * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
46         (darwin_suspend_inferior, darwin_resume_inferior)
47         (darwin_decode_notify_message, darwin_resume_inferior_threads)
48         (darwin_check_new_threads): Check result of get_darwin_inferior.
49
50 2018-07-31  Joel Brobecker  <brobecker@adacore.com>
51
52         GDB 8.1.1 released.
53
54 2018-07-31  Jan Vrany  <jan.vrany@fit.cvut.cz>
55
56         * varobj.c (varobj_get_path_expr_parent): Report an error if
57         parent is a dynamic varobj.
58
59 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
60
61         * gnulib/aclocal.m4: Re-generate.
62         * gnulib/config.in: Re-generate.
63         * gnulib/configure: Re-generate.
64         * gnulib/import/Makefile.in: Re-generate.
65         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
66         * gnulib/import/m4/onceonly.m4: Re-generate.
67
68 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
69
70         * target-descriptions.c (struct xml_test_tdesc): New.
71         (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
72         (record_xml_tdesc): Update.
73         (maintenance_check_xml_descriptions): Update.
74         * target-descriptions.h (record_xml_tdesc): Update comment.
75
76 2018-07-30  Andrew Burgess  <andrew.burgess@embecosm.com>
77
78         * eval.c (evaluate_subexp_for_sizeof): Check for array type before
79         checking array bounds are defined.
80
81 2018-07-30  Tom Tromey  <tom@tromey.com>
82
83         * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
84         irreflexivity violation.
85
86 2018-07-30  Tom Tromey  <tom@tromey.com>
87
88         * cli/cli-decode.c (lookup_cmd): Remove lint code.
89         * value.c (unpack_long): Remove lint code.
90         * valops.c (value_ind): Remove lint code.
91         * valarith.c (value_x_binop, value_x_unop, value_equal)
92         (value_pos): Remove lint code.
93
94 2018-07-28  Tom de Vries  <tdevries@suse.de>
95
96         * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
97         with undefined upper bound as <optimized out>.
98
99 2018-07-27  Sergio Durigan Junior  <sergiodj@redhat.com>
100
101         * gcore.in: Rename variable "name" to "prefix".  Expand
102         "usage" text.
103
104 2018-07-14  Jon Turney  <jon.turney@dronecode.org.uk>
105
106         * windows-nat.c (windows_nat_target::create_inferior): Update to
107         call close() in global namespace.
108
109 2018-07-26  Tom Tromey  <tom@tromey.com>
110
111         * dwarf-index-write.c (add_address_entry): Don't add objfile
112         offsets.
113         * dbxread.c (find_stab_function): Rename from
114         find_stab_function_addr.  Return a bound_minimal_symbol.
115         (read_dbx_symtab): Use raw_text_low, raw_text_high.
116         Don't add objfile offsets.
117         (end_psymtab): Use raw_text_low, raw_text_high,
118         MSYMBOL_VALUE_RAW_ADDRESS.
119         (read_ofile_symtab): Update.
120         (process_one_symbol): Update.
121         * dwarf2read.c (create_addrmap_from_index): Don't add objfile
122         offsets.
123         (dw2_relocate): Remove.
124         (dw2_find_pc_sect_symtab): Bias PC by the text offset before
125         searching addrmap.
126         (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
127         Update.
128         (process_psymtab_comp_unit_reader, add_partial_symbol)
129         (add_partial_subprogram, dwarf2_ranges_read): Update.
130         (load_partial_dies): Update.
131         (add_address_entry): Don't add objfile offsets.
132         (dwarf2_build_include_psymtabs): Update.
133         (create_addrmap_from_aranges): Don't add objfile offsets.
134         (dw2_find_pc_sect_compunit_symtab): Update.
135         * mdebugread.c (parse_symbol): Don't add objfile offsets.
136         (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
137         Update.
138         (parse_partial_symbols): Don't add objfile offsets.  Use
139         raw_text_low, raw_text_high.  Update.
140         (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
141         * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
142         or call 'relocate' quick function.  Clear psymbol_map.
143         * psympriv.h (struct partial_symbol) <address>: Add section
144         offset.
145         <set_unrelocated_address>: Rename from set_address.
146         <raw_text_low, raw_text_high>: New methods.
147         <text_low, text_high>: Add objfile parameter.
148         (add_psymbol_to_bcache): Add 'section' parameter.  Call
149         set_unrelocated_address.
150         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
151         (find_pc_psymbol): Update.
152         (fixup_psymbol_section, relocate_psymtabs): Remove.
153         (dump_psymtab, psym_functions): Update.
154         (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
155         parameter.
156         (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
157         (start_psymtab_common): Update.
158         * symfile-debug.c (debug_qf_relocate): Remove.
159         (debug_sym_quick_functions): Update.
160         * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
161         * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
162         Update.
163
164 2018-07-26  Tom Tromey  <tromey@redhat.com>
165
166         * dbxread.c (end_psymtab): Use text_high_valid and
167         text_low_valid.
168         * mdebugread.c (parse_partial_symbols): Use text_low_valid.
169         (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
170         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
171         Update comment.
172         <text_low_valid, text_high_valid>: New fields.
173         <set_text_low, set_text_high>: Update.
174         * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
175
176 2018-07-26  Tom Tromey  <tom@tromey.com>
177
178         * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
179         Update.
180         * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
181         textlow and texthigh fields.
182         (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
183         Update.
184         * mdebugread.c (parse_lines, parse_partial_symbols)
185         (psymtab_to_symtab_1): Update.
186         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
187         Rename fields.  Update comment.  Now private.
188         <text_low, text_high, set_text_low, set_text_high>: New methods.
189         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
190         (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
191         (start_psymtab_common, maintenance_info_psymtabs)
192         (maintenance_check_psymtabs): Update.
193         * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
194         texthigh fields.
195         (scan_xcoff_symtab): Update.
196
197 2018-07-26  Tom Tromey  <tromey@redhat.com>
198
199         * psympriv.h (struct partial_symbol) <unrelocated_address,
200         address, set_address>: New methods.
201         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
202         (fixup_psymbol_section, relocate_psymtabs): Update.
203         (print_partial_symbols): Add 'objfile' parameter.  Update.
204         (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
205         Update.
206
207 2018-07-26  Tom Tromey  <tom@tromey.com>
208
209         * dwarf-index-write.c (write_psymbols, debug_names::insert)
210         (debug_names::write_psymbols): Update.
211         * psympriv.h (struct partial_symbol): Derive from
212         general_symbol_info.
213         <obj_section>: New method.
214         (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
215         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
216         (find_pc_sect_psymbol, fixup_psymbol_section)
217         (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
218         (print_partial_symbols, recursively_search_psymtabs)
219         (compare_psymbols, psymbol_hash, psymbol_compare)
220         (add_psymbol_to_bcache, maintenance_check_psymtabs)
221         (psymbol_name_matches, psym_fill_psymbol_map): Update.
222
223 2018-07-26  Tom Tromey  <tromey@redhat.com>
224
225         * dbxread.c (end_psymtab): Remove dead code.
226
227 2018-07-26  Andrew Burgess  <andrew.burgess@embecosm.com>
228
229         * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
230         DWARF unwinders are disabled.
231         * dwarf2-frame.c: Add dwarf2read.h include.
232         (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
233         disabled.
234         (dwarf2_frame_unwinders_enabled_p): Define.
235         (show_dwarf_unwinders_enabled_p): New function.
236         (_initialize_dwarf2_frame): Register switch to control DWARF
237         unwinder use.
238         * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
239         * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
240         (show_dwarf_cmdlist): Remove static keyword.
241         * dwarf2read.h (set_dwarf_cmdlist): Declare.
242         (show_dwarf_cmdlist): Declare.
243         * NEWS: Document new feature.
244
245 2018-07-26  Tom de Vries  <tdevries@suse.de>
246
247         PR breakpoints/23366
248         * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
249
250 2018-07-26  Tom de Vries  <tdevries@suse.de>
251
252         * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
253         DW_AT_count can't be translated to a dynamic prop.
254
255 2018-07-25  Tom de Vries  <tdevries@suse.de>
256
257         * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
258         try/catch.
259
260 2018-07-25  Jan Vrany  <jan.vrany@fit.cvut.cz>
261
262         * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
263
264 2018-07-25  Joel Brobecker  <brobecker@adacore.com>
265
266         * MAINTAINERS (Global Maintainers): Add Tom Tromey.
267
268 2018-07-24  Keith Seitz  <keiths@redhat.comt
269
270         PR symtab/23010
271         * dwarf2read.c (dw2_add_symbol_to_list): New function.
272         (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
273         instead of add_symbol_to_list.
274         (read_file_scope): Call prepare_one_comp_unit before reading
275         any other DIEs.
276
277 2018-07-24  Simon Marchi  <simon.marchi@ericsson.com>
278
279         * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
280
281 2018-07-24  Tom Tromey  <tom@tromey.com>
282
283         * utils.c (malloc, realloc, free): Don't declare.
284         * configure, config.in: Rebuild.
285         * configure.ac: Don't check for declarations of free, malloc, or
286         realloc.
287
288 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
289
290         * aarch64-linux-nat.c
291         (aarch64_linux_nat_target::stopped_data_address): Remove unused
292         variable.
293         * arm-linux-nat.c (fetch_regs): Likewise.
294         (store_regs): Likewise.
295         (fetch_vfp_regs): Likewise.
296         (store_vfp_regs): Likewise.
297         (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
298         (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
299         (arm_linux_nat_target::insert_watchpoint): Likewise.
300         (arm_linux_nat_target::remove_watchpoint): Likewise.
301         * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
302         Likewise.
303         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
304         Likewise.
305         * ppc-linux-nat.c (fetch_register): Likewise.
306         (fetch_all_gp_regs): Likewise.
307         (fetch_ppc_registers): Likewise.
308         (store_all_gp_regs): Likewise.
309         (store_ppc_registers): Likewise.
310         (hwdebug_insert_point): Likewise.
311         (can_use_watchpoint_cond_accel): Likewise.
312         * remote-sim.c (gdb_os_write_stdout): Likewise.
313
314 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
315             Tom Tromey  <tom@tromey.com>
316
317         * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
318         test for it.
319         * configure: Rebuild.
320
321 2018-07-22  Tom Tromey  <tom@tromey.com>
322
323         * regformats/regdat.sh: Define xmltarget_${name} inside
324         #ifndef IN_PROCESS_AGENT.
325
326 2018-07-22  Tom Tromey  <tom@tromey.com>
327
328         * value.c (value_fetch_lazy_bitfield): Remove unused variable.
329
330 2018-07-22  Tom Tromey  <tom@tromey.com>
331
332         * symfile.c (reread_symbols): Notify iter, not objfile.
333
334 2018-07-22  Tom Tromey  <tom@tromey.com>
335
336         * ravenscar-thread.c (ravenscar_thread_target::store_registers):
337         Use arch_ops.
338         (ravenscar_thread_target::prepare_to_store): Likewise.
339
340 2018-07-22  Tom Tromey  <tom@tromey.com>
341
342         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
343         unused variable.  Call value_fetch_lazy when needed.
344         * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
345         Remove unused variable.  Call value_fetch_lazy when needed.
346
347 2018-07-22  Tom Tromey  <tom@tromey.com>
348
349         * m32c-tdep.c (mark_dma): Return void.
350         (make_regs): Remove unused declarations.
351
352 2018-07-22  Tom Tromey  <tom@tromey.com>
353
354         * guile/scm-cmd.c (gdbscm_dont_repeat): Call
355         cmdscm_get_valid_command_smob_arg_unsafe for effect.
356         * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
357         bkscm_get_valid_block_smob_arg_unsafe for effect.
358
359 2018-07-22  Tom Tromey  <tom@tromey.com>
360
361         * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
362         value_type.
363
364 2018-07-22  Tom Tromey  <tom@tromey.com>
365
366         * windows-nat.c (saved_context): Conditionally define.
367         * remote.c (remote_target::remote_btrace_maybe_reopen):
368         Conditionally declare "warned".
369         * inflow.c (sigquit_ours): Conditionally define.
370         (new_tty): Move "tty" declaration inside #if.
371         * guile/guile.c (guile_datadir): Conditionally define.
372         * charset.c (set_be_le_names): Move some declarations inside #if.
373         * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
374         #if.
375         (parse_xml_btrace_conf): Likewise.
376
377 2018-07-22  Tom Tromey  <tom@tromey.com>
378
379         * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
380
381 2018-07-22  Tom Tromey  <tom@tromey.com>
382
383         * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
384         * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
385         (vlscm_convert_typed_value_from_scheme): Remove unused variable.
386         * buildsym-legacy.c (get_macro_table): Remove unused variable.
387         * stack.c (frame_apply_level_command): Remove unused variable.
388         * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
389         * sparc64-tdep.c (adi_examine_command): Remove unused variable.
390         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
391         unused variable.
392         * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
393         * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
394         * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
395         variable.
396         * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
397         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
398         variable.
399         * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
400         Remove unused variable.
401         * cli/cli-script.c (recurse_read_control_structure): Remove unused
402         variable.
403         * common/tdesc.c (print_xml_feature::visit): Remove unused
404         variable.
405         * compile/compile-object-load.c (store_regs): Remove unused
406         variables.
407         * complaints.c (clear_complaints): Remove unused variable.
408         * corelow.c (core_target_open): Remove unused variable.
409         * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
410         variable.
411         * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
412         variable.
413         * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
414         variable.
415         * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
416         variable.
417         * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
418         variable.
419         * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
420         variable.
421         * ia64-tdep.c (examine_prologue): Remove unused variable.
422         * infcall.c (run_inferior_call): Remove unused variable.
423         * inferior.c (exit_inferior): Remove unused variable.
424         * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
425         * linespec.c (decode_line_2): Remove unused variable.
426         * linux-nat.c (super_close): Remove.
427         * linux-tdep.c (linux_info_proc): Remove unused variable.
428         * mi/mi-main.c (mi_execute_command): Remove unused variable.
429         * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
430         Remove unused variable.
431         * parse.c (find_minsym_type_and_address): Remove unused variable.
432         * printcmd.c (info_symbol_command, printf_floating): Remove unused
433         variable.
434         * python/py-breakpoint.c (bppy_set_commands): Remove unused
435         variable.
436         * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
437         variables.
438         * record-btrace.c (record_btrace_target::store_registers): Remove
439         unused variable.
440         (cmd_show_record_btrace_cpu): Remove unused variable.
441         * riscv-tdep.c (riscv_register_reggroup_p)
442         (riscv_push_dummy_call, riscv_return_value): Remove unused
443         variable.
444         * rust-exp.y (literal): Remove unused variable.
445         * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
446         unused variable.
447         <STRUCTOP_ANONYMOUS>: Likewise.
448         * s390-linux-tdep.c (s390_linux_init_abi_31)
449         (s390_linux_init_abi_64): Remove unused variable.
450         * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
451         (file_select_thread, net_windows_open, _initialize_ser_windows):
452         Remove unused variables.
453         * symtab.c (find_pc_sect_line): Remove unused variable.
454         * target-memory.c (compute_garbled_blocks): Remove unused
455         variable.
456         (target_write_memory_blocks): Remove unused variable.
457         * target.c (target_stack::unpush): Remove unused variables.
458         * tracepoint.c (start_tracing, all_tracepoint_actions)
459         (merge_uploaded_trace_state_variables)
460         (print_one_static_tracepoint_marker): Remove unused variable.
461         * unittests/basic_string_view/element_access/char/1.cc (test01):
462         Remove unused variable.
463         * windows-nat.c (windows_continue, windows_add_all_dlls)
464         (do_initial_windows_stuff, windows_nat_target::create_inferior):
465         Remove unused variables.
466
467 2018-07-21  Simon Marchi  <simon.marchi@polymtl.ca>
468
469         * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
470         attr_profile in HAVE_ELF.
471         * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
472         HAVE_ELF.
473
474 2018-07-20  Simon Marchi  <simon.marchi@polymtl.ca>
475
476         * frame.c (frame_register_unwind): Change parameter name.
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.h (frame_register_unwind): Likewise.
482         (frame_unwind_register): Likewise.
483         (frame_unwind_register_value): Likewise.
484         (frame_unwind_register_signed): Likewise.
485         (frame_unwind_register_unsigned): Likewise.
486         (frame_unwind_arch): Likewise.
487
488 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
489
490         * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
491         ISA maintenance.
492
493 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
494
495         * mips-linux-nat.c (mips_linux_nat_target::read_description):
496         Call `get_ptrace_pid' rather than extracting the ptrace PID by
497         hand.
498
499 2018-07-20  Keith Seitz  <keiths@redhat.com>
500
501         * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
502         m_main_subfile, m_comp_dir, m_producer, m_debugformat,
503         m_compunit_symtab, m_language>: Add "m_" prefix.
504         Update all uses.
505         * buildsym.c: Update all uses.
506
507 2018-07-20  Tom Tromey  <tom@tromey.com>
508
509         * buildsym-legacy.h (record_line): Don't use record_line_ftype.
510         * buildsym.h (record_line_ftype): Remove typedef.
511
512 2018-07-20  Tom Tromey  <tom@tromey.com>
513
514         * buildsym-legacy.h (augment_type_symtab): Don't declare.
515         (end_expandable_symtab): Likewise.
516         (end_symtab_get_static_block): Likewise.
517         (end_symtab_from_static_block): Likewise.
518         * buildsym-legacy.c (augment_type_symtab): Remove.
519         (end_expandable_symtab): Remove.
520         (end_symtab_get_static_block): Remove.
521         (end_symtab_from_static_block): Remove.
522
523 2018-07-20  Tom Tromey  <tom@tromey.com>
524
525         * dwarf2read.c: Include buildsym.h.
526         (struct dwarf2_cu) <builder>: New method.
527         (fixup_go_packaging): Update.
528         (process_full_comp_unit, process_full_type_unit): Update.  Don't
529         use scoped_free_pendings.
530         (using_directives): Add "cu" parameter, remove "language".
531         (read_import_statement, setup_type_unit_groups, )
532         (read_func_scope, read_lexical_block_scope)
533         (dwarf2_record_block_ranges, read_namespace): Update.
534         (lnp_state_machine::lnp_state_machine): Add cu parameter.
535         (lnp_state_machine::handle_end_sequence): Update.
536         (class lnp_state_machine) <m_cu>: New member.
537         <m_record_line_callback>: Remove.
538         <m_currently_recording_lines>: New member.
539         (lnp_state_machine::handle_set_file): Update.
540         (noop_record_line): Remove.
541         (dwarf_record_line_p): Add cu parameter.
542         (dwarf_record_line_1, dwarf_finish_line): Likewise.
543         (lnp_state_machine::record_line)
544         (lnp_state_machine::lnp_state_machine)
545         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
546         (dwarf_decode_lines): Update.
547         (dwarf2_start_subfile): Add cu parameter.
548         (dwarf2_start_symtab, new_symbol): Update.
549         (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
550         Remove dwarf2_per_objfile parameter.
551         (dwarf_decode_macros): Update.
552
553 2018-07-20  Tom Tromey  <tom@tromey.com>
554
555         * stabsread.c (define_symbol): Update.
556         * buildsym-legacy.h (get_buildsym_compunit): Declare.
557         * dwarf2read.c (new_symbol): Update.
558         * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
559         * cp-namespace.c: Include buildsym.h.
560         (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
561         * buildsym-legacy.c (get_buildsym_compunit): New function.
562
563 2018-07-20  Tom Tromey  <tom@tromey.com>
564
565         * xcoffread.c: Include buildsym-legacy.h.
566         * windows-nat.c: Include buildsym-legacy.h.
567         * stabsread.c: Include buildsym-legacy.h.
568         * mdebugread.c: Include buildsym-legacy.h.
569         * buildsym-legacy.h: New file.
570         * buildsym-legacy.c: New file, from buildsym.c.
571         * go32-nat.c: Include buildsym-legacy.h.
572         * dwarf2read.c: Include buildsym-legacy.h.
573         * dbxread.c: Include buildsym-legacy.h.
574         * cp-namespace.c: Include buildsym-legacy.h.
575         * coffread.c: Include buildsym-legacy.h.
576         * buildsym.h: Move some contents to buildsym-legacy.h.
577         * buildsym.c: Include buildsym-legacy.h.  Move many functions to
578         buildsym-legacy.c.
579         * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
580
581 2018-07-20  Tom Tromey  <tom@tromey.com>
582
583         * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
584         * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
585         (buildsym_compunit::buildsym_compunit)
586         (buildsym_compunit::~buildsym_compunit)
587         (buildsym_compunit::get_macro_table): Define.
588
589 2018-07-20  Tom Tromey  <tom@tromey.com>
590
591         * buildsym.c (reset_symtab_globals): Remove.
592         (buildsym_compunit::end_symtab_from_static_block): Update.
593         (buildsym_compunit::augment_type_symtab): Update.
594         (end_symtab_from_static_block): Call free_buildsym_compunit.
595         (augment_type_symtab, end_symtab, end_expandable_symtab):
596         Likewise.
597
598 2018-07-20  Tom Tromey  <tom@tromey.com>
599
600         * arch-utils.c: Do not include buildsym.h.
601         * mipsread.c: Do not include buildsym.h.
602         * machoread.c: Do not include buildsym.h.
603         * elfread.c: Do not include buildsym.h.
604
605 2018-07-20  Tom Tromey  <tom@tromey.com>
606
607         * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
608         initialization.
609         (buildsym_compunit): Add new constructor.
610         (struct buildsym_compunit) <get_last_source_file, finish_block,
611         record_block_range, start_subfile, patch_subfile_names,
612         push_subfile, pop_subfile, record_line, get_compunit_symtab,
613         set_last_source_start_addr, get_last_source_start_addr,
614         get_local_using_directives, set_local_using_directives,
615         get_global_using_directives, outermost_context_p,
616         get_current_context_stack, get_context_stack_depth,
617         get_current_subfile, get_local_symbols, get_file_symbols,
618         get_global_symbols, record_debugformat, record_producer,
619         push_context, pop_context, end_symtab_get_static_block,
620         end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
621         New public methods.
622         <record_pending_block, finish_block_internal, make_blockvector,
623         watch_main_source_file_lossage, end_symtab_with_blockvector>: New
624         private methods.
625         Update all users.
626
627 2018-05-22  Tom Tromey  <tom@tromey.com>
628
629         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
630         parameter.
631         (finish_block_internal): Update.
632
633 2018-07-20  Tom Tromey  <tom@tromey.com>
634
635         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
636         parameter.
637         (finish_block_internal): Update.
638
639 2018-07-20  Tom Tromey  <tom@tromey.com>
640
641         * buildsym.h (EXTERN): Don't define or undef.
642         * buildsym.c (EXTERN): Don't define.
643
644 2018-07-20  Tom Tromey  <tom@tromey.com>
645
646         * buildsym.c: Remove TODO comment.
647
648 2018-07-20  Tom Tromey  <tom@tromey.com>
649
650         * coffread.c (coff_symtab_read): Update.
651         * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
652         (xcoff_new_init): Update.
653         * mipsread.c (mipscoff_new_init): Update.
654         * mdebugread.c (mdebug_build_psymtabs): Update.
655         * elfread.c (elf_new_init): Update.
656         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
657         Update.
658         * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
659         (coffstab_build_psymtabs, elfstab_build_psymtabs)
660         (stabsect_build_psymtabs): Update.
661         * buildsym.h (buildsym_init): Don't declare.
662         * buildsym.c: Update comment.
663         (prepare_for_building): Remove.
664         (start_symtab, restart_symtab): Update.
665         (reset_symtab_globals): Update comment.
666         (buildsym_init): Remove.
667
668 2018-07-20  Tom Tromey  <tom@tromey.com>
669
670         * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
671         * stabsread.c (patch_block_stabs, define_symbol, read_type)
672         (read_enum_type, common_block_start, common_block_end)
673         (cleanup_undefined_types_1, finish_global_stabs): Update.
674         * mdebugread.c (psymtab_to_symtab_1): Update.
675         * dwarf2read.c (fixup_go_packaging, read_func_scope)
676         (read_lexical_block_scope, new_symbol): Update.
677         * dbxread.c (process_one_symbol): Update.
678         * coffread.c (coff_symtab_read, process_coff_symbol)
679         (coff_read_enum_type): Update.
680         * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
681         declare.
682         (get_local_symbols, get_file_symbols, get_global_symbols): New
683         functions.
684         * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
685         m_global_symbols.
686         <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
687         (~scoped_free_pendings): Update.
688         (finish_block, prepare_for_building, reset_symtab_globals)
689         (end_symtab_get_static_block, end_symtab_with_blockvector)
690         (augment_type_symtab, push_context): Update.
691         (get_local_symbols, get_file_symbols, get_global_symbols): New
692         functions.
693         (buildsym_init): Update.
694
695 2018-07-20  Tom Tromey  <tom@tromey.com>
696
697         * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
698         (process_full_type_unit): Likewise.
699         (dwarf2_start_symtab): Set list_in_scope.
700
701 2018-07-20  Tom Tromey  <tom@tromey.com>
702
703         * dwarf2read.c (process_psymtab_comp_unit_reader)
704         (build_type_psymtabs_reader): Do not set list_in_scope.
705
706 2018-07-20  Tom Tromey  <tom@tromey.com>
707
708         * buildsym.c (free_pendings): Remove.
709         (add_symbol_to_list, scoped_free_pendings)
710         (finish_block_internal, buildsym_init): Update.
711
712 2018-07-20  Tom Tromey  <tom@tromey.com>
713
714         * xcoffread.c (read_xcoff_symtab): Update.
715         * dwarf2read.c (read_func_scope, read_lexical_block_scope):
716         Update.
717         * dbxread.c (process_one_symbol): Update.
718         * coffread.c (coff_symtab_read): Update.
719         * buildsym.h (finish_block): Update.
720         * buildsym.c (finish_block): Remove "listhead" argument.
721         (end_symtab_get_static_block): Update.
722
723 2018-07-20  Tom Tromey  <tom@tromey.com>
724
725         * buildsym.h (class scoped_free_pendings): Remove constructor.
726         * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
727         method.
728         <m_pending_block_obstack, m_pending_blocks>: New members.
729         (pending_block_obstack, pending_blocks): Remove.
730         (scoped_free_pendings::scoped_free_pendings): Default.
731         (~scoped_free_pendings): Update.
732         (free_pending_blocks): Remove.
733         (finish_block_internal, record_pending_block, make_blockvector)
734         (end_symtab_get_static_block, augment_type_symtab, push_context)
735         (buildsym_init): Update.
736
737 2018-07-20  Tom Tromey  <tom@tromey.com>
738
739         * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
740         m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
741         members.
742         (pending_addrmap, pending_addrmap_obstack)
743         (pending_addrmap_interesting): Remove.
744         (scoped_free_pendings, record_block_range, make_blockvector)
745         (prepare_for_building, reset_symtab_globals, buildsym_init):
746         Update.
747
748 2018-07-20  Tom Tromey  <tom@tromey.com>
749
750         * xcoffread.c (process_linenos): Update.
751         * stabsread.c (define_symbol, read_type, read_enum_type): Update.
752         * mdebugread.c (psymtab_to_symtab_1): Update.
753         * dwarf2read.c (setup_type_unit_groups)
754         (lnp_state_machine::handle_set_file, dwarf_record_line_p)
755         (lnp_state_machine::record_line, dwarf_decode_lines): Update.
756         * dbxread.c (process_one_symbol): Update.
757         * coffread.c (coff_symtab_read, enter_linenos)
758         (process_coff_symbol): Update.
759         * buildsym.h (current_subfile): Don't declare.
760         (get_current_subfile): Declare.
761         * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
762         member.
763         (start_subfile, free_buildsym_compunit, push_subfile)
764         (prepare_for_building, start_symtab): Update.
765         (get_current_subfile): New function.
766
767 2018-07-20  Tom Tromey  <tom@tromey.com>
768
769         * coffread.c (coff_symtab_read): Update.
770         * xcoffread.c (read_xcoff_symtab): Update.
771         * dwarf2read.c (new_symbol): Update.
772         (read_func_scope, read_lexical_block_scope): Update.
773         * dbxread.c (process_one_symbol): Update.
774         * buildsym.h (context_stack, context_stack_depth): Don't declare.
775         (outermost_context_p): Remove macro.
776         (outermost_context_p, get_current_context_stack)
777         (get_context_stack_depth): Declare.
778         (pop_context): Return struct context_stack.
779         * buildsym.c (struct buildsym_compunit) <m_context_stack: New
780         member.
781         (context_stack_size): Remove.
782         (INITIAL_CONTEXT_STACK_SIZE): Remove.
783         (prepare_for_building, end_symtab_get_static_block)
784         (augment_type_symtab, push_context): Update.
785         (pop_context): Return struct context_stack.
786         (outermost_context_p, get_current_context_stack)
787         (get_context_stack_depth): New functions.
788         (buildsym_init): Update.
789
790 2018-07-20  Tom Tromey  <tom@tromey.com>
791
792         * rust-exp.y: Now a pure parser.  Update all rules.
793         (%union): Move earlier.
794         (current_parser, work_obstack): Remove globals.
795         (rust_parser, ~rust_parser): Update.
796         (class rust_parser) <copy_name, concat3, crate_name, super_name,
797         lex_character, lex_number, lex_string, lex_identifier,
798         rust_lookup_type, convert_params_to_types, convert_ast_to_type,
799         convert_name, convert_params_to_expression,
800         convert_ast_to_expression, ast_basic_type, ast_operation,
801         ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
802         ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
803         ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
804         ast_array_type, ast_slice_type, ast_reference_type,
805         ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
806         (rust_parse): Update.
807         (rustyyerror, rustyylex): Add parser parameter.
808         (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
809         (rust_lex_stringish_test, rust_lex_test_sequence)
810         (rust_lex_test_trailing_dot, rust_lex_test_completion)
811         (rust_lex_test_push_back, rust_lex_tests): Update.
812
813 2018-07-19  Pedro Alves  <palves@redhat.com>
814
815         * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
816         gdb::unique_xmalloc_ptr.
817         * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
818         Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
819         * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
820         copy-initialization.
821         * guile/scm-pretty-print.c (ppscm_print_children): Use
822         gdb::unique_xmalloc_ptr instead of cleanups.
823         (gdbscm_apply_val_pretty_printer): Remove cleanups.
824         * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
825         gdb::unique_xmalloc_ptr.
826         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
827         Adjust to use gdb::unique_xmalloc_ptr.
828         * guile/scm-utils.c (extract_arg): Adjust.
829         * guile/scm-value.c (gdbscm_value_field): Adjust to use
830         gdb::unique_xmalloc_ptr instead of a cleanup.
831
832 2018-07-19  Tom Tromey  <tom@tromey.com>
833
834         * utils.c (do_value_free_to_mark)
835         (make_cleanup_value_free_to_mark): Remove.
836         * utils.h (make_cleanup_value_free_to_mark): Remove.
837
838 2018-07-19  Pedro Alves  <palves@redhat.com>
839
840         * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
841         forwarding reference.
842
843 2018-07-18  Pedro Alves  <palves@redhat.com>
844
845         * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
846         gdbscm_wrap.  Use gdb::unique_xmalloc_ptr<char> instead of a
847         cleanup.
848
849 2018-07-18  Pedro Alves  <palves@redhat.com>
850
851         * guile/guile-internal.h: Add comment about mixing GDB and Scheme
852         exceptions.
853         (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
854         (gdbscm_wrap): New.
855         * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
856         directly instead of a cleanup.
857         * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
858         (vlscm_unop): ... this.  Reimplement using gdbscm_wrap.
859         (vlscm_binop_gdbthrow): New, factored out from ...
860         (vlscm_binop): ... this.  Reimplement using gdbscm_wrap.
861         (vlscm_rich_compare): Use gdbscm_wrap.
862         * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
863         instead of a cleanup.
864         (gdbscm_lookup_global_symbol): Use xfree directly instead of a
865         cleanup.
866         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
867         Use xfree directly instead of a cleanup.
868         * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
869         Adjust to use gdbscm_wrap and scoped_value_mark.
870         (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
871         (gdbscm_value_address, gdbscm_value_dereference)
872         (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
873         scoped_value_mark.
874         (gdbscm_value_dynamic_type): Use scoped_value_mark.
875         (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
876         scoped_value_mark.
877         (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
878         gdbscm_wrap and scoped_value_mark.
879         (gdbscm_value_to_string): Use xfree directly instead of a
880         cleanup.  Move 'buffer' unique_ptr to TRY scope.
881         (gdbscm_value_to_lazy_string): Use xfree directly instead of a
882         cleanup.  Move 'buffer' unique_ptr to TRY scope.  Use
883         scoped_value_mark.
884         (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
885         (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
886         scoped_value_mark.
887         (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
888         gdbscm_wrap.
889
890 2018-07-18  Tom de Vries  <tdevries@suse.de>
891
892         * findvar.c (default_read_var_value): Also resolve dynamic type for
893         LOC_OPTIMIZED_OUT vars.
894
895 2018-07-18  Maciej W. Rozycki  <macro@mips.com>
896
897         * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
898         decoding.
899
900 2018-07-17  Tom Tromey  <tom@tromey.com>
901
902         * guile/scm-param.c (pascm_set_func, pascm_show_func)
903         (compute_enum_list, pascm_set_param_value_x)
904         (gdbscm_parameter_value): Update.
905         * guile/guile-internal.h (gdbscm_scm_to_string): Update.
906         (gdbscm_scm_to_host_string): Update.
907         * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
908         Update.
909         * guile/scm-cmd.c (cmdscm_add_completion): Update.
910         * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
911         * guile/scm-string.c (gdbscm_scm_to_string): Return
912         unique_xmalloc_ptr.
913         (gdbscm_scm_to_host_string): Likewise.
914
915 2018-07-17  Tom Tromey  <tom@tromey.com>
916
917         * guile/guile.c (gdbscm_eval_from_control_command): Update.
918         * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
919         * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
920         * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
921         unique_xmalloc_ptr.
922
923 2018-07-17  Tom Tromey  <tom@tromey.com>
924
925         * guile/scm-param.c (pascm_signal_setshow_error): Update.
926         * guile/guile-internal.h (gdbscm_exception_message_to_string):
927         Update.
928         * guile/scm-cmd.c (cmdscm_function): Update.
929         * guile/scm-pretty-print.c
930         (ppscm_print_exception_unless_memory_error): Update.
931         * guile/scm-exception.c (gdbscm_exception_message_to_string):
932         Return unique_xmalloc_ptr.
933
934 2018-07-17  Tom Tromey  <tom@tromey.com>
935
936         * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
937         Use string_printf.
938
939 2018-07-17  Jim Wilson  <jimw@sifive.com>
940
941         * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
942         set_gdbarch_decr_pc_after_break.  Call riscv_read_misa_reg always.
943         (riscv_gdbarch_init): Delete local has_compressed_isa.  Delete now
944         unecessary braces after EF_RISCV_RVC test.  Delete call to
945         set_gdbarch_decr_pc_after_break.
946
947         * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
948         RISCV_LAST_FP_REGNUM + 1.
949         (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
950
951 2018-07-17  Tom Tromey  <tom@tromey.com>
952
953         * configure.ac: Remove --disable-gdbcli.
954         * configure: Rebuild.
955         * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
956         (SUBDIR_CLI_CFLAGS): Remove.
957         (SFILES): Use SUBDIR_CLI_SRCS.
958         (COMMON_OBS): Use SUBDIR_CLI_OBS.
959
960 2018-07-17  Tom Tromey  <tom@tromey.com>
961
962         PR gdb/18624:
963         * coffread.c (coff_symtab_read): Use scoped_free_pendings.
964
965 2018-07-16  Jim Wilson  <jimw@sifive.com>
966
967         * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
968
969 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
970
971         * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
972         variable.
973         (libunwind_frame_sniffer): Likewise.
974         (libunwind_frame_prev_register): Likewise.
975         (libunwind_sigtramp_frame_sniffer): Likewise.
976         * ia64-tdep.c (ia64_access_reg): Likewise.
977         (ia64_access_rse_reg): Likewise.
978         (ia64_libunwind_sigtramp_frame_this_id): Likewise.
979         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
980
981 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
982
983         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
984
985 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
986
987         * remote-sim.c (gdbsim_target::close,
988         gdbsim_target::mourn_inferior): Remove unused variables.
989
990 2018-07-16  Simon Marchi  <simon.marchi@polymtl.ca>
991
992         * ia64-tdep.c (ktab_buf): New global.
993         (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
994         (get_kernel_table): Adjust.
995
996 2018-07-16  Tom Tromey  <tom@tromey.com>
997
998         * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
999         * dwarf2read.c (using_directives, new_symbol): Use
1000         outermost_context_p.
1001         * dbxread.c (process_one_symbol): Use outermost_context_p.
1002         * coffread.c (coff_symtab_read): Use outermost_context_p.
1003
1004 2018-07-16  Tom Tromey  <tom@tromey.com>
1005
1006         * dwarf2read.c (using_directives, read_func_scope)
1007         (read_lexical_block_scope): Update.
1008         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
1009         * buildsym.h (local_using_directives, global_using_directives):
1010         Don't declare.
1011         (get_local_using_directives, set_local_using_directives)
1012         (get_global_using_directives): Declare.
1013         * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
1014         m_global_using_directives>: New members.
1015         (finish_block_internal, prepare_for_building)
1016         (reset_symtab_globals, end_symtab_get_static_block)
1017         (push_context): Update.
1018         (get_local_using_directives, set_local_using_directives)
1019         (get_global_using_directives): New functions.
1020         (buildsym_init): Update.
1021
1022 2018-07-16  Tom Tromey  <tom@tromey.com>
1023
1024         * xcoffread.c (xcoff_initial_scan): Don't call
1025         free_pending_blocks.
1026         * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
1027         * buildsym.h (class scoped_free_pendings): Add constructor.
1028         (free_pending_blocks): Don't declare.
1029         * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
1030         (free_pending_blocks): Now static.
1031
1032 2018-07-16  Tom Tromey  <tom@tromey.com>
1033
1034         * buildsym.h (push_subfile, pop_subfile): Update declarations.
1035         * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
1036         member.
1037         (struct subfile_stack): Remove.
1038         (subfile_stack): Remove.
1039         (push_subfile, pop_subfile, buildsym_init): Update.
1040
1041 2018-07-16  Tom Tromey  <tom@tromey.com>
1042
1043         * buildsym.c (push_subfile): Use gdb_assert.
1044         (pop_subfile): Use gdb_assert.
1045
1046 2018-07-16  Tom Tromey  <tom@tromey.com>
1047
1048         * buildsym.h (merge_symbol_lists): Remove.
1049         * buildsym.c (merge_symbol_lists): Remove.
1050
1051 2018-07-16  Tom Tromey  <tom@tromey.com>
1052
1053         * stabsread.c (scan_file_globals): Update comment.
1054         * stabsread.h (scan_file_globals): Move from buildsym.h.
1055         * buildsym.h (scan_file_globals): Move to stabsread.h.
1056
1057 2018-07-16  Tom Tromey  <tom@tromey.com>
1058
1059         * xcoffread.c (xcoff_new_init): Update.
1060         * mipsread.c (mipscoff_new_init): Update.
1061         * mdebugread.c (mdebug_build_psymtabs): Update.
1062         * elfread.c (elf_new_init): Update.
1063         * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
1064         (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
1065         * buildsym.h (buildsym_new_init): Don't declare.
1066         * buildsym.c (buildsym_new_init): Remove.
1067
1068 2018-07-16  Tom Tromey  <tom@tromey.com>
1069
1070         * stabsread.h (within_function): Move from buildsym.h.
1071         * stabsread.c (start_stabs): Clear within_function.
1072         * coffread.c (coff_start_symtab): Clear within_function.
1073         * buildsym.h (within_function): Move to stabsread.h.
1074         * buildsym.c (prepare_for_building): Update.
1075
1076 2018-07-16  Tom Tromey  <tom@tromey.com>
1077
1078         * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
1079         * dwarf2read.c (dwarf2_start_symtab): Don't set
1080         processing_gcc_compilation.
1081         * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
1082
1083 2018-07-16  Tom Tromey  <tom@tromey.com>
1084
1085         * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
1086         (next_symbol_text_func): Move from buildsym.h.
1087         * stabsread.c (hashname): Move from buildsym.c.
1088         * buildsym.h (HASHSIZE, symnum, next_symbol_text)
1089         (next_symbol_text_func, hashname): Move to stabsread.h.
1090         * buildsym.c: Don't include bcache.h
1091         (hashname): Move to stasbread.c.
1092
1093 2018-07-16  Tom Tromey  <tom@tromey.com>
1094
1095         * buildsym.h (context_stack_size): Don't declare.
1096         * buildsym.c (context_stack_size): New global.
1097
1098 2018-07-16  Tom Tromey  <tom@tromey.com>
1099
1100         * dbxread.c (processing_acc_compilation): New global.
1101         * buildsym.h (processing_acc_compilation): Don't declare.
1102
1103 2018-07-16  Tom Tromey  <tom@tromey.com>
1104
1105         * xcoffread.c (aix_process_linenos, complete_symtab): Update.
1106         * dbxread.c (read_ofile_symtab): Update.
1107         * coffread.c (coff_start_symtab, coff_end_symtab): Update.
1108         * buildsym.h (last_source_start_addr): Remove.
1109         (set_last_source_start_addr, get_last_source_start_addr):
1110         Declare.
1111         * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
1112         parameter.
1113         (struct buildsym_compunit) <m_last_source_start_addr>: New
1114         member.
1115         (prepare_for_building): Remove start_addr parameter.
1116         (start_symtab, restart_symtab, end_symtab_get_static_block)
1117         (end_symtab_with_blockvector): Update.
1118         (set_last_source_start_addr, get_last_source_start_addr): New
1119         functions.
1120
1121 2018-07-16  Tom Tromey  <tom@tromey.com>
1122
1123         * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
1124         member.
1125         (have_line_numbers): Remove.
1126         (record_line, prepare_for_building, end_symtab_get_static_block)
1127         (augment_type_symtab): Update.
1128
1129 2018-07-16  Tom Tromey  <tom@tromey.com>
1130
1131         * buildsym.c (~buildsym_compunit): Free the macro table.
1132         (struct buildsym_compunit) <get_macro_table, release_macros>: New
1133         methods.
1134         <m_pending_macros>: New member.
1135         (pending_macros): Remove.
1136         (~scoped_free_pendings, get_macro_table, prepare_for_building)
1137         (reset_symtab_globals, end_symtab_get_static_block)
1138         (end_symtab_with_blockvector, augment_type_symtab)
1139         (buildsym_init): Update.
1140
1141 2018-07-16  Tom Tromey  <tom@tromey.com>
1142
1143         * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
1144         parameter.
1145         (buildsym_compunit::set_last_source_file): New method.
1146         <m_last_source_file>: New member.
1147         (prepare_for_building): Remove "name" parameter.
1148         (start_symtab, restart_symtab, reset_symtab_globals): Update.
1149         (last_source_file): Remove.
1150         (set_last_source_file, get_last_source_file): Update.
1151
1152 2018-07-16  Tom Tromey  <tom@tromey.com>
1153
1154         * buildsym.c (prepare_for_building): Add assert.
1155
1156 2018-07-16  Tom Tromey  <tom@tromey.com>
1157
1158         * buildsym.c (~buildsym_compunit): Update.
1159         (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
1160         (start_subfile, patch_subfile_names)
1161         (end_symtab_with_blockvector): Update.
1162
1163 2018-07-16  Tom Tromey  <tom@tromey.com>
1164
1165         * buildsym.c (struct buildsym_compunit): Add constructor,
1166         destructor, initializers.
1167         (start_buildsym_compunit): Remove.
1168         (free_buildsym_compunit): Use "delete".
1169         (start_symtab, restart_symtab): Use "new".
1170
1171 2018-07-13  Simon Marchi  <simon.marchi@polymtl.ca>
1172
1173         * symfile.c (set_objfile_default_section_offset): Remove struct
1174         keyword.
1175
1176 2018-07-14  Stafford Horne  <shorne@gmail.com>
1177
1178         * (Responsible Maintainers): Add myself as or1k maintainer.
1179
1180 2018-07-13  Tom Tromey  <tom@tromey.com>
1181
1182         * symfile.c (set_objfile_default_section_offset): Use extra braces
1183         around initializer.
1184
1185 2018-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1186
1187         * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
1188         non-branching basr.
1189
1190 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1191
1192         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1193         unittests/cli-utils-selftests.c
1194         * unittests/cli-utils-selftests.c: New file.
1195
1196 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1197
1198         * NEWS: Mention new commands. Mention change to 'thread apply'.
1199
1200 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1201
1202         * thread.c (thr_try_catch_cmd): New function.
1203         (thread_apply_all_command): Handle qcs flags.
1204         (thread_apply_command): Handle qcs flags.
1205         (taas_command): New function.
1206         (tfaas_command): New function.
1207         (_initialize_thread): Update to setup the new commands 'taas
1208         and 'tfaas'. Change doc string for 'thread apply'.
1209
1210 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1211
1212         * stack.c: (trailing_outermost_frame): New function, mostly
1213         extracted from backtrace_command_1.
1214         (leading_innermost_frame): New function.
1215         (backtrace_command_1): Update to call trailing_outermost_frame.
1216         (frame_apply_command_count): New function.
1217         (frame_apply_level_command): New function.
1218         (frame_apply_all_command): New function.
1219         (frame_apply_command): New function.
1220         (faas_command): New function.
1221         (frame_cmd_list): New variable.
1222         (_initialize_stack): Update to setup the new commands 'frame apply'
1223         and 'faas'.
1224
1225 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1226
1227         * cli-utils.c (number_or_range_parser::get_number): Only handle
1228         numbers or convenience var as numbers.
1229         (parse_flags): New function.
1230         (parse_flags_qcs): New function.
1231         (number_or_range_parser::finished): Ensure parsing end is detected
1232         before end of string.
1233         * cli-utils.h (parse_flags): New function.
1234         (parse_flags_qcs): New function.
1235         (number_or_range_parser): Remove m_finished bool.
1236         (number_or_range_parser::skip_range): Set m_in_range to false.
1237
1238 2018-07-12  Sergio Durigan Junior  <sergiodj@redhat.com>
1239
1240         * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
1241         on Windows.
1242
1243 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
1244             Jan Kratochvil  <jan.kratochvil@redhat.com>
1245             Paul Fertser  <fercerpav@gmail.com>
1246             Tsutomu Seki  <sekiriki@gmail.com>
1247             Pedro Alves  <palves@redhat.com>
1248
1249         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1250         'unittests/parse-connection-spec-selftests.c'.
1251         (COMMON_SFILES): Add 'common/netstuff.c'.
1252         (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
1253         * NEWS (Changes since GDB 8.2): Mention IPv6 support.
1254         * common/netstuff.c: New file.
1255         * common/netstuff.h: New file.
1256         * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
1257         (wait_for_connect): Update comment.  New parameter
1258         'gdb::optional<int> sock' instead of 'struct serial *scb'.
1259         Use 'sock' directly instead of 'scb->fd'.
1260         (try_connect): New function, with code from 'net_open'.
1261         (net_open): Rewrite main loop to deal with multiple
1262         sockets/addresses.  Handle IPv6-style hostnames; implement
1263         support for IPv6 connections.
1264         * unittests/parse-connection-spec-selftests.c: New file.
1265
1266 2018-07-11  Pedro Alves  <palves@redhat.com>
1267
1268         PR gdb/23377
1269         * remote.c (remote_target::remote_detach_pid): Call
1270         set_current_process.
1271
1272 2018-07-11  Pedro Alves  <palves@redhat.com>
1273
1274         * h8300-tdep.c (h8300_gdbarch_init): Remove
1275         set_gdbarch_ecoff_reg_to_regnum calls.
1276
1277 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
1278
1279         PR c++/23373
1280         * c-typeprint.c (c_type_print_base_struct_union): Don't print
1281         offsets/sizes for static members of a class/struct.
1282
1283 2018-07-11  Alan Hayward  <alan.hayward@arm.com>
1284
1285         * target-descriptions.c (tdesc_register_bitsize): Rename.
1286         * target-descriptions.h (tdesc_register_bitsize): Likewise.
1287         * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
1288         * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
1289
1290 2018-07-10  Tom Tromey  <tom@tromey.com>
1291
1292         * breakpoint.c (moribund_locations): Now static and a
1293         std::vector.
1294         (breakpoint_init_inferior, moribund_breakpoint_here_p)
1295         (build_bpstat_chain, update_global_location_list)
1296         (breakpoint_retire_moribund): Update.
1297         * breakpoint.h (bp_location_p): Remove typedef.  Don't declare
1298         VEC.
1299
1300 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
1301
1302         * riscv-tdep.c (riscv_is_fp_regno_p): New function.
1303         (riscv_register_reggroup_p): Use new function, remove unneeded
1304         parenthesis.
1305         (riscv_push_dummy_call): Extend assert to compare against xlen or
1306         flen based on register type.
1307
1308 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
1309
1310         * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
1311
1312 2018-07-09  Andrew Burgess  <andrew.burgess@embecosm.com>
1313
1314         * remote.c (show_hardware_watchpoint_limit): New function.
1315         (show_hardware_watchpoint_length_limit): New function.
1316         (show_hardware_breakpoint_limit): New function.
1317         (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
1318         where appropriate, update help text.
1319
1320 2018-07-09  Tom Tromey  <tom@tromey.com>
1321
1322         * Makefile.in (CDEPS): Don't mention XM_CDEPS.
1323         (CLIBS): Don't mention NAT_CLIBS.
1324
1325 2018-07-09  Tom Tromey  <tom@tromey.com>
1326
1327         * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
1328         (LIBGDB_OBS, clean mostlyclean): Update.
1329         (gdb$(EXEEXT), insight$(EXEEXT)): Update.
1330
1331 2018-07-09  Tom Tromey  <tom@tromey.com>
1332
1333         * Makefile.in (%.c: %.y): Use ECHO_YACC.
1334         (%.c: %.l): Use ECHO_LEX.  Just fail if flex not available.
1335         * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
1336
1337 2018-07-09  Tom Tromey  <tom@tromey.com>
1338
1339         * Makefile.in (ALLDEPFILES): Remove exec.c.
1340         (COMMON_OBS): Remove exec.o.
1341         (COMMON_SFILES): Add exec.c.
1342
1343 2018-07-09  Tom Tromey  <tom@tromey.com>
1344
1345         * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
1346
1347 2018-07-09  Tom Tromey  <tom@tromey.com>
1348
1349         * Makefile.in (clean mostlyclean): Remove stamp-version.
1350         (version.c): Depend on stamp-version.
1351         (stamp-version): New rule, from version.c rule.
1352
1353 2018-07-09  Tom Tromey  <tom@tromey.com>
1354
1355         * Makefile.in (init.c): Depend on stamp-init.
1356         (stamp-init): New rule, from init.c rule.
1357         (clean mostlyclean): Remove stamp-init.
1358
1359 2018-07-09  Tom Tromey  <tom@tromey.com>
1360
1361         * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
1362         SUBDIR_GCC_COMPILE_SRCS.
1363
1364 2018-07-09  Tom Tromey  <tom@tromey.com>
1365
1366         * Makefile.in (init.c): Remove some unused sed rules.
1367
1368 2018-07-09  Tom Tromey  <tom@tromey.com>
1369
1370         * Makefile.in (TSOBS): Remove.
1371         (INIT_FILES): Update.
1372         (LIBGDB_OBS): Update.
1373         (COMMON_SFILES): Add inflow.c.
1374         (SFILES): Remove inflow.c.
1375
1376 2018-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
1377
1378         * contrib/gdb-add-index.sh ($dwarf5): New, use it.
1379
1380 2018-07-07  Simon Marchi  <simon.marchi@polymtl.ca>
1381
1382         * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
1383         get_saveloc_name, is_signal_frame_name, step_name,
1384         init_remote_name, create_addr_space_name,
1385         destroy_addr_space_name, search_unwind_table_name,
1386         find_dyn_list_name): Constify.
1387
1388 2018-07-05  Simon Marchi  <simon.marchi@polymtl.ca>
1389
1390         * darwin-nat.c (darwin_pthread_kill): New function.
1391         (darwin_resume_thread): Use darwin_pthread_kill.
1392
1393 2018-07-05  Tom de Vries  <tdevries@suse.de>
1394
1395         * macroexp.c (macro_buffer) <operator=>: New member function.
1396
1397 2018-07-04  Tom Tromey  <tom@tromey.com>
1398
1399         * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
1400
1401 2018-07-04  Simon Marchi  <simon.marchi@polymtl.ca>
1402
1403         * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
1404         * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
1405         * maint.c: Likewise.
1406         * top.c: Likewise.
1407
1408 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
1409
1410         * NEWS: Create a new section for the next release branch.
1411         Rename the section of the current branch, now that it has
1412         been cut.
1413
1414 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
1415
1416         GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
1417         * version.in: Bump version to 8.2.50.DATE-git.
1418
1419 2018-07-04  Vyacheslav Barinov  <v.barinov@samsung.com>
1420             Pedro Alves  <palves@redhat.com>
1421
1422         * linux-nat.c (linux_init_ptrace): Rename to ...
1423         (linux_init_ptrace_procfs): ... this.  Call
1424         linux_proc_init_warnings.
1425         (linux_nat_target::post_attach)
1426         (linux_nat_target::post_startup_inferior): Adjust.
1427         * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
1428         * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
1429
1430 2018-07-04  Tom de Vries  <tdevries@suse.de>
1431
1432         * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
1433         check ...
1434         (read_comp_unit_head): ... here.
1435
1436 2018-07-03  Tom Tromey  <tom@tromey.com>
1437
1438         * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
1439         (stop_tracing, tstatus_command)
1440         (find_matching_tracepoint_location, merge_uploaded_tracepoints)
1441         (print_one_static_tracepoint_marker): Update.
1442         * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
1443         std::vector.
1444         * breakpoint.h (breakpoint_p): Remove typedef.  Don't declare
1445         VEC.
1446         (all_tracepoints, static_tracepoints_here): Return std::vector.
1447
1448 2018-07-03  Tom Tromey  <tom@tromey.com>
1449
1450         * common/ptid.c (ptid_equal): Remove.
1451         * common/ptid.h (ptid_equal): Don't declare.
1452         * ada-tasks.c: Update.
1453         * breakpoint.c: Update.
1454         * common/agent.c: Update.
1455         * corelow.c: Update.
1456         * darwin-nat-info.c: Update.
1457         * darwin-nat.c: Update.
1458         * dcache.c: Update.
1459         * dtrace-probe.c: Update.
1460         * dummy-frame.c: Update.
1461         * fbsd-nat.c: Update.
1462         * frame.c: Update.
1463         * gdbthread.h: Update.
1464         * gnu-nat.c: Update.
1465         * go32-nat.c: Update.
1466         * inf-loop.c: Update.
1467         * inf-ptrace.c: Update.
1468         * infcall.c: Update.
1469         * infcmd.c: Update.
1470         * inflow.c: Update.
1471         * infrun.c: Update.
1472         * linux-fork.c: Update.
1473         * linux-nat.c: Update.
1474         * linux-thread-db.c: Update.
1475         * mi/mi-cmd-var.c: Update.
1476         * mi/mi-interp.c: Update.
1477         * mi/mi-main.c: Update.
1478         * nto-procfs.c: Update.
1479         * ppc-linux-tdep.c: Update.
1480         * procfs.c: Update.
1481         * python/py-inferior.c: Update.
1482         * python/py-record-btrace.c: Update.
1483         * python/py-record.c: Update.
1484         * ravenscar-thread.c: Update.
1485         * regcache.c: Update.
1486         * remote-sim.c: Update.
1487         * remote.c: Update.
1488         * sol-thread.c: Update.
1489         * solib.c: Update.
1490         * target.c: Update.
1491         * tui/tui-stack.c: Update.
1492         * varobj.c: Update.
1493         * windows-nat.c: Update.
1494         * windows-tdep.c: Update.
1495
1496 2018-07-03  Tom Tromey  <tom@tromey.com>
1497
1498         * common/ptid.c (ptid_match): Remove.
1499         * common/ptid.h (ptid_match): Don't declare.
1500         * fbsd-nat.c: Update.
1501         * infcmd.c: Update.
1502         * infrun.c: Update.
1503         * linux-nat.c: Update.
1504         * record-btrace.c: Update.
1505         * regcache.c: Update.
1506         * remote.c: Update.
1507
1508 2018-07-03  Tom Tromey  <tom@tromey.com>
1509
1510         * common/ptid.c (ptid_tid_p): Remove.
1511         * common/ptid.h (ptid_tid_p): Don't declare.
1512         * sol-thread.c: Update.
1513
1514 2018-07-03  Tom Tromey  <tom@tromey.com>
1515
1516         * common/ptid.c (ptid_lwp_p): Remove.
1517         * common/ptid.h (ptid_lwp_p): Don't declare.
1518         * fbsd-nat.c: Update.
1519         * linux-nat.c: Update.
1520         * nat/linux-procfs.c: Update.
1521         * nat/x86-linux-dregs.c: Update.
1522         * sol-thread.c: Update.
1523
1524 2018-07-03  Tom Tromey  <tom@tromey.com>
1525
1526         * common/ptid.c (ptid_is_pid): Remove.
1527         * common/ptid.h (ptid_is_pid): Don't declare.
1528         * infrun.c: Update.
1529         * linux-nat.c: Update.
1530         * mi/mi-interp.c: Update.
1531         * remote.c: Update.
1532         * thread.c: Update.
1533
1534 2018-07-03  Tom Tromey  <tom@tromey.com>
1535
1536         * common/ptid.c (ptid_get_tid): Remove.
1537         * common/ptid.h (ptid_get_tid): Don't declare.
1538         * ada-tasks.c: Update.
1539         * aix-thread.c: Update.
1540         * bsd-uthread.c: Update.
1541         * darwin-nat.c: Update.
1542         * fbsd-nat.c: Update.
1543         * i386-darwin-nat.c: Update.
1544         * infrun.c: Update.
1545         * linux-tdep.c: Update.
1546         * nto-procfs.c: Update.
1547         * ppc-ravenscar-thread.c: Update.
1548         * python/py-infthread.c: Update.
1549         * ravenscar-thread.c: Update.
1550         * sol-thread.c: Update.
1551         * sparc-ravenscar-thread.c: Update.
1552         * windows-nat.c: Update.
1553
1554 2018-07-03  Tom Tromey  <tom@tromey.com>
1555
1556         * common/ptid.c (ptid_get_lwp): Remove.
1557         * common/ptid.h (ptid_get_lwp): Don't declare.
1558         * aarch64-linux-nat.c: Update.
1559         * ada-tasks.c: Update.
1560         * aix-thread.c: Update.
1561         * amd64-linux-nat.c: Update.
1562         * arm-linux-nat.c: Update.
1563         * corelow.c: Update.
1564         * fbsd-nat.c: Update.
1565         * fbsd-tdep.c: Update.
1566         * gnu-nat.c: Update.
1567         * i386-cygwin-tdep.c: Update.
1568         * i386-gnu-nat.c: Update.
1569         * i386-linux-nat.c: Update.
1570         * ia64-linux-nat.c: Update.
1571         * inf-ptrace.c: Update.
1572         * infrun.c: Update.
1573         * linux-fork.c: Update.
1574         * linux-nat.c: Update.
1575         * linux-tdep.c: Update.
1576         * linux-thread-db.c: Update.
1577         * mips-linux-nat.c: Update.
1578         * nat/aarch64-linux-hw-point.c: Update.
1579         * nat/aarch64-linux.c: Update.
1580         * nat/linux-btrace.c: Update.
1581         * nat/linux-osdata.c: Update.
1582         * nat/linux-procfs.c: Update.
1583         * nat/x86-linux-dregs.c: Update.
1584         * obsd-nat.c: Update.
1585         * ppc-fbsd-nat.c: Update.
1586         * ppc-linux-nat.c: Update.
1587         * procfs.c: Update.
1588         * python/py-infthread.c: Update.
1589         * ravenscar-thread.c: Update.
1590         * remote.c: Update.
1591         * s390-linux-nat.c: Update.
1592         * sol-thread.c: Update.
1593         * sol2-tdep.c: Update.
1594         * spu-linux-nat.c: Update.
1595         * x86-linux-nat.c: Update.
1596         * xtensa-linux-nat.c: Update.
1597
1598 2018-07-03  Tom Tromey  <tom@tromey.com>
1599
1600         * common/ptid.c (ptid_get_pid): Remove.
1601         * common/ptid.h (ptid_get_pid): Don't declare.
1602         * aarch64-linux-nat.c: Update.
1603         * ada-lang.c: Update.
1604         * aix-thread.c: Update.
1605         * alpha-bsd-nat.c: Update.
1606         * amd64-fbsd-nat.c: Update.
1607         * amd64-linux-nat.c: Update.
1608         * arm-linux-nat.c: Update.
1609         * arm-nbsd-nat.c: Update.
1610         * auxv.c: Update.
1611         * break-catch-syscall.c: Update.
1612         * breakpoint.c: Update.
1613         * bsd-uthread.c: Update.
1614         * corelow.c: Update.
1615         * ctf.c: Update.
1616         * darwin-nat.c: Update.
1617         * fbsd-nat.c: Update.
1618         * fbsd-tdep.c: Update.
1619         * gcore.c: Update.
1620         * gnu-nat.c: Update.
1621         * hppa-nbsd-nat.c: Update.
1622         * hppa-obsd-nat.c: Update.
1623         * i386-fbsd-nat.c: Update.
1624         * ia64-linux-nat.c: Update.
1625         * inf-ptrace.c: Update.
1626         * infcmd.c: Update.
1627         * inferior.c: Update.
1628         * inferior.h: Update.
1629         * inflow.c: Update.
1630         * infrun.c: Update.
1631         * linux-fork.c: Update.
1632         * linux-nat.c: Update.
1633         * linux-tdep.c: Update.
1634         * linux-thread-db.c: Update.
1635         * m68k-bsd-nat.c: Update.
1636         * mi/mi-interp.c: Update.
1637         * mi/mi-main.c: Update.
1638         * mips-linux-nat.c: Update.
1639         * mips-nbsd-nat.c: Update.
1640         * mips64-obsd-nat.c: Update.
1641         * nat/aarch64-linux-hw-point.c: Update.
1642         * nat/aarch64-linux.c: Update.
1643         * nat/linux-btrace.c: Update.
1644         * nat/linux-osdata.c: Update.
1645         * nat/linux-procfs.c: Update.
1646         * nat/x86-linux-dregs.c: Update.
1647         * nto-procfs.c: Update.
1648         * obsd-nat.c: Update.
1649         * ppc-linux-nat.c: Update.
1650         * ppc-nbsd-nat.c: Update.
1651         * ppc-obsd-nat.c: Update.
1652         * proc-service.c: Update.
1653         * procfs.c: Update.
1654         * python/py-inferior.c: Update.
1655         * python/py-infthread.c: Update.
1656         * ravenscar-thread.c: Update.
1657         * record.c: Update.
1658         * remote-sim.c: Update.
1659         * remote.c: Update.
1660         * rs6000-nat.c: Update.
1661         * s390-linux-nat.c: Update.
1662         * sh-nbsd-nat.c: Update.
1663         * sol-thread.c: Update.
1664         * sparc-nat.c: Update.
1665         * sparc64-tdep.c: Update.
1666         * spu-linux-nat.c: Update.
1667         * spu-tdep.c: Update.
1668         * target-debug.h: Update.
1669         * target.c: Update.
1670         * thread.c: Update.
1671         * tid-parse.c: Update.
1672         * tracefile-tfile.c: Update.
1673         * vax-bsd-nat.c: Update.
1674         * windows-nat.c: Update.
1675         * x86-linux-nat.c: Update.
1676         * x86-nat.c: Update.
1677
1678 2018-07-03  Tom Tromey  <tom@tromey.com>
1679
1680         * common/ptid.c (pid_to_ptid): Remove.
1681         * common/ptid.h (pid_to_ptid): Don't declare.
1682         * aix-thread.c: Update.
1683         * arm-linux-nat.c: Update.
1684         * common/ptid.c: Update.
1685         * common/ptid.h: Update.
1686         * corelow.c: Update.
1687         * ctf.c: Update.
1688         * darwin-nat.c: Update.
1689         * fbsd-nat.c: Update.
1690         * fork-child.c: Update.
1691         * gnu-nat.c: Update.
1692         * go32-nat.c: Update.
1693         * inf-ptrace.c: Update.
1694         * infcmd.c: Update.
1695         * inferior.c: Update.
1696         * infrun.c: Update.
1697         * linux-fork.c: Update.
1698         * linux-nat.c: Update.
1699         * nat/aarch64-linux-hw-point.c: Update.
1700         * nat/fork-inferior.c: Update.
1701         * nat/x86-linux-dregs.c: Update.
1702         * nto-procfs.c: Update.
1703         * obsd-nat.c: Update.
1704         * procfs.c: Update.
1705         * progspace.c: Update.
1706         * remote.c: Update.
1707         * rs6000-nat.c: Update.
1708         * s390-linux-nat.c: Update.
1709         * sol-thread.c: Update.
1710         * spu-linux-nat.c: Update.
1711         * target.c: Update.
1712         * top.c: Update.
1713         * tracefile-tfile.c: Update.
1714         * windows-nat.c: Update.
1715
1716 2018-07-03  Tom Tromey  <tom@tromey.com>
1717
1718         * common/ptid.h (ptid_build): Don't declare.
1719         * common/ptid.c (ptid_build): Remove.
1720         * aix-thread.c: Update.
1721         * bsd-kvm.c: Update.
1722         * bsd-uthread.c: Update.
1723         * common/agent.c: Update.
1724         * common/ptid.c: Update.
1725         * common/ptid.h: Update.
1726         * corelow.c: Update.
1727         * darwin-nat.c: Update.
1728         * fbsd-nat.c: Update.
1729         * gnu-nat.c: Update.
1730         * linux-fork.c: Update.
1731         * linux-nat.c: Update.
1732         * linux-thread-db.c: Update.
1733         * nat/linux-osdata.c: Update.
1734         * nat/linux-procfs.c: Update.
1735         * nto-procfs.c: Update.
1736         * obsd-nat.c: Update.
1737         * proc-service.c: Update.
1738         * procfs.c: Update.
1739         * ravenscar-thread.c: Update.
1740         * remote-sim.c: Update.
1741         * remote.c: Update.
1742         * sol-thread.c: Update.
1743         * target.c: Update.
1744         * windows-nat.c: Update.
1745
1746 2018-07-03  Tom Tromey  <tom@tromey.com>
1747
1748         * infrun.c (follow_exec): Use exit_inferior_silent.
1749         * inferior.c (exit_inferior_num_silent): Remove.
1750         * inferior.h (exit_inferior_num_silent): Don't declare.
1751
1752 2018-07-03  Tom Tromey  <tom@tromey.com>
1753
1754         PR cli/23340:
1755         * darwin-nat.c (darwin_attach_pid): Reset inferior and
1756         inferior_ptid on error.
1757
1758 2018-07-02  Maciej W. Rozycki  <macro@mips.com>
1759             Simon Marchi  <simon.marchi@polymtl.ca>
1760
1761         PR tdep/8282
1762         * disasm.h (gdb_disassembler): Add
1763         `m_disassembler_options_holder'. member
1764         * disasm.c (get_all_disassembler_options): New function.
1765         (gdb_disassembler::gdb_disassembler): Use it.
1766         (gdb_buffered_insn_length_init_dis): Likewise.
1767         (gdb_buffered_insn_length): Adjust accordingly.
1768         (set_disassembler_options): Handle options with arguments.
1769         (show_disassembler_options_sfunc): Likewise.  Add a leading new
1770         line if showing options with descriptions.
1771         (disassembler_options_completer): Adapt to using the
1772         `disasm_options_and_args_t' structure.
1773         * mips-tdep.c (mips_disassembler_options): New variable.
1774         (mips_disassembler_options_o32): Likewise.
1775         (mips_disassembler_options_n32): Likewise.
1776         (mips_disassembler_options_n64): Likewise.
1777         (gdb_print_insn_mips): Don't set `disassembler_options'.
1778         (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
1779         functions.
1780         (mips_gdbarch_init): Always set `gdbarch_print_insn' to
1781         `gdb_print_insn_mips'.  Set `gdbarch_disassembler_options',
1782         `gdbarch_disassembler_options_implicit' and
1783         `gdbarch_valid_disassembler_options'.
1784         * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
1785         `disasm_options_and_args_t' structure.
1786         * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
1787         method.
1788         (valid_disassembler_options): Switch from `disasm_options_t' to
1789         the `disasm_options_and_args_t' structure.
1790         * NEWS: Document `set disassembler-options' support for the MIPS
1791         target.
1792         * gdbarch.h: Regenerate.
1793         * gdbarch.c: Regenerate.
1794
1795 2018-07-02  Sebastian Huber  <sebastian.huber@embedded-brains.de>
1796
1797         * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
1798
1799 2018-06-29  Joel Brobecker  <brobecker@adacore.com>
1800
1801         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
1802         parameter in call to amd64_target_description.
1803         * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
1804         * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
1805         (amd64fbsd_init_abi): Likewise.
1806         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
1807         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
1808         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
1809         * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
1810
1811 2018-06-29  Pedro Alves  <palves@redhat.com>
1812
1813         * gdb/amd64-tdep.h (amd64_create_target_description): Add
1814         "segments" parameter.
1815         * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
1816         (_initialize_amd64_tdep): Update call to
1817         amd64_create_target_description.
1818         (amd64_target_description): Add "segments" parameter.  Adjust
1819         the implementation to use it.
1820         * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
1821         call to amd64_create_target_description.
1822         * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
1823         * gdb/arch/amd64.h (amd64_create_target_description): Add
1824         "segments" register.
1825         * gdb/arch/amd64.c (amd64_create_target_description): Add
1826         "segments" parameter.  Call create_feature_i386_64bit_segments
1827         only if SEGMENTS is true.
1828         * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
1829         call to amd64_create_target_description.
1830
1831 2018-06-29  Pedro Alves  <palves@redhat.com>
1832
1833         * thread.c (thread_target_id_str): New, factored out from ...
1834         (print_thread_info_1): ... here.  Use it to compute the max
1835         "Target Id" column width.
1836
1837 2018-06-29  Pedro Alves  <palves@redhat.com>
1838
1839         * remote.c (remote_target::extra_thread_info): Delete
1840         'display_buf' and 'n' locals.  from the cache, regardless of
1841         packet mechanims is in use.  Use cache for qThreadExtra and qP
1842         methods too.
1843
1844 2018-06-29  Pedro Alves  <palves@redhat.com>
1845
1846         * blockframe.c (find_pc_sect_containing_function): New function.
1847         * breakpoint.c (print_breakpoint_location): Don't call
1848         find_pc_sect_function.
1849         * linespec.c (create_sals_line_offset): Record the location's
1850         symbol in the sal.
1851         * linespec.c (convert_address_location_to_sals): Fill in sal's
1852         symbol with find_pc_sect_containing_function.
1853         * symtab.c (find_function_start_sal): Rename to ...
1854         (find_function_start_sal_1): ... this.
1855         (find_function_start_sal): Reimplement as wrapper around
1856         find_function_start_sal_1, and use
1857         find_pc_sect_containing_function to fill in the sal's symbol.
1858         (find_function_start_sal(symbol*, bool)): Adjust.
1859         * symtab.h (find_pc_function, find_pc_sect_function): Adjust
1860         comments.
1861         (find_pc_sect_containing_function): Declare.
1862
1863 2018-06-29  Pedro Alves  <palves@redhat.com>
1864
1865         * inline-frame.c (stopped_by_user_bp_inline_frame): Return
1866         true if the the location has no symbol.
1867
1868 2018-06-28  Tom Tromey  <tom@tromey.com>
1869
1870         * NEWS: Mention --enable-codesign.
1871         * silent-rules.mk (ECHO_SIGN): New variable.
1872         * configure.ac: Add --enable-codesign.
1873         * configure: Rebuild.
1874         * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
1875         (gdb$(EXEEXT)): Optionally invoke codesign.
1876
1877 2018-06-28  Pedro Alves  <palves@redhat.com>
1878
1879         * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
1880         comments.
1881         (switch_to_thread_no_regs): Adjust comment.
1882         * infcmd.c (stop_pc): Delete.
1883         (post_create_inferior, info_program_command): Replace references
1884         to stop_pc with references to thread_info->suspend.stop_pc.
1885         * inferior.h (stop_pc): Delete declaration.
1886         * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
1887         (handle_inferior_event_1, handle_signal_stop)
1888         (process_event_stop_test, keep_going_stepped_thread)
1889         (handle_step_into_function, handle_step_into_function_backward)
1890         (print_stop_location): Replace references to stop_pc with
1891         references to thread_info->suspend.stop_pc.
1892         (struct infcall_suspend_state) <stop_pc>: Delete field.
1893         (save_infcall_suspend_state, restore_infcall_suspend_state):
1894         Remove references to inf_stat->stop_pc.
1895         * linux-fork.c (fork_load_infrun_state): Likewise.
1896         * record-btrace.c (record_btrace_set_replay): Likewise.
1897         * record-full.c (record_full_goto_entry): Likewise.
1898         * remote.c (print_one_stopped_thread): Likewise.
1899         * target.c (target_resume): Extend comment.
1900         * thread.c (set_executing_thread): New.
1901         (set_executing): Use it.
1902         (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
1903         Remove references to stop_pc.
1904
1905 2018-06-28  Pedro Alves  <palves@redhat.com>
1906
1907         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
1908         Moving fetching stop_pc until after ecs->event_thread is refreshed.
1909
1910 2018-06-28  Tom Tromey  <tom@tromey.com>
1911
1912         * coffread.c (coff_symfile_finish): Update.
1913         * xcoffread.c (xcoff_symfile_finish): Update.
1914         * elfread.c (elf_symfile_finish): Update.
1915         * symfile.h (dwarf2_free_objfile): Don't declare.
1916         * dwarf2read.c (_initialize_dwarf2_read): Use
1917         register_objfile_data_with_cleanup.
1918         (dwarf2_free_objfile): Now static.  Change signature.
1919
1920 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
1921
1922         * symfile.c (add_symbol_file_command, _initialize_symfile): Add
1923         option "-o" to add-symbol-file-load to add an offset to each
1924         section's load address.
1925         * symfile.c (set_objfile_default_section_offset): New function.
1926
1927 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
1928
1929         * symfile.c (add_symbol_file_command): Make sure that sections
1930         with the same name are sorted in the same order.
1931
1932 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
1933
1934         * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
1935         require the second argument.  If omitted, load sections at the
1936         addresses specified in the file.
1937
1938 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
1939
1940         * symfile.c (symbol_file_command, symbol_file_add_main_1)
1941         (_initialize_symfile): Add option "-o" to symbol-file to add an
1942         offset to each section of the symbol file.
1943
1944 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
1945
1946         * MAINTAINERS (Write After Approval): Add Petr Tesarik.
1947
1948 2018-06-27  Tom Tromey  <tom@tromey.com>
1949
1950         * stack.c (_initialize_stack): Update "func" help text.
1951
1952 2018-06-27  Tom Tromey  <tom@tromey.com>
1953
1954         * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
1955         std::vector.
1956         (unwind_infopy_str, pyuw_create_unwind_info)
1957         (unwind_infopy_add_saved_register, pyuw_sniffer)
1958         (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
1959         Update.
1960         (struct saved_reg): Add constructor.
1961         <value>: Now a gdbpy_ref<>.
1962
1963 2018-06-27  Tom Tromey  <tom@tromey.com>
1964
1965         * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
1966
1967 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
1968
1969         * gdb-gdb.py.in: Format using autopep8.
1970
1971 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
1972
1973         * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
1974         (type_lookup_function): Recognize CORE_ADDR values.
1975
1976 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
1977
1978         * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
1979         print tag_name.
1980
1981 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
1982
1983         * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
1984         <__lt__>: Add.
1985
1986 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
1987
1988         * gdb-gdb.py: Move to...
1989         * gdb-gdb.py.in: ... here.
1990         * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
1991         * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
1992         dependencies.
1993         (distclean): Remove gdb-gdb.py when cleaning.
1994         (gdb-gdb.py, gdb-gdb.gdb): New rules.
1995         * configure: Re-generate.
1996
1997 2018-06-27  Pedro Alves  <palves@redhat.com>
1998
1999         * proc-service.c (get_ps_regcache): New.
2000         (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
2001         (ps_lsetfpregs): Use it.
2002
2003 2018-06-27  Omair Javaid  <omair.javaid@linaro.org>
2004
2005         PR gdb/21695
2006         * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
2007         (dwarf_decode_lines_1): Adjust.
2008
2009 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
2010
2011         * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
2012         override.
2013         <info_proc>: Likewise.
2014
2015 2018-06-26  Joel Brobecker  <brobecker@adacore.com>
2016
2017         * windows-nat.c (do_windows_fetch_inferior_registers): Rename
2018         to windows_fetch_one_register, and only handle the case of
2019         fetching one register.  Move the code that reloads the context
2020         and iterates over all registers if R is negative to...
2021         (windows_nat_target::fetch_registers): ... here.
2022         (do_windows_store_inferior_registers): Rename to
2023         windows_store_one_register, and only handle the case of storing
2024         one register.  Move the code that handles the case where r is
2025         negative to...
2026         (windows_nat_target::store_registers) ... here.
2027
2028 2018-06-26  Tom Tromey  <tom@tromey.com>
2029
2030         PR rust/22574:
2031         * typeprint.c (whatis_exp): Allow ptype/o for Rust.
2032         * rust-lang.c (rust_print_struct_def): Add podata parameter.
2033         Update.
2034         (rust_internal_print_type): Add podata parameter.
2035         (rust_print_type): Update.
2036
2037 2018-06-26  Tom Tromey  <tom@tromey.com>
2038
2039         * typeprint.h (struct print_offset_data) <update, finish,
2040         maybe_print_hole>: New methods.
2041         <indentation>: New constant.
2042         * typeprint.c (print_offset_data::indentation): Define.
2043         (print_offset_data::maybe_print_hole, print_offset_data::update)
2044         (print_offset_data::finish): Move from c-typeprint.c and rename.
2045         * c-typeprint.c (OFFSET_SPC_LEN): Remove.
2046         (print_spaces_filtered_with_print_options): Update.
2047         (c_print_type_union_field_offset, maybe_print_hole)
2048         (c_print_type_struct_field_offset): Move to typeprint.c and
2049         rename.
2050         (c_type_print_base_struct_union): Update.
2051
2052 2018-06-25  Pedro Alves  <palves@redhat.com>
2053
2054         * gdbthread.h (thread_info_ref, delete_thread)
2055         (delete_thread_silent, first_thread_of_inferior)
2056         (any_thread_of_inferior, switch_to_thread)
2057         (enable_thread_stack_temporaries)
2058         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2059         (get_last_thread_stack_temporary)
2060         (value_in_thread_stack_temporaries, can_access_registers_thread):
2061         Spell out "struct thread_info" instead of just "thread_info".
2062         * inferior.h (notice_new_inferior): Likewise.
2063
2064 2018-06-25  Pedro Alves  <palves@redhat.com>
2065
2066         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
2067         pass thread_info pointer to delete_thread.
2068         (windows_nat_target::detach): Pass inferior pointer to
2069         detach_inferior.
2070         * aix-thread.c (sync_threadlists): Pass thread_info pointer to
2071         delete_thread.
2072         * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
2073         * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
2074         and pass a thread_info pointer to delete_thread.
2075         * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
2076         pass thread_info pointer to delete_thread.
2077         * go32-nat.c (go32_nat_target::mourn_inferior): Remove
2078         delete_thread_silent call.
2079         * procfs.c (procfs_target::detach): Pass inferior pointer to
2080         detach_inferior.
2081         (procfs_target::wait): Pass thread_info pointer to delete_thread.
2082         * remote-sim.c (gdbsim_target::mourn_inferior): Remove
2083         delete_thread_silent call.
2084         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
2085         pass thread_info pointer to delete_thread.
2086         (windows_nat_target::detach): Pass inferior pointer to
2087         delete_inferior.
2088
2089 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
2090
2091         * regcache.c (readable_regcache::read_part): Fix asserts.
2092         (reg_buffer::raw_collect_part): New function.
2093         (regcache::write_part): Fix asserts.
2094         (reg_buffer::raw_supply_part): New function.
2095         (regcache::transfer_regset_register): New helper function.
2096         (regcache::transfer_regset): Call new functions.
2097         (regcache_supply_regset): Use gdb_byte*.
2098         (regcache::supply_regset): Likewise.
2099         (regcache_collect_regset): Likewise.
2100         (regcache::collect_regset): Likewise.
2101         * regcache.h (reg_buffer::raw_collect_part): New declaration.
2102         (reg_buffer::raw_supply_part): Likewise.
2103         (regcache::transfer_regset_register): Likewise.
2104         (regcache::transfer_regset): Use gdb_byte*.
2105
2106 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
2107
2108         * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
2109
2110 2018-06-21  Pedro Alves  <palves@redhat.com>
2111
2112         * ada-lang.h (ada_get_task_number): Take a thread_info pointer
2113         instead of a ptid_t.  All callers adjusted.
2114         * ada-tasks.c (ada_get_task_number): Likewise.  All callers
2115         adjusted.
2116         (print_ada_task_info, display_current_task_id, task_command_1):
2117         Adjust.
2118         * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
2119         inferior_thread.
2120         (breakpoint_kind): Adjust.
2121         (remove_breakpoints_pid): Rename to ...
2122         (remove_breakpoints_inf): ... this.  Adjust to take an inferior
2123         pointer.  All callers adjusted.
2124         (bpstat_clear_actions): Use inferior_thread.
2125         (get_bpstat_thread): New.
2126         (bpstat_do_actions): Use it.
2127         (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
2128         to take a thread_info pointer.  All callers adjusted.
2129         (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
2130         (breakpoint_re_set_thread): Use inferior_thread.
2131         * breakpoint.h (struct inferior): Forward declare.
2132         (bpstat_stop_status): Update.
2133         (remove_breakpoints_pid): Delete.
2134         (remove_breakpoints_inf): New.
2135         * bsd-uthread.c (bsd_uthread_target::wait)
2136         (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
2137         * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
2138         (maint_btrace_packet_history_cmd)
2139         (maint_btrace_clear_packet_history_cmd): Adjust.
2140         (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
2141         inferior_thread.
2142         * cli/cli-interp.c: Include "inferior.h".
2143         * common/refcounted-object.h (struct
2144         refcounted_object_ref_policy): New.
2145         * compile/compile-object-load.c: Include gdbthread.h.
2146         (store_regs): Use inferior_thread.
2147         * corelow.c (core_target::close): Use current_inferior.
2148         (core_target_open): Adjust to use first_thread_of_inferior and use
2149         the current inferior.
2150         * ctf.c (ctf_target::close): Adjust to use current_inferior.
2151         * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
2152         <thread>: ... this new field.  All references adjusted.
2153         (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
2154         Take a thread_info pointer instead of a ptid_t.
2155         * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
2156         (dummy_frame_discard, register_dummy_frame_dtor): Take a
2157         thread_info pointer instead of a ptid_t.
2158         * elfread.c: Include "inferior.h".
2159         (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
2160         Use inferior_thread.
2161         * eval.c (evaluate_subexp): Likewise.
2162         * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
2163         inferior_thread.
2164         * gdb_proc_service.h (struct thread_info): Forward declare.
2165         (struct ps_prochandle) <ptid>: Delete, replaced by ...
2166         <thread>: ... this new field.  All references adjusted.
2167         * gdbarch.h, gdbarch.c: Regenerate.
2168         * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
2169         'thread' parameter.  All implementations and callers adjusted.
2170         * gdbthread.h (thread_info) <set_running>: New method.
2171         (delete_thread, delete_thread_silent): Take a thread_info pointer
2172         instead of a ptid.
2173         (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
2174         (first_thread_of_process): Delete, replaced by ...
2175         (first_thread_of_inferior): ... this new function.  All callers
2176         adjusted.
2177         (any_live_thread_of_process): Delete, replaced by ...
2178         (any_live_thread_of_inferior): ... this new function.  All callers
2179         adjusted.
2180         (switch_to_thread, switch_to_no_thread): Declare.
2181         (is_executing): Delete.
2182         (enable_thread_stack_temporaries): Update comment.
2183         <enable_thread_stack_temporaries>: Take a thread_info pointer
2184         instead of a ptid_t.  Incref the thread.
2185         <~enable_thread_stack_temporaries>: Decref the thread.
2186         <m_ptid>: Delete
2187         <m_thr>: New.
2188         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2189         (get_last_thread_stack_temporary)
2190         (value_in_thread_stack_temporaries, can_access_registers_thread):
2191         Take a thread_info pointer instead of a ptid_t.  All callers
2192         adjusted.
2193         * infcall.c (get_call_return_value): Use inferior_thread.
2194         (run_inferior_call): Work with thread pointers instead of ptid_t.
2195         (call_function_by_hand_dummy): Work with thread pointers instead
2196         of ptid_t.  Use thread_info_ref.
2197         * infcmd.c (proceed_thread_callback): Access thread's state
2198         directly.
2199         (ensure_valid_thread, ensure_not_running): Use inferior_thread,
2200         access thread's state directly.
2201         (continue_command): Use inferior_thread.
2202         (info_program_command): Use find_thread_ptid and access thread
2203         state directly.
2204         (proceed_after_attach_callback): Use thread state directly.
2205         (notice_new_inferior): Take a thread_info pointer instead of a
2206         ptid_t.  All callers adjusted.
2207         (exit_inferior): Take an inferior pointer instead of a pid.  All
2208         callers adjusted.
2209         (exit_inferior_silent): New.
2210         (detach_inferior): Delete.
2211         (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
2212         (gdb_inferior_id_to_pid, in_inferior_list): Delete.
2213         (detach_inferior_command, kill_inferior_command): Use
2214         find_inferior_id instead of valid_gdb_inferior_id and
2215         gdb_inferior_id_to_pid.
2216         (inferior_command): Use inferior and thread pointers.
2217         * inferior.h (struct thread_info): Forward declare.
2218         (notice_new_inferior): Take a thread_info pointer instead of a
2219         ptid_t.  All callers adjusted.
2220         (detach_inferior): Delete declaration.
2221         (exit_inferior, exit_inferior_silent): Take an inferior pointer
2222         instead of a pid.  All callers adjusted.
2223         (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
2224         (valid_gdb_inferior_id): Delete.
2225         * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
2226         (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
2227         (struct displaced_step_inferior_state) <pid>: Delete, replaced by
2228         ...
2229         <inf>: ... this new field.
2230         <step_ptid>: Delete, replaced by ...
2231         <step_thread>: ... this new field.
2232         (get_displaced_stepping_state): Take an inferior pointer instead
2233         of a pid.  All callers adjusted.
2234         (displaced_step_in_progress_any_inferior): Adjust.
2235         (displaced_step_in_progress_thread): Take a thread pointer instead
2236         of a ptid_t.  All callers adjusted.
2237         (displaced_step_in_progress, add_displaced_stepping_state): Take
2238         an inferior pointer instead of a pid.  All callers adjusted.
2239         (get_displaced_step_closure_by_addr): Adjust.
2240         (remove_displaced_stepping_state): Take an inferior pointer
2241         instead of a pid.  All callers adjusted.
2242         (displaced_step_prepare_throw, displaced_step_prepare)
2243         (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
2244         All callers adjusted.
2245         (start_step_over): Adjust.
2246         (infrun_thread_ptid_changed): Remove bit updating ptids in the
2247         displaced step queue.
2248         (do_target_resume): Adjust.
2249         (fetch_inferior_event): Use inferior_thread.
2250         (context_switch, get_inferior_stop_soon): Take an
2251         execution_control_state pointer instead of a ptid_t.  All callers
2252         adjusted.
2253         (switch_to_thread_cleanup): Delete.
2254         (stop_all_threads): Use scoped_restore_current_thread.
2255         * inline-frame.c: Include "gdbthread.h".
2256         (inline_state) <inline_state>: Take a thread pointer instead of a
2257         ptid_t.  All callers adjusted.
2258         <ptid>: Delete, replaced by ...
2259         <thread>: ... this new field.
2260         (find_inline_frame_state): Take a thread pointer instead of a
2261         ptid_t.  All callers adjusted.
2262         (skip_inline_frames, step_into_inline_frame)
2263         (inline_skipped_frames, inline_skipped_symbol): Take a thread
2264         pointer instead of a ptid_t.  All callers adjusted.
2265         * inline-frame.h (skip_inline_frames, step_into_inline_frame)
2266         (inline_skipped_frames, inline_skipped_symbol): Likewise.
2267         * linux-fork.c (delete_checkpoint_command): Adjust to use thread
2268         pointers directly.
2269         * linux-nat.c (get_detach_signal): Likewise.
2270         * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
2271         (thread_db_notice_clone): Adjust.
2272         (thread_db_find_new_threads_silently)
2273         (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
2274         a thread pointer instead of a ptid_t.  All callers adjusted.
2275         * mi/mi-cmd-var.c: Include "inferior.h".
2276         (mi_cmd_var_update_iter): Update to use thread pointers.
2277         * mi/mi-interp.c (mi_new_thread): Update to use the thread's
2278         inferior directly.
2279         (mi_output_running_pid, mi_inferior_count): Delete, bits factored
2280         out to ...
2281         (mi_output_running): ... this new function.
2282         (mi_on_resume_1): Adjust to use it.
2283         (mi_user_selected_context_changed): Adjust to use inferior_thread.
2284         * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
2285         directly.
2286         (interrupt_thread_callback): : Adjust to use thread and inferior
2287         pointers.
2288         * proc-service.c: Include "gdbthread.h".
2289         (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
2290         * progspace-and-thread.c: Include "inferior.h".
2291         * progspace.c: Include "inferior.h".
2292         * python/py-exitedevent.c (create_exited_event_object): Adjust to
2293         hold a reference to an inferior_object.
2294         * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
2295         inferior_thread.
2296         * python/py-inferior.c (struct inferior_object): Give the type a
2297         tag name instead of a typedef.
2298         (python_on_normal_stop): No need to check if the current thread is
2299         listed.
2300         (inferior_to_inferior_object): Change return type to
2301         inferior_object.  All callers adjusted.
2302         (find_thread_object): Delete, bits factored out to ...
2303         (thread_to_thread_object): ... this new function.
2304         * python/py-infthread.c (create_thread_object): Use
2305         inferior_to_inferior_object.
2306         (thpy_is_stopped): Use thread pointer directly.
2307         (gdbpy_selected_thread): Use inferior_thread.
2308         * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
2309         field, replaced with ...
2310         <thread>: ... this new field.  All users adjusted.
2311         (btpy_insn_or_gap_new): Drop const.
2312         (btpy_list_new): Take a thread pointer instead of a ptid_t.  All
2313         callers adjusted.
2314         * python/py-record.c: Include "gdbthread.h".
2315         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
2316         a ptid_t.  All callers adjusted.
2317         (gdbpy_current_recording): Use inferior_thread.
2318         * python/py-record.h (recpy_record_object) <ptid>: Delete
2319         field, replaced with ...
2320         <thread>: ... this new field.  All users adjusted.
2321         (recpy_element_object) <ptid>: Delete
2322         field, replaced with ...
2323         <thread>: ... this new field.  All users adjusted.
2324         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
2325         a ptid_t.  All callers adjusted.
2326         * python/py-threadevent.c: Include "gdbthread.h".
2327         (get_event_thread): Use thread_to_thread_object.
2328         * python/python-internal.h (struct inferior_object): Forward
2329         declare.
2330         (find_thread_object, find_inferior_object): Delete declarations.
2331         (thread_to_thread_object, inferior_to_inferior_object): New
2332         declarations.
2333         * record-btrace.c: Include "inferior.h".
2334         (require_btrace_thread): Use inferior_thread.
2335         (record_btrace_frame_sniffer)
2336         (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
2337         (get_thread_current_frame): Use scoped_restore_current_thread and
2338         switch_to_thread.
2339         (get_thread_current_frame): Use thread pointer directly.
2340         (record_btrace_replay_at_breakpoint): Use thread's inferior
2341         pointer directly.
2342         * record-full.c: Include "inferior.h".
2343         * regcache.c: Include "gdbthread.h".
2344         (get_thread_arch_regcache): Use the inferior's address space
2345         directly.
2346         (get_thread_regcache, registers_changed_thread): New.
2347         * regcache.h (get_thread_regcache(thread_info *thread)): New
2348         overload.
2349         (registers_changed_thread): New.
2350         (remote_target) <remote_detach_1>: Swap order of parameters.
2351         (remote_add_thread): <remote_add_thread>: Return the new thread.
2352         (get_remote_thread_info(ptid_t)): New overload.
2353         (remote_target::remote_notice_new_inferior): Use thread pointers
2354         directly.
2355         (remote_target::process_initial_stop_replies): Use
2356         thread_info::set_running.
2357         (remote_target::remote_detach_1, remote_target::detach)
2358         (extended_remote_target::detach): Adjust.
2359         * stack.c (frame_show_address): Use inferior_thread.
2360         * target-debug.h (target_debug_print_thread_info_pp): New.
2361         * target-delegates.c: Regenerate.
2362         * target.c (default_thread_address_space): Delete.
2363         (memory_xfer_partial_1): Use current_inferior.
2364         (target_detach): Use current_inferior.
2365         (target_thread_address_space): Delete.
2366         (generic_mourn_inferior): Use current_inferior.
2367         * target.h (struct target_ops) <thread_address_space>: Delete.
2368         (target_thread_address_space): Delete.
2369         * thread.c (init_thread_list): Use ALL_THREADS_SAFE.  Use thread
2370         pointers directly.
2371         (delete_thread_1, delete_thread, delete_thread_silent): Take a
2372         thread pointer instead of a ptid_t.  Adjust all callers.
2373         (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
2374         (first_thread_of_process): Delete, replaced by ...
2375         (first_thread_of_inferior): ... this new function.  All callers
2376         adjusted.
2377         (any_thread_of_process): Rename to ...
2378         (any_thread_of_inferior): ... this, and take an inferior pointer.
2379         (any_live_thread_of_process): Rename to ...
2380         (any_live_thread_of_inferior): ... this, and take an inferior
2381         pointer.
2382         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2383         (value_in_thread_stack_temporaries)
2384         (get_last_thread_stack_temporary): Take a thread pointer instead
2385         of a ptid_t.  Adjust all callers.
2386         (thread_info::set_running): New.
2387         (validate_registers_access): Use inferior_thread.
2388         (can_access_registers_ptid): Rename to ...
2389         (can_access_registers_thread): ... this, and take a thread
2390         pointer.
2391         (print_thread_info_1): Adjust to compare thread pointers instead
2392         of ptids.
2393         (switch_to_no_thread, switch_to_thread): Make extern.
2394         (scoped_restore_current_thread::~scoped_restore_current_thread):
2395         Use m_thread pointer directly.
2396         (scoped_restore_current_thread::scoped_restore_current_thread):
2397         Use inferior_thread.
2398         (thread_command): Use thread pointer directly.
2399         (thread_num_make_value_helper): Use inferior_thread.
2400         * top.c (execute_command): Use inferior_thread.
2401         * tui/tui-interp.c: Include "inferior.h".
2402         * varobj.c (varobj_create): Use inferior_thread.
2403         (value_of_root_1): Use find_thread_global_id instead of
2404         global_thread_id_to_ptid.
2405
2406 2018-06-21  Alan Hayward  <alan.hayward@arm.com>
2407
2408         * regcache.c (readable_regcache::read_part): Avoid memcpy when
2409         possible.
2410         (regcache::write_part): Likewise.
2411         (readable_regcache::cooked_read_part): Update comment.
2412         (readable_regcache::cooked_write_part): Likewise.
2413         * regcache.h: (readable_regcache::read_part): Likewise.
2414         (regcache::write_part): Likewise.
2415
2416 2018-06-21  Richard Bunt  <richard.bunt@arm.com>
2417             Dirk Schubert  <dirk.schubert@arm.com>
2418
2419         * aarch64-linux-nat.c (post_attach): New.
2420         (aarch64_linux_nat_target::post_attach): Override post_attach to
2421         record the number of hardware debug registers.
2422
2423 2018-06-20  Tom Tromey  <tom@tromey.com>
2424
2425         * python/py-param.c (add_setshow_generic): Make parameters const.
2426         (parmpy_init): Update.
2427
2428 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
2429
2430         * regcache.h (regcache_cooked_read_ftype): Rename to...
2431         (register_read_ftype): ...this, change type to function_view.
2432         (class reg_buffer) <save>: Remove src parameter.
2433         (readonly_detached_regcache) <readonly_detached_regcache>: Make
2434         parameter non-const in first overload.  Remove src parameter in
2435         second overload.
2436         * regcache.c (do_cooked_read): Remove.
2437         (readonly_detached_regcache::readonly_detached_regcache): Make
2438         parameter non-const, adjust call to other constructor.
2439         (reg_buffer::save): Remove src parameter.
2440         * frame.c (do_frame_register_read): Remove.
2441         (frame_save_as_regcache): Use lambda function.
2442         * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
2443         parameter to ppu2spu_data *.
2444         (ppu2spu_sniffer): Use lambda function.
2445
2446 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
2447
2448         * record-full.c (record_full_target::insert_breakpoint): Remove
2449         "struct" keyword, add const.
2450
2451 2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>
2452
2453         * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
2454         PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
2455         * configure.ac: Remove AC_PREREQ, add missing quoting.
2456         * gnulib/configure.ac: Modernize usage of
2457         AC_INIT/AM_INIT_AUTOMAKE.  Remove AC_PREREQ.
2458         * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
2459         (AUTOMAKE_VERSION): Bump to 1.15.1.
2460         * configure: Re-generate.
2461         * config.in: Re-generate.
2462         * aclocal.m4: Re-generate.
2463         * gnulib/aclocal.m4: Re-generate.
2464         * gnulib/config.in: Re-generate.
2465         * gnulib/configure: Re-generate.
2466         * gnulib/import/Makefile.in: Re-generate.
2467
2468 2018-06-19  Pedro Alves  <palves@redhat.com>
2469
2470         * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
2471         (lookup_minimal_symbol_by_pc_section): ... here with
2472         gdb_assert_not_reached added.
2473
2474 2018-06-19  Pedro Alves  <palves@redhat.com>
2475
2476         * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
2477         parameter with a block parameter.  Compare location's block symbol
2478         with the frame's block instead of addresses.
2479         (skip_inline_frames): Pass the current block instead of the
2480         frame's address.  Break out as soon as we determine the frame
2481         should not be skipped.
2482
2483 2018-06-18  Tom Tromey  <tom@tromey.com>
2484
2485         * solib-aix.c (solib_aix_get_section_offsets): Return
2486         unique_xmalloc_ptr.
2487         (solib_aix_solib_create_inferior_hook): Update.
2488
2489 2018-06-18  Tom Tromey  <tom@tromey.com>
2490
2491         * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
2492
2493 2018-06-18  Tom Tromey  <tom@tromey.com>
2494
2495         * solib-frv.c (frv_relocate_main_executable): Use
2496         unique_xmalloc_ptr.
2497         * solib-dsbt.c (dsbt_relocate_main_executable): Use
2498         unique_xmalloc_ptr.
2499
2500 2018-06-18  Tom Tromey  <tom@tromey.com>
2501
2502         * objfiles.h (inhibit_section_map_updates): Update.
2503         (resume_section_map_updates, resume_section_map_updates_cleanup):
2504         Remove.
2505         * solib-svr4.c (svr4_handle_solib_event): Update.
2506         * objfiles.c (inhibit_section_map_updates): Return
2507         scoped_restore_tmpl<int>.
2508         (resume_section_map_updates, resume_section_map_updates_cleanup):
2509         Remove.
2510
2511 2018-06-18  Tom Tromey  <tom@tromey.com>
2512
2513         * valprint.h (read_string): Update.
2514         * valprint.c (read_string): Change type of "buffer".
2515         (val_print_string): Update.
2516         * python/py-value.c (valpy_string): Update.
2517         * language.h (struct language_defn) <la_get_string>: Change
2518         type of "buffer".
2519         (default_get_string, c_get_string): Update.
2520         * language.c (default_get_string): Change type of "buffer".
2521         * guile/scm-value.c (gdbscm_value_to_string): Update.
2522         * c-lang.c (c_get_string): Change type of "buffer".
2523
2524 2018-06-18  Tom Tromey  <tom@tromey.com>
2525
2526         * ser-mingw.c (struct pipe_state_destroyer): New.
2527         (pipe_state_up): New typedef.
2528         (cleanup_pipe_state): Remove.
2529         (pipe_windows_open): Use pipe_state_up.  Don't release argv.
2530
2531 2018-06-18  Tom Tromey  <tom@tromey.com>
2532
2533         * rust-lang.h (rust_yyerror): Don't declare.
2534         * rust-lang.c (rust_language_defn): Update.
2535         * rust-exp.y (yyerror): Now static.
2536         * parse.c (parse_exp_in_context_1): Update.
2537         * p-lang.h (p_yyerror): Don't declare.
2538         * p-lang.c (p_language_defn): Update.
2539         * p-exp.y (yyerror): Now static.
2540         * opencl-lang.c (opencl_language_defn): Update.
2541         * objc-lang.c (objc_language_defn): Update.
2542         * m2-lang.h (m2_yyerror): Don't declare.
2543         * m2-lang.c (m2_language_defn): Update.
2544         * m2-exp.y (yyerror): Now static.
2545         * language.h (struct language_defn) <la_error>: Remove.
2546         * language.c (unk_lang_error): Remove.
2547         (unknown_language_defn, auto_language_defn): Remove.
2548         * go-lang.h (go_yyerror): Don't declare.
2549         * go-lang.c (go_language_defn): Update.
2550         * go-exp.y (yyerror): Now static.
2551         * f-lang.h (f_yyerror): Don't declare.
2552         * f-lang.c (f_language_defn): Update.
2553         * f-exp.y (yyerror): Now static.
2554         * d-lang.h (d_yyerror): Don't declare.
2555         * d-lang.c (d_language_defn): Update.
2556         * d-exp.y (yyerror): Now static.
2557         * c-lang.h (c_yyerror): Don't declare.
2558         * c-lang.c (c_language_defn, cplus_language_defn)
2559         (asm_language_defn, minimal_language_defn): Update.
2560         * c-exp.y (yyerror): Now static.
2561         * ada-lang.h (ada_yyerror): Don't declare.
2562         * ada-lang.c (ada_language_defn): Update.
2563         * ada-exp.y (yyerror): Now static.
2564
2565 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
2566
2567         * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
2568         (store_sveregs_to_thread): Likewise.
2569         (aarch64_linux_fetch_inferior_registers): Check for SVE.
2570         (aarch64_linux_store_inferior_registers): Likewise.
2571         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
2572         function.
2573         (aarch64_sve_regs_copy_to_regcache): Likewise.
2574         (aarch64_sve_regs_copy_from_regcache): Likewise.
2575         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
2576         declaration.
2577         (aarch64_sve_regs_copy_to_regcache): Likewise.
2578         (aarch64_sve_regs_copy_from_regcache): Likewise.
2579         (sve_context): Structure from Linux headers.
2580         (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
2581         (SVE_SIG_ZREG_SIZE): Likewise.
2582         (SVE_SIG_PREG_SIZE): Likewise.
2583         (SVE_SIG_FFR_SIZE): Likewise.
2584         (SVE_SIG_REGS_OFFSET): Likewise.
2585         (SVE_SIG_ZREGS_OFFSET): Likewise.
2586         (SVE_SIG_ZREG_OFFSET): Likewise.
2587         (SVE_SIG_ZREGS_SIZE): Likewise.
2588         (SVE_SIG_PREGS_OFFSET): Likewise.
2589         (SVE_SIG_PREG_OFFSET): Likewise.
2590         (SVE_SIG_PREGS_SIZE): Likewise.
2591         (SVE_SIG_FFR_OFFSET): Likewise.
2592         (SVE_SIG_REGS_SIZE): Likewise.
2593         (SVE_SIG_CONTEXT_SIZE): Likewise.
2594         (SVE_PT_REGS_MASK): Likewise.
2595         (SVE_PT_REGS_FPSIMD): Likewise.
2596         (SVE_PT_REGS_SVE): Likewise.
2597         (SVE_PT_VL_INHERIT): Likewise.
2598         (SVE_PT_VL_ONEXEC): Likewise.
2599         (SVE_PT_REGS_OFFSET): Likewise.
2600         (SVE_PT_FPSIMD_OFFSET): Likewise.
2601         (SVE_PT_FPSIMD_SIZE): Likewise.
2602         (SVE_PT_SVE_ZREG_SIZE): Likewise.
2603         (SVE_PT_SVE_PREG_SIZE): Likewise.
2604         (SVE_PT_SVE_FFR_SIZE): Likewise.
2605         (SVE_PT_SVE_FPSR_SIZE): Likewise.
2606         (SVE_PT_SVE_FPCR_SIZE): Likewise.
2607         (__SVE_SIG_TO_PT): Likewise.
2608         (SVE_PT_SVE_OFFSET): Likewise.
2609         (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
2610         (SVE_PT_SVE_ZREG_OFFSET): Likewise.
2611         (SVE_PT_SVE_ZREGS_SIZE): Likewise.
2612         (SVE_PT_SVE_PREGS_OFFSET): Likewise.
2613         (SVE_PT_SVE_PREG_OFFSET): Likewise.
2614         (SVE_PT_SVE_PREGS_SIZE): Likewise.
2615         (SVE_PT_SVE_FFR_OFFSET): Likewise.
2616         (SVE_PT_SVE_FPSR_OFFSET): Likewise.
2617         (SVE_PT_SVE_FPCR_OFFSET): Likewise.
2618         (SVE_PT_SVE_SIZE): Likewise.
2619         (SVE_PT_SIZE): Likewise.
2620         (HAS_SVE_STATE): New define.
2621
2622 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
2623
2624         * nat/aarch64-sve-linux-sigcontext.h: New file.
2625         * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
2626         new files.
2627         (SVE_VQ_MIN): Likewise.
2628         (SVE_VQ_MAX): Likewise.
2629         (SVE_VL_MIN): Likewise.
2630         (SVE_VL_MAX): Likewise.
2631         (SVE_NUM_ZREGS): Likewise.
2632         (SVE_NUM_PREGS): Likewise.
2633         (sve_vl_valid): Likewise.
2634         (struct user_sve_header): Likewise.
2635
2636 2018-06-16  Andrew Burgess  <andrew.burgess@embecosm.com>
2637             Richard Bunt <Richard.Bunt@arm.com>
2638
2639         * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
2640         was requested by GDB.
2641
2642 2018-06-15  Tom de Vries  <tdevries@suse.de>
2643
2644         * MAINTAINERS (Write After Approval): Add Tom de Vries.
2645
2646 2018-06-14  Simon Marchi  <simon.marchi@polymtl.ca>
2647
2648         * gnulib/update-gnulib.sh: Print expected versions of
2649         autoconf/aclocal.
2650
2651 2018-06-14  Simon Marchi  <simon.marchi@ericsson.com>
2652
2653         * arch-utils.c (default_type_align): Use type_length_units.
2654         * gdbtypes.c (type_align): Use type_length_units.
2655
2656 2018-06-14  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2657
2658         * cli/cli-script.c (_initialize_cli_script): Fix online documentation
2659         of 'define' command.
2660
2661 2018-06-14  Tom de Vries  <tdevries@suse.de>
2662
2663         PR cli/22573
2664         * infcmd.c (print_return_value_1): Use get_user_print_options instead of
2665         get_no_prettyformat_print_options.
2666
2667 2018-06-13  Simon Marchi  <simon.marchi@ericsson.com>
2668
2669         * sparc-nat.h: Include target.h.
2670         * sparc64-linux-nat.c (class sparc64_linux_nat_target)
2671         <fetch_registers>: Remove this argument in function call.
2672         <store_registers>: Remove this argument in function call, remove
2673         extra semicolon.
2674         <low_forget_process>: Call sparc64_forget_process instead of
2675         sparc_forget_process.
2676
2677 2018-06-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2678
2679         * procfs.c (_initialize_procfs): Use add_inf_child_target.
2680         (procfs_target::make_corefile_notes): Adjust to new
2681         target_read_alloc return type.
2682
2683 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
2684             Stephen Roberts  <stephen.roberts@arm.com>
2685
2686         PR gdb/22882
2687         * infrun.c (fetch_inferior_event): If GDB is not proceeding then
2688         run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
2689         Move should_notify_stop local into more inner scope.
2690
2691 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
2692             Stephen Roberts  <stephen.roberts@arm.com>
2693
2694         PR gdb/22882
2695         * infrun.c (resume_1): Add call to mark_async_event_handler.
2696
2697 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
2698
2699         * infrun.c (do_target_wait): Change old version of $pc printed.
2700
2701 2018-06-11  Simon Marchi  <simon.marchi@ericsson.com>
2702
2703         * dwarf2read.c (read_index_from_section): Rename to...
2704         (read_gdb_index_from_section): ... this, update all callers.
2705         (dwarf2_read_index): Rename to...
2706         (dwarf2_read_gdb_index): ... this, update all callers.
2707
2708 2018-06-11  John David Anglin  <danglin@gcc.gnu.org>
2709
2710         * gdb/hppa-linux-nat.c
2711         (hppa_linux_nat_target::fetch_inferior_registers): Rename to
2712         hppa_linux_nat_target::fetch_registers.
2713
2714 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
2715
2716         * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
2717         * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
2718         (AARCH64_DWARF_SVE_FFR): Likewise.
2719         (AARCH64_DWARF_SVE_P0): Likewise.
2720         (AARCH64_DWARF_SVE_Z0): Likewise.
2721
2722 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
2723
2724         * common/common-regcache.h (raw_compare): New function.
2725         * regcache.c (regcache::raw_compare): Likewise.
2726         * regcache.h (regcache::raw_compare): New declaration.
2727
2728 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
2729
2730         * common/common-regcache.h (reg_buffer_common): New structure.
2731         * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
2732         (reg_buffer::raw_supply): Likewise.
2733         (reg_buffer::raw_supply_integer): Likewise.
2734         (reg_buffer::raw_supply_zeroed): Likewise.
2735         (reg_buffer::raw_collect): Likewise.
2736         (reg_buffer::raw_collect_integer): Likewise.
2737         * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
2738         (reg_buffer::raw_supply): Likewise.
2739         (reg_buffer::raw_supply_integer): Likewise.
2740         (reg_buffer::raw_supply_zeroed): Likewise.
2741         (reg_buffer::raw_collect): Likewise.
2742         (reg_buffer::raw_collect_integer): Likewise.
2743
2744 2018-06-10  Tom Tromey  <tom@tromey.com>
2745
2746         * remote.c (stop_reply_p): Remove typedef.  Don't declare queue.
2747         (class remote_state) <stop_reply_queue>: Now std::vector.
2748         (remote_state::~remote_state)
2749         (remote_target::stop_reply_queue_length): Update.
2750         (struct queue_iter_param, remove_child_of_pending_fork)
2751         (struct check_pending_event_prevents_wildcard_vcont_callback_data)
2752         (check_pending_event_prevents_wildcard_vcont_callback)
2753         (remove_stop_reply_for_inferior)
2754         (remove_stop_reply_of_remote_state)
2755         (remote_notif_remove_once_on_match)
2756         (stop_reply_match_ptid_and_ws)
2757         (remote_kill_child_of_pending_fork): Remove.
2758         (remote_target::remove_new_fork_children)
2759         (remote_target::check_pending_events_prevent_wildcard_vcont)
2760         (remote_target::discard_pending_stop_replies)
2761         (remote_target::discard_pending_stop_replies_in_queue)
2762         (remote_target::remote_notif_remove_queued_reply)
2763         (remote_target::queued_stop_reply)
2764         (remote_target::push_stop_reply, remote_target::peek_stop_reply)
2765         (remote_target::wait, remote_target::kill_new_fork_children)
2766         (remote_target::async): Update.
2767
2768 2018-06-10  Tom Tromey  <tom@tromey.com>
2769
2770         * record-full.c (record_full_arch_list_cleanups): Remove.
2771         (record_full_message): Use try/catch.
2772         (record_full_wait_cleanups): Remove.
2773         (record_full_wait_1): Use try/catch.
2774         (record_full_restore): Likewise.
2775
2776 2018-06-10  Tom Tromey  <tom@tromey.com>
2777
2778         * record-full.c (record_full_breakpoint_p): Remove typedef.  Don't
2779         declare VEC.  Add constructor.
2780         <in_target_beneath>: Now bool.
2781         (record_full_breakpoints): Now a std::vector, static.
2782         (record_full_sync_record_breakpoints)
2783         (record_full_init_record_breakpoints)
2784         (record_full_target::insert_breakpoint)
2785         (record_full_target::remove_breakpoint): Update.  Don't use XNEW.
2786
2787 2018-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
2788
2789         * dwarf2read.c (process_cu_includes): Remove struct keyword.
2790         * serial.c (serial_interface_lookup): Remove struct keyword.
2791
2792 2018-06-10  Tom Tromey  <tom@tromey.com>
2793
2794         * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
2795         method.
2796         * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
2797         a method.
2798         * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
2799         method.
2800         * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
2801         "beneath" as a method.
2802         * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
2803         Use "beneath" as a method.
2804
2805 2018-06-10  Tom Tromey  <tom@tromey.com>
2806
2807         * tracefile.c (struct trace_file_writer_deleter): New.
2808         <operator()>: Rename from trace_file_writer_xfree.
2809         (trace_file_writer_up): New typedef.
2810         (tsave_command, trace_save_tfile, trace_save_ctf): Update.
2811
2812 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
2813
2814         * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
2815         <m_registers, m_register_status>: Change type to
2816         std::unique_ptr.
2817         * regcache.c (reg_buffer::reg_buffer): Use new instead of
2818         XCNEWVEC.
2819
2820 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
2821
2822         * common/common-regcache.h (enum register_status): Add
2823         underlying type "signed char".
2824         * regcache.h (reg_buffer) <m_register_status>: Change type to
2825         register_status *.
2826         * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
2827         register_status instead of signed char.
2828         (reg_buffer::save): Use REG_UNKNOWN instead of 0.
2829         (reg_buffer::get_register_status): Remove cast.
2830         (readable_regcache::raw_read): Remove cast.
2831         (readable_regcache::cooked_read): Remove cast.
2832
2833 2018-06-09  Tom Tromey  <tom@tromey.com>
2834
2835         * source.c (reverse_search_command, forward_search_command): Use
2836         scoped_fd.
2837
2838 2018-06-09  Tom Tromey  <tom@tromey.com>
2839
2840         * serial.c (serial_ops_p): Remove typedef.  Don't declare VEC.
2841         (serial_ops_list): Now static, std::vector.
2842         (serial_interface_lookup, serial_add_interface): Update.
2843
2844 2018-06-09  Tom Tromey  <tom@tromey.com>
2845
2846         * dwarf2read.c (process_cu_includes): Update.
2847         (process_full_comp_unit): Update.
2848         * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
2849         std::vector.
2850
2851 2018-06-08  Paul Koning  <paul_koning@dell.com>
2852
2853         PR gdb/23252
2854
2855         * python/python.c (do_start_initialization):
2856         Avoid call to internal Python API.
2857         (init__gdb_module): New function.
2858
2859 2018-06-08  Gary Benson <gbenson@redhat.com>
2860
2861         * linux-thread-db.c (valprint.h): New include.
2862         (struct check_thread_db_info): New structure.
2863         (check_thread_db_on_load, tdb_testinfo): New static globals.
2864         (check_thread_db, check_thread_db_callback): New functions.
2865         (try_thread_db_load_1): Run integrity checks if requested.
2866         (maintenance_check_libthread_db): New function.
2867         (_initialize_thread_db): Register "maint check libthread-db"
2868         and "maint set/show check-libthread-db".
2869         * NEWS: Mention the above new commands.
2870
2871 2018-06-08  Tom Tromey  <tom@tromey.com>
2872
2873         * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
2874         now a method.
2875
2876 2018-06-08  Tom Tromey  <tom@tromey.com>
2877
2878         * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
2879
2880 2018-06-08  Tom Tromey  <tom@tromey.com>
2881
2882         * common/btrace-common.h (struct btrace_data): Add constructor,
2883         destructor, move assignment operator.
2884         <empty, clear, fini>: New methods.
2885         <format>: Initialize.
2886         (btrace_data_init, btrace_data_fini, btrace_data_clear)
2887         (btrace_data_empty): Don't declare.
2888         * common/btrace-common.c (btrace_data_init): Remove.
2889         (btrace_data::fini): Rename from btrace_data_fini.
2890         (btrace_data::empty): Rename from btrace_data_empty.
2891         (btrace_data::clear): Rename from btrace_data_clear.  Return
2892         bool.
2893         * btrace.h (make_cleanup_btrace_data): Don't declare.
2894         * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
2895         (parse_xml_btrace): Update.
2896         (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
2897         (maint_btrace_clear_packet_history_cmd): Update.
2898
2899 2018-06-07  Pedro Alves  <palves@redhat.com>
2900
2901         * target.h (target_ops) <beneath>: Now a method.  All references
2902         updated.
2903         (class target_stack): New.
2904         * target.c (g_target_stack): New.
2905         (g_current_top_target): Delete.
2906         (current_top_target): Get the top target out of g_target_stack.
2907         (target_stack::push, target_stack::unpush): New.
2908         (push_target, unpush_target): Reimplement.
2909         (target_is_pushed): Reimplement in terms of g_target_stack.
2910         (target_ops::beneath, target_stack::find_beneath): New.
2911
2912 2018-06-07  Pedro Alves  <palves@redhat.com>
2913
2914         * target.h (find_target_beneath): Delete declaration.
2915         * target.c (find_target_beneath): Delete definition.
2916         * aix-thread.c: All callers of find_target_beneath adjusted to
2917         call target_ops::beneath instead.
2918         * bsd-uthread.c: Likewise.
2919         * linux-thread-db.c: Likewise.
2920         * ravenscar-thread.c: Likewise.
2921         * sol-thread.c: Likewise.
2922         * spu-multiarch.c: Likewise.
2923
2924 2018-06-07  Pedro Alves  <palves@redhat.com>
2925
2926         * target.h (target_ops) <beneath>: Now a method.  All references
2927         updated.
2928         (target_ops) <m_beneath>: New.
2929         * target.c (target_ops::beneath): New.
2930         * corelow.c: Adjust all references to target_ops::beneath.
2931         * linux-thread-db.c: Likewise.
2932         * make-target-delegates: Likewise.
2933         * record-btrace.c: Likewise.
2934         * record-full.c: Likewise.
2935         * remote.c: Likewise.
2936         * target.c: Likewise.
2937         * target-delegates.c: Regenerate.
2938
2939 2018-06-07  Pedro Alves  <palves@redhat.com>
2940
2941         * target.h (target_stack): Delete.
2942         (current_top_target): Declare function.
2943         * target.c (target_stack): Delete.
2944         (g_current_top_target): New.
2945         (current_top_target): New function.
2946         * auxv.c: Use current_top_target instead of target_stack
2947         throughout.
2948         * avr-tdep.c: Likewise.
2949         * breakpoint.c: Likewise.
2950         * corefile.c: Likewise.
2951         * elfread.c: Likewise.
2952         * eval.c: Likewise.
2953         * exceptions.c: Likewise.
2954         * frame.c: Likewise.
2955         * gdbarch-selftests.c: Likewise.
2956         * gnu-v3-abi.c: Likewise.
2957         * ia64-tdep.c: Likewise.
2958         * ia64-vms-tdep.c: Likewise.
2959         * infcall.c: Likewise.
2960         * infcmd.c: Likewise.
2961         * infrun.c: Likewise.
2962         * linespec.c: Likewise.
2963         * linux-tdep.c: Likewise.
2964         * minsyms.c: Likewise.
2965         * ppc-linux-nat.c: Likewise.
2966         * ppc-linux-tdep.c: Likewise.
2967         * procfs.c: Likewise.
2968         * regcache.c: Likewise.
2969         * remote.c: Likewise.
2970         * rs6000-tdep.c: Likewise.
2971         * s390-linux-nat.c: Likewise.
2972         * s390-tdep.c: Likewise.
2973         * solib-aix.c: Likewise.
2974         * solib-darwin.c: Likewise.
2975         * solib-dsbt.c: Likewise.
2976         * solib-spu.c: Likewise.
2977         * solib-svr4.c: Likewise.
2978         * solib-target.c: Likewise.
2979         * sparc-tdep.c: Likewise.
2980         * sparc64-tdep.c: Likewise.
2981         * spu-tdep.c: Likewise.
2982         * symfile.c: Likewise.
2983         * symtab.c: Likewise.
2984         * target-descriptions.c: Likewise.
2985         * target-memory.c: Likewise.
2986         * target.c: Likewise.
2987         * target.h: Likewise.
2988         * tracefile-tfile.c: Likewise.
2989         * tracepoint.c: Likewise.
2990         * valops.c: Likewise.
2991         * valprint.c: Likewise.
2992         * value.c: Likewise.
2993         * windows-tdep.c: Likewise.
2994         * mi/mi-main.c: Likewise.
2995
2996 2018-06-07  Tom Tromey  <tom@tromey.com>
2997
2998         * valprint.h (build_address_symbolic): Declare.
2999         * printcmd.c (print_address_symbolic): Update.
3000         (build_address_symbolic): Change "name" and "filename" to
3001         std::string.
3002         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
3003         Update.
3004         * defs.h (build_address_symbolic): Remove declaration.
3005
3006 2018-06-07  Alan Hayward  <alan.hayward@arm.com>
3007
3008         * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
3009         (aarch64_vnv_type): Add function.
3010         (aarch64_pseudo_register_name): Add V regs for SVE.
3011         (aarch64_pseudo_register_type): Likewise.
3012         (aarch64_pseudo_register_reggroup_p): Likewise.
3013         (aarch64_pseudo_read_value_2): Use V0 offset for SVE
3014         (aarch64_pseudo_read_value): Add V regs for SVE.
3015         (aarch64_pseudo_write_2): Use V0 offset for SVE
3016         (aarch64_pseudo_write): Add V regs for SVE.
3017         * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
3018
3019 2018-06-06  Sergio Durigan Junior  <sergiodj@redhat.com>
3020
3021         * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
3022         (sve_vl_from_vq): Likewise.
3023
3024 2018-06-05  Tom Tromey  <tom@tromey.com>
3025
3026         * cli/cli-cmds.c (show_version): Update.
3027         * top.c (print_gdb_version): Add "interactive" parameter.
3028         Update.
3029         * main.c (captured_main_1): Update.
3030         * top.h (print_gdb_version): Add "interactive" parameter and a
3031         comment.
3032
3033 2018-06-05  David Malcolm  <dmalcolm@redhat.com>
3034
3035         * common/enum-flags.h: Add trailing semicolon to example in
3036         comment.
3037
3038 2018-06-05  Tom Tromey  <tom@tromey.com>
3039
3040         PR cli/12326:
3041         * NEWS: Add entry about pager.
3042         * utils.c (pagination_disabled_for_command): New global.
3043         (prompt_for_continue): Allow "c" response to prompt.
3044         (reinitialize_more_filter): Clear
3045         pagination_disabled_for_command.
3046         (fputs_maybe_filtered): Check pagination_disabled_for_command.
3047
3048 2018-06-04  Tom Tromey  <tom@tromey.com>
3049
3050         * ada-lang.h (ada_lookup_symbol_list): Update.
3051         * ada-lang.c (resolve_subexp): Update.
3052         (symbols_are_identical_enums): Change type of syms.  Remove nsyms
3053         parameter.
3054         (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
3055         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
3056         results parameter to std::vector.
3057         (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
3058         Update.
3059         * ada-exp.y (block_lookup): Update.
3060         (select_possible_type_sym): Change type of syms.  Remove nsyms
3061         parameter.
3062         (write_var_or_type, write_name_assoc): Update.
3063
3064 2018-06-04  Joel Brobecker  <brobecker@adacore.com>
3065
3066         * windows-nat.c (windows_nat_target::xfer_partial): Return
3067         TARGET_XFER_E_IO if we need to delegate to the target beneath
3068         but BENEATH is NULL.
3069
3070 2018-06-04  Simon Marchi  <simon.marchi@ericsson.com>
3071
3072         * Makefile.in (config.status): Add configure.nat as a
3073         dependency.
3074
3075 2018-06-04  Tom Tromey  <tom@tromey.com>
3076
3077         * cp-name-parser.y (cpname_state): Add method declarations.
3078         (HANDLE_QUAL): Update.
3079         (cpname_state::d_grab, cpname_state::fill_comp)
3080         (cpname_state::make_operator, cpname_state::make_dtor)
3081         (cpname_state::make_builtin_type, cpname_state::make_name)
3082         (cpname_state::d_qualify, cpname_state::d_int_type)
3083         (cpname_state::d_unary, cpname_state::d_binary): Now methods.
3084         (%union): Move earlier.
3085
3086 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
3087
3088         * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
3089
3090 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
3091
3092         * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
3093         (aarch64_pseudo_write_1): Likewise.
3094         (aarch64_pseudo_read_value): Use helper.
3095         (aarch64_pseudo_write): Likewise.
3096
3097 2018-06-04  Pedro Alves  <palves@redhat.com>
3098
3099         * darwin-nat.c (darwin_ops): Delete.
3100         (darwin_attach_pid): Use get_native_target.
3101
3102 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
3103
3104         * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
3105         * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
3106
3107 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
3108
3109         * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
3110         * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
3111         (aarch64_gdbarch_init): Check for SVE.
3112         * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
3113
3114 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
3115
3116         * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
3117         * aarch64-tdep.h (aarch64_read_description): Likewise.
3118         * arch/aarch64.c (aarch64_create_target_description): Likewise.
3119         * arch/aarch64.h (aarch64_create_target_description): Likewise.
3120         * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
3121         * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
3122         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
3123
3124 2018-06-02  Simon Marchi  <simon.marchi@ericsson.com>
3125
3126         * value.c (value_fetch_lazy_bitfield): New.
3127         (value_fetch_lazy_memory): New.
3128         (value_fetch_lazy_register): New.
3129         (value_fetch_lazy): Factor out to smaller functions.
3130
3131 2018-06-01  Tom Tromey  <tom@tromey.com>
3132
3133         * cp-name-parser.y (backslashable, represented): Now const.
3134
3135 2018-06-01  Tom Tromey  <tom@tromey.com>
3136
3137         * cp-name-parser.y: Include parser-defs.h.
3138         (parser_fprintf): Remove declaration.
3139
3140 2018-06-01  Tom Tromey  <tom@tromey.com>
3141
3142         * cp-name-parser.y: Use %pure-parser, %lex-param, and
3143         %parse-param.
3144         (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
3145         (global_result): Remove globals.
3146         (struct cpname_state): New.
3147         (yyparse): Don't declare.
3148         (yylex, yyerror): Move declarations after %union.
3149         (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
3150         (make_name): Add state parameter.
3151         Update all callers.
3152         (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
3153         parameter.
3154         (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
3155         Update.
3156         (yylex): Add lvalp, state parameters.
3157         (yyerror): Add state parameter.
3158         (cp_demangled_name_to_comp): Update.
3159
3160 2018-06-01  Tom Tromey  <tom@tromey.com>
3161
3162         * cp-name-parser.y (parser_fprintf): Declare.
3163         (GDB_YY_REMAP_PREFIX): Define.
3164         Include yy-remap.h.  Don't redefine yy* identifiers.
3165
3166 2018-06-01  Tom Tromey  <tom@tromey.com>
3167
3168         * python/py-type.c (typy_legacy_template_argument): Update.
3169         * cp-support.h (cp_demangled_name_to_comp): Update.
3170         * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
3171         parameter to be a "std::string *".
3172         (main): Update.
3173
3174 2018-06-01  H.J. Lu  <hongjiu.lu@intel.com>
3175
3176         * ada-lex.l: Include "diagnostics.h" instead of
3177         "common/diagnostics.h".
3178         * unittests/environ-selftests.c: Likewise.
3179         * common/diagnostics.h: Moved to ../include.
3180
3181 2018-06-01  Joel Brobecker  <brobecker@adacore.com>
3182
3183         * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
3184         to language_mode_manual while calling breakpoint_re_set_one.
3185
3186 2018-06-01  Tom Tromey  <tom@tromey.com>
3187
3188         * valops.c (value_cast_structs, destructor_name_p): Update.
3189         * symtab.c (gdb_mangle_name): Update.
3190         * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
3191         Update.
3192         * p-valprint.c (pascal_object_is_vtbl_ptr_type)
3193         (pascal_object_print_value_fields, pascal_object_print_value):
3194         Update.
3195         * p-typeprint.c (pascal_type_print_derivation_info): Update.
3196         * linespec.c (find_methods): Update.
3197         * gdbtypes.h (type_name_no_tag): Remove.
3198         (type_name_or_error): Rename from type_name_no_tag_or_error.
3199         * gdbtypes.c (type_name_no_tag): Remove.
3200         (type_name_or_error): Rename from type_name_no_tag_or_error.
3201         (lookup_struct_elt_type, check_typedef): Update.
3202         * expprint.c (print_subexp_standard): Update.
3203         * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
3204         * d-namespace.c (d_lookup_nested_symbol): Update.
3205         * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
3206         (cp_print_class_member): Update.
3207         * cp-namespace.c (cp_lookup_nested_symbol): Update.
3208         * completer.c (add_struct_fields): Update.
3209         * c-typeprint.c (cp_type_print_derivation_info)
3210         (c_type_print_varspec_prefix, c_type_print_base_struct_union):
3211         Update.
3212         * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
3213         (ada_prefer_type, ada_is_exception_sym): Update.
3214
3215 2018-06-01  Tom Tromey  <tom@tromey.com>
3216
3217         * valops.c (enum_constant_from_type, value_namespace_elt)
3218         (value_maybe_namespace_elt): Update.
3219         * valarith.c (find_size_for_pointer_math): Update.
3220         * target-descriptions.c (make_gdb_type): Update.
3221         * symmisc.c (print_symbol): Update.
3222         * stabsread.c (define_symbol, read_type)
3223         (complain_about_struct_wipeout, add_undefined_type)
3224         (cleanup_undefined_types_1): Update.
3225         * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
3226         (rust_range_type_p, val_print_struct, rust_print_struct_def)
3227         (rust_internal_print_type, rust_composite_type)
3228         (rust_evaluate_funcall, rust_evaluate_subexp)
3229         (rust_inclusive_range_type_p): Update.
3230         * python/py-type.c (typy_get_tag): Update.
3231         * p-typeprint.c (pascal_type_print_base): Update.
3232         * mdebugread.c (parse_symbol, parse_type): Update.
3233         * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
3234         Update.
3235         * guile/scm-type.c (gdbscm_type_tag): Update.
3236         * go-lang.c (sixg_string_p): Update.
3237         * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
3238         Update.
3239         * gdbtypes.h (struct main_type) <tag_name>: Remove.
3240         (TYPE_TAG_NAME): Remove.
3241         * gdbtypes.c (type_name_no_tag): Simplify.
3242         (check_typedef, check_types_equal, recursive_dump_type)
3243         (copy_type_recursive, arch_composite_type): Update.
3244         * f-typeprint.c (f_type_print_base): Update.  Print "Type" prefix
3245         in summary mode when needed.
3246         * eval.c (evaluate_funcall): Update.
3247         * dwarf2read.c (fixup_go_packaging, read_structure_type)
3248         (process_structure_scope, read_enumeration_type)
3249         (read_namespace_type, read_module_type, determine_prefix): Update.
3250         * cp-support.c (inspect_type): Update.
3251         * coffread.c (process_coff_symbol, decode_base_type): Update.
3252         * c-varobj.c (c_is_path_expr_parent): Update.
3253         * c-typeprint.c (c_type_print_base_struct_union): Update.
3254         (c_type_print_base_1): Update.  Print struct/class/union/enum in
3255         summary when using C language.
3256         * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
3257         (gen_maybe_namespace_elt): Update.
3258         * ada-lang.c (ada_type_name): Simplify.
3259         (empty_record, ada_template_to_fixed_record_type_1)
3260         (template_to_static_fixed_type)
3261         (to_record_with_fixed_variant_part, ada_check_typedef): Update.
3262
3263 2018-06-01  Tom Tromey  <tom@tromey.com>
3264
3265         * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
3266         c_print_type.
3267         * c-typeprint.c (c_print_type_1): Add "language" parameter.
3268         (c_print_type): Update.
3269         (c_print_type): New overload.
3270         (c_type_print_varspec_prefix, c_type_print_args)
3271         (c_type_print_varspec_suffix, c_print_type_no_offsets)
3272         (c_type_print_base_struct_union, c_type_print_base_1)
3273         (cp_type_print_method_args): Add "language" parameter.
3274         (c_type_print_base): Update.
3275         * c-lang.h (c_print_type): Add new overload.
3276
3277 2018-06-01  Tom Tromey  <tom@tromey.com>
3278
3279         * typeprint.h (c_type_print_varspec_suffix): Don't declare.
3280         * c-typeprint.c (c_type_print_varspec_suffix): Now static.
3281
3282 2018-06-01  Alan Hayward  <alan.hayward@arm.com>
3283
3284         * aarch64-tdep.c (aarch64_sve_register_names): New const
3285         var.
3286         * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
3287         (AARCH64_SVE_Z_REGS_NUM): New define.
3288         (AARCH64_SVE_P_REGS_NUM): Likewise.
3289         (AARCH64_SVE_NUM_REGS): Likewise.
3290
3291 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
3292
3293         * nat/linux-ptrace.h [__alpha__]
3294         (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
3295         definitions.
3296
3297 2018-05-31  Maciej W. Rozycki  <macro@mips.com>
3298
3299         * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
3300         the endianness selected.
3301         * NEWS: Document `set endian auto' mode operation update.
3302
3303 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
3304
3305         * Makefile.in: Add new header.
3306         * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
3307         (sve_vl_from_vg): Likewise.
3308         (sve_vq_from_vl): Likewise.
3309         (sve_vl_from_vq): Likewise.
3310         (sve_vq_from_vg): Likewise.
3311         (sve_vg_from_vq): Likewise.
3312         * configure.nat: Add new c file.
3313         * nat/aarch64-sve-linux-ptrace.c: New file.
3314         * nat/aarch64-sve-linux-ptrace.h: New file.
3315
3316 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
3317
3318         * aarch64-linux-nat.c (aarch64_linux_read_description):
3319         Add parmeter zero.
3320         * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
3321         Likewise.
3322         * aarch64-tdep.c (tdesc_aarch64_list): Add.
3323         (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
3324         (aarch64_gdbarch_init): Add parmeter zero.
3325         * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
3326         * arch/aarch64.c (aarch64_create_target_description): Check VQ.
3327         * arch/aarch64.h (aarch64_create_target_description): Add VQ.
3328         parmeter.
3329         * doc/gdb.texinfo: Describe SVE feature
3330         * features/aarch64-sve.c: New file.
3331
3332 2018-05-31  Omair Javaid  <omair.javaid@linaro.org>
3333
3334         PR gdb/23210
3335         * gdbarch.sh (significant_addr_bit): Default to zero when
3336         not set by target architecture.
3337         * gdbarch.c: Re-generated.
3338         * utils.c (address_significant): Update.
3339
3340 2018-05-30  Joel Brobecker  <brobecker@adacore.com>
3341
3342         * stack.c (func_command): Remove trailing newline in call to error.
3343
3344 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3345
3346         * regcache.h (regcache_raw_collect): Remove, update callers to
3347         use regcache::raw_collect.
3348         * regcache.c (regcache_raw_collect): Remove.
3349
3350 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3351
3352         * regcache.h (regcache_raw_supply): Remove, update callers to
3353         use detached_regcache::raw_supply.
3354         * regcache.c (regcache_raw_supply): Remove.
3355
3356 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3357
3358         * regcache.h (regcache_cooked_write_part): Remove, update
3359         callers to use regcache::cooked_write_part.
3360         * regcache.c (regcache_cooked_write_part): Remove.
3361
3362 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3363
3364         * regcache.h (regcache_cooked_read_part): Remove, update callers
3365         to use readable_regcache::cooked_read_part.
3366         * regcache.c (regcache_cooked_read_part): Remove.
3367
3368 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3369
3370         * regcache.h (regcache_cooked_read_value): Remove, update
3371         callers to use readable_regcache::cooked_read_value.
3372         * regcache.c (regcache_cooked_read_value): Remove.
3373
3374 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3375
3376         * regcache.h (regcache_cooked_write): Remove, update callers to
3377         use regcache::cooked_write.
3378         * regcache.c (regcache_cooked_write): Remove.
3379
3380 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3381
3382         * regcache.h (regcache_invalidate): Remove, update callers to
3383         use detached_regcache::invalidate instead.
3384         * regcache.c (regcache_invalidate): Remove.
3385
3386 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3387
3388         * regcache.h (regcache_raw_write_part): Remove, update callers
3389         to use regcache::raw_write_part instead.
3390         * regcache.c (regcache_raw_write_part): Remove.
3391
3392 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3393
3394         * regcache.h (regcache_raw_read_part): Remove, update callers to
3395         use readable_regcache::raw_read_part instead.
3396         * regcache.c (regcache_raw_read_part): Remove.
3397
3398 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3399
3400         * regcache.h (regcache_cooked_read): Remove, update callers to
3401         use readable_regcache::cooked_read instead.
3402         * regcache.c (regcache_cooked_read): Remove.
3403
3404 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3405
3406         * regcache.h (regcache_raw_write): Remove, update callers to use
3407         regcache::raw_write instead.
3408         * regcache.c (regcache_raw_write): Remove.
3409
3410 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3411
3412         * regcache.h (regcache_raw_read): Remove, update callers to use
3413         readable_regcache::raw_read instead.
3414         * regcache.c (regcache_raw_read): Remove.
3415
3416 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3417
3418         * regcache.h (regcache_raw_update): Remove, update callers to
3419         use readable_regcache::raw_update instead.
3420         * regcache.c (regcache_raw_update): Remove.
3421
3422 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3423
3424         * regcache.h (regcache_register_status): Remove, update callers
3425         to use reg_buffer::get_register_status directly instead.
3426         * regcache.c (regcache_register_status): Remove.
3427
3428 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3429
3430         * regcache.h (regcache_get_ptid): Remove, update all callers to
3431         call regcache::ptid instead.
3432         * regcache.c (regcache_get_ptid): Remove.
3433
3434 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3435
3436         * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
3437
3438 2018-05-30  Pedro Alves  <palves@redhat.com>
3439
3440         * common/common-exceptions.h (exception_rethrow): Use
3441         ATTRIBUTE_NORETURN.
3442
3443 2018-05-29  Simon Marchi  <simon.marchi@polymtl.ca>
3444
3445         * breakpoint.c (print_solib_event, check_status_catch_solib):
3446         Remove struct keyword in range-based for loops.
3447         * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
3448         * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
3449         Likewise.
3450         * linespec.c (find_superclass_methods, search_minsyms_for_name):
3451         Likewise.
3452         * symfile.c (addr_info_make_relative): Likewise.
3453         * thread.c (value_in_thread_stack_temporaries): Likewise.
3454
3455 2018-06-12  Weimin Pan  <weimin.pan@oracle.com>
3456
3457         PR gdb/16841
3458         * valops.c (value_struct_elt_for_reference): Call check_typedef on
3459         aggregate type to get its real type before accessing it.
3460
3461 2018-05-29  Weimin Pan  <weimin.pan@oracle.com>
3462
3463         * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
3464         * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
3465         * coff-pe-read.c (add_pe_forwarded_sym): Replace
3466         lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
3467         * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
3468         * jit.c (jit_breakpoint_re_set_internal): Likewise.
3469         * printcmd.c (info_address_command): Likewise.
3470
3471 2018-05-29  Tom Tromey  <tom@tromey.com>
3472
3473         * windows-nat.c (handle_exception): Update fall-through comment.
3474
3475 2018-05-29  Tom Tromey  <tom@tromey.com>
3476
3477         * progspace.h (so_list_ptr): Remove typedef.  Don't declare VEC.
3478         (struct program_space) <added_solibs>: Now a std::vector.
3479         * breakpoint.c (print_solib_event): Update.
3480         (check_status_catch_solib): Update.
3481         * progspace.c (clear_program_space_solib_cache): Update.
3482         * solib.c (update_solib_list): Update.
3483
3484 2018-05-29  Tom Tromey  <tom@tromey.com>
3485
3486         * python/py-type.c (typy_richcompare): Update.
3487         * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
3488         * gdbtypes.h (types_deeply_equal): Return bool.
3489         (types_equal): Likewise.
3490         * gdbtypes.c (type_equality_entry_d): Remove typedef.  Don't
3491         declare VEC.
3492         (check_types_equal): Change worklist to std::vector.  Return
3493         bool.
3494         (struct type_equality_entry): Add constructor.
3495         (compare_maybe_null_strings): Return bool.
3496         (check_types_worklist): Return bool.  Change worklist to
3497         std::vector.
3498         (types_deeply_equal): Use std::vector.
3499         (types_equal): Return bool.
3500         (compare_maybe_null_strings): Simplify.
3501
3502 2018-05-29  Tom Tromey  <tom@tromey.com>
3503
3504         * record-btrace.c (tp_t): Remove typedef.  Don't declare VEC.
3505
3506 2018-05-29  Tom Tromey  <tom@tromey.com>
3507
3508         * objc-lang.h: Don't include cp-support.h.
3509         * common/gdb_vecs.h (const_char_ptr): Remove typedef.  Don't
3510         declare VEC.
3511
3512 2018-05-27  Tom Tromey  <tom@tromey.com>
3513
3514         * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
3515
3516 2018-05-25  Tom Tromey  <tom@tromey.com>
3517
3518         * value.c (value::location): Initialize.
3519
3520 2018-05-25  Tom Tromey  <tom@tromey.com>
3521
3522         * dbxread.c (init_bincl_list): Remove.
3523         (bincl_list): Now a std::vector.
3524         (bincls_allocated, next_bincl): Remove.
3525         (free_bincl_list, do_free_bincl_list_cleanup)
3526         (make_cleanup_free_bincl_list): Remove.
3527         (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
3528         unique_xmalloc_ptr.
3529         (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
3530         (struct header_file_location): Add constructor.
3531         (add_bincl_to_list): Remove.
3532
3533 2018-05-25  Tom Tromey  <tom@tromey.com>
3534
3535         * tui/tui.c (tui_enable): Update.
3536         * mi/mi-interp.c (mi_interp::init): Update.
3537         * interps.h (class interp) <name>: New method.
3538         <m_name>: Rename from name.
3539         (~scoped_restore_interp): Update.
3540         * interps.c (interp::interp): Update.
3541         (interp_add, interp_set, interp_lookup_existing)
3542         (current_interp_named_p): Update.
3543
3544 2018-05-25  Tom Tromey  <tom@tromey.com>
3545
3546         * interps.c (interp_name): Remove.
3547         * mi/mi-interp.c (mi_interp::init): Update.
3548         * interps.h (interp_name): Remove.
3549         (~scoped_restore_interp): Update.
3550         * tui/tui.c (tui_enable): Update.
3551
3552 2018-05-25  Tom Tromey  <tom@tromey.com>
3553
3554         * utils.c (fputs_maybe_filtered): Update.
3555         * linespec.c (decode_line_full): Update.
3556         * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
3557         (mi_print_breakpoint_for_event, mi_solib_loaded)
3558         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
3559         (mi_user_selected_context_changed): Update.
3560         * mi/mi-main.c (mi_execute_command): Update.
3561         * cli/cli-script.c (execute_control_command): Update.
3562         * python/python.c (execute_gdb_command): Update.
3563         * solib.c (info_sharedlibrary_command): Update.
3564         * interps.c (interp_ui_out): Remove.
3565         * interps.h (interp_ui_out): Remove.
3566
3567 2018-05-25  Tom Tromey  <tom@tromey.com>
3568
3569         * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
3570         * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
3571         * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
3572
3573 2018-05-25  Tom Tromey  <tom@tromey.com>
3574
3575         * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
3576         * interps.c (interp_exec): Use scoped_restore.
3577
3578 2018-05-25  Tom Tromey  <tom@tromey.com>
3579
3580         * remote.c (remote_target::remote_file_get): Use
3581         gdb::byte_vector.
3582         (remote_target::remote_file_put): Likewise.
3583
3584 2018-05-25  Tom Tromey  <tom@tromey.com>
3585
3586         * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
3587         a std::string.
3588         (get_pe_section_index, add_pe_exported_sym): Update.
3589         (read_pe_exported_syms): Use gdb::def_vector.
3590
3591 2018-05-25  Tom Tromey  <tom@tromey.com>
3592
3593         * frame.c (remove_prev_frame): Remove.
3594         (get_prev_frame_if_no_cycle): Use TRY/CATCH.
3595
3596 2018-05-25  Maciej W. Rozycki  <macro@mips.com>
3597
3598         * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
3599         Remove prototypes.
3600         * mips-linux-nat.c (supply_fpregset): Always call
3601         `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
3602         (fill_fpregset): Always call `mips64_fill_fpregset' rather than
3603         `mips_fill_fpregset'.
3604         * mips-linux-tdep.c (mips_supply_fpregset)
3605         (mips_supply_fpregset_wrapper, mips_fill_fpregset)
3606         (mips_fill_fpregset_wrapper): Remove functions.
3607         (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
3608         (mips_linux_fpregset): Remove variable.
3609         (mips_linux_iterate_over_regset_sections): Use
3610         `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
3611         (mips_linux_o32_sigframe_init): Remove comment.
3612
3613 2018-05-25  Pedro Alves  <palves@redhat.com>
3614
3615         * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
3616         (struct readahead_cache, struct packet_reg, struct
3617         remote_arch_state, class remote_state): Move higher up in the
3618         file.
3619         (remote_target::m_remote_state): Now an object instead of a pointer.
3620         (remote_target::get_remote_state): Adjust.
3621
3622 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
3623
3624         * stack.c (select_and_print_frame): Delete.
3625         (struct function_bounds): Move struct within function.
3626         (func_command): Most content moved into new function
3627         find_frame_for_function, use new function, print result, add
3628         function comment.
3629         (find_frame_for_function): New function, now returns a result.
3630
3631 2018-05-24  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
3632
3633         * stack.c (iterate_over_block_arg_vars): Fix comment.
3634         (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
3635
3636 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
3637
3638         PR gdb/23203
3639         * frame.c
3640         (scoped_restore_selected_frame::scoped_restore_selected_frame):
3641         Define.
3642         (scoped_restore_selected_frame::~scoped_restore_selected_frame):
3643         Define.
3644         * frame.h (class scoped_restore_selected_frame): New class.
3645         * stack.c (print_frame_local_vars): Remove catching and rethrowing
3646         of any exception, use scoped_restore_selected_frame to restore the
3647         frame instead.
3648
3649 2018-05-24  Pedro Alves  <palves@redhat.com>
3650
3651         * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
3652         override.
3653
3654 2018-05-23  Tom Tromey  <tom@tromey.com>
3655
3656         * complaints.c (struct complaints): Remove.
3657         (symfile_complaint_book): Remove.
3658         (series): New global.
3659         (complaint_internal): Update.
3660         (clear_complaints): Update.
3661
3662 2018-05-23  Tom Tromey  <tom@tromey.com>
3663
3664         * complaints.c (counters): New global.
3665         (struct complain): Remove.
3666         (struct complaints) <root>: Remove.
3667         (complaint_sentinel): Remove.
3668         (symfile_complaint_book): Update.
3669         (find_complaint) Remove.
3670         (complaint_internal, clear_complaints): Update.
3671
3672 2018-05-23  Tom Tromey  <tom@tromey.com>
3673
3674         * complaints.c (struct complain) <file, line>: Remove.
3675         (find_complaint): Remove file, line parameters.
3676         (complaint_internal): Update.
3677
3678 2018-05-23  Tom Tromey  <tom@tromey.com>
3679
3680         * complaints.c (vcomplaint): Remove.
3681         (complaint_internal) Merge in contents of vcomplaint.
3682
3683 2018-05-23  Tom Tromey  <tom@tromey.com>
3684
3685         * complaints.c (struct complaints) <explanation>: Remove.
3686         (symfile_explanations): Remove.
3687         (symfile_complaint_book): Update.
3688         (vcomplaint): Update.
3689         (struct explanation): Remove.
3690
3691 2018-05-23  Tom Tromey  <tom@tromey.com>
3692
3693         * complaints.c (symfile_complaints): Remove.
3694         (complaint_internal): Remove "complaints" parameter.
3695         (clear_complaints, vcomplaint): Remove "c" parameter.
3696         (get_complaints): Remove.
3697         * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
3698         (dwarf2_debug_line_missing_file_complaint)
3699         (dwarf2_debug_line_missing_end_sequence_complaint)
3700         (dwarf2_complex_location_expr_complaint)
3701         (dwarf2_const_value_length_mismatch_complaint)
3702         (dwarf2_section_buffer_overflow_complaint)
3703         (dwarf2_macro_malformed_definition_complaint)
3704         (dwarf2_invalid_attrib_class_complaint)
3705         (create_addrmap_from_index, dw2_symtab_iter_next)
3706         (dw2_expand_marked_cus)
3707         (dw2_debug_names_iterator::find_vec_in_debug_names)
3708         (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
3709         (create_debug_type_hash_table, init_cutu_and_read_dies)
3710         (partial_die_parent_scope, add_partial_enumeration)
3711         (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
3712         (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
3713         (read_import_statement, read_file_scope, create_dwo_cu_reader)
3714         (create_cus_hash_table, create_dwp_hash_table)
3715         (inherit_abstract_dies, read_func_scope, read_call_site_scope)
3716         (dwarf2_rnglists_process, dwarf2_ranges_process)
3717         (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
3718         (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
3719         (handle_struct_member_die, process_structure_scope)
3720         (read_array_type, read_common_block, read_module_type)
3721         (read_tag_pointer_type, read_typedef, read_base_type)
3722         (read_subrange_type, load_partial_dies, partial_die_info::read)
3723         (partial_die_info::read, partial_die_info::read)
3724         (partial_die_info::read, read_checked_initial_length_and_offset)
3725         (dwarf2_string_attr, read_formatted_entries)
3726         (dwarf_decode_line_header)
3727         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
3728         (new_symbol, dwarf2_const_value_attr, lookup_die_type)
3729         (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
3730         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
3731         (get_signatured_type, get_DW_AT_signature_type)
3732         (decode_locdesc, file_file_name, consume_improper_spaces)
3733         (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
3734         (dwarf_decode_macro_bytes, dwarf_decode_macros)
3735         (dwarf2_symbol_mark_computed, set_die_type)
3736         (read_attribute_value): Update.
3737         * stap-probe.c (handle_stap_probe, get_stap_base_address):
3738         Update.
3739         * dbxread.c (unknown_symtype_complaint)
3740         (lbrac_mismatch_complaint, repeated_header_complaint)
3741         (set_namestring, function_outside_compilation_unit_complaint)
3742         (read_dbx_symtab, process_one_symbol): Update.
3743         * gdbtypes.c (stub_noname_complaint): Update.
3744         * windows-nat.c (handle_unload_dll): Update.
3745         * coffread.c (coff_symtab_read, enter_linenos, decode_type)
3746         (decode_base_type): Update.
3747         * xcoffread.c (bf_notfound_complaint, ef_complaint)
3748         (eb_complaint, record_include_begin, record_include_end)
3749         (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
3750         (process_xcoff_symbol, read_symbol)
3751         (function_outside_compilation_unit_complaint)
3752         (scan_xcoff_symtab): Update.
3753         * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
3754         * buildsym.c (finish_block_internal, make_blockvector)
3755         (end_symtab_get_static_block, augment_type_symtab): Update.
3756         * dtrace-probe.c (dtrace_process_dof)
3757         (dtrace_static_probe_ops::get_probes): Update.
3758         * complaints.h (struct complaint): Don't declare.
3759         (symfile_complaints): Remove.
3760         (complaint_internal): Remove "complaints" parameter.
3761         (complaint): Likewise.
3762         (clear_complaints): Likewise.
3763         * symfile.c (syms_from_objfile_1, finish_new_objfile)
3764         (reread_symbols): Update.
3765         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
3766         (dwarf2_frame_cache, decode_frame_entry): Update.
3767         * dwarf2loc.c (dwarf_reg_to_regnum): Update.
3768         * objc-lang.c (lookup_objc_class, lookup_child_selector)
3769         (info_selectors_command): Update.
3770         * macrotab.c (macro_include, check_for_redefinition)
3771         (macro_undef): Update.
3772         * objfiles.c (filter_overlapping_sections): Update.
3773         * stabsread.c (invalid_cpp_abbrev_complaint)
3774         (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
3775         (define_symbol, error_type, read_type, rs6000_builtin_type)
3776         (stabs_method_name_from_physname, read_member_functions)
3777         (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
3778         (attach_fields_to_type, complain_about_struct_wipeout)
3779         (read_range_type, read_args, common_block_start)
3780         (common_block_end, cleanup_undefined_types_1, scan_file_globals):
3781         Update.
3782         * mdebugread.c (index_complaint, unknown_ext_complaint)
3783         (basic_type_complaint, bad_tag_guess_complaint)
3784         (bad_rfd_entry_complaint, unexpected_type_code_complaint)
3785         (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
3786         (parse_procedure, parse_lines)
3787         (function_outside_compilation_unit_complaint)
3788         (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
3789         (bad_tag_guess_complaint, reg_value_complaint): Update.
3790         * cp-support.c (demangled_name_complaint): Update.
3791         * macroscope.c (sal_macro_scope): Update.
3792         * dwarf-index-write.c (class debug_names): Update.
3793
3794 2018-05-23  Tom Tromey  <tom@tromey.com>
3795
3796         * complaints.c (clear_complaints): Remove "noisy" parameter.
3797         * complaints.h (clear_complaints): Update.
3798         * symfile.c (syms_from_objfile_1, finish_new_objfile)
3799         (reread_symbols): Update.
3800
3801 2018-05-23  Tom Tromey  <tom@tromey.com>
3802
3803         * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
3804         SUBSEQUENT_MESSAGE.
3805         (vcomplaint, clear_complaints): Update.
3806         (symfile_explanations): Remove some messages.
3807
3808 2018-05-23  Tom Tromey  <tom@tromey.com>
3809
3810         * complaints.c (internal_complaint): Remove.
3811         * complaints.h (internal_complaint): Remove.
3812
3813 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
3814
3815         * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
3816
3817 2018-05-22  Pedro Alves  <palves@redhat.com>
3818
3819         * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
3820         (remote_fileio_badfd, remote_fileio_return_errno)
3821         (remote_fileio_return_success, remote_fileio_func_open)
3822         (remote_fileio_func_open, remote_fileio_func_close)
3823         (remote_fileio_func_read, remote_fileio_func_write)
3824         (remote_fileio_func_lseek, remote_fileio_func_rename)
3825         (remote_fileio_func_unlink, remote_fileio_func_stat)
3826         (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
3827         (remote_fileio_func_isatty, remote_fileio_func_system): Add
3828         remote_target parameter.
3829         (remote_fio_func_map) <func>: Add remote_target parameter.
3830         (do_remote_fileio_request, remote_fileio_request):
3831         * remote-fileio.h (remote_fileio_request):
3832         * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
3833         remote_target parameter.
3834         (remote_notif_process, handle_notification): Adjust to pass down
3835         the remote.
3836         (remote_notif_state_allocate): Add remote_target parameter.  Save
3837         it.
3838         * remote-notif.h (struct remote_target): Forward declare.
3839         (struct notif_client) <parse, ack, can_get_pending_events>: Add
3840         remote_target parameter.
3841         (struct remote_notif_state) <remote>: New field.
3842         (remote_notif_ack, remote_notif_parse): Add remote_target
3843         parameter.
3844         (remote_notif_state_allocate, remote_notif_state_allocate): Add
3845         remote_target parameter.
3846         * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
3847         (threads_listing_context, rmt_thread_action, protocol_feature)
3848         (packet_reg, stop_reply, stop_reply_p, enum packet_support)
3849         (packet_result, struct threads_listing_context, remote_state):
3850         Move definitions and declarations higher up.
3851         (remote_target) <~remote_target>: Declare.
3852         (remote_download_command_source, remote_file_put, remote_file_get)
3853         (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
3854         (remote_hostio_pread_vFile, remote_hostio_send_command)
3855         (remote_hostio_set_filesystem, remote_hostio_open)
3856         (remote_hostio_close, remote_hostio_unlink, remote_state)
3857         (get_remote_state, get_remote_packet_size, get_memory_packet_size)
3858         (get_memory_write_packet_size, get_memory_read_packet_size)
3859         (append_pending_thread_resumptions, remote_detach_1)
3860         (append_resumption, remote_resume_with_vcont)
3861         (add_current_inferior_and_thread, wait_ns, wait_as)
3862         (process_stop_reply, remote_notice_new_inferior)
3863         (process_initial_stop_replies, remote_add_thread)
3864         (btrace_sync_conf, remote_btrace_maybe_reopen)
3865         (remove_new_fork_children, kill_new_fork_children)
3866         (discard_pending_stop_replies, stop_reply_queue_length)
3867         (check_pending_events_prevent_wildcard_vcont)
3868         (discard_pending_stop_replies_in_queue, stop_reply)
3869         (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
3870         (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
3871         (remote_interrupt_as, remote_interrupt_ns)
3872         (remote_get_noisy_reply, remote_query_attached)
3873         (remote_add_inferior, remote_current_thread, get_current_thread)
3874         (set_thread, set_general_thread, set_continue_thread)
3875         (set_general_process, write_ptid)
3876         (remote_unpack_thread_info_response, remote_get_threadinfo)
3877         (parse_threadlist_response, remote_get_threadlist)
3878         (remote_threadlist_iterator, remote_get_threads_with_ql)
3879         (remote_get_threads_with_qxfer)
3880         (remote_get_threads_with_qthreadinfo, extended_remote_restart)
3881         (get_offsets, remote_check_symbols, remote_supported_packet)
3882         (remote_query_supported, remote_packet_size)
3883         (remote_serial_quit_handler, remote_detach_pid)
3884         (remote_vcont_probe, remote_resume_with_hc)
3885         (send_interrupt_sequence, interrupt_query)
3886         (remote_notif_get_pending_events, fetch_register_using_p)
3887         (send_g_packet, process_g_packet, fetch_registers_using_g)
3888         (store_register_using_P, store_registers_using_G)
3889         (set_remote_traceframe, check_binary_download)
3890         (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
3891         (remote_xfer_live_readonly_partial, remote_read_bytes)
3892         (remote_send_printf, remote_flash_write, readchar)
3893         (remote_serial_write, putpkt, putpkt_binary, skip_frame)
3894         (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
3895         (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
3896         (extended_remote_disable_randomization, extended_remote_run)
3897         (send_environment_packet, extended_remote_environment_support)
3898         (extended_remote_set_inferior_cwd, remote_write_qxfer)
3899         (remote_read_qxfer, push_stop_reply, vcont_r_supported)
3900         (packet_command): Now methods of ...
3901         (remote_target): ... this class.
3902         (m_remote_state) <remote_target>: New field.
3903         (struct remote_state) <stop_reply_queue,
3904         remote_async_inferior_event_token, wait_forever_enabled_p>: New
3905         fields.
3906         (remote_state::remote_state): Allocate stop_reply_queue.
3907         (remote_state): Delete global.
3908         (get_remote_state_raw): Delete.
3909         (remote_target::get_remote_state): Allocate m_remote_state on
3910         demand.
3911         (get_current_remote_target): New.
3912         (remote_ops, extended_remote_ops): Delete.
3913         (wait_forever_enabled_p, remote_async_inferior_event_token):
3914         Delete, moved to struct remote_state.
3915         (remote_target::close): Delete self.  Destruction bits split to
3916         ...
3917         (remote_target::~remote_target): ... this.
3918         (show_memory_packet_size): Adjust to use
3919         get_current_remote_target.
3920         (struct protocol_feature) <func>: Add remote_target parameter.
3921         All callers adjusted.
3922         (curr_quit_handler_target): New.
3923         (remote_serial_quit_handler): Reimplement.
3924         (remote_target::open_1): Adjust to use get_current_remote_target.
3925         Heap-allocate remote_target/extended_remote_target instances.
3926         (vcont_builder::vcont_builder): Add remote_target parameter, and
3927         save it in m_remote.  All callers adjusted.
3928         (vcont_builder::m_remote): New field.
3929         (vcont_builder::restart, vcont_builder::flush)
3930         (vcont_builder::push_action): Use it.
3931         (remote_target::commit_resume): Use it.
3932         (struct queue_iter_param) <remote>: New field.
3933         (remote_target::remove_new_fork_children): Fill in 'remote' field.
3934         (check_pending_event_prevents_wildcard_vcont_callback_data): New.
3935         (check_pending_event_prevents_wildcard_vcont_callback)
3936         (remote_target::check_pending_events_prevent_wildcard_vcont)
3937         (remote_target::discard_pending_stop_replies)
3938         (remote_target::discard_pending_stop_replies_in_queue)
3939         (remote_target::remote_notif_remove_queued_reply): Fill in
3940         'remote' field.
3941         (remote_notif_get_pending_events): New.
3942         (remote_target::readchar, remote_target::remote_serial_write):
3943         Save/restore curr_quit_handler_target.
3944         (putpkt): New.
3945         (kill_new_fork_children): Fill in 'remote' field.
3946         (packet_command): Use get_current_remote_target, defer to
3947         remote_target method of same name.
3948         (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
3949         parameter, and save it in m_remote.  All callers adjusted.
3950         (scoped_remote_fd::release): Use m_remote.
3951         (scoped_remote_fd::m_remote): New field.
3952         (remote_file_put, remote_file_get, remote_file_delete): Use
3953         get_current_remote_target, defer to remote_target method of same
3954         name.
3955         (remote_btrace_reset): Add remote_state paremeter.  Update all
3956         callers.
3957         (remote_async_inferior_event_handler). Pass down 'data'.
3958         (remote_new_objfile): Use get_current_remote_target.
3959         (remote_target::vcont_r_supported): New.
3960         (set_range_stepping): Use get_current_remote_target and
3961         remote_target::vcont_r_supported.
3962         (_initialize_remote): Don't allocate 'remote_state' and
3963         'stop_reply_queue' globals.
3964         * remote.h (struct remote_target): Forward declare.
3965         (getpkt, putpkt, remote_notif_get_pending_events): Add
3966         'remote_target' parameter.
3967
3968 2018-05-22  Pedro Alves  <palves@redhat.com>
3969
3970         * remote.c (vcont_builder): Now a class.  Make all data members
3971         private.
3972         (vcont_builder) <vcont_builder, restart, flush, push_action>:
3973         Declare methods.
3974         (vcont_builder_restart): Rename to ...
3975         (vcont_builder::restart): ... this.
3976         (vcont_builder_flush): Rename to ...
3977         (vcont_builder::flush): ... this.
3978         (vcont_builder_push_action): Rename to ...
3979         (vcont_builder::push_action): ... this.
3980         (remote_target::commit_resume): Adjust.
3981
3982 2018-05-22  Pedro Alves  <palves@redhat.com>
3983
3984         * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
3985         (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
3986         (get_fixed_memory_packet_size): New.
3987         (get_memory_packet_size): Use it.
3988         (set_memory_packet_size): Don't override the config size with
3989         DEFAULT_MAX_MEMORY_PACKET_SIZE.
3990         (show_memory_packet_size): Use get_fixed_memory_packet_size.
3991         Don't refer to get_memory_packet_size if not connected to a remote
3992         target.  Show "(default)" if configured size is 0.
3993
3994 2018-05-22  Pedro Alves  <palves@redhat.com>
3995
3996         * remote.c (remote_target::mourn_inferior): Move
3997         discard_pending_stop_replies call here from ...
3998         (_initialize_remote): ... here.
3999
4000 2018-05-22  Pedro Alves  <palves@redhat.com>
4001
4002         * remote.c (compare_section_command): Remove set_general_process
4003         call.
4004
4005 2018-05-22  Pedro Alves  <palves@redhat.com>
4006
4007         * remote.c (struct packet_reg, struct remote_arch_state):
4008         Move higher up in the file.
4009         (remote_state) <m_arch_states>: Store remote_arch_state values
4010         instead of remote_arch_state pointers.
4011         (remote_state::get_remote_arch_state): Adjust.
4012
4013 2018-05-22  Pedro Alves  <palves@redhat.com>
4014
4015         * remote.c: Include <unordered_map>.
4016         (remote_state): Now a class.
4017         (remote_state) <get_remote_arch_state>: Declare method.
4018         <get_remote_arch_state>: New field.
4019         (remote_arch_state) <remote_arch_state>: Declare ctor.
4020         <regs>: Now a unique_ptr.
4021         (remote_gdbarch_data_handle): Delete.
4022         (get_remote_arch_state): Delete.
4023         (remote_state::get_remote_arch_state): New.
4024         (get_remote_state): Adjust to call remote_state's
4025         get_remote_arch_state method.
4026         (init_remote_state): Delete, bits factored out to ...
4027         (remote_arch_state::remote_arch_state): ... this new method.
4028         (get_remote_packet_size, get_memory_packet_size)
4029         (process_g_packet, remote_target::fetch_registers)
4030         (remote_target::prepare_to_store, store_registers_using_G)
4031         (remote_target::store_registers, remote_target::get_trace_status):
4032         Adjust to call remote_state's method.
4033         (_initialize_remote): Remove reference to
4034         remote_gdbarch_data_handle.
4035
4036 2018-05-22  Pedro Alves  <palves@redhat.com>
4037
4038         * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
4039         pread>: New method declarations.
4040         (remote_target::open_1): Adjust.
4041         (readahead_cache_invalidate): Rename to ...
4042         (readahead_cache::invalidate): ... this, and adjust to be a class
4043         method.
4044         (readahead_cache_invalidate_fd): Rename to ...
4045         (readahead_cache::invalidate_fd): ... this, and adjust to be a
4046         class method.
4047         (remote_hostio_pwrite): Adjust.
4048         (remote_hostio_pread_from_cache): Rename to ...
4049         (readahead_cache::pread): ... this, and adjust to be a class
4050         method.
4051         (remote_hostio_close): Adjust.
4052
4053 2018-05-22  Pedro Alves  <palves@redhat.com>
4054
4055         * remote.c (remote_hostio_close_cleanup): Delete.
4056         (class scoped_remote_fd): New.
4057         (remote_file_put, remote_file_get): Use it.
4058
4059 2018-05-22  Pedro Alves  <palves@redhat.com>
4060
4061         (struct vCont_action_support): Use bool and initialize all fields.
4062         (struct readahead_cache): Initialize all fields.
4063         (remote_state): Use bool and initialize all fields.
4064         (remote_state::remote_state, remote_state::~remote_state): New.
4065         (new_remote_state): Delete.
4066         (_initialize_remote): Use new to allocate remote_state.
4067
4068 2018-05-22  Pedro Alves  <palves@redhat.com>
4069             張俊芝  <zjz@zjz.name>
4070
4071         PR gdb/22973
4072         * c-exp.y: Include "c-support.h".
4073         (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
4074         of tolower.  Use c_ident_is_alpha to scan names.
4075         * c-lang.c: Include "c-support.h".
4076         (convert_ucn, convert_octal, convert_hex, convert_escape): Use
4077         ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
4078         * c-support.h: New file, with bits factored out from ...
4079         * cp-name-parser.y: ... this file.
4080         Include "c-support.h".
4081         (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
4082         c-support.h and renamed.
4083         (symbol_end, yylex): Adjust.
4084
4085 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
4086
4087         * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
4088         parameter type to CORE_ADDR.
4089         * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
4090         parameter type in declaration to CORE_ADDR.
4091         * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
4092         target_auxv_search to get AT_HWCAP and use the result to get the
4093         target description.
4094         * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
4095         to CORE_ADDR. Remove the cast of the return value to unsigned
4096         long. Fix error predicate of target_auxv_search.
4097         (ppc_linux_nat_target::read_description): Change the type of the
4098         hwcap variable to CORE_ADDR.
4099
4100 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
4101
4102         * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
4103         if the size of fpscr is larger than 32 bits.
4104
4105 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
4106
4107         * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
4108         (ppc32_linux_vsxregmap): New global.
4109         (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
4110         regcache_supply_regset, and regcache_collect_regset.
4111         * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
4112         * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
4113         (fetch_vsx_register, store_vsx_register): Remove.
4114         (fetch_vsx_registers): Add regno parameter. Get regset using
4115         ppc_linux_vsxregset. Use regset to supply registers.
4116         (store_vsx_registers): Add regno parameter. Get regset using
4117         ppc_linux_vsxregset. Use regset to collect registers.
4118         (fetch_register): Call fetch_vsx_registers instead of
4119         fetch_vsx_register.
4120         (store_register): Call store_vsx_registers instead of
4121         store_vsx_register.
4122         (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
4123         new regno parameter.
4124         (store_ppc_registers): Call store_vsx_registers with -1 for the
4125         new regno parameter.
4126         * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
4127         (ppc_collect_vsxregset): Remove.
4128
4129 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
4130
4131         * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
4132         offset fields.
4133         * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
4134         for vector register offset fields.
4135         (ppc64_fbsd_reg_offsets): Likewise.
4136         * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
4137         to vector register offset fields.
4138         * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
4139         to vector register offset fields.
4140         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
4141         vector register offset fields.
4142         * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
4143         initializers for vector register offset fields.
4144         (rs6000_aix64_reg_offsets): Likewise.
4145         * rs6000-tdep.c (ppc_vrreg_offset): Remove.
4146         (ppc_supply_vrregset): Remove.
4147         (ppc_collect_vrregset): Remove.
4148         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
4149         (ppc_linux_vrregset) : New function.
4150         (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
4151         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
4152         (ppc32_linux_vrregset): Remove.
4153         (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
4154         and use result instead of ppc32_linux_vrregset.
4155         (ppc32_linux_reg_offsets): Remove initializers for vector register
4156         offset fields.
4157         (ppc64_linux_reg_offsets): Likewise.
4158         * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
4159         * ppc-linux-nat.c: Include regset.h.
4160         (gdb_vrregset_t): Adjust comment to account for little-endian
4161         mode.
4162         (supply_vrregset, fill_vrregset): Remove.
4163         (fetch_altivec_register, store_altivec_register): Remove.
4164         (fetch_altivec_registers): Add regno parameter. Get regset using
4165         ppc_linux_vrregset. Use regset to supply registers.
4166         (store_altivec_registers): Add regno parameter. Get regset using
4167         ppc_linux_vrregset. Use regset to collect registers.
4168         (fetch_register): Call fetch_altivec_registers instead of
4169         fetch_altivec_register.
4170         (store_register): Call store_altivec_registers instead of
4171         store_altivec_register.
4172         (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
4173         the new regno parameter.
4174         (store_ppc_registers): Call store_altivec_registers with -1 for
4175         the new regno parameter.
4176
4177 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
4178
4179         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
4180         (PPC_LINUX_SIZEOF_VSXREGSET): Define.
4181         * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
4182         (gdb_vrregset_t): Change array type size to
4183         PPC_LINUX_SIZEOF_VRREGSET.
4184         (gdb_vsxregset_t): Change array type size to
4185         PPC_LINUX_SIZEOF_VSXREGSET.
4186         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
4187         Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
4188         PPC_LINUX_SIZEOF_VSXREGSET.
4189
4190 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
4191
4192         * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
4193         * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
4194         nat/ppc-linux.c.
4195         (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
4196         ppc_linux_target_wordsize with tid.
4197         (ppc_linux_nat_target::read_description): Call ppc_linux_target
4198         wordsize with tid.
4199         * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
4200         (ppc64_64bit_inferior_p): Add static and inline specifiers.
4201         (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
4202         tid parameter. Remove static specifier.
4203         * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
4204         (ppc_linux_target_wordsize): New declaration.
4205
4206 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
4207
4208         * arch/ppc-linux-common.c: New file.
4209         * arch/ppc-linux-common.h: New file.
4210         * arch/ppc-linux-tdesc.h: New file.
4211         * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
4212         * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
4213         (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
4214         arch/ppc-linux-tdesc.h.
4215         * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
4216         arch/ppc-linux-tdesc.h.
4217         (ppc_linux_nat_target::read_description): Remove target
4218         description matching code. Fill a ppc_linux_features struct and
4219         call ppc_linux_match_description with it. Move comment about ISA
4220         2.05 to ppc-linux-common.c.
4221         * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
4222         arch/ppc-linux-tdesc.h.
4223         (ppc_linux_core_read_description): Remove target description
4224         matching code. Fill a ppc_linux_features struct and call
4225         ppc_linux_match_description with it.
4226         * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
4227         (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
4228         (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
4229         (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
4230         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
4231         (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
4232         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
4233         (tdesc_powerpc_e500l): Remove.
4234
4235 2018-05-22  Joel Brobecker  <brobecker@adacore.com>
4236
4237         * ada-lang.c (catch_assert_command): Pass empty string instead
4238         of NULL for excep_string argument.
4239
4240 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
4241
4242         * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
4243         the width of the requested register exceeds the width of the
4244         `ptrace' data type.
4245
4246 2018-05-21  Tom Tromey  <tom@tromey.com>
4247
4248         * printcmd.c (output_command): Remove.
4249         (output_command_const): Rename to output_command.
4250         * valprint.h (output_command): Rename from output_command_const.
4251         * tracepoint.c (trace_dump_actions): Call output_command.
4252
4253 2018-05-21  Tom Tromey  <tom@tromey.com>
4254
4255         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
4256         (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
4257         * ada-lang.h (create_ada_exception_catchpoint): Update.
4258         * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
4259         std::string.
4260         (create_excep_cond_exprs, ~ada_catchpoint)
4261         (should_stop_exception, print_one_exception)
4262         (print_mention_exception, print_recreate_exception): Update.
4263         (ada_get_next_arg): Remove.
4264         (catch_ada_exception_command_split): Use std::string.  Change type
4265         of "excep_string", "cond_string".
4266         (catch_ada_exception_command): Update.
4267         (create_ada_exception_catchpoint): Change type of excep_string.
4268         (ada_exception_sal): Remove excep_string parameter.
4269         (~ada_catchpoint): Remove.
4270
4271 2018-05-21  Tom Tromey  <tom@tromey.com>
4272
4273         * ada-lang.c (ada_collect_symbol_completion_matches): Remove
4274         cleanup.
4275
4276 2018-05-21  Tom Tromey  <tom@tromey.com>
4277
4278         * ada-lang.c (ada_exception_message_1, ada_exception_message):
4279         Return unique_xmalloc_ptr.
4280         (print_it_exception): Update.
4281
4282 2018-05-21  Tom Tromey  <tom@tromey.com>
4283
4284         * tracepoint.c (trace_dump_actions): Use std::string.
4285
4286 2018-05-21  Tom Tromey  <tom@tromey.com>
4287
4288         * symfile.c (reread_symbols): Use std::string for original_name.
4289
4290 2018-05-21  Tom Tromey  <tom@tromey.com>
4291
4292         * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
4293         (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN.  Default
4294         constructor.
4295
4296 2018-05-20  Simon Marchi  <simon.marchi@polymtl.ca>
4297
4298         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
4299         instance to...
4300         (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
4301         * objfiles.c (get_objfile_bfd_data): Allocate
4302         objfile_per_bfd_storage with obstack_new when allocating on
4303         obstack.
4304
4305 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
4306
4307         * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
4308         OBSTACK_ZALLOC.
4309         * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
4310         * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
4311         * mdebugread.c (mdebug_build_psymtabs): Likewise.
4312         (add_pending): Likewise.
4313         (parse_symbol): Likewise.
4314         (parse_partial_symbols): Likewise.
4315         (psymtab_to_symtab_1): Likewise.
4316         (new_psymtab): Likewise.
4317         (elfmdebug_build_psymtabs): Likewise.
4318         * minsyms.c (terminate_minimal_symbol_table): Likewise.
4319         * objfiles.c (get_objfile_bfd_data): Likewise.
4320         (objfile_register_static_link): Likewise.
4321         * psymtab.c (allocate_psymtab): Likewise.
4322         * stabsread.c (read_member_functions): Likewise.
4323         * xcoffread.c (xcoff_end_psymtab): Likewise.
4324
4325 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
4326
4327         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
4328         compiler supports std::is_trivially_constructible.
4329         * common/poison.h: Include obstack.h.
4330         (IsMallocable): Define to is_trivially_constructible if the
4331         compiler supports it, define to true_type otherwise.
4332         (xobnew): New.
4333         (XOBNEW): Redefine.
4334         (xobnewvec): New.
4335         (XOBNEWVEC): Redefine.
4336         * gdb_obstack.h (obstack_zalloc): New.
4337         (OBSTACK_ZALLOC): Redefine.
4338         (obstack_calloc): New.
4339         (OBSTACK_CALLOC): Redefine.
4340         (obstack_new): New.
4341         * gdbarch.sh: Include gdb_obstack in gdbarch.h.
4342         (gdbarch_obstack): New declaration in gdbarch.h, definition in
4343         gdbarch.c.
4344         (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
4345         obstack_calloc/obstack_zalloc.
4346         (gdbarch_obstack_zalloc): Remove.
4347         * target-descriptions.c (tdesc_data_init): Use obstack_new.
4348
4349 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4350
4351         * stack.c (backtrace_command_1): Remove useless variable int i.
4352
4353 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4354
4355         * stack.c (print_frame_info): Fix comment.
4356
4357 2018-05-18  Tom Tromey  <tom@tromey.com>
4358
4359         * dwarf2read.c (struct dwz_file): Add constructor, initializers.
4360         <dwz_bfd>: Now a gdb_bfd_ref_ptr.
4361         (~dwarf2_per_objfile): Update
4362         (dwarf2_get_dwz_file): Use new.
4363         * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
4364         unique_ptr.
4365
4366 2018-05-18  Tom Tromey  <tom@tromey.com>
4367
4368         * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
4369         unique_ptr.
4370         * dwarf2read.c (struct dwp_file): Add constructor and
4371         initializers.
4372         (open_and_init_dwp_file): Return a unique_ptr.
4373         (dwarf2_per_objfile, create_dwp_hash_table)
4374         (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
4375         (lookup_dwo_unit_in_dwp): Update.
4376         (open_and_init_dwp_file, get_dwp_file): Update.
4377
4378 2018-05-18  Tom Tromey  <tom@tromey.com>
4379
4380         * dwarf2read.c (dwarf2_per_objfile): Update.
4381         (struct mapped_index): Add initializers.
4382         (dwarf2_read_index): Use new.
4383         (dw2_symtab_iter_init): Update.
4384         * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
4385         unique_ptr.
4386
4387 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
4388
4389         * dwarf2read.c (mapped_index) <total_size>: Remove.
4390
4391 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
4392
4393         * unittests/format_pieces-selftests.c (test_format_specifier):
4394         Add ARI comments.
4395
4396 2018-05-18  Tom Tromey  <tom@tromey.com>
4397
4398         * c-typeprint.c (maybe_print_hole): New function.
4399         (c_print_type_struct_field_offset): Update.
4400         (c_type_print_base_struct_union): Call maybe_print_hole.
4401
4402 2018-05-17  Keith Seitz  <keiths@redhat.com>
4403
4404         * breakpoint.c (build_bpstat_chain): New function, moved from
4405         bpstat_stop_status.
4406         (bpstat_stop_status): Add optional parameter, `stop_chain'.
4407         If no stop chain is passed, call build_bpstat_chain to build it.
4408         * breakpoint.h (build_bpstat_chain): Declare.
4409         (bpstat_stop_status): Move documentation here from breakpoint.c.
4410         * infrun.c (handle_signal_stop): Before eliding inlined frames,
4411         build the stop chain and pass it to skip_inline_frames.
4412         Pass this stop chain to bpstat_stop_status.
4413         * inline-frame.c: Include breakpoint.h.
4414         (stopped_by_user_bp_inline_frame): New function.
4415         (skip_inline_frames): Add parameter `stop_chain'.
4416         Move documention to inline-frame.h.
4417         If non-NULL, use stopped_by_user_bp_inline_frame to determine
4418         whether the frame should be elided.
4419         * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
4420         Add moved documentation and update for new parameter.
4421
4422 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
4423
4424         PR cli/14975
4425         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4426         unittests/format_pieces-selftests.c.
4427         * common/format.h (format_piece) <operator==>: New.
4428         (format_pieces) <operator[]>: Remove.
4429         * common/format.c (format_pieces::format_pieces): Handle \e.
4430         * unittests/format_pieces-selftests.c: New.
4431
4432 2018-05-17  Tom Tromey  <tom@tromey.com>
4433
4434         PR symtab/23010:
4435         * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
4436         (dw2_instantiate_symtab): Add skip_partial parameter.
4437         (dw2_find_last_source_symtab, dw2_map_expand_apply)
4438         (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
4439         (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
4440         (dw2_expand_symtabs_matching_one)
4441         (dw2_find_pc_sect_compunit_symtab)
4442         (dw2_debug_names_lookup_symbol)
4443         (dw2_debug_names_expand_symtabs_for_function): Update.
4444         (init_cutu_and_read_dies): Add skip_partial parameter.
4445         (process_psymtab_comp_unit, build_type_psymtabs_1)
4446         (process_skeletonless_type_unit, load_partial_comp_unit)
4447         (psymtab_to_symtab_1): Update.
4448         (load_full_comp_unit): Add skip_partial parameter.
4449         (process_imported_unit_die, dwarf2_read_addr_index)
4450         (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
4451         (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
4452         (read_signatured_type): Update.
4453
4454 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
4455
4456         * value.c (release_value): Remove unused variable.
4457         (record_latest_value): Likewise.
4458         (access_value_history): Likewise.
4459         (preserve_values): Likewise.
4460
4461 2018-05-17  Tom Tromey  <tom@tromey.com>
4462
4463         * extension.h (struct ext_lang_type_printers) <py_type_printers>:
4464         Initialize.
4465
4466 2018-05-16  Maciej W. Rozycki  <macro@mips.com>
4467
4468         PR gdb/22286
4469         * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
4470         Also handle registers whose width is not a multiple of
4471         PTRACE_TYPE_RET.
4472         (linux_nat_trad_target::store_register): Likewise.
4473
4474 2018-05-16  Tom Tromey  <tom@tromey.com>
4475
4476         * gdbcore.h (core_bfd): Redefine.
4477         * corelow.c (core_target::close): Update.
4478         (core_target_open): Update.
4479         * progspace.h (struct program_space) <cbfd>: Now a
4480         gdb_bfd_ref_ptr.
4481
4482 2018-05-16  Tom Tromey  <tom@tromey.com>
4483
4484         PR cli/19551:
4485         * symfile-add-flags.h (enum symfile_add_flags)
4486         <SYMFILE_NOT_FILENAME>: New constant.
4487         * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME.  Get
4488         objfile name from BFD.
4489         (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
4490         * minidebug.c (find_separate_debug_file_in_section): Put
4491         ".gnu_debugdata" into BFD's file name.
4492
4493 2018-05-16  Simon Marchi  <simon.marchi@ericsson.com>
4494
4495         * regcache.c (regcache_read_ftype, regcache_write_ftype):
4496         Remove.
4497
4498 2018-05-15  Tamar Christina  <tamar.christina@arm.com>
4499
4500         PR binutils/21446
4501         * aarch64-tdep.c (aarch64_analyze_prologue,
4502         aarch64_software_single_step, aarch64_displaced_step_copy_insn):
4503         Indicate not interested in errors.
4504
4505 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
4506
4507         * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
4508         Supply the MIPS_ZERO_REGNUM register.
4509
4510 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
4511
4512         * mips-tdep.c (mask_address_var): Make variable static.
4513
4514 2018-05-14  Tom Tromey  <tom@tromey.com>
4515
4516         * dwarf2read.c (rust_union_quirks): Clear rust_unions.
4517
4518 2018-05-11  Andrew Burgess  <andrew.burgess@embecosm.com>
4519
4520         * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
4521         FXSAVE_ADDR for the mxcsr register.
4522
4523 2018-05-11  Max Filippov  <jcmvbkbc@gmail.com>
4524
4525         * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
4526
4527 2018-05-11  Pedro Alves  <palves@redhat.com>
4528
4529         * corelow.c (core_target) <core_target>: No longer inline.
4530         Initialize m_core_gdbarch, m_core_vec and build the section table
4531         here.
4532         <~core_target>: New.
4533         <core_gdbarch, get_core_register_section>: New methods.
4534         <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
4535         factored out from ...
4536         <core_data, core_vec, core_gdbarch>: ... these deleted globals.
4537         (core_ops): Delete.
4538         (sniff_core_bfd): Add gdbarch parameter.
4539         (core_close): Delete, merged into ...
4540         (core_target::close): ... here.  Delete self.
4541         (core_close_cleanup): Delete.
4542         (core_target_open): Allocate a core_target on the heap.  Use a
4543         unique_ptr instead of a cleanup.  Bits moved into the core_target
4544         ctor.  Adjust to use core_target methods instead of globals.
4545         (get_core_register_section): Rename to ...
4546         (core_target::get_core_register_section): ... this and adjust.
4547         (struct get_core_registers_cb_data): New.
4548         (get_core_registers_cb): Use it.  Use bool.
4549         (core_target::fetch_registers, core_target::files_info)
4550         (core_target::xfer_partial, core_target::read_description)
4551         (core_target::pid_to, core_target::thread_name): Adjust to
4552         reference class fields instead of globals.
4553         * target.h (struct target_ops_deleter, target_ops_up): New.
4554
4555 2018-05-11  Pedro Alves  <palves@redhat.com>
4556
4557         * corefile.c (core_file_command): Move to corelow.c.
4558         * corelow.c (the_core_target): Delete.
4559         (core_file_command): Moved from corefile.c.  Check exec_bfd
4560         instead of the_core_target.  Use target_detach instead of calling
4561         into the_core_target directly.
4562         (maybe_say_no_core_file_now): New.
4563         (core_target::detach): Use it.
4564         (_initialize_corelow): Remove references to the_core_target.
4565         * gdbcore.h (the_core_target): Delete.
4566
4567 2018-05-11  Tom Tromey  <tromey@redhat.com>
4568             Pedro Alves  <palves@redhat.com>
4569
4570         * corefile.c (core_bfd): Remove.
4571         * gdbcore.h (core_bfd): Now a macro.
4572         * progspace.h (struct program_space) <cbfd>: New field.
4573
4574 2018-05-11  Tom Tromey  <tom@tromey.com>
4575
4576         * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
4577         gdb::def_vector.
4578
4579 2018-05-10  Tom Tromey  <tom@tromey.com>
4580
4581         * configure: Rebuild.
4582         * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
4583
4584 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
4585
4586         PR server/23158:
4587         * regformats/regdat.sh: Adjust script, following the addition
4588         of the new expedite_regs parameter to init_target_desc.
4589
4590 2018-05-10  Omair Javaid  <omair.javaid@linaro.org>
4591     
4592         PR gdb/23127
4593         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
4594         set_gdbarch_significant_addr_bit.
4595         * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
4596         set_gdbarch_significant_addr_bit.
4597         * utils.c (address_significant): Update to sign extend addr.
4598
4599 2018-05-09  Max Filippov  <jcmvbkbc@gmail.com>
4600
4601         * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
4602         (xtensa_linux_init_abi): Limit tdep->num_regs by
4603         tdep->num_nopriv_regs.
4604         * xtensa-tdep.c (xtensa_derive_tdep): Calculate
4605         tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
4606         not initialized.
4607
4608 2018-05-08  Simon Marchi  <simon.marchi@ericsson.com>
4609
4610         * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
4611
4612 2018-05-08  Andrew Burgess  <andrew.burgess@embecosm.com>
4613
4614         * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
4615         (I387_MXCSR_INIT_VAL): New constant.
4616         * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
4617         buffer if it was supplied by the inferior.
4618         * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
4619         (i387_xsave_get_clear_bv): New function.
4620         (i387_supply_xsave): Only read x87 control registers from the
4621         xsave buffer if the feature is enabled, and the state will have
4622         been written, otherwise, provide a suitable default.
4623         (i387_collect_xsave): Pre-clear all registers in xsave buffer,
4624         including x87 control registers.  Update control registers if they
4625         have changed from the default value, and mark features as enabled
4626         as required.
4627         * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
4628
4629 2018-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
4630
4631         * spu-tdep.c (info_spu_event_command): Fix output formatting.
4632
4633 2018-05-07  Tom Tromey  <tom@tromey.com>
4634
4635         * configure: Rebuild.
4636         * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
4637
4638 2018-05-07  Tom Tromey  <tom@tromey.com>
4639
4640         PR tdep/20362:
4641         * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
4642         bit.  Use correct value for VDIV.
4643
4644 2018-05-04  Tom Tromey  <tom@tromey.com>
4645
4646         * configure: Rebuild.
4647         * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
4648
4649 2018-05-04  Tom Tromey  <tom@tromey.com>
4650
4651         * linux-record.c (record_linux_system_call) <case
4652         RECORD_SYS_RECVFROM>: Add "break".
4653
4654 2018-05-04  Tom Tromey  <tom@tromey.com>
4655
4656         * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
4657         Add missing "break".
4658         * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
4659         Add missing "break".
4660
4661 2018-05-04  Tom Tromey  <tom@tromey.com>
4662
4663         * rs6000-tdep.c (ppc_process_record_op4)
4664         (ppc_process_record_op63): Add fall-through comment.
4665
4666 2018-05-04  Tom Tromey  <tom@tromey.com>
4667
4668         * i386-tdep.c (i386_process_record): Add fall-through comment.
4669
4670 2018-05-04  Tom Tromey  <tom@tromey.com>
4671
4672         * stabsread.c (define_symbol) <case 'p'>: Add fall-through
4673         comment.
4674
4675 2018-05-04  Tom Tromey  <tom@tromey.com>
4676
4677         * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
4678         * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
4679         * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
4680         comment.
4681         * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
4682         comment.
4683         * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
4684         comment.
4685
4686 2018-05-04  Tom Tromey  <tom@tromey.com>
4687
4688         * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
4689
4690 2018-05-04  Tom Tromey  <tom@tromey.com>
4691
4692         * s390-tdep.c (s390_process_record): Fix fall-through comments.
4693         * xcoffread.c (scan_xcoff_symtab): Move comment later.
4694         * symfile.c (section_is_mapped): Fix fall-through comment.
4695         * stabsread.c (define_symbol, read_member_functions): Fix
4696         fall-through comment.
4697         * s390-linux-tdep.c (s390_process_record): Fix fall-through
4698         comment.
4699         * remote.c (remote_wait_as): Fix fall-through comment.
4700         * p-exp.y (yylex): Fix fall-through comment.
4701         * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
4702         comment.
4703         * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
4704         * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
4705         * jv-exp.y (yylex): Fix fall-through comment.
4706         * go-exp.y (lex_one_token): Fix fall-through comment.
4707         * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
4708         fall-through comment.
4709         * f-exp.y (yylex): Fix fall-through comment.
4710         * dwarf2read.c (process_die): Fix fall-through comments.
4711         * dbxread.c (process_one_symbol): Fix fall-through comment.
4712         * d-exp.y (lex_one_token): Fix fall-through comment.
4713         * cp-name-parser.y (yylex): Fix fall-through comment.
4714         * coffread.c (coff_symtab_read): Fix fall-through comment.
4715         * c-exp.y (lex_one_token): Fix fall-through comment.
4716         * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
4717         comment.
4718         * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
4719         comment.
4720
4721 2018-05-04  Tom Tromey  <tom@tromey.com>
4722
4723         PR python/22730:
4724         * NEWS: Mention gdb.execute change.
4725         * gdbcmd.h (execute_control_command): Don't declare.
4726         * python/python.c (execute_gdb_command): Use read_command_lines_1,
4727         execute_control_commands, execute_control_commands_to_string.
4728         * cli/cli-script.h (execute_control_commands)
4729         (execute_control_commands_to_string): Declare.
4730         (execute_control_command): Add from_tty parameter.
4731         * cli/cli-script.c (execute_control_commands)
4732         (execute_control_commands_to_string): New functions.
4733         (execute_user_command): Use execute_control_commands.
4734         (execute_control_command_1): Add "from_tty" parameter.  Update.
4735         (execute_control_command): Likewise.
4736
4737 2018-05-04  Tom Tromey  <tom@tromey.com>
4738
4739         PR python/22731:
4740         * NEWS: Mention that breakpoint commands are writable.
4741         * python/py-breakpoint.c (bppy_set_commands): New function.
4742         (breakpoint_object_getset) <"commands">: Use it.
4743
4744 2018-05-04  Tom Tromey  <tom@tromey.com>
4745
4746         * tracepoint.c (actions_command): Update.
4747         * mi/mi-cmd-break.c (mi_command_line_array)
4748         (mi_command_line_array_cnt, mi_command_line_array_ptr)
4749         (mi_read_next_line): Remove.
4750         (mi_cmd_break_commands): Update.
4751         * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
4752         function_view.
4753         * cli/cli-script.c (get_command_line): Update.
4754         (process_next_line): Use function_view.  Constify.
4755         (recurse_read_control_structure, read_command_lines)
4756         (read_command_lines_1): Change argument types to function_view.
4757         (do_define_command, document_command): Update.
4758         * breakpoint.h (check_tracepoint_command): Don't declare.
4759         * breakpoint.c (check_tracepoint_command): Remove.
4760         (commands_command_1, create_tracepoint_from_upload): Update.
4761
4762 2018-05-04  Tom Tromey  <tom@tromey.com>
4763
4764         PR gdb/11750:
4765         * cli/cli-script.h (enum command_control_type) <define_control>:
4766         New constant.
4767         * cli/cli-script.c (multi_line_command_p): Handle define_control.
4768         (build_command_line, execute_control_command_1)
4769         (process_next_line): Likewise.
4770         (do_define_command): New function, extracted from define_command.
4771         (define_command): Use it.
4772
4773 2018-05-04  Tom Tromey  <tom@tromey.com>
4774
4775         * tracepoint.c (actions_command): Update.
4776         * cli/cli-script.h (read_command_lines): Update.
4777         * cli/cli-script.c (read_command_lines): Constify prompt_arg.
4778         (MAX_TMPBUF): Remove define.
4779         (define_command): Use string_printf.
4780         (document_command): Likewise.
4781         * breakpoint.c (commands_command_1): Update.
4782
4783 2018-05-04  Tom Tromey  <tom@tromey.com>
4784
4785         * top.c (execute_command): Update.
4786         * cli/cli-script.h (print_command_lines): Now varargs.
4787         * cli/cli-script.c (print_command_lines): Now varargs.
4788         (execute_control_command_1) <case while_control, case if_control>:
4789         Update.
4790
4791 2018-05-04  Tom Tromey  <tom@tromey.com>
4792
4793         * tracepoint.c (all_tracepoint_actions): Rename from
4794         all_tracepoint_actions_and_cleanup.  Change return type.
4795         (actions_command, encode_actions_1, encode_actions)
4796         (trace_dump_actions, tdump_command): Update.
4797         * remote.c (remote_download_command_source): Update.
4798         * python/python.c (gdbpy_eval_from_control_command)
4799         (python_command, python_interactive_command): Update.
4800         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
4801         * guile/guile.c (guile_command)
4802         (gdbscm_eval_from_control_command, guile_command): Update.
4803         * compile/compile.c (compile_code_command)
4804         (compile_print_command, compile_to_object): Update.
4805         * cli/cli-script.h (struct command_lines_deleter): New.
4806         (counted_command_line): New typedef.
4807         (struct command_line): Add constructor, destructor.
4808         <body_list>: Remove.
4809         <body_list_0, body_list_1>: New members.
4810         (command_line_up): Remove typedef.
4811         (read_command_lines, read_command_lines_1, get_command_line):
4812         Update.
4813         (copy_command_lines): Don't declare.
4814         * cli/cli-script.c (build_command_line): Use "new".
4815         (get_command_line): Return counted_command_line.
4816         (print_command_lines, execute_user_command)
4817         (execute_control_command_1, while_command, if_command): Update.
4818         (realloc_body_list): Remove.
4819         (process_next_line, recurse_read_control_structure): Update.
4820         (read_command_lines, read_command_lines_1): Return counted_command_line.
4821         (free_command_lines): Use "delete".
4822         (copy_command_lines): Remove.
4823         (define_command, document_command, show_user_1): Update.
4824         * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
4825         a counted_command_line.
4826         * breakpoint.h (counted_command_line): Remove typedef.
4827         (breakpoint_set_commands): Update.
4828         * breakpoint.c (check_no_tracepoint_commands)
4829         (validate_commands_for_breakpoint): Update.
4830         (breakpoint_set_commands): Change commands to be a
4831         counted_command_line.
4832         (commands_command_1, update_dprintf_command_list)
4833         (create_tracepoint_from_upload): Update.
4834
4835 2018-05-04  Tom Tromey  <tom@tromey.com>
4836
4837         * cli/cli-decode.h (cmd_list_element): New constructor.
4838         (~cmd_list_element): New destructor.
4839         (struct cmd_list_element): Add initializers.
4840         * cli/cli-decode.c (do_add_cmd): Use "new".
4841         (delete_cmd): Use "delete".
4842
4843 2018-05-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
4844             Pedro Alves <palves@redhat.com>
4845
4846         PR breakpoints/19806 and support for PR external/20207.
4847         * NEWS: Mention Aarch64 watchpoint improvements.
4848         * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
4849         watchpoints and PR external/20207 watchpoints.
4850         * nat/aarch64-linux-hw-point.c
4851         (kernel_supports_any_contiguous_range): New.
4852         (aarch64_watchpoint_offset): New.
4853         (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
4854         (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
4855         (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
4856         (aarch64_align_watchpoint): New parameters aligned_offset_p and
4857         next_addr_orig_p.  Support PR external/20207 watchpoints.
4858         (aarch64_downgrade_regs): New.
4859         (aarch64_dr_state_insert_one_point): New parameters offset and
4860         addr_orig.
4861         (aarch64_dr_state_remove_one_point): Likewise.
4862         (aarch64_handle_breakpoint): Update caller.
4863         (aarch64_handle_aligned_watchpoint): Likewise.
4864         (aarch64_handle_unaligned_watchpoint): Support addr_orig and
4865         aligned_offset.
4866         (aarch64_linux_set_debug_regs): Remove const from state.  Call
4867         aarch64_downgrade_regs.
4868         (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
4869         * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
4870         (DR_CONTROL_MASK): ... this.
4871         (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
4872         (unsigned int aarch64_watchpoint_offset): New prototype.
4873         (aarch64_linux_set_debug_regs): Remove const from state.
4874         * utils.c (align_up, align_down): Move to ...
4875         * common/common-utils.c (align_up, align_down): ... here.
4876         * utils.h (align_up, align_down): Move to ...
4877         * common/common-utils.h (align_up, align_down): ... here.
4878
4879 2018-05-04  Joel Brobecker  <brobecker@adacore.com>
4880
4881         * sparc-tdep.c (sparc_structure_return_p): Re-implement to
4882         match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
4883         (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
4884         Re-implement to match the ABI as summarized in GCC's
4885         gcc/config/sparc/sparc.c.  All callers updated.
4886         (sparc32_store_arguments): Remove assertion.
4887
4888 2018-05-04  Tom Tromey  <tom@tromey.com>
4889
4890         * printcmd.c: Don't include tui.h.
4891         (decode_format): Use skip_spaces.
4892
4893 2018-05-04  Tom Tromey  <tom@tromey.com>
4894
4895         PR gdb/22619:
4896         * printcmd.c (last_count): New global.
4897         (x_command): Use saved count when repeating.
4898
4899 2018-05-04  Tom Tromey  <tom@tromey.com>
4900
4901         * nto-procfs.c (do_closedir_cleanup): Remove.
4902         (procfs_pidlist): Use gdb_dir_up.
4903         * procfs.c (do_closedir_cleanup): Remove.
4904         (proc_update_threads): Use gdb_dir_up.
4905         * common/filestuff.h (struct gdb_dir_deleter): New.
4906         (gdb_dir_up): New typedef.
4907
4908 2018-05-04  Tom Tromey  <tom@tromey.com>
4909
4910         * ada-lang.c (print_mention_exception): Use std::string.
4911
4912 2018-05-04  Tom Tromey  <tom@tromey.com>
4913
4914         * ada-lang.c (create_excep_cond_exprs): Update.
4915         (ada_exception_catchpoint_cond_string): Use std::string.
4916
4917 2018-05-04  Tom Tromey  <tom@tromey.com>
4918
4919         * ada-lang.c (xget_renaming_scope): Return std::string.
4920         (old_renaming_is_invisible): Update.
4921
4922 2018-05-04  Tom Tromey  <tom@tromey.com>
4923
4924         * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
4925         (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
4926
4927 2018-05-04  Ulrich Weigand  <uweigand@de.ibm.com>
4928
4929         * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
4930
4931 2018-05-04  Tom Tromey  <tom@tromey.com>
4932
4933         * remote.c (remote_query_supported_append): Change type.
4934         (remote_check_symbols): Update.
4935
4936 2018-05-04  Paul Pluzhnikov  <ppluzhnikov@google.com>
4937
4938         PR gdb/11420
4939         * configure.ac: Prepend libpython.
4940         * python/python-config.py: Likewise.
4941         * configure: Regenerate.
4942
4943 2018-05-03  Simon Marchi  <simon.marchi@ericsson.com>
4944
4945         * Makefile.in (%.c: %.l): Use -t instead of --stdout.
4946
4947 2018-05-03  Pedro Alves  <palves@redhat.com>
4948
4949         * s390-linux-nat.c
4950         (s390_linux_nat_target::have_continuable_watchpoint): Mark with
4951         override.  Write 'true' instead of '1'.
4952         (s390_linux_nat_target::watchpoint_addr_within_range): Remove
4953         declaration.
4954
4955 2018-05-02  Pedro Alves  <palves@redhat.com>
4956
4957         * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
4958         add_inf_child_target.
4959         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
4960         add_inf_child_target.
4961         * aix-thread.c (aix_thread_target_info): New.
4962         (aix_thread_target) <shortname, longname, doc>: Delete.
4963         <info>: New.
4964         * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
4965         add_inf_child_target.
4966         * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
4967         add_inf_child_target.
4968         * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
4969         add_inf_child_target.
4970         * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
4971         add_inf_child_target.
4972         * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
4973         add_inf_child_target.
4974         * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
4975         add_inf_child_target.
4976         * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
4977         add_inf_child_target.
4978         * arm-linux-nat.c (_initialize_arm_linux_nat): Use
4979         add_inf_child_target.
4980         * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
4981         add_inf_child_target.
4982         * bfd-target.c (target_bfd_target_info): New.
4983         (target_bfd) <shortname, longname, doc>: Delete.
4984         <info>: New.
4985         * bsd-kvm.c (bsd_kvm_target_info): New.
4986         (bsd_kvm_target) <shortname, longname, doc>: Delete.
4987         <info>: New.
4988         (bsd_kvm_target::open): Rename to ...
4989         (bsd_kvm_target_open): ... this.  Adjust.
4990         * bsd-uthread.c (bsd_uthread_target_info): New.
4991         (bsd_uthread_target) <shortname, longname, doc>: Delete.
4992         <info>: New.
4993         * corefile.c (core_file_command): Adjust.
4994         * corelow.c (core_target_info): New.
4995         (core_target) <shortname, longname, doc>: Delete.
4996         <info>: New.
4997         (core_target::open): Rename to ...
4998         (core_target_open): ... this.  Adjust.
4999         * ctf.c (ctf_target_info): New.
5000         (ctf_target) <shortname, longname, doc>: Delete.
5001         <info>: New.
5002         (ctf_target::open): Rename to ...
5003         (ctf_target_open): ... this.
5004         (_initialize_ctf): Adjust.
5005         * exec.c (exec_target_info): New.
5006         (exec_target) <shortname, longname, doc>: Delete.
5007         <info>: New.
5008         (exec_target::open): Rename to ...
5009         (exec_target_open): ... this.
5010         * gdbcore.h (core_target_open): Declare.
5011         * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
5012         * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
5013         add_inf_child_target.
5014         * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
5015         add_inf_child_target.
5016         * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
5017         add_inf_child_target.
5018         * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
5019         add_inf_child_target.
5020         * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
5021         add_inf_child_target.
5022         * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
5023         add_inf_child_target.
5024         * i386-linux-nat.c (_initialize_i386_linux_nat): Use
5025         add_inf_child_target.
5026         * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
5027         add_inf_child_target.
5028         * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
5029         add_inf_child_target.
5030         * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
5031         add_inf_child_target.
5032         * inf-child.c (inf_child_target_info): New.
5033         (inf_child_target::info): New.
5034         (inf_child_open_target): Remove 'target' parameter.  Use
5035         get_native_target instead.
5036         (inf_child_target::open): Delete.
5037         (add_inf_child_target): New.
5038         * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
5039         Delete.
5040         <info>: New.
5041         (add_inf_child_target): Declare.
5042         (inf_child_open_target): Declare.
5043         * linux-thread-db.c (thread_db_target_info): New.
5044         (thread_db_target) <shortname, longname, doc>: Delete.
5045         <info>: New.
5046         * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
5047         add_inf_child_target.
5048         * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
5049         add_inf_child_target.
5050         * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
5051         add_inf_child_target.
5052         * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
5053         add_inf_child_target.
5054         * make-target-delegates (print_class): Adjust.
5055         * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
5056         add_inf_child_target.
5057         * mips-linux-nat.c (_initialize_mips_linux_nat): Use
5058         add_inf_child_target.
5059         * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
5060         add_inf_child_target.
5061         * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
5062         add_inf_child_target.
5063         * nto-procfs.c (nto_native_target_info): New.
5064         (nto_procfs_target_native) <shortname, longname, doc>:
5065         Delete.
5066         <info>: New.
5067         (nto_procfs_target_info): New.
5068         (nto_procfs_target_procfs) <shortname, longname, doc>:
5069         Delete.
5070         <info>: New.
5071         (init_procfs_targets): Adjust.
5072         * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
5073         add_inf_child_target.
5074         * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
5075         add_inf_child_target.
5076         * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
5077         add_inf_child_target.
5078         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
5079         add_inf_child_target.
5080         * ravenscar-thread.c (ravenscar_target_info): New.
5081         (ravenscar_thread_target) <shortname, longname, doc>:
5082         Delete.
5083         <info>: New.
5084         * record-btrace.c (record_btrace_target_info):
5085         (record_btrace_target) <shortname, longname, doc>: Delete.
5086         <info>: New.
5087         (record_btrace_target::open): Rename to ...
5088         (record_btrace_target_open): ... this.  Adjust.
5089         * record-full.c (record_longname, record_doc): New.
5090         (record_full_base_target) <shortname, longname, doc>: Delete.
5091         <info>: New.
5092         (record_full_target_info): New.
5093         (record_full_target): <shortname>: Delete.
5094         <info>: New.
5095         (record_full_core_open_1, record_full_open_1): Update comments.
5096         (record_full_base_target::open): Rename to ...
5097         (record_full_open): ... this.
5098         (cmd_record_full_restore): Update.
5099         (_initialize_record_full): Update.
5100         * remote-sim.c (remote_sim_target_info): New.
5101         (gdbsim_target) <shortname, longname, doc>: Delete.
5102         <info>: New.
5103         (gdbsim_target::open): Rename to ...
5104         (gdbsim_target_open): ... this.
5105         (_initialize_remote_sim): Adjust.
5106         * remote.c (remote_doc): New.
5107         (remote_target_info): New.
5108         (remote_target) <shortname, longname, doc>: Delete.
5109         <info>: New.
5110         (extended_remote_target_info): New.
5111         (extended_remote_target) <shortname, longname, doc>: Delete.
5112         <info>: New.
5113         (remote_target::open_1): Make static.  Adjust.
5114         * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
5115         * s390-linux-nat.c (_initialize_s390_nat): Use
5116         add_inf_child_target.
5117         * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
5118         add_inf_child_target.
5119         * sol-thread.c (thread_db_target_info): New.
5120         (sol_thread_target) <shortname, longname, doc>: Delete.
5121         <info>: New.
5122         * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
5123         add_inf_child_target.
5124         * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
5125         add_inf_child_target.
5126         * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
5127         add_inf_child_target.
5128         * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
5129         add_inf_child_target.
5130         * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
5131         add_inf_child_target.
5132         * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
5133         add_inf_child_target.
5134         * spu-linux-nat.c (_initialize_spu_nat): Use
5135         add_inf_child_target.
5136         * spu-multiarch.c (spu_multiarch_target_info): New.
5137         (spu_multiarch_target) <shortname, longname, doc>: Delete.
5138         <info>: New.
5139         * target-delegates.c: Regenerate.
5140         * target.c: Include <unordered_map>.
5141         (target_ops_p): Delete.
5142         (DEF_VEC_P(target_ops_p)): Delete.
5143         (target_factories): New.
5144         (test_target_info): New.
5145         (test_target_ops::info): New.
5146         (open_target): Adjust to use target_factories.
5147         (add_target_with_completer): Rename to ...
5148         (add_target): ... this.  Change prototype.  Register target_info
5149         and open callback in target_factories.  Register target_info in
5150         command context instead of target_ops.
5151         (add_target): Delete old implementation.
5152         (add_deprecated_target_alias): Change prototype.  Adjust.
5153         (the_native_target): New.
5154         (set_native_target, get_native_target): New.
5155         (find_default_run_target): Use the_native_target.
5156         (find_attach_target, find_run_target): Simplify.
5157         (target_ops::open): Delete.
5158         (dummy_target_info): New.
5159         (dummy_target::shortname, dummy_target::longname)
5160         (dummy_target::doc): Delete.
5161         (dummy_target::info): New.
5162         (debug_target::shortname, debug_target::longname)
5163         (debug_target::doc): Delete.
5164         (debug_target::info): New.
5165         * target.h (struct target_info): New.
5166         (target_ops::~target_ops): Add comment.
5167         (target_ops::info): New.
5168         (target_ops::shortname, target_ops::longname, target_ops::doc): No
5169         longer virtual.  Implement in terms of target_info.
5170         (set_native_target, get_native_target): Declare.
5171         (target_open_ftype): New.
5172         (add_target, add_target_with_completer)
5173         (add_deprecated_target_alias): Change prototype.
5174         (test_target) <shortname, longname, doc>: Delete.
5175         <info>: New.
5176         * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
5177         add_inf_child_target.
5178         * tracefile-tfile.c (tfile_target_info): New.
5179         (tfile_target) <shortname, longname, doc>: Delete.
5180         <info>: New.
5181         (tfile_target::open): Rename to ...
5182         (tfile_target_open): ... this.
5183         (_initialize_tracefile_tfile): Adjust.
5184         * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
5185         add_inf_child_target.
5186         * windows-nat.c (_initialize_windows_nat): Use
5187         add_inf_child_target.
5188         * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
5189         add_inf_child_target.
5190
5191 2018-05-02  Pedro Alves  <palves@redhat.com>
5192
5193         * linux-nat.h (linux_nat_target) <low_new_thread,
5194         low_delete_thread, low_new_fork, low_forget_process,
5195         low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
5196         New virtual methods.
5197         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
5198         (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
5199         (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
5200         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
5201         (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
5202         Delete.
5203         * linux-fork.c (delete_fork): Adjust to call low method.
5204         * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
5205         (linux_nat_new_fork, linux_nat_forget_process_hook)
5206         (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
5207         (linux_nat_status_is_event):
5208         (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
5209         (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
5210         to call low method.
5211         (sigtrap_is_event): Rename to ...
5212         (linux_nat_target::low_status_is_event): ... this.
5213         (linux_nat_set_status_is_event): Delete.
5214         (save_stop_reason, linux_nat_wait_1)
5215         (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
5216         low methods.
5217         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
5218         (linux_nat_set_new_fork, linux_nat_set_forget_process)
5219         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
5220         (linux_nat_set_prepare_to_resume): Delete.
5221         * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
5222         low virtual methods.
5223         * amd64-linux-nat.c: Likewise.
5224         * arm-linux-nat.c: Likewise.
5225         * i386-linux-nat.c: Likewise.
5226         * ia64-linux-nat.c: Likewise.
5227         * mips-linux-nat.c: Likewise.
5228         * ppc-linux-nat.c: Likewise.
5229         * s390-linux-nat.c: Likewise.
5230         * sparc64-linux-nat.c: Likewise.
5231         * x86-linux-nat.c: Likewise.
5232         * x86-linux-nat.h: Include "nat/x86-linux.h".
5233         (x86_linux_nat_target) <low_new_fork, low_forget_process,
5234         low_prepare_to_resume, low_new_thread, low_delete_thread>:
5235         Override methods.
5236
5237 2018-05-02  Pedro Alves  <palves@redhat.com>
5238
5239         * target.h (target_ops)
5240         <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
5241         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
5242         stopped_by_watchpoint, have_continuable_watchpoint,
5243         stopped_data_address, watchpoint_addr_within_range,
5244         can_accel_watchpoint_condition, can_run, thread_alive,
5245         has_all_memory, has_memory, has_stack, has_registers,
5246         has_execution, can_async_p, is_async_p, supports_non_stop,
5247         always_non_stop_p, can_execute_reverse, supports_multi_process,
5248         supports_enable_disable_tracepoint,
5249         supports_disable_randomization, supports_string_tracing,
5250         supports_evaluation_of_breakpoint_conditions,
5251         can_run_breakpoint_commands, filesystem_is_local,
5252         can_download_tracepoint, get_trace_state_variable_value,
5253         set_trace_notes, get_tib_address, use_agent, can_use_agent,
5254         record_is_replaying, record_will_replay,
5255         augmented_libraries_svr4_read>: Adjust to return bool.
5256         * aarch64-linux-nat.c: All implementations adjusted.
5257         * aix-thread.c: All implementations adjusted.
5258         * arm-linux-nat.c: All implementations adjusted.
5259         * breakpoint.c: All implementations adjusted.
5260         * bsd-kvm.c: All implementations adjusted.
5261         * bsd-uthread.c: All implementations adjusted.
5262         * corelow.c: All implementations adjusted.
5263         * ctf.c: All implementations adjusted.
5264         * darwin-nat.c: All implementations adjusted.
5265         * darwin-nat.h: All implementations adjusted.
5266         * exec.c: All implementations adjusted.
5267         * fbsd-nat.c: All implementations adjusted.
5268         * fbsd-nat.h: All implementations adjusted.
5269         * gnu-nat.c: All implementations adjusted.
5270         * gnu-nat.h: All implementations adjusted.
5271         * go32-nat.c: All implementations adjusted.
5272         * ia64-linux-nat.c: All implementations adjusted.
5273         * inf-child.c: All implementations adjusted.
5274         * inf-child.h: All implementations adjusted.
5275         * inf-ptrace.c: All implementations adjusted.
5276         * inf-ptrace.h: All implementations adjusted.
5277         * linux-nat.c: All implementations adjusted.
5278         * linux-nat.h: All implementations adjusted.
5279         * mips-linux-nat.c: All implementations adjusted.
5280         * nto-procfs.c: All implementations adjusted.
5281         * ppc-linux-nat.c: All implementations adjusted.
5282         * procfs.c: All implementations adjusted.
5283         * ravenscar-thread.c: All implementations adjusted.
5284         * record-btrace.c: All implementations adjusted.
5285         * record-full.c: All implementations adjusted.
5286         * remote-sim.c: All implementations adjusted.
5287         * remote.c: All implementations adjusted.
5288         * s390-linux-nat.c: All implementations adjusted.
5289         * sol-thread.c: All implementations adjusted.
5290         * spu-multiarch.c: All implementations adjusted.
5291         * target-delegates.c: All implementations adjusted.
5292         * target.c: All implementations adjusted.
5293         * target.h: All implementations adjusted.
5294         * tracefile-tfile.c: All implementations adjusted.
5295         * tracefile.c: All implementations adjusted.
5296         * tracefile.h: All implementations adjusted.
5297         * windows-nat.c: All implementations adjusted.
5298         * x86-linux-nat.h: All implementations adjusted.
5299         * x86-nat.h: All implementations adjusted.
5300
5301 2018-05-02  Pedro Alves  <palves@redhat.com>
5302
5303         * make-target-delegates (scan_target_h): Don't trim lines here.
5304         Replace sequences of tabs and/or whitespace with a single
5305         whitespace.
5306         (top level, parsing methods): Trim each line before processing it
5307         here.
5308
5309 2018-05-02  Pedro Alves  <palves@redhat.com>
5310             John Baldwin  <jhb@freebsd.org>
5311
5312         * target.h (enum strata) <debug_stratum>: New.
5313         (struct target_ops) <all delegation methods>: Replace by C++
5314         virtual methods, and drop "to_" prefix.  All references updated
5315         throughout.
5316         <to_shortname, to_longname, to_doc, to_data,
5317         to_have_steppable_watchpoint, to_have_continuable_watchpoint,
5318         to_has_thread_control, to_attach_no_wait>: Delete, replaced by
5319         virtual methods.  All references updated throughout.
5320         <can_attach, supports_terminal_ours, can_create_inferior,
5321         get_thread_control_capabilities, attach_no_wait>: New
5322         virtual methods.
5323         <insert_breakpoint, remove_breakpoint>: Now
5324         TARGET_DEFAULT_NORETURN methods.
5325         <info_proc>: Now returns bool.
5326         <to_magic>: Delete.
5327         (OPS_MAGIC): Delete.
5328         (current_target): Delete.  All references replaced by references
5329         to ...
5330         (target_stack): ... this.  New.
5331         (target_shortname, target_longname): Adjust.
5332         (target_can_run): Now a function declaration.
5333         (default_child_has_all_memory, default_child_has_memory)
5334         (default_child_has_stack, default_child_has_registers)
5335         (default_child_has_execution): Remove target_ops parameter.
5336         (complete_target_initialization): Delete.
5337         (memory_breakpoint_target): New template class.
5338         (test_target_ops): Refactor as a C++ class with virtual methods.
5339         * make-target-delegates (NAME_PART): Tighten.
5340         (POINTER_PART, CP_SYMBOL): New.
5341         (SIMPLE_RETURN_PART): Reimplement.
5342         (VEC_RETURN_PART): Expect less.
5343         (RETURN_PART, VIRTUAL_PART): New.
5344         (METHOD): Adjust to C++ virtual methods.
5345         (scan_target_h): Remove reference to C99.
5346         (dname): Output "target_ops::" prefix.
5347         (write_function_header): Adjust to output a C++ class method.
5348         (write_declaration): New.
5349         (write_delegator): Adjust to output a C++ class method.
5350         (tdname): Output "dummy_target::" prefix.
5351         (write_tdefault, write_debugmethod): Adjust to output a C++ class
5352         method.
5353         (tdefault_names, debug_names): Delete.
5354         (return_types, tdefaults, styles, argtypes_array): New.
5355         (top level): All methods are delegators.
5356         (print_class): New.
5357         (top level): Print dummy_target and debug_target classes.
5358         * target-delegates.c: Regenerate.
5359         * target-debug.h (target_debug_print_enum_info_proc_what)
5360         (target_debug_print_thread_control_capabilities)
5361         (target_debug_print_thread_info_p): New.
5362         * target.c (dummy_target): Delete.
5363         (the_dummy_target, the_debug_target): New.
5364         (target_stack): Now extern.
5365         (set_targetdebug): Push/unpush debug target.
5366         (default_child_has_all_memory, default_child_has_memory)
5367         (default_child_has_stack, default_child_has_registers)
5368         (default_child_has_execution): Remove target_ops parameter.
5369         (complete_target_initialization): Delete.
5370         (add_target_with_completer): No longer call
5371         complete_target_initialization.
5372         (target_supports_terminal_ours): Use regular delegation.
5373         (update_current_target): Delete.
5374         (push_target): No longer check magic number.  Don't call
5375         update_current_target.
5376         (unpush_target): Don't call update_current_target.
5377         (target_is_pushed): No longer check magic number.
5378         (target_require_runnable): Skip for all stratums over
5379         process_stratum.
5380         (target_ops::info_proc): New.
5381         (target_info_proc): Use find_target_at and
5382         find_default_run_target.
5383         (target_supports_disable_randomization): Use regular delegation.
5384         (target_get_osdata): Use find_target_at.
5385         (target_ops::open, target_ops::close, target_ops::can_attach)
5386         (target_ops::attach, target_ops::can_create_inferior)
5387         (target_ops::create_inferior, target_ops::can_run)
5388         (target_can_run): New.
5389         (default_fileio_target): Use regular delegation.
5390         (target_ops::fileio_open, target_ops::fileio_pwrite)
5391         (target_ops::fileio_pread, target_ops::fileio_fstat)
5392         (target_ops::fileio_close, target_ops::fileio_unlink)
5393         (target_ops::fileio_readlink): New.
5394         (target_fileio_open_1, target_fileio_unlink)
5395         (target_fileio_readlink): Always call the target method.  Handle
5396         FILEIO_ENOSYS.
5397         (return_zero, return_zero_has_execution): Delete.
5398         (init_dummy_target): Delete.
5399         (dummy_target::dummy_target, dummy_target::shortname)
5400         (dummy_target::longname, dummy_target::doc)
5401         (debug_target::debug_target, debug_target::shortname)
5402         (debug_target::longname, debug_target::doc): New.
5403         (target_supports_delete_record): Use regular delegation.
5404         (setup_target_debug): Delete.
5405         (maintenance_print_target_stack): Skip debug_stratum.
5406         (initialize_targets): Instantiate the_dummy_target and
5407         the_debug_target.
5408         * auxv.c (target_auxv_parse): Remove 'ops' parameter.  Adjust to
5409         use target_stack.
5410         (target_auxv_search, fprint_target_auxv): Adjust.
5411         (info_auxv_command): Adjust to use target_stack.
5412         * auxv.h (target_auxv_parse): Remove 'ops' parameter.
5413         * exceptions.c (print_flush): Handle a NULL target_stack.
5414         * regcache.c (target_ops_no_register): Refactor as class with
5415         virtual methods.
5416
5417         * exec.c (exec_target): New class.
5418         (exec_ops): Now an exec_target.
5419         (exec_open, exec_close_1, exec_get_section_table)
5420         (exec_xfer_partial, exec_files_info, exec_has_memory)
5421         (exec_make_note_section): Refactor as exec_target methods.
5422         (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
5423         Delete.
5424         (exec_target::find_memory_regions): New.
5425         (_initialize_exec): Don't call init_exec_ops.
5426         * gdbcore.h (exec_file_clear): Delete.
5427
5428         * corefile.c (core_target): Delete.
5429         (core_file_command): Adjust.
5430         * corelow.c (core_target): New class.
5431         (the_core_target): New.
5432         (core_close): Remove target_ops parameter.
5433         (core_close_cleanup): Adjust.
5434         (core_target::close): New.
5435         (core_open, core_detach, get_core_registers, core_files_info)
5436         (core_xfer_partial, core_thread_alive, core_read_description)
5437         (core_pid_to_str, core_thread_name, core_has_memory)
5438         (core_has_stack, core_has_registers, core_info_proc): Rework as
5439         core_target methods.
5440         (ignore, core_remove_breakpoint, init_core_ops): Delete.
5441         (_initialize_corelow): Initialize the_core_target.
5442         * gdbcore.h (core_target): Delete.
5443         (the_core_target): New.
5444
5445         * ctf.c: (ctf_target): New class.
5446         (ctf_ops): Now a ctf_target.
5447         (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
5448         (ctf_xfer_partial, ctf_get_trace_state_variable_value)
5449         (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
5450         methods.
5451         (init_ctf_ops): Delete.
5452         (_initialize_ctf): Don't call it.
5453         * tracefile-tfile.c (tfile_target): New class.
5454         (tfile_ops): Now a tfile_target.
5455         (tfile_open, tfile_close, tfile_files_info)
5456         (tfile_get_tracepoint_status, tfile_trace_find)
5457         (tfile_fetch_registers, tfile_xfer_partial)
5458         (tfile_get_trace_state_variable_value, tfile_traceframe_info):
5459         Refactor as tfile_target methods.
5460         (tfile_xfer_partial_features): Remove target_ops parameter.
5461         (init_tfile_ops): Delete.
5462         (_initialize_tracefile_tfile): Don't call it.
5463         * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
5464         (tracefile_has_stack, tracefile_has_registers)
5465         (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
5466         tracefile_target methods.
5467         (init_tracefile_ops): Delete.
5468         (tracefile_target::tracefile_target): New.
5469         * tracefile.h: Include "target.h".
5470         (tracefile_target): New class.
5471         (init_tracefile_ops): Delete.
5472
5473         * spu-multiarch.c (spu_multiarch_target): New class.
5474         (spu_ops): Now a spu_multiarch_target.
5475         (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
5476         (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
5477         (spu_search_memory, spu_mourn_inferior): Refactor as
5478         spu_multiarch_target methods.
5479         (init_spu_ops): Delete.
5480         (_initialize_spu_multiarch): Remove references to init_spu_ops,
5481         complete_target_initialization.
5482
5483         * ravenscar-thread.c (ravenscar_thread_target): New class.
5484         (ravenscar_ops): Now a ravenscar_thread_target.
5485         (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
5486         (ravenscar_thread_alive, ravenscar_pid_to_str)
5487         (ravenscar_fetch_registers, ravenscar_store_registers)
5488         (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
5489         (ravenscar_stopped_by_hw_breakpoint)
5490         (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
5491         (ravenscar_mourn_inferior, ravenscar_core_of_thread)
5492         (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
5493         methods.
5494         (init_ravenscar_thread_ops): Delete.
5495         (_initialize_ravenscar): Remove references to
5496         init_ravenscar_thread_ops and complete_target_initialization.
5497
5498         * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
5499         (bsd_uthread_target): New class.
5500         (bsd_uthread_ops): Now a bsd_uthread_target.
5501         (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
5502         (bsd_uthread_close, bsd_uthread_mourn_inferior)
5503         (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
5504         (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
5505         (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
5506         (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
5507         (bsd_uthread_target): Delete function.
5508         (_initialize_bsd_uthread): Remove reference to
5509         complete_target_initialization.
5510
5511         * bfd-target.c (target_bfd_data): Delete.  Fields folded into ...
5512         (target_bfd): ... this new class.
5513         (target_bfd_xfer_partial, target_bfd_get_section_table)
5514         (target_bfd_close): Refactor as target_bfd methods.
5515         (target_bfd::~target_bfd): New.
5516         (target_bfd_reopen): Adjust.
5517         (target_bfd::close): New.
5518
5519         * record-btrace.c (record_btrace_target): New class.
5520         (record_btrace_ops): Now a record_btrace_target.
5521         (record_btrace_open, record_btrace_stop_recording)
5522         (record_btrace_disconnect, record_btrace_close)
5523         (record_btrace_async, record_btrace_info)
5524         (record_btrace_insn_history, record_btrace_insn_history_range)
5525         (record_btrace_insn_history_from, record_btrace_call_history)
5526         (record_btrace_call_history_range)
5527         (record_btrace_call_history_from, record_btrace_record_method)
5528         (record_btrace_is_replaying, record_btrace_will_replay)
5529         (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
5530         (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
5531         (record_btrace_store_registers, record_btrace_prepare_to_store)
5532         (record_btrace_to_get_unwinder)
5533         (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
5534         (record_btrace_commit_resume, record_btrace_wait)
5535         (record_btrace_stop, record_btrace_can_execute_reverse)
5536         (record_btrace_stopped_by_sw_breakpoint)
5537         (record_btrace_supports_stopped_by_sw_breakpoint)
5538         (record_btrace_stopped_by_hw_breakpoint)
5539         (record_btrace_supports_stopped_by_hw_breakpoint)
5540         (record_btrace_update_thread_list, record_btrace_thread_alive)
5541         (record_btrace_goto_begin, record_btrace_goto_end)
5542         (record_btrace_goto, record_btrace_stop_replaying_all)
5543         (record_btrace_execution_direction)
5544         (record_btrace_prepare_to_generate_core)
5545         (record_btrace_done_generating_core): Refactor as
5546         record_btrace_target methods.
5547         (init_record_btrace_ops): Delete.
5548         (_initialize_record_btrace): Remove reference to
5549         init_record_btrace_ops.
5550         * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
5551         the execution_direction global.
5552         (record_full_base_target, record_full_target)
5553         (record_full_core_target): New classes.
5554         (record_full_ops): Now a record_full_target.
5555         (record_full_core_ops): Now a record_full_core_target.
5556         (record_full_target::detach, record_full_target::disconnect)
5557         (record_full_core_target::disconnect)
5558         (record_full_target::mourn_inferior, record_full_target::kill):
5559         New.
5560         (record_full_open, record_full_close, record_full_async): Refactor
5561         as methods of the record_full_base_target class.
5562         (record_full_resume, record_full_commit_resume): Refactor
5563         as methods of the record_full_target class.
5564         (record_full_wait, record_full_stopped_by_watchpoint)
5565         (record_full_stopped_data_address)
5566         (record_full_stopped_by_sw_breakpoint)
5567         (record_full_supports_stopped_by_sw_breakpoint)
5568         (record_full_stopped_by_hw_breakpoint)
5569         (record_full_supports_stopped_by_hw_breakpoint): Refactor as
5570         methods of the record_full_base_target class.
5571         (record_full_store_registers, record_full_xfer_partial)
5572         (record_full_insert_breakpoint, record_full_remove_breakpoint):
5573         Refactor as methods of the record_full_target class.
5574         (record_full_can_execute_reverse, record_full_get_bookmark)
5575         (record_full_goto_bookmark, record_full_execution_direction)
5576         (record_full_record_method, record_full_info, record_full_delete)
5577         (record_full_is_replaying, record_full_will_replay)
5578         (record_full_goto_begin, record_full_goto_end, record_full_goto)
5579         (record_full_stop_replaying): Refactor as methods of the
5580         record_full_base_target class.
5581         (record_full_core_resume, record_full_core_kill)
5582         (record_full_core_fetch_registers)
5583         (record_full_core_prepare_to_store)
5584         (record_full_core_store_registers, record_full_core_xfer_partial)
5585         (record_full_core_insert_breakpoint)
5586         (record_full_core_remove_breakpoint)
5587         (record_full_core_has_execution): Refactor
5588         as methods of the record_full_core_target class.
5589         (record_full_base_target::supports_delete_record): New.
5590         (init_record_full_ops): Delete.
5591         (init_record_full_core_ops): Delete.
5592         (record_full_save): Refactor as method of the
5593         record_full_base_target class.
5594         (_initialize_record_full): Remove references to
5595         init_record_full_ops and init_record_full_core_ops.
5596
5597         * remote.c (remote_target, extended_remote_target): New classes.
5598         (remote_ops): Now a remote_target.
5599         (extended_remote_ops): Now an extended_remote_target.
5600         (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
5601         (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
5602         (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
5603         (remote_pass_signals, remote_set_syscall_catchpoint)
5604         (remote_program_signals, )
5605         (remote_thread_always_alive): Remove target_ops parameter.
5606         (remote_thread_alive, remote_thread_name)
5607         (remote_update_thread_list, remote_threads_extra_info)
5608         (remote_static_tracepoint_marker_at)
5609         (remote_static_tracepoint_markers_by_strid)
5610         (remote_get_ada_task_ptid, remote_close, remote_start_remote)
5611         (remote_open): Refactor as methods of remote_target.
5612         (extended_remote_open, extended_remote_detach)
5613         (extended_remote_attach, extended_remote_post_attach):
5614         (extended_remote_supports_disable_randomization)
5615         (extended_remote_create_inferior): : Refactor as method of
5616         extended_remote_target.
5617         (remote_set_permissions, remote_open_1, remote_detach)
5618         (remote_follow_fork, remote_follow_exec, remote_disconnect)
5619         (remote_resume, remote_commit_resume, remote_stop)
5620         (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
5621         (remote_terminal_ours, remote_wait, remote_fetch_registers)
5622         (remote_prepare_to_store, remote_store_registers)
5623         (remote_flash_erase, remote_flash_done, remote_files_info)
5624         (remote_kill, remote_mourn, remote_insert_breakpoint)
5625         (remote_remove_breakpoint, remote_insert_watchpoint)
5626         (remote_watchpoint_addr_within_range)
5627         (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
5628         (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
5629         (remote_supports_stopped_by_sw_breakpoint)
5630         (remote_stopped_by_hw_breakpoint)
5631         (remote_supports_stopped_by_hw_breakpoint)
5632         (remote_stopped_by_watchpoint, remote_stopped_data_address)
5633         (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
5634         (remote_verify_memory): Refactor as methods of remote_target.
5635         (remote_write_qxfer, remote_read_qxfer): Remove target_ops
5636         parameter.
5637         (remote_xfer_partial, remote_get_memory_xfer_limit)
5638         (remote_search_memory, remote_rcmd, remote_memory_map)
5639         (remote_pid_to_str, remote_get_thread_local_address)
5640         (remote_get_tib_address, remote_read_description): Refactor as
5641         methods of remote_target.
5642         (remote_target::fileio_open, remote_target::fileio_pwrite)
5643         (remote_target::fileio_pread, remote_target::fileio_close): New.
5644         (remote_hostio_readlink, remote_hostio_fstat)
5645         (remote_filesystem_is_local, remote_can_execute_reverse)
5646         (remote_supports_non_stop, remote_supports_disable_randomization)
5647         (remote_supports_multi_process, remote_supports_cond_breakpoints)
5648         (remote_supports_enable_disable_tracepoint)
5649         (remote_supports_string_tracing)
5650         (remote_can_run_breakpoint_commands, remote_trace_init)
5651         (remote_download_tracepoint, remote_can_download_tracepoint)
5652         (remote_download_trace_state_variable, remote_enable_tracepoint)
5653         (remote_disable_tracepoint, remote_trace_set_readonly_regions)
5654         (remote_trace_start, remote_get_trace_status)
5655         (remote_get_tracepoint_status, remote_trace_stop)
5656         (remote_trace_find, remote_get_trace_state_variable_value)
5657         (remote_save_trace_data, remote_get_raw_trace_data)
5658         (remote_set_disconnected_tracing, remote_core_of_thread)
5659         (remote_set_circular_trace_buffer, remote_traceframe_info)
5660         (remote_get_min_fast_tracepoint_insn_len)
5661         (remote_set_trace_buffer_size, remote_set_trace_notes)
5662         (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
5663         (remote_disable_btrace, remote_teardown_btrace)
5664         (remote_read_btrace, remote_btrace_conf)
5665         (remote_augmented_libraries_svr4_read, remote_load)
5666         (remote_pid_to_exec_file, remote_can_do_single_step)
5667         (remote_execution_direction, remote_thread_handle_to_thread_info):
5668         Refactor as methods of remote_target.
5669         (init_remote_ops, init_extended_remote_ops): Delete.
5670         (remote_can_async_p, remote_is_async_p, remote_async)
5671         (remote_thread_events, remote_upload_tracepoints)
5672         (remote_upload_trace_state_variables): Refactor as methods of
5673         remote_target.
5674         (_initialize_remote): Remove references to init_remote_ops and
5675         init_extended_remote_ops.
5676
5677         * remote-sim.c (gdbsim_target): New class.
5678         (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
5679         (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
5680         (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
5681         (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
5682         (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
5683         (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
5684         Refactor as methods of gdbsim_target.
5685         (gdbsim_ops): Now a gdbsim_target.
5686         (init_gdbsim_ops): Delete.
5687         (gdbsim_cntrl_c): Adjust.
5688         (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
5689
5690         * amd64-linux-nat.c (amd64_linux_nat_target): New class.
5691         (the_amd64_linux_nat_target): New.
5692         (amd64_linux_fetch_inferior_registers)
5693         (amd64_linux_store_inferior_registers): Refactor as methods of
5694         amd64_linux_nat_target.
5695         (_initialize_amd64_linux_nat): Adjust.  Set linux_target.
5696         * i386-linux-nat.c: Don't include "linux-nat.h".
5697         (i386_linux_nat_target): New class.
5698         (the_i386_linux_nat_target): New.
5699         (i386_linux_fetch_inferior_registers)
5700         (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
5701         as methods of i386_linux_nat_target.
5702         (_initialize_i386_linux_nat): Adjust.  Set linux_target.
5703         * inf-child.c (inf_child_ops): Delete.
5704         (inf_child_fetch_inferior_registers)
5705         (inf_child_store_inferior_registers): Delete.
5706         (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
5707         methods of inf_child_target.
5708         (inf_child_target::supports_terminal_ours)
5709         (inf_child_target::terminal_init)
5710         (inf_child_target::terminal_inferior)
5711         (inf_child_target::terminal_ours_for_output)
5712         (inf_child_target::terminal_ours, inf_child_target::interrupt)
5713         (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
5714         New.
5715         (inf_child_open, inf_child_disconnect, inf_child_close)
5716         (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
5717         (inf_child_post_startup_inferior, inf_child_can_run)
5718         (inf_child_pid_to_exec_file): Refactor as methods of
5719         inf_child_target.
5720         (inf_child_follow_fork): Delete.
5721         (inf_child_target::can_create_inferior)
5722         (inf_child_target::can_attach): New.
5723         (inf_child_target::has_all_memory, inf_child_target::has_memory)
5724         (inf_child_target::has_stack, inf_child_target::has_registers)
5725         (inf_child_target::has_execution): New.
5726         (inf_child_fileio_open, inf_child_fileio_pwrite)
5727         (inf_child_fileio_pread, inf_child_fileio_fstat)
5728         (inf_child_fileio_close, inf_child_fileio_unlink)
5729         (inf_child_fileio_readlink, inf_child_use_agent)
5730         (inf_child_can_use_agent): Refactor as methods of
5731         inf_child_target.
5732         (return_zero, inf_child_target): Delete.
5733         (inf_child_target::inf_child_target): New.
5734         * inf-child.h: Include "target.h".
5735         (inf_child_target): Delete function prototype.
5736         (inf_child_target): New class.
5737         (inf_child_open_target, inf_child_mourn_inferior)
5738         (inf_child_maybe_unpush_target): Delete.
5739         * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
5740         (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
5741         (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
5742         (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
5743         (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
5744         (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
5745         (inf_ptrace_wait, inf_ptrace_xfer_partial)
5746         (inf_ptrace_thread_alive, inf_ptrace_files_info)
5747         (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
5748         methods of inf_ptrace_target.
5749         (inf_ptrace_target): Delete function.
5750         * inf-ptrace.h: Include "inf-child.h".
5751         (inf_ptrace_target): Delete function declaration.
5752         (inf_ptrace_target): New class.
5753         (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
5754         * linux-nat.c (linux_target): New.
5755         (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
5756         (linux_nat_target::~linux_nat_target): New.
5757         (linux_child_post_attach, linux_child_post_startup_inferior)
5758         (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
5759         (linux_child_remove_fork_catchpoint)
5760         (linux_child_insert_vfork_catchpoint)
5761         (linux_child_remove_vfork_catchpoint)
5762         (linux_child_insert_exec_catchpoint)
5763         (linux_child_remove_exec_catchpoint)
5764         (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
5765         (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
5766         (linux_nat_resume, linux_nat_stopped_by_watchpoint)
5767         (linux_nat_stopped_data_address)
5768         (linux_nat_stopped_by_sw_breakpoint)
5769         (linux_nat_supports_stopped_by_sw_breakpoint)
5770         (linux_nat_stopped_by_hw_breakpoint)
5771         (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
5772         (linux_nat_kill, linux_nat_mourn_inferior)
5773         (linux_nat_xfer_partial, linux_nat_thread_alive)
5774         (linux_nat_update_thread_list, linux_nat_pid_to_str)
5775         (linux_nat_thread_name, linux_child_pid_to_exec_file)
5776         (linux_child_static_tracepoint_markers_by_strid)
5777         (linux_nat_is_async_p, linux_nat_can_async_p)
5778         (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
5779         (linux_nat_supports_multi_process)
5780         (linux_nat_supports_disable_randomization, linux_nat_async)
5781         (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
5782         (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
5783         (linux_nat_fileio_open, linux_nat_fileio_readlink)
5784         (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
5785         methods of linux_nat_target.
5786         (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
5787         (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
5788         parameter.
5789         (check_stopped_by_watchpoint): Adjust.
5790         (linux_xfer_partial): Delete.
5791         (linux_target_install_ops, linux_target, linux_nat_add_target):
5792         Delete.
5793         (linux_nat_target::linux_nat_target): New.
5794         * linux-nat.h: Include "inf-ptrace.h".
5795         (linux_nat_target): New.
5796         (linux_target, linux_target_install_ops, linux_nat_add_target):
5797         Delete function declarations.
5798         (linux_target): Declare global.
5799         * linux-thread-db.c (thread_db_target): New.
5800         (thread_db_target::thread_db_target): New.
5801         (thread_db_ops): Delete.
5802         (the_thread_db_target): New.
5803         (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
5804         (thread_db_update_thread_list, thread_db_pid_to_str)
5805         (thread_db_extra_thread_info)
5806         (thread_db_thread_handle_to_thread_info)
5807         (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
5808         (thread_db_resume): Refactor as methods of thread_db_target.
5809         (init_thread_db_ops): Delete.
5810         (_initialize_thread_db): Remove reference to init_thread_db_ops.
5811         * x86-linux-nat.c: Don't include "linux-nat.h".
5812         (super_post_startup_inferior): Delete.
5813         (x86_linux_nat_target::~x86_linux_nat_target): New.
5814         (x86_linux_child_post_startup_inferior)
5815         (x86_linux_read_description, x86_linux_enable_btrace)
5816         (x86_linux_disable_btrace, x86_linux_teardown_btrace)
5817         (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
5818         methods of x86_linux_nat_target.
5819         (x86_linux_create_target): Delete.  Bits folded ...
5820         (x86_linux_add_target): ... here.  Now takes a linux_nat_target
5821         pointer.
5822         * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
5823         (x86_linux_nat_target): New class.
5824         (x86_linux_create_target): Delete.
5825         (x86_linux_add_target): Now takes a linux_nat_target pointer.
5826         * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
5827         (x86_region_ok_for_watchpoint, x86_stopped_data_address)
5828         (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
5829         (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
5830         (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
5831         make extern.
5832         (x86_use_watchpoints): Delete.
5833         * x86-nat.h: Include "breakpoint.h" and "target.h".
5834         (x86_use_watchpoints): Delete.
5835         (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
5836         (x86_stopped_by_watchpoint, x86_stopped_data_address)
5837         (x86_insert_watchpoint, x86_remove_watchpoint)
5838         (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
5839         (x86_stopped_by_hw_breakpoint): New declarations.
5840         (x86_nat_target): New template class.
5841
5842         * ppc-linux-nat.c (ppc_linux_nat_target): New class.
5843         (the_ppc_linux_nat_target): New.
5844         (ppc_linux_fetch_inferior_registers)
5845         (ppc_linux_can_use_hw_breakpoint)
5846         (ppc_linux_region_ok_for_hw_watchpoint)
5847         (ppc_linux_ranged_break_num_registers)
5848         (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
5849         (ppc_linux_insert_mask_watchpoint)
5850         (ppc_linux_remove_mask_watchpoint)
5851         (ppc_linux_can_accel_watchpoint_condition)
5852         (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
5853         (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
5854         (ppc_linux_watchpoint_addr_within_range)
5855         (ppc_linux_masked_watch_num_registers)
5856         (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
5857         (ppc_linux_read_description): Refactor as methods of
5858         ppc_linux_nat_target.
5859         (_initialize_ppc_linux_nat): Adjust.  Set linux_target.
5860
5861         * procfs.c (procfs_xfer_partial): Delete forward declaration.
5862         (procfs_target): New class.
5863         (the_procfs_target): New.
5864         (procfs_target): Delete function.
5865         (procfs_auxv_parse, procfs_attach, procfs_detach)
5866         (procfs_fetch_registers, procfs_store_registers, procfs_wait)
5867         (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
5868         (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
5869         (procfs_create_inferior, procfs_update_thread_list)
5870         (procfs_thread_alive, procfs_pid_to_str)
5871         (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
5872         (procfs_stopped_data_address, procfs_insert_watchpoint)
5873         (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
5874         (proc_find_memory_regions, procfs_info_proc)
5875         (procfs_make_note_section): Refactor as methods of procfs_target.
5876         (_initialize_procfs): Adjust.
5877         * sol-thread.c (sol_thread_target): New class.
5878         (sol_thread_ops): Now a sol_thread_target.
5879         (sol_thread_detach, sol_thread_resume, sol_thread_wait)
5880         (sol_thread_fetch_registers, sol_thread_store_registers)
5881         (sol_thread_xfer_partial, sol_thread_mourn_inferior)
5882         (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
5883         (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
5884         (init_sol_thread_ops): Delete.
5885         (_initialize_sol_thread): Adjust.  Remove references to
5886         init_sol_thread_ops and complete_target_initialization.
5887
5888         * windows-nat.c (windows_nat_target): New class.
5889         (windows_fetch_inferior_registers)
5890         (windows_store_inferior_registers, windows_resume, windows_wait)
5891         (windows_attach, windows_detach, windows_pid_to_exec_file)
5892         (windows_files_info, windows_create_inferior)
5893         (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
5894         (windows_close, windows_pid_to_str, windows_xfer_partial)
5895         (windows_get_tib_address, windows_get_ada_task_ptid)
5896         (windows_thread_name, windows_thread_alive): Refactor as
5897         windows_nat_target methods.
5898         (do_initial_windows_stuff): Adjust.
5899         (windows_target): Delete function.
5900         (_initialize_windows_nat): Adjust.
5901
5902         * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
5903         (darwin_mourn_inferior, darwin_kill_inferior)
5904         (darwin_create_inferior, darwin_attach, darwin_detach)
5905         (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
5906         (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
5907         (darwin_supports_multi_process): Refactor as darwin_nat_target
5908         methods.
5909         (darwin_resume_to, darwin_files_info): Delete.
5910         (_initialize_darwin_inferior): Rename to ...
5911         (_initialize_darwin_nat): ... this.  Adjust to C++ification.
5912         * darwin-nat.h: Include "inf-child.h".
5913         (darwin_nat_target): New class.
5914         (darwin_complete_target): Delete.
5915         * i386-darwin-nat.c (i386_darwin_nat_target): New class.
5916         (darwin_target): New.
5917         (i386_darwin_fetch_inferior_registers)
5918         (i386_darwin_store_inferior_registers): Refactor as methods of
5919         darwin_nat_target.
5920         (darwin_complete_target): Delete, with ...
5921         (_initialize_i386_darwin_nat): ... bits factored out here.
5922
5923         * alpha-linux-nat.c (alpha_linux_nat_target): New class.
5924         (the_alpha_linux_nat_target): New.
5925         (alpha_linux_register_u_offset): Refactor as
5926         alpha_linux_nat_target method.
5927         (_initialize_alpha_linux_nat): Adjust.
5928         * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
5929         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
5930         (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
5931         methods of linux_nat_trad_target.
5932         (linux_trad_target): Delete.
5933         * linux-nat-trad.h (linux_trad_target): Delete function.
5934         (linux_nat_trad_target): New class.
5935         * mips-linux-nat.c (mips_linux_nat_target): New class.
5936         (super_fetch_registers, super_store_registers, super_close):
5937         Delete.
5938         (the_mips_linux_nat_target): New.
5939         (mips64_linux_regsets_fetch_registers)
5940         (mips64_linux_regsets_store_registers)
5941         (mips64_linux_fetch_registers, mips64_linux_store_registers)
5942         (mips_linux_register_u_offset, mips_linux_read_description)
5943         (mips_linux_can_use_hw_breakpoint)
5944         (mips_linux_stopped_by_watchpoint)
5945         (mips_linux_stopped_data_address)
5946         (mips_linux_region_ok_for_hw_watchpoint)
5947         (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
5948         (mips_linux_close): Refactor as methods of mips_linux_nat.
5949         (_initialize_mips_linux_nat): Adjust to C++ification.
5950
5951         * aix-thread.c (aix_thread_target): New class.
5952         (aix_thread_ops): Now an aix_thread_target.
5953         (aix_thread_detach, aix_thread_resume, aix_thread_wait)
5954         (aix_thread_fetch_registers, aix_thread_store_registers)
5955         (aix_thread_xfer_partial, aix_thread_mourn_inferior)
5956         (aix_thread_thread_alive, aix_thread_pid_to_str)
5957         (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
5958         Refactor as methods of aix_thread_target.
5959         (init_aix_thread_ops): Delete.
5960         (_initialize_aix_thread): Remove references to init_aix_thread_ops
5961         and complete_target_initialization.
5962         * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
5963         (rs6000_nat_target): New class.
5964         (the_rs6000_nat_target): New.
5965         (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
5966         (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
5967         (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
5968         (super_create_inferior): Delete.
5969         (_initialize_rs6000_nat): Adjust to C++ification.
5970
5971         * arm-linux-nat.c (arm_linux_nat_target): New class.
5972         (the_arm_linux_nat_target): New.
5973         (arm_linux_fetch_inferior_registers)
5974         (arm_linux_store_inferior_registers, arm_linux_read_description)
5975         (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
5976         (arm_linux_remove_hw_breakpoint)
5977         (arm_linux_region_ok_for_hw_watchpoint)
5978         (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
5979         (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
5980         (arm_linux_watchpoint_addr_within_range): Refactor as methods of
5981         arm_linux_nat_target.
5982         (_initialize_arm_linux_nat): Adjust to C++ification.
5983
5984         * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
5985         (the_aarch64_linux_nat_target): New.
5986         (aarch64_linux_fetch_inferior_registers)
5987         (aarch64_linux_store_inferior_registers)
5988         (aarch64_linux_child_post_startup_inferior)
5989         (aarch64_linux_read_description)
5990         (aarch64_linux_can_use_hw_breakpoint)
5991         (aarch64_linux_insert_hw_breakpoint)
5992         (aarch64_linux_remove_hw_breakpoint)
5993         (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
5994         (aarch64_linux_region_ok_for_hw_watchpoint)
5995         (aarch64_linux_stopped_data_address)
5996         (aarch64_linux_stopped_by_watchpoint)
5997         (aarch64_linux_watchpoint_addr_within_range)
5998         (aarch64_linux_can_do_single_step): Refactor as methods of
5999         aarch64_linux_nat_target.
6000         (super_post_startup_inferior): Delete.
6001         (_initialize_aarch64_linux_nat): Adjust to C++ification.
6002
6003         * hppa-linux-nat.c (hppa_linux_nat_target): New class.
6004         (the_hppa_linux_nat_target): New.
6005         (hppa_linux_fetch_inferior_registers)
6006         (hppa_linux_store_inferior_registers): Refactor as methods of
6007         hppa_linux_nat_target.
6008         (_initialize_hppa_linux_nat): Adjust to C++ification.
6009
6010         * ia64-linux-nat.c (ia64_linux_nat_target): New class.
6011         (the_ia64_linux_nat_target): New.
6012         (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
6013         (ia64_linux_stopped_data_address)
6014         (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
6015         (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
6016         ia64_linux_nat_target methods.
6017         (super_xfer_partial): Delete.
6018         (_initialize_ia64_linux_nat): Adjust to C++ification.
6019
6020         * m32r-linux-nat.c (m32r_linux_nat_target): New class.
6021         (the_m32r_linux_nat_target): New.
6022         (m32r_linux_fetch_inferior_registers)
6023         (m32r_linux_store_inferior_registers): Refactor as
6024         m32r_linux_nat_target methods.
6025         (_initialize_m32r_linux_nat): Adjust to C++ification.
6026
6027         * m68k-linux-nat.c (m68k_linux_nat_target): New class.
6028         (the_m68k_linux_nat_target): New.
6029         (m68k_linux_fetch_inferior_registers)
6030         (m68k_linux_store_inferior_registers): Refactor as
6031         m68k_linux_nat_target methods.
6032         (_initialize_m68k_linux_nat): Adjust to C++ification.
6033
6034         * s390-linux-nat.c (s390_linux_nat_target): New class.
6035         (the_s390_linux_nat_target): New.
6036         (s390_linux_fetch_inferior_registers)
6037         (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
6038         (s390_insert_watchpoint, s390_remove_watchpoint)
6039         (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
6040         (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
6041         (s390_auxv_parse, s390_read_description): Refactor as methods of
6042         s390_linux_nat_target.
6043         (_initialize_s390_nat): Adjust to C++ification.
6044
6045         * sparc-linux-nat.c (sparc_linux_nat_target): New class.
6046         (the_sparc_linux_nat_target): New.
6047         (_initialize_sparc_linux_nat): Adjust to C++ification.
6048         * sparc-nat.c (sparc_fetch_inferior_registers)
6049         (sparc_store_inferior_registers): Remove target_ops parameter.
6050         * sparc-nat.h (sparc_fetch_inferior_registers)
6051         (sparc_store_inferior_registers): Remove target_ops parameter.
6052         * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
6053         (the_sparc64_linux_nat_target): New.
6054         (_initialize_sparc64_linux_nat): Adjust to C++ification.
6055
6056         * spu-linux-nat.c (spu_linux_nat_target): New class.
6057         (the_spu_linux_nat_target): New.
6058         (spu_child_post_startup_inferior, spu_child_post_attach)
6059         (spu_child_wait, spu_fetch_inferior_registers)
6060         (spu_store_inferior_registers, spu_xfer_partial)
6061         (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
6062         methods.
6063         (_initialize_spu_nat): Adjust to C++ification.
6064
6065         * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
6066         (the_tilegx_linux_nat_target): New.
6067         (fetch_inferior_registers, store_inferior_registers):
6068         Refactor as methods.
6069         (_initialize_tile_linux_nat): Adjust to C++ification.
6070
6071         * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
6072         (the_xtensa_linux_nat_target): New.
6073         (xtensa_linux_fetch_inferior_registers)
6074         (xtensa_linux_store_inferior_registers): Refactor as
6075         xtensa_linux_nat_target methods.
6076         (_initialize_xtensa_linux_nat): Adjust to C++ification.
6077
6078         * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
6079         (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
6080         (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
6081         (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
6082         (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
6083         (fbsd_stopped_by_sw_breakpoint)
6084         (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
6085         (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
6086         (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
6087         (fbsd_post_startup_inferior, fbsd_post_attach)
6088         (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
6089         (fbsd_set_syscall_catchpoint)
6090         (super_xfer_partial, super_resume, super_wait)
6091         (fbsd_supports_stopped_by_hw_breakpoint): Delete.
6092         (fbsd_handle_debug_trap): Remove target_ops parameter.
6093         (fbsd_nat_add_target): Delete.
6094         * fbsd-nat.h: Include "inf-ptrace.h".
6095         (fbsd_nat_add_target): Delete.
6096         (USE_SIGTRAP_SIGINFO): Define.
6097         (fbsd_nat_target): New class.
6098
6099         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
6100         (amd64bsd_store_inferior_registers): Remove target_ops parameter.
6101         (amd64bsd_target): Delete.
6102         * amd64-bsd-nat.h: New file.
6103         * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
6104         "x86-bsd-nat.h".
6105         (amd64_fbsd_nat_target): New class.
6106         (the_amd64_fbsd_nat_target): New.
6107         (amd64fbsd_read_description): Refactor as method of
6108         amd64_fbsd_nat_target.
6109         (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
6110         (_initialize_amd64fbsd_nat): Adjust to C++ification.
6111         * amd64-nat.h (amd64bsd_target): Delete function declaration.
6112         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
6113         (i386bsd_store_inferior_registers): Remove target_ops parameter.
6114         (i386bsd_target): Delete.
6115         * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
6116         (i386bsd_fetch_inferior_registers)
6117         (i386bsd_store_inferior_registers): Declare.
6118         (i386_bsd_nat_target): New class.
6119         * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
6120         (the_i386_fbsd_nat_target): New.
6121         (i386fbsd_resume, i386fbsd_read_description): Refactor as
6122         i386_fbsd_nat_target methods.
6123         (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
6124         (_initialize_i386fbsd_nat): Adjust to C++ification.
6125         * x86-bsd-nat.c (super_mourn_inferior): Delete.
6126         (x86bsd_mourn_inferior, x86bsd_target): Delete.
6127         (_initialize_x86_bsd_nat): Adjust to C++ification.
6128         * x86-bsd-nat.h: Include "x86-nat.h".
6129         (x86bsd_target): Delete declaration.
6130         (x86bsd_nat_target): New class.
6131
6132         * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
6133         (the_aarch64_fbsd_nat_target): New.
6134         (aarch64_fbsd_fetch_inferior_registers)
6135         (aarch64_fbsd_store_inferior_registers): Refactor as methods of
6136         aarch64_fbsd_nat_target.
6137         (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
6138         * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
6139         (the_alpha_bsd_nat_target): New.
6140         (alphabsd_fetch_inferior_registers)
6141         (alphabsd_store_inferior_registers): Refactor as
6142         alpha_bsd_nat_target methods.
6143         (_initialize_alphabsd_nat): Refactor as methods of
6144         alpha_bsd_nat_target.
6145         * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
6146         (the_amd64_nbsd_nat_target): New.
6147         (_initialize_amd64nbsd_nat): Adjust to C++ification.
6148         * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
6149         (the_amd64_obsd_nat_target): New.
6150         (_initialize_amd64obsd_nat): Adjust to C++ification.
6151         * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
6152         (the_arm_fbsd_nat_target): New.
6153         (arm_fbsd_fetch_inferior_registers)
6154         (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
6155         (_initialize_arm_fbsd_nat): Refactor as methods of
6156         arm_fbsd_nat_target.
6157         (_initialize_arm_fbsd_nat): Adjust to C++ification.
6158         * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
6159         (the_arm_netbsd_nat_target): New.
6160         (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
6161         arm_netbsd_nat_target.
6162         (_initialize_arm_netbsd_nat): Adjust to C++ification.
6163         * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
6164         (the_hppa_nbsd_nat_target): New.
6165         (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
6166         hppa_nbsd_nat_target methods.
6167         (_initialize_hppanbsd_nat): Adjust to C++ification.
6168         * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
6169         (the_hppa_obsd_nat_target): New.
6170         (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
6171         methods of hppa_obsd_nat_target.
6172         (_initialize_hppaobsd_nat): Adjust to C++ification.  Use
6173         add_target.
6174         * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
6175         (_initialize_i386nbsd_nat): Adjust to C++ification.  Use
6176         add_target.
6177         * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
6178         (_initialize_i386obsd_nat): Use add_target.
6179         * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
6180         (the_m68k_bsd_nat_target): New.
6181         (m68kbsd_fetch_inferior_registers)
6182         (m68kbsd_store_inferior_registers): Refactor as methods of
6183         m68k_bsd_nat_target.
6184         (_initialize_m68kbsd_nat): Adjust to C++ification.
6185         * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
6186         (the_mips_fbsd_nat_target): New.
6187         (mips_fbsd_fetch_inferior_registers)
6188         (mips_fbsd_store_inferior_registers): Refactor as methods of
6189         mips_fbsd_nat_target.
6190         (_initialize_mips_fbsd_nat): Adjust to C++ification.  Use
6191         add_target.
6192         * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
6193         (the_mips_nbsd_nat_target): New.
6194         (mipsnbsd_fetch_inferior_registers)
6195         (mipsnbsd_store_inferior_registers): Refactor as methods of
6196         mips_nbsd_nat_target.
6197         (_initialize_mipsnbsd_nat): Adjust to C++ification.
6198         * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
6199         (the_mips64_obsd_nat_target): New.
6200         (mips64obsd_fetch_inferior_registers)
6201         (mips64obsd_store_inferior_registers): Refactor as methods of
6202         mips64_obsd_nat_target.
6203         (_initialize_mips64obsd_nat): Adjust to C++ification.  Use
6204         add_target.
6205         * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
6206         nbsd_nat_target.
6207         * nbsd-nat.h: Include "inf-ptrace.h".
6208         (nbsd_nat_target): New class.
6209         * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
6210         (obsd_wait): Refactor as methods of obsd_nat_target.
6211         (obsd_add_target): Delete.
6212         * obsd-nat.h: Include "inf-ptrace.h".
6213         (obsd_nat_target): New class.
6214         * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
6215         (the_ppc_fbsd_nat_target): New.
6216         (ppcfbsd_fetch_inferior_registers)
6217         (ppcfbsd_store_inferior_registers): Refactor as methods of
6218         ppc_fbsd_nat_target.
6219         (_initialize_ppcfbsd_nat): Adjust to C++ification.  Use
6220         add_target.
6221         * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
6222         (the_ppc_nbsd_nat_target): New.
6223         (ppcnbsd_fetch_inferior_registers)
6224         (ppcnbsd_store_inferior_registers): Refactor as methods of
6225         ppc_nbsd_nat_target.
6226         (_initialize_ppcnbsd_nat): Adjust to C++ification.
6227         * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
6228         (the_ppc_obsd_nat_target): New.
6229         (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
6230         methods of ppc_obsd_nat_target.
6231         (_initialize_ppcobsd_nat): Adjust to C++ification.  Use
6232         add_target.
6233         * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
6234         (the_sh_nbsd_nat_target): New.
6235         (shnbsd_fetch_inferior_registers)
6236         (shnbsd_store_inferior_registers): Refactor as methods of
6237         sh_nbsd_nat_target.
6238         (_initialize_shnbsd_nat): Adjust to C++ification.
6239         * sparc-nat.c (sparc_xfer_wcookie): Make extern.
6240         (inf_ptrace_xfer_partial): Delete.
6241         (sparc_xfer_partial, sparc_target): Delete.
6242         * sparc-nat.h (sparc_fetch_inferior_registers)
6243         (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
6244         (sparc_target): Delete function declaration.
6245         (sparc_target): New template class.
6246         * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
6247         (_initialize_sparcnbsd_nat): Adjust to C++ification.
6248         * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
6249         (_initialize_sparc64fbsd_nat): Adjust to C++ification.  Use
6250         add_target.
6251         * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
6252         (_initialize_sparc64nbsd_nat): Adjust to C++ification.
6253         * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
6254         (_initialize_sparc64obsd_nat): Adjust to C++ification.  Use
6255         add_target.
6256         * vax-bsd-nat.c (vax_bsd_nat_target): New class.
6257         (the_vax_bsd_nat_target): New.
6258         (vaxbsd_fetch_inferior_registers)
6259         (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
6260         methods.
6261         (_initialize_vaxbsd_nat): Adjust to C++ification.
6262
6263         * bsd-kvm.c (bsd_kvm_target): New class.
6264         (bsd_kvm_ops): Now a bsd_kvm_target.
6265         (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
6266         (bsd_kvm_files_info, bsd_kvm_fetch_registers)
6267         (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
6268         bsd_kvm_target.
6269         (bsd_kvm_return_one): Delete.
6270         (bsd_kvm_add_target): Adjust to C++ification.
6271
6272         * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
6273         (nto_procfs_target_procfs): New classes.
6274         (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
6275         (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
6276         (procfs_post_attach, procfs_wait, procfs_fetch_registers)
6277         (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
6278         (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
6279         (procfs_remove_hw_breakpoint, procfs_resume)
6280         (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
6281         (procfs_kill_inferior, procfs_store_registers)
6282         (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
6283         as methods of nto_procfs_target.
6284         (nto_procfs_ops): Now an nto_procfs_target_procfs.
6285         (nto_native_ops): Delete.
6286         (procfs_open, procfs_native_open): Delete.
6287         (nto_native_ops): Now an nto_procfs_target_native.
6288         (init_procfs_targets): Adjust to C++ification.
6289         (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
6290         (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
6291         Refactor as methods of nto_procfs_target.
6292
6293         * go32-nat.c (go32_nat_target): New class.
6294         (the_go32_nat_target): New.
6295         (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
6296         (go32_store_registers, go32_xfer_partial, go32_files_info)
6297         (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
6298         (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
6299         (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
6300         (go32_pid_to_str): Refactor as methods of go32_nat_target.
6301         (go32_target): Delete.
6302         (_initialize_go32_nat): Adjust to C++ification.
6303
6304         * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
6305         (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
6306         (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
6307         (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
6308         gnu_nat_target.
6309         (gnu_target): Delete.
6310         * gnu-nat.h (gnu_target): Delete.
6311         (gnu_nat_target): New class.
6312         * i386-gnu-nat.c (gnu_base_target): New.
6313         (i386_gnu_nat_target): New class.
6314         (the_i386_gnu_nat_target): New.
6315         (_initialize_i386gnu_nat): Adjust to C++ification.
6316
6317 2018-05-02  Pedro Alves  <palves@redhat.com>
6318
6319         * bfd-target.c (target_bfd_xclose): Rename to ...
6320         (target_bfd_close): ... this.
6321         (target_bfd_reopen): Adjust.
6322         * target.c (target_close): Remove references to to_xclose.
6323         * target.h (target_ops::to_xclose): Delete.
6324         (target_ops::to_close): Update comments.
6325
6326 2018-05-02  Pedro Alves  <palves@redhat.com>
6327
6328         * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
6329         "linux-nat.h".
6330         * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
6331         * inf-ptrace.c (inf_ptrace_register_u_offset)
6332         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
6333         (inf_ptrace_store_register, inf_ptrace_store_registers)
6334         (inf_ptrace_trad_target): Move to ...
6335         * linux-nat-trad.c: ... this new file.
6336         * linux-nat-trad.h: New file.
6337         * linux-nat.c (linux_target_install_ops): Make extern.
6338         (linux_trad_target): Delete.
6339         * linux-nat.h (linux_trad_target): Delete declaration.
6340         (linux_target_install_ops): Declare.
6341         * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
6342         "linux-nat.h".
6343
6344 2018-05-02  Pedro Alves  <palves@redhat.com>
6345
6346         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
6347         procfs_target/add_target here.
6348         * procfs.c (procfs_target): Make static.
6349         (_initialize_procfs): Call add_target here.
6350         * procfs.h (struct target_ops): Remove forward declaration.
6351         (procfs_target): Remove declaration.
6352         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
6353
6354 2018-05-02  Pedro Alves  <palves@redhat.com>
6355
6356         * procfs.c (procfs_stopped_by_watchpoint)
6357         (procfs_insert_watchpoint, procfs_remove_watchpoint)
6358         (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
6359         Forward declare.
6360         (procfs_use_watchpoints): Delete, move contents...
6361         (procfs_target): ... here.
6362         * procfs.h (procfs_use_watchpoints): Delete declaration.
6363         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
6364         procfs_use_watchpoints.
6365         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
6366         procfs_use_watchpoints.
6367
6368 2018-05-02  Tom Tromey  <tom@tromey.com>
6369
6370         PR python/20084:
6371         * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
6372         and var_zuinteger_unlimited.
6373         * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
6374         and PARAM_ZUINTEGER_UNLIMITED.
6375         (set_parameter_value): Handle var_zuinteger and
6376         var_zuinteger_unlimited.
6377         (add_setshow_generic): Likewise.
6378         (parmpy_init): Likewise.
6379
6380 2018-04-28  Dan Robertson  <danlrobertson89@gmail.com>
6381
6382         PR rust/23124
6383         * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
6384         pointer is not null before dereferencing it.
6385
6386 2018-04-30  Tom Tromey  <tom@tromey.com>
6387
6388         * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
6389         is_mi_like_p.
6390
6391 2018-04-30  Tom Tromey  <tom@tromey.com>
6392
6393         * breakpoint.c (mention): Remove use of is_mi_like_p.
6394         (print_mention_ranged_breakpoint): Likewise.
6395         * break-catch-throw.c (print_it_exception_catchpoint): Remove use
6396         of is_mi_like_p.
6397
6398 2018-04-30  Tom Tromey  <tom@tromey.com>
6399
6400         * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
6401
6402 2018-04-30  Tom Tromey  <tom@tromey.com>
6403
6404         * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
6405         (info_spu_event_command): Remove some uses of is_mi_like_p.
6406
6407 2018-04-30  Tom Tromey  <tom@tromey.com>
6408
6409         * python/py-framefilter.c (py_print_single_arg)
6410         (enumerate_locals, py_print_args, py_print_frame): Remove some
6411         uses of is_mi_like_p.
6412
6413 2018-04-30  Tom Tromey  <tom@tromey.com>
6414
6415         * ui-out.c: Update.
6416         * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
6417         * ui-out.h (ui_out::is_mi_like_p): Now const.
6418         (ui_out::do_is_mi_like_p): Now const.
6419         * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
6420
6421 2018-04-30  Tom Tromey  <tom@tromey.com>
6422
6423         * varobj.c (varobj_set_visualizer): Use new_reference.
6424         * python/python.c (gdbpy_decode_line): Use new_reference.
6425         * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
6426         new_reference.
6427
6428 2018-04-30  Tom Tromey  <tom@tromey.com>
6429
6430         * varobj.c (install_new_value): Use new_reference.
6431         * value.h (value_incref): Return void.  Swap intro comment with
6432         value_decref.
6433         * value.c (set_value_parent): Use new_reference.
6434         (value_incref): Return void.  Update intro comment.
6435         (release_value): Use new_reference.
6436         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
6437
6438 2018-04-30  Tom Tromey  <tom@tromey.com>
6439
6440         * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
6441         * gdb_bfd.h (new_bfd_ref): Remove.
6442         (gdb_bfd_open): Update comment.
6443         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
6444         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
6445         (gdb_bfd_fdopenr): Use new_reference.
6446         * exec.c (exec_file_attach): Use new_reference.
6447
6448 2018-04-30  Tom Tromey  <tom@tromey.com>
6449
6450         * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
6451         method.
6452
6453 2018-04-30  Tom Tromey  <tom@tromey.com>
6454
6455         * jit.c (jit_read_code_entry): Use type_align.
6456         * i386-tdep.c (i386_gdbarch_init): Don't call
6457         set_gdbarch_long_long_align_bit.
6458         * gdbarch.sh: Remove long_long_align_bit.
6459         * gdbarch.c, gdbarch.h: Rebuild.
6460         * arc-tdep.c (arc_type_align): New function.
6461         (arc_gdbarch_init): Use arc_type_align.  Don't call
6462         set_gdbarch_long_long_align_bit.
6463
6464 2018-04-30  Tom Tromey  <tom@tromey.com>
6465
6466         * rust-lang.c (rust_type_alignment): Remove.
6467         (rust_composite_type): Use type_align.
6468
6469 2018-04-30  Tom Tromey  <tom@tromey.com>
6470
6471         * NEWS: Mention Type.align.
6472         * python/py-type.c (typy_get_alignof): New function.
6473         (type_object_getset): Add "alignof".
6474
6475 2018-04-30  Tom Tromey  <tom@tromey.com>
6476
6477         PR exp/17095:
6478         * NEWS: Update.
6479         * std-operator.def (UNOP_ALIGNOF): New operator.
6480         * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
6481         New.
6482         * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
6483         * c-lang.c (c_op_print_tab): Add alignof.
6484         * c-exp.y (ALIGNOF): New token.
6485         (exp): Add "ALIGNOF" production.
6486         (ident_tokens): Add _Alignof and alignof.
6487
6488 2018-04-30  Tom Tromey  <tom@tromey.com>
6489
6490         * i386-tdep.c (i386_type_align): New function.
6491         (i386_gdbarch_init): Update.
6492         * gdbarch.sh (type_align): New method.
6493         * gdbarch.c, gdbarch.h: Rebuild.
6494         * arch-utils.h (default_type_align): Declare.
6495         * arch-utils.c (default_type_align): New function.
6496         * gdbtypes.h (TYPE_ALIGN_BITS): New define.
6497         (struct type) <align_log2>: New field.
6498         <instance_flags>: Now a bitfield.
6499         (TYPE_RAW_ALIGN): New macro.
6500         (type_align, type_raw_align, set_type_align): Declare.
6501         * gdbtypes.c (type_align, type_raw_align, set_type_align): New
6502         functions.
6503         * dwarf2read.c (quirk_rust_enum): Set type alignment.
6504         (get_alignment, maybe_set_alignment): New functions.
6505         (read_structure_type, read_enumeration_type, read_array_type)
6506         (read_set_type, read_tag_pointer_type, read_tag_reference_type)
6507         (read_subrange_type, read_base_type): Set type alignment.
6508
6509 2018-04-30  Simon Marchi  <simon.marchi@ericsson.com>
6510
6511         * dwarf2read.c (read_index_from_section): Use bool.
6512
6513 2018-04-29  Fabian Groffen  <grobian@gentoo.org>
6514
6515         PR gdb/22950
6516         * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
6517         with #ifdef.
6518
6519 2018-04-29  John Reiser  <jreiser@BitWagon.com>
6520
6521         PR build/22873
6522         * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
6523         last step, and do it atomically.
6524
6525 2018-04-27  Alexandre Oliva  <aoliva@redhat.com>
6526
6527         * compile/compile-c-types.c (convert_int, convert_float):
6528         Update for C FE v1.
6529
6530 2018-04-27  Tom Tromey  <tom@tromey.com>
6531
6532         PR rust/22545:
6533         * rust-lang.c (rust_inclusive_range_type_p): New function.
6534         (rust_range): Handle inclusive ranges.
6535         (rust_compute_range): Likewise.
6536         * rust-exp.y (struct rust_op) <inclusive>: New field.
6537         (DOTDOTEQ): New constant.
6538         (range_expr): Add "..=" productions.
6539         (operator_tokens): Add "..=" token.
6540         (ast_range): Add "inclusive" parameter.
6541         (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
6542         ranges.
6543         * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
6544         bounds values.
6545         * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
6546         LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
6547         Update comments.
6548         * expprint.c (print_subexp_standard): Handle new bounds values.
6549         (dump_subexp_body_standard): Likewise.
6550
6551 2018-04-27  Tom Tromey  <tom@tromey.com>
6552
6553         * configure: Rebuild.
6554         * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
6555         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
6556         "OVERRIDE".
6557         (class symbol_needs_eval_context): Likewise.
6558         * dwarf2read.c (mock_mapped_index::symbol_name_count)
6559         (mock_mapped_index::symbol_name_at): Use "override".  Remove
6560         "virtual".
6561         * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
6562         "override".
6563         (class dwarf_expr_executor): Use "override", not "OVERRIDE".
6564         * aarch64-tdep.c (instruction_reader::read): Use "override".
6565         (instruction_reader_test::read): Likewise.
6566         * arm-tdep.c (instruction_reader::read): Use "override".
6567         (instruction_reader_thumb::read): Likewise.
6568
6569 2018-04-26  Andrzej Kaczmarek  <andrzej.kaczmarek@codecoup.pl>
6570
6571         PR remote/9665
6572         * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
6573         instead of remote_send.
6574         (remote_send): Remove.
6575
6576 2018-04-26  Pedro Alves  <palves@redhat.com>
6577
6578         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
6579         find_function_start_sal instead of find_pc_line.
6580
6581 2018-04-26  Pedro Alves  <palves@redhat.com>
6582
6583         * breakpoint.c (set_breakpoint_location_function): Handle
6584         mst_data_gnu_ifunc.
6585         * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
6586         * elfread.c (elf_symtab_read): Give data symbols with
6587         BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
6588         (elf_rel_plt_read): Update comment.
6589         * linespec.c (convert_linespec_to_sals): Handle
6590         mst_data_gnu_ifunc.
6591         (minsym_found): Handle mst_data_gnu_ifunc.
6592         * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
6593         (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
6594         * parse.c (find_minsym_type_and_address): Handle
6595         mst_data_gnu_ifunc.
6596         * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
6597         * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
6598         * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
6599         comment.
6600         <mst_data_gnu_ifunc>: New enumerator.
6601
6602 2018-04-26  Pedro Alves  <palves@redhat.com>
6603
6604         * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
6605         (lookup_minimal_symbol_by_pc_section): ... this.  Replace
6606         'want_trampoline' parameter by a lookup_msym_prefer parameter.
6607         Handle it.
6608         (lookup_minimal_symbol_by_pc_section): Delete old implementation.
6609         (lookup_minimal_symbol_by_pc): Adjust.
6610         (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
6611         (lookup_solib_trampoline_symbol_by_pc): Adjust.
6612         * minsyms.h (lookup_msym_prefer): New enum.
6613         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
6614         parameter by a lookup_msym_prefer parameter.
6615
6616 2018-04-26  Pedro Alves  <palves@redhat.com>
6617
6618         * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
6619         ends in "@plt" instead of looking at the symbol's section.
6620
6621 2018-04-26  Pedro Alves  <palves@redhat.com>
6622
6623         * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete.  Remove
6624         all references.
6625         (find_pc_partial_function_gnu_ifunc): Rename to ...
6626         (find_pc_partial_function): ... this, and remove references to
6627         'is_gnu_ifunc_p'.
6628         (find_pc_partial_function): Delete old implementation.
6629         * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
6630
6631 2018-04-26  Pedro Alves  <palves@redhat.com>
6632
6633         * linespec.c (struct bound_minimal_symbol_search_key): New.
6634         (convert_linespec_to_sals): Sort minimal symbols earlier.  Don't
6635         skip first line if we found a GNU ifunc minimal symbol by name.
6636         (compare_msymbols): Change parameters to work with a destructured
6637         lhs minsym.
6638         (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
6639         functions.
6640
6641 2018-04-26  Pedro Alves  <palves@redhat.com>
6642
6643         * breakpoint.c (set_breakpoint_location_function): Don't resolve
6644         ifunc targets here.  Instead, if we have an ifunc minsym, use its
6645         address/name.
6646         (add_location_to_breakpoint): Store the minsym and the objfile in
6647         the breakpoint location.
6648         * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
6649         * linespec.c (minsym_found): Resolve GNU ifunc targets here.
6650         Record the minsym in the sal.
6651         * symtab.h (symtab_and_line) <msymbol>: New field.
6652
6653 2018-04-26  Pedro Alves  <palves@redhat.com>
6654
6655         * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
6656         unless we actually resolved the ifunc.
6657
6658 2018-04-26  Pedro Alves  <palves@redhat.com>
6659
6660         * c-exp.y (variable production): Prefer ifunc minsyms over
6661         regular function symbols.
6662         * symtab.c (find_gnu_ifunc): New function.
6663         * minsyms.h (lookup_msym_prefer): New enum.
6664         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
6665         parameter by a lookup_msym_prefer parameter.
6666         * symtab.h (find_gnu_ifunc): New declaration.
6667
6668 2018-04-26  Pedro Alves  <palves@redhat.com>
6669
6670         * blockframe.c (find_gnu_ifunc_target_type): New function.
6671         (find_function_type): New.
6672         * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
6673         return a value with a memory address.
6674         (eval_call): For calls to GNU ifunc functions, try to find the
6675         type of the target function from the type that the resolver
6676         returns.
6677         * gdbtypes.c (objfile_type): Don't install a return type for ifunc
6678         symbols.
6679         * infcall.c (find_function_return_type): Delete.
6680         (find_function_addr): Add 'function_type' parameter.  For calls to
6681         GNU ifunc functions, try to find the type of the target function
6682         from the type that the resolver returns, and return it via
6683         FUNCTION_TYPE.
6684         (call_function_by_hand_dummy): Adjust to use the function type
6685         returned by find_function_addr.
6686         (find_function_addr): Add 'function_type' parameter and move
6687         description here.
6688         * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
6689         declarations.
6690
6691 2018-04-26  Pedro Alves  <palves@redhat.com>
6692
6693         * c-exp.y (variable production): Skip finding an alias for ifunc
6694         symbols.
6695
6696 2018-04-26  Pedro Alves  <palves@redhat.com>
6697
6698         * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
6699
6700 2018-04-25  Pedro Alves  <palves@redhat.com>
6701
6702         * infcmd.c (kill_command): Print the pid as string, not the whole
6703         thread's ptid.  Add comment.  s/has been killed/killed/ in output
6704         message.
6705         * remote.c (remote_detach_1): Print the pid as string, not the
6706         whole thread's ptid.
6707
6708 2018-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
6709             Sergio Durigan Junior  <sergiodj@redhat.com>
6710             Pedro Alves  <palves@redhat.com>
6711
6712         * infcmd.c (kill_command): Print message when inferior has
6713         been killed.
6714         * inferior.c (print_inferior_events): Remove 'static'.  Set as
6715         '1'.
6716         (add_inferior): Improve message printed when
6717         'print_inferior_events' is on.
6718         (exit_inferior): Remove message printed when
6719         'print_inferior_events' is on.
6720         (detach_inferior): Improve message printed when
6721         'print_inferior_events' is on.
6722         (initialize_inferiors): Use 'add_inferior_silent' to set
6723         'current_inferior_'.
6724         * inferior.h (print_inferior_events): Declare here as
6725         'extern'.
6726         * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
6727         '[Detaching...]' messages when 'print_inferior_events' is on.
6728         Use 'add_thread_silent' instead of 'add_thread'.  Add '[' and ']'
6729         as prefix/suffix for messages.  Remove periods.  Fix erroneous
6730         'Detaching after fork from child...', replace it by '... from
6731         parent...'.
6732         (handle_vfork_child_exec_or_exit): Add '[' and ']' as
6733         prefix/suffix when printing 'Detaching...' messages.  Print
6734         them when 'print_inferior_events' is on.
6735         * remote.c (remote_detach_1): Print message when detaching
6736         from inferior and '!is_fork_parent'.
6737
6738 2018-04-24  Tom Tromey  <tom@tromey.com>
6739
6740         * cli-out.h: Reindent.
6741
6742 2018-04-24  Tom Tromey  <tom@tromey.com>
6743
6744         * cli-out.c (cli_ui_out::out_field_fmt): Remove.
6745         (cli_ui_out::do_field_string): Use fputs_filtered.
6746         * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
6747
6748 2018-04-23  Tom Tromey  <tom@tromey.com>
6749
6750         * guile/scm-frame.c (gdbscm_frame_read_var): Use
6751         gdb::unique_xmalloc_ptr.
6752
6753 2018-04-23  Tom Tromey  <tom@tromey.com>
6754
6755         * configure: Rebuild.
6756
6757 2018-04-22  Rajendra SY  <rajendra.sy@gmail.com>
6758
6759         PR gdb/23095
6760         * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
6761         prepare_for_testing.  Set normal_bp to r_debug_state if target
6762         is bsd.
6763
6764 2018-04-21  Pedro Alves  <palves@redhat.com>
6765             Rajendra SY  <rajendra.sy@gmail.com>
6766
6767         * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
6768         * remote.c (extended_remote_attach): In all-stop mode, mark the
6769         thread as executing.
6770
6771 2018-04-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6772
6773         * thread.c (thread_apply_all_command): Fix comment.
6774         (thread_command): Fix comment.
6775
6776 2018-04-10  Alan Hayward  <alan.hayward@arm.com>
6777
6778         * common/tdesc.h (tdesc_create_feature): Remove xml filename
6779         parameter.
6780         * features/aarch64-core.c (create_feature_aarch64_core):
6781         Regenerate.
6782         * features/aarch64-fpu.c (create_feature_aarch64_fpu):
6783         Likewise.
6784         * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
6785         Likewise.
6786         * features/i386/32bit-avx512.c
6787         (create_feature_i386_32bit_avx512): Likewise.
6788         * features/i386/32bit-core.c (create_feature_i386_32bit_core):
6789         Likewise.
6790         * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
6791         Likewise.
6792         * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
6793         Likewise.
6794         * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
6795         Likewise.
6796         * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
6797         Likewise.
6798         * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
6799         Likewise.
6800         * features/i386/64bit-avx512.c
6801         (create_feature_i386_64bit_avx512): Likewise.
6802         * features/i386/64bit-core.c (create_feature_i386_64bit_core):
6803         Likewise.
6804         * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
6805         Likewise.
6806         * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
6807         Likewise.
6808         * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
6809         Likewise.
6810         * features/i386/64bit-segments.c
6811         (create_feature_i386_64bit_segments): Likewise.
6812         * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
6813         Likewise.
6814         * features/i386/x32-core.c
6815         (create_feature_i386_x32_core): Likewise.
6816         * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
6817         * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
6818         * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
6819         * target-descriptions.c: In generated code, don't pass xml
6820         filename.
6821
6822 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
6823
6824         * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
6825         (print_xml_feature::visit_post): Likewise.
6826         (print_xml_feature::visit): Likewise.
6827         * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
6828         (print_xml_feature): Add new class.
6829         * regformats/regdat.sh: Null xmltarget on feature targets.
6830         * target-descriptions.c (struct target_desc): Add xmltarget.
6831         (maintenance_check_tdesc_xml_convert): Add unittest function.
6832         (tdesc_get_features_xml): Add function to get xml.
6833         (maintenance_check_xml_descriptions): Test xml generation.
6834         * xml-tdesc.c (string_read_description_xml): Add function.
6835         * xml-tdesc.h (string_read_description_xml): Add declaration.
6836
6837 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
6838
6839         * features/Makefile: Add feature marker to targets with new style
6840         target descriptions.
6841         * regformats/aarch64.dat: Regenerate.
6842         * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
6843         * regformats/i386/amd64-avx-linux.dat: Likewise.
6844         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
6845         * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
6846         * regformats/i386/amd64-linux.dat: Likewise.
6847         * regformats/i386/amd64-mpx-linux.dat: Likewise.
6848         * regformats/i386/amd64.dat: Likewise.
6849         * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
6850         * regformats/i386/i386-avx-linux.dat: Likewise.
6851         * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
6852         * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
6853         * regformats/i386/i386-linux.dat: Likewise.
6854         * regformats/i386/i386-mmx-linux.dat: Likewise.
6855         * regformats/i386/i386-mpx-linux.dat: Likewise.
6856         * regformats/i386/i386.dat: Likewise.
6857         * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
6858         * regformats/i386/x32-avx-linux.dat: Likewise.
6859         * regformats/i386/x32-linux.dat: Likewise.
6860         * regformats/tic6x-c62x-linux.dat: Likewise.
6861         * regformats/tic6x-c64x-linux.dat: Likewise.
6862         * regformats/tic6x-c64xp-linux.dat: Likewise.
6863         * regformats/regdat.sh: Parse feature marker.
6864
6865 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
6866
6867         * common/tdesc.h (tdesc_architecture_name): Add new declaration.
6868         (tdesc_osabi_name): Likewise.
6869         * target-descriptions.c (tdesc_architecture_name): Add new
6870         function.
6871         (tdesc_osabi_name): Likewise.
6872
6873 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
6874
6875         * common/tdesc.c (tdesc_predefined_type): Move to here.
6876         (tdesc_named_type): Likewise.
6877         (tdesc_create_vector): Likewise.
6878         (tdesc_create_struct): Likewise.
6879         (tdesc_set_struct_size): Likewise.
6880         (tdesc_create_union): Likewise.
6881         (tdesc_create_flags): Likewise.
6882         (tdesc_create_enum): Likewise.
6883         (tdesc_add_field): Likewise.
6884         (tdesc_add_typed_bitfield): Likewise.
6885         (tdesc_add_bitfield): Likewise.
6886         (tdesc_add_flag): Likewise.
6887         (tdesc_add_enum_value): Likewise.
6888         * common/tdesc.h (struct tdesc_type_builtin): Likewise.
6889         (struct tdesc_type_vector): Likewise.
6890         (struct tdesc_type_field): Likewise.
6891         (struct tdesc_type_with_fields): Likewise.
6892         (tdesc_create_enum): Add declaration.
6893         (tdesc_add_typed_bitfield): Likewise.
6894         (tdesc_add_enum_value): Likewise.
6895         * target-descriptions.c (tdesc_type_field): Move from here.
6896         (tdesc_type_builtin): Likewise.
6897         (tdesc_type_vector): Likewise.
6898         (tdesc_type_with_fields): Likewise.
6899         (tdesc_predefined_types): Likewise.
6900         (tdesc_named_type): Likewise.
6901         (tdesc_create_vector): Likewise.
6902         (tdesc_create_struct): Likewise.
6903         (tdesc_set_struct_size): Likewise.
6904         (tdesc_create_union): Likewise.
6905         (tdesc_create_flags): Likewise.
6906         (tdesc_create_enum): Likewise.
6907         (tdesc_add_field): Likewise.
6908         (tdesc_add_typed_bitfield): Likewise.
6909         (tdesc_add_bitfield): Likewise.
6910         (tdesc_add_flag): Likewise.
6911         (tdesc_add_enum_value): Likewise.
6912         * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
6913         (tdesc_add_typed_bitfield): Likewise.
6914         (tdesc_add_enum_value): Likewise.
6915
6916 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
6917
6918         * common/tdesc.c (tdesc_feature::accept): Move to here.
6919         (tdesc_feature::operator==): Likewise.
6920         (tdesc_create_reg): Likewise.
6921         * common/tdesc.h (tdesc_type_kind): Likewise.
6922         (struct tdesc_type): Likewise.
6923         (struct tdesc_feature): Likewise.
6924         * regformats/regdat.sh: Create a feature.
6925         * target-descriptions.c (tdesc_type_kind): Move from here.
6926         (tdesc_type): Likewise.
6927         (tdesc_type_up): Likewise.
6928         (tdesc_feature): Likewise.
6929         (tdesc_create_reg): Likewise.
6930
6931 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
6932
6933         * Makefile.in: Add arch/tdesc.c
6934         * common/tdesc.c: New file.
6935         * common/tdesc.h (tdesc_element_visitor): Move to here.
6936         (tdesc_element): Likewise.
6937         (tdesc_reg): Likewise.
6938         (tdesc_reg_up): Likewise.
6939         * regformats/regdef.h (reg): Add offset to constructors.
6940         * target-descriptions.c (tdesc_element_visitor): Move from here.
6941         (tdesc_element): Likewise.
6942         (tdesc_reg): Likewise.
6943         (tdesc_reg_up): Likewise.
6944
6945 2018-04-17  Tom Tromey  <tom@tromey.com>
6946
6947         * dwarf2read.c (quirk_rust_enum): Conditionally drop the
6948         discriminant field.
6949
6950 2018-04-17  Tom Tromey  <tom@tromey.com>
6951
6952         * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
6953
6954 2018-04-17  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6955
6956         * symtab.c (print_symbol_info): Skip printing filename and line
6957         number when `last' is NULL.
6958         (symtab_symbol_info): Use empty string instead of NULL for first
6959         invocation of print_symbol_info.
6960         (rbreak_command): Pass NULL to `last' parameter of
6961         print_symbol_info.
6962
6963 2018-04-16  Simon Marchi  <simon.marchi@ericsson.com>
6964
6965         * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
6966         instead of nullptr.
6967
6968 2018-04-16  Pedro Alves  <palves@redhat.com>
6969
6970         * MAINTAINERS (sh): Remove.
6971         * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
6972         (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
6973         (ALLDEPFILES): Remove sh64-tdep.c.
6974         * NEWS: Mentions that support for SH-5/SH64 is removed.
6975         * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
6976         (sh*-*-openbsd*): Ditto.
6977         (sh64-*-elf*): Remove.
6978         (sh*): Remove.
6979         * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
6980         * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
6981         * sh-tdep.c: No longer include "sh64-tdep.h".
6982         (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
6983         * sh64-tdep.c, sh64-tdep.h: Remove files.
6984
6985 2018-04-16  Pedro Alves  <palves@redhat.com>
6986
6987         * MAINTAINERS: Remove m88k.
6988         * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
6989         (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
6990         (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
6991         * NEWS: Mention that support for m88k was removed.
6992         * configure.host (m88*-*-*): Remove support.
6993         * configure.nat (m88k-*-*): Remove support.
6994         * configure.tgt (m88*-*-openbsd*): Remove.
6995         * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
6996
6997 2018-04-15  Simon Marchi  <simon.marchi@polymtl.ca>
6998
6999         * configure.tgt (x86_tobjs): New variable.
7000         (amd64_tobjs, i386_tobjs): Use it.
7001
7002 2018-04-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7003
7004         * symtab.c (print_symbol_info): Precede the symbol definition by
7005         the line number when available.
7006         * NEWS: Advertise this enhancement.
7007
7008 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
7009
7010         * NEWS (New options): announce set/show record btrace cpu.
7011         * btrace.c: Include record-btrace.h.
7012         (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
7013         the vendor is unknown.
7014         (btrace_compute_ftrace_1): Add cpu parameter.  Update callers.
7015         Maybe overwrite the btrace configuration's cpu.
7016         (btrace_compute_ftrace): Add cpu parameter.  Update callers.
7017         (btrace_fetch): Add cpu parameter.  Update callers.
7018         (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
7019         Maybe overwrite the btrace configuration's cpu.  Skip enabling
7020         errata workarounds if the vendor is unknown.
7021         * python/py-record-btrace.c: Include record-btrace.h.
7022         (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
7023         (recpy_bt_function_call_history): Call record_btrace_get_cpu.
7024         * record-btrace.c (record_btrace_cpu_state_kind): New.
7025         (record_btrace_cpu): New.
7026         (set_record_btrace_cpu_cmdlist): New.
7027         (record_btrace_get_cpu): New.
7028         (require_btrace_thread, record_btrace_info)
7029         (record_btrace_resume_thread): Call record_btrace_get_cpu.
7030         (cmd_set_record_btrace_cpu_none): New.
7031         (cmd_set_record_btrace_cpu_auto): New.
7032         (cmd_set_record_btrace_cpu): New.
7033         (cmd_show_record_btrace_cpu): New.
7034         (_initialize_record_btrace): Initialize set/show record btrace cpu
7035         commands.
7036         * record-btrace.h (record_btrace_get_cpu): New.
7037
7038 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
7039
7040         * record.c (set_record_command): Fix typo in message.
7041
7042 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
7043
7044         * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
7045
7046 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
7047
7048         * infrun.c (process_event_stop_test): Call
7049         gdbarch_in_indirect_branch_thunk.
7050         * gdbarch.sh (in_indirect_branch_thunk): New.
7051         * gdbarch.c: Regenerated.
7052         * gdbarch.h: Regenerated.
7053         * x86-tdep.h: New.
7054         * x86-tdep.c: New.
7055         * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
7056         (HFILES_NO_SRCDIR): Add x86-tdep.h.
7057         (ALLDEPFILES): Add x86-tdep.c.
7058         * arch-utils.h (default_in_indirect_branch_thunk): New.
7059         * arch-utils.c (default_in_indirect_branch_thunk): New.
7060         * i386-tdep: Include x86-tdep.h.
7061         (i386_in_indirect_branch_thunk): New.
7062         (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
7063         function.
7064         * amd64-tdep: Include x86-tdep.h.
7065         (amd64_in_indirect_branch_thunk): New.
7066         (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
7067
7068 2018-04-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
7069
7070         PR gdb/23053
7071         * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
7072         (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
7073         (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
7074         regression.
7075
7076 2018-04-12  Tom Tromey  <tom@tromey.com>
7077
7078         * rust-lang.c (rust_print_struct_def): Remove univariant code.
7079         (rust_evaluate_subexp): Likewise.
7080
7081 2018-04-12  Pedro Alves  <palves@redhat.com>
7082
7083         * procfs.c (procfs_detach): Make forward declaration's prototype
7084         match definition's protototype.
7085         (proc_get_LDT_entry): Remove stale do_cleanups call.
7086
7087 2018-04-12  Pedro Alves  <palves@redhat.com>
7088
7089         * target.h (target_ops::to_has_exited): Delete.
7090         (target_has_exited): Delete.
7091         * target-delegates.c: Regenerate.
7092
7093 2018-04-11  Pedro Alves  <palves@redhat.com>
7094
7095         * target.c (fileio_fh_t::t): Add comment.
7096         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
7097         (target_fileio_close): Handle a NULL target.
7098         (invalidate_fileio_fh): New.
7099         (target_close): Call it.
7100         * remote.c (remote_hostio_send_command): No longer check whether
7101         remote_desc is open.
7102
7103 2018-04-11  Pedro Alves  <palves@redhat.com>
7104
7105         * target.c (fileio_fh_t): Make it a named struct instead of a
7106         typedef.
7107         (fileio_fh_t::is_closed): New method.
7108         (DEF_VEC_O (fileio_fh_t)): Remove.
7109         (fileio_fhandles): Now a std::vector.
7110         (is_closed_fileio_fh): Delete.
7111         (acquire_fileio_fd): Adjust.  Rename parameters.
7112         (release_fileio_fd): Adjust.
7113         (fileio_fd_to_fh): Reimplement as a function instead of a macro.
7114         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
7115         (target_fileio_close): Adjust.
7116
7117 2018-04-10  Simon Marchi  <simon.marchi@ericsson.com>
7118
7119         * auto-load.c (auto_load_safe_path_vec_update): Iterate by
7120         index.
7121
7122 2018-04-10  Pedro Alves  <palves@redhat.com>
7123
7124         * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
7125         (scoped_finish_thread_state): New class.
7126         * infcmd.c (run_command_1): Use it instead of finish_thread_state
7127         cleanup.
7128         * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
7129         (fetch_inferior_event, normal_stop): Likewise.
7130         * thread.c (finish_thread_state_cleanup): Delete.
7131
7132 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
7133             Pedro Alves  <palves@redhat.com>
7134
7135         * value.c: Include "selftest.h" and "common/array-view.h".
7136         (struct range) <operator ==>: New.
7137         (test_ranges_contain): New.
7138         (check_ranges_vector): New.
7139         (test_insert_into_bit_range_vector): New.
7140         (_initialize_values): Register selftests.
7141         * common/array-view.h (operator==, operator!=): New.
7142
7143 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
7144
7145         * common/gdb_vecs.h (unordered_remove): Add overload that takes
7146         an iterator.
7147         * inline-frame.c: Include <algorithm>.
7148         (struct inline_state): Add constructor.
7149         (inline_state_s): Remove.
7150         (DEF_VEC_O(inline_state_s)): Remove.
7151         (inline_states): Change type to std::vector.
7152         (find_inline_frame_state): Adjust to std::vector.
7153         (allocate_inline_frame_state): Remove.
7154         (clear_inline_frame_state): Adjust to std::vector.
7155         (skip_inline_frames): Adjust to std::vector.
7156
7157 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
7158
7159         * tracepoint.h (struct trace_state_variable): Add constructor.
7160         <name>: Change type to std::string.
7161         * tracepoint.c (tsv_s): Remove.
7162         (DEF_VEC_O(tsv_s)): Remove.
7163         (tvariables): Change to std::vector.
7164         (create_trace_state_variable): Adjust to std::vector.
7165         (find_trace_state_variable): Likewise.
7166         (find_trace_state_variable_by_number): Likewise.
7167         (delete_trace_state_variable): Likewise.
7168         (trace_variable_command): Adjust to std::string.
7169         (delete_trace_variable_command): Likewise.
7170         (tvariables_info_1): Adjust to std::vector.
7171         (save_trace_state_variables): Likewise.
7172         (start_tracing): Likewise.
7173         (merge_uploaded_trace_state_variables): Adjust to std::vector
7174         and std::string.
7175         * target.h (struct target_ops)
7176         <to_download_trace_state_variable>: Pass reference to
7177         trace_state_variable.
7178         * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
7179         * target-delegates.c: Re-generate.
7180         * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
7181         (mi_tsv_deleted): Likewise.
7182         * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
7183         * remote.c (remote_download_trace_state_variable): Change
7184         pointer to reference and adjust.
7185         * make-target-delegates (parse_argtypes): Handle references.
7186         (write_function_header): Likewise.
7187         (munge_type): Likewise.
7188
7189 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
7190
7191         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7192         string_view-selftests.c.
7193         * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
7194         testsuite.
7195         * unittests/basic_string_view/cons/char/1.cc: Likewise.
7196         * unittests/basic_string_view/cons/char/2.cc: Likewise.
7197         * unittests/basic_string_view/cons/char/3.cc: Likewise.
7198         * unittests/basic_string_view/element_access/char/1.cc:
7199         Likewise.
7200         * unittests/basic_string_view/element_access/char/empty.cc:
7201         Likewise.
7202         * unittests/basic_string_view/element_access/char/front_back.cc:
7203         Likewise.
7204         * unittests/basic_string_view/inserters/char/2.cc: Likewise.
7205         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
7206         Likewise.
7207         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
7208         Likewise.
7209         * unittests/basic_string_view/modifiers/swap/char/1.cc:
7210         Likewise.
7211         * unittests/basic_string_view/operations/compare/char/1.cc:
7212         Likewise.
7213         * unittests/basic_string_view/operations/compare/char/13650.cc:
7214         Likewise.
7215         * unittests/basic_string_view/operations/copy/char/1.cc:
7216         Likewise.
7217         * unittests/basic_string_view/operations/data/char/1.cc:
7218         Likewise.
7219         * unittests/basic_string_view/operations/find/char/1.cc:
7220         Likewise.
7221         * unittests/basic_string_view/operations/find/char/2.cc:
7222         Likewise.
7223         * unittests/basic_string_view/operations/find/char/3.cc:
7224         Likewise.
7225         * unittests/basic_string_view/operations/find/char/4.cc:
7226         Likewise.
7227         * unittests/basic_string_view/operations/rfind/char/1.cc:
7228         Likewise.
7229         * unittests/basic_string_view/operations/rfind/char/2.cc:
7230         Likewise.
7231         * unittests/basic_string_view/operations/rfind/char/3.cc:
7232         Likewise.
7233         * unittests/basic_string_view/operations/substr/char/1.cc:
7234         Likewise.
7235         * unittests/basic_string_view/operators/char/2.cc: Likewise.
7236         * unittests/string_view-selftests.c: New file.
7237
7238 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
7239
7240         * unittests/basic_string_view/capacity/1.cc: New file.
7241         * unittests/basic_string_view/capacity/empty_neg.cc: New file.
7242         * unittests/basic_string_view/cons/char/1.cc: New file.
7243         * unittests/basic_string_view/cons/char/2.cc: New file.
7244         * unittests/basic_string_view/cons/char/3.cc: New file.
7245         * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
7246         * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
7247         * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
7248         * unittests/basic_string_view/element_access/char/1.cc: New file.
7249         * unittests/basic_string_view/element_access/char/2.cc: New file.
7250         * unittests/basic_string_view/element_access/char/empty.cc: New file.
7251         * unittests/basic_string_view/element_access/char/front_back.cc: New file.
7252         * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
7253         * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
7254         * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
7255         * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
7256         * unittests/basic_string_view/include.cc: New file.
7257         * unittests/basic_string_view/inserters/char/1.cc: New file.
7258         * unittests/basic_string_view/inserters/char/2.cc: New file.
7259         * unittests/basic_string_view/inserters/char/3.cc: New file.
7260         * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
7261         * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
7262         * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
7263         * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
7264         * unittests/basic_string_view/literals/types.cc: New file.
7265         * unittests/basic_string_view/literals/values.cc: New file.
7266         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
7267         * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
7268         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
7269         * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
7270         * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
7271         * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
7272         * unittests/basic_string_view/operations/compare/char/1.cc: New file.
7273         * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
7274         * unittests/basic_string_view/operations/compare/char/2.cc: New file.
7275         * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
7276         * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
7277         * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
7278         * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
7279         * unittests/basic_string_view/operations/copy/char/1.cc: New file.
7280         * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
7281         * unittests/basic_string_view/operations/data/char/1.cc: New file.
7282         * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
7283         * unittests/basic_string_view/operations/find/char/1.cc: New file.
7284         * unittests/basic_string_view/operations/find/char/2.cc: New file.
7285         * unittests/basic_string_view/operations/find/char/3.cc: New file.
7286         * unittests/basic_string_view/operations/find/char/4.cc: New file.
7287         * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
7288         * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
7289         * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
7290         * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
7291         * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
7292         * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
7293         * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
7294         * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
7295         * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
7296         * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
7297         * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
7298         * unittests/basic_string_view/operations/substr/char/1.cc: New file.
7299         * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
7300         * unittests/basic_string_view/operators/char/2.cc: New file.
7301         * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
7302         * unittests/basic_string_view/range_access/char/1.cc: New file.
7303         * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
7304         * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
7305         * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
7306         * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
7307         * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
7308         * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
7309         * unittests/basic_string_view/requirements/typedefs.cc: New file.
7310         * unittests/basic_string_view/typedefs.cc: New file.
7311         * unittests/basic_string_view/types/1.cc: New file.
7312
7313 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
7314
7315         * common/gdb_string_view.h: Remove libstdc++ implementation
7316         details, adjust to gdb reality.
7317         * common/gdb_string_view.tcc: Likewise.
7318         * cli/cli-script.c (struct string_view): Remove.
7319         (user_args) <m_args>: Change element type to gdb::string_view.
7320         (user_args::insert_args): Adjust.
7321
7322 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
7323
7324         * common/gdb_string_view.h: New file.
7325         * common/gdb_string_view.tcc: New file.
7326
7327 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
7328
7329         * ax_cxx_compile_stdcxx.m4: Sync with upstream.
7330         * configure: Re-generate.
7331
7332 2018-04-09  Pedro Alves  <palves@redhat.com>
7333
7334         * gdbarch.sh: Include "observable.h" instead of "observer.h".
7335         (set_target_gdbarch): Call
7336         gdb::observers::architecture_changed.notify instead of
7337         observer_notify_architecture_changed.
7338
7339 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
7340
7341         * tracepoint.c (struct current_traceframe_cleanup): Remove.
7342         (do_restore_current_traceframe_cleanup): Remove.
7343         (restore_current_traceframe_cleanup_dtor): Remove.
7344         (make_cleanup_restore_current_traceframe): Remove.
7345         (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
7346         New.
7347         * tracepoint.h (struct scoped_restore_current_traceframe): New.
7348         * infrun.c (fetch_inferior_event): Use
7349         scoped_restore_current_traceframe.
7350
7351 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
7352
7353         * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
7354         Remove.
7355         <n_allocated_type_units>: Remove.
7356         <all_type_units>: Change to std::vector.
7357         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
7358         to std::vector change.
7359         (dwarf2_per_objfile::get_cutu): Likewise.
7360         (dwarf2_per_objfile::get_tu): Likewise.
7361         (create_signatured_type_table_from_index): Likewise.
7362         (create_signatured_type_table_from_debug_names): Likewise.
7363         (dw2_symtab_iter_next): Likewise.
7364         (dw2_print_stats): Likewise.
7365         (dw2_expand_all_symtabs): Likewise.
7366         (dw2_expand_marked_cus): Likewise.
7367         (dw2_debug_names_iterator::next): Likewise.
7368         (dwarf2_initialize_objfile): Likewise.
7369         (add_signatured_type_cu_to_table): Likewise.
7370         (create_all_type_units): Likewise.
7371         (add_type_unit): Likewise.
7372         (struct tu_abbrev_offset): Add constructor.
7373         (build_type_psymtabs_1): Adjust to std::vector change.
7374         (print_tu_stats): Likewise.
7375         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
7376         (write_debug_names): Likewise.
7377
7378 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
7379
7380         * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
7381         Make an std::vector.
7382         <n_comp_units>: Remove.
7383         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
7384         to std::vector change.
7385         (dwarf2_per_objfile::get_cutu): Likewise.
7386         (dwarf2_per_objfile::get_cu): Likewise.
7387         (create_cus_from_index): Likewise.
7388         (create_addrmap_from_index): Likewise.
7389         (create_addrmap_from_aranges): Likewise.
7390         (dwarf2_read_index): Likewise.
7391         (dw2_find_last_source_symtab): Likewise.
7392         (dw2_map_symtabs_matching_filename): Likewise.
7393         (dw2_symtab_iter_next): Likewise.
7394         (dw2_print_stats): Likewise.
7395         (dw2_expand_all_symtabs): Likewise.
7396         (dw2_expand_symtabs_with_fullname): Likewise.
7397         (dw2_expand_marked_cus): Likewise.
7398         (dw2_map_symbol_filenames): Likewise.
7399         (create_cus_from_debug_names): Likewise.
7400         (dwarf2_read_debug_names): Likewise.
7401         (dw2_debug_names_iterator::next): Likewise.
7402         (dwarf2_initialize_objfile): Likewise.
7403         (set_partial_user): Likewise.
7404         (dwarf2_build_psymtabs_hard): Likewise.
7405         (read_comp_units_from_section): Remove arguments, adjust to
7406         std::vector change.
7407         (create_all_comp_units): Adjust to std::vector and
7408         read_comp_units_from_section changes.
7409         (dwarf2_find_containing_comp_unit): Adjust to std::vector
7410         change.
7411         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
7412         (psyms_seen_size): Likewise.
7413         (write_gdbindex): Likewise.
7414         (write_debug_names): Likewise.
7415
7416 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
7417
7418         * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
7419         with dwarf2_per_objfile.
7420         (create_cus_from_index): Likewise.
7421         (create_signatured_type_table_from_index): Likewise.
7422         (dwarf2_read_index): Likewise.
7423         (dwarf2_initialize_objfile): Likewise.
7424         (dwarf2_fetch_die_loc_sect_off):  Get dwarf2_per_objfile from
7425         per_cu rather than get_dwarf2_per_objfile.
7426
7427 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
7428
7429         * dwarf2read.h (struct signatured_type): Forward declare.
7430         (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
7431         New methods.
7432         * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
7433         (dw2_get_cutu): ...this.
7434         (dwarf2_per_objfile::get_cu): Rename from...
7435         (dw2_get_cu): ...this.
7436         (dwarf2_per_objfile::get_tu): New.
7437         (create_addrmap_from_index): Adjust.
7438         (create_addrmap_from_aranges): Adjust.
7439         (dw2_find_last_source_symtab): Adjust.
7440         (dw2_map_symtabs_matching_filename): Adjust.
7441         (dw2_symtab_iter_next): Adjust.
7442         (dw2_print_stats): Adjust.
7443         (dw2_expand_all_symtabs): Adjust.
7444         (dw2_expand_symtabs_with_fullname): Adjust.
7445         (dw2_expand_marked_cus): Adjust.
7446         (dw_expand_symtabs_matching_file_matcher): Adjust.
7447         (dw2_map_symbol_filenames): Adjust.
7448         (dw2_debug_names_iterator::next): Adjust.
7449         (dwarf2_initialize_objfile): Adjust.
7450         (set_partial_user): Adjust.
7451         (dwarf2_build_psymtabs_hard): Adjust.
7452
7453 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
7454
7455         * dwarf2read.c (create_signatured_type_table_from_debug_names):
7456         Remove unused variables.
7457         (dw2_map_symtabs_matching_filename): Likewise.
7458         (dwarf2_record_block_ranges): Likewise.
7459         (dwarf2_read_addr_index): Likewise.
7460         (follow_die_offset): Likewise.
7461
7462 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
7463
7464         * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
7465         to symbol_file_add_main.
7466
7467 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
7468
7469         PR mi/22299
7470         * mi/mi-console.c (do_fputc_async_safe): New.
7471         (mi_console_file::write_async_safe): New.
7472         (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
7473         * mi/mi-console.h (class mi_console_file) <write_async_safe>:
7474         New.
7475         * ui-file.c (ui_file::putstrn): Adjust call to
7476         fputstrn_unfiltered.
7477         * utils.c (printchar): Replace do_fputs and do_fprintf
7478         parameters by do_fputc.
7479         (fputstr_filtered): Adjust call to printchar.
7480         (fputstr_unfiltered): Likewise.
7481         (fputstrn_filtered): Likewise.
7482         (fputstrn_unfiltered): Add do_fputc parameter, pass to
7483         printchar.
7484         * utils.h (do_fputc_ftype): New typedef.
7485         (fputstrn_unfiltered): Add do_fputc parameter.
7486
7487 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
7488
7489         * regformats/i386/i386-avx.dat: Remove.
7490
7491 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
7492
7493         PR gdb/22979
7494         * amd64-tdep.c (amd64_none_init_abi): New function.
7495         (amd64_x32_none_init_abi): New function.
7496         (_initialize_amd64_tdep): Register handlers for x86-64 and
7497         x64_32 with GDB_OSABI_NONE.
7498         * osabi.c (gdbarch_init_osabi): Allow running handlers for the
7499         GDB_OSABI_NONE osabi.
7500
7501 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
7502
7503         PR gdb/22980
7504         * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
7505         GDB_OSABI_NONE.
7506         * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
7507         * osabi.c (gdb_osabi_names): Add "unknown" entry.
7508
7509 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
7510
7511         * common/byte-vector.h (char_vector): New type.
7512         * target.h (target_read_alloc): Return
7513         gdb::optional<byte_vector>.
7514         (target_read_stralloc): Return gdb::optional<char_vector>.
7515         (target_get_osdata): Return gdb::optional<char_vector>.
7516         * target.c (target_read_alloc_1): Templatize.  Replacement
7517         manual memory management with vector.
7518         (target_read_alloc): Change return type, adjust.
7519         (target_read_stralloc): Change return type, adjust.
7520         (target_get_osdata): Change return type, adjust.
7521         * auxv.c (struct auxv_info) <length>: Remove.
7522         <data>: Change type to gdb::optional<byte_vector>.
7523         (auxv_inferior_data_cleanup): Free auxv_info with delete.
7524         (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
7525         (target_auxv_search): Adjust.
7526         (fprint_target_auxv): Adjust.
7527         * avr-tdep.c (avr_io_reg_read_command): Adjust.
7528         * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
7529         (linux_make_corefile_notes): Adjust.
7530         * osdata.c (get_osdata): Adjust.
7531         * remote.c (remote_get_threads_with_qxfer): Adjust.
7532         (remote_memory_map): Adjust.
7533         (remote_traceframe_info): Adjust.
7534         (btrace_read_config): Adjust.
7535         (remote_read_btrace): Adjust.
7536         (remote_pid_to_exec_file): Adjust.
7537         * solib-aix.c (solib_aix_get_library_list): Adjust.
7538         * solib-dsbt.c (decode_loadmap): Don't free buf.
7539         (dsbt_get_initial_loadmaps): Adjust.
7540         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
7541         * solib-target.c (solib_target_current_sos): Adjust.
7542         * tracepoint.c (sdata_make_value): Adjust.
7543         * xml-support.c (xinclude_start_include): Adjust.
7544         (xml_fetch_content_from_file): Adjust.
7545         * xml-support.h (xml_fetch_another): Change return type.
7546         (xml_fetch_content_from_file): Change return type.
7547         * xml-syscall.c (xml_init_syscalls_info): Adjust.
7548         * xml-tdesc.c (file_read_description_xml): Adjust.
7549         (fetch_available_features_from_target): Change return type.
7550         (target_fetch_description_xml): Adjust.
7551         (target_read_description_xml): Adjust.
7552
7553 2018-04-06  Tom Tromey  <tom@tromey.com>
7554
7555         * value.c (~value): Update.
7556         (struct value) <contents>: Now unique_xmalloc_ptr.
7557         (value_contents_bits_eq, allocate_value_contents)
7558         (value_contents_raw, value_contents_all_raw)
7559         (value_contents_for_printing, value_contents_for_printing_const)
7560         (set_value_enclosing_type): Update.
7561
7562 2018-04-06  Tom Tromey  <tom@tromey.com>
7563
7564         * value.c (range_s): Remove typedef, VEC.
7565         (struct range): Add operator<.
7566         (range_lessthan): Remove.
7567         (ranges_contain): Change type.
7568         (~value): Update.
7569         (struct value) <unavailable, optimized_out>: Now std::vector.
7570         (value_entirely_available)
7571         (value_entirely_covered_by_range_vector)
7572         (value_entirely_unavailable, value_entirely_optimized_out):
7573         Update.
7574         (insert_into_bit_range_vector): Change argument type.
7575         (find_first_range_overlap): Likewise.
7576         (struct ranges_and_idx, value_contents_bits_eq)
7577         (require_not_optimized_out, require_available): Update.
7578         (ranges_copy_adjusted): Change argument types.
7579         (value_optimized_out, value_copy, value_fetch_lazy): Update.
7580
7581 2018-04-06  Tom Tromey  <tom@tromey.com>
7582
7583         * value.c (~value): Update.
7584         (struct value) <parent>: Now a value_ref_ptr.
7585         (value_parent, set_value_parent, value_address, value_copy):
7586         Update.
7587
7588 2018-04-06  Tom Tromey  <tom@tromey.com>
7589
7590         * value.c (struct value): Add constructor, destructor, and member
7591         initializers.
7592         (allocate_value_lazy, value_decref): Update.
7593
7594 2018-04-06  Tom Tromey  <tom@tromey.com>
7595
7596         * value.c (struct value) <released, next>: Remove.
7597         (all_values): Now a std::vector.
7598         (allocate_value_lazy): Update.
7599         (value_next): Remove.
7600         (value_mark, value_free_to_mark, release_value)
7601         (value_release_to_mark): Update.
7602
7603 2018-04-06  Tom Tromey  <tom@tromey.com>
7604
7605         * value.h (fetch_subexp_value, value_release_to_mark): Update.
7606         (free_value_chain): Remove.
7607         * value.c (free_value_chain): Remove.
7608         (value_release_to_mark): Return a std::vector.
7609         * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
7610         std::vector.
7611         (check_condition): Update.
7612         * eval.c (fetch_subexp_value): Change "val_chain" to a
7613         std::vector.
7614         * breakpoint.c (update_watchpoint): Update.
7615         (can_use_hardware_watchpoint): Change "vals" to a std::vector.
7616
7617 2018-04-06  Tom Tromey  <tom@tromey.com>
7618
7619         * value.h (free_all_values): Remove.
7620         * value.c (free_all_values): Remove.
7621
7622 2018-04-06  Tom Tromey  <tom@tromey.com>
7623
7624         * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
7625         (value_history_chain, value_history_count): Remove.
7626         (value_history): New global.
7627         (record_latest_value, access_value_history, show_values)
7628         (preserve_values): Update.
7629
7630 2018-04-06  Tom Tromey  <tom@tromey.com>
7631
7632         * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
7633         * varobj.c (varobj_set_display_format, varobj_set_value)
7634         (install_default_visualizer, construct_visualizer)
7635         (install_new_value, ~varobj, varobj_get_value_type)
7636         (my_value_of_variable, varobj_editable_p): Update.
7637         * c-varobj.c (c_describe_child, c_value_of_variable)
7638         (cplus_number_of_children, cplus_describe_child): Update.
7639         * ada-varobj.c (ada_number_of_children, ada_name_of_child)
7640         (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
7641         (ada_value_of_variable, ada_value_is_changeable_p): Update.
7642
7643 2018-04-06  Tom Tromey  <tom@tromey.com>
7644
7645         * printcmd.c (last_examine_address): Change type to
7646         value_ref_ptr.
7647         (do_examine, x_command): Update.
7648
7649 2018-04-06  Tom Tromey  <tom@tromey.com>
7650
7651         * value.c (release_value): Update.
7652         * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
7653         (struct bpstats) <val>: Now a value_ref_ptr.
7654         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
7655         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
7656         (~watchpoint, print_it_watchpoint, watch_command_1)
7657         (invalidate_bp_value_on_memory_change): Update.
7658
7659 2018-04-06  Tom Tromey  <tom@tromey.com>
7660
7661         * varobj.c (varobj_clear_saved_item)
7662         (update_dynamic_varobj_children, install_new_value, ~varobj):
7663         Update.
7664         * value.h (value_incref): Move declaration earlier.
7665         (value_decref): Rename from value_free.
7666         (struct value_ref_policy): New.
7667         (value_ref_ptr): New typedef.
7668         (struct value_deleter): Remove.
7669         (gdb_value_up): Remove typedef.
7670         (release_value): Change return type.
7671         (release_value_or_incref): Remove.
7672         * value.c (set_value_parent): Update.
7673         (value_incref): Change return type.
7674         (value_decref): Rename from value_free.
7675         (value_free_to_mark, free_all_values, free_value_chain): Update.
7676         (release_value): Return value_ref_ptr.
7677         (release_value_or_incref): Remove.
7678         (record_latest_value, set_internalvar, clear_internalvar):
7679         Update.
7680         * stack.c (info_frame_command): Don't call value_free.
7681         * python/py-value.c (valpy_dealloc, valpy_new)
7682         (value_to_value_object): Update.
7683         * printcmd.c (do_examine): Update.
7684         * opencl-lang.c (lval_func_free_closure): Update.
7685         * mi/mi-main.c (register_changed_p): Don't call value_free.
7686         * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
7687         * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
7688         * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
7689         value_free.
7690         * guile/scm-value.c (vlscm_free_value_smob)
7691         (vlscm_scm_from_value): Update.
7692         * frame.c (frame_register_unwind, frame_unwind_register_signed)
7693         (frame_unwind_register_unsigned, get_frame_register_bytes)
7694         (put_frame_register_bytes): Don't call value_free.
7695         * findvar.c (address_from_register): Don't call value_free.
7696         * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
7697         * dwarf2loc.c (entry_data_value_free_closure)
7698         (value_of_dwarf_reg_entry, free_pieced_value_closure)
7699         (dwarf2_evaluate_loc_desc_full): Update.
7700         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
7701         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
7702         (~watchpoint, watch_command_1)
7703         (invalidate_bp_value_on_memory_change): Update.
7704         * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
7705
7706 2018-04-06  Simon Marchi  <simon.marchi@polymtl.ca>
7707
7708         PR gdb/23022
7709         * warning.m4: Add -Wno-error=deprecated-register.
7710         * configure: Re-generate.
7711
7712 2018-04-05  Tom Tromey  <tom@tromey.com>
7713
7714         * linespec.h: Remove include of "vec.h".
7715
7716 2018-04-05  Tom Tromey  <tom@tromey.com>
7717
7718         * linespec.c (typep): Remove typedef.
7719         (find_methods, find_superclass_methods): Take a std::vector.
7720         (find_method): Use std::vector.
7721
7722 2018-04-05  Tom Tromey  <tom@tromey.com>
7723
7724         * utils.c (compare_strings): Remove.
7725         * utils.h (compare_strings): Remove.
7726         * objc-lang.h (find_imps): Update.
7727         * objc-lang.c (find_methods): Take a std::vector.
7728         (uniquify_strings, find_imps): Likewise.
7729         * linespec.c (find_methods): Take a std::vector.
7730         (decode_objc): Use std::vector.
7731         (add_all_symbol_names_from_pspace, find_superclass_methods): Take
7732         a std::vector.
7733         (find_method, find_function_symbols): Use std::vector.
7734
7735 2018-04-05  Tom Tromey  <tom@tromey.com>
7736
7737         * completer.c (completion_tracker::completion_tracker): Remove
7738         cast.
7739         (completion_tracker::discard_completions): Likewise.
7740         * breakpoint.c (ambiguous_names_p): Remove cast.
7741         * ada-lang.c (_initialize_ada_language): Remove cast.
7742         * utils.h (streq): Update.
7743         (streq_hash): Add new declaration.
7744         * utils.c (streq): Return bool.
7745         (streq_hash): New function.
7746
7747 2018-04-05  Tom Tromey  <tom@tromey.com>
7748
7749         * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
7750         Remove a string copy.
7751
7752 2018-04-05  Tom Tromey  <tom@tromey.com>
7753
7754         * linespec.c (filter_results): Use std::vector.
7755         (decode_line_2, decode_line_full): Update.
7756
7757 2018-04-05  Tom Tromey  <tom@tromey.com>
7758
7759         * linespec.c (canonical_to_fullform): Return std::string.
7760         (filter_results): Update.
7761         (struct decode_line_2_item): Add constructor.
7762         <fullform, displayform>: Now std::string.
7763         (decode_line_2_compare_items): Now a std::sort comparator.
7764         (decode_line_2): Update.
7765
7766 2018-04-05  Tom Tromey  <tom@tromey.com>
7767
7768         * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
7769         (unexpected_linespec_error): Update.
7770         (linespec_parse_basic, parse_linespec): Update.
7771
7772 2018-04-05  Tom Tromey  <tom@tromey.com>
7773
7774         * linespec.c (linespec_parse_basic): Reindent.
7775
7776 2018-04-05  Tom Tromey  <tom@tromey.com>
7777
7778         * minsyms.h (iterate_over_minimal_symbols): Update.
7779         * minsyms.c (iterate_over_minimal_symbols): Take a
7780         gdb::function_view.
7781         * linespec.c (struct collect_minsyms): Remove.
7782         (compare_msyms): Now a std::sort comparator.
7783         (add_minsym): Add parameters.
7784         (search_minsyms_for_name): Update.  Use std::vector.
7785
7786 2018-04-03  Tom Tromey  <tom@tromey.com>
7787
7788         * mipsread.c (read_alphacoff_dynamic_symtab): Use
7789         gdb::byte_vector.
7790
7791 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
7792
7793         * MAINTAINERS (Write After Approval): Add Weimin Pan.
7794
7795 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
7796
7797         PR gdb/16959
7798         * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when 
7799         printing static type.
7800
7801 2018-04-01  Tom Tromey  <tom@tromey.com>
7802
7803         * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
7804         (rs6000_xfer_shared_libraries): Update.
7805
7806 2018-04-01  Simon Marchi  <simon.marchi@polymtl.ca>
7807
7808         * common/gdb_vecs.h (char_ptr): Remove.
7809         * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
7810
7811 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
7812
7813         * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
7814         with std::vector.
7815         * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
7816
7817 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
7818
7819         * tracepoint.h (struct uploaded_tp): Initialize fields.
7820         <actions, step_actions, cmd_strings>: Change type to
7821         std::vector<char *>.
7822         * tracepoint.c (get_uploaded_tp): Allocate with new.
7823         (free_uploaded_tps): Free with delete.
7824         (parse_tracepoint_definition): Adjust to std::vector change.
7825         * breakpoint.c (read_uploaded_action): Likewise.
7826         (create_tracepoint_from_upload): Likewise.
7827         * ctf.c (ctf_write_uploaded_tp): Likewise.
7828         (SET_ARRAY_FIELD): Likewise.
7829         * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
7830
7831 2018-03-30  Tom Tromey  <tom@tromey.com>
7832
7833         * solib-svr4.c (lm_info_read): Use gdb::byte_vector.  Return
7834         std::unique_ptr.
7835         (svr4_keep_data_in_core): Update.
7836         (svr4_read_so_list): Update.
7837
7838 2018-03-30  Tom Tromey  <tom@tromey.com>
7839
7840         * windows-nat.c (handle_output_debug_string, handle_exception):
7841         Update.
7842         * target.h (target_read_string): Update.
7843         * target.c (target_read_string): Change "string" to
7844         unique_xmalloc_ptr.
7845         * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
7846         Update.
7847         * solib-frv.c (frv_current_sos): Update.
7848         * solib-dsbt.c (dsbt_current_sos): Update.
7849         * solib-darwin.c (darwin_current_sos): Update.
7850         * linux-thread-db.c (inferior_has_bug): Update.
7851         * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
7852         Update.  Remove alloca.
7853         * ada-lang.c (ada_main_name): Update.
7854
7855 2018-03-30  Tom Tromey  <tom@tromey.com>
7856
7857         * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
7858         (struct dwo_file_deleter): New.
7859         (dwo_file_up): New typedef.
7860         (open_and_init_dwo_file): Use dwo_file_up.
7861         (free_dwo_file_cleanup): Remove.
7862
7863 2018-03-30  Tom Tromey  <tom@tromey.com>
7864
7865         * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
7866         (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
7867
7868 2018-03-30  Tom Tromey  <tom@tromey.com>
7869
7870         * dwarf2read.c (class free_cached_comp_units): New class.
7871         (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
7872         (free_cached_comp_units): Remove function.
7873
7874 2018-03-30  Tom Tromey  <tom@tromey.com>
7875
7876         * utils.h (make_cleanup_unpush_target): Remove.
7877         * inf-ptrace.c (struct target_unpusher): New.
7878         (target_unpush_up) New typedef.
7879         (inf_ptrace_create_inferior, inf_ptrace_attach): Use
7880         target_unpush_up.
7881         * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
7882
7883 2018-03-27  Tom Tromey  <tom@tromey.com>
7884
7885         * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
7886
7887 2018-03-27  Pedro Alves  <palves@redhat.com>
7888             Tom Tromey  <tom@tromey.com>
7889
7890         * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
7891         destructor.  Now a class.
7892         (gdb_readline_wrapper_cleanup): Remove function.
7893         (gdb_readline_wrapper): Remove cleanups.
7894
7895 2018-03-27  Tom Tromey  <tom@tromey.com>
7896
7897         * typeprint.h (struct type_print_options) <local_typedefs,
7898         global_typedefs>: Remove "struct" keyword.
7899         (class typedef_hash_table): New class.
7900         (recursively_update_typedef_hash, add_template_parameters)
7901         (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
7902         (find_typedef_in_hash): Don't declare.
7903         * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
7904         (typedef_hash_table::recursively_update): Rename from
7905         recursively_update_typedef_hash.  Now a member.
7906         (typedef_hash_table::add_template_parameters): Rename from
7907         add_template_parameters.  Now a member.
7908         (typedef_hash_table::typedef_hash_table): Now a constructor;
7909         rename from create_typedef_hash.
7910         (typedef_hash_table::~typedef_hash_table): Now a destructor;
7911         rename from free_typedef_hash.
7912         (do_free_typedef_hash, make_cleanup_free_typedef_hash)
7913         (do_free_global_table): Remove.
7914         (typedef_hash_table::typedef_hash_table): New constructor; renamed
7915         from copy_type_recursive.
7916         (create_global_typedef_table): Remove.
7917         (typedef_hash_table::find_global_typedef): Now a member of
7918         typedef_hash_table.
7919         (typedef_hash_table::find_typedef): Rename from
7920         find_typedef_in_hash; now a member.
7921         (whatis_exp): Update.
7922         * extension.h (struct ext_lang_type_printers): Add constructor and
7923         destructor.
7924         (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
7925         declare.
7926         * extension.c (ext_lang_type_printers::ext_lang_type_printers):
7927         Now a constructor; rename from start_ext_lang_type_printers.
7928         (ext_lang_type_printers): Now a destructor; rename from
7929         free_ext_lang_type_printers.
7930         * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
7931         Update.
7932         (c_type_print_base_struct_union): Update.  Remove cleanups.
7933
7934 2018-03-27  Tom Tromey  <tom@tromey.com>
7935
7936         * dwarf-index-write.c: Include <cmath>.
7937
7938 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
7939
7940         * NEWS: Add entry describing new "set|show varsize-limit" command.
7941         * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
7942         command.
7943         * printcmd.c (_initialize_printcmd): Add "set var" alias of
7944         "set variable".
7945
7946 2018-03-27  Simon Marchi  <simon.marchi@ericsson.com>
7947
7948         * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
7949         dwarf-index-write.c
7950         (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
7951         * dwarf-index-common.c: New file.
7952         * dwarf-index-common.h: New file.
7953         * dwarf-index-write.c: New file.
7954         * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
7955         (struct dwarf2_section_info): Move from here.
7956         (dwarf2_section_info_def): Likewise.
7957         (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
7958         (offset_type): Likewise.
7959         (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
7960         (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
7961         (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
7962         (byte_swap): Likewise.
7963         (MAYBE_SWAP): Likewise.
7964         (dwarf2_per_cu_ptr): Likewise.
7965         (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
7966         (struct tu_stats): Likewise.
7967         (struct dwarf2_per_objfile): Likewise.
7968         (struct dwarf2_per_cu_data): Likewise.
7969         (struct signatured_type): Likewise.
7970         (sig_type_ptr): Likewise.
7971         (DEF_VEC_P (sig_type_ptr)): Likewise.
7972         (INDEX4_SUFFIX): Likewise.
7973         (INDEX5_SUFFIX): Likewise.
7974         (DEBUG_STR_SUFFIX): Likewise.
7975         (dwarf2_read_section): Make non-static.
7976         (mapped_index_string_hash): Move from here.
7977         (dwarf5_djb_hash): Likewise.
7978         (file_write): Likewise.
7979         (class data_buf): Likewise.
7980         (struct symtab_index_entry): Likewise.
7981         (struct mapped_symtab): Likewise.
7982         (find_slot): Likewise.
7983         (hash_expand): Likewise.
7984         (add_index_entry): Likewise.
7985         (uniquify_cu_indices): Likewise.
7986         (class c_str_view): Likewise.
7987         (class c_str_view_hasher): Likewise.
7988         (class vector_hasher): Likewise.
7989         (write_hash_table): Likewise.
7990         (psym_index_map): Likewise.
7991         (struct addrmap_index_data): Likewise.
7992         (add_address_entry): Likewise.
7993         (add_address_entry_worker): Likewise.
7994         (write_address_map): Likewise.
7995         (symbol_kind): Likewise.
7996         (write_psymbols): Likewise.
7997         (struct signatured_type_index_data): Likewise.
7998         (write_one_signatured_type): Likewise.
7999         (recursively_count_psymbols): Likewise.
8000         (recursively_write_psymbols): Likewise.
8001         (class debug_names): Likewise.
8002         (check_dwarf64_offsets): Likewise.
8003         (psyms_seen_size): Likewise.
8004         (write_gdbindex): Likewise.
8005         (write_debug_names): Likewise.
8006         (assert_file_size): Likewise.
8007         (write_psymtabs_to_index): Likewise.
8008         (save_gdb_index_command): Likewise.
8009         (_initialize_dwarf2_read): Don't register the "save gdb-index"
8010         command.
8011         * dwarf2read.h: New file.
8012
8013 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
8014
8015         PR gdb/22670
8016         * dwarf2read.c (dwarf2_physname): Do not return the demangled
8017         symbol name if the CU's language stores symbol names in linkage
8018         format.
8019         * language.h (struct language_defn)
8020         <la_store_sym_names_in_linkage_form_p>: New field.  Adjust
8021         all instances of this struct.
8022
8023 2018-03-26  Tom Tromey  <tom@tromey.com>
8024
8025         * stack.c (backtrace_command_1): Remove verbose code.
8026
8027 2018-03-26  Tom Tromey  <tom@tromey.com>
8028
8029         * python/py-framefilter.c (py_print_type): Don't catch
8030         exceptions.  Return void.
8031         (py_print_value): Likewise.
8032         (py_print_single_arg): Likewise.
8033         (enumerate_args): Don't catch exceptions.
8034         (py_print_args): Likewise.
8035         (py_print_frame): Likewise.
8036         (gdbpy_apply_frame_filter): Catch exceptions here.
8037
8038 2018-03-26  Tom Tromey  <tom@tromey.com>
8039
8040         * stack.c (_initialize_stack): Remove trailing newlines from help
8041         text.  Add "Usage" line to "backtrace" help.
8042
8043 2018-03-26  Tom Tromey  <tom@tromey.com>
8044
8045         PR python/16486:
8046         * python/py-framefilter.c (py_print_args): Call wrap_hint.
8047
8048 2018-03-26  Tom Tromey  <tom@tromey.com>
8049
8050         * python/py-framefilter.c (py_print_single_arg): Return
8051         EXT_LANG_BT_ERROR from catch.
8052
8053 2018-03-26  Tom Tromey  <tom@tromey.com>
8054
8055         PR backtrace/15584:
8056         * stack.c (backtrace_command_1): Move some code into no-filters
8057         "if".
8058
8059 2018-03-26  Tom Tromey  <tom@tromey.com>
8060
8061         * python/py-framefilter.c (throw_quit_or_print_exception): New
8062         function.
8063         (gdbpy_apply_frame_filter): Use it.
8064
8065 2018-03-26  Tom Tromey  <tom@tromey.com>
8066
8067         PR cli/17716:
8068         * python/py-framefilter.c (py_print_type, py_print_value)
8069         (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
8070         RETURN_MASK_ERROR.
8071
8072 2018-03-26  Tom Tromey  <tom@tromey.com>
8073
8074         * python/py-framefilter.c (enumerate_args): Use
8075         gdb::unique_xmalloc_ptr.
8076
8077 2018-03-26  Tom Tromey  <tom@tromey.com>
8078
8079         * python/py-framefilter.c (py_print_frame): Return
8080         EXT_LANG_BT_OK.
8081         (gdbpy_apply_frame_filter): Update comment.
8082         * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
8083         Remove.
8084         <EXT_LANG_BT_NO_FILTERS>: Change value.
8085
8086 2018-03-26  Tom Tromey  <tom@tromey.com>
8087
8088         PR backtrace/15582:
8089         * stack.c (backtrace_command): Parse "hide" argument.
8090         * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
8091         * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
8092         constant.
8093
8094 2018-03-26  Tom Tromey  <tom@tromey.com>
8095
8096         * stack.c (backtrace_command_1): Remove "show_locals" parameter,
8097         add "flags".
8098         (backtrace_command): Remove "fulltrace", add "flags".
8099
8100 2018-03-26  Tom Tromey  <tom@tromey.com>
8101
8102         * stack.c (backtrace_command): Rewrite command line parsing.
8103
8104 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
8105
8106         * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
8107
8108 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
8109
8110         * filename-seen-cache.h: Add include guard.
8111
8112 2018-03-26  Keith Seitz  <keiths@redhat.com>
8113
8114         * symfile.c (place_section): Remove "struct" from section_addr_info
8115         in comment.
8116         * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
8117         "struct" keyword from section_addr_info.
8118
8119 2018-03-26  Alan Hayward  <alan.hayward@arm.com>
8120
8121         * regformats/regdef.h (reg): Add constructors.
8122
8123 2018-03-25  Pedro Alves  <palves@redhat.com>
8124
8125         * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
8126         if then/else bodies in var_func_name extraction.
8127
8128 2018-03-23  Weimin Pan  <weimin.pan@oracle.com>
8129
8130         * minsyms.c (lookup_minimal_symbol_and_objfile): Use
8131         lookup_minimal_symbol() to find symbol entry.
8132         * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
8133
8134 2018-03-23  Keith Seitz  <keiths@redhat.com>
8135
8136         PR c++/22968
8137         * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
8138         nested type definitions for C++, too.
8139
8140 2018-03-23  Tom Tromey  <tom@tromey.com>
8141
8142         * machoread.c (struct oso_el): Add a constructor.  Don't define as
8143         a typedef.
8144         (macho_register_oso): Remove.
8145         (macho_symtab_read): Take a std::vector.
8146         (oso_el_compare_name): Now a std::sort comparator.
8147         (macho_symfile_read_all_oso): Take a std::vector.
8148         (macho_symfile_read): Use std::vector.  Remove cleanups.
8149
8150 2018-03-22  Tom Tromey  <tom@tromey.com>
8151
8152         * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
8153         (record_full_goto_bookmark): Use std::string.
8154
8155 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8156
8157         PR tdep/18295
8158         * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
8159         a single mask.
8160
8161 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8162
8163         * rs6000-tdep.c (store_insn_p): New function.
8164         (skip_prologue): New variable alloca_reg_offset. Set lr_reg
8165         and cr_reg to their unshifted values. Use store_insn_p to
8166         match LR saves using either R1 or fdata->alloca_reg. Use
8167         store_insn_p to match CR saves. Set alloca_reg_offset
8168         when alloca_reg and framep are set. Remove lr_reg shift
8169         when assigning to fdata->lr_register.
8170
8171 2018-03-22  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8172
8173         * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
8174         command line args instead of emitting a warning.
8175
8176 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
8177
8178         * tracepoint.h (struct static_tracepoint_marker): Initialize
8179         fields, define default constructor, move constructor and move
8180         assignment, disable the rest.
8181         <str_id, extra>: Make std::string.
8182         (release_static_tracepoint_marker): Remove.
8183         (free_current_marker): Remove.
8184         * tracepoint.c (free_current_marker): Remove.
8185         (parse_static_tracepoint_marker_definition): Adjust to
8186         std::string, use new hex2str overload.
8187         (release_static_tracepoint_marker): Remove.
8188         (print_one_static_tracepoint_marker): Get marker by reference
8189         and adjust to std::string.
8190         (info_static_tracepoint_markers_command): Adjust to std::vector
8191         changes
8192         * target.h (static_tracepoint_marker_p): Remove typedef.
8193         (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
8194         (struct target_ops) <to_static_tracepoint_marker_at>: Return
8195         bool.
8196         <to_static_tracepoint_markers_by_strid>: Return std::vector.
8197         * target-debug.h
8198         (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
8199         (target_debug_print_std_vector_static_tracepoint_marker): New.
8200         (target_debug_print_struct_static_tracepoint_marker_p): Rename
8201         to...
8202         (target_debug_print_static_tracepoint_marker_p): ... this.
8203         * target-delegates.c: Re-generate.
8204         * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
8205         Make std::string.
8206         * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
8207         (decode_static_tracepoint_spec): Adjust to std::vector.
8208         (tracepoint_print_one_detail): Adjust to std::string.
8209         (strace_marker_decode_location): Adjust to std::string.
8210         (update_static_tracepoint): Adjust to std::string, remove call
8211         to release_static_tracepoint_marker.
8212         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
8213         Adjust to std::vector.
8214         * remote.c (remote_static_tracepoint_marker_at): Return bool.
8215         (remote_static_tracepoint_markers_by_strid): Adjust to
8216         std::vector.
8217         * common/rsp-low.h (hex2str): New overload with explicit count
8218         of bytes.
8219         * common/rsp-low.c (hex2str): New overload with explicit count
8220         of bytes.
8221         * unittests/rsp-low-selftests.c (test_hex2str): New function.
8222         (_initialize_rsp_low_selftests): Add test_hex2str test.
8223         * unittests/tracepoint-selftests.c
8224         (test_parse_static_tracepoint_marker_definition): Adjust to
8225         std::string.
8226
8227 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
8228
8229         * tracepoint.c (parse_static_tracepoint_marker_definition):
8230         Consider case where the definition is followed by more
8231         definitions.
8232         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8233         tracepoint-selftests.c.
8234         * unittests/tracepoint-selftests.c: New.
8235
8236 2018-03-21  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8237
8238         * MAINTAINERS (Write After Approval): Add Pedro Franco de
8239         Carvalho.
8240
8241 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
8242
8243         * symtab.c (find_pc_sect_line): fixed indentation.
8244
8245 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
8246
8247         * symtab.c (find_pc_sect_line): now uses binary search.
8248
8249 2018-03-19  Tom Tromey  <tom@tromey.com>
8250
8251         * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
8252         "IDENT" production.
8253
8254 2018-03-19  Pedro Alves  <palves@redhat.com>
8255             Tom Tromey  <tom@tromey.com>
8256
8257         * unittests/observable-selftests.c: New file.
8258         * common/observable.h: New file.
8259         * observable.h: New file.
8260         * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
8261         arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
8262         breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
8263         corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
8264         extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
8265         infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
8266         linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
8267         mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
8268         ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
8269         python/py-breakpoint.c, python/py-finishbreakpoint.c,
8270         python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
8271         record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
8272         riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
8273         spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
8274         symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
8275         tui/tui-interp.c, valops.c: Update all users.
8276         * tui/tui-hooks.c (tui_bp_created_observer)
8277         (tui_bp_deleted_observer, tui_bp_modified_observer)
8278         (tui_inferior_exit_observer, tui_before_prompt_observer)
8279         (tui_normal_stop_observer, tui_register_changed_observer):
8280         Remove.
8281         (tui_observers_token): New global.
8282         (attach_or_detach, tui_attach_detach_observers): New functions.
8283         (tui_install_hooks, tui_remove_hooks): Use
8284         tui_attach_detach_observers.
8285         * record-btrace.c (record_btrace_thread_observer): Remove.
8286         (record_btrace_thread_observer_token): New global.
8287         * observer.sh: Remove.
8288         * observer.c: Rename to observable.c.
8289         * observable.c (namespace gdb_observers): Define new objects.
8290         (observer_debug): Move into gdb_observers namespace.
8291         (struct observer, struct observer_list, xalloc_observer_list_node)
8292         (xfree_observer_list_node, generic_observer_attach)
8293         (generic_observer_detach, generic_observer_notify): Remove.
8294         (_initialize_observer): Update.
8295         Don't include observer.inc.
8296         * Makefile.in (generated_files): Remove observer.h, observer.inc.
8297         (clean mostlyclean): Likewise.
8298         (observer.h, observer.inc): Remove targets.
8299         (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
8300         (COMMON_SFILES): Use observable.c, not observer.c.
8301         * .gitignore: Remove observer.h.
8302
8303 2018-03-18  Tom Tromey  <tom@tromey.com>
8304
8305         * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
8306         gdb::def_vector.
8307         (bfd_lookup_symbol_from_dyn_symtab): Likewise.
8308
8309 2018-03-17  Tom Tromey  <tom@tromey.com>
8310
8311         * auto-load.c (auto_load_objfile_script_1): Use std::string.
8312
8313 2018-03-17  Tom Tromey  <tom@tromey.com>
8314
8315         * target.c (class scoped_target_fd): New.
8316         (target_fileio_close_cleanup): Remove.
8317         (target_fileio_read_alloc_1): Use scoped_target_fd.
8318
8319 2018-03-16  Simon Marchi  <simon.marchi@polymtl.ca>
8320
8321         * silent-rules.mk: New.
8322         * Makefile.in: Include silent-rules.mk
8323         (srcdir, VPATH, top_srcdir): Move up.
8324         (COMPILE): Add ECHO_CXX.
8325         (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
8326         (init.c): Add ECHO_INIT_C.
8327         (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
8328         (version.c): Add ECHO_GEN.
8329         (printcmd.o): Add ECHO_CXX.
8330         (target-float.o): Add ECHO_CXX.
8331         (ada-exp.o): Add ECHO_CXX.
8332         (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
8333         (insight$(EXEEXT)): Add ECHO_CXXLD.
8334         * gnulib/configure.ac: Add AM_SILENT_RULES.
8335         * gnulib/aclocal.m4: Re-generate.
8336         * gnulib/configure: Re-generate.
8337         * gnulib/import/Makefile.in: Re-generate.
8338
8339 2018-03-16  Tom Tromey  <tom@tromey.com>
8340
8341         * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
8342         * utils.h (make_cleanup_free_section_addr_info): Don't declare.
8343         * utils.c (do_free_section_addr_info)
8344         (make_cleanup_free_section_addr_info): Remove.
8345         * symfile.h (struct other_sections): Add constructor.
8346         (struct section_addr_info): Remove.
8347         (section_addr_info): New typedef.
8348         (struct sym_fns) <sym_offsets>: Change type of parameter.
8349         (build_section_addr_info_from_objfile)
8350         (relative_addr_info_to_section_offsets, addr_info_make_relative)
8351         (default_symfile_offsets, symbol_file_add)
8352         (symbol_file_add_from_bfd)
8353         (build_section_addr_info_from_section_table): Update.
8354         (alloc_section_addr_info, free_section_addr_info): Don't declare.
8355         * symfile.c (alloc_section_addr_info): Remove.
8356         (build_section_addr_info_from_section_table): Change return type.
8357         Update.
8358         (build_section_addr_info_from_bfd)
8359         (build_section_addr_info_from_objfile): Likewise.
8360         (free_section_addr_info): Remove.
8361         (relative_addr_info_to_section_offsets): Change type of "addrs".
8362         (addrs_section_compar): Now a std::sort comparator.
8363         (addrs_section_sort): Change return type.
8364         (addr_info_make_relative): Change type of "addrs".  Update.
8365         (default_symfile_offsets, syms_from_objfile_1)
8366         (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
8367         (symbol_file_add_separate): Update.
8368         (symbol_file_add): Change type of "addrs".  Update.
8369         (add_symbol_file_command): Update.  Remove cleanups.
8370         * symfile-mem.c (symbol_file_add_from_memory): Update.  Remove
8371         cleanups.
8372         * symfile-debug.c (debug_sym_offsets): Change type of "info".
8373         * solib.c (solib_read_symbols): Update.
8374         * objfiles.c (objfile_relocate): Update.  Remove cleanups.
8375         * machoread.c (macho_symfile_offsets): Update.
8376         * jit.c (jit_bfd_try_read_symtab): Update.
8377
8378 2018-03-15  Simon Marchi  <simon.marchi@polymtl.ca>
8379
8380         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8381         unittests/utils-selftests.c.
8382         * unittests/utils-selftests.c: New file.
8383
8384 2018-03-14  Tom Tromey  <tom@tromey.com>
8385
8386         PR cli/14977:
8387         * printcmd.c (printf_c_string, printf_wide_c_string): Special case
8388         for NULL.
8389
8390 2018-03-14  Tom Tromey  <tom@tromey.com>
8391
8392         PR cli/19918:
8393         * printcmd.c (printf_pointer): Allow "-" in format.
8394
8395 2018-03-14  Tom Tromey  <tom@tromey.com>
8396
8397         * printcmd.c (_initialize_printcmd): Add usage to printf.
8398
8399 2018-03-14  Yao Qi  <qiyao@sourceware.org>
8400
8401         * MAINTAINERS: Update my email address.
8402
8403 2018-03-13  Tom Tromey  <tom@tromey.com>
8404
8405         * machoread.c (macho_check_dsym): Change filenamep to a
8406         std::string*.
8407         (macho_symfile_read): Update.
8408         * symfile.c (load_command): Use std::string.
8409
8410 2018-03-12  Andrew Burgess  <andrew.burgess@embecosm.com>
8411
8412         * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
8413         to error message string.
8414         (riscv_register_name): Use xsnprintf instead of sprintf.
8415         (riscv_insn::fetch_instruction): Use gdb_assert instead of
8416         internal_error.
8417         (riscv_print_arg_location): Use gdb_assert_not_reached instead of
8418         error.
8419         (riscv_push_dummy_call): Likewise.
8420
8421 2018-03-12  Tom Tromey  <tom@tromey.com>
8422
8423         * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
8424         Use gdb::byte_vector.
8425         * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
8426
8427 2018-03-12  Yao Qi  <yao.qi@linaro.org>
8428
8429         * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
8430         parameter type to readable_regcache.
8431         * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
8432         the declaration.
8433
8434 2018-03-11  Tom Tromey  <tom@tromey.com>
8435
8436         * dwarf2read.c (struct nextfield): Add initializers.
8437         (struct nextfnfield): Remove.
8438         (struct fnfieldlist): Add initializers.  Remove "length" and
8439         "head", use std::vector.
8440         (struct decl_field_list): Remove.
8441         (struct field_info): Add initializers.
8442         <fields, baseclasses>: Now std::vector.
8443         <nbaseclasses, nfnfields, typedef_field_list_count,
8444         nested_types_list_count>: Remove.
8445         (dwarf2_add_field, dwarf2_add_type_defn)
8446         (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
8447         (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
8448         (process_structure_scope): Update.
8449
8450 2018-03-11  Tom Tromey  <tom@tromey.com>
8451
8452         * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
8453         for use by std::sort.
8454         (build_type_psymtabs_1): Use std::vector.
8455
8456 2018-03-09  Eli Zaretskii  <eliz@gnu.org>
8457
8458         * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
8459         and LIBMPFR in the printed configuration.
8460
8461 2018-03-08  Tom Tromey  <tom@tromey.com>
8462
8463         * source.c (get_filename_and_charpos): Use scoped_fd.
8464         * nto-procfs.c (procfs_open_1): Use scoped_fd.
8465         (procfs_pidlist): Likewise.
8466         * procfs.c (proc_get_LDT_entry): Use scoped_fd.
8467         (iterate_over_mappings): Likewise.
8468
8469 2018-03-08  Tom Tromey  <tom@tromey.com>
8470
8471         * infcall.c (struct call_return_meta_info)
8472         <stack_temporaries_enabled>: Remove.
8473         (get_call_return_value, call_function_by_hand_dummy): Update.
8474         * thread.c (disable_thread_stack_temporaries): Remove.
8475         (enable_thread_stack_temporaries): Remove.
8476         (thread_stack_temporaries_enabled_p): Return bool.
8477         (push_thread_stack_temporary, value_in_thread_stack_temporaries)
8478         (get_last_thread_stack_temporary): Update.
8479         * eval.c (evaluate_subexp): Update.
8480         * gdbthread.h (class enable_thread_stack_temporaries): Now a
8481         class, not a function.
8482         (value_ptr, value_vec): Remove typedefs.
8483         (class thread_info) <stack_temporaries_enabled>: Now bool.
8484         <stack_temporaries>: Now a std::vector.
8485         (thread_stack_temporaries_enabled_p)
8486         (value_in_thread_stack_temporaries): Return bool.
8487
8488 2018-03-08  Simon Marchi  <simon.marchi@ericsson.com>
8489
8490         * remote.c (putpkt_binary): Fix omitted bytes reporting.
8491         (getpkt_or_notif_sane_1): Likewise.
8492
8493 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
8494
8495         * build-id.c (build_id_to_debug_bfd): Use std::string.
8496
8497 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
8498
8499         * build-id.c (find_separate_debug_file_by_buildid): Return
8500         std::string.
8501         * build-id.h (find_separate_debug_file_by_buildid): Return
8502         std::string.
8503         * coffread.c (coff_symfile_read): Adjust to std::string.
8504         * elfread.c (elf_symfile_read): Adjust to std::string.
8505         * symfile.c (separate_debug_file_exists): Change parameter to
8506         std::string.
8507         (find_separate_debug_file): Return std::string.
8508         (find_separate_debug_file_by_debuglink): Return std::string.
8509         * symfile.h (find_separate_debug_file_by_debuglink): Return
8510         std::string.
8511
8512 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
8513
8514         * common/xml-utils.c (xml_escape_text): Move code to...
8515         (xml_escape_text_append): ... this new function.
8516         * common/xml-utils.h (xml_escape_text_append): New declaration.
8517         * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
8518         New function.
8519         (_initialize_xml_utils): register test_xml_escape_text_append as
8520         a selftest.
8521
8522 2018-03-07  Alan Hayward  <alan.hayward@arm.com>
8523
8524         * defs.h: Remove MAX_REGISTER_SIZE.
8525         * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
8526         asserts.
8527         * python/py-unwind.c (pyuw_sniffer): Likewise.
8528
8529 2018-03-07  Tom Tromey  <tom@tromey.com>
8530
8531         * linux-tdep.c (linux_info_proc): Update.
8532         * target.h (struct target_ops) <to_fileio_readlink>: Return
8533         optional<string>.
8534         (target_fileio_readlink): Return optional<string>.
8535         * remote.c (remote_hostio_readlink): Return optional<string>.
8536         * inf-child.c (inf_child_fileio_readlink): Return
8537         optional<string>.
8538         * target.c (target_fileio_readlink): Return optional<string>.
8539
8540 2018-03-07  Andrew Burgess  <andrew.burgess@embecosm.com>
8541
8542         * regcache.c (cooked_read_test): Add riscv to the list of
8543         architectures that have a save_reggroup.
8544
8545 2018-03-07  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8546
8547         * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
8548         value is not a dynamic class object.
8549
8550 2018-03-06  Tom Tromey  <tom@tromey.com>
8551
8552         * rust-exp.y: Formatting fixes.
8553
8554 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
8555
8556         * riscv-tdep.c (riscv_register_name): Remove target description
8557         support.
8558         (riscv_gdbarch_init): Remove target description check.
8559
8560 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
8561
8562         * riscv-tdep.c: Remove 'Contributed by ...' lines from header
8563         comment.
8564         * riscv-tdep.h: Likewise.
8565
8566 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
8567
8568         * riscv-tdep.c (riscv_pseudo_register_read): Delete.
8569         (riscv_pseudo_register_write): Delete.
8570         (riscv_gdbarch_init): Remove all use of pseudo registers.
8571
8572 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
8573
8574         * record-btrace.c (btrace_print_lines): Replace cleanup
8575         parameter with RAII equivalents.
8576         (btrace_insn_history): Replace cleanup with RAII equivalents.
8577         * ui-out.h (make_cleanup_ui_out_list_begin_end,
8578         make_cleanup_ui_out_tuple_begin_end): Remove.
8579         * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
8580         make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
8581         make_cleanup_ui_out_list_begin_end): Remove.
8582
8583 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
8584
8585         * record-btrace.c (record_btrace_maybe_mark_async_event): Change
8586         parameter types to std::vector.  Use bool.
8587         (record_btrace_wait): Replace VEC(tp_t) with
8588         std::vector<thread_info *>.
8589         * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
8590
8591 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
8592
8593         * record-btrace.c (record_btrace_disable_callback): Remove.
8594         (struct scoped_btrace_disable): New.
8595         (record_btrace_open): Use scoped_btrace_disable.
8596
8597 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
8598
8599         * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
8600         reading values from registers.
8601
8602 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
8603
8604         * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
8605         where appropriate.
8606
8607 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
8608
8609         * riscv-tdep.c (riscv_print_arg_location): Add header comment,
8610         change parameter type.  Use GDB's print functions, and use
8611         core_addr_to_string where appropriate.
8612         (riscv_push_dummy_call): Use core_addr_to_string where
8613         appropriate, update call to riscv_print_arg_location, and reindent
8614         a few lines.
8615         (riscv_return_value): Update call to riscv_print_arg_location.
8616
8617 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
8618             Tim Newsome <tim@sifive.com>
8619             Albert Ou <a0u@eecs.berkeley.edu>
8620             Darius Rad <darius@bluespec.com>
8621
8622         * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
8623         (HFILES_NO_SRCDIR): Add riscv-tdep.h.
8624         (ALLDEPFILES): Add riscv-tdep.c
8625         * configure.tgt: Add riscv support.
8626         * riscv-tdep.c: New file.
8627         * riscv-tdep.h: New file.
8628         * NEWS: Mention new target.
8629         * MAINTAINERS: Add entry for riscv.
8630
8631 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
8632
8633         * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
8634         fields within aggregates.
8635
8636 2018-03-04  Simon Marchi  <simon.marchi@polymtl.ca>
8637
8638         * record-btrace.c (btrace_print_lines): Change type of flags to
8639         gdb_disassembly_flags.
8640
8641 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
8642
8643         * fbsd-nat.c: Include "inf-ptrace.h".
8644         (USE_SIGTRAP_SIGINFO): Conditionally define.
8645         [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
8646         (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
8647         [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
8648         function.
8649         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
8650         Likewise.
8651         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
8652         Likewise.
8653         (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
8654         "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
8655         "supports_stopped_by_hw_breakpoint" target methods.
8656
8657 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
8658
8659         * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
8660         * fbsd-nat.c (debug_fbsd_nat): New variable.
8661         (show_fbsd_nat_debug): New function.
8662         (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
8663         (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
8664
8665 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
8666
8667         * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
8668         * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
8669         prototype.
8670         * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
8671         (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
8672         method.
8673
8674 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
8675
8676         * common/gdb_vecs.c (free_char_ptr_vec): Remove.
8677         * common/gdb_vecs.h (free_char_ptr_vec): Remove.
8678
8679 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
8680
8681         * charset.c (struct charset_vector): New.
8682         (charsets): Change type to charset_vector.
8683         (find_charset_names): Adjust.
8684         (add_one): Adjust.
8685         (_initialize_charset): Adjust.
8686
8687 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
8688
8689         * progspace.h (struct program_space) <deleted_solibs>: Change
8690         type to std::vector<std::string>.
8691         * progspace.c (clear_program_space_solib_cache): Adjust.
8692         * breakpoint.c (print_solib_event): Adjust.
8693         (check_status_catch_solib): Adjust.
8694         * solib.c (update_solib_list): Adjust.
8695         * ui-out.h (class ui_out) <field_string>: New overload.
8696         * ui-out.c (ui_out::field_string): New overload.
8697
8698 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
8699
8700         * progspace.h (struct program_space): Add constructor and
8701         destructor, initialize fields.
8702         (add_program_space): Remove.
8703         * progspace.c (add_program_space): Rename to...
8704         (program_space::program_space): ... this.
8705         (release_program_space): Rename to...
8706         (program_space::~program_space): ... this.
8707         (delete_program_space): Use delete to delete program_space.
8708         (initialize_progspace): Use new to allocate program_space.
8709         * inferior.c (add_inferior_with_spaces): Likewise.
8710         (clone_inferior_command): Likewise.
8711         * infrun.c (follow_fork_inferior): Likewise.
8712         (handle_vfork_child_exec_or_exit): Likewise.
8713
8714 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
8715
8716         * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
8717         (delim_string_to_char_ptr_vec): Return std::vector of
8718         gdb::unique_xmalloc_ptr.
8719         (dirnames_to_char_ptr_vec_append): Take std::vector of
8720         gdb::unique_xmalloc_ptr.
8721         (dirnames_to_char_ptr_vec): Return std::vector of
8722         gdb::unique_xmalloc_ptr.
8723         * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
8724         Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
8725         (delim_string_to_char_ptr_vec): Return an std::vector of
8726         gdb::unique_xmalloc_ptr, adjust the code.
8727         (dirnames_to_char_ptr_vec_append): Take an std::vector of
8728         gdb::unique_xmalloc_ptr, adjust the code.
8729         (dirnames_to_char_ptr_vec): Return an std::vector of
8730         gdb::unique_xmalloc_ptr, adjust the code.
8731         * auto-load.c (auto_load_safe_path_vec): Change type to
8732         std::vector of gdb::unique_xmalloc_ptr.
8733         (auto_load_expand_dir_vars): Return an std::vector of
8734         gdb::unique_xmalloc_ptr, adjust the code.
8735         (auto_load_safe_path_vec_update): Adjust.
8736         (filename_is_in_auto_load_safe_path_vec): Adjust.
8737         (auto_load_objfile_script_1): Adjust.
8738         * build-id.c (build_id_to_debug_bfd): Adjust.
8739         * linux-thread-db.c (thread_db_load_search): Adjust.
8740         * source.c (add_path): Adjust.
8741         (openp): Adjust.
8742         * symfile.c (find_separate_debug_file): Adjust.
8743         * utils.c (do_free_char_ptr_vec): Remove.
8744         (make_cleanup_free_char_ptr_vec): Remove.
8745
8746 2018-03-01  Sergio Durigan Junior  <sergiodj@redhat.com>
8747
8748         PR gdb/22907
8749         * common/pathstuff.c: Conditionally include "<windows.h>".
8750
8751 2018-03-01  Georg Sauthoff  <mail@georg.so>
8752
8753         PR gdb/22888
8754         * gcore.in: Quote variables and switch interpreter to bash.
8755
8756 2018-03-01  Tom Tromey  <tom@tromey.com>
8757
8758         * dwarf2read.c (alloc_discriminant_info): Fix default_index
8759         assertion.  Add assertion for discriminant_index.
8760         (quirk_rust_enum): Use correct base type name in univariant case.
8761
8762 2018-03-01  Simon Marchi  <simon.marchi@ericsson.com>
8763
8764         * record.c (get_call_history_modifiers): Return a
8765         record_print_flags.
8766         (cmd_record_call_history): Adjust.
8767         * record-btrace.c (record_btrace_call_history): Adjust.
8768         (record_btrace_call_history_range): Adjust.
8769         (record_btrace_call_history_from): Adjust.
8770         * target-debug.h (target_debug_print_record_print_flags): New.
8771         * target-delegates.c: Re-generate.
8772         * target.c (target_call_history): Change flags type.
8773         (target_call_history_from): Likewise.
8774         (target_call_history_range): Likewise.
8775         * target.h (struct target_ops) <target_call_history>: Likewise.
8776         (target_call_history_from): Likewise.
8777         (target_call_history_range): Likewise.
8778
8779 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
8780             Simon Marchi  <simon.marchi@polymtl.ca>
8781
8782         * common/common-utils.c: Include "sys/stat.h".
8783         (is_regular_file): Move here from "source.c"; change return
8784         type to "bool".
8785         * common/common-utils.h (is_regular_file): New prototype.
8786         * common/pathstuff.c (contains_dir_separator): New function.
8787         * common/pathstuff.h (contains_dir_separator): New prototype.
8788         * source.c: Don't include "sys/stat.h".
8789         (is_regular_file): Move to "common/common-utils.c".
8790
8791 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
8792
8793         * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
8794         (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
8795         * auto-load.c: Include "common/pathstuff.h".
8796         * common/common-def.h (current_directory): Move here.
8797         * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
8798         function.
8799         * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
8800         prototype.
8801         * common/pathstuff.c: New file.
8802         * common/pathstuff.h: New file.
8803         * compile/compile.c: Include "common/pathstuff.h".
8804         * defs.h (current_directory): Move to "common/common-defs.h".
8805         * dwarf2read.c: Include "common/pathstuff.h".
8806         * exec.c: Likewise.
8807         * guile/scm-safe-call.c: Likewise.
8808         * linux-thread-db.c: Likewise.
8809         * main.c: Likewise.
8810         * nto-tdep.c: Likewise.
8811         * objfiles.c: Likewise.
8812         * source.c: Likewise.
8813         * symtab.c: Likewise.
8814         * utils.c: Include "common/pathstuff.h".
8815         (gdb_realpath): Move to "common/pathstuff.c".
8816         (gdb_realpath_keepfile): Likewise.
8817         (gdb_abspath): Likewise.
8818         * utils.h (gdb_realpath): Move to "common/pathstuff.h".
8819         (gdb_realpath_keepfile): Likewise.
8820         (gdb_abspath): Likewise.
8821
8822 2018-02-28  John Baldwin  <jhb@FreeBSD.org>
8823
8824         * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
8825         wildcard process pid for super_resume for kernels with a
8826         specific bug.
8827
8828 2018-02-27  Phil Muldoon  <pmuldoon@redhat.com>
8829
8830         * compile/compile.c (get_args): Add additional comments
8831         explaining function.
8832
8833 2018-02-27  Simon Marchi  <simon.marchi@polymtl.ca>
8834             Tom Tromey  <tom@tromey.com>
8835
8836         * target.h (memory_write_request_s): Remove typedef.  Don't define
8837         VEC.
8838         (target_write_memory_blocks): Change argument to std::vector.
8839         (struct memory_write_request): Add constructor.
8840         * target-memory.c (compare_block_starting_address): Return bool.
8841         Change argument types.
8842         (claim_memory): Change arguments to use std::vector.
8843         (split_regular_and_flash_blocks, blocks_to_erase)
8844         (compute_garbled_blocks): Likewise.
8845         (cleanup_request_data, cleanup_write_requests_vector): Remove.
8846         (target_write_memory_blocks): Change argument to std::vector.
8847         * symfile.c (struct load_section_data): Add constructor and
8848         destructor.  Use std::vector for "requests".
8849         (struct load_progress_data): Add initializers.
8850         (load_section_callback): Update.  Use "new".
8851         (clear_memory_write_data): Remove.
8852         (generic_load): Update.
8853
8854 2018-02-27  Alan Hayward  <alan.hayward@arm.com>
8855
8856         * arch/aarch64.h: Use common/tdesc.h.
8857
8858 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
8859
8860         * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
8861         architecture with a 64-bit ABI.
8862
8863 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
8864
8865         * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
8866         ahead of target description loading.
8867
8868 2018-02-26  Tom Tromey  <tom@tromey.com>
8869
8870         * stack.c (backtrace_command_1): Update.
8871         * python/python-internal.h (gdbpy_apply_frame_filter): Change type
8872         of "flags".
8873         * python/py-framefilter.c (py_print_frame)
8874         (gdbpy_apply_frame_filter): Change type of "flags".
8875         * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
8876         of "flags".
8877         (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
8878         (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
8879         * extension.h (enum frame_filter_flag): Rename from
8880         frame_filter_flags.
8881         (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
8882         (apply_ext_lang_frame_filter): Change type of "flags".
8883         * extension.c (apply_ext_lang_frame_filter): Change type of
8884         "flags".
8885         * extension-priv.h (struct extension_language_ops)
8886         <apply_frame_filter>: Change type of "flags".
8887
8888 2018-02-26  Tom Tromey  <tom@tromey.com>
8889
8890         PR python/16497:
8891         * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag.  Fix
8892         off-by-one in py_end computation.
8893         * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
8894         PRINT_MORE_FRAMES.
8895         * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
8896         constant.
8897
8898 2018-02-26  Tom Tromey  <tom@tromey.com>
8899
8900         * dwarf2read.c (struct variant_field): New.
8901         (struct nextfield) <variant>: New field.
8902         (dwarf2_add_field): Handle DW_TAG_variant_part.
8903         (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
8904         discriminated union.
8905         (read_structure_type): Handle DW_TAG_variant_part.
8906         (handle_struct_member_die): New function, extracted from
8907         process_structure_scope.  Handle DW_TAG_variant.
8908         (process_structure_scope): Handle discriminated unions.  Call
8909         handle_struct_member_die.
8910
8911 2018-02-26  Tom Tromey  <tom@tromey.com>
8912
8913         * rust-lang.h (rust_last_path_segment): Declare.
8914         * rust-lang.c (rust_last_path_segment): Now public.  Change
8915         contract.
8916         (struct disr_info): Remove.
8917         (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
8918         (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
8919         (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
8920         (rust_enum_p, rust_enum_variant): New function.
8921         (rust_underscore_fields): Remove "offset" parameter.
8922         (rust_print_enum): New function.
8923         (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
8924         <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
8925         (rust_print_struct_def): Add "for_rust_enum" parameter.  Handle
8926         enums.
8927         (rust_internal_print_type): New function, from rust_print_type.
8928         Remove enum code.
8929         (rust_print_type): Call rust_internal_print_type.
8930         (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
8931         Update enum handling.
8932         * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
8933         (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
8934         (rust_union_quirks): New functions.
8935         (process_full_comp_unit, process_full_type_unit): Call
8936         rust_union_quirks.
8937         (process_structure_scope): Update rust_unions if necessary.
8938
8939 2018-02-26  Tom Tromey  <tom@tromey.com>
8940
8941         * value.h (value_union_variant): Declare.
8942         * valops.c (value_union_variant): New function.
8943         * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
8944         (struct discriminant_info): New.
8945         (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
8946         enumerator.
8947         (struct main_type) <flag_discriminated_union>: New field.
8948
8949 2018-02-26  Tom Tromey  <tom@tromey.com>
8950
8951         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8952         unittests/unpack-selftests.c.
8953         * unittests/unpack-selftests.c: New file.
8954         * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
8955
8956 2018-02-26  Yao Qi  <yao.qi@linaro.org>
8957
8958         * dwarf2read.c (struct partial_die_info) <read>: New method.
8959         (read_partial_die): Remove the declaration.
8960         (load_partial_dies): Update.
8961         (partial_die_info::partial_die_info):
8962         (read_partial_die): Change it to partial_die_info::read.
8963
8964 2018-02-26  Yao Qi  <yao.qi@linaro.org>
8965
8966         * dwarf2read.c (struct partial_die_info) <fixup>: New method.
8967         (fixup_partial_die): Remove declaration.
8968         (scan_partial_symbols): Update.
8969         (partial_die_parent_scope): Likewise.
8970         (partial_die_full_name): Likewise.
8971         (fixup_partial_die): Change it to partial_die_info::fixup.
8972
8973 2018-02-26  Yao Qi  <yao.qi@linaro.org>
8974
8975         * dwarf2read.c (read_partial_die): Update the declaration.
8976         (load_partial_dies): Caller update.
8977         (read_partial_die): Remove one argument abbrev_len.
8978
8979 2018-02-26  Yao Qi  <yao.qi@linaro.org>
8980
8981         * dwarf2read.c (struct partial_die_info): Add ctor, delete
8982         assignment operator.
8983         (load_partial_dies): Use ctor and copy ctor.
8984         (read_partial_die): Update.
8985         (dwarf2_cu::find_partial_die): Use ctor.
8986
8987 2018-02-26  Yao Qi  <yao.qi@linaro.org>
8988
8989         * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
8990         (find_partial_die_in_comp_unit): Change it to
8991         dwarf2_cu::find_partial_die.
8992         (find_partial_die): Update.
8993
8994 2018-02-26  Yao Qi  <yao.qi@linaro.org>
8995
8996         * dwarf2read.c (read_partial_die): Remove the code checking abbrev
8997         is NULL.
8998
8999 2018-02-26  Yao Qi  <yao.qi@linaro.org>
9000
9001         * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
9002
9003 2018-02-26  Alan Hayward  <alan.hayward@arm.com>
9004
9005         * arch/amd64.h: Use common/tdesc.h.
9006         * arch/i386.c: Likewise.
9007         * arch/i386.h: Likewise.
9008         * arch/tic6x.c: Likewise.
9009         * arch/tdesc.h: Move file from here...
9010         * common/tdesc.h: ...to here.
9011         * features/aarch64-core.c: Regenerate.
9012         * features/aarch64-fpu.c: Regenerate.
9013         * features/i386/32bit-avx.c: Regenerate.
9014         * features/i386/32bit-avx512.c: Regenerate.
9015         * features/i386/32bit-core.c: Regenerate.
9016         * features/i386/32bit-linux.c: Regenerate.
9017         * features/i386/32bit-mpx.c: Regenerate.
9018         * features/i386/32bit-pkeys.c: Regenerate.
9019         * features/i386/32bit-sse.c: Regenerate.
9020         * features/i386/64bit-avx.c: Regenerate.
9021         * features/i386/64bit-avx512.c: Regenerate.
9022         * features/i386/64bit-core.c: Regenerate.
9023         * features/i386/64bit-linux.c: Regenerate.
9024         * features/i386/64bit-mpx.c: Regenerate.
9025         * features/i386/64bit-pkeys.c: Regenerate.
9026         * features/i386/64bit-segments.c: Regenerate.
9027         * features/i386/64bit-sse.c: Regenerate.
9028         * features/i386/x32-core.c: Regenerate.
9029         * features/tic6x-c6xp.c: Regenerate.
9030         * features/tic6x-core.c: Regenerate.
9031         * features/tic6x-gp.c: Regenerate.
9032         * target-descriptions.c: Use common/tdesc.h.
9033         * target-descriptions.h: Likewise.
9034
9035 2018-02-24  Tom Tromey  <tom@tromey.com>
9036
9037         * linux-thread-db.c (try_thread_db_load_from_pdir_1)
9038         (try_thread_db_load_from_dir, thread_db_load_search): Use
9039         std::string.
9040         (info_auto_load_libthread_db_compare): Return bool.  Change
9041         argument types.
9042         (info_auto_load_libthread_db): Use std::vector, std::string.
9043         Remove cleanups.
9044
9045 2018-02-24  Tom Tromey  <tom@tromey.com>
9046
9047         * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
9048         std::string.
9049         * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
9050         std::string*.
9051         * gdbarch.c: Rebuild.
9052         * gdbarch.h: Rebuild.
9053         * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
9054         * arch-utils.h (default_fast_tracepoint_valid_at): Update.
9055         * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
9056         std::string*.
9057
9058 2018-02-23  Simon Marchi  <simon.marchi@polymtl.ca>
9059
9060         * gdbtypes.h (sect_offset): Change type to uint64_t.
9061         (sect_offset_str): New function.
9062         * dwarf2read.c (create_addrmap_from_aranges): Use
9063         sect_offset_str.
9064         (error_check_comp_unit_head): Likewise.
9065         (create_debug_type_hash_table): Likewise.
9066         (read_cutu_die_from_dwo): Likewise.
9067         (init_cutu_and_read_dies): Likewise.
9068         (init_cutu_and_read_dies_no_follow): Likewise.
9069         (process_psymtab_comp_unit_reader): Likewise.
9070         (partial_die_parent_scope): Likewise.
9071         (peek_die_abbrev): Likewise.
9072         (process_queue): Likewise.
9073         (dwarf2_physname): Likewise.
9074         (read_namespace_alias): Likewise.
9075         (read_import_statement): Likewise.
9076         (create_dwo_cu_reader): Likewise.
9077         (create_cus_hash_table): Likewise.
9078         (lookup_dwo_cutu): Likewise.
9079         (inherit_abstract_dies): Likewise.
9080         (read_func_scope): Likewise.
9081         (read_call_site_scope): Likewise.
9082         (dwarf2_add_member_fn): Likewise.
9083         (read_common_block): Likewise.
9084         (read_module_type): Likewise.
9085         (read_typedef): Likewise.
9086         (read_subrange_type): Likewise.
9087         (load_partial_dies): Likewise.
9088         (read_partial_die): Likewise.
9089         (find_partial_die): Likewise.
9090         (read_str_index): Likewise.
9091         (dwarf2_string_attr): Likewise.
9092         (build_error_marker_type): Likewise.
9093         (lookup_die_type): Likewise.
9094         (dump_die_shallow): Likewise.
9095         (follow_die_ref): Likewise.
9096         (dwarf2_fetch_die_loc_sect_off): Likewise.
9097         (dwarf2_fetch_constant_bytes): Likewise.
9098         (follow_die_sig): Likewise.
9099         (get_signatured_type): Likewise.
9100         (get_DW_AT_signature_type): Likewise.
9101         (dwarf2_find_containing_comp_unit): Likewise.
9102         (set_die_type): Likewise.
9103
9104 2018-02-21  John Baldwin  <jhb@FreeBSD.org>
9105
9106         * arch/aarch64.c: Include "common-defs.h".
9107         * arch/amd64.c: Likewise.
9108         * arch/i386.c: Likewise.
9109
9110 2018-02-21  Tom Tromey  <tom@tromey.com>
9111
9112         * value.h: (extract_field_op): Update.
9113         * eval.c (extract_field_op): Return a const char *.
9114         * expression.h (parse_expression_for_completion): Update.
9115         * completer.c (complete_expression): Update.
9116         (add_struct_fields): Make fieldname const.
9117         * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
9118         (mark_completion_tag, parse_exp_in_context_1): Update.
9119         (parse_expression_for_completion): Change "name" to
9120         unique_xmalloc_ptr*.
9121
9122 2018-02-21  Tom Tromey  <tom@tromey.com>
9123
9124         * infcall.c (call_function_by_hand_dummy): Use std::vector.
9125
9126 2018-02-21  Yao Qi  <yao.qi@linaro.org>
9127
9128         * avr-tdep.c (avr_read_pc): Change parameter type to
9129         readable_regcache.
9130         * gdbarch.sh (read_pc): Likewise.
9131         * gdbarch.c: Re-generated.
9132         * gdbarch.h: Re-generated.
9133         * hppa-tdep.c (hppa_read_pc): Change parameter type to
9134         readable_regcache.
9135         * ia64-tdep.c (ia64_read_pc): Likewise.
9136         * mips-tdep.c (mips_read_pc): Likewise.
9137         * spu-tdep.c (spu_read_pc): Likewise.
9138
9139 2018-02-21  Yao Qi  <yao.qi@linaro.org>
9140
9141         * Makefile.in (COMMON_SFILES): Add regcache-dump.c
9142         * regcache-dump.c: New file.
9143         * regcache.c: Move register_dump to regcache-dump.c.
9144         (maintenance_print_registers): Likewise.
9145         (maintenance_print_raw_registers): Likewise.
9146         (maintenance_print_cooked_registers): Likewise.
9147         (maintenance_print_register_groups): Likewise.
9148         (maintenance_print_remote_registers): Likewise.
9149         (_initialize_regcache): Likewise.
9150         * regcache.h (register_dump): Moved from regcache.c.
9151
9152 2018-02-21  Yao Qi  <yao.qi@linaro.org>
9153
9154         * regcache.c (regcache::regcache): Update.
9155         (regcache::invalidate): Move it to detached_regcache::invalidate.
9156         (get_thread_arch_aspace_regcache): Update.
9157         (regcache::raw_update): Update.
9158         (regcache::cooked_read): Remove some code.
9159         (regcache::cooked_read_value): Likewise.
9160         (regcache::raw_write): Remove assert on m_readonly_p.
9161         (regcache::raw_supply_integer): Move it to
9162         detached_regcache::raw_supply_integer.
9163         (regcache::raw_supply_zeroed): Likewise.
9164         * regcache.h (detached_regcache) <raw_supply_integer>: New
9165         declaration.
9166         <raw_supply_zeroed, invalidate>: Likewise.
9167         (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
9168         <invalidate>: Likewise.
9169         <m_readonly_p>: Removed.
9170
9171 2018-02-21  Yao Qi  <yao.qi@linaro.org>
9172
9173         * infcmd.c (get_return_value): Let stop_regs point to
9174         get_current_regcache.
9175         * regcache.c (regcache::regcache): Remove.
9176         (register_dump_reg_buffer): New class.
9177         (regcache_print): Adjust.
9178         * regcache.h (regcache): Remove constructors.
9179
9180 2018-02-21  Yao Qi  <yao.qi@linaro.org>
9181
9182         * regcache.c (class register_dump): New class.
9183         (register_dump_regcache, register_dump_none): New class.
9184         (register_dump_remote, register_dump_groups): New class.
9185         (regcache_print): Update.
9186         * regcache.h (regcache_dump_what): Move it to regcache.c.
9187         (regcache) <dump>: Remove.
9188
9189 2018-02-21  Yao Qi  <yao.qi@linaro.org>
9190
9191         * jit.c (struct jit_unwind_private) <regcache>: Change its type to
9192          reg_buffer_rw *.
9193         (jit_unwind_reg_set_impl): Call raw_supply.
9194         (jit_frame_sniffer): Use reg_buffer_rw.
9195         * record-full.c (record_full_core_regbuf): Change its type.
9196         (record_full_core_open_1): Use reg_buffer_rw.
9197         (record_full_close): Likewise.
9198         (record_full_core_fetch_registers): Use regcache->raw_supply.
9199         (record_full_core_store_registers): Likewise.
9200         * regcache.c (regcache::get_register_status): Move it to
9201         reg_buffer.
9202         (regcache_raw_set_cached_value): Remove.
9203         (regcache::raw_set_cached_value): Remove.
9204         (regcache::raw_write): Call raw_supply.
9205         (regcache::raw_supply): Move it to reg_buffer_rw.
9206         * regcache.h (regcache_raw_set_cached_value): Remove.
9207         (reg_buffer_rw): New class.
9208
9209 2018-02-21  Yao Qi  <yao.qi@linaro.org>
9210
9211         * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
9212         readonly_detached_regcache.
9213         (dummy_frame_prev_register): Use regcache->cooked_read.
9214         * frame.c (frame_save_as_regcache): Change return type.
9215         (frame_pop): Update.
9216         * frame.h (frame_save_as_regcache): Update declaration.
9217         * inferior.h (get_infcall_suspend_state_regcache): Update
9218         declaration.
9219         * infrun.c (infcall_suspend_state) <registers>: use
9220         readonly_detached_regcache.
9221         (save_infcall_suspend_state): Don't use regcache_dup.
9222         (get_infcall_suspend_state_regcache): Change return type.
9223         * linux-fork.c (struct fork_info) <savedregs>: Change to
9224         readonly_detached_regcache.
9225         <pc>: New field.
9226         (fork_save_infrun_state): Don't use regcache_dup.
9227         (info_checkpoints_command): Adjust.
9228         * mi/mi-main.c (register_changed_p): Update declaration.
9229         (mi_cmd_data_list_changed_registers): Use
9230         readonly_detached_regcache.
9231         (register_changed_p): Change parameter type to
9232         readonly_detached_regcache.
9233         * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
9234         readonly_detached_regcache.
9235         (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
9236         * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
9237         New.
9238         (regcache::save): Move it to reg_buffer.
9239         (regcache::restore): Change parameter type.
9240         (regcache_dup): Remove.
9241         * regcache.h (reg_buffer) <save>: New method.
9242         (readonly_detached_regcache): New class.
9243         * spu-tdep.c (spu2ppu_cache) <regcache>: Use
9244         readonly_detached_regcache.
9245         (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
9246
9247 2018-02-21  Yao Qi  <yao.qi@linaro.org>
9248
9249         * frame.c (frame_save_as_regcache): Use regcache method save.
9250         (frame_pop): Use regcache method restore.
9251         * infrun.c (restore_infcall_suspend_state): Likewise.
9252         * linux-fork.c (fork_load_infrun_state): Likewise.
9253         * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
9254         save.
9255         * regcache.c (regcache_save): Remove.
9256         (regcache::restore): More asserts.
9257         (regcache_cpy): Remove.
9258         * regcache.h (regcache_save): Remove the declaration.
9259         (regcache::restore): Move from private to public.
9260         Remove the friend declaration of regcache_cpy.
9261         (regcache_cpy): Remove declaration.
9262
9263 2018-02-21  Yao Qi  <yao.qi@linaro.org>
9264
9265         * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
9266         parameter type to 'readable_regcache *'.
9267         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
9268         * arm-tdep.c (arm_neon_quad_read): Likewise.
9269         (arm_pseudo_read): Likewise.
9270         * avr-tdep.c (avr_pseudo_register_read): Likewise.
9271         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
9272         * frv-tdep.c (frv_pseudo_register_read): Likewise.
9273         * gdbarch.c: Re-generated.
9274         * gdbarch.h: Re-generated.
9275         * gdbarch.sh (pseudo_register_read): Change parameter type to
9276         'readable_regcache *'.
9277         (pseudo_register_read_value): Likewise.
9278         * h8300-tdep.c (pseudo_from_raw_register): Likewise.
9279         (h8300_pseudo_register_read): Likewise.
9280         * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
9281         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
9282         (i386_pseudo_register_read_into_value): Likewise.
9283         (i386_pseudo_register_read_value): Likewise.
9284         * i386-tdep.h (i386_pseudo_register_read_into_value): Update
9285         declaration.
9286         * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
9287         * m32c-tdep.c (m32c_raw_read): Likewise.
9288         (m32c_read_flg): Likewise.
9289         (m32c_banked_register): Likewise.
9290         (m32c_banked_read): Likewise.
9291         (m32c_sb_read): Likewise.
9292         (m32c_part_read): Likewise.
9293         (m32c_cat_read): Likewise.
9294         (m32c_r3r2r1r0_read): Likewise.
9295         (m32c_pseudo_register_read): Likewise.
9296         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
9297         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
9298         (mep_pseudo_cr64_read): Likewise.
9299         (mep_pseudo_register_read): Likewise.
9300         * mips-tdep.c (mips_pseudo_register_read): Likewise.
9301         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
9302         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
9303         * regcache.c (regcache::raw_read): Move it to readable_regcache.
9304         (regcache::cooked_read): Likewise.
9305         (regcache::cooked_read_value): Likewise.
9306         (regcache_cooked_read_signed):
9307         (regcache::cooked_read): Likewise.
9308         * regcache.h (readable_regcache): New class.
9309         (regcache): Inherit readable_regcache.  Move some methods to
9310         readable_regcache.
9311         * rl78-tdep.c (rl78_pseudo_register_read): Change
9312         parameter type to 'readable_regcache *'.
9313         * rs6000-tdep.c (do_regcache_raw_read): Remove.
9314         (e500_pseudo_register_read): Change parameter type to
9315         'readable_regcache *'.
9316         (dfp_pseudo_register_read): Likewise.
9317         (vsx_pseudo_register_read): Likewise.
9318         (efpr_pseudo_register_read): Likewise.
9319         * s390-tdep.c (s390_pseudo_register_read): Likewise.
9320         * sh-tdep.c (sh_pseudo_register_read): Likewise.
9321         * sh64-tdep.c (pseudo_register_read_portions): Likewise.
9322         (sh64_pseudo_register_read): Likewise.
9323         * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
9324         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
9325         * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
9326         (spu_pseudo_register_read): Likewise.
9327         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
9328         (xtensa_pseudo_register_read): Likewise.
9329
9330 2018-02-21  Yao Qi  <yao.qi@linaro.org>
9331
9332         * regcache.c (regcache::regcache): Call reg_buffer ctor.
9333         (regcache::arch): Move it to reg_buffer::arch.
9334         (regcache::register_buffer): Likewise.
9335         (regcache::assert_regnum): Likewise.
9336         (regcache::num_raw_registers): Likewise.
9337         * regcache.h (reg_buffer): New class.
9338         (regcache): Inherit reg_buffer.
9339
9340 2018-02-20  Simon Marchi  <simon.marchi@ericsson.com>
9341
9342         * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
9343         gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
9344
9345 2018-02-20  Markus Metzger  <markus.t.metzger@intel.com>
9346
9347         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
9348
9349 2018-02-19  Alan Hayward  <alan.hayward@arm.com>
9350
9351         * Makefile.in: (COMMON_SFILES): Add common/*.c files.
9352         (SFILES): Remove common/*.c files.
9353         (COMMON_OBS): Remove some *.o files built from common/*.c files.
9354         * common/common.host: Add common reference.
9355         * configure.ac: Likewise.
9356         * configure: Regenerate.
9357
9358 2018-02-16  Yao Qi  <yao.qi@linaro.org>
9359
9360         * block.c (block_namespace_info): Inherit allocate_on_obstack.
9361         (block_initialize_namespace): Use new.
9362         * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
9363         (dwarf2_free_objfile): Use delete.
9364         * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
9365         (copy_type_recursive): Use new.
9366         * gdb_obstack.h (allocate_on_obstack): New.
9367
9368 2018-02-15  Yao Qi  <yao.qi@linaro.org>
9369
9370         PR gdb/22849
9371         * inferior.c (exit_inferior_1): Reset inf->control.
9372
9373 2018-02-15  Joel Brobecker  <brobecker@adacore.com>
9374
9375         * ada-lang.c (ada_to_fixed_value_create): Delete advance
9376         declaration.
9377
9378 2018-02-14  Pedro Alves  <palves@redhat.com>
9379
9380         * frame-unwind.c (frame_unwind_try_unwinder): Always call
9381         frame_cleanup_after_sniffer on exception.
9382
9383 2018-02-14  Tom Tromey  <tom@tromey.com>
9384
9385         * solist.h (struct target_so_ops) <bfd_open>: Make pathname
9386         const.
9387         (solib_bfd_open): Make pathname const.
9388         * solib.c (solib_bfd_open): Make pathname const.
9389         * solib-spu.c (spu_bfd_fopen): Make name const.
9390         (spu_bfd_open): Make pathname const.
9391         * solib-darwin.c (darwin_bfd_open): Make pathname const.
9392         * solib-aix.c (solib_aix_bfd_open): Make pathname const.
9393
9394 2018-02-14  Tom Tromey  <tom@tromey.com>
9395
9396         * symfile.c (symfile_bfd_open): Update.
9397         * source.h (openp, source_full_path_of, find_and_open_source):
9398         Change argument type to unique_xmalloc_ptr.
9399         * source.c (openp): Take a unique_xmalloc_ptr.
9400         (source_full_path_of, find_and_open_source): Likewise.
9401         (open_source_file, symtab_to_fullname): Update.
9402         * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
9403         unique_xmalloc_ptr.
9404         * solib.c (solib_find_1): Use unique_xmalloc_ptr.
9405         (exec_file_find): Update.
9406         * psymtab.c (psymtab_to_fullname): Update.
9407         * nto-tdep.h (nto_find_and_open_solib): Update.
9408         * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
9409         unique_xmalloc_ptr.
9410         * exec.c (exec_file_attach): Update.
9411         * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
9412         * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
9413
9414 2018-02-14  Tom Tromey  <tom@tromey.com>
9415
9416         * solib.c: Include source.h.
9417         * nto-tdep.c: Include source.h.
9418         * mi/mi-cmd-env.c: Include source.h.
9419         * infcmd.c: Include source.h.
9420         * exec.c: Include source.h.
9421         * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
9422         (add_path, directory_switch, source_path, init_source_path): Move
9423         declarations...
9424         * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
9425         (add_path, directory_switch, source_path, init_source_path):
9426         ...here.
9427
9428 2018-02-14  Tom Tromey  <tom@tromey.com>
9429
9430         * solist.h (exec_file_find, solib_find): Return
9431         unique_xmalloc_ptr.
9432         (solib_bfd_fopen): Take a const char *.
9433         * solib.c (solib_find_1): Return unique_xmalloc_ptr.
9434         (exec_file_find, solib_find): Likewise.
9435         (solib_bfd_fopen): Do not take ownership of "pathname".
9436         (solib_bfd_open): Use unique_xmalloc_ptr.
9437         * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
9438         * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
9439         * infrun.c (follow_exec): Use unique_xmalloc_ptr.
9440         * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
9441
9442 2018-02-14  Joel Brobecker  <brobecker@adacore.com>
9443
9444         * ada-lang.c (name_match_type_from_name): Remove reference to
9445         ada_name_for_lookup in function's documentation.
9446         * ada-lang.h (ada_name_for_lookup): Delete declaration.
9447
9448 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
9449
9450         * defs.h (enum openp_flags): New enum.
9451         (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
9452         Move to enum openp_flags.
9453         (openp_flags): New enum flags.
9454         (openp): Change parameter type to openp_flags.
9455         * source.c (openp): Change parameter type to openp_flags.
9456         * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
9457         * dwarf2read.c (try_open_dwop_file): Use openp_flags.
9458
9459 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
9460
9461         * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
9462         per-command.
9463
9464 2018-02-12  Andrew Burgess  <andrew.burgess@embecosm.com>
9465
9466         * dwarf2read.c (dwarf2_release_queue): Delete function, move body
9467         into...
9468         (class dwarf2_queue_guard): ...the destructor of this new class.
9469         (dw2_do_instantiate_symtab): Create instance of the new class
9470         dwarf2_queue_guard, remove cleanup.
9471
9472 2018-02-09  Tom Tromey  <tom@tromey.com>
9473
9474         * source.c (find_source_lines): Don't reference past the end of
9475         the vector.
9476
9477 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
9478
9479         * remote.c (remote_btrace_maybe_reopen): Change error message.
9480         * btrace.c (btrace_enable): Likewise.
9481         (parse_xml_btrace): Likewise.
9482         (parse_xml_btrace_conf): Likewise.
9483
9484 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
9485
9486         * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
9487         (linux_enable_pt, linux_enable_bts): Call
9488         diagnose_perf_event_open_fail.
9489
9490 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
9491
9492         * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
9493         Remove parameter and change return type.  Update callers.  Move it.
9494         (linux_enable_bts, linux_enable_pt): Improve error message.
9495         (linux_enable_pt): Remove zero buffer size check.
9496         (linux_enable_btrace): Improve error messages.  Remove NULL return
9497         check.
9498
9499 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
9500
9501         * btrace.c (btrace_enable): Remove target_supports_btrace call.
9502         * nat/linux-btrace.c (perf_event_pt_event_type): Move.
9503         (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
9504         (linux_supports_pt, linux_supports_btrace): Remove.
9505         (linux_enable_bts): Call cpu_supports_bts.
9506         * nat/linux-btrace.h (linux_supports_btrace): Remove.
9507         * remote.c (remote_supports_btrace): Remove.
9508         (init_remote_ops): Remove remote_supports_btrace.
9509         * target-delegates.c: Regenerated.
9510         * target.c (target_supports_btrace): Remove.
9511         * target.h (target_ops) <to_supports_btrace>: Remove
9512         (target_supports_btrace): Remove.
9513         * x86-linux-nat.c (x86_linux_create_target): Remove
9514         linux_supports_btrace.
9515
9516 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
9517
9518         * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
9519         btrace failed.
9520         * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
9521         exception and use message in own exception.
9522
9523 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
9524
9525         * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
9526         (perf_event_pt_event_type): Use gdb_file_up.
9527         (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
9528         scoped_fd, and scoped_mmap.
9529
9530 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
9531
9532         * common/scoped_mmap.h: New.
9533         * unittests/scoped_mmap-selftest.c: New.
9534         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9535         unittests/scoped_mmap-selftest.c.
9536
9537 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
9538
9539         * common/scoped_fd.h: New.
9540         * unittests/scoped_fd-selftest.c: New.
9541         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9542         unittests/scoped_fd-selftest.c.
9543
9544 2018-02-09  Tom Tromey  <tom@tromey.com>
9545
9546         * auto-load.c (auto_load_section_scripts): Use
9547         gdb::unique_xmalloc_ptr.
9548
9549 2018-02-09  Tom Tromey  <tom@tromey.com>
9550
9551         * auto-load.c (execute_script_contents): Use std::string.
9552
9553 2018-02-09  Joel Brobecker  <brobecker@adacore.com>
9554
9555         * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
9556         Python function, rather than a new command.
9557
9558 2018-02-08  Tom Tromey  <tom@tromey.com>
9559
9560         * solib.c (solib_find_1): Use std::string.
9561         (solib_bfd_fopen): Use unique_xmalloc_ptr.
9562
9563 2018-02-08  Tom Tromey  <tom@tromey.com>
9564
9565         * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
9566
9567 2018-02-08  Tom Tromey  <tom@tromey.com>
9568
9569         * source.c (find_source_lines): Use gdb::def_vector.
9570
9571 2018-02-08  Tom Tromey  <tom@tromey.com>
9572
9573         * macrocmd.c (struct temporary_macro_definition): New.
9574         (macro_define_command): Use temporary_macro_definition.  Remove
9575         cleanups.
9576         (free_macro_definition_ptr): Remove.
9577
9578 2018-02-08  Tom Tromey  <tom@tromey.com>
9579
9580         * macroexp.c (maybe_expand): Use std::string.
9581
9582 2018-02-08  Tom Tromey  <tom@tromey.com>
9583
9584         * macroexp.c (struct macro_buffer): Add initializers for some
9585         members.
9586         (init_buffer, init_shared_buffer, free_buffer)
9587         (free_buffer_return_text): Remove.
9588         (macro_buffer): New constructors.
9589         (~macro_buffer): New destructor.
9590         (macro_buffer::set_shared): New method.
9591         (macro_buffer::resize_buffer, macro_buffer::appendc)
9592         (macro_buffer::appendmem): Now methods, not free functions.
9593         (set_token, append_tokens_without_splicing, stringify)
9594         (macro_stringify): Update.
9595         (gather_arguments): Change return type.  Remove argc_p argument,
9596         add args_ptr argument.  Use std::vector.
9597         (substitute_args): Remove argc argument.  Accept std::vector.
9598         (expand): Update.  Use std::vector.
9599         (scan, macro_expand, macro_expand_next): Update.
9600
9601 2018-02-08  Tom Tromey  <tom@tromey.com>
9602
9603         * symtab.c (default_collect_symbol_completion_matches_break_on):
9604         Use unique_xmalloc_ptr.
9605         * macroscope.h: (sal_macro_scope, user_macro_scope)
9606         (default_macro_scope): Return unique_xmalloc_ptr.
9607         * macroscope.c (sal_macro_scope, user_macro_scope)
9608         (default_macro_scope): Return unique_xmalloc_ptr.
9609         * macroexp.h (macro_expand, macro_expand_once): Return
9610         unique_xmalloc_ptr.
9611         * macroexp.c (macro_expand, macro_expand_once): Return
9612         unique_xmalloc_ptr.
9613         * macrocmd.c (macro_expand_command, macro_expand_once_command)
9614         (info_macro_command, info_macros_command): Use
9615         unique_xmalloc_ptr.
9616         * compile/compile-c-support.c (write_macro_definitions): Use
9617         unique_xmalloc_ptr.
9618         * c-exp.y (c_parse): Use unique_xmalloc_ptr.
9619
9620 2018-02-07  Simon Marchi  <simon.marchi@ericsson.com>
9621
9622         * value.c (value_static_field): Assign field type instead of
9623         containing type when returning an optimized out value.
9624
9625 2018-02-06  Yao Qi  <yao.qi@linaro.org>
9626
9627         * ft32-tdep.c (ft32_read_pc): Remove.
9628         (ft32_write_pc): Remove.
9629         (ft32_gdbarch_init): Update.
9630         * m32r-tdep.c (m32r_read_pc): Remove.
9631         (m32r_gdbarch_init): Update.
9632         * mep-tdep.c (mep_read_pc): Remove.
9633         (mep_gdbarch_init): Update.
9634         * microblaze-tdep.c (microblaze_write_pc): Remove.
9635         (microblaze_gdbarch_init): Update.
9636         * mn10300-tdep.c (mn10300_read_pc): Remove.
9637         (mn10300_write_pc): Remove.
9638         (mn10300_gdbarch_init): Update.
9639         * moxie-tdep.c (moxie_read_pc): Remove.
9640         (moxie_write_pc): Remove.
9641         (moxie_gdbarch_init): Update.
9642
9643 2018-02-06  Yao Qi  <yao.qi@linaro.org>
9644
9645         * expprint.c (print_subexp_standard): Handle
9646         OP_F77_UNDETERMINED_ARGLIST.
9647         (dump_subexp_body_standard): Likewise.
9648
9649 2018-02-05  Alan Hayward  <alan.hayward@arm.com>
9650
9651         * target-descriptions.c (tdesc_element_visitor) Add empty
9652         implementations.
9653         (tdesc_type): Move make_gdb_type from here.
9654         (tdesc_type_builtin): Likewise.
9655         (tdesc_type_vector): Likewise.
9656         (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
9657         (make_gdb_type_struct): Move from tdesc_type_with_fields.
9658         (make_gdb_type_union): Likewise.
9659         (make_gdb_type_flags): Likewise.
9660         (make_gdb_type_enum): Likewise.
9661         (make_gdb_type): New function.
9662         (tdesc_register_type): Use static make_gdb_type.
9663
9664 2018-02-05  Ruslan Kabatsayev <b7.10110111@gmail.com>
9665
9666         * infcmd.c (default_print_one_register_info): Align natural-format
9667         column values consistently one under another.
9668         (pad_to_column): New function.
9669
9670 2018-02-05  Joel Brobecker  <brobecker@adacore.com>
9671
9672         * dwarf2read.c (dwarf2_physname): Move commment.
9673
9674 2018-02-01  Leszek Swirski  <leszeks@google.com>
9675
9676         * varobj.c (varobj_formatted_print_options): Allow recursive
9677         pretty printing if pretty printing is enabled.
9678
9679 2018-02-01  Leszek Swirski  <leszeks@google.com>
9680
9681         * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
9682         names after a structop as a filename.
9683
9684 2018-02-01  Yao Qi  <yao.qi@linaro.org>
9685
9686         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
9687         (arm_record_coproc_data_proc): Likewise.
9688
9689 2018-02-01  Yao Qi  <yao.qi@linaro.org>
9690
9691         * arm-tdep.c (arm_record_extension_space): Change ret to signed.
9692
9693 2018-01-31  Nikola Prica  <nikola.prica@rt-rk.com>
9694
9695         * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
9696         assign shifted lr_reg to fdata->lr_register when lr_reg is set.
9697
9698 2018-01-31  Pedro Alves  <palves@redhat.com>
9699
9700         * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
9701         * inflow.c (child_terminal_save_inferior): Wrap reference to
9702         tcgetpgrp in HAVE_TERMIOS_H.
9703         (child_interrupt, child_pass_ctrlc): Wrap references to signal in
9704         _WIN32.
9705         * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
9706         always iterate over all inferiors.
9707         (gdbsim_cntrl_c): Adjust.
9708         * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
9709
9710 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
9711
9712         * gdbtypes.c (lookup_array_range_type): Make sure the array's
9713         index type is objfile-owned if the element type is as well.
9714
9715 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
9716
9717         GDB 8.1 released.
9718
9719 2018-01-30  Philipp Rudo  <prudo@linux.vnet.ibm.com>
9720
9721         * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
9722         "features/s390x-linux64.c".
9723         (_initialize_s390_linux_tdep): Remove initialization of tdescs
9724         s390_linux32 and s390x_linux64.
9725         (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
9726         default tdesc.
9727         * s390-tdep.c: Include "features/s390-linux32.c" and
9728         "features/s390x-linux64.c".
9729         (s390_tdesc_valid): Add check for tdesc_has_registers.
9730         (s390_gdbarch_init): Make sure there is always a valid tdesc.
9731         (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
9732         tdesc_s390x_linux64.
9733         * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
9734         tdesc_s390x_linux64 to...
9735         * s390-tdep.h: ...here.
9736
9737 2018-01-30  Pedro Alves  <palves@redhat.com>
9738
9739         PR gdb/13211
9740         * config.in, configure: Regenerate.
9741         * configure.ac: Check for getpgid.
9742         * go32-nat.c (go32_pass_ctrlc): New.
9743         (go32_target): Install it.
9744         * inf-child.c (inf_child_target): Install
9745         child_terminal_save_inferior, child_pass_ctrlc and
9746         child_interrupt.
9747         * inf-ptrace.c (inf_ptrace_interrupt): Delete.
9748         (inf_ptrace_target): No longer install it.
9749         * infcmd.c (interrupt_target_1): Adjust.
9750         * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
9751         (child_interrupt): Declare.
9752         (inferior::terminal_state): New.
9753         * inflow.c (struct terminal_info): Update comments.
9754         (inferior_process_group): Delete.
9755         (terminal_is_ours): Delete.
9756         (gdb_tty_state): New.
9757         (child_terminal_init): Adjust.
9758         (is_gdb_terminal, sharing_input_terminal_1)
9759         (sharing_input_terminal): New functions.
9760         (child_terminal_inferior): Adjust.  Use sharing_input_terminal.
9761         Set the process's actual process group in the foreground if
9762         possible.  Handle is_ours_for_output/is_ours distinction.  Don't
9763         mark terminal as the inferior's if not sharing GDB's terminal.
9764         Don't check attach_flag.
9765         (child_terminal_ours_for_output, child_terminal_ours): Adjust to
9766         pass down a target_terminal_state.
9767         (child_terminal_save_inferior): New, factored out from ...
9768         (child_terminal_ours_1): ... this.  Handle
9769         target_terminal_state::is_ours_for_output.
9770         (child_interrupt, child_pass_ctrlc): New.
9771         (inflow_inferior_exit): Clear the inferior's terminal_state.
9772         (copy_terminal_info): Copy the inferior's terminal state.
9773         (_initialize_inflow): Remove reference to terminal_is_ours.
9774         * inflow.h (inferior_process_group): Delete.
9775         * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
9776         * procfs.c (procfs_target): Don't install procfs_interrupt.
9777         (procfs_interrupt): Delete.
9778         * remote.c (remote_serial_quit_handler): Adjust.
9779         (remote_interrupt): Remove ptid parameter.  Adjust.
9780         * target-delegates.c: Regenerate.
9781         * target.c: Include "terminal.h".
9782         (target_terminal::terminal_state): Rename to ...
9783         (target_terminal::m_terminal_state): ... this.
9784         (target_terminal::init): Adjust.
9785         (target_terminal::inferior): Adjust to per-inferior
9786         terminal_state.
9787         (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
9788         (target_terminal::ours, target_terminal::ours_for_output): Use
9789         target_terminal_is_ours_kind.
9790         (target_interrupt): Remove ptid parameter.  Adjust.
9791         (default_target_pass_ctrlc): Adjust.
9792         * target.h (target_ops::to_terminal_save_inferior): New field.
9793         (target_ops::to_interrupt): Remove ptid_t parameter.
9794         (target_interrupt): Remove ptid_t parameter.  Update comment.
9795         (target_pass_ctrlc): Update comment.
9796         * target/target.h (target_terminal_state): New scoped enum,
9797         factored out of ...
9798         (target_terminal::terminal_state): ... here.
9799         (target_terminal::inferior): Update comments.
9800         (target_terminal::restore_inferior): New.
9801         (target_terminal::is_inferior, target_terminal::is_ours)
9802         (target_terminal::is_ours_for_output): Adjust.
9803         (target_terminal::scoped_restore_terminal_state): Adjust to
9804         rename, and call restore_inferior() instead of inferior().
9805         (target_terminal::scoped_restore_terminal_state::m_state): Change
9806         type.
9807         (target_terminal::terminal_state): Rename to ...
9808         (target_terminal::m_terminal_state): ... this and change type.
9809
9810 2018-01-30  Pedro Alves  <palves@redhat.com>
9811
9812         * linux-nat.c (wait_for_signal): New function.
9813         (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
9814         directly.
9815         (async_terminal_is_ours)
9816         (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
9817         (linux_nat_add_target): Don't override
9818         to_terminal_inferior/to_terminal_ours.
9819
9820 2018-01-29  Sergio Durigan Junior  <sergiodj@redhat.com>
9821
9822         * remote.c (remote_follow_fork): Don't call "detach_inferior".
9823
9824 2018-01-28  Simon Marchi  <simon.marchi@ericsson.com>
9825
9826         * dwarf2read.c (free_dwo_files): Add forward-declaration.
9827         (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
9828         dwarf2_per_objfile_free here.
9829         (dwarf2_per_objfile_free): Remove.
9830         (_initialize_dwarf2_read): Don't register
9831         dwarf2_per_objfile_free as a registry cleanup.
9832
9833 2018-01-27  Eli Zaretskii  <eliz@gnu.org>
9834
9835         Avoid compilation errors in MinGW native builds
9836
9837         The error is triggered by including python-internal.h, and the
9838         error message is:
9839
9840              In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
9841                       from build-gnulib/import/math.h:27,
9842                       from d:/usr/Python26/include/pyport.h:235,
9843                       from d:/usr/Python26/include/Python.h:58,
9844                       from python/python-internal.h:94,
9845                       from python/py-arch.c:24:
9846              d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
9847         using ::hypot;
9848                 ^~~~~
9849
9850         This happens because Python headers define 'hypot' to expand t
9851         '_hypot' in the Windows builds.
9852         * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
9853         'hypoth'.  This avoids a compilation error.
9854
9855 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
9856
9857         * MAINTAINERS (Write After Approval): Fix ordering.
9858
9859 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
9860
9861         * MAINTAINERS (Write After Approval): Add Alan Hayward.
9862
9863 2018-01-26  Alan Modra  <amodra@gmail.com>
9864
9865         * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
9866         (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
9867         Remove nop.  Make const.  Comment.
9868         (powerpc32_plt_stub_so_2): New.
9869         (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
9870         Correct count.  Update uses.
9871         (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
9872         Move common code reading PLT entry word.  Correct
9873         powerpc32_plt_stub PLT address calculation.
9874         * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
9875         (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
9876         (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
9877         (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
9878         (ppc64_standard_linkage8): Likewise.
9879         * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
9880         Correct insns description.
9881         * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
9882
9883 2018-01-24  Pedro Alves  <palves@redhat.com>
9884
9885         GCC PR libstdc++/83906
9886         * gdbtypes.c (operator==(const dynamic_prop &,
9887         const dynamic_prop &)): New.
9888         (operator==(const range_bounds &, const range_bounds &)): New.
9889         (check_types_equal): Use them instead of memcmp.
9890         * gdbtypes.h (operator==(const dynamic_prop &,
9891         const dynamic_prop &)): Declare.
9892         (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
9893         (operator==(const range_bounds &, const range_bounds &)): Declare.
9894         (operator!=(const range_bounds &, const range_bounds &)): Declare.
9895
9896 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
9897
9898         * s390-linux-tdep.c (s390_record_address_mask)
9899         (s390_record_calc_disp_common, s390_record_calc_disp)
9900         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
9901         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
9902         (s390_process_record): Move to s390-tdep.c.
9903         (s390_linux_init_abi_any): Adjust.
9904         * s390-tdep.c (s390_record_address_mask)
9905         (s390_record_calc_disp_common, s390_record_calc_disp)
9906         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
9907         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
9908         (s390_process_record): Moved from s390-linux-tdep.c
9909         (s390_gdbarch_init): Adjust.
9910
9911 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
9912
9913         * s390-linux-nat.c (s390-tdep.h): New include.
9914         * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
9915         (HFILES_NO_SRCDIR): Add s390-tdep.h.
9916         (ALLDEPFILES): Add s390-tdep.c.
9917         * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
9918         * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
9919         * s390-tdep.h: ...this.  New file.
9920         * s390-linux-tdep.c (s390-tdep.h): New include.
9921         (_initialize_s390_tdep): Rename to...
9922         (_initialize_s390_linux_tdep): ...this and adjust.
9923         (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
9924         (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
9925         s390-tdep.h.
9926         (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
9927         (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
9928         (s390_is_partial_instruction, s390_software_single_step)
9929         (is_non_branch_ril, s390_displaced_step_copy_insn)
9930         (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
9931         (s390_prologue_data, s390_addr, s390_store, s390_load)
9932         (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
9933         (s390_register_call_saved, s390_guess_tracepoint_registers)
9934         (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
9935         (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
9936         (s390_pseudo_register_name, s390_pseudo_register_type)
9937         (s390_pseudo_register_read, s390_pseudo_register_write)
9938         (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
9939         (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
9940         (s390_addr_bits_remove, s390_address_class_type_flags)
9941         (s390_address_class_type_flags_to_name)
9942         (s390_address_class_name_to_type_flags, s390_effective_inner_type)
9943         (s390_function_arg_float, s390_function_arg_vector)
9944         (is_power_of_two, s390_function_arg_integer, s390_arg_state)
9945         (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
9946         (s390_frame_align, s390_register_return_value, s390_return_value)
9947         (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
9948         (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
9949         (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
9950         (s390_trad_frame_prev_register, s390_unwind_cache)
9951         (s390_prologue_frame_unwind_cache)
9952         (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
9953         (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
9954         (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
9955         (s390_stub_frame_this_id, s390_stub_frame_prev_register)
9956         (s390_stub_frame_sniffer, s390_stub_frame_unwind)
9957         (s390_frame_base_address, s390_local_base_address)
9958         (s390_frame_base, s390_gcc_target_options)
9959         (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
9960         (s390_validate_reg_range, s390_tdesc_valid)
9961         (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
9962         * s390-tdep.c: ...this.  New file.
9963
9964 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
9965
9966         * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
9967         (s390_process_record, s390_gdbarch_tdep_alloc)
9968         (s390_linux_init_abi_any): Use/set new hook.
9969
9970 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
9971
9972         * s390-linux-tdep.c (osabi.h): New include.
9973         (s390_linux_init_abi_31, s390_linux_init_abi_64)
9974         (s390_linux_init_abi_any): New functions.
9975         (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
9976
9977 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
9978
9979         * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
9980         tdesc_has_registers check
9981
9982 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
9983
9984         * s390-linux-tdep.c (s390_tdesc_valid): New function.
9985         (s390_validate_reg_range): New macro.
9986         (s390_gdbarch_init): Adjust.
9987
9988 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
9989
9990         * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
9991         (s390_gdbarch_tdep_alloc): Adjust.
9992         (s390_gdbarch_init): Adjust.
9993
9994 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
9995
9996         * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
9997         <have_tdb>: Change type to bool.
9998         (s390_gdbarch_tdep_alloc): Adjust.
9999         (s390_gdbarch_init): Adjust.
10000
10001 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
10002
10003         * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
10004         (gdbarch_tdep) <have_upper, have_vx>: New fields.
10005         (s390_gdbarch_tdep_alloc): New function.
10006         (s390_gdbarch_init): Allocate tdep at start and use its fields
10007         instead of separate variables.
10008
10009 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
10010
10011         * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
10012         when looking for cached gdbarch and add comment for remaining.
10013
10014 2018-01-22  Pedro Alves  <palves@redhat.com>
10015             Sergio Durigan Junior  <sergiodj@redhat.com>
10016
10017         * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
10018         case.
10019
10020 2018-01-22  Maciej W. Rozycki  <macro@mips.com>
10021
10022         * MAINTAINERS: Update my company e-mail address.
10023
10024 2018-01-22  Yao Qi  <yao.qi@linaro.org>
10025
10026         * regcache.c (cooked_write_test): New function.
10027         (_initialize_regcache): Register the test.
10028
10029 2018-01-22  Yao Qi  <yao.qi@linaro.org>
10030
10031         * ia64-tdep.c (ia64_pseudo_register_read): Call
10032         regcache->cooked_read instead of regcache_cooked_read_unsigned.
10033         * m32c-tdep.c (m32c_cat_read): Likewise.
10034         (m32c_r3r2r1r0_read): Likewise.
10035         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
10036         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
10037
10038 2018-01-22  Yao Qi  <yao.qi@linaro.org>
10039
10040         * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
10041         method raw_read instead of regcache_raw_read.
10042         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
10043         * arm-tdep.c (arm_neon_quad_read): Likewise.
10044         * avr-tdep.c (avr_pseudo_register_read): Likewise.
10045         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
10046         * frv-tdep.c (frv_pseudo_register_read): Likewise.
10047         * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
10048         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
10049         (i386_pseudo_register_read_into_value): Likewise.
10050         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
10051         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
10052         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
10053         * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
10054         * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
10055         * sparc-tdep.c (sparc32_pseudo_register_read):  Likewise.
10056         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
10057         * spu-tdep.c (spu_pseudo_register_read_spu):  Likewise.
10058         * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
10059
10060 2018-01-22  Yao Qi  <yao.qi@linaro.org>
10061
10062         * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
10063         * configure.tgt: Remove target mt.
10064         * mt-tdep.c: Remove.
10065         * regcache.c (cooked_read_test): Remove the check for mt.
10066
10067 2018-01-22  Yao Qi  <yao.qi@linaro.org>
10068
10069         * jit.c (jit_frame_prev_register): Call regcache::cooked_read
10070         instead of gdbarch_pseudo_register_read_value.
10071
10072 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
10073
10074         * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
10075         language is Ada.
10076
10077 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
10078
10079         * linespec.c (create_sals_line_offset): Remove code that preserved
10080         the symtab_and_line's line number.
10081
10082 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
10083
10084         * varobj.c (varobj_create): Don't set valid_block when creating a
10085         floating varobj.
10086
10087 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
10088
10089         * varobj.c (varobj_create): Remove out of date comment.
10090
10091 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
10092
10093         PR mi/20395
10094         * ada-exp.y (write_var_from_sym): Pass extra parameter when
10095         updating innermost block.
10096         * parse.c (innermost_block_tracker::update): Take extra type
10097         parameter, and check types match before updating innermost block.
10098         (write_dollar_variable): Update innermost block for registers.
10099         * parser-defs.h (enum innermost_block_tracker_type): New enum.
10100         (innermost_block_tracker::innermost_block_tracker): Initialise
10101         m_types member.
10102         (innermost_block_tracker::reset): Take type parameter.
10103         (innermost_block_tracker::update): Take type parameter, and pass
10104         type through as needed.
10105         (innermost_block_tracker::m_types): New member.
10106         * varobj.c (varobj_create): Pass type when reseting innermost
10107         block.
10108
10109 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
10110
10111         * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
10112         * ada-lang.c (resolve_subexp): Likewise.
10113         * breakpoint.c (set_breakpoint_condition) Likewise.
10114         (watch_command_1) Likewise.
10115         * c-exp.y (variable): Likewise.
10116         * d-exp.y (PrimaryExpression): Likewise.
10117         * f-exp.y (variable): Likewise.
10118         * go-exp.y (variable): Likewise.
10119         * m2-exp.y (variable): Likewise.
10120         * objfiles.c (objfile::~objfile): Likewise.
10121         * p-exp.y (variable): Likewise.
10122         * parse.c (innermost_block): Change type.
10123         * parser-defs.h (class innermost_block_tracker): New.
10124         (innermost_block): Change to innermost_block_tracker.
10125         * printcmd.c (display_command): Switch to innermost_block API.
10126         (do_one_display): Likewise.
10127         * rust-exp.y (do_one_display): Likewise.
10128         * symfile.c (clear_symtab_users): Likewise.
10129         * varobj.c (varobj_create): Switch to innermost_block API, replace
10130         use of innermost_block with block stored on varobj object.
10131
10132 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
10133
10134         * expression.h (innermost_block): Remove declaration.
10135         * varobj.c: Add 'parser-defs.h' include.
10136
10137 2018-01-19  Tom Tromey  <tom@tromey.com>
10138
10139         * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
10140         symbols in the static and global blocks.
10141
10142 2018-01-19  James Clarke  <jrtc27@jrtc27.com>
10143
10144         * nat/linux-ptrace.c: Remove unnecessary reinclusion of
10145         gdb_ptrace.h, and move including gdb_wait.h ...
10146         * nat/linux-ptrace.h: ... to here.
10147
10148 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
10149
10150         * inf-ptrace.c (inf_ptrace_detach): Adjust call to
10151         inf_ptrace_detach_success.
10152         (inf_ptrace_detach_success): Add inferior parameter, use it
10153         instead of inferior_ptid, pass it to detach_inferior.
10154         * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
10155         parameter.
10156         * inferior.c (detach_inferior): Add overload that takes an
10157         inferior object.
10158         * inferior.h (detach_inferior): Likewise.
10159         * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
10160         use inferior_ptid, adjust call to inf_ptrace_detach_success.
10161         * linux-thread-db.c (thread_db_detach): Use inf parameter.
10162
10163 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
10164
10165         * target.h (struct target_ops) <to_detach>: Add inferior
10166         parameter.
10167         (target_detach): Likewise.
10168         * target.c (dispose_inferior): Pass inferior down.
10169         (target_detach): Pass inferior down.  Assert that it is equal to
10170         the current inferior.
10171         * aix-thread.c (aix_thread_detach): Pass inferior down.
10172         * corefile.c (core_file_command): Pass current_inferior() down.
10173         * corelow.c (core_detach): Add inferior parameter.
10174         * darwin-nat.c (darwin_detach): Likewise.
10175         * gnu-nat.c (gnu_detach): Likewise.
10176         * inf-ptrace.c (inf_ptrace_detach): Likewise.
10177         * infcmd.c (detach_command): Pass current_inferior() down to
10178         target_detach.
10179         * infrun.c (follow_fork_inferior): Pass parent_inf to
10180         target_detach.
10181         (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
10182         target_detach.
10183         * linux-nat.c (linux_nat_detach): Add inferior parameter.
10184         * linux-thread-db.c (thread_db_detach): Likewise.
10185         * nto-procfs.c (procfs_detach): Likewise.
10186         * procfs.c (procfs_detach): Likewise.
10187         * record.c (record_detach): Likewise.
10188         * record.h (struct inferior): Forward-declare.
10189         (record_detach): Add inferior parameter.
10190         * remote-sim.c (gdbsim_detach): Likewise.
10191         * remote.c (remote_detach_1): Likewise.
10192         (remote_detach): Likewise.
10193         (extended_remote_detach): Likewise.
10194         * sol-thread.c (sol_thread_detach): Likewise.
10195         * target-debug.h (target_debug_print_inferior_p): New macro.
10196         * target-delegates.c: Re-generate.
10197         * top.c (kill_or_detach): Pass inferior down to target_detach.
10198         * windows-nat.c (windows_detach): Add inferior parameter.
10199
10200 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
10201
10202         * target.h (struct target_ops) <to_detach>: Remove args
10203         parameter.
10204         (target_detach): Likewise.
10205         * target.c (dispose_inferior): Adjust.
10206         (target_detach): Remove args parameter, adjust.
10207         * aix-thread.c (aix_thread_detach): Adjust.
10208         * corefile.c (core_file_command): Adjust.
10209         * corelow.c (core_detach): Adjust.
10210         * darwin-nat.c (darwin_detach): Adjust.
10211         * gnu-nat.c (gnu_detach): Adjust.
10212         * inf-ptrace.c (inf_ptrace_detach): Adjust.
10213         * infcmd.c (detach_command): Adjust
10214         * infrun.c (follow_fork_inferior): Adjust.
10215         (handle_vfork_child_exec_or_exit): Adjust.
10216         * linux-fork.c (linux_fork_detach): Remove args parameter.
10217         * linux-fork.h (linux_fork_detach): Likewise.
10218         * linux-nat.c (linux_nat_detach): Likewise, and adjust.
10219         * linux-thread-db.c (thread_db_detach): Likewise.
10220         * nto-procfs.c (procfs_detach): Likewise.
10221         * procfs.c (procfs_detach): Likewise.
10222         (do_detach): Remove signo parameter.
10223         * record.c (record_detach): Remove args parameter.
10224         * record.h (record_detach): Likewise.
10225         * remote-sim.c (gdbsim_detach): Likewise.
10226         * remote.c (remote_detach_1): Likewise.
10227         (remote_detach): Likewise.
10228         (extended_remote_detach): Likewise.
10229         * sol-thread.c (sol_thread_detach): Likewise.
10230         * target-delegates.c: Re-generate.
10231         * top.c (struct qt_args) <args>: Remove field.
10232         (kill_or_detach): Don't pass args.
10233         (quit_force): Don't set args.
10234         * windows-nat.c (windows_detach): Remove args parameter.
10235
10236 2018-01-19  Yao Qi  <yao.qi@linaro.org>
10237
10238         * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
10239         (arm_linux_init_abi): Install it.
10240
10241 2018-01-19  Yao Qi  <yao.qi@linaro.org>
10242
10243         * osabi.c (gdb_osabi_names): Extend the regexp for
10244         arm-linux-gnueabihf.
10245
10246 2018-01-18  Yao Qi  <yao.qi@linaro.org>
10247
10248         * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
10249         m_abbrevs.
10250         (abbrev_table::add_abbrev): Update.
10251         (abbrev_table::lookup_abbrev): Update.
10252
10253 2018-01-18  Yao Qi  <yao.qi@linaro.org>
10254
10255         * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
10256
10257 2018-01-17  Sergio Durigan Junior  <sergiodj@redhat.com>
10258
10259         * compile/compile.c (compile_to_object): Convert "triplet_rx"
10260         to "std::string".
10261
10262 2018-01-17  Tom Tromey  <tom@tromey.com>
10263
10264         * dwarf2read.c (symbolp): Remove typedef.  Don't instantiate VEC.
10265
10266 2018-01-17  Tom Tromey  <tom@tromey.com>
10267
10268         * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
10269         * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
10270         (create_array_type_with_stride): Update.
10271         * dwarf2read.c (set_die_type): Update.
10272
10273 2018-01-17  Tom Tromey  <tom@tromey.com>
10274
10275         * dwarf2read.c (delayed_method_info): Remove typedef.
10276         (dwarf2_cu::method_info): Now a std::vector.
10277         (add_to_method_list): Update.
10278         (free_delayed_list): Remove.
10279         (compute_delayed_physnames): Update.
10280         (process_full_comp_unit, process_full_type_unit): Clear the method
10281         list.  Remove cleanups.
10282         (psymtab_include_file_name): Add name_holder parameter.  Use
10283         unique_xmalloc_ptr.
10284         (dwarf_decode_lines): Update.
10285
10286 2018-01-17  Tom Tromey  <tom@tromey.com>
10287             Simon Marchi  <simon.marchi@ericsson.com>
10288
10289         * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
10290         (dwarf2_per_objfile::free_cached_comp_units)
10291         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
10292         (init_cutu_and_read_dies_no_follow): Update.
10293         (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
10294         (dwarf2_cu::~dwarf2_cu): New.
10295         (free_heap_comp_unit, free_stack_comp_unit): Remove.
10296         (age_cached_comp_units, free_one_cached_comp_unit): Update.
10297
10298 2018-01-17  Tom Tromey  <tom@tromey.com>
10299             Simon Marchi  <simon.marchi@ericsson.com>
10300
10301         * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
10302         (struct die_reader_specs) <abbrev_table>: New member.
10303         (struct abbrev_table): Add constructor.
10304         <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
10305         <abbrev_obstack>: Now an auto_obstack.
10306         (abbrev_table_up): New typedef.
10307         (init_cu_die_reader): Add abbrev_table parameter.
10308         (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
10309         Add result_dwo_abbrev_table.
10310         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
10311         (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
10312         Update.
10313         (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
10314         parameter.
10315         (skip_children): Update.
10316         (abbrev_table::alloc_abbrev): Rename from
10317         abbrev_table_alloc_abbrev.
10318         (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
10319         (abbrev_table::lookup_abbrev): Rename from
10320         abbrev_table_lookup_abbrev.
10321         (abbrev_table_read_table): Return abbrev_table_up.
10322         (abbrev_table_free, abbrev_table_free_cleanup)
10323         (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
10324         (load_partial_dies): Update.
10325
10326 2018-01-17  Tom Tromey  <tom@tromey.com>
10327
10328         * dwarf2read.c (dwarf2_compute_name): Update comment.
10329         (read_func_scope, read_variable): Update.
10330         (new_symbol): Remove.
10331         (new_symbol_full): Rename to new_symbol.
10332
10333 2018-01-17  Mike Gulick  <mgulick@mathworks.com>
10334
10335         PR gdb/16577
10336         * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
10337         a warning instead of throwing an error, set section size to 0 and return
10338         NULL.
10339         * gdb_bfd.h (gdb_bfd_map_section): Update description.
10340
10341 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
10342
10343         * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
10344         std::string.
10345         (linux_ptrace_attach_fail_reason_string): Likewise.
10346         * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
10347         Likewise.
10348         (linux_ptrace_attach_fail_reason_string): Likewise.
10349         * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
10350
10351 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
10352
10353         * linux-nat.c (linux_nat_attach): Remove xstrdup.
10354
10355 2018-01-17  Eldar Abusalimov  <eldar.abusalimov@jetbrains.com>
10356
10357         PR gdb/21559
10358         * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
10359         checking for fs_base/gs_base fields in struct user_regs_struct.
10360         * configure: Regenerate.
10361
10362 2018-01-17  Yao Qi  <yao.qi@linaro.org>
10363
10364         * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
10365         function.
10366         (aarch64_linux_init_abi): Install it to gdbarch hook
10367         gcc_target_options.
10368
10369 2018-01-15  Pedro Alves  <palves@redhat.com>
10370
10371         * common/signals-state-save-restore.c
10372         (save_original_signals_state): Fix typos.
10373
10374 2017-01-12  Tom Tromey  <tom@tromey.com>
10375             Sergio Durigan Junior  <sergiodj@redhat.com>
10376
10377         * Makefile.in (install-only): Install gdb-add-index.
10378
10379 2018-01-12  John Baldwin  <jhb@FreeBSD.org>
10380
10381         * fbsd-tdep.c (KVE_PROTECTION): Correct value.
10382
10383 2018-01-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10384
10385         * infrun.c (keep_going_pass_signal): Clear step-over info when
10386         insert_breakpoints fails.
10387
10388 2018-01-11  Pedro Alves  <palves@redhat.com>
10389
10390         PR gdb/22583
10391         * infrun.c (resume): Rename to ...
10392         (resume_1): ... this.
10393         (resume): Reimplement as wrapper around resume_1.
10394
10395 2018-01-11  Pedro Alves  <palves@redhat.com>
10396
10397         PR remote/22597
10398         * remote.c (remote_parse_stop_reply): Default to the last-set
10399         general thread instead of to 'magic_null_ptid'.
10400
10401 2018-01-10  Pedro Alves  <palves@redhat.com>
10402
10403         * language.h (language_get_symbol_name_matcher): Rename ...
10404         (get_symbol_name_matcher): ... this.
10405         * language.c (language_get_symbol_name_matcher): Ditto.
10406         * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
10407         callers adjusted.
10408
10409 2018-01-10  Pedro Alves  <palves@redhat.com>
10410
10411         PR gdb/22670
10412         * dwarf2read.c
10413         (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
10414         Adjust to use language_get_symbol_name_matcher instead of
10415         language_defn::la_get_symbol_name_matcher.
10416         * language.c (language_get_symbol_name_matcher): If in Ada mode
10417         and the lookup name is a verbatim match, return Ada's matcher.
10418         * language.h (language_get_symbol_name_matcher): Adjust comment.
10419         (ada_lookup_name_info::verbatim_p):: New method.
10420
10421 2018-01-10  Pedro Alves  <palves@redhat.com>
10422
10423         PR gdb/22670
10424         * ada-lang.c (ada_collect_symbol_completion_matches): If the
10425         minsym's language is language_auto or language_cplus, pass down
10426         language_ada instead.
10427         * symtab.c (compare_symbol_name): Don't frob symbol language here.
10428
10429 2018-01-10  Pedro Alves  <palves@redhat.com>
10430
10431         PR gdb/22670
10432         * minsyms.c (linkage_name_str): New function.
10433         (iterate_over_minimal_symbols): Use it.
10434
10435 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
10436
10437         * NEWS: Document that 'info proc' now works on FreeBSD.
10438
10439 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
10440
10441         * configure.ac: Check for kinfo_getfile in libutil.
10442         * configure: Regenerate.
10443         * config.in: Regenerate.
10444         * fbsd-nat.c: Include "fbsd-tdep.h".
10445         (fbsd_fetch_cmdline): New.
10446         (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
10447         rather than calling error.
10448         (fbsd_info_proc): New.
10449         (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
10450         (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
10451         (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
10452
10453 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
10454
10455         * fbsd-nat.c (struct free_deleter): Remove.
10456         (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
10457
10458 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
10459
10460         * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
10461         NULL for an empty pathname.
10462
10463 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
10464
10465         * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
10466         (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
10467         (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
10468         (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
10469         (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
10470         (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
10471         (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
10472         (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
10473         (kinfo_proc_layout_32, kinfo_proc_layout_i386)
10474         (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
10475         (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
10476         (fbsd_core_fetch_timeval, fbsd_print_sigset)
10477         (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
10478         (fbsd_init_abi):  Install gdbarch "core_info_proc" method.
10479         * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
10480
10481 2018-01-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>
10482
10483         * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
10484         (gnu_xfer_auxv): New function.
10485         (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
10486         TARGET_OBJECT_AUXV.
10487
10488 2018-01-08  Yao Qi  <yao.qi@linaro.org>
10489             Simon Marchi  <simon.marchi@ericsson.com>
10490
10491         * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
10492         common/selftest.c.
10493         (COMMON_OBS): Remove selftest.o.
10494         * configure.ac: Append selftest-arch.c and common/selftest.c to
10495         CONFIG_SRCS.  Append selftest-arch.o and selftest.o to COMMON_OBS.
10496         * configure: Re-generated.
10497         * maint.c (maintenance_selftest): Wrap selftests::run_tests with
10498         GDB_SELF_TEST.
10499         (maintenance_info_selftests): Likewise.
10500
10501 2018-01-08  Xavier Roirand  <roirand@adacore.com>
10502
10503         * ada-valprint.c (val_print_packed_array_elements): Use
10504         proper number of elements when printing an array indexed
10505         by an enumeration type.
10506
10507 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
10508
10509         * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
10510         (dw2_get_file_names_reader): Adjust.
10511         (lookup_dwo_signatured_type): Adjust.
10512         (lookup_dwp_signatured_type): Adjust.
10513         (lookup_signatured_type): Adjust.
10514         (create_type_unit_group): Adjust.
10515         (get_type_unit_group): Adjust.
10516         (process_psymtab_comp_unit_reader): Adjust.
10517         (build_type_psymtabs_reader): Adjust.
10518         (scan_partial_symbols): Adjust.
10519         (add_partial_symbol): Adjust.
10520         (add_partial_subprogram): Adjust.
10521         (peek_die_abbrev): Adjust.
10522         (fixup_go_packaging): Adjust.
10523         (process_imported_unit_die): Adjust.
10524         (dwarf2_compute_name): Adjust.
10525         (dwarf2_physname): Adjust.
10526         (read_import_statement): Adjust.
10527         (handle_DW_AT_stmt_list): Adjust.
10528         (read_file_scope): Adjust.
10529         (read_func_scope): Adjust.
10530         (read_lexical_block_scope): Adjust.
10531         (read_call_site_scope): Adjust.
10532         (read_variable): Adjust.
10533         (dwarf2_rnglists_process): Adjust.
10534         (dwarf2_ranges_process): Adjust.
10535         (dwarf2_ranges_read): Adjust.
10536         (dwarf2_get_pc_bounds): Adjust.
10537         (dwarf2_record_block_ranges): Adjust.
10538         (dwarf2_add_field): Adjust.
10539         (dwarf2_add_member_fn): Adjust.
10540         (read_structure_type): Adjust.
10541         (process_structure_scope): Adjust.
10542         (read_enumeration_type): Adjust.
10543         (read_array_type): Adjust.
10544         (mark_common_block_symbol_computed): Adjust.
10545         (read_common_block): Adjust.
10546         (read_namespace_type): Adjust.
10547         (read_namespace): Adjust.
10548         (read_module_type): Adjust.
10549         (read_tag_pointer_type): Adjust.
10550         (read_tag_ptr_to_member_type): Adjust.
10551         (read_tag_string_type): Adjust.
10552         (read_subroutine_type): Adjust.
10553         (read_typedef): Adjust.
10554         (read_base_type): Adjust.
10555         (attr_to_dynamic_prop): Adjust.
10556         (read_subrange_type): Adjust.
10557         (read_unspecified_type): Adjust.
10558         (dwarf2_read_abbrevs): Adjust.
10559         (load_partial_dies): Adjust.
10560         (read_partial_die): Adjust.
10561         (find_partial_die): Adjust.
10562         (guess_partial_die_structure_name): Adjust.
10563         (fixup_partial_die): Adjust.
10564         (read_attribute_value): Adjust.
10565         (read_addr_index): Adjust.
10566         (read_addr_index_from_leb128): Adjust.
10567         (read_str_index): Adjust.
10568         (dwarf2_string_attr): Adjust.
10569         (get_debug_line_section): Adjust.
10570         (dwarf_decode_line_header): Adjust.
10571         (lnp_state_machine::check_line_address): Adjust.
10572         (dwarf_decode_lines_1): Adjust.
10573         (dwarf_decode_lines): Adjust.
10574         (dwarf2_start_symtab): Adjust.
10575         (var_decode_location): Adjust.
10576         (new_symbol_full): Adjust.
10577         (dwarf2_const_value_data): Adjust.
10578         (dwarf2_const_value_attr): Adjust.
10579         (dwarf2_const_value): Adjust.
10580         (die_type): Adjust.
10581         (die_containing_type): Adjust.
10582         (build_error_marker_type): Adjust.
10583         (lookup_die_type): Adjust.
10584         (guess_full_die_structure_name): Adjust.
10585         (anonymous_struct_prefix): Adjust.
10586         (determine_prefix): Adjust.
10587         (dwarf2_name): Adjust.
10588         (follow_die_ref_or_sig): Adjust.
10589         (follow_die_offset): Adjust.
10590         (follow_die_ref): Adjust.
10591         (follow_die_sig_1): Adjust.
10592         (follow_die_sig): Adjust.
10593         (get_signatured_type): Adjust.
10594         (get_DW_AT_signature_type): Adjust.
10595         (decode_locdesc): Adjust.
10596         (dwarf_decode_macros): Adjust.
10597         (cu_debug_loc_section): Adjust.
10598         (fill_in_loclist_baton): Adjust.
10599         (dwarf2_symbol_mark_computed): Adjust.
10600         (init_one_comp_unit): Don't assign
10601         dwarf2_cu::dwarf2_per_objfile.
10602         (set_die_type): Adjust.
10603
10604 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
10605
10606         * dwarf2read.c (struct mapped_debug_names): Add constructor.
10607         <dwarf2_per_objfile>: New field.
10608         (dwarf2_per_objfile): Remove global.
10609         (get_dwarf2_per_objfile): New function.
10610         (set_dwarf2_per_objfile): New function.
10611         (dwarf2_build_psymtabs_hard): Change objfile parameter to
10612         dwarf2_per_objfile.
10613         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
10614         (read_abbrev_offset): Likewise.
10615         (read_indirect_string): Likewise.
10616         (read_indirect_line_string): Likewise.
10617         (read_indirect_string_at_offset): Likewise.
10618         (read_indirect_string_from_dwz): Likewise.
10619         (dwarf2_find_containing_comp_unit): Change objfile parameter to
10620         dwarf2_per_objfile.
10621         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
10622         (create_all_comp_units): Change objfile parameter to
10623         dwarf2_per_objfile.
10624         (create_all_type_units): Likewise.
10625         (process_queue): Add dwarf2_per_objfile parameter.
10626         (read_and_check_comp_unit_head): Likewise.
10627         (lookup_dwo_unit_in_dwp): Likewise.
10628         (get_dwp_file): Likewise.
10629         (process_cu_includes): Likewise.
10630         (struct free_dwo_file_cleanup_data): New struct.
10631         (dwarf2_has_info): Use get_dwarf2_per_objfile and
10632         set_dwarf2_per_objfile.
10633         (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
10634         (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
10635         context, adjust calls.
10636         (dw2_instantiate_symtab): Likewise.
10637         (dw2_get_cutu): Add dwarf2_per_objfile parameter.
10638         (dw2_get_cu): Likewise.
10639         (create_cu_from_index_list): Change objfile parameter to
10640         dwarf2_per_objfile.
10641         (create_cus_from_index_list): Get dwarf2_per_objfile from
10642         context, adjust calls.
10643         (create_cus_from_index): Likewise.
10644         (create_signatured_type_table_from_index): Change objfile
10645         parameter to dwarf2_per_objfile.
10646         (create_signatured_type_table_from_debug_names): Change objfile
10647         parameter to dwarf2_per_objfile.
10648         (create_addrmap_from_index): Likewise.
10649         (create_addrmap_from_aranges): Likewise.
10650         (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
10651         (dw2_setup): Remove.
10652         (dw2_get_file_names_reader): Get dwarf2_per_objfile from
10653         context.
10654         (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
10655         get_dwarf2_per_objfile.
10656         (dw2_forget_cached_source_info): Likewise.
10657         (dw2_map_symtabs_matching_filename): Likewise.
10658         (struct dw2_symtab_iterator) <index>: Remove.
10659         <dwarf2_per_objfile>: New field.
10660         (dw2_symtab_iter_init): Replace index parameter with
10661         dwarf2_per_objfile.
10662         (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
10663         (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
10664         (dw2_print_stats): Likewise.
10665         (dw2_dump): Likewise.
10666         (dw2_expand_symtabs_for_function): Likewise.
10667         (dw2_expand_all_symtabs): Likewise.
10668         (dw2_expand_symtabs_with_fullname): Likewise.
10669         (dw2_expand_marked_cus): Replace index and objfile parameters
10670         with dwarf2_per_objfile.
10671         (dw_expand_symtabs_matching_file_matcher): Add
10672         dwarf2_per_objfile parameter and adjust calls.
10673         (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
10674         adjust calls.
10675         (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
10676         (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
10677         adjust calls.
10678         (create_cus_from_debug_names_list): Replace objfile parameter
10679         with dwarf2_per_objfile and adjust calls.
10680         (create_cus_from_debug_names): Likewise.
10681         (dwarf2_read_debug_names): Likewise.
10682         (mapped_debug_names::namei_to_name): Adjust call.
10683         (dw2_debug_names_iterator::next): Likewise.
10684         (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
10685         (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
10686         (dw2_debug_names_dump): Likewise.
10687         (dw2_debug_names_expand_symtabs_for_function): Likewise.
10688         (dw2_debug_names_expand_symtabs_matching): Likewise.
10689         (dwarf2_initialize_objfile): Likewise.
10690         (dwarf2_build_psymtabs): Likewise.
10691         (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
10692         this_cu.
10693         (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
10694         (read_and_check_comp_unit_head): Likewise.
10695         (read_abbrev_offset): Likewise.
10696         (create_debug_type_hash_table): Likewise.
10697         (create_debug_types_hash_table): Likewise.
10698         (create_all_type_units): Replace objfile parameter with
10699         dwarf2_per_objfile.
10700         (add_type_unit): Add dwarf2_per_objfile parameter.
10701         (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
10702         with dwarf2_per_objfile.
10703         (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
10704         (lookup_dwp_signatured_type): Likewise.
10705         (lookup_signatured_type): Likewise.
10706         (read_cutu_die_from_dwo): Likewise.
10707         (init_tu_and_read_dwo_dies): Likewise.
10708         (init_cutu_and_read_dies): Likewise.
10709         (init_cutu_and_read_dies_no_follow): Likewise.
10710         (allocate_type_unit_groups_table): Add objfile parameter.
10711         (create_type_unit_group): Use dwarf2_per_objfile from cu.
10712         (get_type_unit_group): Likewise.
10713         (process_psymtab_comp_unit): Update call.
10714         (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
10715         (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
10716         (print_tu_stats): Likewise.
10717         (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
10718         in void* parameter.
10719         (build_type_psymtabs): Change objfile parameter to
10720         dwarf2_per_objfile.
10721         (process_skeletonless_type_unit): Use dwarf2_per_objfile
10722         passed in void* parameter.
10723         (process_skeletonless_type_units): Change objfile parameter to
10724         dwarf2_per_objfile.
10725         (set_partial_user): Likewise.
10726         (dwarf2_build_psymtabs_hard): Likewise.
10727         (read_comp_units_from_section): Likewise.
10728         (create_all_comp_units): Likewise.
10729         (scan_partial_symbols): Update calls.
10730         (add_partial_symbol): Likewise.
10731         (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
10732         (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
10733         (process_queue): Add dwarf2_per_objfile parameter.
10734         (get_compunit_symtab): Use dwarf2_per_objfile from cu.
10735         (compute_compunit_symtab_includes): Likewise.
10736         (process_cu_includes): Add dwarf2_per_objfile parameter.
10737         (process_full_comp_unit): Use dwarf2_per_objfile from cu.
10738         (process_full_type_unit): Likewise.
10739         (process_imported_unit_die): Update call.
10740         (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
10741         (read_file_scope): Likewise.
10742         (allocate_dwo_file_hash_table): Add objfile parameter.
10743         (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
10744         (create_cus_hash_table): Likewise.
10745         (create_dwp_hash_table): Likewise.
10746         (create_dwo_unit_in_dwp_v1): Likewise.
10747         (create_dwp_v2_section): Likewise.
10748         (create_dwo_unit_in_dwp_v2): Likewise.
10749         (lookup_dwo_unit_in_dwp): Likewise.
10750         (try_open_dwop_file): Likewise.
10751         (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
10752         (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
10753         cleanup to include a reference to dwarf2_per_objfile.
10754         (open_dwp_file): Add dwarf2_per_objfile parameter.
10755         (open_and_init_dwp_file): Likewise.
10756         (get_dwp_file): Likewise.
10757         (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
10758         (queue_and_load_all_dwo_tus): Update call.
10759         (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
10760         data.
10761         (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
10762         (dwarf2_ranges_process): Likewise.
10763         (dwarf2_get_pc_bounds): Likewise.
10764         (mark_common_block_symbol_computed): Likewise.
10765         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
10766         (dwarf2_read_abbrevs): Update call.
10767         (read_partial_die): Use dwarf2_per_objfile from cu.
10768         (find_partial_die): Likewise.
10769         (fixup_partial_die): Likewise.
10770         (read_attribute_value): Likewise.
10771         (read_indirect_string_at_offset_from): Add objfile parameter.
10772         (read_indirect_string_at_offset): Add dwarf2_per_objfile
10773         parameter.
10774         (read_indirect_string_from_dwz): Add objfile parameter.
10775         (read_indirect_string): Add objfile parameter.
10776         (read_addr_index_1): Add dwarf2_per_objfile parameter.
10777         (read_addr_index): Use dwarf2_per_objfile from cu.
10778         (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
10779         call dw2_setup.
10780         (read_str_index): Use dwarf2_per_objfile from cu.
10781         (get_debug_line_section): Likewise.
10782         (read_formatted_entries): Add dwarf2_per_objfile parameter.
10783         (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
10784         (new_symbol_full): Use dwarf2_per_objfile from cu.
10785         (build_error_marker_type): Likewise.
10786         (lookup_die_type): Likewise.
10787         (determine_prefix): Likewise.
10788         (follow_die_offset): Likewise.
10789         (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
10790         (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
10791         (dwarf2_fetch_die_type_sect_off): Likewise.
10792         (dwarf2_get_die_type): Likewise.
10793         (follow_die_sig_1): Use dwarf2_per_objfile from cu.
10794         (get_signatured_type): Likewise.
10795         (get_DW_AT_signature_type): Likewise.
10796         (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
10797         (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
10798         (cu_debug_loc_section): Likewise.
10799         (fill_in_loclist_baton): Likewise.
10800         (dwarf2_symbol_mark_computed): Likewise.
10801         (dwarf2_find_containing_comp_unit): Change objfile parameter to
10802         dwarf2_per_objfile.
10803         (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
10804         parameter.
10805         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
10806         (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
10807         (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
10808         (set_die_type): Use dwarf2_free_objfile from cu.
10809         (get_die_type_at_offset): Likewise.
10810         (dwarf2_per_objfile_free): Don't assign global variable.
10811         (debug_names) <constructor>: Add dwarf2_per_objfile
10812         parameter, update m_debugstrlookup construction.
10813         (debug_names::debug_str_lookup): Add dwarf2_per_objfile
10814         parameter.
10815         <m_dwarf2_per_objfile>: New field.
10816         <lookup>: Use m_dwarf2_per_objfile.
10817         (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
10818         (psyms_seen_size): Likewise.
10819         (write_gdbindex): Replace objfile parameter with
10820         dwarf2_per_objfile.
10821         (write_debug_names): Likewise.
10822         (write_psymtabs_to_index): Likewise.
10823         (save_gdb_index_command): Use get_dwarf2_per_objfile, update
10824         calls.
10825
10826 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
10827
10828         * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
10829         <dwarf2_per_objfile>: New field.
10830         (struct dwarf2_per_cu_data) <objfile>: Remove.
10831         <dwarf2_per_objfile>: New field.
10832         (create_cu_from_index_list): Assign dwarf2_per_objfile instead
10833         of objfile.
10834         (create_signatured_type_table_from_index): Likewise.
10835         (create_debug_type_hash_table): Likewise.
10836         (fill_in_sig_entry_from_dwo_entry): Likewise.
10837         (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
10838         (create_type_unit_group): Assign dwarf2_per_objfile instead of
10839         objfile.
10840         (create_partial_symtab): Access objfile through
10841         dwarf2_per_objfile.
10842         (process_psymtab_comp_unit_reader): Likewise.
10843         (read_comp_units_from_section): Likewise.
10844         (scan_partial_symbols): Likewise.
10845         (add_partial_symbol): Likewise.
10846         (add_partial_subprogram): Likewise.
10847         (peek_die_abbrev): Likewise.
10848         (fixup_go_packaging): Likewise.
10849         (process_full_comp_unit): Likewise.
10850         (process_full_type_unit): Likewise.
10851         (process_imported_unit_die): Likewise.
10852         (dwarf2_compute_name): Likewise.
10853         (dwarf2_physname): Likewise.
10854         (read_import_statement): Likewise.
10855         (create_cus_hash_table): Assign dwarf2_physname instead of
10856         objfile.
10857         (read_func_scope): Access objfile through dwarf2_per_objfile.
10858         (read_lexical_block_scope): Likewise.
10859         (read_call_site_scope): Likewise.
10860         (read_variable): Likewise.
10861         (dwarf2_rnglists_process): Likewise.
10862         (dwarf2_ranges_process): Likewise.
10863         (dwarf2_ranges_read): Likewise.
10864         (dwarf2_record_block_ranges): Likewise.
10865         (dwarf2_add_field): Likewise.
10866         (dwarf2_add_member_fn): Likewise.
10867         (read_structure_type): Likewise.
10868         (process_structure_scope): Likewise.
10869         (read_enumeration_type): Likewise.
10870         (read_array_type): Likewise.
10871         (read_common_block): Likewise.
10872         (read_namespace_type): Likewise.
10873         (read_namespace): Likewise.
10874         (read_module_type): Likewise.
10875         (read_tag_pointer_type): Likewise.
10876         (read_tag_ptr_to_member_type): Likewise.
10877         (read_tag_string_type): Likewise.
10878         (read_subroutine_type): Likewise.
10879         (read_typedef): Likewise.
10880         (read_base_type): Likewise.
10881         (attr_to_dynamic_prop): Likewise.
10882         (read_subrange_type): Likewise.
10883         (read_unspecified_type): Likewise.
10884         (load_partial_dies): Likewise.
10885         (read_partial_die): Likewise.
10886         (find_partial_die): Likewise.
10887         (guess_partial_die_structure_name): Likewise.
10888         (fixup_partial_die): Likewise.
10889         (read_attribute_value): Likewise.
10890         (read_addr_index_from_leb128): Likewise.
10891         (dwarf2_read_addr_index): Likewise.
10892         (dwarf2_string_attr): Likewise.
10893         (lnp_state_machine::check_line_address): Likewise.
10894         (dwarf_decode_lines_1): Likewise.
10895         (dwarf_decode_lines): Likewise.
10896         (dwarf2_start_symtab): Likewise.
10897         (var_decode_location): Likewise.
10898         (new_symbol_full): Likewise.
10899         (dwarf2_const_value_data): Likewise.
10900         (dwarf2_const_value_attr): Likewise.
10901         (dwarf2_const_value): Likewise.
10902         (die_type): Likewise.
10903         (die_containing_type): Likewise.
10904         (lookup_die_type): Likewise.
10905         (guess_full_die_structure_name): Likewise.
10906         (anonymous_struct_prefix): Likewise.
10907         (dwarf2_name): Likewise.
10908         (follow_die_ref_or_sig): Likewise.
10909         (follow_die_offset): Likewise.
10910         (follow_die_ref): Likewise.
10911         (dwarf2_fetch_die_loc_sect_off): Likewise.
10912         (dwarf2_fetch_constant_bytes): Likewise.
10913         (dwarf2_fetch_die_type_sect_off): Likewise.
10914         (dwarf2_get_die_type): Likewise.
10915         (follow_die_sig): Likewise.
10916         (decode_locdesc): Likewise.
10917         (dwarf2_per_cu_objfile): Likewise.
10918         (dwarf2_per_cu_text_offset): Likewise.
10919         (init_one_comp_unit): Assign dwarf2_per_objfile instead of
10920         objfile.
10921         (set_die_type): Access objfile through
10922         dwarf2_per_objfile.
10923
10924 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
10925
10926         * valprint.c (converted_character_d): Remove typedef.
10927         (DEF_VEC_O (converted_character_d)): Remove.
10928         (count_next_character): Use std::vector.
10929         (print_converted_chars_to_obstack): Likewise.
10930         (generic_printstr): Likewise.
10931
10932 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
10933
10934         * xml-support.h (struct gdb_xml_value): Add constructor.
10935         <value>: Change type to unique_xmalloc_ptr.
10936         (gdb_xml_value_s): Remove typedef.
10937         (DEF_VEC_O (gdb_xml_value_s)): Remove.
10938         (gdb_xml_element_start_handler): Change parameter type to
10939         std::vector.
10940         (xml_find_attribute): Likewise.
10941         * xml-support.c (xml_find_attribute): Change parameter type to
10942         std::vector and adjust.
10943         (gdb_xml_values_cleanup): Remove.
10944         (gdb_xml_parser::start_element): Adjust to std::vector.
10945         (xinclude_start_include): Change paraeter type to std::vector
10946         and adjust.
10947         * btrace.c (check_xml_btrace_version): Likewise.
10948         (parse_xml_btrace_block): Likewise.
10949         (parse_xml_btrace_pt_config_cpu): Likewise.
10950         (parse_xml_btrace_pt): Likewise.
10951         (parse_xml_btrace_conf_bts): Likewise.
10952         (parse_xml_btrace_conf_pt): Likewise.
10953         * memory-map.c (memory_map_start_memory): Likewise.
10954         (memory_map_start_property): Likewise.
10955         * osdata.c (osdata_start_osdata): Likewise.
10956         (osdata_start_item): Likewise.
10957         (osdata_start_column): Likewise.
10958         * remote.c (start_thread): Likewise.
10959         * solib-aix.c (library_list_start_library): Likewise.
10960         (library_list_start_list): Likewise.
10961         * solib-svr4.c (library_list_start_library): Likewise.
10962         (svr4_library_list_start_list): Likewise.
10963         * solib-target.c (library_list_start_segment): Likewise.
10964         (library_list_start_section): Likewise.
10965         (library_list_start_library): Likewise.
10966         (library_list_start_list): Likewise.
10967         * tracepoint.c (traceframe_info_start_memory): Likewise.
10968         (traceframe_info_start_tvar): Likewise.
10969         * xml-syscall.c (syscall_start_syscall): Likewise.
10970         * xml-tdesc.c (tdesc_start_target): Likewise.
10971         (tdesc_start_feature): Likewise.
10972         (tdesc_start_reg): Likewise.
10973         (tdesc_start_union): Likewise.
10974         (tdesc_start_struct): Likewise.
10975         (tdesc_start_flags): Likewise.
10976         (tdesc_start_enum): Likewise.
10977         (tdesc_start_field): Likewise.
10978         (tdesc_start_enum_value): Likewise.
10979         (tdesc_start_vector): Likewise.
10980
10981 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
10982
10983         * extension.h (struct xmethod_worker) <clone>: Remove.
10984         * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
10985         Remove.
10986         (python_xmethod_worker::clone): Remove.
10987         * valops.c (find_overload_match): Use std::move instead of
10988         clone.
10989
10990 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
10991
10992         * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
10993         (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
10994         <free_xmethod_worker_data>: Remove.
10995         <get_matching_xmethod_workers>: Chance VEC to std::vector.
10996         <get_xmethod_arg_types>: Remove.
10997         <get_xmethod_result_type>: Remove.
10998         <invoke_xmethod>: Remove.
10999         * extension.c (new_xmethod_worker): Remove.
11000         (clone_xmethod_worker): Remove.
11001         (get_matching_xmethod_workers): Return void, pass std::vector by
11002         pointer.
11003         (get_xmethod_arg_types): Rename to...
11004         (xmethod_worker::get_arg_types): ... this, and adjust.
11005         (get_xmethod_result_type): Rename to...
11006         (xmethod_worker::get_result_type): ... this, and adjust.
11007         (invoke_xmethod): Remove.
11008         (free_xmethod_worker): Remove.
11009         (free_xmethod_worker_vec): Remove.
11010         * extension.h (enum ext_lang_rc): Move here from
11011         extension-priv.h.
11012         (struct xmethod_worker): Add constructor and destructor.
11013         <data>: Remove.
11014         <value>: Remove.
11015         <invoke, clone, do_get_result_type, do_get_arg_types>: New
11016         virtual pure methods.
11017         <get_arg_types, get_result_type>: New methods.
11018         (xmethod_worker_ptr): Remove typedef.
11019         (DEF_VEC_P (xmethod_worker_ptr)): Remove.
11020         (xmethod_worker_vec): Remove typedef.
11021         (xmethod_worker_up): New typedef.
11022         (invoke_xmethod): Remove.
11023         (clone_xmethod_worker): Remove.
11024         (free_xmethod_worker): Remove.
11025         (free_xmethod_worker_vec): Remove.
11026         (get_xmethod_arg_types): Remove.
11027         (get_xmethod_result_type): Remove.
11028         * valops.c (find_method_list): Use std::vector, don't use
11029         intermediate vector.
11030         (value_find_oload_method_list): Use std::vector.
11031         (find_overload_match): Use std::vector.
11032         (find_oload_champ): Use std::vector.
11033         * value.c (value_free): Use operator delete.
11034         (value_of_xmethod): Rename to...
11035         (value_from_xmethod): ... this.  Don't assign
11036         xmethod_worker::value, take rvalue-reference.
11037         (result_type_of_xmethod): Adjust.
11038         (call_xmethod): Adjust.
11039         * value.h: Include extension.h.
11040         (struct xmethod_worker): Don't forward-declare.
11041         (value_of_xmethod): Rename to...
11042         (value_from_xmethod): ... this, take rvalue-reference.
11043         * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
11044         (struct python_xmethod_worker): ... this, add constructor and
11045         destructor.
11046         <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
11047         (gdbpy_free_xmethod_worker_data): Rename to...
11048         (python_xmethod_worker::~python_xmethod_worker): ... this and
11049         adjust.
11050         (gdbpy_clone_xmethod_worker_data): Rename to...
11051         (python_xmethod_worker::clone): ... this and adjust.
11052         (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
11053         temporary vector.
11054         (gdbpy_get_xmethod_arg_types): Rename to...
11055         (python_xmethod_worker::do_get_arg_types): ... this and adjust.
11056         (gdbpy_get_xmethod_result_type): Rename to...
11057         (python_xmethod_worker::do_get_result_type): ... this and
11058         adjust.
11059         (gdbpy_invoke_xmethod): Rename to...
11060         (python_xmethod_worker::invoke): ... this and adjust.
11061         (new_python_xmethod_worker): Rename to...
11062         (python_xmethod_worker::python_xmethod_worker): ... this and
11063         adjust.
11064         * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
11065         Remove.
11066         (gdbpy_free_xmethod_worker_data): Remove.
11067         (gdbpy_get_matching_xmethod_workers): Use std::vector.
11068         (gdbpy_get_xmethod_arg_types): Remove.
11069         (gdbpy_get_xmethod_result_type): Remove.
11070         (gdbpy_invoke_xmethod): Remove.
11071         * python/python.c (python_extension_ops): Remove obsolete
11072         callbacks.
11073
11074 2018-01-05  Pedro Alves  <palves@redhat.com>
11075
11076         PR gdb/18653
11077         * common/signals-state-save-restore.c
11078         (save_original_signals_state): New parameter 'quiet'.  Warn if we
11079         find a custom handler preinstalled, instead of internal erroring.
11080         But only warn if !quiet.
11081         * common/signals-state-save-restore.h
11082         (save_original_signals_state): New parameter 'quiet'.
11083         * main.c (captured_main_1): Move save_original_signals_state call
11084         after option handling, and pass QUIET.
11085
11086 2018-01-05  Pedro Alves  <palves@redhat.com>
11087
11088         * spu-tdep.c (spu_catch_start): Pass
11089         symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
11090
11091 2018-01-05  Pedro Alves  <palves@redhat.com>
11092
11093         PR gdb/22670
11094         * ada-lang.c (literal_symbol_name_matcher): New function.
11095         (ada_get_symbol_name_matcher): Use it for
11096         symbol_name_match_type::SEARCH_NAME.
11097         * block.c (block_lookup_symbol): New parameter 'match_type'.  Pass
11098         it down instead of assuming symbol_name_match_type::FULL.
11099         * block.h (block_lookup_symbol): New parameter 'match_type'.
11100         * c-valprint.c (print_unpacked_pointer): Use
11101         lookup_symbol_search_name instead of lookup_symbol.
11102         * compile/compile-object-load.c (get_out_value_type): Pass down
11103         symbol_name_match_type::SEARCH_NAME.
11104         * cp-namespace.c (cp_basic_lookup_symbol): Pass down
11105         symbol_name_match_type::FULL.
11106         * cp-support.c (cp_get_symbol_name_matcher): Handle
11107         symbol_name_match_type::SEARCH_NAME.
11108         * infrun.c (insert_exception_resume_breakpoint): Use
11109         lookup_symbol_search_name.
11110         * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
11111         * psymtab.c (maintenance_check_psymtabs): Use
11112         symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
11113         * stack.c (print_frame_args): Use lookup_symbol_search_name and
11114         SYMBOL_SEARCH_NAME.
11115         * symtab.c (lookup_local_symbol): Don't demangle the lookup name
11116         if symbol_name_match_type::SEARCH_NAME.
11117         (lookup_symbol_in_language): Pass down
11118         symbol_name_match_type::FULL.
11119         (lookup_symbol_search_name): New.
11120         (lookup_language_this): Pass down
11121         symbol_name_match_type::SEARCH_NAME.
11122         (lookup_symbol_aux, lookup_local_symbol): New parameter
11123         'match_type'.  Pass it down.
11124         * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
11125         (lookup_symbol_search_name): New declaration.
11126         (lookup_symbol_in_block): New 'match_type' parameter.
11127
11128 2018-01-05  Pedro Alves  <palves@redhat.com>
11129
11130         PR gdb/22670
11131         * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
11132         ada_lookup_symbol.
11133         (ada_lookup_symbol): Reimplement in terms of
11134         ada_lookup_symbol_list, bits factored out from
11135         ada_lookup_encoded_symbol.
11136
11137 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
11138
11139         * ada-exp.y (write_object_renaming): When subscripting an array
11140         using a symbol as the index, pass the block in call to
11141         ada_lookup_encoded_symbol when looking that symbol up.
11142
11143 2018-01-05  Jerome Guitton  <guitton@adacore.com>
11144
11145         * ada-lang.c (ada_array_length): Use ada_index_type instead of
11146         TYPE_INDEX_TYPE.
11147
11148 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
11149
11150         * ada-lang.c (ada_to_fixed_value_create): Add handling of
11151         the case where VALUE_LVAL (val0) is not lval_memory.
11152
11153 2018-01-05  Xavier Roirand  <roirand@adacore.com>
11154
11155         * ada-valprint.c (print_optional_low_bound): Handle
11156         character-indexed array printing like boolean-indexed array
11157         printing.
11158
11159 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
11160
11161         * NEWS: Create a new section for the next release branch.
11162         Rename the section of the current branch, now that it has
11163         been cut.
11164
11165 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
11166
11167         GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
11168         * version.in: Bump version to 8.1.50.DATE-git.
11169
11170 2018-01-03  Xavier Roirand  <roirand@adacore.com>
11171
11172         * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
11173         Add field.
11174         * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
11175         Add field.
11176         (default_exception_support_info) <catch_handlers_sym>: Add field.
11177         (exception_support_info_fallback) <catch_handlers_sym>: Add field.
11178         (ada_exception_name_addr_1): Add "catch handlers" handling.
11179         (ada_exception_catchpoint_cond_string) <ex>: New parameter.
11180         Update all callers.
11181         (create_excep_cond_exprs) <ex>: Add parameter.
11182         (re_set_exception): Update create_excep_cond_exprs call.
11183         (print_it_exception, print_one_exception, print_mention_exception)
11184         (print_recreate_exception): Add "catch handler" handling.
11185         (allocate_location_catch_handlers, re_set_catch_handlers)
11186         (check_status_catch_handlers, print_it_catch_handlers)
11187         (print_one_catch_handlers, print_mention_catch_handlers)
11188         (print_recreate_catch_handlers): New function.
11189         (catch_handlers_breakpoint_ops): New variable.
11190         (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
11191         Add parameter.  Add "catch handler" handling.
11192         (ada_exception_sym_name, ada_exception_breakpoint_ops):
11193         Add "catch handler" handling.
11194         (ada_exception_catchpoint_cond_string): Add "catch handler"
11195         handling.
11196         (create_ada_exception_catchpoint): Update create_excep_cond_exprs
11197         call.
11198         (catch_ada_handlers_command): New function.
11199         (initialize_ada_catchpoint_ops): Initialize "catch handlers"
11200         operations structure.
11201         (_initialize_ada_language): Add "catch handlers" command entry.
11202         * NEWS: Document "catch handlers" feature.
11203
11204 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
11205
11206         * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
11207         account when creating the array type of the slice.
11208         (ada_value_slice): Likewise.
11209
11210 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
11211
11212         * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
11213         New enum value.
11214         (create_array_type_with_stride): Add byte_stride_prop parameter.
11215         * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
11216         New parameter.  Update all callers in this file.
11217         (array_type_has_dynamic_stride): New function.
11218         (is_dynamic_type_internal, resolve_dynamic_array): Add handling
11219         of arrays with dynamic byte strides.
11220         * dwarf2read.c (read_array_type): Add support for dynamic
11221         DW_AT_byte_stride attributes.
11222
11223 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
11224
11225         * dwarf2read.c (read_unspecified_type): Treat
11226         DW_TAG_enumeration_type DIEs from Ada units as stubs.
11227
11228 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
11229
11230         Update copyright year range in all GDB files.
11231
11232 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
11233
11234         * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
11235         and gdb/testsuite/gdb.base/step-line.c.
11236
11237 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
11238
11239         * copyright.py (main): Dump the contents of
11240         MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
11241         even if BY_HAND is empty.
11242
11243 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
11244
11245         * top.c (print_gdb_version): Update Copyright year in version
11246         message.
11247
11248 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
11249
11250         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
11251
11252 For older changes see ChangeLog-2017.
11253 \f
11254 Local Variables:
11255 mode: change-log
11256 left-margin: 8
11257 fill-column: 74
11258 version-control: never
11259 coding: utf-8
11260 End: