Replace some uses of xstrprintf with string_printf
[external/binutils.git] / gdb / ChangeLog
1 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
2
3         * common/filestuff.h (gdb_fopen_cloexec): New overload.
4         (gdb_open_cloexec): Likewise.
5         * nat/linux-osdata.c (command_from_pid): Use string_printf.
6         (commandline_from_pid): Likewise.
7         (linux_xfer_osdata_threads): Likewise.
8         (linux_xfer_osdata_fds): Likewise.
9         * ada-lang.c (is_package_name): Likewise.
10         * auxv.c (procfs_xfer_auxv): Likewise.
11         * breakpoint.c (print_one_breakpoint_location): Use
12         uiout::field_fmt.
13         (print_one_catch_solib): Use string_printf.
14         * coff-pe-read.c (add_pe_exported_sym): Likewise.
15         (add_pe_forwarded_sym): Likewise.
16         * dwarf2read.c (create_type_unit_group): Likewise.
17         (build_error_marker_type): Likewise.
18         * infcall.c (get_function_name): Likewise.
19         * valprint.c (print_converted_chars_to_obstack): Likewise.
20         * xtensa-tdep.c (xtensa_register_type): Likewise.
21
22 2018-08-06  Simon Marchi  <simon.marchi@ericsson.com>
23
24         * remote.c (remote_target::download_tracepoint): Fix format
25         string errors.
26
27 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
28
29         * tracefile.c: Include common/byte-vector.h.
30         (trace_save): Change type of buf to gdb::byte_vector.  Initialize
31         with trace_regblock_size if needed.  Update uses of buf.
32
33 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
34
35         * tracepoint.h (collection_list) <m_regs_mask>: Change type to
36         std::vector<unsigned char>.
37         * tracepoint.c (collection_list::collection_list): Remove
38         m_regs_mask initializer from initializer list.  Resize
39         m_regs_mask using the largest remote register number.
40         (collection_list::add_remote_register): Remove size check on
41         m_regs_mask.  Use at to access element.
42         (collection_list::stringify): Change type of temp_buf to
43         gdb::char_vector.  Update uses of temp_buf.  Resize if needed to
44         stringify the register mask.  Use pack_hex_byte for the register
45         mask.
46
47 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
48
49         * tracepoint.h (class collection_list) <add_register>: Remove.
50         <add_remote_register, add_ax_registers, add_local_register>:
51         Declare.
52         <add_memrange>: Add scope parameter.
53         * tracepoint.c (encode_actions_1): Likewise.
54         (collection_list::add_register): Rename to ...
55         (collection_list::add_remote_register): ... this.  Update
56         comment.
57         (collection_list::add_ax_registers, add_local_register): New
58         methods.
59         (collection_list::add_memrange): Add scope parameter.  Call
60         add_local_register instead of add_register.
61         (finalize_tracepoint_aexpr): New function.
62         (collection_list::collect_symbol): Update calls to add_memrange.
63         Call add_local_register instead of add_register.  Call
64         add_ax_registers.  Call finalize_tracepoint_aexpr.
65         (encode_actions_1): Get remote regnos for $reg action.  Call
66         add_remote_register, add_ax_registers, and add_local_register.
67         Update call to add_memrange.  Call finalize_tracepoint_aexpr.
68         (validate_actionline): Call finalize_tracepoint_aexpr.
69
70 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
71
72         * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
73         Replace array buf with gdb::char_vector buf, of size
74         get_remote_packet_size ().  Replace references to buf and
75         BUF_SIZE to buf.data () and buf.size ().  Replace strcpy, strcat
76         and xsnprintf with snprintf.  Raise errors if the buffer is too
77         small.
78
79 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
80
81         * remote.c (remote_target::download_tracepoint): Fix the has_more
82         predicate in the QTDP action list iteration.
83
84 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
85
86         * remote.c (remote_target::download_tracepoint): Fix indentation
87         in for block.
88
89 2018-08-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
90
91         * proc-api.c (_initialize_proc_api): Remove c, unused.
92         * procfs.c (procfs_init_inferior): Remove signals, unused.
93         (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
94         unused.
95
96 2018-08-06  Sergey Korolev  <s.korolev@ndmsystems.com>
97             Andrew Burgess  <andrew.burgess@embecosm.com>
98
99         * linux-nat.c (linux_nat_target::follow_fork): Avoid using
100         'W_STOPCODE (0)' as this could be ambiguous.
101
102 2018-08-03  Sergio Durigan Junior  <sergiodj@redhat.com>
103
104         * ser-tcp.c (net_open): Fix thinko when deciding whether to
105         disable TCP's Nagle algorithm (use "ai_protocol" instead of
106         "ai_socktype").
107
108 2018-08-02  Tom Tromey  <tom@tromey.com>
109
110         PR symtab/16842.
111         * dwarf2read.c (read_func_scope): Set symtab on template parameter
112         symbols.
113         (process_structure_scope): Likewise.
114
115 2018-08-02  Xavier Roirand  <roirand@adacore.com>
116
117         PR gdb/22629:
118         * darwin-nat.c (darwin_kill_inferior): Fix handling of
119         kill inferior.
120
121 2018-08-02  Tom Tromey  <tom@tromey.com>
122
123         * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
124         (darwin_suspend_inferior, darwin_resume_inferior)
125         (darwin_decode_notify_message, darwin_resume_inferior_threads)
126         (darwin_check_new_threads): Check result of get_darwin_inferior.
127
128 2018-07-31  Joel Brobecker  <brobecker@adacore.com>
129
130         GDB 8.1.1 released.
131
132 2018-07-31  Jan Vrany  <jan.vrany@fit.cvut.cz>
133
134         * varobj.c (varobj_get_path_expr_parent): Report an error if
135         parent is a dynamic varobj.
136
137 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
138
139         * gnulib/aclocal.m4: Re-generate.
140         * gnulib/config.in: Re-generate.
141         * gnulib/configure: Re-generate.
142         * gnulib/import/Makefile.in: Re-generate.
143         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
144         * gnulib/import/m4/onceonly.m4: Re-generate.
145
146 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
147
148         * target-descriptions.c (struct xml_test_tdesc): New.
149         (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
150         (record_xml_tdesc): Update.
151         (maintenance_check_xml_descriptions): Update.
152         * target-descriptions.h (record_xml_tdesc): Update comment.
153
154 2018-07-30  Andrew Burgess  <andrew.burgess@embecosm.com>
155
156         * eval.c (evaluate_subexp_for_sizeof): Check for array type before
157         checking array bounds are defined.
158
159 2018-07-30  Tom Tromey  <tom@tromey.com>
160
161         * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
162         irreflexivity violation.
163
164 2018-07-30  Tom Tromey  <tom@tromey.com>
165
166         * cli/cli-decode.c (lookup_cmd): Remove lint code.
167         * value.c (unpack_long): Remove lint code.
168         * valops.c (value_ind): Remove lint code.
169         * valarith.c (value_x_binop, value_x_unop, value_equal)
170         (value_pos): Remove lint code.
171
172 2018-07-28  Tom de Vries  <tdevries@suse.de>
173
174         * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
175         with undefined upper bound as <optimized out>.
176
177 2018-07-27  Sergio Durigan Junior  <sergiodj@redhat.com>
178
179         * gcore.in: Rename variable "name" to "prefix".  Expand
180         "usage" text.
181
182 2018-07-14  Jon Turney  <jon.turney@dronecode.org.uk>
183
184         * windows-nat.c (windows_nat_target::create_inferior): Update to
185         call close() in global namespace.
186
187 2018-07-26  Tom Tromey  <tom@tromey.com>
188
189         * dwarf-index-write.c (add_address_entry): Don't add objfile
190         offsets.
191         * dbxread.c (find_stab_function): Rename from
192         find_stab_function_addr.  Return a bound_minimal_symbol.
193         (read_dbx_symtab): Use raw_text_low, raw_text_high.
194         Don't add objfile offsets.
195         (end_psymtab): Use raw_text_low, raw_text_high,
196         MSYMBOL_VALUE_RAW_ADDRESS.
197         (read_ofile_symtab): Update.
198         (process_one_symbol): Update.
199         * dwarf2read.c (create_addrmap_from_index): Don't add objfile
200         offsets.
201         (dw2_relocate): Remove.
202         (dw2_find_pc_sect_symtab): Bias PC by the text offset before
203         searching addrmap.
204         (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
205         Update.
206         (process_psymtab_comp_unit_reader, add_partial_symbol)
207         (add_partial_subprogram, dwarf2_ranges_read): Update.
208         (load_partial_dies): Update.
209         (add_address_entry): Don't add objfile offsets.
210         (dwarf2_build_include_psymtabs): Update.
211         (create_addrmap_from_aranges): Don't add objfile offsets.
212         (dw2_find_pc_sect_compunit_symtab): Update.
213         * mdebugread.c (parse_symbol): Don't add objfile offsets.
214         (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
215         Update.
216         (parse_partial_symbols): Don't add objfile offsets.  Use
217         raw_text_low, raw_text_high.  Update.
218         (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
219         * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
220         or call 'relocate' quick function.  Clear psymbol_map.
221         * psympriv.h (struct partial_symbol) <address>: Add section
222         offset.
223         <set_unrelocated_address>: Rename from set_address.
224         <raw_text_low, raw_text_high>: New methods.
225         <text_low, text_high>: Add objfile parameter.
226         (add_psymbol_to_bcache): Add 'section' parameter.  Call
227         set_unrelocated_address.
228         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
229         (find_pc_psymbol): Update.
230         (fixup_psymbol_section, relocate_psymtabs): Remove.
231         (dump_psymtab, psym_functions): Update.
232         (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
233         parameter.
234         (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
235         (start_psymtab_common): Update.
236         * symfile-debug.c (debug_qf_relocate): Remove.
237         (debug_sym_quick_functions): Update.
238         * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
239         * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
240         Update.
241
242 2018-07-26  Tom Tromey  <tromey@redhat.com>
243
244         * dbxread.c (end_psymtab): Use text_high_valid and
245         text_low_valid.
246         * mdebugread.c (parse_partial_symbols): Use text_low_valid.
247         (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
248         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
249         Update comment.
250         <text_low_valid, text_high_valid>: New fields.
251         <set_text_low, set_text_high>: Update.
252         * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
253
254 2018-07-26  Tom Tromey  <tom@tromey.com>
255
256         * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
257         Update.
258         * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
259         textlow and texthigh fields.
260         (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
261         Update.
262         * mdebugread.c (parse_lines, parse_partial_symbols)
263         (psymtab_to_symtab_1): Update.
264         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
265         Rename fields.  Update comment.  Now private.
266         <text_low, text_high, set_text_low, set_text_high>: New methods.
267         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
268         (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
269         (start_psymtab_common, maintenance_info_psymtabs)
270         (maintenance_check_psymtabs): Update.
271         * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
272         texthigh fields.
273         (scan_xcoff_symtab): Update.
274
275 2018-07-26  Tom Tromey  <tromey@redhat.com>
276
277         * psympriv.h (struct partial_symbol) <unrelocated_address,
278         address, set_address>: New methods.
279         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
280         (fixup_psymbol_section, relocate_psymtabs): Update.
281         (print_partial_symbols): Add 'objfile' parameter.  Update.
282         (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
283         Update.
284
285 2018-07-26  Tom Tromey  <tom@tromey.com>
286
287         * dwarf-index-write.c (write_psymbols, debug_names::insert)
288         (debug_names::write_psymbols): Update.
289         * psympriv.h (struct partial_symbol): Derive from
290         general_symbol_info.
291         <obj_section>: New method.
292         (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
293         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
294         (find_pc_sect_psymbol, fixup_psymbol_section)
295         (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
296         (print_partial_symbols, recursively_search_psymtabs)
297         (compare_psymbols, psymbol_hash, psymbol_compare)
298         (add_psymbol_to_bcache, maintenance_check_psymtabs)
299         (psymbol_name_matches, psym_fill_psymbol_map): Update.
300
301 2018-07-26  Tom Tromey  <tromey@redhat.com>
302
303         * dbxread.c (end_psymtab): Remove dead code.
304
305 2018-07-26  Andrew Burgess  <andrew.burgess@embecosm.com>
306
307         * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
308         DWARF unwinders are disabled.
309         * dwarf2-frame.c: Add dwarf2read.h include.
310         (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
311         disabled.
312         (dwarf2_frame_unwinders_enabled_p): Define.
313         (show_dwarf_unwinders_enabled_p): New function.
314         (_initialize_dwarf2_frame): Register switch to control DWARF
315         unwinder use.
316         * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
317         * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
318         (show_dwarf_cmdlist): Remove static keyword.
319         * dwarf2read.h (set_dwarf_cmdlist): Declare.
320         (show_dwarf_cmdlist): Declare.
321         * NEWS: Document new feature.
322
323 2018-07-26  Tom de Vries  <tdevries@suse.de>
324
325         PR breakpoints/23366
326         * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
327
328 2018-07-26  Tom de Vries  <tdevries@suse.de>
329
330         * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
331         DW_AT_count can't be translated to a dynamic prop.
332
333 2018-07-25  Tom de Vries  <tdevries@suse.de>
334
335         * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
336         try/catch.
337
338 2018-07-25  Jan Vrany  <jan.vrany@fit.cvut.cz>
339
340         * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
341
342 2018-07-25  Joel Brobecker  <brobecker@adacore.com>
343
344         * MAINTAINERS (Global Maintainers): Add Tom Tromey.
345
346 2018-07-24  Keith Seitz  <keiths@redhat.comt
347
348         PR symtab/23010
349         * dwarf2read.c (dw2_add_symbol_to_list): New function.
350         (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
351         instead of add_symbol_to_list.
352         (read_file_scope): Call prepare_one_comp_unit before reading
353         any other DIEs.
354
355 2018-07-24  Simon Marchi  <simon.marchi@ericsson.com>
356
357         * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
358
359 2018-07-24  Tom Tromey  <tom@tromey.com>
360
361         * utils.c (malloc, realloc, free): Don't declare.
362         * configure, config.in: Rebuild.
363         * configure.ac: Don't check for declarations of free, malloc, or
364         realloc.
365
366 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
367
368         * aarch64-linux-nat.c
369         (aarch64_linux_nat_target::stopped_data_address): Remove unused
370         variable.
371         * arm-linux-nat.c (fetch_regs): Likewise.
372         (store_regs): Likewise.
373         (fetch_vfp_regs): Likewise.
374         (store_vfp_regs): Likewise.
375         (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
376         (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
377         (arm_linux_nat_target::insert_watchpoint): Likewise.
378         (arm_linux_nat_target::remove_watchpoint): Likewise.
379         * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
380         Likewise.
381         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
382         Likewise.
383         * ppc-linux-nat.c (fetch_register): Likewise.
384         (fetch_all_gp_regs): Likewise.
385         (fetch_ppc_registers): Likewise.
386         (store_all_gp_regs): Likewise.
387         (store_ppc_registers): Likewise.
388         (hwdebug_insert_point): Likewise.
389         (can_use_watchpoint_cond_accel): Likewise.
390         * remote-sim.c (gdb_os_write_stdout): Likewise.
391
392 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
393             Tom Tromey  <tom@tromey.com>
394
395         * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
396         test for it.
397         * configure: Rebuild.
398
399 2018-07-22  Tom Tromey  <tom@tromey.com>
400
401         * regformats/regdat.sh: Define xmltarget_${name} inside
402         #ifndef IN_PROCESS_AGENT.
403
404 2018-07-22  Tom Tromey  <tom@tromey.com>
405
406         * value.c (value_fetch_lazy_bitfield): Remove unused variable.
407
408 2018-07-22  Tom Tromey  <tom@tromey.com>
409
410         * symfile.c (reread_symbols): Notify iter, not objfile.
411
412 2018-07-22  Tom Tromey  <tom@tromey.com>
413
414         * ravenscar-thread.c (ravenscar_thread_target::store_registers):
415         Use arch_ops.
416         (ravenscar_thread_target::prepare_to_store): Likewise.
417
418 2018-07-22  Tom Tromey  <tom@tromey.com>
419
420         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
421         unused variable.  Call value_fetch_lazy when needed.
422         * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
423         Remove unused variable.  Call value_fetch_lazy when needed.
424
425 2018-07-22  Tom Tromey  <tom@tromey.com>
426
427         * m32c-tdep.c (mark_dma): Return void.
428         (make_regs): Remove unused declarations.
429
430 2018-07-22  Tom Tromey  <tom@tromey.com>
431
432         * guile/scm-cmd.c (gdbscm_dont_repeat): Call
433         cmdscm_get_valid_command_smob_arg_unsafe for effect.
434         * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
435         bkscm_get_valid_block_smob_arg_unsafe for effect.
436
437 2018-07-22  Tom Tromey  <tom@tromey.com>
438
439         * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
440         value_type.
441
442 2018-07-22  Tom Tromey  <tom@tromey.com>
443
444         * windows-nat.c (saved_context): Conditionally define.
445         * remote.c (remote_target::remote_btrace_maybe_reopen):
446         Conditionally declare "warned".
447         * inflow.c (sigquit_ours): Conditionally define.
448         (new_tty): Move "tty" declaration inside #if.
449         * guile/guile.c (guile_datadir): Conditionally define.
450         * charset.c (set_be_le_names): Move some declarations inside #if.
451         * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
452         #if.
453         (parse_xml_btrace_conf): Likewise.
454
455 2018-07-22  Tom Tromey  <tom@tromey.com>
456
457         * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
458
459 2018-07-22  Tom Tromey  <tom@tromey.com>
460
461         * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
462         * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
463         (vlscm_convert_typed_value_from_scheme): Remove unused variable.
464         * buildsym-legacy.c (get_macro_table): Remove unused variable.
465         * stack.c (frame_apply_level_command): Remove unused variable.
466         * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
467         * sparc64-tdep.c (adi_examine_command): Remove unused variable.
468         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
469         unused variable.
470         * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
471         * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
472         * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
473         variable.
474         * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
475         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
476         variable.
477         * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
478         Remove unused variable.
479         * cli/cli-script.c (recurse_read_control_structure): Remove unused
480         variable.
481         * common/tdesc.c (print_xml_feature::visit): Remove unused
482         variable.
483         * compile/compile-object-load.c (store_regs): Remove unused
484         variables.
485         * complaints.c (clear_complaints): Remove unused variable.
486         * corelow.c (core_target_open): Remove unused variable.
487         * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
488         variable.
489         * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
490         variable.
491         * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
492         variable.
493         * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
494         variable.
495         * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
496         variable.
497         * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
498         variable.
499         * ia64-tdep.c (examine_prologue): Remove unused variable.
500         * infcall.c (run_inferior_call): Remove unused variable.
501         * inferior.c (exit_inferior): Remove unused variable.
502         * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
503         * linespec.c (decode_line_2): Remove unused variable.
504         * linux-nat.c (super_close): Remove.
505         * linux-tdep.c (linux_info_proc): Remove unused variable.
506         * mi/mi-main.c (mi_execute_command): Remove unused variable.
507         * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
508         Remove unused variable.
509         * parse.c (find_minsym_type_and_address): Remove unused variable.
510         * printcmd.c (info_symbol_command, printf_floating): Remove unused
511         variable.
512         * python/py-breakpoint.c (bppy_set_commands): Remove unused
513         variable.
514         * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
515         variables.
516         * record-btrace.c (record_btrace_target::store_registers): Remove
517         unused variable.
518         (cmd_show_record_btrace_cpu): Remove unused variable.
519         * riscv-tdep.c (riscv_register_reggroup_p)
520         (riscv_push_dummy_call, riscv_return_value): Remove unused
521         variable.
522         * rust-exp.y (literal): Remove unused variable.
523         * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
524         unused variable.
525         <STRUCTOP_ANONYMOUS>: Likewise.
526         * s390-linux-tdep.c (s390_linux_init_abi_31)
527         (s390_linux_init_abi_64): Remove unused variable.
528         * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
529         (file_select_thread, net_windows_open, _initialize_ser_windows):
530         Remove unused variables.
531         * symtab.c (find_pc_sect_line): Remove unused variable.
532         * target-memory.c (compute_garbled_blocks): Remove unused
533         variable.
534         (target_write_memory_blocks): Remove unused variable.
535         * target.c (target_stack::unpush): Remove unused variables.
536         * tracepoint.c (start_tracing, all_tracepoint_actions)
537         (merge_uploaded_trace_state_variables)
538         (print_one_static_tracepoint_marker): Remove unused variable.
539         * unittests/basic_string_view/element_access/char/1.cc (test01):
540         Remove unused variable.
541         * windows-nat.c (windows_continue, windows_add_all_dlls)
542         (do_initial_windows_stuff, windows_nat_target::create_inferior):
543         Remove unused variables.
544
545 2018-07-21  Simon Marchi  <simon.marchi@polymtl.ca>
546
547         * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
548         attr_profile in HAVE_ELF.
549         * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
550         HAVE_ELF.
551
552 2018-07-20  Simon Marchi  <simon.marchi@polymtl.ca>
553
554         * frame.c (frame_register_unwind): Change parameter name.
555         (frame_unwind_register): Likewise.
556         (frame_unwind_register_value): Likewise.
557         (frame_unwind_register_signed): Likewise.
558         (frame_unwind_register_unsigned): Likewise.
559         * frame.h (frame_register_unwind): Likewise.
560         (frame_unwind_register): Likewise.
561         (frame_unwind_register_value): Likewise.
562         (frame_unwind_register_signed): Likewise.
563         (frame_unwind_register_unsigned): Likewise.
564         (frame_unwind_arch): Likewise.
565
566 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
567
568         * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
569         ISA maintenance.
570
571 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
572
573         * mips-linux-nat.c (mips_linux_nat_target::read_description):
574         Call `get_ptrace_pid' rather than extracting the ptrace PID by
575         hand.
576
577 2018-07-20  Keith Seitz  <keiths@redhat.com>
578
579         * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
580         m_main_subfile, m_comp_dir, m_producer, m_debugformat,
581         m_compunit_symtab, m_language>: Add "m_" prefix.
582         Update all uses.
583         * buildsym.c: Update all uses.
584
585 2018-07-20  Tom Tromey  <tom@tromey.com>
586
587         * buildsym-legacy.h (record_line): Don't use record_line_ftype.
588         * buildsym.h (record_line_ftype): Remove typedef.
589
590 2018-07-20  Tom Tromey  <tom@tromey.com>
591
592         * buildsym-legacy.h (augment_type_symtab): Don't declare.
593         (end_expandable_symtab): Likewise.
594         (end_symtab_get_static_block): Likewise.
595         (end_symtab_from_static_block): Likewise.
596         * buildsym-legacy.c (augment_type_symtab): Remove.
597         (end_expandable_symtab): Remove.
598         (end_symtab_get_static_block): Remove.
599         (end_symtab_from_static_block): Remove.
600
601 2018-07-20  Tom Tromey  <tom@tromey.com>
602
603         * dwarf2read.c: Include buildsym.h.
604         (struct dwarf2_cu) <builder>: New method.
605         (fixup_go_packaging): Update.
606         (process_full_comp_unit, process_full_type_unit): Update.  Don't
607         use scoped_free_pendings.
608         (using_directives): Add "cu" parameter, remove "language".
609         (read_import_statement, setup_type_unit_groups, )
610         (read_func_scope, read_lexical_block_scope)
611         (dwarf2_record_block_ranges, read_namespace): Update.
612         (lnp_state_machine::lnp_state_machine): Add cu parameter.
613         (lnp_state_machine::handle_end_sequence): Update.
614         (class lnp_state_machine) <m_cu>: New member.
615         <m_record_line_callback>: Remove.
616         <m_currently_recording_lines>: New member.
617         (lnp_state_machine::handle_set_file): Update.
618         (noop_record_line): Remove.
619         (dwarf_record_line_p): Add cu parameter.
620         (dwarf_record_line_1, dwarf_finish_line): Likewise.
621         (lnp_state_machine::record_line)
622         (lnp_state_machine::lnp_state_machine)
623         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
624         (dwarf_decode_lines): Update.
625         (dwarf2_start_subfile): Add cu parameter.
626         (dwarf2_start_symtab, new_symbol): Update.
627         (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
628         Remove dwarf2_per_objfile parameter.
629         (dwarf_decode_macros): Update.
630
631 2018-07-20  Tom Tromey  <tom@tromey.com>
632
633         * stabsread.c (define_symbol): Update.
634         * buildsym-legacy.h (get_buildsym_compunit): Declare.
635         * dwarf2read.c (new_symbol): Update.
636         * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
637         * cp-namespace.c: Include buildsym.h.
638         (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
639         * buildsym-legacy.c (get_buildsym_compunit): New function.
640
641 2018-07-20  Tom Tromey  <tom@tromey.com>
642
643         * xcoffread.c: Include buildsym-legacy.h.
644         * windows-nat.c: Include buildsym-legacy.h.
645         * stabsread.c: Include buildsym-legacy.h.
646         * mdebugread.c: Include buildsym-legacy.h.
647         * buildsym-legacy.h: New file.
648         * buildsym-legacy.c: New file, from buildsym.c.
649         * go32-nat.c: Include buildsym-legacy.h.
650         * dwarf2read.c: Include buildsym-legacy.h.
651         * dbxread.c: Include buildsym-legacy.h.
652         * cp-namespace.c: Include buildsym-legacy.h.
653         * coffread.c: Include buildsym-legacy.h.
654         * buildsym.h: Move some contents to buildsym-legacy.h.
655         * buildsym.c: Include buildsym-legacy.h.  Move many functions to
656         buildsym-legacy.c.
657         * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
658
659 2018-07-20  Tom Tromey  <tom@tromey.com>
660
661         * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
662         * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
663         (buildsym_compunit::buildsym_compunit)
664         (buildsym_compunit::~buildsym_compunit)
665         (buildsym_compunit::get_macro_table): Define.
666
667 2018-07-20  Tom Tromey  <tom@tromey.com>
668
669         * buildsym.c (reset_symtab_globals): Remove.
670         (buildsym_compunit::end_symtab_from_static_block): Update.
671         (buildsym_compunit::augment_type_symtab): Update.
672         (end_symtab_from_static_block): Call free_buildsym_compunit.
673         (augment_type_symtab, end_symtab, end_expandable_symtab):
674         Likewise.
675
676 2018-07-20  Tom Tromey  <tom@tromey.com>
677
678         * arch-utils.c: Do not include buildsym.h.
679         * mipsread.c: Do not include buildsym.h.
680         * machoread.c: Do not include buildsym.h.
681         * elfread.c: Do not include buildsym.h.
682
683 2018-07-20  Tom Tromey  <tom@tromey.com>
684
685         * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
686         initialization.
687         (buildsym_compunit): Add new constructor.
688         (struct buildsym_compunit) <get_last_source_file, finish_block,
689         record_block_range, start_subfile, patch_subfile_names,
690         push_subfile, pop_subfile, record_line, get_compunit_symtab,
691         set_last_source_start_addr, get_last_source_start_addr,
692         get_local_using_directives, set_local_using_directives,
693         get_global_using_directives, outermost_context_p,
694         get_current_context_stack, get_context_stack_depth,
695         get_current_subfile, get_local_symbols, get_file_symbols,
696         get_global_symbols, record_debugformat, record_producer,
697         push_context, pop_context, end_symtab_get_static_block,
698         end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
699         New public methods.
700         <record_pending_block, finish_block_internal, make_blockvector,
701         watch_main_source_file_lossage, end_symtab_with_blockvector>: New
702         private methods.
703         Update all users.
704
705 2018-05-22  Tom Tromey  <tom@tromey.com>
706
707         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
708         parameter.
709         (finish_block_internal): Update.
710
711 2018-07-20  Tom Tromey  <tom@tromey.com>
712
713         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
714         parameter.
715         (finish_block_internal): Update.
716
717 2018-07-20  Tom Tromey  <tom@tromey.com>
718
719         * buildsym.h (EXTERN): Don't define or undef.
720         * buildsym.c (EXTERN): Don't define.
721
722 2018-07-20  Tom Tromey  <tom@tromey.com>
723
724         * buildsym.c: Remove TODO comment.
725
726 2018-07-20  Tom Tromey  <tom@tromey.com>
727
728         * coffread.c (coff_symtab_read): Update.
729         * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
730         (xcoff_new_init): Update.
731         * mipsread.c (mipscoff_new_init): Update.
732         * mdebugread.c (mdebug_build_psymtabs): Update.
733         * elfread.c (elf_new_init): Update.
734         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
735         Update.
736         * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
737         (coffstab_build_psymtabs, elfstab_build_psymtabs)
738         (stabsect_build_psymtabs): Update.
739         * buildsym.h (buildsym_init): Don't declare.
740         * buildsym.c: Update comment.
741         (prepare_for_building): Remove.
742         (start_symtab, restart_symtab): Update.
743         (reset_symtab_globals): Update comment.
744         (buildsym_init): Remove.
745
746 2018-07-20  Tom Tromey  <tom@tromey.com>
747
748         * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
749         * stabsread.c (patch_block_stabs, define_symbol, read_type)
750         (read_enum_type, common_block_start, common_block_end)
751         (cleanup_undefined_types_1, finish_global_stabs): Update.
752         * mdebugread.c (psymtab_to_symtab_1): Update.
753         * dwarf2read.c (fixup_go_packaging, read_func_scope)
754         (read_lexical_block_scope, new_symbol): Update.
755         * dbxread.c (process_one_symbol): Update.
756         * coffread.c (coff_symtab_read, process_coff_symbol)
757         (coff_read_enum_type): Update.
758         * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
759         declare.
760         (get_local_symbols, get_file_symbols, get_global_symbols): New
761         functions.
762         * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
763         m_global_symbols.
764         <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
765         (~scoped_free_pendings): Update.
766         (finish_block, prepare_for_building, reset_symtab_globals)
767         (end_symtab_get_static_block, end_symtab_with_blockvector)
768         (augment_type_symtab, push_context): Update.
769         (get_local_symbols, get_file_symbols, get_global_symbols): New
770         functions.
771         (buildsym_init): Update.
772
773 2018-07-20  Tom Tromey  <tom@tromey.com>
774
775         * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
776         (process_full_type_unit): Likewise.
777         (dwarf2_start_symtab): Set list_in_scope.
778
779 2018-07-20  Tom Tromey  <tom@tromey.com>
780
781         * dwarf2read.c (process_psymtab_comp_unit_reader)
782         (build_type_psymtabs_reader): Do not set list_in_scope.
783
784 2018-07-20  Tom Tromey  <tom@tromey.com>
785
786         * buildsym.c (free_pendings): Remove.
787         (add_symbol_to_list, scoped_free_pendings)
788         (finish_block_internal, buildsym_init): Update.
789
790 2018-07-20  Tom Tromey  <tom@tromey.com>
791
792         * xcoffread.c (read_xcoff_symtab): Update.
793         * dwarf2read.c (read_func_scope, read_lexical_block_scope):
794         Update.
795         * dbxread.c (process_one_symbol): Update.
796         * coffread.c (coff_symtab_read): Update.
797         * buildsym.h (finish_block): Update.
798         * buildsym.c (finish_block): Remove "listhead" argument.
799         (end_symtab_get_static_block): Update.
800
801 2018-07-20  Tom Tromey  <tom@tromey.com>
802
803         * buildsym.h (class scoped_free_pendings): Remove constructor.
804         * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
805         method.
806         <m_pending_block_obstack, m_pending_blocks>: New members.
807         (pending_block_obstack, pending_blocks): Remove.
808         (scoped_free_pendings::scoped_free_pendings): Default.
809         (~scoped_free_pendings): Update.
810         (free_pending_blocks): Remove.
811         (finish_block_internal, record_pending_block, make_blockvector)
812         (end_symtab_get_static_block, augment_type_symtab, push_context)
813         (buildsym_init): Update.
814
815 2018-07-20  Tom Tromey  <tom@tromey.com>
816
817         * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
818         m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
819         members.
820         (pending_addrmap, pending_addrmap_obstack)
821         (pending_addrmap_interesting): Remove.
822         (scoped_free_pendings, record_block_range, make_blockvector)
823         (prepare_for_building, reset_symtab_globals, buildsym_init):
824         Update.
825
826 2018-07-20  Tom Tromey  <tom@tromey.com>
827
828         * xcoffread.c (process_linenos): Update.
829         * stabsread.c (define_symbol, read_type, read_enum_type): Update.
830         * mdebugread.c (psymtab_to_symtab_1): Update.
831         * dwarf2read.c (setup_type_unit_groups)
832         (lnp_state_machine::handle_set_file, dwarf_record_line_p)
833         (lnp_state_machine::record_line, dwarf_decode_lines): Update.
834         * dbxread.c (process_one_symbol): Update.
835         * coffread.c (coff_symtab_read, enter_linenos)
836         (process_coff_symbol): Update.
837         * buildsym.h (current_subfile): Don't declare.
838         (get_current_subfile): Declare.
839         * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
840         member.
841         (start_subfile, free_buildsym_compunit, push_subfile)
842         (prepare_for_building, start_symtab): Update.
843         (get_current_subfile): New function.
844
845 2018-07-20  Tom Tromey  <tom@tromey.com>
846
847         * coffread.c (coff_symtab_read): Update.
848         * xcoffread.c (read_xcoff_symtab): Update.
849         * dwarf2read.c (new_symbol): Update.
850         (read_func_scope, read_lexical_block_scope): Update.
851         * dbxread.c (process_one_symbol): Update.
852         * buildsym.h (context_stack, context_stack_depth): Don't declare.
853         (outermost_context_p): Remove macro.
854         (outermost_context_p, get_current_context_stack)
855         (get_context_stack_depth): Declare.
856         (pop_context): Return struct context_stack.
857         * buildsym.c (struct buildsym_compunit) <m_context_stack: New
858         member.
859         (context_stack_size): Remove.
860         (INITIAL_CONTEXT_STACK_SIZE): Remove.
861         (prepare_for_building, end_symtab_get_static_block)
862         (augment_type_symtab, push_context): Update.
863         (pop_context): Return struct context_stack.
864         (outermost_context_p, get_current_context_stack)
865         (get_context_stack_depth): New functions.
866         (buildsym_init): Update.
867
868 2018-07-20  Tom Tromey  <tom@tromey.com>
869
870         * rust-exp.y: Now a pure parser.  Update all rules.
871         (%union): Move earlier.
872         (current_parser, work_obstack): Remove globals.
873         (rust_parser, ~rust_parser): Update.
874         (class rust_parser) <copy_name, concat3, crate_name, super_name,
875         lex_character, lex_number, lex_string, lex_identifier,
876         rust_lookup_type, convert_params_to_types, convert_ast_to_type,
877         convert_name, convert_params_to_expression,
878         convert_ast_to_expression, ast_basic_type, ast_operation,
879         ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
880         ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
881         ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
882         ast_array_type, ast_slice_type, ast_reference_type,
883         ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
884         (rust_parse): Update.
885         (rustyyerror, rustyylex): Add parser parameter.
886         (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
887         (rust_lex_stringish_test, rust_lex_test_sequence)
888         (rust_lex_test_trailing_dot, rust_lex_test_completion)
889         (rust_lex_test_push_back, rust_lex_tests): Update.
890
891 2018-07-19  Pedro Alves  <palves@redhat.com>
892
893         * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
894         gdb::unique_xmalloc_ptr.
895         * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
896         Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
897         * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
898         copy-initialization.
899         * guile/scm-pretty-print.c (ppscm_print_children): Use
900         gdb::unique_xmalloc_ptr instead of cleanups.
901         (gdbscm_apply_val_pretty_printer): Remove cleanups.
902         * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
903         gdb::unique_xmalloc_ptr.
904         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
905         Adjust to use gdb::unique_xmalloc_ptr.
906         * guile/scm-utils.c (extract_arg): Adjust.
907         * guile/scm-value.c (gdbscm_value_field): Adjust to use
908         gdb::unique_xmalloc_ptr instead of a cleanup.
909
910 2018-07-19  Tom Tromey  <tom@tromey.com>
911
912         * utils.c (do_value_free_to_mark)
913         (make_cleanup_value_free_to_mark): Remove.
914         * utils.h (make_cleanup_value_free_to_mark): Remove.
915
916 2018-07-19  Pedro Alves  <palves@redhat.com>
917
918         * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
919         forwarding reference.
920
921 2018-07-18  Pedro Alves  <palves@redhat.com>
922
923         * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
924         gdbscm_wrap.  Use gdb::unique_xmalloc_ptr<char> instead of a
925         cleanup.
926
927 2018-07-18  Pedro Alves  <palves@redhat.com>
928
929         * guile/guile-internal.h: Add comment about mixing GDB and Scheme
930         exceptions.
931         (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
932         (gdbscm_wrap): New.
933         * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
934         directly instead of a cleanup.
935         * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
936         (vlscm_unop): ... this.  Reimplement using gdbscm_wrap.
937         (vlscm_binop_gdbthrow): New, factored out from ...
938         (vlscm_binop): ... this.  Reimplement using gdbscm_wrap.
939         (vlscm_rich_compare): Use gdbscm_wrap.
940         * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
941         instead of a cleanup.
942         (gdbscm_lookup_global_symbol): Use xfree directly instead of a
943         cleanup.
944         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
945         Use xfree directly instead of a cleanup.
946         * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
947         Adjust to use gdbscm_wrap and scoped_value_mark.
948         (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
949         (gdbscm_value_address, gdbscm_value_dereference)
950         (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
951         scoped_value_mark.
952         (gdbscm_value_dynamic_type): Use scoped_value_mark.
953         (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
954         scoped_value_mark.
955         (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
956         gdbscm_wrap and scoped_value_mark.
957         (gdbscm_value_to_string): Use xfree directly instead of a
958         cleanup.  Move 'buffer' unique_ptr to TRY scope.
959         (gdbscm_value_to_lazy_string): Use xfree directly instead of a
960         cleanup.  Move 'buffer' unique_ptr to TRY scope.  Use
961         scoped_value_mark.
962         (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
963         (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
964         scoped_value_mark.
965         (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
966         gdbscm_wrap.
967
968 2018-07-18  Tom de Vries  <tdevries@suse.de>
969
970         * findvar.c (default_read_var_value): Also resolve dynamic type for
971         LOC_OPTIMIZED_OUT vars.
972
973 2018-07-18  Maciej W. Rozycki  <macro@mips.com>
974
975         * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
976         decoding.
977
978 2018-07-17  Tom Tromey  <tom@tromey.com>
979
980         * guile/scm-param.c (pascm_set_func, pascm_show_func)
981         (compute_enum_list, pascm_set_param_value_x)
982         (gdbscm_parameter_value): Update.
983         * guile/guile-internal.h (gdbscm_scm_to_string): Update.
984         (gdbscm_scm_to_host_string): Update.
985         * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
986         Update.
987         * guile/scm-cmd.c (cmdscm_add_completion): Update.
988         * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
989         * guile/scm-string.c (gdbscm_scm_to_string): Return
990         unique_xmalloc_ptr.
991         (gdbscm_scm_to_host_string): Likewise.
992
993 2018-07-17  Tom Tromey  <tom@tromey.com>
994
995         * guile/guile.c (gdbscm_eval_from_control_command): Update.
996         * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
997         * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
998         * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
999         unique_xmalloc_ptr.
1000
1001 2018-07-17  Tom Tromey  <tom@tromey.com>
1002
1003         * guile/scm-param.c (pascm_signal_setshow_error): Update.
1004         * guile/guile-internal.h (gdbscm_exception_message_to_string):
1005         Update.
1006         * guile/scm-cmd.c (cmdscm_function): Update.
1007         * guile/scm-pretty-print.c
1008         (ppscm_print_exception_unless_memory_error): Update.
1009         * guile/scm-exception.c (gdbscm_exception_message_to_string):
1010         Return unique_xmalloc_ptr.
1011
1012 2018-07-17  Tom Tromey  <tom@tromey.com>
1013
1014         * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
1015         Use string_printf.
1016
1017 2018-07-17  Jim Wilson  <jimw@sifive.com>
1018
1019         * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
1020         set_gdbarch_decr_pc_after_break.  Call riscv_read_misa_reg always.
1021         (riscv_gdbarch_init): Delete local has_compressed_isa.  Delete now
1022         unecessary braces after EF_RISCV_RVC test.  Delete call to
1023         set_gdbarch_decr_pc_after_break.
1024
1025         * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
1026         RISCV_LAST_FP_REGNUM + 1.
1027         (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
1028
1029 2018-07-17  Tom Tromey  <tom@tromey.com>
1030
1031         * configure.ac: Remove --disable-gdbcli.
1032         * configure: Rebuild.
1033         * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
1034         (SUBDIR_CLI_CFLAGS): Remove.
1035         (SFILES): Use SUBDIR_CLI_SRCS.
1036         (COMMON_OBS): Use SUBDIR_CLI_OBS.
1037
1038 2018-07-17  Tom Tromey  <tom@tromey.com>
1039
1040         PR gdb/18624:
1041         * coffread.c (coff_symtab_read): Use scoped_free_pendings.
1042
1043 2018-07-16  Jim Wilson  <jimw@sifive.com>
1044
1045         * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
1046
1047 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
1048
1049         * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
1050         variable.
1051         (libunwind_frame_sniffer): Likewise.
1052         (libunwind_frame_prev_register): Likewise.
1053         (libunwind_sigtramp_frame_sniffer): Likewise.
1054         * ia64-tdep.c (ia64_access_reg): Likewise.
1055         (ia64_access_rse_reg): Likewise.
1056         (ia64_libunwind_sigtramp_frame_this_id): Likewise.
1057         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
1058
1059 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
1060
1061         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
1062
1063 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
1064
1065         * remote-sim.c (gdbsim_target::close,
1066         gdbsim_target::mourn_inferior): Remove unused variables.
1067
1068 2018-07-16  Simon Marchi  <simon.marchi@polymtl.ca>
1069
1070         * ia64-tdep.c (ktab_buf): New global.
1071         (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
1072         (get_kernel_table): Adjust.
1073
1074 2018-07-16  Tom Tromey  <tom@tromey.com>
1075
1076         * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
1077         * dwarf2read.c (using_directives, new_symbol): Use
1078         outermost_context_p.
1079         * dbxread.c (process_one_symbol): Use outermost_context_p.
1080         * coffread.c (coff_symtab_read): Use outermost_context_p.
1081
1082 2018-07-16  Tom Tromey  <tom@tromey.com>
1083
1084         * dwarf2read.c (using_directives, read_func_scope)
1085         (read_lexical_block_scope): Update.
1086         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
1087         * buildsym.h (local_using_directives, global_using_directives):
1088         Don't declare.
1089         (get_local_using_directives, set_local_using_directives)
1090         (get_global_using_directives): Declare.
1091         * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
1092         m_global_using_directives>: New members.
1093         (finish_block_internal, prepare_for_building)
1094         (reset_symtab_globals, end_symtab_get_static_block)
1095         (push_context): Update.
1096         (get_local_using_directives, set_local_using_directives)
1097         (get_global_using_directives): New functions.
1098         (buildsym_init): Update.
1099
1100 2018-07-16  Tom Tromey  <tom@tromey.com>
1101
1102         * xcoffread.c (xcoff_initial_scan): Don't call
1103         free_pending_blocks.
1104         * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
1105         * buildsym.h (class scoped_free_pendings): Add constructor.
1106         (free_pending_blocks): Don't declare.
1107         * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
1108         (free_pending_blocks): Now static.
1109
1110 2018-07-16  Tom Tromey  <tom@tromey.com>
1111
1112         * buildsym.h (push_subfile, pop_subfile): Update declarations.
1113         * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
1114         member.
1115         (struct subfile_stack): Remove.
1116         (subfile_stack): Remove.
1117         (push_subfile, pop_subfile, buildsym_init): Update.
1118
1119 2018-07-16  Tom Tromey  <tom@tromey.com>
1120
1121         * buildsym.c (push_subfile): Use gdb_assert.
1122         (pop_subfile): Use gdb_assert.
1123
1124 2018-07-16  Tom Tromey  <tom@tromey.com>
1125
1126         * buildsym.h (merge_symbol_lists): Remove.
1127         * buildsym.c (merge_symbol_lists): Remove.
1128
1129 2018-07-16  Tom Tromey  <tom@tromey.com>
1130
1131         * stabsread.c (scan_file_globals): Update comment.
1132         * stabsread.h (scan_file_globals): Move from buildsym.h.
1133         * buildsym.h (scan_file_globals): Move to stabsread.h.
1134
1135 2018-07-16  Tom Tromey  <tom@tromey.com>
1136
1137         * xcoffread.c (xcoff_new_init): Update.
1138         * mipsread.c (mipscoff_new_init): Update.
1139         * mdebugread.c (mdebug_build_psymtabs): Update.
1140         * elfread.c (elf_new_init): Update.
1141         * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
1142         (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
1143         * buildsym.h (buildsym_new_init): Don't declare.
1144         * buildsym.c (buildsym_new_init): Remove.
1145
1146 2018-07-16  Tom Tromey  <tom@tromey.com>
1147
1148         * stabsread.h (within_function): Move from buildsym.h.
1149         * stabsread.c (start_stabs): Clear within_function.
1150         * coffread.c (coff_start_symtab): Clear within_function.
1151         * buildsym.h (within_function): Move to stabsread.h.
1152         * buildsym.c (prepare_for_building): Update.
1153
1154 2018-07-16  Tom Tromey  <tom@tromey.com>
1155
1156         * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
1157         * dwarf2read.c (dwarf2_start_symtab): Don't set
1158         processing_gcc_compilation.
1159         * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
1160
1161 2018-07-16  Tom Tromey  <tom@tromey.com>
1162
1163         * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
1164         (next_symbol_text_func): Move from buildsym.h.
1165         * stabsread.c (hashname): Move from buildsym.c.
1166         * buildsym.h (HASHSIZE, symnum, next_symbol_text)
1167         (next_symbol_text_func, hashname): Move to stabsread.h.
1168         * buildsym.c: Don't include bcache.h
1169         (hashname): Move to stasbread.c.
1170
1171 2018-07-16  Tom Tromey  <tom@tromey.com>
1172
1173         * buildsym.h (context_stack_size): Don't declare.
1174         * buildsym.c (context_stack_size): New global.
1175
1176 2018-07-16  Tom Tromey  <tom@tromey.com>
1177
1178         * dbxread.c (processing_acc_compilation): New global.
1179         * buildsym.h (processing_acc_compilation): Don't declare.
1180
1181 2018-07-16  Tom Tromey  <tom@tromey.com>
1182
1183         * xcoffread.c (aix_process_linenos, complete_symtab): Update.
1184         * dbxread.c (read_ofile_symtab): Update.
1185         * coffread.c (coff_start_symtab, coff_end_symtab): Update.
1186         * buildsym.h (last_source_start_addr): Remove.
1187         (set_last_source_start_addr, get_last_source_start_addr):
1188         Declare.
1189         * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
1190         parameter.
1191         (struct buildsym_compunit) <m_last_source_start_addr>: New
1192         member.
1193         (prepare_for_building): Remove start_addr parameter.
1194         (start_symtab, restart_symtab, end_symtab_get_static_block)
1195         (end_symtab_with_blockvector): Update.
1196         (set_last_source_start_addr, get_last_source_start_addr): New
1197         functions.
1198
1199 2018-07-16  Tom Tromey  <tom@tromey.com>
1200
1201         * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
1202         member.
1203         (have_line_numbers): Remove.
1204         (record_line, prepare_for_building, end_symtab_get_static_block)
1205         (augment_type_symtab): Update.
1206
1207 2018-07-16  Tom Tromey  <tom@tromey.com>
1208
1209         * buildsym.c (~buildsym_compunit): Free the macro table.
1210         (struct buildsym_compunit) <get_macro_table, release_macros>: New
1211         methods.
1212         <m_pending_macros>: New member.
1213         (pending_macros): Remove.
1214         (~scoped_free_pendings, get_macro_table, prepare_for_building)
1215         (reset_symtab_globals, end_symtab_get_static_block)
1216         (end_symtab_with_blockvector, augment_type_symtab)
1217         (buildsym_init): Update.
1218
1219 2018-07-16  Tom Tromey  <tom@tromey.com>
1220
1221         * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
1222         parameter.
1223         (buildsym_compunit::set_last_source_file): New method.
1224         <m_last_source_file>: New member.
1225         (prepare_for_building): Remove "name" parameter.
1226         (start_symtab, restart_symtab, reset_symtab_globals): Update.
1227         (last_source_file): Remove.
1228         (set_last_source_file, get_last_source_file): Update.
1229
1230 2018-07-16  Tom Tromey  <tom@tromey.com>
1231
1232         * buildsym.c (prepare_for_building): Add assert.
1233
1234 2018-07-16  Tom Tromey  <tom@tromey.com>
1235
1236         * buildsym.c (~buildsym_compunit): Update.
1237         (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
1238         (start_subfile, patch_subfile_names)
1239         (end_symtab_with_blockvector): Update.
1240
1241 2018-07-16  Tom Tromey  <tom@tromey.com>
1242
1243         * buildsym.c (struct buildsym_compunit): Add constructor,
1244         destructor, initializers.
1245         (start_buildsym_compunit): Remove.
1246         (free_buildsym_compunit): Use "delete".
1247         (start_symtab, restart_symtab): Use "new".
1248
1249 2018-07-13  Simon Marchi  <simon.marchi@polymtl.ca>
1250
1251         * symfile.c (set_objfile_default_section_offset): Remove struct
1252         keyword.
1253
1254 2018-07-14  Stafford Horne  <shorne@gmail.com>
1255
1256         * (Responsible Maintainers): Add myself as or1k maintainer.
1257
1258 2018-07-13  Tom Tromey  <tom@tromey.com>
1259
1260         * symfile.c (set_objfile_default_section_offset): Use extra braces
1261         around initializer.
1262
1263 2018-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1264
1265         * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
1266         non-branching basr.
1267
1268 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1269
1270         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1271         unittests/cli-utils-selftests.c
1272         * unittests/cli-utils-selftests.c: New file.
1273
1274 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1275
1276         * NEWS: Mention new commands. Mention change to 'thread apply'.
1277
1278 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1279
1280         * thread.c (thr_try_catch_cmd): New function.
1281         (thread_apply_all_command): Handle qcs flags.
1282         (thread_apply_command): Handle qcs flags.
1283         (taas_command): New function.
1284         (tfaas_command): New function.
1285         (_initialize_thread): Update to setup the new commands 'taas
1286         and 'tfaas'. Change doc string for 'thread apply'.
1287
1288 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1289
1290         * stack.c: (trailing_outermost_frame): New function, mostly
1291         extracted from backtrace_command_1.
1292         (leading_innermost_frame): New function.
1293         (backtrace_command_1): Update to call trailing_outermost_frame.
1294         (frame_apply_command_count): New function.
1295         (frame_apply_level_command): New function.
1296         (frame_apply_all_command): New function.
1297         (frame_apply_command): New function.
1298         (faas_command): New function.
1299         (frame_cmd_list): New variable.
1300         (_initialize_stack): Update to setup the new commands 'frame apply'
1301         and 'faas'.
1302
1303 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1304
1305         * cli-utils.c (number_or_range_parser::get_number): Only handle
1306         numbers or convenience var as numbers.
1307         (parse_flags): New function.
1308         (parse_flags_qcs): New function.
1309         (number_or_range_parser::finished): Ensure parsing end is detected
1310         before end of string.
1311         * cli-utils.h (parse_flags): New function.
1312         (parse_flags_qcs): New function.
1313         (number_or_range_parser): Remove m_finished bool.
1314         (number_or_range_parser::skip_range): Set m_in_range to false.
1315
1316 2018-07-12  Sergio Durigan Junior  <sergiodj@redhat.com>
1317
1318         * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
1319         on Windows.
1320
1321 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
1322             Jan Kratochvil  <jan.kratochvil@redhat.com>
1323             Paul Fertser  <fercerpav@gmail.com>
1324             Tsutomu Seki  <sekiriki@gmail.com>
1325             Pedro Alves  <palves@redhat.com>
1326
1327         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1328         'unittests/parse-connection-spec-selftests.c'.
1329         (COMMON_SFILES): Add 'common/netstuff.c'.
1330         (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
1331         * NEWS (Changes since GDB 8.2): Mention IPv6 support.
1332         * common/netstuff.c: New file.
1333         * common/netstuff.h: New file.
1334         * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
1335         (wait_for_connect): Update comment.  New parameter
1336         'gdb::optional<int> sock' instead of 'struct serial *scb'.
1337         Use 'sock' directly instead of 'scb->fd'.
1338         (try_connect): New function, with code from 'net_open'.
1339         (net_open): Rewrite main loop to deal with multiple
1340         sockets/addresses.  Handle IPv6-style hostnames; implement
1341         support for IPv6 connections.
1342         * unittests/parse-connection-spec-selftests.c: New file.
1343
1344 2018-07-11  Pedro Alves  <palves@redhat.com>
1345
1346         PR gdb/23377
1347         * remote.c (remote_target::remote_detach_pid): Call
1348         set_current_process.
1349
1350 2018-07-11  Pedro Alves  <palves@redhat.com>
1351
1352         * h8300-tdep.c (h8300_gdbarch_init): Remove
1353         set_gdbarch_ecoff_reg_to_regnum calls.
1354
1355 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
1356
1357         PR c++/23373
1358         * c-typeprint.c (c_type_print_base_struct_union): Don't print
1359         offsets/sizes for static members of a class/struct.
1360
1361 2018-07-11  Alan Hayward  <alan.hayward@arm.com>
1362
1363         * target-descriptions.c (tdesc_register_bitsize): Rename.
1364         * target-descriptions.h (tdesc_register_bitsize): Likewise.
1365         * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
1366         * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
1367
1368 2018-07-10  Tom Tromey  <tom@tromey.com>
1369
1370         * breakpoint.c (moribund_locations): Now static and a
1371         std::vector.
1372         (breakpoint_init_inferior, moribund_breakpoint_here_p)
1373         (build_bpstat_chain, update_global_location_list)
1374         (breakpoint_retire_moribund): Update.
1375         * breakpoint.h (bp_location_p): Remove typedef.  Don't declare
1376         VEC.
1377
1378 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
1379
1380         * riscv-tdep.c (riscv_is_fp_regno_p): New function.
1381         (riscv_register_reggroup_p): Use new function, remove unneeded
1382         parenthesis.
1383         (riscv_push_dummy_call): Extend assert to compare against xlen or
1384         flen based on register type.
1385
1386 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
1387
1388         * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
1389
1390 2018-07-09  Andrew Burgess  <andrew.burgess@embecosm.com>
1391
1392         * remote.c (show_hardware_watchpoint_limit): New function.
1393         (show_hardware_watchpoint_length_limit): New function.
1394         (show_hardware_breakpoint_limit): New function.
1395         (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
1396         where appropriate, update help text.
1397
1398 2018-07-09  Tom Tromey  <tom@tromey.com>
1399
1400         * Makefile.in (CDEPS): Don't mention XM_CDEPS.
1401         (CLIBS): Don't mention NAT_CLIBS.
1402
1403 2018-07-09  Tom Tromey  <tom@tromey.com>
1404
1405         * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
1406         (LIBGDB_OBS, clean mostlyclean): Update.
1407         (gdb$(EXEEXT), insight$(EXEEXT)): Update.
1408
1409 2018-07-09  Tom Tromey  <tom@tromey.com>
1410
1411         * Makefile.in (%.c: %.y): Use ECHO_YACC.
1412         (%.c: %.l): Use ECHO_LEX.  Just fail if flex not available.
1413         * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
1414
1415 2018-07-09  Tom Tromey  <tom@tromey.com>
1416
1417         * Makefile.in (ALLDEPFILES): Remove exec.c.
1418         (COMMON_OBS): Remove exec.o.
1419         (COMMON_SFILES): Add exec.c.
1420
1421 2018-07-09  Tom Tromey  <tom@tromey.com>
1422
1423         * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
1424
1425 2018-07-09  Tom Tromey  <tom@tromey.com>
1426
1427         * Makefile.in (clean mostlyclean): Remove stamp-version.
1428         (version.c): Depend on stamp-version.
1429         (stamp-version): New rule, from version.c rule.
1430
1431 2018-07-09  Tom Tromey  <tom@tromey.com>
1432
1433         * Makefile.in (init.c): Depend on stamp-init.
1434         (stamp-init): New rule, from init.c rule.
1435         (clean mostlyclean): Remove stamp-init.
1436
1437 2018-07-09  Tom Tromey  <tom@tromey.com>
1438
1439         * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
1440         SUBDIR_GCC_COMPILE_SRCS.
1441
1442 2018-07-09  Tom Tromey  <tom@tromey.com>
1443
1444         * Makefile.in (init.c): Remove some unused sed rules.
1445
1446 2018-07-09  Tom Tromey  <tom@tromey.com>
1447
1448         * Makefile.in (TSOBS): Remove.
1449         (INIT_FILES): Update.
1450         (LIBGDB_OBS): Update.
1451         (COMMON_SFILES): Add inflow.c.
1452         (SFILES): Remove inflow.c.
1453
1454 2018-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
1455
1456         * contrib/gdb-add-index.sh ($dwarf5): New, use it.
1457
1458 2018-07-07  Simon Marchi  <simon.marchi@polymtl.ca>
1459
1460         * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
1461         get_saveloc_name, is_signal_frame_name, step_name,
1462         init_remote_name, create_addr_space_name,
1463         destroy_addr_space_name, search_unwind_table_name,
1464         find_dyn_list_name): Constify.
1465
1466 2018-07-05  Simon Marchi  <simon.marchi@polymtl.ca>
1467
1468         * darwin-nat.c (darwin_pthread_kill): New function.
1469         (darwin_resume_thread): Use darwin_pthread_kill.
1470
1471 2018-07-05  Tom de Vries  <tdevries@suse.de>
1472
1473         * macroexp.c (macro_buffer) <operator=>: New member function.
1474
1475 2018-07-04  Tom Tromey  <tom@tromey.com>
1476
1477         * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
1478
1479 2018-07-04  Simon Marchi  <simon.marchi@polymtl.ca>
1480
1481         * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
1482         * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
1483         * maint.c: Likewise.
1484         * top.c: Likewise.
1485
1486 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
1487
1488         * NEWS: Create a new section for the next release branch.
1489         Rename the section of the current branch, now that it has
1490         been cut.
1491
1492 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
1493
1494         GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
1495         * version.in: Bump version to 8.2.50.DATE-git.
1496
1497 2018-07-04  Vyacheslav Barinov  <v.barinov@samsung.com>
1498             Pedro Alves  <palves@redhat.com>
1499
1500         * linux-nat.c (linux_init_ptrace): Rename to ...
1501         (linux_init_ptrace_procfs): ... this.  Call
1502         linux_proc_init_warnings.
1503         (linux_nat_target::post_attach)
1504         (linux_nat_target::post_startup_inferior): Adjust.
1505         * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
1506         * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
1507
1508 2018-07-04  Tom de Vries  <tdevries@suse.de>
1509
1510         * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
1511         check ...
1512         (read_comp_unit_head): ... here.
1513
1514 2018-07-03  Tom Tromey  <tom@tromey.com>
1515
1516         * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
1517         (stop_tracing, tstatus_command)
1518         (find_matching_tracepoint_location, merge_uploaded_tracepoints)
1519         (print_one_static_tracepoint_marker): Update.
1520         * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
1521         std::vector.
1522         * breakpoint.h (breakpoint_p): Remove typedef.  Don't declare
1523         VEC.
1524         (all_tracepoints, static_tracepoints_here): Return std::vector.
1525
1526 2018-07-03  Tom Tromey  <tom@tromey.com>
1527
1528         * common/ptid.c (ptid_equal): Remove.
1529         * common/ptid.h (ptid_equal): Don't declare.
1530         * ada-tasks.c: Update.
1531         * breakpoint.c: Update.
1532         * common/agent.c: Update.
1533         * corelow.c: Update.
1534         * darwin-nat-info.c: Update.
1535         * darwin-nat.c: Update.
1536         * dcache.c: Update.
1537         * dtrace-probe.c: Update.
1538         * dummy-frame.c: Update.
1539         * fbsd-nat.c: Update.
1540         * frame.c: Update.
1541         * gdbthread.h: Update.
1542         * gnu-nat.c: Update.
1543         * go32-nat.c: Update.
1544         * inf-loop.c: Update.
1545         * inf-ptrace.c: Update.
1546         * infcall.c: Update.
1547         * infcmd.c: Update.
1548         * inflow.c: Update.
1549         * infrun.c: Update.
1550         * linux-fork.c: Update.
1551         * linux-nat.c: Update.
1552         * linux-thread-db.c: Update.
1553         * mi/mi-cmd-var.c: Update.
1554         * mi/mi-interp.c: Update.
1555         * mi/mi-main.c: Update.
1556         * nto-procfs.c: Update.
1557         * ppc-linux-tdep.c: Update.
1558         * procfs.c: Update.
1559         * python/py-inferior.c: Update.
1560         * python/py-record-btrace.c: Update.
1561         * python/py-record.c: Update.
1562         * ravenscar-thread.c: Update.
1563         * regcache.c: Update.
1564         * remote-sim.c: Update.
1565         * remote.c: Update.
1566         * sol-thread.c: Update.
1567         * solib.c: Update.
1568         * target.c: Update.
1569         * tui/tui-stack.c: Update.
1570         * varobj.c: Update.
1571         * windows-nat.c: Update.
1572         * windows-tdep.c: Update.
1573
1574 2018-07-03  Tom Tromey  <tom@tromey.com>
1575
1576         * common/ptid.c (ptid_match): Remove.
1577         * common/ptid.h (ptid_match): Don't declare.
1578         * fbsd-nat.c: Update.
1579         * infcmd.c: Update.
1580         * infrun.c: Update.
1581         * linux-nat.c: Update.
1582         * record-btrace.c: Update.
1583         * regcache.c: Update.
1584         * remote.c: Update.
1585
1586 2018-07-03  Tom Tromey  <tom@tromey.com>
1587
1588         * common/ptid.c (ptid_tid_p): Remove.
1589         * common/ptid.h (ptid_tid_p): Don't declare.
1590         * sol-thread.c: Update.
1591
1592 2018-07-03  Tom Tromey  <tom@tromey.com>
1593
1594         * common/ptid.c (ptid_lwp_p): Remove.
1595         * common/ptid.h (ptid_lwp_p): Don't declare.
1596         * fbsd-nat.c: Update.
1597         * linux-nat.c: Update.
1598         * nat/linux-procfs.c: Update.
1599         * nat/x86-linux-dregs.c: Update.
1600         * sol-thread.c: Update.
1601
1602 2018-07-03  Tom Tromey  <tom@tromey.com>
1603
1604         * common/ptid.c (ptid_is_pid): Remove.
1605         * common/ptid.h (ptid_is_pid): Don't declare.
1606         * infrun.c: Update.
1607         * linux-nat.c: Update.
1608         * mi/mi-interp.c: Update.
1609         * remote.c: Update.
1610         * thread.c: Update.
1611
1612 2018-07-03  Tom Tromey  <tom@tromey.com>
1613
1614         * common/ptid.c (ptid_get_tid): Remove.
1615         * common/ptid.h (ptid_get_tid): Don't declare.
1616         * ada-tasks.c: Update.
1617         * aix-thread.c: Update.
1618         * bsd-uthread.c: Update.
1619         * darwin-nat.c: Update.
1620         * fbsd-nat.c: Update.
1621         * i386-darwin-nat.c: Update.
1622         * infrun.c: Update.
1623         * linux-tdep.c: Update.
1624         * nto-procfs.c: Update.
1625         * ppc-ravenscar-thread.c: Update.
1626         * python/py-infthread.c: Update.
1627         * ravenscar-thread.c: Update.
1628         * sol-thread.c: Update.
1629         * sparc-ravenscar-thread.c: Update.
1630         * windows-nat.c: Update.
1631
1632 2018-07-03  Tom Tromey  <tom@tromey.com>
1633
1634         * common/ptid.c (ptid_get_lwp): Remove.
1635         * common/ptid.h (ptid_get_lwp): Don't declare.
1636         * aarch64-linux-nat.c: Update.
1637         * ada-tasks.c: Update.
1638         * aix-thread.c: Update.
1639         * amd64-linux-nat.c: Update.
1640         * arm-linux-nat.c: Update.
1641         * corelow.c: Update.
1642         * fbsd-nat.c: Update.
1643         * fbsd-tdep.c: Update.
1644         * gnu-nat.c: Update.
1645         * i386-cygwin-tdep.c: Update.
1646         * i386-gnu-nat.c: Update.
1647         * i386-linux-nat.c: Update.
1648         * ia64-linux-nat.c: Update.
1649         * inf-ptrace.c: Update.
1650         * infrun.c: Update.
1651         * linux-fork.c: Update.
1652         * linux-nat.c: Update.
1653         * linux-tdep.c: Update.
1654         * linux-thread-db.c: Update.
1655         * mips-linux-nat.c: Update.
1656         * nat/aarch64-linux-hw-point.c: Update.
1657         * nat/aarch64-linux.c: Update.
1658         * nat/linux-btrace.c: Update.
1659         * nat/linux-osdata.c: Update.
1660         * nat/linux-procfs.c: Update.
1661         * nat/x86-linux-dregs.c: Update.
1662         * obsd-nat.c: Update.
1663         * ppc-fbsd-nat.c: Update.
1664         * ppc-linux-nat.c: Update.
1665         * procfs.c: Update.
1666         * python/py-infthread.c: Update.
1667         * ravenscar-thread.c: Update.
1668         * remote.c: Update.
1669         * s390-linux-nat.c: Update.
1670         * sol-thread.c: Update.
1671         * sol2-tdep.c: Update.
1672         * spu-linux-nat.c: Update.
1673         * x86-linux-nat.c: Update.
1674         * xtensa-linux-nat.c: Update.
1675
1676 2018-07-03  Tom Tromey  <tom@tromey.com>
1677
1678         * common/ptid.c (ptid_get_pid): Remove.
1679         * common/ptid.h (ptid_get_pid): Don't declare.
1680         * aarch64-linux-nat.c: Update.
1681         * ada-lang.c: Update.
1682         * aix-thread.c: Update.
1683         * alpha-bsd-nat.c: Update.
1684         * amd64-fbsd-nat.c: Update.
1685         * amd64-linux-nat.c: Update.
1686         * arm-linux-nat.c: Update.
1687         * arm-nbsd-nat.c: Update.
1688         * auxv.c: Update.
1689         * break-catch-syscall.c: Update.
1690         * breakpoint.c: Update.
1691         * bsd-uthread.c: Update.
1692         * corelow.c: Update.
1693         * ctf.c: Update.
1694         * darwin-nat.c: Update.
1695         * fbsd-nat.c: Update.
1696         * fbsd-tdep.c: Update.
1697         * gcore.c: Update.
1698         * gnu-nat.c: Update.
1699         * hppa-nbsd-nat.c: Update.
1700         * hppa-obsd-nat.c: Update.
1701         * i386-fbsd-nat.c: Update.
1702         * ia64-linux-nat.c: Update.
1703         * inf-ptrace.c: Update.
1704         * infcmd.c: Update.
1705         * inferior.c: Update.
1706         * inferior.h: Update.
1707         * inflow.c: Update.
1708         * infrun.c: Update.
1709         * linux-fork.c: Update.
1710         * linux-nat.c: Update.
1711         * linux-tdep.c: Update.
1712         * linux-thread-db.c: Update.
1713         * m68k-bsd-nat.c: Update.
1714         * mi/mi-interp.c: Update.
1715         * mi/mi-main.c: Update.
1716         * mips-linux-nat.c: Update.
1717         * mips-nbsd-nat.c: Update.
1718         * mips64-obsd-nat.c: Update.
1719         * nat/aarch64-linux-hw-point.c: Update.
1720         * nat/aarch64-linux.c: Update.
1721         * nat/linux-btrace.c: Update.
1722         * nat/linux-osdata.c: Update.
1723         * nat/linux-procfs.c: Update.
1724         * nat/x86-linux-dregs.c: Update.
1725         * nto-procfs.c: Update.
1726         * obsd-nat.c: Update.
1727         * ppc-linux-nat.c: Update.
1728         * ppc-nbsd-nat.c: Update.
1729         * ppc-obsd-nat.c: Update.
1730         * proc-service.c: Update.
1731         * procfs.c: Update.
1732         * python/py-inferior.c: Update.
1733         * python/py-infthread.c: Update.
1734         * ravenscar-thread.c: Update.
1735         * record.c: Update.
1736         * remote-sim.c: Update.
1737         * remote.c: Update.
1738         * rs6000-nat.c: Update.
1739         * s390-linux-nat.c: Update.
1740         * sh-nbsd-nat.c: Update.
1741         * sol-thread.c: Update.
1742         * sparc-nat.c: Update.
1743         * sparc64-tdep.c: Update.
1744         * spu-linux-nat.c: Update.
1745         * spu-tdep.c: Update.
1746         * target-debug.h: Update.
1747         * target.c: Update.
1748         * thread.c: Update.
1749         * tid-parse.c: Update.
1750         * tracefile-tfile.c: Update.
1751         * vax-bsd-nat.c: Update.
1752         * windows-nat.c: Update.
1753         * x86-linux-nat.c: Update.
1754         * x86-nat.c: Update.
1755
1756 2018-07-03  Tom Tromey  <tom@tromey.com>
1757
1758         * common/ptid.c (pid_to_ptid): Remove.
1759         * common/ptid.h (pid_to_ptid): Don't declare.
1760         * aix-thread.c: Update.
1761         * arm-linux-nat.c: Update.
1762         * common/ptid.c: Update.
1763         * common/ptid.h: Update.
1764         * corelow.c: Update.
1765         * ctf.c: Update.
1766         * darwin-nat.c: Update.
1767         * fbsd-nat.c: Update.
1768         * fork-child.c: Update.
1769         * gnu-nat.c: Update.
1770         * go32-nat.c: Update.
1771         * inf-ptrace.c: Update.
1772         * infcmd.c: Update.
1773         * inferior.c: Update.
1774         * infrun.c: Update.
1775         * linux-fork.c: Update.
1776         * linux-nat.c: Update.
1777         * nat/aarch64-linux-hw-point.c: Update.
1778         * nat/fork-inferior.c: Update.
1779         * nat/x86-linux-dregs.c: Update.
1780         * nto-procfs.c: Update.
1781         * obsd-nat.c: Update.
1782         * procfs.c: Update.
1783         * progspace.c: Update.
1784         * remote.c: Update.
1785         * rs6000-nat.c: Update.
1786         * s390-linux-nat.c: Update.
1787         * sol-thread.c: Update.
1788         * spu-linux-nat.c: Update.
1789         * target.c: Update.
1790         * top.c: Update.
1791         * tracefile-tfile.c: Update.
1792         * windows-nat.c: Update.
1793
1794 2018-07-03  Tom Tromey  <tom@tromey.com>
1795
1796         * common/ptid.h (ptid_build): Don't declare.
1797         * common/ptid.c (ptid_build): Remove.
1798         * aix-thread.c: Update.
1799         * bsd-kvm.c: Update.
1800         * bsd-uthread.c: Update.
1801         * common/agent.c: Update.
1802         * common/ptid.c: Update.
1803         * common/ptid.h: Update.
1804         * corelow.c: Update.
1805         * darwin-nat.c: Update.
1806         * fbsd-nat.c: Update.
1807         * gnu-nat.c: Update.
1808         * linux-fork.c: Update.
1809         * linux-nat.c: Update.
1810         * linux-thread-db.c: Update.
1811         * nat/linux-osdata.c: Update.
1812         * nat/linux-procfs.c: Update.
1813         * nto-procfs.c: Update.
1814         * obsd-nat.c: Update.
1815         * proc-service.c: Update.
1816         * procfs.c: Update.
1817         * ravenscar-thread.c: Update.
1818         * remote-sim.c: Update.
1819         * remote.c: Update.
1820         * sol-thread.c: Update.
1821         * target.c: Update.
1822         * windows-nat.c: Update.
1823
1824 2018-07-03  Tom Tromey  <tom@tromey.com>
1825
1826         * infrun.c (follow_exec): Use exit_inferior_silent.
1827         * inferior.c (exit_inferior_num_silent): Remove.
1828         * inferior.h (exit_inferior_num_silent): Don't declare.
1829
1830 2018-07-03  Tom Tromey  <tom@tromey.com>
1831
1832         PR cli/23340:
1833         * darwin-nat.c (darwin_attach_pid): Reset inferior and
1834         inferior_ptid on error.
1835
1836 2018-07-02  Maciej W. Rozycki  <macro@mips.com>
1837             Simon Marchi  <simon.marchi@polymtl.ca>
1838
1839         PR tdep/8282
1840         * disasm.h (gdb_disassembler): Add
1841         `m_disassembler_options_holder'. member
1842         * disasm.c (get_all_disassembler_options): New function.
1843         (gdb_disassembler::gdb_disassembler): Use it.
1844         (gdb_buffered_insn_length_init_dis): Likewise.
1845         (gdb_buffered_insn_length): Adjust accordingly.
1846         (set_disassembler_options): Handle options with arguments.
1847         (show_disassembler_options_sfunc): Likewise.  Add a leading new
1848         line if showing options with descriptions.
1849         (disassembler_options_completer): Adapt to using the
1850         `disasm_options_and_args_t' structure.
1851         * mips-tdep.c (mips_disassembler_options): New variable.
1852         (mips_disassembler_options_o32): Likewise.
1853         (mips_disassembler_options_n32): Likewise.
1854         (mips_disassembler_options_n64): Likewise.
1855         (gdb_print_insn_mips): Don't set `disassembler_options'.
1856         (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
1857         functions.
1858         (mips_gdbarch_init): Always set `gdbarch_print_insn' to
1859         `gdb_print_insn_mips'.  Set `gdbarch_disassembler_options',
1860         `gdbarch_disassembler_options_implicit' and
1861         `gdbarch_valid_disassembler_options'.
1862         * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
1863         `disasm_options_and_args_t' structure.
1864         * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
1865         method.
1866         (valid_disassembler_options): Switch from `disasm_options_t' to
1867         the `disasm_options_and_args_t' structure.
1868         * NEWS: Document `set disassembler-options' support for the MIPS
1869         target.
1870         * gdbarch.h: Regenerate.
1871         * gdbarch.c: Regenerate.
1872
1873 2018-07-02  Sebastian Huber  <sebastian.huber@embedded-brains.de>
1874
1875         * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
1876
1877 2018-06-29  Joel Brobecker  <brobecker@adacore.com>
1878
1879         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
1880         parameter in call to amd64_target_description.
1881         * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
1882         * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
1883         (amd64fbsd_init_abi): Likewise.
1884         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
1885         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
1886         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
1887         * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
1888
1889 2018-06-29  Pedro Alves  <palves@redhat.com>
1890
1891         * gdb/amd64-tdep.h (amd64_create_target_description): Add
1892         "segments" parameter.
1893         * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
1894         (_initialize_amd64_tdep): Update call to
1895         amd64_create_target_description.
1896         (amd64_target_description): Add "segments" parameter.  Adjust
1897         the implementation to use it.
1898         * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
1899         call to amd64_create_target_description.
1900         * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
1901         * gdb/arch/amd64.h (amd64_create_target_description): Add
1902         "segments" register.
1903         * gdb/arch/amd64.c (amd64_create_target_description): Add
1904         "segments" parameter.  Call create_feature_i386_64bit_segments
1905         only if SEGMENTS is true.
1906         * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
1907         call to amd64_create_target_description.
1908
1909 2018-06-29  Pedro Alves  <palves@redhat.com>
1910
1911         * thread.c (thread_target_id_str): New, factored out from ...
1912         (print_thread_info_1): ... here.  Use it to compute the max
1913         "Target Id" column width.
1914
1915 2018-06-29  Pedro Alves  <palves@redhat.com>
1916
1917         * remote.c (remote_target::extra_thread_info): Delete
1918         'display_buf' and 'n' locals.  from the cache, regardless of
1919         packet mechanims is in use.  Use cache for qThreadExtra and qP
1920         methods too.
1921
1922 2018-06-29  Pedro Alves  <palves@redhat.com>
1923
1924         * blockframe.c (find_pc_sect_containing_function): New function.
1925         * breakpoint.c (print_breakpoint_location): Don't call
1926         find_pc_sect_function.
1927         * linespec.c (create_sals_line_offset): Record the location's
1928         symbol in the sal.
1929         * linespec.c (convert_address_location_to_sals): Fill in sal's
1930         symbol with find_pc_sect_containing_function.
1931         * symtab.c (find_function_start_sal): Rename to ...
1932         (find_function_start_sal_1): ... this.
1933         (find_function_start_sal): Reimplement as wrapper around
1934         find_function_start_sal_1, and use
1935         find_pc_sect_containing_function to fill in the sal's symbol.
1936         (find_function_start_sal(symbol*, bool)): Adjust.
1937         * symtab.h (find_pc_function, find_pc_sect_function): Adjust
1938         comments.
1939         (find_pc_sect_containing_function): Declare.
1940
1941 2018-06-29  Pedro Alves  <palves@redhat.com>
1942
1943         * inline-frame.c (stopped_by_user_bp_inline_frame): Return
1944         true if the the location has no symbol.
1945
1946 2018-06-28  Tom Tromey  <tom@tromey.com>
1947
1948         * NEWS: Mention --enable-codesign.
1949         * silent-rules.mk (ECHO_SIGN): New variable.
1950         * configure.ac: Add --enable-codesign.
1951         * configure: Rebuild.
1952         * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
1953         (gdb$(EXEEXT)): Optionally invoke codesign.
1954
1955 2018-06-28  Pedro Alves  <palves@redhat.com>
1956
1957         * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
1958         comments.
1959         (switch_to_thread_no_regs): Adjust comment.
1960         * infcmd.c (stop_pc): Delete.
1961         (post_create_inferior, info_program_command): Replace references
1962         to stop_pc with references to thread_info->suspend.stop_pc.
1963         * inferior.h (stop_pc): Delete declaration.
1964         * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
1965         (handle_inferior_event_1, handle_signal_stop)
1966         (process_event_stop_test, keep_going_stepped_thread)
1967         (handle_step_into_function, handle_step_into_function_backward)
1968         (print_stop_location): Replace references to stop_pc with
1969         references to thread_info->suspend.stop_pc.
1970         (struct infcall_suspend_state) <stop_pc>: Delete field.
1971         (save_infcall_suspend_state, restore_infcall_suspend_state):
1972         Remove references to inf_stat->stop_pc.
1973         * linux-fork.c (fork_load_infrun_state): Likewise.
1974         * record-btrace.c (record_btrace_set_replay): Likewise.
1975         * record-full.c (record_full_goto_entry): Likewise.
1976         * remote.c (print_one_stopped_thread): Likewise.
1977         * target.c (target_resume): Extend comment.
1978         * thread.c (set_executing_thread): New.
1979         (set_executing): Use it.
1980         (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
1981         Remove references to stop_pc.
1982
1983 2018-06-28  Pedro Alves  <palves@redhat.com>
1984
1985         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
1986         Moving fetching stop_pc until after ecs->event_thread is refreshed.
1987
1988 2018-06-28  Tom Tromey  <tom@tromey.com>
1989
1990         * coffread.c (coff_symfile_finish): Update.
1991         * xcoffread.c (xcoff_symfile_finish): Update.
1992         * elfread.c (elf_symfile_finish): Update.
1993         * symfile.h (dwarf2_free_objfile): Don't declare.
1994         * dwarf2read.c (_initialize_dwarf2_read): Use
1995         register_objfile_data_with_cleanup.
1996         (dwarf2_free_objfile): Now static.  Change signature.
1997
1998 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
1999
2000         * symfile.c (add_symbol_file_command, _initialize_symfile): Add
2001         option "-o" to add-symbol-file-load to add an offset to each
2002         section's load address.
2003         * symfile.c (set_objfile_default_section_offset): New function.
2004
2005 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
2006
2007         * symfile.c (add_symbol_file_command): Make sure that sections
2008         with the same name are sorted in the same order.
2009
2010 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
2011
2012         * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
2013         require the second argument.  If omitted, load sections at the
2014         addresses specified in the file.
2015
2016 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
2017
2018         * symfile.c (symbol_file_command, symbol_file_add_main_1)
2019         (_initialize_symfile): Add option "-o" to symbol-file to add an
2020         offset to each section of the symbol file.
2021
2022 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
2023
2024         * MAINTAINERS (Write After Approval): Add Petr Tesarik.
2025
2026 2018-06-27  Tom Tromey  <tom@tromey.com>
2027
2028         * stack.c (_initialize_stack): Update "func" help text.
2029
2030 2018-06-27  Tom Tromey  <tom@tromey.com>
2031
2032         * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
2033         std::vector.
2034         (unwind_infopy_str, pyuw_create_unwind_info)
2035         (unwind_infopy_add_saved_register, pyuw_sniffer)
2036         (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
2037         Update.
2038         (struct saved_reg): Add constructor.
2039         <value>: Now a gdbpy_ref<>.
2040
2041 2018-06-27  Tom Tromey  <tom@tromey.com>
2042
2043         * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
2044
2045 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
2046
2047         * gdb-gdb.py.in: Format using autopep8.
2048
2049 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
2050
2051         * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
2052         (type_lookup_function): Recognize CORE_ADDR values.
2053
2054 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
2055
2056         * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
2057         print tag_name.
2058
2059 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
2060
2061         * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
2062         <__lt__>: Add.
2063
2064 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
2065
2066         * gdb-gdb.py: Move to...
2067         * gdb-gdb.py.in: ... here.
2068         * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
2069         * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
2070         dependencies.
2071         (distclean): Remove gdb-gdb.py when cleaning.
2072         (gdb-gdb.py, gdb-gdb.gdb): New rules.
2073         * configure: Re-generate.
2074
2075 2018-06-27  Pedro Alves  <palves@redhat.com>
2076
2077         * proc-service.c (get_ps_regcache): New.
2078         (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
2079         (ps_lsetfpregs): Use it.
2080
2081 2018-06-27  Omair Javaid  <omair.javaid@linaro.org>
2082
2083         PR gdb/21695
2084         * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
2085         (dwarf_decode_lines_1): Adjust.
2086
2087 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
2088
2089         * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
2090         override.
2091         <info_proc>: Likewise.
2092
2093 2018-06-26  Joel Brobecker  <brobecker@adacore.com>
2094
2095         * windows-nat.c (do_windows_fetch_inferior_registers): Rename
2096         to windows_fetch_one_register, and only handle the case of
2097         fetching one register.  Move the code that reloads the context
2098         and iterates over all registers if R is negative to...
2099         (windows_nat_target::fetch_registers): ... here.
2100         (do_windows_store_inferior_registers): Rename to
2101         windows_store_one_register, and only handle the case of storing
2102         one register.  Move the code that handles the case where r is
2103         negative to...
2104         (windows_nat_target::store_registers) ... here.
2105
2106 2018-06-26  Tom Tromey  <tom@tromey.com>
2107
2108         PR rust/22574:
2109         * typeprint.c (whatis_exp): Allow ptype/o for Rust.
2110         * rust-lang.c (rust_print_struct_def): Add podata parameter.
2111         Update.
2112         (rust_internal_print_type): Add podata parameter.
2113         (rust_print_type): Update.
2114
2115 2018-06-26  Tom Tromey  <tom@tromey.com>
2116
2117         * typeprint.h (struct print_offset_data) <update, finish,
2118         maybe_print_hole>: New methods.
2119         <indentation>: New constant.
2120         * typeprint.c (print_offset_data::indentation): Define.
2121         (print_offset_data::maybe_print_hole, print_offset_data::update)
2122         (print_offset_data::finish): Move from c-typeprint.c and rename.
2123         * c-typeprint.c (OFFSET_SPC_LEN): Remove.
2124         (print_spaces_filtered_with_print_options): Update.
2125         (c_print_type_union_field_offset, maybe_print_hole)
2126         (c_print_type_struct_field_offset): Move to typeprint.c and
2127         rename.
2128         (c_type_print_base_struct_union): Update.
2129
2130 2018-06-25  Pedro Alves  <palves@redhat.com>
2131
2132         * gdbthread.h (thread_info_ref, delete_thread)
2133         (delete_thread_silent, first_thread_of_inferior)
2134         (any_thread_of_inferior, switch_to_thread)
2135         (enable_thread_stack_temporaries)
2136         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2137         (get_last_thread_stack_temporary)
2138         (value_in_thread_stack_temporaries, can_access_registers_thread):
2139         Spell out "struct thread_info" instead of just "thread_info".
2140         * inferior.h (notice_new_inferior): Likewise.
2141
2142 2018-06-25  Pedro Alves  <palves@redhat.com>
2143
2144         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
2145         pass thread_info pointer to delete_thread.
2146         (windows_nat_target::detach): Pass inferior pointer to
2147         detach_inferior.
2148         * aix-thread.c (sync_threadlists): Pass thread_info pointer to
2149         delete_thread.
2150         * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
2151         * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
2152         and pass a thread_info pointer to delete_thread.
2153         * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
2154         pass thread_info pointer to delete_thread.
2155         * go32-nat.c (go32_nat_target::mourn_inferior): Remove
2156         delete_thread_silent call.
2157         * procfs.c (procfs_target::detach): Pass inferior pointer to
2158         detach_inferior.
2159         (procfs_target::wait): Pass thread_info pointer to delete_thread.
2160         * remote-sim.c (gdbsim_target::mourn_inferior): Remove
2161         delete_thread_silent call.
2162         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
2163         pass thread_info pointer to delete_thread.
2164         (windows_nat_target::detach): Pass inferior pointer to
2165         delete_inferior.
2166
2167 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
2168
2169         * regcache.c (readable_regcache::read_part): Fix asserts.
2170         (reg_buffer::raw_collect_part): New function.
2171         (regcache::write_part): Fix asserts.
2172         (reg_buffer::raw_supply_part): New function.
2173         (regcache::transfer_regset_register): New helper function.
2174         (regcache::transfer_regset): Call new functions.
2175         (regcache_supply_regset): Use gdb_byte*.
2176         (regcache::supply_regset): Likewise.
2177         (regcache_collect_regset): Likewise.
2178         (regcache::collect_regset): Likewise.
2179         * regcache.h (reg_buffer::raw_collect_part): New declaration.
2180         (reg_buffer::raw_supply_part): Likewise.
2181         (regcache::transfer_regset_register): Likewise.
2182         (regcache::transfer_regset): Use gdb_byte*.
2183
2184 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
2185
2186         * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
2187
2188 2018-06-21  Pedro Alves  <palves@redhat.com>
2189
2190         * ada-lang.h (ada_get_task_number): Take a thread_info pointer
2191         instead of a ptid_t.  All callers adjusted.
2192         * ada-tasks.c (ada_get_task_number): Likewise.  All callers
2193         adjusted.
2194         (print_ada_task_info, display_current_task_id, task_command_1):
2195         Adjust.
2196         * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
2197         inferior_thread.
2198         (breakpoint_kind): Adjust.
2199         (remove_breakpoints_pid): Rename to ...
2200         (remove_breakpoints_inf): ... this.  Adjust to take an inferior
2201         pointer.  All callers adjusted.
2202         (bpstat_clear_actions): Use inferior_thread.
2203         (get_bpstat_thread): New.
2204         (bpstat_do_actions): Use it.
2205         (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
2206         to take a thread_info pointer.  All callers adjusted.
2207         (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
2208         (breakpoint_re_set_thread): Use inferior_thread.
2209         * breakpoint.h (struct inferior): Forward declare.
2210         (bpstat_stop_status): Update.
2211         (remove_breakpoints_pid): Delete.
2212         (remove_breakpoints_inf): New.
2213         * bsd-uthread.c (bsd_uthread_target::wait)
2214         (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
2215         * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
2216         (maint_btrace_packet_history_cmd)
2217         (maint_btrace_clear_packet_history_cmd): Adjust.
2218         (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
2219         inferior_thread.
2220         * cli/cli-interp.c: Include "inferior.h".
2221         * common/refcounted-object.h (struct
2222         refcounted_object_ref_policy): New.
2223         * compile/compile-object-load.c: Include gdbthread.h.
2224         (store_regs): Use inferior_thread.
2225         * corelow.c (core_target::close): Use current_inferior.
2226         (core_target_open): Adjust to use first_thread_of_inferior and use
2227         the current inferior.
2228         * ctf.c (ctf_target::close): Adjust to use current_inferior.
2229         * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
2230         <thread>: ... this new field.  All references adjusted.
2231         (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
2232         Take a thread_info pointer instead of a ptid_t.
2233         * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
2234         (dummy_frame_discard, register_dummy_frame_dtor): Take a
2235         thread_info pointer instead of a ptid_t.
2236         * elfread.c: Include "inferior.h".
2237         (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
2238         Use inferior_thread.
2239         * eval.c (evaluate_subexp): Likewise.
2240         * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
2241         inferior_thread.
2242         * gdb_proc_service.h (struct thread_info): Forward declare.
2243         (struct ps_prochandle) <ptid>: Delete, replaced by ...
2244         <thread>: ... this new field.  All references adjusted.
2245         * gdbarch.h, gdbarch.c: Regenerate.
2246         * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
2247         'thread' parameter.  All implementations and callers adjusted.
2248         * gdbthread.h (thread_info) <set_running>: New method.
2249         (delete_thread, delete_thread_silent): Take a thread_info pointer
2250         instead of a ptid.
2251         (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
2252         (first_thread_of_process): Delete, replaced by ...
2253         (first_thread_of_inferior): ... this new function.  All callers
2254         adjusted.
2255         (any_live_thread_of_process): Delete, replaced by ...
2256         (any_live_thread_of_inferior): ... this new function.  All callers
2257         adjusted.
2258         (switch_to_thread, switch_to_no_thread): Declare.
2259         (is_executing): Delete.
2260         (enable_thread_stack_temporaries): Update comment.
2261         <enable_thread_stack_temporaries>: Take a thread_info pointer
2262         instead of a ptid_t.  Incref the thread.
2263         <~enable_thread_stack_temporaries>: Decref the thread.
2264         <m_ptid>: Delete
2265         <m_thr>: New.
2266         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2267         (get_last_thread_stack_temporary)
2268         (value_in_thread_stack_temporaries, can_access_registers_thread):
2269         Take a thread_info pointer instead of a ptid_t.  All callers
2270         adjusted.
2271         * infcall.c (get_call_return_value): Use inferior_thread.
2272         (run_inferior_call): Work with thread pointers instead of ptid_t.
2273         (call_function_by_hand_dummy): Work with thread pointers instead
2274         of ptid_t.  Use thread_info_ref.
2275         * infcmd.c (proceed_thread_callback): Access thread's state
2276         directly.
2277         (ensure_valid_thread, ensure_not_running): Use inferior_thread,
2278         access thread's state directly.
2279         (continue_command): Use inferior_thread.
2280         (info_program_command): Use find_thread_ptid and access thread
2281         state directly.
2282         (proceed_after_attach_callback): Use thread state directly.
2283         (notice_new_inferior): Take a thread_info pointer instead of a
2284         ptid_t.  All callers adjusted.
2285         (exit_inferior): Take an inferior pointer instead of a pid.  All
2286         callers adjusted.
2287         (exit_inferior_silent): New.
2288         (detach_inferior): Delete.
2289         (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
2290         (gdb_inferior_id_to_pid, in_inferior_list): Delete.
2291         (detach_inferior_command, kill_inferior_command): Use
2292         find_inferior_id instead of valid_gdb_inferior_id and
2293         gdb_inferior_id_to_pid.
2294         (inferior_command): Use inferior and thread pointers.
2295         * inferior.h (struct thread_info): Forward declare.
2296         (notice_new_inferior): Take a thread_info pointer instead of a
2297         ptid_t.  All callers adjusted.
2298         (detach_inferior): Delete declaration.
2299         (exit_inferior, exit_inferior_silent): Take an inferior pointer
2300         instead of a pid.  All callers adjusted.
2301         (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
2302         (valid_gdb_inferior_id): Delete.
2303         * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
2304         (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
2305         (struct displaced_step_inferior_state) <pid>: Delete, replaced by
2306         ...
2307         <inf>: ... this new field.
2308         <step_ptid>: Delete, replaced by ...
2309         <step_thread>: ... this new field.
2310         (get_displaced_stepping_state): Take an inferior pointer instead
2311         of a pid.  All callers adjusted.
2312         (displaced_step_in_progress_any_inferior): Adjust.
2313         (displaced_step_in_progress_thread): Take a thread pointer instead
2314         of a ptid_t.  All callers adjusted.
2315         (displaced_step_in_progress, add_displaced_stepping_state): Take
2316         an inferior pointer instead of a pid.  All callers adjusted.
2317         (get_displaced_step_closure_by_addr): Adjust.
2318         (remove_displaced_stepping_state): Take an inferior pointer
2319         instead of a pid.  All callers adjusted.
2320         (displaced_step_prepare_throw, displaced_step_prepare)
2321         (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
2322         All callers adjusted.
2323         (start_step_over): Adjust.
2324         (infrun_thread_ptid_changed): Remove bit updating ptids in the
2325         displaced step queue.
2326         (do_target_resume): Adjust.
2327         (fetch_inferior_event): Use inferior_thread.
2328         (context_switch, get_inferior_stop_soon): Take an
2329         execution_control_state pointer instead of a ptid_t.  All callers
2330         adjusted.
2331         (switch_to_thread_cleanup): Delete.
2332         (stop_all_threads): Use scoped_restore_current_thread.
2333         * inline-frame.c: Include "gdbthread.h".
2334         (inline_state) <inline_state>: Take a thread pointer instead of a
2335         ptid_t.  All callers adjusted.
2336         <ptid>: Delete, replaced by ...
2337         <thread>: ... this new field.
2338         (find_inline_frame_state): Take a thread pointer instead of a
2339         ptid_t.  All callers adjusted.
2340         (skip_inline_frames, step_into_inline_frame)
2341         (inline_skipped_frames, inline_skipped_symbol): Take a thread
2342         pointer instead of a ptid_t.  All callers adjusted.
2343         * inline-frame.h (skip_inline_frames, step_into_inline_frame)
2344         (inline_skipped_frames, inline_skipped_symbol): Likewise.
2345         * linux-fork.c (delete_checkpoint_command): Adjust to use thread
2346         pointers directly.
2347         * linux-nat.c (get_detach_signal): Likewise.
2348         * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
2349         (thread_db_notice_clone): Adjust.
2350         (thread_db_find_new_threads_silently)
2351         (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
2352         a thread pointer instead of a ptid_t.  All callers adjusted.
2353         * mi/mi-cmd-var.c: Include "inferior.h".
2354         (mi_cmd_var_update_iter): Update to use thread pointers.
2355         * mi/mi-interp.c (mi_new_thread): Update to use the thread's
2356         inferior directly.
2357         (mi_output_running_pid, mi_inferior_count): Delete, bits factored
2358         out to ...
2359         (mi_output_running): ... this new function.
2360         (mi_on_resume_1): Adjust to use it.
2361         (mi_user_selected_context_changed): Adjust to use inferior_thread.
2362         * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
2363         directly.
2364         (interrupt_thread_callback): : Adjust to use thread and inferior
2365         pointers.
2366         * proc-service.c: Include "gdbthread.h".
2367         (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
2368         * progspace-and-thread.c: Include "inferior.h".
2369         * progspace.c: Include "inferior.h".
2370         * python/py-exitedevent.c (create_exited_event_object): Adjust to
2371         hold a reference to an inferior_object.
2372         * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
2373         inferior_thread.
2374         * python/py-inferior.c (struct inferior_object): Give the type a
2375         tag name instead of a typedef.
2376         (python_on_normal_stop): No need to check if the current thread is
2377         listed.
2378         (inferior_to_inferior_object): Change return type to
2379         inferior_object.  All callers adjusted.
2380         (find_thread_object): Delete, bits factored out to ...
2381         (thread_to_thread_object): ... this new function.
2382         * python/py-infthread.c (create_thread_object): Use
2383         inferior_to_inferior_object.
2384         (thpy_is_stopped): Use thread pointer directly.
2385         (gdbpy_selected_thread): Use inferior_thread.
2386         * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
2387         field, replaced with ...
2388         <thread>: ... this new field.  All users adjusted.
2389         (btpy_insn_or_gap_new): Drop const.
2390         (btpy_list_new): Take a thread pointer instead of a ptid_t.  All
2391         callers adjusted.
2392         * python/py-record.c: Include "gdbthread.h".
2393         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
2394         a ptid_t.  All callers adjusted.
2395         (gdbpy_current_recording): Use inferior_thread.
2396         * python/py-record.h (recpy_record_object) <ptid>: Delete
2397         field, replaced with ...
2398         <thread>: ... this new field.  All users adjusted.
2399         (recpy_element_object) <ptid>: Delete
2400         field, replaced with ...
2401         <thread>: ... this new field.  All users adjusted.
2402         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
2403         a ptid_t.  All callers adjusted.
2404         * python/py-threadevent.c: Include "gdbthread.h".
2405         (get_event_thread): Use thread_to_thread_object.
2406         * python/python-internal.h (struct inferior_object): Forward
2407         declare.
2408         (find_thread_object, find_inferior_object): Delete declarations.
2409         (thread_to_thread_object, inferior_to_inferior_object): New
2410         declarations.
2411         * record-btrace.c: Include "inferior.h".
2412         (require_btrace_thread): Use inferior_thread.
2413         (record_btrace_frame_sniffer)
2414         (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
2415         (get_thread_current_frame): Use scoped_restore_current_thread and
2416         switch_to_thread.
2417         (get_thread_current_frame): Use thread pointer directly.
2418         (record_btrace_replay_at_breakpoint): Use thread's inferior
2419         pointer directly.
2420         * record-full.c: Include "inferior.h".
2421         * regcache.c: Include "gdbthread.h".
2422         (get_thread_arch_regcache): Use the inferior's address space
2423         directly.
2424         (get_thread_regcache, registers_changed_thread): New.
2425         * regcache.h (get_thread_regcache(thread_info *thread)): New
2426         overload.
2427         (registers_changed_thread): New.
2428         (remote_target) <remote_detach_1>: Swap order of parameters.
2429         (remote_add_thread): <remote_add_thread>: Return the new thread.
2430         (get_remote_thread_info(ptid_t)): New overload.
2431         (remote_target::remote_notice_new_inferior): Use thread pointers
2432         directly.
2433         (remote_target::process_initial_stop_replies): Use
2434         thread_info::set_running.
2435         (remote_target::remote_detach_1, remote_target::detach)
2436         (extended_remote_target::detach): Adjust.
2437         * stack.c (frame_show_address): Use inferior_thread.
2438         * target-debug.h (target_debug_print_thread_info_pp): New.
2439         * target-delegates.c: Regenerate.
2440         * target.c (default_thread_address_space): Delete.
2441         (memory_xfer_partial_1): Use current_inferior.
2442         (target_detach): Use current_inferior.
2443         (target_thread_address_space): Delete.
2444         (generic_mourn_inferior): Use current_inferior.
2445         * target.h (struct target_ops) <thread_address_space>: Delete.
2446         (target_thread_address_space): Delete.
2447         * thread.c (init_thread_list): Use ALL_THREADS_SAFE.  Use thread
2448         pointers directly.
2449         (delete_thread_1, delete_thread, delete_thread_silent): Take a
2450         thread pointer instead of a ptid_t.  Adjust all callers.
2451         (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
2452         (first_thread_of_process): Delete, replaced by ...
2453         (first_thread_of_inferior): ... this new function.  All callers
2454         adjusted.
2455         (any_thread_of_process): Rename to ...
2456         (any_thread_of_inferior): ... this, and take an inferior pointer.
2457         (any_live_thread_of_process): Rename to ...
2458         (any_live_thread_of_inferior): ... this, and take an inferior
2459         pointer.
2460         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2461         (value_in_thread_stack_temporaries)
2462         (get_last_thread_stack_temporary): Take a thread pointer instead
2463         of a ptid_t.  Adjust all callers.
2464         (thread_info::set_running): New.
2465         (validate_registers_access): Use inferior_thread.
2466         (can_access_registers_ptid): Rename to ...
2467         (can_access_registers_thread): ... this, and take a thread
2468         pointer.
2469         (print_thread_info_1): Adjust to compare thread pointers instead
2470         of ptids.
2471         (switch_to_no_thread, switch_to_thread): Make extern.
2472         (scoped_restore_current_thread::~scoped_restore_current_thread):
2473         Use m_thread pointer directly.
2474         (scoped_restore_current_thread::scoped_restore_current_thread):
2475         Use inferior_thread.
2476         (thread_command): Use thread pointer directly.
2477         (thread_num_make_value_helper): Use inferior_thread.
2478         * top.c (execute_command): Use inferior_thread.
2479         * tui/tui-interp.c: Include "inferior.h".
2480         * varobj.c (varobj_create): Use inferior_thread.
2481         (value_of_root_1): Use find_thread_global_id instead of
2482         global_thread_id_to_ptid.
2483
2484 2018-06-21  Alan Hayward  <alan.hayward@arm.com>
2485
2486         * regcache.c (readable_regcache::read_part): Avoid memcpy when
2487         possible.
2488         (regcache::write_part): Likewise.
2489         (readable_regcache::cooked_read_part): Update comment.
2490         (readable_regcache::cooked_write_part): Likewise.
2491         * regcache.h: (readable_regcache::read_part): Likewise.
2492         (regcache::write_part): Likewise.
2493
2494 2018-06-21  Richard Bunt  <richard.bunt@arm.com>
2495             Dirk Schubert  <dirk.schubert@arm.com>
2496
2497         * aarch64-linux-nat.c (post_attach): New.
2498         (aarch64_linux_nat_target::post_attach): Override post_attach to
2499         record the number of hardware debug registers.
2500
2501 2018-06-20  Tom Tromey  <tom@tromey.com>
2502
2503         * python/py-param.c (add_setshow_generic): Make parameters const.
2504         (parmpy_init): Update.
2505
2506 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
2507
2508         * regcache.h (regcache_cooked_read_ftype): Rename to...
2509         (register_read_ftype): ...this, change type to function_view.
2510         (class reg_buffer) <save>: Remove src parameter.
2511         (readonly_detached_regcache) <readonly_detached_regcache>: Make
2512         parameter non-const in first overload.  Remove src parameter in
2513         second overload.
2514         * regcache.c (do_cooked_read): Remove.
2515         (readonly_detached_regcache::readonly_detached_regcache): Make
2516         parameter non-const, adjust call to other constructor.
2517         (reg_buffer::save): Remove src parameter.
2518         * frame.c (do_frame_register_read): Remove.
2519         (frame_save_as_regcache): Use lambda function.
2520         * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
2521         parameter to ppu2spu_data *.
2522         (ppu2spu_sniffer): Use lambda function.
2523
2524 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
2525
2526         * record-full.c (record_full_target::insert_breakpoint): Remove
2527         "struct" keyword, add const.
2528
2529 2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>
2530
2531         * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
2532         PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
2533         * configure.ac: Remove AC_PREREQ, add missing quoting.
2534         * gnulib/configure.ac: Modernize usage of
2535         AC_INIT/AM_INIT_AUTOMAKE.  Remove AC_PREREQ.
2536         * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
2537         (AUTOMAKE_VERSION): Bump to 1.15.1.
2538         * configure: Re-generate.
2539         * config.in: Re-generate.
2540         * aclocal.m4: Re-generate.
2541         * gnulib/aclocal.m4: Re-generate.
2542         * gnulib/config.in: Re-generate.
2543         * gnulib/configure: Re-generate.
2544         * gnulib/import/Makefile.in: Re-generate.
2545
2546 2018-06-19  Pedro Alves  <palves@redhat.com>
2547
2548         * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
2549         (lookup_minimal_symbol_by_pc_section): ... here with
2550         gdb_assert_not_reached added.
2551
2552 2018-06-19  Pedro Alves  <palves@redhat.com>
2553
2554         * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
2555         parameter with a block parameter.  Compare location's block symbol
2556         with the frame's block instead of addresses.
2557         (skip_inline_frames): Pass the current block instead of the
2558         frame's address.  Break out as soon as we determine the frame
2559         should not be skipped.
2560
2561 2018-06-18  Tom Tromey  <tom@tromey.com>
2562
2563         * solib-aix.c (solib_aix_get_section_offsets): Return
2564         unique_xmalloc_ptr.
2565         (solib_aix_solib_create_inferior_hook): Update.
2566
2567 2018-06-18  Tom Tromey  <tom@tromey.com>
2568
2569         * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
2570
2571 2018-06-18  Tom Tromey  <tom@tromey.com>
2572
2573         * solib-frv.c (frv_relocate_main_executable): Use
2574         unique_xmalloc_ptr.
2575         * solib-dsbt.c (dsbt_relocate_main_executable): Use
2576         unique_xmalloc_ptr.
2577
2578 2018-06-18  Tom Tromey  <tom@tromey.com>
2579
2580         * objfiles.h (inhibit_section_map_updates): Update.
2581         (resume_section_map_updates, resume_section_map_updates_cleanup):
2582         Remove.
2583         * solib-svr4.c (svr4_handle_solib_event): Update.
2584         * objfiles.c (inhibit_section_map_updates): Return
2585         scoped_restore_tmpl<int>.
2586         (resume_section_map_updates, resume_section_map_updates_cleanup):
2587         Remove.
2588
2589 2018-06-18  Tom Tromey  <tom@tromey.com>
2590
2591         * valprint.h (read_string): Update.
2592         * valprint.c (read_string): Change type of "buffer".
2593         (val_print_string): Update.
2594         * python/py-value.c (valpy_string): Update.
2595         * language.h (struct language_defn) <la_get_string>: Change
2596         type of "buffer".
2597         (default_get_string, c_get_string): Update.
2598         * language.c (default_get_string): Change type of "buffer".
2599         * guile/scm-value.c (gdbscm_value_to_string): Update.
2600         * c-lang.c (c_get_string): Change type of "buffer".
2601
2602 2018-06-18  Tom Tromey  <tom@tromey.com>
2603
2604         * ser-mingw.c (struct pipe_state_destroyer): New.
2605         (pipe_state_up): New typedef.
2606         (cleanup_pipe_state): Remove.
2607         (pipe_windows_open): Use pipe_state_up.  Don't release argv.
2608
2609 2018-06-18  Tom Tromey  <tom@tromey.com>
2610
2611         * rust-lang.h (rust_yyerror): Don't declare.
2612         * rust-lang.c (rust_language_defn): Update.
2613         * rust-exp.y (yyerror): Now static.
2614         * parse.c (parse_exp_in_context_1): Update.
2615         * p-lang.h (p_yyerror): Don't declare.
2616         * p-lang.c (p_language_defn): Update.
2617         * p-exp.y (yyerror): Now static.
2618         * opencl-lang.c (opencl_language_defn): Update.
2619         * objc-lang.c (objc_language_defn): Update.
2620         * m2-lang.h (m2_yyerror): Don't declare.
2621         * m2-lang.c (m2_language_defn): Update.
2622         * m2-exp.y (yyerror): Now static.
2623         * language.h (struct language_defn) <la_error>: Remove.
2624         * language.c (unk_lang_error): Remove.
2625         (unknown_language_defn, auto_language_defn): Remove.
2626         * go-lang.h (go_yyerror): Don't declare.
2627         * go-lang.c (go_language_defn): Update.
2628         * go-exp.y (yyerror): Now static.
2629         * f-lang.h (f_yyerror): Don't declare.
2630         * f-lang.c (f_language_defn): Update.
2631         * f-exp.y (yyerror): Now static.
2632         * d-lang.h (d_yyerror): Don't declare.
2633         * d-lang.c (d_language_defn): Update.
2634         * d-exp.y (yyerror): Now static.
2635         * c-lang.h (c_yyerror): Don't declare.
2636         * c-lang.c (c_language_defn, cplus_language_defn)
2637         (asm_language_defn, minimal_language_defn): Update.
2638         * c-exp.y (yyerror): Now static.
2639         * ada-lang.h (ada_yyerror): Don't declare.
2640         * ada-lang.c (ada_language_defn): Update.
2641         * ada-exp.y (yyerror): Now static.
2642
2643 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
2644
2645         * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
2646         (store_sveregs_to_thread): Likewise.
2647         (aarch64_linux_fetch_inferior_registers): Check for SVE.
2648         (aarch64_linux_store_inferior_registers): Likewise.
2649         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
2650         function.
2651         (aarch64_sve_regs_copy_to_regcache): Likewise.
2652         (aarch64_sve_regs_copy_from_regcache): Likewise.
2653         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
2654         declaration.
2655         (aarch64_sve_regs_copy_to_regcache): Likewise.
2656         (aarch64_sve_regs_copy_from_regcache): Likewise.
2657         (sve_context): Structure from Linux headers.
2658         (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
2659         (SVE_SIG_ZREG_SIZE): Likewise.
2660         (SVE_SIG_PREG_SIZE): Likewise.
2661         (SVE_SIG_FFR_SIZE): Likewise.
2662         (SVE_SIG_REGS_OFFSET): Likewise.
2663         (SVE_SIG_ZREGS_OFFSET): Likewise.
2664         (SVE_SIG_ZREG_OFFSET): Likewise.
2665         (SVE_SIG_ZREGS_SIZE): Likewise.
2666         (SVE_SIG_PREGS_OFFSET): Likewise.
2667         (SVE_SIG_PREG_OFFSET): Likewise.
2668         (SVE_SIG_PREGS_SIZE): Likewise.
2669         (SVE_SIG_FFR_OFFSET): Likewise.
2670         (SVE_SIG_REGS_SIZE): Likewise.
2671         (SVE_SIG_CONTEXT_SIZE): Likewise.
2672         (SVE_PT_REGS_MASK): Likewise.
2673         (SVE_PT_REGS_FPSIMD): Likewise.
2674         (SVE_PT_REGS_SVE): Likewise.
2675         (SVE_PT_VL_INHERIT): Likewise.
2676         (SVE_PT_VL_ONEXEC): Likewise.
2677         (SVE_PT_REGS_OFFSET): Likewise.
2678         (SVE_PT_FPSIMD_OFFSET): Likewise.
2679         (SVE_PT_FPSIMD_SIZE): Likewise.
2680         (SVE_PT_SVE_ZREG_SIZE): Likewise.
2681         (SVE_PT_SVE_PREG_SIZE): Likewise.
2682         (SVE_PT_SVE_FFR_SIZE): Likewise.
2683         (SVE_PT_SVE_FPSR_SIZE): Likewise.
2684         (SVE_PT_SVE_FPCR_SIZE): Likewise.
2685         (__SVE_SIG_TO_PT): Likewise.
2686         (SVE_PT_SVE_OFFSET): Likewise.
2687         (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
2688         (SVE_PT_SVE_ZREG_OFFSET): Likewise.
2689         (SVE_PT_SVE_ZREGS_SIZE): Likewise.
2690         (SVE_PT_SVE_PREGS_OFFSET): Likewise.
2691         (SVE_PT_SVE_PREG_OFFSET): Likewise.
2692         (SVE_PT_SVE_PREGS_SIZE): Likewise.
2693         (SVE_PT_SVE_FFR_OFFSET): Likewise.
2694         (SVE_PT_SVE_FPSR_OFFSET): Likewise.
2695         (SVE_PT_SVE_FPCR_OFFSET): Likewise.
2696         (SVE_PT_SVE_SIZE): Likewise.
2697         (SVE_PT_SIZE): Likewise.
2698         (HAS_SVE_STATE): New define.
2699
2700 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
2701
2702         * nat/aarch64-sve-linux-sigcontext.h: New file.
2703         * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
2704         new files.
2705         (SVE_VQ_MIN): Likewise.
2706         (SVE_VQ_MAX): Likewise.
2707         (SVE_VL_MIN): Likewise.
2708         (SVE_VL_MAX): Likewise.
2709         (SVE_NUM_ZREGS): Likewise.
2710         (SVE_NUM_PREGS): Likewise.
2711         (sve_vl_valid): Likewise.
2712         (struct user_sve_header): Likewise.
2713
2714 2018-06-16  Andrew Burgess  <andrew.burgess@embecosm.com>
2715             Richard Bunt <Richard.Bunt@arm.com>
2716
2717         * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
2718         was requested by GDB.
2719
2720 2018-06-15  Tom de Vries  <tdevries@suse.de>
2721
2722         * MAINTAINERS (Write After Approval): Add Tom de Vries.
2723
2724 2018-06-14  Simon Marchi  <simon.marchi@polymtl.ca>
2725
2726         * gnulib/update-gnulib.sh: Print expected versions of
2727         autoconf/aclocal.
2728
2729 2018-06-14  Simon Marchi  <simon.marchi@ericsson.com>
2730
2731         * arch-utils.c (default_type_align): Use type_length_units.
2732         * gdbtypes.c (type_align): Use type_length_units.
2733
2734 2018-06-14  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2735
2736         * cli/cli-script.c (_initialize_cli_script): Fix online documentation
2737         of 'define' command.
2738
2739 2018-06-14  Tom de Vries  <tdevries@suse.de>
2740
2741         PR cli/22573
2742         * infcmd.c (print_return_value_1): Use get_user_print_options instead of
2743         get_no_prettyformat_print_options.
2744
2745 2018-06-13  Simon Marchi  <simon.marchi@ericsson.com>
2746
2747         * sparc-nat.h: Include target.h.
2748         * sparc64-linux-nat.c (class sparc64_linux_nat_target)
2749         <fetch_registers>: Remove this argument in function call.
2750         <store_registers>: Remove this argument in function call, remove
2751         extra semicolon.
2752         <low_forget_process>: Call sparc64_forget_process instead of
2753         sparc_forget_process.
2754
2755 2018-06-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2756
2757         * procfs.c (_initialize_procfs): Use add_inf_child_target.
2758         (procfs_target::make_corefile_notes): Adjust to new
2759         target_read_alloc return type.
2760
2761 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
2762             Stephen Roberts  <stephen.roberts@arm.com>
2763
2764         PR gdb/22882
2765         * infrun.c (fetch_inferior_event): If GDB is not proceeding then
2766         run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
2767         Move should_notify_stop local into more inner scope.
2768
2769 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
2770             Stephen Roberts  <stephen.roberts@arm.com>
2771
2772         PR gdb/22882
2773         * infrun.c (resume_1): Add call to mark_async_event_handler.
2774
2775 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
2776
2777         * infrun.c (do_target_wait): Change old version of $pc printed.
2778
2779 2018-06-11  Simon Marchi  <simon.marchi@ericsson.com>
2780
2781         * dwarf2read.c (read_index_from_section): Rename to...
2782         (read_gdb_index_from_section): ... this, update all callers.
2783         (dwarf2_read_index): Rename to...
2784         (dwarf2_read_gdb_index): ... this, update all callers.
2785
2786 2018-06-11  John David Anglin  <danglin@gcc.gnu.org>
2787
2788         * gdb/hppa-linux-nat.c
2789         (hppa_linux_nat_target::fetch_inferior_registers): Rename to
2790         hppa_linux_nat_target::fetch_registers.
2791
2792 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
2793
2794         * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
2795         * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
2796         (AARCH64_DWARF_SVE_FFR): Likewise.
2797         (AARCH64_DWARF_SVE_P0): Likewise.
2798         (AARCH64_DWARF_SVE_Z0): Likewise.
2799
2800 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
2801
2802         * common/common-regcache.h (raw_compare): New function.
2803         * regcache.c (regcache::raw_compare): Likewise.
2804         * regcache.h (regcache::raw_compare): New declaration.
2805
2806 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
2807
2808         * common/common-regcache.h (reg_buffer_common): New structure.
2809         * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
2810         (reg_buffer::raw_supply): Likewise.
2811         (reg_buffer::raw_supply_integer): Likewise.
2812         (reg_buffer::raw_supply_zeroed): Likewise.
2813         (reg_buffer::raw_collect): Likewise.
2814         (reg_buffer::raw_collect_integer): Likewise.
2815         * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
2816         (reg_buffer::raw_supply): Likewise.
2817         (reg_buffer::raw_supply_integer): Likewise.
2818         (reg_buffer::raw_supply_zeroed): Likewise.
2819         (reg_buffer::raw_collect): Likewise.
2820         (reg_buffer::raw_collect_integer): Likewise.
2821
2822 2018-06-10  Tom Tromey  <tom@tromey.com>
2823
2824         * remote.c (stop_reply_p): Remove typedef.  Don't declare queue.
2825         (class remote_state) <stop_reply_queue>: Now std::vector.
2826         (remote_state::~remote_state)
2827         (remote_target::stop_reply_queue_length): Update.
2828         (struct queue_iter_param, remove_child_of_pending_fork)
2829         (struct check_pending_event_prevents_wildcard_vcont_callback_data)
2830         (check_pending_event_prevents_wildcard_vcont_callback)
2831         (remove_stop_reply_for_inferior)
2832         (remove_stop_reply_of_remote_state)
2833         (remote_notif_remove_once_on_match)
2834         (stop_reply_match_ptid_and_ws)
2835         (remote_kill_child_of_pending_fork): Remove.
2836         (remote_target::remove_new_fork_children)
2837         (remote_target::check_pending_events_prevent_wildcard_vcont)
2838         (remote_target::discard_pending_stop_replies)
2839         (remote_target::discard_pending_stop_replies_in_queue)
2840         (remote_target::remote_notif_remove_queued_reply)
2841         (remote_target::queued_stop_reply)
2842         (remote_target::push_stop_reply, remote_target::peek_stop_reply)
2843         (remote_target::wait, remote_target::kill_new_fork_children)
2844         (remote_target::async): Update.
2845
2846 2018-06-10  Tom Tromey  <tom@tromey.com>
2847
2848         * record-full.c (record_full_arch_list_cleanups): Remove.
2849         (record_full_message): Use try/catch.
2850         (record_full_wait_cleanups): Remove.
2851         (record_full_wait_1): Use try/catch.
2852         (record_full_restore): Likewise.
2853
2854 2018-06-10  Tom Tromey  <tom@tromey.com>
2855
2856         * record-full.c (record_full_breakpoint_p): Remove typedef.  Don't
2857         declare VEC.  Add constructor.
2858         <in_target_beneath>: Now bool.
2859         (record_full_breakpoints): Now a std::vector, static.
2860         (record_full_sync_record_breakpoints)
2861         (record_full_init_record_breakpoints)
2862         (record_full_target::insert_breakpoint)
2863         (record_full_target::remove_breakpoint): Update.  Don't use XNEW.
2864
2865 2018-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
2866
2867         * dwarf2read.c (process_cu_includes): Remove struct keyword.
2868         * serial.c (serial_interface_lookup): Remove struct keyword.
2869
2870 2018-06-10  Tom Tromey  <tom@tromey.com>
2871
2872         * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
2873         method.
2874         * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
2875         a method.
2876         * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
2877         method.
2878         * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
2879         "beneath" as a method.
2880         * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
2881         Use "beneath" as a method.
2882
2883 2018-06-10  Tom Tromey  <tom@tromey.com>
2884
2885         * tracefile.c (struct trace_file_writer_deleter): New.
2886         <operator()>: Rename from trace_file_writer_xfree.
2887         (trace_file_writer_up): New typedef.
2888         (tsave_command, trace_save_tfile, trace_save_ctf): Update.
2889
2890 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
2891
2892         * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
2893         <m_registers, m_register_status>: Change type to
2894         std::unique_ptr.
2895         * regcache.c (reg_buffer::reg_buffer): Use new instead of
2896         XCNEWVEC.
2897
2898 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
2899
2900         * common/common-regcache.h (enum register_status): Add
2901         underlying type "signed char".
2902         * regcache.h (reg_buffer) <m_register_status>: Change type to
2903         register_status *.
2904         * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
2905         register_status instead of signed char.
2906         (reg_buffer::save): Use REG_UNKNOWN instead of 0.
2907         (reg_buffer::get_register_status): Remove cast.
2908         (readable_regcache::raw_read): Remove cast.
2909         (readable_regcache::cooked_read): Remove cast.
2910
2911 2018-06-09  Tom Tromey  <tom@tromey.com>
2912
2913         * source.c (reverse_search_command, forward_search_command): Use
2914         scoped_fd.
2915
2916 2018-06-09  Tom Tromey  <tom@tromey.com>
2917
2918         * serial.c (serial_ops_p): Remove typedef.  Don't declare VEC.
2919         (serial_ops_list): Now static, std::vector.
2920         (serial_interface_lookup, serial_add_interface): Update.
2921
2922 2018-06-09  Tom Tromey  <tom@tromey.com>
2923
2924         * dwarf2read.c (process_cu_includes): Update.
2925         (process_full_comp_unit): Update.
2926         * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
2927         std::vector.
2928
2929 2018-06-08  Paul Koning  <paul_koning@dell.com>
2930
2931         PR gdb/23252
2932
2933         * python/python.c (do_start_initialization):
2934         Avoid call to internal Python API.
2935         (init__gdb_module): New function.
2936
2937 2018-06-08  Gary Benson <gbenson@redhat.com>
2938
2939         * linux-thread-db.c (valprint.h): New include.
2940         (struct check_thread_db_info): New structure.
2941         (check_thread_db_on_load, tdb_testinfo): New static globals.
2942         (check_thread_db, check_thread_db_callback): New functions.
2943         (try_thread_db_load_1): Run integrity checks if requested.
2944         (maintenance_check_libthread_db): New function.
2945         (_initialize_thread_db): Register "maint check libthread-db"
2946         and "maint set/show check-libthread-db".
2947         * NEWS: Mention the above new commands.
2948
2949 2018-06-08  Tom Tromey  <tom@tromey.com>
2950
2951         * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
2952         now a method.
2953
2954 2018-06-08  Tom Tromey  <tom@tromey.com>
2955
2956         * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
2957
2958 2018-06-08  Tom Tromey  <tom@tromey.com>
2959
2960         * common/btrace-common.h (struct btrace_data): Add constructor,
2961         destructor, move assignment operator.
2962         <empty, clear, fini>: New methods.
2963         <format>: Initialize.
2964         (btrace_data_init, btrace_data_fini, btrace_data_clear)
2965         (btrace_data_empty): Don't declare.
2966         * common/btrace-common.c (btrace_data_init): Remove.
2967         (btrace_data::fini): Rename from btrace_data_fini.
2968         (btrace_data::empty): Rename from btrace_data_empty.
2969         (btrace_data::clear): Rename from btrace_data_clear.  Return
2970         bool.
2971         * btrace.h (make_cleanup_btrace_data): Don't declare.
2972         * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
2973         (parse_xml_btrace): Update.
2974         (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
2975         (maint_btrace_clear_packet_history_cmd): Update.
2976
2977 2018-06-07  Pedro Alves  <palves@redhat.com>
2978
2979         * target.h (target_ops) <beneath>: Now a method.  All references
2980         updated.
2981         (class target_stack): New.
2982         * target.c (g_target_stack): New.
2983         (g_current_top_target): Delete.
2984         (current_top_target): Get the top target out of g_target_stack.
2985         (target_stack::push, target_stack::unpush): New.
2986         (push_target, unpush_target): Reimplement.
2987         (target_is_pushed): Reimplement in terms of g_target_stack.
2988         (target_ops::beneath, target_stack::find_beneath): New.
2989
2990 2018-06-07  Pedro Alves  <palves@redhat.com>
2991
2992         * target.h (find_target_beneath): Delete declaration.
2993         * target.c (find_target_beneath): Delete definition.
2994         * aix-thread.c: All callers of find_target_beneath adjusted to
2995         call target_ops::beneath instead.
2996         * bsd-uthread.c: Likewise.
2997         * linux-thread-db.c: Likewise.
2998         * ravenscar-thread.c: Likewise.
2999         * sol-thread.c: Likewise.
3000         * spu-multiarch.c: Likewise.
3001
3002 2018-06-07  Pedro Alves  <palves@redhat.com>
3003
3004         * target.h (target_ops) <beneath>: Now a method.  All references
3005         updated.
3006         (target_ops) <m_beneath>: New.
3007         * target.c (target_ops::beneath): New.
3008         * corelow.c: Adjust all references to target_ops::beneath.
3009         * linux-thread-db.c: Likewise.
3010         * make-target-delegates: Likewise.
3011         * record-btrace.c: Likewise.
3012         * record-full.c: Likewise.
3013         * remote.c: Likewise.
3014         * target.c: Likewise.
3015         * target-delegates.c: Regenerate.
3016
3017 2018-06-07  Pedro Alves  <palves@redhat.com>
3018
3019         * target.h (target_stack): Delete.
3020         (current_top_target): Declare function.
3021         * target.c (target_stack): Delete.
3022         (g_current_top_target): New.
3023         (current_top_target): New function.
3024         * auxv.c: Use current_top_target instead of target_stack
3025         throughout.
3026         * avr-tdep.c: Likewise.
3027         * breakpoint.c: Likewise.
3028         * corefile.c: Likewise.
3029         * elfread.c: Likewise.
3030         * eval.c: Likewise.
3031         * exceptions.c: Likewise.
3032         * frame.c: Likewise.
3033         * gdbarch-selftests.c: Likewise.
3034         * gnu-v3-abi.c: Likewise.
3035         * ia64-tdep.c: Likewise.
3036         * ia64-vms-tdep.c: Likewise.
3037         * infcall.c: Likewise.
3038         * infcmd.c: Likewise.
3039         * infrun.c: Likewise.
3040         * linespec.c: Likewise.
3041         * linux-tdep.c: Likewise.
3042         * minsyms.c: Likewise.
3043         * ppc-linux-nat.c: Likewise.
3044         * ppc-linux-tdep.c: Likewise.
3045         * procfs.c: Likewise.
3046         * regcache.c: Likewise.
3047         * remote.c: Likewise.
3048         * rs6000-tdep.c: Likewise.
3049         * s390-linux-nat.c: Likewise.
3050         * s390-tdep.c: Likewise.
3051         * solib-aix.c: Likewise.
3052         * solib-darwin.c: Likewise.
3053         * solib-dsbt.c: Likewise.
3054         * solib-spu.c: Likewise.
3055         * solib-svr4.c: Likewise.
3056         * solib-target.c: Likewise.
3057         * sparc-tdep.c: Likewise.
3058         * sparc64-tdep.c: Likewise.
3059         * spu-tdep.c: Likewise.
3060         * symfile.c: Likewise.
3061         * symtab.c: Likewise.
3062         * target-descriptions.c: Likewise.
3063         * target-memory.c: Likewise.
3064         * target.c: Likewise.
3065         * target.h: Likewise.
3066         * tracefile-tfile.c: Likewise.
3067         * tracepoint.c: Likewise.
3068         * valops.c: Likewise.
3069         * valprint.c: Likewise.
3070         * value.c: Likewise.
3071         * windows-tdep.c: Likewise.
3072         * mi/mi-main.c: Likewise.
3073
3074 2018-06-07  Tom Tromey  <tom@tromey.com>
3075
3076         * valprint.h (build_address_symbolic): Declare.
3077         * printcmd.c (print_address_symbolic): Update.
3078         (build_address_symbolic): Change "name" and "filename" to
3079         std::string.
3080         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
3081         Update.
3082         * defs.h (build_address_symbolic): Remove declaration.
3083
3084 2018-06-07  Alan Hayward  <alan.hayward@arm.com>
3085
3086         * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
3087         (aarch64_vnv_type): Add function.
3088         (aarch64_pseudo_register_name): Add V regs for SVE.
3089         (aarch64_pseudo_register_type): Likewise.
3090         (aarch64_pseudo_register_reggroup_p): Likewise.
3091         (aarch64_pseudo_read_value_2): Use V0 offset for SVE
3092         (aarch64_pseudo_read_value): Add V regs for SVE.
3093         (aarch64_pseudo_write_2): Use V0 offset for SVE
3094         (aarch64_pseudo_write): Add V regs for SVE.
3095         * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
3096
3097 2018-06-06  Sergio Durigan Junior  <sergiodj@redhat.com>
3098
3099         * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
3100         (sve_vl_from_vq): Likewise.
3101
3102 2018-06-05  Tom Tromey  <tom@tromey.com>
3103
3104         * cli/cli-cmds.c (show_version): Update.
3105         * top.c (print_gdb_version): Add "interactive" parameter.
3106         Update.
3107         * main.c (captured_main_1): Update.
3108         * top.h (print_gdb_version): Add "interactive" parameter and a
3109         comment.
3110
3111 2018-06-05  David Malcolm  <dmalcolm@redhat.com>
3112
3113         * common/enum-flags.h: Add trailing semicolon to example in
3114         comment.
3115
3116 2018-06-05  Tom Tromey  <tom@tromey.com>
3117
3118         PR cli/12326:
3119         * NEWS: Add entry about pager.
3120         * utils.c (pagination_disabled_for_command): New global.
3121         (prompt_for_continue): Allow "c" response to prompt.
3122         (reinitialize_more_filter): Clear
3123         pagination_disabled_for_command.
3124         (fputs_maybe_filtered): Check pagination_disabled_for_command.
3125
3126 2018-06-04  Tom Tromey  <tom@tromey.com>
3127
3128         * ada-lang.h (ada_lookup_symbol_list): Update.
3129         * ada-lang.c (resolve_subexp): Update.
3130         (symbols_are_identical_enums): Change type of syms.  Remove nsyms
3131         parameter.
3132         (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
3133         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
3134         results parameter to std::vector.
3135         (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
3136         Update.
3137         * ada-exp.y (block_lookup): Update.
3138         (select_possible_type_sym): Change type of syms.  Remove nsyms
3139         parameter.
3140         (write_var_or_type, write_name_assoc): Update.
3141
3142 2018-06-04  Joel Brobecker  <brobecker@adacore.com>
3143
3144         * windows-nat.c (windows_nat_target::xfer_partial): Return
3145         TARGET_XFER_E_IO if we need to delegate to the target beneath
3146         but BENEATH is NULL.
3147
3148 2018-06-04  Simon Marchi  <simon.marchi@ericsson.com>
3149
3150         * Makefile.in (config.status): Add configure.nat as a
3151         dependency.
3152
3153 2018-06-04  Tom Tromey  <tom@tromey.com>
3154
3155         * cp-name-parser.y (cpname_state): Add method declarations.
3156         (HANDLE_QUAL): Update.
3157         (cpname_state::d_grab, cpname_state::fill_comp)
3158         (cpname_state::make_operator, cpname_state::make_dtor)
3159         (cpname_state::make_builtin_type, cpname_state::make_name)
3160         (cpname_state::d_qualify, cpname_state::d_int_type)
3161         (cpname_state::d_unary, cpname_state::d_binary): Now methods.
3162         (%union): Move earlier.
3163
3164 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
3165
3166         * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
3167
3168 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
3169
3170         * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
3171         (aarch64_pseudo_write_1): Likewise.
3172         (aarch64_pseudo_read_value): Use helper.
3173         (aarch64_pseudo_write): Likewise.
3174
3175 2018-06-04  Pedro Alves  <palves@redhat.com>
3176
3177         * darwin-nat.c (darwin_ops): Delete.
3178         (darwin_attach_pid): Use get_native_target.
3179
3180 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
3181
3182         * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
3183         * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
3184
3185 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
3186
3187         * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
3188         * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
3189         (aarch64_gdbarch_init): Check for SVE.
3190         * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
3191
3192 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
3193
3194         * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
3195         * aarch64-tdep.h (aarch64_read_description): Likewise.
3196         * arch/aarch64.c (aarch64_create_target_description): Likewise.
3197         * arch/aarch64.h (aarch64_create_target_description): Likewise.
3198         * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
3199         * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
3200         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
3201
3202 2018-06-02  Simon Marchi  <simon.marchi@ericsson.com>
3203
3204         * value.c (value_fetch_lazy_bitfield): New.
3205         (value_fetch_lazy_memory): New.
3206         (value_fetch_lazy_register): New.
3207         (value_fetch_lazy): Factor out to smaller functions.
3208
3209 2018-06-01  Tom Tromey  <tom@tromey.com>
3210
3211         * cp-name-parser.y (backslashable, represented): Now const.
3212
3213 2018-06-01  Tom Tromey  <tom@tromey.com>
3214
3215         * cp-name-parser.y: Include parser-defs.h.
3216         (parser_fprintf): Remove declaration.
3217
3218 2018-06-01  Tom Tromey  <tom@tromey.com>
3219
3220         * cp-name-parser.y: Use %pure-parser, %lex-param, and
3221         %parse-param.
3222         (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
3223         (global_result): Remove globals.
3224         (struct cpname_state): New.
3225         (yyparse): Don't declare.
3226         (yylex, yyerror): Move declarations after %union.
3227         (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
3228         (make_name): Add state parameter.
3229         Update all callers.
3230         (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
3231         parameter.
3232         (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
3233         Update.
3234         (yylex): Add lvalp, state parameters.
3235         (yyerror): Add state parameter.
3236         (cp_demangled_name_to_comp): Update.
3237
3238 2018-06-01  Tom Tromey  <tom@tromey.com>
3239
3240         * cp-name-parser.y (parser_fprintf): Declare.
3241         (GDB_YY_REMAP_PREFIX): Define.
3242         Include yy-remap.h.  Don't redefine yy* identifiers.
3243
3244 2018-06-01  Tom Tromey  <tom@tromey.com>
3245
3246         * python/py-type.c (typy_legacy_template_argument): Update.
3247         * cp-support.h (cp_demangled_name_to_comp): Update.
3248         * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
3249         parameter to be a "std::string *".
3250         (main): Update.
3251
3252 2018-06-01  H.J. Lu  <hongjiu.lu@intel.com>
3253
3254         * ada-lex.l: Include "diagnostics.h" instead of
3255         "common/diagnostics.h".
3256         * unittests/environ-selftests.c: Likewise.
3257         * common/diagnostics.h: Moved to ../include.
3258
3259 2018-06-01  Joel Brobecker  <brobecker@adacore.com>
3260
3261         * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
3262         to language_mode_manual while calling breakpoint_re_set_one.
3263
3264 2018-06-01  Tom Tromey  <tom@tromey.com>
3265
3266         * valops.c (value_cast_structs, destructor_name_p): Update.
3267         * symtab.c (gdb_mangle_name): Update.
3268         * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
3269         Update.
3270         * p-valprint.c (pascal_object_is_vtbl_ptr_type)
3271         (pascal_object_print_value_fields, pascal_object_print_value):
3272         Update.
3273         * p-typeprint.c (pascal_type_print_derivation_info): Update.
3274         * linespec.c (find_methods): Update.
3275         * gdbtypes.h (type_name_no_tag): Remove.
3276         (type_name_or_error): Rename from type_name_no_tag_or_error.
3277         * gdbtypes.c (type_name_no_tag): Remove.
3278         (type_name_or_error): Rename from type_name_no_tag_or_error.
3279         (lookup_struct_elt_type, check_typedef): Update.
3280         * expprint.c (print_subexp_standard): Update.
3281         * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
3282         * d-namespace.c (d_lookup_nested_symbol): Update.
3283         * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
3284         (cp_print_class_member): Update.
3285         * cp-namespace.c (cp_lookup_nested_symbol): Update.
3286         * completer.c (add_struct_fields): Update.
3287         * c-typeprint.c (cp_type_print_derivation_info)
3288         (c_type_print_varspec_prefix, c_type_print_base_struct_union):
3289         Update.
3290         * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
3291         (ada_prefer_type, ada_is_exception_sym): Update.
3292
3293 2018-06-01  Tom Tromey  <tom@tromey.com>
3294
3295         * valops.c (enum_constant_from_type, value_namespace_elt)
3296         (value_maybe_namespace_elt): Update.
3297         * valarith.c (find_size_for_pointer_math): Update.
3298         * target-descriptions.c (make_gdb_type): Update.
3299         * symmisc.c (print_symbol): Update.
3300         * stabsread.c (define_symbol, read_type)
3301         (complain_about_struct_wipeout, add_undefined_type)
3302         (cleanup_undefined_types_1): Update.
3303         * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
3304         (rust_range_type_p, val_print_struct, rust_print_struct_def)
3305         (rust_internal_print_type, rust_composite_type)
3306         (rust_evaluate_funcall, rust_evaluate_subexp)
3307         (rust_inclusive_range_type_p): Update.
3308         * python/py-type.c (typy_get_tag): Update.
3309         * p-typeprint.c (pascal_type_print_base): Update.
3310         * mdebugread.c (parse_symbol, parse_type): Update.
3311         * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
3312         Update.
3313         * guile/scm-type.c (gdbscm_type_tag): Update.
3314         * go-lang.c (sixg_string_p): Update.
3315         * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
3316         Update.
3317         * gdbtypes.h (struct main_type) <tag_name>: Remove.
3318         (TYPE_TAG_NAME): Remove.
3319         * gdbtypes.c (type_name_no_tag): Simplify.
3320         (check_typedef, check_types_equal, recursive_dump_type)
3321         (copy_type_recursive, arch_composite_type): Update.
3322         * f-typeprint.c (f_type_print_base): Update.  Print "Type" prefix
3323         in summary mode when needed.
3324         * eval.c (evaluate_funcall): Update.
3325         * dwarf2read.c (fixup_go_packaging, read_structure_type)
3326         (process_structure_scope, read_enumeration_type)
3327         (read_namespace_type, read_module_type, determine_prefix): Update.
3328         * cp-support.c (inspect_type): Update.
3329         * coffread.c (process_coff_symbol, decode_base_type): Update.
3330         * c-varobj.c (c_is_path_expr_parent): Update.
3331         * c-typeprint.c (c_type_print_base_struct_union): Update.
3332         (c_type_print_base_1): Update.  Print struct/class/union/enum in
3333         summary when using C language.
3334         * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
3335         (gen_maybe_namespace_elt): Update.
3336         * ada-lang.c (ada_type_name): Simplify.
3337         (empty_record, ada_template_to_fixed_record_type_1)
3338         (template_to_static_fixed_type)
3339         (to_record_with_fixed_variant_part, ada_check_typedef): Update.
3340
3341 2018-06-01  Tom Tromey  <tom@tromey.com>
3342
3343         * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
3344         c_print_type.
3345         * c-typeprint.c (c_print_type_1): Add "language" parameter.
3346         (c_print_type): Update.
3347         (c_print_type): New overload.
3348         (c_type_print_varspec_prefix, c_type_print_args)
3349         (c_type_print_varspec_suffix, c_print_type_no_offsets)
3350         (c_type_print_base_struct_union, c_type_print_base_1)
3351         (cp_type_print_method_args): Add "language" parameter.
3352         (c_type_print_base): Update.
3353         * c-lang.h (c_print_type): Add new overload.
3354
3355 2018-06-01  Tom Tromey  <tom@tromey.com>
3356
3357         * typeprint.h (c_type_print_varspec_suffix): Don't declare.
3358         * c-typeprint.c (c_type_print_varspec_suffix): Now static.
3359
3360 2018-06-01  Alan Hayward  <alan.hayward@arm.com>
3361
3362         * aarch64-tdep.c (aarch64_sve_register_names): New const
3363         var.
3364         * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
3365         (AARCH64_SVE_Z_REGS_NUM): New define.
3366         (AARCH64_SVE_P_REGS_NUM): Likewise.
3367         (AARCH64_SVE_NUM_REGS): Likewise.
3368
3369 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
3370
3371         * nat/linux-ptrace.h [__alpha__]
3372         (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
3373         definitions.
3374
3375 2018-05-31  Maciej W. Rozycki  <macro@mips.com>
3376
3377         * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
3378         the endianness selected.
3379         * NEWS: Document `set endian auto' mode operation update.
3380
3381 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
3382
3383         * Makefile.in: Add new header.
3384         * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
3385         (sve_vl_from_vg): Likewise.
3386         (sve_vq_from_vl): Likewise.
3387         (sve_vl_from_vq): Likewise.
3388         (sve_vq_from_vg): Likewise.
3389         (sve_vg_from_vq): Likewise.
3390         * configure.nat: Add new c file.
3391         * nat/aarch64-sve-linux-ptrace.c: New file.
3392         * nat/aarch64-sve-linux-ptrace.h: New file.
3393
3394 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
3395
3396         * aarch64-linux-nat.c (aarch64_linux_read_description):
3397         Add parmeter zero.
3398         * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
3399         Likewise.
3400         * aarch64-tdep.c (tdesc_aarch64_list): Add.
3401         (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
3402         (aarch64_gdbarch_init): Add parmeter zero.
3403         * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
3404         * arch/aarch64.c (aarch64_create_target_description): Check VQ.
3405         * arch/aarch64.h (aarch64_create_target_description): Add VQ.
3406         parmeter.
3407         * doc/gdb.texinfo: Describe SVE feature
3408         * features/aarch64-sve.c: New file.
3409
3410 2018-05-31  Omair Javaid  <omair.javaid@linaro.org>
3411
3412         PR gdb/23210
3413         * gdbarch.sh (significant_addr_bit): Default to zero when
3414         not set by target architecture.
3415         * gdbarch.c: Re-generated.
3416         * utils.c (address_significant): Update.
3417
3418 2018-05-30  Joel Brobecker  <brobecker@adacore.com>
3419
3420         * stack.c (func_command): Remove trailing newline in call to error.
3421
3422 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3423
3424         * regcache.h (regcache_raw_collect): Remove, update callers to
3425         use regcache::raw_collect.
3426         * regcache.c (regcache_raw_collect): Remove.
3427
3428 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3429
3430         * regcache.h (regcache_raw_supply): Remove, update callers to
3431         use detached_regcache::raw_supply.
3432         * regcache.c (regcache_raw_supply): Remove.
3433
3434 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3435
3436         * regcache.h (regcache_cooked_write_part): Remove, update
3437         callers to use regcache::cooked_write_part.
3438         * regcache.c (regcache_cooked_write_part): Remove.
3439
3440 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3441
3442         * regcache.h (regcache_cooked_read_part): Remove, update callers
3443         to use readable_regcache::cooked_read_part.
3444         * regcache.c (regcache_cooked_read_part): Remove.
3445
3446 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3447
3448         * regcache.h (regcache_cooked_read_value): Remove, update
3449         callers to use readable_regcache::cooked_read_value.
3450         * regcache.c (regcache_cooked_read_value): Remove.
3451
3452 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3453
3454         * regcache.h (regcache_cooked_write): Remove, update callers to
3455         use regcache::cooked_write.
3456         * regcache.c (regcache_cooked_write): Remove.
3457
3458 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3459
3460         * regcache.h (regcache_invalidate): Remove, update callers to
3461         use detached_regcache::invalidate instead.
3462         * regcache.c (regcache_invalidate): Remove.
3463
3464 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3465
3466         * regcache.h (regcache_raw_write_part): Remove, update callers
3467         to use regcache::raw_write_part instead.
3468         * regcache.c (regcache_raw_write_part): Remove.
3469
3470 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3471
3472         * regcache.h (regcache_raw_read_part): Remove, update callers to
3473         use readable_regcache::raw_read_part instead.
3474         * regcache.c (regcache_raw_read_part): Remove.
3475
3476 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3477
3478         * regcache.h (regcache_cooked_read): Remove, update callers to
3479         use readable_regcache::cooked_read instead.
3480         * regcache.c (regcache_cooked_read): Remove.
3481
3482 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3483
3484         * regcache.h (regcache_raw_write): Remove, update callers to use
3485         regcache::raw_write instead.
3486         * regcache.c (regcache_raw_write): Remove.
3487
3488 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3489
3490         * regcache.h (regcache_raw_read): Remove, update callers to use
3491         readable_regcache::raw_read instead.
3492         * regcache.c (regcache_raw_read): Remove.
3493
3494 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3495
3496         * regcache.h (regcache_raw_update): Remove, update callers to
3497         use readable_regcache::raw_update instead.
3498         * regcache.c (regcache_raw_update): Remove.
3499
3500 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3501
3502         * regcache.h (regcache_register_status): Remove, update callers
3503         to use reg_buffer::get_register_status directly instead.
3504         * regcache.c (regcache_register_status): Remove.
3505
3506 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3507
3508         * regcache.h (regcache_get_ptid): Remove, update all callers to
3509         call regcache::ptid instead.
3510         * regcache.c (regcache_get_ptid): Remove.
3511
3512 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3513
3514         * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
3515
3516 2018-05-30  Pedro Alves  <palves@redhat.com>
3517
3518         * common/common-exceptions.h (exception_rethrow): Use
3519         ATTRIBUTE_NORETURN.
3520
3521 2018-05-29  Simon Marchi  <simon.marchi@polymtl.ca>
3522
3523         * breakpoint.c (print_solib_event, check_status_catch_solib):
3524         Remove struct keyword in range-based for loops.
3525         * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
3526         * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
3527         Likewise.
3528         * linespec.c (find_superclass_methods, search_minsyms_for_name):
3529         Likewise.
3530         * symfile.c (addr_info_make_relative): Likewise.
3531         * thread.c (value_in_thread_stack_temporaries): Likewise.
3532
3533 2018-06-12  Weimin Pan  <weimin.pan@oracle.com>
3534
3535         PR gdb/16841
3536         * valops.c (value_struct_elt_for_reference): Call check_typedef on
3537         aggregate type to get its real type before accessing it.
3538
3539 2018-05-29  Weimin Pan  <weimin.pan@oracle.com>
3540
3541         * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
3542         * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
3543         * coff-pe-read.c (add_pe_forwarded_sym): Replace
3544         lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
3545         * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
3546         * jit.c (jit_breakpoint_re_set_internal): Likewise.
3547         * printcmd.c (info_address_command): Likewise.
3548
3549 2018-05-29  Tom Tromey  <tom@tromey.com>
3550
3551         * windows-nat.c (handle_exception): Update fall-through comment.
3552
3553 2018-05-29  Tom Tromey  <tom@tromey.com>
3554
3555         * progspace.h (so_list_ptr): Remove typedef.  Don't declare VEC.
3556         (struct program_space) <added_solibs>: Now a std::vector.
3557         * breakpoint.c (print_solib_event): Update.
3558         (check_status_catch_solib): Update.
3559         * progspace.c (clear_program_space_solib_cache): Update.
3560         * solib.c (update_solib_list): Update.
3561
3562 2018-05-29  Tom Tromey  <tom@tromey.com>
3563
3564         * python/py-type.c (typy_richcompare): Update.
3565         * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
3566         * gdbtypes.h (types_deeply_equal): Return bool.
3567         (types_equal): Likewise.
3568         * gdbtypes.c (type_equality_entry_d): Remove typedef.  Don't
3569         declare VEC.
3570         (check_types_equal): Change worklist to std::vector.  Return
3571         bool.
3572         (struct type_equality_entry): Add constructor.
3573         (compare_maybe_null_strings): Return bool.
3574         (check_types_worklist): Return bool.  Change worklist to
3575         std::vector.
3576         (types_deeply_equal): Use std::vector.
3577         (types_equal): Return bool.
3578         (compare_maybe_null_strings): Simplify.
3579
3580 2018-05-29  Tom Tromey  <tom@tromey.com>
3581
3582         * record-btrace.c (tp_t): Remove typedef.  Don't declare VEC.
3583
3584 2018-05-29  Tom Tromey  <tom@tromey.com>
3585
3586         * objc-lang.h: Don't include cp-support.h.
3587         * common/gdb_vecs.h (const_char_ptr): Remove typedef.  Don't
3588         declare VEC.
3589
3590 2018-05-27  Tom Tromey  <tom@tromey.com>
3591
3592         * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
3593
3594 2018-05-25  Tom Tromey  <tom@tromey.com>
3595
3596         * value.c (value::location): Initialize.
3597
3598 2018-05-25  Tom Tromey  <tom@tromey.com>
3599
3600         * dbxread.c (init_bincl_list): Remove.
3601         (bincl_list): Now a std::vector.
3602         (bincls_allocated, next_bincl): Remove.
3603         (free_bincl_list, do_free_bincl_list_cleanup)
3604         (make_cleanup_free_bincl_list): Remove.
3605         (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
3606         unique_xmalloc_ptr.
3607         (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
3608         (struct header_file_location): Add constructor.
3609         (add_bincl_to_list): Remove.
3610
3611 2018-05-25  Tom Tromey  <tom@tromey.com>
3612
3613         * tui/tui.c (tui_enable): Update.
3614         * mi/mi-interp.c (mi_interp::init): Update.
3615         * interps.h (class interp) <name>: New method.
3616         <m_name>: Rename from name.
3617         (~scoped_restore_interp): Update.
3618         * interps.c (interp::interp): Update.
3619         (interp_add, interp_set, interp_lookup_existing)
3620         (current_interp_named_p): Update.
3621
3622 2018-05-25  Tom Tromey  <tom@tromey.com>
3623
3624         * interps.c (interp_name): Remove.
3625         * mi/mi-interp.c (mi_interp::init): Update.
3626         * interps.h (interp_name): Remove.
3627         (~scoped_restore_interp): Update.
3628         * tui/tui.c (tui_enable): Update.
3629
3630 2018-05-25  Tom Tromey  <tom@tromey.com>
3631
3632         * utils.c (fputs_maybe_filtered): Update.
3633         * linespec.c (decode_line_full): Update.
3634         * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
3635         (mi_print_breakpoint_for_event, mi_solib_loaded)
3636         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
3637         (mi_user_selected_context_changed): Update.
3638         * mi/mi-main.c (mi_execute_command): Update.
3639         * cli/cli-script.c (execute_control_command): Update.
3640         * python/python.c (execute_gdb_command): Update.
3641         * solib.c (info_sharedlibrary_command): Update.
3642         * interps.c (interp_ui_out): Remove.
3643         * interps.h (interp_ui_out): Remove.
3644
3645 2018-05-25  Tom Tromey  <tom@tromey.com>
3646
3647         * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
3648         * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
3649         * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
3650
3651 2018-05-25  Tom Tromey  <tom@tromey.com>
3652
3653         * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
3654         * interps.c (interp_exec): Use scoped_restore.
3655
3656 2018-05-25  Tom Tromey  <tom@tromey.com>
3657
3658         * remote.c (remote_target::remote_file_get): Use
3659         gdb::byte_vector.
3660         (remote_target::remote_file_put): Likewise.
3661
3662 2018-05-25  Tom Tromey  <tom@tromey.com>
3663
3664         * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
3665         a std::string.
3666         (get_pe_section_index, add_pe_exported_sym): Update.
3667         (read_pe_exported_syms): Use gdb::def_vector.
3668
3669 2018-05-25  Tom Tromey  <tom@tromey.com>
3670
3671         * frame.c (remove_prev_frame): Remove.
3672         (get_prev_frame_if_no_cycle): Use TRY/CATCH.
3673
3674 2018-05-25  Maciej W. Rozycki  <macro@mips.com>
3675
3676         * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
3677         Remove prototypes.
3678         * mips-linux-nat.c (supply_fpregset): Always call
3679         `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
3680         (fill_fpregset): Always call `mips64_fill_fpregset' rather than
3681         `mips_fill_fpregset'.
3682         * mips-linux-tdep.c (mips_supply_fpregset)
3683         (mips_supply_fpregset_wrapper, mips_fill_fpregset)
3684         (mips_fill_fpregset_wrapper): Remove functions.
3685         (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
3686         (mips_linux_fpregset): Remove variable.
3687         (mips_linux_iterate_over_regset_sections): Use
3688         `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
3689         (mips_linux_o32_sigframe_init): Remove comment.
3690
3691 2018-05-25  Pedro Alves  <palves@redhat.com>
3692
3693         * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
3694         (struct readahead_cache, struct packet_reg, struct
3695         remote_arch_state, class remote_state): Move higher up in the
3696         file.
3697         (remote_target::m_remote_state): Now an object instead of a pointer.
3698         (remote_target::get_remote_state): Adjust.
3699
3700 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
3701
3702         * stack.c (select_and_print_frame): Delete.
3703         (struct function_bounds): Move struct within function.
3704         (func_command): Most content moved into new function
3705         find_frame_for_function, use new function, print result, add
3706         function comment.
3707         (find_frame_for_function): New function, now returns a result.
3708
3709 2018-05-24  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
3710
3711         * stack.c (iterate_over_block_arg_vars): Fix comment.
3712         (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
3713
3714 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
3715
3716         PR gdb/23203
3717         * frame.c
3718         (scoped_restore_selected_frame::scoped_restore_selected_frame):
3719         Define.
3720         (scoped_restore_selected_frame::~scoped_restore_selected_frame):
3721         Define.
3722         * frame.h (class scoped_restore_selected_frame): New class.
3723         * stack.c (print_frame_local_vars): Remove catching and rethrowing
3724         of any exception, use scoped_restore_selected_frame to restore the
3725         frame instead.
3726
3727 2018-05-24  Pedro Alves  <palves@redhat.com>
3728
3729         * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
3730         override.
3731
3732 2018-05-23  Tom Tromey  <tom@tromey.com>
3733
3734         * complaints.c (struct complaints): Remove.
3735         (symfile_complaint_book): Remove.
3736         (series): New global.
3737         (complaint_internal): Update.
3738         (clear_complaints): Update.
3739
3740 2018-05-23  Tom Tromey  <tom@tromey.com>
3741
3742         * complaints.c (counters): New global.
3743         (struct complain): Remove.
3744         (struct complaints) <root>: Remove.
3745         (complaint_sentinel): Remove.
3746         (symfile_complaint_book): Update.
3747         (find_complaint) Remove.
3748         (complaint_internal, clear_complaints): Update.
3749
3750 2018-05-23  Tom Tromey  <tom@tromey.com>
3751
3752         * complaints.c (struct complain) <file, line>: Remove.
3753         (find_complaint): Remove file, line parameters.
3754         (complaint_internal): Update.
3755
3756 2018-05-23  Tom Tromey  <tom@tromey.com>
3757
3758         * complaints.c (vcomplaint): Remove.
3759         (complaint_internal) Merge in contents of vcomplaint.
3760
3761 2018-05-23  Tom Tromey  <tom@tromey.com>
3762
3763         * complaints.c (struct complaints) <explanation>: Remove.
3764         (symfile_explanations): Remove.
3765         (symfile_complaint_book): Update.
3766         (vcomplaint): Update.
3767         (struct explanation): Remove.
3768
3769 2018-05-23  Tom Tromey  <tom@tromey.com>
3770
3771         * complaints.c (symfile_complaints): Remove.
3772         (complaint_internal): Remove "complaints" parameter.
3773         (clear_complaints, vcomplaint): Remove "c" parameter.
3774         (get_complaints): Remove.
3775         * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
3776         (dwarf2_debug_line_missing_file_complaint)
3777         (dwarf2_debug_line_missing_end_sequence_complaint)
3778         (dwarf2_complex_location_expr_complaint)
3779         (dwarf2_const_value_length_mismatch_complaint)
3780         (dwarf2_section_buffer_overflow_complaint)
3781         (dwarf2_macro_malformed_definition_complaint)
3782         (dwarf2_invalid_attrib_class_complaint)
3783         (create_addrmap_from_index, dw2_symtab_iter_next)
3784         (dw2_expand_marked_cus)
3785         (dw2_debug_names_iterator::find_vec_in_debug_names)
3786         (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
3787         (create_debug_type_hash_table, init_cutu_and_read_dies)
3788         (partial_die_parent_scope, add_partial_enumeration)
3789         (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
3790         (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
3791         (read_import_statement, read_file_scope, create_dwo_cu_reader)
3792         (create_cus_hash_table, create_dwp_hash_table)
3793         (inherit_abstract_dies, read_func_scope, read_call_site_scope)
3794         (dwarf2_rnglists_process, dwarf2_ranges_process)
3795         (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
3796         (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
3797         (handle_struct_member_die, process_structure_scope)
3798         (read_array_type, read_common_block, read_module_type)
3799         (read_tag_pointer_type, read_typedef, read_base_type)
3800         (read_subrange_type, load_partial_dies, partial_die_info::read)
3801         (partial_die_info::read, partial_die_info::read)
3802         (partial_die_info::read, read_checked_initial_length_and_offset)
3803         (dwarf2_string_attr, read_formatted_entries)
3804         (dwarf_decode_line_header)
3805         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
3806         (new_symbol, dwarf2_const_value_attr, lookup_die_type)
3807         (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
3808         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
3809         (get_signatured_type, get_DW_AT_signature_type)
3810         (decode_locdesc, file_file_name, consume_improper_spaces)
3811         (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
3812         (dwarf_decode_macro_bytes, dwarf_decode_macros)
3813         (dwarf2_symbol_mark_computed, set_die_type)
3814         (read_attribute_value): Update.
3815         * stap-probe.c (handle_stap_probe, get_stap_base_address):
3816         Update.
3817         * dbxread.c (unknown_symtype_complaint)
3818         (lbrac_mismatch_complaint, repeated_header_complaint)
3819         (set_namestring, function_outside_compilation_unit_complaint)
3820         (read_dbx_symtab, process_one_symbol): Update.
3821         * gdbtypes.c (stub_noname_complaint): Update.
3822         * windows-nat.c (handle_unload_dll): Update.
3823         * coffread.c (coff_symtab_read, enter_linenos, decode_type)
3824         (decode_base_type): Update.
3825         * xcoffread.c (bf_notfound_complaint, ef_complaint)
3826         (eb_complaint, record_include_begin, record_include_end)
3827         (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
3828         (process_xcoff_symbol, read_symbol)
3829         (function_outside_compilation_unit_complaint)
3830         (scan_xcoff_symtab): Update.
3831         * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
3832         * buildsym.c (finish_block_internal, make_blockvector)
3833         (end_symtab_get_static_block, augment_type_symtab): Update.
3834         * dtrace-probe.c (dtrace_process_dof)
3835         (dtrace_static_probe_ops::get_probes): Update.
3836         * complaints.h (struct complaint): Don't declare.
3837         (symfile_complaints): Remove.
3838         (complaint_internal): Remove "complaints" parameter.
3839         (complaint): Likewise.
3840         (clear_complaints): Likewise.
3841         * symfile.c (syms_from_objfile_1, finish_new_objfile)
3842         (reread_symbols): Update.
3843         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
3844         (dwarf2_frame_cache, decode_frame_entry): Update.
3845         * dwarf2loc.c (dwarf_reg_to_regnum): Update.
3846         * objc-lang.c (lookup_objc_class, lookup_child_selector)
3847         (info_selectors_command): Update.
3848         * macrotab.c (macro_include, check_for_redefinition)
3849         (macro_undef): Update.
3850         * objfiles.c (filter_overlapping_sections): Update.
3851         * stabsread.c (invalid_cpp_abbrev_complaint)
3852         (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
3853         (define_symbol, error_type, read_type, rs6000_builtin_type)
3854         (stabs_method_name_from_physname, read_member_functions)
3855         (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
3856         (attach_fields_to_type, complain_about_struct_wipeout)
3857         (read_range_type, read_args, common_block_start)
3858         (common_block_end, cleanup_undefined_types_1, scan_file_globals):
3859         Update.
3860         * mdebugread.c (index_complaint, unknown_ext_complaint)
3861         (basic_type_complaint, bad_tag_guess_complaint)
3862         (bad_rfd_entry_complaint, unexpected_type_code_complaint)
3863         (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
3864         (parse_procedure, parse_lines)
3865         (function_outside_compilation_unit_complaint)
3866         (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
3867         (bad_tag_guess_complaint, reg_value_complaint): Update.
3868         * cp-support.c (demangled_name_complaint): Update.
3869         * macroscope.c (sal_macro_scope): Update.
3870         * dwarf-index-write.c (class debug_names): Update.
3871
3872 2018-05-23  Tom Tromey  <tom@tromey.com>
3873
3874         * complaints.c (clear_complaints): Remove "noisy" parameter.
3875         * complaints.h (clear_complaints): Update.
3876         * symfile.c (syms_from_objfile_1, finish_new_objfile)
3877         (reread_symbols): Update.
3878
3879 2018-05-23  Tom Tromey  <tom@tromey.com>
3880
3881         * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
3882         SUBSEQUENT_MESSAGE.
3883         (vcomplaint, clear_complaints): Update.
3884         (symfile_explanations): Remove some messages.
3885
3886 2018-05-23  Tom Tromey  <tom@tromey.com>
3887
3888         * complaints.c (internal_complaint): Remove.
3889         * complaints.h (internal_complaint): Remove.
3890
3891 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
3892
3893         * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
3894
3895 2018-05-22  Pedro Alves  <palves@redhat.com>
3896
3897         * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
3898         (remote_fileio_badfd, remote_fileio_return_errno)
3899         (remote_fileio_return_success, remote_fileio_func_open)
3900         (remote_fileio_func_open, remote_fileio_func_close)
3901         (remote_fileio_func_read, remote_fileio_func_write)
3902         (remote_fileio_func_lseek, remote_fileio_func_rename)
3903         (remote_fileio_func_unlink, remote_fileio_func_stat)
3904         (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
3905         (remote_fileio_func_isatty, remote_fileio_func_system): Add
3906         remote_target parameter.
3907         (remote_fio_func_map) <func>: Add remote_target parameter.
3908         (do_remote_fileio_request, remote_fileio_request):
3909         * remote-fileio.h (remote_fileio_request):
3910         * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
3911         remote_target parameter.
3912         (remote_notif_process, handle_notification): Adjust to pass down
3913         the remote.
3914         (remote_notif_state_allocate): Add remote_target parameter.  Save
3915         it.
3916         * remote-notif.h (struct remote_target): Forward declare.
3917         (struct notif_client) <parse, ack, can_get_pending_events>: Add
3918         remote_target parameter.
3919         (struct remote_notif_state) <remote>: New field.
3920         (remote_notif_ack, remote_notif_parse): Add remote_target
3921         parameter.
3922         (remote_notif_state_allocate, remote_notif_state_allocate): Add
3923         remote_target parameter.
3924         * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
3925         (threads_listing_context, rmt_thread_action, protocol_feature)
3926         (packet_reg, stop_reply, stop_reply_p, enum packet_support)
3927         (packet_result, struct threads_listing_context, remote_state):
3928         Move definitions and declarations higher up.
3929         (remote_target) <~remote_target>: Declare.
3930         (remote_download_command_source, remote_file_put, remote_file_get)
3931         (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
3932         (remote_hostio_pread_vFile, remote_hostio_send_command)
3933         (remote_hostio_set_filesystem, remote_hostio_open)
3934         (remote_hostio_close, remote_hostio_unlink, remote_state)
3935         (get_remote_state, get_remote_packet_size, get_memory_packet_size)
3936         (get_memory_write_packet_size, get_memory_read_packet_size)
3937         (append_pending_thread_resumptions, remote_detach_1)
3938         (append_resumption, remote_resume_with_vcont)
3939         (add_current_inferior_and_thread, wait_ns, wait_as)
3940         (process_stop_reply, remote_notice_new_inferior)
3941         (process_initial_stop_replies, remote_add_thread)
3942         (btrace_sync_conf, remote_btrace_maybe_reopen)
3943         (remove_new_fork_children, kill_new_fork_children)
3944         (discard_pending_stop_replies, stop_reply_queue_length)
3945         (check_pending_events_prevent_wildcard_vcont)
3946         (discard_pending_stop_replies_in_queue, stop_reply)
3947         (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
3948         (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
3949         (remote_interrupt_as, remote_interrupt_ns)
3950         (remote_get_noisy_reply, remote_query_attached)
3951         (remote_add_inferior, remote_current_thread, get_current_thread)
3952         (set_thread, set_general_thread, set_continue_thread)
3953         (set_general_process, write_ptid)
3954         (remote_unpack_thread_info_response, remote_get_threadinfo)
3955         (parse_threadlist_response, remote_get_threadlist)
3956         (remote_threadlist_iterator, remote_get_threads_with_ql)
3957         (remote_get_threads_with_qxfer)
3958         (remote_get_threads_with_qthreadinfo, extended_remote_restart)
3959         (get_offsets, remote_check_symbols, remote_supported_packet)
3960         (remote_query_supported, remote_packet_size)
3961         (remote_serial_quit_handler, remote_detach_pid)
3962         (remote_vcont_probe, remote_resume_with_hc)
3963         (send_interrupt_sequence, interrupt_query)
3964         (remote_notif_get_pending_events, fetch_register_using_p)
3965         (send_g_packet, process_g_packet, fetch_registers_using_g)
3966         (store_register_using_P, store_registers_using_G)
3967         (set_remote_traceframe, check_binary_download)
3968         (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
3969         (remote_xfer_live_readonly_partial, remote_read_bytes)
3970         (remote_send_printf, remote_flash_write, readchar)
3971         (remote_serial_write, putpkt, putpkt_binary, skip_frame)
3972         (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
3973         (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
3974         (extended_remote_disable_randomization, extended_remote_run)
3975         (send_environment_packet, extended_remote_environment_support)
3976         (extended_remote_set_inferior_cwd, remote_write_qxfer)
3977         (remote_read_qxfer, push_stop_reply, vcont_r_supported)
3978         (packet_command): Now methods of ...
3979         (remote_target): ... this class.
3980         (m_remote_state) <remote_target>: New field.
3981         (struct remote_state) <stop_reply_queue,
3982         remote_async_inferior_event_token, wait_forever_enabled_p>: New
3983         fields.
3984         (remote_state::remote_state): Allocate stop_reply_queue.
3985         (remote_state): Delete global.
3986         (get_remote_state_raw): Delete.
3987         (remote_target::get_remote_state): Allocate m_remote_state on
3988         demand.
3989         (get_current_remote_target): New.
3990         (remote_ops, extended_remote_ops): Delete.
3991         (wait_forever_enabled_p, remote_async_inferior_event_token):
3992         Delete, moved to struct remote_state.
3993         (remote_target::close): Delete self.  Destruction bits split to
3994         ...
3995         (remote_target::~remote_target): ... this.
3996         (show_memory_packet_size): Adjust to use
3997         get_current_remote_target.
3998         (struct protocol_feature) <func>: Add remote_target parameter.
3999         All callers adjusted.
4000         (curr_quit_handler_target): New.
4001         (remote_serial_quit_handler): Reimplement.
4002         (remote_target::open_1): Adjust to use get_current_remote_target.
4003         Heap-allocate remote_target/extended_remote_target instances.
4004         (vcont_builder::vcont_builder): Add remote_target parameter, and
4005         save it in m_remote.  All callers adjusted.
4006         (vcont_builder::m_remote): New field.
4007         (vcont_builder::restart, vcont_builder::flush)
4008         (vcont_builder::push_action): Use it.
4009         (remote_target::commit_resume): Use it.
4010         (struct queue_iter_param) <remote>: New field.
4011         (remote_target::remove_new_fork_children): Fill in 'remote' field.
4012         (check_pending_event_prevents_wildcard_vcont_callback_data): New.
4013         (check_pending_event_prevents_wildcard_vcont_callback)
4014         (remote_target::check_pending_events_prevent_wildcard_vcont)
4015         (remote_target::discard_pending_stop_replies)
4016         (remote_target::discard_pending_stop_replies_in_queue)
4017         (remote_target::remote_notif_remove_queued_reply): Fill in
4018         'remote' field.
4019         (remote_notif_get_pending_events): New.
4020         (remote_target::readchar, remote_target::remote_serial_write):
4021         Save/restore curr_quit_handler_target.
4022         (putpkt): New.
4023         (kill_new_fork_children): Fill in 'remote' field.
4024         (packet_command): Use get_current_remote_target, defer to
4025         remote_target method of same name.
4026         (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
4027         parameter, and save it in m_remote.  All callers adjusted.
4028         (scoped_remote_fd::release): Use m_remote.
4029         (scoped_remote_fd::m_remote): New field.
4030         (remote_file_put, remote_file_get, remote_file_delete): Use
4031         get_current_remote_target, defer to remote_target method of same
4032         name.
4033         (remote_btrace_reset): Add remote_state paremeter.  Update all
4034         callers.
4035         (remote_async_inferior_event_handler). Pass down 'data'.
4036         (remote_new_objfile): Use get_current_remote_target.
4037         (remote_target::vcont_r_supported): New.
4038         (set_range_stepping): Use get_current_remote_target and
4039         remote_target::vcont_r_supported.
4040         (_initialize_remote): Don't allocate 'remote_state' and
4041         'stop_reply_queue' globals.
4042         * remote.h (struct remote_target): Forward declare.
4043         (getpkt, putpkt, remote_notif_get_pending_events): Add
4044         'remote_target' parameter.
4045
4046 2018-05-22  Pedro Alves  <palves@redhat.com>
4047
4048         * remote.c (vcont_builder): Now a class.  Make all data members
4049         private.
4050         (vcont_builder) <vcont_builder, restart, flush, push_action>:
4051         Declare methods.
4052         (vcont_builder_restart): Rename to ...
4053         (vcont_builder::restart): ... this.
4054         (vcont_builder_flush): Rename to ...
4055         (vcont_builder::flush): ... this.
4056         (vcont_builder_push_action): Rename to ...
4057         (vcont_builder::push_action): ... this.
4058         (remote_target::commit_resume): Adjust.
4059
4060 2018-05-22  Pedro Alves  <palves@redhat.com>
4061
4062         * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
4063         (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
4064         (get_fixed_memory_packet_size): New.
4065         (get_memory_packet_size): Use it.
4066         (set_memory_packet_size): Don't override the config size with
4067         DEFAULT_MAX_MEMORY_PACKET_SIZE.
4068         (show_memory_packet_size): Use get_fixed_memory_packet_size.
4069         Don't refer to get_memory_packet_size if not connected to a remote
4070         target.  Show "(default)" if configured size is 0.
4071
4072 2018-05-22  Pedro Alves  <palves@redhat.com>
4073
4074         * remote.c (remote_target::mourn_inferior): Move
4075         discard_pending_stop_replies call here from ...
4076         (_initialize_remote): ... here.
4077
4078 2018-05-22  Pedro Alves  <palves@redhat.com>
4079
4080         * remote.c (compare_section_command): Remove set_general_process
4081         call.
4082
4083 2018-05-22  Pedro Alves  <palves@redhat.com>
4084
4085         * remote.c (struct packet_reg, struct remote_arch_state):
4086         Move higher up in the file.
4087         (remote_state) <m_arch_states>: Store remote_arch_state values
4088         instead of remote_arch_state pointers.
4089         (remote_state::get_remote_arch_state): Adjust.
4090
4091 2018-05-22  Pedro Alves  <palves@redhat.com>
4092
4093         * remote.c: Include <unordered_map>.
4094         (remote_state): Now a class.
4095         (remote_state) <get_remote_arch_state>: Declare method.
4096         <get_remote_arch_state>: New field.
4097         (remote_arch_state) <remote_arch_state>: Declare ctor.
4098         <regs>: Now a unique_ptr.
4099         (remote_gdbarch_data_handle): Delete.
4100         (get_remote_arch_state): Delete.
4101         (remote_state::get_remote_arch_state): New.
4102         (get_remote_state): Adjust to call remote_state's
4103         get_remote_arch_state method.
4104         (init_remote_state): Delete, bits factored out to ...
4105         (remote_arch_state::remote_arch_state): ... this new method.
4106         (get_remote_packet_size, get_memory_packet_size)
4107         (process_g_packet, remote_target::fetch_registers)
4108         (remote_target::prepare_to_store, store_registers_using_G)
4109         (remote_target::store_registers, remote_target::get_trace_status):
4110         Adjust to call remote_state's method.
4111         (_initialize_remote): Remove reference to
4112         remote_gdbarch_data_handle.
4113
4114 2018-05-22  Pedro Alves  <palves@redhat.com>
4115
4116         * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
4117         pread>: New method declarations.
4118         (remote_target::open_1): Adjust.
4119         (readahead_cache_invalidate): Rename to ...
4120         (readahead_cache::invalidate): ... this, and adjust to be a class
4121         method.
4122         (readahead_cache_invalidate_fd): Rename to ...
4123         (readahead_cache::invalidate_fd): ... this, and adjust to be a
4124         class method.
4125         (remote_hostio_pwrite): Adjust.
4126         (remote_hostio_pread_from_cache): Rename to ...
4127         (readahead_cache::pread): ... this, and adjust to be a class
4128         method.
4129         (remote_hostio_close): Adjust.
4130
4131 2018-05-22  Pedro Alves  <palves@redhat.com>
4132
4133         * remote.c (remote_hostio_close_cleanup): Delete.
4134         (class scoped_remote_fd): New.
4135         (remote_file_put, remote_file_get): Use it.
4136
4137 2018-05-22  Pedro Alves  <palves@redhat.com>
4138
4139         (struct vCont_action_support): Use bool and initialize all fields.
4140         (struct readahead_cache): Initialize all fields.
4141         (remote_state): Use bool and initialize all fields.
4142         (remote_state::remote_state, remote_state::~remote_state): New.
4143         (new_remote_state): Delete.
4144         (_initialize_remote): Use new to allocate remote_state.
4145
4146 2018-05-22  Pedro Alves  <palves@redhat.com>
4147             張俊芝  <zjz@zjz.name>
4148
4149         PR gdb/22973
4150         * c-exp.y: Include "c-support.h".
4151         (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
4152         of tolower.  Use c_ident_is_alpha to scan names.
4153         * c-lang.c: Include "c-support.h".
4154         (convert_ucn, convert_octal, convert_hex, convert_escape): Use
4155         ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
4156         * c-support.h: New file, with bits factored out from ...
4157         * cp-name-parser.y: ... this file.
4158         Include "c-support.h".
4159         (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
4160         c-support.h and renamed.
4161         (symbol_end, yylex): Adjust.
4162
4163 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
4164
4165         * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
4166         parameter type to CORE_ADDR.
4167         * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
4168         parameter type in declaration to CORE_ADDR.
4169         * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
4170         target_auxv_search to get AT_HWCAP and use the result to get the
4171         target description.
4172         * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
4173         to CORE_ADDR. Remove the cast of the return value to unsigned
4174         long. Fix error predicate of target_auxv_search.
4175         (ppc_linux_nat_target::read_description): Change the type of the
4176         hwcap variable to CORE_ADDR.
4177
4178 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
4179
4180         * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
4181         if the size of fpscr is larger than 32 bits.
4182
4183 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
4184
4185         * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
4186         (ppc32_linux_vsxregmap): New global.
4187         (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
4188         regcache_supply_regset, and regcache_collect_regset.
4189         * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
4190         * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
4191         (fetch_vsx_register, store_vsx_register): Remove.
4192         (fetch_vsx_registers): Add regno parameter. Get regset using
4193         ppc_linux_vsxregset. Use regset to supply registers.
4194         (store_vsx_registers): Add regno parameter. Get regset using
4195         ppc_linux_vsxregset. Use regset to collect registers.
4196         (fetch_register): Call fetch_vsx_registers instead of
4197         fetch_vsx_register.
4198         (store_register): Call store_vsx_registers instead of
4199         store_vsx_register.
4200         (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
4201         new regno parameter.
4202         (store_ppc_registers): Call store_vsx_registers with -1 for the
4203         new regno parameter.
4204         * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
4205         (ppc_collect_vsxregset): Remove.
4206
4207 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
4208
4209         * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
4210         offset fields.
4211         * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
4212         for vector register offset fields.
4213         (ppc64_fbsd_reg_offsets): Likewise.
4214         * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
4215         to vector register offset fields.
4216         * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
4217         to vector register offset fields.
4218         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
4219         vector register offset fields.
4220         * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
4221         initializers for vector register offset fields.
4222         (rs6000_aix64_reg_offsets): Likewise.
4223         * rs6000-tdep.c (ppc_vrreg_offset): Remove.
4224         (ppc_supply_vrregset): Remove.
4225         (ppc_collect_vrregset): Remove.
4226         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
4227         (ppc_linux_vrregset) : New function.
4228         (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
4229         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
4230         (ppc32_linux_vrregset): Remove.
4231         (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
4232         and use result instead of ppc32_linux_vrregset.
4233         (ppc32_linux_reg_offsets): Remove initializers for vector register
4234         offset fields.
4235         (ppc64_linux_reg_offsets): Likewise.
4236         * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
4237         * ppc-linux-nat.c: Include regset.h.
4238         (gdb_vrregset_t): Adjust comment to account for little-endian
4239         mode.
4240         (supply_vrregset, fill_vrregset): Remove.
4241         (fetch_altivec_register, store_altivec_register): Remove.
4242         (fetch_altivec_registers): Add regno parameter. Get regset using
4243         ppc_linux_vrregset. Use regset to supply registers.
4244         (store_altivec_registers): Add regno parameter. Get regset using
4245         ppc_linux_vrregset. Use regset to collect registers.
4246         (fetch_register): Call fetch_altivec_registers instead of
4247         fetch_altivec_register.
4248         (store_register): Call store_altivec_registers instead of
4249         store_altivec_register.
4250         (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
4251         the new regno parameter.
4252         (store_ppc_registers): Call store_altivec_registers with -1 for
4253         the new regno parameter.
4254
4255 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
4256
4257         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
4258         (PPC_LINUX_SIZEOF_VSXREGSET): Define.
4259         * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
4260         (gdb_vrregset_t): Change array type size to
4261         PPC_LINUX_SIZEOF_VRREGSET.
4262         (gdb_vsxregset_t): Change array type size to
4263         PPC_LINUX_SIZEOF_VSXREGSET.
4264         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
4265         Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
4266         PPC_LINUX_SIZEOF_VSXREGSET.
4267
4268 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
4269
4270         * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
4271         * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
4272         nat/ppc-linux.c.
4273         (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
4274         ppc_linux_target_wordsize with tid.
4275         (ppc_linux_nat_target::read_description): Call ppc_linux_target
4276         wordsize with tid.
4277         * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
4278         (ppc64_64bit_inferior_p): Add static and inline specifiers.
4279         (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
4280         tid parameter. Remove static specifier.
4281         * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
4282         (ppc_linux_target_wordsize): New declaration.
4283
4284 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
4285
4286         * arch/ppc-linux-common.c: New file.
4287         * arch/ppc-linux-common.h: New file.
4288         * arch/ppc-linux-tdesc.h: New file.
4289         * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
4290         * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
4291         (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
4292         arch/ppc-linux-tdesc.h.
4293         * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
4294         arch/ppc-linux-tdesc.h.
4295         (ppc_linux_nat_target::read_description): Remove target
4296         description matching code. Fill a ppc_linux_features struct and
4297         call ppc_linux_match_description with it. Move comment about ISA
4298         2.05 to ppc-linux-common.c.
4299         * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
4300         arch/ppc-linux-tdesc.h.
4301         (ppc_linux_core_read_description): Remove target description
4302         matching code. Fill a ppc_linux_features struct and call
4303         ppc_linux_match_description with it.
4304         * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
4305         (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
4306         (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
4307         (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
4308         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
4309         (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
4310         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
4311         (tdesc_powerpc_e500l): Remove.
4312
4313 2018-05-22  Joel Brobecker  <brobecker@adacore.com>
4314
4315         * ada-lang.c (catch_assert_command): Pass empty string instead
4316         of NULL for excep_string argument.
4317
4318 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
4319
4320         * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
4321         the width of the requested register exceeds the width of the
4322         `ptrace' data type.
4323
4324 2018-05-21  Tom Tromey  <tom@tromey.com>
4325
4326         * printcmd.c (output_command): Remove.
4327         (output_command_const): Rename to output_command.
4328         * valprint.h (output_command): Rename from output_command_const.
4329         * tracepoint.c (trace_dump_actions): Call output_command.
4330
4331 2018-05-21  Tom Tromey  <tom@tromey.com>
4332
4333         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
4334         (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
4335         * ada-lang.h (create_ada_exception_catchpoint): Update.
4336         * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
4337         std::string.
4338         (create_excep_cond_exprs, ~ada_catchpoint)
4339         (should_stop_exception, print_one_exception)
4340         (print_mention_exception, print_recreate_exception): Update.
4341         (ada_get_next_arg): Remove.
4342         (catch_ada_exception_command_split): Use std::string.  Change type
4343         of "excep_string", "cond_string".
4344         (catch_ada_exception_command): Update.
4345         (create_ada_exception_catchpoint): Change type of excep_string.
4346         (ada_exception_sal): Remove excep_string parameter.
4347         (~ada_catchpoint): Remove.
4348
4349 2018-05-21  Tom Tromey  <tom@tromey.com>
4350
4351         * ada-lang.c (ada_collect_symbol_completion_matches): Remove
4352         cleanup.
4353
4354 2018-05-21  Tom Tromey  <tom@tromey.com>
4355
4356         * ada-lang.c (ada_exception_message_1, ada_exception_message):
4357         Return unique_xmalloc_ptr.
4358         (print_it_exception): Update.
4359
4360 2018-05-21  Tom Tromey  <tom@tromey.com>
4361
4362         * tracepoint.c (trace_dump_actions): Use std::string.
4363
4364 2018-05-21  Tom Tromey  <tom@tromey.com>
4365
4366         * symfile.c (reread_symbols): Use std::string for original_name.
4367
4368 2018-05-21  Tom Tromey  <tom@tromey.com>
4369
4370         * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
4371         (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN.  Default
4372         constructor.
4373
4374 2018-05-20  Simon Marchi  <simon.marchi@polymtl.ca>
4375
4376         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
4377         instance to...
4378         (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
4379         * objfiles.c (get_objfile_bfd_data): Allocate
4380         objfile_per_bfd_storage with obstack_new when allocating on
4381         obstack.
4382
4383 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
4384
4385         * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
4386         OBSTACK_ZALLOC.
4387         * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
4388         * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
4389         * mdebugread.c (mdebug_build_psymtabs): Likewise.
4390         (add_pending): Likewise.
4391         (parse_symbol): Likewise.
4392         (parse_partial_symbols): Likewise.
4393         (psymtab_to_symtab_1): Likewise.
4394         (new_psymtab): Likewise.
4395         (elfmdebug_build_psymtabs): Likewise.
4396         * minsyms.c (terminate_minimal_symbol_table): Likewise.
4397         * objfiles.c (get_objfile_bfd_data): Likewise.
4398         (objfile_register_static_link): Likewise.
4399         * psymtab.c (allocate_psymtab): Likewise.
4400         * stabsread.c (read_member_functions): Likewise.
4401         * xcoffread.c (xcoff_end_psymtab): Likewise.
4402
4403 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
4404
4405         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
4406         compiler supports std::is_trivially_constructible.
4407         * common/poison.h: Include obstack.h.
4408         (IsMallocable): Define to is_trivially_constructible if the
4409         compiler supports it, define to true_type otherwise.
4410         (xobnew): New.
4411         (XOBNEW): Redefine.
4412         (xobnewvec): New.
4413         (XOBNEWVEC): Redefine.
4414         * gdb_obstack.h (obstack_zalloc): New.
4415         (OBSTACK_ZALLOC): Redefine.
4416         (obstack_calloc): New.
4417         (OBSTACK_CALLOC): Redefine.
4418         (obstack_new): New.
4419         * gdbarch.sh: Include gdb_obstack in gdbarch.h.
4420         (gdbarch_obstack): New declaration in gdbarch.h, definition in
4421         gdbarch.c.
4422         (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
4423         obstack_calloc/obstack_zalloc.
4424         (gdbarch_obstack_zalloc): Remove.
4425         * target-descriptions.c (tdesc_data_init): Use obstack_new.
4426
4427 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4428
4429         * stack.c (backtrace_command_1): Remove useless variable int i.
4430
4431 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4432
4433         * stack.c (print_frame_info): Fix comment.
4434
4435 2018-05-18  Tom Tromey  <tom@tromey.com>
4436
4437         * dwarf2read.c (struct dwz_file): Add constructor, initializers.
4438         <dwz_bfd>: Now a gdb_bfd_ref_ptr.
4439         (~dwarf2_per_objfile): Update
4440         (dwarf2_get_dwz_file): Use new.
4441         * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
4442         unique_ptr.
4443
4444 2018-05-18  Tom Tromey  <tom@tromey.com>
4445
4446         * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
4447         unique_ptr.
4448         * dwarf2read.c (struct dwp_file): Add constructor and
4449         initializers.
4450         (open_and_init_dwp_file): Return a unique_ptr.
4451         (dwarf2_per_objfile, create_dwp_hash_table)
4452         (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
4453         (lookup_dwo_unit_in_dwp): Update.
4454         (open_and_init_dwp_file, get_dwp_file): Update.
4455
4456 2018-05-18  Tom Tromey  <tom@tromey.com>
4457
4458         * dwarf2read.c (dwarf2_per_objfile): Update.
4459         (struct mapped_index): Add initializers.
4460         (dwarf2_read_index): Use new.
4461         (dw2_symtab_iter_init): Update.
4462         * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
4463         unique_ptr.
4464
4465 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
4466
4467         * dwarf2read.c (mapped_index) <total_size>: Remove.
4468
4469 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
4470
4471         * unittests/format_pieces-selftests.c (test_format_specifier):
4472         Add ARI comments.
4473
4474 2018-05-18  Tom Tromey  <tom@tromey.com>
4475
4476         * c-typeprint.c (maybe_print_hole): New function.
4477         (c_print_type_struct_field_offset): Update.
4478         (c_type_print_base_struct_union): Call maybe_print_hole.
4479
4480 2018-05-17  Keith Seitz  <keiths@redhat.com>
4481
4482         * breakpoint.c (build_bpstat_chain): New function, moved from
4483         bpstat_stop_status.
4484         (bpstat_stop_status): Add optional parameter, `stop_chain'.
4485         If no stop chain is passed, call build_bpstat_chain to build it.
4486         * breakpoint.h (build_bpstat_chain): Declare.
4487         (bpstat_stop_status): Move documentation here from breakpoint.c.
4488         * infrun.c (handle_signal_stop): Before eliding inlined frames,
4489         build the stop chain and pass it to skip_inline_frames.
4490         Pass this stop chain to bpstat_stop_status.
4491         * inline-frame.c: Include breakpoint.h.
4492         (stopped_by_user_bp_inline_frame): New function.
4493         (skip_inline_frames): Add parameter `stop_chain'.
4494         Move documention to inline-frame.h.
4495         If non-NULL, use stopped_by_user_bp_inline_frame to determine
4496         whether the frame should be elided.
4497         * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
4498         Add moved documentation and update for new parameter.
4499
4500 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
4501
4502         PR cli/14975
4503         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4504         unittests/format_pieces-selftests.c.
4505         * common/format.h (format_piece) <operator==>: New.
4506         (format_pieces) <operator[]>: Remove.
4507         * common/format.c (format_pieces::format_pieces): Handle \e.
4508         * unittests/format_pieces-selftests.c: New.
4509
4510 2018-05-17  Tom Tromey  <tom@tromey.com>
4511
4512         PR symtab/23010:
4513         * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
4514         (dw2_instantiate_symtab): Add skip_partial parameter.
4515         (dw2_find_last_source_symtab, dw2_map_expand_apply)
4516         (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
4517         (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
4518         (dw2_expand_symtabs_matching_one)
4519         (dw2_find_pc_sect_compunit_symtab)
4520         (dw2_debug_names_lookup_symbol)
4521         (dw2_debug_names_expand_symtabs_for_function): Update.
4522         (init_cutu_and_read_dies): Add skip_partial parameter.
4523         (process_psymtab_comp_unit, build_type_psymtabs_1)
4524         (process_skeletonless_type_unit, load_partial_comp_unit)
4525         (psymtab_to_symtab_1): Update.
4526         (load_full_comp_unit): Add skip_partial parameter.
4527         (process_imported_unit_die, dwarf2_read_addr_index)
4528         (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
4529         (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
4530         (read_signatured_type): Update.
4531
4532 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
4533
4534         * value.c (release_value): Remove unused variable.
4535         (record_latest_value): Likewise.
4536         (access_value_history): Likewise.
4537         (preserve_values): Likewise.
4538
4539 2018-05-17  Tom Tromey  <tom@tromey.com>
4540
4541         * extension.h (struct ext_lang_type_printers) <py_type_printers>:
4542         Initialize.
4543
4544 2018-05-16  Maciej W. Rozycki  <macro@mips.com>
4545
4546         PR gdb/22286
4547         * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
4548         Also handle registers whose width is not a multiple of
4549         PTRACE_TYPE_RET.
4550         (linux_nat_trad_target::store_register): Likewise.
4551
4552 2018-05-16  Tom Tromey  <tom@tromey.com>
4553
4554         * gdbcore.h (core_bfd): Redefine.
4555         * corelow.c (core_target::close): Update.
4556         (core_target_open): Update.
4557         * progspace.h (struct program_space) <cbfd>: Now a
4558         gdb_bfd_ref_ptr.
4559
4560 2018-05-16  Tom Tromey  <tom@tromey.com>
4561
4562         PR cli/19551:
4563         * symfile-add-flags.h (enum symfile_add_flags)
4564         <SYMFILE_NOT_FILENAME>: New constant.
4565         * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME.  Get
4566         objfile name from BFD.
4567         (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
4568         * minidebug.c (find_separate_debug_file_in_section): Put
4569         ".gnu_debugdata" into BFD's file name.
4570
4571 2018-05-16  Simon Marchi  <simon.marchi@ericsson.com>
4572
4573         * regcache.c (regcache_read_ftype, regcache_write_ftype):
4574         Remove.
4575
4576 2018-05-15  Tamar Christina  <tamar.christina@arm.com>
4577
4578         PR binutils/21446
4579         * aarch64-tdep.c (aarch64_analyze_prologue,
4580         aarch64_software_single_step, aarch64_displaced_step_copy_insn):
4581         Indicate not interested in errors.
4582
4583 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
4584
4585         * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
4586         Supply the MIPS_ZERO_REGNUM register.
4587
4588 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
4589
4590         * mips-tdep.c (mask_address_var): Make variable static.
4591
4592 2018-05-14  Tom Tromey  <tom@tromey.com>
4593
4594         * dwarf2read.c (rust_union_quirks): Clear rust_unions.
4595
4596 2018-05-11  Andrew Burgess  <andrew.burgess@embecosm.com>
4597
4598         * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
4599         FXSAVE_ADDR for the mxcsr register.
4600
4601 2018-05-11  Max Filippov  <jcmvbkbc@gmail.com>
4602
4603         * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
4604
4605 2018-05-11  Pedro Alves  <palves@redhat.com>
4606
4607         * corelow.c (core_target) <core_target>: No longer inline.
4608         Initialize m_core_gdbarch, m_core_vec and build the section table
4609         here.
4610         <~core_target>: New.
4611         <core_gdbarch, get_core_register_section>: New methods.
4612         <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
4613         factored out from ...
4614         <core_data, core_vec, core_gdbarch>: ... these deleted globals.
4615         (core_ops): Delete.
4616         (sniff_core_bfd): Add gdbarch parameter.
4617         (core_close): Delete, merged into ...
4618         (core_target::close): ... here.  Delete self.
4619         (core_close_cleanup): Delete.
4620         (core_target_open): Allocate a core_target on the heap.  Use a
4621         unique_ptr instead of a cleanup.  Bits moved into the core_target
4622         ctor.  Adjust to use core_target methods instead of globals.
4623         (get_core_register_section): Rename to ...
4624         (core_target::get_core_register_section): ... this and adjust.
4625         (struct get_core_registers_cb_data): New.
4626         (get_core_registers_cb): Use it.  Use bool.
4627         (core_target::fetch_registers, core_target::files_info)
4628         (core_target::xfer_partial, core_target::read_description)
4629         (core_target::pid_to, core_target::thread_name): Adjust to
4630         reference class fields instead of globals.
4631         * target.h (struct target_ops_deleter, target_ops_up): New.
4632
4633 2018-05-11  Pedro Alves  <palves@redhat.com>
4634
4635         * corefile.c (core_file_command): Move to corelow.c.
4636         * corelow.c (the_core_target): Delete.
4637         (core_file_command): Moved from corefile.c.  Check exec_bfd
4638         instead of the_core_target.  Use target_detach instead of calling
4639         into the_core_target directly.
4640         (maybe_say_no_core_file_now): New.
4641         (core_target::detach): Use it.
4642         (_initialize_corelow): Remove references to the_core_target.
4643         * gdbcore.h (the_core_target): Delete.
4644
4645 2018-05-11  Tom Tromey  <tromey@redhat.com>
4646             Pedro Alves  <palves@redhat.com>
4647
4648         * corefile.c (core_bfd): Remove.
4649         * gdbcore.h (core_bfd): Now a macro.
4650         * progspace.h (struct program_space) <cbfd>: New field.
4651
4652 2018-05-11  Tom Tromey  <tom@tromey.com>
4653
4654         * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
4655         gdb::def_vector.
4656
4657 2018-05-10  Tom Tromey  <tom@tromey.com>
4658
4659         * configure: Rebuild.
4660         * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
4661
4662 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
4663
4664         PR server/23158:
4665         * regformats/regdat.sh: Adjust script, following the addition
4666         of the new expedite_regs parameter to init_target_desc.
4667
4668 2018-05-10  Omair Javaid  <omair.javaid@linaro.org>
4669     
4670         PR gdb/23127
4671         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
4672         set_gdbarch_significant_addr_bit.
4673         * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
4674         set_gdbarch_significant_addr_bit.
4675         * utils.c (address_significant): Update to sign extend addr.
4676
4677 2018-05-09  Max Filippov  <jcmvbkbc@gmail.com>
4678
4679         * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
4680         (xtensa_linux_init_abi): Limit tdep->num_regs by
4681         tdep->num_nopriv_regs.
4682         * xtensa-tdep.c (xtensa_derive_tdep): Calculate
4683         tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
4684         not initialized.
4685
4686 2018-05-08  Simon Marchi  <simon.marchi@ericsson.com>
4687
4688         * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
4689
4690 2018-05-08  Andrew Burgess  <andrew.burgess@embecosm.com>
4691
4692         * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
4693         (I387_MXCSR_INIT_VAL): New constant.
4694         * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
4695         buffer if it was supplied by the inferior.
4696         * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
4697         (i387_xsave_get_clear_bv): New function.
4698         (i387_supply_xsave): Only read x87 control registers from the
4699         xsave buffer if the feature is enabled, and the state will have
4700         been written, otherwise, provide a suitable default.
4701         (i387_collect_xsave): Pre-clear all registers in xsave buffer,
4702         including x87 control registers.  Update control registers if they
4703         have changed from the default value, and mark features as enabled
4704         as required.
4705         * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
4706
4707 2018-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
4708
4709         * spu-tdep.c (info_spu_event_command): Fix output formatting.
4710
4711 2018-05-07  Tom Tromey  <tom@tromey.com>
4712
4713         * configure: Rebuild.
4714         * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
4715
4716 2018-05-07  Tom Tromey  <tom@tromey.com>
4717
4718         PR tdep/20362:
4719         * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
4720         bit.  Use correct value for VDIV.
4721
4722 2018-05-04  Tom Tromey  <tom@tromey.com>
4723
4724         * configure: Rebuild.
4725         * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
4726
4727 2018-05-04  Tom Tromey  <tom@tromey.com>
4728
4729         * linux-record.c (record_linux_system_call) <case
4730         RECORD_SYS_RECVFROM>: Add "break".
4731
4732 2018-05-04  Tom Tromey  <tom@tromey.com>
4733
4734         * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
4735         Add missing "break".
4736         * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
4737         Add missing "break".
4738
4739 2018-05-04  Tom Tromey  <tom@tromey.com>
4740
4741         * rs6000-tdep.c (ppc_process_record_op4)
4742         (ppc_process_record_op63): Add fall-through comment.
4743
4744 2018-05-04  Tom Tromey  <tom@tromey.com>
4745
4746         * i386-tdep.c (i386_process_record): Add fall-through comment.
4747
4748 2018-05-04  Tom Tromey  <tom@tromey.com>
4749
4750         * stabsread.c (define_symbol) <case 'p'>: Add fall-through
4751         comment.
4752
4753 2018-05-04  Tom Tromey  <tom@tromey.com>
4754
4755         * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
4756         * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
4757         * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
4758         comment.
4759         * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
4760         comment.
4761         * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
4762         comment.
4763
4764 2018-05-04  Tom Tromey  <tom@tromey.com>
4765
4766         * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
4767
4768 2018-05-04  Tom Tromey  <tom@tromey.com>
4769
4770         * s390-tdep.c (s390_process_record): Fix fall-through comments.
4771         * xcoffread.c (scan_xcoff_symtab): Move comment later.
4772         * symfile.c (section_is_mapped): Fix fall-through comment.
4773         * stabsread.c (define_symbol, read_member_functions): Fix
4774         fall-through comment.
4775         * s390-linux-tdep.c (s390_process_record): Fix fall-through
4776         comment.
4777         * remote.c (remote_wait_as): Fix fall-through comment.
4778         * p-exp.y (yylex): Fix fall-through comment.
4779         * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
4780         comment.
4781         * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
4782         * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
4783         * jv-exp.y (yylex): Fix fall-through comment.
4784         * go-exp.y (lex_one_token): Fix fall-through comment.
4785         * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
4786         fall-through comment.
4787         * f-exp.y (yylex): Fix fall-through comment.
4788         * dwarf2read.c (process_die): Fix fall-through comments.
4789         * dbxread.c (process_one_symbol): Fix fall-through comment.
4790         * d-exp.y (lex_one_token): Fix fall-through comment.
4791         * cp-name-parser.y (yylex): Fix fall-through comment.
4792         * coffread.c (coff_symtab_read): Fix fall-through comment.
4793         * c-exp.y (lex_one_token): Fix fall-through comment.
4794         * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
4795         comment.
4796         * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
4797         comment.
4798
4799 2018-05-04  Tom Tromey  <tom@tromey.com>
4800
4801         PR python/22730:
4802         * NEWS: Mention gdb.execute change.
4803         * gdbcmd.h (execute_control_command): Don't declare.
4804         * python/python.c (execute_gdb_command): Use read_command_lines_1,
4805         execute_control_commands, execute_control_commands_to_string.
4806         * cli/cli-script.h (execute_control_commands)
4807         (execute_control_commands_to_string): Declare.
4808         (execute_control_command): Add from_tty parameter.
4809         * cli/cli-script.c (execute_control_commands)
4810         (execute_control_commands_to_string): New functions.
4811         (execute_user_command): Use execute_control_commands.
4812         (execute_control_command_1): Add "from_tty" parameter.  Update.
4813         (execute_control_command): Likewise.
4814
4815 2018-05-04  Tom Tromey  <tom@tromey.com>
4816
4817         PR python/22731:
4818         * NEWS: Mention that breakpoint commands are writable.
4819         * python/py-breakpoint.c (bppy_set_commands): New function.
4820         (breakpoint_object_getset) <"commands">: Use it.
4821
4822 2018-05-04  Tom Tromey  <tom@tromey.com>
4823
4824         * tracepoint.c (actions_command): Update.
4825         * mi/mi-cmd-break.c (mi_command_line_array)
4826         (mi_command_line_array_cnt, mi_command_line_array_ptr)
4827         (mi_read_next_line): Remove.
4828         (mi_cmd_break_commands): Update.
4829         * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
4830         function_view.
4831         * cli/cli-script.c (get_command_line): Update.
4832         (process_next_line): Use function_view.  Constify.
4833         (recurse_read_control_structure, read_command_lines)
4834         (read_command_lines_1): Change argument types to function_view.
4835         (do_define_command, document_command): Update.
4836         * breakpoint.h (check_tracepoint_command): Don't declare.
4837         * breakpoint.c (check_tracepoint_command): Remove.
4838         (commands_command_1, create_tracepoint_from_upload): Update.
4839
4840 2018-05-04  Tom Tromey  <tom@tromey.com>
4841
4842         PR gdb/11750:
4843         * cli/cli-script.h (enum command_control_type) <define_control>:
4844         New constant.
4845         * cli/cli-script.c (multi_line_command_p): Handle define_control.
4846         (build_command_line, execute_control_command_1)
4847         (process_next_line): Likewise.
4848         (do_define_command): New function, extracted from define_command.
4849         (define_command): Use it.
4850
4851 2018-05-04  Tom Tromey  <tom@tromey.com>
4852
4853         * tracepoint.c (actions_command): Update.
4854         * cli/cli-script.h (read_command_lines): Update.
4855         * cli/cli-script.c (read_command_lines): Constify prompt_arg.
4856         (MAX_TMPBUF): Remove define.
4857         (define_command): Use string_printf.
4858         (document_command): Likewise.
4859         * breakpoint.c (commands_command_1): Update.
4860
4861 2018-05-04  Tom Tromey  <tom@tromey.com>
4862
4863         * top.c (execute_command): Update.
4864         * cli/cli-script.h (print_command_lines): Now varargs.
4865         * cli/cli-script.c (print_command_lines): Now varargs.
4866         (execute_control_command_1) <case while_control, case if_control>:
4867         Update.
4868
4869 2018-05-04  Tom Tromey  <tom@tromey.com>
4870
4871         * tracepoint.c (all_tracepoint_actions): Rename from
4872         all_tracepoint_actions_and_cleanup.  Change return type.
4873         (actions_command, encode_actions_1, encode_actions)
4874         (trace_dump_actions, tdump_command): Update.
4875         * remote.c (remote_download_command_source): Update.
4876         * python/python.c (gdbpy_eval_from_control_command)
4877         (python_command, python_interactive_command): Update.
4878         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
4879         * guile/guile.c (guile_command)
4880         (gdbscm_eval_from_control_command, guile_command): Update.
4881         * compile/compile.c (compile_code_command)
4882         (compile_print_command, compile_to_object): Update.
4883         * cli/cli-script.h (struct command_lines_deleter): New.
4884         (counted_command_line): New typedef.
4885         (struct command_line): Add constructor, destructor.
4886         <body_list>: Remove.
4887         <body_list_0, body_list_1>: New members.
4888         (command_line_up): Remove typedef.
4889         (read_command_lines, read_command_lines_1, get_command_line):
4890         Update.
4891         (copy_command_lines): Don't declare.
4892         * cli/cli-script.c (build_command_line): Use "new".
4893         (get_command_line): Return counted_command_line.
4894         (print_command_lines, execute_user_command)
4895         (execute_control_command_1, while_command, if_command): Update.
4896         (realloc_body_list): Remove.
4897         (process_next_line, recurse_read_control_structure): Update.
4898         (read_command_lines, read_command_lines_1): Return counted_command_line.
4899         (free_command_lines): Use "delete".
4900         (copy_command_lines): Remove.
4901         (define_command, document_command, show_user_1): Update.
4902         * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
4903         a counted_command_line.
4904         * breakpoint.h (counted_command_line): Remove typedef.
4905         (breakpoint_set_commands): Update.
4906         * breakpoint.c (check_no_tracepoint_commands)
4907         (validate_commands_for_breakpoint): Update.
4908         (breakpoint_set_commands): Change commands to be a
4909         counted_command_line.
4910         (commands_command_1, update_dprintf_command_list)
4911         (create_tracepoint_from_upload): Update.
4912
4913 2018-05-04  Tom Tromey  <tom@tromey.com>
4914
4915         * cli/cli-decode.h (cmd_list_element): New constructor.
4916         (~cmd_list_element): New destructor.
4917         (struct cmd_list_element): Add initializers.
4918         * cli/cli-decode.c (do_add_cmd): Use "new".
4919         (delete_cmd): Use "delete".
4920
4921 2018-05-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
4922             Pedro Alves <palves@redhat.com>
4923
4924         PR breakpoints/19806 and support for PR external/20207.
4925         * NEWS: Mention Aarch64 watchpoint improvements.
4926         * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
4927         watchpoints and PR external/20207 watchpoints.
4928         * nat/aarch64-linux-hw-point.c
4929         (kernel_supports_any_contiguous_range): New.
4930         (aarch64_watchpoint_offset): New.
4931         (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
4932         (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
4933         (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
4934         (aarch64_align_watchpoint): New parameters aligned_offset_p and
4935         next_addr_orig_p.  Support PR external/20207 watchpoints.
4936         (aarch64_downgrade_regs): New.
4937         (aarch64_dr_state_insert_one_point): New parameters offset and
4938         addr_orig.
4939         (aarch64_dr_state_remove_one_point): Likewise.
4940         (aarch64_handle_breakpoint): Update caller.
4941         (aarch64_handle_aligned_watchpoint): Likewise.
4942         (aarch64_handle_unaligned_watchpoint): Support addr_orig and
4943         aligned_offset.
4944         (aarch64_linux_set_debug_regs): Remove const from state.  Call
4945         aarch64_downgrade_regs.
4946         (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
4947         * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
4948         (DR_CONTROL_MASK): ... this.
4949         (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
4950         (unsigned int aarch64_watchpoint_offset): New prototype.
4951         (aarch64_linux_set_debug_regs): Remove const from state.
4952         * utils.c (align_up, align_down): Move to ...
4953         * common/common-utils.c (align_up, align_down): ... here.
4954         * utils.h (align_up, align_down): Move to ...
4955         * common/common-utils.h (align_up, align_down): ... here.
4956
4957 2018-05-04  Joel Brobecker  <brobecker@adacore.com>
4958
4959         * sparc-tdep.c (sparc_structure_return_p): Re-implement to
4960         match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
4961         (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
4962         Re-implement to match the ABI as summarized in GCC's
4963         gcc/config/sparc/sparc.c.  All callers updated.
4964         (sparc32_store_arguments): Remove assertion.
4965
4966 2018-05-04  Tom Tromey  <tom@tromey.com>
4967
4968         * printcmd.c: Don't include tui.h.
4969         (decode_format): Use skip_spaces.
4970
4971 2018-05-04  Tom Tromey  <tom@tromey.com>
4972
4973         PR gdb/22619:
4974         * printcmd.c (last_count): New global.
4975         (x_command): Use saved count when repeating.
4976
4977 2018-05-04  Tom Tromey  <tom@tromey.com>
4978
4979         * nto-procfs.c (do_closedir_cleanup): Remove.
4980         (procfs_pidlist): Use gdb_dir_up.
4981         * procfs.c (do_closedir_cleanup): Remove.
4982         (proc_update_threads): Use gdb_dir_up.
4983         * common/filestuff.h (struct gdb_dir_deleter): New.
4984         (gdb_dir_up): New typedef.
4985
4986 2018-05-04  Tom Tromey  <tom@tromey.com>
4987
4988         * ada-lang.c (print_mention_exception): Use std::string.
4989
4990 2018-05-04  Tom Tromey  <tom@tromey.com>
4991
4992         * ada-lang.c (create_excep_cond_exprs): Update.
4993         (ada_exception_catchpoint_cond_string): Use std::string.
4994
4995 2018-05-04  Tom Tromey  <tom@tromey.com>
4996
4997         * ada-lang.c (xget_renaming_scope): Return std::string.
4998         (old_renaming_is_invisible): Update.
4999
5000 2018-05-04  Tom Tromey  <tom@tromey.com>
5001
5002         * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
5003         (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
5004
5005 2018-05-04  Ulrich Weigand  <uweigand@de.ibm.com>
5006
5007         * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
5008
5009 2018-05-04  Tom Tromey  <tom@tromey.com>
5010
5011         * remote.c (remote_query_supported_append): Change type.
5012         (remote_check_symbols): Update.
5013
5014 2018-05-04  Paul Pluzhnikov  <ppluzhnikov@google.com>
5015
5016         PR gdb/11420
5017         * configure.ac: Prepend libpython.
5018         * python/python-config.py: Likewise.
5019         * configure: Regenerate.
5020
5021 2018-05-03  Simon Marchi  <simon.marchi@ericsson.com>
5022
5023         * Makefile.in (%.c: %.l): Use -t instead of --stdout.
5024
5025 2018-05-03  Pedro Alves  <palves@redhat.com>
5026
5027         * s390-linux-nat.c
5028         (s390_linux_nat_target::have_continuable_watchpoint): Mark with
5029         override.  Write 'true' instead of '1'.
5030         (s390_linux_nat_target::watchpoint_addr_within_range): Remove
5031         declaration.
5032
5033 2018-05-02  Pedro Alves  <palves@redhat.com>
5034
5035         * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
5036         add_inf_child_target.
5037         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
5038         add_inf_child_target.
5039         * aix-thread.c (aix_thread_target_info): New.
5040         (aix_thread_target) <shortname, longname, doc>: Delete.
5041         <info>: New.
5042         * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
5043         add_inf_child_target.
5044         * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
5045         add_inf_child_target.
5046         * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
5047         add_inf_child_target.
5048         * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
5049         add_inf_child_target.
5050         * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
5051         add_inf_child_target.
5052         * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
5053         add_inf_child_target.
5054         * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
5055         add_inf_child_target.
5056         * arm-linux-nat.c (_initialize_arm_linux_nat): Use
5057         add_inf_child_target.
5058         * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
5059         add_inf_child_target.
5060         * bfd-target.c (target_bfd_target_info): New.
5061         (target_bfd) <shortname, longname, doc>: Delete.
5062         <info>: New.
5063         * bsd-kvm.c (bsd_kvm_target_info): New.
5064         (bsd_kvm_target) <shortname, longname, doc>: Delete.
5065         <info>: New.
5066         (bsd_kvm_target::open): Rename to ...
5067         (bsd_kvm_target_open): ... this.  Adjust.
5068         * bsd-uthread.c (bsd_uthread_target_info): New.
5069         (bsd_uthread_target) <shortname, longname, doc>: Delete.
5070         <info>: New.
5071         * corefile.c (core_file_command): Adjust.
5072         * corelow.c (core_target_info): New.
5073         (core_target) <shortname, longname, doc>: Delete.
5074         <info>: New.
5075         (core_target::open): Rename to ...
5076         (core_target_open): ... this.  Adjust.
5077         * ctf.c (ctf_target_info): New.
5078         (ctf_target) <shortname, longname, doc>: Delete.
5079         <info>: New.
5080         (ctf_target::open): Rename to ...
5081         (ctf_target_open): ... this.
5082         (_initialize_ctf): Adjust.
5083         * exec.c (exec_target_info): New.
5084         (exec_target) <shortname, longname, doc>: Delete.
5085         <info>: New.
5086         (exec_target::open): Rename to ...
5087         (exec_target_open): ... this.
5088         * gdbcore.h (core_target_open): Declare.
5089         * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
5090         * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
5091         add_inf_child_target.
5092         * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
5093         add_inf_child_target.
5094         * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
5095         add_inf_child_target.
5096         * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
5097         add_inf_child_target.
5098         * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
5099         add_inf_child_target.
5100         * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
5101         add_inf_child_target.
5102         * i386-linux-nat.c (_initialize_i386_linux_nat): Use
5103         add_inf_child_target.
5104         * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
5105         add_inf_child_target.
5106         * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
5107         add_inf_child_target.
5108         * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
5109         add_inf_child_target.
5110         * inf-child.c (inf_child_target_info): New.
5111         (inf_child_target::info): New.
5112         (inf_child_open_target): Remove 'target' parameter.  Use
5113         get_native_target instead.
5114         (inf_child_target::open): Delete.
5115         (add_inf_child_target): New.
5116         * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
5117         Delete.
5118         <info>: New.
5119         (add_inf_child_target): Declare.
5120         (inf_child_open_target): Declare.
5121         * linux-thread-db.c (thread_db_target_info): New.
5122         (thread_db_target) <shortname, longname, doc>: Delete.
5123         <info>: New.
5124         * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
5125         add_inf_child_target.
5126         * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
5127         add_inf_child_target.
5128         * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
5129         add_inf_child_target.
5130         * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
5131         add_inf_child_target.
5132         * make-target-delegates (print_class): Adjust.
5133         * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
5134         add_inf_child_target.
5135         * mips-linux-nat.c (_initialize_mips_linux_nat): Use
5136         add_inf_child_target.
5137         * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
5138         add_inf_child_target.
5139         * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
5140         add_inf_child_target.
5141         * nto-procfs.c (nto_native_target_info): New.
5142         (nto_procfs_target_native) <shortname, longname, doc>:
5143         Delete.
5144         <info>: New.
5145         (nto_procfs_target_info): New.
5146         (nto_procfs_target_procfs) <shortname, longname, doc>:
5147         Delete.
5148         <info>: New.
5149         (init_procfs_targets): Adjust.
5150         * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
5151         add_inf_child_target.
5152         * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
5153         add_inf_child_target.
5154         * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
5155         add_inf_child_target.
5156         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
5157         add_inf_child_target.
5158         * ravenscar-thread.c (ravenscar_target_info): New.
5159         (ravenscar_thread_target) <shortname, longname, doc>:
5160         Delete.
5161         <info>: New.
5162         * record-btrace.c (record_btrace_target_info):
5163         (record_btrace_target) <shortname, longname, doc>: Delete.
5164         <info>: New.
5165         (record_btrace_target::open): Rename to ...
5166         (record_btrace_target_open): ... this.  Adjust.
5167         * record-full.c (record_longname, record_doc): New.
5168         (record_full_base_target) <shortname, longname, doc>: Delete.
5169         <info>: New.
5170         (record_full_target_info): New.
5171         (record_full_target): <shortname>: Delete.
5172         <info>: New.
5173         (record_full_core_open_1, record_full_open_1): Update comments.
5174         (record_full_base_target::open): Rename to ...
5175         (record_full_open): ... this.
5176         (cmd_record_full_restore): Update.
5177         (_initialize_record_full): Update.
5178         * remote-sim.c (remote_sim_target_info): New.
5179         (gdbsim_target) <shortname, longname, doc>: Delete.
5180         <info>: New.
5181         (gdbsim_target::open): Rename to ...
5182         (gdbsim_target_open): ... this.
5183         (_initialize_remote_sim): Adjust.
5184         * remote.c (remote_doc): New.
5185         (remote_target_info): New.
5186         (remote_target) <shortname, longname, doc>: Delete.
5187         <info>: New.
5188         (extended_remote_target_info): New.
5189         (extended_remote_target) <shortname, longname, doc>: Delete.
5190         <info>: New.
5191         (remote_target::open_1): Make static.  Adjust.
5192         * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
5193         * s390-linux-nat.c (_initialize_s390_nat): Use
5194         add_inf_child_target.
5195         * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
5196         add_inf_child_target.
5197         * sol-thread.c (thread_db_target_info): New.
5198         (sol_thread_target) <shortname, longname, doc>: Delete.
5199         <info>: New.
5200         * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
5201         add_inf_child_target.
5202         * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
5203         add_inf_child_target.
5204         * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
5205         add_inf_child_target.
5206         * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
5207         add_inf_child_target.
5208         * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
5209         add_inf_child_target.
5210         * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
5211         add_inf_child_target.
5212         * spu-linux-nat.c (_initialize_spu_nat): Use
5213         add_inf_child_target.
5214         * spu-multiarch.c (spu_multiarch_target_info): New.
5215         (spu_multiarch_target) <shortname, longname, doc>: Delete.
5216         <info>: New.
5217         * target-delegates.c: Regenerate.
5218         * target.c: Include <unordered_map>.
5219         (target_ops_p): Delete.
5220         (DEF_VEC_P(target_ops_p)): Delete.
5221         (target_factories): New.
5222         (test_target_info): New.
5223         (test_target_ops::info): New.
5224         (open_target): Adjust to use target_factories.
5225         (add_target_with_completer): Rename to ...
5226         (add_target): ... this.  Change prototype.  Register target_info
5227         and open callback in target_factories.  Register target_info in
5228         command context instead of target_ops.
5229         (add_target): Delete old implementation.
5230         (add_deprecated_target_alias): Change prototype.  Adjust.
5231         (the_native_target): New.
5232         (set_native_target, get_native_target): New.
5233         (find_default_run_target): Use the_native_target.
5234         (find_attach_target, find_run_target): Simplify.
5235         (target_ops::open): Delete.
5236         (dummy_target_info): New.
5237         (dummy_target::shortname, dummy_target::longname)
5238         (dummy_target::doc): Delete.
5239         (dummy_target::info): New.
5240         (debug_target::shortname, debug_target::longname)
5241         (debug_target::doc): Delete.
5242         (debug_target::info): New.
5243         * target.h (struct target_info): New.
5244         (target_ops::~target_ops): Add comment.
5245         (target_ops::info): New.
5246         (target_ops::shortname, target_ops::longname, target_ops::doc): No
5247         longer virtual.  Implement in terms of target_info.
5248         (set_native_target, get_native_target): Declare.
5249         (target_open_ftype): New.
5250         (add_target, add_target_with_completer)
5251         (add_deprecated_target_alias): Change prototype.
5252         (test_target) <shortname, longname, doc>: Delete.
5253         <info>: New.
5254         * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
5255         add_inf_child_target.
5256         * tracefile-tfile.c (tfile_target_info): New.
5257         (tfile_target) <shortname, longname, doc>: Delete.
5258         <info>: New.
5259         (tfile_target::open): Rename to ...
5260         (tfile_target_open): ... this.
5261         (_initialize_tracefile_tfile): Adjust.
5262         * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
5263         add_inf_child_target.
5264         * windows-nat.c (_initialize_windows_nat): Use
5265         add_inf_child_target.
5266         * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
5267         add_inf_child_target.
5268
5269 2018-05-02  Pedro Alves  <palves@redhat.com>
5270
5271         * linux-nat.h (linux_nat_target) <low_new_thread,
5272         low_delete_thread, low_new_fork, low_forget_process,
5273         low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
5274         New virtual methods.
5275         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
5276         (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
5277         (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
5278         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
5279         (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
5280         Delete.
5281         * linux-fork.c (delete_fork): Adjust to call low method.
5282         * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
5283         (linux_nat_new_fork, linux_nat_forget_process_hook)
5284         (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
5285         (linux_nat_status_is_event):
5286         (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
5287         (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
5288         to call low method.
5289         (sigtrap_is_event): Rename to ...
5290         (linux_nat_target::low_status_is_event): ... this.
5291         (linux_nat_set_status_is_event): Delete.
5292         (save_stop_reason, linux_nat_wait_1)
5293         (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
5294         low methods.
5295         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
5296         (linux_nat_set_new_fork, linux_nat_set_forget_process)
5297         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
5298         (linux_nat_set_prepare_to_resume): Delete.
5299         * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
5300         low virtual methods.
5301         * amd64-linux-nat.c: Likewise.
5302         * arm-linux-nat.c: Likewise.
5303         * i386-linux-nat.c: Likewise.
5304         * ia64-linux-nat.c: Likewise.
5305         * mips-linux-nat.c: Likewise.
5306         * ppc-linux-nat.c: Likewise.
5307         * s390-linux-nat.c: Likewise.
5308         * sparc64-linux-nat.c: Likewise.
5309         * x86-linux-nat.c: Likewise.
5310         * x86-linux-nat.h: Include "nat/x86-linux.h".
5311         (x86_linux_nat_target) <low_new_fork, low_forget_process,
5312         low_prepare_to_resume, low_new_thread, low_delete_thread>:
5313         Override methods.
5314
5315 2018-05-02  Pedro Alves  <palves@redhat.com>
5316
5317         * target.h (target_ops)
5318         <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
5319         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
5320         stopped_by_watchpoint, have_continuable_watchpoint,
5321         stopped_data_address, watchpoint_addr_within_range,
5322         can_accel_watchpoint_condition, can_run, thread_alive,
5323         has_all_memory, has_memory, has_stack, has_registers,
5324         has_execution, can_async_p, is_async_p, supports_non_stop,
5325         always_non_stop_p, can_execute_reverse, supports_multi_process,
5326         supports_enable_disable_tracepoint,
5327         supports_disable_randomization, supports_string_tracing,
5328         supports_evaluation_of_breakpoint_conditions,
5329         can_run_breakpoint_commands, filesystem_is_local,
5330         can_download_tracepoint, get_trace_state_variable_value,
5331         set_trace_notes, get_tib_address, use_agent, can_use_agent,
5332         record_is_replaying, record_will_replay,
5333         augmented_libraries_svr4_read>: Adjust to return bool.
5334         * aarch64-linux-nat.c: All implementations adjusted.
5335         * aix-thread.c: All implementations adjusted.
5336         * arm-linux-nat.c: All implementations adjusted.
5337         * breakpoint.c: All implementations adjusted.
5338         * bsd-kvm.c: All implementations adjusted.
5339         * bsd-uthread.c: All implementations adjusted.
5340         * corelow.c: All implementations adjusted.
5341         * ctf.c: All implementations adjusted.
5342         * darwin-nat.c: All implementations adjusted.
5343         * darwin-nat.h: All implementations adjusted.
5344         * exec.c: All implementations adjusted.
5345         * fbsd-nat.c: All implementations adjusted.
5346         * fbsd-nat.h: All implementations adjusted.
5347         * gnu-nat.c: All implementations adjusted.
5348         * gnu-nat.h: All implementations adjusted.
5349         * go32-nat.c: All implementations adjusted.
5350         * ia64-linux-nat.c: All implementations adjusted.
5351         * inf-child.c: All implementations adjusted.
5352         * inf-child.h: All implementations adjusted.
5353         * inf-ptrace.c: All implementations adjusted.
5354         * inf-ptrace.h: All implementations adjusted.
5355         * linux-nat.c: All implementations adjusted.
5356         * linux-nat.h: All implementations adjusted.
5357         * mips-linux-nat.c: All implementations adjusted.
5358         * nto-procfs.c: All implementations adjusted.
5359         * ppc-linux-nat.c: All implementations adjusted.
5360         * procfs.c: All implementations adjusted.
5361         * ravenscar-thread.c: All implementations adjusted.
5362         * record-btrace.c: All implementations adjusted.
5363         * record-full.c: All implementations adjusted.
5364         * remote-sim.c: All implementations adjusted.
5365         * remote.c: All implementations adjusted.
5366         * s390-linux-nat.c: All implementations adjusted.
5367         * sol-thread.c: All implementations adjusted.
5368         * spu-multiarch.c: All implementations adjusted.
5369         * target-delegates.c: All implementations adjusted.
5370         * target.c: All implementations adjusted.
5371         * target.h: All implementations adjusted.
5372         * tracefile-tfile.c: All implementations adjusted.
5373         * tracefile.c: All implementations adjusted.
5374         * tracefile.h: All implementations adjusted.
5375         * windows-nat.c: All implementations adjusted.
5376         * x86-linux-nat.h: All implementations adjusted.
5377         * x86-nat.h: All implementations adjusted.
5378
5379 2018-05-02  Pedro Alves  <palves@redhat.com>
5380
5381         * make-target-delegates (scan_target_h): Don't trim lines here.
5382         Replace sequences of tabs and/or whitespace with a single
5383         whitespace.
5384         (top level, parsing methods): Trim each line before processing it
5385         here.
5386
5387 2018-05-02  Pedro Alves  <palves@redhat.com>
5388             John Baldwin  <jhb@freebsd.org>
5389
5390         * target.h (enum strata) <debug_stratum>: New.
5391         (struct target_ops) <all delegation methods>: Replace by C++
5392         virtual methods, and drop "to_" prefix.  All references updated
5393         throughout.
5394         <to_shortname, to_longname, to_doc, to_data,
5395         to_have_steppable_watchpoint, to_have_continuable_watchpoint,
5396         to_has_thread_control, to_attach_no_wait>: Delete, replaced by
5397         virtual methods.  All references updated throughout.
5398         <can_attach, supports_terminal_ours, can_create_inferior,
5399         get_thread_control_capabilities, attach_no_wait>: New
5400         virtual methods.
5401         <insert_breakpoint, remove_breakpoint>: Now
5402         TARGET_DEFAULT_NORETURN methods.
5403         <info_proc>: Now returns bool.
5404         <to_magic>: Delete.
5405         (OPS_MAGIC): Delete.
5406         (current_target): Delete.  All references replaced by references
5407         to ...
5408         (target_stack): ... this.  New.
5409         (target_shortname, target_longname): Adjust.
5410         (target_can_run): Now a function declaration.
5411         (default_child_has_all_memory, default_child_has_memory)
5412         (default_child_has_stack, default_child_has_registers)
5413         (default_child_has_execution): Remove target_ops parameter.
5414         (complete_target_initialization): Delete.
5415         (memory_breakpoint_target): New template class.
5416         (test_target_ops): Refactor as a C++ class with virtual methods.
5417         * make-target-delegates (NAME_PART): Tighten.
5418         (POINTER_PART, CP_SYMBOL): New.
5419         (SIMPLE_RETURN_PART): Reimplement.
5420         (VEC_RETURN_PART): Expect less.
5421         (RETURN_PART, VIRTUAL_PART): New.
5422         (METHOD): Adjust to C++ virtual methods.
5423         (scan_target_h): Remove reference to C99.
5424         (dname): Output "target_ops::" prefix.
5425         (write_function_header): Adjust to output a C++ class method.
5426         (write_declaration): New.
5427         (write_delegator): Adjust to output a C++ class method.
5428         (tdname): Output "dummy_target::" prefix.
5429         (write_tdefault, write_debugmethod): Adjust to output a C++ class
5430         method.
5431         (tdefault_names, debug_names): Delete.
5432         (return_types, tdefaults, styles, argtypes_array): New.
5433         (top level): All methods are delegators.
5434         (print_class): New.
5435         (top level): Print dummy_target and debug_target classes.
5436         * target-delegates.c: Regenerate.
5437         * target-debug.h (target_debug_print_enum_info_proc_what)
5438         (target_debug_print_thread_control_capabilities)
5439         (target_debug_print_thread_info_p): New.
5440         * target.c (dummy_target): Delete.
5441         (the_dummy_target, the_debug_target): New.
5442         (target_stack): Now extern.
5443         (set_targetdebug): Push/unpush debug target.
5444         (default_child_has_all_memory, default_child_has_memory)
5445         (default_child_has_stack, default_child_has_registers)
5446         (default_child_has_execution): Remove target_ops parameter.
5447         (complete_target_initialization): Delete.
5448         (add_target_with_completer): No longer call
5449         complete_target_initialization.
5450         (target_supports_terminal_ours): Use regular delegation.
5451         (update_current_target): Delete.
5452         (push_target): No longer check magic number.  Don't call
5453         update_current_target.
5454         (unpush_target): Don't call update_current_target.
5455         (target_is_pushed): No longer check magic number.
5456         (target_require_runnable): Skip for all stratums over
5457         process_stratum.
5458         (target_ops::info_proc): New.
5459         (target_info_proc): Use find_target_at and
5460         find_default_run_target.
5461         (target_supports_disable_randomization): Use regular delegation.
5462         (target_get_osdata): Use find_target_at.
5463         (target_ops::open, target_ops::close, target_ops::can_attach)
5464         (target_ops::attach, target_ops::can_create_inferior)
5465         (target_ops::create_inferior, target_ops::can_run)
5466         (target_can_run): New.
5467         (default_fileio_target): Use regular delegation.
5468         (target_ops::fileio_open, target_ops::fileio_pwrite)
5469         (target_ops::fileio_pread, target_ops::fileio_fstat)
5470         (target_ops::fileio_close, target_ops::fileio_unlink)
5471         (target_ops::fileio_readlink): New.
5472         (target_fileio_open_1, target_fileio_unlink)
5473         (target_fileio_readlink): Always call the target method.  Handle
5474         FILEIO_ENOSYS.
5475         (return_zero, return_zero_has_execution): Delete.
5476         (init_dummy_target): Delete.
5477         (dummy_target::dummy_target, dummy_target::shortname)
5478         (dummy_target::longname, dummy_target::doc)
5479         (debug_target::debug_target, debug_target::shortname)
5480         (debug_target::longname, debug_target::doc): New.
5481         (target_supports_delete_record): Use regular delegation.
5482         (setup_target_debug): Delete.
5483         (maintenance_print_target_stack): Skip debug_stratum.
5484         (initialize_targets): Instantiate the_dummy_target and
5485         the_debug_target.
5486         * auxv.c (target_auxv_parse): Remove 'ops' parameter.  Adjust to
5487         use target_stack.
5488         (target_auxv_search, fprint_target_auxv): Adjust.
5489         (info_auxv_command): Adjust to use target_stack.
5490         * auxv.h (target_auxv_parse): Remove 'ops' parameter.
5491         * exceptions.c (print_flush): Handle a NULL target_stack.
5492         * regcache.c (target_ops_no_register): Refactor as class with
5493         virtual methods.
5494
5495         * exec.c (exec_target): New class.
5496         (exec_ops): Now an exec_target.
5497         (exec_open, exec_close_1, exec_get_section_table)
5498         (exec_xfer_partial, exec_files_info, exec_has_memory)
5499         (exec_make_note_section): Refactor as exec_target methods.
5500         (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
5501         Delete.
5502         (exec_target::find_memory_regions): New.
5503         (_initialize_exec): Don't call init_exec_ops.
5504         * gdbcore.h (exec_file_clear): Delete.
5505
5506         * corefile.c (core_target): Delete.
5507         (core_file_command): Adjust.
5508         * corelow.c (core_target): New class.
5509         (the_core_target): New.
5510         (core_close): Remove target_ops parameter.
5511         (core_close_cleanup): Adjust.
5512         (core_target::close): New.
5513         (core_open, core_detach, get_core_registers, core_files_info)
5514         (core_xfer_partial, core_thread_alive, core_read_description)
5515         (core_pid_to_str, core_thread_name, core_has_memory)
5516         (core_has_stack, core_has_registers, core_info_proc): Rework as
5517         core_target methods.
5518         (ignore, core_remove_breakpoint, init_core_ops): Delete.
5519         (_initialize_corelow): Initialize the_core_target.
5520         * gdbcore.h (core_target): Delete.
5521         (the_core_target): New.
5522
5523         * ctf.c: (ctf_target): New class.
5524         (ctf_ops): Now a ctf_target.
5525         (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
5526         (ctf_xfer_partial, ctf_get_trace_state_variable_value)
5527         (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
5528         methods.
5529         (init_ctf_ops): Delete.
5530         (_initialize_ctf): Don't call it.
5531         * tracefile-tfile.c (tfile_target): New class.
5532         (tfile_ops): Now a tfile_target.
5533         (tfile_open, tfile_close, tfile_files_info)
5534         (tfile_get_tracepoint_status, tfile_trace_find)
5535         (tfile_fetch_registers, tfile_xfer_partial)
5536         (tfile_get_trace_state_variable_value, tfile_traceframe_info):
5537         Refactor as tfile_target methods.
5538         (tfile_xfer_partial_features): Remove target_ops parameter.
5539         (init_tfile_ops): Delete.
5540         (_initialize_tracefile_tfile): Don't call it.
5541         * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
5542         (tracefile_has_stack, tracefile_has_registers)
5543         (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
5544         tracefile_target methods.
5545         (init_tracefile_ops): Delete.
5546         (tracefile_target::tracefile_target): New.
5547         * tracefile.h: Include "target.h".
5548         (tracefile_target): New class.
5549         (init_tracefile_ops): Delete.
5550
5551         * spu-multiarch.c (spu_multiarch_target): New class.
5552         (spu_ops): Now a spu_multiarch_target.
5553         (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
5554         (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
5555         (spu_search_memory, spu_mourn_inferior): Refactor as
5556         spu_multiarch_target methods.
5557         (init_spu_ops): Delete.
5558         (_initialize_spu_multiarch): Remove references to init_spu_ops,
5559         complete_target_initialization.
5560
5561         * ravenscar-thread.c (ravenscar_thread_target): New class.
5562         (ravenscar_ops): Now a ravenscar_thread_target.
5563         (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
5564         (ravenscar_thread_alive, ravenscar_pid_to_str)
5565         (ravenscar_fetch_registers, ravenscar_store_registers)
5566         (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
5567         (ravenscar_stopped_by_hw_breakpoint)
5568         (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
5569         (ravenscar_mourn_inferior, ravenscar_core_of_thread)
5570         (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
5571         methods.
5572         (init_ravenscar_thread_ops): Delete.
5573         (_initialize_ravenscar): Remove references to
5574         init_ravenscar_thread_ops and complete_target_initialization.
5575
5576         * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
5577         (bsd_uthread_target): New class.
5578         (bsd_uthread_ops): Now a bsd_uthread_target.
5579         (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
5580         (bsd_uthread_close, bsd_uthread_mourn_inferior)
5581         (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
5582         (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
5583         (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
5584         (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
5585         (bsd_uthread_target): Delete function.
5586         (_initialize_bsd_uthread): Remove reference to
5587         complete_target_initialization.
5588
5589         * bfd-target.c (target_bfd_data): Delete.  Fields folded into ...
5590         (target_bfd): ... this new class.
5591         (target_bfd_xfer_partial, target_bfd_get_section_table)
5592         (target_bfd_close): Refactor as target_bfd methods.
5593         (target_bfd::~target_bfd): New.
5594         (target_bfd_reopen): Adjust.
5595         (target_bfd::close): New.
5596
5597         * record-btrace.c (record_btrace_target): New class.
5598         (record_btrace_ops): Now a record_btrace_target.
5599         (record_btrace_open, record_btrace_stop_recording)
5600         (record_btrace_disconnect, record_btrace_close)
5601         (record_btrace_async, record_btrace_info)
5602         (record_btrace_insn_history, record_btrace_insn_history_range)
5603         (record_btrace_insn_history_from, record_btrace_call_history)
5604         (record_btrace_call_history_range)
5605         (record_btrace_call_history_from, record_btrace_record_method)
5606         (record_btrace_is_replaying, record_btrace_will_replay)
5607         (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
5608         (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
5609         (record_btrace_store_registers, record_btrace_prepare_to_store)
5610         (record_btrace_to_get_unwinder)
5611         (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
5612         (record_btrace_commit_resume, record_btrace_wait)
5613         (record_btrace_stop, record_btrace_can_execute_reverse)
5614         (record_btrace_stopped_by_sw_breakpoint)
5615         (record_btrace_supports_stopped_by_sw_breakpoint)
5616         (record_btrace_stopped_by_hw_breakpoint)
5617         (record_btrace_supports_stopped_by_hw_breakpoint)
5618         (record_btrace_update_thread_list, record_btrace_thread_alive)
5619         (record_btrace_goto_begin, record_btrace_goto_end)
5620         (record_btrace_goto, record_btrace_stop_replaying_all)
5621         (record_btrace_execution_direction)
5622         (record_btrace_prepare_to_generate_core)
5623         (record_btrace_done_generating_core): Refactor as
5624         record_btrace_target methods.
5625         (init_record_btrace_ops): Delete.
5626         (_initialize_record_btrace): Remove reference to
5627         init_record_btrace_ops.
5628         * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
5629         the execution_direction global.
5630         (record_full_base_target, record_full_target)
5631         (record_full_core_target): New classes.
5632         (record_full_ops): Now a record_full_target.
5633         (record_full_core_ops): Now a record_full_core_target.
5634         (record_full_target::detach, record_full_target::disconnect)
5635         (record_full_core_target::disconnect)
5636         (record_full_target::mourn_inferior, record_full_target::kill):
5637         New.
5638         (record_full_open, record_full_close, record_full_async): Refactor
5639         as methods of the record_full_base_target class.
5640         (record_full_resume, record_full_commit_resume): Refactor
5641         as methods of the record_full_target class.
5642         (record_full_wait, record_full_stopped_by_watchpoint)
5643         (record_full_stopped_data_address)
5644         (record_full_stopped_by_sw_breakpoint)
5645         (record_full_supports_stopped_by_sw_breakpoint)
5646         (record_full_stopped_by_hw_breakpoint)
5647         (record_full_supports_stopped_by_hw_breakpoint): Refactor as
5648         methods of the record_full_base_target class.
5649         (record_full_store_registers, record_full_xfer_partial)
5650         (record_full_insert_breakpoint, record_full_remove_breakpoint):
5651         Refactor as methods of the record_full_target class.
5652         (record_full_can_execute_reverse, record_full_get_bookmark)
5653         (record_full_goto_bookmark, record_full_execution_direction)
5654         (record_full_record_method, record_full_info, record_full_delete)
5655         (record_full_is_replaying, record_full_will_replay)
5656         (record_full_goto_begin, record_full_goto_end, record_full_goto)
5657         (record_full_stop_replaying): Refactor as methods of the
5658         record_full_base_target class.
5659         (record_full_core_resume, record_full_core_kill)
5660         (record_full_core_fetch_registers)
5661         (record_full_core_prepare_to_store)
5662         (record_full_core_store_registers, record_full_core_xfer_partial)
5663         (record_full_core_insert_breakpoint)
5664         (record_full_core_remove_breakpoint)
5665         (record_full_core_has_execution): Refactor
5666         as methods of the record_full_core_target class.
5667         (record_full_base_target::supports_delete_record): New.
5668         (init_record_full_ops): Delete.
5669         (init_record_full_core_ops): Delete.
5670         (record_full_save): Refactor as method of the
5671         record_full_base_target class.
5672         (_initialize_record_full): Remove references to
5673         init_record_full_ops and init_record_full_core_ops.
5674
5675         * remote.c (remote_target, extended_remote_target): New classes.
5676         (remote_ops): Now a remote_target.
5677         (extended_remote_ops): Now an extended_remote_target.
5678         (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
5679         (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
5680         (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
5681         (remote_pass_signals, remote_set_syscall_catchpoint)
5682         (remote_program_signals, )
5683         (remote_thread_always_alive): Remove target_ops parameter.
5684         (remote_thread_alive, remote_thread_name)
5685         (remote_update_thread_list, remote_threads_extra_info)
5686         (remote_static_tracepoint_marker_at)
5687         (remote_static_tracepoint_markers_by_strid)
5688         (remote_get_ada_task_ptid, remote_close, remote_start_remote)
5689         (remote_open): Refactor as methods of remote_target.
5690         (extended_remote_open, extended_remote_detach)
5691         (extended_remote_attach, extended_remote_post_attach):
5692         (extended_remote_supports_disable_randomization)
5693         (extended_remote_create_inferior): : Refactor as method of
5694         extended_remote_target.
5695         (remote_set_permissions, remote_open_1, remote_detach)
5696         (remote_follow_fork, remote_follow_exec, remote_disconnect)
5697         (remote_resume, remote_commit_resume, remote_stop)
5698         (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
5699         (remote_terminal_ours, remote_wait, remote_fetch_registers)
5700         (remote_prepare_to_store, remote_store_registers)
5701         (remote_flash_erase, remote_flash_done, remote_files_info)
5702         (remote_kill, remote_mourn, remote_insert_breakpoint)
5703         (remote_remove_breakpoint, remote_insert_watchpoint)
5704         (remote_watchpoint_addr_within_range)
5705         (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
5706         (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
5707         (remote_supports_stopped_by_sw_breakpoint)
5708         (remote_stopped_by_hw_breakpoint)
5709         (remote_supports_stopped_by_hw_breakpoint)
5710         (remote_stopped_by_watchpoint, remote_stopped_data_address)
5711         (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
5712         (remote_verify_memory): Refactor as methods of remote_target.
5713         (remote_write_qxfer, remote_read_qxfer): Remove target_ops
5714         parameter.
5715         (remote_xfer_partial, remote_get_memory_xfer_limit)
5716         (remote_search_memory, remote_rcmd, remote_memory_map)
5717         (remote_pid_to_str, remote_get_thread_local_address)
5718         (remote_get_tib_address, remote_read_description): Refactor as
5719         methods of remote_target.
5720         (remote_target::fileio_open, remote_target::fileio_pwrite)
5721         (remote_target::fileio_pread, remote_target::fileio_close): New.
5722         (remote_hostio_readlink, remote_hostio_fstat)
5723         (remote_filesystem_is_local, remote_can_execute_reverse)
5724         (remote_supports_non_stop, remote_supports_disable_randomization)
5725         (remote_supports_multi_process, remote_supports_cond_breakpoints)
5726         (remote_supports_enable_disable_tracepoint)
5727         (remote_supports_string_tracing)
5728         (remote_can_run_breakpoint_commands, remote_trace_init)
5729         (remote_download_tracepoint, remote_can_download_tracepoint)
5730         (remote_download_trace_state_variable, remote_enable_tracepoint)
5731         (remote_disable_tracepoint, remote_trace_set_readonly_regions)
5732         (remote_trace_start, remote_get_trace_status)
5733         (remote_get_tracepoint_status, remote_trace_stop)
5734         (remote_trace_find, remote_get_trace_state_variable_value)
5735         (remote_save_trace_data, remote_get_raw_trace_data)
5736         (remote_set_disconnected_tracing, remote_core_of_thread)
5737         (remote_set_circular_trace_buffer, remote_traceframe_info)
5738         (remote_get_min_fast_tracepoint_insn_len)
5739         (remote_set_trace_buffer_size, remote_set_trace_notes)
5740         (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
5741         (remote_disable_btrace, remote_teardown_btrace)
5742         (remote_read_btrace, remote_btrace_conf)
5743         (remote_augmented_libraries_svr4_read, remote_load)
5744         (remote_pid_to_exec_file, remote_can_do_single_step)
5745         (remote_execution_direction, remote_thread_handle_to_thread_info):
5746         Refactor as methods of remote_target.
5747         (init_remote_ops, init_extended_remote_ops): Delete.
5748         (remote_can_async_p, remote_is_async_p, remote_async)
5749         (remote_thread_events, remote_upload_tracepoints)
5750         (remote_upload_trace_state_variables): Refactor as methods of
5751         remote_target.
5752         (_initialize_remote): Remove references to init_remote_ops and
5753         init_extended_remote_ops.
5754
5755         * remote-sim.c (gdbsim_target): New class.
5756         (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
5757         (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
5758         (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
5759         (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
5760         (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
5761         (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
5762         Refactor as methods of gdbsim_target.
5763         (gdbsim_ops): Now a gdbsim_target.
5764         (init_gdbsim_ops): Delete.
5765         (gdbsim_cntrl_c): Adjust.
5766         (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
5767
5768         * amd64-linux-nat.c (amd64_linux_nat_target): New class.
5769         (the_amd64_linux_nat_target): New.
5770         (amd64_linux_fetch_inferior_registers)
5771         (amd64_linux_store_inferior_registers): Refactor as methods of
5772         amd64_linux_nat_target.
5773         (_initialize_amd64_linux_nat): Adjust.  Set linux_target.
5774         * i386-linux-nat.c: Don't include "linux-nat.h".
5775         (i386_linux_nat_target): New class.
5776         (the_i386_linux_nat_target): New.
5777         (i386_linux_fetch_inferior_registers)
5778         (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
5779         as methods of i386_linux_nat_target.
5780         (_initialize_i386_linux_nat): Adjust.  Set linux_target.
5781         * inf-child.c (inf_child_ops): Delete.
5782         (inf_child_fetch_inferior_registers)
5783         (inf_child_store_inferior_registers): Delete.
5784         (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
5785         methods of inf_child_target.
5786         (inf_child_target::supports_terminal_ours)
5787         (inf_child_target::terminal_init)
5788         (inf_child_target::terminal_inferior)
5789         (inf_child_target::terminal_ours_for_output)
5790         (inf_child_target::terminal_ours, inf_child_target::interrupt)
5791         (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
5792         New.
5793         (inf_child_open, inf_child_disconnect, inf_child_close)
5794         (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
5795         (inf_child_post_startup_inferior, inf_child_can_run)
5796         (inf_child_pid_to_exec_file): Refactor as methods of
5797         inf_child_target.
5798         (inf_child_follow_fork): Delete.
5799         (inf_child_target::can_create_inferior)
5800         (inf_child_target::can_attach): New.
5801         (inf_child_target::has_all_memory, inf_child_target::has_memory)
5802         (inf_child_target::has_stack, inf_child_target::has_registers)
5803         (inf_child_target::has_execution): New.
5804         (inf_child_fileio_open, inf_child_fileio_pwrite)
5805         (inf_child_fileio_pread, inf_child_fileio_fstat)
5806         (inf_child_fileio_close, inf_child_fileio_unlink)
5807         (inf_child_fileio_readlink, inf_child_use_agent)
5808         (inf_child_can_use_agent): Refactor as methods of
5809         inf_child_target.
5810         (return_zero, inf_child_target): Delete.
5811         (inf_child_target::inf_child_target): New.
5812         * inf-child.h: Include "target.h".
5813         (inf_child_target): Delete function prototype.
5814         (inf_child_target): New class.
5815         (inf_child_open_target, inf_child_mourn_inferior)
5816         (inf_child_maybe_unpush_target): Delete.
5817         * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
5818         (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
5819         (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
5820         (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
5821         (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
5822         (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
5823         (inf_ptrace_wait, inf_ptrace_xfer_partial)
5824         (inf_ptrace_thread_alive, inf_ptrace_files_info)
5825         (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
5826         methods of inf_ptrace_target.
5827         (inf_ptrace_target): Delete function.
5828         * inf-ptrace.h: Include "inf-child.h".
5829         (inf_ptrace_target): Delete function declaration.
5830         (inf_ptrace_target): New class.
5831         (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
5832         * linux-nat.c (linux_target): New.
5833         (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
5834         (linux_nat_target::~linux_nat_target): New.
5835         (linux_child_post_attach, linux_child_post_startup_inferior)
5836         (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
5837         (linux_child_remove_fork_catchpoint)
5838         (linux_child_insert_vfork_catchpoint)
5839         (linux_child_remove_vfork_catchpoint)
5840         (linux_child_insert_exec_catchpoint)
5841         (linux_child_remove_exec_catchpoint)
5842         (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
5843         (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
5844         (linux_nat_resume, linux_nat_stopped_by_watchpoint)
5845         (linux_nat_stopped_data_address)
5846         (linux_nat_stopped_by_sw_breakpoint)
5847         (linux_nat_supports_stopped_by_sw_breakpoint)
5848         (linux_nat_stopped_by_hw_breakpoint)
5849         (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
5850         (linux_nat_kill, linux_nat_mourn_inferior)
5851         (linux_nat_xfer_partial, linux_nat_thread_alive)
5852         (linux_nat_update_thread_list, linux_nat_pid_to_str)
5853         (linux_nat_thread_name, linux_child_pid_to_exec_file)
5854         (linux_child_static_tracepoint_markers_by_strid)
5855         (linux_nat_is_async_p, linux_nat_can_async_p)
5856         (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
5857         (linux_nat_supports_multi_process)
5858         (linux_nat_supports_disable_randomization, linux_nat_async)
5859         (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
5860         (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
5861         (linux_nat_fileio_open, linux_nat_fileio_readlink)
5862         (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
5863         methods of linux_nat_target.
5864         (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
5865         (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
5866         parameter.
5867         (check_stopped_by_watchpoint): Adjust.
5868         (linux_xfer_partial): Delete.
5869         (linux_target_install_ops, linux_target, linux_nat_add_target):
5870         Delete.
5871         (linux_nat_target::linux_nat_target): New.
5872         * linux-nat.h: Include "inf-ptrace.h".
5873         (linux_nat_target): New.
5874         (linux_target, linux_target_install_ops, linux_nat_add_target):
5875         Delete function declarations.
5876         (linux_target): Declare global.
5877         * linux-thread-db.c (thread_db_target): New.
5878         (thread_db_target::thread_db_target): New.
5879         (thread_db_ops): Delete.
5880         (the_thread_db_target): New.
5881         (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
5882         (thread_db_update_thread_list, thread_db_pid_to_str)
5883         (thread_db_extra_thread_info)
5884         (thread_db_thread_handle_to_thread_info)
5885         (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
5886         (thread_db_resume): Refactor as methods of thread_db_target.
5887         (init_thread_db_ops): Delete.
5888         (_initialize_thread_db): Remove reference to init_thread_db_ops.
5889         * x86-linux-nat.c: Don't include "linux-nat.h".
5890         (super_post_startup_inferior): Delete.
5891         (x86_linux_nat_target::~x86_linux_nat_target): New.
5892         (x86_linux_child_post_startup_inferior)
5893         (x86_linux_read_description, x86_linux_enable_btrace)
5894         (x86_linux_disable_btrace, x86_linux_teardown_btrace)
5895         (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
5896         methods of x86_linux_nat_target.
5897         (x86_linux_create_target): Delete.  Bits folded ...
5898         (x86_linux_add_target): ... here.  Now takes a linux_nat_target
5899         pointer.
5900         * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
5901         (x86_linux_nat_target): New class.
5902         (x86_linux_create_target): Delete.
5903         (x86_linux_add_target): Now takes a linux_nat_target pointer.
5904         * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
5905         (x86_region_ok_for_watchpoint, x86_stopped_data_address)
5906         (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
5907         (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
5908         (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
5909         make extern.
5910         (x86_use_watchpoints): Delete.
5911         * x86-nat.h: Include "breakpoint.h" and "target.h".
5912         (x86_use_watchpoints): Delete.
5913         (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
5914         (x86_stopped_by_watchpoint, x86_stopped_data_address)
5915         (x86_insert_watchpoint, x86_remove_watchpoint)
5916         (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
5917         (x86_stopped_by_hw_breakpoint): New declarations.
5918         (x86_nat_target): New template class.
5919
5920         * ppc-linux-nat.c (ppc_linux_nat_target): New class.
5921         (the_ppc_linux_nat_target): New.
5922         (ppc_linux_fetch_inferior_registers)
5923         (ppc_linux_can_use_hw_breakpoint)
5924         (ppc_linux_region_ok_for_hw_watchpoint)
5925         (ppc_linux_ranged_break_num_registers)
5926         (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
5927         (ppc_linux_insert_mask_watchpoint)
5928         (ppc_linux_remove_mask_watchpoint)
5929         (ppc_linux_can_accel_watchpoint_condition)
5930         (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
5931         (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
5932         (ppc_linux_watchpoint_addr_within_range)
5933         (ppc_linux_masked_watch_num_registers)
5934         (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
5935         (ppc_linux_read_description): Refactor as methods of
5936         ppc_linux_nat_target.
5937         (_initialize_ppc_linux_nat): Adjust.  Set linux_target.
5938
5939         * procfs.c (procfs_xfer_partial): Delete forward declaration.
5940         (procfs_target): New class.
5941         (the_procfs_target): New.
5942         (procfs_target): Delete function.
5943         (procfs_auxv_parse, procfs_attach, procfs_detach)
5944         (procfs_fetch_registers, procfs_store_registers, procfs_wait)
5945         (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
5946         (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
5947         (procfs_create_inferior, procfs_update_thread_list)
5948         (procfs_thread_alive, procfs_pid_to_str)
5949         (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
5950         (procfs_stopped_data_address, procfs_insert_watchpoint)
5951         (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
5952         (proc_find_memory_regions, procfs_info_proc)
5953         (procfs_make_note_section): Refactor as methods of procfs_target.
5954         (_initialize_procfs): Adjust.
5955         * sol-thread.c (sol_thread_target): New class.
5956         (sol_thread_ops): Now a sol_thread_target.
5957         (sol_thread_detach, sol_thread_resume, sol_thread_wait)
5958         (sol_thread_fetch_registers, sol_thread_store_registers)
5959         (sol_thread_xfer_partial, sol_thread_mourn_inferior)
5960         (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
5961         (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
5962         (init_sol_thread_ops): Delete.
5963         (_initialize_sol_thread): Adjust.  Remove references to
5964         init_sol_thread_ops and complete_target_initialization.
5965
5966         * windows-nat.c (windows_nat_target): New class.
5967         (windows_fetch_inferior_registers)
5968         (windows_store_inferior_registers, windows_resume, windows_wait)
5969         (windows_attach, windows_detach, windows_pid_to_exec_file)
5970         (windows_files_info, windows_create_inferior)
5971         (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
5972         (windows_close, windows_pid_to_str, windows_xfer_partial)
5973         (windows_get_tib_address, windows_get_ada_task_ptid)
5974         (windows_thread_name, windows_thread_alive): Refactor as
5975         windows_nat_target methods.
5976         (do_initial_windows_stuff): Adjust.
5977         (windows_target): Delete function.
5978         (_initialize_windows_nat): Adjust.
5979
5980         * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
5981         (darwin_mourn_inferior, darwin_kill_inferior)
5982         (darwin_create_inferior, darwin_attach, darwin_detach)
5983         (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
5984         (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
5985         (darwin_supports_multi_process): Refactor as darwin_nat_target
5986         methods.
5987         (darwin_resume_to, darwin_files_info): Delete.
5988         (_initialize_darwin_inferior): Rename to ...
5989         (_initialize_darwin_nat): ... this.  Adjust to C++ification.
5990         * darwin-nat.h: Include "inf-child.h".
5991         (darwin_nat_target): New class.
5992         (darwin_complete_target): Delete.
5993         * i386-darwin-nat.c (i386_darwin_nat_target): New class.
5994         (darwin_target): New.
5995         (i386_darwin_fetch_inferior_registers)
5996         (i386_darwin_store_inferior_registers): Refactor as methods of
5997         darwin_nat_target.
5998         (darwin_complete_target): Delete, with ...
5999         (_initialize_i386_darwin_nat): ... bits factored out here.
6000
6001         * alpha-linux-nat.c (alpha_linux_nat_target): New class.
6002         (the_alpha_linux_nat_target): New.
6003         (alpha_linux_register_u_offset): Refactor as
6004         alpha_linux_nat_target method.
6005         (_initialize_alpha_linux_nat): Adjust.
6006         * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
6007         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
6008         (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
6009         methods of linux_nat_trad_target.
6010         (linux_trad_target): Delete.
6011         * linux-nat-trad.h (linux_trad_target): Delete function.
6012         (linux_nat_trad_target): New class.
6013         * mips-linux-nat.c (mips_linux_nat_target): New class.
6014         (super_fetch_registers, super_store_registers, super_close):
6015         Delete.
6016         (the_mips_linux_nat_target): New.
6017         (mips64_linux_regsets_fetch_registers)
6018         (mips64_linux_regsets_store_registers)
6019         (mips64_linux_fetch_registers, mips64_linux_store_registers)
6020         (mips_linux_register_u_offset, mips_linux_read_description)
6021         (mips_linux_can_use_hw_breakpoint)
6022         (mips_linux_stopped_by_watchpoint)
6023         (mips_linux_stopped_data_address)
6024         (mips_linux_region_ok_for_hw_watchpoint)
6025         (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
6026         (mips_linux_close): Refactor as methods of mips_linux_nat.
6027         (_initialize_mips_linux_nat): Adjust to C++ification.
6028
6029         * aix-thread.c (aix_thread_target): New class.
6030         (aix_thread_ops): Now an aix_thread_target.
6031         (aix_thread_detach, aix_thread_resume, aix_thread_wait)
6032         (aix_thread_fetch_registers, aix_thread_store_registers)
6033         (aix_thread_xfer_partial, aix_thread_mourn_inferior)
6034         (aix_thread_thread_alive, aix_thread_pid_to_str)
6035         (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
6036         Refactor as methods of aix_thread_target.
6037         (init_aix_thread_ops): Delete.
6038         (_initialize_aix_thread): Remove references to init_aix_thread_ops
6039         and complete_target_initialization.
6040         * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
6041         (rs6000_nat_target): New class.
6042         (the_rs6000_nat_target): New.
6043         (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
6044         (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
6045         (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
6046         (super_create_inferior): Delete.
6047         (_initialize_rs6000_nat): Adjust to C++ification.
6048
6049         * arm-linux-nat.c (arm_linux_nat_target): New class.
6050         (the_arm_linux_nat_target): New.
6051         (arm_linux_fetch_inferior_registers)
6052         (arm_linux_store_inferior_registers, arm_linux_read_description)
6053         (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
6054         (arm_linux_remove_hw_breakpoint)
6055         (arm_linux_region_ok_for_hw_watchpoint)
6056         (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
6057         (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
6058         (arm_linux_watchpoint_addr_within_range): Refactor as methods of
6059         arm_linux_nat_target.
6060         (_initialize_arm_linux_nat): Adjust to C++ification.
6061
6062         * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
6063         (the_aarch64_linux_nat_target): New.
6064         (aarch64_linux_fetch_inferior_registers)
6065         (aarch64_linux_store_inferior_registers)
6066         (aarch64_linux_child_post_startup_inferior)
6067         (aarch64_linux_read_description)
6068         (aarch64_linux_can_use_hw_breakpoint)
6069         (aarch64_linux_insert_hw_breakpoint)
6070         (aarch64_linux_remove_hw_breakpoint)
6071         (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
6072         (aarch64_linux_region_ok_for_hw_watchpoint)
6073         (aarch64_linux_stopped_data_address)
6074         (aarch64_linux_stopped_by_watchpoint)
6075         (aarch64_linux_watchpoint_addr_within_range)
6076         (aarch64_linux_can_do_single_step): Refactor as methods of
6077         aarch64_linux_nat_target.
6078         (super_post_startup_inferior): Delete.
6079         (_initialize_aarch64_linux_nat): Adjust to C++ification.
6080
6081         * hppa-linux-nat.c (hppa_linux_nat_target): New class.
6082         (the_hppa_linux_nat_target): New.
6083         (hppa_linux_fetch_inferior_registers)
6084         (hppa_linux_store_inferior_registers): Refactor as methods of
6085         hppa_linux_nat_target.
6086         (_initialize_hppa_linux_nat): Adjust to C++ification.
6087
6088         * ia64-linux-nat.c (ia64_linux_nat_target): New class.
6089         (the_ia64_linux_nat_target): New.
6090         (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
6091         (ia64_linux_stopped_data_address)
6092         (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
6093         (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
6094         ia64_linux_nat_target methods.
6095         (super_xfer_partial): Delete.
6096         (_initialize_ia64_linux_nat): Adjust to C++ification.
6097
6098         * m32r-linux-nat.c (m32r_linux_nat_target): New class.
6099         (the_m32r_linux_nat_target): New.
6100         (m32r_linux_fetch_inferior_registers)
6101         (m32r_linux_store_inferior_registers): Refactor as
6102         m32r_linux_nat_target methods.
6103         (_initialize_m32r_linux_nat): Adjust to C++ification.
6104
6105         * m68k-linux-nat.c (m68k_linux_nat_target): New class.
6106         (the_m68k_linux_nat_target): New.
6107         (m68k_linux_fetch_inferior_registers)
6108         (m68k_linux_store_inferior_registers): Refactor as
6109         m68k_linux_nat_target methods.
6110         (_initialize_m68k_linux_nat): Adjust to C++ification.
6111
6112         * s390-linux-nat.c (s390_linux_nat_target): New class.
6113         (the_s390_linux_nat_target): New.
6114         (s390_linux_fetch_inferior_registers)
6115         (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
6116         (s390_insert_watchpoint, s390_remove_watchpoint)
6117         (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
6118         (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
6119         (s390_auxv_parse, s390_read_description): Refactor as methods of
6120         s390_linux_nat_target.
6121         (_initialize_s390_nat): Adjust to C++ification.
6122
6123         * sparc-linux-nat.c (sparc_linux_nat_target): New class.
6124         (the_sparc_linux_nat_target): New.
6125         (_initialize_sparc_linux_nat): Adjust to C++ification.
6126         * sparc-nat.c (sparc_fetch_inferior_registers)
6127         (sparc_store_inferior_registers): Remove target_ops parameter.
6128         * sparc-nat.h (sparc_fetch_inferior_registers)
6129         (sparc_store_inferior_registers): Remove target_ops parameter.
6130         * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
6131         (the_sparc64_linux_nat_target): New.
6132         (_initialize_sparc64_linux_nat): Adjust to C++ification.
6133
6134         * spu-linux-nat.c (spu_linux_nat_target): New class.
6135         (the_spu_linux_nat_target): New.
6136         (spu_child_post_startup_inferior, spu_child_post_attach)
6137         (spu_child_wait, spu_fetch_inferior_registers)
6138         (spu_store_inferior_registers, spu_xfer_partial)
6139         (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
6140         methods.
6141         (_initialize_spu_nat): Adjust to C++ification.
6142
6143         * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
6144         (the_tilegx_linux_nat_target): New.
6145         (fetch_inferior_registers, store_inferior_registers):
6146         Refactor as methods.
6147         (_initialize_tile_linux_nat): Adjust to C++ification.
6148
6149         * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
6150         (the_xtensa_linux_nat_target): New.
6151         (xtensa_linux_fetch_inferior_registers)
6152         (xtensa_linux_store_inferior_registers): Refactor as
6153         xtensa_linux_nat_target methods.
6154         (_initialize_xtensa_linux_nat): Adjust to C++ification.
6155
6156         * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
6157         (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
6158         (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
6159         (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
6160         (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
6161         (fbsd_stopped_by_sw_breakpoint)
6162         (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
6163         (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
6164         (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
6165         (fbsd_post_startup_inferior, fbsd_post_attach)
6166         (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
6167         (fbsd_set_syscall_catchpoint)
6168         (super_xfer_partial, super_resume, super_wait)
6169         (fbsd_supports_stopped_by_hw_breakpoint): Delete.
6170         (fbsd_handle_debug_trap): Remove target_ops parameter.
6171         (fbsd_nat_add_target): Delete.
6172         * fbsd-nat.h: Include "inf-ptrace.h".
6173         (fbsd_nat_add_target): Delete.
6174         (USE_SIGTRAP_SIGINFO): Define.
6175         (fbsd_nat_target): New class.
6176
6177         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
6178         (amd64bsd_store_inferior_registers): Remove target_ops parameter.
6179         (amd64bsd_target): Delete.
6180         * amd64-bsd-nat.h: New file.
6181         * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
6182         "x86-bsd-nat.h".
6183         (amd64_fbsd_nat_target): New class.
6184         (the_amd64_fbsd_nat_target): New.
6185         (amd64fbsd_read_description): Refactor as method of
6186         amd64_fbsd_nat_target.
6187         (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
6188         (_initialize_amd64fbsd_nat): Adjust to C++ification.
6189         * amd64-nat.h (amd64bsd_target): Delete function declaration.
6190         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
6191         (i386bsd_store_inferior_registers): Remove target_ops parameter.
6192         (i386bsd_target): Delete.
6193         * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
6194         (i386bsd_fetch_inferior_registers)
6195         (i386bsd_store_inferior_registers): Declare.
6196         (i386_bsd_nat_target): New class.
6197         * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
6198         (the_i386_fbsd_nat_target): New.
6199         (i386fbsd_resume, i386fbsd_read_description): Refactor as
6200         i386_fbsd_nat_target methods.
6201         (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
6202         (_initialize_i386fbsd_nat): Adjust to C++ification.
6203         * x86-bsd-nat.c (super_mourn_inferior): Delete.
6204         (x86bsd_mourn_inferior, x86bsd_target): Delete.
6205         (_initialize_x86_bsd_nat): Adjust to C++ification.
6206         * x86-bsd-nat.h: Include "x86-nat.h".
6207         (x86bsd_target): Delete declaration.
6208         (x86bsd_nat_target): New class.
6209
6210         * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
6211         (the_aarch64_fbsd_nat_target): New.
6212         (aarch64_fbsd_fetch_inferior_registers)
6213         (aarch64_fbsd_store_inferior_registers): Refactor as methods of
6214         aarch64_fbsd_nat_target.
6215         (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
6216         * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
6217         (the_alpha_bsd_nat_target): New.
6218         (alphabsd_fetch_inferior_registers)
6219         (alphabsd_store_inferior_registers): Refactor as
6220         alpha_bsd_nat_target methods.
6221         (_initialize_alphabsd_nat): Refactor as methods of
6222         alpha_bsd_nat_target.
6223         * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
6224         (the_amd64_nbsd_nat_target): New.
6225         (_initialize_amd64nbsd_nat): Adjust to C++ification.
6226         * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
6227         (the_amd64_obsd_nat_target): New.
6228         (_initialize_amd64obsd_nat): Adjust to C++ification.
6229         * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
6230         (the_arm_fbsd_nat_target): New.
6231         (arm_fbsd_fetch_inferior_registers)
6232         (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
6233         (_initialize_arm_fbsd_nat): Refactor as methods of
6234         arm_fbsd_nat_target.
6235         (_initialize_arm_fbsd_nat): Adjust to C++ification.
6236         * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
6237         (the_arm_netbsd_nat_target): New.
6238         (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
6239         arm_netbsd_nat_target.
6240         (_initialize_arm_netbsd_nat): Adjust to C++ification.
6241         * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
6242         (the_hppa_nbsd_nat_target): New.
6243         (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
6244         hppa_nbsd_nat_target methods.
6245         (_initialize_hppanbsd_nat): Adjust to C++ification.
6246         * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
6247         (the_hppa_obsd_nat_target): New.
6248         (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
6249         methods of hppa_obsd_nat_target.
6250         (_initialize_hppaobsd_nat): Adjust to C++ification.  Use
6251         add_target.
6252         * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
6253         (_initialize_i386nbsd_nat): Adjust to C++ification.  Use
6254         add_target.
6255         * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
6256         (_initialize_i386obsd_nat): Use add_target.
6257         * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
6258         (the_m68k_bsd_nat_target): New.
6259         (m68kbsd_fetch_inferior_registers)
6260         (m68kbsd_store_inferior_registers): Refactor as methods of
6261         m68k_bsd_nat_target.
6262         (_initialize_m68kbsd_nat): Adjust to C++ification.
6263         * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
6264         (the_mips_fbsd_nat_target): New.
6265         (mips_fbsd_fetch_inferior_registers)
6266         (mips_fbsd_store_inferior_registers): Refactor as methods of
6267         mips_fbsd_nat_target.
6268         (_initialize_mips_fbsd_nat): Adjust to C++ification.  Use
6269         add_target.
6270         * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
6271         (the_mips_nbsd_nat_target): New.
6272         (mipsnbsd_fetch_inferior_registers)
6273         (mipsnbsd_store_inferior_registers): Refactor as methods of
6274         mips_nbsd_nat_target.
6275         (_initialize_mipsnbsd_nat): Adjust to C++ification.
6276         * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
6277         (the_mips64_obsd_nat_target): New.
6278         (mips64obsd_fetch_inferior_registers)
6279         (mips64obsd_store_inferior_registers): Refactor as methods of
6280         mips64_obsd_nat_target.
6281         (_initialize_mips64obsd_nat): Adjust to C++ification.  Use
6282         add_target.
6283         * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
6284         nbsd_nat_target.
6285         * nbsd-nat.h: Include "inf-ptrace.h".
6286         (nbsd_nat_target): New class.
6287         * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
6288         (obsd_wait): Refactor as methods of obsd_nat_target.
6289         (obsd_add_target): Delete.
6290         * obsd-nat.h: Include "inf-ptrace.h".
6291         (obsd_nat_target): New class.
6292         * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
6293         (the_ppc_fbsd_nat_target): New.
6294         (ppcfbsd_fetch_inferior_registers)
6295         (ppcfbsd_store_inferior_registers): Refactor as methods of
6296         ppc_fbsd_nat_target.
6297         (_initialize_ppcfbsd_nat): Adjust to C++ification.  Use
6298         add_target.
6299         * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
6300         (the_ppc_nbsd_nat_target): New.
6301         (ppcnbsd_fetch_inferior_registers)
6302         (ppcnbsd_store_inferior_registers): Refactor as methods of
6303         ppc_nbsd_nat_target.
6304         (_initialize_ppcnbsd_nat): Adjust to C++ification.
6305         * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
6306         (the_ppc_obsd_nat_target): New.
6307         (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
6308         methods of ppc_obsd_nat_target.
6309         (_initialize_ppcobsd_nat): Adjust to C++ification.  Use
6310         add_target.
6311         * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
6312         (the_sh_nbsd_nat_target): New.
6313         (shnbsd_fetch_inferior_registers)
6314         (shnbsd_store_inferior_registers): Refactor as methods of
6315         sh_nbsd_nat_target.
6316         (_initialize_shnbsd_nat): Adjust to C++ification.
6317         * sparc-nat.c (sparc_xfer_wcookie): Make extern.
6318         (inf_ptrace_xfer_partial): Delete.
6319         (sparc_xfer_partial, sparc_target): Delete.
6320         * sparc-nat.h (sparc_fetch_inferior_registers)
6321         (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
6322         (sparc_target): Delete function declaration.
6323         (sparc_target): New template class.
6324         * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
6325         (_initialize_sparcnbsd_nat): Adjust to C++ification.
6326         * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
6327         (_initialize_sparc64fbsd_nat): Adjust to C++ification.  Use
6328         add_target.
6329         * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
6330         (_initialize_sparc64nbsd_nat): Adjust to C++ification.
6331         * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
6332         (_initialize_sparc64obsd_nat): Adjust to C++ification.  Use
6333         add_target.
6334         * vax-bsd-nat.c (vax_bsd_nat_target): New class.
6335         (the_vax_bsd_nat_target): New.
6336         (vaxbsd_fetch_inferior_registers)
6337         (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
6338         methods.
6339         (_initialize_vaxbsd_nat): Adjust to C++ification.
6340
6341         * bsd-kvm.c (bsd_kvm_target): New class.
6342         (bsd_kvm_ops): Now a bsd_kvm_target.
6343         (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
6344         (bsd_kvm_files_info, bsd_kvm_fetch_registers)
6345         (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
6346         bsd_kvm_target.
6347         (bsd_kvm_return_one): Delete.
6348         (bsd_kvm_add_target): Adjust to C++ification.
6349
6350         * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
6351         (nto_procfs_target_procfs): New classes.
6352         (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
6353         (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
6354         (procfs_post_attach, procfs_wait, procfs_fetch_registers)
6355         (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
6356         (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
6357         (procfs_remove_hw_breakpoint, procfs_resume)
6358         (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
6359         (procfs_kill_inferior, procfs_store_registers)
6360         (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
6361         as methods of nto_procfs_target.
6362         (nto_procfs_ops): Now an nto_procfs_target_procfs.
6363         (nto_native_ops): Delete.
6364         (procfs_open, procfs_native_open): Delete.
6365         (nto_native_ops): Now an nto_procfs_target_native.
6366         (init_procfs_targets): Adjust to C++ification.
6367         (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
6368         (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
6369         Refactor as methods of nto_procfs_target.
6370
6371         * go32-nat.c (go32_nat_target): New class.
6372         (the_go32_nat_target): New.
6373         (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
6374         (go32_store_registers, go32_xfer_partial, go32_files_info)
6375         (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
6376         (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
6377         (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
6378         (go32_pid_to_str): Refactor as methods of go32_nat_target.
6379         (go32_target): Delete.
6380         (_initialize_go32_nat): Adjust to C++ification.
6381
6382         * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
6383         (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
6384         (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
6385         (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
6386         gnu_nat_target.
6387         (gnu_target): Delete.
6388         * gnu-nat.h (gnu_target): Delete.
6389         (gnu_nat_target): New class.
6390         * i386-gnu-nat.c (gnu_base_target): New.
6391         (i386_gnu_nat_target): New class.
6392         (the_i386_gnu_nat_target): New.
6393         (_initialize_i386gnu_nat): Adjust to C++ification.
6394
6395 2018-05-02  Pedro Alves  <palves@redhat.com>
6396
6397         * bfd-target.c (target_bfd_xclose): Rename to ...
6398         (target_bfd_close): ... this.
6399         (target_bfd_reopen): Adjust.
6400         * target.c (target_close): Remove references to to_xclose.
6401         * target.h (target_ops::to_xclose): Delete.
6402         (target_ops::to_close): Update comments.
6403
6404 2018-05-02  Pedro Alves  <palves@redhat.com>
6405
6406         * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
6407         "linux-nat.h".
6408         * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
6409         * inf-ptrace.c (inf_ptrace_register_u_offset)
6410         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
6411         (inf_ptrace_store_register, inf_ptrace_store_registers)
6412         (inf_ptrace_trad_target): Move to ...
6413         * linux-nat-trad.c: ... this new file.
6414         * linux-nat-trad.h: New file.
6415         * linux-nat.c (linux_target_install_ops): Make extern.
6416         (linux_trad_target): Delete.
6417         * linux-nat.h (linux_trad_target): Delete declaration.
6418         (linux_target_install_ops): Declare.
6419         * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
6420         "linux-nat.h".
6421
6422 2018-05-02  Pedro Alves  <palves@redhat.com>
6423
6424         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
6425         procfs_target/add_target here.
6426         * procfs.c (procfs_target): Make static.
6427         (_initialize_procfs): Call add_target here.
6428         * procfs.h (struct target_ops): Remove forward declaration.
6429         (procfs_target): Remove declaration.
6430         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
6431
6432 2018-05-02  Pedro Alves  <palves@redhat.com>
6433
6434         * procfs.c (procfs_stopped_by_watchpoint)
6435         (procfs_insert_watchpoint, procfs_remove_watchpoint)
6436         (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
6437         Forward declare.
6438         (procfs_use_watchpoints): Delete, move contents...
6439         (procfs_target): ... here.
6440         * procfs.h (procfs_use_watchpoints): Delete declaration.
6441         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
6442         procfs_use_watchpoints.
6443         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
6444         procfs_use_watchpoints.
6445
6446 2018-05-02  Tom Tromey  <tom@tromey.com>
6447
6448         PR python/20084:
6449         * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
6450         and var_zuinteger_unlimited.
6451         * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
6452         and PARAM_ZUINTEGER_UNLIMITED.
6453         (set_parameter_value): Handle var_zuinteger and
6454         var_zuinteger_unlimited.
6455         (add_setshow_generic): Likewise.
6456         (parmpy_init): Likewise.
6457
6458 2018-04-28  Dan Robertson  <danlrobertson89@gmail.com>
6459
6460         PR rust/23124
6461         * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
6462         pointer is not null before dereferencing it.
6463
6464 2018-04-30  Tom Tromey  <tom@tromey.com>
6465
6466         * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
6467         is_mi_like_p.
6468
6469 2018-04-30  Tom Tromey  <tom@tromey.com>
6470
6471         * breakpoint.c (mention): Remove use of is_mi_like_p.
6472         (print_mention_ranged_breakpoint): Likewise.
6473         * break-catch-throw.c (print_it_exception_catchpoint): Remove use
6474         of is_mi_like_p.
6475
6476 2018-04-30  Tom Tromey  <tom@tromey.com>
6477
6478         * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
6479
6480 2018-04-30  Tom Tromey  <tom@tromey.com>
6481
6482         * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
6483         (info_spu_event_command): Remove some uses of is_mi_like_p.
6484
6485 2018-04-30  Tom Tromey  <tom@tromey.com>
6486
6487         * python/py-framefilter.c (py_print_single_arg)
6488         (enumerate_locals, py_print_args, py_print_frame): Remove some
6489         uses of is_mi_like_p.
6490
6491 2018-04-30  Tom Tromey  <tom@tromey.com>
6492
6493         * ui-out.c: Update.
6494         * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
6495         * ui-out.h (ui_out::is_mi_like_p): Now const.
6496         (ui_out::do_is_mi_like_p): Now const.
6497         * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
6498
6499 2018-04-30  Tom Tromey  <tom@tromey.com>
6500
6501         * varobj.c (varobj_set_visualizer): Use new_reference.
6502         * python/python.c (gdbpy_decode_line): Use new_reference.
6503         * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
6504         new_reference.
6505
6506 2018-04-30  Tom Tromey  <tom@tromey.com>
6507
6508         * varobj.c (install_new_value): Use new_reference.
6509         * value.h (value_incref): Return void.  Swap intro comment with
6510         value_decref.
6511         * value.c (set_value_parent): Use new_reference.
6512         (value_incref): Return void.  Update intro comment.
6513         (release_value): Use new_reference.
6514         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
6515
6516 2018-04-30  Tom Tromey  <tom@tromey.com>
6517
6518         * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
6519         * gdb_bfd.h (new_bfd_ref): Remove.
6520         (gdb_bfd_open): Update comment.
6521         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
6522         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
6523         (gdb_bfd_fdopenr): Use new_reference.
6524         * exec.c (exec_file_attach): Use new_reference.
6525
6526 2018-04-30  Tom Tromey  <tom@tromey.com>
6527
6528         * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
6529         method.
6530
6531 2018-04-30  Tom Tromey  <tom@tromey.com>
6532
6533         * jit.c (jit_read_code_entry): Use type_align.
6534         * i386-tdep.c (i386_gdbarch_init): Don't call
6535         set_gdbarch_long_long_align_bit.
6536         * gdbarch.sh: Remove long_long_align_bit.
6537         * gdbarch.c, gdbarch.h: Rebuild.
6538         * arc-tdep.c (arc_type_align): New function.
6539         (arc_gdbarch_init): Use arc_type_align.  Don't call
6540         set_gdbarch_long_long_align_bit.
6541
6542 2018-04-30  Tom Tromey  <tom@tromey.com>
6543
6544         * rust-lang.c (rust_type_alignment): Remove.
6545         (rust_composite_type): Use type_align.
6546
6547 2018-04-30  Tom Tromey  <tom@tromey.com>
6548
6549         * NEWS: Mention Type.align.
6550         * python/py-type.c (typy_get_alignof): New function.
6551         (type_object_getset): Add "alignof".
6552
6553 2018-04-30  Tom Tromey  <tom@tromey.com>
6554
6555         PR exp/17095:
6556         * NEWS: Update.
6557         * std-operator.def (UNOP_ALIGNOF): New operator.
6558         * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
6559         New.
6560         * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
6561         * c-lang.c (c_op_print_tab): Add alignof.
6562         * c-exp.y (ALIGNOF): New token.
6563         (exp): Add "ALIGNOF" production.
6564         (ident_tokens): Add _Alignof and alignof.
6565
6566 2018-04-30  Tom Tromey  <tom@tromey.com>
6567
6568         * i386-tdep.c (i386_type_align): New function.
6569         (i386_gdbarch_init): Update.
6570         * gdbarch.sh (type_align): New method.
6571         * gdbarch.c, gdbarch.h: Rebuild.
6572         * arch-utils.h (default_type_align): Declare.
6573         * arch-utils.c (default_type_align): New function.
6574         * gdbtypes.h (TYPE_ALIGN_BITS): New define.
6575         (struct type) <align_log2>: New field.
6576         <instance_flags>: Now a bitfield.
6577         (TYPE_RAW_ALIGN): New macro.
6578         (type_align, type_raw_align, set_type_align): Declare.
6579         * gdbtypes.c (type_align, type_raw_align, set_type_align): New
6580         functions.
6581         * dwarf2read.c (quirk_rust_enum): Set type alignment.
6582         (get_alignment, maybe_set_alignment): New functions.
6583         (read_structure_type, read_enumeration_type, read_array_type)
6584         (read_set_type, read_tag_pointer_type, read_tag_reference_type)
6585         (read_subrange_type, read_base_type): Set type alignment.
6586
6587 2018-04-30  Simon Marchi  <simon.marchi@ericsson.com>
6588
6589         * dwarf2read.c (read_index_from_section): Use bool.
6590
6591 2018-04-29  Fabian Groffen  <grobian@gentoo.org>
6592
6593         PR gdb/22950
6594         * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
6595         with #ifdef.
6596
6597 2018-04-29  John Reiser  <jreiser@BitWagon.com>
6598
6599         PR build/22873
6600         * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
6601         last step, and do it atomically.
6602
6603 2018-04-27  Alexandre Oliva  <aoliva@redhat.com>
6604
6605         * compile/compile-c-types.c (convert_int, convert_float):
6606         Update for C FE v1.
6607
6608 2018-04-27  Tom Tromey  <tom@tromey.com>
6609
6610         PR rust/22545:
6611         * rust-lang.c (rust_inclusive_range_type_p): New function.
6612         (rust_range): Handle inclusive ranges.
6613         (rust_compute_range): Likewise.
6614         * rust-exp.y (struct rust_op) <inclusive>: New field.
6615         (DOTDOTEQ): New constant.
6616         (range_expr): Add "..=" productions.
6617         (operator_tokens): Add "..=" token.
6618         (ast_range): Add "inclusive" parameter.
6619         (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
6620         ranges.
6621         * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
6622         bounds values.
6623         * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
6624         LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
6625         Update comments.
6626         * expprint.c (print_subexp_standard): Handle new bounds values.
6627         (dump_subexp_body_standard): Likewise.
6628
6629 2018-04-27  Tom Tromey  <tom@tromey.com>
6630
6631         * configure: Rebuild.
6632         * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
6633         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
6634         "OVERRIDE".
6635         (class symbol_needs_eval_context): Likewise.
6636         * dwarf2read.c (mock_mapped_index::symbol_name_count)
6637         (mock_mapped_index::symbol_name_at): Use "override".  Remove
6638         "virtual".
6639         * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
6640         "override".
6641         (class dwarf_expr_executor): Use "override", not "OVERRIDE".
6642         * aarch64-tdep.c (instruction_reader::read): Use "override".
6643         (instruction_reader_test::read): Likewise.
6644         * arm-tdep.c (instruction_reader::read): Use "override".
6645         (instruction_reader_thumb::read): Likewise.
6646
6647 2018-04-26  Andrzej Kaczmarek  <andrzej.kaczmarek@codecoup.pl>
6648
6649         PR remote/9665
6650         * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
6651         instead of remote_send.
6652         (remote_send): Remove.
6653
6654 2018-04-26  Pedro Alves  <palves@redhat.com>
6655
6656         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
6657         find_function_start_sal instead of find_pc_line.
6658
6659 2018-04-26  Pedro Alves  <palves@redhat.com>
6660
6661         * breakpoint.c (set_breakpoint_location_function): Handle
6662         mst_data_gnu_ifunc.
6663         * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
6664         * elfread.c (elf_symtab_read): Give data symbols with
6665         BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
6666         (elf_rel_plt_read): Update comment.
6667         * linespec.c (convert_linespec_to_sals): Handle
6668         mst_data_gnu_ifunc.
6669         (minsym_found): Handle mst_data_gnu_ifunc.
6670         * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
6671         (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
6672         * parse.c (find_minsym_type_and_address): Handle
6673         mst_data_gnu_ifunc.
6674         * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
6675         * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
6676         * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
6677         comment.
6678         <mst_data_gnu_ifunc>: New enumerator.
6679
6680 2018-04-26  Pedro Alves  <palves@redhat.com>
6681
6682         * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
6683         (lookup_minimal_symbol_by_pc_section): ... this.  Replace
6684         'want_trampoline' parameter by a lookup_msym_prefer parameter.
6685         Handle it.
6686         (lookup_minimal_symbol_by_pc_section): Delete old implementation.
6687         (lookup_minimal_symbol_by_pc): Adjust.
6688         (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
6689         (lookup_solib_trampoline_symbol_by_pc): Adjust.
6690         * minsyms.h (lookup_msym_prefer): New enum.
6691         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
6692         parameter by a lookup_msym_prefer parameter.
6693
6694 2018-04-26  Pedro Alves  <palves@redhat.com>
6695
6696         * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
6697         ends in "@plt" instead of looking at the symbol's section.
6698
6699 2018-04-26  Pedro Alves  <palves@redhat.com>
6700
6701         * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete.  Remove
6702         all references.
6703         (find_pc_partial_function_gnu_ifunc): Rename to ...
6704         (find_pc_partial_function): ... this, and remove references to
6705         'is_gnu_ifunc_p'.
6706         (find_pc_partial_function): Delete old implementation.
6707         * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
6708
6709 2018-04-26  Pedro Alves  <palves@redhat.com>
6710
6711         * linespec.c (struct bound_minimal_symbol_search_key): New.
6712         (convert_linespec_to_sals): Sort minimal symbols earlier.  Don't
6713         skip first line if we found a GNU ifunc minimal symbol by name.
6714         (compare_msymbols): Change parameters to work with a destructured
6715         lhs minsym.
6716         (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
6717         functions.
6718
6719 2018-04-26  Pedro Alves  <palves@redhat.com>
6720
6721         * breakpoint.c (set_breakpoint_location_function): Don't resolve
6722         ifunc targets here.  Instead, if we have an ifunc minsym, use its
6723         address/name.
6724         (add_location_to_breakpoint): Store the minsym and the objfile in
6725         the breakpoint location.
6726         * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
6727         * linespec.c (minsym_found): Resolve GNU ifunc targets here.
6728         Record the minsym in the sal.
6729         * symtab.h (symtab_and_line) <msymbol>: New field.
6730
6731 2018-04-26  Pedro Alves  <palves@redhat.com>
6732
6733         * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
6734         unless we actually resolved the ifunc.
6735
6736 2018-04-26  Pedro Alves  <palves@redhat.com>
6737
6738         * c-exp.y (variable production): Prefer ifunc minsyms over
6739         regular function symbols.
6740         * symtab.c (find_gnu_ifunc): New function.
6741         * minsyms.h (lookup_msym_prefer): New enum.
6742         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
6743         parameter by a lookup_msym_prefer parameter.
6744         * symtab.h (find_gnu_ifunc): New declaration.
6745
6746 2018-04-26  Pedro Alves  <palves@redhat.com>
6747
6748         * blockframe.c (find_gnu_ifunc_target_type): New function.
6749         (find_function_type): New.
6750         * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
6751         return a value with a memory address.
6752         (eval_call): For calls to GNU ifunc functions, try to find the
6753         type of the target function from the type that the resolver
6754         returns.
6755         * gdbtypes.c (objfile_type): Don't install a return type for ifunc
6756         symbols.
6757         * infcall.c (find_function_return_type): Delete.
6758         (find_function_addr): Add 'function_type' parameter.  For calls to
6759         GNU ifunc functions, try to find the type of the target function
6760         from the type that the resolver returns, and return it via
6761         FUNCTION_TYPE.
6762         (call_function_by_hand_dummy): Adjust to use the function type
6763         returned by find_function_addr.
6764         (find_function_addr): Add 'function_type' parameter and move
6765         description here.
6766         * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
6767         declarations.
6768
6769 2018-04-26  Pedro Alves  <palves@redhat.com>
6770
6771         * c-exp.y (variable production): Skip finding an alias for ifunc
6772         symbols.
6773
6774 2018-04-26  Pedro Alves  <palves@redhat.com>
6775
6776         * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
6777
6778 2018-04-25  Pedro Alves  <palves@redhat.com>
6779
6780         * infcmd.c (kill_command): Print the pid as string, not the whole
6781         thread's ptid.  Add comment.  s/has been killed/killed/ in output
6782         message.
6783         * remote.c (remote_detach_1): Print the pid as string, not the
6784         whole thread's ptid.
6785
6786 2018-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
6787             Sergio Durigan Junior  <sergiodj@redhat.com>
6788             Pedro Alves  <palves@redhat.com>
6789
6790         * infcmd.c (kill_command): Print message when inferior has
6791         been killed.
6792         * inferior.c (print_inferior_events): Remove 'static'.  Set as
6793         '1'.
6794         (add_inferior): Improve message printed when
6795         'print_inferior_events' is on.
6796         (exit_inferior): Remove message printed when
6797         'print_inferior_events' is on.
6798         (detach_inferior): Improve message printed when
6799         'print_inferior_events' is on.
6800         (initialize_inferiors): Use 'add_inferior_silent' to set
6801         'current_inferior_'.
6802         * inferior.h (print_inferior_events): Declare here as
6803         'extern'.
6804         * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
6805         '[Detaching...]' messages when 'print_inferior_events' is on.
6806         Use 'add_thread_silent' instead of 'add_thread'.  Add '[' and ']'
6807         as prefix/suffix for messages.  Remove periods.  Fix erroneous
6808         'Detaching after fork from child...', replace it by '... from
6809         parent...'.
6810         (handle_vfork_child_exec_or_exit): Add '[' and ']' as
6811         prefix/suffix when printing 'Detaching...' messages.  Print
6812         them when 'print_inferior_events' is on.
6813         * remote.c (remote_detach_1): Print message when detaching
6814         from inferior and '!is_fork_parent'.
6815
6816 2018-04-24  Tom Tromey  <tom@tromey.com>
6817
6818         * cli-out.h: Reindent.
6819
6820 2018-04-24  Tom Tromey  <tom@tromey.com>
6821
6822         * cli-out.c (cli_ui_out::out_field_fmt): Remove.
6823         (cli_ui_out::do_field_string): Use fputs_filtered.
6824         * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
6825
6826 2018-04-23  Tom Tromey  <tom@tromey.com>
6827
6828         * guile/scm-frame.c (gdbscm_frame_read_var): Use
6829         gdb::unique_xmalloc_ptr.
6830
6831 2018-04-23  Tom Tromey  <tom@tromey.com>
6832
6833         * configure: Rebuild.
6834
6835 2018-04-22  Rajendra SY  <rajendra.sy@gmail.com>
6836
6837         PR gdb/23095
6838         * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
6839         prepare_for_testing.  Set normal_bp to r_debug_state if target
6840         is bsd.
6841
6842 2018-04-21  Pedro Alves  <palves@redhat.com>
6843             Rajendra SY  <rajendra.sy@gmail.com>
6844
6845         * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
6846         * remote.c (extended_remote_attach): In all-stop mode, mark the
6847         thread as executing.
6848
6849 2018-04-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6850
6851         * thread.c (thread_apply_all_command): Fix comment.
6852         (thread_command): Fix comment.
6853
6854 2018-04-10  Alan Hayward  <alan.hayward@arm.com>
6855
6856         * common/tdesc.h (tdesc_create_feature): Remove xml filename
6857         parameter.
6858         * features/aarch64-core.c (create_feature_aarch64_core):
6859         Regenerate.
6860         * features/aarch64-fpu.c (create_feature_aarch64_fpu):
6861         Likewise.
6862         * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
6863         Likewise.
6864         * features/i386/32bit-avx512.c
6865         (create_feature_i386_32bit_avx512): Likewise.
6866         * features/i386/32bit-core.c (create_feature_i386_32bit_core):
6867         Likewise.
6868         * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
6869         Likewise.
6870         * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
6871         Likewise.
6872         * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
6873         Likewise.
6874         * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
6875         Likewise.
6876         * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
6877         Likewise.
6878         * features/i386/64bit-avx512.c
6879         (create_feature_i386_64bit_avx512): Likewise.
6880         * features/i386/64bit-core.c (create_feature_i386_64bit_core):
6881         Likewise.
6882         * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
6883         Likewise.
6884         * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
6885         Likewise.
6886         * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
6887         Likewise.
6888         * features/i386/64bit-segments.c
6889         (create_feature_i386_64bit_segments): Likewise.
6890         * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
6891         Likewise.
6892         * features/i386/x32-core.c
6893         (create_feature_i386_x32_core): Likewise.
6894         * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
6895         * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
6896         * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
6897         * target-descriptions.c: In generated code, don't pass xml
6898         filename.
6899
6900 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
6901
6902         * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
6903         (print_xml_feature::visit_post): Likewise.
6904         (print_xml_feature::visit): Likewise.
6905         * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
6906         (print_xml_feature): Add new class.
6907         * regformats/regdat.sh: Null xmltarget on feature targets.
6908         * target-descriptions.c (struct target_desc): Add xmltarget.
6909         (maintenance_check_tdesc_xml_convert): Add unittest function.
6910         (tdesc_get_features_xml): Add function to get xml.
6911         (maintenance_check_xml_descriptions): Test xml generation.
6912         * xml-tdesc.c (string_read_description_xml): Add function.
6913         * xml-tdesc.h (string_read_description_xml): Add declaration.
6914
6915 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
6916
6917         * features/Makefile: Add feature marker to targets with new style
6918         target descriptions.
6919         * regformats/aarch64.dat: Regenerate.
6920         * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
6921         * regformats/i386/amd64-avx-linux.dat: Likewise.
6922         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
6923         * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
6924         * regformats/i386/amd64-linux.dat: Likewise.
6925         * regformats/i386/amd64-mpx-linux.dat: Likewise.
6926         * regformats/i386/amd64.dat: Likewise.
6927         * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
6928         * regformats/i386/i386-avx-linux.dat: Likewise.
6929         * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
6930         * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
6931         * regformats/i386/i386-linux.dat: Likewise.
6932         * regformats/i386/i386-mmx-linux.dat: Likewise.
6933         * regformats/i386/i386-mpx-linux.dat: Likewise.
6934         * regformats/i386/i386.dat: Likewise.
6935         * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
6936         * regformats/i386/x32-avx-linux.dat: Likewise.
6937         * regformats/i386/x32-linux.dat: Likewise.
6938         * regformats/tic6x-c62x-linux.dat: Likewise.
6939         * regformats/tic6x-c64x-linux.dat: Likewise.
6940         * regformats/tic6x-c64xp-linux.dat: Likewise.
6941         * regformats/regdat.sh: Parse feature marker.
6942
6943 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
6944
6945         * common/tdesc.h (tdesc_architecture_name): Add new declaration.
6946         (tdesc_osabi_name): Likewise.
6947         * target-descriptions.c (tdesc_architecture_name): Add new
6948         function.
6949         (tdesc_osabi_name): Likewise.
6950
6951 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
6952
6953         * common/tdesc.c (tdesc_predefined_type): Move to here.
6954         (tdesc_named_type): Likewise.
6955         (tdesc_create_vector): Likewise.
6956         (tdesc_create_struct): Likewise.
6957         (tdesc_set_struct_size): Likewise.
6958         (tdesc_create_union): Likewise.
6959         (tdesc_create_flags): Likewise.
6960         (tdesc_create_enum): Likewise.
6961         (tdesc_add_field): Likewise.
6962         (tdesc_add_typed_bitfield): Likewise.
6963         (tdesc_add_bitfield): Likewise.
6964         (tdesc_add_flag): Likewise.
6965         (tdesc_add_enum_value): Likewise.
6966         * common/tdesc.h (struct tdesc_type_builtin): Likewise.
6967         (struct tdesc_type_vector): Likewise.
6968         (struct tdesc_type_field): Likewise.
6969         (struct tdesc_type_with_fields): Likewise.
6970         (tdesc_create_enum): Add declaration.
6971         (tdesc_add_typed_bitfield): Likewise.
6972         (tdesc_add_enum_value): Likewise.
6973         * target-descriptions.c (tdesc_type_field): Move from here.
6974         (tdesc_type_builtin): Likewise.
6975         (tdesc_type_vector): Likewise.
6976         (tdesc_type_with_fields): Likewise.
6977         (tdesc_predefined_types): Likewise.
6978         (tdesc_named_type): Likewise.
6979         (tdesc_create_vector): Likewise.
6980         (tdesc_create_struct): Likewise.
6981         (tdesc_set_struct_size): Likewise.
6982         (tdesc_create_union): Likewise.
6983         (tdesc_create_flags): Likewise.
6984         (tdesc_create_enum): Likewise.
6985         (tdesc_add_field): Likewise.
6986         (tdesc_add_typed_bitfield): Likewise.
6987         (tdesc_add_bitfield): Likewise.
6988         (tdesc_add_flag): Likewise.
6989         (tdesc_add_enum_value): Likewise.
6990         * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
6991         (tdesc_add_typed_bitfield): Likewise.
6992         (tdesc_add_enum_value): Likewise.
6993
6994 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
6995
6996         * common/tdesc.c (tdesc_feature::accept): Move to here.
6997         (tdesc_feature::operator==): Likewise.
6998         (tdesc_create_reg): Likewise.
6999         * common/tdesc.h (tdesc_type_kind): Likewise.
7000         (struct tdesc_type): Likewise.
7001         (struct tdesc_feature): Likewise.
7002         * regformats/regdat.sh: Create a feature.
7003         * target-descriptions.c (tdesc_type_kind): Move from here.
7004         (tdesc_type): Likewise.
7005         (tdesc_type_up): Likewise.
7006         (tdesc_feature): Likewise.
7007         (tdesc_create_reg): Likewise.
7008
7009 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
7010
7011         * Makefile.in: Add arch/tdesc.c
7012         * common/tdesc.c: New file.
7013         * common/tdesc.h (tdesc_element_visitor): Move to here.
7014         (tdesc_element): Likewise.
7015         (tdesc_reg): Likewise.
7016         (tdesc_reg_up): Likewise.
7017         * regformats/regdef.h (reg): Add offset to constructors.
7018         * target-descriptions.c (tdesc_element_visitor): Move from here.
7019         (tdesc_element): Likewise.
7020         (tdesc_reg): Likewise.
7021         (tdesc_reg_up): Likewise.
7022
7023 2018-04-17  Tom Tromey  <tom@tromey.com>
7024
7025         * dwarf2read.c (quirk_rust_enum): Conditionally drop the
7026         discriminant field.
7027
7028 2018-04-17  Tom Tromey  <tom@tromey.com>
7029
7030         * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
7031
7032 2018-04-17  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7033
7034         * symtab.c (print_symbol_info): Skip printing filename and line
7035         number when `last' is NULL.
7036         (symtab_symbol_info): Use empty string instead of NULL for first
7037         invocation of print_symbol_info.
7038         (rbreak_command): Pass NULL to `last' parameter of
7039         print_symbol_info.
7040
7041 2018-04-16  Simon Marchi  <simon.marchi@ericsson.com>
7042
7043         * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
7044         instead of nullptr.
7045
7046 2018-04-16  Pedro Alves  <palves@redhat.com>
7047
7048         * MAINTAINERS (sh): Remove.
7049         * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
7050         (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
7051         (ALLDEPFILES): Remove sh64-tdep.c.
7052         * NEWS: Mentions that support for SH-5/SH64 is removed.
7053         * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
7054         (sh*-*-openbsd*): Ditto.
7055         (sh64-*-elf*): Remove.
7056         (sh*): Remove.
7057         * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
7058         * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
7059         * sh-tdep.c: No longer include "sh64-tdep.h".
7060         (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
7061         * sh64-tdep.c, sh64-tdep.h: Remove files.
7062
7063 2018-04-16  Pedro Alves  <palves@redhat.com>
7064
7065         * MAINTAINERS: Remove m88k.
7066         * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
7067         (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
7068         (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
7069         * NEWS: Mention that support for m88k was removed.
7070         * configure.host (m88*-*-*): Remove support.
7071         * configure.nat (m88k-*-*): Remove support.
7072         * configure.tgt (m88*-*-openbsd*): Remove.
7073         * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
7074
7075 2018-04-15  Simon Marchi  <simon.marchi@polymtl.ca>
7076
7077         * configure.tgt (x86_tobjs): New variable.
7078         (amd64_tobjs, i386_tobjs): Use it.
7079
7080 2018-04-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7081
7082         * symtab.c (print_symbol_info): Precede the symbol definition by
7083         the line number when available.
7084         * NEWS: Advertise this enhancement.
7085
7086 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
7087
7088         * NEWS (New options): announce set/show record btrace cpu.
7089         * btrace.c: Include record-btrace.h.
7090         (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
7091         the vendor is unknown.
7092         (btrace_compute_ftrace_1): Add cpu parameter.  Update callers.
7093         Maybe overwrite the btrace configuration's cpu.
7094         (btrace_compute_ftrace): Add cpu parameter.  Update callers.
7095         (btrace_fetch): Add cpu parameter.  Update callers.
7096         (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
7097         Maybe overwrite the btrace configuration's cpu.  Skip enabling
7098         errata workarounds if the vendor is unknown.
7099         * python/py-record-btrace.c: Include record-btrace.h.
7100         (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
7101         (recpy_bt_function_call_history): Call record_btrace_get_cpu.
7102         * record-btrace.c (record_btrace_cpu_state_kind): New.
7103         (record_btrace_cpu): New.
7104         (set_record_btrace_cpu_cmdlist): New.
7105         (record_btrace_get_cpu): New.
7106         (require_btrace_thread, record_btrace_info)
7107         (record_btrace_resume_thread): Call record_btrace_get_cpu.
7108         (cmd_set_record_btrace_cpu_none): New.
7109         (cmd_set_record_btrace_cpu_auto): New.
7110         (cmd_set_record_btrace_cpu): New.
7111         (cmd_show_record_btrace_cpu): New.
7112         (_initialize_record_btrace): Initialize set/show record btrace cpu
7113         commands.
7114         * record-btrace.h (record_btrace_get_cpu): New.
7115
7116 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
7117
7118         * record.c (set_record_command): Fix typo in message.
7119
7120 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
7121
7122         * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
7123
7124 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
7125
7126         * infrun.c (process_event_stop_test): Call
7127         gdbarch_in_indirect_branch_thunk.
7128         * gdbarch.sh (in_indirect_branch_thunk): New.
7129         * gdbarch.c: Regenerated.
7130         * gdbarch.h: Regenerated.
7131         * x86-tdep.h: New.
7132         * x86-tdep.c: New.
7133         * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
7134         (HFILES_NO_SRCDIR): Add x86-tdep.h.
7135         (ALLDEPFILES): Add x86-tdep.c.
7136         * arch-utils.h (default_in_indirect_branch_thunk): New.
7137         * arch-utils.c (default_in_indirect_branch_thunk): New.
7138         * i386-tdep: Include x86-tdep.h.
7139         (i386_in_indirect_branch_thunk): New.
7140         (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
7141         function.
7142         * amd64-tdep: Include x86-tdep.h.
7143         (amd64_in_indirect_branch_thunk): New.
7144         (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
7145
7146 2018-04-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
7147
7148         PR gdb/23053
7149         * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
7150         (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
7151         (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
7152         regression.
7153
7154 2018-04-12  Tom Tromey  <tom@tromey.com>
7155
7156         * rust-lang.c (rust_print_struct_def): Remove univariant code.
7157         (rust_evaluate_subexp): Likewise.
7158
7159 2018-04-12  Pedro Alves  <palves@redhat.com>
7160
7161         * procfs.c (procfs_detach): Make forward declaration's prototype
7162         match definition's protototype.
7163         (proc_get_LDT_entry): Remove stale do_cleanups call.
7164
7165 2018-04-12  Pedro Alves  <palves@redhat.com>
7166
7167         * target.h (target_ops::to_has_exited): Delete.
7168         (target_has_exited): Delete.
7169         * target-delegates.c: Regenerate.
7170
7171 2018-04-11  Pedro Alves  <palves@redhat.com>
7172
7173         * target.c (fileio_fh_t::t): Add comment.
7174         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
7175         (target_fileio_close): Handle a NULL target.
7176         (invalidate_fileio_fh): New.
7177         (target_close): Call it.
7178         * remote.c (remote_hostio_send_command): No longer check whether
7179         remote_desc is open.
7180
7181 2018-04-11  Pedro Alves  <palves@redhat.com>
7182
7183         * target.c (fileio_fh_t): Make it a named struct instead of a
7184         typedef.
7185         (fileio_fh_t::is_closed): New method.
7186         (DEF_VEC_O (fileio_fh_t)): Remove.
7187         (fileio_fhandles): Now a std::vector.
7188         (is_closed_fileio_fh): Delete.
7189         (acquire_fileio_fd): Adjust.  Rename parameters.
7190         (release_fileio_fd): Adjust.
7191         (fileio_fd_to_fh): Reimplement as a function instead of a macro.
7192         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
7193         (target_fileio_close): Adjust.
7194
7195 2018-04-10  Simon Marchi  <simon.marchi@ericsson.com>
7196
7197         * auto-load.c (auto_load_safe_path_vec_update): Iterate by
7198         index.
7199
7200 2018-04-10  Pedro Alves  <palves@redhat.com>
7201
7202         * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
7203         (scoped_finish_thread_state): New class.
7204         * infcmd.c (run_command_1): Use it instead of finish_thread_state
7205         cleanup.
7206         * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
7207         (fetch_inferior_event, normal_stop): Likewise.
7208         * thread.c (finish_thread_state_cleanup): Delete.
7209
7210 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
7211             Pedro Alves  <palves@redhat.com>
7212
7213         * value.c: Include "selftest.h" and "common/array-view.h".
7214         (struct range) <operator ==>: New.
7215         (test_ranges_contain): New.
7216         (check_ranges_vector): New.
7217         (test_insert_into_bit_range_vector): New.
7218         (_initialize_values): Register selftests.
7219         * common/array-view.h (operator==, operator!=): New.
7220
7221 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
7222
7223         * common/gdb_vecs.h (unordered_remove): Add overload that takes
7224         an iterator.
7225         * inline-frame.c: Include <algorithm>.
7226         (struct inline_state): Add constructor.
7227         (inline_state_s): Remove.
7228         (DEF_VEC_O(inline_state_s)): Remove.
7229         (inline_states): Change type to std::vector.
7230         (find_inline_frame_state): Adjust to std::vector.
7231         (allocate_inline_frame_state): Remove.
7232         (clear_inline_frame_state): Adjust to std::vector.
7233         (skip_inline_frames): Adjust to std::vector.
7234
7235 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
7236
7237         * tracepoint.h (struct trace_state_variable): Add constructor.
7238         <name>: Change type to std::string.
7239         * tracepoint.c (tsv_s): Remove.
7240         (DEF_VEC_O(tsv_s)): Remove.
7241         (tvariables): Change to std::vector.
7242         (create_trace_state_variable): Adjust to std::vector.
7243         (find_trace_state_variable): Likewise.
7244         (find_trace_state_variable_by_number): Likewise.
7245         (delete_trace_state_variable): Likewise.
7246         (trace_variable_command): Adjust to std::string.
7247         (delete_trace_variable_command): Likewise.
7248         (tvariables_info_1): Adjust to std::vector.
7249         (save_trace_state_variables): Likewise.
7250         (start_tracing): Likewise.
7251         (merge_uploaded_trace_state_variables): Adjust to std::vector
7252         and std::string.
7253         * target.h (struct target_ops)
7254         <to_download_trace_state_variable>: Pass reference to
7255         trace_state_variable.
7256         * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
7257         * target-delegates.c: Re-generate.
7258         * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
7259         (mi_tsv_deleted): Likewise.
7260         * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
7261         * remote.c (remote_download_trace_state_variable): Change
7262         pointer to reference and adjust.
7263         * make-target-delegates (parse_argtypes): Handle references.
7264         (write_function_header): Likewise.
7265         (munge_type): Likewise.
7266
7267 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
7268
7269         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7270         string_view-selftests.c.
7271         * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
7272         testsuite.
7273         * unittests/basic_string_view/cons/char/1.cc: Likewise.
7274         * unittests/basic_string_view/cons/char/2.cc: Likewise.
7275         * unittests/basic_string_view/cons/char/3.cc: Likewise.
7276         * unittests/basic_string_view/element_access/char/1.cc:
7277         Likewise.
7278         * unittests/basic_string_view/element_access/char/empty.cc:
7279         Likewise.
7280         * unittests/basic_string_view/element_access/char/front_back.cc:
7281         Likewise.
7282         * unittests/basic_string_view/inserters/char/2.cc: Likewise.
7283         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
7284         Likewise.
7285         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
7286         Likewise.
7287         * unittests/basic_string_view/modifiers/swap/char/1.cc:
7288         Likewise.
7289         * unittests/basic_string_view/operations/compare/char/1.cc:
7290         Likewise.
7291         * unittests/basic_string_view/operations/compare/char/13650.cc:
7292         Likewise.
7293         * unittests/basic_string_view/operations/copy/char/1.cc:
7294         Likewise.
7295         * unittests/basic_string_view/operations/data/char/1.cc:
7296         Likewise.
7297         * unittests/basic_string_view/operations/find/char/1.cc:
7298         Likewise.
7299         * unittests/basic_string_view/operations/find/char/2.cc:
7300         Likewise.
7301         * unittests/basic_string_view/operations/find/char/3.cc:
7302         Likewise.
7303         * unittests/basic_string_view/operations/find/char/4.cc:
7304         Likewise.
7305         * unittests/basic_string_view/operations/rfind/char/1.cc:
7306         Likewise.
7307         * unittests/basic_string_view/operations/rfind/char/2.cc:
7308         Likewise.
7309         * unittests/basic_string_view/operations/rfind/char/3.cc:
7310         Likewise.
7311         * unittests/basic_string_view/operations/substr/char/1.cc:
7312         Likewise.
7313         * unittests/basic_string_view/operators/char/2.cc: Likewise.
7314         * unittests/string_view-selftests.c: New file.
7315
7316 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
7317
7318         * unittests/basic_string_view/capacity/1.cc: New file.
7319         * unittests/basic_string_view/capacity/empty_neg.cc: New file.
7320         * unittests/basic_string_view/cons/char/1.cc: New file.
7321         * unittests/basic_string_view/cons/char/2.cc: New file.
7322         * unittests/basic_string_view/cons/char/3.cc: New file.
7323         * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
7324         * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
7325         * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
7326         * unittests/basic_string_view/element_access/char/1.cc: New file.
7327         * unittests/basic_string_view/element_access/char/2.cc: New file.
7328         * unittests/basic_string_view/element_access/char/empty.cc: New file.
7329         * unittests/basic_string_view/element_access/char/front_back.cc: New file.
7330         * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
7331         * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
7332         * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
7333         * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
7334         * unittests/basic_string_view/include.cc: New file.
7335         * unittests/basic_string_view/inserters/char/1.cc: New file.
7336         * unittests/basic_string_view/inserters/char/2.cc: New file.
7337         * unittests/basic_string_view/inserters/char/3.cc: New file.
7338         * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
7339         * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
7340         * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
7341         * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
7342         * unittests/basic_string_view/literals/types.cc: New file.
7343         * unittests/basic_string_view/literals/values.cc: New file.
7344         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
7345         * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
7346         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
7347         * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
7348         * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
7349         * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
7350         * unittests/basic_string_view/operations/compare/char/1.cc: New file.
7351         * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
7352         * unittests/basic_string_view/operations/compare/char/2.cc: New file.
7353         * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
7354         * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
7355         * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
7356         * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
7357         * unittests/basic_string_view/operations/copy/char/1.cc: New file.
7358         * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
7359         * unittests/basic_string_view/operations/data/char/1.cc: New file.
7360         * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
7361         * unittests/basic_string_view/operations/find/char/1.cc: New file.
7362         * unittests/basic_string_view/operations/find/char/2.cc: New file.
7363         * unittests/basic_string_view/operations/find/char/3.cc: New file.
7364         * unittests/basic_string_view/operations/find/char/4.cc: New file.
7365         * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
7366         * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
7367         * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
7368         * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
7369         * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
7370         * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
7371         * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
7372         * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
7373         * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
7374         * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
7375         * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
7376         * unittests/basic_string_view/operations/substr/char/1.cc: New file.
7377         * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
7378         * unittests/basic_string_view/operators/char/2.cc: New file.
7379         * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
7380         * unittests/basic_string_view/range_access/char/1.cc: New file.
7381         * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
7382         * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
7383         * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
7384         * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
7385         * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
7386         * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
7387         * unittests/basic_string_view/requirements/typedefs.cc: New file.
7388         * unittests/basic_string_view/typedefs.cc: New file.
7389         * unittests/basic_string_view/types/1.cc: New file.
7390
7391 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
7392
7393         * common/gdb_string_view.h: Remove libstdc++ implementation
7394         details, adjust to gdb reality.
7395         * common/gdb_string_view.tcc: Likewise.
7396         * cli/cli-script.c (struct string_view): Remove.
7397         (user_args) <m_args>: Change element type to gdb::string_view.
7398         (user_args::insert_args): Adjust.
7399
7400 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
7401
7402         * common/gdb_string_view.h: New file.
7403         * common/gdb_string_view.tcc: New file.
7404
7405 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
7406
7407         * ax_cxx_compile_stdcxx.m4: Sync with upstream.
7408         * configure: Re-generate.
7409
7410 2018-04-09  Pedro Alves  <palves@redhat.com>
7411
7412         * gdbarch.sh: Include "observable.h" instead of "observer.h".
7413         (set_target_gdbarch): Call
7414         gdb::observers::architecture_changed.notify instead of
7415         observer_notify_architecture_changed.
7416
7417 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
7418
7419         * tracepoint.c (struct current_traceframe_cleanup): Remove.
7420         (do_restore_current_traceframe_cleanup): Remove.
7421         (restore_current_traceframe_cleanup_dtor): Remove.
7422         (make_cleanup_restore_current_traceframe): Remove.
7423         (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
7424         New.
7425         * tracepoint.h (struct scoped_restore_current_traceframe): New.
7426         * infrun.c (fetch_inferior_event): Use
7427         scoped_restore_current_traceframe.
7428
7429 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
7430
7431         * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
7432         Remove.
7433         <n_allocated_type_units>: Remove.
7434         <all_type_units>: Change to std::vector.
7435         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
7436         to std::vector change.
7437         (dwarf2_per_objfile::get_cutu): Likewise.
7438         (dwarf2_per_objfile::get_tu): Likewise.
7439         (create_signatured_type_table_from_index): Likewise.
7440         (create_signatured_type_table_from_debug_names): Likewise.
7441         (dw2_symtab_iter_next): Likewise.
7442         (dw2_print_stats): Likewise.
7443         (dw2_expand_all_symtabs): Likewise.
7444         (dw2_expand_marked_cus): Likewise.
7445         (dw2_debug_names_iterator::next): Likewise.
7446         (dwarf2_initialize_objfile): Likewise.
7447         (add_signatured_type_cu_to_table): Likewise.
7448         (create_all_type_units): Likewise.
7449         (add_type_unit): Likewise.
7450         (struct tu_abbrev_offset): Add constructor.
7451         (build_type_psymtabs_1): Adjust to std::vector change.
7452         (print_tu_stats): Likewise.
7453         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
7454         (write_debug_names): Likewise.
7455
7456 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
7457
7458         * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
7459         Make an std::vector.
7460         <n_comp_units>: Remove.
7461         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
7462         to std::vector change.
7463         (dwarf2_per_objfile::get_cutu): Likewise.
7464         (dwarf2_per_objfile::get_cu): Likewise.
7465         (create_cus_from_index): Likewise.
7466         (create_addrmap_from_index): Likewise.
7467         (create_addrmap_from_aranges): Likewise.
7468         (dwarf2_read_index): Likewise.
7469         (dw2_find_last_source_symtab): Likewise.
7470         (dw2_map_symtabs_matching_filename): Likewise.
7471         (dw2_symtab_iter_next): Likewise.
7472         (dw2_print_stats): Likewise.
7473         (dw2_expand_all_symtabs): Likewise.
7474         (dw2_expand_symtabs_with_fullname): Likewise.
7475         (dw2_expand_marked_cus): Likewise.
7476         (dw2_map_symbol_filenames): Likewise.
7477         (create_cus_from_debug_names): Likewise.
7478         (dwarf2_read_debug_names): Likewise.
7479         (dw2_debug_names_iterator::next): Likewise.
7480         (dwarf2_initialize_objfile): Likewise.
7481         (set_partial_user): Likewise.
7482         (dwarf2_build_psymtabs_hard): Likewise.
7483         (read_comp_units_from_section): Remove arguments, adjust to
7484         std::vector change.
7485         (create_all_comp_units): Adjust to std::vector and
7486         read_comp_units_from_section changes.
7487         (dwarf2_find_containing_comp_unit): Adjust to std::vector
7488         change.
7489         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
7490         (psyms_seen_size): Likewise.
7491         (write_gdbindex): Likewise.
7492         (write_debug_names): Likewise.
7493
7494 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
7495
7496         * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
7497         with dwarf2_per_objfile.
7498         (create_cus_from_index): Likewise.
7499         (create_signatured_type_table_from_index): Likewise.
7500         (dwarf2_read_index): Likewise.
7501         (dwarf2_initialize_objfile): Likewise.
7502         (dwarf2_fetch_die_loc_sect_off):  Get dwarf2_per_objfile from
7503         per_cu rather than get_dwarf2_per_objfile.
7504
7505 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
7506
7507         * dwarf2read.h (struct signatured_type): Forward declare.
7508         (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
7509         New methods.
7510         * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
7511         (dw2_get_cutu): ...this.
7512         (dwarf2_per_objfile::get_cu): Rename from...
7513         (dw2_get_cu): ...this.
7514         (dwarf2_per_objfile::get_tu): New.
7515         (create_addrmap_from_index): Adjust.
7516         (create_addrmap_from_aranges): Adjust.
7517         (dw2_find_last_source_symtab): Adjust.
7518         (dw2_map_symtabs_matching_filename): Adjust.
7519         (dw2_symtab_iter_next): Adjust.
7520         (dw2_print_stats): Adjust.
7521         (dw2_expand_all_symtabs): Adjust.
7522         (dw2_expand_symtabs_with_fullname): Adjust.
7523         (dw2_expand_marked_cus): Adjust.
7524         (dw_expand_symtabs_matching_file_matcher): Adjust.
7525         (dw2_map_symbol_filenames): Adjust.
7526         (dw2_debug_names_iterator::next): Adjust.
7527         (dwarf2_initialize_objfile): Adjust.
7528         (set_partial_user): Adjust.
7529         (dwarf2_build_psymtabs_hard): Adjust.
7530
7531 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
7532
7533         * dwarf2read.c (create_signatured_type_table_from_debug_names):
7534         Remove unused variables.
7535         (dw2_map_symtabs_matching_filename): Likewise.
7536         (dwarf2_record_block_ranges): Likewise.
7537         (dwarf2_read_addr_index): Likewise.
7538         (follow_die_offset): Likewise.
7539
7540 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
7541
7542         * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
7543         to symbol_file_add_main.
7544
7545 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
7546
7547         PR mi/22299
7548         * mi/mi-console.c (do_fputc_async_safe): New.
7549         (mi_console_file::write_async_safe): New.
7550         (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
7551         * mi/mi-console.h (class mi_console_file) <write_async_safe>:
7552         New.
7553         * ui-file.c (ui_file::putstrn): Adjust call to
7554         fputstrn_unfiltered.
7555         * utils.c (printchar): Replace do_fputs and do_fprintf
7556         parameters by do_fputc.
7557         (fputstr_filtered): Adjust call to printchar.
7558         (fputstr_unfiltered): Likewise.
7559         (fputstrn_filtered): Likewise.
7560         (fputstrn_unfiltered): Add do_fputc parameter, pass to
7561         printchar.
7562         * utils.h (do_fputc_ftype): New typedef.
7563         (fputstrn_unfiltered): Add do_fputc parameter.
7564
7565 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
7566
7567         * regformats/i386/i386-avx.dat: Remove.
7568
7569 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
7570
7571         PR gdb/22979
7572         * amd64-tdep.c (amd64_none_init_abi): New function.
7573         (amd64_x32_none_init_abi): New function.
7574         (_initialize_amd64_tdep): Register handlers for x86-64 and
7575         x64_32 with GDB_OSABI_NONE.
7576         * osabi.c (gdbarch_init_osabi): Allow running handlers for the
7577         GDB_OSABI_NONE osabi.
7578
7579 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
7580
7581         PR gdb/22980
7582         * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
7583         GDB_OSABI_NONE.
7584         * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
7585         * osabi.c (gdb_osabi_names): Add "unknown" entry.
7586
7587 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
7588
7589         * common/byte-vector.h (char_vector): New type.
7590         * target.h (target_read_alloc): Return
7591         gdb::optional<byte_vector>.
7592         (target_read_stralloc): Return gdb::optional<char_vector>.
7593         (target_get_osdata): Return gdb::optional<char_vector>.
7594         * target.c (target_read_alloc_1): Templatize.  Replacement
7595         manual memory management with vector.
7596         (target_read_alloc): Change return type, adjust.
7597         (target_read_stralloc): Change return type, adjust.
7598         (target_get_osdata): Change return type, adjust.
7599         * auxv.c (struct auxv_info) <length>: Remove.
7600         <data>: Change type to gdb::optional<byte_vector>.
7601         (auxv_inferior_data_cleanup): Free auxv_info with delete.
7602         (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
7603         (target_auxv_search): Adjust.
7604         (fprint_target_auxv): Adjust.
7605         * avr-tdep.c (avr_io_reg_read_command): Adjust.
7606         * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
7607         (linux_make_corefile_notes): Adjust.
7608         * osdata.c (get_osdata): Adjust.
7609         * remote.c (remote_get_threads_with_qxfer): Adjust.
7610         (remote_memory_map): Adjust.
7611         (remote_traceframe_info): Adjust.
7612         (btrace_read_config): Adjust.
7613         (remote_read_btrace): Adjust.
7614         (remote_pid_to_exec_file): Adjust.
7615         * solib-aix.c (solib_aix_get_library_list): Adjust.
7616         * solib-dsbt.c (decode_loadmap): Don't free buf.
7617         (dsbt_get_initial_loadmaps): Adjust.
7618         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
7619         * solib-target.c (solib_target_current_sos): Adjust.
7620         * tracepoint.c (sdata_make_value): Adjust.
7621         * xml-support.c (xinclude_start_include): Adjust.
7622         (xml_fetch_content_from_file): Adjust.
7623         * xml-support.h (xml_fetch_another): Change return type.
7624         (xml_fetch_content_from_file): Change return type.
7625         * xml-syscall.c (xml_init_syscalls_info): Adjust.
7626         * xml-tdesc.c (file_read_description_xml): Adjust.
7627         (fetch_available_features_from_target): Change return type.
7628         (target_fetch_description_xml): Adjust.
7629         (target_read_description_xml): Adjust.
7630
7631 2018-04-06  Tom Tromey  <tom@tromey.com>
7632
7633         * value.c (~value): Update.
7634         (struct value) <contents>: Now unique_xmalloc_ptr.
7635         (value_contents_bits_eq, allocate_value_contents)
7636         (value_contents_raw, value_contents_all_raw)
7637         (value_contents_for_printing, value_contents_for_printing_const)
7638         (set_value_enclosing_type): Update.
7639
7640 2018-04-06  Tom Tromey  <tom@tromey.com>
7641
7642         * value.c (range_s): Remove typedef, VEC.
7643         (struct range): Add operator<.
7644         (range_lessthan): Remove.
7645         (ranges_contain): Change type.
7646         (~value): Update.
7647         (struct value) <unavailable, optimized_out>: Now std::vector.
7648         (value_entirely_available)
7649         (value_entirely_covered_by_range_vector)
7650         (value_entirely_unavailable, value_entirely_optimized_out):
7651         Update.
7652         (insert_into_bit_range_vector): Change argument type.
7653         (find_first_range_overlap): Likewise.
7654         (struct ranges_and_idx, value_contents_bits_eq)
7655         (require_not_optimized_out, require_available): Update.
7656         (ranges_copy_adjusted): Change argument types.
7657         (value_optimized_out, value_copy, value_fetch_lazy): Update.
7658
7659 2018-04-06  Tom Tromey  <tom@tromey.com>
7660
7661         * value.c (~value): Update.
7662         (struct value) <parent>: Now a value_ref_ptr.
7663         (value_parent, set_value_parent, value_address, value_copy):
7664         Update.
7665
7666 2018-04-06  Tom Tromey  <tom@tromey.com>
7667
7668         * value.c (struct value): Add constructor, destructor, and member
7669         initializers.
7670         (allocate_value_lazy, value_decref): Update.
7671
7672 2018-04-06  Tom Tromey  <tom@tromey.com>
7673
7674         * value.c (struct value) <released, next>: Remove.
7675         (all_values): Now a std::vector.
7676         (allocate_value_lazy): Update.
7677         (value_next): Remove.
7678         (value_mark, value_free_to_mark, release_value)
7679         (value_release_to_mark): Update.
7680
7681 2018-04-06  Tom Tromey  <tom@tromey.com>
7682
7683         * value.h (fetch_subexp_value, value_release_to_mark): Update.
7684         (free_value_chain): Remove.
7685         * value.c (free_value_chain): Remove.
7686         (value_release_to_mark): Return a std::vector.
7687         * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
7688         std::vector.
7689         (check_condition): Update.
7690         * eval.c (fetch_subexp_value): Change "val_chain" to a
7691         std::vector.
7692         * breakpoint.c (update_watchpoint): Update.
7693         (can_use_hardware_watchpoint): Change "vals" to a std::vector.
7694
7695 2018-04-06  Tom Tromey  <tom@tromey.com>
7696
7697         * value.h (free_all_values): Remove.
7698         * value.c (free_all_values): Remove.
7699
7700 2018-04-06  Tom Tromey  <tom@tromey.com>
7701
7702         * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
7703         (value_history_chain, value_history_count): Remove.
7704         (value_history): New global.
7705         (record_latest_value, access_value_history, show_values)
7706         (preserve_values): Update.
7707
7708 2018-04-06  Tom Tromey  <tom@tromey.com>
7709
7710         * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
7711         * varobj.c (varobj_set_display_format, varobj_set_value)
7712         (install_default_visualizer, construct_visualizer)
7713         (install_new_value, ~varobj, varobj_get_value_type)
7714         (my_value_of_variable, varobj_editable_p): Update.
7715         * c-varobj.c (c_describe_child, c_value_of_variable)
7716         (cplus_number_of_children, cplus_describe_child): Update.
7717         * ada-varobj.c (ada_number_of_children, ada_name_of_child)
7718         (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
7719         (ada_value_of_variable, ada_value_is_changeable_p): Update.
7720
7721 2018-04-06  Tom Tromey  <tom@tromey.com>
7722
7723         * printcmd.c (last_examine_address): Change type to
7724         value_ref_ptr.
7725         (do_examine, x_command): Update.
7726
7727 2018-04-06  Tom Tromey  <tom@tromey.com>
7728
7729         * value.c (release_value): Update.
7730         * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
7731         (struct bpstats) <val>: Now a value_ref_ptr.
7732         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
7733         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
7734         (~watchpoint, print_it_watchpoint, watch_command_1)
7735         (invalidate_bp_value_on_memory_change): Update.
7736
7737 2018-04-06  Tom Tromey  <tom@tromey.com>
7738
7739         * varobj.c (varobj_clear_saved_item)
7740         (update_dynamic_varobj_children, install_new_value, ~varobj):
7741         Update.
7742         * value.h (value_incref): Move declaration earlier.
7743         (value_decref): Rename from value_free.
7744         (struct value_ref_policy): New.
7745         (value_ref_ptr): New typedef.
7746         (struct value_deleter): Remove.
7747         (gdb_value_up): Remove typedef.
7748         (release_value): Change return type.
7749         (release_value_or_incref): Remove.
7750         * value.c (set_value_parent): Update.
7751         (value_incref): Change return type.
7752         (value_decref): Rename from value_free.
7753         (value_free_to_mark, free_all_values, free_value_chain): Update.
7754         (release_value): Return value_ref_ptr.
7755         (release_value_or_incref): Remove.
7756         (record_latest_value, set_internalvar, clear_internalvar):
7757         Update.
7758         * stack.c (info_frame_command): Don't call value_free.
7759         * python/py-value.c (valpy_dealloc, valpy_new)
7760         (value_to_value_object): Update.
7761         * printcmd.c (do_examine): Update.
7762         * opencl-lang.c (lval_func_free_closure): Update.
7763         * mi/mi-main.c (register_changed_p): Don't call value_free.
7764         * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
7765         * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
7766         * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
7767         value_free.
7768         * guile/scm-value.c (vlscm_free_value_smob)
7769         (vlscm_scm_from_value): Update.
7770         * frame.c (frame_register_unwind, frame_unwind_register_signed)
7771         (frame_unwind_register_unsigned, get_frame_register_bytes)
7772         (put_frame_register_bytes): Don't call value_free.
7773         * findvar.c (address_from_register): Don't call value_free.
7774         * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
7775         * dwarf2loc.c (entry_data_value_free_closure)
7776         (value_of_dwarf_reg_entry, free_pieced_value_closure)
7777         (dwarf2_evaluate_loc_desc_full): Update.
7778         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
7779         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
7780         (~watchpoint, watch_command_1)
7781         (invalidate_bp_value_on_memory_change): Update.
7782         * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
7783
7784 2018-04-06  Simon Marchi  <simon.marchi@polymtl.ca>
7785
7786         PR gdb/23022
7787         * warning.m4: Add -Wno-error=deprecated-register.
7788         * configure: Re-generate.
7789
7790 2018-04-05  Tom Tromey  <tom@tromey.com>
7791
7792         * linespec.h: Remove include of "vec.h".
7793
7794 2018-04-05  Tom Tromey  <tom@tromey.com>
7795
7796         * linespec.c (typep): Remove typedef.
7797         (find_methods, find_superclass_methods): Take a std::vector.
7798         (find_method): Use std::vector.
7799
7800 2018-04-05  Tom Tromey  <tom@tromey.com>
7801
7802         * utils.c (compare_strings): Remove.
7803         * utils.h (compare_strings): Remove.
7804         * objc-lang.h (find_imps): Update.
7805         * objc-lang.c (find_methods): Take a std::vector.
7806         (uniquify_strings, find_imps): Likewise.
7807         * linespec.c (find_methods): Take a std::vector.
7808         (decode_objc): Use std::vector.
7809         (add_all_symbol_names_from_pspace, find_superclass_methods): Take
7810         a std::vector.
7811         (find_method, find_function_symbols): Use std::vector.
7812
7813 2018-04-05  Tom Tromey  <tom@tromey.com>
7814
7815         * completer.c (completion_tracker::completion_tracker): Remove
7816         cast.
7817         (completion_tracker::discard_completions): Likewise.
7818         * breakpoint.c (ambiguous_names_p): Remove cast.
7819         * ada-lang.c (_initialize_ada_language): Remove cast.
7820         * utils.h (streq): Update.
7821         (streq_hash): Add new declaration.
7822         * utils.c (streq): Return bool.
7823         (streq_hash): New function.
7824
7825 2018-04-05  Tom Tromey  <tom@tromey.com>
7826
7827         * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
7828         Remove a string copy.
7829
7830 2018-04-05  Tom Tromey  <tom@tromey.com>
7831
7832         * linespec.c (filter_results): Use std::vector.
7833         (decode_line_2, decode_line_full): Update.
7834
7835 2018-04-05  Tom Tromey  <tom@tromey.com>
7836
7837         * linespec.c (canonical_to_fullform): Return std::string.
7838         (filter_results): Update.
7839         (struct decode_line_2_item): Add constructor.
7840         <fullform, displayform>: Now std::string.
7841         (decode_line_2_compare_items): Now a std::sort comparator.
7842         (decode_line_2): Update.
7843
7844 2018-04-05  Tom Tromey  <tom@tromey.com>
7845
7846         * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
7847         (unexpected_linespec_error): Update.
7848         (linespec_parse_basic, parse_linespec): Update.
7849
7850 2018-04-05  Tom Tromey  <tom@tromey.com>
7851
7852         * linespec.c (linespec_parse_basic): Reindent.
7853
7854 2018-04-05  Tom Tromey  <tom@tromey.com>
7855
7856         * minsyms.h (iterate_over_minimal_symbols): Update.
7857         * minsyms.c (iterate_over_minimal_symbols): Take a
7858         gdb::function_view.
7859         * linespec.c (struct collect_minsyms): Remove.
7860         (compare_msyms): Now a std::sort comparator.
7861         (add_minsym): Add parameters.
7862         (search_minsyms_for_name): Update.  Use std::vector.
7863
7864 2018-04-03  Tom Tromey  <tom@tromey.com>
7865
7866         * mipsread.c (read_alphacoff_dynamic_symtab): Use
7867         gdb::byte_vector.
7868
7869 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
7870
7871         * MAINTAINERS (Write After Approval): Add Weimin Pan.
7872
7873 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
7874
7875         PR gdb/16959
7876         * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when 
7877         printing static type.
7878
7879 2018-04-01  Tom Tromey  <tom@tromey.com>
7880
7881         * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
7882         (rs6000_xfer_shared_libraries): Update.
7883
7884 2018-04-01  Simon Marchi  <simon.marchi@polymtl.ca>
7885
7886         * common/gdb_vecs.h (char_ptr): Remove.
7887         * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
7888
7889 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
7890
7891         * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
7892         with std::vector.
7893         * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
7894
7895 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
7896
7897         * tracepoint.h (struct uploaded_tp): Initialize fields.
7898         <actions, step_actions, cmd_strings>: Change type to
7899         std::vector<char *>.
7900         * tracepoint.c (get_uploaded_tp): Allocate with new.
7901         (free_uploaded_tps): Free with delete.
7902         (parse_tracepoint_definition): Adjust to std::vector change.
7903         * breakpoint.c (read_uploaded_action): Likewise.
7904         (create_tracepoint_from_upload): Likewise.
7905         * ctf.c (ctf_write_uploaded_tp): Likewise.
7906         (SET_ARRAY_FIELD): Likewise.
7907         * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
7908
7909 2018-03-30  Tom Tromey  <tom@tromey.com>
7910
7911         * solib-svr4.c (lm_info_read): Use gdb::byte_vector.  Return
7912         std::unique_ptr.
7913         (svr4_keep_data_in_core): Update.
7914         (svr4_read_so_list): Update.
7915
7916 2018-03-30  Tom Tromey  <tom@tromey.com>
7917
7918         * windows-nat.c (handle_output_debug_string, handle_exception):
7919         Update.
7920         * target.h (target_read_string): Update.
7921         * target.c (target_read_string): Change "string" to
7922         unique_xmalloc_ptr.
7923         * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
7924         Update.
7925         * solib-frv.c (frv_current_sos): Update.
7926         * solib-dsbt.c (dsbt_current_sos): Update.
7927         * solib-darwin.c (darwin_current_sos): Update.
7928         * linux-thread-db.c (inferior_has_bug): Update.
7929         * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
7930         Update.  Remove alloca.
7931         * ada-lang.c (ada_main_name): Update.
7932
7933 2018-03-30  Tom Tromey  <tom@tromey.com>
7934
7935         * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
7936         (struct dwo_file_deleter): New.
7937         (dwo_file_up): New typedef.
7938         (open_and_init_dwo_file): Use dwo_file_up.
7939         (free_dwo_file_cleanup): Remove.
7940
7941 2018-03-30  Tom Tromey  <tom@tromey.com>
7942
7943         * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
7944         (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
7945
7946 2018-03-30  Tom Tromey  <tom@tromey.com>
7947
7948         * dwarf2read.c (class free_cached_comp_units): New class.
7949         (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
7950         (free_cached_comp_units): Remove function.
7951
7952 2018-03-30  Tom Tromey  <tom@tromey.com>
7953
7954         * utils.h (make_cleanup_unpush_target): Remove.
7955         * inf-ptrace.c (struct target_unpusher): New.
7956         (target_unpush_up) New typedef.
7957         (inf_ptrace_create_inferior, inf_ptrace_attach): Use
7958         target_unpush_up.
7959         * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
7960
7961 2018-03-27  Tom Tromey  <tom@tromey.com>
7962
7963         * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
7964
7965 2018-03-27  Pedro Alves  <palves@redhat.com>
7966             Tom Tromey  <tom@tromey.com>
7967
7968         * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
7969         destructor.  Now a class.
7970         (gdb_readline_wrapper_cleanup): Remove function.
7971         (gdb_readline_wrapper): Remove cleanups.
7972
7973 2018-03-27  Tom Tromey  <tom@tromey.com>
7974
7975         * typeprint.h (struct type_print_options) <local_typedefs,
7976         global_typedefs>: Remove "struct" keyword.
7977         (class typedef_hash_table): New class.
7978         (recursively_update_typedef_hash, add_template_parameters)
7979         (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
7980         (find_typedef_in_hash): Don't declare.
7981         * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
7982         (typedef_hash_table::recursively_update): Rename from
7983         recursively_update_typedef_hash.  Now a member.
7984         (typedef_hash_table::add_template_parameters): Rename from
7985         add_template_parameters.  Now a member.
7986         (typedef_hash_table::typedef_hash_table): Now a constructor;
7987         rename from create_typedef_hash.
7988         (typedef_hash_table::~typedef_hash_table): Now a destructor;
7989         rename from free_typedef_hash.
7990         (do_free_typedef_hash, make_cleanup_free_typedef_hash)
7991         (do_free_global_table): Remove.
7992         (typedef_hash_table::typedef_hash_table): New constructor; renamed
7993         from copy_type_recursive.
7994         (create_global_typedef_table): Remove.
7995         (typedef_hash_table::find_global_typedef): Now a member of
7996         typedef_hash_table.
7997         (typedef_hash_table::find_typedef): Rename from
7998         find_typedef_in_hash; now a member.
7999         (whatis_exp): Update.
8000         * extension.h (struct ext_lang_type_printers): Add constructor and
8001         destructor.
8002         (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
8003         declare.
8004         * extension.c (ext_lang_type_printers::ext_lang_type_printers):
8005         Now a constructor; rename from start_ext_lang_type_printers.
8006         (ext_lang_type_printers): Now a destructor; rename from
8007         free_ext_lang_type_printers.
8008         * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
8009         Update.
8010         (c_type_print_base_struct_union): Update.  Remove cleanups.
8011
8012 2018-03-27  Tom Tromey  <tom@tromey.com>
8013
8014         * dwarf-index-write.c: Include <cmath>.
8015
8016 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
8017
8018         * NEWS: Add entry describing new "set|show varsize-limit" command.
8019         * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
8020         command.
8021         * printcmd.c (_initialize_printcmd): Add "set var" alias of
8022         "set variable".
8023
8024 2018-03-27  Simon Marchi  <simon.marchi@ericsson.com>
8025
8026         * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
8027         dwarf-index-write.c
8028         (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
8029         * dwarf-index-common.c: New file.
8030         * dwarf-index-common.h: New file.
8031         * dwarf-index-write.c: New file.
8032         * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
8033         (struct dwarf2_section_info): Move from here.
8034         (dwarf2_section_info_def): Likewise.
8035         (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
8036         (offset_type): Likewise.
8037         (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
8038         (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
8039         (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
8040         (byte_swap): Likewise.
8041         (MAYBE_SWAP): Likewise.
8042         (dwarf2_per_cu_ptr): Likewise.
8043         (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
8044         (struct tu_stats): Likewise.
8045         (struct dwarf2_per_objfile): Likewise.
8046         (struct dwarf2_per_cu_data): Likewise.
8047         (struct signatured_type): Likewise.
8048         (sig_type_ptr): Likewise.
8049         (DEF_VEC_P (sig_type_ptr)): Likewise.
8050         (INDEX4_SUFFIX): Likewise.
8051         (INDEX5_SUFFIX): Likewise.
8052         (DEBUG_STR_SUFFIX): Likewise.
8053         (dwarf2_read_section): Make non-static.
8054         (mapped_index_string_hash): Move from here.
8055         (dwarf5_djb_hash): Likewise.
8056         (file_write): Likewise.
8057         (class data_buf): Likewise.
8058         (struct symtab_index_entry): Likewise.
8059         (struct mapped_symtab): Likewise.
8060         (find_slot): Likewise.
8061         (hash_expand): Likewise.
8062         (add_index_entry): Likewise.
8063         (uniquify_cu_indices): Likewise.
8064         (class c_str_view): Likewise.
8065         (class c_str_view_hasher): Likewise.
8066         (class vector_hasher): Likewise.
8067         (write_hash_table): Likewise.
8068         (psym_index_map): Likewise.
8069         (struct addrmap_index_data): Likewise.
8070         (add_address_entry): Likewise.
8071         (add_address_entry_worker): Likewise.
8072         (write_address_map): Likewise.
8073         (symbol_kind): Likewise.
8074         (write_psymbols): Likewise.
8075         (struct signatured_type_index_data): Likewise.
8076         (write_one_signatured_type): Likewise.
8077         (recursively_count_psymbols): Likewise.
8078         (recursively_write_psymbols): Likewise.
8079         (class debug_names): Likewise.
8080         (check_dwarf64_offsets): Likewise.
8081         (psyms_seen_size): Likewise.
8082         (write_gdbindex): Likewise.
8083         (write_debug_names): Likewise.
8084         (assert_file_size): Likewise.
8085         (write_psymtabs_to_index): Likewise.
8086         (save_gdb_index_command): Likewise.
8087         (_initialize_dwarf2_read): Don't register the "save gdb-index"
8088         command.
8089         * dwarf2read.h: New file.
8090
8091 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
8092
8093         PR gdb/22670
8094         * dwarf2read.c (dwarf2_physname): Do not return the demangled
8095         symbol name if the CU's language stores symbol names in linkage
8096         format.
8097         * language.h (struct language_defn)
8098         <la_store_sym_names_in_linkage_form_p>: New field.  Adjust
8099         all instances of this struct.
8100
8101 2018-03-26  Tom Tromey  <tom@tromey.com>
8102
8103         * stack.c (backtrace_command_1): Remove verbose code.
8104
8105 2018-03-26  Tom Tromey  <tom@tromey.com>
8106
8107         * python/py-framefilter.c (py_print_type): Don't catch
8108         exceptions.  Return void.
8109         (py_print_value): Likewise.
8110         (py_print_single_arg): Likewise.
8111         (enumerate_args): Don't catch exceptions.
8112         (py_print_args): Likewise.
8113         (py_print_frame): Likewise.
8114         (gdbpy_apply_frame_filter): Catch exceptions here.
8115
8116 2018-03-26  Tom Tromey  <tom@tromey.com>
8117
8118         * stack.c (_initialize_stack): Remove trailing newlines from help
8119         text.  Add "Usage" line to "backtrace" help.
8120
8121 2018-03-26  Tom Tromey  <tom@tromey.com>
8122
8123         PR python/16486:
8124         * python/py-framefilter.c (py_print_args): Call wrap_hint.
8125
8126 2018-03-26  Tom Tromey  <tom@tromey.com>
8127
8128         * python/py-framefilter.c (py_print_single_arg): Return
8129         EXT_LANG_BT_ERROR from catch.
8130
8131 2018-03-26  Tom Tromey  <tom@tromey.com>
8132
8133         PR backtrace/15584:
8134         * stack.c (backtrace_command_1): Move some code into no-filters
8135         "if".
8136
8137 2018-03-26  Tom Tromey  <tom@tromey.com>
8138
8139         * python/py-framefilter.c (throw_quit_or_print_exception): New
8140         function.
8141         (gdbpy_apply_frame_filter): Use it.
8142
8143 2018-03-26  Tom Tromey  <tom@tromey.com>
8144
8145         PR cli/17716:
8146         * python/py-framefilter.c (py_print_type, py_print_value)
8147         (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
8148         RETURN_MASK_ERROR.
8149
8150 2018-03-26  Tom Tromey  <tom@tromey.com>
8151
8152         * python/py-framefilter.c (enumerate_args): Use
8153         gdb::unique_xmalloc_ptr.
8154
8155 2018-03-26  Tom Tromey  <tom@tromey.com>
8156
8157         * python/py-framefilter.c (py_print_frame): Return
8158         EXT_LANG_BT_OK.
8159         (gdbpy_apply_frame_filter): Update comment.
8160         * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
8161         Remove.
8162         <EXT_LANG_BT_NO_FILTERS>: Change value.
8163
8164 2018-03-26  Tom Tromey  <tom@tromey.com>
8165
8166         PR backtrace/15582:
8167         * stack.c (backtrace_command): Parse "hide" argument.
8168         * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
8169         * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
8170         constant.
8171
8172 2018-03-26  Tom Tromey  <tom@tromey.com>
8173
8174         * stack.c (backtrace_command_1): Remove "show_locals" parameter,
8175         add "flags".
8176         (backtrace_command): Remove "fulltrace", add "flags".
8177
8178 2018-03-26  Tom Tromey  <tom@tromey.com>
8179
8180         * stack.c (backtrace_command): Rewrite command line parsing.
8181
8182 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
8183
8184         * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
8185
8186 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
8187
8188         * filename-seen-cache.h: Add include guard.
8189
8190 2018-03-26  Keith Seitz  <keiths@redhat.com>
8191
8192         * symfile.c (place_section): Remove "struct" from section_addr_info
8193         in comment.
8194         * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
8195         "struct" keyword from section_addr_info.
8196
8197 2018-03-26  Alan Hayward  <alan.hayward@arm.com>
8198
8199         * regformats/regdef.h (reg): Add constructors.
8200
8201 2018-03-25  Pedro Alves  <palves@redhat.com>
8202
8203         * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
8204         if then/else bodies in var_func_name extraction.
8205
8206 2018-03-23  Weimin Pan  <weimin.pan@oracle.com>
8207
8208         * minsyms.c (lookup_minimal_symbol_and_objfile): Use
8209         lookup_minimal_symbol() to find symbol entry.
8210         * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
8211
8212 2018-03-23  Keith Seitz  <keiths@redhat.com>
8213
8214         PR c++/22968
8215         * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
8216         nested type definitions for C++, too.
8217
8218 2018-03-23  Tom Tromey  <tom@tromey.com>
8219
8220         * machoread.c (struct oso_el): Add a constructor.  Don't define as
8221         a typedef.
8222         (macho_register_oso): Remove.
8223         (macho_symtab_read): Take a std::vector.
8224         (oso_el_compare_name): Now a std::sort comparator.
8225         (macho_symfile_read_all_oso): Take a std::vector.
8226         (macho_symfile_read): Use std::vector.  Remove cleanups.
8227
8228 2018-03-22  Tom Tromey  <tom@tromey.com>
8229
8230         * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
8231         (record_full_goto_bookmark): Use std::string.
8232
8233 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8234
8235         PR tdep/18295
8236         * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
8237         a single mask.
8238
8239 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8240
8241         * rs6000-tdep.c (store_insn_p): New function.
8242         (skip_prologue): New variable alloca_reg_offset. Set lr_reg
8243         and cr_reg to their unshifted values. Use store_insn_p to
8244         match LR saves using either R1 or fdata->alloca_reg. Use
8245         store_insn_p to match CR saves. Set alloca_reg_offset
8246         when alloca_reg and framep are set. Remove lr_reg shift
8247         when assigning to fdata->lr_register.
8248
8249 2018-03-22  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8250
8251         * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
8252         command line args instead of emitting a warning.
8253
8254 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
8255
8256         * tracepoint.h (struct static_tracepoint_marker): Initialize
8257         fields, define default constructor, move constructor and move
8258         assignment, disable the rest.
8259         <str_id, extra>: Make std::string.
8260         (release_static_tracepoint_marker): Remove.
8261         (free_current_marker): Remove.
8262         * tracepoint.c (free_current_marker): Remove.
8263         (parse_static_tracepoint_marker_definition): Adjust to
8264         std::string, use new hex2str overload.
8265         (release_static_tracepoint_marker): Remove.
8266         (print_one_static_tracepoint_marker): Get marker by reference
8267         and adjust to std::string.
8268         (info_static_tracepoint_markers_command): Adjust to std::vector
8269         changes
8270         * target.h (static_tracepoint_marker_p): Remove typedef.
8271         (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
8272         (struct target_ops) <to_static_tracepoint_marker_at>: Return
8273         bool.
8274         <to_static_tracepoint_markers_by_strid>: Return std::vector.
8275         * target-debug.h
8276         (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
8277         (target_debug_print_std_vector_static_tracepoint_marker): New.
8278         (target_debug_print_struct_static_tracepoint_marker_p): Rename
8279         to...
8280         (target_debug_print_static_tracepoint_marker_p): ... this.
8281         * target-delegates.c: Re-generate.
8282         * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
8283         Make std::string.
8284         * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
8285         (decode_static_tracepoint_spec): Adjust to std::vector.
8286         (tracepoint_print_one_detail): Adjust to std::string.
8287         (strace_marker_decode_location): Adjust to std::string.
8288         (update_static_tracepoint): Adjust to std::string, remove call
8289         to release_static_tracepoint_marker.
8290         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
8291         Adjust to std::vector.
8292         * remote.c (remote_static_tracepoint_marker_at): Return bool.
8293         (remote_static_tracepoint_markers_by_strid): Adjust to
8294         std::vector.
8295         * common/rsp-low.h (hex2str): New overload with explicit count
8296         of bytes.
8297         * common/rsp-low.c (hex2str): New overload with explicit count
8298         of bytes.
8299         * unittests/rsp-low-selftests.c (test_hex2str): New function.
8300         (_initialize_rsp_low_selftests): Add test_hex2str test.
8301         * unittests/tracepoint-selftests.c
8302         (test_parse_static_tracepoint_marker_definition): Adjust to
8303         std::string.
8304
8305 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
8306
8307         * tracepoint.c (parse_static_tracepoint_marker_definition):
8308         Consider case where the definition is followed by more
8309         definitions.
8310         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8311         tracepoint-selftests.c.
8312         * unittests/tracepoint-selftests.c: New.
8313
8314 2018-03-21  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8315
8316         * MAINTAINERS (Write After Approval): Add Pedro Franco de
8317         Carvalho.
8318
8319 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
8320
8321         * symtab.c (find_pc_sect_line): fixed indentation.
8322
8323 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
8324
8325         * symtab.c (find_pc_sect_line): now uses binary search.
8326
8327 2018-03-19  Tom Tromey  <tom@tromey.com>
8328
8329         * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
8330         "IDENT" production.
8331
8332 2018-03-19  Pedro Alves  <palves@redhat.com>
8333             Tom Tromey  <tom@tromey.com>
8334
8335         * unittests/observable-selftests.c: New file.
8336         * common/observable.h: New file.
8337         * observable.h: New file.
8338         * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
8339         arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
8340         breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
8341         corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
8342         extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
8343         infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
8344         linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
8345         mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
8346         ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
8347         python/py-breakpoint.c, python/py-finishbreakpoint.c,
8348         python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
8349         record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
8350         riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
8351         spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
8352         symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
8353         tui/tui-interp.c, valops.c: Update all users.
8354         * tui/tui-hooks.c (tui_bp_created_observer)
8355         (tui_bp_deleted_observer, tui_bp_modified_observer)
8356         (tui_inferior_exit_observer, tui_before_prompt_observer)
8357         (tui_normal_stop_observer, tui_register_changed_observer):
8358         Remove.
8359         (tui_observers_token): New global.
8360         (attach_or_detach, tui_attach_detach_observers): New functions.
8361         (tui_install_hooks, tui_remove_hooks): Use
8362         tui_attach_detach_observers.
8363         * record-btrace.c (record_btrace_thread_observer): Remove.
8364         (record_btrace_thread_observer_token): New global.
8365         * observer.sh: Remove.
8366         * observer.c: Rename to observable.c.
8367         * observable.c (namespace gdb_observers): Define new objects.
8368         (observer_debug): Move into gdb_observers namespace.
8369         (struct observer, struct observer_list, xalloc_observer_list_node)
8370         (xfree_observer_list_node, generic_observer_attach)
8371         (generic_observer_detach, generic_observer_notify): Remove.
8372         (_initialize_observer): Update.
8373         Don't include observer.inc.
8374         * Makefile.in (generated_files): Remove observer.h, observer.inc.
8375         (clean mostlyclean): Likewise.
8376         (observer.h, observer.inc): Remove targets.
8377         (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
8378         (COMMON_SFILES): Use observable.c, not observer.c.
8379         * .gitignore: Remove observer.h.
8380
8381 2018-03-18  Tom Tromey  <tom@tromey.com>
8382
8383         * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
8384         gdb::def_vector.
8385         (bfd_lookup_symbol_from_dyn_symtab): Likewise.
8386
8387 2018-03-17  Tom Tromey  <tom@tromey.com>
8388
8389         * auto-load.c (auto_load_objfile_script_1): Use std::string.
8390
8391 2018-03-17  Tom Tromey  <tom@tromey.com>
8392
8393         * target.c (class scoped_target_fd): New.
8394         (target_fileio_close_cleanup): Remove.
8395         (target_fileio_read_alloc_1): Use scoped_target_fd.
8396
8397 2018-03-16  Simon Marchi  <simon.marchi@polymtl.ca>
8398
8399         * silent-rules.mk: New.
8400         * Makefile.in: Include silent-rules.mk
8401         (srcdir, VPATH, top_srcdir): Move up.
8402         (COMPILE): Add ECHO_CXX.
8403         (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
8404         (init.c): Add ECHO_INIT_C.
8405         (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
8406         (version.c): Add ECHO_GEN.
8407         (printcmd.o): Add ECHO_CXX.
8408         (target-float.o): Add ECHO_CXX.
8409         (ada-exp.o): Add ECHO_CXX.
8410         (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
8411         (insight$(EXEEXT)): Add ECHO_CXXLD.
8412         * gnulib/configure.ac: Add AM_SILENT_RULES.
8413         * gnulib/aclocal.m4: Re-generate.
8414         * gnulib/configure: Re-generate.
8415         * gnulib/import/Makefile.in: Re-generate.
8416
8417 2018-03-16  Tom Tromey  <tom@tromey.com>
8418
8419         * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
8420         * utils.h (make_cleanup_free_section_addr_info): Don't declare.
8421         * utils.c (do_free_section_addr_info)
8422         (make_cleanup_free_section_addr_info): Remove.
8423         * symfile.h (struct other_sections): Add constructor.
8424         (struct section_addr_info): Remove.
8425         (section_addr_info): New typedef.
8426         (struct sym_fns) <sym_offsets>: Change type of parameter.
8427         (build_section_addr_info_from_objfile)
8428         (relative_addr_info_to_section_offsets, addr_info_make_relative)
8429         (default_symfile_offsets, symbol_file_add)
8430         (symbol_file_add_from_bfd)
8431         (build_section_addr_info_from_section_table): Update.
8432         (alloc_section_addr_info, free_section_addr_info): Don't declare.
8433         * symfile.c (alloc_section_addr_info): Remove.
8434         (build_section_addr_info_from_section_table): Change return type.
8435         Update.
8436         (build_section_addr_info_from_bfd)
8437         (build_section_addr_info_from_objfile): Likewise.
8438         (free_section_addr_info): Remove.
8439         (relative_addr_info_to_section_offsets): Change type of "addrs".
8440         (addrs_section_compar): Now a std::sort comparator.
8441         (addrs_section_sort): Change return type.
8442         (addr_info_make_relative): Change type of "addrs".  Update.
8443         (default_symfile_offsets, syms_from_objfile_1)
8444         (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
8445         (symbol_file_add_separate): Update.
8446         (symbol_file_add): Change type of "addrs".  Update.
8447         (add_symbol_file_command): Update.  Remove cleanups.
8448         * symfile-mem.c (symbol_file_add_from_memory): Update.  Remove
8449         cleanups.
8450         * symfile-debug.c (debug_sym_offsets): Change type of "info".
8451         * solib.c (solib_read_symbols): Update.
8452         * objfiles.c (objfile_relocate): Update.  Remove cleanups.
8453         * machoread.c (macho_symfile_offsets): Update.
8454         * jit.c (jit_bfd_try_read_symtab): Update.
8455
8456 2018-03-15  Simon Marchi  <simon.marchi@polymtl.ca>
8457
8458         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8459         unittests/utils-selftests.c.
8460         * unittests/utils-selftests.c: New file.
8461
8462 2018-03-14  Tom Tromey  <tom@tromey.com>
8463
8464         PR cli/14977:
8465         * printcmd.c (printf_c_string, printf_wide_c_string): Special case
8466         for NULL.
8467
8468 2018-03-14  Tom Tromey  <tom@tromey.com>
8469
8470         PR cli/19918:
8471         * printcmd.c (printf_pointer): Allow "-" in format.
8472
8473 2018-03-14  Tom Tromey  <tom@tromey.com>
8474
8475         * printcmd.c (_initialize_printcmd): Add usage to printf.
8476
8477 2018-03-14  Yao Qi  <qiyao@sourceware.org>
8478
8479         * MAINTAINERS: Update my email address.
8480
8481 2018-03-13  Tom Tromey  <tom@tromey.com>
8482
8483         * machoread.c (macho_check_dsym): Change filenamep to a
8484         std::string*.
8485         (macho_symfile_read): Update.
8486         * symfile.c (load_command): Use std::string.
8487
8488 2018-03-12  Andrew Burgess  <andrew.burgess@embecosm.com>
8489
8490         * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
8491         to error message string.
8492         (riscv_register_name): Use xsnprintf instead of sprintf.
8493         (riscv_insn::fetch_instruction): Use gdb_assert instead of
8494         internal_error.
8495         (riscv_print_arg_location): Use gdb_assert_not_reached instead of
8496         error.
8497         (riscv_push_dummy_call): Likewise.
8498
8499 2018-03-12  Tom Tromey  <tom@tromey.com>
8500
8501         * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
8502         Use gdb::byte_vector.
8503         * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
8504
8505 2018-03-12  Yao Qi  <yao.qi@linaro.org>
8506
8507         * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
8508         parameter type to readable_regcache.
8509         * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
8510         the declaration.
8511
8512 2018-03-11  Tom Tromey  <tom@tromey.com>
8513
8514         * dwarf2read.c (struct nextfield): Add initializers.
8515         (struct nextfnfield): Remove.
8516         (struct fnfieldlist): Add initializers.  Remove "length" and
8517         "head", use std::vector.
8518         (struct decl_field_list): Remove.
8519         (struct field_info): Add initializers.
8520         <fields, baseclasses>: Now std::vector.
8521         <nbaseclasses, nfnfields, typedef_field_list_count,
8522         nested_types_list_count>: Remove.
8523         (dwarf2_add_field, dwarf2_add_type_defn)
8524         (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
8525         (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
8526         (process_structure_scope): Update.
8527
8528 2018-03-11  Tom Tromey  <tom@tromey.com>
8529
8530         * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
8531         for use by std::sort.
8532         (build_type_psymtabs_1): Use std::vector.
8533
8534 2018-03-09  Eli Zaretskii  <eliz@gnu.org>
8535
8536         * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
8537         and LIBMPFR in the printed configuration.
8538
8539 2018-03-08  Tom Tromey  <tom@tromey.com>
8540
8541         * source.c (get_filename_and_charpos): Use scoped_fd.
8542         * nto-procfs.c (procfs_open_1): Use scoped_fd.
8543         (procfs_pidlist): Likewise.
8544         * procfs.c (proc_get_LDT_entry): Use scoped_fd.
8545         (iterate_over_mappings): Likewise.
8546
8547 2018-03-08  Tom Tromey  <tom@tromey.com>
8548
8549         * infcall.c (struct call_return_meta_info)
8550         <stack_temporaries_enabled>: Remove.
8551         (get_call_return_value, call_function_by_hand_dummy): Update.
8552         * thread.c (disable_thread_stack_temporaries): Remove.
8553         (enable_thread_stack_temporaries): Remove.
8554         (thread_stack_temporaries_enabled_p): Return bool.
8555         (push_thread_stack_temporary, value_in_thread_stack_temporaries)
8556         (get_last_thread_stack_temporary): Update.
8557         * eval.c (evaluate_subexp): Update.
8558         * gdbthread.h (class enable_thread_stack_temporaries): Now a
8559         class, not a function.
8560         (value_ptr, value_vec): Remove typedefs.
8561         (class thread_info) <stack_temporaries_enabled>: Now bool.
8562         <stack_temporaries>: Now a std::vector.
8563         (thread_stack_temporaries_enabled_p)
8564         (value_in_thread_stack_temporaries): Return bool.
8565
8566 2018-03-08  Simon Marchi  <simon.marchi@ericsson.com>
8567
8568         * remote.c (putpkt_binary): Fix omitted bytes reporting.
8569         (getpkt_or_notif_sane_1): Likewise.
8570
8571 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
8572
8573         * build-id.c (build_id_to_debug_bfd): Use std::string.
8574
8575 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
8576
8577         * build-id.c (find_separate_debug_file_by_buildid): Return
8578         std::string.
8579         * build-id.h (find_separate_debug_file_by_buildid): Return
8580         std::string.
8581         * coffread.c (coff_symfile_read): Adjust to std::string.
8582         * elfread.c (elf_symfile_read): Adjust to std::string.
8583         * symfile.c (separate_debug_file_exists): Change parameter to
8584         std::string.
8585         (find_separate_debug_file): Return std::string.
8586         (find_separate_debug_file_by_debuglink): Return std::string.
8587         * symfile.h (find_separate_debug_file_by_debuglink): Return
8588         std::string.
8589
8590 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
8591
8592         * common/xml-utils.c (xml_escape_text): Move code to...
8593         (xml_escape_text_append): ... this new function.
8594         * common/xml-utils.h (xml_escape_text_append): New declaration.
8595         * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
8596         New function.
8597         (_initialize_xml_utils): register test_xml_escape_text_append as
8598         a selftest.
8599
8600 2018-03-07  Alan Hayward  <alan.hayward@arm.com>
8601
8602         * defs.h: Remove MAX_REGISTER_SIZE.
8603         * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
8604         asserts.
8605         * python/py-unwind.c (pyuw_sniffer): Likewise.
8606
8607 2018-03-07  Tom Tromey  <tom@tromey.com>
8608
8609         * linux-tdep.c (linux_info_proc): Update.
8610         * target.h (struct target_ops) <to_fileio_readlink>: Return
8611         optional<string>.
8612         (target_fileio_readlink): Return optional<string>.
8613         * remote.c (remote_hostio_readlink): Return optional<string>.
8614         * inf-child.c (inf_child_fileio_readlink): Return
8615         optional<string>.
8616         * target.c (target_fileio_readlink): Return optional<string>.
8617
8618 2018-03-07  Andrew Burgess  <andrew.burgess@embecosm.com>
8619
8620         * regcache.c (cooked_read_test): Add riscv to the list of
8621         architectures that have a save_reggroup.
8622
8623 2018-03-07  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8624
8625         * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
8626         value is not a dynamic class object.
8627
8628 2018-03-06  Tom Tromey  <tom@tromey.com>
8629
8630         * rust-exp.y: Formatting fixes.
8631
8632 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
8633
8634         * riscv-tdep.c (riscv_register_name): Remove target description
8635         support.
8636         (riscv_gdbarch_init): Remove target description check.
8637
8638 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
8639
8640         * riscv-tdep.c: Remove 'Contributed by ...' lines from header
8641         comment.
8642         * riscv-tdep.h: Likewise.
8643
8644 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
8645
8646         * riscv-tdep.c (riscv_pseudo_register_read): Delete.
8647         (riscv_pseudo_register_write): Delete.
8648         (riscv_gdbarch_init): Remove all use of pseudo registers.
8649
8650 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
8651
8652         * record-btrace.c (btrace_print_lines): Replace cleanup
8653         parameter with RAII equivalents.
8654         (btrace_insn_history): Replace cleanup with RAII equivalents.
8655         * ui-out.h (make_cleanup_ui_out_list_begin_end,
8656         make_cleanup_ui_out_tuple_begin_end): Remove.
8657         * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
8658         make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
8659         make_cleanup_ui_out_list_begin_end): Remove.
8660
8661 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
8662
8663         * record-btrace.c (record_btrace_maybe_mark_async_event): Change
8664         parameter types to std::vector.  Use bool.
8665         (record_btrace_wait): Replace VEC(tp_t) with
8666         std::vector<thread_info *>.
8667         * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
8668
8669 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
8670
8671         * record-btrace.c (record_btrace_disable_callback): Remove.
8672         (struct scoped_btrace_disable): New.
8673         (record_btrace_open): Use scoped_btrace_disable.
8674
8675 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
8676
8677         * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
8678         reading values from registers.
8679
8680 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
8681
8682         * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
8683         where appropriate.
8684
8685 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
8686
8687         * riscv-tdep.c (riscv_print_arg_location): Add header comment,
8688         change parameter type.  Use GDB's print functions, and use
8689         core_addr_to_string where appropriate.
8690         (riscv_push_dummy_call): Use core_addr_to_string where
8691         appropriate, update call to riscv_print_arg_location, and reindent
8692         a few lines.
8693         (riscv_return_value): Update call to riscv_print_arg_location.
8694
8695 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
8696             Tim Newsome <tim@sifive.com>
8697             Albert Ou <a0u@eecs.berkeley.edu>
8698             Darius Rad <darius@bluespec.com>
8699
8700         * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
8701         (HFILES_NO_SRCDIR): Add riscv-tdep.h.
8702         (ALLDEPFILES): Add riscv-tdep.c
8703         * configure.tgt: Add riscv support.
8704         * riscv-tdep.c: New file.
8705         * riscv-tdep.h: New file.
8706         * NEWS: Mention new target.
8707         * MAINTAINERS: Add entry for riscv.
8708
8709 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
8710
8711         * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
8712         fields within aggregates.
8713
8714 2018-03-04  Simon Marchi  <simon.marchi@polymtl.ca>
8715
8716         * record-btrace.c (btrace_print_lines): Change type of flags to
8717         gdb_disassembly_flags.
8718
8719 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
8720
8721         * fbsd-nat.c: Include "inf-ptrace.h".
8722         (USE_SIGTRAP_SIGINFO): Conditionally define.
8723         [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
8724         (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
8725         [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
8726         function.
8727         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
8728         Likewise.
8729         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
8730         Likewise.
8731         (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
8732         "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
8733         "supports_stopped_by_hw_breakpoint" target methods.
8734
8735 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
8736
8737         * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
8738         * fbsd-nat.c (debug_fbsd_nat): New variable.
8739         (show_fbsd_nat_debug): New function.
8740         (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
8741         (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
8742
8743 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
8744
8745         * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
8746         * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
8747         prototype.
8748         * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
8749         (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
8750         method.
8751
8752 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
8753
8754         * common/gdb_vecs.c (free_char_ptr_vec): Remove.
8755         * common/gdb_vecs.h (free_char_ptr_vec): Remove.
8756
8757 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
8758
8759         * charset.c (struct charset_vector): New.
8760         (charsets): Change type to charset_vector.
8761         (find_charset_names): Adjust.
8762         (add_one): Adjust.
8763         (_initialize_charset): Adjust.
8764
8765 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
8766
8767         * progspace.h (struct program_space) <deleted_solibs>: Change
8768         type to std::vector<std::string>.
8769         * progspace.c (clear_program_space_solib_cache): Adjust.
8770         * breakpoint.c (print_solib_event): Adjust.
8771         (check_status_catch_solib): Adjust.
8772         * solib.c (update_solib_list): Adjust.
8773         * ui-out.h (class ui_out) <field_string>: New overload.
8774         * ui-out.c (ui_out::field_string): New overload.
8775
8776 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
8777
8778         * progspace.h (struct program_space): Add constructor and
8779         destructor, initialize fields.
8780         (add_program_space): Remove.
8781         * progspace.c (add_program_space): Rename to...
8782         (program_space::program_space): ... this.
8783         (release_program_space): Rename to...
8784         (program_space::~program_space): ... this.
8785         (delete_program_space): Use delete to delete program_space.
8786         (initialize_progspace): Use new to allocate program_space.
8787         * inferior.c (add_inferior_with_spaces): Likewise.
8788         (clone_inferior_command): Likewise.
8789         * infrun.c (follow_fork_inferior): Likewise.
8790         (handle_vfork_child_exec_or_exit): Likewise.
8791
8792 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
8793
8794         * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
8795         (delim_string_to_char_ptr_vec): Return std::vector of
8796         gdb::unique_xmalloc_ptr.
8797         (dirnames_to_char_ptr_vec_append): Take std::vector of
8798         gdb::unique_xmalloc_ptr.
8799         (dirnames_to_char_ptr_vec): Return std::vector of
8800         gdb::unique_xmalloc_ptr.
8801         * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
8802         Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
8803         (delim_string_to_char_ptr_vec): Return an std::vector of
8804         gdb::unique_xmalloc_ptr, adjust the code.
8805         (dirnames_to_char_ptr_vec_append): Take an std::vector of
8806         gdb::unique_xmalloc_ptr, adjust the code.
8807         (dirnames_to_char_ptr_vec): Return an std::vector of
8808         gdb::unique_xmalloc_ptr, adjust the code.
8809         * auto-load.c (auto_load_safe_path_vec): Change type to
8810         std::vector of gdb::unique_xmalloc_ptr.
8811         (auto_load_expand_dir_vars): Return an std::vector of
8812         gdb::unique_xmalloc_ptr, adjust the code.
8813         (auto_load_safe_path_vec_update): Adjust.
8814         (filename_is_in_auto_load_safe_path_vec): Adjust.
8815         (auto_load_objfile_script_1): Adjust.
8816         * build-id.c (build_id_to_debug_bfd): Adjust.
8817         * linux-thread-db.c (thread_db_load_search): Adjust.
8818         * source.c (add_path): Adjust.
8819         (openp): Adjust.
8820         * symfile.c (find_separate_debug_file): Adjust.
8821         * utils.c (do_free_char_ptr_vec): Remove.
8822         (make_cleanup_free_char_ptr_vec): Remove.
8823
8824 2018-03-01  Sergio Durigan Junior  <sergiodj@redhat.com>
8825
8826         PR gdb/22907
8827         * common/pathstuff.c: Conditionally include "<windows.h>".
8828
8829 2018-03-01  Georg Sauthoff  <mail@georg.so>
8830
8831         PR gdb/22888
8832         * gcore.in: Quote variables and switch interpreter to bash.
8833
8834 2018-03-01  Tom Tromey  <tom@tromey.com>
8835
8836         * dwarf2read.c (alloc_discriminant_info): Fix default_index
8837         assertion.  Add assertion for discriminant_index.
8838         (quirk_rust_enum): Use correct base type name in univariant case.
8839
8840 2018-03-01  Simon Marchi  <simon.marchi@ericsson.com>
8841
8842         * record.c (get_call_history_modifiers): Return a
8843         record_print_flags.
8844         (cmd_record_call_history): Adjust.
8845         * record-btrace.c (record_btrace_call_history): Adjust.
8846         (record_btrace_call_history_range): Adjust.
8847         (record_btrace_call_history_from): Adjust.
8848         * target-debug.h (target_debug_print_record_print_flags): New.
8849         * target-delegates.c: Re-generate.
8850         * target.c (target_call_history): Change flags type.
8851         (target_call_history_from): Likewise.
8852         (target_call_history_range): Likewise.
8853         * target.h (struct target_ops) <target_call_history>: Likewise.
8854         (target_call_history_from): Likewise.
8855         (target_call_history_range): Likewise.
8856
8857 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
8858             Simon Marchi  <simon.marchi@polymtl.ca>
8859
8860         * common/common-utils.c: Include "sys/stat.h".
8861         (is_regular_file): Move here from "source.c"; change return
8862         type to "bool".
8863         * common/common-utils.h (is_regular_file): New prototype.
8864         * common/pathstuff.c (contains_dir_separator): New function.
8865         * common/pathstuff.h (contains_dir_separator): New prototype.
8866         * source.c: Don't include "sys/stat.h".
8867         (is_regular_file): Move to "common/common-utils.c".
8868
8869 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
8870
8871         * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
8872         (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
8873         * auto-load.c: Include "common/pathstuff.h".
8874         * common/common-def.h (current_directory): Move here.
8875         * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
8876         function.
8877         * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
8878         prototype.
8879         * common/pathstuff.c: New file.
8880         * common/pathstuff.h: New file.
8881         * compile/compile.c: Include "common/pathstuff.h".
8882         * defs.h (current_directory): Move to "common/common-defs.h".
8883         * dwarf2read.c: Include "common/pathstuff.h".
8884         * exec.c: Likewise.
8885         * guile/scm-safe-call.c: Likewise.
8886         * linux-thread-db.c: Likewise.
8887         * main.c: Likewise.
8888         * nto-tdep.c: Likewise.
8889         * objfiles.c: Likewise.
8890         * source.c: Likewise.
8891         * symtab.c: Likewise.
8892         * utils.c: Include "common/pathstuff.h".
8893         (gdb_realpath): Move to "common/pathstuff.c".
8894         (gdb_realpath_keepfile): Likewise.
8895         (gdb_abspath): Likewise.
8896         * utils.h (gdb_realpath): Move to "common/pathstuff.h".
8897         (gdb_realpath_keepfile): Likewise.
8898         (gdb_abspath): Likewise.
8899
8900 2018-02-28  John Baldwin  <jhb@FreeBSD.org>
8901
8902         * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
8903         wildcard process pid for super_resume for kernels with a
8904         specific bug.
8905
8906 2018-02-27  Phil Muldoon  <pmuldoon@redhat.com>
8907
8908         * compile/compile.c (get_args): Add additional comments
8909         explaining function.
8910
8911 2018-02-27  Simon Marchi  <simon.marchi@polymtl.ca>
8912             Tom Tromey  <tom@tromey.com>
8913
8914         * target.h (memory_write_request_s): Remove typedef.  Don't define
8915         VEC.
8916         (target_write_memory_blocks): Change argument to std::vector.
8917         (struct memory_write_request): Add constructor.
8918         * target-memory.c (compare_block_starting_address): Return bool.
8919         Change argument types.
8920         (claim_memory): Change arguments to use std::vector.
8921         (split_regular_and_flash_blocks, blocks_to_erase)
8922         (compute_garbled_blocks): Likewise.
8923         (cleanup_request_data, cleanup_write_requests_vector): Remove.
8924         (target_write_memory_blocks): Change argument to std::vector.
8925         * symfile.c (struct load_section_data): Add constructor and
8926         destructor.  Use std::vector for "requests".
8927         (struct load_progress_data): Add initializers.
8928         (load_section_callback): Update.  Use "new".
8929         (clear_memory_write_data): Remove.
8930         (generic_load): Update.
8931
8932 2018-02-27  Alan Hayward  <alan.hayward@arm.com>
8933
8934         * arch/aarch64.h: Use common/tdesc.h.
8935
8936 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
8937
8938         * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
8939         architecture with a 64-bit ABI.
8940
8941 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
8942
8943         * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
8944         ahead of target description loading.
8945
8946 2018-02-26  Tom Tromey  <tom@tromey.com>
8947
8948         * stack.c (backtrace_command_1): Update.
8949         * python/python-internal.h (gdbpy_apply_frame_filter): Change type
8950         of "flags".
8951         * python/py-framefilter.c (py_print_frame)
8952         (gdbpy_apply_frame_filter): Change type of "flags".
8953         * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
8954         of "flags".
8955         (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
8956         (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
8957         * extension.h (enum frame_filter_flag): Rename from
8958         frame_filter_flags.
8959         (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
8960         (apply_ext_lang_frame_filter): Change type of "flags".
8961         * extension.c (apply_ext_lang_frame_filter): Change type of
8962         "flags".
8963         * extension-priv.h (struct extension_language_ops)
8964         <apply_frame_filter>: Change type of "flags".
8965
8966 2018-02-26  Tom Tromey  <tom@tromey.com>
8967
8968         PR python/16497:
8969         * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag.  Fix
8970         off-by-one in py_end computation.
8971         * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
8972         PRINT_MORE_FRAMES.
8973         * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
8974         constant.
8975
8976 2018-02-26  Tom Tromey  <tom@tromey.com>
8977
8978         * dwarf2read.c (struct variant_field): New.
8979         (struct nextfield) <variant>: New field.
8980         (dwarf2_add_field): Handle DW_TAG_variant_part.
8981         (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
8982         discriminated union.
8983         (read_structure_type): Handle DW_TAG_variant_part.
8984         (handle_struct_member_die): New function, extracted from
8985         process_structure_scope.  Handle DW_TAG_variant.
8986         (process_structure_scope): Handle discriminated unions.  Call
8987         handle_struct_member_die.
8988
8989 2018-02-26  Tom Tromey  <tom@tromey.com>
8990
8991         * rust-lang.h (rust_last_path_segment): Declare.
8992         * rust-lang.c (rust_last_path_segment): Now public.  Change
8993         contract.
8994         (struct disr_info): Remove.
8995         (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
8996         (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
8997         (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
8998         (rust_enum_p, rust_enum_variant): New function.
8999         (rust_underscore_fields): Remove "offset" parameter.
9000         (rust_print_enum): New function.
9001         (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
9002         <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
9003         (rust_print_struct_def): Add "for_rust_enum" parameter.  Handle
9004         enums.
9005         (rust_internal_print_type): New function, from rust_print_type.
9006         Remove enum code.
9007         (rust_print_type): Call rust_internal_print_type.
9008         (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
9009         Update enum handling.
9010         * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
9011         (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
9012         (rust_union_quirks): New functions.
9013         (process_full_comp_unit, process_full_type_unit): Call
9014         rust_union_quirks.
9015         (process_structure_scope): Update rust_unions if necessary.
9016
9017 2018-02-26  Tom Tromey  <tom@tromey.com>
9018
9019         * value.h (value_union_variant): Declare.
9020         * valops.c (value_union_variant): New function.
9021         * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
9022         (struct discriminant_info): New.
9023         (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
9024         enumerator.
9025         (struct main_type) <flag_discriminated_union>: New field.
9026
9027 2018-02-26  Tom Tromey  <tom@tromey.com>
9028
9029         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9030         unittests/unpack-selftests.c.
9031         * unittests/unpack-selftests.c: New file.
9032         * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
9033
9034 2018-02-26  Yao Qi  <yao.qi@linaro.org>
9035
9036         * dwarf2read.c (struct partial_die_info) <read>: New method.
9037         (read_partial_die): Remove the declaration.
9038         (load_partial_dies): Update.
9039         (partial_die_info::partial_die_info):
9040         (read_partial_die): Change it to partial_die_info::read.
9041
9042 2018-02-26  Yao Qi  <yao.qi@linaro.org>
9043
9044         * dwarf2read.c (struct partial_die_info) <fixup>: New method.
9045         (fixup_partial_die): Remove declaration.
9046         (scan_partial_symbols): Update.
9047         (partial_die_parent_scope): Likewise.
9048         (partial_die_full_name): Likewise.
9049         (fixup_partial_die): Change it to partial_die_info::fixup.
9050
9051 2018-02-26  Yao Qi  <yao.qi@linaro.org>
9052
9053         * dwarf2read.c (read_partial_die): Update the declaration.
9054         (load_partial_dies): Caller update.
9055         (read_partial_die): Remove one argument abbrev_len.
9056
9057 2018-02-26  Yao Qi  <yao.qi@linaro.org>
9058
9059         * dwarf2read.c (struct partial_die_info): Add ctor, delete
9060         assignment operator.
9061         (load_partial_dies): Use ctor and copy ctor.
9062         (read_partial_die): Update.
9063         (dwarf2_cu::find_partial_die): Use ctor.
9064
9065 2018-02-26  Yao Qi  <yao.qi@linaro.org>
9066
9067         * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
9068         (find_partial_die_in_comp_unit): Change it to
9069         dwarf2_cu::find_partial_die.
9070         (find_partial_die): Update.
9071
9072 2018-02-26  Yao Qi  <yao.qi@linaro.org>
9073
9074         * dwarf2read.c (read_partial_die): Remove the code checking abbrev
9075         is NULL.
9076
9077 2018-02-26  Yao Qi  <yao.qi@linaro.org>
9078
9079         * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
9080
9081 2018-02-26  Alan Hayward  <alan.hayward@arm.com>
9082
9083         * arch/amd64.h: Use common/tdesc.h.
9084         * arch/i386.c: Likewise.
9085         * arch/i386.h: Likewise.
9086         * arch/tic6x.c: Likewise.
9087         * arch/tdesc.h: Move file from here...
9088         * common/tdesc.h: ...to here.
9089         * features/aarch64-core.c: Regenerate.
9090         * features/aarch64-fpu.c: Regenerate.
9091         * features/i386/32bit-avx.c: Regenerate.
9092         * features/i386/32bit-avx512.c: Regenerate.
9093         * features/i386/32bit-core.c: Regenerate.
9094         * features/i386/32bit-linux.c: Regenerate.
9095         * features/i386/32bit-mpx.c: Regenerate.
9096         * features/i386/32bit-pkeys.c: Regenerate.
9097         * features/i386/32bit-sse.c: Regenerate.
9098         * features/i386/64bit-avx.c: Regenerate.
9099         * features/i386/64bit-avx512.c: Regenerate.
9100         * features/i386/64bit-core.c: Regenerate.
9101         * features/i386/64bit-linux.c: Regenerate.
9102         * features/i386/64bit-mpx.c: Regenerate.
9103         * features/i386/64bit-pkeys.c: Regenerate.
9104         * features/i386/64bit-segments.c: Regenerate.
9105         * features/i386/64bit-sse.c: Regenerate.
9106         * features/i386/x32-core.c: Regenerate.
9107         * features/tic6x-c6xp.c: Regenerate.
9108         * features/tic6x-core.c: Regenerate.
9109         * features/tic6x-gp.c: Regenerate.
9110         * target-descriptions.c: Use common/tdesc.h.
9111         * target-descriptions.h: Likewise.
9112
9113 2018-02-24  Tom Tromey  <tom@tromey.com>
9114
9115         * linux-thread-db.c (try_thread_db_load_from_pdir_1)
9116         (try_thread_db_load_from_dir, thread_db_load_search): Use
9117         std::string.
9118         (info_auto_load_libthread_db_compare): Return bool.  Change
9119         argument types.
9120         (info_auto_load_libthread_db): Use std::vector, std::string.
9121         Remove cleanups.
9122
9123 2018-02-24  Tom Tromey  <tom@tromey.com>
9124
9125         * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
9126         std::string.
9127         * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
9128         std::string*.
9129         * gdbarch.c: Rebuild.
9130         * gdbarch.h: Rebuild.
9131         * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
9132         * arch-utils.h (default_fast_tracepoint_valid_at): Update.
9133         * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
9134         std::string*.
9135
9136 2018-02-23  Simon Marchi  <simon.marchi@polymtl.ca>
9137
9138         * gdbtypes.h (sect_offset): Change type to uint64_t.
9139         (sect_offset_str): New function.
9140         * dwarf2read.c (create_addrmap_from_aranges): Use
9141         sect_offset_str.
9142         (error_check_comp_unit_head): Likewise.
9143         (create_debug_type_hash_table): Likewise.
9144         (read_cutu_die_from_dwo): Likewise.
9145         (init_cutu_and_read_dies): Likewise.
9146         (init_cutu_and_read_dies_no_follow): Likewise.
9147         (process_psymtab_comp_unit_reader): Likewise.
9148         (partial_die_parent_scope): Likewise.
9149         (peek_die_abbrev): Likewise.
9150         (process_queue): Likewise.
9151         (dwarf2_physname): Likewise.
9152         (read_namespace_alias): Likewise.
9153         (read_import_statement): Likewise.
9154         (create_dwo_cu_reader): Likewise.
9155         (create_cus_hash_table): Likewise.
9156         (lookup_dwo_cutu): Likewise.
9157         (inherit_abstract_dies): Likewise.
9158         (read_func_scope): Likewise.
9159         (read_call_site_scope): Likewise.
9160         (dwarf2_add_member_fn): Likewise.
9161         (read_common_block): Likewise.
9162         (read_module_type): Likewise.
9163         (read_typedef): Likewise.
9164         (read_subrange_type): Likewise.
9165         (load_partial_dies): Likewise.
9166         (read_partial_die): Likewise.
9167         (find_partial_die): Likewise.
9168         (read_str_index): Likewise.
9169         (dwarf2_string_attr): Likewise.
9170         (build_error_marker_type): Likewise.
9171         (lookup_die_type): Likewise.
9172         (dump_die_shallow): Likewise.
9173         (follow_die_ref): Likewise.
9174         (dwarf2_fetch_die_loc_sect_off): Likewise.
9175         (dwarf2_fetch_constant_bytes): Likewise.
9176         (follow_die_sig): Likewise.
9177         (get_signatured_type): Likewise.
9178         (get_DW_AT_signature_type): Likewise.
9179         (dwarf2_find_containing_comp_unit): Likewise.
9180         (set_die_type): Likewise.
9181
9182 2018-02-21  John Baldwin  <jhb@FreeBSD.org>
9183
9184         * arch/aarch64.c: Include "common-defs.h".
9185         * arch/amd64.c: Likewise.
9186         * arch/i386.c: Likewise.
9187
9188 2018-02-21  Tom Tromey  <tom@tromey.com>
9189
9190         * value.h: (extract_field_op): Update.
9191         * eval.c (extract_field_op): Return a const char *.
9192         * expression.h (parse_expression_for_completion): Update.
9193         * completer.c (complete_expression): Update.
9194         (add_struct_fields): Make fieldname const.
9195         * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
9196         (mark_completion_tag, parse_exp_in_context_1): Update.
9197         (parse_expression_for_completion): Change "name" to
9198         unique_xmalloc_ptr*.
9199
9200 2018-02-21  Tom Tromey  <tom@tromey.com>
9201
9202         * infcall.c (call_function_by_hand_dummy): Use std::vector.
9203
9204 2018-02-21  Yao Qi  <yao.qi@linaro.org>
9205
9206         * avr-tdep.c (avr_read_pc): Change parameter type to
9207         readable_regcache.
9208         * gdbarch.sh (read_pc): Likewise.
9209         * gdbarch.c: Re-generated.
9210         * gdbarch.h: Re-generated.
9211         * hppa-tdep.c (hppa_read_pc): Change parameter type to
9212         readable_regcache.
9213         * ia64-tdep.c (ia64_read_pc): Likewise.
9214         * mips-tdep.c (mips_read_pc): Likewise.
9215         * spu-tdep.c (spu_read_pc): Likewise.
9216
9217 2018-02-21  Yao Qi  <yao.qi@linaro.org>
9218
9219         * Makefile.in (COMMON_SFILES): Add regcache-dump.c
9220         * regcache-dump.c: New file.
9221         * regcache.c: Move register_dump to regcache-dump.c.
9222         (maintenance_print_registers): Likewise.
9223         (maintenance_print_raw_registers): Likewise.
9224         (maintenance_print_cooked_registers): Likewise.
9225         (maintenance_print_register_groups): Likewise.
9226         (maintenance_print_remote_registers): Likewise.
9227         (_initialize_regcache): Likewise.
9228         * regcache.h (register_dump): Moved from regcache.c.
9229
9230 2018-02-21  Yao Qi  <yao.qi@linaro.org>
9231
9232         * regcache.c (regcache::regcache): Update.
9233         (regcache::invalidate): Move it to detached_regcache::invalidate.
9234         (get_thread_arch_aspace_regcache): Update.
9235         (regcache::raw_update): Update.
9236         (regcache::cooked_read): Remove some code.
9237         (regcache::cooked_read_value): Likewise.
9238         (regcache::raw_write): Remove assert on m_readonly_p.
9239         (regcache::raw_supply_integer): Move it to
9240         detached_regcache::raw_supply_integer.
9241         (regcache::raw_supply_zeroed): Likewise.
9242         * regcache.h (detached_regcache) <raw_supply_integer>: New
9243         declaration.
9244         <raw_supply_zeroed, invalidate>: Likewise.
9245         (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
9246         <invalidate>: Likewise.
9247         <m_readonly_p>: Removed.
9248
9249 2018-02-21  Yao Qi  <yao.qi@linaro.org>
9250
9251         * infcmd.c (get_return_value): Let stop_regs point to
9252         get_current_regcache.
9253         * regcache.c (regcache::regcache): Remove.
9254         (register_dump_reg_buffer): New class.
9255         (regcache_print): Adjust.
9256         * regcache.h (regcache): Remove constructors.
9257
9258 2018-02-21  Yao Qi  <yao.qi@linaro.org>
9259
9260         * regcache.c (class register_dump): New class.
9261         (register_dump_regcache, register_dump_none): New class.
9262         (register_dump_remote, register_dump_groups): New class.
9263         (regcache_print): Update.
9264         * regcache.h (regcache_dump_what): Move it to regcache.c.
9265         (regcache) <dump>: Remove.
9266
9267 2018-02-21  Yao Qi  <yao.qi@linaro.org>
9268
9269         * jit.c (struct jit_unwind_private) <regcache>: Change its type to
9270          reg_buffer_rw *.
9271         (jit_unwind_reg_set_impl): Call raw_supply.
9272         (jit_frame_sniffer): Use reg_buffer_rw.
9273         * record-full.c (record_full_core_regbuf): Change its type.
9274         (record_full_core_open_1): Use reg_buffer_rw.
9275         (record_full_close): Likewise.
9276         (record_full_core_fetch_registers): Use regcache->raw_supply.
9277         (record_full_core_store_registers): Likewise.
9278         * regcache.c (regcache::get_register_status): Move it to
9279         reg_buffer.
9280         (regcache_raw_set_cached_value): Remove.
9281         (regcache::raw_set_cached_value): Remove.
9282         (regcache::raw_write): Call raw_supply.
9283         (regcache::raw_supply): Move it to reg_buffer_rw.
9284         * regcache.h (regcache_raw_set_cached_value): Remove.
9285         (reg_buffer_rw): New class.
9286
9287 2018-02-21  Yao Qi  <yao.qi@linaro.org>
9288
9289         * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
9290         readonly_detached_regcache.
9291         (dummy_frame_prev_register): Use regcache->cooked_read.
9292         * frame.c (frame_save_as_regcache): Change return type.
9293         (frame_pop): Update.
9294         * frame.h (frame_save_as_regcache): Update declaration.
9295         * inferior.h (get_infcall_suspend_state_regcache): Update
9296         declaration.
9297         * infrun.c (infcall_suspend_state) <registers>: use
9298         readonly_detached_regcache.
9299         (save_infcall_suspend_state): Don't use regcache_dup.
9300         (get_infcall_suspend_state_regcache): Change return type.
9301         * linux-fork.c (struct fork_info) <savedregs>: Change to
9302         readonly_detached_regcache.
9303         <pc>: New field.
9304         (fork_save_infrun_state): Don't use regcache_dup.
9305         (info_checkpoints_command): Adjust.
9306         * mi/mi-main.c (register_changed_p): Update declaration.
9307         (mi_cmd_data_list_changed_registers): Use
9308         readonly_detached_regcache.
9309         (register_changed_p): Change parameter type to
9310         readonly_detached_regcache.
9311         * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
9312         readonly_detached_regcache.
9313         (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
9314         * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
9315         New.
9316         (regcache::save): Move it to reg_buffer.
9317         (regcache::restore): Change parameter type.
9318         (regcache_dup): Remove.
9319         * regcache.h (reg_buffer) <save>: New method.
9320         (readonly_detached_regcache): New class.
9321         * spu-tdep.c (spu2ppu_cache) <regcache>: Use
9322         readonly_detached_regcache.
9323         (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
9324
9325 2018-02-21  Yao Qi  <yao.qi@linaro.org>
9326
9327         * frame.c (frame_save_as_regcache): Use regcache method save.
9328         (frame_pop): Use regcache method restore.
9329         * infrun.c (restore_infcall_suspend_state): Likewise.
9330         * linux-fork.c (fork_load_infrun_state): Likewise.
9331         * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
9332         save.
9333         * regcache.c (regcache_save): Remove.
9334         (regcache::restore): More asserts.
9335         (regcache_cpy): Remove.
9336         * regcache.h (regcache_save): Remove the declaration.
9337         (regcache::restore): Move from private to public.
9338         Remove the friend declaration of regcache_cpy.
9339         (regcache_cpy): Remove declaration.
9340
9341 2018-02-21  Yao Qi  <yao.qi@linaro.org>
9342
9343         * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
9344         parameter type to 'readable_regcache *'.
9345         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
9346         * arm-tdep.c (arm_neon_quad_read): Likewise.
9347         (arm_pseudo_read): Likewise.
9348         * avr-tdep.c (avr_pseudo_register_read): Likewise.
9349         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
9350         * frv-tdep.c (frv_pseudo_register_read): Likewise.
9351         * gdbarch.c: Re-generated.
9352         * gdbarch.h: Re-generated.
9353         * gdbarch.sh (pseudo_register_read): Change parameter type to
9354         'readable_regcache *'.
9355         (pseudo_register_read_value): Likewise.
9356         * h8300-tdep.c (pseudo_from_raw_register): Likewise.
9357         (h8300_pseudo_register_read): Likewise.
9358         * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
9359         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
9360         (i386_pseudo_register_read_into_value): Likewise.
9361         (i386_pseudo_register_read_value): Likewise.
9362         * i386-tdep.h (i386_pseudo_register_read_into_value): Update
9363         declaration.
9364         * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
9365         * m32c-tdep.c (m32c_raw_read): Likewise.
9366         (m32c_read_flg): Likewise.
9367         (m32c_banked_register): Likewise.
9368         (m32c_banked_read): Likewise.
9369         (m32c_sb_read): Likewise.
9370         (m32c_part_read): Likewise.
9371         (m32c_cat_read): Likewise.
9372         (m32c_r3r2r1r0_read): Likewise.
9373         (m32c_pseudo_register_read): Likewise.
9374         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
9375         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
9376         (mep_pseudo_cr64_read): Likewise.
9377         (mep_pseudo_register_read): Likewise.
9378         * mips-tdep.c (mips_pseudo_register_read): Likewise.
9379         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
9380         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
9381         * regcache.c (regcache::raw_read): Move it to readable_regcache.
9382         (regcache::cooked_read): Likewise.
9383         (regcache::cooked_read_value): Likewise.
9384         (regcache_cooked_read_signed):
9385         (regcache::cooked_read): Likewise.
9386         * regcache.h (readable_regcache): New class.
9387         (regcache): Inherit readable_regcache.  Move some methods to
9388         readable_regcache.
9389         * rl78-tdep.c (rl78_pseudo_register_read): Change
9390         parameter type to 'readable_regcache *'.
9391         * rs6000-tdep.c (do_regcache_raw_read): Remove.
9392         (e500_pseudo_register_read): Change parameter type to
9393         'readable_regcache *'.
9394         (dfp_pseudo_register_read): Likewise.
9395         (vsx_pseudo_register_read): Likewise.
9396         (efpr_pseudo_register_read): Likewise.
9397         * s390-tdep.c (s390_pseudo_register_read): Likewise.
9398         * sh-tdep.c (sh_pseudo_register_read): Likewise.
9399         * sh64-tdep.c (pseudo_register_read_portions): Likewise.
9400         (sh64_pseudo_register_read): Likewise.
9401         * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
9402         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
9403         * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
9404         (spu_pseudo_register_read): Likewise.
9405         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
9406         (xtensa_pseudo_register_read): Likewise.
9407
9408 2018-02-21  Yao Qi  <yao.qi@linaro.org>
9409
9410         * regcache.c (regcache::regcache): Call reg_buffer ctor.
9411         (regcache::arch): Move it to reg_buffer::arch.
9412         (regcache::register_buffer): Likewise.
9413         (regcache::assert_regnum): Likewise.
9414         (regcache::num_raw_registers): Likewise.
9415         * regcache.h (reg_buffer): New class.
9416         (regcache): Inherit reg_buffer.
9417
9418 2018-02-20  Simon Marchi  <simon.marchi@ericsson.com>
9419
9420         * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
9421         gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
9422
9423 2018-02-20  Markus Metzger  <markus.t.metzger@intel.com>
9424
9425         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
9426
9427 2018-02-19  Alan Hayward  <alan.hayward@arm.com>
9428
9429         * Makefile.in: (COMMON_SFILES): Add common/*.c files.
9430         (SFILES): Remove common/*.c files.
9431         (COMMON_OBS): Remove some *.o files built from common/*.c files.
9432         * common/common.host: Add common reference.
9433         * configure.ac: Likewise.
9434         * configure: Regenerate.
9435
9436 2018-02-16  Yao Qi  <yao.qi@linaro.org>
9437
9438         * block.c (block_namespace_info): Inherit allocate_on_obstack.
9439         (block_initialize_namespace): Use new.
9440         * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
9441         (dwarf2_free_objfile): Use delete.
9442         * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
9443         (copy_type_recursive): Use new.
9444         * gdb_obstack.h (allocate_on_obstack): New.
9445
9446 2018-02-15  Yao Qi  <yao.qi@linaro.org>
9447
9448         PR gdb/22849
9449         * inferior.c (exit_inferior_1): Reset inf->control.
9450
9451 2018-02-15  Joel Brobecker  <brobecker@adacore.com>
9452
9453         * ada-lang.c (ada_to_fixed_value_create): Delete advance
9454         declaration.
9455
9456 2018-02-14  Pedro Alves  <palves@redhat.com>
9457
9458         * frame-unwind.c (frame_unwind_try_unwinder): Always call
9459         frame_cleanup_after_sniffer on exception.
9460
9461 2018-02-14  Tom Tromey  <tom@tromey.com>
9462
9463         * solist.h (struct target_so_ops) <bfd_open>: Make pathname
9464         const.
9465         (solib_bfd_open): Make pathname const.
9466         * solib.c (solib_bfd_open): Make pathname const.
9467         * solib-spu.c (spu_bfd_fopen): Make name const.
9468         (spu_bfd_open): Make pathname const.
9469         * solib-darwin.c (darwin_bfd_open): Make pathname const.
9470         * solib-aix.c (solib_aix_bfd_open): Make pathname const.
9471
9472 2018-02-14  Tom Tromey  <tom@tromey.com>
9473
9474         * symfile.c (symfile_bfd_open): Update.
9475         * source.h (openp, source_full_path_of, find_and_open_source):
9476         Change argument type to unique_xmalloc_ptr.
9477         * source.c (openp): Take a unique_xmalloc_ptr.
9478         (source_full_path_of, find_and_open_source): Likewise.
9479         (open_source_file, symtab_to_fullname): Update.
9480         * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
9481         unique_xmalloc_ptr.
9482         * solib.c (solib_find_1): Use unique_xmalloc_ptr.
9483         (exec_file_find): Update.
9484         * psymtab.c (psymtab_to_fullname): Update.
9485         * nto-tdep.h (nto_find_and_open_solib): Update.
9486         * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
9487         unique_xmalloc_ptr.
9488         * exec.c (exec_file_attach): Update.
9489         * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
9490         * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
9491
9492 2018-02-14  Tom Tromey  <tom@tromey.com>
9493
9494         * solib.c: Include source.h.
9495         * nto-tdep.c: Include source.h.
9496         * mi/mi-cmd-env.c: Include source.h.
9497         * infcmd.c: Include source.h.
9498         * exec.c: Include source.h.
9499         * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
9500         (add_path, directory_switch, source_path, init_source_path): Move
9501         declarations...
9502         * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
9503         (add_path, directory_switch, source_path, init_source_path):
9504         ...here.
9505
9506 2018-02-14  Tom Tromey  <tom@tromey.com>
9507
9508         * solist.h (exec_file_find, solib_find): Return
9509         unique_xmalloc_ptr.
9510         (solib_bfd_fopen): Take a const char *.
9511         * solib.c (solib_find_1): Return unique_xmalloc_ptr.
9512         (exec_file_find, solib_find): Likewise.
9513         (solib_bfd_fopen): Do not take ownership of "pathname".
9514         (solib_bfd_open): Use unique_xmalloc_ptr.
9515         * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
9516         * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
9517         * infrun.c (follow_exec): Use unique_xmalloc_ptr.
9518         * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
9519
9520 2018-02-14  Joel Brobecker  <brobecker@adacore.com>
9521
9522         * ada-lang.c (name_match_type_from_name): Remove reference to
9523         ada_name_for_lookup in function's documentation.
9524         * ada-lang.h (ada_name_for_lookup): Delete declaration.
9525
9526 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
9527
9528         * defs.h (enum openp_flags): New enum.
9529         (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
9530         Move to enum openp_flags.
9531         (openp_flags): New enum flags.
9532         (openp): Change parameter type to openp_flags.
9533         * source.c (openp): Change parameter type to openp_flags.
9534         * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
9535         * dwarf2read.c (try_open_dwop_file): Use openp_flags.
9536
9537 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
9538
9539         * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
9540         per-command.
9541
9542 2018-02-12  Andrew Burgess  <andrew.burgess@embecosm.com>
9543
9544         * dwarf2read.c (dwarf2_release_queue): Delete function, move body
9545         into...
9546         (class dwarf2_queue_guard): ...the destructor of this new class.
9547         (dw2_do_instantiate_symtab): Create instance of the new class
9548         dwarf2_queue_guard, remove cleanup.
9549
9550 2018-02-09  Tom Tromey  <tom@tromey.com>
9551
9552         * source.c (find_source_lines): Don't reference past the end of
9553         the vector.
9554
9555 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
9556
9557         * remote.c (remote_btrace_maybe_reopen): Change error message.
9558         * btrace.c (btrace_enable): Likewise.
9559         (parse_xml_btrace): Likewise.
9560         (parse_xml_btrace_conf): Likewise.
9561
9562 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
9563
9564         * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
9565         (linux_enable_pt, linux_enable_bts): Call
9566         diagnose_perf_event_open_fail.
9567
9568 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
9569
9570         * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
9571         Remove parameter and change return type.  Update callers.  Move it.
9572         (linux_enable_bts, linux_enable_pt): Improve error message.
9573         (linux_enable_pt): Remove zero buffer size check.
9574         (linux_enable_btrace): Improve error messages.  Remove NULL return
9575         check.
9576
9577 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
9578
9579         * btrace.c (btrace_enable): Remove target_supports_btrace call.
9580         * nat/linux-btrace.c (perf_event_pt_event_type): Move.
9581         (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
9582         (linux_supports_pt, linux_supports_btrace): Remove.
9583         (linux_enable_bts): Call cpu_supports_bts.
9584         * nat/linux-btrace.h (linux_supports_btrace): Remove.
9585         * remote.c (remote_supports_btrace): Remove.
9586         (init_remote_ops): Remove remote_supports_btrace.
9587         * target-delegates.c: Regenerated.
9588         * target.c (target_supports_btrace): Remove.
9589         * target.h (target_ops) <to_supports_btrace>: Remove
9590         (target_supports_btrace): Remove.
9591         * x86-linux-nat.c (x86_linux_create_target): Remove
9592         linux_supports_btrace.
9593
9594 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
9595
9596         * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
9597         btrace failed.
9598         * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
9599         exception and use message in own exception.
9600
9601 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
9602
9603         * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
9604         (perf_event_pt_event_type): Use gdb_file_up.
9605         (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
9606         scoped_fd, and scoped_mmap.
9607
9608 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
9609
9610         * common/scoped_mmap.h: New.
9611         * unittests/scoped_mmap-selftest.c: New.
9612         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9613         unittests/scoped_mmap-selftest.c.
9614
9615 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
9616
9617         * common/scoped_fd.h: New.
9618         * unittests/scoped_fd-selftest.c: New.
9619         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9620         unittests/scoped_fd-selftest.c.
9621
9622 2018-02-09  Tom Tromey  <tom@tromey.com>
9623
9624         * auto-load.c (auto_load_section_scripts): Use
9625         gdb::unique_xmalloc_ptr.
9626
9627 2018-02-09  Tom Tromey  <tom@tromey.com>
9628
9629         * auto-load.c (execute_script_contents): Use std::string.
9630
9631 2018-02-09  Joel Brobecker  <brobecker@adacore.com>
9632
9633         * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
9634         Python function, rather than a new command.
9635
9636 2018-02-08  Tom Tromey  <tom@tromey.com>
9637
9638         * solib.c (solib_find_1): Use std::string.
9639         (solib_bfd_fopen): Use unique_xmalloc_ptr.
9640
9641 2018-02-08  Tom Tromey  <tom@tromey.com>
9642
9643         * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
9644
9645 2018-02-08  Tom Tromey  <tom@tromey.com>
9646
9647         * source.c (find_source_lines): Use gdb::def_vector.
9648
9649 2018-02-08  Tom Tromey  <tom@tromey.com>
9650
9651         * macrocmd.c (struct temporary_macro_definition): New.
9652         (macro_define_command): Use temporary_macro_definition.  Remove
9653         cleanups.
9654         (free_macro_definition_ptr): Remove.
9655
9656 2018-02-08  Tom Tromey  <tom@tromey.com>
9657
9658         * macroexp.c (maybe_expand): Use std::string.
9659
9660 2018-02-08  Tom Tromey  <tom@tromey.com>
9661
9662         * macroexp.c (struct macro_buffer): Add initializers for some
9663         members.
9664         (init_buffer, init_shared_buffer, free_buffer)
9665         (free_buffer_return_text): Remove.
9666         (macro_buffer): New constructors.
9667         (~macro_buffer): New destructor.
9668         (macro_buffer::set_shared): New method.
9669         (macro_buffer::resize_buffer, macro_buffer::appendc)
9670         (macro_buffer::appendmem): Now methods, not free functions.
9671         (set_token, append_tokens_without_splicing, stringify)
9672         (macro_stringify): Update.
9673         (gather_arguments): Change return type.  Remove argc_p argument,
9674         add args_ptr argument.  Use std::vector.
9675         (substitute_args): Remove argc argument.  Accept std::vector.
9676         (expand): Update.  Use std::vector.
9677         (scan, macro_expand, macro_expand_next): Update.
9678
9679 2018-02-08  Tom Tromey  <tom@tromey.com>
9680
9681         * symtab.c (default_collect_symbol_completion_matches_break_on):
9682         Use unique_xmalloc_ptr.
9683         * macroscope.h: (sal_macro_scope, user_macro_scope)
9684         (default_macro_scope): Return unique_xmalloc_ptr.
9685         * macroscope.c (sal_macro_scope, user_macro_scope)
9686         (default_macro_scope): Return unique_xmalloc_ptr.
9687         * macroexp.h (macro_expand, macro_expand_once): Return
9688         unique_xmalloc_ptr.
9689         * macroexp.c (macro_expand, macro_expand_once): Return
9690         unique_xmalloc_ptr.
9691         * macrocmd.c (macro_expand_command, macro_expand_once_command)
9692         (info_macro_command, info_macros_command): Use
9693         unique_xmalloc_ptr.
9694         * compile/compile-c-support.c (write_macro_definitions): Use
9695         unique_xmalloc_ptr.
9696         * c-exp.y (c_parse): Use unique_xmalloc_ptr.
9697
9698 2018-02-07  Simon Marchi  <simon.marchi@ericsson.com>
9699
9700         * value.c (value_static_field): Assign field type instead of
9701         containing type when returning an optimized out value.
9702
9703 2018-02-06  Yao Qi  <yao.qi@linaro.org>
9704
9705         * ft32-tdep.c (ft32_read_pc): Remove.
9706         (ft32_write_pc): Remove.
9707         (ft32_gdbarch_init): Update.
9708         * m32r-tdep.c (m32r_read_pc): Remove.
9709         (m32r_gdbarch_init): Update.
9710         * mep-tdep.c (mep_read_pc): Remove.
9711         (mep_gdbarch_init): Update.
9712         * microblaze-tdep.c (microblaze_write_pc): Remove.
9713         (microblaze_gdbarch_init): Update.
9714         * mn10300-tdep.c (mn10300_read_pc): Remove.
9715         (mn10300_write_pc): Remove.
9716         (mn10300_gdbarch_init): Update.
9717         * moxie-tdep.c (moxie_read_pc): Remove.
9718         (moxie_write_pc): Remove.
9719         (moxie_gdbarch_init): Update.
9720
9721 2018-02-06  Yao Qi  <yao.qi@linaro.org>
9722
9723         * expprint.c (print_subexp_standard): Handle
9724         OP_F77_UNDETERMINED_ARGLIST.
9725         (dump_subexp_body_standard): Likewise.
9726
9727 2018-02-05  Alan Hayward  <alan.hayward@arm.com>
9728
9729         * target-descriptions.c (tdesc_element_visitor) Add empty
9730         implementations.
9731         (tdesc_type): Move make_gdb_type from here.
9732         (tdesc_type_builtin): Likewise.
9733         (tdesc_type_vector): Likewise.
9734         (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
9735         (make_gdb_type_struct): Move from tdesc_type_with_fields.
9736         (make_gdb_type_union): Likewise.
9737         (make_gdb_type_flags): Likewise.
9738         (make_gdb_type_enum): Likewise.
9739         (make_gdb_type): New function.
9740         (tdesc_register_type): Use static make_gdb_type.
9741
9742 2018-02-05  Ruslan Kabatsayev <b7.10110111@gmail.com>
9743
9744         * infcmd.c (default_print_one_register_info): Align natural-format
9745         column values consistently one under another.
9746         (pad_to_column): New function.
9747
9748 2018-02-05  Joel Brobecker  <brobecker@adacore.com>
9749
9750         * dwarf2read.c (dwarf2_physname): Move commment.
9751
9752 2018-02-01  Leszek Swirski  <leszeks@google.com>
9753
9754         * varobj.c (varobj_formatted_print_options): Allow recursive
9755         pretty printing if pretty printing is enabled.
9756
9757 2018-02-01  Leszek Swirski  <leszeks@google.com>
9758
9759         * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
9760         names after a structop as a filename.
9761
9762 2018-02-01  Yao Qi  <yao.qi@linaro.org>
9763
9764         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
9765         (arm_record_coproc_data_proc): Likewise.
9766
9767 2018-02-01  Yao Qi  <yao.qi@linaro.org>
9768
9769         * arm-tdep.c (arm_record_extension_space): Change ret to signed.
9770
9771 2018-01-31  Nikola Prica  <nikola.prica@rt-rk.com>
9772
9773         * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
9774         assign shifted lr_reg to fdata->lr_register when lr_reg is set.
9775
9776 2018-01-31  Pedro Alves  <palves@redhat.com>
9777
9778         * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
9779         * inflow.c (child_terminal_save_inferior): Wrap reference to
9780         tcgetpgrp in HAVE_TERMIOS_H.
9781         (child_interrupt, child_pass_ctrlc): Wrap references to signal in
9782         _WIN32.
9783         * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
9784         always iterate over all inferiors.
9785         (gdbsim_cntrl_c): Adjust.
9786         * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
9787
9788 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
9789
9790         * gdbtypes.c (lookup_array_range_type): Make sure the array's
9791         index type is objfile-owned if the element type is as well.
9792
9793 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
9794
9795         GDB 8.1 released.
9796
9797 2018-01-30  Philipp Rudo  <prudo@linux.vnet.ibm.com>
9798
9799         * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
9800         "features/s390x-linux64.c".
9801         (_initialize_s390_linux_tdep): Remove initialization of tdescs
9802         s390_linux32 and s390x_linux64.
9803         (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
9804         default tdesc.
9805         * s390-tdep.c: Include "features/s390-linux32.c" and
9806         "features/s390x-linux64.c".
9807         (s390_tdesc_valid): Add check for tdesc_has_registers.
9808         (s390_gdbarch_init): Make sure there is always a valid tdesc.
9809         (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
9810         tdesc_s390x_linux64.
9811         * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
9812         tdesc_s390x_linux64 to...
9813         * s390-tdep.h: ...here.
9814
9815 2018-01-30  Pedro Alves  <palves@redhat.com>
9816
9817         PR gdb/13211
9818         * config.in, configure: Regenerate.
9819         * configure.ac: Check for getpgid.
9820         * go32-nat.c (go32_pass_ctrlc): New.
9821         (go32_target): Install it.
9822         * inf-child.c (inf_child_target): Install
9823         child_terminal_save_inferior, child_pass_ctrlc and
9824         child_interrupt.
9825         * inf-ptrace.c (inf_ptrace_interrupt): Delete.
9826         (inf_ptrace_target): No longer install it.
9827         * infcmd.c (interrupt_target_1): Adjust.
9828         * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
9829         (child_interrupt): Declare.
9830         (inferior::terminal_state): New.
9831         * inflow.c (struct terminal_info): Update comments.
9832         (inferior_process_group): Delete.
9833         (terminal_is_ours): Delete.
9834         (gdb_tty_state): New.
9835         (child_terminal_init): Adjust.
9836         (is_gdb_terminal, sharing_input_terminal_1)
9837         (sharing_input_terminal): New functions.
9838         (child_terminal_inferior): Adjust.  Use sharing_input_terminal.
9839         Set the process's actual process group in the foreground if
9840         possible.  Handle is_ours_for_output/is_ours distinction.  Don't
9841         mark terminal as the inferior's if not sharing GDB's terminal.
9842         Don't check attach_flag.
9843         (child_terminal_ours_for_output, child_terminal_ours): Adjust to
9844         pass down a target_terminal_state.
9845         (child_terminal_save_inferior): New, factored out from ...
9846         (child_terminal_ours_1): ... this.  Handle
9847         target_terminal_state::is_ours_for_output.
9848         (child_interrupt, child_pass_ctrlc): New.
9849         (inflow_inferior_exit): Clear the inferior's terminal_state.
9850         (copy_terminal_info): Copy the inferior's terminal state.
9851         (_initialize_inflow): Remove reference to terminal_is_ours.
9852         * inflow.h (inferior_process_group): Delete.
9853         * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
9854         * procfs.c (procfs_target): Don't install procfs_interrupt.
9855         (procfs_interrupt): Delete.
9856         * remote.c (remote_serial_quit_handler): Adjust.
9857         (remote_interrupt): Remove ptid parameter.  Adjust.
9858         * target-delegates.c: Regenerate.
9859         * target.c: Include "terminal.h".
9860         (target_terminal::terminal_state): Rename to ...
9861         (target_terminal::m_terminal_state): ... this.
9862         (target_terminal::init): Adjust.
9863         (target_terminal::inferior): Adjust to per-inferior
9864         terminal_state.
9865         (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
9866         (target_terminal::ours, target_terminal::ours_for_output): Use
9867         target_terminal_is_ours_kind.
9868         (target_interrupt): Remove ptid parameter.  Adjust.
9869         (default_target_pass_ctrlc): Adjust.
9870         * target.h (target_ops::to_terminal_save_inferior): New field.
9871         (target_ops::to_interrupt): Remove ptid_t parameter.
9872         (target_interrupt): Remove ptid_t parameter.  Update comment.
9873         (target_pass_ctrlc): Update comment.
9874         * target/target.h (target_terminal_state): New scoped enum,
9875         factored out of ...
9876         (target_terminal::terminal_state): ... here.
9877         (target_terminal::inferior): Update comments.
9878         (target_terminal::restore_inferior): New.
9879         (target_terminal::is_inferior, target_terminal::is_ours)
9880         (target_terminal::is_ours_for_output): Adjust.
9881         (target_terminal::scoped_restore_terminal_state): Adjust to
9882         rename, and call restore_inferior() instead of inferior().
9883         (target_terminal::scoped_restore_terminal_state::m_state): Change
9884         type.
9885         (target_terminal::terminal_state): Rename to ...
9886         (target_terminal::m_terminal_state): ... this and change type.
9887
9888 2018-01-30  Pedro Alves  <palves@redhat.com>
9889
9890         * linux-nat.c (wait_for_signal): New function.
9891         (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
9892         directly.
9893         (async_terminal_is_ours)
9894         (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
9895         (linux_nat_add_target): Don't override
9896         to_terminal_inferior/to_terminal_ours.
9897
9898 2018-01-29  Sergio Durigan Junior  <sergiodj@redhat.com>
9899
9900         * remote.c (remote_follow_fork): Don't call "detach_inferior".
9901
9902 2018-01-28  Simon Marchi  <simon.marchi@ericsson.com>
9903
9904         * dwarf2read.c (free_dwo_files): Add forward-declaration.
9905         (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
9906         dwarf2_per_objfile_free here.
9907         (dwarf2_per_objfile_free): Remove.
9908         (_initialize_dwarf2_read): Don't register
9909         dwarf2_per_objfile_free as a registry cleanup.
9910
9911 2018-01-27  Eli Zaretskii  <eliz@gnu.org>
9912
9913         Avoid compilation errors in MinGW native builds
9914
9915         The error is triggered by including python-internal.h, and the
9916         error message is:
9917
9918              In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
9919                       from build-gnulib/import/math.h:27,
9920                       from d:/usr/Python26/include/pyport.h:235,
9921                       from d:/usr/Python26/include/Python.h:58,
9922                       from python/python-internal.h:94,
9923                       from python/py-arch.c:24:
9924              d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
9925         using ::hypot;
9926                 ^~~~~
9927
9928         This happens because Python headers define 'hypot' to expand t
9929         '_hypot' in the Windows builds.
9930         * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
9931         'hypoth'.  This avoids a compilation error.
9932
9933 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
9934
9935         * MAINTAINERS (Write After Approval): Fix ordering.
9936
9937 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
9938
9939         * MAINTAINERS (Write After Approval): Add Alan Hayward.
9940
9941 2018-01-26  Alan Modra  <amodra@gmail.com>
9942
9943         * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
9944         (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
9945         Remove nop.  Make const.  Comment.
9946         (powerpc32_plt_stub_so_2): New.
9947         (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
9948         Correct count.  Update uses.
9949         (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
9950         Move common code reading PLT entry word.  Correct
9951         powerpc32_plt_stub PLT address calculation.
9952         * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
9953         (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
9954         (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
9955         (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
9956         (ppc64_standard_linkage8): Likewise.
9957         * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
9958         Correct insns description.
9959         * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
9960
9961 2018-01-24  Pedro Alves  <palves@redhat.com>
9962
9963         GCC PR libstdc++/83906
9964         * gdbtypes.c (operator==(const dynamic_prop &,
9965         const dynamic_prop &)): New.
9966         (operator==(const range_bounds &, const range_bounds &)): New.
9967         (check_types_equal): Use them instead of memcmp.
9968         * gdbtypes.h (operator==(const dynamic_prop &,
9969         const dynamic_prop &)): Declare.
9970         (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
9971         (operator==(const range_bounds &, const range_bounds &)): Declare.
9972         (operator!=(const range_bounds &, const range_bounds &)): Declare.
9973
9974 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
9975
9976         * s390-linux-tdep.c (s390_record_address_mask)
9977         (s390_record_calc_disp_common, s390_record_calc_disp)
9978         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
9979         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
9980         (s390_process_record): Move to s390-tdep.c.
9981         (s390_linux_init_abi_any): Adjust.
9982         * s390-tdep.c (s390_record_address_mask)
9983         (s390_record_calc_disp_common, s390_record_calc_disp)
9984         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
9985         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
9986         (s390_process_record): Moved from s390-linux-tdep.c
9987         (s390_gdbarch_init): Adjust.
9988
9989 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
9990
9991         * s390-linux-nat.c (s390-tdep.h): New include.
9992         * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
9993         (HFILES_NO_SRCDIR): Add s390-tdep.h.
9994         (ALLDEPFILES): Add s390-tdep.c.
9995         * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
9996         * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
9997         * s390-tdep.h: ...this.  New file.
9998         * s390-linux-tdep.c (s390-tdep.h): New include.
9999         (_initialize_s390_tdep): Rename to...
10000         (_initialize_s390_linux_tdep): ...this and adjust.
10001         (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
10002         (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
10003         s390-tdep.h.
10004         (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
10005         (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
10006         (s390_is_partial_instruction, s390_software_single_step)
10007         (is_non_branch_ril, s390_displaced_step_copy_insn)
10008         (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
10009         (s390_prologue_data, s390_addr, s390_store, s390_load)
10010         (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
10011         (s390_register_call_saved, s390_guess_tracepoint_registers)
10012         (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
10013         (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
10014         (s390_pseudo_register_name, s390_pseudo_register_type)
10015         (s390_pseudo_register_read, s390_pseudo_register_write)
10016         (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
10017         (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
10018         (s390_addr_bits_remove, s390_address_class_type_flags)
10019         (s390_address_class_type_flags_to_name)
10020         (s390_address_class_name_to_type_flags, s390_effective_inner_type)
10021         (s390_function_arg_float, s390_function_arg_vector)
10022         (is_power_of_two, s390_function_arg_integer, s390_arg_state)
10023         (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
10024         (s390_frame_align, s390_register_return_value, s390_return_value)
10025         (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
10026         (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
10027         (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
10028         (s390_trad_frame_prev_register, s390_unwind_cache)
10029         (s390_prologue_frame_unwind_cache)
10030         (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
10031         (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
10032         (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
10033         (s390_stub_frame_this_id, s390_stub_frame_prev_register)
10034         (s390_stub_frame_sniffer, s390_stub_frame_unwind)
10035         (s390_frame_base_address, s390_local_base_address)
10036         (s390_frame_base, s390_gcc_target_options)
10037         (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
10038         (s390_validate_reg_range, s390_tdesc_valid)
10039         (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
10040         * s390-tdep.c: ...this.  New file.
10041
10042 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
10043
10044         * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
10045         (s390_process_record, s390_gdbarch_tdep_alloc)
10046         (s390_linux_init_abi_any): Use/set new hook.
10047
10048 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
10049
10050         * s390-linux-tdep.c (osabi.h): New include.
10051         (s390_linux_init_abi_31, s390_linux_init_abi_64)
10052         (s390_linux_init_abi_any): New functions.
10053         (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
10054
10055 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
10056
10057         * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
10058         tdesc_has_registers check
10059
10060 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
10061
10062         * s390-linux-tdep.c (s390_tdesc_valid): New function.
10063         (s390_validate_reg_range): New macro.
10064         (s390_gdbarch_init): Adjust.
10065
10066 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
10067
10068         * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
10069         (s390_gdbarch_tdep_alloc): Adjust.
10070         (s390_gdbarch_init): Adjust.
10071
10072 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
10073
10074         * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
10075         <have_tdb>: Change type to bool.
10076         (s390_gdbarch_tdep_alloc): Adjust.
10077         (s390_gdbarch_init): Adjust.
10078
10079 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
10080
10081         * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
10082         (gdbarch_tdep) <have_upper, have_vx>: New fields.
10083         (s390_gdbarch_tdep_alloc): New function.
10084         (s390_gdbarch_init): Allocate tdep at start and use its fields
10085         instead of separate variables.
10086
10087 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
10088
10089         * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
10090         when looking for cached gdbarch and add comment for remaining.
10091
10092 2018-01-22  Pedro Alves  <palves@redhat.com>
10093             Sergio Durigan Junior  <sergiodj@redhat.com>
10094
10095         * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
10096         case.
10097
10098 2018-01-22  Maciej W. Rozycki  <macro@mips.com>
10099
10100         * MAINTAINERS: Update my company e-mail address.
10101
10102 2018-01-22  Yao Qi  <yao.qi@linaro.org>
10103
10104         * regcache.c (cooked_write_test): New function.
10105         (_initialize_regcache): Register the test.
10106
10107 2018-01-22  Yao Qi  <yao.qi@linaro.org>
10108
10109         * ia64-tdep.c (ia64_pseudo_register_read): Call
10110         regcache->cooked_read instead of regcache_cooked_read_unsigned.
10111         * m32c-tdep.c (m32c_cat_read): Likewise.
10112         (m32c_r3r2r1r0_read): Likewise.
10113         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
10114         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
10115
10116 2018-01-22  Yao Qi  <yao.qi@linaro.org>
10117
10118         * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
10119         method raw_read instead of regcache_raw_read.
10120         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
10121         * arm-tdep.c (arm_neon_quad_read): Likewise.
10122         * avr-tdep.c (avr_pseudo_register_read): Likewise.
10123         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
10124         * frv-tdep.c (frv_pseudo_register_read): Likewise.
10125         * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
10126         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
10127         (i386_pseudo_register_read_into_value): Likewise.
10128         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
10129         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
10130         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
10131         * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
10132         * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
10133         * sparc-tdep.c (sparc32_pseudo_register_read):  Likewise.
10134         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
10135         * spu-tdep.c (spu_pseudo_register_read_spu):  Likewise.
10136         * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
10137
10138 2018-01-22  Yao Qi  <yao.qi@linaro.org>
10139
10140         * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
10141         * configure.tgt: Remove target mt.
10142         * mt-tdep.c: Remove.
10143         * regcache.c (cooked_read_test): Remove the check for mt.
10144
10145 2018-01-22  Yao Qi  <yao.qi@linaro.org>
10146
10147         * jit.c (jit_frame_prev_register): Call regcache::cooked_read
10148         instead of gdbarch_pseudo_register_read_value.
10149
10150 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
10151
10152         * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
10153         language is Ada.
10154
10155 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
10156
10157         * linespec.c (create_sals_line_offset): Remove code that preserved
10158         the symtab_and_line's line number.
10159
10160 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
10161
10162         * varobj.c (varobj_create): Don't set valid_block when creating a
10163         floating varobj.
10164
10165 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
10166
10167         * varobj.c (varobj_create): Remove out of date comment.
10168
10169 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
10170
10171         PR mi/20395
10172         * ada-exp.y (write_var_from_sym): Pass extra parameter when
10173         updating innermost block.
10174         * parse.c (innermost_block_tracker::update): Take extra type
10175         parameter, and check types match before updating innermost block.
10176         (write_dollar_variable): Update innermost block for registers.
10177         * parser-defs.h (enum innermost_block_tracker_type): New enum.
10178         (innermost_block_tracker::innermost_block_tracker): Initialise
10179         m_types member.
10180         (innermost_block_tracker::reset): Take type parameter.
10181         (innermost_block_tracker::update): Take type parameter, and pass
10182         type through as needed.
10183         (innermost_block_tracker::m_types): New member.
10184         * varobj.c (varobj_create): Pass type when reseting innermost
10185         block.
10186
10187 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
10188
10189         * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
10190         * ada-lang.c (resolve_subexp): Likewise.
10191         * breakpoint.c (set_breakpoint_condition) Likewise.
10192         (watch_command_1) Likewise.
10193         * c-exp.y (variable): Likewise.
10194         * d-exp.y (PrimaryExpression): Likewise.
10195         * f-exp.y (variable): Likewise.
10196         * go-exp.y (variable): Likewise.
10197         * m2-exp.y (variable): Likewise.
10198         * objfiles.c (objfile::~objfile): Likewise.
10199         * p-exp.y (variable): Likewise.
10200         * parse.c (innermost_block): Change type.
10201         * parser-defs.h (class innermost_block_tracker): New.
10202         (innermost_block): Change to innermost_block_tracker.
10203         * printcmd.c (display_command): Switch to innermost_block API.
10204         (do_one_display): Likewise.
10205         * rust-exp.y (do_one_display): Likewise.
10206         * symfile.c (clear_symtab_users): Likewise.
10207         * varobj.c (varobj_create): Switch to innermost_block API, replace
10208         use of innermost_block with block stored on varobj object.
10209
10210 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
10211
10212         * expression.h (innermost_block): Remove declaration.
10213         * varobj.c: Add 'parser-defs.h' include.
10214
10215 2018-01-19  Tom Tromey  <tom@tromey.com>
10216
10217         * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
10218         symbols in the static and global blocks.
10219
10220 2018-01-19  James Clarke  <jrtc27@jrtc27.com>
10221
10222         * nat/linux-ptrace.c: Remove unnecessary reinclusion of
10223         gdb_ptrace.h, and move including gdb_wait.h ...
10224         * nat/linux-ptrace.h: ... to here.
10225
10226 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
10227
10228         * inf-ptrace.c (inf_ptrace_detach): Adjust call to
10229         inf_ptrace_detach_success.
10230         (inf_ptrace_detach_success): Add inferior parameter, use it
10231         instead of inferior_ptid, pass it to detach_inferior.
10232         * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
10233         parameter.
10234         * inferior.c (detach_inferior): Add overload that takes an
10235         inferior object.
10236         * inferior.h (detach_inferior): Likewise.
10237         * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
10238         use inferior_ptid, adjust call to inf_ptrace_detach_success.
10239         * linux-thread-db.c (thread_db_detach): Use inf parameter.
10240
10241 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
10242
10243         * target.h (struct target_ops) <to_detach>: Add inferior
10244         parameter.
10245         (target_detach): Likewise.
10246         * target.c (dispose_inferior): Pass inferior down.
10247         (target_detach): Pass inferior down.  Assert that it is equal to
10248         the current inferior.
10249         * aix-thread.c (aix_thread_detach): Pass inferior down.
10250         * corefile.c (core_file_command): Pass current_inferior() down.
10251         * corelow.c (core_detach): Add inferior parameter.
10252         * darwin-nat.c (darwin_detach): Likewise.
10253         * gnu-nat.c (gnu_detach): Likewise.
10254         * inf-ptrace.c (inf_ptrace_detach): Likewise.
10255         * infcmd.c (detach_command): Pass current_inferior() down to
10256         target_detach.
10257         * infrun.c (follow_fork_inferior): Pass parent_inf to
10258         target_detach.
10259         (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
10260         target_detach.
10261         * linux-nat.c (linux_nat_detach): Add inferior parameter.
10262         * linux-thread-db.c (thread_db_detach): Likewise.
10263         * nto-procfs.c (procfs_detach): Likewise.
10264         * procfs.c (procfs_detach): Likewise.
10265         * record.c (record_detach): Likewise.
10266         * record.h (struct inferior): Forward-declare.
10267         (record_detach): Add inferior parameter.
10268         * remote-sim.c (gdbsim_detach): Likewise.
10269         * remote.c (remote_detach_1): Likewise.
10270         (remote_detach): Likewise.
10271         (extended_remote_detach): Likewise.
10272         * sol-thread.c (sol_thread_detach): Likewise.
10273         * target-debug.h (target_debug_print_inferior_p): New macro.
10274         * target-delegates.c: Re-generate.
10275         * top.c (kill_or_detach): Pass inferior down to target_detach.
10276         * windows-nat.c (windows_detach): Add inferior parameter.
10277
10278 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
10279
10280         * target.h (struct target_ops) <to_detach>: Remove args
10281         parameter.
10282         (target_detach): Likewise.
10283         * target.c (dispose_inferior): Adjust.
10284         (target_detach): Remove args parameter, adjust.
10285         * aix-thread.c (aix_thread_detach): Adjust.
10286         * corefile.c (core_file_command): Adjust.
10287         * corelow.c (core_detach): Adjust.
10288         * darwin-nat.c (darwin_detach): Adjust.
10289         * gnu-nat.c (gnu_detach): Adjust.
10290         * inf-ptrace.c (inf_ptrace_detach): Adjust.
10291         * infcmd.c (detach_command): Adjust
10292         * infrun.c (follow_fork_inferior): Adjust.
10293         (handle_vfork_child_exec_or_exit): Adjust.
10294         * linux-fork.c (linux_fork_detach): Remove args parameter.
10295         * linux-fork.h (linux_fork_detach): Likewise.
10296         * linux-nat.c (linux_nat_detach): Likewise, and adjust.
10297         * linux-thread-db.c (thread_db_detach): Likewise.
10298         * nto-procfs.c (procfs_detach): Likewise.
10299         * procfs.c (procfs_detach): Likewise.
10300         (do_detach): Remove signo parameter.
10301         * record.c (record_detach): Remove args parameter.
10302         * record.h (record_detach): Likewise.
10303         * remote-sim.c (gdbsim_detach): Likewise.
10304         * remote.c (remote_detach_1): Likewise.
10305         (remote_detach): Likewise.
10306         (extended_remote_detach): Likewise.
10307         * sol-thread.c (sol_thread_detach): Likewise.
10308         * target-delegates.c: Re-generate.
10309         * top.c (struct qt_args) <args>: Remove field.
10310         (kill_or_detach): Don't pass args.
10311         (quit_force): Don't set args.
10312         * windows-nat.c (windows_detach): Remove args parameter.
10313
10314 2018-01-19  Yao Qi  <yao.qi@linaro.org>
10315
10316         * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
10317         (arm_linux_init_abi): Install it.
10318
10319 2018-01-19  Yao Qi  <yao.qi@linaro.org>
10320
10321         * osabi.c (gdb_osabi_names): Extend the regexp for
10322         arm-linux-gnueabihf.
10323
10324 2018-01-18  Yao Qi  <yao.qi@linaro.org>
10325
10326         * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
10327         m_abbrevs.
10328         (abbrev_table::add_abbrev): Update.
10329         (abbrev_table::lookup_abbrev): Update.
10330
10331 2018-01-18  Yao Qi  <yao.qi@linaro.org>
10332
10333         * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
10334
10335 2018-01-17  Sergio Durigan Junior  <sergiodj@redhat.com>
10336
10337         * compile/compile.c (compile_to_object): Convert "triplet_rx"
10338         to "std::string".
10339
10340 2018-01-17  Tom Tromey  <tom@tromey.com>
10341
10342         * dwarf2read.c (symbolp): Remove typedef.  Don't instantiate VEC.
10343
10344 2018-01-17  Tom Tromey  <tom@tromey.com>
10345
10346         * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
10347         * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
10348         (create_array_type_with_stride): Update.
10349         * dwarf2read.c (set_die_type): Update.
10350
10351 2018-01-17  Tom Tromey  <tom@tromey.com>
10352
10353         * dwarf2read.c (delayed_method_info): Remove typedef.
10354         (dwarf2_cu::method_info): Now a std::vector.
10355         (add_to_method_list): Update.
10356         (free_delayed_list): Remove.
10357         (compute_delayed_physnames): Update.
10358         (process_full_comp_unit, process_full_type_unit): Clear the method
10359         list.  Remove cleanups.
10360         (psymtab_include_file_name): Add name_holder parameter.  Use
10361         unique_xmalloc_ptr.
10362         (dwarf_decode_lines): Update.
10363
10364 2018-01-17  Tom Tromey  <tom@tromey.com>
10365             Simon Marchi  <simon.marchi@ericsson.com>
10366
10367         * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
10368         (dwarf2_per_objfile::free_cached_comp_units)
10369         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
10370         (init_cutu_and_read_dies_no_follow): Update.
10371         (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
10372         (dwarf2_cu::~dwarf2_cu): New.
10373         (free_heap_comp_unit, free_stack_comp_unit): Remove.
10374         (age_cached_comp_units, free_one_cached_comp_unit): Update.
10375
10376 2018-01-17  Tom Tromey  <tom@tromey.com>
10377             Simon Marchi  <simon.marchi@ericsson.com>
10378
10379         * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
10380         (struct die_reader_specs) <abbrev_table>: New member.
10381         (struct abbrev_table): Add constructor.
10382         <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
10383         <abbrev_obstack>: Now an auto_obstack.
10384         (abbrev_table_up): New typedef.
10385         (init_cu_die_reader): Add abbrev_table parameter.
10386         (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
10387         Add result_dwo_abbrev_table.
10388         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
10389         (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
10390         Update.
10391         (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
10392         parameter.
10393         (skip_children): Update.
10394         (abbrev_table::alloc_abbrev): Rename from
10395         abbrev_table_alloc_abbrev.
10396         (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
10397         (abbrev_table::lookup_abbrev): Rename from
10398         abbrev_table_lookup_abbrev.
10399         (abbrev_table_read_table): Return abbrev_table_up.
10400         (abbrev_table_free, abbrev_table_free_cleanup)
10401         (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
10402         (load_partial_dies): Update.
10403
10404 2018-01-17  Tom Tromey  <tom@tromey.com>
10405
10406         * dwarf2read.c (dwarf2_compute_name): Update comment.
10407         (read_func_scope, read_variable): Update.
10408         (new_symbol): Remove.
10409         (new_symbol_full): Rename to new_symbol.
10410
10411 2018-01-17  Mike Gulick  <mgulick@mathworks.com>
10412
10413         PR gdb/16577
10414         * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
10415         a warning instead of throwing an error, set section size to 0 and return
10416         NULL.
10417         * gdb_bfd.h (gdb_bfd_map_section): Update description.
10418
10419 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
10420
10421         * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
10422         std::string.
10423         (linux_ptrace_attach_fail_reason_string): Likewise.
10424         * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
10425         Likewise.
10426         (linux_ptrace_attach_fail_reason_string): Likewise.
10427         * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
10428
10429 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
10430
10431         * linux-nat.c (linux_nat_attach): Remove xstrdup.
10432
10433 2018-01-17  Eldar Abusalimov  <eldar.abusalimov@jetbrains.com>
10434
10435         PR gdb/21559
10436         * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
10437         checking for fs_base/gs_base fields in struct user_regs_struct.
10438         * configure: Regenerate.
10439
10440 2018-01-17  Yao Qi  <yao.qi@linaro.org>
10441
10442         * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
10443         function.
10444         (aarch64_linux_init_abi): Install it to gdbarch hook
10445         gcc_target_options.
10446
10447 2018-01-15  Pedro Alves  <palves@redhat.com>
10448
10449         * common/signals-state-save-restore.c
10450         (save_original_signals_state): Fix typos.
10451
10452 2017-01-12  Tom Tromey  <tom@tromey.com>
10453             Sergio Durigan Junior  <sergiodj@redhat.com>
10454
10455         * Makefile.in (install-only): Install gdb-add-index.
10456
10457 2018-01-12  John Baldwin  <jhb@FreeBSD.org>
10458
10459         * fbsd-tdep.c (KVE_PROTECTION): Correct value.
10460
10461 2018-01-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10462
10463         * infrun.c (keep_going_pass_signal): Clear step-over info when
10464         insert_breakpoints fails.
10465
10466 2018-01-11  Pedro Alves  <palves@redhat.com>
10467
10468         PR gdb/22583
10469         * infrun.c (resume): Rename to ...
10470         (resume_1): ... this.
10471         (resume): Reimplement as wrapper around resume_1.
10472
10473 2018-01-11  Pedro Alves  <palves@redhat.com>
10474
10475         PR remote/22597
10476         * remote.c (remote_parse_stop_reply): Default to the last-set
10477         general thread instead of to 'magic_null_ptid'.
10478
10479 2018-01-10  Pedro Alves  <palves@redhat.com>
10480
10481         * language.h (language_get_symbol_name_matcher): Rename ...
10482         (get_symbol_name_matcher): ... this.
10483         * language.c (language_get_symbol_name_matcher): Ditto.
10484         * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
10485         callers adjusted.
10486
10487 2018-01-10  Pedro Alves  <palves@redhat.com>
10488
10489         PR gdb/22670
10490         * dwarf2read.c
10491         (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
10492         Adjust to use language_get_symbol_name_matcher instead of
10493         language_defn::la_get_symbol_name_matcher.
10494         * language.c (language_get_symbol_name_matcher): If in Ada mode
10495         and the lookup name is a verbatim match, return Ada's matcher.
10496         * language.h (language_get_symbol_name_matcher): Adjust comment.
10497         (ada_lookup_name_info::verbatim_p):: New method.
10498
10499 2018-01-10  Pedro Alves  <palves@redhat.com>
10500
10501         PR gdb/22670
10502         * ada-lang.c (ada_collect_symbol_completion_matches): If the
10503         minsym's language is language_auto or language_cplus, pass down
10504         language_ada instead.
10505         * symtab.c (compare_symbol_name): Don't frob symbol language here.
10506
10507 2018-01-10  Pedro Alves  <palves@redhat.com>
10508
10509         PR gdb/22670
10510         * minsyms.c (linkage_name_str): New function.
10511         (iterate_over_minimal_symbols): Use it.
10512
10513 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
10514
10515         * NEWS: Document that 'info proc' now works on FreeBSD.
10516
10517 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
10518
10519         * configure.ac: Check for kinfo_getfile in libutil.
10520         * configure: Regenerate.
10521         * config.in: Regenerate.
10522         * fbsd-nat.c: Include "fbsd-tdep.h".
10523         (fbsd_fetch_cmdline): New.
10524         (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
10525         rather than calling error.
10526         (fbsd_info_proc): New.
10527         (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
10528         (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
10529         (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
10530
10531 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
10532
10533         * fbsd-nat.c (struct free_deleter): Remove.
10534         (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
10535
10536 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
10537
10538         * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
10539         NULL for an empty pathname.
10540
10541 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
10542
10543         * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
10544         (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
10545         (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
10546         (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
10547         (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
10548         (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
10549         (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
10550         (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
10551         (kinfo_proc_layout_32, kinfo_proc_layout_i386)
10552         (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
10553         (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
10554         (fbsd_core_fetch_timeval, fbsd_print_sigset)
10555         (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
10556         (fbsd_init_abi):  Install gdbarch "core_info_proc" method.
10557         * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
10558
10559 2018-01-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>
10560
10561         * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
10562         (gnu_xfer_auxv): New function.
10563         (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
10564         TARGET_OBJECT_AUXV.
10565
10566 2018-01-08  Yao Qi  <yao.qi@linaro.org>
10567             Simon Marchi  <simon.marchi@ericsson.com>
10568
10569         * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
10570         common/selftest.c.
10571         (COMMON_OBS): Remove selftest.o.
10572         * configure.ac: Append selftest-arch.c and common/selftest.c to
10573         CONFIG_SRCS.  Append selftest-arch.o and selftest.o to COMMON_OBS.
10574         * configure: Re-generated.
10575         * maint.c (maintenance_selftest): Wrap selftests::run_tests with
10576         GDB_SELF_TEST.
10577         (maintenance_info_selftests): Likewise.
10578
10579 2018-01-08  Xavier Roirand  <roirand@adacore.com>
10580
10581         * ada-valprint.c (val_print_packed_array_elements): Use
10582         proper number of elements when printing an array indexed
10583         by an enumeration type.
10584
10585 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
10586
10587         * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
10588         (dw2_get_file_names_reader): Adjust.
10589         (lookup_dwo_signatured_type): Adjust.
10590         (lookup_dwp_signatured_type): Adjust.
10591         (lookup_signatured_type): Adjust.
10592         (create_type_unit_group): Adjust.
10593         (get_type_unit_group): Adjust.
10594         (process_psymtab_comp_unit_reader): Adjust.
10595         (build_type_psymtabs_reader): Adjust.
10596         (scan_partial_symbols): Adjust.
10597         (add_partial_symbol): Adjust.
10598         (add_partial_subprogram): Adjust.
10599         (peek_die_abbrev): Adjust.
10600         (fixup_go_packaging): Adjust.
10601         (process_imported_unit_die): Adjust.
10602         (dwarf2_compute_name): Adjust.
10603         (dwarf2_physname): Adjust.
10604         (read_import_statement): Adjust.
10605         (handle_DW_AT_stmt_list): Adjust.
10606         (read_file_scope): Adjust.
10607         (read_func_scope): Adjust.
10608         (read_lexical_block_scope): Adjust.
10609         (read_call_site_scope): Adjust.
10610         (read_variable): Adjust.
10611         (dwarf2_rnglists_process): Adjust.
10612         (dwarf2_ranges_process): Adjust.
10613         (dwarf2_ranges_read): Adjust.
10614         (dwarf2_get_pc_bounds): Adjust.
10615         (dwarf2_record_block_ranges): Adjust.
10616         (dwarf2_add_field): Adjust.
10617         (dwarf2_add_member_fn): Adjust.
10618         (read_structure_type): Adjust.
10619         (process_structure_scope): Adjust.
10620         (read_enumeration_type): Adjust.
10621         (read_array_type): Adjust.
10622         (mark_common_block_symbol_computed): Adjust.
10623         (read_common_block): Adjust.
10624         (read_namespace_type): Adjust.
10625         (read_namespace): Adjust.
10626         (read_module_type): Adjust.
10627         (read_tag_pointer_type): Adjust.
10628         (read_tag_ptr_to_member_type): Adjust.
10629         (read_tag_string_type): Adjust.
10630         (read_subroutine_type): Adjust.
10631         (read_typedef): Adjust.
10632         (read_base_type): Adjust.
10633         (attr_to_dynamic_prop): Adjust.
10634         (read_subrange_type): Adjust.
10635         (read_unspecified_type): Adjust.
10636         (dwarf2_read_abbrevs): Adjust.
10637         (load_partial_dies): Adjust.
10638         (read_partial_die): Adjust.
10639         (find_partial_die): Adjust.
10640         (guess_partial_die_structure_name): Adjust.
10641         (fixup_partial_die): Adjust.
10642         (read_attribute_value): Adjust.
10643         (read_addr_index): Adjust.
10644         (read_addr_index_from_leb128): Adjust.
10645         (read_str_index): Adjust.
10646         (dwarf2_string_attr): Adjust.
10647         (get_debug_line_section): Adjust.
10648         (dwarf_decode_line_header): Adjust.
10649         (lnp_state_machine::check_line_address): Adjust.
10650         (dwarf_decode_lines_1): Adjust.
10651         (dwarf_decode_lines): Adjust.
10652         (dwarf2_start_symtab): Adjust.
10653         (var_decode_location): Adjust.
10654         (new_symbol_full): Adjust.
10655         (dwarf2_const_value_data): Adjust.
10656         (dwarf2_const_value_attr): Adjust.
10657         (dwarf2_const_value): Adjust.
10658         (die_type): Adjust.
10659         (die_containing_type): Adjust.
10660         (build_error_marker_type): Adjust.
10661         (lookup_die_type): Adjust.
10662         (guess_full_die_structure_name): Adjust.
10663         (anonymous_struct_prefix): Adjust.
10664         (determine_prefix): Adjust.
10665         (dwarf2_name): Adjust.
10666         (follow_die_ref_or_sig): Adjust.
10667         (follow_die_offset): Adjust.
10668         (follow_die_ref): Adjust.
10669         (follow_die_sig_1): Adjust.
10670         (follow_die_sig): Adjust.
10671         (get_signatured_type): Adjust.
10672         (get_DW_AT_signature_type): Adjust.
10673         (decode_locdesc): Adjust.
10674         (dwarf_decode_macros): Adjust.
10675         (cu_debug_loc_section): Adjust.
10676         (fill_in_loclist_baton): Adjust.
10677         (dwarf2_symbol_mark_computed): Adjust.
10678         (init_one_comp_unit): Don't assign
10679         dwarf2_cu::dwarf2_per_objfile.
10680         (set_die_type): Adjust.
10681
10682 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
10683
10684         * dwarf2read.c (struct mapped_debug_names): Add constructor.
10685         <dwarf2_per_objfile>: New field.
10686         (dwarf2_per_objfile): Remove global.
10687         (get_dwarf2_per_objfile): New function.
10688         (set_dwarf2_per_objfile): New function.
10689         (dwarf2_build_psymtabs_hard): Change objfile parameter to
10690         dwarf2_per_objfile.
10691         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
10692         (read_abbrev_offset): Likewise.
10693         (read_indirect_string): Likewise.
10694         (read_indirect_line_string): Likewise.
10695         (read_indirect_string_at_offset): Likewise.
10696         (read_indirect_string_from_dwz): Likewise.
10697         (dwarf2_find_containing_comp_unit): Change objfile parameter to
10698         dwarf2_per_objfile.
10699         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
10700         (create_all_comp_units): Change objfile parameter to
10701         dwarf2_per_objfile.
10702         (create_all_type_units): Likewise.
10703         (process_queue): Add dwarf2_per_objfile parameter.
10704         (read_and_check_comp_unit_head): Likewise.
10705         (lookup_dwo_unit_in_dwp): Likewise.
10706         (get_dwp_file): Likewise.
10707         (process_cu_includes): Likewise.
10708         (struct free_dwo_file_cleanup_data): New struct.
10709         (dwarf2_has_info): Use get_dwarf2_per_objfile and
10710         set_dwarf2_per_objfile.
10711         (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
10712         (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
10713         context, adjust calls.
10714         (dw2_instantiate_symtab): Likewise.
10715         (dw2_get_cutu): Add dwarf2_per_objfile parameter.
10716         (dw2_get_cu): Likewise.
10717         (create_cu_from_index_list): Change objfile parameter to
10718         dwarf2_per_objfile.
10719         (create_cus_from_index_list): Get dwarf2_per_objfile from
10720         context, adjust calls.
10721         (create_cus_from_index): Likewise.
10722         (create_signatured_type_table_from_index): Change objfile
10723         parameter to dwarf2_per_objfile.
10724         (create_signatured_type_table_from_debug_names): Change objfile
10725         parameter to dwarf2_per_objfile.
10726         (create_addrmap_from_index): Likewise.
10727         (create_addrmap_from_aranges): Likewise.
10728         (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
10729         (dw2_setup): Remove.
10730         (dw2_get_file_names_reader): Get dwarf2_per_objfile from
10731         context.
10732         (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
10733         get_dwarf2_per_objfile.
10734         (dw2_forget_cached_source_info): Likewise.
10735         (dw2_map_symtabs_matching_filename): Likewise.
10736         (struct dw2_symtab_iterator) <index>: Remove.
10737         <dwarf2_per_objfile>: New field.
10738         (dw2_symtab_iter_init): Replace index parameter with
10739         dwarf2_per_objfile.
10740         (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
10741         (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
10742         (dw2_print_stats): Likewise.
10743         (dw2_dump): Likewise.
10744         (dw2_expand_symtabs_for_function): Likewise.
10745         (dw2_expand_all_symtabs): Likewise.
10746         (dw2_expand_symtabs_with_fullname): Likewise.
10747         (dw2_expand_marked_cus): Replace index and objfile parameters
10748         with dwarf2_per_objfile.
10749         (dw_expand_symtabs_matching_file_matcher): Add
10750         dwarf2_per_objfile parameter and adjust calls.
10751         (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
10752         adjust calls.
10753         (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
10754         (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
10755         adjust calls.
10756         (create_cus_from_debug_names_list): Replace objfile parameter
10757         with dwarf2_per_objfile and adjust calls.
10758         (create_cus_from_debug_names): Likewise.
10759         (dwarf2_read_debug_names): Likewise.
10760         (mapped_debug_names::namei_to_name): Adjust call.
10761         (dw2_debug_names_iterator::next): Likewise.
10762         (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
10763         (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
10764         (dw2_debug_names_dump): Likewise.
10765         (dw2_debug_names_expand_symtabs_for_function): Likewise.
10766         (dw2_debug_names_expand_symtabs_matching): Likewise.
10767         (dwarf2_initialize_objfile): Likewise.
10768         (dwarf2_build_psymtabs): Likewise.
10769         (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
10770         this_cu.
10771         (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
10772         (read_and_check_comp_unit_head): Likewise.
10773         (read_abbrev_offset): Likewise.
10774         (create_debug_type_hash_table): Likewise.
10775         (create_debug_types_hash_table): Likewise.
10776         (create_all_type_units): Replace objfile parameter with
10777         dwarf2_per_objfile.
10778         (add_type_unit): Add dwarf2_per_objfile parameter.
10779         (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
10780         with dwarf2_per_objfile.
10781         (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
10782         (lookup_dwp_signatured_type): Likewise.
10783         (lookup_signatured_type): Likewise.
10784         (read_cutu_die_from_dwo): Likewise.
10785         (init_tu_and_read_dwo_dies): Likewise.
10786         (init_cutu_and_read_dies): Likewise.
10787         (init_cutu_and_read_dies_no_follow): Likewise.
10788         (allocate_type_unit_groups_table): Add objfile parameter.
10789         (create_type_unit_group): Use dwarf2_per_objfile from cu.
10790         (get_type_unit_group): Likewise.
10791         (process_psymtab_comp_unit): Update call.
10792         (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
10793         (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
10794         (print_tu_stats): Likewise.
10795         (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
10796         in void* parameter.
10797         (build_type_psymtabs): Change objfile parameter to
10798         dwarf2_per_objfile.
10799         (process_skeletonless_type_unit): Use dwarf2_per_objfile
10800         passed in void* parameter.
10801         (process_skeletonless_type_units): Change objfile parameter to
10802         dwarf2_per_objfile.
10803         (set_partial_user): Likewise.
10804         (dwarf2_build_psymtabs_hard): Likewise.
10805         (read_comp_units_from_section): Likewise.
10806         (create_all_comp_units): Likewise.
10807         (scan_partial_symbols): Update calls.
10808         (add_partial_symbol): Likewise.
10809         (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
10810         (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
10811         (process_queue): Add dwarf2_per_objfile parameter.
10812         (get_compunit_symtab): Use dwarf2_per_objfile from cu.
10813         (compute_compunit_symtab_includes): Likewise.
10814         (process_cu_includes): Add dwarf2_per_objfile parameter.
10815         (process_full_comp_unit): Use dwarf2_per_objfile from cu.
10816         (process_full_type_unit): Likewise.
10817         (process_imported_unit_die): Update call.
10818         (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
10819         (read_file_scope): Likewise.
10820         (allocate_dwo_file_hash_table): Add objfile parameter.
10821         (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
10822         (create_cus_hash_table): Likewise.
10823         (create_dwp_hash_table): Likewise.
10824         (create_dwo_unit_in_dwp_v1): Likewise.
10825         (create_dwp_v2_section): Likewise.
10826         (create_dwo_unit_in_dwp_v2): Likewise.
10827         (lookup_dwo_unit_in_dwp): Likewise.
10828         (try_open_dwop_file): Likewise.
10829         (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
10830         (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
10831         cleanup to include a reference to dwarf2_per_objfile.
10832         (open_dwp_file): Add dwarf2_per_objfile parameter.
10833         (open_and_init_dwp_file): Likewise.
10834         (get_dwp_file): Likewise.
10835         (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
10836         (queue_and_load_all_dwo_tus): Update call.
10837         (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
10838         data.
10839         (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
10840         (dwarf2_ranges_process): Likewise.
10841         (dwarf2_get_pc_bounds): Likewise.
10842         (mark_common_block_symbol_computed): Likewise.
10843         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
10844         (dwarf2_read_abbrevs): Update call.
10845         (read_partial_die): Use dwarf2_per_objfile from cu.
10846         (find_partial_die): Likewise.
10847         (fixup_partial_die): Likewise.
10848         (read_attribute_value): Likewise.
10849         (read_indirect_string_at_offset_from): Add objfile parameter.
10850         (read_indirect_string_at_offset): Add dwarf2_per_objfile
10851         parameter.
10852         (read_indirect_string_from_dwz): Add objfile parameter.
10853         (read_indirect_string): Add objfile parameter.
10854         (read_addr_index_1): Add dwarf2_per_objfile parameter.
10855         (read_addr_index): Use dwarf2_per_objfile from cu.
10856         (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
10857         call dw2_setup.
10858         (read_str_index): Use dwarf2_per_objfile from cu.
10859         (get_debug_line_section): Likewise.
10860         (read_formatted_entries): Add dwarf2_per_objfile parameter.
10861         (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
10862         (new_symbol_full): Use dwarf2_per_objfile from cu.
10863         (build_error_marker_type): Likewise.
10864         (lookup_die_type): Likewise.
10865         (determine_prefix): Likewise.
10866         (follow_die_offset): Likewise.
10867         (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
10868         (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
10869         (dwarf2_fetch_die_type_sect_off): Likewise.
10870         (dwarf2_get_die_type): Likewise.
10871         (follow_die_sig_1): Use dwarf2_per_objfile from cu.
10872         (get_signatured_type): Likewise.
10873         (get_DW_AT_signature_type): Likewise.
10874         (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
10875         (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
10876         (cu_debug_loc_section): Likewise.
10877         (fill_in_loclist_baton): Likewise.
10878         (dwarf2_symbol_mark_computed): Likewise.
10879         (dwarf2_find_containing_comp_unit): Change objfile parameter to
10880         dwarf2_per_objfile.
10881         (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
10882         parameter.
10883         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
10884         (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
10885         (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
10886         (set_die_type): Use dwarf2_free_objfile from cu.
10887         (get_die_type_at_offset): Likewise.
10888         (dwarf2_per_objfile_free): Don't assign global variable.
10889         (debug_names) <constructor>: Add dwarf2_per_objfile
10890         parameter, update m_debugstrlookup construction.
10891         (debug_names::debug_str_lookup): Add dwarf2_per_objfile
10892         parameter.
10893         <m_dwarf2_per_objfile>: New field.
10894         <lookup>: Use m_dwarf2_per_objfile.
10895         (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
10896         (psyms_seen_size): Likewise.
10897         (write_gdbindex): Replace objfile parameter with
10898         dwarf2_per_objfile.
10899         (write_debug_names): Likewise.
10900         (write_psymtabs_to_index): Likewise.
10901         (save_gdb_index_command): Use get_dwarf2_per_objfile, update
10902         calls.
10903
10904 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
10905
10906         * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
10907         <dwarf2_per_objfile>: New field.
10908         (struct dwarf2_per_cu_data) <objfile>: Remove.
10909         <dwarf2_per_objfile>: New field.
10910         (create_cu_from_index_list): Assign dwarf2_per_objfile instead
10911         of objfile.
10912         (create_signatured_type_table_from_index): Likewise.
10913         (create_debug_type_hash_table): Likewise.
10914         (fill_in_sig_entry_from_dwo_entry): Likewise.
10915         (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
10916         (create_type_unit_group): Assign dwarf2_per_objfile instead of
10917         objfile.
10918         (create_partial_symtab): Access objfile through
10919         dwarf2_per_objfile.
10920         (process_psymtab_comp_unit_reader): Likewise.
10921         (read_comp_units_from_section): Likewise.
10922         (scan_partial_symbols): Likewise.
10923         (add_partial_symbol): Likewise.
10924         (add_partial_subprogram): Likewise.
10925         (peek_die_abbrev): Likewise.
10926         (fixup_go_packaging): Likewise.
10927         (process_full_comp_unit): Likewise.
10928         (process_full_type_unit): Likewise.
10929         (process_imported_unit_die): Likewise.
10930         (dwarf2_compute_name): Likewise.
10931         (dwarf2_physname): Likewise.
10932         (read_import_statement): Likewise.
10933         (create_cus_hash_table): Assign dwarf2_physname instead of
10934         objfile.
10935         (read_func_scope): Access objfile through dwarf2_per_objfile.
10936         (read_lexical_block_scope): Likewise.
10937         (read_call_site_scope): Likewise.
10938         (read_variable): Likewise.
10939         (dwarf2_rnglists_process): Likewise.
10940         (dwarf2_ranges_process): Likewise.
10941         (dwarf2_ranges_read): Likewise.
10942         (dwarf2_record_block_ranges): Likewise.
10943         (dwarf2_add_field): Likewise.
10944         (dwarf2_add_member_fn): Likewise.
10945         (read_structure_type): Likewise.
10946         (process_structure_scope): Likewise.
10947         (read_enumeration_type): Likewise.
10948         (read_array_type): Likewise.
10949         (read_common_block): Likewise.
10950         (read_namespace_type): Likewise.
10951         (read_namespace): Likewise.
10952         (read_module_type): Likewise.
10953         (read_tag_pointer_type): Likewise.
10954         (read_tag_ptr_to_member_type): Likewise.
10955         (read_tag_string_type): Likewise.
10956         (read_subroutine_type): Likewise.
10957         (read_typedef): Likewise.
10958         (read_base_type): Likewise.
10959         (attr_to_dynamic_prop): Likewise.
10960         (read_subrange_type): Likewise.
10961         (read_unspecified_type): Likewise.
10962         (load_partial_dies): Likewise.
10963         (read_partial_die): Likewise.
10964         (find_partial_die): Likewise.
10965         (guess_partial_die_structure_name): Likewise.
10966         (fixup_partial_die): Likewise.
10967         (read_attribute_value): Likewise.
10968         (read_addr_index_from_leb128): Likewise.
10969         (dwarf2_read_addr_index): Likewise.
10970         (dwarf2_string_attr): Likewise.
10971         (lnp_state_machine::check_line_address): Likewise.
10972         (dwarf_decode_lines_1): Likewise.
10973         (dwarf_decode_lines): Likewise.
10974         (dwarf2_start_symtab): Likewise.
10975         (var_decode_location): Likewise.
10976         (new_symbol_full): Likewise.
10977         (dwarf2_const_value_data): Likewise.
10978         (dwarf2_const_value_attr): Likewise.
10979         (dwarf2_const_value): Likewise.
10980         (die_type): Likewise.
10981         (die_containing_type): Likewise.
10982         (lookup_die_type): Likewise.
10983         (guess_full_die_structure_name): Likewise.
10984         (anonymous_struct_prefix): Likewise.
10985         (dwarf2_name): Likewise.
10986         (follow_die_ref_or_sig): Likewise.
10987         (follow_die_offset): Likewise.
10988         (follow_die_ref): Likewise.
10989         (dwarf2_fetch_die_loc_sect_off): Likewise.
10990         (dwarf2_fetch_constant_bytes): Likewise.
10991         (dwarf2_fetch_die_type_sect_off): Likewise.
10992         (dwarf2_get_die_type): Likewise.
10993         (follow_die_sig): Likewise.
10994         (decode_locdesc): Likewise.
10995         (dwarf2_per_cu_objfile): Likewise.
10996         (dwarf2_per_cu_text_offset): Likewise.
10997         (init_one_comp_unit): Assign dwarf2_per_objfile instead of
10998         objfile.
10999         (set_die_type): Access objfile through
11000         dwarf2_per_objfile.
11001
11002 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
11003
11004         * valprint.c (converted_character_d): Remove typedef.
11005         (DEF_VEC_O (converted_character_d)): Remove.
11006         (count_next_character): Use std::vector.
11007         (print_converted_chars_to_obstack): Likewise.
11008         (generic_printstr): Likewise.
11009
11010 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
11011
11012         * xml-support.h (struct gdb_xml_value): Add constructor.
11013         <value>: Change type to unique_xmalloc_ptr.
11014         (gdb_xml_value_s): Remove typedef.
11015         (DEF_VEC_O (gdb_xml_value_s)): Remove.
11016         (gdb_xml_element_start_handler): Change parameter type to
11017         std::vector.
11018         (xml_find_attribute): Likewise.
11019         * xml-support.c (xml_find_attribute): Change parameter type to
11020         std::vector and adjust.
11021         (gdb_xml_values_cleanup): Remove.
11022         (gdb_xml_parser::start_element): Adjust to std::vector.
11023         (xinclude_start_include): Change paraeter type to std::vector
11024         and adjust.
11025         * btrace.c (check_xml_btrace_version): Likewise.
11026         (parse_xml_btrace_block): Likewise.
11027         (parse_xml_btrace_pt_config_cpu): Likewise.
11028         (parse_xml_btrace_pt): Likewise.
11029         (parse_xml_btrace_conf_bts): Likewise.
11030         (parse_xml_btrace_conf_pt): Likewise.
11031         * memory-map.c (memory_map_start_memory): Likewise.
11032         (memory_map_start_property): Likewise.
11033         * osdata.c (osdata_start_osdata): Likewise.
11034         (osdata_start_item): Likewise.
11035         (osdata_start_column): Likewise.
11036         * remote.c (start_thread): Likewise.
11037         * solib-aix.c (library_list_start_library): Likewise.
11038         (library_list_start_list): Likewise.
11039         * solib-svr4.c (library_list_start_library): Likewise.
11040         (svr4_library_list_start_list): Likewise.
11041         * solib-target.c (library_list_start_segment): Likewise.
11042         (library_list_start_section): Likewise.
11043         (library_list_start_library): Likewise.
11044         (library_list_start_list): Likewise.
11045         * tracepoint.c (traceframe_info_start_memory): Likewise.
11046         (traceframe_info_start_tvar): Likewise.
11047         * xml-syscall.c (syscall_start_syscall): Likewise.
11048         * xml-tdesc.c (tdesc_start_target): Likewise.
11049         (tdesc_start_feature): Likewise.
11050         (tdesc_start_reg): Likewise.
11051         (tdesc_start_union): Likewise.
11052         (tdesc_start_struct): Likewise.
11053         (tdesc_start_flags): Likewise.
11054         (tdesc_start_enum): Likewise.
11055         (tdesc_start_field): Likewise.
11056         (tdesc_start_enum_value): Likewise.
11057         (tdesc_start_vector): Likewise.
11058
11059 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
11060
11061         * extension.h (struct xmethod_worker) <clone>: Remove.
11062         * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
11063         Remove.
11064         (python_xmethod_worker::clone): Remove.
11065         * valops.c (find_overload_match): Use std::move instead of
11066         clone.
11067
11068 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
11069
11070         * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
11071         (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
11072         <free_xmethod_worker_data>: Remove.
11073         <get_matching_xmethod_workers>: Chance VEC to std::vector.
11074         <get_xmethod_arg_types>: Remove.
11075         <get_xmethod_result_type>: Remove.
11076         <invoke_xmethod>: Remove.
11077         * extension.c (new_xmethod_worker): Remove.
11078         (clone_xmethod_worker): Remove.
11079         (get_matching_xmethod_workers): Return void, pass std::vector by
11080         pointer.
11081         (get_xmethod_arg_types): Rename to...
11082         (xmethod_worker::get_arg_types): ... this, and adjust.
11083         (get_xmethod_result_type): Rename to...
11084         (xmethod_worker::get_result_type): ... this, and adjust.
11085         (invoke_xmethod): Remove.
11086         (free_xmethod_worker): Remove.
11087         (free_xmethod_worker_vec): Remove.
11088         * extension.h (enum ext_lang_rc): Move here from
11089         extension-priv.h.
11090         (struct xmethod_worker): Add constructor and destructor.
11091         <data>: Remove.
11092         <value>: Remove.
11093         <invoke, clone, do_get_result_type, do_get_arg_types>: New
11094         virtual pure methods.
11095         <get_arg_types, get_result_type>: New methods.
11096         (xmethod_worker_ptr): Remove typedef.
11097         (DEF_VEC_P (xmethod_worker_ptr)): Remove.
11098         (xmethod_worker_vec): Remove typedef.
11099         (xmethod_worker_up): New typedef.
11100         (invoke_xmethod): Remove.
11101         (clone_xmethod_worker): Remove.
11102         (free_xmethod_worker): Remove.
11103         (free_xmethod_worker_vec): Remove.
11104         (get_xmethod_arg_types): Remove.
11105         (get_xmethod_result_type): Remove.
11106         * valops.c (find_method_list): Use std::vector, don't use
11107         intermediate vector.
11108         (value_find_oload_method_list): Use std::vector.
11109         (find_overload_match): Use std::vector.
11110         (find_oload_champ): Use std::vector.
11111         * value.c (value_free): Use operator delete.
11112         (value_of_xmethod): Rename to...
11113         (value_from_xmethod): ... this.  Don't assign
11114         xmethod_worker::value, take rvalue-reference.
11115         (result_type_of_xmethod): Adjust.
11116         (call_xmethod): Adjust.
11117         * value.h: Include extension.h.
11118         (struct xmethod_worker): Don't forward-declare.
11119         (value_of_xmethod): Rename to...
11120         (value_from_xmethod): ... this, take rvalue-reference.
11121         * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
11122         (struct python_xmethod_worker): ... this, add constructor and
11123         destructor.
11124         <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
11125         (gdbpy_free_xmethod_worker_data): Rename to...
11126         (python_xmethod_worker::~python_xmethod_worker): ... this and
11127         adjust.
11128         (gdbpy_clone_xmethod_worker_data): Rename to...
11129         (python_xmethod_worker::clone): ... this and adjust.
11130         (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
11131         temporary vector.
11132         (gdbpy_get_xmethod_arg_types): Rename to...
11133         (python_xmethod_worker::do_get_arg_types): ... this and adjust.
11134         (gdbpy_get_xmethod_result_type): Rename to...
11135         (python_xmethod_worker::do_get_result_type): ... this and
11136         adjust.
11137         (gdbpy_invoke_xmethod): Rename to...
11138         (python_xmethod_worker::invoke): ... this and adjust.
11139         (new_python_xmethod_worker): Rename to...
11140         (python_xmethod_worker::python_xmethod_worker): ... this and
11141         adjust.
11142         * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
11143         Remove.
11144         (gdbpy_free_xmethod_worker_data): Remove.
11145         (gdbpy_get_matching_xmethod_workers): Use std::vector.
11146         (gdbpy_get_xmethod_arg_types): Remove.
11147         (gdbpy_get_xmethod_result_type): Remove.
11148         (gdbpy_invoke_xmethod): Remove.
11149         * python/python.c (python_extension_ops): Remove obsolete
11150         callbacks.
11151
11152 2018-01-05  Pedro Alves  <palves@redhat.com>
11153
11154         PR gdb/18653
11155         * common/signals-state-save-restore.c
11156         (save_original_signals_state): New parameter 'quiet'.  Warn if we
11157         find a custom handler preinstalled, instead of internal erroring.
11158         But only warn if !quiet.
11159         * common/signals-state-save-restore.h
11160         (save_original_signals_state): New parameter 'quiet'.
11161         * main.c (captured_main_1): Move save_original_signals_state call
11162         after option handling, and pass QUIET.
11163
11164 2018-01-05  Pedro Alves  <palves@redhat.com>
11165
11166         * spu-tdep.c (spu_catch_start): Pass
11167         symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
11168
11169 2018-01-05  Pedro Alves  <palves@redhat.com>
11170
11171         PR gdb/22670
11172         * ada-lang.c (literal_symbol_name_matcher): New function.
11173         (ada_get_symbol_name_matcher): Use it for
11174         symbol_name_match_type::SEARCH_NAME.
11175         * block.c (block_lookup_symbol): New parameter 'match_type'.  Pass
11176         it down instead of assuming symbol_name_match_type::FULL.
11177         * block.h (block_lookup_symbol): New parameter 'match_type'.
11178         * c-valprint.c (print_unpacked_pointer): Use
11179         lookup_symbol_search_name instead of lookup_symbol.
11180         * compile/compile-object-load.c (get_out_value_type): Pass down
11181         symbol_name_match_type::SEARCH_NAME.
11182         * cp-namespace.c (cp_basic_lookup_symbol): Pass down
11183         symbol_name_match_type::FULL.
11184         * cp-support.c (cp_get_symbol_name_matcher): Handle
11185         symbol_name_match_type::SEARCH_NAME.
11186         * infrun.c (insert_exception_resume_breakpoint): Use
11187         lookup_symbol_search_name.
11188         * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
11189         * psymtab.c (maintenance_check_psymtabs): Use
11190         symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
11191         * stack.c (print_frame_args): Use lookup_symbol_search_name and
11192         SYMBOL_SEARCH_NAME.
11193         * symtab.c (lookup_local_symbol): Don't demangle the lookup name
11194         if symbol_name_match_type::SEARCH_NAME.
11195         (lookup_symbol_in_language): Pass down
11196         symbol_name_match_type::FULL.
11197         (lookup_symbol_search_name): New.
11198         (lookup_language_this): Pass down
11199         symbol_name_match_type::SEARCH_NAME.
11200         (lookup_symbol_aux, lookup_local_symbol): New parameter
11201         'match_type'.  Pass it down.
11202         * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
11203         (lookup_symbol_search_name): New declaration.
11204         (lookup_symbol_in_block): New 'match_type' parameter.
11205
11206 2018-01-05  Pedro Alves  <palves@redhat.com>
11207
11208         PR gdb/22670
11209         * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
11210         ada_lookup_symbol.
11211         (ada_lookup_symbol): Reimplement in terms of
11212         ada_lookup_symbol_list, bits factored out from
11213         ada_lookup_encoded_symbol.
11214
11215 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
11216
11217         * ada-exp.y (write_object_renaming): When subscripting an array
11218         using a symbol as the index, pass the block in call to
11219         ada_lookup_encoded_symbol when looking that symbol up.
11220
11221 2018-01-05  Jerome Guitton  <guitton@adacore.com>
11222
11223         * ada-lang.c (ada_array_length): Use ada_index_type instead of
11224         TYPE_INDEX_TYPE.
11225
11226 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
11227
11228         * ada-lang.c (ada_to_fixed_value_create): Add handling of
11229         the case where VALUE_LVAL (val0) is not lval_memory.
11230
11231 2018-01-05  Xavier Roirand  <roirand@adacore.com>
11232
11233         * ada-valprint.c (print_optional_low_bound): Handle
11234         character-indexed array printing like boolean-indexed array
11235         printing.
11236
11237 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
11238
11239         * NEWS: Create a new section for the next release branch.
11240         Rename the section of the current branch, now that it has
11241         been cut.
11242
11243 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
11244
11245         GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
11246         * version.in: Bump version to 8.1.50.DATE-git.
11247
11248 2018-01-03  Xavier Roirand  <roirand@adacore.com>
11249
11250         * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
11251         Add field.
11252         * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
11253         Add field.
11254         (default_exception_support_info) <catch_handlers_sym>: Add field.
11255         (exception_support_info_fallback) <catch_handlers_sym>: Add field.
11256         (ada_exception_name_addr_1): Add "catch handlers" handling.
11257         (ada_exception_catchpoint_cond_string) <ex>: New parameter.
11258         Update all callers.
11259         (create_excep_cond_exprs) <ex>: Add parameter.
11260         (re_set_exception): Update create_excep_cond_exprs call.
11261         (print_it_exception, print_one_exception, print_mention_exception)
11262         (print_recreate_exception): Add "catch handler" handling.
11263         (allocate_location_catch_handlers, re_set_catch_handlers)
11264         (check_status_catch_handlers, print_it_catch_handlers)
11265         (print_one_catch_handlers, print_mention_catch_handlers)
11266         (print_recreate_catch_handlers): New function.
11267         (catch_handlers_breakpoint_ops): New variable.
11268         (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
11269         Add parameter.  Add "catch handler" handling.
11270         (ada_exception_sym_name, ada_exception_breakpoint_ops):
11271         Add "catch handler" handling.
11272         (ada_exception_catchpoint_cond_string): Add "catch handler"
11273         handling.
11274         (create_ada_exception_catchpoint): Update create_excep_cond_exprs
11275         call.
11276         (catch_ada_handlers_command): New function.
11277         (initialize_ada_catchpoint_ops): Initialize "catch handlers"
11278         operations structure.
11279         (_initialize_ada_language): Add "catch handlers" command entry.
11280         * NEWS: Document "catch handlers" feature.
11281
11282 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
11283
11284         * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
11285         account when creating the array type of the slice.
11286         (ada_value_slice): Likewise.
11287
11288 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
11289
11290         * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
11291         New enum value.
11292         (create_array_type_with_stride): Add byte_stride_prop parameter.
11293         * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
11294         New parameter.  Update all callers in this file.
11295         (array_type_has_dynamic_stride): New function.
11296         (is_dynamic_type_internal, resolve_dynamic_array): Add handling
11297         of arrays with dynamic byte strides.
11298         * dwarf2read.c (read_array_type): Add support for dynamic
11299         DW_AT_byte_stride attributes.
11300
11301 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
11302
11303         * dwarf2read.c (read_unspecified_type): Treat
11304         DW_TAG_enumeration_type DIEs from Ada units as stubs.
11305
11306 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
11307
11308         Update copyright year range in all GDB files.
11309
11310 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
11311
11312         * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
11313         and gdb/testsuite/gdb.base/step-line.c.
11314
11315 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
11316
11317         * copyright.py (main): Dump the contents of
11318         MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
11319         even if BY_HAND is empty.
11320
11321 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
11322
11323         * top.c (print_gdb_version): Update Copyright year in version
11324         message.
11325
11326 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
11327
11328         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
11329
11330 For older changes see ChangeLog-2017.
11331 \f
11332 Local Variables:
11333 mode: change-log
11334 left-margin: 8
11335 fill-column: 74
11336 version-control: never
11337 coding: utf-8
11338 End: