Check result of "write"
[external/binutils.git] / gdb / ChangeLog
1 2018-08-08  Tom Tromey  <tom@tromey.com>
2
3         * unittests/scoped_mmap-selftests.c: Check result of "write".
4
5 2018-08-08  Jim Wilson  <jimw@sifive.com>
6
7         * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
8         (decode_register_index_short): New.
9         (decode_j_type_insn, decode_cj_type_insn): New.
10         (decode_b_type_insn, decode_cb_type_insn): New.
11         (riscv_insn::decode): Add support for jumps, branches, lr, and sc.  New
12         local xlen.  Check xlen when decoding ambiguous compressed insns.  In
13         compressed decode, use is_c_lui_insn instead of is_lui_insn, and
14         is_c_sw_insn instead of is_sw_insn.
15         (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
16         (riscv_software_single_step): New.
17         * riscv-tdep.h (riscv_software_single_step): Declare.
18
19         * riscv-tdep.c (riscv_isa_xlen): Drop static.
20         * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
21
22 2018-08-08  Andrew Burgess  <andrew.burgess@embecosm.com>
23
24         PR gdb/18050:
25         * target.c (dispose_inferior): Don't dispose of inferiors that are
26         already killed.
27
28 2018-08-08  Szabolcs Nagy  <szabolcs.nagy@arm.com>
29
30         * remote.c (remote_target::download_tracepoint): Change char* to
31         const char*.
32
33 2018-08-07  Simon Marchi  <simon.marchi@polymtl.ca>
34
35         * target.h (target_options_to_string): Return an std::string.
36         * target.c (str_comma_list_concat_elem): Return void, use
37         std::string.
38         (do_option): Likewise.
39         (target_options_to_string): Return an std::string.
40         * linux-nat.c (linux_nat_target::wait): Adjust.
41         * target-debug.h (target_debug_print_options): Adjust.
42
43 2018-08-07  Tom Tromey  <tom@tromey.com>
44
45         * Makefile.in (CPPFLAGS): New variable.
46         (INTERNAL_CPPFLAGS): Use it.
47
48 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
49
50         * NEWS: Mention the index cache.
51
52 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
53
54         * common/pathstuff.h (get_standard_cache_dir): New.
55         * common/pathstuff.c (get_standard_cache_dir): New.
56         * build-id.h (build_id_to_string): New.
57         * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
58         DEBUG_STR_SUFFIX): Move to here.
59         * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
60         DEBUG_STR_SUFFIX): Move from there.
61         (write_psymtabs_to_index): Make non-static, add basename
62         parameter.  Write to temporary files, rename when done.
63         (save_gdb_index_command): Adjust call to
64         write_psymtabs_to_index.
65         * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
66         field.
67         * dwarf2read.c (dwz_file) <index_cache_res>: New field.
68         (get_gdb_index_contents_from_cache): New.
69         (get_gdb_index_contents_from_cache_dwz): New.
70         (dwarf2_initialize_objfile): Read index from cache.
71         (dwarf2_build_psymtabs): Save to index.
72         * dwarf-index-cache.h: New file.
73         * dwarf-index-cache.c: New file.
74         * dwarf-index-write.h: New file.
75
76 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
77
78         * gnulib/aclocal.m4: Re-generate.
79         * gnulib/config.in: Re-generate.
80         * gnulib/configure: Re-generate.
81         * gnulib/import/Makefile.am: Re-generate.
82         * gnulib/import/Makefile.in: Re-generate.
83         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
84         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
85         * gnulib/import/m4/mkdir.m4: New file.
86         * gnulib/import/mkdir.c: New file.
87         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
88         module.
89
90 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
91
92         * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
93         * common/scoped_mmap.c: New file.
94         * common/scoped_mmap.h (destroy): New method.
95         (~scoped_mmap, reset): Use destroy.
96         (scoped_mmap): New move constructor.
97         (mmap_file): New declaration.
98         * unittests/scoped_mmap-selftests.c (test_normal,
99         test_invalid_filename, run_tests): New functions.
100         (_initialize_scoped_mmap_selftests): Register selftest.
101
102 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
103
104         * dwarf2read.c (read_gdb_index_from_section): Rename to...
105         (read_gdb_index_from_buffer): ... this.  Remove section
106         parameter, add buffer parameter.
107         (get_gdb_index_contents_ftype,
108         get_gdb_index_contents_dwz_ftype): New typedefs.
109         (dwarf2_read_gdb_index): Add callback parameters to get the
110         index contents.
111         (get_gdb_index_contents_from_section): New.
112         (dwarf2_initialize_objfile): Update call to
113         dwarf2_read_gdb_index.
114
115 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
116
117         * common/filestuff.h (gdb_fopen_cloexec): New overload.
118         (gdb_open_cloexec): Likewise.
119         * nat/linux-osdata.c (command_from_pid): Use string_printf.
120         (commandline_from_pid): Likewise.
121         (linux_xfer_osdata_threads): Likewise.
122         (linux_xfer_osdata_fds): Likewise.
123         * ada-lang.c (is_package_name): Likewise.
124         * auxv.c (procfs_xfer_auxv): Likewise.
125         * breakpoint.c (print_one_breakpoint_location): Use
126         uiout::field_fmt.
127         (print_one_catch_solib): Use string_printf.
128         * coff-pe-read.c (add_pe_exported_sym): Likewise.
129         (add_pe_forwarded_sym): Likewise.
130         * dwarf2read.c (create_type_unit_group): Likewise.
131         (build_error_marker_type): Likewise.
132         * infcall.c (get_function_name): Likewise.
133         * valprint.c (print_converted_chars_to_obstack): Likewise.
134         * xtensa-tdep.c (xtensa_register_type): Likewise.
135
136 2018-08-06  Simon Marchi  <simon.marchi@ericsson.com>
137
138         * remote.c (remote_target::download_tracepoint): Fix format
139         string errors.
140
141 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
142
143         * tracefile.c: Include common/byte-vector.h.
144         (trace_save): Change type of buf to gdb::byte_vector.  Initialize
145         with trace_regblock_size if needed.  Update uses of buf.
146
147 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
148
149         * tracepoint.h (collection_list) <m_regs_mask>: Change type to
150         std::vector<unsigned char>.
151         * tracepoint.c (collection_list::collection_list): Remove
152         m_regs_mask initializer from initializer list.  Resize
153         m_regs_mask using the largest remote register number.
154         (collection_list::add_remote_register): Remove size check on
155         m_regs_mask.  Use at to access element.
156         (collection_list::stringify): Change type of temp_buf to
157         gdb::char_vector.  Update uses of temp_buf.  Resize if needed to
158         stringify the register mask.  Use pack_hex_byte for the register
159         mask.
160
161 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
162
163         * tracepoint.h (class collection_list) <add_register>: Remove.
164         <add_remote_register, add_ax_registers, add_local_register>:
165         Declare.
166         <add_memrange>: Add scope parameter.
167         * tracepoint.c (encode_actions_1): Likewise.
168         (collection_list::add_register): Rename to ...
169         (collection_list::add_remote_register): ... this.  Update
170         comment.
171         (collection_list::add_ax_registers, add_local_register): New
172         methods.
173         (collection_list::add_memrange): Add scope parameter.  Call
174         add_local_register instead of add_register.
175         (finalize_tracepoint_aexpr): New function.
176         (collection_list::collect_symbol): Update calls to add_memrange.
177         Call add_local_register instead of add_register.  Call
178         add_ax_registers.  Call finalize_tracepoint_aexpr.
179         (encode_actions_1): Get remote regnos for $reg action.  Call
180         add_remote_register, add_ax_registers, and add_local_register.
181         Update call to add_memrange.  Call finalize_tracepoint_aexpr.
182         (validate_actionline): Call finalize_tracepoint_aexpr.
183
184 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
185
186         * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
187         Replace array buf with gdb::char_vector buf, of size
188         get_remote_packet_size ().  Replace references to buf and
189         BUF_SIZE to buf.data () and buf.size ().  Replace strcpy, strcat
190         and xsnprintf with snprintf.  Raise errors if the buffer is too
191         small.
192
193 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
194
195         * remote.c (remote_target::download_tracepoint): Fix the has_more
196         predicate in the QTDP action list iteration.
197
198 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
199
200         * remote.c (remote_target::download_tracepoint): Fix indentation
201         in for block.
202
203 2018-08-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
204
205         * proc-api.c (_initialize_proc_api): Remove c, unused.
206         * procfs.c (procfs_init_inferior): Remove signals, unused.
207         (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
208         unused.
209
210 2018-08-06  Sergey Korolev  <s.korolev@ndmsystems.com>
211             Andrew Burgess  <andrew.burgess@embecosm.com>
212
213         * linux-nat.c (linux_nat_target::follow_fork): Avoid using
214         'W_STOPCODE (0)' as this could be ambiguous.
215
216 2018-08-03  Sergio Durigan Junior  <sergiodj@redhat.com>
217
218         * ser-tcp.c (net_open): Fix thinko when deciding whether to
219         disable TCP's Nagle algorithm (use "ai_protocol" instead of
220         "ai_socktype").
221
222 2018-08-02  Tom Tromey  <tom@tromey.com>
223
224         PR symtab/16842.
225         * dwarf2read.c (read_func_scope): Set symtab on template parameter
226         symbols.
227         (process_structure_scope): Likewise.
228
229 2018-08-02  Xavier Roirand  <roirand@adacore.com>
230
231         PR gdb/22629:
232         * darwin-nat.c (darwin_kill_inferior): Fix handling of
233         kill inferior.
234
235 2018-08-02  Tom Tromey  <tom@tromey.com>
236
237         * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
238         (darwin_suspend_inferior, darwin_resume_inferior)
239         (darwin_decode_notify_message, darwin_resume_inferior_threads)
240         (darwin_check_new_threads): Check result of get_darwin_inferior.
241
242 2018-07-31  Joel Brobecker  <brobecker@adacore.com>
243
244         GDB 8.1.1 released.
245
246 2018-07-31  Jan Vrany  <jan.vrany@fit.cvut.cz>
247
248         * varobj.c (varobj_get_path_expr_parent): Report an error if
249         parent is a dynamic varobj.
250
251 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
252
253         * gnulib/aclocal.m4: Re-generate.
254         * gnulib/config.in: Re-generate.
255         * gnulib/configure: Re-generate.
256         * gnulib/import/Makefile.in: Re-generate.
257         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
258         * gnulib/import/m4/onceonly.m4: Re-generate.
259
260 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
261
262         * target-descriptions.c (struct xml_test_tdesc): New.
263         (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
264         (record_xml_tdesc): Update.
265         (maintenance_check_xml_descriptions): Update.
266         * target-descriptions.h (record_xml_tdesc): Update comment.
267
268 2018-07-30  Andrew Burgess  <andrew.burgess@embecosm.com>
269
270         * eval.c (evaluate_subexp_for_sizeof): Check for array type before
271         checking array bounds are defined.
272
273 2018-07-30  Tom Tromey  <tom@tromey.com>
274
275         * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
276         irreflexivity violation.
277
278 2018-07-30  Tom Tromey  <tom@tromey.com>
279
280         * cli/cli-decode.c (lookup_cmd): Remove lint code.
281         * value.c (unpack_long): Remove lint code.
282         * valops.c (value_ind): Remove lint code.
283         * valarith.c (value_x_binop, value_x_unop, value_equal)
284         (value_pos): Remove lint code.
285
286 2018-07-28  Tom de Vries  <tdevries@suse.de>
287
288         * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
289         with undefined upper bound as <optimized out>.
290
291 2018-07-27  Sergio Durigan Junior  <sergiodj@redhat.com>
292
293         * gcore.in: Rename variable "name" to "prefix".  Expand
294         "usage" text.
295
296 2018-07-14  Jon Turney  <jon.turney@dronecode.org.uk>
297
298         * windows-nat.c (windows_nat_target::create_inferior): Update to
299         call close() in global namespace.
300
301 2018-07-26  Tom Tromey  <tom@tromey.com>
302
303         * dwarf-index-write.c (add_address_entry): Don't add objfile
304         offsets.
305         * dbxread.c (find_stab_function): Rename from
306         find_stab_function_addr.  Return a bound_minimal_symbol.
307         (read_dbx_symtab): Use raw_text_low, raw_text_high.
308         Don't add objfile offsets.
309         (end_psymtab): Use raw_text_low, raw_text_high,
310         MSYMBOL_VALUE_RAW_ADDRESS.
311         (read_ofile_symtab): Update.
312         (process_one_symbol): Update.
313         * dwarf2read.c (create_addrmap_from_index): Don't add objfile
314         offsets.
315         (dw2_relocate): Remove.
316         (dw2_find_pc_sect_symtab): Bias PC by the text offset before
317         searching addrmap.
318         (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
319         Update.
320         (process_psymtab_comp_unit_reader, add_partial_symbol)
321         (add_partial_subprogram, dwarf2_ranges_read): Update.
322         (load_partial_dies): Update.
323         (add_address_entry): Don't add objfile offsets.
324         (dwarf2_build_include_psymtabs): Update.
325         (create_addrmap_from_aranges): Don't add objfile offsets.
326         (dw2_find_pc_sect_compunit_symtab): Update.
327         * mdebugread.c (parse_symbol): Don't add objfile offsets.
328         (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
329         Update.
330         (parse_partial_symbols): Don't add objfile offsets.  Use
331         raw_text_low, raw_text_high.  Update.
332         (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
333         * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
334         or call 'relocate' quick function.  Clear psymbol_map.
335         * psympriv.h (struct partial_symbol) <address>: Add section
336         offset.
337         <set_unrelocated_address>: Rename from set_address.
338         <raw_text_low, raw_text_high>: New methods.
339         <text_low, text_high>: Add objfile parameter.
340         (add_psymbol_to_bcache): Add 'section' parameter.  Call
341         set_unrelocated_address.
342         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
343         (find_pc_psymbol): Update.
344         (fixup_psymbol_section, relocate_psymtabs): Remove.
345         (dump_psymtab, psym_functions): Update.
346         (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
347         parameter.
348         (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
349         (start_psymtab_common): Update.
350         * symfile-debug.c (debug_qf_relocate): Remove.
351         (debug_sym_quick_functions): Update.
352         * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
353         * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
354         Update.
355
356 2018-07-26  Tom Tromey  <tromey@redhat.com>
357
358         * dbxread.c (end_psymtab): Use text_high_valid and
359         text_low_valid.
360         * mdebugread.c (parse_partial_symbols): Use text_low_valid.
361         (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
362         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
363         Update comment.
364         <text_low_valid, text_high_valid>: New fields.
365         <set_text_low, set_text_high>: Update.
366         * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
367
368 2018-07-26  Tom Tromey  <tom@tromey.com>
369
370         * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
371         Update.
372         * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
373         textlow and texthigh fields.
374         (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
375         Update.
376         * mdebugread.c (parse_lines, parse_partial_symbols)
377         (psymtab_to_symtab_1): Update.
378         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
379         Rename fields.  Update comment.  Now private.
380         <text_low, text_high, set_text_low, set_text_high>: New methods.
381         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
382         (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
383         (start_psymtab_common, maintenance_info_psymtabs)
384         (maintenance_check_psymtabs): Update.
385         * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
386         texthigh fields.
387         (scan_xcoff_symtab): Update.
388
389 2018-07-26  Tom Tromey  <tromey@redhat.com>
390
391         * psympriv.h (struct partial_symbol) <unrelocated_address,
392         address, set_address>: New methods.
393         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
394         (fixup_psymbol_section, relocate_psymtabs): Update.
395         (print_partial_symbols): Add 'objfile' parameter.  Update.
396         (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
397         Update.
398
399 2018-07-26  Tom Tromey  <tom@tromey.com>
400
401         * dwarf-index-write.c (write_psymbols, debug_names::insert)
402         (debug_names::write_psymbols): Update.
403         * psympriv.h (struct partial_symbol): Derive from
404         general_symbol_info.
405         <obj_section>: New method.
406         (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
407         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
408         (find_pc_sect_psymbol, fixup_psymbol_section)
409         (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
410         (print_partial_symbols, recursively_search_psymtabs)
411         (compare_psymbols, psymbol_hash, psymbol_compare)
412         (add_psymbol_to_bcache, maintenance_check_psymtabs)
413         (psymbol_name_matches, psym_fill_psymbol_map): Update.
414
415 2018-07-26  Tom Tromey  <tromey@redhat.com>
416
417         * dbxread.c (end_psymtab): Remove dead code.
418
419 2018-07-26  Andrew Burgess  <andrew.burgess@embecosm.com>
420
421         * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
422         DWARF unwinders are disabled.
423         * dwarf2-frame.c: Add dwarf2read.h include.
424         (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
425         disabled.
426         (dwarf2_frame_unwinders_enabled_p): Define.
427         (show_dwarf_unwinders_enabled_p): New function.
428         (_initialize_dwarf2_frame): Register switch to control DWARF
429         unwinder use.
430         * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
431         * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
432         (show_dwarf_cmdlist): Remove static keyword.
433         * dwarf2read.h (set_dwarf_cmdlist): Declare.
434         (show_dwarf_cmdlist): Declare.
435         * NEWS: Document new feature.
436
437 2018-07-26  Tom de Vries  <tdevries@suse.de>
438
439         PR breakpoints/23366
440         * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
441
442 2018-07-26  Tom de Vries  <tdevries@suse.de>
443
444         * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
445         DW_AT_count can't be translated to a dynamic prop.
446
447 2018-07-25  Tom de Vries  <tdevries@suse.de>
448
449         * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
450         try/catch.
451
452 2018-07-25  Jan Vrany  <jan.vrany@fit.cvut.cz>
453
454         * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
455
456 2018-07-25  Joel Brobecker  <brobecker@adacore.com>
457
458         * MAINTAINERS (Global Maintainers): Add Tom Tromey.
459
460 2018-07-24  Keith Seitz  <keiths@redhat.comt
461
462         PR symtab/23010
463         * dwarf2read.c (dw2_add_symbol_to_list): New function.
464         (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
465         instead of add_symbol_to_list.
466         (read_file_scope): Call prepare_one_comp_unit before reading
467         any other DIEs.
468
469 2018-07-24  Simon Marchi  <simon.marchi@ericsson.com>
470
471         * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
472
473 2018-07-24  Tom Tromey  <tom@tromey.com>
474
475         * utils.c (malloc, realloc, free): Don't declare.
476         * configure, config.in: Rebuild.
477         * configure.ac: Don't check for declarations of free, malloc, or
478         realloc.
479
480 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
481
482         * aarch64-linux-nat.c
483         (aarch64_linux_nat_target::stopped_data_address): Remove unused
484         variable.
485         * arm-linux-nat.c (fetch_regs): Likewise.
486         (store_regs): Likewise.
487         (fetch_vfp_regs): Likewise.
488         (store_vfp_regs): Likewise.
489         (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
490         (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
491         (arm_linux_nat_target::insert_watchpoint): Likewise.
492         (arm_linux_nat_target::remove_watchpoint): Likewise.
493         * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
494         Likewise.
495         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
496         Likewise.
497         * ppc-linux-nat.c (fetch_register): Likewise.
498         (fetch_all_gp_regs): Likewise.
499         (fetch_ppc_registers): Likewise.
500         (store_all_gp_regs): Likewise.
501         (store_ppc_registers): Likewise.
502         (hwdebug_insert_point): Likewise.
503         (can_use_watchpoint_cond_accel): Likewise.
504         * remote-sim.c (gdb_os_write_stdout): Likewise.
505
506 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
507             Tom Tromey  <tom@tromey.com>
508
509         * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
510         test for it.
511         * configure: Rebuild.
512
513 2018-07-22  Tom Tromey  <tom@tromey.com>
514
515         * regformats/regdat.sh: Define xmltarget_${name} inside
516         #ifndef IN_PROCESS_AGENT.
517
518 2018-07-22  Tom Tromey  <tom@tromey.com>
519
520         * value.c (value_fetch_lazy_bitfield): Remove unused variable.
521
522 2018-07-22  Tom Tromey  <tom@tromey.com>
523
524         * symfile.c (reread_symbols): Notify iter, not objfile.
525
526 2018-07-22  Tom Tromey  <tom@tromey.com>
527
528         * ravenscar-thread.c (ravenscar_thread_target::store_registers):
529         Use arch_ops.
530         (ravenscar_thread_target::prepare_to_store): Likewise.
531
532 2018-07-22  Tom Tromey  <tom@tromey.com>
533
534         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
535         unused variable.  Call value_fetch_lazy when needed.
536         * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
537         Remove unused variable.  Call value_fetch_lazy when needed.
538
539 2018-07-22  Tom Tromey  <tom@tromey.com>
540
541         * m32c-tdep.c (mark_dma): Return void.
542         (make_regs): Remove unused declarations.
543
544 2018-07-22  Tom Tromey  <tom@tromey.com>
545
546         * guile/scm-cmd.c (gdbscm_dont_repeat): Call
547         cmdscm_get_valid_command_smob_arg_unsafe for effect.
548         * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
549         bkscm_get_valid_block_smob_arg_unsafe for effect.
550
551 2018-07-22  Tom Tromey  <tom@tromey.com>
552
553         * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
554         value_type.
555
556 2018-07-22  Tom Tromey  <tom@tromey.com>
557
558         * windows-nat.c (saved_context): Conditionally define.
559         * remote.c (remote_target::remote_btrace_maybe_reopen):
560         Conditionally declare "warned".
561         * inflow.c (sigquit_ours): Conditionally define.
562         (new_tty): Move "tty" declaration inside #if.
563         * guile/guile.c (guile_datadir): Conditionally define.
564         * charset.c (set_be_le_names): Move some declarations inside #if.
565         * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
566         #if.
567         (parse_xml_btrace_conf): Likewise.
568
569 2018-07-22  Tom Tromey  <tom@tromey.com>
570
571         * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
572
573 2018-07-22  Tom Tromey  <tom@tromey.com>
574
575         * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
576         * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
577         (vlscm_convert_typed_value_from_scheme): Remove unused variable.
578         * buildsym-legacy.c (get_macro_table): Remove unused variable.
579         * stack.c (frame_apply_level_command): Remove unused variable.
580         * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
581         * sparc64-tdep.c (adi_examine_command): Remove unused variable.
582         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
583         unused variable.
584         * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
585         * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
586         * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
587         variable.
588         * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
589         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
590         variable.
591         * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
592         Remove unused variable.
593         * cli/cli-script.c (recurse_read_control_structure): Remove unused
594         variable.
595         * common/tdesc.c (print_xml_feature::visit): Remove unused
596         variable.
597         * compile/compile-object-load.c (store_regs): Remove unused
598         variables.
599         * complaints.c (clear_complaints): Remove unused variable.
600         * corelow.c (core_target_open): Remove unused variable.
601         * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
602         variable.
603         * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
604         variable.
605         * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
606         variable.
607         * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
608         variable.
609         * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
610         variable.
611         * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
612         variable.
613         * ia64-tdep.c (examine_prologue): Remove unused variable.
614         * infcall.c (run_inferior_call): Remove unused variable.
615         * inferior.c (exit_inferior): Remove unused variable.
616         * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
617         * linespec.c (decode_line_2): Remove unused variable.
618         * linux-nat.c (super_close): Remove.
619         * linux-tdep.c (linux_info_proc): Remove unused variable.
620         * mi/mi-main.c (mi_execute_command): Remove unused variable.
621         * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
622         Remove unused variable.
623         * parse.c (find_minsym_type_and_address): Remove unused variable.
624         * printcmd.c (info_symbol_command, printf_floating): Remove unused
625         variable.
626         * python/py-breakpoint.c (bppy_set_commands): Remove unused
627         variable.
628         * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
629         variables.
630         * record-btrace.c (record_btrace_target::store_registers): Remove
631         unused variable.
632         (cmd_show_record_btrace_cpu): Remove unused variable.
633         * riscv-tdep.c (riscv_register_reggroup_p)
634         (riscv_push_dummy_call, riscv_return_value): Remove unused
635         variable.
636         * rust-exp.y (literal): Remove unused variable.
637         * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
638         unused variable.
639         <STRUCTOP_ANONYMOUS>: Likewise.
640         * s390-linux-tdep.c (s390_linux_init_abi_31)
641         (s390_linux_init_abi_64): Remove unused variable.
642         * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
643         (file_select_thread, net_windows_open, _initialize_ser_windows):
644         Remove unused variables.
645         * symtab.c (find_pc_sect_line): Remove unused variable.
646         * target-memory.c (compute_garbled_blocks): Remove unused
647         variable.
648         (target_write_memory_blocks): Remove unused variable.
649         * target.c (target_stack::unpush): Remove unused variables.
650         * tracepoint.c (start_tracing, all_tracepoint_actions)
651         (merge_uploaded_trace_state_variables)
652         (print_one_static_tracepoint_marker): Remove unused variable.
653         * unittests/basic_string_view/element_access/char/1.cc (test01):
654         Remove unused variable.
655         * windows-nat.c (windows_continue, windows_add_all_dlls)
656         (do_initial_windows_stuff, windows_nat_target::create_inferior):
657         Remove unused variables.
658
659 2018-07-21  Simon Marchi  <simon.marchi@polymtl.ca>
660
661         * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
662         attr_profile in HAVE_ELF.
663         * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
664         HAVE_ELF.
665
666 2018-07-20  Simon Marchi  <simon.marchi@polymtl.ca>
667
668         * frame.c (frame_register_unwind): Change parameter name.
669         (frame_unwind_register): Likewise.
670         (frame_unwind_register_value): Likewise.
671         (frame_unwind_register_signed): Likewise.
672         (frame_unwind_register_unsigned): Likewise.
673         * frame.h (frame_register_unwind): Likewise.
674         (frame_unwind_register): Likewise.
675         (frame_unwind_register_value): Likewise.
676         (frame_unwind_register_signed): Likewise.
677         (frame_unwind_register_unsigned): Likewise.
678         (frame_unwind_arch): Likewise.
679
680 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
681
682         * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
683         ISA maintenance.
684
685 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
686
687         * mips-linux-nat.c (mips_linux_nat_target::read_description):
688         Call `get_ptrace_pid' rather than extracting the ptrace PID by
689         hand.
690
691 2018-07-20  Keith Seitz  <keiths@redhat.com>
692
693         * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
694         m_main_subfile, m_comp_dir, m_producer, m_debugformat,
695         m_compunit_symtab, m_language>: Add "m_" prefix.
696         Update all uses.
697         * buildsym.c: Update all uses.
698
699 2018-07-20  Tom Tromey  <tom@tromey.com>
700
701         * buildsym-legacy.h (record_line): Don't use record_line_ftype.
702         * buildsym.h (record_line_ftype): Remove typedef.
703
704 2018-07-20  Tom Tromey  <tom@tromey.com>
705
706         * buildsym-legacy.h (augment_type_symtab): Don't declare.
707         (end_expandable_symtab): Likewise.
708         (end_symtab_get_static_block): Likewise.
709         (end_symtab_from_static_block): Likewise.
710         * buildsym-legacy.c (augment_type_symtab): Remove.
711         (end_expandable_symtab): Remove.
712         (end_symtab_get_static_block): Remove.
713         (end_symtab_from_static_block): Remove.
714
715 2018-07-20  Tom Tromey  <tom@tromey.com>
716
717         * dwarf2read.c: Include buildsym.h.
718         (struct dwarf2_cu) <builder>: New method.
719         (fixup_go_packaging): Update.
720         (process_full_comp_unit, process_full_type_unit): Update.  Don't
721         use scoped_free_pendings.
722         (using_directives): Add "cu" parameter, remove "language".
723         (read_import_statement, setup_type_unit_groups, )
724         (read_func_scope, read_lexical_block_scope)
725         (dwarf2_record_block_ranges, read_namespace): Update.
726         (lnp_state_machine::lnp_state_machine): Add cu parameter.
727         (lnp_state_machine::handle_end_sequence): Update.
728         (class lnp_state_machine) <m_cu>: New member.
729         <m_record_line_callback>: Remove.
730         <m_currently_recording_lines>: New member.
731         (lnp_state_machine::handle_set_file): Update.
732         (noop_record_line): Remove.
733         (dwarf_record_line_p): Add cu parameter.
734         (dwarf_record_line_1, dwarf_finish_line): Likewise.
735         (lnp_state_machine::record_line)
736         (lnp_state_machine::lnp_state_machine)
737         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
738         (dwarf_decode_lines): Update.
739         (dwarf2_start_subfile): Add cu parameter.
740         (dwarf2_start_symtab, new_symbol): Update.
741         (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
742         Remove dwarf2_per_objfile parameter.
743         (dwarf_decode_macros): Update.
744
745 2018-07-20  Tom Tromey  <tom@tromey.com>
746
747         * stabsread.c (define_symbol): Update.
748         * buildsym-legacy.h (get_buildsym_compunit): Declare.
749         * dwarf2read.c (new_symbol): Update.
750         * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
751         * cp-namespace.c: Include buildsym.h.
752         (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
753         * buildsym-legacy.c (get_buildsym_compunit): New function.
754
755 2018-07-20  Tom Tromey  <tom@tromey.com>
756
757         * xcoffread.c: Include buildsym-legacy.h.
758         * windows-nat.c: Include buildsym-legacy.h.
759         * stabsread.c: Include buildsym-legacy.h.
760         * mdebugread.c: Include buildsym-legacy.h.
761         * buildsym-legacy.h: New file.
762         * buildsym-legacy.c: New file, from buildsym.c.
763         * go32-nat.c: Include buildsym-legacy.h.
764         * dwarf2read.c: Include buildsym-legacy.h.
765         * dbxread.c: Include buildsym-legacy.h.
766         * cp-namespace.c: Include buildsym-legacy.h.
767         * coffread.c: Include buildsym-legacy.h.
768         * buildsym.h: Move some contents to buildsym-legacy.h.
769         * buildsym.c: Include buildsym-legacy.h.  Move many functions to
770         buildsym-legacy.c.
771         * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
772
773 2018-07-20  Tom Tromey  <tom@tromey.com>
774
775         * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
776         * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
777         (buildsym_compunit::buildsym_compunit)
778         (buildsym_compunit::~buildsym_compunit)
779         (buildsym_compunit::get_macro_table): Define.
780
781 2018-07-20  Tom Tromey  <tom@tromey.com>
782
783         * buildsym.c (reset_symtab_globals): Remove.
784         (buildsym_compunit::end_symtab_from_static_block): Update.
785         (buildsym_compunit::augment_type_symtab): Update.
786         (end_symtab_from_static_block): Call free_buildsym_compunit.
787         (augment_type_symtab, end_symtab, end_expandable_symtab):
788         Likewise.
789
790 2018-07-20  Tom Tromey  <tom@tromey.com>
791
792         * arch-utils.c: Do not include buildsym.h.
793         * mipsread.c: Do not include buildsym.h.
794         * machoread.c: Do not include buildsym.h.
795         * elfread.c: Do not include buildsym.h.
796
797 2018-07-20  Tom Tromey  <tom@tromey.com>
798
799         * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
800         initialization.
801         (buildsym_compunit): Add new constructor.
802         (struct buildsym_compunit) <get_last_source_file, finish_block,
803         record_block_range, start_subfile, patch_subfile_names,
804         push_subfile, pop_subfile, record_line, get_compunit_symtab,
805         set_last_source_start_addr, get_last_source_start_addr,
806         get_local_using_directives, set_local_using_directives,
807         get_global_using_directives, outermost_context_p,
808         get_current_context_stack, get_context_stack_depth,
809         get_current_subfile, get_local_symbols, get_file_symbols,
810         get_global_symbols, record_debugformat, record_producer,
811         push_context, pop_context, end_symtab_get_static_block,
812         end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
813         New public methods.
814         <record_pending_block, finish_block_internal, make_blockvector,
815         watch_main_source_file_lossage, end_symtab_with_blockvector>: New
816         private methods.
817         Update all users.
818
819 2018-05-22  Tom Tromey  <tom@tromey.com>
820
821         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
822         parameter.
823         (finish_block_internal): Update.
824
825 2018-07-20  Tom Tromey  <tom@tromey.com>
826
827         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
828         parameter.
829         (finish_block_internal): Update.
830
831 2018-07-20  Tom Tromey  <tom@tromey.com>
832
833         * buildsym.h (EXTERN): Don't define or undef.
834         * buildsym.c (EXTERN): Don't define.
835
836 2018-07-20  Tom Tromey  <tom@tromey.com>
837
838         * buildsym.c: Remove TODO comment.
839
840 2018-07-20  Tom Tromey  <tom@tromey.com>
841
842         * coffread.c (coff_symtab_read): Update.
843         * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
844         (xcoff_new_init): Update.
845         * mipsread.c (mipscoff_new_init): Update.
846         * mdebugread.c (mdebug_build_psymtabs): Update.
847         * elfread.c (elf_new_init): Update.
848         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
849         Update.
850         * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
851         (coffstab_build_psymtabs, elfstab_build_psymtabs)
852         (stabsect_build_psymtabs): Update.
853         * buildsym.h (buildsym_init): Don't declare.
854         * buildsym.c: Update comment.
855         (prepare_for_building): Remove.
856         (start_symtab, restart_symtab): Update.
857         (reset_symtab_globals): Update comment.
858         (buildsym_init): Remove.
859
860 2018-07-20  Tom Tromey  <tom@tromey.com>
861
862         * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
863         * stabsread.c (patch_block_stabs, define_symbol, read_type)
864         (read_enum_type, common_block_start, common_block_end)
865         (cleanup_undefined_types_1, finish_global_stabs): Update.
866         * mdebugread.c (psymtab_to_symtab_1): Update.
867         * dwarf2read.c (fixup_go_packaging, read_func_scope)
868         (read_lexical_block_scope, new_symbol): Update.
869         * dbxread.c (process_one_symbol): Update.
870         * coffread.c (coff_symtab_read, process_coff_symbol)
871         (coff_read_enum_type): Update.
872         * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
873         declare.
874         (get_local_symbols, get_file_symbols, get_global_symbols): New
875         functions.
876         * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
877         m_global_symbols.
878         <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
879         (~scoped_free_pendings): Update.
880         (finish_block, prepare_for_building, reset_symtab_globals)
881         (end_symtab_get_static_block, end_symtab_with_blockvector)
882         (augment_type_symtab, push_context): Update.
883         (get_local_symbols, get_file_symbols, get_global_symbols): New
884         functions.
885         (buildsym_init): Update.
886
887 2018-07-20  Tom Tromey  <tom@tromey.com>
888
889         * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
890         (process_full_type_unit): Likewise.
891         (dwarf2_start_symtab): Set list_in_scope.
892
893 2018-07-20  Tom Tromey  <tom@tromey.com>
894
895         * dwarf2read.c (process_psymtab_comp_unit_reader)
896         (build_type_psymtabs_reader): Do not set list_in_scope.
897
898 2018-07-20  Tom Tromey  <tom@tromey.com>
899
900         * buildsym.c (free_pendings): Remove.
901         (add_symbol_to_list, scoped_free_pendings)
902         (finish_block_internal, buildsym_init): Update.
903
904 2018-07-20  Tom Tromey  <tom@tromey.com>
905
906         * xcoffread.c (read_xcoff_symtab): Update.
907         * dwarf2read.c (read_func_scope, read_lexical_block_scope):
908         Update.
909         * dbxread.c (process_one_symbol): Update.
910         * coffread.c (coff_symtab_read): Update.
911         * buildsym.h (finish_block): Update.
912         * buildsym.c (finish_block): Remove "listhead" argument.
913         (end_symtab_get_static_block): Update.
914
915 2018-07-20  Tom Tromey  <tom@tromey.com>
916
917         * buildsym.h (class scoped_free_pendings): Remove constructor.
918         * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
919         method.
920         <m_pending_block_obstack, m_pending_blocks>: New members.
921         (pending_block_obstack, pending_blocks): Remove.
922         (scoped_free_pendings::scoped_free_pendings): Default.
923         (~scoped_free_pendings): Update.
924         (free_pending_blocks): Remove.
925         (finish_block_internal, record_pending_block, make_blockvector)
926         (end_symtab_get_static_block, augment_type_symtab, push_context)
927         (buildsym_init): Update.
928
929 2018-07-20  Tom Tromey  <tom@tromey.com>
930
931         * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
932         m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
933         members.
934         (pending_addrmap, pending_addrmap_obstack)
935         (pending_addrmap_interesting): Remove.
936         (scoped_free_pendings, record_block_range, make_blockvector)
937         (prepare_for_building, reset_symtab_globals, buildsym_init):
938         Update.
939
940 2018-07-20  Tom Tromey  <tom@tromey.com>
941
942         * xcoffread.c (process_linenos): Update.
943         * stabsread.c (define_symbol, read_type, read_enum_type): Update.
944         * mdebugread.c (psymtab_to_symtab_1): Update.
945         * dwarf2read.c (setup_type_unit_groups)
946         (lnp_state_machine::handle_set_file, dwarf_record_line_p)
947         (lnp_state_machine::record_line, dwarf_decode_lines): Update.
948         * dbxread.c (process_one_symbol): Update.
949         * coffread.c (coff_symtab_read, enter_linenos)
950         (process_coff_symbol): Update.
951         * buildsym.h (current_subfile): Don't declare.
952         (get_current_subfile): Declare.
953         * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
954         member.
955         (start_subfile, free_buildsym_compunit, push_subfile)
956         (prepare_for_building, start_symtab): Update.
957         (get_current_subfile): New function.
958
959 2018-07-20  Tom Tromey  <tom@tromey.com>
960
961         * coffread.c (coff_symtab_read): Update.
962         * xcoffread.c (read_xcoff_symtab): Update.
963         * dwarf2read.c (new_symbol): Update.
964         (read_func_scope, read_lexical_block_scope): Update.
965         * dbxread.c (process_one_symbol): Update.
966         * buildsym.h (context_stack, context_stack_depth): Don't declare.
967         (outermost_context_p): Remove macro.
968         (outermost_context_p, get_current_context_stack)
969         (get_context_stack_depth): Declare.
970         (pop_context): Return struct context_stack.
971         * buildsym.c (struct buildsym_compunit) <m_context_stack: New
972         member.
973         (context_stack_size): Remove.
974         (INITIAL_CONTEXT_STACK_SIZE): Remove.
975         (prepare_for_building, end_symtab_get_static_block)
976         (augment_type_symtab, push_context): Update.
977         (pop_context): Return struct context_stack.
978         (outermost_context_p, get_current_context_stack)
979         (get_context_stack_depth): New functions.
980         (buildsym_init): Update.
981
982 2018-07-20  Tom Tromey  <tom@tromey.com>
983
984         * rust-exp.y: Now a pure parser.  Update all rules.
985         (%union): Move earlier.
986         (current_parser, work_obstack): Remove globals.
987         (rust_parser, ~rust_parser): Update.
988         (class rust_parser) <copy_name, concat3, crate_name, super_name,
989         lex_character, lex_number, lex_string, lex_identifier,
990         rust_lookup_type, convert_params_to_types, convert_ast_to_type,
991         convert_name, convert_params_to_expression,
992         convert_ast_to_expression, ast_basic_type, ast_operation,
993         ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
994         ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
995         ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
996         ast_array_type, ast_slice_type, ast_reference_type,
997         ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
998         (rust_parse): Update.
999         (rustyyerror, rustyylex): Add parser parameter.
1000         (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
1001         (rust_lex_stringish_test, rust_lex_test_sequence)
1002         (rust_lex_test_trailing_dot, rust_lex_test_completion)
1003         (rust_lex_test_push_back, rust_lex_tests): Update.
1004
1005 2018-07-19  Pedro Alves  <palves@redhat.com>
1006
1007         * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
1008         gdb::unique_xmalloc_ptr.
1009         * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
1010         Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
1011         * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
1012         copy-initialization.
1013         * guile/scm-pretty-print.c (ppscm_print_children): Use
1014         gdb::unique_xmalloc_ptr instead of cleanups.
1015         (gdbscm_apply_val_pretty_printer): Remove cleanups.
1016         * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
1017         gdb::unique_xmalloc_ptr.
1018         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
1019         Adjust to use gdb::unique_xmalloc_ptr.
1020         * guile/scm-utils.c (extract_arg): Adjust.
1021         * guile/scm-value.c (gdbscm_value_field): Adjust to use
1022         gdb::unique_xmalloc_ptr instead of a cleanup.
1023
1024 2018-07-19  Tom Tromey  <tom@tromey.com>
1025
1026         * utils.c (do_value_free_to_mark)
1027         (make_cleanup_value_free_to_mark): Remove.
1028         * utils.h (make_cleanup_value_free_to_mark): Remove.
1029
1030 2018-07-19  Pedro Alves  <palves@redhat.com>
1031
1032         * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
1033         forwarding reference.
1034
1035 2018-07-18  Pedro Alves  <palves@redhat.com>
1036
1037         * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
1038         gdbscm_wrap.  Use gdb::unique_xmalloc_ptr<char> instead of a
1039         cleanup.
1040
1041 2018-07-18  Pedro Alves  <palves@redhat.com>
1042
1043         * guile/guile-internal.h: Add comment about mixing GDB and Scheme
1044         exceptions.
1045         (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
1046         (gdbscm_wrap): New.
1047         * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
1048         directly instead of a cleanup.
1049         * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
1050         (vlscm_unop): ... this.  Reimplement using gdbscm_wrap.
1051         (vlscm_binop_gdbthrow): New, factored out from ...
1052         (vlscm_binop): ... this.  Reimplement using gdbscm_wrap.
1053         (vlscm_rich_compare): Use gdbscm_wrap.
1054         * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
1055         instead of a cleanup.
1056         (gdbscm_lookup_global_symbol): Use xfree directly instead of a
1057         cleanup.
1058         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
1059         Use xfree directly instead of a cleanup.
1060         * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
1061         Adjust to use gdbscm_wrap and scoped_value_mark.
1062         (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
1063         (gdbscm_value_address, gdbscm_value_dereference)
1064         (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
1065         scoped_value_mark.
1066         (gdbscm_value_dynamic_type): Use scoped_value_mark.
1067         (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
1068         scoped_value_mark.
1069         (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
1070         gdbscm_wrap and scoped_value_mark.
1071         (gdbscm_value_to_string): Use xfree directly instead of a
1072         cleanup.  Move 'buffer' unique_ptr to TRY scope.
1073         (gdbscm_value_to_lazy_string): Use xfree directly instead of a
1074         cleanup.  Move 'buffer' unique_ptr to TRY scope.  Use
1075         scoped_value_mark.
1076         (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
1077         (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
1078         scoped_value_mark.
1079         (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
1080         gdbscm_wrap.
1081
1082 2018-07-18  Tom de Vries  <tdevries@suse.de>
1083
1084         * findvar.c (default_read_var_value): Also resolve dynamic type for
1085         LOC_OPTIMIZED_OUT vars.
1086
1087 2018-07-18  Maciej W. Rozycki  <macro@mips.com>
1088
1089         * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
1090         decoding.
1091
1092 2018-07-17  Tom Tromey  <tom@tromey.com>
1093
1094         * guile/scm-param.c (pascm_set_func, pascm_show_func)
1095         (compute_enum_list, pascm_set_param_value_x)
1096         (gdbscm_parameter_value): Update.
1097         * guile/guile-internal.h (gdbscm_scm_to_string): Update.
1098         (gdbscm_scm_to_host_string): Update.
1099         * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
1100         Update.
1101         * guile/scm-cmd.c (cmdscm_add_completion): Update.
1102         * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
1103         * guile/scm-string.c (gdbscm_scm_to_string): Return
1104         unique_xmalloc_ptr.
1105         (gdbscm_scm_to_host_string): Likewise.
1106
1107 2018-07-17  Tom Tromey  <tom@tromey.com>
1108
1109         * guile/guile.c (gdbscm_eval_from_control_command): Update.
1110         * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
1111         * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
1112         * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
1113         unique_xmalloc_ptr.
1114
1115 2018-07-17  Tom Tromey  <tom@tromey.com>
1116
1117         * guile/scm-param.c (pascm_signal_setshow_error): Update.
1118         * guile/guile-internal.h (gdbscm_exception_message_to_string):
1119         Update.
1120         * guile/scm-cmd.c (cmdscm_function): Update.
1121         * guile/scm-pretty-print.c
1122         (ppscm_print_exception_unless_memory_error): Update.
1123         * guile/scm-exception.c (gdbscm_exception_message_to_string):
1124         Return unique_xmalloc_ptr.
1125
1126 2018-07-17  Tom Tromey  <tom@tromey.com>
1127
1128         * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
1129         Use string_printf.
1130
1131 2018-07-17  Jim Wilson  <jimw@sifive.com>
1132
1133         * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
1134         set_gdbarch_decr_pc_after_break.  Call riscv_read_misa_reg always.
1135         (riscv_gdbarch_init): Delete local has_compressed_isa.  Delete now
1136         unecessary braces after EF_RISCV_RVC test.  Delete call to
1137         set_gdbarch_decr_pc_after_break.
1138
1139         * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
1140         RISCV_LAST_FP_REGNUM + 1.
1141         (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
1142
1143 2018-07-17  Tom Tromey  <tom@tromey.com>
1144
1145         * configure.ac: Remove --disable-gdbcli.
1146         * configure: Rebuild.
1147         * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
1148         (SUBDIR_CLI_CFLAGS): Remove.
1149         (SFILES): Use SUBDIR_CLI_SRCS.
1150         (COMMON_OBS): Use SUBDIR_CLI_OBS.
1151
1152 2018-07-17  Tom Tromey  <tom@tromey.com>
1153
1154         PR gdb/18624:
1155         * coffread.c (coff_symtab_read): Use scoped_free_pendings.
1156
1157 2018-07-16  Jim Wilson  <jimw@sifive.com>
1158
1159         * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
1160
1161 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
1162
1163         * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
1164         variable.
1165         (libunwind_frame_sniffer): Likewise.
1166         (libunwind_frame_prev_register): Likewise.
1167         (libunwind_sigtramp_frame_sniffer): Likewise.
1168         * ia64-tdep.c (ia64_access_reg): Likewise.
1169         (ia64_access_rse_reg): Likewise.
1170         (ia64_libunwind_sigtramp_frame_this_id): Likewise.
1171         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
1172
1173 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
1174
1175         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
1176
1177 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
1178
1179         * remote-sim.c (gdbsim_target::close,
1180         gdbsim_target::mourn_inferior): Remove unused variables.
1181
1182 2018-07-16  Simon Marchi  <simon.marchi@polymtl.ca>
1183
1184         * ia64-tdep.c (ktab_buf): New global.
1185         (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
1186         (get_kernel_table): Adjust.
1187
1188 2018-07-16  Tom Tromey  <tom@tromey.com>
1189
1190         * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
1191         * dwarf2read.c (using_directives, new_symbol): Use
1192         outermost_context_p.
1193         * dbxread.c (process_one_symbol): Use outermost_context_p.
1194         * coffread.c (coff_symtab_read): Use outermost_context_p.
1195
1196 2018-07-16  Tom Tromey  <tom@tromey.com>
1197
1198         * dwarf2read.c (using_directives, read_func_scope)
1199         (read_lexical_block_scope): Update.
1200         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
1201         * buildsym.h (local_using_directives, global_using_directives):
1202         Don't declare.
1203         (get_local_using_directives, set_local_using_directives)
1204         (get_global_using_directives): Declare.
1205         * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
1206         m_global_using_directives>: New members.
1207         (finish_block_internal, prepare_for_building)
1208         (reset_symtab_globals, end_symtab_get_static_block)
1209         (push_context): Update.
1210         (get_local_using_directives, set_local_using_directives)
1211         (get_global_using_directives): New functions.
1212         (buildsym_init): Update.
1213
1214 2018-07-16  Tom Tromey  <tom@tromey.com>
1215
1216         * xcoffread.c (xcoff_initial_scan): Don't call
1217         free_pending_blocks.
1218         * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
1219         * buildsym.h (class scoped_free_pendings): Add constructor.
1220         (free_pending_blocks): Don't declare.
1221         * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
1222         (free_pending_blocks): Now static.
1223
1224 2018-07-16  Tom Tromey  <tom@tromey.com>
1225
1226         * buildsym.h (push_subfile, pop_subfile): Update declarations.
1227         * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
1228         member.
1229         (struct subfile_stack): Remove.
1230         (subfile_stack): Remove.
1231         (push_subfile, pop_subfile, buildsym_init): Update.
1232
1233 2018-07-16  Tom Tromey  <tom@tromey.com>
1234
1235         * buildsym.c (push_subfile): Use gdb_assert.
1236         (pop_subfile): Use gdb_assert.
1237
1238 2018-07-16  Tom Tromey  <tom@tromey.com>
1239
1240         * buildsym.h (merge_symbol_lists): Remove.
1241         * buildsym.c (merge_symbol_lists): Remove.
1242
1243 2018-07-16  Tom Tromey  <tom@tromey.com>
1244
1245         * stabsread.c (scan_file_globals): Update comment.
1246         * stabsread.h (scan_file_globals): Move from buildsym.h.
1247         * buildsym.h (scan_file_globals): Move to stabsread.h.
1248
1249 2018-07-16  Tom Tromey  <tom@tromey.com>
1250
1251         * xcoffread.c (xcoff_new_init): Update.
1252         * mipsread.c (mipscoff_new_init): Update.
1253         * mdebugread.c (mdebug_build_psymtabs): Update.
1254         * elfread.c (elf_new_init): Update.
1255         * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
1256         (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
1257         * buildsym.h (buildsym_new_init): Don't declare.
1258         * buildsym.c (buildsym_new_init): Remove.
1259
1260 2018-07-16  Tom Tromey  <tom@tromey.com>
1261
1262         * stabsread.h (within_function): Move from buildsym.h.
1263         * stabsread.c (start_stabs): Clear within_function.
1264         * coffread.c (coff_start_symtab): Clear within_function.
1265         * buildsym.h (within_function): Move to stabsread.h.
1266         * buildsym.c (prepare_for_building): Update.
1267
1268 2018-07-16  Tom Tromey  <tom@tromey.com>
1269
1270         * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
1271         * dwarf2read.c (dwarf2_start_symtab): Don't set
1272         processing_gcc_compilation.
1273         * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
1274
1275 2018-07-16  Tom Tromey  <tom@tromey.com>
1276
1277         * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
1278         (next_symbol_text_func): Move from buildsym.h.
1279         * stabsread.c (hashname): Move from buildsym.c.
1280         * buildsym.h (HASHSIZE, symnum, next_symbol_text)
1281         (next_symbol_text_func, hashname): Move to stabsread.h.
1282         * buildsym.c: Don't include bcache.h
1283         (hashname): Move to stasbread.c.
1284
1285 2018-07-16  Tom Tromey  <tom@tromey.com>
1286
1287         * buildsym.h (context_stack_size): Don't declare.
1288         * buildsym.c (context_stack_size): New global.
1289
1290 2018-07-16  Tom Tromey  <tom@tromey.com>
1291
1292         * dbxread.c (processing_acc_compilation): New global.
1293         * buildsym.h (processing_acc_compilation): Don't declare.
1294
1295 2018-07-16  Tom Tromey  <tom@tromey.com>
1296
1297         * xcoffread.c (aix_process_linenos, complete_symtab): Update.
1298         * dbxread.c (read_ofile_symtab): Update.
1299         * coffread.c (coff_start_symtab, coff_end_symtab): Update.
1300         * buildsym.h (last_source_start_addr): Remove.
1301         (set_last_source_start_addr, get_last_source_start_addr):
1302         Declare.
1303         * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
1304         parameter.
1305         (struct buildsym_compunit) <m_last_source_start_addr>: New
1306         member.
1307         (prepare_for_building): Remove start_addr parameter.
1308         (start_symtab, restart_symtab, end_symtab_get_static_block)
1309         (end_symtab_with_blockvector): Update.
1310         (set_last_source_start_addr, get_last_source_start_addr): New
1311         functions.
1312
1313 2018-07-16  Tom Tromey  <tom@tromey.com>
1314
1315         * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
1316         member.
1317         (have_line_numbers): Remove.
1318         (record_line, prepare_for_building, end_symtab_get_static_block)
1319         (augment_type_symtab): Update.
1320
1321 2018-07-16  Tom Tromey  <tom@tromey.com>
1322
1323         * buildsym.c (~buildsym_compunit): Free the macro table.
1324         (struct buildsym_compunit) <get_macro_table, release_macros>: New
1325         methods.
1326         <m_pending_macros>: New member.
1327         (pending_macros): Remove.
1328         (~scoped_free_pendings, get_macro_table, prepare_for_building)
1329         (reset_symtab_globals, end_symtab_get_static_block)
1330         (end_symtab_with_blockvector, augment_type_symtab)
1331         (buildsym_init): Update.
1332
1333 2018-07-16  Tom Tromey  <tom@tromey.com>
1334
1335         * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
1336         parameter.
1337         (buildsym_compunit::set_last_source_file): New method.
1338         <m_last_source_file>: New member.
1339         (prepare_for_building): Remove "name" parameter.
1340         (start_symtab, restart_symtab, reset_symtab_globals): Update.
1341         (last_source_file): Remove.
1342         (set_last_source_file, get_last_source_file): Update.
1343
1344 2018-07-16  Tom Tromey  <tom@tromey.com>
1345
1346         * buildsym.c (prepare_for_building): Add assert.
1347
1348 2018-07-16  Tom Tromey  <tom@tromey.com>
1349
1350         * buildsym.c (~buildsym_compunit): Update.
1351         (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
1352         (start_subfile, patch_subfile_names)
1353         (end_symtab_with_blockvector): Update.
1354
1355 2018-07-16  Tom Tromey  <tom@tromey.com>
1356
1357         * buildsym.c (struct buildsym_compunit): Add constructor,
1358         destructor, initializers.
1359         (start_buildsym_compunit): Remove.
1360         (free_buildsym_compunit): Use "delete".
1361         (start_symtab, restart_symtab): Use "new".
1362
1363 2018-07-13  Simon Marchi  <simon.marchi@polymtl.ca>
1364
1365         * symfile.c (set_objfile_default_section_offset): Remove struct
1366         keyword.
1367
1368 2018-07-14  Stafford Horne  <shorne@gmail.com>
1369
1370         * (Responsible Maintainers): Add myself as or1k maintainer.
1371
1372 2018-07-13  Tom Tromey  <tom@tromey.com>
1373
1374         * symfile.c (set_objfile_default_section_offset): Use extra braces
1375         around initializer.
1376
1377 2018-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1378
1379         * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
1380         non-branching basr.
1381
1382 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1383
1384         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1385         unittests/cli-utils-selftests.c
1386         * unittests/cli-utils-selftests.c: New file.
1387
1388 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1389
1390         * NEWS: Mention new commands. Mention change to 'thread apply'.
1391
1392 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1393
1394         * thread.c (thr_try_catch_cmd): New function.
1395         (thread_apply_all_command): Handle qcs flags.
1396         (thread_apply_command): Handle qcs flags.
1397         (taas_command): New function.
1398         (tfaas_command): New function.
1399         (_initialize_thread): Update to setup the new commands 'taas
1400         and 'tfaas'. Change doc string for 'thread apply'.
1401
1402 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1403
1404         * stack.c: (trailing_outermost_frame): New function, mostly
1405         extracted from backtrace_command_1.
1406         (leading_innermost_frame): New function.
1407         (backtrace_command_1): Update to call trailing_outermost_frame.
1408         (frame_apply_command_count): New function.
1409         (frame_apply_level_command): New function.
1410         (frame_apply_all_command): New function.
1411         (frame_apply_command): New function.
1412         (faas_command): New function.
1413         (frame_cmd_list): New variable.
1414         (_initialize_stack): Update to setup the new commands 'frame apply'
1415         and 'faas'.
1416
1417 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1418
1419         * cli-utils.c (number_or_range_parser::get_number): Only handle
1420         numbers or convenience var as numbers.
1421         (parse_flags): New function.
1422         (parse_flags_qcs): New function.
1423         (number_or_range_parser::finished): Ensure parsing end is detected
1424         before end of string.
1425         * cli-utils.h (parse_flags): New function.
1426         (parse_flags_qcs): New function.
1427         (number_or_range_parser): Remove m_finished bool.
1428         (number_or_range_parser::skip_range): Set m_in_range to false.
1429
1430 2018-07-12  Sergio Durigan Junior  <sergiodj@redhat.com>
1431
1432         * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
1433         on Windows.
1434
1435 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
1436             Jan Kratochvil  <jan.kratochvil@redhat.com>
1437             Paul Fertser  <fercerpav@gmail.com>
1438             Tsutomu Seki  <sekiriki@gmail.com>
1439             Pedro Alves  <palves@redhat.com>
1440
1441         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1442         'unittests/parse-connection-spec-selftests.c'.
1443         (COMMON_SFILES): Add 'common/netstuff.c'.
1444         (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
1445         * NEWS (Changes since GDB 8.2): Mention IPv6 support.
1446         * common/netstuff.c: New file.
1447         * common/netstuff.h: New file.
1448         * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
1449         (wait_for_connect): Update comment.  New parameter
1450         'gdb::optional<int> sock' instead of 'struct serial *scb'.
1451         Use 'sock' directly instead of 'scb->fd'.
1452         (try_connect): New function, with code from 'net_open'.
1453         (net_open): Rewrite main loop to deal with multiple
1454         sockets/addresses.  Handle IPv6-style hostnames; implement
1455         support for IPv6 connections.
1456         * unittests/parse-connection-spec-selftests.c: New file.
1457
1458 2018-07-11  Pedro Alves  <palves@redhat.com>
1459
1460         PR gdb/23377
1461         * remote.c (remote_target::remote_detach_pid): Call
1462         set_current_process.
1463
1464 2018-07-11  Pedro Alves  <palves@redhat.com>
1465
1466         * h8300-tdep.c (h8300_gdbarch_init): Remove
1467         set_gdbarch_ecoff_reg_to_regnum calls.
1468
1469 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
1470
1471         PR c++/23373
1472         * c-typeprint.c (c_type_print_base_struct_union): Don't print
1473         offsets/sizes for static members of a class/struct.
1474
1475 2018-07-11  Alan Hayward  <alan.hayward@arm.com>
1476
1477         * target-descriptions.c (tdesc_register_bitsize): Rename.
1478         * target-descriptions.h (tdesc_register_bitsize): Likewise.
1479         * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
1480         * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
1481
1482 2018-07-10  Tom Tromey  <tom@tromey.com>
1483
1484         * breakpoint.c (moribund_locations): Now static and a
1485         std::vector.
1486         (breakpoint_init_inferior, moribund_breakpoint_here_p)
1487         (build_bpstat_chain, update_global_location_list)
1488         (breakpoint_retire_moribund): Update.
1489         * breakpoint.h (bp_location_p): Remove typedef.  Don't declare
1490         VEC.
1491
1492 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
1493
1494         * riscv-tdep.c (riscv_is_fp_regno_p): New function.
1495         (riscv_register_reggroup_p): Use new function, remove unneeded
1496         parenthesis.
1497         (riscv_push_dummy_call): Extend assert to compare against xlen or
1498         flen based on register type.
1499
1500 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
1501
1502         * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
1503
1504 2018-07-09  Andrew Burgess  <andrew.burgess@embecosm.com>
1505
1506         * remote.c (show_hardware_watchpoint_limit): New function.
1507         (show_hardware_watchpoint_length_limit): New function.
1508         (show_hardware_breakpoint_limit): New function.
1509         (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
1510         where appropriate, update help text.
1511
1512 2018-07-09  Tom Tromey  <tom@tromey.com>
1513
1514         * Makefile.in (CDEPS): Don't mention XM_CDEPS.
1515         (CLIBS): Don't mention NAT_CLIBS.
1516
1517 2018-07-09  Tom Tromey  <tom@tromey.com>
1518
1519         * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
1520         (LIBGDB_OBS, clean mostlyclean): Update.
1521         (gdb$(EXEEXT), insight$(EXEEXT)): Update.
1522
1523 2018-07-09  Tom Tromey  <tom@tromey.com>
1524
1525         * Makefile.in (%.c: %.y): Use ECHO_YACC.
1526         (%.c: %.l): Use ECHO_LEX.  Just fail if flex not available.
1527         * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
1528
1529 2018-07-09  Tom Tromey  <tom@tromey.com>
1530
1531         * Makefile.in (ALLDEPFILES): Remove exec.c.
1532         (COMMON_OBS): Remove exec.o.
1533         (COMMON_SFILES): Add exec.c.
1534
1535 2018-07-09  Tom Tromey  <tom@tromey.com>
1536
1537         * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
1538
1539 2018-07-09  Tom Tromey  <tom@tromey.com>
1540
1541         * Makefile.in (clean mostlyclean): Remove stamp-version.
1542         (version.c): Depend on stamp-version.
1543         (stamp-version): New rule, from version.c rule.
1544
1545 2018-07-09  Tom Tromey  <tom@tromey.com>
1546
1547         * Makefile.in (init.c): Depend on stamp-init.
1548         (stamp-init): New rule, from init.c rule.
1549         (clean mostlyclean): Remove stamp-init.
1550
1551 2018-07-09  Tom Tromey  <tom@tromey.com>
1552
1553         * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
1554         SUBDIR_GCC_COMPILE_SRCS.
1555
1556 2018-07-09  Tom Tromey  <tom@tromey.com>
1557
1558         * Makefile.in (init.c): Remove some unused sed rules.
1559
1560 2018-07-09  Tom Tromey  <tom@tromey.com>
1561
1562         * Makefile.in (TSOBS): Remove.
1563         (INIT_FILES): Update.
1564         (LIBGDB_OBS): Update.
1565         (COMMON_SFILES): Add inflow.c.
1566         (SFILES): Remove inflow.c.
1567
1568 2018-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
1569
1570         * contrib/gdb-add-index.sh ($dwarf5): New, use it.
1571
1572 2018-07-07  Simon Marchi  <simon.marchi@polymtl.ca>
1573
1574         * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
1575         get_saveloc_name, is_signal_frame_name, step_name,
1576         init_remote_name, create_addr_space_name,
1577         destroy_addr_space_name, search_unwind_table_name,
1578         find_dyn_list_name): Constify.
1579
1580 2018-07-05  Simon Marchi  <simon.marchi@polymtl.ca>
1581
1582         * darwin-nat.c (darwin_pthread_kill): New function.
1583         (darwin_resume_thread): Use darwin_pthread_kill.
1584
1585 2018-07-05  Tom de Vries  <tdevries@suse.de>
1586
1587         * macroexp.c (macro_buffer) <operator=>: New member function.
1588
1589 2018-07-04  Tom Tromey  <tom@tromey.com>
1590
1591         * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
1592
1593 2018-07-04  Simon Marchi  <simon.marchi@polymtl.ca>
1594
1595         * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
1596         * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
1597         * maint.c: Likewise.
1598         * top.c: Likewise.
1599
1600 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
1601
1602         * NEWS: Create a new section for the next release branch.
1603         Rename the section of the current branch, now that it has
1604         been cut.
1605
1606 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
1607
1608         GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
1609         * version.in: Bump version to 8.2.50.DATE-git.
1610
1611 2018-07-04  Vyacheslav Barinov  <v.barinov@samsung.com>
1612             Pedro Alves  <palves@redhat.com>
1613
1614         * linux-nat.c (linux_init_ptrace): Rename to ...
1615         (linux_init_ptrace_procfs): ... this.  Call
1616         linux_proc_init_warnings.
1617         (linux_nat_target::post_attach)
1618         (linux_nat_target::post_startup_inferior): Adjust.
1619         * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
1620         * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
1621
1622 2018-07-04  Tom de Vries  <tdevries@suse.de>
1623
1624         * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
1625         check ...
1626         (read_comp_unit_head): ... here.
1627
1628 2018-07-03  Tom Tromey  <tom@tromey.com>
1629
1630         * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
1631         (stop_tracing, tstatus_command)
1632         (find_matching_tracepoint_location, merge_uploaded_tracepoints)
1633         (print_one_static_tracepoint_marker): Update.
1634         * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
1635         std::vector.
1636         * breakpoint.h (breakpoint_p): Remove typedef.  Don't declare
1637         VEC.
1638         (all_tracepoints, static_tracepoints_here): Return std::vector.
1639
1640 2018-07-03  Tom Tromey  <tom@tromey.com>
1641
1642         * common/ptid.c (ptid_equal): Remove.
1643         * common/ptid.h (ptid_equal): Don't declare.
1644         * ada-tasks.c: Update.
1645         * breakpoint.c: Update.
1646         * common/agent.c: Update.
1647         * corelow.c: Update.
1648         * darwin-nat-info.c: Update.
1649         * darwin-nat.c: Update.
1650         * dcache.c: Update.
1651         * dtrace-probe.c: Update.
1652         * dummy-frame.c: Update.
1653         * fbsd-nat.c: Update.
1654         * frame.c: Update.
1655         * gdbthread.h: Update.
1656         * gnu-nat.c: Update.
1657         * go32-nat.c: Update.
1658         * inf-loop.c: Update.
1659         * inf-ptrace.c: Update.
1660         * infcall.c: Update.
1661         * infcmd.c: Update.
1662         * inflow.c: Update.
1663         * infrun.c: Update.
1664         * linux-fork.c: Update.
1665         * linux-nat.c: Update.
1666         * linux-thread-db.c: Update.
1667         * mi/mi-cmd-var.c: Update.
1668         * mi/mi-interp.c: Update.
1669         * mi/mi-main.c: Update.
1670         * nto-procfs.c: Update.
1671         * ppc-linux-tdep.c: Update.
1672         * procfs.c: Update.
1673         * python/py-inferior.c: Update.
1674         * python/py-record-btrace.c: Update.
1675         * python/py-record.c: Update.
1676         * ravenscar-thread.c: Update.
1677         * regcache.c: Update.
1678         * remote-sim.c: Update.
1679         * remote.c: Update.
1680         * sol-thread.c: Update.
1681         * solib.c: Update.
1682         * target.c: Update.
1683         * tui/tui-stack.c: Update.
1684         * varobj.c: Update.
1685         * windows-nat.c: Update.
1686         * windows-tdep.c: Update.
1687
1688 2018-07-03  Tom Tromey  <tom@tromey.com>
1689
1690         * common/ptid.c (ptid_match): Remove.
1691         * common/ptid.h (ptid_match): Don't declare.
1692         * fbsd-nat.c: Update.
1693         * infcmd.c: Update.
1694         * infrun.c: Update.
1695         * linux-nat.c: Update.
1696         * record-btrace.c: Update.
1697         * regcache.c: Update.
1698         * remote.c: Update.
1699
1700 2018-07-03  Tom Tromey  <tom@tromey.com>
1701
1702         * common/ptid.c (ptid_tid_p): Remove.
1703         * common/ptid.h (ptid_tid_p): Don't declare.
1704         * sol-thread.c: Update.
1705
1706 2018-07-03  Tom Tromey  <tom@tromey.com>
1707
1708         * common/ptid.c (ptid_lwp_p): Remove.
1709         * common/ptid.h (ptid_lwp_p): Don't declare.
1710         * fbsd-nat.c: Update.
1711         * linux-nat.c: Update.
1712         * nat/linux-procfs.c: Update.
1713         * nat/x86-linux-dregs.c: Update.
1714         * sol-thread.c: Update.
1715
1716 2018-07-03  Tom Tromey  <tom@tromey.com>
1717
1718         * common/ptid.c (ptid_is_pid): Remove.
1719         * common/ptid.h (ptid_is_pid): Don't declare.
1720         * infrun.c: Update.
1721         * linux-nat.c: Update.
1722         * mi/mi-interp.c: Update.
1723         * remote.c: Update.
1724         * thread.c: Update.
1725
1726 2018-07-03  Tom Tromey  <tom@tromey.com>
1727
1728         * common/ptid.c (ptid_get_tid): Remove.
1729         * common/ptid.h (ptid_get_tid): Don't declare.
1730         * ada-tasks.c: Update.
1731         * aix-thread.c: Update.
1732         * bsd-uthread.c: Update.
1733         * darwin-nat.c: Update.
1734         * fbsd-nat.c: Update.
1735         * i386-darwin-nat.c: Update.
1736         * infrun.c: Update.
1737         * linux-tdep.c: Update.
1738         * nto-procfs.c: Update.
1739         * ppc-ravenscar-thread.c: Update.
1740         * python/py-infthread.c: Update.
1741         * ravenscar-thread.c: Update.
1742         * sol-thread.c: Update.
1743         * sparc-ravenscar-thread.c: Update.
1744         * windows-nat.c: Update.
1745
1746 2018-07-03  Tom Tromey  <tom@tromey.com>
1747
1748         * common/ptid.c (ptid_get_lwp): Remove.
1749         * common/ptid.h (ptid_get_lwp): Don't declare.
1750         * aarch64-linux-nat.c: Update.
1751         * ada-tasks.c: Update.
1752         * aix-thread.c: Update.
1753         * amd64-linux-nat.c: Update.
1754         * arm-linux-nat.c: Update.
1755         * corelow.c: Update.
1756         * fbsd-nat.c: Update.
1757         * fbsd-tdep.c: Update.
1758         * gnu-nat.c: Update.
1759         * i386-cygwin-tdep.c: Update.
1760         * i386-gnu-nat.c: Update.
1761         * i386-linux-nat.c: Update.
1762         * ia64-linux-nat.c: Update.
1763         * inf-ptrace.c: Update.
1764         * infrun.c: Update.
1765         * linux-fork.c: Update.
1766         * linux-nat.c: Update.
1767         * linux-tdep.c: Update.
1768         * linux-thread-db.c: Update.
1769         * mips-linux-nat.c: Update.
1770         * nat/aarch64-linux-hw-point.c: Update.
1771         * nat/aarch64-linux.c: Update.
1772         * nat/linux-btrace.c: Update.
1773         * nat/linux-osdata.c: Update.
1774         * nat/linux-procfs.c: Update.
1775         * nat/x86-linux-dregs.c: Update.
1776         * obsd-nat.c: Update.
1777         * ppc-fbsd-nat.c: Update.
1778         * ppc-linux-nat.c: Update.
1779         * procfs.c: Update.
1780         * python/py-infthread.c: Update.
1781         * ravenscar-thread.c: Update.
1782         * remote.c: Update.
1783         * s390-linux-nat.c: Update.
1784         * sol-thread.c: Update.
1785         * sol2-tdep.c: Update.
1786         * spu-linux-nat.c: Update.
1787         * x86-linux-nat.c: Update.
1788         * xtensa-linux-nat.c: Update.
1789
1790 2018-07-03  Tom Tromey  <tom@tromey.com>
1791
1792         * common/ptid.c (ptid_get_pid): Remove.
1793         * common/ptid.h (ptid_get_pid): Don't declare.
1794         * aarch64-linux-nat.c: Update.
1795         * ada-lang.c: Update.
1796         * aix-thread.c: Update.
1797         * alpha-bsd-nat.c: Update.
1798         * amd64-fbsd-nat.c: Update.
1799         * amd64-linux-nat.c: Update.
1800         * arm-linux-nat.c: Update.
1801         * arm-nbsd-nat.c: Update.
1802         * auxv.c: Update.
1803         * break-catch-syscall.c: Update.
1804         * breakpoint.c: Update.
1805         * bsd-uthread.c: Update.
1806         * corelow.c: Update.
1807         * ctf.c: Update.
1808         * darwin-nat.c: Update.
1809         * fbsd-nat.c: Update.
1810         * fbsd-tdep.c: Update.
1811         * gcore.c: Update.
1812         * gnu-nat.c: Update.
1813         * hppa-nbsd-nat.c: Update.
1814         * hppa-obsd-nat.c: Update.
1815         * i386-fbsd-nat.c: Update.
1816         * ia64-linux-nat.c: Update.
1817         * inf-ptrace.c: Update.
1818         * infcmd.c: Update.
1819         * inferior.c: Update.
1820         * inferior.h: Update.
1821         * inflow.c: Update.
1822         * infrun.c: Update.
1823         * linux-fork.c: Update.
1824         * linux-nat.c: Update.
1825         * linux-tdep.c: Update.
1826         * linux-thread-db.c: Update.
1827         * m68k-bsd-nat.c: Update.
1828         * mi/mi-interp.c: Update.
1829         * mi/mi-main.c: Update.
1830         * mips-linux-nat.c: Update.
1831         * mips-nbsd-nat.c: Update.
1832         * mips64-obsd-nat.c: Update.
1833         * nat/aarch64-linux-hw-point.c: Update.
1834         * nat/aarch64-linux.c: Update.
1835         * nat/linux-btrace.c: Update.
1836         * nat/linux-osdata.c: Update.
1837         * nat/linux-procfs.c: Update.
1838         * nat/x86-linux-dregs.c: Update.
1839         * nto-procfs.c: Update.
1840         * obsd-nat.c: Update.
1841         * ppc-linux-nat.c: Update.
1842         * ppc-nbsd-nat.c: Update.
1843         * ppc-obsd-nat.c: Update.
1844         * proc-service.c: Update.
1845         * procfs.c: Update.
1846         * python/py-inferior.c: Update.
1847         * python/py-infthread.c: Update.
1848         * ravenscar-thread.c: Update.
1849         * record.c: Update.
1850         * remote-sim.c: Update.
1851         * remote.c: Update.
1852         * rs6000-nat.c: Update.
1853         * s390-linux-nat.c: Update.
1854         * sh-nbsd-nat.c: Update.
1855         * sol-thread.c: Update.
1856         * sparc-nat.c: Update.
1857         * sparc64-tdep.c: Update.
1858         * spu-linux-nat.c: Update.
1859         * spu-tdep.c: Update.
1860         * target-debug.h: Update.
1861         * target.c: Update.
1862         * thread.c: Update.
1863         * tid-parse.c: Update.
1864         * tracefile-tfile.c: Update.
1865         * vax-bsd-nat.c: Update.
1866         * windows-nat.c: Update.
1867         * x86-linux-nat.c: Update.
1868         * x86-nat.c: Update.
1869
1870 2018-07-03  Tom Tromey  <tom@tromey.com>
1871
1872         * common/ptid.c (pid_to_ptid): Remove.
1873         * common/ptid.h (pid_to_ptid): Don't declare.
1874         * aix-thread.c: Update.
1875         * arm-linux-nat.c: Update.
1876         * common/ptid.c: Update.
1877         * common/ptid.h: Update.
1878         * corelow.c: Update.
1879         * ctf.c: Update.
1880         * darwin-nat.c: Update.
1881         * fbsd-nat.c: Update.
1882         * fork-child.c: Update.
1883         * gnu-nat.c: Update.
1884         * go32-nat.c: Update.
1885         * inf-ptrace.c: Update.
1886         * infcmd.c: Update.
1887         * inferior.c: Update.
1888         * infrun.c: Update.
1889         * linux-fork.c: Update.
1890         * linux-nat.c: Update.
1891         * nat/aarch64-linux-hw-point.c: Update.
1892         * nat/fork-inferior.c: Update.
1893         * nat/x86-linux-dregs.c: Update.
1894         * nto-procfs.c: Update.
1895         * obsd-nat.c: Update.
1896         * procfs.c: Update.
1897         * progspace.c: Update.
1898         * remote.c: Update.
1899         * rs6000-nat.c: Update.
1900         * s390-linux-nat.c: Update.
1901         * sol-thread.c: Update.
1902         * spu-linux-nat.c: Update.
1903         * target.c: Update.
1904         * top.c: Update.
1905         * tracefile-tfile.c: Update.
1906         * windows-nat.c: Update.
1907
1908 2018-07-03  Tom Tromey  <tom@tromey.com>
1909
1910         * common/ptid.h (ptid_build): Don't declare.
1911         * common/ptid.c (ptid_build): Remove.
1912         * aix-thread.c: Update.
1913         * bsd-kvm.c: Update.
1914         * bsd-uthread.c: Update.
1915         * common/agent.c: Update.
1916         * common/ptid.c: Update.
1917         * common/ptid.h: Update.
1918         * corelow.c: Update.
1919         * darwin-nat.c: Update.
1920         * fbsd-nat.c: Update.
1921         * gnu-nat.c: Update.
1922         * linux-fork.c: Update.
1923         * linux-nat.c: Update.
1924         * linux-thread-db.c: Update.
1925         * nat/linux-osdata.c: Update.
1926         * nat/linux-procfs.c: Update.
1927         * nto-procfs.c: Update.
1928         * obsd-nat.c: Update.
1929         * proc-service.c: Update.
1930         * procfs.c: Update.
1931         * ravenscar-thread.c: Update.
1932         * remote-sim.c: Update.
1933         * remote.c: Update.
1934         * sol-thread.c: Update.
1935         * target.c: Update.
1936         * windows-nat.c: Update.
1937
1938 2018-07-03  Tom Tromey  <tom@tromey.com>
1939
1940         * infrun.c (follow_exec): Use exit_inferior_silent.
1941         * inferior.c (exit_inferior_num_silent): Remove.
1942         * inferior.h (exit_inferior_num_silent): Don't declare.
1943
1944 2018-07-03  Tom Tromey  <tom@tromey.com>
1945
1946         PR cli/23340:
1947         * darwin-nat.c (darwin_attach_pid): Reset inferior and
1948         inferior_ptid on error.
1949
1950 2018-07-02  Maciej W. Rozycki  <macro@mips.com>
1951             Simon Marchi  <simon.marchi@polymtl.ca>
1952
1953         PR tdep/8282
1954         * disasm.h (gdb_disassembler): Add
1955         `m_disassembler_options_holder'. member
1956         * disasm.c (get_all_disassembler_options): New function.
1957         (gdb_disassembler::gdb_disassembler): Use it.
1958         (gdb_buffered_insn_length_init_dis): Likewise.
1959         (gdb_buffered_insn_length): Adjust accordingly.
1960         (set_disassembler_options): Handle options with arguments.
1961         (show_disassembler_options_sfunc): Likewise.  Add a leading new
1962         line if showing options with descriptions.
1963         (disassembler_options_completer): Adapt to using the
1964         `disasm_options_and_args_t' structure.
1965         * mips-tdep.c (mips_disassembler_options): New variable.
1966         (mips_disassembler_options_o32): Likewise.
1967         (mips_disassembler_options_n32): Likewise.
1968         (mips_disassembler_options_n64): Likewise.
1969         (gdb_print_insn_mips): Don't set `disassembler_options'.
1970         (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
1971         functions.
1972         (mips_gdbarch_init): Always set `gdbarch_print_insn' to
1973         `gdb_print_insn_mips'.  Set `gdbarch_disassembler_options',
1974         `gdbarch_disassembler_options_implicit' and
1975         `gdbarch_valid_disassembler_options'.
1976         * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
1977         `disasm_options_and_args_t' structure.
1978         * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
1979         method.
1980         (valid_disassembler_options): Switch from `disasm_options_t' to
1981         the `disasm_options_and_args_t' structure.
1982         * NEWS: Document `set disassembler-options' support for the MIPS
1983         target.
1984         * gdbarch.h: Regenerate.
1985         * gdbarch.c: Regenerate.
1986
1987 2018-07-02  Sebastian Huber  <sebastian.huber@embedded-brains.de>
1988
1989         * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
1990
1991 2018-06-29  Joel Brobecker  <brobecker@adacore.com>
1992
1993         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
1994         parameter in call to amd64_target_description.
1995         * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
1996         * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
1997         (amd64fbsd_init_abi): Likewise.
1998         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
1999         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
2000         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
2001         * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
2002
2003 2018-06-29  Pedro Alves  <palves@redhat.com>
2004
2005         * gdb/amd64-tdep.h (amd64_create_target_description): Add
2006         "segments" parameter.
2007         * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
2008         (_initialize_amd64_tdep): Update call to
2009         amd64_create_target_description.
2010         (amd64_target_description): Add "segments" parameter.  Adjust
2011         the implementation to use it.
2012         * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
2013         call to amd64_create_target_description.
2014         * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
2015         * gdb/arch/amd64.h (amd64_create_target_description): Add
2016         "segments" register.
2017         * gdb/arch/amd64.c (amd64_create_target_description): Add
2018         "segments" parameter.  Call create_feature_i386_64bit_segments
2019         only if SEGMENTS is true.
2020         * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
2021         call to amd64_create_target_description.
2022
2023 2018-06-29  Pedro Alves  <palves@redhat.com>
2024
2025         * thread.c (thread_target_id_str): New, factored out from ...
2026         (print_thread_info_1): ... here.  Use it to compute the max
2027         "Target Id" column width.
2028
2029 2018-06-29  Pedro Alves  <palves@redhat.com>
2030
2031         * remote.c (remote_target::extra_thread_info): Delete
2032         'display_buf' and 'n' locals.  from the cache, regardless of
2033         packet mechanims is in use.  Use cache for qThreadExtra and qP
2034         methods too.
2035
2036 2018-06-29  Pedro Alves  <palves@redhat.com>
2037
2038         * blockframe.c (find_pc_sect_containing_function): New function.
2039         * breakpoint.c (print_breakpoint_location): Don't call
2040         find_pc_sect_function.
2041         * linespec.c (create_sals_line_offset): Record the location's
2042         symbol in the sal.
2043         * linespec.c (convert_address_location_to_sals): Fill in sal's
2044         symbol with find_pc_sect_containing_function.
2045         * symtab.c (find_function_start_sal): Rename to ...
2046         (find_function_start_sal_1): ... this.
2047         (find_function_start_sal): Reimplement as wrapper around
2048         find_function_start_sal_1, and use
2049         find_pc_sect_containing_function to fill in the sal's symbol.
2050         (find_function_start_sal(symbol*, bool)): Adjust.
2051         * symtab.h (find_pc_function, find_pc_sect_function): Adjust
2052         comments.
2053         (find_pc_sect_containing_function): Declare.
2054
2055 2018-06-29  Pedro Alves  <palves@redhat.com>
2056
2057         * inline-frame.c (stopped_by_user_bp_inline_frame): Return
2058         true if the the location has no symbol.
2059
2060 2018-06-28  Tom Tromey  <tom@tromey.com>
2061
2062         * NEWS: Mention --enable-codesign.
2063         * silent-rules.mk (ECHO_SIGN): New variable.
2064         * configure.ac: Add --enable-codesign.
2065         * configure: Rebuild.
2066         * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
2067         (gdb$(EXEEXT)): Optionally invoke codesign.
2068
2069 2018-06-28  Pedro Alves  <palves@redhat.com>
2070
2071         * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
2072         comments.
2073         (switch_to_thread_no_regs): Adjust comment.
2074         * infcmd.c (stop_pc): Delete.
2075         (post_create_inferior, info_program_command): Replace references
2076         to stop_pc with references to thread_info->suspend.stop_pc.
2077         * inferior.h (stop_pc): Delete declaration.
2078         * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
2079         (handle_inferior_event_1, handle_signal_stop)
2080         (process_event_stop_test, keep_going_stepped_thread)
2081         (handle_step_into_function, handle_step_into_function_backward)
2082         (print_stop_location): Replace references to stop_pc with
2083         references to thread_info->suspend.stop_pc.
2084         (struct infcall_suspend_state) <stop_pc>: Delete field.
2085         (save_infcall_suspend_state, restore_infcall_suspend_state):
2086         Remove references to inf_stat->stop_pc.
2087         * linux-fork.c (fork_load_infrun_state): Likewise.
2088         * record-btrace.c (record_btrace_set_replay): Likewise.
2089         * record-full.c (record_full_goto_entry): Likewise.
2090         * remote.c (print_one_stopped_thread): Likewise.
2091         * target.c (target_resume): Extend comment.
2092         * thread.c (set_executing_thread): New.
2093         (set_executing): Use it.
2094         (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
2095         Remove references to stop_pc.
2096
2097 2018-06-28  Pedro Alves  <palves@redhat.com>
2098
2099         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
2100         Moving fetching stop_pc until after ecs->event_thread is refreshed.
2101
2102 2018-06-28  Tom Tromey  <tom@tromey.com>
2103
2104         * coffread.c (coff_symfile_finish): Update.
2105         * xcoffread.c (xcoff_symfile_finish): Update.
2106         * elfread.c (elf_symfile_finish): Update.
2107         * symfile.h (dwarf2_free_objfile): Don't declare.
2108         * dwarf2read.c (_initialize_dwarf2_read): Use
2109         register_objfile_data_with_cleanup.
2110         (dwarf2_free_objfile): Now static.  Change signature.
2111
2112 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
2113
2114         * symfile.c (add_symbol_file_command, _initialize_symfile): Add
2115         option "-o" to add-symbol-file-load to add an offset to each
2116         section's load address.
2117         * symfile.c (set_objfile_default_section_offset): New function.
2118
2119 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
2120
2121         * symfile.c (add_symbol_file_command): Make sure that sections
2122         with the same name are sorted in the same order.
2123
2124 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
2125
2126         * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
2127         require the second argument.  If omitted, load sections at the
2128         addresses specified in the file.
2129
2130 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
2131
2132         * symfile.c (symbol_file_command, symbol_file_add_main_1)
2133         (_initialize_symfile): Add option "-o" to symbol-file to add an
2134         offset to each section of the symbol file.
2135
2136 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
2137
2138         * MAINTAINERS (Write After Approval): Add Petr Tesarik.
2139
2140 2018-06-27  Tom Tromey  <tom@tromey.com>
2141
2142         * stack.c (_initialize_stack): Update "func" help text.
2143
2144 2018-06-27  Tom Tromey  <tom@tromey.com>
2145
2146         * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
2147         std::vector.
2148         (unwind_infopy_str, pyuw_create_unwind_info)
2149         (unwind_infopy_add_saved_register, pyuw_sniffer)
2150         (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
2151         Update.
2152         (struct saved_reg): Add constructor.
2153         <value>: Now a gdbpy_ref<>.
2154
2155 2018-06-27  Tom Tromey  <tom@tromey.com>
2156
2157         * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
2158
2159 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
2160
2161         * gdb-gdb.py.in: Format using autopep8.
2162
2163 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
2164
2165         * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
2166         (type_lookup_function): Recognize CORE_ADDR values.
2167
2168 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
2169
2170         * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
2171         print tag_name.
2172
2173 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
2174
2175         * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
2176         <__lt__>: Add.
2177
2178 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
2179
2180         * gdb-gdb.py: Move to...
2181         * gdb-gdb.py.in: ... here.
2182         * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
2183         * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
2184         dependencies.
2185         (distclean): Remove gdb-gdb.py when cleaning.
2186         (gdb-gdb.py, gdb-gdb.gdb): New rules.
2187         * configure: Re-generate.
2188
2189 2018-06-27  Pedro Alves  <palves@redhat.com>
2190
2191         * proc-service.c (get_ps_regcache): New.
2192         (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
2193         (ps_lsetfpregs): Use it.
2194
2195 2018-06-27  Omair Javaid  <omair.javaid@linaro.org>
2196
2197         PR gdb/21695
2198         * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
2199         (dwarf_decode_lines_1): Adjust.
2200
2201 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
2202
2203         * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
2204         override.
2205         <info_proc>: Likewise.
2206
2207 2018-06-26  Joel Brobecker  <brobecker@adacore.com>
2208
2209         * windows-nat.c (do_windows_fetch_inferior_registers): Rename
2210         to windows_fetch_one_register, and only handle the case of
2211         fetching one register.  Move the code that reloads the context
2212         and iterates over all registers if R is negative to...
2213         (windows_nat_target::fetch_registers): ... here.
2214         (do_windows_store_inferior_registers): Rename to
2215         windows_store_one_register, and only handle the case of storing
2216         one register.  Move the code that handles the case where r is
2217         negative to...
2218         (windows_nat_target::store_registers) ... here.
2219
2220 2018-06-26  Tom Tromey  <tom@tromey.com>
2221
2222         PR rust/22574:
2223         * typeprint.c (whatis_exp): Allow ptype/o for Rust.
2224         * rust-lang.c (rust_print_struct_def): Add podata parameter.
2225         Update.
2226         (rust_internal_print_type): Add podata parameter.
2227         (rust_print_type): Update.
2228
2229 2018-06-26  Tom Tromey  <tom@tromey.com>
2230
2231         * typeprint.h (struct print_offset_data) <update, finish,
2232         maybe_print_hole>: New methods.
2233         <indentation>: New constant.
2234         * typeprint.c (print_offset_data::indentation): Define.
2235         (print_offset_data::maybe_print_hole, print_offset_data::update)
2236         (print_offset_data::finish): Move from c-typeprint.c and rename.
2237         * c-typeprint.c (OFFSET_SPC_LEN): Remove.
2238         (print_spaces_filtered_with_print_options): Update.
2239         (c_print_type_union_field_offset, maybe_print_hole)
2240         (c_print_type_struct_field_offset): Move to typeprint.c and
2241         rename.
2242         (c_type_print_base_struct_union): Update.
2243
2244 2018-06-25  Pedro Alves  <palves@redhat.com>
2245
2246         * gdbthread.h (thread_info_ref, delete_thread)
2247         (delete_thread_silent, first_thread_of_inferior)
2248         (any_thread_of_inferior, switch_to_thread)
2249         (enable_thread_stack_temporaries)
2250         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2251         (get_last_thread_stack_temporary)
2252         (value_in_thread_stack_temporaries, can_access_registers_thread):
2253         Spell out "struct thread_info" instead of just "thread_info".
2254         * inferior.h (notice_new_inferior): Likewise.
2255
2256 2018-06-25  Pedro Alves  <palves@redhat.com>
2257
2258         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
2259         pass thread_info pointer to delete_thread.
2260         (windows_nat_target::detach): Pass inferior pointer to
2261         detach_inferior.
2262         * aix-thread.c (sync_threadlists): Pass thread_info pointer to
2263         delete_thread.
2264         * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
2265         * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
2266         and pass a thread_info pointer to delete_thread.
2267         * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
2268         pass thread_info pointer to delete_thread.
2269         * go32-nat.c (go32_nat_target::mourn_inferior): Remove
2270         delete_thread_silent call.
2271         * procfs.c (procfs_target::detach): Pass inferior pointer to
2272         detach_inferior.
2273         (procfs_target::wait): Pass thread_info pointer to delete_thread.
2274         * remote-sim.c (gdbsim_target::mourn_inferior): Remove
2275         delete_thread_silent call.
2276         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
2277         pass thread_info pointer to delete_thread.
2278         (windows_nat_target::detach): Pass inferior pointer to
2279         delete_inferior.
2280
2281 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
2282
2283         * regcache.c (readable_regcache::read_part): Fix asserts.
2284         (reg_buffer::raw_collect_part): New function.
2285         (regcache::write_part): Fix asserts.
2286         (reg_buffer::raw_supply_part): New function.
2287         (regcache::transfer_regset_register): New helper function.
2288         (regcache::transfer_regset): Call new functions.
2289         (regcache_supply_regset): Use gdb_byte*.
2290         (regcache::supply_regset): Likewise.
2291         (regcache_collect_regset): Likewise.
2292         (regcache::collect_regset): Likewise.
2293         * regcache.h (reg_buffer::raw_collect_part): New declaration.
2294         (reg_buffer::raw_supply_part): Likewise.
2295         (regcache::transfer_regset_register): Likewise.
2296         (regcache::transfer_regset): Use gdb_byte*.
2297
2298 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
2299
2300         * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
2301
2302 2018-06-21  Pedro Alves  <palves@redhat.com>
2303
2304         * ada-lang.h (ada_get_task_number): Take a thread_info pointer
2305         instead of a ptid_t.  All callers adjusted.
2306         * ada-tasks.c (ada_get_task_number): Likewise.  All callers
2307         adjusted.
2308         (print_ada_task_info, display_current_task_id, task_command_1):
2309         Adjust.
2310         * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
2311         inferior_thread.
2312         (breakpoint_kind): Adjust.
2313         (remove_breakpoints_pid): Rename to ...
2314         (remove_breakpoints_inf): ... this.  Adjust to take an inferior
2315         pointer.  All callers adjusted.
2316         (bpstat_clear_actions): Use inferior_thread.
2317         (get_bpstat_thread): New.
2318         (bpstat_do_actions): Use it.
2319         (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
2320         to take a thread_info pointer.  All callers adjusted.
2321         (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
2322         (breakpoint_re_set_thread): Use inferior_thread.
2323         * breakpoint.h (struct inferior): Forward declare.
2324         (bpstat_stop_status): Update.
2325         (remove_breakpoints_pid): Delete.
2326         (remove_breakpoints_inf): New.
2327         * bsd-uthread.c (bsd_uthread_target::wait)
2328         (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
2329         * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
2330         (maint_btrace_packet_history_cmd)
2331         (maint_btrace_clear_packet_history_cmd): Adjust.
2332         (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
2333         inferior_thread.
2334         * cli/cli-interp.c: Include "inferior.h".
2335         * common/refcounted-object.h (struct
2336         refcounted_object_ref_policy): New.
2337         * compile/compile-object-load.c: Include gdbthread.h.
2338         (store_regs): Use inferior_thread.
2339         * corelow.c (core_target::close): Use current_inferior.
2340         (core_target_open): Adjust to use first_thread_of_inferior and use
2341         the current inferior.
2342         * ctf.c (ctf_target::close): Adjust to use current_inferior.
2343         * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
2344         <thread>: ... this new field.  All references adjusted.
2345         (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
2346         Take a thread_info pointer instead of a ptid_t.
2347         * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
2348         (dummy_frame_discard, register_dummy_frame_dtor): Take a
2349         thread_info pointer instead of a ptid_t.
2350         * elfread.c: Include "inferior.h".
2351         (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
2352         Use inferior_thread.
2353         * eval.c (evaluate_subexp): Likewise.
2354         * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
2355         inferior_thread.
2356         * gdb_proc_service.h (struct thread_info): Forward declare.
2357         (struct ps_prochandle) <ptid>: Delete, replaced by ...
2358         <thread>: ... this new field.  All references adjusted.
2359         * gdbarch.h, gdbarch.c: Regenerate.
2360         * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
2361         'thread' parameter.  All implementations and callers adjusted.
2362         * gdbthread.h (thread_info) <set_running>: New method.
2363         (delete_thread, delete_thread_silent): Take a thread_info pointer
2364         instead of a ptid.
2365         (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
2366         (first_thread_of_process): Delete, replaced by ...
2367         (first_thread_of_inferior): ... this new function.  All callers
2368         adjusted.
2369         (any_live_thread_of_process): Delete, replaced by ...
2370         (any_live_thread_of_inferior): ... this new function.  All callers
2371         adjusted.
2372         (switch_to_thread, switch_to_no_thread): Declare.
2373         (is_executing): Delete.
2374         (enable_thread_stack_temporaries): Update comment.
2375         <enable_thread_stack_temporaries>: Take a thread_info pointer
2376         instead of a ptid_t.  Incref the thread.
2377         <~enable_thread_stack_temporaries>: Decref the thread.
2378         <m_ptid>: Delete
2379         <m_thr>: New.
2380         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2381         (get_last_thread_stack_temporary)
2382         (value_in_thread_stack_temporaries, can_access_registers_thread):
2383         Take a thread_info pointer instead of a ptid_t.  All callers
2384         adjusted.
2385         * infcall.c (get_call_return_value): Use inferior_thread.
2386         (run_inferior_call): Work with thread pointers instead of ptid_t.
2387         (call_function_by_hand_dummy): Work with thread pointers instead
2388         of ptid_t.  Use thread_info_ref.
2389         * infcmd.c (proceed_thread_callback): Access thread's state
2390         directly.
2391         (ensure_valid_thread, ensure_not_running): Use inferior_thread,
2392         access thread's state directly.
2393         (continue_command): Use inferior_thread.
2394         (info_program_command): Use find_thread_ptid and access thread
2395         state directly.
2396         (proceed_after_attach_callback): Use thread state directly.
2397         (notice_new_inferior): Take a thread_info pointer instead of a
2398         ptid_t.  All callers adjusted.
2399         (exit_inferior): Take an inferior pointer instead of a pid.  All
2400         callers adjusted.
2401         (exit_inferior_silent): New.
2402         (detach_inferior): Delete.
2403         (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
2404         (gdb_inferior_id_to_pid, in_inferior_list): Delete.
2405         (detach_inferior_command, kill_inferior_command): Use
2406         find_inferior_id instead of valid_gdb_inferior_id and
2407         gdb_inferior_id_to_pid.
2408         (inferior_command): Use inferior and thread pointers.
2409         * inferior.h (struct thread_info): Forward declare.
2410         (notice_new_inferior): Take a thread_info pointer instead of a
2411         ptid_t.  All callers adjusted.
2412         (detach_inferior): Delete declaration.
2413         (exit_inferior, exit_inferior_silent): Take an inferior pointer
2414         instead of a pid.  All callers adjusted.
2415         (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
2416         (valid_gdb_inferior_id): Delete.
2417         * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
2418         (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
2419         (struct displaced_step_inferior_state) <pid>: Delete, replaced by
2420         ...
2421         <inf>: ... this new field.
2422         <step_ptid>: Delete, replaced by ...
2423         <step_thread>: ... this new field.
2424         (get_displaced_stepping_state): Take an inferior pointer instead
2425         of a pid.  All callers adjusted.
2426         (displaced_step_in_progress_any_inferior): Adjust.
2427         (displaced_step_in_progress_thread): Take a thread pointer instead
2428         of a ptid_t.  All callers adjusted.
2429         (displaced_step_in_progress, add_displaced_stepping_state): Take
2430         an inferior pointer instead of a pid.  All callers adjusted.
2431         (get_displaced_step_closure_by_addr): Adjust.
2432         (remove_displaced_stepping_state): Take an inferior pointer
2433         instead of a pid.  All callers adjusted.
2434         (displaced_step_prepare_throw, displaced_step_prepare)
2435         (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
2436         All callers adjusted.
2437         (start_step_over): Adjust.
2438         (infrun_thread_ptid_changed): Remove bit updating ptids in the
2439         displaced step queue.
2440         (do_target_resume): Adjust.
2441         (fetch_inferior_event): Use inferior_thread.
2442         (context_switch, get_inferior_stop_soon): Take an
2443         execution_control_state pointer instead of a ptid_t.  All callers
2444         adjusted.
2445         (switch_to_thread_cleanup): Delete.
2446         (stop_all_threads): Use scoped_restore_current_thread.
2447         * inline-frame.c: Include "gdbthread.h".
2448         (inline_state) <inline_state>: Take a thread pointer instead of a
2449         ptid_t.  All callers adjusted.
2450         <ptid>: Delete, replaced by ...
2451         <thread>: ... this new field.
2452         (find_inline_frame_state): Take a thread pointer instead of a
2453         ptid_t.  All callers adjusted.
2454         (skip_inline_frames, step_into_inline_frame)
2455         (inline_skipped_frames, inline_skipped_symbol): Take a thread
2456         pointer instead of a ptid_t.  All callers adjusted.
2457         * inline-frame.h (skip_inline_frames, step_into_inline_frame)
2458         (inline_skipped_frames, inline_skipped_symbol): Likewise.
2459         * linux-fork.c (delete_checkpoint_command): Adjust to use thread
2460         pointers directly.
2461         * linux-nat.c (get_detach_signal): Likewise.
2462         * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
2463         (thread_db_notice_clone): Adjust.
2464         (thread_db_find_new_threads_silently)
2465         (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
2466         a thread pointer instead of a ptid_t.  All callers adjusted.
2467         * mi/mi-cmd-var.c: Include "inferior.h".
2468         (mi_cmd_var_update_iter): Update to use thread pointers.
2469         * mi/mi-interp.c (mi_new_thread): Update to use the thread's
2470         inferior directly.
2471         (mi_output_running_pid, mi_inferior_count): Delete, bits factored
2472         out to ...
2473         (mi_output_running): ... this new function.
2474         (mi_on_resume_1): Adjust to use it.
2475         (mi_user_selected_context_changed): Adjust to use inferior_thread.
2476         * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
2477         directly.
2478         (interrupt_thread_callback): : Adjust to use thread and inferior
2479         pointers.
2480         * proc-service.c: Include "gdbthread.h".
2481         (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
2482         * progspace-and-thread.c: Include "inferior.h".
2483         * progspace.c: Include "inferior.h".
2484         * python/py-exitedevent.c (create_exited_event_object): Adjust to
2485         hold a reference to an inferior_object.
2486         * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
2487         inferior_thread.
2488         * python/py-inferior.c (struct inferior_object): Give the type a
2489         tag name instead of a typedef.
2490         (python_on_normal_stop): No need to check if the current thread is
2491         listed.
2492         (inferior_to_inferior_object): Change return type to
2493         inferior_object.  All callers adjusted.
2494         (find_thread_object): Delete, bits factored out to ...
2495         (thread_to_thread_object): ... this new function.
2496         * python/py-infthread.c (create_thread_object): Use
2497         inferior_to_inferior_object.
2498         (thpy_is_stopped): Use thread pointer directly.
2499         (gdbpy_selected_thread): Use inferior_thread.
2500         * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
2501         field, replaced with ...
2502         <thread>: ... this new field.  All users adjusted.
2503         (btpy_insn_or_gap_new): Drop const.
2504         (btpy_list_new): Take a thread pointer instead of a ptid_t.  All
2505         callers adjusted.
2506         * python/py-record.c: Include "gdbthread.h".
2507         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
2508         a ptid_t.  All callers adjusted.
2509         (gdbpy_current_recording): Use inferior_thread.
2510         * python/py-record.h (recpy_record_object) <ptid>: Delete
2511         field, replaced with ...
2512         <thread>: ... this new field.  All users adjusted.
2513         (recpy_element_object) <ptid>: Delete
2514         field, replaced with ...
2515         <thread>: ... this new field.  All users adjusted.
2516         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
2517         a ptid_t.  All callers adjusted.
2518         * python/py-threadevent.c: Include "gdbthread.h".
2519         (get_event_thread): Use thread_to_thread_object.
2520         * python/python-internal.h (struct inferior_object): Forward
2521         declare.
2522         (find_thread_object, find_inferior_object): Delete declarations.
2523         (thread_to_thread_object, inferior_to_inferior_object): New
2524         declarations.
2525         * record-btrace.c: Include "inferior.h".
2526         (require_btrace_thread): Use inferior_thread.
2527         (record_btrace_frame_sniffer)
2528         (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
2529         (get_thread_current_frame): Use scoped_restore_current_thread and
2530         switch_to_thread.
2531         (get_thread_current_frame): Use thread pointer directly.
2532         (record_btrace_replay_at_breakpoint): Use thread's inferior
2533         pointer directly.
2534         * record-full.c: Include "inferior.h".
2535         * regcache.c: Include "gdbthread.h".
2536         (get_thread_arch_regcache): Use the inferior's address space
2537         directly.
2538         (get_thread_regcache, registers_changed_thread): New.
2539         * regcache.h (get_thread_regcache(thread_info *thread)): New
2540         overload.
2541         (registers_changed_thread): New.
2542         (remote_target) <remote_detach_1>: Swap order of parameters.
2543         (remote_add_thread): <remote_add_thread>: Return the new thread.
2544         (get_remote_thread_info(ptid_t)): New overload.
2545         (remote_target::remote_notice_new_inferior): Use thread pointers
2546         directly.
2547         (remote_target::process_initial_stop_replies): Use
2548         thread_info::set_running.
2549         (remote_target::remote_detach_1, remote_target::detach)
2550         (extended_remote_target::detach): Adjust.
2551         * stack.c (frame_show_address): Use inferior_thread.
2552         * target-debug.h (target_debug_print_thread_info_pp): New.
2553         * target-delegates.c: Regenerate.
2554         * target.c (default_thread_address_space): Delete.
2555         (memory_xfer_partial_1): Use current_inferior.
2556         (target_detach): Use current_inferior.
2557         (target_thread_address_space): Delete.
2558         (generic_mourn_inferior): Use current_inferior.
2559         * target.h (struct target_ops) <thread_address_space>: Delete.
2560         (target_thread_address_space): Delete.
2561         * thread.c (init_thread_list): Use ALL_THREADS_SAFE.  Use thread
2562         pointers directly.
2563         (delete_thread_1, delete_thread, delete_thread_silent): Take a
2564         thread pointer instead of a ptid_t.  Adjust all callers.
2565         (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
2566         (first_thread_of_process): Delete, replaced by ...
2567         (first_thread_of_inferior): ... this new function.  All callers
2568         adjusted.
2569         (any_thread_of_process): Rename to ...
2570         (any_thread_of_inferior): ... this, and take an inferior pointer.
2571         (any_live_thread_of_process): Rename to ...
2572         (any_live_thread_of_inferior): ... this, and take an inferior
2573         pointer.
2574         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2575         (value_in_thread_stack_temporaries)
2576         (get_last_thread_stack_temporary): Take a thread pointer instead
2577         of a ptid_t.  Adjust all callers.
2578         (thread_info::set_running): New.
2579         (validate_registers_access): Use inferior_thread.
2580         (can_access_registers_ptid): Rename to ...
2581         (can_access_registers_thread): ... this, and take a thread
2582         pointer.
2583         (print_thread_info_1): Adjust to compare thread pointers instead
2584         of ptids.
2585         (switch_to_no_thread, switch_to_thread): Make extern.
2586         (scoped_restore_current_thread::~scoped_restore_current_thread):
2587         Use m_thread pointer directly.
2588         (scoped_restore_current_thread::scoped_restore_current_thread):
2589         Use inferior_thread.
2590         (thread_command): Use thread pointer directly.
2591         (thread_num_make_value_helper): Use inferior_thread.
2592         * top.c (execute_command): Use inferior_thread.
2593         * tui/tui-interp.c: Include "inferior.h".
2594         * varobj.c (varobj_create): Use inferior_thread.
2595         (value_of_root_1): Use find_thread_global_id instead of
2596         global_thread_id_to_ptid.
2597
2598 2018-06-21  Alan Hayward  <alan.hayward@arm.com>
2599
2600         * regcache.c (readable_regcache::read_part): Avoid memcpy when
2601         possible.
2602         (regcache::write_part): Likewise.
2603         (readable_regcache::cooked_read_part): Update comment.
2604         (readable_regcache::cooked_write_part): Likewise.
2605         * regcache.h: (readable_regcache::read_part): Likewise.
2606         (regcache::write_part): Likewise.
2607
2608 2018-06-21  Richard Bunt  <richard.bunt@arm.com>
2609             Dirk Schubert  <dirk.schubert@arm.com>
2610
2611         * aarch64-linux-nat.c (post_attach): New.
2612         (aarch64_linux_nat_target::post_attach): Override post_attach to
2613         record the number of hardware debug registers.
2614
2615 2018-06-20  Tom Tromey  <tom@tromey.com>
2616
2617         * python/py-param.c (add_setshow_generic): Make parameters const.
2618         (parmpy_init): Update.
2619
2620 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
2621
2622         * regcache.h (regcache_cooked_read_ftype): Rename to...
2623         (register_read_ftype): ...this, change type to function_view.
2624         (class reg_buffer) <save>: Remove src parameter.
2625         (readonly_detached_regcache) <readonly_detached_regcache>: Make
2626         parameter non-const in first overload.  Remove src parameter in
2627         second overload.
2628         * regcache.c (do_cooked_read): Remove.
2629         (readonly_detached_regcache::readonly_detached_regcache): Make
2630         parameter non-const, adjust call to other constructor.
2631         (reg_buffer::save): Remove src parameter.
2632         * frame.c (do_frame_register_read): Remove.
2633         (frame_save_as_regcache): Use lambda function.
2634         * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
2635         parameter to ppu2spu_data *.
2636         (ppu2spu_sniffer): Use lambda function.
2637
2638 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
2639
2640         * record-full.c (record_full_target::insert_breakpoint): Remove
2641         "struct" keyword, add const.
2642
2643 2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>
2644
2645         * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
2646         PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
2647         * configure.ac: Remove AC_PREREQ, add missing quoting.
2648         * gnulib/configure.ac: Modernize usage of
2649         AC_INIT/AM_INIT_AUTOMAKE.  Remove AC_PREREQ.
2650         * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
2651         (AUTOMAKE_VERSION): Bump to 1.15.1.
2652         * configure: Re-generate.
2653         * config.in: Re-generate.
2654         * aclocal.m4: Re-generate.
2655         * gnulib/aclocal.m4: Re-generate.
2656         * gnulib/config.in: Re-generate.
2657         * gnulib/configure: Re-generate.
2658         * gnulib/import/Makefile.in: Re-generate.
2659
2660 2018-06-19  Pedro Alves  <palves@redhat.com>
2661
2662         * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
2663         (lookup_minimal_symbol_by_pc_section): ... here with
2664         gdb_assert_not_reached added.
2665
2666 2018-06-19  Pedro Alves  <palves@redhat.com>
2667
2668         * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
2669         parameter with a block parameter.  Compare location's block symbol
2670         with the frame's block instead of addresses.
2671         (skip_inline_frames): Pass the current block instead of the
2672         frame's address.  Break out as soon as we determine the frame
2673         should not be skipped.
2674
2675 2018-06-18  Tom Tromey  <tom@tromey.com>
2676
2677         * solib-aix.c (solib_aix_get_section_offsets): Return
2678         unique_xmalloc_ptr.
2679         (solib_aix_solib_create_inferior_hook): Update.
2680
2681 2018-06-18  Tom Tromey  <tom@tromey.com>
2682
2683         * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
2684
2685 2018-06-18  Tom Tromey  <tom@tromey.com>
2686
2687         * solib-frv.c (frv_relocate_main_executable): Use
2688         unique_xmalloc_ptr.
2689         * solib-dsbt.c (dsbt_relocate_main_executable): Use
2690         unique_xmalloc_ptr.
2691
2692 2018-06-18  Tom Tromey  <tom@tromey.com>
2693
2694         * objfiles.h (inhibit_section_map_updates): Update.
2695         (resume_section_map_updates, resume_section_map_updates_cleanup):
2696         Remove.
2697         * solib-svr4.c (svr4_handle_solib_event): Update.
2698         * objfiles.c (inhibit_section_map_updates): Return
2699         scoped_restore_tmpl<int>.
2700         (resume_section_map_updates, resume_section_map_updates_cleanup):
2701         Remove.
2702
2703 2018-06-18  Tom Tromey  <tom@tromey.com>
2704
2705         * valprint.h (read_string): Update.
2706         * valprint.c (read_string): Change type of "buffer".
2707         (val_print_string): Update.
2708         * python/py-value.c (valpy_string): Update.
2709         * language.h (struct language_defn) <la_get_string>: Change
2710         type of "buffer".
2711         (default_get_string, c_get_string): Update.
2712         * language.c (default_get_string): Change type of "buffer".
2713         * guile/scm-value.c (gdbscm_value_to_string): Update.
2714         * c-lang.c (c_get_string): Change type of "buffer".
2715
2716 2018-06-18  Tom Tromey  <tom@tromey.com>
2717
2718         * ser-mingw.c (struct pipe_state_destroyer): New.
2719         (pipe_state_up): New typedef.
2720         (cleanup_pipe_state): Remove.
2721         (pipe_windows_open): Use pipe_state_up.  Don't release argv.
2722
2723 2018-06-18  Tom Tromey  <tom@tromey.com>
2724
2725         * rust-lang.h (rust_yyerror): Don't declare.
2726         * rust-lang.c (rust_language_defn): Update.
2727         * rust-exp.y (yyerror): Now static.
2728         * parse.c (parse_exp_in_context_1): Update.
2729         * p-lang.h (p_yyerror): Don't declare.
2730         * p-lang.c (p_language_defn): Update.
2731         * p-exp.y (yyerror): Now static.
2732         * opencl-lang.c (opencl_language_defn): Update.
2733         * objc-lang.c (objc_language_defn): Update.
2734         * m2-lang.h (m2_yyerror): Don't declare.
2735         * m2-lang.c (m2_language_defn): Update.
2736         * m2-exp.y (yyerror): Now static.
2737         * language.h (struct language_defn) <la_error>: Remove.
2738         * language.c (unk_lang_error): Remove.
2739         (unknown_language_defn, auto_language_defn): Remove.
2740         * go-lang.h (go_yyerror): Don't declare.
2741         * go-lang.c (go_language_defn): Update.
2742         * go-exp.y (yyerror): Now static.
2743         * f-lang.h (f_yyerror): Don't declare.
2744         * f-lang.c (f_language_defn): Update.
2745         * f-exp.y (yyerror): Now static.
2746         * d-lang.h (d_yyerror): Don't declare.
2747         * d-lang.c (d_language_defn): Update.
2748         * d-exp.y (yyerror): Now static.
2749         * c-lang.h (c_yyerror): Don't declare.
2750         * c-lang.c (c_language_defn, cplus_language_defn)
2751         (asm_language_defn, minimal_language_defn): Update.
2752         * c-exp.y (yyerror): Now static.
2753         * ada-lang.h (ada_yyerror): Don't declare.
2754         * ada-lang.c (ada_language_defn): Update.
2755         * ada-exp.y (yyerror): Now static.
2756
2757 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
2758
2759         * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
2760         (store_sveregs_to_thread): Likewise.
2761         (aarch64_linux_fetch_inferior_registers): Check for SVE.
2762         (aarch64_linux_store_inferior_registers): Likewise.
2763         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
2764         function.
2765         (aarch64_sve_regs_copy_to_regcache): Likewise.
2766         (aarch64_sve_regs_copy_from_regcache): Likewise.
2767         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
2768         declaration.
2769         (aarch64_sve_regs_copy_to_regcache): Likewise.
2770         (aarch64_sve_regs_copy_from_regcache): Likewise.
2771         (sve_context): Structure from Linux headers.
2772         (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
2773         (SVE_SIG_ZREG_SIZE): Likewise.
2774         (SVE_SIG_PREG_SIZE): Likewise.
2775         (SVE_SIG_FFR_SIZE): Likewise.
2776         (SVE_SIG_REGS_OFFSET): Likewise.
2777         (SVE_SIG_ZREGS_OFFSET): Likewise.
2778         (SVE_SIG_ZREG_OFFSET): Likewise.
2779         (SVE_SIG_ZREGS_SIZE): Likewise.
2780         (SVE_SIG_PREGS_OFFSET): Likewise.
2781         (SVE_SIG_PREG_OFFSET): Likewise.
2782         (SVE_SIG_PREGS_SIZE): Likewise.
2783         (SVE_SIG_FFR_OFFSET): Likewise.
2784         (SVE_SIG_REGS_SIZE): Likewise.
2785         (SVE_SIG_CONTEXT_SIZE): Likewise.
2786         (SVE_PT_REGS_MASK): Likewise.
2787         (SVE_PT_REGS_FPSIMD): Likewise.
2788         (SVE_PT_REGS_SVE): Likewise.
2789         (SVE_PT_VL_INHERIT): Likewise.
2790         (SVE_PT_VL_ONEXEC): Likewise.
2791         (SVE_PT_REGS_OFFSET): Likewise.
2792         (SVE_PT_FPSIMD_OFFSET): Likewise.
2793         (SVE_PT_FPSIMD_SIZE): Likewise.
2794         (SVE_PT_SVE_ZREG_SIZE): Likewise.
2795         (SVE_PT_SVE_PREG_SIZE): Likewise.
2796         (SVE_PT_SVE_FFR_SIZE): Likewise.
2797         (SVE_PT_SVE_FPSR_SIZE): Likewise.
2798         (SVE_PT_SVE_FPCR_SIZE): Likewise.
2799         (__SVE_SIG_TO_PT): Likewise.
2800         (SVE_PT_SVE_OFFSET): Likewise.
2801         (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
2802         (SVE_PT_SVE_ZREG_OFFSET): Likewise.
2803         (SVE_PT_SVE_ZREGS_SIZE): Likewise.
2804         (SVE_PT_SVE_PREGS_OFFSET): Likewise.
2805         (SVE_PT_SVE_PREG_OFFSET): Likewise.
2806         (SVE_PT_SVE_PREGS_SIZE): Likewise.
2807         (SVE_PT_SVE_FFR_OFFSET): Likewise.
2808         (SVE_PT_SVE_FPSR_OFFSET): Likewise.
2809         (SVE_PT_SVE_FPCR_OFFSET): Likewise.
2810         (SVE_PT_SVE_SIZE): Likewise.
2811         (SVE_PT_SIZE): Likewise.
2812         (HAS_SVE_STATE): New define.
2813
2814 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
2815
2816         * nat/aarch64-sve-linux-sigcontext.h: New file.
2817         * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
2818         new files.
2819         (SVE_VQ_MIN): Likewise.
2820         (SVE_VQ_MAX): Likewise.
2821         (SVE_VL_MIN): Likewise.
2822         (SVE_VL_MAX): Likewise.
2823         (SVE_NUM_ZREGS): Likewise.
2824         (SVE_NUM_PREGS): Likewise.
2825         (sve_vl_valid): Likewise.
2826         (struct user_sve_header): Likewise.
2827
2828 2018-06-16  Andrew Burgess  <andrew.burgess@embecosm.com>
2829             Richard Bunt <Richard.Bunt@arm.com>
2830
2831         * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
2832         was requested by GDB.
2833
2834 2018-06-15  Tom de Vries  <tdevries@suse.de>
2835
2836         * MAINTAINERS (Write After Approval): Add Tom de Vries.
2837
2838 2018-06-14  Simon Marchi  <simon.marchi@polymtl.ca>
2839
2840         * gnulib/update-gnulib.sh: Print expected versions of
2841         autoconf/aclocal.
2842
2843 2018-06-14  Simon Marchi  <simon.marchi@ericsson.com>
2844
2845         * arch-utils.c (default_type_align): Use type_length_units.
2846         * gdbtypes.c (type_align): Use type_length_units.
2847
2848 2018-06-14  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2849
2850         * cli/cli-script.c (_initialize_cli_script): Fix online documentation
2851         of 'define' command.
2852
2853 2018-06-14  Tom de Vries  <tdevries@suse.de>
2854
2855         PR cli/22573
2856         * infcmd.c (print_return_value_1): Use get_user_print_options instead of
2857         get_no_prettyformat_print_options.
2858
2859 2018-06-13  Simon Marchi  <simon.marchi@ericsson.com>
2860
2861         * sparc-nat.h: Include target.h.
2862         * sparc64-linux-nat.c (class sparc64_linux_nat_target)
2863         <fetch_registers>: Remove this argument in function call.
2864         <store_registers>: Remove this argument in function call, remove
2865         extra semicolon.
2866         <low_forget_process>: Call sparc64_forget_process instead of
2867         sparc_forget_process.
2868
2869 2018-06-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2870
2871         * procfs.c (_initialize_procfs): Use add_inf_child_target.
2872         (procfs_target::make_corefile_notes): Adjust to new
2873         target_read_alloc return type.
2874
2875 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
2876             Stephen Roberts  <stephen.roberts@arm.com>
2877
2878         PR gdb/22882
2879         * infrun.c (fetch_inferior_event): If GDB is not proceeding then
2880         run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
2881         Move should_notify_stop local into more inner scope.
2882
2883 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
2884             Stephen Roberts  <stephen.roberts@arm.com>
2885
2886         PR gdb/22882
2887         * infrun.c (resume_1): Add call to mark_async_event_handler.
2888
2889 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
2890
2891         * infrun.c (do_target_wait): Change old version of $pc printed.
2892
2893 2018-06-11  Simon Marchi  <simon.marchi@ericsson.com>
2894
2895         * dwarf2read.c (read_index_from_section): Rename to...
2896         (read_gdb_index_from_section): ... this, update all callers.
2897         (dwarf2_read_index): Rename to...
2898         (dwarf2_read_gdb_index): ... this, update all callers.
2899
2900 2018-06-11  John David Anglin  <danglin@gcc.gnu.org>
2901
2902         * gdb/hppa-linux-nat.c
2903         (hppa_linux_nat_target::fetch_inferior_registers): Rename to
2904         hppa_linux_nat_target::fetch_registers.
2905
2906 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
2907
2908         * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
2909         * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
2910         (AARCH64_DWARF_SVE_FFR): Likewise.
2911         (AARCH64_DWARF_SVE_P0): Likewise.
2912         (AARCH64_DWARF_SVE_Z0): Likewise.
2913
2914 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
2915
2916         * common/common-regcache.h (raw_compare): New function.
2917         * regcache.c (regcache::raw_compare): Likewise.
2918         * regcache.h (regcache::raw_compare): New declaration.
2919
2920 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
2921
2922         * common/common-regcache.h (reg_buffer_common): New structure.
2923         * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
2924         (reg_buffer::raw_supply): Likewise.
2925         (reg_buffer::raw_supply_integer): Likewise.
2926         (reg_buffer::raw_supply_zeroed): Likewise.
2927         (reg_buffer::raw_collect): Likewise.
2928         (reg_buffer::raw_collect_integer): Likewise.
2929         * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
2930         (reg_buffer::raw_supply): Likewise.
2931         (reg_buffer::raw_supply_integer): Likewise.
2932         (reg_buffer::raw_supply_zeroed): Likewise.
2933         (reg_buffer::raw_collect): Likewise.
2934         (reg_buffer::raw_collect_integer): Likewise.
2935
2936 2018-06-10  Tom Tromey  <tom@tromey.com>
2937
2938         * remote.c (stop_reply_p): Remove typedef.  Don't declare queue.
2939         (class remote_state) <stop_reply_queue>: Now std::vector.
2940         (remote_state::~remote_state)
2941         (remote_target::stop_reply_queue_length): Update.
2942         (struct queue_iter_param, remove_child_of_pending_fork)
2943         (struct check_pending_event_prevents_wildcard_vcont_callback_data)
2944         (check_pending_event_prevents_wildcard_vcont_callback)
2945         (remove_stop_reply_for_inferior)
2946         (remove_stop_reply_of_remote_state)
2947         (remote_notif_remove_once_on_match)
2948         (stop_reply_match_ptid_and_ws)
2949         (remote_kill_child_of_pending_fork): Remove.
2950         (remote_target::remove_new_fork_children)
2951         (remote_target::check_pending_events_prevent_wildcard_vcont)
2952         (remote_target::discard_pending_stop_replies)
2953         (remote_target::discard_pending_stop_replies_in_queue)
2954         (remote_target::remote_notif_remove_queued_reply)
2955         (remote_target::queued_stop_reply)
2956         (remote_target::push_stop_reply, remote_target::peek_stop_reply)
2957         (remote_target::wait, remote_target::kill_new_fork_children)
2958         (remote_target::async): Update.
2959
2960 2018-06-10  Tom Tromey  <tom@tromey.com>
2961
2962         * record-full.c (record_full_arch_list_cleanups): Remove.
2963         (record_full_message): Use try/catch.
2964         (record_full_wait_cleanups): Remove.
2965         (record_full_wait_1): Use try/catch.
2966         (record_full_restore): Likewise.
2967
2968 2018-06-10  Tom Tromey  <tom@tromey.com>
2969
2970         * record-full.c (record_full_breakpoint_p): Remove typedef.  Don't
2971         declare VEC.  Add constructor.
2972         <in_target_beneath>: Now bool.
2973         (record_full_breakpoints): Now a std::vector, static.
2974         (record_full_sync_record_breakpoints)
2975         (record_full_init_record_breakpoints)
2976         (record_full_target::insert_breakpoint)
2977         (record_full_target::remove_breakpoint): Update.  Don't use XNEW.
2978
2979 2018-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
2980
2981         * dwarf2read.c (process_cu_includes): Remove struct keyword.
2982         * serial.c (serial_interface_lookup): Remove struct keyword.
2983
2984 2018-06-10  Tom Tromey  <tom@tromey.com>
2985
2986         * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
2987         method.
2988         * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
2989         a method.
2990         * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
2991         method.
2992         * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
2993         "beneath" as a method.
2994         * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
2995         Use "beneath" as a method.
2996
2997 2018-06-10  Tom Tromey  <tom@tromey.com>
2998
2999         * tracefile.c (struct trace_file_writer_deleter): New.
3000         <operator()>: Rename from trace_file_writer_xfree.
3001         (trace_file_writer_up): New typedef.
3002         (tsave_command, trace_save_tfile, trace_save_ctf): Update.
3003
3004 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
3005
3006         * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
3007         <m_registers, m_register_status>: Change type to
3008         std::unique_ptr.
3009         * regcache.c (reg_buffer::reg_buffer): Use new instead of
3010         XCNEWVEC.
3011
3012 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
3013
3014         * common/common-regcache.h (enum register_status): Add
3015         underlying type "signed char".
3016         * regcache.h (reg_buffer) <m_register_status>: Change type to
3017         register_status *.
3018         * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
3019         register_status instead of signed char.
3020         (reg_buffer::save): Use REG_UNKNOWN instead of 0.
3021         (reg_buffer::get_register_status): Remove cast.
3022         (readable_regcache::raw_read): Remove cast.
3023         (readable_regcache::cooked_read): Remove cast.
3024
3025 2018-06-09  Tom Tromey  <tom@tromey.com>
3026
3027         * source.c (reverse_search_command, forward_search_command): Use
3028         scoped_fd.
3029
3030 2018-06-09  Tom Tromey  <tom@tromey.com>
3031
3032         * serial.c (serial_ops_p): Remove typedef.  Don't declare VEC.
3033         (serial_ops_list): Now static, std::vector.
3034         (serial_interface_lookup, serial_add_interface): Update.
3035
3036 2018-06-09  Tom Tromey  <tom@tromey.com>
3037
3038         * dwarf2read.c (process_cu_includes): Update.
3039         (process_full_comp_unit): Update.
3040         * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
3041         std::vector.
3042
3043 2018-06-08  Paul Koning  <paul_koning@dell.com>
3044
3045         PR gdb/23252
3046
3047         * python/python.c (do_start_initialization):
3048         Avoid call to internal Python API.
3049         (init__gdb_module): New function.
3050
3051 2018-06-08  Gary Benson <gbenson@redhat.com>
3052
3053         * linux-thread-db.c (valprint.h): New include.
3054         (struct check_thread_db_info): New structure.
3055         (check_thread_db_on_load, tdb_testinfo): New static globals.
3056         (check_thread_db, check_thread_db_callback): New functions.
3057         (try_thread_db_load_1): Run integrity checks if requested.
3058         (maintenance_check_libthread_db): New function.
3059         (_initialize_thread_db): Register "maint check libthread-db"
3060         and "maint set/show check-libthread-db".
3061         * NEWS: Mention the above new commands.
3062
3063 2018-06-08  Tom Tromey  <tom@tromey.com>
3064
3065         * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
3066         now a method.
3067
3068 2018-06-08  Tom Tromey  <tom@tromey.com>
3069
3070         * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
3071
3072 2018-06-08  Tom Tromey  <tom@tromey.com>
3073
3074         * common/btrace-common.h (struct btrace_data): Add constructor,
3075         destructor, move assignment operator.
3076         <empty, clear, fini>: New methods.
3077         <format>: Initialize.
3078         (btrace_data_init, btrace_data_fini, btrace_data_clear)
3079         (btrace_data_empty): Don't declare.
3080         * common/btrace-common.c (btrace_data_init): Remove.
3081         (btrace_data::fini): Rename from btrace_data_fini.
3082         (btrace_data::empty): Rename from btrace_data_empty.
3083         (btrace_data::clear): Rename from btrace_data_clear.  Return
3084         bool.
3085         * btrace.h (make_cleanup_btrace_data): Don't declare.
3086         * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
3087         (parse_xml_btrace): Update.
3088         (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
3089         (maint_btrace_clear_packet_history_cmd): Update.
3090
3091 2018-06-07  Pedro Alves  <palves@redhat.com>
3092
3093         * target.h (target_ops) <beneath>: Now a method.  All references
3094         updated.
3095         (class target_stack): New.
3096         * target.c (g_target_stack): New.
3097         (g_current_top_target): Delete.
3098         (current_top_target): Get the top target out of g_target_stack.
3099         (target_stack::push, target_stack::unpush): New.
3100         (push_target, unpush_target): Reimplement.
3101         (target_is_pushed): Reimplement in terms of g_target_stack.
3102         (target_ops::beneath, target_stack::find_beneath): New.
3103
3104 2018-06-07  Pedro Alves  <palves@redhat.com>
3105
3106         * target.h (find_target_beneath): Delete declaration.
3107         * target.c (find_target_beneath): Delete definition.
3108         * aix-thread.c: All callers of find_target_beneath adjusted to
3109         call target_ops::beneath instead.
3110         * bsd-uthread.c: Likewise.
3111         * linux-thread-db.c: Likewise.
3112         * ravenscar-thread.c: Likewise.
3113         * sol-thread.c: Likewise.
3114         * spu-multiarch.c: Likewise.
3115
3116 2018-06-07  Pedro Alves  <palves@redhat.com>
3117
3118         * target.h (target_ops) <beneath>: Now a method.  All references
3119         updated.
3120         (target_ops) <m_beneath>: New.
3121         * target.c (target_ops::beneath): New.
3122         * corelow.c: Adjust all references to target_ops::beneath.
3123         * linux-thread-db.c: Likewise.
3124         * make-target-delegates: Likewise.
3125         * record-btrace.c: Likewise.
3126         * record-full.c: Likewise.
3127         * remote.c: Likewise.
3128         * target.c: Likewise.
3129         * target-delegates.c: Regenerate.
3130
3131 2018-06-07  Pedro Alves  <palves@redhat.com>
3132
3133         * target.h (target_stack): Delete.
3134         (current_top_target): Declare function.
3135         * target.c (target_stack): Delete.
3136         (g_current_top_target): New.
3137         (current_top_target): New function.
3138         * auxv.c: Use current_top_target instead of target_stack
3139         throughout.
3140         * avr-tdep.c: Likewise.
3141         * breakpoint.c: Likewise.
3142         * corefile.c: Likewise.
3143         * elfread.c: Likewise.
3144         * eval.c: Likewise.
3145         * exceptions.c: Likewise.
3146         * frame.c: Likewise.
3147         * gdbarch-selftests.c: Likewise.
3148         * gnu-v3-abi.c: Likewise.
3149         * ia64-tdep.c: Likewise.
3150         * ia64-vms-tdep.c: Likewise.
3151         * infcall.c: Likewise.
3152         * infcmd.c: Likewise.
3153         * infrun.c: Likewise.
3154         * linespec.c: Likewise.
3155         * linux-tdep.c: Likewise.
3156         * minsyms.c: Likewise.
3157         * ppc-linux-nat.c: Likewise.
3158         * ppc-linux-tdep.c: Likewise.
3159         * procfs.c: Likewise.
3160         * regcache.c: Likewise.
3161         * remote.c: Likewise.
3162         * rs6000-tdep.c: Likewise.
3163         * s390-linux-nat.c: Likewise.
3164         * s390-tdep.c: Likewise.
3165         * solib-aix.c: Likewise.
3166         * solib-darwin.c: Likewise.
3167         * solib-dsbt.c: Likewise.
3168         * solib-spu.c: Likewise.
3169         * solib-svr4.c: Likewise.
3170         * solib-target.c: Likewise.
3171         * sparc-tdep.c: Likewise.
3172         * sparc64-tdep.c: Likewise.
3173         * spu-tdep.c: Likewise.
3174         * symfile.c: Likewise.
3175         * symtab.c: Likewise.
3176         * target-descriptions.c: Likewise.
3177         * target-memory.c: Likewise.
3178         * target.c: Likewise.
3179         * target.h: Likewise.
3180         * tracefile-tfile.c: Likewise.
3181         * tracepoint.c: Likewise.
3182         * valops.c: Likewise.
3183         * valprint.c: Likewise.
3184         * value.c: Likewise.
3185         * windows-tdep.c: Likewise.
3186         * mi/mi-main.c: Likewise.
3187
3188 2018-06-07  Tom Tromey  <tom@tromey.com>
3189
3190         * valprint.h (build_address_symbolic): Declare.
3191         * printcmd.c (print_address_symbolic): Update.
3192         (build_address_symbolic): Change "name" and "filename" to
3193         std::string.
3194         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
3195         Update.
3196         * defs.h (build_address_symbolic): Remove declaration.
3197
3198 2018-06-07  Alan Hayward  <alan.hayward@arm.com>
3199
3200         * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
3201         (aarch64_vnv_type): Add function.
3202         (aarch64_pseudo_register_name): Add V regs for SVE.
3203         (aarch64_pseudo_register_type): Likewise.
3204         (aarch64_pseudo_register_reggroup_p): Likewise.
3205         (aarch64_pseudo_read_value_2): Use V0 offset for SVE
3206         (aarch64_pseudo_read_value): Add V regs for SVE.
3207         (aarch64_pseudo_write_2): Use V0 offset for SVE
3208         (aarch64_pseudo_write): Add V regs for SVE.
3209         * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
3210
3211 2018-06-06  Sergio Durigan Junior  <sergiodj@redhat.com>
3212
3213         * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
3214         (sve_vl_from_vq): Likewise.
3215
3216 2018-06-05  Tom Tromey  <tom@tromey.com>
3217
3218         * cli/cli-cmds.c (show_version): Update.
3219         * top.c (print_gdb_version): Add "interactive" parameter.
3220         Update.
3221         * main.c (captured_main_1): Update.
3222         * top.h (print_gdb_version): Add "interactive" parameter and a
3223         comment.
3224
3225 2018-06-05  David Malcolm  <dmalcolm@redhat.com>
3226
3227         * common/enum-flags.h: Add trailing semicolon to example in
3228         comment.
3229
3230 2018-06-05  Tom Tromey  <tom@tromey.com>
3231
3232         PR cli/12326:
3233         * NEWS: Add entry about pager.
3234         * utils.c (pagination_disabled_for_command): New global.
3235         (prompt_for_continue): Allow "c" response to prompt.
3236         (reinitialize_more_filter): Clear
3237         pagination_disabled_for_command.
3238         (fputs_maybe_filtered): Check pagination_disabled_for_command.
3239
3240 2018-06-04  Tom Tromey  <tom@tromey.com>
3241
3242         * ada-lang.h (ada_lookup_symbol_list): Update.
3243         * ada-lang.c (resolve_subexp): Update.
3244         (symbols_are_identical_enums): Change type of syms.  Remove nsyms
3245         parameter.
3246         (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
3247         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
3248         results parameter to std::vector.
3249         (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
3250         Update.
3251         * ada-exp.y (block_lookup): Update.
3252         (select_possible_type_sym): Change type of syms.  Remove nsyms
3253         parameter.
3254         (write_var_or_type, write_name_assoc): Update.
3255
3256 2018-06-04  Joel Brobecker  <brobecker@adacore.com>
3257
3258         * windows-nat.c (windows_nat_target::xfer_partial): Return
3259         TARGET_XFER_E_IO if we need to delegate to the target beneath
3260         but BENEATH is NULL.
3261
3262 2018-06-04  Simon Marchi  <simon.marchi@ericsson.com>
3263
3264         * Makefile.in (config.status): Add configure.nat as a
3265         dependency.
3266
3267 2018-06-04  Tom Tromey  <tom@tromey.com>
3268
3269         * cp-name-parser.y (cpname_state): Add method declarations.
3270         (HANDLE_QUAL): Update.
3271         (cpname_state::d_grab, cpname_state::fill_comp)
3272         (cpname_state::make_operator, cpname_state::make_dtor)
3273         (cpname_state::make_builtin_type, cpname_state::make_name)
3274         (cpname_state::d_qualify, cpname_state::d_int_type)
3275         (cpname_state::d_unary, cpname_state::d_binary): Now methods.
3276         (%union): Move earlier.
3277
3278 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
3279
3280         * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
3281
3282 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
3283
3284         * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
3285         (aarch64_pseudo_write_1): Likewise.
3286         (aarch64_pseudo_read_value): Use helper.
3287         (aarch64_pseudo_write): Likewise.
3288
3289 2018-06-04  Pedro Alves  <palves@redhat.com>
3290
3291         * darwin-nat.c (darwin_ops): Delete.
3292         (darwin_attach_pid): Use get_native_target.
3293
3294 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
3295
3296         * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
3297         * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
3298
3299 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
3300
3301         * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
3302         * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
3303         (aarch64_gdbarch_init): Check for SVE.
3304         * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
3305
3306 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
3307
3308         * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
3309         * aarch64-tdep.h (aarch64_read_description): Likewise.
3310         * arch/aarch64.c (aarch64_create_target_description): Likewise.
3311         * arch/aarch64.h (aarch64_create_target_description): Likewise.
3312         * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
3313         * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
3314         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
3315
3316 2018-06-02  Simon Marchi  <simon.marchi@ericsson.com>
3317
3318         * value.c (value_fetch_lazy_bitfield): New.
3319         (value_fetch_lazy_memory): New.
3320         (value_fetch_lazy_register): New.
3321         (value_fetch_lazy): Factor out to smaller functions.
3322
3323 2018-06-01  Tom Tromey  <tom@tromey.com>
3324
3325         * cp-name-parser.y (backslashable, represented): Now const.
3326
3327 2018-06-01  Tom Tromey  <tom@tromey.com>
3328
3329         * cp-name-parser.y: Include parser-defs.h.
3330         (parser_fprintf): Remove declaration.
3331
3332 2018-06-01  Tom Tromey  <tom@tromey.com>
3333
3334         * cp-name-parser.y: Use %pure-parser, %lex-param, and
3335         %parse-param.
3336         (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
3337         (global_result): Remove globals.
3338         (struct cpname_state): New.
3339         (yyparse): Don't declare.
3340         (yylex, yyerror): Move declarations after %union.
3341         (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
3342         (make_name): Add state parameter.
3343         Update all callers.
3344         (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
3345         parameter.
3346         (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
3347         Update.
3348         (yylex): Add lvalp, state parameters.
3349         (yyerror): Add state parameter.
3350         (cp_demangled_name_to_comp): Update.
3351
3352 2018-06-01  Tom Tromey  <tom@tromey.com>
3353
3354         * cp-name-parser.y (parser_fprintf): Declare.
3355         (GDB_YY_REMAP_PREFIX): Define.
3356         Include yy-remap.h.  Don't redefine yy* identifiers.
3357
3358 2018-06-01  Tom Tromey  <tom@tromey.com>
3359
3360         * python/py-type.c (typy_legacy_template_argument): Update.
3361         * cp-support.h (cp_demangled_name_to_comp): Update.
3362         * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
3363         parameter to be a "std::string *".
3364         (main): Update.
3365
3366 2018-06-01  H.J. Lu  <hongjiu.lu@intel.com>
3367
3368         * ada-lex.l: Include "diagnostics.h" instead of
3369         "common/diagnostics.h".
3370         * unittests/environ-selftests.c: Likewise.
3371         * common/diagnostics.h: Moved to ../include.
3372
3373 2018-06-01  Joel Brobecker  <brobecker@adacore.com>
3374
3375         * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
3376         to language_mode_manual while calling breakpoint_re_set_one.
3377
3378 2018-06-01  Tom Tromey  <tom@tromey.com>
3379
3380         * valops.c (value_cast_structs, destructor_name_p): Update.
3381         * symtab.c (gdb_mangle_name): Update.
3382         * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
3383         Update.
3384         * p-valprint.c (pascal_object_is_vtbl_ptr_type)
3385         (pascal_object_print_value_fields, pascal_object_print_value):
3386         Update.
3387         * p-typeprint.c (pascal_type_print_derivation_info): Update.
3388         * linespec.c (find_methods): Update.
3389         * gdbtypes.h (type_name_no_tag): Remove.
3390         (type_name_or_error): Rename from type_name_no_tag_or_error.
3391         * gdbtypes.c (type_name_no_tag): Remove.
3392         (type_name_or_error): Rename from type_name_no_tag_or_error.
3393         (lookup_struct_elt_type, check_typedef): Update.
3394         * expprint.c (print_subexp_standard): Update.
3395         * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
3396         * d-namespace.c (d_lookup_nested_symbol): Update.
3397         * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
3398         (cp_print_class_member): Update.
3399         * cp-namespace.c (cp_lookup_nested_symbol): Update.
3400         * completer.c (add_struct_fields): Update.
3401         * c-typeprint.c (cp_type_print_derivation_info)
3402         (c_type_print_varspec_prefix, c_type_print_base_struct_union):
3403         Update.
3404         * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
3405         (ada_prefer_type, ada_is_exception_sym): Update.
3406
3407 2018-06-01  Tom Tromey  <tom@tromey.com>
3408
3409         * valops.c (enum_constant_from_type, value_namespace_elt)
3410         (value_maybe_namespace_elt): Update.
3411         * valarith.c (find_size_for_pointer_math): Update.
3412         * target-descriptions.c (make_gdb_type): Update.
3413         * symmisc.c (print_symbol): Update.
3414         * stabsread.c (define_symbol, read_type)
3415         (complain_about_struct_wipeout, add_undefined_type)
3416         (cleanup_undefined_types_1): Update.
3417         * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
3418         (rust_range_type_p, val_print_struct, rust_print_struct_def)
3419         (rust_internal_print_type, rust_composite_type)
3420         (rust_evaluate_funcall, rust_evaluate_subexp)
3421         (rust_inclusive_range_type_p): Update.
3422         * python/py-type.c (typy_get_tag): Update.
3423         * p-typeprint.c (pascal_type_print_base): Update.
3424         * mdebugread.c (parse_symbol, parse_type): Update.
3425         * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
3426         Update.
3427         * guile/scm-type.c (gdbscm_type_tag): Update.
3428         * go-lang.c (sixg_string_p): Update.
3429         * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
3430         Update.
3431         * gdbtypes.h (struct main_type) <tag_name>: Remove.
3432         (TYPE_TAG_NAME): Remove.
3433         * gdbtypes.c (type_name_no_tag): Simplify.
3434         (check_typedef, check_types_equal, recursive_dump_type)
3435         (copy_type_recursive, arch_composite_type): Update.
3436         * f-typeprint.c (f_type_print_base): Update.  Print "Type" prefix
3437         in summary mode when needed.
3438         * eval.c (evaluate_funcall): Update.
3439         * dwarf2read.c (fixup_go_packaging, read_structure_type)
3440         (process_structure_scope, read_enumeration_type)
3441         (read_namespace_type, read_module_type, determine_prefix): Update.
3442         * cp-support.c (inspect_type): Update.
3443         * coffread.c (process_coff_symbol, decode_base_type): Update.
3444         * c-varobj.c (c_is_path_expr_parent): Update.
3445         * c-typeprint.c (c_type_print_base_struct_union): Update.
3446         (c_type_print_base_1): Update.  Print struct/class/union/enum in
3447         summary when using C language.
3448         * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
3449         (gen_maybe_namespace_elt): Update.
3450         * ada-lang.c (ada_type_name): Simplify.
3451         (empty_record, ada_template_to_fixed_record_type_1)
3452         (template_to_static_fixed_type)
3453         (to_record_with_fixed_variant_part, ada_check_typedef): Update.
3454
3455 2018-06-01  Tom Tromey  <tom@tromey.com>
3456
3457         * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
3458         c_print_type.
3459         * c-typeprint.c (c_print_type_1): Add "language" parameter.
3460         (c_print_type): Update.
3461         (c_print_type): New overload.
3462         (c_type_print_varspec_prefix, c_type_print_args)
3463         (c_type_print_varspec_suffix, c_print_type_no_offsets)
3464         (c_type_print_base_struct_union, c_type_print_base_1)
3465         (cp_type_print_method_args): Add "language" parameter.
3466         (c_type_print_base): Update.
3467         * c-lang.h (c_print_type): Add new overload.
3468
3469 2018-06-01  Tom Tromey  <tom@tromey.com>
3470
3471         * typeprint.h (c_type_print_varspec_suffix): Don't declare.
3472         * c-typeprint.c (c_type_print_varspec_suffix): Now static.
3473
3474 2018-06-01  Alan Hayward  <alan.hayward@arm.com>
3475
3476         * aarch64-tdep.c (aarch64_sve_register_names): New const
3477         var.
3478         * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
3479         (AARCH64_SVE_Z_REGS_NUM): New define.
3480         (AARCH64_SVE_P_REGS_NUM): Likewise.
3481         (AARCH64_SVE_NUM_REGS): Likewise.
3482
3483 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
3484
3485         * nat/linux-ptrace.h [__alpha__]
3486         (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
3487         definitions.
3488
3489 2018-05-31  Maciej W. Rozycki  <macro@mips.com>
3490
3491         * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
3492         the endianness selected.
3493         * NEWS: Document `set endian auto' mode operation update.
3494
3495 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
3496
3497         * Makefile.in: Add new header.
3498         * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
3499         (sve_vl_from_vg): Likewise.
3500         (sve_vq_from_vl): Likewise.
3501         (sve_vl_from_vq): Likewise.
3502         (sve_vq_from_vg): Likewise.
3503         (sve_vg_from_vq): Likewise.
3504         * configure.nat: Add new c file.
3505         * nat/aarch64-sve-linux-ptrace.c: New file.
3506         * nat/aarch64-sve-linux-ptrace.h: New file.
3507
3508 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
3509
3510         * aarch64-linux-nat.c (aarch64_linux_read_description):
3511         Add parmeter zero.
3512         * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
3513         Likewise.
3514         * aarch64-tdep.c (tdesc_aarch64_list): Add.
3515         (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
3516         (aarch64_gdbarch_init): Add parmeter zero.
3517         * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
3518         * arch/aarch64.c (aarch64_create_target_description): Check VQ.
3519         * arch/aarch64.h (aarch64_create_target_description): Add VQ.
3520         parmeter.
3521         * doc/gdb.texinfo: Describe SVE feature
3522         * features/aarch64-sve.c: New file.
3523
3524 2018-05-31  Omair Javaid  <omair.javaid@linaro.org>
3525
3526         PR gdb/23210
3527         * gdbarch.sh (significant_addr_bit): Default to zero when
3528         not set by target architecture.
3529         * gdbarch.c: Re-generated.
3530         * utils.c (address_significant): Update.
3531
3532 2018-05-30  Joel Brobecker  <brobecker@adacore.com>
3533
3534         * stack.c (func_command): Remove trailing newline in call to error.
3535
3536 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3537
3538         * regcache.h (regcache_raw_collect): Remove, update callers to
3539         use regcache::raw_collect.
3540         * regcache.c (regcache_raw_collect): Remove.
3541
3542 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3543
3544         * regcache.h (regcache_raw_supply): Remove, update callers to
3545         use detached_regcache::raw_supply.
3546         * regcache.c (regcache_raw_supply): Remove.
3547
3548 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3549
3550         * regcache.h (regcache_cooked_write_part): Remove, update
3551         callers to use regcache::cooked_write_part.
3552         * regcache.c (regcache_cooked_write_part): Remove.
3553
3554 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3555
3556         * regcache.h (regcache_cooked_read_part): Remove, update callers
3557         to use readable_regcache::cooked_read_part.
3558         * regcache.c (regcache_cooked_read_part): Remove.
3559
3560 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3561
3562         * regcache.h (regcache_cooked_read_value): Remove, update
3563         callers to use readable_regcache::cooked_read_value.
3564         * regcache.c (regcache_cooked_read_value): Remove.
3565
3566 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3567
3568         * regcache.h (regcache_cooked_write): Remove, update callers to
3569         use regcache::cooked_write.
3570         * regcache.c (regcache_cooked_write): Remove.
3571
3572 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3573
3574         * regcache.h (regcache_invalidate): Remove, update callers to
3575         use detached_regcache::invalidate instead.
3576         * regcache.c (regcache_invalidate): Remove.
3577
3578 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3579
3580         * regcache.h (regcache_raw_write_part): Remove, update callers
3581         to use regcache::raw_write_part instead.
3582         * regcache.c (regcache_raw_write_part): Remove.
3583
3584 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3585
3586         * regcache.h (regcache_raw_read_part): Remove, update callers to
3587         use readable_regcache::raw_read_part instead.
3588         * regcache.c (regcache_raw_read_part): Remove.
3589
3590 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3591
3592         * regcache.h (regcache_cooked_read): Remove, update callers to
3593         use readable_regcache::cooked_read instead.
3594         * regcache.c (regcache_cooked_read): Remove.
3595
3596 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3597
3598         * regcache.h (regcache_raw_write): Remove, update callers to use
3599         regcache::raw_write instead.
3600         * regcache.c (regcache_raw_write): Remove.
3601
3602 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3603
3604         * regcache.h (regcache_raw_read): Remove, update callers to use
3605         readable_regcache::raw_read instead.
3606         * regcache.c (regcache_raw_read): Remove.
3607
3608 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3609
3610         * regcache.h (regcache_raw_update): Remove, update callers to
3611         use readable_regcache::raw_update instead.
3612         * regcache.c (regcache_raw_update): Remove.
3613
3614 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3615
3616         * regcache.h (regcache_register_status): Remove, update callers
3617         to use reg_buffer::get_register_status directly instead.
3618         * regcache.c (regcache_register_status): Remove.
3619
3620 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3621
3622         * regcache.h (regcache_get_ptid): Remove, update all callers to
3623         call regcache::ptid instead.
3624         * regcache.c (regcache_get_ptid): Remove.
3625
3626 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3627
3628         * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
3629
3630 2018-05-30  Pedro Alves  <palves@redhat.com>
3631
3632         * common/common-exceptions.h (exception_rethrow): Use
3633         ATTRIBUTE_NORETURN.
3634
3635 2018-05-29  Simon Marchi  <simon.marchi@polymtl.ca>
3636
3637         * breakpoint.c (print_solib_event, check_status_catch_solib):
3638         Remove struct keyword in range-based for loops.
3639         * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
3640         * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
3641         Likewise.
3642         * linespec.c (find_superclass_methods, search_minsyms_for_name):
3643         Likewise.
3644         * symfile.c (addr_info_make_relative): Likewise.
3645         * thread.c (value_in_thread_stack_temporaries): Likewise.
3646
3647 2018-06-12  Weimin Pan  <weimin.pan@oracle.com>
3648
3649         PR gdb/16841
3650         * valops.c (value_struct_elt_for_reference): Call check_typedef on
3651         aggregate type to get its real type before accessing it.
3652
3653 2018-05-29  Weimin Pan  <weimin.pan@oracle.com>
3654
3655         * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
3656         * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
3657         * coff-pe-read.c (add_pe_forwarded_sym): Replace
3658         lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
3659         * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
3660         * jit.c (jit_breakpoint_re_set_internal): Likewise.
3661         * printcmd.c (info_address_command): Likewise.
3662
3663 2018-05-29  Tom Tromey  <tom@tromey.com>
3664
3665         * windows-nat.c (handle_exception): Update fall-through comment.
3666
3667 2018-05-29  Tom Tromey  <tom@tromey.com>
3668
3669         * progspace.h (so_list_ptr): Remove typedef.  Don't declare VEC.
3670         (struct program_space) <added_solibs>: Now a std::vector.
3671         * breakpoint.c (print_solib_event): Update.
3672         (check_status_catch_solib): Update.
3673         * progspace.c (clear_program_space_solib_cache): Update.
3674         * solib.c (update_solib_list): Update.
3675
3676 2018-05-29  Tom Tromey  <tom@tromey.com>
3677
3678         * python/py-type.c (typy_richcompare): Update.
3679         * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
3680         * gdbtypes.h (types_deeply_equal): Return bool.
3681         (types_equal): Likewise.
3682         * gdbtypes.c (type_equality_entry_d): Remove typedef.  Don't
3683         declare VEC.
3684         (check_types_equal): Change worklist to std::vector.  Return
3685         bool.
3686         (struct type_equality_entry): Add constructor.
3687         (compare_maybe_null_strings): Return bool.
3688         (check_types_worklist): Return bool.  Change worklist to
3689         std::vector.
3690         (types_deeply_equal): Use std::vector.
3691         (types_equal): Return bool.
3692         (compare_maybe_null_strings): Simplify.
3693
3694 2018-05-29  Tom Tromey  <tom@tromey.com>
3695
3696         * record-btrace.c (tp_t): Remove typedef.  Don't declare VEC.
3697
3698 2018-05-29  Tom Tromey  <tom@tromey.com>
3699
3700         * objc-lang.h: Don't include cp-support.h.
3701         * common/gdb_vecs.h (const_char_ptr): Remove typedef.  Don't
3702         declare VEC.
3703
3704 2018-05-27  Tom Tromey  <tom@tromey.com>
3705
3706         * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
3707
3708 2018-05-25  Tom Tromey  <tom@tromey.com>
3709
3710         * value.c (value::location): Initialize.
3711
3712 2018-05-25  Tom Tromey  <tom@tromey.com>
3713
3714         * dbxread.c (init_bincl_list): Remove.
3715         (bincl_list): Now a std::vector.
3716         (bincls_allocated, next_bincl): Remove.
3717         (free_bincl_list, do_free_bincl_list_cleanup)
3718         (make_cleanup_free_bincl_list): Remove.
3719         (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
3720         unique_xmalloc_ptr.
3721         (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
3722         (struct header_file_location): Add constructor.
3723         (add_bincl_to_list): Remove.
3724
3725 2018-05-25  Tom Tromey  <tom@tromey.com>
3726
3727         * tui/tui.c (tui_enable): Update.
3728         * mi/mi-interp.c (mi_interp::init): Update.
3729         * interps.h (class interp) <name>: New method.
3730         <m_name>: Rename from name.
3731         (~scoped_restore_interp): Update.
3732         * interps.c (interp::interp): Update.
3733         (interp_add, interp_set, interp_lookup_existing)
3734         (current_interp_named_p): Update.
3735
3736 2018-05-25  Tom Tromey  <tom@tromey.com>
3737
3738         * interps.c (interp_name): Remove.
3739         * mi/mi-interp.c (mi_interp::init): Update.
3740         * interps.h (interp_name): Remove.
3741         (~scoped_restore_interp): Update.
3742         * tui/tui.c (tui_enable): Update.
3743
3744 2018-05-25  Tom Tromey  <tom@tromey.com>
3745
3746         * utils.c (fputs_maybe_filtered): Update.
3747         * linespec.c (decode_line_full): Update.
3748         * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
3749         (mi_print_breakpoint_for_event, mi_solib_loaded)
3750         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
3751         (mi_user_selected_context_changed): Update.
3752         * mi/mi-main.c (mi_execute_command): Update.
3753         * cli/cli-script.c (execute_control_command): Update.
3754         * python/python.c (execute_gdb_command): Update.
3755         * solib.c (info_sharedlibrary_command): Update.
3756         * interps.c (interp_ui_out): Remove.
3757         * interps.h (interp_ui_out): Remove.
3758
3759 2018-05-25  Tom Tromey  <tom@tromey.com>
3760
3761         * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
3762         * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
3763         * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
3764
3765 2018-05-25  Tom Tromey  <tom@tromey.com>
3766
3767         * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
3768         * interps.c (interp_exec): Use scoped_restore.
3769
3770 2018-05-25  Tom Tromey  <tom@tromey.com>
3771
3772         * remote.c (remote_target::remote_file_get): Use
3773         gdb::byte_vector.
3774         (remote_target::remote_file_put): Likewise.
3775
3776 2018-05-25  Tom Tromey  <tom@tromey.com>
3777
3778         * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
3779         a std::string.
3780         (get_pe_section_index, add_pe_exported_sym): Update.
3781         (read_pe_exported_syms): Use gdb::def_vector.
3782
3783 2018-05-25  Tom Tromey  <tom@tromey.com>
3784
3785         * frame.c (remove_prev_frame): Remove.
3786         (get_prev_frame_if_no_cycle): Use TRY/CATCH.
3787
3788 2018-05-25  Maciej W. Rozycki  <macro@mips.com>
3789
3790         * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
3791         Remove prototypes.
3792         * mips-linux-nat.c (supply_fpregset): Always call
3793         `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
3794         (fill_fpregset): Always call `mips64_fill_fpregset' rather than
3795         `mips_fill_fpregset'.
3796         * mips-linux-tdep.c (mips_supply_fpregset)
3797         (mips_supply_fpregset_wrapper, mips_fill_fpregset)
3798         (mips_fill_fpregset_wrapper): Remove functions.
3799         (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
3800         (mips_linux_fpregset): Remove variable.
3801         (mips_linux_iterate_over_regset_sections): Use
3802         `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
3803         (mips_linux_o32_sigframe_init): Remove comment.
3804
3805 2018-05-25  Pedro Alves  <palves@redhat.com>
3806
3807         * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
3808         (struct readahead_cache, struct packet_reg, struct
3809         remote_arch_state, class remote_state): Move higher up in the
3810         file.
3811         (remote_target::m_remote_state): Now an object instead of a pointer.
3812         (remote_target::get_remote_state): Adjust.
3813
3814 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
3815
3816         * stack.c (select_and_print_frame): Delete.
3817         (struct function_bounds): Move struct within function.
3818         (func_command): Most content moved into new function
3819         find_frame_for_function, use new function, print result, add
3820         function comment.
3821         (find_frame_for_function): New function, now returns a result.
3822
3823 2018-05-24  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
3824
3825         * stack.c (iterate_over_block_arg_vars): Fix comment.
3826         (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
3827
3828 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
3829
3830         PR gdb/23203
3831         * frame.c
3832         (scoped_restore_selected_frame::scoped_restore_selected_frame):
3833         Define.
3834         (scoped_restore_selected_frame::~scoped_restore_selected_frame):
3835         Define.
3836         * frame.h (class scoped_restore_selected_frame): New class.
3837         * stack.c (print_frame_local_vars): Remove catching and rethrowing
3838         of any exception, use scoped_restore_selected_frame to restore the
3839         frame instead.
3840
3841 2018-05-24  Pedro Alves  <palves@redhat.com>
3842
3843         * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
3844         override.
3845
3846 2018-05-23  Tom Tromey  <tom@tromey.com>
3847
3848         * complaints.c (struct complaints): Remove.
3849         (symfile_complaint_book): Remove.
3850         (series): New global.
3851         (complaint_internal): Update.
3852         (clear_complaints): Update.
3853
3854 2018-05-23  Tom Tromey  <tom@tromey.com>
3855
3856         * complaints.c (counters): New global.
3857         (struct complain): Remove.
3858         (struct complaints) <root>: Remove.
3859         (complaint_sentinel): Remove.
3860         (symfile_complaint_book): Update.
3861         (find_complaint) Remove.
3862         (complaint_internal, clear_complaints): Update.
3863
3864 2018-05-23  Tom Tromey  <tom@tromey.com>
3865
3866         * complaints.c (struct complain) <file, line>: Remove.
3867         (find_complaint): Remove file, line parameters.
3868         (complaint_internal): Update.
3869
3870 2018-05-23  Tom Tromey  <tom@tromey.com>
3871
3872         * complaints.c (vcomplaint): Remove.
3873         (complaint_internal) Merge in contents of vcomplaint.
3874
3875 2018-05-23  Tom Tromey  <tom@tromey.com>
3876
3877         * complaints.c (struct complaints) <explanation>: Remove.
3878         (symfile_explanations): Remove.
3879         (symfile_complaint_book): Update.
3880         (vcomplaint): Update.
3881         (struct explanation): Remove.
3882
3883 2018-05-23  Tom Tromey  <tom@tromey.com>
3884
3885         * complaints.c (symfile_complaints): Remove.
3886         (complaint_internal): Remove "complaints" parameter.
3887         (clear_complaints, vcomplaint): Remove "c" parameter.
3888         (get_complaints): Remove.
3889         * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
3890         (dwarf2_debug_line_missing_file_complaint)
3891         (dwarf2_debug_line_missing_end_sequence_complaint)
3892         (dwarf2_complex_location_expr_complaint)
3893         (dwarf2_const_value_length_mismatch_complaint)
3894         (dwarf2_section_buffer_overflow_complaint)
3895         (dwarf2_macro_malformed_definition_complaint)
3896         (dwarf2_invalid_attrib_class_complaint)
3897         (create_addrmap_from_index, dw2_symtab_iter_next)
3898         (dw2_expand_marked_cus)
3899         (dw2_debug_names_iterator::find_vec_in_debug_names)
3900         (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
3901         (create_debug_type_hash_table, init_cutu_and_read_dies)
3902         (partial_die_parent_scope, add_partial_enumeration)
3903         (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
3904         (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
3905         (read_import_statement, read_file_scope, create_dwo_cu_reader)
3906         (create_cus_hash_table, create_dwp_hash_table)
3907         (inherit_abstract_dies, read_func_scope, read_call_site_scope)
3908         (dwarf2_rnglists_process, dwarf2_ranges_process)
3909         (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
3910         (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
3911         (handle_struct_member_die, process_structure_scope)
3912         (read_array_type, read_common_block, read_module_type)
3913         (read_tag_pointer_type, read_typedef, read_base_type)
3914         (read_subrange_type, load_partial_dies, partial_die_info::read)
3915         (partial_die_info::read, partial_die_info::read)
3916         (partial_die_info::read, read_checked_initial_length_and_offset)
3917         (dwarf2_string_attr, read_formatted_entries)
3918         (dwarf_decode_line_header)
3919         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
3920         (new_symbol, dwarf2_const_value_attr, lookup_die_type)
3921         (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
3922         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
3923         (get_signatured_type, get_DW_AT_signature_type)
3924         (decode_locdesc, file_file_name, consume_improper_spaces)
3925         (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
3926         (dwarf_decode_macro_bytes, dwarf_decode_macros)
3927         (dwarf2_symbol_mark_computed, set_die_type)
3928         (read_attribute_value): Update.
3929         * stap-probe.c (handle_stap_probe, get_stap_base_address):
3930         Update.
3931         * dbxread.c (unknown_symtype_complaint)
3932         (lbrac_mismatch_complaint, repeated_header_complaint)
3933         (set_namestring, function_outside_compilation_unit_complaint)
3934         (read_dbx_symtab, process_one_symbol): Update.
3935         * gdbtypes.c (stub_noname_complaint): Update.
3936         * windows-nat.c (handle_unload_dll): Update.
3937         * coffread.c (coff_symtab_read, enter_linenos, decode_type)
3938         (decode_base_type): Update.
3939         * xcoffread.c (bf_notfound_complaint, ef_complaint)
3940         (eb_complaint, record_include_begin, record_include_end)
3941         (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
3942         (process_xcoff_symbol, read_symbol)
3943         (function_outside_compilation_unit_complaint)
3944         (scan_xcoff_symtab): Update.
3945         * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
3946         * buildsym.c (finish_block_internal, make_blockvector)
3947         (end_symtab_get_static_block, augment_type_symtab): Update.
3948         * dtrace-probe.c (dtrace_process_dof)
3949         (dtrace_static_probe_ops::get_probes): Update.
3950         * complaints.h (struct complaint): Don't declare.
3951         (symfile_complaints): Remove.
3952         (complaint_internal): Remove "complaints" parameter.
3953         (complaint): Likewise.
3954         (clear_complaints): Likewise.
3955         * symfile.c (syms_from_objfile_1, finish_new_objfile)
3956         (reread_symbols): Update.
3957         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
3958         (dwarf2_frame_cache, decode_frame_entry): Update.
3959         * dwarf2loc.c (dwarf_reg_to_regnum): Update.
3960         * objc-lang.c (lookup_objc_class, lookup_child_selector)
3961         (info_selectors_command): Update.
3962         * macrotab.c (macro_include, check_for_redefinition)
3963         (macro_undef): Update.
3964         * objfiles.c (filter_overlapping_sections): Update.
3965         * stabsread.c (invalid_cpp_abbrev_complaint)
3966         (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
3967         (define_symbol, error_type, read_type, rs6000_builtin_type)
3968         (stabs_method_name_from_physname, read_member_functions)
3969         (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
3970         (attach_fields_to_type, complain_about_struct_wipeout)
3971         (read_range_type, read_args, common_block_start)
3972         (common_block_end, cleanup_undefined_types_1, scan_file_globals):
3973         Update.
3974         * mdebugread.c (index_complaint, unknown_ext_complaint)
3975         (basic_type_complaint, bad_tag_guess_complaint)
3976         (bad_rfd_entry_complaint, unexpected_type_code_complaint)
3977         (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
3978         (parse_procedure, parse_lines)
3979         (function_outside_compilation_unit_complaint)
3980         (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
3981         (bad_tag_guess_complaint, reg_value_complaint): Update.
3982         * cp-support.c (demangled_name_complaint): Update.
3983         * macroscope.c (sal_macro_scope): Update.
3984         * dwarf-index-write.c (class debug_names): Update.
3985
3986 2018-05-23  Tom Tromey  <tom@tromey.com>
3987
3988         * complaints.c (clear_complaints): Remove "noisy" parameter.
3989         * complaints.h (clear_complaints): Update.
3990         * symfile.c (syms_from_objfile_1, finish_new_objfile)
3991         (reread_symbols): Update.
3992
3993 2018-05-23  Tom Tromey  <tom@tromey.com>
3994
3995         * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
3996         SUBSEQUENT_MESSAGE.
3997         (vcomplaint, clear_complaints): Update.
3998         (symfile_explanations): Remove some messages.
3999
4000 2018-05-23  Tom Tromey  <tom@tromey.com>
4001
4002         * complaints.c (internal_complaint): Remove.
4003         * complaints.h (internal_complaint): Remove.
4004
4005 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
4006
4007         * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
4008
4009 2018-05-22  Pedro Alves  <palves@redhat.com>
4010
4011         * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
4012         (remote_fileio_badfd, remote_fileio_return_errno)
4013         (remote_fileio_return_success, remote_fileio_func_open)
4014         (remote_fileio_func_open, remote_fileio_func_close)
4015         (remote_fileio_func_read, remote_fileio_func_write)
4016         (remote_fileio_func_lseek, remote_fileio_func_rename)
4017         (remote_fileio_func_unlink, remote_fileio_func_stat)
4018         (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
4019         (remote_fileio_func_isatty, remote_fileio_func_system): Add
4020         remote_target parameter.
4021         (remote_fio_func_map) <func>: Add remote_target parameter.
4022         (do_remote_fileio_request, remote_fileio_request):
4023         * remote-fileio.h (remote_fileio_request):
4024         * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
4025         remote_target parameter.
4026         (remote_notif_process, handle_notification): Adjust to pass down
4027         the remote.
4028         (remote_notif_state_allocate): Add remote_target parameter.  Save
4029         it.
4030         * remote-notif.h (struct remote_target): Forward declare.
4031         (struct notif_client) <parse, ack, can_get_pending_events>: Add
4032         remote_target parameter.
4033         (struct remote_notif_state) <remote>: New field.
4034         (remote_notif_ack, remote_notif_parse): Add remote_target
4035         parameter.
4036         (remote_notif_state_allocate, remote_notif_state_allocate): Add
4037         remote_target parameter.
4038         * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
4039         (threads_listing_context, rmt_thread_action, protocol_feature)
4040         (packet_reg, stop_reply, stop_reply_p, enum packet_support)
4041         (packet_result, struct threads_listing_context, remote_state):
4042         Move definitions and declarations higher up.
4043         (remote_target) <~remote_target>: Declare.
4044         (remote_download_command_source, remote_file_put, remote_file_get)
4045         (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
4046         (remote_hostio_pread_vFile, remote_hostio_send_command)
4047         (remote_hostio_set_filesystem, remote_hostio_open)
4048         (remote_hostio_close, remote_hostio_unlink, remote_state)
4049         (get_remote_state, get_remote_packet_size, get_memory_packet_size)
4050         (get_memory_write_packet_size, get_memory_read_packet_size)
4051         (append_pending_thread_resumptions, remote_detach_1)
4052         (append_resumption, remote_resume_with_vcont)
4053         (add_current_inferior_and_thread, wait_ns, wait_as)
4054         (process_stop_reply, remote_notice_new_inferior)
4055         (process_initial_stop_replies, remote_add_thread)
4056         (btrace_sync_conf, remote_btrace_maybe_reopen)
4057         (remove_new_fork_children, kill_new_fork_children)
4058         (discard_pending_stop_replies, stop_reply_queue_length)
4059         (check_pending_events_prevent_wildcard_vcont)
4060         (discard_pending_stop_replies_in_queue, stop_reply)
4061         (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
4062         (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
4063         (remote_interrupt_as, remote_interrupt_ns)
4064         (remote_get_noisy_reply, remote_query_attached)
4065         (remote_add_inferior, remote_current_thread, get_current_thread)
4066         (set_thread, set_general_thread, set_continue_thread)
4067         (set_general_process, write_ptid)
4068         (remote_unpack_thread_info_response, remote_get_threadinfo)
4069         (parse_threadlist_response, remote_get_threadlist)
4070         (remote_threadlist_iterator, remote_get_threads_with_ql)
4071         (remote_get_threads_with_qxfer)
4072         (remote_get_threads_with_qthreadinfo, extended_remote_restart)
4073         (get_offsets, remote_check_symbols, remote_supported_packet)
4074         (remote_query_supported, remote_packet_size)
4075         (remote_serial_quit_handler, remote_detach_pid)
4076         (remote_vcont_probe, remote_resume_with_hc)
4077         (send_interrupt_sequence, interrupt_query)
4078         (remote_notif_get_pending_events, fetch_register_using_p)
4079         (send_g_packet, process_g_packet, fetch_registers_using_g)
4080         (store_register_using_P, store_registers_using_G)
4081         (set_remote_traceframe, check_binary_download)
4082         (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
4083         (remote_xfer_live_readonly_partial, remote_read_bytes)
4084         (remote_send_printf, remote_flash_write, readchar)
4085         (remote_serial_write, putpkt, putpkt_binary, skip_frame)
4086         (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
4087         (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
4088         (extended_remote_disable_randomization, extended_remote_run)
4089         (send_environment_packet, extended_remote_environment_support)
4090         (extended_remote_set_inferior_cwd, remote_write_qxfer)
4091         (remote_read_qxfer, push_stop_reply, vcont_r_supported)
4092         (packet_command): Now methods of ...
4093         (remote_target): ... this class.
4094         (m_remote_state) <remote_target>: New field.
4095         (struct remote_state) <stop_reply_queue,
4096         remote_async_inferior_event_token, wait_forever_enabled_p>: New
4097         fields.
4098         (remote_state::remote_state): Allocate stop_reply_queue.
4099         (remote_state): Delete global.
4100         (get_remote_state_raw): Delete.
4101         (remote_target::get_remote_state): Allocate m_remote_state on
4102         demand.
4103         (get_current_remote_target): New.
4104         (remote_ops, extended_remote_ops): Delete.
4105         (wait_forever_enabled_p, remote_async_inferior_event_token):
4106         Delete, moved to struct remote_state.
4107         (remote_target::close): Delete self.  Destruction bits split to
4108         ...
4109         (remote_target::~remote_target): ... this.
4110         (show_memory_packet_size): Adjust to use
4111         get_current_remote_target.
4112         (struct protocol_feature) <func>: Add remote_target parameter.
4113         All callers adjusted.
4114         (curr_quit_handler_target): New.
4115         (remote_serial_quit_handler): Reimplement.
4116         (remote_target::open_1): Adjust to use get_current_remote_target.
4117         Heap-allocate remote_target/extended_remote_target instances.
4118         (vcont_builder::vcont_builder): Add remote_target parameter, and
4119         save it in m_remote.  All callers adjusted.
4120         (vcont_builder::m_remote): New field.
4121         (vcont_builder::restart, vcont_builder::flush)
4122         (vcont_builder::push_action): Use it.
4123         (remote_target::commit_resume): Use it.
4124         (struct queue_iter_param) <remote>: New field.
4125         (remote_target::remove_new_fork_children): Fill in 'remote' field.
4126         (check_pending_event_prevents_wildcard_vcont_callback_data): New.
4127         (check_pending_event_prevents_wildcard_vcont_callback)
4128         (remote_target::check_pending_events_prevent_wildcard_vcont)
4129         (remote_target::discard_pending_stop_replies)
4130         (remote_target::discard_pending_stop_replies_in_queue)
4131         (remote_target::remote_notif_remove_queued_reply): Fill in
4132         'remote' field.
4133         (remote_notif_get_pending_events): New.
4134         (remote_target::readchar, remote_target::remote_serial_write):
4135         Save/restore curr_quit_handler_target.
4136         (putpkt): New.
4137         (kill_new_fork_children): Fill in 'remote' field.
4138         (packet_command): Use get_current_remote_target, defer to
4139         remote_target method of same name.
4140         (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
4141         parameter, and save it in m_remote.  All callers adjusted.
4142         (scoped_remote_fd::release): Use m_remote.
4143         (scoped_remote_fd::m_remote): New field.
4144         (remote_file_put, remote_file_get, remote_file_delete): Use
4145         get_current_remote_target, defer to remote_target method of same
4146         name.
4147         (remote_btrace_reset): Add remote_state paremeter.  Update all
4148         callers.
4149         (remote_async_inferior_event_handler). Pass down 'data'.
4150         (remote_new_objfile): Use get_current_remote_target.
4151         (remote_target::vcont_r_supported): New.
4152         (set_range_stepping): Use get_current_remote_target and
4153         remote_target::vcont_r_supported.
4154         (_initialize_remote): Don't allocate 'remote_state' and
4155         'stop_reply_queue' globals.
4156         * remote.h (struct remote_target): Forward declare.
4157         (getpkt, putpkt, remote_notif_get_pending_events): Add
4158         'remote_target' parameter.
4159
4160 2018-05-22  Pedro Alves  <palves@redhat.com>
4161
4162         * remote.c (vcont_builder): Now a class.  Make all data members
4163         private.
4164         (vcont_builder) <vcont_builder, restart, flush, push_action>:
4165         Declare methods.
4166         (vcont_builder_restart): Rename to ...
4167         (vcont_builder::restart): ... this.
4168         (vcont_builder_flush): Rename to ...
4169         (vcont_builder::flush): ... this.
4170         (vcont_builder_push_action): Rename to ...
4171         (vcont_builder::push_action): ... this.
4172         (remote_target::commit_resume): Adjust.
4173
4174 2018-05-22  Pedro Alves  <palves@redhat.com>
4175
4176         * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
4177         (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
4178         (get_fixed_memory_packet_size): New.
4179         (get_memory_packet_size): Use it.
4180         (set_memory_packet_size): Don't override the config size with
4181         DEFAULT_MAX_MEMORY_PACKET_SIZE.
4182         (show_memory_packet_size): Use get_fixed_memory_packet_size.
4183         Don't refer to get_memory_packet_size if not connected to a remote
4184         target.  Show "(default)" if configured size is 0.
4185
4186 2018-05-22  Pedro Alves  <palves@redhat.com>
4187
4188         * remote.c (remote_target::mourn_inferior): Move
4189         discard_pending_stop_replies call here from ...
4190         (_initialize_remote): ... here.
4191
4192 2018-05-22  Pedro Alves  <palves@redhat.com>
4193
4194         * remote.c (compare_section_command): Remove set_general_process
4195         call.
4196
4197 2018-05-22  Pedro Alves  <palves@redhat.com>
4198
4199         * remote.c (struct packet_reg, struct remote_arch_state):
4200         Move higher up in the file.
4201         (remote_state) <m_arch_states>: Store remote_arch_state values
4202         instead of remote_arch_state pointers.
4203         (remote_state::get_remote_arch_state): Adjust.
4204
4205 2018-05-22  Pedro Alves  <palves@redhat.com>
4206
4207         * remote.c: Include <unordered_map>.
4208         (remote_state): Now a class.
4209         (remote_state) <get_remote_arch_state>: Declare method.
4210         <get_remote_arch_state>: New field.
4211         (remote_arch_state) <remote_arch_state>: Declare ctor.
4212         <regs>: Now a unique_ptr.
4213         (remote_gdbarch_data_handle): Delete.
4214         (get_remote_arch_state): Delete.
4215         (remote_state::get_remote_arch_state): New.
4216         (get_remote_state): Adjust to call remote_state's
4217         get_remote_arch_state method.
4218         (init_remote_state): Delete, bits factored out to ...
4219         (remote_arch_state::remote_arch_state): ... this new method.
4220         (get_remote_packet_size, get_memory_packet_size)
4221         (process_g_packet, remote_target::fetch_registers)
4222         (remote_target::prepare_to_store, store_registers_using_G)
4223         (remote_target::store_registers, remote_target::get_trace_status):
4224         Adjust to call remote_state's method.
4225         (_initialize_remote): Remove reference to
4226         remote_gdbarch_data_handle.
4227
4228 2018-05-22  Pedro Alves  <palves@redhat.com>
4229
4230         * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
4231         pread>: New method declarations.
4232         (remote_target::open_1): Adjust.
4233         (readahead_cache_invalidate): Rename to ...
4234         (readahead_cache::invalidate): ... this, and adjust to be a class
4235         method.
4236         (readahead_cache_invalidate_fd): Rename to ...
4237         (readahead_cache::invalidate_fd): ... this, and adjust to be a
4238         class method.
4239         (remote_hostio_pwrite): Adjust.
4240         (remote_hostio_pread_from_cache): Rename to ...
4241         (readahead_cache::pread): ... this, and adjust to be a class
4242         method.
4243         (remote_hostio_close): Adjust.
4244
4245 2018-05-22  Pedro Alves  <palves@redhat.com>
4246
4247         * remote.c (remote_hostio_close_cleanup): Delete.
4248         (class scoped_remote_fd): New.
4249         (remote_file_put, remote_file_get): Use it.
4250
4251 2018-05-22  Pedro Alves  <palves@redhat.com>
4252
4253         (struct vCont_action_support): Use bool and initialize all fields.
4254         (struct readahead_cache): Initialize all fields.
4255         (remote_state): Use bool and initialize all fields.
4256         (remote_state::remote_state, remote_state::~remote_state): New.
4257         (new_remote_state): Delete.
4258         (_initialize_remote): Use new to allocate remote_state.
4259
4260 2018-05-22  Pedro Alves  <palves@redhat.com>
4261             張俊芝  <zjz@zjz.name>
4262
4263         PR gdb/22973
4264         * c-exp.y: Include "c-support.h".
4265         (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
4266         of tolower.  Use c_ident_is_alpha to scan names.
4267         * c-lang.c: Include "c-support.h".
4268         (convert_ucn, convert_octal, convert_hex, convert_escape): Use
4269         ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
4270         * c-support.h: New file, with bits factored out from ...
4271         * cp-name-parser.y: ... this file.
4272         Include "c-support.h".
4273         (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
4274         c-support.h and renamed.
4275         (symbol_end, yylex): Adjust.
4276
4277 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
4278
4279         * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
4280         parameter type to CORE_ADDR.
4281         * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
4282         parameter type in declaration to CORE_ADDR.
4283         * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
4284         target_auxv_search to get AT_HWCAP and use the result to get the
4285         target description.
4286         * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
4287         to CORE_ADDR. Remove the cast of the return value to unsigned
4288         long. Fix error predicate of target_auxv_search.
4289         (ppc_linux_nat_target::read_description): Change the type of the
4290         hwcap variable to CORE_ADDR.
4291
4292 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
4293
4294         * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
4295         if the size of fpscr is larger than 32 bits.
4296
4297 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
4298
4299         * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
4300         (ppc32_linux_vsxregmap): New global.
4301         (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
4302         regcache_supply_regset, and regcache_collect_regset.
4303         * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
4304         * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
4305         (fetch_vsx_register, store_vsx_register): Remove.
4306         (fetch_vsx_registers): Add regno parameter. Get regset using
4307         ppc_linux_vsxregset. Use regset to supply registers.
4308         (store_vsx_registers): Add regno parameter. Get regset using
4309         ppc_linux_vsxregset. Use regset to collect registers.
4310         (fetch_register): Call fetch_vsx_registers instead of
4311         fetch_vsx_register.
4312         (store_register): Call store_vsx_registers instead of
4313         store_vsx_register.
4314         (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
4315         new regno parameter.
4316         (store_ppc_registers): Call store_vsx_registers with -1 for the
4317         new regno parameter.
4318         * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
4319         (ppc_collect_vsxregset): Remove.
4320
4321 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
4322
4323         * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
4324         offset fields.
4325         * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
4326         for vector register offset fields.
4327         (ppc64_fbsd_reg_offsets): Likewise.
4328         * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
4329         to vector register offset fields.
4330         * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
4331         to vector register offset fields.
4332         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
4333         vector register offset fields.
4334         * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
4335         initializers for vector register offset fields.
4336         (rs6000_aix64_reg_offsets): Likewise.
4337         * rs6000-tdep.c (ppc_vrreg_offset): Remove.
4338         (ppc_supply_vrregset): Remove.
4339         (ppc_collect_vrregset): Remove.
4340         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
4341         (ppc_linux_vrregset) : New function.
4342         (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
4343         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
4344         (ppc32_linux_vrregset): Remove.
4345         (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
4346         and use result instead of ppc32_linux_vrregset.
4347         (ppc32_linux_reg_offsets): Remove initializers for vector register
4348         offset fields.
4349         (ppc64_linux_reg_offsets): Likewise.
4350         * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
4351         * ppc-linux-nat.c: Include regset.h.
4352         (gdb_vrregset_t): Adjust comment to account for little-endian
4353         mode.
4354         (supply_vrregset, fill_vrregset): Remove.
4355         (fetch_altivec_register, store_altivec_register): Remove.
4356         (fetch_altivec_registers): Add regno parameter. Get regset using
4357         ppc_linux_vrregset. Use regset to supply registers.
4358         (store_altivec_registers): Add regno parameter. Get regset using
4359         ppc_linux_vrregset. Use regset to collect registers.
4360         (fetch_register): Call fetch_altivec_registers instead of
4361         fetch_altivec_register.
4362         (store_register): Call store_altivec_registers instead of
4363         store_altivec_register.
4364         (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
4365         the new regno parameter.
4366         (store_ppc_registers): Call store_altivec_registers with -1 for
4367         the new regno parameter.
4368
4369 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
4370
4371         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
4372         (PPC_LINUX_SIZEOF_VSXREGSET): Define.
4373         * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
4374         (gdb_vrregset_t): Change array type size to
4375         PPC_LINUX_SIZEOF_VRREGSET.
4376         (gdb_vsxregset_t): Change array type size to
4377         PPC_LINUX_SIZEOF_VSXREGSET.
4378         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
4379         Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
4380         PPC_LINUX_SIZEOF_VSXREGSET.
4381
4382 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
4383
4384         * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
4385         * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
4386         nat/ppc-linux.c.
4387         (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
4388         ppc_linux_target_wordsize with tid.
4389         (ppc_linux_nat_target::read_description): Call ppc_linux_target
4390         wordsize with tid.
4391         * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
4392         (ppc64_64bit_inferior_p): Add static and inline specifiers.
4393         (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
4394         tid parameter. Remove static specifier.
4395         * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
4396         (ppc_linux_target_wordsize): New declaration.
4397
4398 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
4399
4400         * arch/ppc-linux-common.c: New file.
4401         * arch/ppc-linux-common.h: New file.
4402         * arch/ppc-linux-tdesc.h: New file.
4403         * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
4404         * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
4405         (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
4406         arch/ppc-linux-tdesc.h.
4407         * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
4408         arch/ppc-linux-tdesc.h.
4409         (ppc_linux_nat_target::read_description): Remove target
4410         description matching code. Fill a ppc_linux_features struct and
4411         call ppc_linux_match_description with it. Move comment about ISA
4412         2.05 to ppc-linux-common.c.
4413         * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
4414         arch/ppc-linux-tdesc.h.
4415         (ppc_linux_core_read_description): Remove target description
4416         matching code. Fill a ppc_linux_features struct and call
4417         ppc_linux_match_description with it.
4418         * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
4419         (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
4420         (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
4421         (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
4422         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
4423         (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
4424         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
4425         (tdesc_powerpc_e500l): Remove.
4426
4427 2018-05-22  Joel Brobecker  <brobecker@adacore.com>
4428
4429         * ada-lang.c (catch_assert_command): Pass empty string instead
4430         of NULL for excep_string argument.
4431
4432 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
4433
4434         * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
4435         the width of the requested register exceeds the width of the
4436         `ptrace' data type.
4437
4438 2018-05-21  Tom Tromey  <tom@tromey.com>
4439
4440         * printcmd.c (output_command): Remove.
4441         (output_command_const): Rename to output_command.
4442         * valprint.h (output_command): Rename from output_command_const.
4443         * tracepoint.c (trace_dump_actions): Call output_command.
4444
4445 2018-05-21  Tom Tromey  <tom@tromey.com>
4446
4447         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
4448         (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
4449         * ada-lang.h (create_ada_exception_catchpoint): Update.
4450         * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
4451         std::string.
4452         (create_excep_cond_exprs, ~ada_catchpoint)
4453         (should_stop_exception, print_one_exception)
4454         (print_mention_exception, print_recreate_exception): Update.
4455         (ada_get_next_arg): Remove.
4456         (catch_ada_exception_command_split): Use std::string.  Change type
4457         of "excep_string", "cond_string".
4458         (catch_ada_exception_command): Update.
4459         (create_ada_exception_catchpoint): Change type of excep_string.
4460         (ada_exception_sal): Remove excep_string parameter.
4461         (~ada_catchpoint): Remove.
4462
4463 2018-05-21  Tom Tromey  <tom@tromey.com>
4464
4465         * ada-lang.c (ada_collect_symbol_completion_matches): Remove
4466         cleanup.
4467
4468 2018-05-21  Tom Tromey  <tom@tromey.com>
4469
4470         * ada-lang.c (ada_exception_message_1, ada_exception_message):
4471         Return unique_xmalloc_ptr.
4472         (print_it_exception): Update.
4473
4474 2018-05-21  Tom Tromey  <tom@tromey.com>
4475
4476         * tracepoint.c (trace_dump_actions): Use std::string.
4477
4478 2018-05-21  Tom Tromey  <tom@tromey.com>
4479
4480         * symfile.c (reread_symbols): Use std::string for original_name.
4481
4482 2018-05-21  Tom Tromey  <tom@tromey.com>
4483
4484         * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
4485         (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN.  Default
4486         constructor.
4487
4488 2018-05-20  Simon Marchi  <simon.marchi@polymtl.ca>
4489
4490         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
4491         instance to...
4492         (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
4493         * objfiles.c (get_objfile_bfd_data): Allocate
4494         objfile_per_bfd_storage with obstack_new when allocating on
4495         obstack.
4496
4497 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
4498
4499         * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
4500         OBSTACK_ZALLOC.
4501         * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
4502         * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
4503         * mdebugread.c (mdebug_build_psymtabs): Likewise.
4504         (add_pending): Likewise.
4505         (parse_symbol): Likewise.
4506         (parse_partial_symbols): Likewise.
4507         (psymtab_to_symtab_1): Likewise.
4508         (new_psymtab): Likewise.
4509         (elfmdebug_build_psymtabs): Likewise.
4510         * minsyms.c (terminate_minimal_symbol_table): Likewise.
4511         * objfiles.c (get_objfile_bfd_data): Likewise.
4512         (objfile_register_static_link): Likewise.
4513         * psymtab.c (allocate_psymtab): Likewise.
4514         * stabsread.c (read_member_functions): Likewise.
4515         * xcoffread.c (xcoff_end_psymtab): Likewise.
4516
4517 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
4518
4519         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
4520         compiler supports std::is_trivially_constructible.
4521         * common/poison.h: Include obstack.h.
4522         (IsMallocable): Define to is_trivially_constructible if the
4523         compiler supports it, define to true_type otherwise.
4524         (xobnew): New.
4525         (XOBNEW): Redefine.
4526         (xobnewvec): New.
4527         (XOBNEWVEC): Redefine.
4528         * gdb_obstack.h (obstack_zalloc): New.
4529         (OBSTACK_ZALLOC): Redefine.
4530         (obstack_calloc): New.
4531         (OBSTACK_CALLOC): Redefine.
4532         (obstack_new): New.
4533         * gdbarch.sh: Include gdb_obstack in gdbarch.h.
4534         (gdbarch_obstack): New declaration in gdbarch.h, definition in
4535         gdbarch.c.
4536         (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
4537         obstack_calloc/obstack_zalloc.
4538         (gdbarch_obstack_zalloc): Remove.
4539         * target-descriptions.c (tdesc_data_init): Use obstack_new.
4540
4541 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4542
4543         * stack.c (backtrace_command_1): Remove useless variable int i.
4544
4545 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4546
4547         * stack.c (print_frame_info): Fix comment.
4548
4549 2018-05-18  Tom Tromey  <tom@tromey.com>
4550
4551         * dwarf2read.c (struct dwz_file): Add constructor, initializers.
4552         <dwz_bfd>: Now a gdb_bfd_ref_ptr.
4553         (~dwarf2_per_objfile): Update
4554         (dwarf2_get_dwz_file): Use new.
4555         * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
4556         unique_ptr.
4557
4558 2018-05-18  Tom Tromey  <tom@tromey.com>
4559
4560         * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
4561         unique_ptr.
4562         * dwarf2read.c (struct dwp_file): Add constructor and
4563         initializers.
4564         (open_and_init_dwp_file): Return a unique_ptr.
4565         (dwarf2_per_objfile, create_dwp_hash_table)
4566         (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
4567         (lookup_dwo_unit_in_dwp): Update.
4568         (open_and_init_dwp_file, get_dwp_file): Update.
4569
4570 2018-05-18  Tom Tromey  <tom@tromey.com>
4571
4572         * dwarf2read.c (dwarf2_per_objfile): Update.
4573         (struct mapped_index): Add initializers.
4574         (dwarf2_read_index): Use new.
4575         (dw2_symtab_iter_init): Update.
4576         * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
4577         unique_ptr.
4578
4579 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
4580
4581         * dwarf2read.c (mapped_index) <total_size>: Remove.
4582
4583 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
4584
4585         * unittests/format_pieces-selftests.c (test_format_specifier):
4586         Add ARI comments.
4587
4588 2018-05-18  Tom Tromey  <tom@tromey.com>
4589
4590         * c-typeprint.c (maybe_print_hole): New function.
4591         (c_print_type_struct_field_offset): Update.
4592         (c_type_print_base_struct_union): Call maybe_print_hole.
4593
4594 2018-05-17  Keith Seitz  <keiths@redhat.com>
4595
4596         * breakpoint.c (build_bpstat_chain): New function, moved from
4597         bpstat_stop_status.
4598         (bpstat_stop_status): Add optional parameter, `stop_chain'.
4599         If no stop chain is passed, call build_bpstat_chain to build it.
4600         * breakpoint.h (build_bpstat_chain): Declare.
4601         (bpstat_stop_status): Move documentation here from breakpoint.c.
4602         * infrun.c (handle_signal_stop): Before eliding inlined frames,
4603         build the stop chain and pass it to skip_inline_frames.
4604         Pass this stop chain to bpstat_stop_status.
4605         * inline-frame.c: Include breakpoint.h.
4606         (stopped_by_user_bp_inline_frame): New function.
4607         (skip_inline_frames): Add parameter `stop_chain'.
4608         Move documention to inline-frame.h.
4609         If non-NULL, use stopped_by_user_bp_inline_frame to determine
4610         whether the frame should be elided.
4611         * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
4612         Add moved documentation and update for new parameter.
4613
4614 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
4615
4616         PR cli/14975
4617         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4618         unittests/format_pieces-selftests.c.
4619         * common/format.h (format_piece) <operator==>: New.
4620         (format_pieces) <operator[]>: Remove.
4621         * common/format.c (format_pieces::format_pieces): Handle \e.
4622         * unittests/format_pieces-selftests.c: New.
4623
4624 2018-05-17  Tom Tromey  <tom@tromey.com>
4625
4626         PR symtab/23010:
4627         * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
4628         (dw2_instantiate_symtab): Add skip_partial parameter.
4629         (dw2_find_last_source_symtab, dw2_map_expand_apply)
4630         (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
4631         (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
4632         (dw2_expand_symtabs_matching_one)
4633         (dw2_find_pc_sect_compunit_symtab)
4634         (dw2_debug_names_lookup_symbol)
4635         (dw2_debug_names_expand_symtabs_for_function): Update.
4636         (init_cutu_and_read_dies): Add skip_partial parameter.
4637         (process_psymtab_comp_unit, build_type_psymtabs_1)
4638         (process_skeletonless_type_unit, load_partial_comp_unit)
4639         (psymtab_to_symtab_1): Update.
4640         (load_full_comp_unit): Add skip_partial parameter.
4641         (process_imported_unit_die, dwarf2_read_addr_index)
4642         (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
4643         (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
4644         (read_signatured_type): Update.
4645
4646 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
4647
4648         * value.c (release_value): Remove unused variable.
4649         (record_latest_value): Likewise.
4650         (access_value_history): Likewise.
4651         (preserve_values): Likewise.
4652
4653 2018-05-17  Tom Tromey  <tom@tromey.com>
4654
4655         * extension.h (struct ext_lang_type_printers) <py_type_printers>:
4656         Initialize.
4657
4658 2018-05-16  Maciej W. Rozycki  <macro@mips.com>
4659
4660         PR gdb/22286
4661         * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
4662         Also handle registers whose width is not a multiple of
4663         PTRACE_TYPE_RET.
4664         (linux_nat_trad_target::store_register): Likewise.
4665
4666 2018-05-16  Tom Tromey  <tom@tromey.com>
4667
4668         * gdbcore.h (core_bfd): Redefine.
4669         * corelow.c (core_target::close): Update.
4670         (core_target_open): Update.
4671         * progspace.h (struct program_space) <cbfd>: Now a
4672         gdb_bfd_ref_ptr.
4673
4674 2018-05-16  Tom Tromey  <tom@tromey.com>
4675
4676         PR cli/19551:
4677         * symfile-add-flags.h (enum symfile_add_flags)
4678         <SYMFILE_NOT_FILENAME>: New constant.
4679         * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME.  Get
4680         objfile name from BFD.
4681         (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
4682         * minidebug.c (find_separate_debug_file_in_section): Put
4683         ".gnu_debugdata" into BFD's file name.
4684
4685 2018-05-16  Simon Marchi  <simon.marchi@ericsson.com>
4686
4687         * regcache.c (regcache_read_ftype, regcache_write_ftype):
4688         Remove.
4689
4690 2018-05-15  Tamar Christina  <tamar.christina@arm.com>
4691
4692         PR binutils/21446
4693         * aarch64-tdep.c (aarch64_analyze_prologue,
4694         aarch64_software_single_step, aarch64_displaced_step_copy_insn):
4695         Indicate not interested in errors.
4696
4697 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
4698
4699         * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
4700         Supply the MIPS_ZERO_REGNUM register.
4701
4702 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
4703
4704         * mips-tdep.c (mask_address_var): Make variable static.
4705
4706 2018-05-14  Tom Tromey  <tom@tromey.com>
4707
4708         * dwarf2read.c (rust_union_quirks): Clear rust_unions.
4709
4710 2018-05-11  Andrew Burgess  <andrew.burgess@embecosm.com>
4711
4712         * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
4713         FXSAVE_ADDR for the mxcsr register.
4714
4715 2018-05-11  Max Filippov  <jcmvbkbc@gmail.com>
4716
4717         * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
4718
4719 2018-05-11  Pedro Alves  <palves@redhat.com>
4720
4721         * corelow.c (core_target) <core_target>: No longer inline.
4722         Initialize m_core_gdbarch, m_core_vec and build the section table
4723         here.
4724         <~core_target>: New.
4725         <core_gdbarch, get_core_register_section>: New methods.
4726         <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
4727         factored out from ...
4728         <core_data, core_vec, core_gdbarch>: ... these deleted globals.
4729         (core_ops): Delete.
4730         (sniff_core_bfd): Add gdbarch parameter.
4731         (core_close): Delete, merged into ...
4732         (core_target::close): ... here.  Delete self.
4733         (core_close_cleanup): Delete.
4734         (core_target_open): Allocate a core_target on the heap.  Use a
4735         unique_ptr instead of a cleanup.  Bits moved into the core_target
4736         ctor.  Adjust to use core_target methods instead of globals.
4737         (get_core_register_section): Rename to ...
4738         (core_target::get_core_register_section): ... this and adjust.
4739         (struct get_core_registers_cb_data): New.
4740         (get_core_registers_cb): Use it.  Use bool.
4741         (core_target::fetch_registers, core_target::files_info)
4742         (core_target::xfer_partial, core_target::read_description)
4743         (core_target::pid_to, core_target::thread_name): Adjust to
4744         reference class fields instead of globals.
4745         * target.h (struct target_ops_deleter, target_ops_up): New.
4746
4747 2018-05-11  Pedro Alves  <palves@redhat.com>
4748
4749         * corefile.c (core_file_command): Move to corelow.c.
4750         * corelow.c (the_core_target): Delete.
4751         (core_file_command): Moved from corefile.c.  Check exec_bfd
4752         instead of the_core_target.  Use target_detach instead of calling
4753         into the_core_target directly.
4754         (maybe_say_no_core_file_now): New.
4755         (core_target::detach): Use it.
4756         (_initialize_corelow): Remove references to the_core_target.
4757         * gdbcore.h (the_core_target): Delete.
4758
4759 2018-05-11  Tom Tromey  <tromey@redhat.com>
4760             Pedro Alves  <palves@redhat.com>
4761
4762         * corefile.c (core_bfd): Remove.
4763         * gdbcore.h (core_bfd): Now a macro.
4764         * progspace.h (struct program_space) <cbfd>: New field.
4765
4766 2018-05-11  Tom Tromey  <tom@tromey.com>
4767
4768         * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
4769         gdb::def_vector.
4770
4771 2018-05-10  Tom Tromey  <tom@tromey.com>
4772
4773         * configure: Rebuild.
4774         * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
4775
4776 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
4777
4778         PR server/23158:
4779         * regformats/regdat.sh: Adjust script, following the addition
4780         of the new expedite_regs parameter to init_target_desc.
4781
4782 2018-05-10  Omair Javaid  <omair.javaid@linaro.org>
4783     
4784         PR gdb/23127
4785         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
4786         set_gdbarch_significant_addr_bit.
4787         * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
4788         set_gdbarch_significant_addr_bit.
4789         * utils.c (address_significant): Update to sign extend addr.
4790
4791 2018-05-09  Max Filippov  <jcmvbkbc@gmail.com>
4792
4793         * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
4794         (xtensa_linux_init_abi): Limit tdep->num_regs by
4795         tdep->num_nopriv_regs.
4796         * xtensa-tdep.c (xtensa_derive_tdep): Calculate
4797         tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
4798         not initialized.
4799
4800 2018-05-08  Simon Marchi  <simon.marchi@ericsson.com>
4801
4802         * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
4803
4804 2018-05-08  Andrew Burgess  <andrew.burgess@embecosm.com>
4805
4806         * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
4807         (I387_MXCSR_INIT_VAL): New constant.
4808         * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
4809         buffer if it was supplied by the inferior.
4810         * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
4811         (i387_xsave_get_clear_bv): New function.
4812         (i387_supply_xsave): Only read x87 control registers from the
4813         xsave buffer if the feature is enabled, and the state will have
4814         been written, otherwise, provide a suitable default.
4815         (i387_collect_xsave): Pre-clear all registers in xsave buffer,
4816         including x87 control registers.  Update control registers if they
4817         have changed from the default value, and mark features as enabled
4818         as required.
4819         * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
4820
4821 2018-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
4822
4823         * spu-tdep.c (info_spu_event_command): Fix output formatting.
4824
4825 2018-05-07  Tom Tromey  <tom@tromey.com>
4826
4827         * configure: Rebuild.
4828         * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
4829
4830 2018-05-07  Tom Tromey  <tom@tromey.com>
4831
4832         PR tdep/20362:
4833         * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
4834         bit.  Use correct value for VDIV.
4835
4836 2018-05-04  Tom Tromey  <tom@tromey.com>
4837
4838         * configure: Rebuild.
4839         * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
4840
4841 2018-05-04  Tom Tromey  <tom@tromey.com>
4842
4843         * linux-record.c (record_linux_system_call) <case
4844         RECORD_SYS_RECVFROM>: Add "break".
4845
4846 2018-05-04  Tom Tromey  <tom@tromey.com>
4847
4848         * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
4849         Add missing "break".
4850         * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
4851         Add missing "break".
4852
4853 2018-05-04  Tom Tromey  <tom@tromey.com>
4854
4855         * rs6000-tdep.c (ppc_process_record_op4)
4856         (ppc_process_record_op63): Add fall-through comment.
4857
4858 2018-05-04  Tom Tromey  <tom@tromey.com>
4859
4860         * i386-tdep.c (i386_process_record): Add fall-through comment.
4861
4862 2018-05-04  Tom Tromey  <tom@tromey.com>
4863
4864         * stabsread.c (define_symbol) <case 'p'>: Add fall-through
4865         comment.
4866
4867 2018-05-04  Tom Tromey  <tom@tromey.com>
4868
4869         * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
4870         * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
4871         * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
4872         comment.
4873         * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
4874         comment.
4875         * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
4876         comment.
4877
4878 2018-05-04  Tom Tromey  <tom@tromey.com>
4879
4880         * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
4881
4882 2018-05-04  Tom Tromey  <tom@tromey.com>
4883
4884         * s390-tdep.c (s390_process_record): Fix fall-through comments.
4885         * xcoffread.c (scan_xcoff_symtab): Move comment later.
4886         * symfile.c (section_is_mapped): Fix fall-through comment.
4887         * stabsread.c (define_symbol, read_member_functions): Fix
4888         fall-through comment.
4889         * s390-linux-tdep.c (s390_process_record): Fix fall-through
4890         comment.
4891         * remote.c (remote_wait_as): Fix fall-through comment.
4892         * p-exp.y (yylex): Fix fall-through comment.
4893         * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
4894         comment.
4895         * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
4896         * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
4897         * jv-exp.y (yylex): Fix fall-through comment.
4898         * go-exp.y (lex_one_token): Fix fall-through comment.
4899         * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
4900         fall-through comment.
4901         * f-exp.y (yylex): Fix fall-through comment.
4902         * dwarf2read.c (process_die): Fix fall-through comments.
4903         * dbxread.c (process_one_symbol): Fix fall-through comment.
4904         * d-exp.y (lex_one_token): Fix fall-through comment.
4905         * cp-name-parser.y (yylex): Fix fall-through comment.
4906         * coffread.c (coff_symtab_read): Fix fall-through comment.
4907         * c-exp.y (lex_one_token): Fix fall-through comment.
4908         * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
4909         comment.
4910         * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
4911         comment.
4912
4913 2018-05-04  Tom Tromey  <tom@tromey.com>
4914
4915         PR python/22730:
4916         * NEWS: Mention gdb.execute change.
4917         * gdbcmd.h (execute_control_command): Don't declare.
4918         * python/python.c (execute_gdb_command): Use read_command_lines_1,
4919         execute_control_commands, execute_control_commands_to_string.
4920         * cli/cli-script.h (execute_control_commands)
4921         (execute_control_commands_to_string): Declare.
4922         (execute_control_command): Add from_tty parameter.
4923         * cli/cli-script.c (execute_control_commands)
4924         (execute_control_commands_to_string): New functions.
4925         (execute_user_command): Use execute_control_commands.
4926         (execute_control_command_1): Add "from_tty" parameter.  Update.
4927         (execute_control_command): Likewise.
4928
4929 2018-05-04  Tom Tromey  <tom@tromey.com>
4930
4931         PR python/22731:
4932         * NEWS: Mention that breakpoint commands are writable.
4933         * python/py-breakpoint.c (bppy_set_commands): New function.
4934         (breakpoint_object_getset) <"commands">: Use it.
4935
4936 2018-05-04  Tom Tromey  <tom@tromey.com>
4937
4938         * tracepoint.c (actions_command): Update.
4939         * mi/mi-cmd-break.c (mi_command_line_array)
4940         (mi_command_line_array_cnt, mi_command_line_array_ptr)
4941         (mi_read_next_line): Remove.
4942         (mi_cmd_break_commands): Update.
4943         * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
4944         function_view.
4945         * cli/cli-script.c (get_command_line): Update.
4946         (process_next_line): Use function_view.  Constify.
4947         (recurse_read_control_structure, read_command_lines)
4948         (read_command_lines_1): Change argument types to function_view.
4949         (do_define_command, document_command): Update.
4950         * breakpoint.h (check_tracepoint_command): Don't declare.
4951         * breakpoint.c (check_tracepoint_command): Remove.
4952         (commands_command_1, create_tracepoint_from_upload): Update.
4953
4954 2018-05-04  Tom Tromey  <tom@tromey.com>
4955
4956         PR gdb/11750:
4957         * cli/cli-script.h (enum command_control_type) <define_control>:
4958         New constant.
4959         * cli/cli-script.c (multi_line_command_p): Handle define_control.
4960         (build_command_line, execute_control_command_1)
4961         (process_next_line): Likewise.
4962         (do_define_command): New function, extracted from define_command.
4963         (define_command): Use it.
4964
4965 2018-05-04  Tom Tromey  <tom@tromey.com>
4966
4967         * tracepoint.c (actions_command): Update.
4968         * cli/cli-script.h (read_command_lines): Update.
4969         * cli/cli-script.c (read_command_lines): Constify prompt_arg.
4970         (MAX_TMPBUF): Remove define.
4971         (define_command): Use string_printf.
4972         (document_command): Likewise.
4973         * breakpoint.c (commands_command_1): Update.
4974
4975 2018-05-04  Tom Tromey  <tom@tromey.com>
4976
4977         * top.c (execute_command): Update.
4978         * cli/cli-script.h (print_command_lines): Now varargs.
4979         * cli/cli-script.c (print_command_lines): Now varargs.
4980         (execute_control_command_1) <case while_control, case if_control>:
4981         Update.
4982
4983 2018-05-04  Tom Tromey  <tom@tromey.com>
4984
4985         * tracepoint.c (all_tracepoint_actions): Rename from
4986         all_tracepoint_actions_and_cleanup.  Change return type.
4987         (actions_command, encode_actions_1, encode_actions)
4988         (trace_dump_actions, tdump_command): Update.
4989         * remote.c (remote_download_command_source): Update.
4990         * python/python.c (gdbpy_eval_from_control_command)
4991         (python_command, python_interactive_command): Update.
4992         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
4993         * guile/guile.c (guile_command)
4994         (gdbscm_eval_from_control_command, guile_command): Update.
4995         * compile/compile.c (compile_code_command)
4996         (compile_print_command, compile_to_object): Update.
4997         * cli/cli-script.h (struct command_lines_deleter): New.
4998         (counted_command_line): New typedef.
4999         (struct command_line): Add constructor, destructor.
5000         <body_list>: Remove.
5001         <body_list_0, body_list_1>: New members.
5002         (command_line_up): Remove typedef.
5003         (read_command_lines, read_command_lines_1, get_command_line):
5004         Update.
5005         (copy_command_lines): Don't declare.
5006         * cli/cli-script.c (build_command_line): Use "new".
5007         (get_command_line): Return counted_command_line.
5008         (print_command_lines, execute_user_command)
5009         (execute_control_command_1, while_command, if_command): Update.
5010         (realloc_body_list): Remove.
5011         (process_next_line, recurse_read_control_structure): Update.
5012         (read_command_lines, read_command_lines_1): Return counted_command_line.
5013         (free_command_lines): Use "delete".
5014         (copy_command_lines): Remove.
5015         (define_command, document_command, show_user_1): Update.
5016         * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
5017         a counted_command_line.
5018         * breakpoint.h (counted_command_line): Remove typedef.
5019         (breakpoint_set_commands): Update.
5020         * breakpoint.c (check_no_tracepoint_commands)
5021         (validate_commands_for_breakpoint): Update.
5022         (breakpoint_set_commands): Change commands to be a
5023         counted_command_line.
5024         (commands_command_1, update_dprintf_command_list)
5025         (create_tracepoint_from_upload): Update.
5026
5027 2018-05-04  Tom Tromey  <tom@tromey.com>
5028
5029         * cli/cli-decode.h (cmd_list_element): New constructor.
5030         (~cmd_list_element): New destructor.
5031         (struct cmd_list_element): Add initializers.
5032         * cli/cli-decode.c (do_add_cmd): Use "new".
5033         (delete_cmd): Use "delete".
5034
5035 2018-05-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
5036             Pedro Alves <palves@redhat.com>
5037
5038         PR breakpoints/19806 and support for PR external/20207.
5039         * NEWS: Mention Aarch64 watchpoint improvements.
5040         * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
5041         watchpoints and PR external/20207 watchpoints.
5042         * nat/aarch64-linux-hw-point.c
5043         (kernel_supports_any_contiguous_range): New.
5044         (aarch64_watchpoint_offset): New.
5045         (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
5046         (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
5047         (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
5048         (aarch64_align_watchpoint): New parameters aligned_offset_p and
5049         next_addr_orig_p.  Support PR external/20207 watchpoints.
5050         (aarch64_downgrade_regs): New.
5051         (aarch64_dr_state_insert_one_point): New parameters offset and
5052         addr_orig.
5053         (aarch64_dr_state_remove_one_point): Likewise.
5054         (aarch64_handle_breakpoint): Update caller.
5055         (aarch64_handle_aligned_watchpoint): Likewise.
5056         (aarch64_handle_unaligned_watchpoint): Support addr_orig and
5057         aligned_offset.
5058         (aarch64_linux_set_debug_regs): Remove const from state.  Call
5059         aarch64_downgrade_regs.
5060         (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
5061         * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
5062         (DR_CONTROL_MASK): ... this.
5063         (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
5064         (unsigned int aarch64_watchpoint_offset): New prototype.
5065         (aarch64_linux_set_debug_regs): Remove const from state.
5066         * utils.c (align_up, align_down): Move to ...
5067         * common/common-utils.c (align_up, align_down): ... here.
5068         * utils.h (align_up, align_down): Move to ...
5069         * common/common-utils.h (align_up, align_down): ... here.
5070
5071 2018-05-04  Joel Brobecker  <brobecker@adacore.com>
5072
5073         * sparc-tdep.c (sparc_structure_return_p): Re-implement to
5074         match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
5075         (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
5076         Re-implement to match the ABI as summarized in GCC's
5077         gcc/config/sparc/sparc.c.  All callers updated.
5078         (sparc32_store_arguments): Remove assertion.
5079
5080 2018-05-04  Tom Tromey  <tom@tromey.com>
5081
5082         * printcmd.c: Don't include tui.h.
5083         (decode_format): Use skip_spaces.
5084
5085 2018-05-04  Tom Tromey  <tom@tromey.com>
5086
5087         PR gdb/22619:
5088         * printcmd.c (last_count): New global.
5089         (x_command): Use saved count when repeating.
5090
5091 2018-05-04  Tom Tromey  <tom@tromey.com>
5092
5093         * nto-procfs.c (do_closedir_cleanup): Remove.
5094         (procfs_pidlist): Use gdb_dir_up.
5095         * procfs.c (do_closedir_cleanup): Remove.
5096         (proc_update_threads): Use gdb_dir_up.
5097         * common/filestuff.h (struct gdb_dir_deleter): New.
5098         (gdb_dir_up): New typedef.
5099
5100 2018-05-04  Tom Tromey  <tom@tromey.com>
5101
5102         * ada-lang.c (print_mention_exception): Use std::string.
5103
5104 2018-05-04  Tom Tromey  <tom@tromey.com>
5105
5106         * ada-lang.c (create_excep_cond_exprs): Update.
5107         (ada_exception_catchpoint_cond_string): Use std::string.
5108
5109 2018-05-04  Tom Tromey  <tom@tromey.com>
5110
5111         * ada-lang.c (xget_renaming_scope): Return std::string.
5112         (old_renaming_is_invisible): Update.
5113
5114 2018-05-04  Tom Tromey  <tom@tromey.com>
5115
5116         * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
5117         (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
5118
5119 2018-05-04  Ulrich Weigand  <uweigand@de.ibm.com>
5120
5121         * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
5122
5123 2018-05-04  Tom Tromey  <tom@tromey.com>
5124
5125         * remote.c (remote_query_supported_append): Change type.
5126         (remote_check_symbols): Update.
5127
5128 2018-05-04  Paul Pluzhnikov  <ppluzhnikov@google.com>
5129
5130         PR gdb/11420
5131         * configure.ac: Prepend libpython.
5132         * python/python-config.py: Likewise.
5133         * configure: Regenerate.
5134
5135 2018-05-03  Simon Marchi  <simon.marchi@ericsson.com>
5136
5137         * Makefile.in (%.c: %.l): Use -t instead of --stdout.
5138
5139 2018-05-03  Pedro Alves  <palves@redhat.com>
5140
5141         * s390-linux-nat.c
5142         (s390_linux_nat_target::have_continuable_watchpoint): Mark with
5143         override.  Write 'true' instead of '1'.
5144         (s390_linux_nat_target::watchpoint_addr_within_range): Remove
5145         declaration.
5146
5147 2018-05-02  Pedro Alves  <palves@redhat.com>
5148
5149         * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
5150         add_inf_child_target.
5151         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
5152         add_inf_child_target.
5153         * aix-thread.c (aix_thread_target_info): New.
5154         (aix_thread_target) <shortname, longname, doc>: Delete.
5155         <info>: New.
5156         * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
5157         add_inf_child_target.
5158         * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
5159         add_inf_child_target.
5160         * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
5161         add_inf_child_target.
5162         * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
5163         add_inf_child_target.
5164         * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
5165         add_inf_child_target.
5166         * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
5167         add_inf_child_target.
5168         * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
5169         add_inf_child_target.
5170         * arm-linux-nat.c (_initialize_arm_linux_nat): Use
5171         add_inf_child_target.
5172         * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
5173         add_inf_child_target.
5174         * bfd-target.c (target_bfd_target_info): New.
5175         (target_bfd) <shortname, longname, doc>: Delete.
5176         <info>: New.
5177         * bsd-kvm.c (bsd_kvm_target_info): New.
5178         (bsd_kvm_target) <shortname, longname, doc>: Delete.
5179         <info>: New.
5180         (bsd_kvm_target::open): Rename to ...
5181         (bsd_kvm_target_open): ... this.  Adjust.
5182         * bsd-uthread.c (bsd_uthread_target_info): New.
5183         (bsd_uthread_target) <shortname, longname, doc>: Delete.
5184         <info>: New.
5185         * corefile.c (core_file_command): Adjust.
5186         * corelow.c (core_target_info): New.
5187         (core_target) <shortname, longname, doc>: Delete.
5188         <info>: New.
5189         (core_target::open): Rename to ...
5190         (core_target_open): ... this.  Adjust.
5191         * ctf.c (ctf_target_info): New.
5192         (ctf_target) <shortname, longname, doc>: Delete.
5193         <info>: New.
5194         (ctf_target::open): Rename to ...
5195         (ctf_target_open): ... this.
5196         (_initialize_ctf): Adjust.
5197         * exec.c (exec_target_info): New.
5198         (exec_target) <shortname, longname, doc>: Delete.
5199         <info>: New.
5200         (exec_target::open): Rename to ...
5201         (exec_target_open): ... this.
5202         * gdbcore.h (core_target_open): Declare.
5203         * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
5204         * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
5205         add_inf_child_target.
5206         * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
5207         add_inf_child_target.
5208         * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
5209         add_inf_child_target.
5210         * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
5211         add_inf_child_target.
5212         * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
5213         add_inf_child_target.
5214         * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
5215         add_inf_child_target.
5216         * i386-linux-nat.c (_initialize_i386_linux_nat): Use
5217         add_inf_child_target.
5218         * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
5219         add_inf_child_target.
5220         * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
5221         add_inf_child_target.
5222         * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
5223         add_inf_child_target.
5224         * inf-child.c (inf_child_target_info): New.
5225         (inf_child_target::info): New.
5226         (inf_child_open_target): Remove 'target' parameter.  Use
5227         get_native_target instead.
5228         (inf_child_target::open): Delete.
5229         (add_inf_child_target): New.
5230         * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
5231         Delete.
5232         <info>: New.
5233         (add_inf_child_target): Declare.
5234         (inf_child_open_target): Declare.
5235         * linux-thread-db.c (thread_db_target_info): New.
5236         (thread_db_target) <shortname, longname, doc>: Delete.
5237         <info>: New.
5238         * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
5239         add_inf_child_target.
5240         * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
5241         add_inf_child_target.
5242         * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
5243         add_inf_child_target.
5244         * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
5245         add_inf_child_target.
5246         * make-target-delegates (print_class): Adjust.
5247         * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
5248         add_inf_child_target.
5249         * mips-linux-nat.c (_initialize_mips_linux_nat): Use
5250         add_inf_child_target.
5251         * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
5252         add_inf_child_target.
5253         * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
5254         add_inf_child_target.
5255         * nto-procfs.c (nto_native_target_info): New.
5256         (nto_procfs_target_native) <shortname, longname, doc>:
5257         Delete.
5258         <info>: New.
5259         (nto_procfs_target_info): New.
5260         (nto_procfs_target_procfs) <shortname, longname, doc>:
5261         Delete.
5262         <info>: New.
5263         (init_procfs_targets): Adjust.
5264         * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
5265         add_inf_child_target.
5266         * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
5267         add_inf_child_target.
5268         * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
5269         add_inf_child_target.
5270         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
5271         add_inf_child_target.
5272         * ravenscar-thread.c (ravenscar_target_info): New.
5273         (ravenscar_thread_target) <shortname, longname, doc>:
5274         Delete.
5275         <info>: New.
5276         * record-btrace.c (record_btrace_target_info):
5277         (record_btrace_target) <shortname, longname, doc>: Delete.
5278         <info>: New.
5279         (record_btrace_target::open): Rename to ...
5280         (record_btrace_target_open): ... this.  Adjust.
5281         * record-full.c (record_longname, record_doc): New.
5282         (record_full_base_target) <shortname, longname, doc>: Delete.
5283         <info>: New.
5284         (record_full_target_info): New.
5285         (record_full_target): <shortname>: Delete.
5286         <info>: New.
5287         (record_full_core_open_1, record_full_open_1): Update comments.
5288         (record_full_base_target::open): Rename to ...
5289         (record_full_open): ... this.
5290         (cmd_record_full_restore): Update.
5291         (_initialize_record_full): Update.
5292         * remote-sim.c (remote_sim_target_info): New.
5293         (gdbsim_target) <shortname, longname, doc>: Delete.
5294         <info>: New.
5295         (gdbsim_target::open): Rename to ...
5296         (gdbsim_target_open): ... this.
5297         (_initialize_remote_sim): Adjust.
5298         * remote.c (remote_doc): New.
5299         (remote_target_info): New.
5300         (remote_target) <shortname, longname, doc>: Delete.
5301         <info>: New.
5302         (extended_remote_target_info): New.
5303         (extended_remote_target) <shortname, longname, doc>: Delete.
5304         <info>: New.
5305         (remote_target::open_1): Make static.  Adjust.
5306         * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
5307         * s390-linux-nat.c (_initialize_s390_nat): Use
5308         add_inf_child_target.
5309         * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
5310         add_inf_child_target.
5311         * sol-thread.c (thread_db_target_info): New.
5312         (sol_thread_target) <shortname, longname, doc>: Delete.
5313         <info>: New.
5314         * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
5315         add_inf_child_target.
5316         * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
5317         add_inf_child_target.
5318         * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
5319         add_inf_child_target.
5320         * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
5321         add_inf_child_target.
5322         * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
5323         add_inf_child_target.
5324         * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
5325         add_inf_child_target.
5326         * spu-linux-nat.c (_initialize_spu_nat): Use
5327         add_inf_child_target.
5328         * spu-multiarch.c (spu_multiarch_target_info): New.
5329         (spu_multiarch_target) <shortname, longname, doc>: Delete.
5330         <info>: New.
5331         * target-delegates.c: Regenerate.
5332         * target.c: Include <unordered_map>.
5333         (target_ops_p): Delete.
5334         (DEF_VEC_P(target_ops_p)): Delete.
5335         (target_factories): New.
5336         (test_target_info): New.
5337         (test_target_ops::info): New.
5338         (open_target): Adjust to use target_factories.
5339         (add_target_with_completer): Rename to ...
5340         (add_target): ... this.  Change prototype.  Register target_info
5341         and open callback in target_factories.  Register target_info in
5342         command context instead of target_ops.
5343         (add_target): Delete old implementation.
5344         (add_deprecated_target_alias): Change prototype.  Adjust.
5345         (the_native_target): New.
5346         (set_native_target, get_native_target): New.
5347         (find_default_run_target): Use the_native_target.
5348         (find_attach_target, find_run_target): Simplify.
5349         (target_ops::open): Delete.
5350         (dummy_target_info): New.
5351         (dummy_target::shortname, dummy_target::longname)
5352         (dummy_target::doc): Delete.
5353         (dummy_target::info): New.
5354         (debug_target::shortname, debug_target::longname)
5355         (debug_target::doc): Delete.
5356         (debug_target::info): New.
5357         * target.h (struct target_info): New.
5358         (target_ops::~target_ops): Add comment.
5359         (target_ops::info): New.
5360         (target_ops::shortname, target_ops::longname, target_ops::doc): No
5361         longer virtual.  Implement in terms of target_info.
5362         (set_native_target, get_native_target): Declare.
5363         (target_open_ftype): New.
5364         (add_target, add_target_with_completer)
5365         (add_deprecated_target_alias): Change prototype.
5366         (test_target) <shortname, longname, doc>: Delete.
5367         <info>: New.
5368         * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
5369         add_inf_child_target.
5370         * tracefile-tfile.c (tfile_target_info): New.
5371         (tfile_target) <shortname, longname, doc>: Delete.
5372         <info>: New.
5373         (tfile_target::open): Rename to ...
5374         (tfile_target_open): ... this.
5375         (_initialize_tracefile_tfile): Adjust.
5376         * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
5377         add_inf_child_target.
5378         * windows-nat.c (_initialize_windows_nat): Use
5379         add_inf_child_target.
5380         * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
5381         add_inf_child_target.
5382
5383 2018-05-02  Pedro Alves  <palves@redhat.com>
5384
5385         * linux-nat.h (linux_nat_target) <low_new_thread,
5386         low_delete_thread, low_new_fork, low_forget_process,
5387         low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
5388         New virtual methods.
5389         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
5390         (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
5391         (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
5392         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
5393         (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
5394         Delete.
5395         * linux-fork.c (delete_fork): Adjust to call low method.
5396         * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
5397         (linux_nat_new_fork, linux_nat_forget_process_hook)
5398         (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
5399         (linux_nat_status_is_event):
5400         (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
5401         (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
5402         to call low method.
5403         (sigtrap_is_event): Rename to ...
5404         (linux_nat_target::low_status_is_event): ... this.
5405         (linux_nat_set_status_is_event): Delete.
5406         (save_stop_reason, linux_nat_wait_1)
5407         (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
5408         low methods.
5409         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
5410         (linux_nat_set_new_fork, linux_nat_set_forget_process)
5411         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
5412         (linux_nat_set_prepare_to_resume): Delete.
5413         * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
5414         low virtual methods.
5415         * amd64-linux-nat.c: Likewise.
5416         * arm-linux-nat.c: Likewise.
5417         * i386-linux-nat.c: Likewise.
5418         * ia64-linux-nat.c: Likewise.
5419         * mips-linux-nat.c: Likewise.
5420         * ppc-linux-nat.c: Likewise.
5421         * s390-linux-nat.c: Likewise.
5422         * sparc64-linux-nat.c: Likewise.
5423         * x86-linux-nat.c: Likewise.
5424         * x86-linux-nat.h: Include "nat/x86-linux.h".
5425         (x86_linux_nat_target) <low_new_fork, low_forget_process,
5426         low_prepare_to_resume, low_new_thread, low_delete_thread>:
5427         Override methods.
5428
5429 2018-05-02  Pedro Alves  <palves@redhat.com>
5430
5431         * target.h (target_ops)
5432         <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
5433         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
5434         stopped_by_watchpoint, have_continuable_watchpoint,
5435         stopped_data_address, watchpoint_addr_within_range,
5436         can_accel_watchpoint_condition, can_run, thread_alive,
5437         has_all_memory, has_memory, has_stack, has_registers,
5438         has_execution, can_async_p, is_async_p, supports_non_stop,
5439         always_non_stop_p, can_execute_reverse, supports_multi_process,
5440         supports_enable_disable_tracepoint,
5441         supports_disable_randomization, supports_string_tracing,
5442         supports_evaluation_of_breakpoint_conditions,
5443         can_run_breakpoint_commands, filesystem_is_local,
5444         can_download_tracepoint, get_trace_state_variable_value,
5445         set_trace_notes, get_tib_address, use_agent, can_use_agent,
5446         record_is_replaying, record_will_replay,
5447         augmented_libraries_svr4_read>: Adjust to return bool.
5448         * aarch64-linux-nat.c: All implementations adjusted.
5449         * aix-thread.c: All implementations adjusted.
5450         * arm-linux-nat.c: All implementations adjusted.
5451         * breakpoint.c: All implementations adjusted.
5452         * bsd-kvm.c: All implementations adjusted.
5453         * bsd-uthread.c: All implementations adjusted.
5454         * corelow.c: All implementations adjusted.
5455         * ctf.c: All implementations adjusted.
5456         * darwin-nat.c: All implementations adjusted.
5457         * darwin-nat.h: All implementations adjusted.
5458         * exec.c: All implementations adjusted.
5459         * fbsd-nat.c: All implementations adjusted.
5460         * fbsd-nat.h: All implementations adjusted.
5461         * gnu-nat.c: All implementations adjusted.
5462         * gnu-nat.h: All implementations adjusted.
5463         * go32-nat.c: All implementations adjusted.
5464         * ia64-linux-nat.c: All implementations adjusted.
5465         * inf-child.c: All implementations adjusted.
5466         * inf-child.h: All implementations adjusted.
5467         * inf-ptrace.c: All implementations adjusted.
5468         * inf-ptrace.h: All implementations adjusted.
5469         * linux-nat.c: All implementations adjusted.
5470         * linux-nat.h: All implementations adjusted.
5471         * mips-linux-nat.c: All implementations adjusted.
5472         * nto-procfs.c: All implementations adjusted.
5473         * ppc-linux-nat.c: All implementations adjusted.
5474         * procfs.c: All implementations adjusted.
5475         * ravenscar-thread.c: All implementations adjusted.
5476         * record-btrace.c: All implementations adjusted.
5477         * record-full.c: All implementations adjusted.
5478         * remote-sim.c: All implementations adjusted.
5479         * remote.c: All implementations adjusted.
5480         * s390-linux-nat.c: All implementations adjusted.
5481         * sol-thread.c: All implementations adjusted.
5482         * spu-multiarch.c: All implementations adjusted.
5483         * target-delegates.c: All implementations adjusted.
5484         * target.c: All implementations adjusted.
5485         * target.h: All implementations adjusted.
5486         * tracefile-tfile.c: All implementations adjusted.
5487         * tracefile.c: All implementations adjusted.
5488         * tracefile.h: All implementations adjusted.
5489         * windows-nat.c: All implementations adjusted.
5490         * x86-linux-nat.h: All implementations adjusted.
5491         * x86-nat.h: All implementations adjusted.
5492
5493 2018-05-02  Pedro Alves  <palves@redhat.com>
5494
5495         * make-target-delegates (scan_target_h): Don't trim lines here.
5496         Replace sequences of tabs and/or whitespace with a single
5497         whitespace.
5498         (top level, parsing methods): Trim each line before processing it
5499         here.
5500
5501 2018-05-02  Pedro Alves  <palves@redhat.com>
5502             John Baldwin  <jhb@freebsd.org>
5503
5504         * target.h (enum strata) <debug_stratum>: New.
5505         (struct target_ops) <all delegation methods>: Replace by C++
5506         virtual methods, and drop "to_" prefix.  All references updated
5507         throughout.
5508         <to_shortname, to_longname, to_doc, to_data,
5509         to_have_steppable_watchpoint, to_have_continuable_watchpoint,
5510         to_has_thread_control, to_attach_no_wait>: Delete, replaced by
5511         virtual methods.  All references updated throughout.
5512         <can_attach, supports_terminal_ours, can_create_inferior,
5513         get_thread_control_capabilities, attach_no_wait>: New
5514         virtual methods.
5515         <insert_breakpoint, remove_breakpoint>: Now
5516         TARGET_DEFAULT_NORETURN methods.
5517         <info_proc>: Now returns bool.
5518         <to_magic>: Delete.
5519         (OPS_MAGIC): Delete.
5520         (current_target): Delete.  All references replaced by references
5521         to ...
5522         (target_stack): ... this.  New.
5523         (target_shortname, target_longname): Adjust.
5524         (target_can_run): Now a function declaration.
5525         (default_child_has_all_memory, default_child_has_memory)
5526         (default_child_has_stack, default_child_has_registers)
5527         (default_child_has_execution): Remove target_ops parameter.
5528         (complete_target_initialization): Delete.
5529         (memory_breakpoint_target): New template class.
5530         (test_target_ops): Refactor as a C++ class with virtual methods.
5531         * make-target-delegates (NAME_PART): Tighten.
5532         (POINTER_PART, CP_SYMBOL): New.
5533         (SIMPLE_RETURN_PART): Reimplement.
5534         (VEC_RETURN_PART): Expect less.
5535         (RETURN_PART, VIRTUAL_PART): New.
5536         (METHOD): Adjust to C++ virtual methods.
5537         (scan_target_h): Remove reference to C99.
5538         (dname): Output "target_ops::" prefix.
5539         (write_function_header): Adjust to output a C++ class method.
5540         (write_declaration): New.
5541         (write_delegator): Adjust to output a C++ class method.
5542         (tdname): Output "dummy_target::" prefix.
5543         (write_tdefault, write_debugmethod): Adjust to output a C++ class
5544         method.
5545         (tdefault_names, debug_names): Delete.
5546         (return_types, tdefaults, styles, argtypes_array): New.
5547         (top level): All methods are delegators.
5548         (print_class): New.
5549         (top level): Print dummy_target and debug_target classes.
5550         * target-delegates.c: Regenerate.
5551         * target-debug.h (target_debug_print_enum_info_proc_what)
5552         (target_debug_print_thread_control_capabilities)
5553         (target_debug_print_thread_info_p): New.
5554         * target.c (dummy_target): Delete.
5555         (the_dummy_target, the_debug_target): New.
5556         (target_stack): Now extern.
5557         (set_targetdebug): Push/unpush debug target.
5558         (default_child_has_all_memory, default_child_has_memory)
5559         (default_child_has_stack, default_child_has_registers)
5560         (default_child_has_execution): Remove target_ops parameter.
5561         (complete_target_initialization): Delete.
5562         (add_target_with_completer): No longer call
5563         complete_target_initialization.
5564         (target_supports_terminal_ours): Use regular delegation.
5565         (update_current_target): Delete.
5566         (push_target): No longer check magic number.  Don't call
5567         update_current_target.
5568         (unpush_target): Don't call update_current_target.
5569         (target_is_pushed): No longer check magic number.
5570         (target_require_runnable): Skip for all stratums over
5571         process_stratum.
5572         (target_ops::info_proc): New.
5573         (target_info_proc): Use find_target_at and
5574         find_default_run_target.
5575         (target_supports_disable_randomization): Use regular delegation.
5576         (target_get_osdata): Use find_target_at.
5577         (target_ops::open, target_ops::close, target_ops::can_attach)
5578         (target_ops::attach, target_ops::can_create_inferior)
5579         (target_ops::create_inferior, target_ops::can_run)
5580         (target_can_run): New.
5581         (default_fileio_target): Use regular delegation.
5582         (target_ops::fileio_open, target_ops::fileio_pwrite)
5583         (target_ops::fileio_pread, target_ops::fileio_fstat)
5584         (target_ops::fileio_close, target_ops::fileio_unlink)
5585         (target_ops::fileio_readlink): New.
5586         (target_fileio_open_1, target_fileio_unlink)
5587         (target_fileio_readlink): Always call the target method.  Handle
5588         FILEIO_ENOSYS.
5589         (return_zero, return_zero_has_execution): Delete.
5590         (init_dummy_target): Delete.
5591         (dummy_target::dummy_target, dummy_target::shortname)
5592         (dummy_target::longname, dummy_target::doc)
5593         (debug_target::debug_target, debug_target::shortname)
5594         (debug_target::longname, debug_target::doc): New.
5595         (target_supports_delete_record): Use regular delegation.
5596         (setup_target_debug): Delete.
5597         (maintenance_print_target_stack): Skip debug_stratum.
5598         (initialize_targets): Instantiate the_dummy_target and
5599         the_debug_target.
5600         * auxv.c (target_auxv_parse): Remove 'ops' parameter.  Adjust to
5601         use target_stack.
5602         (target_auxv_search, fprint_target_auxv): Adjust.
5603         (info_auxv_command): Adjust to use target_stack.
5604         * auxv.h (target_auxv_parse): Remove 'ops' parameter.
5605         * exceptions.c (print_flush): Handle a NULL target_stack.
5606         * regcache.c (target_ops_no_register): Refactor as class with
5607         virtual methods.
5608
5609         * exec.c (exec_target): New class.
5610         (exec_ops): Now an exec_target.
5611         (exec_open, exec_close_1, exec_get_section_table)
5612         (exec_xfer_partial, exec_files_info, exec_has_memory)
5613         (exec_make_note_section): Refactor as exec_target methods.
5614         (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
5615         Delete.
5616         (exec_target::find_memory_regions): New.
5617         (_initialize_exec): Don't call init_exec_ops.
5618         * gdbcore.h (exec_file_clear): Delete.
5619
5620         * corefile.c (core_target): Delete.
5621         (core_file_command): Adjust.
5622         * corelow.c (core_target): New class.
5623         (the_core_target): New.
5624         (core_close): Remove target_ops parameter.
5625         (core_close_cleanup): Adjust.
5626         (core_target::close): New.
5627         (core_open, core_detach, get_core_registers, core_files_info)
5628         (core_xfer_partial, core_thread_alive, core_read_description)
5629         (core_pid_to_str, core_thread_name, core_has_memory)
5630         (core_has_stack, core_has_registers, core_info_proc): Rework as
5631         core_target methods.
5632         (ignore, core_remove_breakpoint, init_core_ops): Delete.
5633         (_initialize_corelow): Initialize the_core_target.
5634         * gdbcore.h (core_target): Delete.
5635         (the_core_target): New.
5636
5637         * ctf.c: (ctf_target): New class.
5638         (ctf_ops): Now a ctf_target.
5639         (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
5640         (ctf_xfer_partial, ctf_get_trace_state_variable_value)
5641         (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
5642         methods.
5643         (init_ctf_ops): Delete.
5644         (_initialize_ctf): Don't call it.
5645         * tracefile-tfile.c (tfile_target): New class.
5646         (tfile_ops): Now a tfile_target.
5647         (tfile_open, tfile_close, tfile_files_info)
5648         (tfile_get_tracepoint_status, tfile_trace_find)
5649         (tfile_fetch_registers, tfile_xfer_partial)
5650         (tfile_get_trace_state_variable_value, tfile_traceframe_info):
5651         Refactor as tfile_target methods.
5652         (tfile_xfer_partial_features): Remove target_ops parameter.
5653         (init_tfile_ops): Delete.
5654         (_initialize_tracefile_tfile): Don't call it.
5655         * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
5656         (tracefile_has_stack, tracefile_has_registers)
5657         (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
5658         tracefile_target methods.
5659         (init_tracefile_ops): Delete.
5660         (tracefile_target::tracefile_target): New.
5661         * tracefile.h: Include "target.h".
5662         (tracefile_target): New class.
5663         (init_tracefile_ops): Delete.
5664
5665         * spu-multiarch.c (spu_multiarch_target): New class.
5666         (spu_ops): Now a spu_multiarch_target.
5667         (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
5668         (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
5669         (spu_search_memory, spu_mourn_inferior): Refactor as
5670         spu_multiarch_target methods.
5671         (init_spu_ops): Delete.
5672         (_initialize_spu_multiarch): Remove references to init_spu_ops,
5673         complete_target_initialization.
5674
5675         * ravenscar-thread.c (ravenscar_thread_target): New class.
5676         (ravenscar_ops): Now a ravenscar_thread_target.
5677         (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
5678         (ravenscar_thread_alive, ravenscar_pid_to_str)
5679         (ravenscar_fetch_registers, ravenscar_store_registers)
5680         (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
5681         (ravenscar_stopped_by_hw_breakpoint)
5682         (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
5683         (ravenscar_mourn_inferior, ravenscar_core_of_thread)
5684         (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
5685         methods.
5686         (init_ravenscar_thread_ops): Delete.
5687         (_initialize_ravenscar): Remove references to
5688         init_ravenscar_thread_ops and complete_target_initialization.
5689
5690         * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
5691         (bsd_uthread_target): New class.
5692         (bsd_uthread_ops): Now a bsd_uthread_target.
5693         (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
5694         (bsd_uthread_close, bsd_uthread_mourn_inferior)
5695         (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
5696         (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
5697         (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
5698         (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
5699         (bsd_uthread_target): Delete function.
5700         (_initialize_bsd_uthread): Remove reference to
5701         complete_target_initialization.
5702
5703         * bfd-target.c (target_bfd_data): Delete.  Fields folded into ...
5704         (target_bfd): ... this new class.
5705         (target_bfd_xfer_partial, target_bfd_get_section_table)
5706         (target_bfd_close): Refactor as target_bfd methods.
5707         (target_bfd::~target_bfd): New.
5708         (target_bfd_reopen): Adjust.
5709         (target_bfd::close): New.
5710
5711         * record-btrace.c (record_btrace_target): New class.
5712         (record_btrace_ops): Now a record_btrace_target.
5713         (record_btrace_open, record_btrace_stop_recording)
5714         (record_btrace_disconnect, record_btrace_close)
5715         (record_btrace_async, record_btrace_info)
5716         (record_btrace_insn_history, record_btrace_insn_history_range)
5717         (record_btrace_insn_history_from, record_btrace_call_history)
5718         (record_btrace_call_history_range)
5719         (record_btrace_call_history_from, record_btrace_record_method)
5720         (record_btrace_is_replaying, record_btrace_will_replay)
5721         (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
5722         (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
5723         (record_btrace_store_registers, record_btrace_prepare_to_store)
5724         (record_btrace_to_get_unwinder)
5725         (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
5726         (record_btrace_commit_resume, record_btrace_wait)
5727         (record_btrace_stop, record_btrace_can_execute_reverse)
5728         (record_btrace_stopped_by_sw_breakpoint)
5729         (record_btrace_supports_stopped_by_sw_breakpoint)
5730         (record_btrace_stopped_by_hw_breakpoint)
5731         (record_btrace_supports_stopped_by_hw_breakpoint)
5732         (record_btrace_update_thread_list, record_btrace_thread_alive)
5733         (record_btrace_goto_begin, record_btrace_goto_end)
5734         (record_btrace_goto, record_btrace_stop_replaying_all)
5735         (record_btrace_execution_direction)
5736         (record_btrace_prepare_to_generate_core)
5737         (record_btrace_done_generating_core): Refactor as
5738         record_btrace_target methods.
5739         (init_record_btrace_ops): Delete.
5740         (_initialize_record_btrace): Remove reference to
5741         init_record_btrace_ops.
5742         * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
5743         the execution_direction global.
5744         (record_full_base_target, record_full_target)
5745         (record_full_core_target): New classes.
5746         (record_full_ops): Now a record_full_target.
5747         (record_full_core_ops): Now a record_full_core_target.
5748         (record_full_target::detach, record_full_target::disconnect)
5749         (record_full_core_target::disconnect)
5750         (record_full_target::mourn_inferior, record_full_target::kill):
5751         New.
5752         (record_full_open, record_full_close, record_full_async): Refactor
5753         as methods of the record_full_base_target class.
5754         (record_full_resume, record_full_commit_resume): Refactor
5755         as methods of the record_full_target class.
5756         (record_full_wait, record_full_stopped_by_watchpoint)
5757         (record_full_stopped_data_address)
5758         (record_full_stopped_by_sw_breakpoint)
5759         (record_full_supports_stopped_by_sw_breakpoint)
5760         (record_full_stopped_by_hw_breakpoint)
5761         (record_full_supports_stopped_by_hw_breakpoint): Refactor as
5762         methods of the record_full_base_target class.
5763         (record_full_store_registers, record_full_xfer_partial)
5764         (record_full_insert_breakpoint, record_full_remove_breakpoint):
5765         Refactor as methods of the record_full_target class.
5766         (record_full_can_execute_reverse, record_full_get_bookmark)
5767         (record_full_goto_bookmark, record_full_execution_direction)
5768         (record_full_record_method, record_full_info, record_full_delete)
5769         (record_full_is_replaying, record_full_will_replay)
5770         (record_full_goto_begin, record_full_goto_end, record_full_goto)
5771         (record_full_stop_replaying): Refactor as methods of the
5772         record_full_base_target class.
5773         (record_full_core_resume, record_full_core_kill)
5774         (record_full_core_fetch_registers)
5775         (record_full_core_prepare_to_store)
5776         (record_full_core_store_registers, record_full_core_xfer_partial)
5777         (record_full_core_insert_breakpoint)
5778         (record_full_core_remove_breakpoint)
5779         (record_full_core_has_execution): Refactor
5780         as methods of the record_full_core_target class.
5781         (record_full_base_target::supports_delete_record): New.
5782         (init_record_full_ops): Delete.
5783         (init_record_full_core_ops): Delete.
5784         (record_full_save): Refactor as method of the
5785         record_full_base_target class.
5786         (_initialize_record_full): Remove references to
5787         init_record_full_ops and init_record_full_core_ops.
5788
5789         * remote.c (remote_target, extended_remote_target): New classes.
5790         (remote_ops): Now a remote_target.
5791         (extended_remote_ops): Now an extended_remote_target.
5792         (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
5793         (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
5794         (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
5795         (remote_pass_signals, remote_set_syscall_catchpoint)
5796         (remote_program_signals, )
5797         (remote_thread_always_alive): Remove target_ops parameter.
5798         (remote_thread_alive, remote_thread_name)
5799         (remote_update_thread_list, remote_threads_extra_info)
5800         (remote_static_tracepoint_marker_at)
5801         (remote_static_tracepoint_markers_by_strid)
5802         (remote_get_ada_task_ptid, remote_close, remote_start_remote)
5803         (remote_open): Refactor as methods of remote_target.
5804         (extended_remote_open, extended_remote_detach)
5805         (extended_remote_attach, extended_remote_post_attach):
5806         (extended_remote_supports_disable_randomization)
5807         (extended_remote_create_inferior): : Refactor as method of
5808         extended_remote_target.
5809         (remote_set_permissions, remote_open_1, remote_detach)
5810         (remote_follow_fork, remote_follow_exec, remote_disconnect)
5811         (remote_resume, remote_commit_resume, remote_stop)
5812         (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
5813         (remote_terminal_ours, remote_wait, remote_fetch_registers)
5814         (remote_prepare_to_store, remote_store_registers)
5815         (remote_flash_erase, remote_flash_done, remote_files_info)
5816         (remote_kill, remote_mourn, remote_insert_breakpoint)
5817         (remote_remove_breakpoint, remote_insert_watchpoint)
5818         (remote_watchpoint_addr_within_range)
5819         (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
5820         (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
5821         (remote_supports_stopped_by_sw_breakpoint)
5822         (remote_stopped_by_hw_breakpoint)
5823         (remote_supports_stopped_by_hw_breakpoint)
5824         (remote_stopped_by_watchpoint, remote_stopped_data_address)
5825         (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
5826         (remote_verify_memory): Refactor as methods of remote_target.
5827         (remote_write_qxfer, remote_read_qxfer): Remove target_ops
5828         parameter.
5829         (remote_xfer_partial, remote_get_memory_xfer_limit)
5830         (remote_search_memory, remote_rcmd, remote_memory_map)
5831         (remote_pid_to_str, remote_get_thread_local_address)
5832         (remote_get_tib_address, remote_read_description): Refactor as
5833         methods of remote_target.
5834         (remote_target::fileio_open, remote_target::fileio_pwrite)
5835         (remote_target::fileio_pread, remote_target::fileio_close): New.
5836         (remote_hostio_readlink, remote_hostio_fstat)
5837         (remote_filesystem_is_local, remote_can_execute_reverse)
5838         (remote_supports_non_stop, remote_supports_disable_randomization)
5839         (remote_supports_multi_process, remote_supports_cond_breakpoints)
5840         (remote_supports_enable_disable_tracepoint)
5841         (remote_supports_string_tracing)
5842         (remote_can_run_breakpoint_commands, remote_trace_init)
5843         (remote_download_tracepoint, remote_can_download_tracepoint)
5844         (remote_download_trace_state_variable, remote_enable_tracepoint)
5845         (remote_disable_tracepoint, remote_trace_set_readonly_regions)
5846         (remote_trace_start, remote_get_trace_status)
5847         (remote_get_tracepoint_status, remote_trace_stop)
5848         (remote_trace_find, remote_get_trace_state_variable_value)
5849         (remote_save_trace_data, remote_get_raw_trace_data)
5850         (remote_set_disconnected_tracing, remote_core_of_thread)
5851         (remote_set_circular_trace_buffer, remote_traceframe_info)
5852         (remote_get_min_fast_tracepoint_insn_len)
5853         (remote_set_trace_buffer_size, remote_set_trace_notes)
5854         (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
5855         (remote_disable_btrace, remote_teardown_btrace)
5856         (remote_read_btrace, remote_btrace_conf)
5857         (remote_augmented_libraries_svr4_read, remote_load)
5858         (remote_pid_to_exec_file, remote_can_do_single_step)
5859         (remote_execution_direction, remote_thread_handle_to_thread_info):
5860         Refactor as methods of remote_target.
5861         (init_remote_ops, init_extended_remote_ops): Delete.
5862         (remote_can_async_p, remote_is_async_p, remote_async)
5863         (remote_thread_events, remote_upload_tracepoints)
5864         (remote_upload_trace_state_variables): Refactor as methods of
5865         remote_target.
5866         (_initialize_remote): Remove references to init_remote_ops and
5867         init_extended_remote_ops.
5868
5869         * remote-sim.c (gdbsim_target): New class.
5870         (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
5871         (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
5872         (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
5873         (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
5874         (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
5875         (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
5876         Refactor as methods of gdbsim_target.
5877         (gdbsim_ops): Now a gdbsim_target.
5878         (init_gdbsim_ops): Delete.
5879         (gdbsim_cntrl_c): Adjust.
5880         (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
5881
5882         * amd64-linux-nat.c (amd64_linux_nat_target): New class.
5883         (the_amd64_linux_nat_target): New.
5884         (amd64_linux_fetch_inferior_registers)
5885         (amd64_linux_store_inferior_registers): Refactor as methods of
5886         amd64_linux_nat_target.
5887         (_initialize_amd64_linux_nat): Adjust.  Set linux_target.
5888         * i386-linux-nat.c: Don't include "linux-nat.h".
5889         (i386_linux_nat_target): New class.
5890         (the_i386_linux_nat_target): New.
5891         (i386_linux_fetch_inferior_registers)
5892         (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
5893         as methods of i386_linux_nat_target.
5894         (_initialize_i386_linux_nat): Adjust.  Set linux_target.
5895         * inf-child.c (inf_child_ops): Delete.
5896         (inf_child_fetch_inferior_registers)
5897         (inf_child_store_inferior_registers): Delete.
5898         (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
5899         methods of inf_child_target.
5900         (inf_child_target::supports_terminal_ours)
5901         (inf_child_target::terminal_init)
5902         (inf_child_target::terminal_inferior)
5903         (inf_child_target::terminal_ours_for_output)
5904         (inf_child_target::terminal_ours, inf_child_target::interrupt)
5905         (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
5906         New.
5907         (inf_child_open, inf_child_disconnect, inf_child_close)
5908         (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
5909         (inf_child_post_startup_inferior, inf_child_can_run)
5910         (inf_child_pid_to_exec_file): Refactor as methods of
5911         inf_child_target.
5912         (inf_child_follow_fork): Delete.
5913         (inf_child_target::can_create_inferior)
5914         (inf_child_target::can_attach): New.
5915         (inf_child_target::has_all_memory, inf_child_target::has_memory)
5916         (inf_child_target::has_stack, inf_child_target::has_registers)
5917         (inf_child_target::has_execution): New.
5918         (inf_child_fileio_open, inf_child_fileio_pwrite)
5919         (inf_child_fileio_pread, inf_child_fileio_fstat)
5920         (inf_child_fileio_close, inf_child_fileio_unlink)
5921         (inf_child_fileio_readlink, inf_child_use_agent)
5922         (inf_child_can_use_agent): Refactor as methods of
5923         inf_child_target.
5924         (return_zero, inf_child_target): Delete.
5925         (inf_child_target::inf_child_target): New.
5926         * inf-child.h: Include "target.h".
5927         (inf_child_target): Delete function prototype.
5928         (inf_child_target): New class.
5929         (inf_child_open_target, inf_child_mourn_inferior)
5930         (inf_child_maybe_unpush_target): Delete.
5931         * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
5932         (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
5933         (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
5934         (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
5935         (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
5936         (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
5937         (inf_ptrace_wait, inf_ptrace_xfer_partial)
5938         (inf_ptrace_thread_alive, inf_ptrace_files_info)
5939         (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
5940         methods of inf_ptrace_target.
5941         (inf_ptrace_target): Delete function.
5942         * inf-ptrace.h: Include "inf-child.h".
5943         (inf_ptrace_target): Delete function declaration.
5944         (inf_ptrace_target): New class.
5945         (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
5946         * linux-nat.c (linux_target): New.
5947         (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
5948         (linux_nat_target::~linux_nat_target): New.
5949         (linux_child_post_attach, linux_child_post_startup_inferior)
5950         (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
5951         (linux_child_remove_fork_catchpoint)
5952         (linux_child_insert_vfork_catchpoint)
5953         (linux_child_remove_vfork_catchpoint)
5954         (linux_child_insert_exec_catchpoint)
5955         (linux_child_remove_exec_catchpoint)
5956         (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
5957         (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
5958         (linux_nat_resume, linux_nat_stopped_by_watchpoint)
5959         (linux_nat_stopped_data_address)
5960         (linux_nat_stopped_by_sw_breakpoint)
5961         (linux_nat_supports_stopped_by_sw_breakpoint)
5962         (linux_nat_stopped_by_hw_breakpoint)
5963         (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
5964         (linux_nat_kill, linux_nat_mourn_inferior)
5965         (linux_nat_xfer_partial, linux_nat_thread_alive)
5966         (linux_nat_update_thread_list, linux_nat_pid_to_str)
5967         (linux_nat_thread_name, linux_child_pid_to_exec_file)
5968         (linux_child_static_tracepoint_markers_by_strid)
5969         (linux_nat_is_async_p, linux_nat_can_async_p)
5970         (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
5971         (linux_nat_supports_multi_process)
5972         (linux_nat_supports_disable_randomization, linux_nat_async)
5973         (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
5974         (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
5975         (linux_nat_fileio_open, linux_nat_fileio_readlink)
5976         (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
5977         methods of linux_nat_target.
5978         (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
5979         (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
5980         parameter.
5981         (check_stopped_by_watchpoint): Adjust.
5982         (linux_xfer_partial): Delete.
5983         (linux_target_install_ops, linux_target, linux_nat_add_target):
5984         Delete.
5985         (linux_nat_target::linux_nat_target): New.
5986         * linux-nat.h: Include "inf-ptrace.h".
5987         (linux_nat_target): New.
5988         (linux_target, linux_target_install_ops, linux_nat_add_target):
5989         Delete function declarations.
5990         (linux_target): Declare global.
5991         * linux-thread-db.c (thread_db_target): New.
5992         (thread_db_target::thread_db_target): New.
5993         (thread_db_ops): Delete.
5994         (the_thread_db_target): New.
5995         (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
5996         (thread_db_update_thread_list, thread_db_pid_to_str)
5997         (thread_db_extra_thread_info)
5998         (thread_db_thread_handle_to_thread_info)
5999         (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
6000         (thread_db_resume): Refactor as methods of thread_db_target.
6001         (init_thread_db_ops): Delete.
6002         (_initialize_thread_db): Remove reference to init_thread_db_ops.
6003         * x86-linux-nat.c: Don't include "linux-nat.h".
6004         (super_post_startup_inferior): Delete.
6005         (x86_linux_nat_target::~x86_linux_nat_target): New.
6006         (x86_linux_child_post_startup_inferior)
6007         (x86_linux_read_description, x86_linux_enable_btrace)
6008         (x86_linux_disable_btrace, x86_linux_teardown_btrace)
6009         (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
6010         methods of x86_linux_nat_target.
6011         (x86_linux_create_target): Delete.  Bits folded ...
6012         (x86_linux_add_target): ... here.  Now takes a linux_nat_target
6013         pointer.
6014         * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
6015         (x86_linux_nat_target): New class.
6016         (x86_linux_create_target): Delete.
6017         (x86_linux_add_target): Now takes a linux_nat_target pointer.
6018         * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
6019         (x86_region_ok_for_watchpoint, x86_stopped_data_address)
6020         (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
6021         (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
6022         (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
6023         make extern.
6024         (x86_use_watchpoints): Delete.
6025         * x86-nat.h: Include "breakpoint.h" and "target.h".
6026         (x86_use_watchpoints): Delete.
6027         (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
6028         (x86_stopped_by_watchpoint, x86_stopped_data_address)
6029         (x86_insert_watchpoint, x86_remove_watchpoint)
6030         (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
6031         (x86_stopped_by_hw_breakpoint): New declarations.
6032         (x86_nat_target): New template class.
6033
6034         * ppc-linux-nat.c (ppc_linux_nat_target): New class.
6035         (the_ppc_linux_nat_target): New.
6036         (ppc_linux_fetch_inferior_registers)
6037         (ppc_linux_can_use_hw_breakpoint)
6038         (ppc_linux_region_ok_for_hw_watchpoint)
6039         (ppc_linux_ranged_break_num_registers)
6040         (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
6041         (ppc_linux_insert_mask_watchpoint)
6042         (ppc_linux_remove_mask_watchpoint)
6043         (ppc_linux_can_accel_watchpoint_condition)
6044         (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
6045         (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
6046         (ppc_linux_watchpoint_addr_within_range)
6047         (ppc_linux_masked_watch_num_registers)
6048         (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
6049         (ppc_linux_read_description): Refactor as methods of
6050         ppc_linux_nat_target.
6051         (_initialize_ppc_linux_nat): Adjust.  Set linux_target.
6052
6053         * procfs.c (procfs_xfer_partial): Delete forward declaration.
6054         (procfs_target): New class.
6055         (the_procfs_target): New.
6056         (procfs_target): Delete function.
6057         (procfs_auxv_parse, procfs_attach, procfs_detach)
6058         (procfs_fetch_registers, procfs_store_registers, procfs_wait)
6059         (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
6060         (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
6061         (procfs_create_inferior, procfs_update_thread_list)
6062         (procfs_thread_alive, procfs_pid_to_str)
6063         (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
6064         (procfs_stopped_data_address, procfs_insert_watchpoint)
6065         (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
6066         (proc_find_memory_regions, procfs_info_proc)
6067         (procfs_make_note_section): Refactor as methods of procfs_target.
6068         (_initialize_procfs): Adjust.
6069         * sol-thread.c (sol_thread_target): New class.
6070         (sol_thread_ops): Now a sol_thread_target.
6071         (sol_thread_detach, sol_thread_resume, sol_thread_wait)
6072         (sol_thread_fetch_registers, sol_thread_store_registers)
6073         (sol_thread_xfer_partial, sol_thread_mourn_inferior)
6074         (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
6075         (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
6076         (init_sol_thread_ops): Delete.
6077         (_initialize_sol_thread): Adjust.  Remove references to
6078         init_sol_thread_ops and complete_target_initialization.
6079
6080         * windows-nat.c (windows_nat_target): New class.
6081         (windows_fetch_inferior_registers)
6082         (windows_store_inferior_registers, windows_resume, windows_wait)
6083         (windows_attach, windows_detach, windows_pid_to_exec_file)
6084         (windows_files_info, windows_create_inferior)
6085         (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
6086         (windows_close, windows_pid_to_str, windows_xfer_partial)
6087         (windows_get_tib_address, windows_get_ada_task_ptid)
6088         (windows_thread_name, windows_thread_alive): Refactor as
6089         windows_nat_target methods.
6090         (do_initial_windows_stuff): Adjust.
6091         (windows_target): Delete function.
6092         (_initialize_windows_nat): Adjust.
6093
6094         * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
6095         (darwin_mourn_inferior, darwin_kill_inferior)
6096         (darwin_create_inferior, darwin_attach, darwin_detach)
6097         (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
6098         (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
6099         (darwin_supports_multi_process): Refactor as darwin_nat_target
6100         methods.
6101         (darwin_resume_to, darwin_files_info): Delete.
6102         (_initialize_darwin_inferior): Rename to ...
6103         (_initialize_darwin_nat): ... this.  Adjust to C++ification.
6104         * darwin-nat.h: Include "inf-child.h".
6105         (darwin_nat_target): New class.
6106         (darwin_complete_target): Delete.
6107         * i386-darwin-nat.c (i386_darwin_nat_target): New class.
6108         (darwin_target): New.
6109         (i386_darwin_fetch_inferior_registers)
6110         (i386_darwin_store_inferior_registers): Refactor as methods of
6111         darwin_nat_target.
6112         (darwin_complete_target): Delete, with ...
6113         (_initialize_i386_darwin_nat): ... bits factored out here.
6114
6115         * alpha-linux-nat.c (alpha_linux_nat_target): New class.
6116         (the_alpha_linux_nat_target): New.
6117         (alpha_linux_register_u_offset): Refactor as
6118         alpha_linux_nat_target method.
6119         (_initialize_alpha_linux_nat): Adjust.
6120         * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
6121         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
6122         (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
6123         methods of linux_nat_trad_target.
6124         (linux_trad_target): Delete.
6125         * linux-nat-trad.h (linux_trad_target): Delete function.
6126         (linux_nat_trad_target): New class.
6127         * mips-linux-nat.c (mips_linux_nat_target): New class.
6128         (super_fetch_registers, super_store_registers, super_close):
6129         Delete.
6130         (the_mips_linux_nat_target): New.
6131         (mips64_linux_regsets_fetch_registers)
6132         (mips64_linux_regsets_store_registers)
6133         (mips64_linux_fetch_registers, mips64_linux_store_registers)
6134         (mips_linux_register_u_offset, mips_linux_read_description)
6135         (mips_linux_can_use_hw_breakpoint)
6136         (mips_linux_stopped_by_watchpoint)
6137         (mips_linux_stopped_data_address)
6138         (mips_linux_region_ok_for_hw_watchpoint)
6139         (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
6140         (mips_linux_close): Refactor as methods of mips_linux_nat.
6141         (_initialize_mips_linux_nat): Adjust to C++ification.
6142
6143         * aix-thread.c (aix_thread_target): New class.
6144         (aix_thread_ops): Now an aix_thread_target.
6145         (aix_thread_detach, aix_thread_resume, aix_thread_wait)
6146         (aix_thread_fetch_registers, aix_thread_store_registers)
6147         (aix_thread_xfer_partial, aix_thread_mourn_inferior)
6148         (aix_thread_thread_alive, aix_thread_pid_to_str)
6149         (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
6150         Refactor as methods of aix_thread_target.
6151         (init_aix_thread_ops): Delete.
6152         (_initialize_aix_thread): Remove references to init_aix_thread_ops
6153         and complete_target_initialization.
6154         * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
6155         (rs6000_nat_target): New class.
6156         (the_rs6000_nat_target): New.
6157         (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
6158         (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
6159         (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
6160         (super_create_inferior): Delete.
6161         (_initialize_rs6000_nat): Adjust to C++ification.
6162
6163         * arm-linux-nat.c (arm_linux_nat_target): New class.
6164         (the_arm_linux_nat_target): New.
6165         (arm_linux_fetch_inferior_registers)
6166         (arm_linux_store_inferior_registers, arm_linux_read_description)
6167         (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
6168         (arm_linux_remove_hw_breakpoint)
6169         (arm_linux_region_ok_for_hw_watchpoint)
6170         (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
6171         (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
6172         (arm_linux_watchpoint_addr_within_range): Refactor as methods of
6173         arm_linux_nat_target.
6174         (_initialize_arm_linux_nat): Adjust to C++ification.
6175
6176         * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
6177         (the_aarch64_linux_nat_target): New.
6178         (aarch64_linux_fetch_inferior_registers)
6179         (aarch64_linux_store_inferior_registers)
6180         (aarch64_linux_child_post_startup_inferior)
6181         (aarch64_linux_read_description)
6182         (aarch64_linux_can_use_hw_breakpoint)
6183         (aarch64_linux_insert_hw_breakpoint)
6184         (aarch64_linux_remove_hw_breakpoint)
6185         (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
6186         (aarch64_linux_region_ok_for_hw_watchpoint)
6187         (aarch64_linux_stopped_data_address)
6188         (aarch64_linux_stopped_by_watchpoint)
6189         (aarch64_linux_watchpoint_addr_within_range)
6190         (aarch64_linux_can_do_single_step): Refactor as methods of
6191         aarch64_linux_nat_target.
6192         (super_post_startup_inferior): Delete.
6193         (_initialize_aarch64_linux_nat): Adjust to C++ification.
6194
6195         * hppa-linux-nat.c (hppa_linux_nat_target): New class.
6196         (the_hppa_linux_nat_target): New.
6197         (hppa_linux_fetch_inferior_registers)
6198         (hppa_linux_store_inferior_registers): Refactor as methods of
6199         hppa_linux_nat_target.
6200         (_initialize_hppa_linux_nat): Adjust to C++ification.
6201
6202         * ia64-linux-nat.c (ia64_linux_nat_target): New class.
6203         (the_ia64_linux_nat_target): New.
6204         (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
6205         (ia64_linux_stopped_data_address)
6206         (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
6207         (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
6208         ia64_linux_nat_target methods.
6209         (super_xfer_partial): Delete.
6210         (_initialize_ia64_linux_nat): Adjust to C++ification.
6211
6212         * m32r-linux-nat.c (m32r_linux_nat_target): New class.
6213         (the_m32r_linux_nat_target): New.
6214         (m32r_linux_fetch_inferior_registers)
6215         (m32r_linux_store_inferior_registers): Refactor as
6216         m32r_linux_nat_target methods.
6217         (_initialize_m32r_linux_nat): Adjust to C++ification.
6218
6219         * m68k-linux-nat.c (m68k_linux_nat_target): New class.
6220         (the_m68k_linux_nat_target): New.
6221         (m68k_linux_fetch_inferior_registers)
6222         (m68k_linux_store_inferior_registers): Refactor as
6223         m68k_linux_nat_target methods.
6224         (_initialize_m68k_linux_nat): Adjust to C++ification.
6225
6226         * s390-linux-nat.c (s390_linux_nat_target): New class.
6227         (the_s390_linux_nat_target): New.
6228         (s390_linux_fetch_inferior_registers)
6229         (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
6230         (s390_insert_watchpoint, s390_remove_watchpoint)
6231         (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
6232         (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
6233         (s390_auxv_parse, s390_read_description): Refactor as methods of
6234         s390_linux_nat_target.
6235         (_initialize_s390_nat): Adjust to C++ification.
6236
6237         * sparc-linux-nat.c (sparc_linux_nat_target): New class.
6238         (the_sparc_linux_nat_target): New.
6239         (_initialize_sparc_linux_nat): Adjust to C++ification.
6240         * sparc-nat.c (sparc_fetch_inferior_registers)
6241         (sparc_store_inferior_registers): Remove target_ops parameter.
6242         * sparc-nat.h (sparc_fetch_inferior_registers)
6243         (sparc_store_inferior_registers): Remove target_ops parameter.
6244         * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
6245         (the_sparc64_linux_nat_target): New.
6246         (_initialize_sparc64_linux_nat): Adjust to C++ification.
6247
6248         * spu-linux-nat.c (spu_linux_nat_target): New class.
6249         (the_spu_linux_nat_target): New.
6250         (spu_child_post_startup_inferior, spu_child_post_attach)
6251         (spu_child_wait, spu_fetch_inferior_registers)
6252         (spu_store_inferior_registers, spu_xfer_partial)
6253         (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
6254         methods.
6255         (_initialize_spu_nat): Adjust to C++ification.
6256
6257         * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
6258         (the_tilegx_linux_nat_target): New.
6259         (fetch_inferior_registers, store_inferior_registers):
6260         Refactor as methods.
6261         (_initialize_tile_linux_nat): Adjust to C++ification.
6262
6263         * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
6264         (the_xtensa_linux_nat_target): New.
6265         (xtensa_linux_fetch_inferior_registers)
6266         (xtensa_linux_store_inferior_registers): Refactor as
6267         xtensa_linux_nat_target methods.
6268         (_initialize_xtensa_linux_nat): Adjust to C++ification.
6269
6270         * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
6271         (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
6272         (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
6273         (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
6274         (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
6275         (fbsd_stopped_by_sw_breakpoint)
6276         (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
6277         (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
6278         (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
6279         (fbsd_post_startup_inferior, fbsd_post_attach)
6280         (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
6281         (fbsd_set_syscall_catchpoint)
6282         (super_xfer_partial, super_resume, super_wait)
6283         (fbsd_supports_stopped_by_hw_breakpoint): Delete.
6284         (fbsd_handle_debug_trap): Remove target_ops parameter.
6285         (fbsd_nat_add_target): Delete.
6286         * fbsd-nat.h: Include "inf-ptrace.h".
6287         (fbsd_nat_add_target): Delete.
6288         (USE_SIGTRAP_SIGINFO): Define.
6289         (fbsd_nat_target): New class.
6290
6291         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
6292         (amd64bsd_store_inferior_registers): Remove target_ops parameter.
6293         (amd64bsd_target): Delete.
6294         * amd64-bsd-nat.h: New file.
6295         * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
6296         "x86-bsd-nat.h".
6297         (amd64_fbsd_nat_target): New class.
6298         (the_amd64_fbsd_nat_target): New.
6299         (amd64fbsd_read_description): Refactor as method of
6300         amd64_fbsd_nat_target.
6301         (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
6302         (_initialize_amd64fbsd_nat): Adjust to C++ification.
6303         * amd64-nat.h (amd64bsd_target): Delete function declaration.
6304         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
6305         (i386bsd_store_inferior_registers): Remove target_ops parameter.
6306         (i386bsd_target): Delete.
6307         * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
6308         (i386bsd_fetch_inferior_registers)
6309         (i386bsd_store_inferior_registers): Declare.
6310         (i386_bsd_nat_target): New class.
6311         * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
6312         (the_i386_fbsd_nat_target): New.
6313         (i386fbsd_resume, i386fbsd_read_description): Refactor as
6314         i386_fbsd_nat_target methods.
6315         (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
6316         (_initialize_i386fbsd_nat): Adjust to C++ification.
6317         * x86-bsd-nat.c (super_mourn_inferior): Delete.
6318         (x86bsd_mourn_inferior, x86bsd_target): Delete.
6319         (_initialize_x86_bsd_nat): Adjust to C++ification.
6320         * x86-bsd-nat.h: Include "x86-nat.h".
6321         (x86bsd_target): Delete declaration.
6322         (x86bsd_nat_target): New class.
6323
6324         * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
6325         (the_aarch64_fbsd_nat_target): New.
6326         (aarch64_fbsd_fetch_inferior_registers)
6327         (aarch64_fbsd_store_inferior_registers): Refactor as methods of
6328         aarch64_fbsd_nat_target.
6329         (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
6330         * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
6331         (the_alpha_bsd_nat_target): New.
6332         (alphabsd_fetch_inferior_registers)
6333         (alphabsd_store_inferior_registers): Refactor as
6334         alpha_bsd_nat_target methods.
6335         (_initialize_alphabsd_nat): Refactor as methods of
6336         alpha_bsd_nat_target.
6337         * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
6338         (the_amd64_nbsd_nat_target): New.
6339         (_initialize_amd64nbsd_nat): Adjust to C++ification.
6340         * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
6341         (the_amd64_obsd_nat_target): New.
6342         (_initialize_amd64obsd_nat): Adjust to C++ification.
6343         * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
6344         (the_arm_fbsd_nat_target): New.
6345         (arm_fbsd_fetch_inferior_registers)
6346         (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
6347         (_initialize_arm_fbsd_nat): Refactor as methods of
6348         arm_fbsd_nat_target.
6349         (_initialize_arm_fbsd_nat): Adjust to C++ification.
6350         * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
6351         (the_arm_netbsd_nat_target): New.
6352         (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
6353         arm_netbsd_nat_target.
6354         (_initialize_arm_netbsd_nat): Adjust to C++ification.
6355         * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
6356         (the_hppa_nbsd_nat_target): New.
6357         (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
6358         hppa_nbsd_nat_target methods.
6359         (_initialize_hppanbsd_nat): Adjust to C++ification.
6360         * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
6361         (the_hppa_obsd_nat_target): New.
6362         (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
6363         methods of hppa_obsd_nat_target.
6364         (_initialize_hppaobsd_nat): Adjust to C++ification.  Use
6365         add_target.
6366         * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
6367         (_initialize_i386nbsd_nat): Adjust to C++ification.  Use
6368         add_target.
6369         * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
6370         (_initialize_i386obsd_nat): Use add_target.
6371         * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
6372         (the_m68k_bsd_nat_target): New.
6373         (m68kbsd_fetch_inferior_registers)
6374         (m68kbsd_store_inferior_registers): Refactor as methods of
6375         m68k_bsd_nat_target.
6376         (_initialize_m68kbsd_nat): Adjust to C++ification.
6377         * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
6378         (the_mips_fbsd_nat_target): New.
6379         (mips_fbsd_fetch_inferior_registers)
6380         (mips_fbsd_store_inferior_registers): Refactor as methods of
6381         mips_fbsd_nat_target.
6382         (_initialize_mips_fbsd_nat): Adjust to C++ification.  Use
6383         add_target.
6384         * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
6385         (the_mips_nbsd_nat_target): New.
6386         (mipsnbsd_fetch_inferior_registers)
6387         (mipsnbsd_store_inferior_registers): Refactor as methods of
6388         mips_nbsd_nat_target.
6389         (_initialize_mipsnbsd_nat): Adjust to C++ification.
6390         * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
6391         (the_mips64_obsd_nat_target): New.
6392         (mips64obsd_fetch_inferior_registers)
6393         (mips64obsd_store_inferior_registers): Refactor as methods of
6394         mips64_obsd_nat_target.
6395         (_initialize_mips64obsd_nat): Adjust to C++ification.  Use
6396         add_target.
6397         * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
6398         nbsd_nat_target.
6399         * nbsd-nat.h: Include "inf-ptrace.h".
6400         (nbsd_nat_target): New class.
6401         * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
6402         (obsd_wait): Refactor as methods of obsd_nat_target.
6403         (obsd_add_target): Delete.
6404         * obsd-nat.h: Include "inf-ptrace.h".
6405         (obsd_nat_target): New class.
6406         * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
6407         (the_ppc_fbsd_nat_target): New.
6408         (ppcfbsd_fetch_inferior_registers)
6409         (ppcfbsd_store_inferior_registers): Refactor as methods of
6410         ppc_fbsd_nat_target.
6411         (_initialize_ppcfbsd_nat): Adjust to C++ification.  Use
6412         add_target.
6413         * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
6414         (the_ppc_nbsd_nat_target): New.
6415         (ppcnbsd_fetch_inferior_registers)
6416         (ppcnbsd_store_inferior_registers): Refactor as methods of
6417         ppc_nbsd_nat_target.
6418         (_initialize_ppcnbsd_nat): Adjust to C++ification.
6419         * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
6420         (the_ppc_obsd_nat_target): New.
6421         (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
6422         methods of ppc_obsd_nat_target.
6423         (_initialize_ppcobsd_nat): Adjust to C++ification.  Use
6424         add_target.
6425         * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
6426         (the_sh_nbsd_nat_target): New.
6427         (shnbsd_fetch_inferior_registers)
6428         (shnbsd_store_inferior_registers): Refactor as methods of
6429         sh_nbsd_nat_target.
6430         (_initialize_shnbsd_nat): Adjust to C++ification.
6431         * sparc-nat.c (sparc_xfer_wcookie): Make extern.
6432         (inf_ptrace_xfer_partial): Delete.
6433         (sparc_xfer_partial, sparc_target): Delete.
6434         * sparc-nat.h (sparc_fetch_inferior_registers)
6435         (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
6436         (sparc_target): Delete function declaration.
6437         (sparc_target): New template class.
6438         * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
6439         (_initialize_sparcnbsd_nat): Adjust to C++ification.
6440         * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
6441         (_initialize_sparc64fbsd_nat): Adjust to C++ification.  Use
6442         add_target.
6443         * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
6444         (_initialize_sparc64nbsd_nat): Adjust to C++ification.
6445         * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
6446         (_initialize_sparc64obsd_nat): Adjust to C++ification.  Use
6447         add_target.
6448         * vax-bsd-nat.c (vax_bsd_nat_target): New class.
6449         (the_vax_bsd_nat_target): New.
6450         (vaxbsd_fetch_inferior_registers)
6451         (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
6452         methods.
6453         (_initialize_vaxbsd_nat): Adjust to C++ification.
6454
6455         * bsd-kvm.c (bsd_kvm_target): New class.
6456         (bsd_kvm_ops): Now a bsd_kvm_target.
6457         (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
6458         (bsd_kvm_files_info, bsd_kvm_fetch_registers)
6459         (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
6460         bsd_kvm_target.
6461         (bsd_kvm_return_one): Delete.
6462         (bsd_kvm_add_target): Adjust to C++ification.
6463
6464         * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
6465         (nto_procfs_target_procfs): New classes.
6466         (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
6467         (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
6468         (procfs_post_attach, procfs_wait, procfs_fetch_registers)
6469         (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
6470         (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
6471         (procfs_remove_hw_breakpoint, procfs_resume)
6472         (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
6473         (procfs_kill_inferior, procfs_store_registers)
6474         (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
6475         as methods of nto_procfs_target.
6476         (nto_procfs_ops): Now an nto_procfs_target_procfs.
6477         (nto_native_ops): Delete.
6478         (procfs_open, procfs_native_open): Delete.
6479         (nto_native_ops): Now an nto_procfs_target_native.
6480         (init_procfs_targets): Adjust to C++ification.
6481         (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
6482         (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
6483         Refactor as methods of nto_procfs_target.
6484
6485         * go32-nat.c (go32_nat_target): New class.
6486         (the_go32_nat_target): New.
6487         (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
6488         (go32_store_registers, go32_xfer_partial, go32_files_info)
6489         (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
6490         (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
6491         (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
6492         (go32_pid_to_str): Refactor as methods of go32_nat_target.
6493         (go32_target): Delete.
6494         (_initialize_go32_nat): Adjust to C++ification.
6495
6496         * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
6497         (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
6498         (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
6499         (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
6500         gnu_nat_target.
6501         (gnu_target): Delete.
6502         * gnu-nat.h (gnu_target): Delete.
6503         (gnu_nat_target): New class.
6504         * i386-gnu-nat.c (gnu_base_target): New.
6505         (i386_gnu_nat_target): New class.
6506         (the_i386_gnu_nat_target): New.
6507         (_initialize_i386gnu_nat): Adjust to C++ification.
6508
6509 2018-05-02  Pedro Alves  <palves@redhat.com>
6510
6511         * bfd-target.c (target_bfd_xclose): Rename to ...
6512         (target_bfd_close): ... this.
6513         (target_bfd_reopen): Adjust.
6514         * target.c (target_close): Remove references to to_xclose.
6515         * target.h (target_ops::to_xclose): Delete.
6516         (target_ops::to_close): Update comments.
6517
6518 2018-05-02  Pedro Alves  <palves@redhat.com>
6519
6520         * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
6521         "linux-nat.h".
6522         * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
6523         * inf-ptrace.c (inf_ptrace_register_u_offset)
6524         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
6525         (inf_ptrace_store_register, inf_ptrace_store_registers)
6526         (inf_ptrace_trad_target): Move to ...
6527         * linux-nat-trad.c: ... this new file.
6528         * linux-nat-trad.h: New file.
6529         * linux-nat.c (linux_target_install_ops): Make extern.
6530         (linux_trad_target): Delete.
6531         * linux-nat.h (linux_trad_target): Delete declaration.
6532         (linux_target_install_ops): Declare.
6533         * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
6534         "linux-nat.h".
6535
6536 2018-05-02  Pedro Alves  <palves@redhat.com>
6537
6538         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
6539         procfs_target/add_target here.
6540         * procfs.c (procfs_target): Make static.
6541         (_initialize_procfs): Call add_target here.
6542         * procfs.h (struct target_ops): Remove forward declaration.
6543         (procfs_target): Remove declaration.
6544         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
6545
6546 2018-05-02  Pedro Alves  <palves@redhat.com>
6547
6548         * procfs.c (procfs_stopped_by_watchpoint)
6549         (procfs_insert_watchpoint, procfs_remove_watchpoint)
6550         (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
6551         Forward declare.
6552         (procfs_use_watchpoints): Delete, move contents...
6553         (procfs_target): ... here.
6554         * procfs.h (procfs_use_watchpoints): Delete declaration.
6555         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
6556         procfs_use_watchpoints.
6557         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
6558         procfs_use_watchpoints.
6559
6560 2018-05-02  Tom Tromey  <tom@tromey.com>
6561
6562         PR python/20084:
6563         * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
6564         and var_zuinteger_unlimited.
6565         * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
6566         and PARAM_ZUINTEGER_UNLIMITED.
6567         (set_parameter_value): Handle var_zuinteger and
6568         var_zuinteger_unlimited.
6569         (add_setshow_generic): Likewise.
6570         (parmpy_init): Likewise.
6571
6572 2018-04-28  Dan Robertson  <danlrobertson89@gmail.com>
6573
6574         PR rust/23124
6575         * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
6576         pointer is not null before dereferencing it.
6577
6578 2018-04-30  Tom Tromey  <tom@tromey.com>
6579
6580         * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
6581         is_mi_like_p.
6582
6583 2018-04-30  Tom Tromey  <tom@tromey.com>
6584
6585         * breakpoint.c (mention): Remove use of is_mi_like_p.
6586         (print_mention_ranged_breakpoint): Likewise.
6587         * break-catch-throw.c (print_it_exception_catchpoint): Remove use
6588         of is_mi_like_p.
6589
6590 2018-04-30  Tom Tromey  <tom@tromey.com>
6591
6592         * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
6593
6594 2018-04-30  Tom Tromey  <tom@tromey.com>
6595
6596         * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
6597         (info_spu_event_command): Remove some uses of is_mi_like_p.
6598
6599 2018-04-30  Tom Tromey  <tom@tromey.com>
6600
6601         * python/py-framefilter.c (py_print_single_arg)
6602         (enumerate_locals, py_print_args, py_print_frame): Remove some
6603         uses of is_mi_like_p.
6604
6605 2018-04-30  Tom Tromey  <tom@tromey.com>
6606
6607         * ui-out.c: Update.
6608         * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
6609         * ui-out.h (ui_out::is_mi_like_p): Now const.
6610         (ui_out::do_is_mi_like_p): Now const.
6611         * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
6612
6613 2018-04-30  Tom Tromey  <tom@tromey.com>
6614
6615         * varobj.c (varobj_set_visualizer): Use new_reference.
6616         * python/python.c (gdbpy_decode_line): Use new_reference.
6617         * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
6618         new_reference.
6619
6620 2018-04-30  Tom Tromey  <tom@tromey.com>
6621
6622         * varobj.c (install_new_value): Use new_reference.
6623         * value.h (value_incref): Return void.  Swap intro comment with
6624         value_decref.
6625         * value.c (set_value_parent): Use new_reference.
6626         (value_incref): Return void.  Update intro comment.
6627         (release_value): Use new_reference.
6628         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
6629
6630 2018-04-30  Tom Tromey  <tom@tromey.com>
6631
6632         * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
6633         * gdb_bfd.h (new_bfd_ref): Remove.
6634         (gdb_bfd_open): Update comment.
6635         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
6636         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
6637         (gdb_bfd_fdopenr): Use new_reference.
6638         * exec.c (exec_file_attach): Use new_reference.
6639
6640 2018-04-30  Tom Tromey  <tom@tromey.com>
6641
6642         * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
6643         method.
6644
6645 2018-04-30  Tom Tromey  <tom@tromey.com>
6646
6647         * jit.c (jit_read_code_entry): Use type_align.
6648         * i386-tdep.c (i386_gdbarch_init): Don't call
6649         set_gdbarch_long_long_align_bit.
6650         * gdbarch.sh: Remove long_long_align_bit.
6651         * gdbarch.c, gdbarch.h: Rebuild.
6652         * arc-tdep.c (arc_type_align): New function.
6653         (arc_gdbarch_init): Use arc_type_align.  Don't call
6654         set_gdbarch_long_long_align_bit.
6655
6656 2018-04-30  Tom Tromey  <tom@tromey.com>
6657
6658         * rust-lang.c (rust_type_alignment): Remove.
6659         (rust_composite_type): Use type_align.
6660
6661 2018-04-30  Tom Tromey  <tom@tromey.com>
6662
6663         * NEWS: Mention Type.align.
6664         * python/py-type.c (typy_get_alignof): New function.
6665         (type_object_getset): Add "alignof".
6666
6667 2018-04-30  Tom Tromey  <tom@tromey.com>
6668
6669         PR exp/17095:
6670         * NEWS: Update.
6671         * std-operator.def (UNOP_ALIGNOF): New operator.
6672         * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
6673         New.
6674         * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
6675         * c-lang.c (c_op_print_tab): Add alignof.
6676         * c-exp.y (ALIGNOF): New token.
6677         (exp): Add "ALIGNOF" production.
6678         (ident_tokens): Add _Alignof and alignof.
6679
6680 2018-04-30  Tom Tromey  <tom@tromey.com>
6681
6682         * i386-tdep.c (i386_type_align): New function.
6683         (i386_gdbarch_init): Update.
6684         * gdbarch.sh (type_align): New method.
6685         * gdbarch.c, gdbarch.h: Rebuild.
6686         * arch-utils.h (default_type_align): Declare.
6687         * arch-utils.c (default_type_align): New function.
6688         * gdbtypes.h (TYPE_ALIGN_BITS): New define.
6689         (struct type) <align_log2>: New field.
6690         <instance_flags>: Now a bitfield.
6691         (TYPE_RAW_ALIGN): New macro.
6692         (type_align, type_raw_align, set_type_align): Declare.
6693         * gdbtypes.c (type_align, type_raw_align, set_type_align): New
6694         functions.
6695         * dwarf2read.c (quirk_rust_enum): Set type alignment.
6696         (get_alignment, maybe_set_alignment): New functions.
6697         (read_structure_type, read_enumeration_type, read_array_type)
6698         (read_set_type, read_tag_pointer_type, read_tag_reference_type)
6699         (read_subrange_type, read_base_type): Set type alignment.
6700
6701 2018-04-30  Simon Marchi  <simon.marchi@ericsson.com>
6702
6703         * dwarf2read.c (read_index_from_section): Use bool.
6704
6705 2018-04-29  Fabian Groffen  <grobian@gentoo.org>
6706
6707         PR gdb/22950
6708         * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
6709         with #ifdef.
6710
6711 2018-04-29  John Reiser  <jreiser@BitWagon.com>
6712
6713         PR build/22873
6714         * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
6715         last step, and do it atomically.
6716
6717 2018-04-27  Alexandre Oliva  <aoliva@redhat.com>
6718
6719         * compile/compile-c-types.c (convert_int, convert_float):
6720         Update for C FE v1.
6721
6722 2018-04-27  Tom Tromey  <tom@tromey.com>
6723
6724         PR rust/22545:
6725         * rust-lang.c (rust_inclusive_range_type_p): New function.
6726         (rust_range): Handle inclusive ranges.
6727         (rust_compute_range): Likewise.
6728         * rust-exp.y (struct rust_op) <inclusive>: New field.
6729         (DOTDOTEQ): New constant.
6730         (range_expr): Add "..=" productions.
6731         (operator_tokens): Add "..=" token.
6732         (ast_range): Add "inclusive" parameter.
6733         (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
6734         ranges.
6735         * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
6736         bounds values.
6737         * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
6738         LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
6739         Update comments.
6740         * expprint.c (print_subexp_standard): Handle new bounds values.
6741         (dump_subexp_body_standard): Likewise.
6742
6743 2018-04-27  Tom Tromey  <tom@tromey.com>
6744
6745         * configure: Rebuild.
6746         * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
6747         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
6748         "OVERRIDE".
6749         (class symbol_needs_eval_context): Likewise.
6750         * dwarf2read.c (mock_mapped_index::symbol_name_count)
6751         (mock_mapped_index::symbol_name_at): Use "override".  Remove
6752         "virtual".
6753         * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
6754         "override".
6755         (class dwarf_expr_executor): Use "override", not "OVERRIDE".
6756         * aarch64-tdep.c (instruction_reader::read): Use "override".
6757         (instruction_reader_test::read): Likewise.
6758         * arm-tdep.c (instruction_reader::read): Use "override".
6759         (instruction_reader_thumb::read): Likewise.
6760
6761 2018-04-26  Andrzej Kaczmarek  <andrzej.kaczmarek@codecoup.pl>
6762
6763         PR remote/9665
6764         * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
6765         instead of remote_send.
6766         (remote_send): Remove.
6767
6768 2018-04-26  Pedro Alves  <palves@redhat.com>
6769
6770         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
6771         find_function_start_sal instead of find_pc_line.
6772
6773 2018-04-26  Pedro Alves  <palves@redhat.com>
6774
6775         * breakpoint.c (set_breakpoint_location_function): Handle
6776         mst_data_gnu_ifunc.
6777         * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
6778         * elfread.c (elf_symtab_read): Give data symbols with
6779         BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
6780         (elf_rel_plt_read): Update comment.
6781         * linespec.c (convert_linespec_to_sals): Handle
6782         mst_data_gnu_ifunc.
6783         (minsym_found): Handle mst_data_gnu_ifunc.
6784         * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
6785         (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
6786         * parse.c (find_minsym_type_and_address): Handle
6787         mst_data_gnu_ifunc.
6788         * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
6789         * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
6790         * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
6791         comment.
6792         <mst_data_gnu_ifunc>: New enumerator.
6793
6794 2018-04-26  Pedro Alves  <palves@redhat.com>
6795
6796         * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
6797         (lookup_minimal_symbol_by_pc_section): ... this.  Replace
6798         'want_trampoline' parameter by a lookup_msym_prefer parameter.
6799         Handle it.
6800         (lookup_minimal_symbol_by_pc_section): Delete old implementation.
6801         (lookup_minimal_symbol_by_pc): Adjust.
6802         (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
6803         (lookup_solib_trampoline_symbol_by_pc): Adjust.
6804         * minsyms.h (lookup_msym_prefer): New enum.
6805         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
6806         parameter by a lookup_msym_prefer parameter.
6807
6808 2018-04-26  Pedro Alves  <palves@redhat.com>
6809
6810         * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
6811         ends in "@plt" instead of looking at the symbol's section.
6812
6813 2018-04-26  Pedro Alves  <palves@redhat.com>
6814
6815         * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete.  Remove
6816         all references.
6817         (find_pc_partial_function_gnu_ifunc): Rename to ...
6818         (find_pc_partial_function): ... this, and remove references to
6819         'is_gnu_ifunc_p'.
6820         (find_pc_partial_function): Delete old implementation.
6821         * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
6822
6823 2018-04-26  Pedro Alves  <palves@redhat.com>
6824
6825         * linespec.c (struct bound_minimal_symbol_search_key): New.
6826         (convert_linespec_to_sals): Sort minimal symbols earlier.  Don't
6827         skip first line if we found a GNU ifunc minimal symbol by name.
6828         (compare_msymbols): Change parameters to work with a destructured
6829         lhs minsym.
6830         (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
6831         functions.
6832
6833 2018-04-26  Pedro Alves  <palves@redhat.com>
6834
6835         * breakpoint.c (set_breakpoint_location_function): Don't resolve
6836         ifunc targets here.  Instead, if we have an ifunc minsym, use its
6837         address/name.
6838         (add_location_to_breakpoint): Store the minsym and the objfile in
6839         the breakpoint location.
6840         * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
6841         * linespec.c (minsym_found): Resolve GNU ifunc targets here.
6842         Record the minsym in the sal.
6843         * symtab.h (symtab_and_line) <msymbol>: New field.
6844
6845 2018-04-26  Pedro Alves  <palves@redhat.com>
6846
6847         * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
6848         unless we actually resolved the ifunc.
6849
6850 2018-04-26  Pedro Alves  <palves@redhat.com>
6851
6852         * c-exp.y (variable production): Prefer ifunc minsyms over
6853         regular function symbols.
6854         * symtab.c (find_gnu_ifunc): New function.
6855         * minsyms.h (lookup_msym_prefer): New enum.
6856         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
6857         parameter by a lookup_msym_prefer parameter.
6858         * symtab.h (find_gnu_ifunc): New declaration.
6859
6860 2018-04-26  Pedro Alves  <palves@redhat.com>
6861
6862         * blockframe.c (find_gnu_ifunc_target_type): New function.
6863         (find_function_type): New.
6864         * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
6865         return a value with a memory address.
6866         (eval_call): For calls to GNU ifunc functions, try to find the
6867         type of the target function from the type that the resolver
6868         returns.
6869         * gdbtypes.c (objfile_type): Don't install a return type for ifunc
6870         symbols.
6871         * infcall.c (find_function_return_type): Delete.
6872         (find_function_addr): Add 'function_type' parameter.  For calls to
6873         GNU ifunc functions, try to find the type of the target function
6874         from the type that the resolver returns, and return it via
6875         FUNCTION_TYPE.
6876         (call_function_by_hand_dummy): Adjust to use the function type
6877         returned by find_function_addr.
6878         (find_function_addr): Add 'function_type' parameter and move
6879         description here.
6880         * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
6881         declarations.
6882
6883 2018-04-26  Pedro Alves  <palves@redhat.com>
6884
6885         * c-exp.y (variable production): Skip finding an alias for ifunc
6886         symbols.
6887
6888 2018-04-26  Pedro Alves  <palves@redhat.com>
6889
6890         * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
6891
6892 2018-04-25  Pedro Alves  <palves@redhat.com>
6893
6894         * infcmd.c (kill_command): Print the pid as string, not the whole
6895         thread's ptid.  Add comment.  s/has been killed/killed/ in output
6896         message.
6897         * remote.c (remote_detach_1): Print the pid as string, not the
6898         whole thread's ptid.
6899
6900 2018-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
6901             Sergio Durigan Junior  <sergiodj@redhat.com>
6902             Pedro Alves  <palves@redhat.com>
6903
6904         * infcmd.c (kill_command): Print message when inferior has
6905         been killed.
6906         * inferior.c (print_inferior_events): Remove 'static'.  Set as
6907         '1'.
6908         (add_inferior): Improve message printed when
6909         'print_inferior_events' is on.
6910         (exit_inferior): Remove message printed when
6911         'print_inferior_events' is on.
6912         (detach_inferior): Improve message printed when
6913         'print_inferior_events' is on.
6914         (initialize_inferiors): Use 'add_inferior_silent' to set
6915         'current_inferior_'.
6916         * inferior.h (print_inferior_events): Declare here as
6917         'extern'.
6918         * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
6919         '[Detaching...]' messages when 'print_inferior_events' is on.
6920         Use 'add_thread_silent' instead of 'add_thread'.  Add '[' and ']'
6921         as prefix/suffix for messages.  Remove periods.  Fix erroneous
6922         'Detaching after fork from child...', replace it by '... from
6923         parent...'.
6924         (handle_vfork_child_exec_or_exit): Add '[' and ']' as
6925         prefix/suffix when printing 'Detaching...' messages.  Print
6926         them when 'print_inferior_events' is on.
6927         * remote.c (remote_detach_1): Print message when detaching
6928         from inferior and '!is_fork_parent'.
6929
6930 2018-04-24  Tom Tromey  <tom@tromey.com>
6931
6932         * cli-out.h: Reindent.
6933
6934 2018-04-24  Tom Tromey  <tom@tromey.com>
6935
6936         * cli-out.c (cli_ui_out::out_field_fmt): Remove.
6937         (cli_ui_out::do_field_string): Use fputs_filtered.
6938         * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
6939
6940 2018-04-23  Tom Tromey  <tom@tromey.com>
6941
6942         * guile/scm-frame.c (gdbscm_frame_read_var): Use
6943         gdb::unique_xmalloc_ptr.
6944
6945 2018-04-23  Tom Tromey  <tom@tromey.com>
6946
6947         * configure: Rebuild.
6948
6949 2018-04-22  Rajendra SY  <rajendra.sy@gmail.com>
6950
6951         PR gdb/23095
6952         * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
6953         prepare_for_testing.  Set normal_bp to r_debug_state if target
6954         is bsd.
6955
6956 2018-04-21  Pedro Alves  <palves@redhat.com>
6957             Rajendra SY  <rajendra.sy@gmail.com>
6958
6959         * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
6960         * remote.c (extended_remote_attach): In all-stop mode, mark the
6961         thread as executing.
6962
6963 2018-04-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6964
6965         * thread.c (thread_apply_all_command): Fix comment.
6966         (thread_command): Fix comment.
6967
6968 2018-04-10  Alan Hayward  <alan.hayward@arm.com>
6969
6970         * common/tdesc.h (tdesc_create_feature): Remove xml filename
6971         parameter.
6972         * features/aarch64-core.c (create_feature_aarch64_core):
6973         Regenerate.
6974         * features/aarch64-fpu.c (create_feature_aarch64_fpu):
6975         Likewise.
6976         * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
6977         Likewise.
6978         * features/i386/32bit-avx512.c
6979         (create_feature_i386_32bit_avx512): Likewise.
6980         * features/i386/32bit-core.c (create_feature_i386_32bit_core):
6981         Likewise.
6982         * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
6983         Likewise.
6984         * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
6985         Likewise.
6986         * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
6987         Likewise.
6988         * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
6989         Likewise.
6990         * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
6991         Likewise.
6992         * features/i386/64bit-avx512.c
6993         (create_feature_i386_64bit_avx512): Likewise.
6994         * features/i386/64bit-core.c (create_feature_i386_64bit_core):
6995         Likewise.
6996         * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
6997         Likewise.
6998         * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
6999         Likewise.
7000         * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
7001         Likewise.
7002         * features/i386/64bit-segments.c
7003         (create_feature_i386_64bit_segments): Likewise.
7004         * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
7005         Likewise.
7006         * features/i386/x32-core.c
7007         (create_feature_i386_x32_core): Likewise.
7008         * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
7009         * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
7010         * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
7011         * target-descriptions.c: In generated code, don't pass xml
7012         filename.
7013
7014 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
7015
7016         * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
7017         (print_xml_feature::visit_post): Likewise.
7018         (print_xml_feature::visit): Likewise.
7019         * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
7020         (print_xml_feature): Add new class.
7021         * regformats/regdat.sh: Null xmltarget on feature targets.
7022         * target-descriptions.c (struct target_desc): Add xmltarget.
7023         (maintenance_check_tdesc_xml_convert): Add unittest function.
7024         (tdesc_get_features_xml): Add function to get xml.
7025         (maintenance_check_xml_descriptions): Test xml generation.
7026         * xml-tdesc.c (string_read_description_xml): Add function.
7027         * xml-tdesc.h (string_read_description_xml): Add declaration.
7028
7029 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
7030
7031         * features/Makefile: Add feature marker to targets with new style
7032         target descriptions.
7033         * regformats/aarch64.dat: Regenerate.
7034         * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
7035         * regformats/i386/amd64-avx-linux.dat: Likewise.
7036         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
7037         * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
7038         * regformats/i386/amd64-linux.dat: Likewise.
7039         * regformats/i386/amd64-mpx-linux.dat: Likewise.
7040         * regformats/i386/amd64.dat: Likewise.
7041         * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
7042         * regformats/i386/i386-avx-linux.dat: Likewise.
7043         * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
7044         * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
7045         * regformats/i386/i386-linux.dat: Likewise.
7046         * regformats/i386/i386-mmx-linux.dat: Likewise.
7047         * regformats/i386/i386-mpx-linux.dat: Likewise.
7048         * regformats/i386/i386.dat: Likewise.
7049         * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
7050         * regformats/i386/x32-avx-linux.dat: Likewise.
7051         * regformats/i386/x32-linux.dat: Likewise.
7052         * regformats/tic6x-c62x-linux.dat: Likewise.
7053         * regformats/tic6x-c64x-linux.dat: Likewise.
7054         * regformats/tic6x-c64xp-linux.dat: Likewise.
7055         * regformats/regdat.sh: Parse feature marker.
7056
7057 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
7058
7059         * common/tdesc.h (tdesc_architecture_name): Add new declaration.
7060         (tdesc_osabi_name): Likewise.
7061         * target-descriptions.c (tdesc_architecture_name): Add new
7062         function.
7063         (tdesc_osabi_name): Likewise.
7064
7065 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
7066
7067         * common/tdesc.c (tdesc_predefined_type): Move to here.
7068         (tdesc_named_type): Likewise.
7069         (tdesc_create_vector): Likewise.
7070         (tdesc_create_struct): Likewise.
7071         (tdesc_set_struct_size): Likewise.
7072         (tdesc_create_union): Likewise.
7073         (tdesc_create_flags): Likewise.
7074         (tdesc_create_enum): Likewise.
7075         (tdesc_add_field): Likewise.
7076         (tdesc_add_typed_bitfield): Likewise.
7077         (tdesc_add_bitfield): Likewise.
7078         (tdesc_add_flag): Likewise.
7079         (tdesc_add_enum_value): Likewise.
7080         * common/tdesc.h (struct tdesc_type_builtin): Likewise.
7081         (struct tdesc_type_vector): Likewise.
7082         (struct tdesc_type_field): Likewise.
7083         (struct tdesc_type_with_fields): Likewise.
7084         (tdesc_create_enum): Add declaration.
7085         (tdesc_add_typed_bitfield): Likewise.
7086         (tdesc_add_enum_value): Likewise.
7087         * target-descriptions.c (tdesc_type_field): Move from here.
7088         (tdesc_type_builtin): Likewise.
7089         (tdesc_type_vector): Likewise.
7090         (tdesc_type_with_fields): Likewise.
7091         (tdesc_predefined_types): Likewise.
7092         (tdesc_named_type): Likewise.
7093         (tdesc_create_vector): Likewise.
7094         (tdesc_create_struct): Likewise.
7095         (tdesc_set_struct_size): Likewise.
7096         (tdesc_create_union): Likewise.
7097         (tdesc_create_flags): Likewise.
7098         (tdesc_create_enum): Likewise.
7099         (tdesc_add_field): Likewise.
7100         (tdesc_add_typed_bitfield): Likewise.
7101         (tdesc_add_bitfield): Likewise.
7102         (tdesc_add_flag): Likewise.
7103         (tdesc_add_enum_value): Likewise.
7104         * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
7105         (tdesc_add_typed_bitfield): Likewise.
7106         (tdesc_add_enum_value): Likewise.
7107
7108 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
7109
7110         * common/tdesc.c (tdesc_feature::accept): Move to here.
7111         (tdesc_feature::operator==): Likewise.
7112         (tdesc_create_reg): Likewise.
7113         * common/tdesc.h (tdesc_type_kind): Likewise.
7114         (struct tdesc_type): Likewise.
7115         (struct tdesc_feature): Likewise.
7116         * regformats/regdat.sh: Create a feature.
7117         * target-descriptions.c (tdesc_type_kind): Move from here.
7118         (tdesc_type): Likewise.
7119         (tdesc_type_up): Likewise.
7120         (tdesc_feature): Likewise.
7121         (tdesc_create_reg): Likewise.
7122
7123 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
7124
7125         * Makefile.in: Add arch/tdesc.c
7126         * common/tdesc.c: New file.
7127         * common/tdesc.h (tdesc_element_visitor): Move to here.
7128         (tdesc_element): Likewise.
7129         (tdesc_reg): Likewise.
7130         (tdesc_reg_up): Likewise.
7131         * regformats/regdef.h (reg): Add offset to constructors.
7132         * target-descriptions.c (tdesc_element_visitor): Move from here.
7133         (tdesc_element): Likewise.
7134         (tdesc_reg): Likewise.
7135         (tdesc_reg_up): Likewise.
7136
7137 2018-04-17  Tom Tromey  <tom@tromey.com>
7138
7139         * dwarf2read.c (quirk_rust_enum): Conditionally drop the
7140         discriminant field.
7141
7142 2018-04-17  Tom Tromey  <tom@tromey.com>
7143
7144         * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
7145
7146 2018-04-17  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7147
7148         * symtab.c (print_symbol_info): Skip printing filename and line
7149         number when `last' is NULL.
7150         (symtab_symbol_info): Use empty string instead of NULL for first
7151         invocation of print_symbol_info.
7152         (rbreak_command): Pass NULL to `last' parameter of
7153         print_symbol_info.
7154
7155 2018-04-16  Simon Marchi  <simon.marchi@ericsson.com>
7156
7157         * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
7158         instead of nullptr.
7159
7160 2018-04-16  Pedro Alves  <palves@redhat.com>
7161
7162         * MAINTAINERS (sh): Remove.
7163         * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
7164         (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
7165         (ALLDEPFILES): Remove sh64-tdep.c.
7166         * NEWS: Mentions that support for SH-5/SH64 is removed.
7167         * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
7168         (sh*-*-openbsd*): Ditto.
7169         (sh64-*-elf*): Remove.
7170         (sh*): Remove.
7171         * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
7172         * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
7173         * sh-tdep.c: No longer include "sh64-tdep.h".
7174         (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
7175         * sh64-tdep.c, sh64-tdep.h: Remove files.
7176
7177 2018-04-16  Pedro Alves  <palves@redhat.com>
7178
7179         * MAINTAINERS: Remove m88k.
7180         * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
7181         (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
7182         (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
7183         * NEWS: Mention that support for m88k was removed.
7184         * configure.host (m88*-*-*): Remove support.
7185         * configure.nat (m88k-*-*): Remove support.
7186         * configure.tgt (m88*-*-openbsd*): Remove.
7187         * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
7188
7189 2018-04-15  Simon Marchi  <simon.marchi@polymtl.ca>
7190
7191         * configure.tgt (x86_tobjs): New variable.
7192         (amd64_tobjs, i386_tobjs): Use it.
7193
7194 2018-04-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7195
7196         * symtab.c (print_symbol_info): Precede the symbol definition by
7197         the line number when available.
7198         * NEWS: Advertise this enhancement.
7199
7200 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
7201
7202         * NEWS (New options): announce set/show record btrace cpu.
7203         * btrace.c: Include record-btrace.h.
7204         (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
7205         the vendor is unknown.
7206         (btrace_compute_ftrace_1): Add cpu parameter.  Update callers.
7207         Maybe overwrite the btrace configuration's cpu.
7208         (btrace_compute_ftrace): Add cpu parameter.  Update callers.
7209         (btrace_fetch): Add cpu parameter.  Update callers.
7210         (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
7211         Maybe overwrite the btrace configuration's cpu.  Skip enabling
7212         errata workarounds if the vendor is unknown.
7213         * python/py-record-btrace.c: Include record-btrace.h.
7214         (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
7215         (recpy_bt_function_call_history): Call record_btrace_get_cpu.
7216         * record-btrace.c (record_btrace_cpu_state_kind): New.
7217         (record_btrace_cpu): New.
7218         (set_record_btrace_cpu_cmdlist): New.
7219         (record_btrace_get_cpu): New.
7220         (require_btrace_thread, record_btrace_info)
7221         (record_btrace_resume_thread): Call record_btrace_get_cpu.
7222         (cmd_set_record_btrace_cpu_none): New.
7223         (cmd_set_record_btrace_cpu_auto): New.
7224         (cmd_set_record_btrace_cpu): New.
7225         (cmd_show_record_btrace_cpu): New.
7226         (_initialize_record_btrace): Initialize set/show record btrace cpu
7227         commands.
7228         * record-btrace.h (record_btrace_get_cpu): New.
7229
7230 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
7231
7232         * record.c (set_record_command): Fix typo in message.
7233
7234 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
7235
7236         * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
7237
7238 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
7239
7240         * infrun.c (process_event_stop_test): Call
7241         gdbarch_in_indirect_branch_thunk.
7242         * gdbarch.sh (in_indirect_branch_thunk): New.
7243         * gdbarch.c: Regenerated.
7244         * gdbarch.h: Regenerated.
7245         * x86-tdep.h: New.
7246         * x86-tdep.c: New.
7247         * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
7248         (HFILES_NO_SRCDIR): Add x86-tdep.h.
7249         (ALLDEPFILES): Add x86-tdep.c.
7250         * arch-utils.h (default_in_indirect_branch_thunk): New.
7251         * arch-utils.c (default_in_indirect_branch_thunk): New.
7252         * i386-tdep: Include x86-tdep.h.
7253         (i386_in_indirect_branch_thunk): New.
7254         (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
7255         function.
7256         * amd64-tdep: Include x86-tdep.h.
7257         (amd64_in_indirect_branch_thunk): New.
7258         (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
7259
7260 2018-04-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
7261
7262         PR gdb/23053
7263         * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
7264         (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
7265         (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
7266         regression.
7267
7268 2018-04-12  Tom Tromey  <tom@tromey.com>
7269
7270         * rust-lang.c (rust_print_struct_def): Remove univariant code.
7271         (rust_evaluate_subexp): Likewise.
7272
7273 2018-04-12  Pedro Alves  <palves@redhat.com>
7274
7275         * procfs.c (procfs_detach): Make forward declaration's prototype
7276         match definition's protototype.
7277         (proc_get_LDT_entry): Remove stale do_cleanups call.
7278
7279 2018-04-12  Pedro Alves  <palves@redhat.com>
7280
7281         * target.h (target_ops::to_has_exited): Delete.
7282         (target_has_exited): Delete.
7283         * target-delegates.c: Regenerate.
7284
7285 2018-04-11  Pedro Alves  <palves@redhat.com>
7286
7287         * target.c (fileio_fh_t::t): Add comment.
7288         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
7289         (target_fileio_close): Handle a NULL target.
7290         (invalidate_fileio_fh): New.
7291         (target_close): Call it.
7292         * remote.c (remote_hostio_send_command): No longer check whether
7293         remote_desc is open.
7294
7295 2018-04-11  Pedro Alves  <palves@redhat.com>
7296
7297         * target.c (fileio_fh_t): Make it a named struct instead of a
7298         typedef.
7299         (fileio_fh_t::is_closed): New method.
7300         (DEF_VEC_O (fileio_fh_t)): Remove.
7301         (fileio_fhandles): Now a std::vector.
7302         (is_closed_fileio_fh): Delete.
7303         (acquire_fileio_fd): Adjust.  Rename parameters.
7304         (release_fileio_fd): Adjust.
7305         (fileio_fd_to_fh): Reimplement as a function instead of a macro.
7306         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
7307         (target_fileio_close): Adjust.
7308
7309 2018-04-10  Simon Marchi  <simon.marchi@ericsson.com>
7310
7311         * auto-load.c (auto_load_safe_path_vec_update): Iterate by
7312         index.
7313
7314 2018-04-10  Pedro Alves  <palves@redhat.com>
7315
7316         * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
7317         (scoped_finish_thread_state): New class.
7318         * infcmd.c (run_command_1): Use it instead of finish_thread_state
7319         cleanup.
7320         * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
7321         (fetch_inferior_event, normal_stop): Likewise.
7322         * thread.c (finish_thread_state_cleanup): Delete.
7323
7324 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
7325             Pedro Alves  <palves@redhat.com>
7326
7327         * value.c: Include "selftest.h" and "common/array-view.h".
7328         (struct range) <operator ==>: New.
7329         (test_ranges_contain): New.
7330         (check_ranges_vector): New.
7331         (test_insert_into_bit_range_vector): New.
7332         (_initialize_values): Register selftests.
7333         * common/array-view.h (operator==, operator!=): New.
7334
7335 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
7336
7337         * common/gdb_vecs.h (unordered_remove): Add overload that takes
7338         an iterator.
7339         * inline-frame.c: Include <algorithm>.
7340         (struct inline_state): Add constructor.
7341         (inline_state_s): Remove.
7342         (DEF_VEC_O(inline_state_s)): Remove.
7343         (inline_states): Change type to std::vector.
7344         (find_inline_frame_state): Adjust to std::vector.
7345         (allocate_inline_frame_state): Remove.
7346         (clear_inline_frame_state): Adjust to std::vector.
7347         (skip_inline_frames): Adjust to std::vector.
7348
7349 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
7350
7351         * tracepoint.h (struct trace_state_variable): Add constructor.
7352         <name>: Change type to std::string.
7353         * tracepoint.c (tsv_s): Remove.
7354         (DEF_VEC_O(tsv_s)): Remove.
7355         (tvariables): Change to std::vector.
7356         (create_trace_state_variable): Adjust to std::vector.
7357         (find_trace_state_variable): Likewise.
7358         (find_trace_state_variable_by_number): Likewise.
7359         (delete_trace_state_variable): Likewise.
7360         (trace_variable_command): Adjust to std::string.
7361         (delete_trace_variable_command): Likewise.
7362         (tvariables_info_1): Adjust to std::vector.
7363         (save_trace_state_variables): Likewise.
7364         (start_tracing): Likewise.
7365         (merge_uploaded_trace_state_variables): Adjust to std::vector
7366         and std::string.
7367         * target.h (struct target_ops)
7368         <to_download_trace_state_variable>: Pass reference to
7369         trace_state_variable.
7370         * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
7371         * target-delegates.c: Re-generate.
7372         * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
7373         (mi_tsv_deleted): Likewise.
7374         * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
7375         * remote.c (remote_download_trace_state_variable): Change
7376         pointer to reference and adjust.
7377         * make-target-delegates (parse_argtypes): Handle references.
7378         (write_function_header): Likewise.
7379         (munge_type): Likewise.
7380
7381 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
7382
7383         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7384         string_view-selftests.c.
7385         * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
7386         testsuite.
7387         * unittests/basic_string_view/cons/char/1.cc: Likewise.
7388         * unittests/basic_string_view/cons/char/2.cc: Likewise.
7389         * unittests/basic_string_view/cons/char/3.cc: Likewise.
7390         * unittests/basic_string_view/element_access/char/1.cc:
7391         Likewise.
7392         * unittests/basic_string_view/element_access/char/empty.cc:
7393         Likewise.
7394         * unittests/basic_string_view/element_access/char/front_back.cc:
7395         Likewise.
7396         * unittests/basic_string_view/inserters/char/2.cc: Likewise.
7397         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
7398         Likewise.
7399         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
7400         Likewise.
7401         * unittests/basic_string_view/modifiers/swap/char/1.cc:
7402         Likewise.
7403         * unittests/basic_string_view/operations/compare/char/1.cc:
7404         Likewise.
7405         * unittests/basic_string_view/operations/compare/char/13650.cc:
7406         Likewise.
7407         * unittests/basic_string_view/operations/copy/char/1.cc:
7408         Likewise.
7409         * unittests/basic_string_view/operations/data/char/1.cc:
7410         Likewise.
7411         * unittests/basic_string_view/operations/find/char/1.cc:
7412         Likewise.
7413         * unittests/basic_string_view/operations/find/char/2.cc:
7414         Likewise.
7415         * unittests/basic_string_view/operations/find/char/3.cc:
7416         Likewise.
7417         * unittests/basic_string_view/operations/find/char/4.cc:
7418         Likewise.
7419         * unittests/basic_string_view/operations/rfind/char/1.cc:
7420         Likewise.
7421         * unittests/basic_string_view/operations/rfind/char/2.cc:
7422         Likewise.
7423         * unittests/basic_string_view/operations/rfind/char/3.cc:
7424         Likewise.
7425         * unittests/basic_string_view/operations/substr/char/1.cc:
7426         Likewise.
7427         * unittests/basic_string_view/operators/char/2.cc: Likewise.
7428         * unittests/string_view-selftests.c: New file.
7429
7430 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
7431
7432         * unittests/basic_string_view/capacity/1.cc: New file.
7433         * unittests/basic_string_view/capacity/empty_neg.cc: New file.
7434         * unittests/basic_string_view/cons/char/1.cc: New file.
7435         * unittests/basic_string_view/cons/char/2.cc: New file.
7436         * unittests/basic_string_view/cons/char/3.cc: New file.
7437         * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
7438         * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
7439         * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
7440         * unittests/basic_string_view/element_access/char/1.cc: New file.
7441         * unittests/basic_string_view/element_access/char/2.cc: New file.
7442         * unittests/basic_string_view/element_access/char/empty.cc: New file.
7443         * unittests/basic_string_view/element_access/char/front_back.cc: New file.
7444         * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
7445         * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
7446         * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
7447         * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
7448         * unittests/basic_string_view/include.cc: New file.
7449         * unittests/basic_string_view/inserters/char/1.cc: New file.
7450         * unittests/basic_string_view/inserters/char/2.cc: New file.
7451         * unittests/basic_string_view/inserters/char/3.cc: New file.
7452         * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
7453         * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
7454         * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
7455         * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
7456         * unittests/basic_string_view/literals/types.cc: New file.
7457         * unittests/basic_string_view/literals/values.cc: New file.
7458         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
7459         * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
7460         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
7461         * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
7462         * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
7463         * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
7464         * unittests/basic_string_view/operations/compare/char/1.cc: New file.
7465         * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
7466         * unittests/basic_string_view/operations/compare/char/2.cc: New file.
7467         * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
7468         * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
7469         * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
7470         * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
7471         * unittests/basic_string_view/operations/copy/char/1.cc: New file.
7472         * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
7473         * unittests/basic_string_view/operations/data/char/1.cc: New file.
7474         * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
7475         * unittests/basic_string_view/operations/find/char/1.cc: New file.
7476         * unittests/basic_string_view/operations/find/char/2.cc: New file.
7477         * unittests/basic_string_view/operations/find/char/3.cc: New file.
7478         * unittests/basic_string_view/operations/find/char/4.cc: New file.
7479         * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
7480         * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
7481         * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
7482         * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
7483         * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
7484         * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
7485         * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
7486         * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
7487         * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
7488         * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
7489         * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
7490         * unittests/basic_string_view/operations/substr/char/1.cc: New file.
7491         * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
7492         * unittests/basic_string_view/operators/char/2.cc: New file.
7493         * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
7494         * unittests/basic_string_view/range_access/char/1.cc: New file.
7495         * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
7496         * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
7497         * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
7498         * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
7499         * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
7500         * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
7501         * unittests/basic_string_view/requirements/typedefs.cc: New file.
7502         * unittests/basic_string_view/typedefs.cc: New file.
7503         * unittests/basic_string_view/types/1.cc: New file.
7504
7505 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
7506
7507         * common/gdb_string_view.h: Remove libstdc++ implementation
7508         details, adjust to gdb reality.
7509         * common/gdb_string_view.tcc: Likewise.
7510         * cli/cli-script.c (struct string_view): Remove.
7511         (user_args) <m_args>: Change element type to gdb::string_view.
7512         (user_args::insert_args): Adjust.
7513
7514 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
7515
7516         * common/gdb_string_view.h: New file.
7517         * common/gdb_string_view.tcc: New file.
7518
7519 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
7520
7521         * ax_cxx_compile_stdcxx.m4: Sync with upstream.
7522         * configure: Re-generate.
7523
7524 2018-04-09  Pedro Alves  <palves@redhat.com>
7525
7526         * gdbarch.sh: Include "observable.h" instead of "observer.h".
7527         (set_target_gdbarch): Call
7528         gdb::observers::architecture_changed.notify instead of
7529         observer_notify_architecture_changed.
7530
7531 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
7532
7533         * tracepoint.c (struct current_traceframe_cleanup): Remove.
7534         (do_restore_current_traceframe_cleanup): Remove.
7535         (restore_current_traceframe_cleanup_dtor): Remove.
7536         (make_cleanup_restore_current_traceframe): Remove.
7537         (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
7538         New.
7539         * tracepoint.h (struct scoped_restore_current_traceframe): New.
7540         * infrun.c (fetch_inferior_event): Use
7541         scoped_restore_current_traceframe.
7542
7543 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
7544
7545         * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
7546         Remove.
7547         <n_allocated_type_units>: Remove.
7548         <all_type_units>: Change to std::vector.
7549         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
7550         to std::vector change.
7551         (dwarf2_per_objfile::get_cutu): Likewise.
7552         (dwarf2_per_objfile::get_tu): Likewise.
7553         (create_signatured_type_table_from_index): Likewise.
7554         (create_signatured_type_table_from_debug_names): Likewise.
7555         (dw2_symtab_iter_next): Likewise.
7556         (dw2_print_stats): Likewise.
7557         (dw2_expand_all_symtabs): Likewise.
7558         (dw2_expand_marked_cus): Likewise.
7559         (dw2_debug_names_iterator::next): Likewise.
7560         (dwarf2_initialize_objfile): Likewise.
7561         (add_signatured_type_cu_to_table): Likewise.
7562         (create_all_type_units): Likewise.
7563         (add_type_unit): Likewise.
7564         (struct tu_abbrev_offset): Add constructor.
7565         (build_type_psymtabs_1): Adjust to std::vector change.
7566         (print_tu_stats): Likewise.
7567         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
7568         (write_debug_names): Likewise.
7569
7570 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
7571
7572         * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
7573         Make an std::vector.
7574         <n_comp_units>: Remove.
7575         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
7576         to std::vector change.
7577         (dwarf2_per_objfile::get_cutu): Likewise.
7578         (dwarf2_per_objfile::get_cu): Likewise.
7579         (create_cus_from_index): Likewise.
7580         (create_addrmap_from_index): Likewise.
7581         (create_addrmap_from_aranges): Likewise.
7582         (dwarf2_read_index): Likewise.
7583         (dw2_find_last_source_symtab): Likewise.
7584         (dw2_map_symtabs_matching_filename): Likewise.
7585         (dw2_symtab_iter_next): Likewise.
7586         (dw2_print_stats): Likewise.
7587         (dw2_expand_all_symtabs): Likewise.
7588         (dw2_expand_symtabs_with_fullname): Likewise.
7589         (dw2_expand_marked_cus): Likewise.
7590         (dw2_map_symbol_filenames): Likewise.
7591         (create_cus_from_debug_names): Likewise.
7592         (dwarf2_read_debug_names): Likewise.
7593         (dw2_debug_names_iterator::next): Likewise.
7594         (dwarf2_initialize_objfile): Likewise.
7595         (set_partial_user): Likewise.
7596         (dwarf2_build_psymtabs_hard): Likewise.
7597         (read_comp_units_from_section): Remove arguments, adjust to
7598         std::vector change.
7599         (create_all_comp_units): Adjust to std::vector and
7600         read_comp_units_from_section changes.
7601         (dwarf2_find_containing_comp_unit): Adjust to std::vector
7602         change.
7603         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
7604         (psyms_seen_size): Likewise.
7605         (write_gdbindex): Likewise.
7606         (write_debug_names): Likewise.
7607
7608 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
7609
7610         * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
7611         with dwarf2_per_objfile.
7612         (create_cus_from_index): Likewise.
7613         (create_signatured_type_table_from_index): Likewise.
7614         (dwarf2_read_index): Likewise.
7615         (dwarf2_initialize_objfile): Likewise.
7616         (dwarf2_fetch_die_loc_sect_off):  Get dwarf2_per_objfile from
7617         per_cu rather than get_dwarf2_per_objfile.
7618
7619 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
7620
7621         * dwarf2read.h (struct signatured_type): Forward declare.
7622         (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
7623         New methods.
7624         * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
7625         (dw2_get_cutu): ...this.
7626         (dwarf2_per_objfile::get_cu): Rename from...
7627         (dw2_get_cu): ...this.
7628         (dwarf2_per_objfile::get_tu): New.
7629         (create_addrmap_from_index): Adjust.
7630         (create_addrmap_from_aranges): Adjust.
7631         (dw2_find_last_source_symtab): Adjust.
7632         (dw2_map_symtabs_matching_filename): Adjust.
7633         (dw2_symtab_iter_next): Adjust.
7634         (dw2_print_stats): Adjust.
7635         (dw2_expand_all_symtabs): Adjust.
7636         (dw2_expand_symtabs_with_fullname): Adjust.
7637         (dw2_expand_marked_cus): Adjust.
7638         (dw_expand_symtabs_matching_file_matcher): Adjust.
7639         (dw2_map_symbol_filenames): Adjust.
7640         (dw2_debug_names_iterator::next): Adjust.
7641         (dwarf2_initialize_objfile): Adjust.
7642         (set_partial_user): Adjust.
7643         (dwarf2_build_psymtabs_hard): Adjust.
7644
7645 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
7646
7647         * dwarf2read.c (create_signatured_type_table_from_debug_names):
7648         Remove unused variables.
7649         (dw2_map_symtabs_matching_filename): Likewise.
7650         (dwarf2_record_block_ranges): Likewise.
7651         (dwarf2_read_addr_index): Likewise.
7652         (follow_die_offset): Likewise.
7653
7654 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
7655
7656         * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
7657         to symbol_file_add_main.
7658
7659 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
7660
7661         PR mi/22299
7662         * mi/mi-console.c (do_fputc_async_safe): New.
7663         (mi_console_file::write_async_safe): New.
7664         (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
7665         * mi/mi-console.h (class mi_console_file) <write_async_safe>:
7666         New.
7667         * ui-file.c (ui_file::putstrn): Adjust call to
7668         fputstrn_unfiltered.
7669         * utils.c (printchar): Replace do_fputs and do_fprintf
7670         parameters by do_fputc.
7671         (fputstr_filtered): Adjust call to printchar.
7672         (fputstr_unfiltered): Likewise.
7673         (fputstrn_filtered): Likewise.
7674         (fputstrn_unfiltered): Add do_fputc parameter, pass to
7675         printchar.
7676         * utils.h (do_fputc_ftype): New typedef.
7677         (fputstrn_unfiltered): Add do_fputc parameter.
7678
7679 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
7680
7681         * regformats/i386/i386-avx.dat: Remove.
7682
7683 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
7684
7685         PR gdb/22979
7686         * amd64-tdep.c (amd64_none_init_abi): New function.
7687         (amd64_x32_none_init_abi): New function.
7688         (_initialize_amd64_tdep): Register handlers for x86-64 and
7689         x64_32 with GDB_OSABI_NONE.
7690         * osabi.c (gdbarch_init_osabi): Allow running handlers for the
7691         GDB_OSABI_NONE osabi.
7692
7693 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
7694
7695         PR gdb/22980
7696         * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
7697         GDB_OSABI_NONE.
7698         * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
7699         * osabi.c (gdb_osabi_names): Add "unknown" entry.
7700
7701 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
7702
7703         * common/byte-vector.h (char_vector): New type.
7704         * target.h (target_read_alloc): Return
7705         gdb::optional<byte_vector>.
7706         (target_read_stralloc): Return gdb::optional<char_vector>.
7707         (target_get_osdata): Return gdb::optional<char_vector>.
7708         * target.c (target_read_alloc_1): Templatize.  Replacement
7709         manual memory management with vector.
7710         (target_read_alloc): Change return type, adjust.
7711         (target_read_stralloc): Change return type, adjust.
7712         (target_get_osdata): Change return type, adjust.
7713         * auxv.c (struct auxv_info) <length>: Remove.
7714         <data>: Change type to gdb::optional<byte_vector>.
7715         (auxv_inferior_data_cleanup): Free auxv_info with delete.
7716         (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
7717         (target_auxv_search): Adjust.
7718         (fprint_target_auxv): Adjust.
7719         * avr-tdep.c (avr_io_reg_read_command): Adjust.
7720         * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
7721         (linux_make_corefile_notes): Adjust.
7722         * osdata.c (get_osdata): Adjust.
7723         * remote.c (remote_get_threads_with_qxfer): Adjust.
7724         (remote_memory_map): Adjust.
7725         (remote_traceframe_info): Adjust.
7726         (btrace_read_config): Adjust.
7727         (remote_read_btrace): Adjust.
7728         (remote_pid_to_exec_file): Adjust.
7729         * solib-aix.c (solib_aix_get_library_list): Adjust.
7730         * solib-dsbt.c (decode_loadmap): Don't free buf.
7731         (dsbt_get_initial_loadmaps): Adjust.
7732         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
7733         * solib-target.c (solib_target_current_sos): Adjust.
7734         * tracepoint.c (sdata_make_value): Adjust.
7735         * xml-support.c (xinclude_start_include): Adjust.
7736         (xml_fetch_content_from_file): Adjust.
7737         * xml-support.h (xml_fetch_another): Change return type.
7738         (xml_fetch_content_from_file): Change return type.
7739         * xml-syscall.c (xml_init_syscalls_info): Adjust.
7740         * xml-tdesc.c (file_read_description_xml): Adjust.
7741         (fetch_available_features_from_target): Change return type.
7742         (target_fetch_description_xml): Adjust.
7743         (target_read_description_xml): Adjust.
7744
7745 2018-04-06  Tom Tromey  <tom@tromey.com>
7746
7747         * value.c (~value): Update.
7748         (struct value) <contents>: Now unique_xmalloc_ptr.
7749         (value_contents_bits_eq, allocate_value_contents)
7750         (value_contents_raw, value_contents_all_raw)
7751         (value_contents_for_printing, value_contents_for_printing_const)
7752         (set_value_enclosing_type): Update.
7753
7754 2018-04-06  Tom Tromey  <tom@tromey.com>
7755
7756         * value.c (range_s): Remove typedef, VEC.
7757         (struct range): Add operator<.
7758         (range_lessthan): Remove.
7759         (ranges_contain): Change type.
7760         (~value): Update.
7761         (struct value) <unavailable, optimized_out>: Now std::vector.
7762         (value_entirely_available)
7763         (value_entirely_covered_by_range_vector)
7764         (value_entirely_unavailable, value_entirely_optimized_out):
7765         Update.
7766         (insert_into_bit_range_vector): Change argument type.
7767         (find_first_range_overlap): Likewise.
7768         (struct ranges_and_idx, value_contents_bits_eq)
7769         (require_not_optimized_out, require_available): Update.
7770         (ranges_copy_adjusted): Change argument types.
7771         (value_optimized_out, value_copy, value_fetch_lazy): Update.
7772
7773 2018-04-06  Tom Tromey  <tom@tromey.com>
7774
7775         * value.c (~value): Update.
7776         (struct value) <parent>: Now a value_ref_ptr.
7777         (value_parent, set_value_parent, value_address, value_copy):
7778         Update.
7779
7780 2018-04-06  Tom Tromey  <tom@tromey.com>
7781
7782         * value.c (struct value): Add constructor, destructor, and member
7783         initializers.
7784         (allocate_value_lazy, value_decref): Update.
7785
7786 2018-04-06  Tom Tromey  <tom@tromey.com>
7787
7788         * value.c (struct value) <released, next>: Remove.
7789         (all_values): Now a std::vector.
7790         (allocate_value_lazy): Update.
7791         (value_next): Remove.
7792         (value_mark, value_free_to_mark, release_value)
7793         (value_release_to_mark): Update.
7794
7795 2018-04-06  Tom Tromey  <tom@tromey.com>
7796
7797         * value.h (fetch_subexp_value, value_release_to_mark): Update.
7798         (free_value_chain): Remove.
7799         * value.c (free_value_chain): Remove.
7800         (value_release_to_mark): Return a std::vector.
7801         * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
7802         std::vector.
7803         (check_condition): Update.
7804         * eval.c (fetch_subexp_value): Change "val_chain" to a
7805         std::vector.
7806         * breakpoint.c (update_watchpoint): Update.
7807         (can_use_hardware_watchpoint): Change "vals" to a std::vector.
7808
7809 2018-04-06  Tom Tromey  <tom@tromey.com>
7810
7811         * value.h (free_all_values): Remove.
7812         * value.c (free_all_values): Remove.
7813
7814 2018-04-06  Tom Tromey  <tom@tromey.com>
7815
7816         * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
7817         (value_history_chain, value_history_count): Remove.
7818         (value_history): New global.
7819         (record_latest_value, access_value_history, show_values)
7820         (preserve_values): Update.
7821
7822 2018-04-06  Tom Tromey  <tom@tromey.com>
7823
7824         * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
7825         * varobj.c (varobj_set_display_format, varobj_set_value)
7826         (install_default_visualizer, construct_visualizer)
7827         (install_new_value, ~varobj, varobj_get_value_type)
7828         (my_value_of_variable, varobj_editable_p): Update.
7829         * c-varobj.c (c_describe_child, c_value_of_variable)
7830         (cplus_number_of_children, cplus_describe_child): Update.
7831         * ada-varobj.c (ada_number_of_children, ada_name_of_child)
7832         (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
7833         (ada_value_of_variable, ada_value_is_changeable_p): Update.
7834
7835 2018-04-06  Tom Tromey  <tom@tromey.com>
7836
7837         * printcmd.c (last_examine_address): Change type to
7838         value_ref_ptr.
7839         (do_examine, x_command): Update.
7840
7841 2018-04-06  Tom Tromey  <tom@tromey.com>
7842
7843         * value.c (release_value): Update.
7844         * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
7845         (struct bpstats) <val>: Now a value_ref_ptr.
7846         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
7847         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
7848         (~watchpoint, print_it_watchpoint, watch_command_1)
7849         (invalidate_bp_value_on_memory_change): Update.
7850
7851 2018-04-06  Tom Tromey  <tom@tromey.com>
7852
7853         * varobj.c (varobj_clear_saved_item)
7854         (update_dynamic_varobj_children, install_new_value, ~varobj):
7855         Update.
7856         * value.h (value_incref): Move declaration earlier.
7857         (value_decref): Rename from value_free.
7858         (struct value_ref_policy): New.
7859         (value_ref_ptr): New typedef.
7860         (struct value_deleter): Remove.
7861         (gdb_value_up): Remove typedef.
7862         (release_value): Change return type.
7863         (release_value_or_incref): Remove.
7864         * value.c (set_value_parent): Update.
7865         (value_incref): Change return type.
7866         (value_decref): Rename from value_free.
7867         (value_free_to_mark, free_all_values, free_value_chain): Update.
7868         (release_value): Return value_ref_ptr.
7869         (release_value_or_incref): Remove.
7870         (record_latest_value, set_internalvar, clear_internalvar):
7871         Update.
7872         * stack.c (info_frame_command): Don't call value_free.
7873         * python/py-value.c (valpy_dealloc, valpy_new)
7874         (value_to_value_object): Update.
7875         * printcmd.c (do_examine): Update.
7876         * opencl-lang.c (lval_func_free_closure): Update.
7877         * mi/mi-main.c (register_changed_p): Don't call value_free.
7878         * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
7879         * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
7880         * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
7881         value_free.
7882         * guile/scm-value.c (vlscm_free_value_smob)
7883         (vlscm_scm_from_value): Update.
7884         * frame.c (frame_register_unwind, frame_unwind_register_signed)
7885         (frame_unwind_register_unsigned, get_frame_register_bytes)
7886         (put_frame_register_bytes): Don't call value_free.
7887         * findvar.c (address_from_register): Don't call value_free.
7888         * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
7889         * dwarf2loc.c (entry_data_value_free_closure)
7890         (value_of_dwarf_reg_entry, free_pieced_value_closure)
7891         (dwarf2_evaluate_loc_desc_full): Update.
7892         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
7893         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
7894         (~watchpoint, watch_command_1)
7895         (invalidate_bp_value_on_memory_change): Update.
7896         * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
7897
7898 2018-04-06  Simon Marchi  <simon.marchi@polymtl.ca>
7899
7900         PR gdb/23022
7901         * warning.m4: Add -Wno-error=deprecated-register.
7902         * configure: Re-generate.
7903
7904 2018-04-05  Tom Tromey  <tom@tromey.com>
7905
7906         * linespec.h: Remove include of "vec.h".
7907
7908 2018-04-05  Tom Tromey  <tom@tromey.com>
7909
7910         * linespec.c (typep): Remove typedef.
7911         (find_methods, find_superclass_methods): Take a std::vector.
7912         (find_method): Use std::vector.
7913
7914 2018-04-05  Tom Tromey  <tom@tromey.com>
7915
7916         * utils.c (compare_strings): Remove.
7917         * utils.h (compare_strings): Remove.
7918         * objc-lang.h (find_imps): Update.
7919         * objc-lang.c (find_methods): Take a std::vector.
7920         (uniquify_strings, find_imps): Likewise.
7921         * linespec.c (find_methods): Take a std::vector.
7922         (decode_objc): Use std::vector.
7923         (add_all_symbol_names_from_pspace, find_superclass_methods): Take
7924         a std::vector.
7925         (find_method, find_function_symbols): Use std::vector.
7926
7927 2018-04-05  Tom Tromey  <tom@tromey.com>
7928
7929         * completer.c (completion_tracker::completion_tracker): Remove
7930         cast.
7931         (completion_tracker::discard_completions): Likewise.
7932         * breakpoint.c (ambiguous_names_p): Remove cast.
7933         * ada-lang.c (_initialize_ada_language): Remove cast.
7934         * utils.h (streq): Update.
7935         (streq_hash): Add new declaration.
7936         * utils.c (streq): Return bool.
7937         (streq_hash): New function.
7938
7939 2018-04-05  Tom Tromey  <tom@tromey.com>
7940
7941         * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
7942         Remove a string copy.
7943
7944 2018-04-05  Tom Tromey  <tom@tromey.com>
7945
7946         * linespec.c (filter_results): Use std::vector.
7947         (decode_line_2, decode_line_full): Update.
7948
7949 2018-04-05  Tom Tromey  <tom@tromey.com>
7950
7951         * linespec.c (canonical_to_fullform): Return std::string.
7952         (filter_results): Update.
7953         (struct decode_line_2_item): Add constructor.
7954         <fullform, displayform>: Now std::string.
7955         (decode_line_2_compare_items): Now a std::sort comparator.
7956         (decode_line_2): Update.
7957
7958 2018-04-05  Tom Tromey  <tom@tromey.com>
7959
7960         * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
7961         (unexpected_linespec_error): Update.
7962         (linespec_parse_basic, parse_linespec): Update.
7963
7964 2018-04-05  Tom Tromey  <tom@tromey.com>
7965
7966         * linespec.c (linespec_parse_basic): Reindent.
7967
7968 2018-04-05  Tom Tromey  <tom@tromey.com>
7969
7970         * minsyms.h (iterate_over_minimal_symbols): Update.
7971         * minsyms.c (iterate_over_minimal_symbols): Take a
7972         gdb::function_view.
7973         * linespec.c (struct collect_minsyms): Remove.
7974         (compare_msyms): Now a std::sort comparator.
7975         (add_minsym): Add parameters.
7976         (search_minsyms_for_name): Update.  Use std::vector.
7977
7978 2018-04-03  Tom Tromey  <tom@tromey.com>
7979
7980         * mipsread.c (read_alphacoff_dynamic_symtab): Use
7981         gdb::byte_vector.
7982
7983 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
7984
7985         * MAINTAINERS (Write After Approval): Add Weimin Pan.
7986
7987 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
7988
7989         PR gdb/16959
7990         * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when 
7991         printing static type.
7992
7993 2018-04-01  Tom Tromey  <tom@tromey.com>
7994
7995         * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
7996         (rs6000_xfer_shared_libraries): Update.
7997
7998 2018-04-01  Simon Marchi  <simon.marchi@polymtl.ca>
7999
8000         * common/gdb_vecs.h (char_ptr): Remove.
8001         * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
8002
8003 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
8004
8005         * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
8006         with std::vector.
8007         * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
8008
8009 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
8010
8011         * tracepoint.h (struct uploaded_tp): Initialize fields.
8012         <actions, step_actions, cmd_strings>: Change type to
8013         std::vector<char *>.
8014         * tracepoint.c (get_uploaded_tp): Allocate with new.
8015         (free_uploaded_tps): Free with delete.
8016         (parse_tracepoint_definition): Adjust to std::vector change.
8017         * breakpoint.c (read_uploaded_action): Likewise.
8018         (create_tracepoint_from_upload): Likewise.
8019         * ctf.c (ctf_write_uploaded_tp): Likewise.
8020         (SET_ARRAY_FIELD): Likewise.
8021         * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
8022
8023 2018-03-30  Tom Tromey  <tom@tromey.com>
8024
8025         * solib-svr4.c (lm_info_read): Use gdb::byte_vector.  Return
8026         std::unique_ptr.
8027         (svr4_keep_data_in_core): Update.
8028         (svr4_read_so_list): Update.
8029
8030 2018-03-30  Tom Tromey  <tom@tromey.com>
8031
8032         * windows-nat.c (handle_output_debug_string, handle_exception):
8033         Update.
8034         * target.h (target_read_string): Update.
8035         * target.c (target_read_string): Change "string" to
8036         unique_xmalloc_ptr.
8037         * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
8038         Update.
8039         * solib-frv.c (frv_current_sos): Update.
8040         * solib-dsbt.c (dsbt_current_sos): Update.
8041         * solib-darwin.c (darwin_current_sos): Update.
8042         * linux-thread-db.c (inferior_has_bug): Update.
8043         * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
8044         Update.  Remove alloca.
8045         * ada-lang.c (ada_main_name): Update.
8046
8047 2018-03-30  Tom Tromey  <tom@tromey.com>
8048
8049         * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
8050         (struct dwo_file_deleter): New.
8051         (dwo_file_up): New typedef.
8052         (open_and_init_dwo_file): Use dwo_file_up.
8053         (free_dwo_file_cleanup): Remove.
8054
8055 2018-03-30  Tom Tromey  <tom@tromey.com>
8056
8057         * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
8058         (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
8059
8060 2018-03-30  Tom Tromey  <tom@tromey.com>
8061
8062         * dwarf2read.c (class free_cached_comp_units): New class.
8063         (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
8064         (free_cached_comp_units): Remove function.
8065
8066 2018-03-30  Tom Tromey  <tom@tromey.com>
8067
8068         * utils.h (make_cleanup_unpush_target): Remove.
8069         * inf-ptrace.c (struct target_unpusher): New.
8070         (target_unpush_up) New typedef.
8071         (inf_ptrace_create_inferior, inf_ptrace_attach): Use
8072         target_unpush_up.
8073         * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
8074
8075 2018-03-27  Tom Tromey  <tom@tromey.com>
8076
8077         * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
8078
8079 2018-03-27  Pedro Alves  <palves@redhat.com>
8080             Tom Tromey  <tom@tromey.com>
8081
8082         * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
8083         destructor.  Now a class.
8084         (gdb_readline_wrapper_cleanup): Remove function.
8085         (gdb_readline_wrapper): Remove cleanups.
8086
8087 2018-03-27  Tom Tromey  <tom@tromey.com>
8088
8089         * typeprint.h (struct type_print_options) <local_typedefs,
8090         global_typedefs>: Remove "struct" keyword.
8091         (class typedef_hash_table): New class.
8092         (recursively_update_typedef_hash, add_template_parameters)
8093         (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
8094         (find_typedef_in_hash): Don't declare.
8095         * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
8096         (typedef_hash_table::recursively_update): Rename from
8097         recursively_update_typedef_hash.  Now a member.
8098         (typedef_hash_table::add_template_parameters): Rename from
8099         add_template_parameters.  Now a member.
8100         (typedef_hash_table::typedef_hash_table): Now a constructor;
8101         rename from create_typedef_hash.
8102         (typedef_hash_table::~typedef_hash_table): Now a destructor;
8103         rename from free_typedef_hash.
8104         (do_free_typedef_hash, make_cleanup_free_typedef_hash)
8105         (do_free_global_table): Remove.
8106         (typedef_hash_table::typedef_hash_table): New constructor; renamed
8107         from copy_type_recursive.
8108         (create_global_typedef_table): Remove.
8109         (typedef_hash_table::find_global_typedef): Now a member of
8110         typedef_hash_table.
8111         (typedef_hash_table::find_typedef): Rename from
8112         find_typedef_in_hash; now a member.
8113         (whatis_exp): Update.
8114         * extension.h (struct ext_lang_type_printers): Add constructor and
8115         destructor.
8116         (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
8117         declare.
8118         * extension.c (ext_lang_type_printers::ext_lang_type_printers):
8119         Now a constructor; rename from start_ext_lang_type_printers.
8120         (ext_lang_type_printers): Now a destructor; rename from
8121         free_ext_lang_type_printers.
8122         * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
8123         Update.
8124         (c_type_print_base_struct_union): Update.  Remove cleanups.
8125
8126 2018-03-27  Tom Tromey  <tom@tromey.com>
8127
8128         * dwarf-index-write.c: Include <cmath>.
8129
8130 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
8131
8132         * NEWS: Add entry describing new "set|show varsize-limit" command.
8133         * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
8134         command.
8135         * printcmd.c (_initialize_printcmd): Add "set var" alias of
8136         "set variable".
8137
8138 2018-03-27  Simon Marchi  <simon.marchi@ericsson.com>
8139
8140         * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
8141         dwarf-index-write.c
8142         (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
8143         * dwarf-index-common.c: New file.
8144         * dwarf-index-common.h: New file.
8145         * dwarf-index-write.c: New file.
8146         * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
8147         (struct dwarf2_section_info): Move from here.
8148         (dwarf2_section_info_def): Likewise.
8149         (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
8150         (offset_type): Likewise.
8151         (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
8152         (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
8153         (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
8154         (byte_swap): Likewise.
8155         (MAYBE_SWAP): Likewise.
8156         (dwarf2_per_cu_ptr): Likewise.
8157         (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
8158         (struct tu_stats): Likewise.
8159         (struct dwarf2_per_objfile): Likewise.
8160         (struct dwarf2_per_cu_data): Likewise.
8161         (struct signatured_type): Likewise.
8162         (sig_type_ptr): Likewise.
8163         (DEF_VEC_P (sig_type_ptr)): Likewise.
8164         (INDEX4_SUFFIX): Likewise.
8165         (INDEX5_SUFFIX): Likewise.
8166         (DEBUG_STR_SUFFIX): Likewise.
8167         (dwarf2_read_section): Make non-static.
8168         (mapped_index_string_hash): Move from here.
8169         (dwarf5_djb_hash): Likewise.
8170         (file_write): Likewise.
8171         (class data_buf): Likewise.
8172         (struct symtab_index_entry): Likewise.
8173         (struct mapped_symtab): Likewise.
8174         (find_slot): Likewise.
8175         (hash_expand): Likewise.
8176         (add_index_entry): Likewise.
8177         (uniquify_cu_indices): Likewise.
8178         (class c_str_view): Likewise.
8179         (class c_str_view_hasher): Likewise.
8180         (class vector_hasher): Likewise.
8181         (write_hash_table): Likewise.
8182         (psym_index_map): Likewise.
8183         (struct addrmap_index_data): Likewise.
8184         (add_address_entry): Likewise.
8185         (add_address_entry_worker): Likewise.
8186         (write_address_map): Likewise.
8187         (symbol_kind): Likewise.
8188         (write_psymbols): Likewise.
8189         (struct signatured_type_index_data): Likewise.
8190         (write_one_signatured_type): Likewise.
8191         (recursively_count_psymbols): Likewise.
8192         (recursively_write_psymbols): Likewise.
8193         (class debug_names): Likewise.
8194         (check_dwarf64_offsets): Likewise.
8195         (psyms_seen_size): Likewise.
8196         (write_gdbindex): Likewise.
8197         (write_debug_names): Likewise.
8198         (assert_file_size): Likewise.
8199         (write_psymtabs_to_index): Likewise.
8200         (save_gdb_index_command): Likewise.
8201         (_initialize_dwarf2_read): Don't register the "save gdb-index"
8202         command.
8203         * dwarf2read.h: New file.
8204
8205 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
8206
8207         PR gdb/22670
8208         * dwarf2read.c (dwarf2_physname): Do not return the demangled
8209         symbol name if the CU's language stores symbol names in linkage
8210         format.
8211         * language.h (struct language_defn)
8212         <la_store_sym_names_in_linkage_form_p>: New field.  Adjust
8213         all instances of this struct.
8214
8215 2018-03-26  Tom Tromey  <tom@tromey.com>
8216
8217         * stack.c (backtrace_command_1): Remove verbose code.
8218
8219 2018-03-26  Tom Tromey  <tom@tromey.com>
8220
8221         * python/py-framefilter.c (py_print_type): Don't catch
8222         exceptions.  Return void.
8223         (py_print_value): Likewise.
8224         (py_print_single_arg): Likewise.
8225         (enumerate_args): Don't catch exceptions.
8226         (py_print_args): Likewise.
8227         (py_print_frame): Likewise.
8228         (gdbpy_apply_frame_filter): Catch exceptions here.
8229
8230 2018-03-26  Tom Tromey  <tom@tromey.com>
8231
8232         * stack.c (_initialize_stack): Remove trailing newlines from help
8233         text.  Add "Usage" line to "backtrace" help.
8234
8235 2018-03-26  Tom Tromey  <tom@tromey.com>
8236
8237         PR python/16486:
8238         * python/py-framefilter.c (py_print_args): Call wrap_hint.
8239
8240 2018-03-26  Tom Tromey  <tom@tromey.com>
8241
8242         * python/py-framefilter.c (py_print_single_arg): Return
8243         EXT_LANG_BT_ERROR from catch.
8244
8245 2018-03-26  Tom Tromey  <tom@tromey.com>
8246
8247         PR backtrace/15584:
8248         * stack.c (backtrace_command_1): Move some code into no-filters
8249         "if".
8250
8251 2018-03-26  Tom Tromey  <tom@tromey.com>
8252
8253         * python/py-framefilter.c (throw_quit_or_print_exception): New
8254         function.
8255         (gdbpy_apply_frame_filter): Use it.
8256
8257 2018-03-26  Tom Tromey  <tom@tromey.com>
8258
8259         PR cli/17716:
8260         * python/py-framefilter.c (py_print_type, py_print_value)
8261         (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
8262         RETURN_MASK_ERROR.
8263
8264 2018-03-26  Tom Tromey  <tom@tromey.com>
8265
8266         * python/py-framefilter.c (enumerate_args): Use
8267         gdb::unique_xmalloc_ptr.
8268
8269 2018-03-26  Tom Tromey  <tom@tromey.com>
8270
8271         * python/py-framefilter.c (py_print_frame): Return
8272         EXT_LANG_BT_OK.
8273         (gdbpy_apply_frame_filter): Update comment.
8274         * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
8275         Remove.
8276         <EXT_LANG_BT_NO_FILTERS>: Change value.
8277
8278 2018-03-26  Tom Tromey  <tom@tromey.com>
8279
8280         PR backtrace/15582:
8281         * stack.c (backtrace_command): Parse "hide" argument.
8282         * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
8283         * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
8284         constant.
8285
8286 2018-03-26  Tom Tromey  <tom@tromey.com>
8287
8288         * stack.c (backtrace_command_1): Remove "show_locals" parameter,
8289         add "flags".
8290         (backtrace_command): Remove "fulltrace", add "flags".
8291
8292 2018-03-26  Tom Tromey  <tom@tromey.com>
8293
8294         * stack.c (backtrace_command): Rewrite command line parsing.
8295
8296 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
8297
8298         * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
8299
8300 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
8301
8302         * filename-seen-cache.h: Add include guard.
8303
8304 2018-03-26  Keith Seitz  <keiths@redhat.com>
8305
8306         * symfile.c (place_section): Remove "struct" from section_addr_info
8307         in comment.
8308         * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
8309         "struct" keyword from section_addr_info.
8310
8311 2018-03-26  Alan Hayward  <alan.hayward@arm.com>
8312
8313         * regformats/regdef.h (reg): Add constructors.
8314
8315 2018-03-25  Pedro Alves  <palves@redhat.com>
8316
8317         * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
8318         if then/else bodies in var_func_name extraction.
8319
8320 2018-03-23  Weimin Pan  <weimin.pan@oracle.com>
8321
8322         * minsyms.c (lookup_minimal_symbol_and_objfile): Use
8323         lookup_minimal_symbol() to find symbol entry.
8324         * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
8325
8326 2018-03-23  Keith Seitz  <keiths@redhat.com>
8327
8328         PR c++/22968
8329         * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
8330         nested type definitions for C++, too.
8331
8332 2018-03-23  Tom Tromey  <tom@tromey.com>
8333
8334         * machoread.c (struct oso_el): Add a constructor.  Don't define as
8335         a typedef.
8336         (macho_register_oso): Remove.
8337         (macho_symtab_read): Take a std::vector.
8338         (oso_el_compare_name): Now a std::sort comparator.
8339         (macho_symfile_read_all_oso): Take a std::vector.
8340         (macho_symfile_read): Use std::vector.  Remove cleanups.
8341
8342 2018-03-22  Tom Tromey  <tom@tromey.com>
8343
8344         * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
8345         (record_full_goto_bookmark): Use std::string.
8346
8347 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8348
8349         PR tdep/18295
8350         * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
8351         a single mask.
8352
8353 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8354
8355         * rs6000-tdep.c (store_insn_p): New function.
8356         (skip_prologue): New variable alloca_reg_offset. Set lr_reg
8357         and cr_reg to their unshifted values. Use store_insn_p to
8358         match LR saves using either R1 or fdata->alloca_reg. Use
8359         store_insn_p to match CR saves. Set alloca_reg_offset
8360         when alloca_reg and framep are set. Remove lr_reg shift
8361         when assigning to fdata->lr_register.
8362
8363 2018-03-22  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8364
8365         * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
8366         command line args instead of emitting a warning.
8367
8368 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
8369
8370         * tracepoint.h (struct static_tracepoint_marker): Initialize
8371         fields, define default constructor, move constructor and move
8372         assignment, disable the rest.
8373         <str_id, extra>: Make std::string.
8374         (release_static_tracepoint_marker): Remove.
8375         (free_current_marker): Remove.
8376         * tracepoint.c (free_current_marker): Remove.
8377         (parse_static_tracepoint_marker_definition): Adjust to
8378         std::string, use new hex2str overload.
8379         (release_static_tracepoint_marker): Remove.
8380         (print_one_static_tracepoint_marker): Get marker by reference
8381         and adjust to std::string.
8382         (info_static_tracepoint_markers_command): Adjust to std::vector
8383         changes
8384         * target.h (static_tracepoint_marker_p): Remove typedef.
8385         (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
8386         (struct target_ops) <to_static_tracepoint_marker_at>: Return
8387         bool.
8388         <to_static_tracepoint_markers_by_strid>: Return std::vector.
8389         * target-debug.h
8390         (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
8391         (target_debug_print_std_vector_static_tracepoint_marker): New.
8392         (target_debug_print_struct_static_tracepoint_marker_p): Rename
8393         to...
8394         (target_debug_print_static_tracepoint_marker_p): ... this.
8395         * target-delegates.c: Re-generate.
8396         * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
8397         Make std::string.
8398         * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
8399         (decode_static_tracepoint_spec): Adjust to std::vector.
8400         (tracepoint_print_one_detail): Adjust to std::string.
8401         (strace_marker_decode_location): Adjust to std::string.
8402         (update_static_tracepoint): Adjust to std::string, remove call
8403         to release_static_tracepoint_marker.
8404         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
8405         Adjust to std::vector.
8406         * remote.c (remote_static_tracepoint_marker_at): Return bool.
8407         (remote_static_tracepoint_markers_by_strid): Adjust to
8408         std::vector.
8409         * common/rsp-low.h (hex2str): New overload with explicit count
8410         of bytes.
8411         * common/rsp-low.c (hex2str): New overload with explicit count
8412         of bytes.
8413         * unittests/rsp-low-selftests.c (test_hex2str): New function.
8414         (_initialize_rsp_low_selftests): Add test_hex2str test.
8415         * unittests/tracepoint-selftests.c
8416         (test_parse_static_tracepoint_marker_definition): Adjust to
8417         std::string.
8418
8419 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
8420
8421         * tracepoint.c (parse_static_tracepoint_marker_definition):
8422         Consider case where the definition is followed by more
8423         definitions.
8424         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8425         tracepoint-selftests.c.
8426         * unittests/tracepoint-selftests.c: New.
8427
8428 2018-03-21  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8429
8430         * MAINTAINERS (Write After Approval): Add Pedro Franco de
8431         Carvalho.
8432
8433 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
8434
8435         * symtab.c (find_pc_sect_line): fixed indentation.
8436
8437 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
8438
8439         * symtab.c (find_pc_sect_line): now uses binary search.
8440
8441 2018-03-19  Tom Tromey  <tom@tromey.com>
8442
8443         * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
8444         "IDENT" production.
8445
8446 2018-03-19  Pedro Alves  <palves@redhat.com>
8447             Tom Tromey  <tom@tromey.com>
8448
8449         * unittests/observable-selftests.c: New file.
8450         * common/observable.h: New file.
8451         * observable.h: New file.
8452         * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
8453         arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
8454         breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
8455         corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
8456         extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
8457         infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
8458         linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
8459         mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
8460         ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
8461         python/py-breakpoint.c, python/py-finishbreakpoint.c,
8462         python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
8463         record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
8464         riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
8465         spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
8466         symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
8467         tui/tui-interp.c, valops.c: Update all users.
8468         * tui/tui-hooks.c (tui_bp_created_observer)
8469         (tui_bp_deleted_observer, tui_bp_modified_observer)
8470         (tui_inferior_exit_observer, tui_before_prompt_observer)
8471         (tui_normal_stop_observer, tui_register_changed_observer):
8472         Remove.
8473         (tui_observers_token): New global.
8474         (attach_or_detach, tui_attach_detach_observers): New functions.
8475         (tui_install_hooks, tui_remove_hooks): Use
8476         tui_attach_detach_observers.
8477         * record-btrace.c (record_btrace_thread_observer): Remove.
8478         (record_btrace_thread_observer_token): New global.
8479         * observer.sh: Remove.
8480         * observer.c: Rename to observable.c.
8481         * observable.c (namespace gdb_observers): Define new objects.
8482         (observer_debug): Move into gdb_observers namespace.
8483         (struct observer, struct observer_list, xalloc_observer_list_node)
8484         (xfree_observer_list_node, generic_observer_attach)
8485         (generic_observer_detach, generic_observer_notify): Remove.
8486         (_initialize_observer): Update.
8487         Don't include observer.inc.
8488         * Makefile.in (generated_files): Remove observer.h, observer.inc.
8489         (clean mostlyclean): Likewise.
8490         (observer.h, observer.inc): Remove targets.
8491         (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
8492         (COMMON_SFILES): Use observable.c, not observer.c.
8493         * .gitignore: Remove observer.h.
8494
8495 2018-03-18  Tom Tromey  <tom@tromey.com>
8496
8497         * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
8498         gdb::def_vector.
8499         (bfd_lookup_symbol_from_dyn_symtab): Likewise.
8500
8501 2018-03-17  Tom Tromey  <tom@tromey.com>
8502
8503         * auto-load.c (auto_load_objfile_script_1): Use std::string.
8504
8505 2018-03-17  Tom Tromey  <tom@tromey.com>
8506
8507         * target.c (class scoped_target_fd): New.
8508         (target_fileio_close_cleanup): Remove.
8509         (target_fileio_read_alloc_1): Use scoped_target_fd.
8510
8511 2018-03-16  Simon Marchi  <simon.marchi@polymtl.ca>
8512
8513         * silent-rules.mk: New.
8514         * Makefile.in: Include silent-rules.mk
8515         (srcdir, VPATH, top_srcdir): Move up.
8516         (COMPILE): Add ECHO_CXX.
8517         (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
8518         (init.c): Add ECHO_INIT_C.
8519         (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
8520         (version.c): Add ECHO_GEN.
8521         (printcmd.o): Add ECHO_CXX.
8522         (target-float.o): Add ECHO_CXX.
8523         (ada-exp.o): Add ECHO_CXX.
8524         (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
8525         (insight$(EXEEXT)): Add ECHO_CXXLD.
8526         * gnulib/configure.ac: Add AM_SILENT_RULES.
8527         * gnulib/aclocal.m4: Re-generate.
8528         * gnulib/configure: Re-generate.
8529         * gnulib/import/Makefile.in: Re-generate.
8530
8531 2018-03-16  Tom Tromey  <tom@tromey.com>
8532
8533         * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
8534         * utils.h (make_cleanup_free_section_addr_info): Don't declare.
8535         * utils.c (do_free_section_addr_info)
8536         (make_cleanup_free_section_addr_info): Remove.
8537         * symfile.h (struct other_sections): Add constructor.
8538         (struct section_addr_info): Remove.
8539         (section_addr_info): New typedef.
8540         (struct sym_fns) <sym_offsets>: Change type of parameter.
8541         (build_section_addr_info_from_objfile)
8542         (relative_addr_info_to_section_offsets, addr_info_make_relative)
8543         (default_symfile_offsets, symbol_file_add)
8544         (symbol_file_add_from_bfd)
8545         (build_section_addr_info_from_section_table): Update.
8546         (alloc_section_addr_info, free_section_addr_info): Don't declare.
8547         * symfile.c (alloc_section_addr_info): Remove.
8548         (build_section_addr_info_from_section_table): Change return type.
8549         Update.
8550         (build_section_addr_info_from_bfd)
8551         (build_section_addr_info_from_objfile): Likewise.
8552         (free_section_addr_info): Remove.
8553         (relative_addr_info_to_section_offsets): Change type of "addrs".
8554         (addrs_section_compar): Now a std::sort comparator.
8555         (addrs_section_sort): Change return type.
8556         (addr_info_make_relative): Change type of "addrs".  Update.
8557         (default_symfile_offsets, syms_from_objfile_1)
8558         (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
8559         (symbol_file_add_separate): Update.
8560         (symbol_file_add): Change type of "addrs".  Update.
8561         (add_symbol_file_command): Update.  Remove cleanups.
8562         * symfile-mem.c (symbol_file_add_from_memory): Update.  Remove
8563         cleanups.
8564         * symfile-debug.c (debug_sym_offsets): Change type of "info".
8565         * solib.c (solib_read_symbols): Update.
8566         * objfiles.c (objfile_relocate): Update.  Remove cleanups.
8567         * machoread.c (macho_symfile_offsets): Update.
8568         * jit.c (jit_bfd_try_read_symtab): Update.
8569
8570 2018-03-15  Simon Marchi  <simon.marchi@polymtl.ca>
8571
8572         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8573         unittests/utils-selftests.c.
8574         * unittests/utils-selftests.c: New file.
8575
8576 2018-03-14  Tom Tromey  <tom@tromey.com>
8577
8578         PR cli/14977:
8579         * printcmd.c (printf_c_string, printf_wide_c_string): Special case
8580         for NULL.
8581
8582 2018-03-14  Tom Tromey  <tom@tromey.com>
8583
8584         PR cli/19918:
8585         * printcmd.c (printf_pointer): Allow "-" in format.
8586
8587 2018-03-14  Tom Tromey  <tom@tromey.com>
8588
8589         * printcmd.c (_initialize_printcmd): Add usage to printf.
8590
8591 2018-03-14  Yao Qi  <qiyao@sourceware.org>
8592
8593         * MAINTAINERS: Update my email address.
8594
8595 2018-03-13  Tom Tromey  <tom@tromey.com>
8596
8597         * machoread.c (macho_check_dsym): Change filenamep to a
8598         std::string*.
8599         (macho_symfile_read): Update.
8600         * symfile.c (load_command): Use std::string.
8601
8602 2018-03-12  Andrew Burgess  <andrew.burgess@embecosm.com>
8603
8604         * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
8605         to error message string.
8606         (riscv_register_name): Use xsnprintf instead of sprintf.
8607         (riscv_insn::fetch_instruction): Use gdb_assert instead of
8608         internal_error.
8609         (riscv_print_arg_location): Use gdb_assert_not_reached instead of
8610         error.
8611         (riscv_push_dummy_call): Likewise.
8612
8613 2018-03-12  Tom Tromey  <tom@tromey.com>
8614
8615         * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
8616         Use gdb::byte_vector.
8617         * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
8618
8619 2018-03-12  Yao Qi  <yao.qi@linaro.org>
8620
8621         * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
8622         parameter type to readable_regcache.
8623         * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
8624         the declaration.
8625
8626 2018-03-11  Tom Tromey  <tom@tromey.com>
8627
8628         * dwarf2read.c (struct nextfield): Add initializers.
8629         (struct nextfnfield): Remove.
8630         (struct fnfieldlist): Add initializers.  Remove "length" and
8631         "head", use std::vector.
8632         (struct decl_field_list): Remove.
8633         (struct field_info): Add initializers.
8634         <fields, baseclasses>: Now std::vector.
8635         <nbaseclasses, nfnfields, typedef_field_list_count,
8636         nested_types_list_count>: Remove.
8637         (dwarf2_add_field, dwarf2_add_type_defn)
8638         (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
8639         (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
8640         (process_structure_scope): Update.
8641
8642 2018-03-11  Tom Tromey  <tom@tromey.com>
8643
8644         * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
8645         for use by std::sort.
8646         (build_type_psymtabs_1): Use std::vector.
8647
8648 2018-03-09  Eli Zaretskii  <eliz@gnu.org>
8649
8650         * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
8651         and LIBMPFR in the printed configuration.
8652
8653 2018-03-08  Tom Tromey  <tom@tromey.com>
8654
8655         * source.c (get_filename_and_charpos): Use scoped_fd.
8656         * nto-procfs.c (procfs_open_1): Use scoped_fd.
8657         (procfs_pidlist): Likewise.
8658         * procfs.c (proc_get_LDT_entry): Use scoped_fd.
8659         (iterate_over_mappings): Likewise.
8660
8661 2018-03-08  Tom Tromey  <tom@tromey.com>
8662
8663         * infcall.c (struct call_return_meta_info)
8664         <stack_temporaries_enabled>: Remove.
8665         (get_call_return_value, call_function_by_hand_dummy): Update.
8666         * thread.c (disable_thread_stack_temporaries): Remove.
8667         (enable_thread_stack_temporaries): Remove.
8668         (thread_stack_temporaries_enabled_p): Return bool.
8669         (push_thread_stack_temporary, value_in_thread_stack_temporaries)
8670         (get_last_thread_stack_temporary): Update.
8671         * eval.c (evaluate_subexp): Update.
8672         * gdbthread.h (class enable_thread_stack_temporaries): Now a
8673         class, not a function.
8674         (value_ptr, value_vec): Remove typedefs.
8675         (class thread_info) <stack_temporaries_enabled>: Now bool.
8676         <stack_temporaries>: Now a std::vector.
8677         (thread_stack_temporaries_enabled_p)
8678         (value_in_thread_stack_temporaries): Return bool.
8679
8680 2018-03-08  Simon Marchi  <simon.marchi@ericsson.com>
8681
8682         * remote.c (putpkt_binary): Fix omitted bytes reporting.
8683         (getpkt_or_notif_sane_1): Likewise.
8684
8685 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
8686
8687         * build-id.c (build_id_to_debug_bfd): Use std::string.
8688
8689 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
8690
8691         * build-id.c (find_separate_debug_file_by_buildid): Return
8692         std::string.
8693         * build-id.h (find_separate_debug_file_by_buildid): Return
8694         std::string.
8695         * coffread.c (coff_symfile_read): Adjust to std::string.
8696         * elfread.c (elf_symfile_read): Adjust to std::string.
8697         * symfile.c (separate_debug_file_exists): Change parameter to
8698         std::string.
8699         (find_separate_debug_file): Return std::string.
8700         (find_separate_debug_file_by_debuglink): Return std::string.
8701         * symfile.h (find_separate_debug_file_by_debuglink): Return
8702         std::string.
8703
8704 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
8705
8706         * common/xml-utils.c (xml_escape_text): Move code to...
8707         (xml_escape_text_append): ... this new function.
8708         * common/xml-utils.h (xml_escape_text_append): New declaration.
8709         * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
8710         New function.
8711         (_initialize_xml_utils): register test_xml_escape_text_append as
8712         a selftest.
8713
8714 2018-03-07  Alan Hayward  <alan.hayward@arm.com>
8715
8716         * defs.h: Remove MAX_REGISTER_SIZE.
8717         * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
8718         asserts.
8719         * python/py-unwind.c (pyuw_sniffer): Likewise.
8720
8721 2018-03-07  Tom Tromey  <tom@tromey.com>
8722
8723         * linux-tdep.c (linux_info_proc): Update.
8724         * target.h (struct target_ops) <to_fileio_readlink>: Return
8725         optional<string>.
8726         (target_fileio_readlink): Return optional<string>.
8727         * remote.c (remote_hostio_readlink): Return optional<string>.
8728         * inf-child.c (inf_child_fileio_readlink): Return
8729         optional<string>.
8730         * target.c (target_fileio_readlink): Return optional<string>.
8731
8732 2018-03-07  Andrew Burgess  <andrew.burgess@embecosm.com>
8733
8734         * regcache.c (cooked_read_test): Add riscv to the list of
8735         architectures that have a save_reggroup.
8736
8737 2018-03-07  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8738
8739         * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
8740         value is not a dynamic class object.
8741
8742 2018-03-06  Tom Tromey  <tom@tromey.com>
8743
8744         * rust-exp.y: Formatting fixes.
8745
8746 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
8747
8748         * riscv-tdep.c (riscv_register_name): Remove target description
8749         support.
8750         (riscv_gdbarch_init): Remove target description check.
8751
8752 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
8753
8754         * riscv-tdep.c: Remove 'Contributed by ...' lines from header
8755         comment.
8756         * riscv-tdep.h: Likewise.
8757
8758 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
8759
8760         * riscv-tdep.c (riscv_pseudo_register_read): Delete.
8761         (riscv_pseudo_register_write): Delete.
8762         (riscv_gdbarch_init): Remove all use of pseudo registers.
8763
8764 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
8765
8766         * record-btrace.c (btrace_print_lines): Replace cleanup
8767         parameter with RAII equivalents.
8768         (btrace_insn_history): Replace cleanup with RAII equivalents.
8769         * ui-out.h (make_cleanup_ui_out_list_begin_end,
8770         make_cleanup_ui_out_tuple_begin_end): Remove.
8771         * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
8772         make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
8773         make_cleanup_ui_out_list_begin_end): Remove.
8774
8775 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
8776
8777         * record-btrace.c (record_btrace_maybe_mark_async_event): Change
8778         parameter types to std::vector.  Use bool.
8779         (record_btrace_wait): Replace VEC(tp_t) with
8780         std::vector<thread_info *>.
8781         * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
8782
8783 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
8784
8785         * record-btrace.c (record_btrace_disable_callback): Remove.
8786         (struct scoped_btrace_disable): New.
8787         (record_btrace_open): Use scoped_btrace_disable.
8788
8789 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
8790
8791         * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
8792         reading values from registers.
8793
8794 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
8795
8796         * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
8797         where appropriate.
8798
8799 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
8800
8801         * riscv-tdep.c (riscv_print_arg_location): Add header comment,
8802         change parameter type.  Use GDB's print functions, and use
8803         core_addr_to_string where appropriate.
8804         (riscv_push_dummy_call): Use core_addr_to_string where
8805         appropriate, update call to riscv_print_arg_location, and reindent
8806         a few lines.
8807         (riscv_return_value): Update call to riscv_print_arg_location.
8808
8809 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
8810             Tim Newsome <tim@sifive.com>
8811             Albert Ou <a0u@eecs.berkeley.edu>
8812             Darius Rad <darius@bluespec.com>
8813
8814         * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
8815         (HFILES_NO_SRCDIR): Add riscv-tdep.h.
8816         (ALLDEPFILES): Add riscv-tdep.c
8817         * configure.tgt: Add riscv support.
8818         * riscv-tdep.c: New file.
8819         * riscv-tdep.h: New file.
8820         * NEWS: Mention new target.
8821         * MAINTAINERS: Add entry for riscv.
8822
8823 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
8824
8825         * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
8826         fields within aggregates.
8827
8828 2018-03-04  Simon Marchi  <simon.marchi@polymtl.ca>
8829
8830         * record-btrace.c (btrace_print_lines): Change type of flags to
8831         gdb_disassembly_flags.
8832
8833 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
8834
8835         * fbsd-nat.c: Include "inf-ptrace.h".
8836         (USE_SIGTRAP_SIGINFO): Conditionally define.
8837         [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
8838         (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
8839         [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
8840         function.
8841         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
8842         Likewise.
8843         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
8844         Likewise.
8845         (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
8846         "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
8847         "supports_stopped_by_hw_breakpoint" target methods.
8848
8849 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
8850
8851         * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
8852         * fbsd-nat.c (debug_fbsd_nat): New variable.
8853         (show_fbsd_nat_debug): New function.
8854         (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
8855         (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
8856
8857 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
8858
8859         * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
8860         * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
8861         prototype.
8862         * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
8863         (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
8864         method.
8865
8866 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
8867
8868         * common/gdb_vecs.c (free_char_ptr_vec): Remove.
8869         * common/gdb_vecs.h (free_char_ptr_vec): Remove.
8870
8871 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
8872
8873         * charset.c (struct charset_vector): New.
8874         (charsets): Change type to charset_vector.
8875         (find_charset_names): Adjust.
8876         (add_one): Adjust.
8877         (_initialize_charset): Adjust.
8878
8879 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
8880
8881         * progspace.h (struct program_space) <deleted_solibs>: Change
8882         type to std::vector<std::string>.
8883         * progspace.c (clear_program_space_solib_cache): Adjust.
8884         * breakpoint.c (print_solib_event): Adjust.
8885         (check_status_catch_solib): Adjust.
8886         * solib.c (update_solib_list): Adjust.
8887         * ui-out.h (class ui_out) <field_string>: New overload.
8888         * ui-out.c (ui_out::field_string): New overload.
8889
8890 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
8891
8892         * progspace.h (struct program_space): Add constructor and
8893         destructor, initialize fields.
8894         (add_program_space): Remove.
8895         * progspace.c (add_program_space): Rename to...
8896         (program_space::program_space): ... this.
8897         (release_program_space): Rename to...
8898         (program_space::~program_space): ... this.
8899         (delete_program_space): Use delete to delete program_space.
8900         (initialize_progspace): Use new to allocate program_space.
8901         * inferior.c (add_inferior_with_spaces): Likewise.
8902         (clone_inferior_command): Likewise.
8903         * infrun.c (follow_fork_inferior): Likewise.
8904         (handle_vfork_child_exec_or_exit): Likewise.
8905
8906 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
8907
8908         * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
8909         (delim_string_to_char_ptr_vec): Return std::vector of
8910         gdb::unique_xmalloc_ptr.
8911         (dirnames_to_char_ptr_vec_append): Take std::vector of
8912         gdb::unique_xmalloc_ptr.
8913         (dirnames_to_char_ptr_vec): Return std::vector of
8914         gdb::unique_xmalloc_ptr.
8915         * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
8916         Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
8917         (delim_string_to_char_ptr_vec): Return an std::vector of
8918         gdb::unique_xmalloc_ptr, adjust the code.
8919         (dirnames_to_char_ptr_vec_append): Take an std::vector of
8920         gdb::unique_xmalloc_ptr, adjust the code.
8921         (dirnames_to_char_ptr_vec): Return an std::vector of
8922         gdb::unique_xmalloc_ptr, adjust the code.
8923         * auto-load.c (auto_load_safe_path_vec): Change type to
8924         std::vector of gdb::unique_xmalloc_ptr.
8925         (auto_load_expand_dir_vars): Return an std::vector of
8926         gdb::unique_xmalloc_ptr, adjust the code.
8927         (auto_load_safe_path_vec_update): Adjust.
8928         (filename_is_in_auto_load_safe_path_vec): Adjust.
8929         (auto_load_objfile_script_1): Adjust.
8930         * build-id.c (build_id_to_debug_bfd): Adjust.
8931         * linux-thread-db.c (thread_db_load_search): Adjust.
8932         * source.c (add_path): Adjust.
8933         (openp): Adjust.
8934         * symfile.c (find_separate_debug_file): Adjust.
8935         * utils.c (do_free_char_ptr_vec): Remove.
8936         (make_cleanup_free_char_ptr_vec): Remove.
8937
8938 2018-03-01  Sergio Durigan Junior  <sergiodj@redhat.com>
8939
8940         PR gdb/22907
8941         * common/pathstuff.c: Conditionally include "<windows.h>".
8942
8943 2018-03-01  Georg Sauthoff  <mail@georg.so>
8944
8945         PR gdb/22888
8946         * gcore.in: Quote variables and switch interpreter to bash.
8947
8948 2018-03-01  Tom Tromey  <tom@tromey.com>
8949
8950         * dwarf2read.c (alloc_discriminant_info): Fix default_index
8951         assertion.  Add assertion for discriminant_index.
8952         (quirk_rust_enum): Use correct base type name in univariant case.
8953
8954 2018-03-01  Simon Marchi  <simon.marchi@ericsson.com>
8955
8956         * record.c (get_call_history_modifiers): Return a
8957         record_print_flags.
8958         (cmd_record_call_history): Adjust.
8959         * record-btrace.c (record_btrace_call_history): Adjust.
8960         (record_btrace_call_history_range): Adjust.
8961         (record_btrace_call_history_from): Adjust.
8962         * target-debug.h (target_debug_print_record_print_flags): New.
8963         * target-delegates.c: Re-generate.
8964         * target.c (target_call_history): Change flags type.
8965         (target_call_history_from): Likewise.
8966         (target_call_history_range): Likewise.
8967         * target.h (struct target_ops) <target_call_history>: Likewise.
8968         (target_call_history_from): Likewise.
8969         (target_call_history_range): Likewise.
8970
8971 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
8972             Simon Marchi  <simon.marchi@polymtl.ca>
8973
8974         * common/common-utils.c: Include "sys/stat.h".
8975         (is_regular_file): Move here from "source.c"; change return
8976         type to "bool".
8977         * common/common-utils.h (is_regular_file): New prototype.
8978         * common/pathstuff.c (contains_dir_separator): New function.
8979         * common/pathstuff.h (contains_dir_separator): New prototype.
8980         * source.c: Don't include "sys/stat.h".
8981         (is_regular_file): Move to "common/common-utils.c".
8982
8983 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
8984
8985         * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
8986         (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
8987         * auto-load.c: Include "common/pathstuff.h".
8988         * common/common-def.h (current_directory): Move here.
8989         * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
8990         function.
8991         * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
8992         prototype.
8993         * common/pathstuff.c: New file.
8994         * common/pathstuff.h: New file.
8995         * compile/compile.c: Include "common/pathstuff.h".
8996         * defs.h (current_directory): Move to "common/common-defs.h".
8997         * dwarf2read.c: Include "common/pathstuff.h".
8998         * exec.c: Likewise.
8999         * guile/scm-safe-call.c: Likewise.
9000         * linux-thread-db.c: Likewise.
9001         * main.c: Likewise.
9002         * nto-tdep.c: Likewise.
9003         * objfiles.c: Likewise.
9004         * source.c: Likewise.
9005         * symtab.c: Likewise.
9006         * utils.c: Include "common/pathstuff.h".
9007         (gdb_realpath): Move to "common/pathstuff.c".
9008         (gdb_realpath_keepfile): Likewise.
9009         (gdb_abspath): Likewise.
9010         * utils.h (gdb_realpath): Move to "common/pathstuff.h".
9011         (gdb_realpath_keepfile): Likewise.
9012         (gdb_abspath): Likewise.
9013
9014 2018-02-28  John Baldwin  <jhb@FreeBSD.org>
9015
9016         * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
9017         wildcard process pid for super_resume for kernels with a
9018         specific bug.
9019
9020 2018-02-27  Phil Muldoon  <pmuldoon@redhat.com>
9021
9022         * compile/compile.c (get_args): Add additional comments
9023         explaining function.
9024
9025 2018-02-27  Simon Marchi  <simon.marchi@polymtl.ca>
9026             Tom Tromey  <tom@tromey.com>
9027
9028         * target.h (memory_write_request_s): Remove typedef.  Don't define
9029         VEC.
9030         (target_write_memory_blocks): Change argument to std::vector.
9031         (struct memory_write_request): Add constructor.
9032         * target-memory.c (compare_block_starting_address): Return bool.
9033         Change argument types.
9034         (claim_memory): Change arguments to use std::vector.
9035         (split_regular_and_flash_blocks, blocks_to_erase)
9036         (compute_garbled_blocks): Likewise.
9037         (cleanup_request_data, cleanup_write_requests_vector): Remove.
9038         (target_write_memory_blocks): Change argument to std::vector.
9039         * symfile.c (struct load_section_data): Add constructor and
9040         destructor.  Use std::vector for "requests".
9041         (struct load_progress_data): Add initializers.
9042         (load_section_callback): Update.  Use "new".
9043         (clear_memory_write_data): Remove.
9044         (generic_load): Update.
9045
9046 2018-02-27  Alan Hayward  <alan.hayward@arm.com>
9047
9048         * arch/aarch64.h: Use common/tdesc.h.
9049
9050 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
9051
9052         * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
9053         architecture with a 64-bit ABI.
9054
9055 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
9056
9057         * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
9058         ahead of target description loading.
9059
9060 2018-02-26  Tom Tromey  <tom@tromey.com>
9061
9062         * stack.c (backtrace_command_1): Update.
9063         * python/python-internal.h (gdbpy_apply_frame_filter): Change type
9064         of "flags".
9065         * python/py-framefilter.c (py_print_frame)
9066         (gdbpy_apply_frame_filter): Change type of "flags".
9067         * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
9068         of "flags".
9069         (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
9070         (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
9071         * extension.h (enum frame_filter_flag): Rename from
9072         frame_filter_flags.
9073         (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
9074         (apply_ext_lang_frame_filter): Change type of "flags".
9075         * extension.c (apply_ext_lang_frame_filter): Change type of
9076         "flags".
9077         * extension-priv.h (struct extension_language_ops)
9078         <apply_frame_filter>: Change type of "flags".
9079
9080 2018-02-26  Tom Tromey  <tom@tromey.com>
9081
9082         PR python/16497:
9083         * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag.  Fix
9084         off-by-one in py_end computation.
9085         * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
9086         PRINT_MORE_FRAMES.
9087         * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
9088         constant.
9089
9090 2018-02-26  Tom Tromey  <tom@tromey.com>
9091
9092         * dwarf2read.c (struct variant_field): New.
9093         (struct nextfield) <variant>: New field.
9094         (dwarf2_add_field): Handle DW_TAG_variant_part.
9095         (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
9096         discriminated union.
9097         (read_structure_type): Handle DW_TAG_variant_part.
9098         (handle_struct_member_die): New function, extracted from
9099         process_structure_scope.  Handle DW_TAG_variant.
9100         (process_structure_scope): Handle discriminated unions.  Call
9101         handle_struct_member_die.
9102
9103 2018-02-26  Tom Tromey  <tom@tromey.com>
9104
9105         * rust-lang.h (rust_last_path_segment): Declare.
9106         * rust-lang.c (rust_last_path_segment): Now public.  Change
9107         contract.
9108         (struct disr_info): Remove.
9109         (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
9110         (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
9111         (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
9112         (rust_enum_p, rust_enum_variant): New function.
9113         (rust_underscore_fields): Remove "offset" parameter.
9114         (rust_print_enum): New function.
9115         (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
9116         <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
9117         (rust_print_struct_def): Add "for_rust_enum" parameter.  Handle
9118         enums.
9119         (rust_internal_print_type): New function, from rust_print_type.
9120         Remove enum code.
9121         (rust_print_type): Call rust_internal_print_type.
9122         (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
9123         Update enum handling.
9124         * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
9125         (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
9126         (rust_union_quirks): New functions.
9127         (process_full_comp_unit, process_full_type_unit): Call
9128         rust_union_quirks.
9129         (process_structure_scope): Update rust_unions if necessary.
9130
9131 2018-02-26  Tom Tromey  <tom@tromey.com>
9132
9133         * value.h (value_union_variant): Declare.
9134         * valops.c (value_union_variant): New function.
9135         * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
9136         (struct discriminant_info): New.
9137         (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
9138         enumerator.
9139         (struct main_type) <flag_discriminated_union>: New field.
9140
9141 2018-02-26  Tom Tromey  <tom@tromey.com>
9142
9143         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9144         unittests/unpack-selftests.c.
9145         * unittests/unpack-selftests.c: New file.
9146         * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
9147
9148 2018-02-26  Yao Qi  <yao.qi@linaro.org>
9149
9150         * dwarf2read.c (struct partial_die_info) <read>: New method.
9151         (read_partial_die): Remove the declaration.
9152         (load_partial_dies): Update.
9153         (partial_die_info::partial_die_info):
9154         (read_partial_die): Change it to partial_die_info::read.
9155
9156 2018-02-26  Yao Qi  <yao.qi@linaro.org>
9157
9158         * dwarf2read.c (struct partial_die_info) <fixup>: New method.
9159         (fixup_partial_die): Remove declaration.
9160         (scan_partial_symbols): Update.
9161         (partial_die_parent_scope): Likewise.
9162         (partial_die_full_name): Likewise.
9163         (fixup_partial_die): Change it to partial_die_info::fixup.
9164
9165 2018-02-26  Yao Qi  <yao.qi@linaro.org>
9166
9167         * dwarf2read.c (read_partial_die): Update the declaration.
9168         (load_partial_dies): Caller update.
9169         (read_partial_die): Remove one argument abbrev_len.
9170
9171 2018-02-26  Yao Qi  <yao.qi@linaro.org>
9172
9173         * dwarf2read.c (struct partial_die_info): Add ctor, delete
9174         assignment operator.
9175         (load_partial_dies): Use ctor and copy ctor.
9176         (read_partial_die): Update.
9177         (dwarf2_cu::find_partial_die): Use ctor.
9178
9179 2018-02-26  Yao Qi  <yao.qi@linaro.org>
9180
9181         * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
9182         (find_partial_die_in_comp_unit): Change it to
9183         dwarf2_cu::find_partial_die.
9184         (find_partial_die): Update.
9185
9186 2018-02-26  Yao Qi  <yao.qi@linaro.org>
9187
9188         * dwarf2read.c (read_partial_die): Remove the code checking abbrev
9189         is NULL.
9190
9191 2018-02-26  Yao Qi  <yao.qi@linaro.org>
9192
9193         * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
9194
9195 2018-02-26  Alan Hayward  <alan.hayward@arm.com>
9196
9197         * arch/amd64.h: Use common/tdesc.h.
9198         * arch/i386.c: Likewise.
9199         * arch/i386.h: Likewise.
9200         * arch/tic6x.c: Likewise.
9201         * arch/tdesc.h: Move file from here...
9202         * common/tdesc.h: ...to here.
9203         * features/aarch64-core.c: Regenerate.
9204         * features/aarch64-fpu.c: Regenerate.
9205         * features/i386/32bit-avx.c: Regenerate.
9206         * features/i386/32bit-avx512.c: Regenerate.
9207         * features/i386/32bit-core.c: Regenerate.
9208         * features/i386/32bit-linux.c: Regenerate.
9209         * features/i386/32bit-mpx.c: Regenerate.
9210         * features/i386/32bit-pkeys.c: Regenerate.
9211         * features/i386/32bit-sse.c: Regenerate.
9212         * features/i386/64bit-avx.c: Regenerate.
9213         * features/i386/64bit-avx512.c: Regenerate.
9214         * features/i386/64bit-core.c: Regenerate.
9215         * features/i386/64bit-linux.c: Regenerate.
9216         * features/i386/64bit-mpx.c: Regenerate.
9217         * features/i386/64bit-pkeys.c: Regenerate.
9218         * features/i386/64bit-segments.c: Regenerate.
9219         * features/i386/64bit-sse.c: Regenerate.
9220         * features/i386/x32-core.c: Regenerate.
9221         * features/tic6x-c6xp.c: Regenerate.
9222         * features/tic6x-core.c: Regenerate.
9223         * features/tic6x-gp.c: Regenerate.
9224         * target-descriptions.c: Use common/tdesc.h.
9225         * target-descriptions.h: Likewise.
9226
9227 2018-02-24  Tom Tromey  <tom@tromey.com>
9228
9229         * linux-thread-db.c (try_thread_db_load_from_pdir_1)
9230         (try_thread_db_load_from_dir, thread_db_load_search): Use
9231         std::string.
9232         (info_auto_load_libthread_db_compare): Return bool.  Change
9233         argument types.
9234         (info_auto_load_libthread_db): Use std::vector, std::string.
9235         Remove cleanups.
9236
9237 2018-02-24  Tom Tromey  <tom@tromey.com>
9238
9239         * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
9240         std::string.
9241         * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
9242         std::string*.
9243         * gdbarch.c: Rebuild.
9244         * gdbarch.h: Rebuild.
9245         * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
9246         * arch-utils.h (default_fast_tracepoint_valid_at): Update.
9247         * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
9248         std::string*.
9249
9250 2018-02-23  Simon Marchi  <simon.marchi@polymtl.ca>
9251
9252         * gdbtypes.h (sect_offset): Change type to uint64_t.
9253         (sect_offset_str): New function.
9254         * dwarf2read.c (create_addrmap_from_aranges): Use
9255         sect_offset_str.
9256         (error_check_comp_unit_head): Likewise.
9257         (create_debug_type_hash_table): Likewise.
9258         (read_cutu_die_from_dwo): Likewise.
9259         (init_cutu_and_read_dies): Likewise.
9260         (init_cutu_and_read_dies_no_follow): Likewise.
9261         (process_psymtab_comp_unit_reader): Likewise.
9262         (partial_die_parent_scope): Likewise.
9263         (peek_die_abbrev): Likewise.
9264         (process_queue): Likewise.
9265         (dwarf2_physname): Likewise.
9266         (read_namespace_alias): Likewise.
9267         (read_import_statement): Likewise.
9268         (create_dwo_cu_reader): Likewise.
9269         (create_cus_hash_table): Likewise.
9270         (lookup_dwo_cutu): Likewise.
9271         (inherit_abstract_dies): Likewise.
9272         (read_func_scope): Likewise.
9273         (read_call_site_scope): Likewise.
9274         (dwarf2_add_member_fn): Likewise.
9275         (read_common_block): Likewise.
9276         (read_module_type): Likewise.
9277         (read_typedef): Likewise.
9278         (read_subrange_type): Likewise.
9279         (load_partial_dies): Likewise.
9280         (read_partial_die): Likewise.
9281         (find_partial_die): Likewise.
9282         (read_str_index): Likewise.
9283         (dwarf2_string_attr): Likewise.
9284         (build_error_marker_type): Likewise.
9285         (lookup_die_type): Likewise.
9286         (dump_die_shallow): Likewise.
9287         (follow_die_ref): Likewise.
9288         (dwarf2_fetch_die_loc_sect_off): Likewise.
9289         (dwarf2_fetch_constant_bytes): Likewise.
9290         (follow_die_sig): Likewise.
9291         (get_signatured_type): Likewise.
9292         (get_DW_AT_signature_type): Likewise.
9293         (dwarf2_find_containing_comp_unit): Likewise.
9294         (set_die_type): Likewise.
9295
9296 2018-02-21  John Baldwin  <jhb@FreeBSD.org>
9297
9298         * arch/aarch64.c: Include "common-defs.h".
9299         * arch/amd64.c: Likewise.
9300         * arch/i386.c: Likewise.
9301
9302 2018-02-21  Tom Tromey  <tom@tromey.com>
9303
9304         * value.h: (extract_field_op): Update.
9305         * eval.c (extract_field_op): Return a const char *.
9306         * expression.h (parse_expression_for_completion): Update.
9307         * completer.c (complete_expression): Update.
9308         (add_struct_fields): Make fieldname const.
9309         * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
9310         (mark_completion_tag, parse_exp_in_context_1): Update.
9311         (parse_expression_for_completion): Change "name" to
9312         unique_xmalloc_ptr*.
9313
9314 2018-02-21  Tom Tromey  <tom@tromey.com>
9315
9316         * infcall.c (call_function_by_hand_dummy): Use std::vector.
9317
9318 2018-02-21  Yao Qi  <yao.qi@linaro.org>
9319
9320         * avr-tdep.c (avr_read_pc): Change parameter type to
9321         readable_regcache.
9322         * gdbarch.sh (read_pc): Likewise.
9323         * gdbarch.c: Re-generated.
9324         * gdbarch.h: Re-generated.
9325         * hppa-tdep.c (hppa_read_pc): Change parameter type to
9326         readable_regcache.
9327         * ia64-tdep.c (ia64_read_pc): Likewise.
9328         * mips-tdep.c (mips_read_pc): Likewise.
9329         * spu-tdep.c (spu_read_pc): Likewise.
9330
9331 2018-02-21  Yao Qi  <yao.qi@linaro.org>
9332
9333         * Makefile.in (COMMON_SFILES): Add regcache-dump.c
9334         * regcache-dump.c: New file.
9335         * regcache.c: Move register_dump to regcache-dump.c.
9336         (maintenance_print_registers): Likewise.
9337         (maintenance_print_raw_registers): Likewise.
9338         (maintenance_print_cooked_registers): Likewise.
9339         (maintenance_print_register_groups): Likewise.
9340         (maintenance_print_remote_registers): Likewise.
9341         (_initialize_regcache): Likewise.
9342         * regcache.h (register_dump): Moved from regcache.c.
9343
9344 2018-02-21  Yao Qi  <yao.qi@linaro.org>
9345
9346         * regcache.c (regcache::regcache): Update.
9347         (regcache::invalidate): Move it to detached_regcache::invalidate.
9348         (get_thread_arch_aspace_regcache): Update.
9349         (regcache::raw_update): Update.
9350         (regcache::cooked_read): Remove some code.
9351         (regcache::cooked_read_value): Likewise.
9352         (regcache::raw_write): Remove assert on m_readonly_p.
9353         (regcache::raw_supply_integer): Move it to
9354         detached_regcache::raw_supply_integer.
9355         (regcache::raw_supply_zeroed): Likewise.
9356         * regcache.h (detached_regcache) <raw_supply_integer>: New
9357         declaration.
9358         <raw_supply_zeroed, invalidate>: Likewise.
9359         (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
9360         <invalidate>: Likewise.
9361         <m_readonly_p>: Removed.
9362
9363 2018-02-21  Yao Qi  <yao.qi@linaro.org>
9364
9365         * infcmd.c (get_return_value): Let stop_regs point to
9366         get_current_regcache.
9367         * regcache.c (regcache::regcache): Remove.
9368         (register_dump_reg_buffer): New class.
9369         (regcache_print): Adjust.
9370         * regcache.h (regcache): Remove constructors.
9371
9372 2018-02-21  Yao Qi  <yao.qi@linaro.org>
9373
9374         * regcache.c (class register_dump): New class.
9375         (register_dump_regcache, register_dump_none): New class.
9376         (register_dump_remote, register_dump_groups): New class.
9377         (regcache_print): Update.
9378         * regcache.h (regcache_dump_what): Move it to regcache.c.
9379         (regcache) <dump>: Remove.
9380
9381 2018-02-21  Yao Qi  <yao.qi@linaro.org>
9382
9383         * jit.c (struct jit_unwind_private) <regcache>: Change its type to
9384          reg_buffer_rw *.
9385         (jit_unwind_reg_set_impl): Call raw_supply.
9386         (jit_frame_sniffer): Use reg_buffer_rw.
9387         * record-full.c (record_full_core_regbuf): Change its type.
9388         (record_full_core_open_1): Use reg_buffer_rw.
9389         (record_full_close): Likewise.
9390         (record_full_core_fetch_registers): Use regcache->raw_supply.
9391         (record_full_core_store_registers): Likewise.
9392         * regcache.c (regcache::get_register_status): Move it to
9393         reg_buffer.
9394         (regcache_raw_set_cached_value): Remove.
9395         (regcache::raw_set_cached_value): Remove.
9396         (regcache::raw_write): Call raw_supply.
9397         (regcache::raw_supply): Move it to reg_buffer_rw.
9398         * regcache.h (regcache_raw_set_cached_value): Remove.
9399         (reg_buffer_rw): New class.
9400
9401 2018-02-21  Yao Qi  <yao.qi@linaro.org>
9402
9403         * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
9404         readonly_detached_regcache.
9405         (dummy_frame_prev_register): Use regcache->cooked_read.
9406         * frame.c (frame_save_as_regcache): Change return type.
9407         (frame_pop): Update.
9408         * frame.h (frame_save_as_regcache): Update declaration.
9409         * inferior.h (get_infcall_suspend_state_regcache): Update
9410         declaration.
9411         * infrun.c (infcall_suspend_state) <registers>: use
9412         readonly_detached_regcache.
9413         (save_infcall_suspend_state): Don't use regcache_dup.
9414         (get_infcall_suspend_state_regcache): Change return type.
9415         * linux-fork.c (struct fork_info) <savedregs>: Change to
9416         readonly_detached_regcache.
9417         <pc>: New field.
9418         (fork_save_infrun_state): Don't use regcache_dup.
9419         (info_checkpoints_command): Adjust.
9420         * mi/mi-main.c (register_changed_p): Update declaration.
9421         (mi_cmd_data_list_changed_registers): Use
9422         readonly_detached_regcache.
9423         (register_changed_p): Change parameter type to
9424         readonly_detached_regcache.
9425         * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
9426         readonly_detached_regcache.
9427         (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
9428         * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
9429         New.
9430         (regcache::save): Move it to reg_buffer.
9431         (regcache::restore): Change parameter type.
9432         (regcache_dup): Remove.
9433         * regcache.h (reg_buffer) <save>: New method.
9434         (readonly_detached_regcache): New class.
9435         * spu-tdep.c (spu2ppu_cache) <regcache>: Use
9436         readonly_detached_regcache.
9437         (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
9438
9439 2018-02-21  Yao Qi  <yao.qi@linaro.org>
9440
9441         * frame.c (frame_save_as_regcache): Use regcache method save.
9442         (frame_pop): Use regcache method restore.
9443         * infrun.c (restore_infcall_suspend_state): Likewise.
9444         * linux-fork.c (fork_load_infrun_state): Likewise.
9445         * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
9446         save.
9447         * regcache.c (regcache_save): Remove.
9448         (regcache::restore): More asserts.
9449         (regcache_cpy): Remove.
9450         * regcache.h (regcache_save): Remove the declaration.
9451         (regcache::restore): Move from private to public.
9452         Remove the friend declaration of regcache_cpy.
9453         (regcache_cpy): Remove declaration.
9454
9455 2018-02-21  Yao Qi  <yao.qi@linaro.org>
9456
9457         * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
9458         parameter type to 'readable_regcache *'.
9459         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
9460         * arm-tdep.c (arm_neon_quad_read): Likewise.
9461         (arm_pseudo_read): Likewise.
9462         * avr-tdep.c (avr_pseudo_register_read): Likewise.
9463         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
9464         * frv-tdep.c (frv_pseudo_register_read): Likewise.
9465         * gdbarch.c: Re-generated.
9466         * gdbarch.h: Re-generated.
9467         * gdbarch.sh (pseudo_register_read): Change parameter type to
9468         'readable_regcache *'.
9469         (pseudo_register_read_value): Likewise.
9470         * h8300-tdep.c (pseudo_from_raw_register): Likewise.
9471         (h8300_pseudo_register_read): Likewise.
9472         * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
9473         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
9474         (i386_pseudo_register_read_into_value): Likewise.
9475         (i386_pseudo_register_read_value): Likewise.
9476         * i386-tdep.h (i386_pseudo_register_read_into_value): Update
9477         declaration.
9478         * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
9479         * m32c-tdep.c (m32c_raw_read): Likewise.
9480         (m32c_read_flg): Likewise.
9481         (m32c_banked_register): Likewise.
9482         (m32c_banked_read): Likewise.
9483         (m32c_sb_read): Likewise.
9484         (m32c_part_read): Likewise.
9485         (m32c_cat_read): Likewise.
9486         (m32c_r3r2r1r0_read): Likewise.
9487         (m32c_pseudo_register_read): Likewise.
9488         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
9489         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
9490         (mep_pseudo_cr64_read): Likewise.
9491         (mep_pseudo_register_read): Likewise.
9492         * mips-tdep.c (mips_pseudo_register_read): Likewise.
9493         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
9494         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
9495         * regcache.c (regcache::raw_read): Move it to readable_regcache.
9496         (regcache::cooked_read): Likewise.
9497         (regcache::cooked_read_value): Likewise.
9498         (regcache_cooked_read_signed):
9499         (regcache::cooked_read): Likewise.
9500         * regcache.h (readable_regcache): New class.
9501         (regcache): Inherit readable_regcache.  Move some methods to
9502         readable_regcache.
9503         * rl78-tdep.c (rl78_pseudo_register_read): Change
9504         parameter type to 'readable_regcache *'.
9505         * rs6000-tdep.c (do_regcache_raw_read): Remove.
9506         (e500_pseudo_register_read): Change parameter type to
9507         'readable_regcache *'.
9508         (dfp_pseudo_register_read): Likewise.
9509         (vsx_pseudo_register_read): Likewise.
9510         (efpr_pseudo_register_read): Likewise.
9511         * s390-tdep.c (s390_pseudo_register_read): Likewise.
9512         * sh-tdep.c (sh_pseudo_register_read): Likewise.
9513         * sh64-tdep.c (pseudo_register_read_portions): Likewise.
9514         (sh64_pseudo_register_read): Likewise.
9515         * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
9516         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
9517         * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
9518         (spu_pseudo_register_read): Likewise.
9519         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
9520         (xtensa_pseudo_register_read): Likewise.
9521
9522 2018-02-21  Yao Qi  <yao.qi@linaro.org>
9523
9524         * regcache.c (regcache::regcache): Call reg_buffer ctor.
9525         (regcache::arch): Move it to reg_buffer::arch.
9526         (regcache::register_buffer): Likewise.
9527         (regcache::assert_regnum): Likewise.
9528         (regcache::num_raw_registers): Likewise.
9529         * regcache.h (reg_buffer): New class.
9530         (regcache): Inherit reg_buffer.
9531
9532 2018-02-20  Simon Marchi  <simon.marchi@ericsson.com>
9533
9534         * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
9535         gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
9536
9537 2018-02-20  Markus Metzger  <markus.t.metzger@intel.com>
9538
9539         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
9540
9541 2018-02-19  Alan Hayward  <alan.hayward@arm.com>
9542
9543         * Makefile.in: (COMMON_SFILES): Add common/*.c files.
9544         (SFILES): Remove common/*.c files.
9545         (COMMON_OBS): Remove some *.o files built from common/*.c files.
9546         * common/common.host: Add common reference.
9547         * configure.ac: Likewise.
9548         * configure: Regenerate.
9549
9550 2018-02-16  Yao Qi  <yao.qi@linaro.org>
9551
9552         * block.c (block_namespace_info): Inherit allocate_on_obstack.
9553         (block_initialize_namespace): Use new.
9554         * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
9555         (dwarf2_free_objfile): Use delete.
9556         * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
9557         (copy_type_recursive): Use new.
9558         * gdb_obstack.h (allocate_on_obstack): New.
9559
9560 2018-02-15  Yao Qi  <yao.qi@linaro.org>
9561
9562         PR gdb/22849
9563         * inferior.c (exit_inferior_1): Reset inf->control.
9564
9565 2018-02-15  Joel Brobecker  <brobecker@adacore.com>
9566
9567         * ada-lang.c (ada_to_fixed_value_create): Delete advance
9568         declaration.
9569
9570 2018-02-14  Pedro Alves  <palves@redhat.com>
9571
9572         * frame-unwind.c (frame_unwind_try_unwinder): Always call
9573         frame_cleanup_after_sniffer on exception.
9574
9575 2018-02-14  Tom Tromey  <tom@tromey.com>
9576
9577         * solist.h (struct target_so_ops) <bfd_open>: Make pathname
9578         const.
9579         (solib_bfd_open): Make pathname const.
9580         * solib.c (solib_bfd_open): Make pathname const.
9581         * solib-spu.c (spu_bfd_fopen): Make name const.
9582         (spu_bfd_open): Make pathname const.
9583         * solib-darwin.c (darwin_bfd_open): Make pathname const.
9584         * solib-aix.c (solib_aix_bfd_open): Make pathname const.
9585
9586 2018-02-14  Tom Tromey  <tom@tromey.com>
9587
9588         * symfile.c (symfile_bfd_open): Update.
9589         * source.h (openp, source_full_path_of, find_and_open_source):
9590         Change argument type to unique_xmalloc_ptr.
9591         * source.c (openp): Take a unique_xmalloc_ptr.
9592         (source_full_path_of, find_and_open_source): Likewise.
9593         (open_source_file, symtab_to_fullname): Update.
9594         * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
9595         unique_xmalloc_ptr.
9596         * solib.c (solib_find_1): Use unique_xmalloc_ptr.
9597         (exec_file_find): Update.
9598         * psymtab.c (psymtab_to_fullname): Update.
9599         * nto-tdep.h (nto_find_and_open_solib): Update.
9600         * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
9601         unique_xmalloc_ptr.
9602         * exec.c (exec_file_attach): Update.
9603         * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
9604         * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
9605
9606 2018-02-14  Tom Tromey  <tom@tromey.com>
9607
9608         * solib.c: Include source.h.
9609         * nto-tdep.c: Include source.h.
9610         * mi/mi-cmd-env.c: Include source.h.
9611         * infcmd.c: Include source.h.
9612         * exec.c: Include source.h.
9613         * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
9614         (add_path, directory_switch, source_path, init_source_path): Move
9615         declarations...
9616         * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
9617         (add_path, directory_switch, source_path, init_source_path):
9618         ...here.
9619
9620 2018-02-14  Tom Tromey  <tom@tromey.com>
9621
9622         * solist.h (exec_file_find, solib_find): Return
9623         unique_xmalloc_ptr.
9624         (solib_bfd_fopen): Take a const char *.
9625         * solib.c (solib_find_1): Return unique_xmalloc_ptr.
9626         (exec_file_find, solib_find): Likewise.
9627         (solib_bfd_fopen): Do not take ownership of "pathname".
9628         (solib_bfd_open): Use unique_xmalloc_ptr.
9629         * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
9630         * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
9631         * infrun.c (follow_exec): Use unique_xmalloc_ptr.
9632         * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
9633
9634 2018-02-14  Joel Brobecker  <brobecker@adacore.com>
9635
9636         * ada-lang.c (name_match_type_from_name): Remove reference to
9637         ada_name_for_lookup in function's documentation.
9638         * ada-lang.h (ada_name_for_lookup): Delete declaration.
9639
9640 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
9641
9642         * defs.h (enum openp_flags): New enum.
9643         (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
9644         Move to enum openp_flags.
9645         (openp_flags): New enum flags.
9646         (openp): Change parameter type to openp_flags.
9647         * source.c (openp): Change parameter type to openp_flags.
9648         * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
9649         * dwarf2read.c (try_open_dwop_file): Use openp_flags.
9650
9651 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
9652
9653         * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
9654         per-command.
9655
9656 2018-02-12  Andrew Burgess  <andrew.burgess@embecosm.com>
9657
9658         * dwarf2read.c (dwarf2_release_queue): Delete function, move body
9659         into...
9660         (class dwarf2_queue_guard): ...the destructor of this new class.
9661         (dw2_do_instantiate_symtab): Create instance of the new class
9662         dwarf2_queue_guard, remove cleanup.
9663
9664 2018-02-09  Tom Tromey  <tom@tromey.com>
9665
9666         * source.c (find_source_lines): Don't reference past the end of
9667         the vector.
9668
9669 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
9670
9671         * remote.c (remote_btrace_maybe_reopen): Change error message.
9672         * btrace.c (btrace_enable): Likewise.
9673         (parse_xml_btrace): Likewise.
9674         (parse_xml_btrace_conf): Likewise.
9675
9676 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
9677
9678         * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
9679         (linux_enable_pt, linux_enable_bts): Call
9680         diagnose_perf_event_open_fail.
9681
9682 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
9683
9684         * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
9685         Remove parameter and change return type.  Update callers.  Move it.
9686         (linux_enable_bts, linux_enable_pt): Improve error message.
9687         (linux_enable_pt): Remove zero buffer size check.
9688         (linux_enable_btrace): Improve error messages.  Remove NULL return
9689         check.
9690
9691 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
9692
9693         * btrace.c (btrace_enable): Remove target_supports_btrace call.
9694         * nat/linux-btrace.c (perf_event_pt_event_type): Move.
9695         (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
9696         (linux_supports_pt, linux_supports_btrace): Remove.
9697         (linux_enable_bts): Call cpu_supports_bts.
9698         * nat/linux-btrace.h (linux_supports_btrace): Remove.
9699         * remote.c (remote_supports_btrace): Remove.
9700         (init_remote_ops): Remove remote_supports_btrace.
9701         * target-delegates.c: Regenerated.
9702         * target.c (target_supports_btrace): Remove.
9703         * target.h (target_ops) <to_supports_btrace>: Remove
9704         (target_supports_btrace): Remove.
9705         * x86-linux-nat.c (x86_linux_create_target): Remove
9706         linux_supports_btrace.
9707
9708 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
9709
9710         * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
9711         btrace failed.
9712         * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
9713         exception and use message in own exception.
9714
9715 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
9716
9717         * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
9718         (perf_event_pt_event_type): Use gdb_file_up.
9719         (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
9720         scoped_fd, and scoped_mmap.
9721
9722 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
9723
9724         * common/scoped_mmap.h: New.
9725         * unittests/scoped_mmap-selftest.c: New.
9726         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9727         unittests/scoped_mmap-selftest.c.
9728
9729 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
9730
9731         * common/scoped_fd.h: New.
9732         * unittests/scoped_fd-selftest.c: New.
9733         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9734         unittests/scoped_fd-selftest.c.
9735
9736 2018-02-09  Tom Tromey  <tom@tromey.com>
9737
9738         * auto-load.c (auto_load_section_scripts): Use
9739         gdb::unique_xmalloc_ptr.
9740
9741 2018-02-09  Tom Tromey  <tom@tromey.com>
9742
9743         * auto-load.c (execute_script_contents): Use std::string.
9744
9745 2018-02-09  Joel Brobecker  <brobecker@adacore.com>
9746
9747         * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
9748         Python function, rather than a new command.
9749
9750 2018-02-08  Tom Tromey  <tom@tromey.com>
9751
9752         * solib.c (solib_find_1): Use std::string.
9753         (solib_bfd_fopen): Use unique_xmalloc_ptr.
9754
9755 2018-02-08  Tom Tromey  <tom@tromey.com>
9756
9757         * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
9758
9759 2018-02-08  Tom Tromey  <tom@tromey.com>
9760
9761         * source.c (find_source_lines): Use gdb::def_vector.
9762
9763 2018-02-08  Tom Tromey  <tom@tromey.com>
9764
9765         * macrocmd.c (struct temporary_macro_definition): New.
9766         (macro_define_command): Use temporary_macro_definition.  Remove
9767         cleanups.
9768         (free_macro_definition_ptr): Remove.
9769
9770 2018-02-08  Tom Tromey  <tom@tromey.com>
9771
9772         * macroexp.c (maybe_expand): Use std::string.
9773
9774 2018-02-08  Tom Tromey  <tom@tromey.com>
9775
9776         * macroexp.c (struct macro_buffer): Add initializers for some
9777         members.
9778         (init_buffer, init_shared_buffer, free_buffer)
9779         (free_buffer_return_text): Remove.
9780         (macro_buffer): New constructors.
9781         (~macro_buffer): New destructor.
9782         (macro_buffer::set_shared): New method.
9783         (macro_buffer::resize_buffer, macro_buffer::appendc)
9784         (macro_buffer::appendmem): Now methods, not free functions.
9785         (set_token, append_tokens_without_splicing, stringify)
9786         (macro_stringify): Update.
9787         (gather_arguments): Change return type.  Remove argc_p argument,
9788         add args_ptr argument.  Use std::vector.
9789         (substitute_args): Remove argc argument.  Accept std::vector.
9790         (expand): Update.  Use std::vector.
9791         (scan, macro_expand, macro_expand_next): Update.
9792
9793 2018-02-08  Tom Tromey  <tom@tromey.com>
9794
9795         * symtab.c (default_collect_symbol_completion_matches_break_on):
9796         Use unique_xmalloc_ptr.
9797         * macroscope.h: (sal_macro_scope, user_macro_scope)
9798         (default_macro_scope): Return unique_xmalloc_ptr.
9799         * macroscope.c (sal_macro_scope, user_macro_scope)
9800         (default_macro_scope): Return unique_xmalloc_ptr.
9801         * macroexp.h (macro_expand, macro_expand_once): Return
9802         unique_xmalloc_ptr.
9803         * macroexp.c (macro_expand, macro_expand_once): Return
9804         unique_xmalloc_ptr.
9805         * macrocmd.c (macro_expand_command, macro_expand_once_command)
9806         (info_macro_command, info_macros_command): Use
9807         unique_xmalloc_ptr.
9808         * compile/compile-c-support.c (write_macro_definitions): Use
9809         unique_xmalloc_ptr.
9810         * c-exp.y (c_parse): Use unique_xmalloc_ptr.
9811
9812 2018-02-07  Simon Marchi  <simon.marchi@ericsson.com>
9813
9814         * value.c (value_static_field): Assign field type instead of
9815         containing type when returning an optimized out value.
9816
9817 2018-02-06  Yao Qi  <yao.qi@linaro.org>
9818
9819         * ft32-tdep.c (ft32_read_pc): Remove.
9820         (ft32_write_pc): Remove.
9821         (ft32_gdbarch_init): Update.
9822         * m32r-tdep.c (m32r_read_pc): Remove.
9823         (m32r_gdbarch_init): Update.
9824         * mep-tdep.c (mep_read_pc): Remove.
9825         (mep_gdbarch_init): Update.
9826         * microblaze-tdep.c (microblaze_write_pc): Remove.
9827         (microblaze_gdbarch_init): Update.
9828         * mn10300-tdep.c (mn10300_read_pc): Remove.
9829         (mn10300_write_pc): Remove.
9830         (mn10300_gdbarch_init): Update.
9831         * moxie-tdep.c (moxie_read_pc): Remove.
9832         (moxie_write_pc): Remove.
9833         (moxie_gdbarch_init): Update.
9834
9835 2018-02-06  Yao Qi  <yao.qi@linaro.org>
9836
9837         * expprint.c (print_subexp_standard): Handle
9838         OP_F77_UNDETERMINED_ARGLIST.
9839         (dump_subexp_body_standard): Likewise.
9840
9841 2018-02-05  Alan Hayward  <alan.hayward@arm.com>
9842
9843         * target-descriptions.c (tdesc_element_visitor) Add empty
9844         implementations.
9845         (tdesc_type): Move make_gdb_type from here.
9846         (tdesc_type_builtin): Likewise.
9847         (tdesc_type_vector): Likewise.
9848         (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
9849         (make_gdb_type_struct): Move from tdesc_type_with_fields.
9850         (make_gdb_type_union): Likewise.
9851         (make_gdb_type_flags): Likewise.
9852         (make_gdb_type_enum): Likewise.
9853         (make_gdb_type): New function.
9854         (tdesc_register_type): Use static make_gdb_type.
9855
9856 2018-02-05  Ruslan Kabatsayev <b7.10110111@gmail.com>
9857
9858         * infcmd.c (default_print_one_register_info): Align natural-format
9859         column values consistently one under another.
9860         (pad_to_column): New function.
9861
9862 2018-02-05  Joel Brobecker  <brobecker@adacore.com>
9863
9864         * dwarf2read.c (dwarf2_physname): Move commment.
9865
9866 2018-02-01  Leszek Swirski  <leszeks@google.com>
9867
9868         * varobj.c (varobj_formatted_print_options): Allow recursive
9869         pretty printing if pretty printing is enabled.
9870
9871 2018-02-01  Leszek Swirski  <leszeks@google.com>
9872
9873         * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
9874         names after a structop as a filename.
9875
9876 2018-02-01  Yao Qi  <yao.qi@linaro.org>
9877
9878         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
9879         (arm_record_coproc_data_proc): Likewise.
9880
9881 2018-02-01  Yao Qi  <yao.qi@linaro.org>
9882
9883         * arm-tdep.c (arm_record_extension_space): Change ret to signed.
9884
9885 2018-01-31  Nikola Prica  <nikola.prica@rt-rk.com>
9886
9887         * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
9888         assign shifted lr_reg to fdata->lr_register when lr_reg is set.
9889
9890 2018-01-31  Pedro Alves  <palves@redhat.com>
9891
9892         * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
9893         * inflow.c (child_terminal_save_inferior): Wrap reference to
9894         tcgetpgrp in HAVE_TERMIOS_H.
9895         (child_interrupt, child_pass_ctrlc): Wrap references to signal in
9896         _WIN32.
9897         * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
9898         always iterate over all inferiors.
9899         (gdbsim_cntrl_c): Adjust.
9900         * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
9901
9902 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
9903
9904         * gdbtypes.c (lookup_array_range_type): Make sure the array's
9905         index type is objfile-owned if the element type is as well.
9906
9907 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
9908
9909         GDB 8.1 released.
9910
9911 2018-01-30  Philipp Rudo  <prudo@linux.vnet.ibm.com>
9912
9913         * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
9914         "features/s390x-linux64.c".
9915         (_initialize_s390_linux_tdep): Remove initialization of tdescs
9916         s390_linux32 and s390x_linux64.
9917         (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
9918         default tdesc.
9919         * s390-tdep.c: Include "features/s390-linux32.c" and
9920         "features/s390x-linux64.c".
9921         (s390_tdesc_valid): Add check for tdesc_has_registers.
9922         (s390_gdbarch_init): Make sure there is always a valid tdesc.
9923         (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
9924         tdesc_s390x_linux64.
9925         * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
9926         tdesc_s390x_linux64 to...
9927         * s390-tdep.h: ...here.
9928
9929 2018-01-30  Pedro Alves  <palves@redhat.com>
9930
9931         PR gdb/13211
9932         * config.in, configure: Regenerate.
9933         * configure.ac: Check for getpgid.
9934         * go32-nat.c (go32_pass_ctrlc): New.
9935         (go32_target): Install it.
9936         * inf-child.c (inf_child_target): Install
9937         child_terminal_save_inferior, child_pass_ctrlc and
9938         child_interrupt.
9939         * inf-ptrace.c (inf_ptrace_interrupt): Delete.
9940         (inf_ptrace_target): No longer install it.
9941         * infcmd.c (interrupt_target_1): Adjust.
9942         * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
9943         (child_interrupt): Declare.
9944         (inferior::terminal_state): New.
9945         * inflow.c (struct terminal_info): Update comments.
9946         (inferior_process_group): Delete.
9947         (terminal_is_ours): Delete.
9948         (gdb_tty_state): New.
9949         (child_terminal_init): Adjust.
9950         (is_gdb_terminal, sharing_input_terminal_1)
9951         (sharing_input_terminal): New functions.
9952         (child_terminal_inferior): Adjust.  Use sharing_input_terminal.
9953         Set the process's actual process group in the foreground if
9954         possible.  Handle is_ours_for_output/is_ours distinction.  Don't
9955         mark terminal as the inferior's if not sharing GDB's terminal.
9956         Don't check attach_flag.
9957         (child_terminal_ours_for_output, child_terminal_ours): Adjust to
9958         pass down a target_terminal_state.
9959         (child_terminal_save_inferior): New, factored out from ...
9960         (child_terminal_ours_1): ... this.  Handle
9961         target_terminal_state::is_ours_for_output.
9962         (child_interrupt, child_pass_ctrlc): New.
9963         (inflow_inferior_exit): Clear the inferior's terminal_state.
9964         (copy_terminal_info): Copy the inferior's terminal state.
9965         (_initialize_inflow): Remove reference to terminal_is_ours.
9966         * inflow.h (inferior_process_group): Delete.
9967         * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
9968         * procfs.c (procfs_target): Don't install procfs_interrupt.
9969         (procfs_interrupt): Delete.
9970         * remote.c (remote_serial_quit_handler): Adjust.
9971         (remote_interrupt): Remove ptid parameter.  Adjust.
9972         * target-delegates.c: Regenerate.
9973         * target.c: Include "terminal.h".
9974         (target_terminal::terminal_state): Rename to ...
9975         (target_terminal::m_terminal_state): ... this.
9976         (target_terminal::init): Adjust.
9977         (target_terminal::inferior): Adjust to per-inferior
9978         terminal_state.
9979         (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
9980         (target_terminal::ours, target_terminal::ours_for_output): Use
9981         target_terminal_is_ours_kind.
9982         (target_interrupt): Remove ptid parameter.  Adjust.
9983         (default_target_pass_ctrlc): Adjust.
9984         * target.h (target_ops::to_terminal_save_inferior): New field.
9985         (target_ops::to_interrupt): Remove ptid_t parameter.
9986         (target_interrupt): Remove ptid_t parameter.  Update comment.
9987         (target_pass_ctrlc): Update comment.
9988         * target/target.h (target_terminal_state): New scoped enum,
9989         factored out of ...
9990         (target_terminal::terminal_state): ... here.
9991         (target_terminal::inferior): Update comments.
9992         (target_terminal::restore_inferior): New.
9993         (target_terminal::is_inferior, target_terminal::is_ours)
9994         (target_terminal::is_ours_for_output): Adjust.
9995         (target_terminal::scoped_restore_terminal_state): Adjust to
9996         rename, and call restore_inferior() instead of inferior().
9997         (target_terminal::scoped_restore_terminal_state::m_state): Change
9998         type.
9999         (target_terminal::terminal_state): Rename to ...
10000         (target_terminal::m_terminal_state): ... this and change type.
10001
10002 2018-01-30  Pedro Alves  <palves@redhat.com>
10003
10004         * linux-nat.c (wait_for_signal): New function.
10005         (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
10006         directly.
10007         (async_terminal_is_ours)
10008         (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
10009         (linux_nat_add_target): Don't override
10010         to_terminal_inferior/to_terminal_ours.
10011
10012 2018-01-29  Sergio Durigan Junior  <sergiodj@redhat.com>
10013
10014         * remote.c (remote_follow_fork): Don't call "detach_inferior".
10015
10016 2018-01-28  Simon Marchi  <simon.marchi@ericsson.com>
10017
10018         * dwarf2read.c (free_dwo_files): Add forward-declaration.
10019         (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
10020         dwarf2_per_objfile_free here.
10021         (dwarf2_per_objfile_free): Remove.
10022         (_initialize_dwarf2_read): Don't register
10023         dwarf2_per_objfile_free as a registry cleanup.
10024
10025 2018-01-27  Eli Zaretskii  <eliz@gnu.org>
10026
10027         Avoid compilation errors in MinGW native builds
10028
10029         The error is triggered by including python-internal.h, and the
10030         error message is:
10031
10032              In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
10033                       from build-gnulib/import/math.h:27,
10034                       from d:/usr/Python26/include/pyport.h:235,
10035                       from d:/usr/Python26/include/Python.h:58,
10036                       from python/python-internal.h:94,
10037                       from python/py-arch.c:24:
10038              d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
10039         using ::hypot;
10040                 ^~~~~
10041
10042         This happens because Python headers define 'hypot' to expand t
10043         '_hypot' in the Windows builds.
10044         * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
10045         'hypoth'.  This avoids a compilation error.
10046
10047 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
10048
10049         * MAINTAINERS (Write After Approval): Fix ordering.
10050
10051 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
10052
10053         * MAINTAINERS (Write After Approval): Add Alan Hayward.
10054
10055 2018-01-26  Alan Modra  <amodra@gmail.com>
10056
10057         * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
10058         (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
10059         Remove nop.  Make const.  Comment.
10060         (powerpc32_plt_stub_so_2): New.
10061         (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
10062         Correct count.  Update uses.
10063         (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
10064         Move common code reading PLT entry word.  Correct
10065         powerpc32_plt_stub PLT address calculation.
10066         * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
10067         (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
10068         (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
10069         (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
10070         (ppc64_standard_linkage8): Likewise.
10071         * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
10072         Correct insns description.
10073         * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
10074
10075 2018-01-24  Pedro Alves  <palves@redhat.com>
10076
10077         GCC PR libstdc++/83906
10078         * gdbtypes.c (operator==(const dynamic_prop &,
10079         const dynamic_prop &)): New.
10080         (operator==(const range_bounds &, const range_bounds &)): New.
10081         (check_types_equal): Use them instead of memcmp.
10082         * gdbtypes.h (operator==(const dynamic_prop &,
10083         const dynamic_prop &)): Declare.
10084         (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
10085         (operator==(const range_bounds &, const range_bounds &)): Declare.
10086         (operator!=(const range_bounds &, const range_bounds &)): Declare.
10087
10088 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
10089
10090         * s390-linux-tdep.c (s390_record_address_mask)
10091         (s390_record_calc_disp_common, s390_record_calc_disp)
10092         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
10093         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
10094         (s390_process_record): Move to s390-tdep.c.
10095         (s390_linux_init_abi_any): Adjust.
10096         * s390-tdep.c (s390_record_address_mask)
10097         (s390_record_calc_disp_common, s390_record_calc_disp)
10098         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
10099         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
10100         (s390_process_record): Moved from s390-linux-tdep.c
10101         (s390_gdbarch_init): Adjust.
10102
10103 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
10104
10105         * s390-linux-nat.c (s390-tdep.h): New include.
10106         * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
10107         (HFILES_NO_SRCDIR): Add s390-tdep.h.
10108         (ALLDEPFILES): Add s390-tdep.c.
10109         * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
10110         * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
10111         * s390-tdep.h: ...this.  New file.
10112         * s390-linux-tdep.c (s390-tdep.h): New include.
10113         (_initialize_s390_tdep): Rename to...
10114         (_initialize_s390_linux_tdep): ...this and adjust.
10115         (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
10116         (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
10117         s390-tdep.h.
10118         (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
10119         (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
10120         (s390_is_partial_instruction, s390_software_single_step)
10121         (is_non_branch_ril, s390_displaced_step_copy_insn)
10122         (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
10123         (s390_prologue_data, s390_addr, s390_store, s390_load)
10124         (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
10125         (s390_register_call_saved, s390_guess_tracepoint_registers)
10126         (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
10127         (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
10128         (s390_pseudo_register_name, s390_pseudo_register_type)
10129         (s390_pseudo_register_read, s390_pseudo_register_write)
10130         (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
10131         (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
10132         (s390_addr_bits_remove, s390_address_class_type_flags)
10133         (s390_address_class_type_flags_to_name)
10134         (s390_address_class_name_to_type_flags, s390_effective_inner_type)
10135         (s390_function_arg_float, s390_function_arg_vector)
10136         (is_power_of_two, s390_function_arg_integer, s390_arg_state)
10137         (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
10138         (s390_frame_align, s390_register_return_value, s390_return_value)
10139         (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
10140         (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
10141         (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
10142         (s390_trad_frame_prev_register, s390_unwind_cache)
10143         (s390_prologue_frame_unwind_cache)
10144         (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
10145         (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
10146         (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
10147         (s390_stub_frame_this_id, s390_stub_frame_prev_register)
10148         (s390_stub_frame_sniffer, s390_stub_frame_unwind)
10149         (s390_frame_base_address, s390_local_base_address)
10150         (s390_frame_base, s390_gcc_target_options)
10151         (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
10152         (s390_validate_reg_range, s390_tdesc_valid)
10153         (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
10154         * s390-tdep.c: ...this.  New file.
10155
10156 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
10157
10158         * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
10159         (s390_process_record, s390_gdbarch_tdep_alloc)
10160         (s390_linux_init_abi_any): Use/set new hook.
10161
10162 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
10163
10164         * s390-linux-tdep.c (osabi.h): New include.
10165         (s390_linux_init_abi_31, s390_linux_init_abi_64)
10166         (s390_linux_init_abi_any): New functions.
10167         (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
10168
10169 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
10170
10171         * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
10172         tdesc_has_registers check
10173
10174 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
10175
10176         * s390-linux-tdep.c (s390_tdesc_valid): New function.
10177         (s390_validate_reg_range): New macro.
10178         (s390_gdbarch_init): Adjust.
10179
10180 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
10181
10182         * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
10183         (s390_gdbarch_tdep_alloc): Adjust.
10184         (s390_gdbarch_init): Adjust.
10185
10186 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
10187
10188         * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
10189         <have_tdb>: Change type to bool.
10190         (s390_gdbarch_tdep_alloc): Adjust.
10191         (s390_gdbarch_init): Adjust.
10192
10193 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
10194
10195         * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
10196         (gdbarch_tdep) <have_upper, have_vx>: New fields.
10197         (s390_gdbarch_tdep_alloc): New function.
10198         (s390_gdbarch_init): Allocate tdep at start and use its fields
10199         instead of separate variables.
10200
10201 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
10202
10203         * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
10204         when looking for cached gdbarch and add comment for remaining.
10205
10206 2018-01-22  Pedro Alves  <palves@redhat.com>
10207             Sergio Durigan Junior  <sergiodj@redhat.com>
10208
10209         * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
10210         case.
10211
10212 2018-01-22  Maciej W. Rozycki  <macro@mips.com>
10213
10214         * MAINTAINERS: Update my company e-mail address.
10215
10216 2018-01-22  Yao Qi  <yao.qi@linaro.org>
10217
10218         * regcache.c (cooked_write_test): New function.
10219         (_initialize_regcache): Register the test.
10220
10221 2018-01-22  Yao Qi  <yao.qi@linaro.org>
10222
10223         * ia64-tdep.c (ia64_pseudo_register_read): Call
10224         regcache->cooked_read instead of regcache_cooked_read_unsigned.
10225         * m32c-tdep.c (m32c_cat_read): Likewise.
10226         (m32c_r3r2r1r0_read): Likewise.
10227         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
10228         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
10229
10230 2018-01-22  Yao Qi  <yao.qi@linaro.org>
10231
10232         * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
10233         method raw_read instead of regcache_raw_read.
10234         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
10235         * arm-tdep.c (arm_neon_quad_read): Likewise.
10236         * avr-tdep.c (avr_pseudo_register_read): Likewise.
10237         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
10238         * frv-tdep.c (frv_pseudo_register_read): Likewise.
10239         * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
10240         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
10241         (i386_pseudo_register_read_into_value): Likewise.
10242         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
10243         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
10244         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
10245         * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
10246         * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
10247         * sparc-tdep.c (sparc32_pseudo_register_read):  Likewise.
10248         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
10249         * spu-tdep.c (spu_pseudo_register_read_spu):  Likewise.
10250         * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
10251
10252 2018-01-22  Yao Qi  <yao.qi@linaro.org>
10253
10254         * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
10255         * configure.tgt: Remove target mt.
10256         * mt-tdep.c: Remove.
10257         * regcache.c (cooked_read_test): Remove the check for mt.
10258
10259 2018-01-22  Yao Qi  <yao.qi@linaro.org>
10260
10261         * jit.c (jit_frame_prev_register): Call regcache::cooked_read
10262         instead of gdbarch_pseudo_register_read_value.
10263
10264 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
10265
10266         * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
10267         language is Ada.
10268
10269 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
10270
10271         * linespec.c (create_sals_line_offset): Remove code that preserved
10272         the symtab_and_line's line number.
10273
10274 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
10275
10276         * varobj.c (varobj_create): Don't set valid_block when creating a
10277         floating varobj.
10278
10279 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
10280
10281         * varobj.c (varobj_create): Remove out of date comment.
10282
10283 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
10284
10285         PR mi/20395
10286         * ada-exp.y (write_var_from_sym): Pass extra parameter when
10287         updating innermost block.
10288         * parse.c (innermost_block_tracker::update): Take extra type
10289         parameter, and check types match before updating innermost block.
10290         (write_dollar_variable): Update innermost block for registers.
10291         * parser-defs.h (enum innermost_block_tracker_type): New enum.
10292         (innermost_block_tracker::innermost_block_tracker): Initialise
10293         m_types member.
10294         (innermost_block_tracker::reset): Take type parameter.
10295         (innermost_block_tracker::update): Take type parameter, and pass
10296         type through as needed.
10297         (innermost_block_tracker::m_types): New member.
10298         * varobj.c (varobj_create): Pass type when reseting innermost
10299         block.
10300
10301 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
10302
10303         * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
10304         * ada-lang.c (resolve_subexp): Likewise.
10305         * breakpoint.c (set_breakpoint_condition) Likewise.
10306         (watch_command_1) Likewise.
10307         * c-exp.y (variable): Likewise.
10308         * d-exp.y (PrimaryExpression): Likewise.
10309         * f-exp.y (variable): Likewise.
10310         * go-exp.y (variable): Likewise.
10311         * m2-exp.y (variable): Likewise.
10312         * objfiles.c (objfile::~objfile): Likewise.
10313         * p-exp.y (variable): Likewise.
10314         * parse.c (innermost_block): Change type.
10315         * parser-defs.h (class innermost_block_tracker): New.
10316         (innermost_block): Change to innermost_block_tracker.
10317         * printcmd.c (display_command): Switch to innermost_block API.
10318         (do_one_display): Likewise.
10319         * rust-exp.y (do_one_display): Likewise.
10320         * symfile.c (clear_symtab_users): Likewise.
10321         * varobj.c (varobj_create): Switch to innermost_block API, replace
10322         use of innermost_block with block stored on varobj object.
10323
10324 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
10325
10326         * expression.h (innermost_block): Remove declaration.
10327         * varobj.c: Add 'parser-defs.h' include.
10328
10329 2018-01-19  Tom Tromey  <tom@tromey.com>
10330
10331         * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
10332         symbols in the static and global blocks.
10333
10334 2018-01-19  James Clarke  <jrtc27@jrtc27.com>
10335
10336         * nat/linux-ptrace.c: Remove unnecessary reinclusion of
10337         gdb_ptrace.h, and move including gdb_wait.h ...
10338         * nat/linux-ptrace.h: ... to here.
10339
10340 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
10341
10342         * inf-ptrace.c (inf_ptrace_detach): Adjust call to
10343         inf_ptrace_detach_success.
10344         (inf_ptrace_detach_success): Add inferior parameter, use it
10345         instead of inferior_ptid, pass it to detach_inferior.
10346         * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
10347         parameter.
10348         * inferior.c (detach_inferior): Add overload that takes an
10349         inferior object.
10350         * inferior.h (detach_inferior): Likewise.
10351         * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
10352         use inferior_ptid, adjust call to inf_ptrace_detach_success.
10353         * linux-thread-db.c (thread_db_detach): Use inf parameter.
10354
10355 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
10356
10357         * target.h (struct target_ops) <to_detach>: Add inferior
10358         parameter.
10359         (target_detach): Likewise.
10360         * target.c (dispose_inferior): Pass inferior down.
10361         (target_detach): Pass inferior down.  Assert that it is equal to
10362         the current inferior.
10363         * aix-thread.c (aix_thread_detach): Pass inferior down.
10364         * corefile.c (core_file_command): Pass current_inferior() down.
10365         * corelow.c (core_detach): Add inferior parameter.
10366         * darwin-nat.c (darwin_detach): Likewise.
10367         * gnu-nat.c (gnu_detach): Likewise.
10368         * inf-ptrace.c (inf_ptrace_detach): Likewise.
10369         * infcmd.c (detach_command): Pass current_inferior() down to
10370         target_detach.
10371         * infrun.c (follow_fork_inferior): Pass parent_inf to
10372         target_detach.
10373         (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
10374         target_detach.
10375         * linux-nat.c (linux_nat_detach): Add inferior parameter.
10376         * linux-thread-db.c (thread_db_detach): Likewise.
10377         * nto-procfs.c (procfs_detach): Likewise.
10378         * procfs.c (procfs_detach): Likewise.
10379         * record.c (record_detach): Likewise.
10380         * record.h (struct inferior): Forward-declare.
10381         (record_detach): Add inferior parameter.
10382         * remote-sim.c (gdbsim_detach): Likewise.
10383         * remote.c (remote_detach_1): Likewise.
10384         (remote_detach): Likewise.
10385         (extended_remote_detach): Likewise.
10386         * sol-thread.c (sol_thread_detach): Likewise.
10387         * target-debug.h (target_debug_print_inferior_p): New macro.
10388         * target-delegates.c: Re-generate.
10389         * top.c (kill_or_detach): Pass inferior down to target_detach.
10390         * windows-nat.c (windows_detach): Add inferior parameter.
10391
10392 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
10393
10394         * target.h (struct target_ops) <to_detach>: Remove args
10395         parameter.
10396         (target_detach): Likewise.
10397         * target.c (dispose_inferior): Adjust.
10398         (target_detach): Remove args parameter, adjust.
10399         * aix-thread.c (aix_thread_detach): Adjust.
10400         * corefile.c (core_file_command): Adjust.
10401         * corelow.c (core_detach): Adjust.
10402         * darwin-nat.c (darwin_detach): Adjust.
10403         * gnu-nat.c (gnu_detach): Adjust.
10404         * inf-ptrace.c (inf_ptrace_detach): Adjust.
10405         * infcmd.c (detach_command): Adjust
10406         * infrun.c (follow_fork_inferior): Adjust.
10407         (handle_vfork_child_exec_or_exit): Adjust.
10408         * linux-fork.c (linux_fork_detach): Remove args parameter.
10409         * linux-fork.h (linux_fork_detach): Likewise.
10410         * linux-nat.c (linux_nat_detach): Likewise, and adjust.
10411         * linux-thread-db.c (thread_db_detach): Likewise.
10412         * nto-procfs.c (procfs_detach): Likewise.
10413         * procfs.c (procfs_detach): Likewise.
10414         (do_detach): Remove signo parameter.
10415         * record.c (record_detach): Remove args parameter.
10416         * record.h (record_detach): Likewise.
10417         * remote-sim.c (gdbsim_detach): Likewise.
10418         * remote.c (remote_detach_1): Likewise.
10419         (remote_detach): Likewise.
10420         (extended_remote_detach): Likewise.
10421         * sol-thread.c (sol_thread_detach): Likewise.
10422         * target-delegates.c: Re-generate.
10423         * top.c (struct qt_args) <args>: Remove field.
10424         (kill_or_detach): Don't pass args.
10425         (quit_force): Don't set args.
10426         * windows-nat.c (windows_detach): Remove args parameter.
10427
10428 2018-01-19  Yao Qi  <yao.qi@linaro.org>
10429
10430         * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
10431         (arm_linux_init_abi): Install it.
10432
10433 2018-01-19  Yao Qi  <yao.qi@linaro.org>
10434
10435         * osabi.c (gdb_osabi_names): Extend the regexp for
10436         arm-linux-gnueabihf.
10437
10438 2018-01-18  Yao Qi  <yao.qi@linaro.org>
10439
10440         * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
10441         m_abbrevs.
10442         (abbrev_table::add_abbrev): Update.
10443         (abbrev_table::lookup_abbrev): Update.
10444
10445 2018-01-18  Yao Qi  <yao.qi@linaro.org>
10446
10447         * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
10448
10449 2018-01-17  Sergio Durigan Junior  <sergiodj@redhat.com>
10450
10451         * compile/compile.c (compile_to_object): Convert "triplet_rx"
10452         to "std::string".
10453
10454 2018-01-17  Tom Tromey  <tom@tromey.com>
10455
10456         * dwarf2read.c (symbolp): Remove typedef.  Don't instantiate VEC.
10457
10458 2018-01-17  Tom Tromey  <tom@tromey.com>
10459
10460         * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
10461         * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
10462         (create_array_type_with_stride): Update.
10463         * dwarf2read.c (set_die_type): Update.
10464
10465 2018-01-17  Tom Tromey  <tom@tromey.com>
10466
10467         * dwarf2read.c (delayed_method_info): Remove typedef.
10468         (dwarf2_cu::method_info): Now a std::vector.
10469         (add_to_method_list): Update.
10470         (free_delayed_list): Remove.
10471         (compute_delayed_physnames): Update.
10472         (process_full_comp_unit, process_full_type_unit): Clear the method
10473         list.  Remove cleanups.
10474         (psymtab_include_file_name): Add name_holder parameter.  Use
10475         unique_xmalloc_ptr.
10476         (dwarf_decode_lines): Update.
10477
10478 2018-01-17  Tom Tromey  <tom@tromey.com>
10479             Simon Marchi  <simon.marchi@ericsson.com>
10480
10481         * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
10482         (dwarf2_per_objfile::free_cached_comp_units)
10483         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
10484         (init_cutu_and_read_dies_no_follow): Update.
10485         (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
10486         (dwarf2_cu::~dwarf2_cu): New.
10487         (free_heap_comp_unit, free_stack_comp_unit): Remove.
10488         (age_cached_comp_units, free_one_cached_comp_unit): Update.
10489
10490 2018-01-17  Tom Tromey  <tom@tromey.com>
10491             Simon Marchi  <simon.marchi@ericsson.com>
10492
10493         * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
10494         (struct die_reader_specs) <abbrev_table>: New member.
10495         (struct abbrev_table): Add constructor.
10496         <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
10497         <abbrev_obstack>: Now an auto_obstack.
10498         (abbrev_table_up): New typedef.
10499         (init_cu_die_reader): Add abbrev_table parameter.
10500         (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
10501         Add result_dwo_abbrev_table.
10502         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
10503         (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
10504         Update.
10505         (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
10506         parameter.
10507         (skip_children): Update.
10508         (abbrev_table::alloc_abbrev): Rename from
10509         abbrev_table_alloc_abbrev.
10510         (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
10511         (abbrev_table::lookup_abbrev): Rename from
10512         abbrev_table_lookup_abbrev.
10513         (abbrev_table_read_table): Return abbrev_table_up.
10514         (abbrev_table_free, abbrev_table_free_cleanup)
10515         (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
10516         (load_partial_dies): Update.
10517
10518 2018-01-17  Tom Tromey  <tom@tromey.com>
10519
10520         * dwarf2read.c (dwarf2_compute_name): Update comment.
10521         (read_func_scope, read_variable): Update.
10522         (new_symbol): Remove.
10523         (new_symbol_full): Rename to new_symbol.
10524
10525 2018-01-17  Mike Gulick  <mgulick@mathworks.com>
10526
10527         PR gdb/16577
10528         * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
10529         a warning instead of throwing an error, set section size to 0 and return
10530         NULL.
10531         * gdb_bfd.h (gdb_bfd_map_section): Update description.
10532
10533 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
10534
10535         * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
10536         std::string.
10537         (linux_ptrace_attach_fail_reason_string): Likewise.
10538         * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
10539         Likewise.
10540         (linux_ptrace_attach_fail_reason_string): Likewise.
10541         * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
10542
10543 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
10544
10545         * linux-nat.c (linux_nat_attach): Remove xstrdup.
10546
10547 2018-01-17  Eldar Abusalimov  <eldar.abusalimov@jetbrains.com>
10548
10549         PR gdb/21559
10550         * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
10551         checking for fs_base/gs_base fields in struct user_regs_struct.
10552         * configure: Regenerate.
10553
10554 2018-01-17  Yao Qi  <yao.qi@linaro.org>
10555
10556         * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
10557         function.
10558         (aarch64_linux_init_abi): Install it to gdbarch hook
10559         gcc_target_options.
10560
10561 2018-01-15  Pedro Alves  <palves@redhat.com>
10562
10563         * common/signals-state-save-restore.c
10564         (save_original_signals_state): Fix typos.
10565
10566 2017-01-12  Tom Tromey  <tom@tromey.com>
10567             Sergio Durigan Junior  <sergiodj@redhat.com>
10568
10569         * Makefile.in (install-only): Install gdb-add-index.
10570
10571 2018-01-12  John Baldwin  <jhb@FreeBSD.org>
10572
10573         * fbsd-tdep.c (KVE_PROTECTION): Correct value.
10574
10575 2018-01-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10576
10577         * infrun.c (keep_going_pass_signal): Clear step-over info when
10578         insert_breakpoints fails.
10579
10580 2018-01-11  Pedro Alves  <palves@redhat.com>
10581
10582         PR gdb/22583
10583         * infrun.c (resume): Rename to ...
10584         (resume_1): ... this.
10585         (resume): Reimplement as wrapper around resume_1.
10586
10587 2018-01-11  Pedro Alves  <palves@redhat.com>
10588
10589         PR remote/22597
10590         * remote.c (remote_parse_stop_reply): Default to the last-set
10591         general thread instead of to 'magic_null_ptid'.
10592
10593 2018-01-10  Pedro Alves  <palves@redhat.com>
10594
10595         * language.h (language_get_symbol_name_matcher): Rename ...
10596         (get_symbol_name_matcher): ... this.
10597         * language.c (language_get_symbol_name_matcher): Ditto.
10598         * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
10599         callers adjusted.
10600
10601 2018-01-10  Pedro Alves  <palves@redhat.com>
10602
10603         PR gdb/22670
10604         * dwarf2read.c
10605         (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
10606         Adjust to use language_get_symbol_name_matcher instead of
10607         language_defn::la_get_symbol_name_matcher.
10608         * language.c (language_get_symbol_name_matcher): If in Ada mode
10609         and the lookup name is a verbatim match, return Ada's matcher.
10610         * language.h (language_get_symbol_name_matcher): Adjust comment.
10611         (ada_lookup_name_info::verbatim_p):: New method.
10612
10613 2018-01-10  Pedro Alves  <palves@redhat.com>
10614
10615         PR gdb/22670
10616         * ada-lang.c (ada_collect_symbol_completion_matches): If the
10617         minsym's language is language_auto or language_cplus, pass down
10618         language_ada instead.
10619         * symtab.c (compare_symbol_name): Don't frob symbol language here.
10620
10621 2018-01-10  Pedro Alves  <palves@redhat.com>
10622
10623         PR gdb/22670
10624         * minsyms.c (linkage_name_str): New function.
10625         (iterate_over_minimal_symbols): Use it.
10626
10627 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
10628
10629         * NEWS: Document that 'info proc' now works on FreeBSD.
10630
10631 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
10632
10633         * configure.ac: Check for kinfo_getfile in libutil.
10634         * configure: Regenerate.
10635         * config.in: Regenerate.
10636         * fbsd-nat.c: Include "fbsd-tdep.h".
10637         (fbsd_fetch_cmdline): New.
10638         (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
10639         rather than calling error.
10640         (fbsd_info_proc): New.
10641         (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
10642         (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
10643         (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
10644
10645 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
10646
10647         * fbsd-nat.c (struct free_deleter): Remove.
10648         (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
10649
10650 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
10651
10652         * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
10653         NULL for an empty pathname.
10654
10655 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
10656
10657         * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
10658         (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
10659         (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
10660         (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
10661         (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
10662         (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
10663         (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
10664         (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
10665         (kinfo_proc_layout_32, kinfo_proc_layout_i386)
10666         (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
10667         (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
10668         (fbsd_core_fetch_timeval, fbsd_print_sigset)
10669         (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
10670         (fbsd_init_abi):  Install gdbarch "core_info_proc" method.
10671         * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
10672
10673 2018-01-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>
10674
10675         * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
10676         (gnu_xfer_auxv): New function.
10677         (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
10678         TARGET_OBJECT_AUXV.
10679
10680 2018-01-08  Yao Qi  <yao.qi@linaro.org>
10681             Simon Marchi  <simon.marchi@ericsson.com>
10682
10683         * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
10684         common/selftest.c.
10685         (COMMON_OBS): Remove selftest.o.
10686         * configure.ac: Append selftest-arch.c and common/selftest.c to
10687         CONFIG_SRCS.  Append selftest-arch.o and selftest.o to COMMON_OBS.
10688         * configure: Re-generated.
10689         * maint.c (maintenance_selftest): Wrap selftests::run_tests with
10690         GDB_SELF_TEST.
10691         (maintenance_info_selftests): Likewise.
10692
10693 2018-01-08  Xavier Roirand  <roirand@adacore.com>
10694
10695         * ada-valprint.c (val_print_packed_array_elements): Use
10696         proper number of elements when printing an array indexed
10697         by an enumeration type.
10698
10699 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
10700
10701         * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
10702         (dw2_get_file_names_reader): Adjust.
10703         (lookup_dwo_signatured_type): Adjust.
10704         (lookup_dwp_signatured_type): Adjust.
10705         (lookup_signatured_type): Adjust.
10706         (create_type_unit_group): Adjust.
10707         (get_type_unit_group): Adjust.
10708         (process_psymtab_comp_unit_reader): Adjust.
10709         (build_type_psymtabs_reader): Adjust.
10710         (scan_partial_symbols): Adjust.
10711         (add_partial_symbol): Adjust.
10712         (add_partial_subprogram): Adjust.
10713         (peek_die_abbrev): Adjust.
10714         (fixup_go_packaging): Adjust.
10715         (process_imported_unit_die): Adjust.
10716         (dwarf2_compute_name): Adjust.
10717         (dwarf2_physname): Adjust.
10718         (read_import_statement): Adjust.
10719         (handle_DW_AT_stmt_list): Adjust.
10720         (read_file_scope): Adjust.
10721         (read_func_scope): Adjust.
10722         (read_lexical_block_scope): Adjust.
10723         (read_call_site_scope): Adjust.
10724         (read_variable): Adjust.
10725         (dwarf2_rnglists_process): Adjust.
10726         (dwarf2_ranges_process): Adjust.
10727         (dwarf2_ranges_read): Adjust.
10728         (dwarf2_get_pc_bounds): Adjust.
10729         (dwarf2_record_block_ranges): Adjust.
10730         (dwarf2_add_field): Adjust.
10731         (dwarf2_add_member_fn): Adjust.
10732         (read_structure_type): Adjust.
10733         (process_structure_scope): Adjust.
10734         (read_enumeration_type): Adjust.
10735         (read_array_type): Adjust.
10736         (mark_common_block_symbol_computed): Adjust.
10737         (read_common_block): Adjust.
10738         (read_namespace_type): Adjust.
10739         (read_namespace): Adjust.
10740         (read_module_type): Adjust.
10741         (read_tag_pointer_type): Adjust.
10742         (read_tag_ptr_to_member_type): Adjust.
10743         (read_tag_string_type): Adjust.
10744         (read_subroutine_type): Adjust.
10745         (read_typedef): Adjust.
10746         (read_base_type): Adjust.
10747         (attr_to_dynamic_prop): Adjust.
10748         (read_subrange_type): Adjust.
10749         (read_unspecified_type): Adjust.
10750         (dwarf2_read_abbrevs): Adjust.
10751         (load_partial_dies): Adjust.
10752         (read_partial_die): Adjust.
10753         (find_partial_die): Adjust.
10754         (guess_partial_die_structure_name): Adjust.
10755         (fixup_partial_die): Adjust.
10756         (read_attribute_value): Adjust.
10757         (read_addr_index): Adjust.
10758         (read_addr_index_from_leb128): Adjust.
10759         (read_str_index): Adjust.
10760         (dwarf2_string_attr): Adjust.
10761         (get_debug_line_section): Adjust.
10762         (dwarf_decode_line_header): Adjust.
10763         (lnp_state_machine::check_line_address): Adjust.
10764         (dwarf_decode_lines_1): Adjust.
10765         (dwarf_decode_lines): Adjust.
10766         (dwarf2_start_symtab): Adjust.
10767         (var_decode_location): Adjust.
10768         (new_symbol_full): Adjust.
10769         (dwarf2_const_value_data): Adjust.
10770         (dwarf2_const_value_attr): Adjust.
10771         (dwarf2_const_value): Adjust.
10772         (die_type): Adjust.
10773         (die_containing_type): Adjust.
10774         (build_error_marker_type): Adjust.
10775         (lookup_die_type): Adjust.
10776         (guess_full_die_structure_name): Adjust.
10777         (anonymous_struct_prefix): Adjust.
10778         (determine_prefix): Adjust.
10779         (dwarf2_name): Adjust.
10780         (follow_die_ref_or_sig): Adjust.
10781         (follow_die_offset): Adjust.
10782         (follow_die_ref): Adjust.
10783         (follow_die_sig_1): Adjust.
10784         (follow_die_sig): Adjust.
10785         (get_signatured_type): Adjust.
10786         (get_DW_AT_signature_type): Adjust.
10787         (decode_locdesc): Adjust.
10788         (dwarf_decode_macros): Adjust.
10789         (cu_debug_loc_section): Adjust.
10790         (fill_in_loclist_baton): Adjust.
10791         (dwarf2_symbol_mark_computed): Adjust.
10792         (init_one_comp_unit): Don't assign
10793         dwarf2_cu::dwarf2_per_objfile.
10794         (set_die_type): Adjust.
10795
10796 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
10797
10798         * dwarf2read.c (struct mapped_debug_names): Add constructor.
10799         <dwarf2_per_objfile>: New field.
10800         (dwarf2_per_objfile): Remove global.
10801         (get_dwarf2_per_objfile): New function.
10802         (set_dwarf2_per_objfile): New function.
10803         (dwarf2_build_psymtabs_hard): Change objfile parameter to
10804         dwarf2_per_objfile.
10805         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
10806         (read_abbrev_offset): Likewise.
10807         (read_indirect_string): Likewise.
10808         (read_indirect_line_string): Likewise.
10809         (read_indirect_string_at_offset): Likewise.
10810         (read_indirect_string_from_dwz): Likewise.
10811         (dwarf2_find_containing_comp_unit): Change objfile parameter to
10812         dwarf2_per_objfile.
10813         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
10814         (create_all_comp_units): Change objfile parameter to
10815         dwarf2_per_objfile.
10816         (create_all_type_units): Likewise.
10817         (process_queue): Add dwarf2_per_objfile parameter.
10818         (read_and_check_comp_unit_head): Likewise.
10819         (lookup_dwo_unit_in_dwp): Likewise.
10820         (get_dwp_file): Likewise.
10821         (process_cu_includes): Likewise.
10822         (struct free_dwo_file_cleanup_data): New struct.
10823         (dwarf2_has_info): Use get_dwarf2_per_objfile and
10824         set_dwarf2_per_objfile.
10825         (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
10826         (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
10827         context, adjust calls.
10828         (dw2_instantiate_symtab): Likewise.
10829         (dw2_get_cutu): Add dwarf2_per_objfile parameter.
10830         (dw2_get_cu): Likewise.
10831         (create_cu_from_index_list): Change objfile parameter to
10832         dwarf2_per_objfile.
10833         (create_cus_from_index_list): Get dwarf2_per_objfile from
10834         context, adjust calls.
10835         (create_cus_from_index): Likewise.
10836         (create_signatured_type_table_from_index): Change objfile
10837         parameter to dwarf2_per_objfile.
10838         (create_signatured_type_table_from_debug_names): Change objfile
10839         parameter to dwarf2_per_objfile.
10840         (create_addrmap_from_index): Likewise.
10841         (create_addrmap_from_aranges): Likewise.
10842         (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
10843         (dw2_setup): Remove.
10844         (dw2_get_file_names_reader): Get dwarf2_per_objfile from
10845         context.
10846         (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
10847         get_dwarf2_per_objfile.
10848         (dw2_forget_cached_source_info): Likewise.
10849         (dw2_map_symtabs_matching_filename): Likewise.
10850         (struct dw2_symtab_iterator) <index>: Remove.
10851         <dwarf2_per_objfile>: New field.
10852         (dw2_symtab_iter_init): Replace index parameter with
10853         dwarf2_per_objfile.
10854         (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
10855         (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
10856         (dw2_print_stats): Likewise.
10857         (dw2_dump): Likewise.
10858         (dw2_expand_symtabs_for_function): Likewise.
10859         (dw2_expand_all_symtabs): Likewise.
10860         (dw2_expand_symtabs_with_fullname): Likewise.
10861         (dw2_expand_marked_cus): Replace index and objfile parameters
10862         with dwarf2_per_objfile.
10863         (dw_expand_symtabs_matching_file_matcher): Add
10864         dwarf2_per_objfile parameter and adjust calls.
10865         (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
10866         adjust calls.
10867         (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
10868         (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
10869         adjust calls.
10870         (create_cus_from_debug_names_list): Replace objfile parameter
10871         with dwarf2_per_objfile and adjust calls.
10872         (create_cus_from_debug_names): Likewise.
10873         (dwarf2_read_debug_names): Likewise.
10874         (mapped_debug_names::namei_to_name): Adjust call.
10875         (dw2_debug_names_iterator::next): Likewise.
10876         (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
10877         (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
10878         (dw2_debug_names_dump): Likewise.
10879         (dw2_debug_names_expand_symtabs_for_function): Likewise.
10880         (dw2_debug_names_expand_symtabs_matching): Likewise.
10881         (dwarf2_initialize_objfile): Likewise.
10882         (dwarf2_build_psymtabs): Likewise.
10883         (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
10884         this_cu.
10885         (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
10886         (read_and_check_comp_unit_head): Likewise.
10887         (read_abbrev_offset): Likewise.
10888         (create_debug_type_hash_table): Likewise.
10889         (create_debug_types_hash_table): Likewise.
10890         (create_all_type_units): Replace objfile parameter with
10891         dwarf2_per_objfile.
10892         (add_type_unit): Add dwarf2_per_objfile parameter.
10893         (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
10894         with dwarf2_per_objfile.
10895         (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
10896         (lookup_dwp_signatured_type): Likewise.
10897         (lookup_signatured_type): Likewise.
10898         (read_cutu_die_from_dwo): Likewise.
10899         (init_tu_and_read_dwo_dies): Likewise.
10900         (init_cutu_and_read_dies): Likewise.
10901         (init_cutu_and_read_dies_no_follow): Likewise.
10902         (allocate_type_unit_groups_table): Add objfile parameter.
10903         (create_type_unit_group): Use dwarf2_per_objfile from cu.
10904         (get_type_unit_group): Likewise.
10905         (process_psymtab_comp_unit): Update call.
10906         (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
10907         (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
10908         (print_tu_stats): Likewise.
10909         (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
10910         in void* parameter.
10911         (build_type_psymtabs): Change objfile parameter to
10912         dwarf2_per_objfile.
10913         (process_skeletonless_type_unit): Use dwarf2_per_objfile
10914         passed in void* parameter.
10915         (process_skeletonless_type_units): Change objfile parameter to
10916         dwarf2_per_objfile.
10917         (set_partial_user): Likewise.
10918         (dwarf2_build_psymtabs_hard): Likewise.
10919         (read_comp_units_from_section): Likewise.
10920         (create_all_comp_units): Likewise.
10921         (scan_partial_symbols): Update calls.
10922         (add_partial_symbol): Likewise.
10923         (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
10924         (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
10925         (process_queue): Add dwarf2_per_objfile parameter.
10926         (get_compunit_symtab): Use dwarf2_per_objfile from cu.
10927         (compute_compunit_symtab_includes): Likewise.
10928         (process_cu_includes): Add dwarf2_per_objfile parameter.
10929         (process_full_comp_unit): Use dwarf2_per_objfile from cu.
10930         (process_full_type_unit): Likewise.
10931         (process_imported_unit_die): Update call.
10932         (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
10933         (read_file_scope): Likewise.
10934         (allocate_dwo_file_hash_table): Add objfile parameter.
10935         (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
10936         (create_cus_hash_table): Likewise.
10937         (create_dwp_hash_table): Likewise.
10938         (create_dwo_unit_in_dwp_v1): Likewise.
10939         (create_dwp_v2_section): Likewise.
10940         (create_dwo_unit_in_dwp_v2): Likewise.
10941         (lookup_dwo_unit_in_dwp): Likewise.
10942         (try_open_dwop_file): Likewise.
10943         (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
10944         (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
10945         cleanup to include a reference to dwarf2_per_objfile.
10946         (open_dwp_file): Add dwarf2_per_objfile parameter.
10947         (open_and_init_dwp_file): Likewise.
10948         (get_dwp_file): Likewise.
10949         (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
10950         (queue_and_load_all_dwo_tus): Update call.
10951         (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
10952         data.
10953         (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
10954         (dwarf2_ranges_process): Likewise.
10955         (dwarf2_get_pc_bounds): Likewise.
10956         (mark_common_block_symbol_computed): Likewise.
10957         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
10958         (dwarf2_read_abbrevs): Update call.
10959         (read_partial_die): Use dwarf2_per_objfile from cu.
10960         (find_partial_die): Likewise.
10961         (fixup_partial_die): Likewise.
10962         (read_attribute_value): Likewise.
10963         (read_indirect_string_at_offset_from): Add objfile parameter.
10964         (read_indirect_string_at_offset): Add dwarf2_per_objfile
10965         parameter.
10966         (read_indirect_string_from_dwz): Add objfile parameter.
10967         (read_indirect_string): Add objfile parameter.
10968         (read_addr_index_1): Add dwarf2_per_objfile parameter.
10969         (read_addr_index): Use dwarf2_per_objfile from cu.
10970         (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
10971         call dw2_setup.
10972         (read_str_index): Use dwarf2_per_objfile from cu.
10973         (get_debug_line_section): Likewise.
10974         (read_formatted_entries): Add dwarf2_per_objfile parameter.
10975         (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
10976         (new_symbol_full): Use dwarf2_per_objfile from cu.
10977         (build_error_marker_type): Likewise.
10978         (lookup_die_type): Likewise.
10979         (determine_prefix): Likewise.
10980         (follow_die_offset): Likewise.
10981         (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
10982         (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
10983         (dwarf2_fetch_die_type_sect_off): Likewise.
10984         (dwarf2_get_die_type): Likewise.
10985         (follow_die_sig_1): Use dwarf2_per_objfile from cu.
10986         (get_signatured_type): Likewise.
10987         (get_DW_AT_signature_type): Likewise.
10988         (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
10989         (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
10990         (cu_debug_loc_section): Likewise.
10991         (fill_in_loclist_baton): Likewise.
10992         (dwarf2_symbol_mark_computed): Likewise.
10993         (dwarf2_find_containing_comp_unit): Change objfile parameter to
10994         dwarf2_per_objfile.
10995         (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
10996         parameter.
10997         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
10998         (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
10999         (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
11000         (set_die_type): Use dwarf2_free_objfile from cu.
11001         (get_die_type_at_offset): Likewise.
11002         (dwarf2_per_objfile_free): Don't assign global variable.
11003         (debug_names) <constructor>: Add dwarf2_per_objfile
11004         parameter, update m_debugstrlookup construction.
11005         (debug_names::debug_str_lookup): Add dwarf2_per_objfile
11006         parameter.
11007         <m_dwarf2_per_objfile>: New field.
11008         <lookup>: Use m_dwarf2_per_objfile.
11009         (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
11010         (psyms_seen_size): Likewise.
11011         (write_gdbindex): Replace objfile parameter with
11012         dwarf2_per_objfile.
11013         (write_debug_names): Likewise.
11014         (write_psymtabs_to_index): Likewise.
11015         (save_gdb_index_command): Use get_dwarf2_per_objfile, update
11016         calls.
11017
11018 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
11019
11020         * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
11021         <dwarf2_per_objfile>: New field.
11022         (struct dwarf2_per_cu_data) <objfile>: Remove.
11023         <dwarf2_per_objfile>: New field.
11024         (create_cu_from_index_list): Assign dwarf2_per_objfile instead
11025         of objfile.
11026         (create_signatured_type_table_from_index): Likewise.
11027         (create_debug_type_hash_table): Likewise.
11028         (fill_in_sig_entry_from_dwo_entry): Likewise.
11029         (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
11030         (create_type_unit_group): Assign dwarf2_per_objfile instead of
11031         objfile.
11032         (create_partial_symtab): Access objfile through
11033         dwarf2_per_objfile.
11034         (process_psymtab_comp_unit_reader): Likewise.
11035         (read_comp_units_from_section): Likewise.
11036         (scan_partial_symbols): Likewise.
11037         (add_partial_symbol): Likewise.
11038         (add_partial_subprogram): Likewise.
11039         (peek_die_abbrev): Likewise.
11040         (fixup_go_packaging): Likewise.
11041         (process_full_comp_unit): Likewise.
11042         (process_full_type_unit): Likewise.
11043         (process_imported_unit_die): Likewise.
11044         (dwarf2_compute_name): Likewise.
11045         (dwarf2_physname): Likewise.
11046         (read_import_statement): Likewise.
11047         (create_cus_hash_table): Assign dwarf2_physname instead of
11048         objfile.
11049         (read_func_scope): Access objfile through dwarf2_per_objfile.
11050         (read_lexical_block_scope): Likewise.
11051         (read_call_site_scope): Likewise.
11052         (read_variable): Likewise.
11053         (dwarf2_rnglists_process): Likewise.
11054         (dwarf2_ranges_process): Likewise.
11055         (dwarf2_ranges_read): Likewise.
11056         (dwarf2_record_block_ranges): Likewise.
11057         (dwarf2_add_field): Likewise.
11058         (dwarf2_add_member_fn): Likewise.
11059         (read_structure_type): Likewise.
11060         (process_structure_scope): Likewise.
11061         (read_enumeration_type): Likewise.
11062         (read_array_type): Likewise.
11063         (read_common_block): Likewise.
11064         (read_namespace_type): Likewise.
11065         (read_namespace): Likewise.
11066         (read_module_type): Likewise.
11067         (read_tag_pointer_type): Likewise.
11068         (read_tag_ptr_to_member_type): Likewise.
11069         (read_tag_string_type): Likewise.
11070         (read_subroutine_type): Likewise.
11071         (read_typedef): Likewise.
11072         (read_base_type): Likewise.
11073         (attr_to_dynamic_prop): Likewise.
11074         (read_subrange_type): Likewise.
11075         (read_unspecified_type): Likewise.
11076         (load_partial_dies): Likewise.
11077         (read_partial_die): Likewise.
11078         (find_partial_die): Likewise.
11079         (guess_partial_die_structure_name): Likewise.
11080         (fixup_partial_die): Likewise.
11081         (read_attribute_value): Likewise.
11082         (read_addr_index_from_leb128): Likewise.
11083         (dwarf2_read_addr_index): Likewise.
11084         (dwarf2_string_attr): Likewise.
11085         (lnp_state_machine::check_line_address): Likewise.
11086         (dwarf_decode_lines_1): Likewise.
11087         (dwarf_decode_lines): Likewise.
11088         (dwarf2_start_symtab): Likewise.
11089         (var_decode_location): Likewise.
11090         (new_symbol_full): Likewise.
11091         (dwarf2_const_value_data): Likewise.
11092         (dwarf2_const_value_attr): Likewise.
11093         (dwarf2_const_value): Likewise.
11094         (die_type): Likewise.
11095         (die_containing_type): Likewise.
11096         (lookup_die_type): Likewise.
11097         (guess_full_die_structure_name): Likewise.
11098         (anonymous_struct_prefix): Likewise.
11099         (dwarf2_name): Likewise.
11100         (follow_die_ref_or_sig): Likewise.
11101         (follow_die_offset): Likewise.
11102         (follow_die_ref): Likewise.
11103         (dwarf2_fetch_die_loc_sect_off): Likewise.
11104         (dwarf2_fetch_constant_bytes): Likewise.
11105         (dwarf2_fetch_die_type_sect_off): Likewise.
11106         (dwarf2_get_die_type): Likewise.
11107         (follow_die_sig): Likewise.
11108         (decode_locdesc): Likewise.
11109         (dwarf2_per_cu_objfile): Likewise.
11110         (dwarf2_per_cu_text_offset): Likewise.
11111         (init_one_comp_unit): Assign dwarf2_per_objfile instead of
11112         objfile.
11113         (set_die_type): Access objfile through
11114         dwarf2_per_objfile.
11115
11116 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
11117
11118         * valprint.c (converted_character_d): Remove typedef.
11119         (DEF_VEC_O (converted_character_d)): Remove.
11120         (count_next_character): Use std::vector.
11121         (print_converted_chars_to_obstack): Likewise.
11122         (generic_printstr): Likewise.
11123
11124 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
11125
11126         * xml-support.h (struct gdb_xml_value): Add constructor.
11127         <value>: Change type to unique_xmalloc_ptr.
11128         (gdb_xml_value_s): Remove typedef.
11129         (DEF_VEC_O (gdb_xml_value_s)): Remove.
11130         (gdb_xml_element_start_handler): Change parameter type to
11131         std::vector.
11132         (xml_find_attribute): Likewise.
11133         * xml-support.c (xml_find_attribute): Change parameter type to
11134         std::vector and adjust.
11135         (gdb_xml_values_cleanup): Remove.
11136         (gdb_xml_parser::start_element): Adjust to std::vector.
11137         (xinclude_start_include): Change paraeter type to std::vector
11138         and adjust.
11139         * btrace.c (check_xml_btrace_version): Likewise.
11140         (parse_xml_btrace_block): Likewise.
11141         (parse_xml_btrace_pt_config_cpu): Likewise.
11142         (parse_xml_btrace_pt): Likewise.
11143         (parse_xml_btrace_conf_bts): Likewise.
11144         (parse_xml_btrace_conf_pt): Likewise.
11145         * memory-map.c (memory_map_start_memory): Likewise.
11146         (memory_map_start_property): Likewise.
11147         * osdata.c (osdata_start_osdata): Likewise.
11148         (osdata_start_item): Likewise.
11149         (osdata_start_column): Likewise.
11150         * remote.c (start_thread): Likewise.
11151         * solib-aix.c (library_list_start_library): Likewise.
11152         (library_list_start_list): Likewise.
11153         * solib-svr4.c (library_list_start_library): Likewise.
11154         (svr4_library_list_start_list): Likewise.
11155         * solib-target.c (library_list_start_segment): Likewise.
11156         (library_list_start_section): Likewise.
11157         (library_list_start_library): Likewise.
11158         (library_list_start_list): Likewise.
11159         * tracepoint.c (traceframe_info_start_memory): Likewise.
11160         (traceframe_info_start_tvar): Likewise.
11161         * xml-syscall.c (syscall_start_syscall): Likewise.
11162         * xml-tdesc.c (tdesc_start_target): Likewise.
11163         (tdesc_start_feature): Likewise.
11164         (tdesc_start_reg): Likewise.
11165         (tdesc_start_union): Likewise.
11166         (tdesc_start_struct): Likewise.
11167         (tdesc_start_flags): Likewise.
11168         (tdesc_start_enum): Likewise.
11169         (tdesc_start_field): Likewise.
11170         (tdesc_start_enum_value): Likewise.
11171         (tdesc_start_vector): Likewise.
11172
11173 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
11174
11175         * extension.h (struct xmethod_worker) <clone>: Remove.
11176         * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
11177         Remove.
11178         (python_xmethod_worker::clone): Remove.
11179         * valops.c (find_overload_match): Use std::move instead of
11180         clone.
11181
11182 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
11183
11184         * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
11185         (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
11186         <free_xmethod_worker_data>: Remove.
11187         <get_matching_xmethod_workers>: Chance VEC to std::vector.
11188         <get_xmethod_arg_types>: Remove.
11189         <get_xmethod_result_type>: Remove.
11190         <invoke_xmethod>: Remove.
11191         * extension.c (new_xmethod_worker): Remove.
11192         (clone_xmethod_worker): Remove.
11193         (get_matching_xmethod_workers): Return void, pass std::vector by
11194         pointer.
11195         (get_xmethod_arg_types): Rename to...
11196         (xmethod_worker::get_arg_types): ... this, and adjust.
11197         (get_xmethod_result_type): Rename to...
11198         (xmethod_worker::get_result_type): ... this, and adjust.
11199         (invoke_xmethod): Remove.
11200         (free_xmethod_worker): Remove.
11201         (free_xmethod_worker_vec): Remove.
11202         * extension.h (enum ext_lang_rc): Move here from
11203         extension-priv.h.
11204         (struct xmethod_worker): Add constructor and destructor.
11205         <data>: Remove.
11206         <value>: Remove.
11207         <invoke, clone, do_get_result_type, do_get_arg_types>: New
11208         virtual pure methods.
11209         <get_arg_types, get_result_type>: New methods.
11210         (xmethod_worker_ptr): Remove typedef.
11211         (DEF_VEC_P (xmethod_worker_ptr)): Remove.
11212         (xmethod_worker_vec): Remove typedef.
11213         (xmethod_worker_up): New typedef.
11214         (invoke_xmethod): Remove.
11215         (clone_xmethod_worker): Remove.
11216         (free_xmethod_worker): Remove.
11217         (free_xmethod_worker_vec): Remove.
11218         (get_xmethod_arg_types): Remove.
11219         (get_xmethod_result_type): Remove.
11220         * valops.c (find_method_list): Use std::vector, don't use
11221         intermediate vector.
11222         (value_find_oload_method_list): Use std::vector.
11223         (find_overload_match): Use std::vector.
11224         (find_oload_champ): Use std::vector.
11225         * value.c (value_free): Use operator delete.
11226         (value_of_xmethod): Rename to...
11227         (value_from_xmethod): ... this.  Don't assign
11228         xmethod_worker::value, take rvalue-reference.
11229         (result_type_of_xmethod): Adjust.
11230         (call_xmethod): Adjust.
11231         * value.h: Include extension.h.
11232         (struct xmethod_worker): Don't forward-declare.
11233         (value_of_xmethod): Rename to...
11234         (value_from_xmethod): ... this, take rvalue-reference.
11235         * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
11236         (struct python_xmethod_worker): ... this, add constructor and
11237         destructor.
11238         <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
11239         (gdbpy_free_xmethod_worker_data): Rename to...
11240         (python_xmethod_worker::~python_xmethod_worker): ... this and
11241         adjust.
11242         (gdbpy_clone_xmethod_worker_data): Rename to...
11243         (python_xmethod_worker::clone): ... this and adjust.
11244         (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
11245         temporary vector.
11246         (gdbpy_get_xmethod_arg_types): Rename to...
11247         (python_xmethod_worker::do_get_arg_types): ... this and adjust.
11248         (gdbpy_get_xmethod_result_type): Rename to...
11249         (python_xmethod_worker::do_get_result_type): ... this and
11250         adjust.
11251         (gdbpy_invoke_xmethod): Rename to...
11252         (python_xmethod_worker::invoke): ... this and adjust.
11253         (new_python_xmethod_worker): Rename to...
11254         (python_xmethod_worker::python_xmethod_worker): ... this and
11255         adjust.
11256         * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
11257         Remove.
11258         (gdbpy_free_xmethod_worker_data): Remove.
11259         (gdbpy_get_matching_xmethod_workers): Use std::vector.
11260         (gdbpy_get_xmethod_arg_types): Remove.
11261         (gdbpy_get_xmethod_result_type): Remove.
11262         (gdbpy_invoke_xmethod): Remove.
11263         * python/python.c (python_extension_ops): Remove obsolete
11264         callbacks.
11265
11266 2018-01-05  Pedro Alves  <palves@redhat.com>
11267
11268         PR gdb/18653
11269         * common/signals-state-save-restore.c
11270         (save_original_signals_state): New parameter 'quiet'.  Warn if we
11271         find a custom handler preinstalled, instead of internal erroring.
11272         But only warn if !quiet.
11273         * common/signals-state-save-restore.h
11274         (save_original_signals_state): New parameter 'quiet'.
11275         * main.c (captured_main_1): Move save_original_signals_state call
11276         after option handling, and pass QUIET.
11277
11278 2018-01-05  Pedro Alves  <palves@redhat.com>
11279
11280         * spu-tdep.c (spu_catch_start): Pass
11281         symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
11282
11283 2018-01-05  Pedro Alves  <palves@redhat.com>
11284
11285         PR gdb/22670
11286         * ada-lang.c (literal_symbol_name_matcher): New function.
11287         (ada_get_symbol_name_matcher): Use it for
11288         symbol_name_match_type::SEARCH_NAME.
11289         * block.c (block_lookup_symbol): New parameter 'match_type'.  Pass
11290         it down instead of assuming symbol_name_match_type::FULL.
11291         * block.h (block_lookup_symbol): New parameter 'match_type'.
11292         * c-valprint.c (print_unpacked_pointer): Use
11293         lookup_symbol_search_name instead of lookup_symbol.
11294         * compile/compile-object-load.c (get_out_value_type): Pass down
11295         symbol_name_match_type::SEARCH_NAME.
11296         * cp-namespace.c (cp_basic_lookup_symbol): Pass down
11297         symbol_name_match_type::FULL.
11298         * cp-support.c (cp_get_symbol_name_matcher): Handle
11299         symbol_name_match_type::SEARCH_NAME.
11300         * infrun.c (insert_exception_resume_breakpoint): Use
11301         lookup_symbol_search_name.
11302         * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
11303         * psymtab.c (maintenance_check_psymtabs): Use
11304         symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
11305         * stack.c (print_frame_args): Use lookup_symbol_search_name and
11306         SYMBOL_SEARCH_NAME.
11307         * symtab.c (lookup_local_symbol): Don't demangle the lookup name
11308         if symbol_name_match_type::SEARCH_NAME.
11309         (lookup_symbol_in_language): Pass down
11310         symbol_name_match_type::FULL.
11311         (lookup_symbol_search_name): New.
11312         (lookup_language_this): Pass down
11313         symbol_name_match_type::SEARCH_NAME.
11314         (lookup_symbol_aux, lookup_local_symbol): New parameter
11315         'match_type'.  Pass it down.
11316         * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
11317         (lookup_symbol_search_name): New declaration.
11318         (lookup_symbol_in_block): New 'match_type' parameter.
11319
11320 2018-01-05  Pedro Alves  <palves@redhat.com>
11321
11322         PR gdb/22670
11323         * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
11324         ada_lookup_symbol.
11325         (ada_lookup_symbol): Reimplement in terms of
11326         ada_lookup_symbol_list, bits factored out from
11327         ada_lookup_encoded_symbol.
11328
11329 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
11330
11331         * ada-exp.y (write_object_renaming): When subscripting an array
11332         using a symbol as the index, pass the block in call to
11333         ada_lookup_encoded_symbol when looking that symbol up.
11334
11335 2018-01-05  Jerome Guitton  <guitton@adacore.com>
11336
11337         * ada-lang.c (ada_array_length): Use ada_index_type instead of
11338         TYPE_INDEX_TYPE.
11339
11340 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
11341
11342         * ada-lang.c (ada_to_fixed_value_create): Add handling of
11343         the case where VALUE_LVAL (val0) is not lval_memory.
11344
11345 2018-01-05  Xavier Roirand  <roirand@adacore.com>
11346
11347         * ada-valprint.c (print_optional_low_bound): Handle
11348         character-indexed array printing like boolean-indexed array
11349         printing.
11350
11351 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
11352
11353         * NEWS: Create a new section for the next release branch.
11354         Rename the section of the current branch, now that it has
11355         been cut.
11356
11357 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
11358
11359         GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
11360         * version.in: Bump version to 8.1.50.DATE-git.
11361
11362 2018-01-03  Xavier Roirand  <roirand@adacore.com>
11363
11364         * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
11365         Add field.
11366         * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
11367         Add field.
11368         (default_exception_support_info) <catch_handlers_sym>: Add field.
11369         (exception_support_info_fallback) <catch_handlers_sym>: Add field.
11370         (ada_exception_name_addr_1): Add "catch handlers" handling.
11371         (ada_exception_catchpoint_cond_string) <ex>: New parameter.
11372         Update all callers.
11373         (create_excep_cond_exprs) <ex>: Add parameter.
11374         (re_set_exception): Update create_excep_cond_exprs call.
11375         (print_it_exception, print_one_exception, print_mention_exception)
11376         (print_recreate_exception): Add "catch handler" handling.
11377         (allocate_location_catch_handlers, re_set_catch_handlers)
11378         (check_status_catch_handlers, print_it_catch_handlers)
11379         (print_one_catch_handlers, print_mention_catch_handlers)
11380         (print_recreate_catch_handlers): New function.
11381         (catch_handlers_breakpoint_ops): New variable.
11382         (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
11383         Add parameter.  Add "catch handler" handling.
11384         (ada_exception_sym_name, ada_exception_breakpoint_ops):
11385         Add "catch handler" handling.
11386         (ada_exception_catchpoint_cond_string): Add "catch handler"
11387         handling.
11388         (create_ada_exception_catchpoint): Update create_excep_cond_exprs
11389         call.
11390         (catch_ada_handlers_command): New function.
11391         (initialize_ada_catchpoint_ops): Initialize "catch handlers"
11392         operations structure.
11393         (_initialize_ada_language): Add "catch handlers" command entry.
11394         * NEWS: Document "catch handlers" feature.
11395
11396 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
11397
11398         * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
11399         account when creating the array type of the slice.
11400         (ada_value_slice): Likewise.
11401
11402 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
11403
11404         * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
11405         New enum value.
11406         (create_array_type_with_stride): Add byte_stride_prop parameter.
11407         * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
11408         New parameter.  Update all callers in this file.
11409         (array_type_has_dynamic_stride): New function.
11410         (is_dynamic_type_internal, resolve_dynamic_array): Add handling
11411         of arrays with dynamic byte strides.
11412         * dwarf2read.c (read_array_type): Add support for dynamic
11413         DW_AT_byte_stride attributes.
11414
11415 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
11416
11417         * dwarf2read.c (read_unspecified_type): Treat
11418         DW_TAG_enumeration_type DIEs from Ada units as stubs.
11419
11420 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
11421
11422         Update copyright year range in all GDB files.
11423
11424 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
11425
11426         * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
11427         and gdb/testsuite/gdb.base/step-line.c.
11428
11429 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
11430
11431         * copyright.py (main): Dump the contents of
11432         MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
11433         even if BY_HAND is empty.
11434
11435 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
11436
11437         * top.c (print_gdb_version): Update Copyright year in version
11438         message.
11439
11440 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
11441
11442         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
11443
11444 For older changes see ChangeLog-2017.
11445 \f
11446 Local Variables:
11447 mode: change-log
11448 left-margin: 8
11449 fill-column: 74
11450 version-control: never
11451 coding: utf-8
11452 End: