gdb: Make infrun.c:resume function static
[external/binutils.git] / gdb / ChangeLog
1 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
2
3         * infrun.c (resume): Make static, add forward declaration.
4         (proceed): Update header comment.
5         * infrun.h (resume): Delete declaration.
6
7 2018-08-09  Tom Tromey  <tom@tromey.com>
8
9         * riscv-tdep.h: Minor formatting fixes.
10
11 2018-08-09  Simon Marchi  <simon.marchi@ericsson.com>
12
13         * common/scoped_mmap.c (mmap_file): Silence ARI warning.
14         * dwarf-index-cache.c (create_dir_and_check): Likewise.
15         (test_mkdir_recursive): Likewise.
16         * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
17
18 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
19
20         * valarith.c (value_subscripted_rvalue): If an array is not in
21         memory, and we don't know the upper bound, then we can't know that
22         the requested element exists or not.
23
24 2018-08-08  Simon Marchi  <simon.marchi@ericsson.com>
25
26         * target.c (str_comma_list_concat_elem): Fix typo in comment.
27         (target_options_to_string): Add comment.
28
29 2018-08-08  Tom Tromey  <tom@tromey.com>
30
31         * unittests/scoped_mmap-selftests.c: Check result of "write".
32
33 2018-08-08  Jim Wilson  <jimw@sifive.com>
34
35         * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
36         (decode_register_index_short): New.
37         (decode_j_type_insn, decode_cj_type_insn): New.
38         (decode_b_type_insn, decode_cb_type_insn): New.
39         (riscv_insn::decode): Add support for jumps, branches, lr, and sc.  New
40         local xlen.  Check xlen when decoding ambiguous compressed insns.  In
41         compressed decode, use is_c_lui_insn instead of is_lui_insn, and
42         is_c_sw_insn instead of is_sw_insn.
43         (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
44         (riscv_software_single_step): New.
45         * riscv-tdep.h (riscv_software_single_step): Declare.
46
47         * riscv-tdep.c (riscv_isa_xlen): Drop static.
48         * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
49
50 2018-08-08  Andrew Burgess  <andrew.burgess@embecosm.com>
51
52         PR gdb/18050:
53         * target.c (dispose_inferior): Don't dispose of inferiors that are
54         already killed.
55
56 2018-08-08  Szabolcs Nagy  <szabolcs.nagy@arm.com>
57
58         * remote.c (remote_target::download_tracepoint): Change char* to
59         const char*.
60
61 2018-08-07  Simon Marchi  <simon.marchi@polymtl.ca>
62
63         * target.h (target_options_to_string): Return an std::string.
64         * target.c (str_comma_list_concat_elem): Return void, use
65         std::string.
66         (do_option): Likewise.
67         (target_options_to_string): Return an std::string.
68         * linux-nat.c (linux_nat_target::wait): Adjust.
69         * target-debug.h (target_debug_print_options): Adjust.
70
71 2018-08-07  Tom Tromey  <tom@tromey.com>
72
73         * Makefile.in (CPPFLAGS): New variable.
74         (INTERNAL_CPPFLAGS): Use it.
75
76 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
77
78         * NEWS: Mention the index cache.
79
80 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
81
82         * common/pathstuff.h (get_standard_cache_dir): New.
83         * common/pathstuff.c (get_standard_cache_dir): New.
84         * build-id.h (build_id_to_string): New.
85         * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
86         DEBUG_STR_SUFFIX): Move to here.
87         * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
88         DEBUG_STR_SUFFIX): Move from there.
89         (write_psymtabs_to_index): Make non-static, add basename
90         parameter.  Write to temporary files, rename when done.
91         (save_gdb_index_command): Adjust call to
92         write_psymtabs_to_index.
93         * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
94         field.
95         * dwarf2read.c (dwz_file) <index_cache_res>: New field.
96         (get_gdb_index_contents_from_cache): New.
97         (get_gdb_index_contents_from_cache_dwz): New.
98         (dwarf2_initialize_objfile): Read index from cache.
99         (dwarf2_build_psymtabs): Save to index.
100         * dwarf-index-cache.h: New file.
101         * dwarf-index-cache.c: New file.
102         * dwarf-index-write.h: New file.
103
104 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
105
106         * gnulib/aclocal.m4: Re-generate.
107         * gnulib/config.in: Re-generate.
108         * gnulib/configure: Re-generate.
109         * gnulib/import/Makefile.am: Re-generate.
110         * gnulib/import/Makefile.in: Re-generate.
111         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
112         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
113         * gnulib/import/m4/mkdir.m4: New file.
114         * gnulib/import/mkdir.c: New file.
115         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
116         module.
117
118 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
119
120         * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
121         * common/scoped_mmap.c: New file.
122         * common/scoped_mmap.h (destroy): New method.
123         (~scoped_mmap, reset): Use destroy.
124         (scoped_mmap): New move constructor.
125         (mmap_file): New declaration.
126         * unittests/scoped_mmap-selftests.c (test_normal,
127         test_invalid_filename, run_tests): New functions.
128         (_initialize_scoped_mmap_selftests): Register selftest.
129
130 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
131
132         * dwarf2read.c (read_gdb_index_from_section): Rename to...
133         (read_gdb_index_from_buffer): ... this.  Remove section
134         parameter, add buffer parameter.
135         (get_gdb_index_contents_ftype,
136         get_gdb_index_contents_dwz_ftype): New typedefs.
137         (dwarf2_read_gdb_index): Add callback parameters to get the
138         index contents.
139         (get_gdb_index_contents_from_section): New.
140         (dwarf2_initialize_objfile): Update call to
141         dwarf2_read_gdb_index.
142
143 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
144
145         * common/filestuff.h (gdb_fopen_cloexec): New overload.
146         (gdb_open_cloexec): Likewise.
147         * nat/linux-osdata.c (command_from_pid): Use string_printf.
148         (commandline_from_pid): Likewise.
149         (linux_xfer_osdata_threads): Likewise.
150         (linux_xfer_osdata_fds): Likewise.
151         * ada-lang.c (is_package_name): Likewise.
152         * auxv.c (procfs_xfer_auxv): Likewise.
153         * breakpoint.c (print_one_breakpoint_location): Use
154         uiout::field_fmt.
155         (print_one_catch_solib): Use string_printf.
156         * coff-pe-read.c (add_pe_exported_sym): Likewise.
157         (add_pe_forwarded_sym): Likewise.
158         * dwarf2read.c (create_type_unit_group): Likewise.
159         (build_error_marker_type): Likewise.
160         * infcall.c (get_function_name): Likewise.
161         * valprint.c (print_converted_chars_to_obstack): Likewise.
162         * xtensa-tdep.c (xtensa_register_type): Likewise.
163
164 2018-08-06  Simon Marchi  <simon.marchi@ericsson.com>
165
166         * remote.c (remote_target::download_tracepoint): Fix format
167         string errors.
168
169 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
170
171         * tracefile.c: Include common/byte-vector.h.
172         (trace_save): Change type of buf to gdb::byte_vector.  Initialize
173         with trace_regblock_size if needed.  Update uses of buf.
174
175 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
176
177         * tracepoint.h (collection_list) <m_regs_mask>: Change type to
178         std::vector<unsigned char>.
179         * tracepoint.c (collection_list::collection_list): Remove
180         m_regs_mask initializer from initializer list.  Resize
181         m_regs_mask using the largest remote register number.
182         (collection_list::add_remote_register): Remove size check on
183         m_regs_mask.  Use at to access element.
184         (collection_list::stringify): Change type of temp_buf to
185         gdb::char_vector.  Update uses of temp_buf.  Resize if needed to
186         stringify the register mask.  Use pack_hex_byte for the register
187         mask.
188
189 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
190
191         * tracepoint.h (class collection_list) <add_register>: Remove.
192         <add_remote_register, add_ax_registers, add_local_register>:
193         Declare.
194         <add_memrange>: Add scope parameter.
195         * tracepoint.c (encode_actions_1): Likewise.
196         (collection_list::add_register): Rename to ...
197         (collection_list::add_remote_register): ... this.  Update
198         comment.
199         (collection_list::add_ax_registers, add_local_register): New
200         methods.
201         (collection_list::add_memrange): Add scope parameter.  Call
202         add_local_register instead of add_register.
203         (finalize_tracepoint_aexpr): New function.
204         (collection_list::collect_symbol): Update calls to add_memrange.
205         Call add_local_register instead of add_register.  Call
206         add_ax_registers.  Call finalize_tracepoint_aexpr.
207         (encode_actions_1): Get remote regnos for $reg action.  Call
208         add_remote_register, add_ax_registers, and add_local_register.
209         Update call to add_memrange.  Call finalize_tracepoint_aexpr.
210         (validate_actionline): Call finalize_tracepoint_aexpr.
211
212 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
213
214         * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
215         Replace array buf with gdb::char_vector buf, of size
216         get_remote_packet_size ().  Replace references to buf and
217         BUF_SIZE to buf.data () and buf.size ().  Replace strcpy, strcat
218         and xsnprintf with snprintf.  Raise errors if the buffer is too
219         small.
220
221 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
222
223         * remote.c (remote_target::download_tracepoint): Fix the has_more
224         predicate in the QTDP action list iteration.
225
226 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
227
228         * remote.c (remote_target::download_tracepoint): Fix indentation
229         in for block.
230
231 2018-08-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
232
233         * proc-api.c (_initialize_proc_api): Remove c, unused.
234         * procfs.c (procfs_init_inferior): Remove signals, unused.
235         (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
236         unused.
237
238 2018-08-06  Sergey Korolev  <s.korolev@ndmsystems.com>
239             Andrew Burgess  <andrew.burgess@embecosm.com>
240
241         * linux-nat.c (linux_nat_target::follow_fork): Avoid using
242         'W_STOPCODE (0)' as this could be ambiguous.
243
244 2018-08-03  Sergio Durigan Junior  <sergiodj@redhat.com>
245
246         * ser-tcp.c (net_open): Fix thinko when deciding whether to
247         disable TCP's Nagle algorithm (use "ai_protocol" instead of
248         "ai_socktype").
249
250 2018-08-02  Tom Tromey  <tom@tromey.com>
251
252         PR symtab/16842.
253         * dwarf2read.c (read_func_scope): Set symtab on template parameter
254         symbols.
255         (process_structure_scope): Likewise.
256
257 2018-08-02  Xavier Roirand  <roirand@adacore.com>
258
259         PR gdb/22629:
260         * darwin-nat.c (darwin_kill_inferior): Fix handling of
261         kill inferior.
262
263 2018-08-02  Tom Tromey  <tom@tromey.com>
264
265         * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
266         (darwin_suspend_inferior, darwin_resume_inferior)
267         (darwin_decode_notify_message, darwin_resume_inferior_threads)
268         (darwin_check_new_threads): Check result of get_darwin_inferior.
269
270 2018-07-31  Joel Brobecker  <brobecker@adacore.com>
271
272         GDB 8.1.1 released.
273
274 2018-07-31  Jan Vrany  <jan.vrany@fit.cvut.cz>
275
276         * varobj.c (varobj_get_path_expr_parent): Report an error if
277         parent is a dynamic varobj.
278
279 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
280
281         * gnulib/aclocal.m4: Re-generate.
282         * gnulib/config.in: Re-generate.
283         * gnulib/configure: Re-generate.
284         * gnulib/import/Makefile.in: Re-generate.
285         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
286         * gnulib/import/m4/onceonly.m4: Re-generate.
287
288 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
289
290         * target-descriptions.c (struct xml_test_tdesc): New.
291         (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
292         (record_xml_tdesc): Update.
293         (maintenance_check_xml_descriptions): Update.
294         * target-descriptions.h (record_xml_tdesc): Update comment.
295
296 2018-07-30  Andrew Burgess  <andrew.burgess@embecosm.com>
297
298         * eval.c (evaluate_subexp_for_sizeof): Check for array type before
299         checking array bounds are defined.
300
301 2018-07-30  Tom Tromey  <tom@tromey.com>
302
303         * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
304         irreflexivity violation.
305
306 2018-07-30  Tom Tromey  <tom@tromey.com>
307
308         * cli/cli-decode.c (lookup_cmd): Remove lint code.
309         * value.c (unpack_long): Remove lint code.
310         * valops.c (value_ind): Remove lint code.
311         * valarith.c (value_x_binop, value_x_unop, value_equal)
312         (value_pos): Remove lint code.
313
314 2018-07-28  Tom de Vries  <tdevries@suse.de>
315
316         * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
317         with undefined upper bound as <optimized out>.
318
319 2018-07-27  Sergio Durigan Junior  <sergiodj@redhat.com>
320
321         * gcore.in: Rename variable "name" to "prefix".  Expand
322         "usage" text.
323
324 2018-07-14  Jon Turney  <jon.turney@dronecode.org.uk>
325
326         * windows-nat.c (windows_nat_target::create_inferior): Update to
327         call close() in global namespace.
328
329 2018-07-26  Tom Tromey  <tom@tromey.com>
330
331         * dwarf-index-write.c (add_address_entry): Don't add objfile
332         offsets.
333         * dbxread.c (find_stab_function): Rename from
334         find_stab_function_addr.  Return a bound_minimal_symbol.
335         (read_dbx_symtab): Use raw_text_low, raw_text_high.
336         Don't add objfile offsets.
337         (end_psymtab): Use raw_text_low, raw_text_high,
338         MSYMBOL_VALUE_RAW_ADDRESS.
339         (read_ofile_symtab): Update.
340         (process_one_symbol): Update.
341         * dwarf2read.c (create_addrmap_from_index): Don't add objfile
342         offsets.
343         (dw2_relocate): Remove.
344         (dw2_find_pc_sect_symtab): Bias PC by the text offset before
345         searching addrmap.
346         (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
347         Update.
348         (process_psymtab_comp_unit_reader, add_partial_symbol)
349         (add_partial_subprogram, dwarf2_ranges_read): Update.
350         (load_partial_dies): Update.
351         (add_address_entry): Don't add objfile offsets.
352         (dwarf2_build_include_psymtabs): Update.
353         (create_addrmap_from_aranges): Don't add objfile offsets.
354         (dw2_find_pc_sect_compunit_symtab): Update.
355         * mdebugread.c (parse_symbol): Don't add objfile offsets.
356         (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
357         Update.
358         (parse_partial_symbols): Don't add objfile offsets.  Use
359         raw_text_low, raw_text_high.  Update.
360         (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
361         * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
362         or call 'relocate' quick function.  Clear psymbol_map.
363         * psympriv.h (struct partial_symbol) <address>: Add section
364         offset.
365         <set_unrelocated_address>: Rename from set_address.
366         <raw_text_low, raw_text_high>: New methods.
367         <text_low, text_high>: Add objfile parameter.
368         (add_psymbol_to_bcache): Add 'section' parameter.  Call
369         set_unrelocated_address.
370         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
371         (find_pc_psymbol): Update.
372         (fixup_psymbol_section, relocate_psymtabs): Remove.
373         (dump_psymtab, psym_functions): Update.
374         (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
375         parameter.
376         (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
377         (start_psymtab_common): Update.
378         * symfile-debug.c (debug_qf_relocate): Remove.
379         (debug_sym_quick_functions): Update.
380         * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
381         * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
382         Update.
383
384 2018-07-26  Tom Tromey  <tromey@redhat.com>
385
386         * dbxread.c (end_psymtab): Use text_high_valid and
387         text_low_valid.
388         * mdebugread.c (parse_partial_symbols): Use text_low_valid.
389         (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
390         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
391         Update comment.
392         <text_low_valid, text_high_valid>: New fields.
393         <set_text_low, set_text_high>: Update.
394         * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
395
396 2018-07-26  Tom Tromey  <tom@tromey.com>
397
398         * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
399         Update.
400         * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
401         textlow and texthigh fields.
402         (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
403         Update.
404         * mdebugread.c (parse_lines, parse_partial_symbols)
405         (psymtab_to_symtab_1): Update.
406         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
407         Rename fields.  Update comment.  Now private.
408         <text_low, text_high, set_text_low, set_text_high>: New methods.
409         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
410         (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
411         (start_psymtab_common, maintenance_info_psymtabs)
412         (maintenance_check_psymtabs): Update.
413         * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
414         texthigh fields.
415         (scan_xcoff_symtab): Update.
416
417 2018-07-26  Tom Tromey  <tromey@redhat.com>
418
419         * psympriv.h (struct partial_symbol) <unrelocated_address,
420         address, set_address>: New methods.
421         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
422         (fixup_psymbol_section, relocate_psymtabs): Update.
423         (print_partial_symbols): Add 'objfile' parameter.  Update.
424         (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
425         Update.
426
427 2018-07-26  Tom Tromey  <tom@tromey.com>
428
429         * dwarf-index-write.c (write_psymbols, debug_names::insert)
430         (debug_names::write_psymbols): Update.
431         * psympriv.h (struct partial_symbol): Derive from
432         general_symbol_info.
433         <obj_section>: New method.
434         (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
435         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
436         (find_pc_sect_psymbol, fixup_psymbol_section)
437         (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
438         (print_partial_symbols, recursively_search_psymtabs)
439         (compare_psymbols, psymbol_hash, psymbol_compare)
440         (add_psymbol_to_bcache, maintenance_check_psymtabs)
441         (psymbol_name_matches, psym_fill_psymbol_map): Update.
442
443 2018-07-26  Tom Tromey  <tromey@redhat.com>
444
445         * dbxread.c (end_psymtab): Remove dead code.
446
447 2018-07-26  Andrew Burgess  <andrew.burgess@embecosm.com>
448
449         * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
450         DWARF unwinders are disabled.
451         * dwarf2-frame.c: Add dwarf2read.h include.
452         (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
453         disabled.
454         (dwarf2_frame_unwinders_enabled_p): Define.
455         (show_dwarf_unwinders_enabled_p): New function.
456         (_initialize_dwarf2_frame): Register switch to control DWARF
457         unwinder use.
458         * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
459         * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
460         (show_dwarf_cmdlist): Remove static keyword.
461         * dwarf2read.h (set_dwarf_cmdlist): Declare.
462         (show_dwarf_cmdlist): Declare.
463         * NEWS: Document new feature.
464
465 2018-07-26  Tom de Vries  <tdevries@suse.de>
466
467         PR breakpoints/23366
468         * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
469
470 2018-07-26  Tom de Vries  <tdevries@suse.de>
471
472         * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
473         DW_AT_count can't be translated to a dynamic prop.
474
475 2018-07-25  Tom de Vries  <tdevries@suse.de>
476
477         * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
478         try/catch.
479
480 2018-07-25  Jan Vrany  <jan.vrany@fit.cvut.cz>
481
482         * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
483
484 2018-07-25  Joel Brobecker  <brobecker@adacore.com>
485
486         * MAINTAINERS (Global Maintainers): Add Tom Tromey.
487
488 2018-07-24  Keith Seitz  <keiths@redhat.comt
489
490         PR symtab/23010
491         * dwarf2read.c (dw2_add_symbol_to_list): New function.
492         (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
493         instead of add_symbol_to_list.
494         (read_file_scope): Call prepare_one_comp_unit before reading
495         any other DIEs.
496
497 2018-07-24  Simon Marchi  <simon.marchi@ericsson.com>
498
499         * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
500
501 2018-07-24  Tom Tromey  <tom@tromey.com>
502
503         * utils.c (malloc, realloc, free): Don't declare.
504         * configure, config.in: Rebuild.
505         * configure.ac: Don't check for declarations of free, malloc, or
506         realloc.
507
508 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
509
510         * aarch64-linux-nat.c
511         (aarch64_linux_nat_target::stopped_data_address): Remove unused
512         variable.
513         * arm-linux-nat.c (fetch_regs): Likewise.
514         (store_regs): Likewise.
515         (fetch_vfp_regs): Likewise.
516         (store_vfp_regs): Likewise.
517         (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
518         (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
519         (arm_linux_nat_target::insert_watchpoint): Likewise.
520         (arm_linux_nat_target::remove_watchpoint): Likewise.
521         * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
522         Likewise.
523         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
524         Likewise.
525         * ppc-linux-nat.c (fetch_register): Likewise.
526         (fetch_all_gp_regs): Likewise.
527         (fetch_ppc_registers): Likewise.
528         (store_all_gp_regs): Likewise.
529         (store_ppc_registers): Likewise.
530         (hwdebug_insert_point): Likewise.
531         (can_use_watchpoint_cond_accel): Likewise.
532         * remote-sim.c (gdb_os_write_stdout): Likewise.
533
534 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
535             Tom Tromey  <tom@tromey.com>
536
537         * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
538         test for it.
539         * configure: Rebuild.
540
541 2018-07-22  Tom Tromey  <tom@tromey.com>
542
543         * regformats/regdat.sh: Define xmltarget_${name} inside
544         #ifndef IN_PROCESS_AGENT.
545
546 2018-07-22  Tom Tromey  <tom@tromey.com>
547
548         * value.c (value_fetch_lazy_bitfield): Remove unused variable.
549
550 2018-07-22  Tom Tromey  <tom@tromey.com>
551
552         * symfile.c (reread_symbols): Notify iter, not objfile.
553
554 2018-07-22  Tom Tromey  <tom@tromey.com>
555
556         * ravenscar-thread.c (ravenscar_thread_target::store_registers):
557         Use arch_ops.
558         (ravenscar_thread_target::prepare_to_store): Likewise.
559
560 2018-07-22  Tom Tromey  <tom@tromey.com>
561
562         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
563         unused variable.  Call value_fetch_lazy when needed.
564         * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
565         Remove unused variable.  Call value_fetch_lazy when needed.
566
567 2018-07-22  Tom Tromey  <tom@tromey.com>
568
569         * m32c-tdep.c (mark_dma): Return void.
570         (make_regs): Remove unused declarations.
571
572 2018-07-22  Tom Tromey  <tom@tromey.com>
573
574         * guile/scm-cmd.c (gdbscm_dont_repeat): Call
575         cmdscm_get_valid_command_smob_arg_unsafe for effect.
576         * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
577         bkscm_get_valid_block_smob_arg_unsafe for effect.
578
579 2018-07-22  Tom Tromey  <tom@tromey.com>
580
581         * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
582         value_type.
583
584 2018-07-22  Tom Tromey  <tom@tromey.com>
585
586         * windows-nat.c (saved_context): Conditionally define.
587         * remote.c (remote_target::remote_btrace_maybe_reopen):
588         Conditionally declare "warned".
589         * inflow.c (sigquit_ours): Conditionally define.
590         (new_tty): Move "tty" declaration inside #if.
591         * guile/guile.c (guile_datadir): Conditionally define.
592         * charset.c (set_be_le_names): Move some declarations inside #if.
593         * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
594         #if.
595         (parse_xml_btrace_conf): Likewise.
596
597 2018-07-22  Tom Tromey  <tom@tromey.com>
598
599         * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
600
601 2018-07-22  Tom Tromey  <tom@tromey.com>
602
603         * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
604         * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
605         (vlscm_convert_typed_value_from_scheme): Remove unused variable.
606         * buildsym-legacy.c (get_macro_table): Remove unused variable.
607         * stack.c (frame_apply_level_command): Remove unused variable.
608         * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
609         * sparc64-tdep.c (adi_examine_command): Remove unused variable.
610         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
611         unused variable.
612         * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
613         * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
614         * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
615         variable.
616         * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
617         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
618         variable.
619         * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
620         Remove unused variable.
621         * cli/cli-script.c (recurse_read_control_structure): Remove unused
622         variable.
623         * common/tdesc.c (print_xml_feature::visit): Remove unused
624         variable.
625         * compile/compile-object-load.c (store_regs): Remove unused
626         variables.
627         * complaints.c (clear_complaints): Remove unused variable.
628         * corelow.c (core_target_open): Remove unused variable.
629         * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
630         variable.
631         * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
632         variable.
633         * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
634         variable.
635         * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
636         variable.
637         * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
638         variable.
639         * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
640         variable.
641         * ia64-tdep.c (examine_prologue): Remove unused variable.
642         * infcall.c (run_inferior_call): Remove unused variable.
643         * inferior.c (exit_inferior): Remove unused variable.
644         * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
645         * linespec.c (decode_line_2): Remove unused variable.
646         * linux-nat.c (super_close): Remove.
647         * linux-tdep.c (linux_info_proc): Remove unused variable.
648         * mi/mi-main.c (mi_execute_command): Remove unused variable.
649         * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
650         Remove unused variable.
651         * parse.c (find_minsym_type_and_address): Remove unused variable.
652         * printcmd.c (info_symbol_command, printf_floating): Remove unused
653         variable.
654         * python/py-breakpoint.c (bppy_set_commands): Remove unused
655         variable.
656         * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
657         variables.
658         * record-btrace.c (record_btrace_target::store_registers): Remove
659         unused variable.
660         (cmd_show_record_btrace_cpu): Remove unused variable.
661         * riscv-tdep.c (riscv_register_reggroup_p)
662         (riscv_push_dummy_call, riscv_return_value): Remove unused
663         variable.
664         * rust-exp.y (literal): Remove unused variable.
665         * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
666         unused variable.
667         <STRUCTOP_ANONYMOUS>: Likewise.
668         * s390-linux-tdep.c (s390_linux_init_abi_31)
669         (s390_linux_init_abi_64): Remove unused variable.
670         * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
671         (file_select_thread, net_windows_open, _initialize_ser_windows):
672         Remove unused variables.
673         * symtab.c (find_pc_sect_line): Remove unused variable.
674         * target-memory.c (compute_garbled_blocks): Remove unused
675         variable.
676         (target_write_memory_blocks): Remove unused variable.
677         * target.c (target_stack::unpush): Remove unused variables.
678         * tracepoint.c (start_tracing, all_tracepoint_actions)
679         (merge_uploaded_trace_state_variables)
680         (print_one_static_tracepoint_marker): Remove unused variable.
681         * unittests/basic_string_view/element_access/char/1.cc (test01):
682         Remove unused variable.
683         * windows-nat.c (windows_continue, windows_add_all_dlls)
684         (do_initial_windows_stuff, windows_nat_target::create_inferior):
685         Remove unused variables.
686
687 2018-07-21  Simon Marchi  <simon.marchi@polymtl.ca>
688
689         * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
690         attr_profile in HAVE_ELF.
691         * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
692         HAVE_ELF.
693
694 2018-07-20  Simon Marchi  <simon.marchi@polymtl.ca>
695
696         * frame.c (frame_register_unwind): Change parameter name.
697         (frame_unwind_register): Likewise.
698         (frame_unwind_register_value): Likewise.
699         (frame_unwind_register_signed): Likewise.
700         (frame_unwind_register_unsigned): Likewise.
701         * frame.h (frame_register_unwind): Likewise.
702         (frame_unwind_register): Likewise.
703         (frame_unwind_register_value): Likewise.
704         (frame_unwind_register_signed): Likewise.
705         (frame_unwind_register_unsigned): Likewise.
706         (frame_unwind_arch): Likewise.
707
708 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
709
710         * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
711         ISA maintenance.
712
713 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
714
715         * mips-linux-nat.c (mips_linux_nat_target::read_description):
716         Call `get_ptrace_pid' rather than extracting the ptrace PID by
717         hand.
718
719 2018-07-20  Keith Seitz  <keiths@redhat.com>
720
721         * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
722         m_main_subfile, m_comp_dir, m_producer, m_debugformat,
723         m_compunit_symtab, m_language>: Add "m_" prefix.
724         Update all uses.
725         * buildsym.c: Update all uses.
726
727 2018-07-20  Tom Tromey  <tom@tromey.com>
728
729         * buildsym-legacy.h (record_line): Don't use record_line_ftype.
730         * buildsym.h (record_line_ftype): Remove typedef.
731
732 2018-07-20  Tom Tromey  <tom@tromey.com>
733
734         * buildsym-legacy.h (augment_type_symtab): Don't declare.
735         (end_expandable_symtab): Likewise.
736         (end_symtab_get_static_block): Likewise.
737         (end_symtab_from_static_block): Likewise.
738         * buildsym-legacy.c (augment_type_symtab): Remove.
739         (end_expandable_symtab): Remove.
740         (end_symtab_get_static_block): Remove.
741         (end_symtab_from_static_block): Remove.
742
743 2018-07-20  Tom Tromey  <tom@tromey.com>
744
745         * dwarf2read.c: Include buildsym.h.
746         (struct dwarf2_cu) <builder>: New method.
747         (fixup_go_packaging): Update.
748         (process_full_comp_unit, process_full_type_unit): Update.  Don't
749         use scoped_free_pendings.
750         (using_directives): Add "cu" parameter, remove "language".
751         (read_import_statement, setup_type_unit_groups, )
752         (read_func_scope, read_lexical_block_scope)
753         (dwarf2_record_block_ranges, read_namespace): Update.
754         (lnp_state_machine::lnp_state_machine): Add cu parameter.
755         (lnp_state_machine::handle_end_sequence): Update.
756         (class lnp_state_machine) <m_cu>: New member.
757         <m_record_line_callback>: Remove.
758         <m_currently_recording_lines>: New member.
759         (lnp_state_machine::handle_set_file): Update.
760         (noop_record_line): Remove.
761         (dwarf_record_line_p): Add cu parameter.
762         (dwarf_record_line_1, dwarf_finish_line): Likewise.
763         (lnp_state_machine::record_line)
764         (lnp_state_machine::lnp_state_machine)
765         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
766         (dwarf_decode_lines): Update.
767         (dwarf2_start_subfile): Add cu parameter.
768         (dwarf2_start_symtab, new_symbol): Update.
769         (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
770         Remove dwarf2_per_objfile parameter.
771         (dwarf_decode_macros): Update.
772
773 2018-07-20  Tom Tromey  <tom@tromey.com>
774
775         * stabsread.c (define_symbol): Update.
776         * buildsym-legacy.h (get_buildsym_compunit): Declare.
777         * dwarf2read.c (new_symbol): Update.
778         * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
779         * cp-namespace.c: Include buildsym.h.
780         (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
781         * buildsym-legacy.c (get_buildsym_compunit): New function.
782
783 2018-07-20  Tom Tromey  <tom@tromey.com>
784
785         * xcoffread.c: Include buildsym-legacy.h.
786         * windows-nat.c: Include buildsym-legacy.h.
787         * stabsread.c: Include buildsym-legacy.h.
788         * mdebugread.c: Include buildsym-legacy.h.
789         * buildsym-legacy.h: New file.
790         * buildsym-legacy.c: New file, from buildsym.c.
791         * go32-nat.c: Include buildsym-legacy.h.
792         * dwarf2read.c: Include buildsym-legacy.h.
793         * dbxread.c: Include buildsym-legacy.h.
794         * cp-namespace.c: Include buildsym-legacy.h.
795         * coffread.c: Include buildsym-legacy.h.
796         * buildsym.h: Move some contents to buildsym-legacy.h.
797         * buildsym.c: Include buildsym-legacy.h.  Move many functions to
798         buildsym-legacy.c.
799         * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
800
801 2018-07-20  Tom Tromey  <tom@tromey.com>
802
803         * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
804         * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
805         (buildsym_compunit::buildsym_compunit)
806         (buildsym_compunit::~buildsym_compunit)
807         (buildsym_compunit::get_macro_table): Define.
808
809 2018-07-20  Tom Tromey  <tom@tromey.com>
810
811         * buildsym.c (reset_symtab_globals): Remove.
812         (buildsym_compunit::end_symtab_from_static_block): Update.
813         (buildsym_compunit::augment_type_symtab): Update.
814         (end_symtab_from_static_block): Call free_buildsym_compunit.
815         (augment_type_symtab, end_symtab, end_expandable_symtab):
816         Likewise.
817
818 2018-07-20  Tom Tromey  <tom@tromey.com>
819
820         * arch-utils.c: Do not include buildsym.h.
821         * mipsread.c: Do not include buildsym.h.
822         * machoread.c: Do not include buildsym.h.
823         * elfread.c: Do not include buildsym.h.
824
825 2018-07-20  Tom Tromey  <tom@tromey.com>
826
827         * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
828         initialization.
829         (buildsym_compunit): Add new constructor.
830         (struct buildsym_compunit) <get_last_source_file, finish_block,
831         record_block_range, start_subfile, patch_subfile_names,
832         push_subfile, pop_subfile, record_line, get_compunit_symtab,
833         set_last_source_start_addr, get_last_source_start_addr,
834         get_local_using_directives, set_local_using_directives,
835         get_global_using_directives, outermost_context_p,
836         get_current_context_stack, get_context_stack_depth,
837         get_current_subfile, get_local_symbols, get_file_symbols,
838         get_global_symbols, record_debugformat, record_producer,
839         push_context, pop_context, end_symtab_get_static_block,
840         end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
841         New public methods.
842         <record_pending_block, finish_block_internal, make_blockvector,
843         watch_main_source_file_lossage, end_symtab_with_blockvector>: New
844         private methods.
845         Update all users.
846
847 2018-05-22  Tom Tromey  <tom@tromey.com>
848
849         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
850         parameter.
851         (finish_block_internal): Update.
852
853 2018-07-20  Tom Tromey  <tom@tromey.com>
854
855         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
856         parameter.
857         (finish_block_internal): Update.
858
859 2018-07-20  Tom Tromey  <tom@tromey.com>
860
861         * buildsym.h (EXTERN): Don't define or undef.
862         * buildsym.c (EXTERN): Don't define.
863
864 2018-07-20  Tom Tromey  <tom@tromey.com>
865
866         * buildsym.c: Remove TODO comment.
867
868 2018-07-20  Tom Tromey  <tom@tromey.com>
869
870         * coffread.c (coff_symtab_read): Update.
871         * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
872         (xcoff_new_init): Update.
873         * mipsread.c (mipscoff_new_init): Update.
874         * mdebugread.c (mdebug_build_psymtabs): Update.
875         * elfread.c (elf_new_init): Update.
876         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
877         Update.
878         * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
879         (coffstab_build_psymtabs, elfstab_build_psymtabs)
880         (stabsect_build_psymtabs): Update.
881         * buildsym.h (buildsym_init): Don't declare.
882         * buildsym.c: Update comment.
883         (prepare_for_building): Remove.
884         (start_symtab, restart_symtab): Update.
885         (reset_symtab_globals): Update comment.
886         (buildsym_init): Remove.
887
888 2018-07-20  Tom Tromey  <tom@tromey.com>
889
890         * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
891         * stabsread.c (patch_block_stabs, define_symbol, read_type)
892         (read_enum_type, common_block_start, common_block_end)
893         (cleanup_undefined_types_1, finish_global_stabs): Update.
894         * mdebugread.c (psymtab_to_symtab_1): Update.
895         * dwarf2read.c (fixup_go_packaging, read_func_scope)
896         (read_lexical_block_scope, new_symbol): Update.
897         * dbxread.c (process_one_symbol): Update.
898         * coffread.c (coff_symtab_read, process_coff_symbol)
899         (coff_read_enum_type): Update.
900         * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
901         declare.
902         (get_local_symbols, get_file_symbols, get_global_symbols): New
903         functions.
904         * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
905         m_global_symbols.
906         <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
907         (~scoped_free_pendings): Update.
908         (finish_block, prepare_for_building, reset_symtab_globals)
909         (end_symtab_get_static_block, end_symtab_with_blockvector)
910         (augment_type_symtab, push_context): Update.
911         (get_local_symbols, get_file_symbols, get_global_symbols): New
912         functions.
913         (buildsym_init): Update.
914
915 2018-07-20  Tom Tromey  <tom@tromey.com>
916
917         * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
918         (process_full_type_unit): Likewise.
919         (dwarf2_start_symtab): Set list_in_scope.
920
921 2018-07-20  Tom Tromey  <tom@tromey.com>
922
923         * dwarf2read.c (process_psymtab_comp_unit_reader)
924         (build_type_psymtabs_reader): Do not set list_in_scope.
925
926 2018-07-20  Tom Tromey  <tom@tromey.com>
927
928         * buildsym.c (free_pendings): Remove.
929         (add_symbol_to_list, scoped_free_pendings)
930         (finish_block_internal, buildsym_init): Update.
931
932 2018-07-20  Tom Tromey  <tom@tromey.com>
933
934         * xcoffread.c (read_xcoff_symtab): Update.
935         * dwarf2read.c (read_func_scope, read_lexical_block_scope):
936         Update.
937         * dbxread.c (process_one_symbol): Update.
938         * coffread.c (coff_symtab_read): Update.
939         * buildsym.h (finish_block): Update.
940         * buildsym.c (finish_block): Remove "listhead" argument.
941         (end_symtab_get_static_block): Update.
942
943 2018-07-20  Tom Tromey  <tom@tromey.com>
944
945         * buildsym.h (class scoped_free_pendings): Remove constructor.
946         * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
947         method.
948         <m_pending_block_obstack, m_pending_blocks>: New members.
949         (pending_block_obstack, pending_blocks): Remove.
950         (scoped_free_pendings::scoped_free_pendings): Default.
951         (~scoped_free_pendings): Update.
952         (free_pending_blocks): Remove.
953         (finish_block_internal, record_pending_block, make_blockvector)
954         (end_symtab_get_static_block, augment_type_symtab, push_context)
955         (buildsym_init): Update.
956
957 2018-07-20  Tom Tromey  <tom@tromey.com>
958
959         * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
960         m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
961         members.
962         (pending_addrmap, pending_addrmap_obstack)
963         (pending_addrmap_interesting): Remove.
964         (scoped_free_pendings, record_block_range, make_blockvector)
965         (prepare_for_building, reset_symtab_globals, buildsym_init):
966         Update.
967
968 2018-07-20  Tom Tromey  <tom@tromey.com>
969
970         * xcoffread.c (process_linenos): Update.
971         * stabsread.c (define_symbol, read_type, read_enum_type): Update.
972         * mdebugread.c (psymtab_to_symtab_1): Update.
973         * dwarf2read.c (setup_type_unit_groups)
974         (lnp_state_machine::handle_set_file, dwarf_record_line_p)
975         (lnp_state_machine::record_line, dwarf_decode_lines): Update.
976         * dbxread.c (process_one_symbol): Update.
977         * coffread.c (coff_symtab_read, enter_linenos)
978         (process_coff_symbol): Update.
979         * buildsym.h (current_subfile): Don't declare.
980         (get_current_subfile): Declare.
981         * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
982         member.
983         (start_subfile, free_buildsym_compunit, push_subfile)
984         (prepare_for_building, start_symtab): Update.
985         (get_current_subfile): New function.
986
987 2018-07-20  Tom Tromey  <tom@tromey.com>
988
989         * coffread.c (coff_symtab_read): Update.
990         * xcoffread.c (read_xcoff_symtab): Update.
991         * dwarf2read.c (new_symbol): Update.
992         (read_func_scope, read_lexical_block_scope): Update.
993         * dbxread.c (process_one_symbol): Update.
994         * buildsym.h (context_stack, context_stack_depth): Don't declare.
995         (outermost_context_p): Remove macro.
996         (outermost_context_p, get_current_context_stack)
997         (get_context_stack_depth): Declare.
998         (pop_context): Return struct context_stack.
999         * buildsym.c (struct buildsym_compunit) <m_context_stack: New
1000         member.
1001         (context_stack_size): Remove.
1002         (INITIAL_CONTEXT_STACK_SIZE): Remove.
1003         (prepare_for_building, end_symtab_get_static_block)
1004         (augment_type_symtab, push_context): Update.
1005         (pop_context): Return struct context_stack.
1006         (outermost_context_p, get_current_context_stack)
1007         (get_context_stack_depth): New functions.
1008         (buildsym_init): Update.
1009
1010 2018-07-20  Tom Tromey  <tom@tromey.com>
1011
1012         * rust-exp.y: Now a pure parser.  Update all rules.
1013         (%union): Move earlier.
1014         (current_parser, work_obstack): Remove globals.
1015         (rust_parser, ~rust_parser): Update.
1016         (class rust_parser) <copy_name, concat3, crate_name, super_name,
1017         lex_character, lex_number, lex_string, lex_identifier,
1018         rust_lookup_type, convert_params_to_types, convert_ast_to_type,
1019         convert_name, convert_params_to_expression,
1020         convert_ast_to_expression, ast_basic_type, ast_operation,
1021         ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
1022         ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
1023         ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
1024         ast_array_type, ast_slice_type, ast_reference_type,
1025         ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
1026         (rust_parse): Update.
1027         (rustyyerror, rustyylex): Add parser parameter.
1028         (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
1029         (rust_lex_stringish_test, rust_lex_test_sequence)
1030         (rust_lex_test_trailing_dot, rust_lex_test_completion)
1031         (rust_lex_test_push_back, rust_lex_tests): Update.
1032
1033 2018-07-19  Pedro Alves  <palves@redhat.com>
1034
1035         * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
1036         gdb::unique_xmalloc_ptr.
1037         * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
1038         Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
1039         * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
1040         copy-initialization.
1041         * guile/scm-pretty-print.c (ppscm_print_children): Use
1042         gdb::unique_xmalloc_ptr instead of cleanups.
1043         (gdbscm_apply_val_pretty_printer): Remove cleanups.
1044         * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
1045         gdb::unique_xmalloc_ptr.
1046         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
1047         Adjust to use gdb::unique_xmalloc_ptr.
1048         * guile/scm-utils.c (extract_arg): Adjust.
1049         * guile/scm-value.c (gdbscm_value_field): Adjust to use
1050         gdb::unique_xmalloc_ptr instead of a cleanup.
1051
1052 2018-07-19  Tom Tromey  <tom@tromey.com>
1053
1054         * utils.c (do_value_free_to_mark)
1055         (make_cleanup_value_free_to_mark): Remove.
1056         * utils.h (make_cleanup_value_free_to_mark): Remove.
1057
1058 2018-07-19  Pedro Alves  <palves@redhat.com>
1059
1060         * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
1061         forwarding reference.
1062
1063 2018-07-18  Pedro Alves  <palves@redhat.com>
1064
1065         * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
1066         gdbscm_wrap.  Use gdb::unique_xmalloc_ptr<char> instead of a
1067         cleanup.
1068
1069 2018-07-18  Pedro Alves  <palves@redhat.com>
1070
1071         * guile/guile-internal.h: Add comment about mixing GDB and Scheme
1072         exceptions.
1073         (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
1074         (gdbscm_wrap): New.
1075         * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
1076         directly instead of a cleanup.
1077         * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
1078         (vlscm_unop): ... this.  Reimplement using gdbscm_wrap.
1079         (vlscm_binop_gdbthrow): New, factored out from ...
1080         (vlscm_binop): ... this.  Reimplement using gdbscm_wrap.
1081         (vlscm_rich_compare): Use gdbscm_wrap.
1082         * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
1083         instead of a cleanup.
1084         (gdbscm_lookup_global_symbol): Use xfree directly instead of a
1085         cleanup.
1086         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
1087         Use xfree directly instead of a cleanup.
1088         * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
1089         Adjust to use gdbscm_wrap and scoped_value_mark.
1090         (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
1091         (gdbscm_value_address, gdbscm_value_dereference)
1092         (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
1093         scoped_value_mark.
1094         (gdbscm_value_dynamic_type): Use scoped_value_mark.
1095         (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
1096         scoped_value_mark.
1097         (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
1098         gdbscm_wrap and scoped_value_mark.
1099         (gdbscm_value_to_string): Use xfree directly instead of a
1100         cleanup.  Move 'buffer' unique_ptr to TRY scope.
1101         (gdbscm_value_to_lazy_string): Use xfree directly instead of a
1102         cleanup.  Move 'buffer' unique_ptr to TRY scope.  Use
1103         scoped_value_mark.
1104         (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
1105         (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
1106         scoped_value_mark.
1107         (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
1108         gdbscm_wrap.
1109
1110 2018-07-18  Tom de Vries  <tdevries@suse.de>
1111
1112         * findvar.c (default_read_var_value): Also resolve dynamic type for
1113         LOC_OPTIMIZED_OUT vars.
1114
1115 2018-07-18  Maciej W. Rozycki  <macro@mips.com>
1116
1117         * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
1118         decoding.
1119
1120 2018-07-17  Tom Tromey  <tom@tromey.com>
1121
1122         * guile/scm-param.c (pascm_set_func, pascm_show_func)
1123         (compute_enum_list, pascm_set_param_value_x)
1124         (gdbscm_parameter_value): Update.
1125         * guile/guile-internal.h (gdbscm_scm_to_string): Update.
1126         (gdbscm_scm_to_host_string): Update.
1127         * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
1128         Update.
1129         * guile/scm-cmd.c (cmdscm_add_completion): Update.
1130         * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
1131         * guile/scm-string.c (gdbscm_scm_to_string): Return
1132         unique_xmalloc_ptr.
1133         (gdbscm_scm_to_host_string): Likewise.
1134
1135 2018-07-17  Tom Tromey  <tom@tromey.com>
1136
1137         * guile/guile.c (gdbscm_eval_from_control_command): Update.
1138         * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
1139         * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
1140         * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
1141         unique_xmalloc_ptr.
1142
1143 2018-07-17  Tom Tromey  <tom@tromey.com>
1144
1145         * guile/scm-param.c (pascm_signal_setshow_error): Update.
1146         * guile/guile-internal.h (gdbscm_exception_message_to_string):
1147         Update.
1148         * guile/scm-cmd.c (cmdscm_function): Update.
1149         * guile/scm-pretty-print.c
1150         (ppscm_print_exception_unless_memory_error): Update.
1151         * guile/scm-exception.c (gdbscm_exception_message_to_string):
1152         Return unique_xmalloc_ptr.
1153
1154 2018-07-17  Tom Tromey  <tom@tromey.com>
1155
1156         * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
1157         Use string_printf.
1158
1159 2018-07-17  Jim Wilson  <jimw@sifive.com>
1160
1161         * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
1162         set_gdbarch_decr_pc_after_break.  Call riscv_read_misa_reg always.
1163         (riscv_gdbarch_init): Delete local has_compressed_isa.  Delete now
1164         unecessary braces after EF_RISCV_RVC test.  Delete call to
1165         set_gdbarch_decr_pc_after_break.
1166
1167         * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
1168         RISCV_LAST_FP_REGNUM + 1.
1169         (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
1170
1171 2018-07-17  Tom Tromey  <tom@tromey.com>
1172
1173         * configure.ac: Remove --disable-gdbcli.
1174         * configure: Rebuild.
1175         * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
1176         (SUBDIR_CLI_CFLAGS): Remove.
1177         (SFILES): Use SUBDIR_CLI_SRCS.
1178         (COMMON_OBS): Use SUBDIR_CLI_OBS.
1179
1180 2018-07-17  Tom Tromey  <tom@tromey.com>
1181
1182         PR gdb/18624:
1183         * coffread.c (coff_symtab_read): Use scoped_free_pendings.
1184
1185 2018-07-16  Jim Wilson  <jimw@sifive.com>
1186
1187         * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
1188
1189 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
1190
1191         * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
1192         variable.
1193         (libunwind_frame_sniffer): Likewise.
1194         (libunwind_frame_prev_register): Likewise.
1195         (libunwind_sigtramp_frame_sniffer): Likewise.
1196         * ia64-tdep.c (ia64_access_reg): Likewise.
1197         (ia64_access_rse_reg): Likewise.
1198         (ia64_libunwind_sigtramp_frame_this_id): Likewise.
1199         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
1200
1201 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
1202
1203         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
1204
1205 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
1206
1207         * remote-sim.c (gdbsim_target::close,
1208         gdbsim_target::mourn_inferior): Remove unused variables.
1209
1210 2018-07-16  Simon Marchi  <simon.marchi@polymtl.ca>
1211
1212         * ia64-tdep.c (ktab_buf): New global.
1213         (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
1214         (get_kernel_table): Adjust.
1215
1216 2018-07-16  Tom Tromey  <tom@tromey.com>
1217
1218         * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
1219         * dwarf2read.c (using_directives, new_symbol): Use
1220         outermost_context_p.
1221         * dbxread.c (process_one_symbol): Use outermost_context_p.
1222         * coffread.c (coff_symtab_read): Use outermost_context_p.
1223
1224 2018-07-16  Tom Tromey  <tom@tromey.com>
1225
1226         * dwarf2read.c (using_directives, read_func_scope)
1227         (read_lexical_block_scope): Update.
1228         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
1229         * buildsym.h (local_using_directives, global_using_directives):
1230         Don't declare.
1231         (get_local_using_directives, set_local_using_directives)
1232         (get_global_using_directives): Declare.
1233         * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
1234         m_global_using_directives>: New members.
1235         (finish_block_internal, prepare_for_building)
1236         (reset_symtab_globals, end_symtab_get_static_block)
1237         (push_context): Update.
1238         (get_local_using_directives, set_local_using_directives)
1239         (get_global_using_directives): New functions.
1240         (buildsym_init): Update.
1241
1242 2018-07-16  Tom Tromey  <tom@tromey.com>
1243
1244         * xcoffread.c (xcoff_initial_scan): Don't call
1245         free_pending_blocks.
1246         * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
1247         * buildsym.h (class scoped_free_pendings): Add constructor.
1248         (free_pending_blocks): Don't declare.
1249         * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
1250         (free_pending_blocks): Now static.
1251
1252 2018-07-16  Tom Tromey  <tom@tromey.com>
1253
1254         * buildsym.h (push_subfile, pop_subfile): Update declarations.
1255         * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
1256         member.
1257         (struct subfile_stack): Remove.
1258         (subfile_stack): Remove.
1259         (push_subfile, pop_subfile, buildsym_init): Update.
1260
1261 2018-07-16  Tom Tromey  <tom@tromey.com>
1262
1263         * buildsym.c (push_subfile): Use gdb_assert.
1264         (pop_subfile): Use gdb_assert.
1265
1266 2018-07-16  Tom Tromey  <tom@tromey.com>
1267
1268         * buildsym.h (merge_symbol_lists): Remove.
1269         * buildsym.c (merge_symbol_lists): Remove.
1270
1271 2018-07-16  Tom Tromey  <tom@tromey.com>
1272
1273         * stabsread.c (scan_file_globals): Update comment.
1274         * stabsread.h (scan_file_globals): Move from buildsym.h.
1275         * buildsym.h (scan_file_globals): Move to stabsread.h.
1276
1277 2018-07-16  Tom Tromey  <tom@tromey.com>
1278
1279         * xcoffread.c (xcoff_new_init): Update.
1280         * mipsread.c (mipscoff_new_init): Update.
1281         * mdebugread.c (mdebug_build_psymtabs): Update.
1282         * elfread.c (elf_new_init): Update.
1283         * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
1284         (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
1285         * buildsym.h (buildsym_new_init): Don't declare.
1286         * buildsym.c (buildsym_new_init): Remove.
1287
1288 2018-07-16  Tom Tromey  <tom@tromey.com>
1289
1290         * stabsread.h (within_function): Move from buildsym.h.
1291         * stabsread.c (start_stabs): Clear within_function.
1292         * coffread.c (coff_start_symtab): Clear within_function.
1293         * buildsym.h (within_function): Move to stabsread.h.
1294         * buildsym.c (prepare_for_building): Update.
1295
1296 2018-07-16  Tom Tromey  <tom@tromey.com>
1297
1298         * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
1299         * dwarf2read.c (dwarf2_start_symtab): Don't set
1300         processing_gcc_compilation.
1301         * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
1302
1303 2018-07-16  Tom Tromey  <tom@tromey.com>
1304
1305         * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
1306         (next_symbol_text_func): Move from buildsym.h.
1307         * stabsread.c (hashname): Move from buildsym.c.
1308         * buildsym.h (HASHSIZE, symnum, next_symbol_text)
1309         (next_symbol_text_func, hashname): Move to stabsread.h.
1310         * buildsym.c: Don't include bcache.h
1311         (hashname): Move to stasbread.c.
1312
1313 2018-07-16  Tom Tromey  <tom@tromey.com>
1314
1315         * buildsym.h (context_stack_size): Don't declare.
1316         * buildsym.c (context_stack_size): New global.
1317
1318 2018-07-16  Tom Tromey  <tom@tromey.com>
1319
1320         * dbxread.c (processing_acc_compilation): New global.
1321         * buildsym.h (processing_acc_compilation): Don't declare.
1322
1323 2018-07-16  Tom Tromey  <tom@tromey.com>
1324
1325         * xcoffread.c (aix_process_linenos, complete_symtab): Update.
1326         * dbxread.c (read_ofile_symtab): Update.
1327         * coffread.c (coff_start_symtab, coff_end_symtab): Update.
1328         * buildsym.h (last_source_start_addr): Remove.
1329         (set_last_source_start_addr, get_last_source_start_addr):
1330         Declare.
1331         * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
1332         parameter.
1333         (struct buildsym_compunit) <m_last_source_start_addr>: New
1334         member.
1335         (prepare_for_building): Remove start_addr parameter.
1336         (start_symtab, restart_symtab, end_symtab_get_static_block)
1337         (end_symtab_with_blockvector): Update.
1338         (set_last_source_start_addr, get_last_source_start_addr): New
1339         functions.
1340
1341 2018-07-16  Tom Tromey  <tom@tromey.com>
1342
1343         * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
1344         member.
1345         (have_line_numbers): Remove.
1346         (record_line, prepare_for_building, end_symtab_get_static_block)
1347         (augment_type_symtab): Update.
1348
1349 2018-07-16  Tom Tromey  <tom@tromey.com>
1350
1351         * buildsym.c (~buildsym_compunit): Free the macro table.
1352         (struct buildsym_compunit) <get_macro_table, release_macros>: New
1353         methods.
1354         <m_pending_macros>: New member.
1355         (pending_macros): Remove.
1356         (~scoped_free_pendings, get_macro_table, prepare_for_building)
1357         (reset_symtab_globals, end_symtab_get_static_block)
1358         (end_symtab_with_blockvector, augment_type_symtab)
1359         (buildsym_init): Update.
1360
1361 2018-07-16  Tom Tromey  <tom@tromey.com>
1362
1363         * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
1364         parameter.
1365         (buildsym_compunit::set_last_source_file): New method.
1366         <m_last_source_file>: New member.
1367         (prepare_for_building): Remove "name" parameter.
1368         (start_symtab, restart_symtab, reset_symtab_globals): Update.
1369         (last_source_file): Remove.
1370         (set_last_source_file, get_last_source_file): Update.
1371
1372 2018-07-16  Tom Tromey  <tom@tromey.com>
1373
1374         * buildsym.c (prepare_for_building): Add assert.
1375
1376 2018-07-16  Tom Tromey  <tom@tromey.com>
1377
1378         * buildsym.c (~buildsym_compunit): Update.
1379         (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
1380         (start_subfile, patch_subfile_names)
1381         (end_symtab_with_blockvector): Update.
1382
1383 2018-07-16  Tom Tromey  <tom@tromey.com>
1384
1385         * buildsym.c (struct buildsym_compunit): Add constructor,
1386         destructor, initializers.
1387         (start_buildsym_compunit): Remove.
1388         (free_buildsym_compunit): Use "delete".
1389         (start_symtab, restart_symtab): Use "new".
1390
1391 2018-07-13  Simon Marchi  <simon.marchi@polymtl.ca>
1392
1393         * symfile.c (set_objfile_default_section_offset): Remove struct
1394         keyword.
1395
1396 2018-07-14  Stafford Horne  <shorne@gmail.com>
1397
1398         * (Responsible Maintainers): Add myself as or1k maintainer.
1399
1400 2018-07-13  Tom Tromey  <tom@tromey.com>
1401
1402         * symfile.c (set_objfile_default_section_offset): Use extra braces
1403         around initializer.
1404
1405 2018-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1406
1407         * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
1408         non-branching basr.
1409
1410 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1411
1412         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1413         unittests/cli-utils-selftests.c
1414         * unittests/cli-utils-selftests.c: New file.
1415
1416 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1417
1418         * NEWS: Mention new commands. Mention change to 'thread apply'.
1419
1420 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1421
1422         * thread.c (thr_try_catch_cmd): New function.
1423         (thread_apply_all_command): Handle qcs flags.
1424         (thread_apply_command): Handle qcs flags.
1425         (taas_command): New function.
1426         (tfaas_command): New function.
1427         (_initialize_thread): Update to setup the new commands 'taas
1428         and 'tfaas'. Change doc string for 'thread apply'.
1429
1430 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1431
1432         * stack.c: (trailing_outermost_frame): New function, mostly
1433         extracted from backtrace_command_1.
1434         (leading_innermost_frame): New function.
1435         (backtrace_command_1): Update to call trailing_outermost_frame.
1436         (frame_apply_command_count): New function.
1437         (frame_apply_level_command): New function.
1438         (frame_apply_all_command): New function.
1439         (frame_apply_command): New function.
1440         (faas_command): New function.
1441         (frame_cmd_list): New variable.
1442         (_initialize_stack): Update to setup the new commands 'frame apply'
1443         and 'faas'.
1444
1445 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1446
1447         * cli-utils.c (number_or_range_parser::get_number): Only handle
1448         numbers or convenience var as numbers.
1449         (parse_flags): New function.
1450         (parse_flags_qcs): New function.
1451         (number_or_range_parser::finished): Ensure parsing end is detected
1452         before end of string.
1453         * cli-utils.h (parse_flags): New function.
1454         (parse_flags_qcs): New function.
1455         (number_or_range_parser): Remove m_finished bool.
1456         (number_or_range_parser::skip_range): Set m_in_range to false.
1457
1458 2018-07-12  Sergio Durigan Junior  <sergiodj@redhat.com>
1459
1460         * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
1461         on Windows.
1462
1463 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
1464             Jan Kratochvil  <jan.kratochvil@redhat.com>
1465             Paul Fertser  <fercerpav@gmail.com>
1466             Tsutomu Seki  <sekiriki@gmail.com>
1467             Pedro Alves  <palves@redhat.com>
1468
1469         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1470         'unittests/parse-connection-spec-selftests.c'.
1471         (COMMON_SFILES): Add 'common/netstuff.c'.
1472         (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
1473         * NEWS (Changes since GDB 8.2): Mention IPv6 support.
1474         * common/netstuff.c: New file.
1475         * common/netstuff.h: New file.
1476         * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
1477         (wait_for_connect): Update comment.  New parameter
1478         'gdb::optional<int> sock' instead of 'struct serial *scb'.
1479         Use 'sock' directly instead of 'scb->fd'.
1480         (try_connect): New function, with code from 'net_open'.
1481         (net_open): Rewrite main loop to deal with multiple
1482         sockets/addresses.  Handle IPv6-style hostnames; implement
1483         support for IPv6 connections.
1484         * unittests/parse-connection-spec-selftests.c: New file.
1485
1486 2018-07-11  Pedro Alves  <palves@redhat.com>
1487
1488         PR gdb/23377
1489         * remote.c (remote_target::remote_detach_pid): Call
1490         set_current_process.
1491
1492 2018-07-11  Pedro Alves  <palves@redhat.com>
1493
1494         * h8300-tdep.c (h8300_gdbarch_init): Remove
1495         set_gdbarch_ecoff_reg_to_regnum calls.
1496
1497 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
1498
1499         PR c++/23373
1500         * c-typeprint.c (c_type_print_base_struct_union): Don't print
1501         offsets/sizes for static members of a class/struct.
1502
1503 2018-07-11  Alan Hayward  <alan.hayward@arm.com>
1504
1505         * target-descriptions.c (tdesc_register_bitsize): Rename.
1506         * target-descriptions.h (tdesc_register_bitsize): Likewise.
1507         * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
1508         * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
1509
1510 2018-07-10  Tom Tromey  <tom@tromey.com>
1511
1512         * breakpoint.c (moribund_locations): Now static and a
1513         std::vector.
1514         (breakpoint_init_inferior, moribund_breakpoint_here_p)
1515         (build_bpstat_chain, update_global_location_list)
1516         (breakpoint_retire_moribund): Update.
1517         * breakpoint.h (bp_location_p): Remove typedef.  Don't declare
1518         VEC.
1519
1520 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
1521
1522         * riscv-tdep.c (riscv_is_fp_regno_p): New function.
1523         (riscv_register_reggroup_p): Use new function, remove unneeded
1524         parenthesis.
1525         (riscv_push_dummy_call): Extend assert to compare against xlen or
1526         flen based on register type.
1527
1528 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
1529
1530         * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
1531
1532 2018-07-09  Andrew Burgess  <andrew.burgess@embecosm.com>
1533
1534         * remote.c (show_hardware_watchpoint_limit): New function.
1535         (show_hardware_watchpoint_length_limit): New function.
1536         (show_hardware_breakpoint_limit): New function.
1537         (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
1538         where appropriate, update help text.
1539
1540 2018-07-09  Tom Tromey  <tom@tromey.com>
1541
1542         * Makefile.in (CDEPS): Don't mention XM_CDEPS.
1543         (CLIBS): Don't mention NAT_CLIBS.
1544
1545 2018-07-09  Tom Tromey  <tom@tromey.com>
1546
1547         * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
1548         (LIBGDB_OBS, clean mostlyclean): Update.
1549         (gdb$(EXEEXT), insight$(EXEEXT)): Update.
1550
1551 2018-07-09  Tom Tromey  <tom@tromey.com>
1552
1553         * Makefile.in (%.c: %.y): Use ECHO_YACC.
1554         (%.c: %.l): Use ECHO_LEX.  Just fail if flex not available.
1555         * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
1556
1557 2018-07-09  Tom Tromey  <tom@tromey.com>
1558
1559         * Makefile.in (ALLDEPFILES): Remove exec.c.
1560         (COMMON_OBS): Remove exec.o.
1561         (COMMON_SFILES): Add exec.c.
1562
1563 2018-07-09  Tom Tromey  <tom@tromey.com>
1564
1565         * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
1566
1567 2018-07-09  Tom Tromey  <tom@tromey.com>
1568
1569         * Makefile.in (clean mostlyclean): Remove stamp-version.
1570         (version.c): Depend on stamp-version.
1571         (stamp-version): New rule, from version.c rule.
1572
1573 2018-07-09  Tom Tromey  <tom@tromey.com>
1574
1575         * Makefile.in (init.c): Depend on stamp-init.
1576         (stamp-init): New rule, from init.c rule.
1577         (clean mostlyclean): Remove stamp-init.
1578
1579 2018-07-09  Tom Tromey  <tom@tromey.com>
1580
1581         * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
1582         SUBDIR_GCC_COMPILE_SRCS.
1583
1584 2018-07-09  Tom Tromey  <tom@tromey.com>
1585
1586         * Makefile.in (init.c): Remove some unused sed rules.
1587
1588 2018-07-09  Tom Tromey  <tom@tromey.com>
1589
1590         * Makefile.in (TSOBS): Remove.
1591         (INIT_FILES): Update.
1592         (LIBGDB_OBS): Update.
1593         (COMMON_SFILES): Add inflow.c.
1594         (SFILES): Remove inflow.c.
1595
1596 2018-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
1597
1598         * contrib/gdb-add-index.sh ($dwarf5): New, use it.
1599
1600 2018-07-07  Simon Marchi  <simon.marchi@polymtl.ca>
1601
1602         * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
1603         get_saveloc_name, is_signal_frame_name, step_name,
1604         init_remote_name, create_addr_space_name,
1605         destroy_addr_space_name, search_unwind_table_name,
1606         find_dyn_list_name): Constify.
1607
1608 2018-07-05  Simon Marchi  <simon.marchi@polymtl.ca>
1609
1610         * darwin-nat.c (darwin_pthread_kill): New function.
1611         (darwin_resume_thread): Use darwin_pthread_kill.
1612
1613 2018-07-05  Tom de Vries  <tdevries@suse.de>
1614
1615         * macroexp.c (macro_buffer) <operator=>: New member function.
1616
1617 2018-07-04  Tom Tromey  <tom@tromey.com>
1618
1619         * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
1620
1621 2018-07-04  Simon Marchi  <simon.marchi@polymtl.ca>
1622
1623         * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
1624         * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
1625         * maint.c: Likewise.
1626         * top.c: Likewise.
1627
1628 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
1629
1630         * NEWS: Create a new section for the next release branch.
1631         Rename the section of the current branch, now that it has
1632         been cut.
1633
1634 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
1635
1636         GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
1637         * version.in: Bump version to 8.2.50.DATE-git.
1638
1639 2018-07-04  Vyacheslav Barinov  <v.barinov@samsung.com>
1640             Pedro Alves  <palves@redhat.com>
1641
1642         * linux-nat.c (linux_init_ptrace): Rename to ...
1643         (linux_init_ptrace_procfs): ... this.  Call
1644         linux_proc_init_warnings.
1645         (linux_nat_target::post_attach)
1646         (linux_nat_target::post_startup_inferior): Adjust.
1647         * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
1648         * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
1649
1650 2018-07-04  Tom de Vries  <tdevries@suse.de>
1651
1652         * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
1653         check ...
1654         (read_comp_unit_head): ... here.
1655
1656 2018-07-03  Tom Tromey  <tom@tromey.com>
1657
1658         * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
1659         (stop_tracing, tstatus_command)
1660         (find_matching_tracepoint_location, merge_uploaded_tracepoints)
1661         (print_one_static_tracepoint_marker): Update.
1662         * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
1663         std::vector.
1664         * breakpoint.h (breakpoint_p): Remove typedef.  Don't declare
1665         VEC.
1666         (all_tracepoints, static_tracepoints_here): Return std::vector.
1667
1668 2018-07-03  Tom Tromey  <tom@tromey.com>
1669
1670         * common/ptid.c (ptid_equal): Remove.
1671         * common/ptid.h (ptid_equal): Don't declare.
1672         * ada-tasks.c: Update.
1673         * breakpoint.c: Update.
1674         * common/agent.c: Update.
1675         * corelow.c: Update.
1676         * darwin-nat-info.c: Update.
1677         * darwin-nat.c: Update.
1678         * dcache.c: Update.
1679         * dtrace-probe.c: Update.
1680         * dummy-frame.c: Update.
1681         * fbsd-nat.c: Update.
1682         * frame.c: Update.
1683         * gdbthread.h: Update.
1684         * gnu-nat.c: Update.
1685         * go32-nat.c: Update.
1686         * inf-loop.c: Update.
1687         * inf-ptrace.c: Update.
1688         * infcall.c: Update.
1689         * infcmd.c: Update.
1690         * inflow.c: Update.
1691         * infrun.c: Update.
1692         * linux-fork.c: Update.
1693         * linux-nat.c: Update.
1694         * linux-thread-db.c: Update.
1695         * mi/mi-cmd-var.c: Update.
1696         * mi/mi-interp.c: Update.
1697         * mi/mi-main.c: Update.
1698         * nto-procfs.c: Update.
1699         * ppc-linux-tdep.c: Update.
1700         * procfs.c: Update.
1701         * python/py-inferior.c: Update.
1702         * python/py-record-btrace.c: Update.
1703         * python/py-record.c: Update.
1704         * ravenscar-thread.c: Update.
1705         * regcache.c: Update.
1706         * remote-sim.c: Update.
1707         * remote.c: Update.
1708         * sol-thread.c: Update.
1709         * solib.c: Update.
1710         * target.c: Update.
1711         * tui/tui-stack.c: Update.
1712         * varobj.c: Update.
1713         * windows-nat.c: Update.
1714         * windows-tdep.c: Update.
1715
1716 2018-07-03  Tom Tromey  <tom@tromey.com>
1717
1718         * common/ptid.c (ptid_match): Remove.
1719         * common/ptid.h (ptid_match): Don't declare.
1720         * fbsd-nat.c: Update.
1721         * infcmd.c: Update.
1722         * infrun.c: Update.
1723         * linux-nat.c: Update.
1724         * record-btrace.c: Update.
1725         * regcache.c: Update.
1726         * remote.c: Update.
1727
1728 2018-07-03  Tom Tromey  <tom@tromey.com>
1729
1730         * common/ptid.c (ptid_tid_p): Remove.
1731         * common/ptid.h (ptid_tid_p): Don't declare.
1732         * sol-thread.c: Update.
1733
1734 2018-07-03  Tom Tromey  <tom@tromey.com>
1735
1736         * common/ptid.c (ptid_lwp_p): Remove.
1737         * common/ptid.h (ptid_lwp_p): Don't declare.
1738         * fbsd-nat.c: Update.
1739         * linux-nat.c: Update.
1740         * nat/linux-procfs.c: Update.
1741         * nat/x86-linux-dregs.c: Update.
1742         * sol-thread.c: Update.
1743
1744 2018-07-03  Tom Tromey  <tom@tromey.com>
1745
1746         * common/ptid.c (ptid_is_pid): Remove.
1747         * common/ptid.h (ptid_is_pid): Don't declare.
1748         * infrun.c: Update.
1749         * linux-nat.c: Update.
1750         * mi/mi-interp.c: Update.
1751         * remote.c: Update.
1752         * thread.c: Update.
1753
1754 2018-07-03  Tom Tromey  <tom@tromey.com>
1755
1756         * common/ptid.c (ptid_get_tid): Remove.
1757         * common/ptid.h (ptid_get_tid): Don't declare.
1758         * ada-tasks.c: Update.
1759         * aix-thread.c: Update.
1760         * bsd-uthread.c: Update.
1761         * darwin-nat.c: Update.
1762         * fbsd-nat.c: Update.
1763         * i386-darwin-nat.c: Update.
1764         * infrun.c: Update.
1765         * linux-tdep.c: Update.
1766         * nto-procfs.c: Update.
1767         * ppc-ravenscar-thread.c: Update.
1768         * python/py-infthread.c: Update.
1769         * ravenscar-thread.c: Update.
1770         * sol-thread.c: Update.
1771         * sparc-ravenscar-thread.c: Update.
1772         * windows-nat.c: Update.
1773
1774 2018-07-03  Tom Tromey  <tom@tromey.com>
1775
1776         * common/ptid.c (ptid_get_lwp): Remove.
1777         * common/ptid.h (ptid_get_lwp): Don't declare.
1778         * aarch64-linux-nat.c: Update.
1779         * ada-tasks.c: Update.
1780         * aix-thread.c: Update.
1781         * amd64-linux-nat.c: Update.
1782         * arm-linux-nat.c: Update.
1783         * corelow.c: Update.
1784         * fbsd-nat.c: Update.
1785         * fbsd-tdep.c: Update.
1786         * gnu-nat.c: Update.
1787         * i386-cygwin-tdep.c: Update.
1788         * i386-gnu-nat.c: Update.
1789         * i386-linux-nat.c: Update.
1790         * ia64-linux-nat.c: Update.
1791         * inf-ptrace.c: Update.
1792         * infrun.c: Update.
1793         * linux-fork.c: Update.
1794         * linux-nat.c: Update.
1795         * linux-tdep.c: Update.
1796         * linux-thread-db.c: Update.
1797         * mips-linux-nat.c: Update.
1798         * nat/aarch64-linux-hw-point.c: Update.
1799         * nat/aarch64-linux.c: Update.
1800         * nat/linux-btrace.c: Update.
1801         * nat/linux-osdata.c: Update.
1802         * nat/linux-procfs.c: Update.
1803         * nat/x86-linux-dregs.c: Update.
1804         * obsd-nat.c: Update.
1805         * ppc-fbsd-nat.c: Update.
1806         * ppc-linux-nat.c: Update.
1807         * procfs.c: Update.
1808         * python/py-infthread.c: Update.
1809         * ravenscar-thread.c: Update.
1810         * remote.c: Update.
1811         * s390-linux-nat.c: Update.
1812         * sol-thread.c: Update.
1813         * sol2-tdep.c: Update.
1814         * spu-linux-nat.c: Update.
1815         * x86-linux-nat.c: Update.
1816         * xtensa-linux-nat.c: Update.
1817
1818 2018-07-03  Tom Tromey  <tom@tromey.com>
1819
1820         * common/ptid.c (ptid_get_pid): Remove.
1821         * common/ptid.h (ptid_get_pid): Don't declare.
1822         * aarch64-linux-nat.c: Update.
1823         * ada-lang.c: Update.
1824         * aix-thread.c: Update.
1825         * alpha-bsd-nat.c: Update.
1826         * amd64-fbsd-nat.c: Update.
1827         * amd64-linux-nat.c: Update.
1828         * arm-linux-nat.c: Update.
1829         * arm-nbsd-nat.c: Update.
1830         * auxv.c: Update.
1831         * break-catch-syscall.c: Update.
1832         * breakpoint.c: Update.
1833         * bsd-uthread.c: Update.
1834         * corelow.c: Update.
1835         * ctf.c: Update.
1836         * darwin-nat.c: Update.
1837         * fbsd-nat.c: Update.
1838         * fbsd-tdep.c: Update.
1839         * gcore.c: Update.
1840         * gnu-nat.c: Update.
1841         * hppa-nbsd-nat.c: Update.
1842         * hppa-obsd-nat.c: Update.
1843         * i386-fbsd-nat.c: Update.
1844         * ia64-linux-nat.c: Update.
1845         * inf-ptrace.c: Update.
1846         * infcmd.c: Update.
1847         * inferior.c: Update.
1848         * inferior.h: Update.
1849         * inflow.c: Update.
1850         * infrun.c: Update.
1851         * linux-fork.c: Update.
1852         * linux-nat.c: Update.
1853         * linux-tdep.c: Update.
1854         * linux-thread-db.c: Update.
1855         * m68k-bsd-nat.c: Update.
1856         * mi/mi-interp.c: Update.
1857         * mi/mi-main.c: Update.
1858         * mips-linux-nat.c: Update.
1859         * mips-nbsd-nat.c: Update.
1860         * mips64-obsd-nat.c: Update.
1861         * nat/aarch64-linux-hw-point.c: Update.
1862         * nat/aarch64-linux.c: Update.
1863         * nat/linux-btrace.c: Update.
1864         * nat/linux-osdata.c: Update.
1865         * nat/linux-procfs.c: Update.
1866         * nat/x86-linux-dregs.c: Update.
1867         * nto-procfs.c: Update.
1868         * obsd-nat.c: Update.
1869         * ppc-linux-nat.c: Update.
1870         * ppc-nbsd-nat.c: Update.
1871         * ppc-obsd-nat.c: Update.
1872         * proc-service.c: Update.
1873         * procfs.c: Update.
1874         * python/py-inferior.c: Update.
1875         * python/py-infthread.c: Update.
1876         * ravenscar-thread.c: Update.
1877         * record.c: Update.
1878         * remote-sim.c: Update.
1879         * remote.c: Update.
1880         * rs6000-nat.c: Update.
1881         * s390-linux-nat.c: Update.
1882         * sh-nbsd-nat.c: Update.
1883         * sol-thread.c: Update.
1884         * sparc-nat.c: Update.
1885         * sparc64-tdep.c: Update.
1886         * spu-linux-nat.c: Update.
1887         * spu-tdep.c: Update.
1888         * target-debug.h: Update.
1889         * target.c: Update.
1890         * thread.c: Update.
1891         * tid-parse.c: Update.
1892         * tracefile-tfile.c: Update.
1893         * vax-bsd-nat.c: Update.
1894         * windows-nat.c: Update.
1895         * x86-linux-nat.c: Update.
1896         * x86-nat.c: Update.
1897
1898 2018-07-03  Tom Tromey  <tom@tromey.com>
1899
1900         * common/ptid.c (pid_to_ptid): Remove.
1901         * common/ptid.h (pid_to_ptid): Don't declare.
1902         * aix-thread.c: Update.
1903         * arm-linux-nat.c: Update.
1904         * common/ptid.c: Update.
1905         * common/ptid.h: Update.
1906         * corelow.c: Update.
1907         * ctf.c: Update.
1908         * darwin-nat.c: Update.
1909         * fbsd-nat.c: Update.
1910         * fork-child.c: Update.
1911         * gnu-nat.c: Update.
1912         * go32-nat.c: Update.
1913         * inf-ptrace.c: Update.
1914         * infcmd.c: Update.
1915         * inferior.c: Update.
1916         * infrun.c: Update.
1917         * linux-fork.c: Update.
1918         * linux-nat.c: Update.
1919         * nat/aarch64-linux-hw-point.c: Update.
1920         * nat/fork-inferior.c: Update.
1921         * nat/x86-linux-dregs.c: Update.
1922         * nto-procfs.c: Update.
1923         * obsd-nat.c: Update.
1924         * procfs.c: Update.
1925         * progspace.c: Update.
1926         * remote.c: Update.
1927         * rs6000-nat.c: Update.
1928         * s390-linux-nat.c: Update.
1929         * sol-thread.c: Update.
1930         * spu-linux-nat.c: Update.
1931         * target.c: Update.
1932         * top.c: Update.
1933         * tracefile-tfile.c: Update.
1934         * windows-nat.c: Update.
1935
1936 2018-07-03  Tom Tromey  <tom@tromey.com>
1937
1938         * common/ptid.h (ptid_build): Don't declare.
1939         * common/ptid.c (ptid_build): Remove.
1940         * aix-thread.c: Update.
1941         * bsd-kvm.c: Update.
1942         * bsd-uthread.c: Update.
1943         * common/agent.c: Update.
1944         * common/ptid.c: Update.
1945         * common/ptid.h: Update.
1946         * corelow.c: Update.
1947         * darwin-nat.c: Update.
1948         * fbsd-nat.c: Update.
1949         * gnu-nat.c: Update.
1950         * linux-fork.c: Update.
1951         * linux-nat.c: Update.
1952         * linux-thread-db.c: Update.
1953         * nat/linux-osdata.c: Update.
1954         * nat/linux-procfs.c: Update.
1955         * nto-procfs.c: Update.
1956         * obsd-nat.c: Update.
1957         * proc-service.c: Update.
1958         * procfs.c: Update.
1959         * ravenscar-thread.c: Update.
1960         * remote-sim.c: Update.
1961         * remote.c: Update.
1962         * sol-thread.c: Update.
1963         * target.c: Update.
1964         * windows-nat.c: Update.
1965
1966 2018-07-03  Tom Tromey  <tom@tromey.com>
1967
1968         * infrun.c (follow_exec): Use exit_inferior_silent.
1969         * inferior.c (exit_inferior_num_silent): Remove.
1970         * inferior.h (exit_inferior_num_silent): Don't declare.
1971
1972 2018-07-03  Tom Tromey  <tom@tromey.com>
1973
1974         PR cli/23340:
1975         * darwin-nat.c (darwin_attach_pid): Reset inferior and
1976         inferior_ptid on error.
1977
1978 2018-07-02  Maciej W. Rozycki  <macro@mips.com>
1979             Simon Marchi  <simon.marchi@polymtl.ca>
1980
1981         PR tdep/8282
1982         * disasm.h (gdb_disassembler): Add
1983         `m_disassembler_options_holder'. member
1984         * disasm.c (get_all_disassembler_options): New function.
1985         (gdb_disassembler::gdb_disassembler): Use it.
1986         (gdb_buffered_insn_length_init_dis): Likewise.
1987         (gdb_buffered_insn_length): Adjust accordingly.
1988         (set_disassembler_options): Handle options with arguments.
1989         (show_disassembler_options_sfunc): Likewise.  Add a leading new
1990         line if showing options with descriptions.
1991         (disassembler_options_completer): Adapt to using the
1992         `disasm_options_and_args_t' structure.
1993         * mips-tdep.c (mips_disassembler_options): New variable.
1994         (mips_disassembler_options_o32): Likewise.
1995         (mips_disassembler_options_n32): Likewise.
1996         (mips_disassembler_options_n64): Likewise.
1997         (gdb_print_insn_mips): Don't set `disassembler_options'.
1998         (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
1999         functions.
2000         (mips_gdbarch_init): Always set `gdbarch_print_insn' to
2001         `gdb_print_insn_mips'.  Set `gdbarch_disassembler_options',
2002         `gdbarch_disassembler_options_implicit' and
2003         `gdbarch_valid_disassembler_options'.
2004         * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
2005         `disasm_options_and_args_t' structure.
2006         * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
2007         method.
2008         (valid_disassembler_options): Switch from `disasm_options_t' to
2009         the `disasm_options_and_args_t' structure.
2010         * NEWS: Document `set disassembler-options' support for the MIPS
2011         target.
2012         * gdbarch.h: Regenerate.
2013         * gdbarch.c: Regenerate.
2014
2015 2018-07-02  Sebastian Huber  <sebastian.huber@embedded-brains.de>
2016
2017         * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
2018
2019 2018-06-29  Joel Brobecker  <brobecker@adacore.com>
2020
2021         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
2022         parameter in call to amd64_target_description.
2023         * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
2024         * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
2025         (amd64fbsd_init_abi): Likewise.
2026         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
2027         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
2028         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
2029         * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
2030
2031 2018-06-29  Pedro Alves  <palves@redhat.com>
2032
2033         * gdb/amd64-tdep.h (amd64_create_target_description): Add
2034         "segments" parameter.
2035         * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
2036         (_initialize_amd64_tdep): Update call to
2037         amd64_create_target_description.
2038         (amd64_target_description): Add "segments" parameter.  Adjust
2039         the implementation to use it.
2040         * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
2041         call to amd64_create_target_description.
2042         * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
2043         * gdb/arch/amd64.h (amd64_create_target_description): Add
2044         "segments" register.
2045         * gdb/arch/amd64.c (amd64_create_target_description): Add
2046         "segments" parameter.  Call create_feature_i386_64bit_segments
2047         only if SEGMENTS is true.
2048         * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
2049         call to amd64_create_target_description.
2050
2051 2018-06-29  Pedro Alves  <palves@redhat.com>
2052
2053         * thread.c (thread_target_id_str): New, factored out from ...
2054         (print_thread_info_1): ... here.  Use it to compute the max
2055         "Target Id" column width.
2056
2057 2018-06-29  Pedro Alves  <palves@redhat.com>
2058
2059         * remote.c (remote_target::extra_thread_info): Delete
2060         'display_buf' and 'n' locals.  from the cache, regardless of
2061         packet mechanims is in use.  Use cache for qThreadExtra and qP
2062         methods too.
2063
2064 2018-06-29  Pedro Alves  <palves@redhat.com>
2065
2066         * blockframe.c (find_pc_sect_containing_function): New function.
2067         * breakpoint.c (print_breakpoint_location): Don't call
2068         find_pc_sect_function.
2069         * linespec.c (create_sals_line_offset): Record the location's
2070         symbol in the sal.
2071         * linespec.c (convert_address_location_to_sals): Fill in sal's
2072         symbol with find_pc_sect_containing_function.
2073         * symtab.c (find_function_start_sal): Rename to ...
2074         (find_function_start_sal_1): ... this.
2075         (find_function_start_sal): Reimplement as wrapper around
2076         find_function_start_sal_1, and use
2077         find_pc_sect_containing_function to fill in the sal's symbol.
2078         (find_function_start_sal(symbol*, bool)): Adjust.
2079         * symtab.h (find_pc_function, find_pc_sect_function): Adjust
2080         comments.
2081         (find_pc_sect_containing_function): Declare.
2082
2083 2018-06-29  Pedro Alves  <palves@redhat.com>
2084
2085         * inline-frame.c (stopped_by_user_bp_inline_frame): Return
2086         true if the the location has no symbol.
2087
2088 2018-06-28  Tom Tromey  <tom@tromey.com>
2089
2090         * NEWS: Mention --enable-codesign.
2091         * silent-rules.mk (ECHO_SIGN): New variable.
2092         * configure.ac: Add --enable-codesign.
2093         * configure: Rebuild.
2094         * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
2095         (gdb$(EXEEXT)): Optionally invoke codesign.
2096
2097 2018-06-28  Pedro Alves  <palves@redhat.com>
2098
2099         * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
2100         comments.
2101         (switch_to_thread_no_regs): Adjust comment.
2102         * infcmd.c (stop_pc): Delete.
2103         (post_create_inferior, info_program_command): Replace references
2104         to stop_pc with references to thread_info->suspend.stop_pc.
2105         * inferior.h (stop_pc): Delete declaration.
2106         * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
2107         (handle_inferior_event_1, handle_signal_stop)
2108         (process_event_stop_test, keep_going_stepped_thread)
2109         (handle_step_into_function, handle_step_into_function_backward)
2110         (print_stop_location): Replace references to stop_pc with
2111         references to thread_info->suspend.stop_pc.
2112         (struct infcall_suspend_state) <stop_pc>: Delete field.
2113         (save_infcall_suspend_state, restore_infcall_suspend_state):
2114         Remove references to inf_stat->stop_pc.
2115         * linux-fork.c (fork_load_infrun_state): Likewise.
2116         * record-btrace.c (record_btrace_set_replay): Likewise.
2117         * record-full.c (record_full_goto_entry): Likewise.
2118         * remote.c (print_one_stopped_thread): Likewise.
2119         * target.c (target_resume): Extend comment.
2120         * thread.c (set_executing_thread): New.
2121         (set_executing): Use it.
2122         (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
2123         Remove references to stop_pc.
2124
2125 2018-06-28  Pedro Alves  <palves@redhat.com>
2126
2127         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
2128         Moving fetching stop_pc until after ecs->event_thread is refreshed.
2129
2130 2018-06-28  Tom Tromey  <tom@tromey.com>
2131
2132         * coffread.c (coff_symfile_finish): Update.
2133         * xcoffread.c (xcoff_symfile_finish): Update.
2134         * elfread.c (elf_symfile_finish): Update.
2135         * symfile.h (dwarf2_free_objfile): Don't declare.
2136         * dwarf2read.c (_initialize_dwarf2_read): Use
2137         register_objfile_data_with_cleanup.
2138         (dwarf2_free_objfile): Now static.  Change signature.
2139
2140 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
2141
2142         * symfile.c (add_symbol_file_command, _initialize_symfile): Add
2143         option "-o" to add-symbol-file-load to add an offset to each
2144         section's load address.
2145         * symfile.c (set_objfile_default_section_offset): New function.
2146
2147 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
2148
2149         * symfile.c (add_symbol_file_command): Make sure that sections
2150         with the same name are sorted in the same order.
2151
2152 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
2153
2154         * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
2155         require the second argument.  If omitted, load sections at the
2156         addresses specified in the file.
2157
2158 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
2159
2160         * symfile.c (symbol_file_command, symbol_file_add_main_1)
2161         (_initialize_symfile): Add option "-o" to symbol-file to add an
2162         offset to each section of the symbol file.
2163
2164 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
2165
2166         * MAINTAINERS (Write After Approval): Add Petr Tesarik.
2167
2168 2018-06-27  Tom Tromey  <tom@tromey.com>
2169
2170         * stack.c (_initialize_stack): Update "func" help text.
2171
2172 2018-06-27  Tom Tromey  <tom@tromey.com>
2173
2174         * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
2175         std::vector.
2176         (unwind_infopy_str, pyuw_create_unwind_info)
2177         (unwind_infopy_add_saved_register, pyuw_sniffer)
2178         (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
2179         Update.
2180         (struct saved_reg): Add constructor.
2181         <value>: Now a gdbpy_ref<>.
2182
2183 2018-06-27  Tom Tromey  <tom@tromey.com>
2184
2185         * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
2186
2187 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
2188
2189         * gdb-gdb.py.in: Format using autopep8.
2190
2191 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
2192
2193         * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
2194         (type_lookup_function): Recognize CORE_ADDR values.
2195
2196 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
2197
2198         * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
2199         print tag_name.
2200
2201 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
2202
2203         * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
2204         <__lt__>: Add.
2205
2206 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
2207
2208         * gdb-gdb.py: Move to...
2209         * gdb-gdb.py.in: ... here.
2210         * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
2211         * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
2212         dependencies.
2213         (distclean): Remove gdb-gdb.py when cleaning.
2214         (gdb-gdb.py, gdb-gdb.gdb): New rules.
2215         * configure: Re-generate.
2216
2217 2018-06-27  Pedro Alves  <palves@redhat.com>
2218
2219         * proc-service.c (get_ps_regcache): New.
2220         (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
2221         (ps_lsetfpregs): Use it.
2222
2223 2018-06-27  Omair Javaid  <omair.javaid@linaro.org>
2224
2225         PR gdb/21695
2226         * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
2227         (dwarf_decode_lines_1): Adjust.
2228
2229 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
2230
2231         * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
2232         override.
2233         <info_proc>: Likewise.
2234
2235 2018-06-26  Joel Brobecker  <brobecker@adacore.com>
2236
2237         * windows-nat.c (do_windows_fetch_inferior_registers): Rename
2238         to windows_fetch_one_register, and only handle the case of
2239         fetching one register.  Move the code that reloads the context
2240         and iterates over all registers if R is negative to...
2241         (windows_nat_target::fetch_registers): ... here.
2242         (do_windows_store_inferior_registers): Rename to
2243         windows_store_one_register, and only handle the case of storing
2244         one register.  Move the code that handles the case where r is
2245         negative to...
2246         (windows_nat_target::store_registers) ... here.
2247
2248 2018-06-26  Tom Tromey  <tom@tromey.com>
2249
2250         PR rust/22574:
2251         * typeprint.c (whatis_exp): Allow ptype/o for Rust.
2252         * rust-lang.c (rust_print_struct_def): Add podata parameter.
2253         Update.
2254         (rust_internal_print_type): Add podata parameter.
2255         (rust_print_type): Update.
2256
2257 2018-06-26  Tom Tromey  <tom@tromey.com>
2258
2259         * typeprint.h (struct print_offset_data) <update, finish,
2260         maybe_print_hole>: New methods.
2261         <indentation>: New constant.
2262         * typeprint.c (print_offset_data::indentation): Define.
2263         (print_offset_data::maybe_print_hole, print_offset_data::update)
2264         (print_offset_data::finish): Move from c-typeprint.c and rename.
2265         * c-typeprint.c (OFFSET_SPC_LEN): Remove.
2266         (print_spaces_filtered_with_print_options): Update.
2267         (c_print_type_union_field_offset, maybe_print_hole)
2268         (c_print_type_struct_field_offset): Move to typeprint.c and
2269         rename.
2270         (c_type_print_base_struct_union): Update.
2271
2272 2018-06-25  Pedro Alves  <palves@redhat.com>
2273
2274         * gdbthread.h (thread_info_ref, delete_thread)
2275         (delete_thread_silent, first_thread_of_inferior)
2276         (any_thread_of_inferior, switch_to_thread)
2277         (enable_thread_stack_temporaries)
2278         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2279         (get_last_thread_stack_temporary)
2280         (value_in_thread_stack_temporaries, can_access_registers_thread):
2281         Spell out "struct thread_info" instead of just "thread_info".
2282         * inferior.h (notice_new_inferior): Likewise.
2283
2284 2018-06-25  Pedro Alves  <palves@redhat.com>
2285
2286         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
2287         pass thread_info pointer to delete_thread.
2288         (windows_nat_target::detach): Pass inferior pointer to
2289         detach_inferior.
2290         * aix-thread.c (sync_threadlists): Pass thread_info pointer to
2291         delete_thread.
2292         * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
2293         * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
2294         and pass a thread_info pointer to delete_thread.
2295         * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
2296         pass thread_info pointer to delete_thread.
2297         * go32-nat.c (go32_nat_target::mourn_inferior): Remove
2298         delete_thread_silent call.
2299         * procfs.c (procfs_target::detach): Pass inferior pointer to
2300         detach_inferior.
2301         (procfs_target::wait): Pass thread_info pointer to delete_thread.
2302         * remote-sim.c (gdbsim_target::mourn_inferior): Remove
2303         delete_thread_silent call.
2304         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
2305         pass thread_info pointer to delete_thread.
2306         (windows_nat_target::detach): Pass inferior pointer to
2307         delete_inferior.
2308
2309 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
2310
2311         * regcache.c (readable_regcache::read_part): Fix asserts.
2312         (reg_buffer::raw_collect_part): New function.
2313         (regcache::write_part): Fix asserts.
2314         (reg_buffer::raw_supply_part): New function.
2315         (regcache::transfer_regset_register): New helper function.
2316         (regcache::transfer_regset): Call new functions.
2317         (regcache_supply_regset): Use gdb_byte*.
2318         (regcache::supply_regset): Likewise.
2319         (regcache_collect_regset): Likewise.
2320         (regcache::collect_regset): Likewise.
2321         * regcache.h (reg_buffer::raw_collect_part): New declaration.
2322         (reg_buffer::raw_supply_part): Likewise.
2323         (regcache::transfer_regset_register): Likewise.
2324         (regcache::transfer_regset): Use gdb_byte*.
2325
2326 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
2327
2328         * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
2329
2330 2018-06-21  Pedro Alves  <palves@redhat.com>
2331
2332         * ada-lang.h (ada_get_task_number): Take a thread_info pointer
2333         instead of a ptid_t.  All callers adjusted.
2334         * ada-tasks.c (ada_get_task_number): Likewise.  All callers
2335         adjusted.
2336         (print_ada_task_info, display_current_task_id, task_command_1):
2337         Adjust.
2338         * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
2339         inferior_thread.
2340         (breakpoint_kind): Adjust.
2341         (remove_breakpoints_pid): Rename to ...
2342         (remove_breakpoints_inf): ... this.  Adjust to take an inferior
2343         pointer.  All callers adjusted.
2344         (bpstat_clear_actions): Use inferior_thread.
2345         (get_bpstat_thread): New.
2346         (bpstat_do_actions): Use it.
2347         (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
2348         to take a thread_info pointer.  All callers adjusted.
2349         (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
2350         (breakpoint_re_set_thread): Use inferior_thread.
2351         * breakpoint.h (struct inferior): Forward declare.
2352         (bpstat_stop_status): Update.
2353         (remove_breakpoints_pid): Delete.
2354         (remove_breakpoints_inf): New.
2355         * bsd-uthread.c (bsd_uthread_target::wait)
2356         (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
2357         * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
2358         (maint_btrace_packet_history_cmd)
2359         (maint_btrace_clear_packet_history_cmd): Adjust.
2360         (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
2361         inferior_thread.
2362         * cli/cli-interp.c: Include "inferior.h".
2363         * common/refcounted-object.h (struct
2364         refcounted_object_ref_policy): New.
2365         * compile/compile-object-load.c: Include gdbthread.h.
2366         (store_regs): Use inferior_thread.
2367         * corelow.c (core_target::close): Use current_inferior.
2368         (core_target_open): Adjust to use first_thread_of_inferior and use
2369         the current inferior.
2370         * ctf.c (ctf_target::close): Adjust to use current_inferior.
2371         * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
2372         <thread>: ... this new field.  All references adjusted.
2373         (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
2374         Take a thread_info pointer instead of a ptid_t.
2375         * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
2376         (dummy_frame_discard, register_dummy_frame_dtor): Take a
2377         thread_info pointer instead of a ptid_t.
2378         * elfread.c: Include "inferior.h".
2379         (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
2380         Use inferior_thread.
2381         * eval.c (evaluate_subexp): Likewise.
2382         * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
2383         inferior_thread.
2384         * gdb_proc_service.h (struct thread_info): Forward declare.
2385         (struct ps_prochandle) <ptid>: Delete, replaced by ...
2386         <thread>: ... this new field.  All references adjusted.
2387         * gdbarch.h, gdbarch.c: Regenerate.
2388         * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
2389         'thread' parameter.  All implementations and callers adjusted.
2390         * gdbthread.h (thread_info) <set_running>: New method.
2391         (delete_thread, delete_thread_silent): Take a thread_info pointer
2392         instead of a ptid.
2393         (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
2394         (first_thread_of_process): Delete, replaced by ...
2395         (first_thread_of_inferior): ... this new function.  All callers
2396         adjusted.
2397         (any_live_thread_of_process): Delete, replaced by ...
2398         (any_live_thread_of_inferior): ... this new function.  All callers
2399         adjusted.
2400         (switch_to_thread, switch_to_no_thread): Declare.
2401         (is_executing): Delete.
2402         (enable_thread_stack_temporaries): Update comment.
2403         <enable_thread_stack_temporaries>: Take a thread_info pointer
2404         instead of a ptid_t.  Incref the thread.
2405         <~enable_thread_stack_temporaries>: Decref the thread.
2406         <m_ptid>: Delete
2407         <m_thr>: New.
2408         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2409         (get_last_thread_stack_temporary)
2410         (value_in_thread_stack_temporaries, can_access_registers_thread):
2411         Take a thread_info pointer instead of a ptid_t.  All callers
2412         adjusted.
2413         * infcall.c (get_call_return_value): Use inferior_thread.
2414         (run_inferior_call): Work with thread pointers instead of ptid_t.
2415         (call_function_by_hand_dummy): Work with thread pointers instead
2416         of ptid_t.  Use thread_info_ref.
2417         * infcmd.c (proceed_thread_callback): Access thread's state
2418         directly.
2419         (ensure_valid_thread, ensure_not_running): Use inferior_thread,
2420         access thread's state directly.
2421         (continue_command): Use inferior_thread.
2422         (info_program_command): Use find_thread_ptid and access thread
2423         state directly.
2424         (proceed_after_attach_callback): Use thread state directly.
2425         (notice_new_inferior): Take a thread_info pointer instead of a
2426         ptid_t.  All callers adjusted.
2427         (exit_inferior): Take an inferior pointer instead of a pid.  All
2428         callers adjusted.
2429         (exit_inferior_silent): New.
2430         (detach_inferior): Delete.
2431         (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
2432         (gdb_inferior_id_to_pid, in_inferior_list): Delete.
2433         (detach_inferior_command, kill_inferior_command): Use
2434         find_inferior_id instead of valid_gdb_inferior_id and
2435         gdb_inferior_id_to_pid.
2436         (inferior_command): Use inferior and thread pointers.
2437         * inferior.h (struct thread_info): Forward declare.
2438         (notice_new_inferior): Take a thread_info pointer instead of a
2439         ptid_t.  All callers adjusted.
2440         (detach_inferior): Delete declaration.
2441         (exit_inferior, exit_inferior_silent): Take an inferior pointer
2442         instead of a pid.  All callers adjusted.
2443         (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
2444         (valid_gdb_inferior_id): Delete.
2445         * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
2446         (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
2447         (struct displaced_step_inferior_state) <pid>: Delete, replaced by
2448         ...
2449         <inf>: ... this new field.
2450         <step_ptid>: Delete, replaced by ...
2451         <step_thread>: ... this new field.
2452         (get_displaced_stepping_state): Take an inferior pointer instead
2453         of a pid.  All callers adjusted.
2454         (displaced_step_in_progress_any_inferior): Adjust.
2455         (displaced_step_in_progress_thread): Take a thread pointer instead
2456         of a ptid_t.  All callers adjusted.
2457         (displaced_step_in_progress, add_displaced_stepping_state): Take
2458         an inferior pointer instead of a pid.  All callers adjusted.
2459         (get_displaced_step_closure_by_addr): Adjust.
2460         (remove_displaced_stepping_state): Take an inferior pointer
2461         instead of a pid.  All callers adjusted.
2462         (displaced_step_prepare_throw, displaced_step_prepare)
2463         (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
2464         All callers adjusted.
2465         (start_step_over): Adjust.
2466         (infrun_thread_ptid_changed): Remove bit updating ptids in the
2467         displaced step queue.
2468         (do_target_resume): Adjust.
2469         (fetch_inferior_event): Use inferior_thread.
2470         (context_switch, get_inferior_stop_soon): Take an
2471         execution_control_state pointer instead of a ptid_t.  All callers
2472         adjusted.
2473         (switch_to_thread_cleanup): Delete.
2474         (stop_all_threads): Use scoped_restore_current_thread.
2475         * inline-frame.c: Include "gdbthread.h".
2476         (inline_state) <inline_state>: Take a thread pointer instead of a
2477         ptid_t.  All callers adjusted.
2478         <ptid>: Delete, replaced by ...
2479         <thread>: ... this new field.
2480         (find_inline_frame_state): Take a thread pointer instead of a
2481         ptid_t.  All callers adjusted.
2482         (skip_inline_frames, step_into_inline_frame)
2483         (inline_skipped_frames, inline_skipped_symbol): Take a thread
2484         pointer instead of a ptid_t.  All callers adjusted.
2485         * inline-frame.h (skip_inline_frames, step_into_inline_frame)
2486         (inline_skipped_frames, inline_skipped_symbol): Likewise.
2487         * linux-fork.c (delete_checkpoint_command): Adjust to use thread
2488         pointers directly.
2489         * linux-nat.c (get_detach_signal): Likewise.
2490         * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
2491         (thread_db_notice_clone): Adjust.
2492         (thread_db_find_new_threads_silently)
2493         (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
2494         a thread pointer instead of a ptid_t.  All callers adjusted.
2495         * mi/mi-cmd-var.c: Include "inferior.h".
2496         (mi_cmd_var_update_iter): Update to use thread pointers.
2497         * mi/mi-interp.c (mi_new_thread): Update to use the thread's
2498         inferior directly.
2499         (mi_output_running_pid, mi_inferior_count): Delete, bits factored
2500         out to ...
2501         (mi_output_running): ... this new function.
2502         (mi_on_resume_1): Adjust to use it.
2503         (mi_user_selected_context_changed): Adjust to use inferior_thread.
2504         * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
2505         directly.
2506         (interrupt_thread_callback): : Adjust to use thread and inferior
2507         pointers.
2508         * proc-service.c: Include "gdbthread.h".
2509         (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
2510         * progspace-and-thread.c: Include "inferior.h".
2511         * progspace.c: Include "inferior.h".
2512         * python/py-exitedevent.c (create_exited_event_object): Adjust to
2513         hold a reference to an inferior_object.
2514         * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
2515         inferior_thread.
2516         * python/py-inferior.c (struct inferior_object): Give the type a
2517         tag name instead of a typedef.
2518         (python_on_normal_stop): No need to check if the current thread is
2519         listed.
2520         (inferior_to_inferior_object): Change return type to
2521         inferior_object.  All callers adjusted.
2522         (find_thread_object): Delete, bits factored out to ...
2523         (thread_to_thread_object): ... this new function.
2524         * python/py-infthread.c (create_thread_object): Use
2525         inferior_to_inferior_object.
2526         (thpy_is_stopped): Use thread pointer directly.
2527         (gdbpy_selected_thread): Use inferior_thread.
2528         * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
2529         field, replaced with ...
2530         <thread>: ... this new field.  All users adjusted.
2531         (btpy_insn_or_gap_new): Drop const.
2532         (btpy_list_new): Take a thread pointer instead of a ptid_t.  All
2533         callers adjusted.
2534         * python/py-record.c: Include "gdbthread.h".
2535         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
2536         a ptid_t.  All callers adjusted.
2537         (gdbpy_current_recording): Use inferior_thread.
2538         * python/py-record.h (recpy_record_object) <ptid>: Delete
2539         field, replaced with ...
2540         <thread>: ... this new field.  All users adjusted.
2541         (recpy_element_object) <ptid>: Delete
2542         field, replaced with ...
2543         <thread>: ... this new field.  All users adjusted.
2544         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
2545         a ptid_t.  All callers adjusted.
2546         * python/py-threadevent.c: Include "gdbthread.h".
2547         (get_event_thread): Use thread_to_thread_object.
2548         * python/python-internal.h (struct inferior_object): Forward
2549         declare.
2550         (find_thread_object, find_inferior_object): Delete declarations.
2551         (thread_to_thread_object, inferior_to_inferior_object): New
2552         declarations.
2553         * record-btrace.c: Include "inferior.h".
2554         (require_btrace_thread): Use inferior_thread.
2555         (record_btrace_frame_sniffer)
2556         (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
2557         (get_thread_current_frame): Use scoped_restore_current_thread and
2558         switch_to_thread.
2559         (get_thread_current_frame): Use thread pointer directly.
2560         (record_btrace_replay_at_breakpoint): Use thread's inferior
2561         pointer directly.
2562         * record-full.c: Include "inferior.h".
2563         * regcache.c: Include "gdbthread.h".
2564         (get_thread_arch_regcache): Use the inferior's address space
2565         directly.
2566         (get_thread_regcache, registers_changed_thread): New.
2567         * regcache.h (get_thread_regcache(thread_info *thread)): New
2568         overload.
2569         (registers_changed_thread): New.
2570         (remote_target) <remote_detach_1>: Swap order of parameters.
2571         (remote_add_thread): <remote_add_thread>: Return the new thread.
2572         (get_remote_thread_info(ptid_t)): New overload.
2573         (remote_target::remote_notice_new_inferior): Use thread pointers
2574         directly.
2575         (remote_target::process_initial_stop_replies): Use
2576         thread_info::set_running.
2577         (remote_target::remote_detach_1, remote_target::detach)
2578         (extended_remote_target::detach): Adjust.
2579         * stack.c (frame_show_address): Use inferior_thread.
2580         * target-debug.h (target_debug_print_thread_info_pp): New.
2581         * target-delegates.c: Regenerate.
2582         * target.c (default_thread_address_space): Delete.
2583         (memory_xfer_partial_1): Use current_inferior.
2584         (target_detach): Use current_inferior.
2585         (target_thread_address_space): Delete.
2586         (generic_mourn_inferior): Use current_inferior.
2587         * target.h (struct target_ops) <thread_address_space>: Delete.
2588         (target_thread_address_space): Delete.
2589         * thread.c (init_thread_list): Use ALL_THREADS_SAFE.  Use thread
2590         pointers directly.
2591         (delete_thread_1, delete_thread, delete_thread_silent): Take a
2592         thread pointer instead of a ptid_t.  Adjust all callers.
2593         (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
2594         (first_thread_of_process): Delete, replaced by ...
2595         (first_thread_of_inferior): ... this new function.  All callers
2596         adjusted.
2597         (any_thread_of_process): Rename to ...
2598         (any_thread_of_inferior): ... this, and take an inferior pointer.
2599         (any_live_thread_of_process): Rename to ...
2600         (any_live_thread_of_inferior): ... this, and take an inferior
2601         pointer.
2602         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2603         (value_in_thread_stack_temporaries)
2604         (get_last_thread_stack_temporary): Take a thread pointer instead
2605         of a ptid_t.  Adjust all callers.
2606         (thread_info::set_running): New.
2607         (validate_registers_access): Use inferior_thread.
2608         (can_access_registers_ptid): Rename to ...
2609         (can_access_registers_thread): ... this, and take a thread
2610         pointer.
2611         (print_thread_info_1): Adjust to compare thread pointers instead
2612         of ptids.
2613         (switch_to_no_thread, switch_to_thread): Make extern.
2614         (scoped_restore_current_thread::~scoped_restore_current_thread):
2615         Use m_thread pointer directly.
2616         (scoped_restore_current_thread::scoped_restore_current_thread):
2617         Use inferior_thread.
2618         (thread_command): Use thread pointer directly.
2619         (thread_num_make_value_helper): Use inferior_thread.
2620         * top.c (execute_command): Use inferior_thread.
2621         * tui/tui-interp.c: Include "inferior.h".
2622         * varobj.c (varobj_create): Use inferior_thread.
2623         (value_of_root_1): Use find_thread_global_id instead of
2624         global_thread_id_to_ptid.
2625
2626 2018-06-21  Alan Hayward  <alan.hayward@arm.com>
2627
2628         * regcache.c (readable_regcache::read_part): Avoid memcpy when
2629         possible.
2630         (regcache::write_part): Likewise.
2631         (readable_regcache::cooked_read_part): Update comment.
2632         (readable_regcache::cooked_write_part): Likewise.
2633         * regcache.h: (readable_regcache::read_part): Likewise.
2634         (regcache::write_part): Likewise.
2635
2636 2018-06-21  Richard Bunt  <richard.bunt@arm.com>
2637             Dirk Schubert  <dirk.schubert@arm.com>
2638
2639         * aarch64-linux-nat.c (post_attach): New.
2640         (aarch64_linux_nat_target::post_attach): Override post_attach to
2641         record the number of hardware debug registers.
2642
2643 2018-06-20  Tom Tromey  <tom@tromey.com>
2644
2645         * python/py-param.c (add_setshow_generic): Make parameters const.
2646         (parmpy_init): Update.
2647
2648 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
2649
2650         * regcache.h (regcache_cooked_read_ftype): Rename to...
2651         (register_read_ftype): ...this, change type to function_view.
2652         (class reg_buffer) <save>: Remove src parameter.
2653         (readonly_detached_regcache) <readonly_detached_regcache>: Make
2654         parameter non-const in first overload.  Remove src parameter in
2655         second overload.
2656         * regcache.c (do_cooked_read): Remove.
2657         (readonly_detached_regcache::readonly_detached_regcache): Make
2658         parameter non-const, adjust call to other constructor.
2659         (reg_buffer::save): Remove src parameter.
2660         * frame.c (do_frame_register_read): Remove.
2661         (frame_save_as_regcache): Use lambda function.
2662         * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
2663         parameter to ppu2spu_data *.
2664         (ppu2spu_sniffer): Use lambda function.
2665
2666 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
2667
2668         * record-full.c (record_full_target::insert_breakpoint): Remove
2669         "struct" keyword, add const.
2670
2671 2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>
2672
2673         * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
2674         PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
2675         * configure.ac: Remove AC_PREREQ, add missing quoting.
2676         * gnulib/configure.ac: Modernize usage of
2677         AC_INIT/AM_INIT_AUTOMAKE.  Remove AC_PREREQ.
2678         * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
2679         (AUTOMAKE_VERSION): Bump to 1.15.1.
2680         * configure: Re-generate.
2681         * config.in: Re-generate.
2682         * aclocal.m4: Re-generate.
2683         * gnulib/aclocal.m4: Re-generate.
2684         * gnulib/config.in: Re-generate.
2685         * gnulib/configure: Re-generate.
2686         * gnulib/import/Makefile.in: Re-generate.
2687
2688 2018-06-19  Pedro Alves  <palves@redhat.com>
2689
2690         * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
2691         (lookup_minimal_symbol_by_pc_section): ... here with
2692         gdb_assert_not_reached added.
2693
2694 2018-06-19  Pedro Alves  <palves@redhat.com>
2695
2696         * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
2697         parameter with a block parameter.  Compare location's block symbol
2698         with the frame's block instead of addresses.
2699         (skip_inline_frames): Pass the current block instead of the
2700         frame's address.  Break out as soon as we determine the frame
2701         should not be skipped.
2702
2703 2018-06-18  Tom Tromey  <tom@tromey.com>
2704
2705         * solib-aix.c (solib_aix_get_section_offsets): Return
2706         unique_xmalloc_ptr.
2707         (solib_aix_solib_create_inferior_hook): Update.
2708
2709 2018-06-18  Tom Tromey  <tom@tromey.com>
2710
2711         * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
2712
2713 2018-06-18  Tom Tromey  <tom@tromey.com>
2714
2715         * solib-frv.c (frv_relocate_main_executable): Use
2716         unique_xmalloc_ptr.
2717         * solib-dsbt.c (dsbt_relocate_main_executable): Use
2718         unique_xmalloc_ptr.
2719
2720 2018-06-18  Tom Tromey  <tom@tromey.com>
2721
2722         * objfiles.h (inhibit_section_map_updates): Update.
2723         (resume_section_map_updates, resume_section_map_updates_cleanup):
2724         Remove.
2725         * solib-svr4.c (svr4_handle_solib_event): Update.
2726         * objfiles.c (inhibit_section_map_updates): Return
2727         scoped_restore_tmpl<int>.
2728         (resume_section_map_updates, resume_section_map_updates_cleanup):
2729         Remove.
2730
2731 2018-06-18  Tom Tromey  <tom@tromey.com>
2732
2733         * valprint.h (read_string): Update.
2734         * valprint.c (read_string): Change type of "buffer".
2735         (val_print_string): Update.
2736         * python/py-value.c (valpy_string): Update.
2737         * language.h (struct language_defn) <la_get_string>: Change
2738         type of "buffer".
2739         (default_get_string, c_get_string): Update.
2740         * language.c (default_get_string): Change type of "buffer".
2741         * guile/scm-value.c (gdbscm_value_to_string): Update.
2742         * c-lang.c (c_get_string): Change type of "buffer".
2743
2744 2018-06-18  Tom Tromey  <tom@tromey.com>
2745
2746         * ser-mingw.c (struct pipe_state_destroyer): New.
2747         (pipe_state_up): New typedef.
2748         (cleanup_pipe_state): Remove.
2749         (pipe_windows_open): Use pipe_state_up.  Don't release argv.
2750
2751 2018-06-18  Tom Tromey  <tom@tromey.com>
2752
2753         * rust-lang.h (rust_yyerror): Don't declare.
2754         * rust-lang.c (rust_language_defn): Update.
2755         * rust-exp.y (yyerror): Now static.
2756         * parse.c (parse_exp_in_context_1): Update.
2757         * p-lang.h (p_yyerror): Don't declare.
2758         * p-lang.c (p_language_defn): Update.
2759         * p-exp.y (yyerror): Now static.
2760         * opencl-lang.c (opencl_language_defn): Update.
2761         * objc-lang.c (objc_language_defn): Update.
2762         * m2-lang.h (m2_yyerror): Don't declare.
2763         * m2-lang.c (m2_language_defn): Update.
2764         * m2-exp.y (yyerror): Now static.
2765         * language.h (struct language_defn) <la_error>: Remove.
2766         * language.c (unk_lang_error): Remove.
2767         (unknown_language_defn, auto_language_defn): Remove.
2768         * go-lang.h (go_yyerror): Don't declare.
2769         * go-lang.c (go_language_defn): Update.
2770         * go-exp.y (yyerror): Now static.
2771         * f-lang.h (f_yyerror): Don't declare.
2772         * f-lang.c (f_language_defn): Update.
2773         * f-exp.y (yyerror): Now static.
2774         * d-lang.h (d_yyerror): Don't declare.
2775         * d-lang.c (d_language_defn): Update.
2776         * d-exp.y (yyerror): Now static.
2777         * c-lang.h (c_yyerror): Don't declare.
2778         * c-lang.c (c_language_defn, cplus_language_defn)
2779         (asm_language_defn, minimal_language_defn): Update.
2780         * c-exp.y (yyerror): Now static.
2781         * ada-lang.h (ada_yyerror): Don't declare.
2782         * ada-lang.c (ada_language_defn): Update.
2783         * ada-exp.y (yyerror): Now static.
2784
2785 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
2786
2787         * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
2788         (store_sveregs_to_thread): Likewise.
2789         (aarch64_linux_fetch_inferior_registers): Check for SVE.
2790         (aarch64_linux_store_inferior_registers): Likewise.
2791         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
2792         function.
2793         (aarch64_sve_regs_copy_to_regcache): Likewise.
2794         (aarch64_sve_regs_copy_from_regcache): Likewise.
2795         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
2796         declaration.
2797         (aarch64_sve_regs_copy_to_regcache): Likewise.
2798         (aarch64_sve_regs_copy_from_regcache): Likewise.
2799         (sve_context): Structure from Linux headers.
2800         (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
2801         (SVE_SIG_ZREG_SIZE): Likewise.
2802         (SVE_SIG_PREG_SIZE): Likewise.
2803         (SVE_SIG_FFR_SIZE): Likewise.
2804         (SVE_SIG_REGS_OFFSET): Likewise.
2805         (SVE_SIG_ZREGS_OFFSET): Likewise.
2806         (SVE_SIG_ZREG_OFFSET): Likewise.
2807         (SVE_SIG_ZREGS_SIZE): Likewise.
2808         (SVE_SIG_PREGS_OFFSET): Likewise.
2809         (SVE_SIG_PREG_OFFSET): Likewise.
2810         (SVE_SIG_PREGS_SIZE): Likewise.
2811         (SVE_SIG_FFR_OFFSET): Likewise.
2812         (SVE_SIG_REGS_SIZE): Likewise.
2813         (SVE_SIG_CONTEXT_SIZE): Likewise.
2814         (SVE_PT_REGS_MASK): Likewise.
2815         (SVE_PT_REGS_FPSIMD): Likewise.
2816         (SVE_PT_REGS_SVE): Likewise.
2817         (SVE_PT_VL_INHERIT): Likewise.
2818         (SVE_PT_VL_ONEXEC): Likewise.
2819         (SVE_PT_REGS_OFFSET): Likewise.
2820         (SVE_PT_FPSIMD_OFFSET): Likewise.
2821         (SVE_PT_FPSIMD_SIZE): Likewise.
2822         (SVE_PT_SVE_ZREG_SIZE): Likewise.
2823         (SVE_PT_SVE_PREG_SIZE): Likewise.
2824         (SVE_PT_SVE_FFR_SIZE): Likewise.
2825         (SVE_PT_SVE_FPSR_SIZE): Likewise.
2826         (SVE_PT_SVE_FPCR_SIZE): Likewise.
2827         (__SVE_SIG_TO_PT): Likewise.
2828         (SVE_PT_SVE_OFFSET): Likewise.
2829         (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
2830         (SVE_PT_SVE_ZREG_OFFSET): Likewise.
2831         (SVE_PT_SVE_ZREGS_SIZE): Likewise.
2832         (SVE_PT_SVE_PREGS_OFFSET): Likewise.
2833         (SVE_PT_SVE_PREG_OFFSET): Likewise.
2834         (SVE_PT_SVE_PREGS_SIZE): Likewise.
2835         (SVE_PT_SVE_FFR_OFFSET): Likewise.
2836         (SVE_PT_SVE_FPSR_OFFSET): Likewise.
2837         (SVE_PT_SVE_FPCR_OFFSET): Likewise.
2838         (SVE_PT_SVE_SIZE): Likewise.
2839         (SVE_PT_SIZE): Likewise.
2840         (HAS_SVE_STATE): New define.
2841
2842 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
2843
2844         * nat/aarch64-sve-linux-sigcontext.h: New file.
2845         * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
2846         new files.
2847         (SVE_VQ_MIN): Likewise.
2848         (SVE_VQ_MAX): Likewise.
2849         (SVE_VL_MIN): Likewise.
2850         (SVE_VL_MAX): Likewise.
2851         (SVE_NUM_ZREGS): Likewise.
2852         (SVE_NUM_PREGS): Likewise.
2853         (sve_vl_valid): Likewise.
2854         (struct user_sve_header): Likewise.
2855
2856 2018-06-16  Andrew Burgess  <andrew.burgess@embecosm.com>
2857             Richard Bunt <Richard.Bunt@arm.com>
2858
2859         * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
2860         was requested by GDB.
2861
2862 2018-06-15  Tom de Vries  <tdevries@suse.de>
2863
2864         * MAINTAINERS (Write After Approval): Add Tom de Vries.
2865
2866 2018-06-14  Simon Marchi  <simon.marchi@polymtl.ca>
2867
2868         * gnulib/update-gnulib.sh: Print expected versions of
2869         autoconf/aclocal.
2870
2871 2018-06-14  Simon Marchi  <simon.marchi@ericsson.com>
2872
2873         * arch-utils.c (default_type_align): Use type_length_units.
2874         * gdbtypes.c (type_align): Use type_length_units.
2875
2876 2018-06-14  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2877
2878         * cli/cli-script.c (_initialize_cli_script): Fix online documentation
2879         of 'define' command.
2880
2881 2018-06-14  Tom de Vries  <tdevries@suse.de>
2882
2883         PR cli/22573
2884         * infcmd.c (print_return_value_1): Use get_user_print_options instead of
2885         get_no_prettyformat_print_options.
2886
2887 2018-06-13  Simon Marchi  <simon.marchi@ericsson.com>
2888
2889         * sparc-nat.h: Include target.h.
2890         * sparc64-linux-nat.c (class sparc64_linux_nat_target)
2891         <fetch_registers>: Remove this argument in function call.
2892         <store_registers>: Remove this argument in function call, remove
2893         extra semicolon.
2894         <low_forget_process>: Call sparc64_forget_process instead of
2895         sparc_forget_process.
2896
2897 2018-06-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2898
2899         * procfs.c (_initialize_procfs): Use add_inf_child_target.
2900         (procfs_target::make_corefile_notes): Adjust to new
2901         target_read_alloc return type.
2902
2903 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
2904             Stephen Roberts  <stephen.roberts@arm.com>
2905
2906         PR gdb/22882
2907         * infrun.c (fetch_inferior_event): If GDB is not proceeding then
2908         run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
2909         Move should_notify_stop local into more inner scope.
2910
2911 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
2912             Stephen Roberts  <stephen.roberts@arm.com>
2913
2914         PR gdb/22882
2915         * infrun.c (resume_1): Add call to mark_async_event_handler.
2916
2917 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
2918
2919         * infrun.c (do_target_wait): Change old version of $pc printed.
2920
2921 2018-06-11  Simon Marchi  <simon.marchi@ericsson.com>
2922
2923         * dwarf2read.c (read_index_from_section): Rename to...
2924         (read_gdb_index_from_section): ... this, update all callers.
2925         (dwarf2_read_index): Rename to...
2926         (dwarf2_read_gdb_index): ... this, update all callers.
2927
2928 2018-06-11  John David Anglin  <danglin@gcc.gnu.org>
2929
2930         * gdb/hppa-linux-nat.c
2931         (hppa_linux_nat_target::fetch_inferior_registers): Rename to
2932         hppa_linux_nat_target::fetch_registers.
2933
2934 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
2935
2936         * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
2937         * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
2938         (AARCH64_DWARF_SVE_FFR): Likewise.
2939         (AARCH64_DWARF_SVE_P0): Likewise.
2940         (AARCH64_DWARF_SVE_Z0): Likewise.
2941
2942 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
2943
2944         * common/common-regcache.h (raw_compare): New function.
2945         * regcache.c (regcache::raw_compare): Likewise.
2946         * regcache.h (regcache::raw_compare): New declaration.
2947
2948 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
2949
2950         * common/common-regcache.h (reg_buffer_common): New structure.
2951         * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
2952         (reg_buffer::raw_supply): Likewise.
2953         (reg_buffer::raw_supply_integer): Likewise.
2954         (reg_buffer::raw_supply_zeroed): Likewise.
2955         (reg_buffer::raw_collect): Likewise.
2956         (reg_buffer::raw_collect_integer): Likewise.
2957         * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
2958         (reg_buffer::raw_supply): Likewise.
2959         (reg_buffer::raw_supply_integer): Likewise.
2960         (reg_buffer::raw_supply_zeroed): Likewise.
2961         (reg_buffer::raw_collect): Likewise.
2962         (reg_buffer::raw_collect_integer): Likewise.
2963
2964 2018-06-10  Tom Tromey  <tom@tromey.com>
2965
2966         * remote.c (stop_reply_p): Remove typedef.  Don't declare queue.
2967         (class remote_state) <stop_reply_queue>: Now std::vector.
2968         (remote_state::~remote_state)
2969         (remote_target::stop_reply_queue_length): Update.
2970         (struct queue_iter_param, remove_child_of_pending_fork)
2971         (struct check_pending_event_prevents_wildcard_vcont_callback_data)
2972         (check_pending_event_prevents_wildcard_vcont_callback)
2973         (remove_stop_reply_for_inferior)
2974         (remove_stop_reply_of_remote_state)
2975         (remote_notif_remove_once_on_match)
2976         (stop_reply_match_ptid_and_ws)
2977         (remote_kill_child_of_pending_fork): Remove.
2978         (remote_target::remove_new_fork_children)
2979         (remote_target::check_pending_events_prevent_wildcard_vcont)
2980         (remote_target::discard_pending_stop_replies)
2981         (remote_target::discard_pending_stop_replies_in_queue)
2982         (remote_target::remote_notif_remove_queued_reply)
2983         (remote_target::queued_stop_reply)
2984         (remote_target::push_stop_reply, remote_target::peek_stop_reply)
2985         (remote_target::wait, remote_target::kill_new_fork_children)
2986         (remote_target::async): Update.
2987
2988 2018-06-10  Tom Tromey  <tom@tromey.com>
2989
2990         * record-full.c (record_full_arch_list_cleanups): Remove.
2991         (record_full_message): Use try/catch.
2992         (record_full_wait_cleanups): Remove.
2993         (record_full_wait_1): Use try/catch.
2994         (record_full_restore): Likewise.
2995
2996 2018-06-10  Tom Tromey  <tom@tromey.com>
2997
2998         * record-full.c (record_full_breakpoint_p): Remove typedef.  Don't
2999         declare VEC.  Add constructor.
3000         <in_target_beneath>: Now bool.
3001         (record_full_breakpoints): Now a std::vector, static.
3002         (record_full_sync_record_breakpoints)
3003         (record_full_init_record_breakpoints)
3004         (record_full_target::insert_breakpoint)
3005         (record_full_target::remove_breakpoint): Update.  Don't use XNEW.
3006
3007 2018-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
3008
3009         * dwarf2read.c (process_cu_includes): Remove struct keyword.
3010         * serial.c (serial_interface_lookup): Remove struct keyword.
3011
3012 2018-06-10  Tom Tromey  <tom@tromey.com>
3013
3014         * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
3015         method.
3016         * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
3017         a method.
3018         * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
3019         method.
3020         * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
3021         "beneath" as a method.
3022         * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
3023         Use "beneath" as a method.
3024
3025 2018-06-10  Tom Tromey  <tom@tromey.com>
3026
3027         * tracefile.c (struct trace_file_writer_deleter): New.
3028         <operator()>: Rename from trace_file_writer_xfree.
3029         (trace_file_writer_up): New typedef.
3030         (tsave_command, trace_save_tfile, trace_save_ctf): Update.
3031
3032 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
3033
3034         * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
3035         <m_registers, m_register_status>: Change type to
3036         std::unique_ptr.
3037         * regcache.c (reg_buffer::reg_buffer): Use new instead of
3038         XCNEWVEC.
3039
3040 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
3041
3042         * common/common-regcache.h (enum register_status): Add
3043         underlying type "signed char".
3044         * regcache.h (reg_buffer) <m_register_status>: Change type to
3045         register_status *.
3046         * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
3047         register_status instead of signed char.
3048         (reg_buffer::save): Use REG_UNKNOWN instead of 0.
3049         (reg_buffer::get_register_status): Remove cast.
3050         (readable_regcache::raw_read): Remove cast.
3051         (readable_regcache::cooked_read): Remove cast.
3052
3053 2018-06-09  Tom Tromey  <tom@tromey.com>
3054
3055         * source.c (reverse_search_command, forward_search_command): Use
3056         scoped_fd.
3057
3058 2018-06-09  Tom Tromey  <tom@tromey.com>
3059
3060         * serial.c (serial_ops_p): Remove typedef.  Don't declare VEC.
3061         (serial_ops_list): Now static, std::vector.
3062         (serial_interface_lookup, serial_add_interface): Update.
3063
3064 2018-06-09  Tom Tromey  <tom@tromey.com>
3065
3066         * dwarf2read.c (process_cu_includes): Update.
3067         (process_full_comp_unit): Update.
3068         * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
3069         std::vector.
3070
3071 2018-06-08  Paul Koning  <paul_koning@dell.com>
3072
3073         PR gdb/23252
3074
3075         * python/python.c (do_start_initialization):
3076         Avoid call to internal Python API.
3077         (init__gdb_module): New function.
3078
3079 2018-06-08  Gary Benson <gbenson@redhat.com>
3080
3081         * linux-thread-db.c (valprint.h): New include.
3082         (struct check_thread_db_info): New structure.
3083         (check_thread_db_on_load, tdb_testinfo): New static globals.
3084         (check_thread_db, check_thread_db_callback): New functions.
3085         (try_thread_db_load_1): Run integrity checks if requested.
3086         (maintenance_check_libthread_db): New function.
3087         (_initialize_thread_db): Register "maint check libthread-db"
3088         and "maint set/show check-libthread-db".
3089         * NEWS: Mention the above new commands.
3090
3091 2018-06-08  Tom Tromey  <tom@tromey.com>
3092
3093         * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
3094         now a method.
3095
3096 2018-06-08  Tom Tromey  <tom@tromey.com>
3097
3098         * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
3099
3100 2018-06-08  Tom Tromey  <tom@tromey.com>
3101
3102         * common/btrace-common.h (struct btrace_data): Add constructor,
3103         destructor, move assignment operator.
3104         <empty, clear, fini>: New methods.
3105         <format>: Initialize.
3106         (btrace_data_init, btrace_data_fini, btrace_data_clear)
3107         (btrace_data_empty): Don't declare.
3108         * common/btrace-common.c (btrace_data_init): Remove.
3109         (btrace_data::fini): Rename from btrace_data_fini.
3110         (btrace_data::empty): Rename from btrace_data_empty.
3111         (btrace_data::clear): Rename from btrace_data_clear.  Return
3112         bool.
3113         * btrace.h (make_cleanup_btrace_data): Don't declare.
3114         * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
3115         (parse_xml_btrace): Update.
3116         (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
3117         (maint_btrace_clear_packet_history_cmd): Update.
3118
3119 2018-06-07  Pedro Alves  <palves@redhat.com>
3120
3121         * target.h (target_ops) <beneath>: Now a method.  All references
3122         updated.
3123         (class target_stack): New.
3124         * target.c (g_target_stack): New.
3125         (g_current_top_target): Delete.
3126         (current_top_target): Get the top target out of g_target_stack.
3127         (target_stack::push, target_stack::unpush): New.
3128         (push_target, unpush_target): Reimplement.
3129         (target_is_pushed): Reimplement in terms of g_target_stack.
3130         (target_ops::beneath, target_stack::find_beneath): New.
3131
3132 2018-06-07  Pedro Alves  <palves@redhat.com>
3133
3134         * target.h (find_target_beneath): Delete declaration.
3135         * target.c (find_target_beneath): Delete definition.
3136         * aix-thread.c: All callers of find_target_beneath adjusted to
3137         call target_ops::beneath instead.
3138         * bsd-uthread.c: Likewise.
3139         * linux-thread-db.c: Likewise.
3140         * ravenscar-thread.c: Likewise.
3141         * sol-thread.c: Likewise.
3142         * spu-multiarch.c: Likewise.
3143
3144 2018-06-07  Pedro Alves  <palves@redhat.com>
3145
3146         * target.h (target_ops) <beneath>: Now a method.  All references
3147         updated.
3148         (target_ops) <m_beneath>: New.
3149         * target.c (target_ops::beneath): New.
3150         * corelow.c: Adjust all references to target_ops::beneath.
3151         * linux-thread-db.c: Likewise.
3152         * make-target-delegates: Likewise.
3153         * record-btrace.c: Likewise.
3154         * record-full.c: Likewise.
3155         * remote.c: Likewise.
3156         * target.c: Likewise.
3157         * target-delegates.c: Regenerate.
3158
3159 2018-06-07  Pedro Alves  <palves@redhat.com>
3160
3161         * target.h (target_stack): Delete.
3162         (current_top_target): Declare function.
3163         * target.c (target_stack): Delete.
3164         (g_current_top_target): New.
3165         (current_top_target): New function.
3166         * auxv.c: Use current_top_target instead of target_stack
3167         throughout.
3168         * avr-tdep.c: Likewise.
3169         * breakpoint.c: Likewise.
3170         * corefile.c: Likewise.
3171         * elfread.c: Likewise.
3172         * eval.c: Likewise.
3173         * exceptions.c: Likewise.
3174         * frame.c: Likewise.
3175         * gdbarch-selftests.c: Likewise.
3176         * gnu-v3-abi.c: Likewise.
3177         * ia64-tdep.c: Likewise.
3178         * ia64-vms-tdep.c: Likewise.
3179         * infcall.c: Likewise.
3180         * infcmd.c: Likewise.
3181         * infrun.c: Likewise.
3182         * linespec.c: Likewise.
3183         * linux-tdep.c: Likewise.
3184         * minsyms.c: Likewise.
3185         * ppc-linux-nat.c: Likewise.
3186         * ppc-linux-tdep.c: Likewise.
3187         * procfs.c: Likewise.
3188         * regcache.c: Likewise.
3189         * remote.c: Likewise.
3190         * rs6000-tdep.c: Likewise.
3191         * s390-linux-nat.c: Likewise.
3192         * s390-tdep.c: Likewise.
3193         * solib-aix.c: Likewise.
3194         * solib-darwin.c: Likewise.
3195         * solib-dsbt.c: Likewise.
3196         * solib-spu.c: Likewise.
3197         * solib-svr4.c: Likewise.
3198         * solib-target.c: Likewise.
3199         * sparc-tdep.c: Likewise.
3200         * sparc64-tdep.c: Likewise.
3201         * spu-tdep.c: Likewise.
3202         * symfile.c: Likewise.
3203         * symtab.c: Likewise.
3204         * target-descriptions.c: Likewise.
3205         * target-memory.c: Likewise.
3206         * target.c: Likewise.
3207         * target.h: Likewise.
3208         * tracefile-tfile.c: Likewise.
3209         * tracepoint.c: Likewise.
3210         * valops.c: Likewise.
3211         * valprint.c: Likewise.
3212         * value.c: Likewise.
3213         * windows-tdep.c: Likewise.
3214         * mi/mi-main.c: Likewise.
3215
3216 2018-06-07  Tom Tromey  <tom@tromey.com>
3217
3218         * valprint.h (build_address_symbolic): Declare.
3219         * printcmd.c (print_address_symbolic): Update.
3220         (build_address_symbolic): Change "name" and "filename" to
3221         std::string.
3222         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
3223         Update.
3224         * defs.h (build_address_symbolic): Remove declaration.
3225
3226 2018-06-07  Alan Hayward  <alan.hayward@arm.com>
3227
3228         * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
3229         (aarch64_vnv_type): Add function.
3230         (aarch64_pseudo_register_name): Add V regs for SVE.
3231         (aarch64_pseudo_register_type): Likewise.
3232         (aarch64_pseudo_register_reggroup_p): Likewise.
3233         (aarch64_pseudo_read_value_2): Use V0 offset for SVE
3234         (aarch64_pseudo_read_value): Add V regs for SVE.
3235         (aarch64_pseudo_write_2): Use V0 offset for SVE
3236         (aarch64_pseudo_write): Add V regs for SVE.
3237         * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
3238
3239 2018-06-06  Sergio Durigan Junior  <sergiodj@redhat.com>
3240
3241         * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
3242         (sve_vl_from_vq): Likewise.
3243
3244 2018-06-05  Tom Tromey  <tom@tromey.com>
3245
3246         * cli/cli-cmds.c (show_version): Update.
3247         * top.c (print_gdb_version): Add "interactive" parameter.
3248         Update.
3249         * main.c (captured_main_1): Update.
3250         * top.h (print_gdb_version): Add "interactive" parameter and a
3251         comment.
3252
3253 2018-06-05  David Malcolm  <dmalcolm@redhat.com>
3254
3255         * common/enum-flags.h: Add trailing semicolon to example in
3256         comment.
3257
3258 2018-06-05  Tom Tromey  <tom@tromey.com>
3259
3260         PR cli/12326:
3261         * NEWS: Add entry about pager.
3262         * utils.c (pagination_disabled_for_command): New global.
3263         (prompt_for_continue): Allow "c" response to prompt.
3264         (reinitialize_more_filter): Clear
3265         pagination_disabled_for_command.
3266         (fputs_maybe_filtered): Check pagination_disabled_for_command.
3267
3268 2018-06-04  Tom Tromey  <tom@tromey.com>
3269
3270         * ada-lang.h (ada_lookup_symbol_list): Update.
3271         * ada-lang.c (resolve_subexp): Update.
3272         (symbols_are_identical_enums): Change type of syms.  Remove nsyms
3273         parameter.
3274         (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
3275         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
3276         results parameter to std::vector.
3277         (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
3278         Update.
3279         * ada-exp.y (block_lookup): Update.
3280         (select_possible_type_sym): Change type of syms.  Remove nsyms
3281         parameter.
3282         (write_var_or_type, write_name_assoc): Update.
3283
3284 2018-06-04  Joel Brobecker  <brobecker@adacore.com>
3285
3286         * windows-nat.c (windows_nat_target::xfer_partial): Return
3287         TARGET_XFER_E_IO if we need to delegate to the target beneath
3288         but BENEATH is NULL.
3289
3290 2018-06-04  Simon Marchi  <simon.marchi@ericsson.com>
3291
3292         * Makefile.in (config.status): Add configure.nat as a
3293         dependency.
3294
3295 2018-06-04  Tom Tromey  <tom@tromey.com>
3296
3297         * cp-name-parser.y (cpname_state): Add method declarations.
3298         (HANDLE_QUAL): Update.
3299         (cpname_state::d_grab, cpname_state::fill_comp)
3300         (cpname_state::make_operator, cpname_state::make_dtor)
3301         (cpname_state::make_builtin_type, cpname_state::make_name)
3302         (cpname_state::d_qualify, cpname_state::d_int_type)
3303         (cpname_state::d_unary, cpname_state::d_binary): Now methods.
3304         (%union): Move earlier.
3305
3306 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
3307
3308         * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
3309
3310 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
3311
3312         * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
3313         (aarch64_pseudo_write_1): Likewise.
3314         (aarch64_pseudo_read_value): Use helper.
3315         (aarch64_pseudo_write): Likewise.
3316
3317 2018-06-04  Pedro Alves  <palves@redhat.com>
3318
3319         * darwin-nat.c (darwin_ops): Delete.
3320         (darwin_attach_pid): Use get_native_target.
3321
3322 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
3323
3324         * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
3325         * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
3326
3327 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
3328
3329         * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
3330         * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
3331         (aarch64_gdbarch_init): Check for SVE.
3332         * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
3333
3334 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
3335
3336         * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
3337         * aarch64-tdep.h (aarch64_read_description): Likewise.
3338         * arch/aarch64.c (aarch64_create_target_description): Likewise.
3339         * arch/aarch64.h (aarch64_create_target_description): Likewise.
3340         * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
3341         * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
3342         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
3343
3344 2018-06-02  Simon Marchi  <simon.marchi@ericsson.com>
3345
3346         * value.c (value_fetch_lazy_bitfield): New.
3347         (value_fetch_lazy_memory): New.
3348         (value_fetch_lazy_register): New.
3349         (value_fetch_lazy): Factor out to smaller functions.
3350
3351 2018-06-01  Tom Tromey  <tom@tromey.com>
3352
3353         * cp-name-parser.y (backslashable, represented): Now const.
3354
3355 2018-06-01  Tom Tromey  <tom@tromey.com>
3356
3357         * cp-name-parser.y: Include parser-defs.h.
3358         (parser_fprintf): Remove declaration.
3359
3360 2018-06-01  Tom Tromey  <tom@tromey.com>
3361
3362         * cp-name-parser.y: Use %pure-parser, %lex-param, and
3363         %parse-param.
3364         (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
3365         (global_result): Remove globals.
3366         (struct cpname_state): New.
3367         (yyparse): Don't declare.
3368         (yylex, yyerror): Move declarations after %union.
3369         (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
3370         (make_name): Add state parameter.
3371         Update all callers.
3372         (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
3373         parameter.
3374         (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
3375         Update.
3376         (yylex): Add lvalp, state parameters.
3377         (yyerror): Add state parameter.
3378         (cp_demangled_name_to_comp): Update.
3379
3380 2018-06-01  Tom Tromey  <tom@tromey.com>
3381
3382         * cp-name-parser.y (parser_fprintf): Declare.
3383         (GDB_YY_REMAP_PREFIX): Define.
3384         Include yy-remap.h.  Don't redefine yy* identifiers.
3385
3386 2018-06-01  Tom Tromey  <tom@tromey.com>
3387
3388         * python/py-type.c (typy_legacy_template_argument): Update.
3389         * cp-support.h (cp_demangled_name_to_comp): Update.
3390         * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
3391         parameter to be a "std::string *".
3392         (main): Update.
3393
3394 2018-06-01  H.J. Lu  <hongjiu.lu@intel.com>
3395
3396         * ada-lex.l: Include "diagnostics.h" instead of
3397         "common/diagnostics.h".
3398         * unittests/environ-selftests.c: Likewise.
3399         * common/diagnostics.h: Moved to ../include.
3400
3401 2018-06-01  Joel Brobecker  <brobecker@adacore.com>
3402
3403         * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
3404         to language_mode_manual while calling breakpoint_re_set_one.
3405
3406 2018-06-01  Tom Tromey  <tom@tromey.com>
3407
3408         * valops.c (value_cast_structs, destructor_name_p): Update.
3409         * symtab.c (gdb_mangle_name): Update.
3410         * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
3411         Update.
3412         * p-valprint.c (pascal_object_is_vtbl_ptr_type)
3413         (pascal_object_print_value_fields, pascal_object_print_value):
3414         Update.
3415         * p-typeprint.c (pascal_type_print_derivation_info): Update.
3416         * linespec.c (find_methods): Update.
3417         * gdbtypes.h (type_name_no_tag): Remove.
3418         (type_name_or_error): Rename from type_name_no_tag_or_error.
3419         * gdbtypes.c (type_name_no_tag): Remove.
3420         (type_name_or_error): Rename from type_name_no_tag_or_error.
3421         (lookup_struct_elt_type, check_typedef): Update.
3422         * expprint.c (print_subexp_standard): Update.
3423         * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
3424         * d-namespace.c (d_lookup_nested_symbol): Update.
3425         * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
3426         (cp_print_class_member): Update.
3427         * cp-namespace.c (cp_lookup_nested_symbol): Update.
3428         * completer.c (add_struct_fields): Update.
3429         * c-typeprint.c (cp_type_print_derivation_info)
3430         (c_type_print_varspec_prefix, c_type_print_base_struct_union):
3431         Update.
3432         * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
3433         (ada_prefer_type, ada_is_exception_sym): Update.
3434
3435 2018-06-01  Tom Tromey  <tom@tromey.com>
3436
3437         * valops.c (enum_constant_from_type, value_namespace_elt)
3438         (value_maybe_namespace_elt): Update.
3439         * valarith.c (find_size_for_pointer_math): Update.
3440         * target-descriptions.c (make_gdb_type): Update.
3441         * symmisc.c (print_symbol): Update.
3442         * stabsread.c (define_symbol, read_type)
3443         (complain_about_struct_wipeout, add_undefined_type)
3444         (cleanup_undefined_types_1): Update.
3445         * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
3446         (rust_range_type_p, val_print_struct, rust_print_struct_def)
3447         (rust_internal_print_type, rust_composite_type)
3448         (rust_evaluate_funcall, rust_evaluate_subexp)
3449         (rust_inclusive_range_type_p): Update.
3450         * python/py-type.c (typy_get_tag): Update.
3451         * p-typeprint.c (pascal_type_print_base): Update.
3452         * mdebugread.c (parse_symbol, parse_type): Update.
3453         * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
3454         Update.
3455         * guile/scm-type.c (gdbscm_type_tag): Update.
3456         * go-lang.c (sixg_string_p): Update.
3457         * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
3458         Update.
3459         * gdbtypes.h (struct main_type) <tag_name>: Remove.
3460         (TYPE_TAG_NAME): Remove.
3461         * gdbtypes.c (type_name_no_tag): Simplify.
3462         (check_typedef, check_types_equal, recursive_dump_type)
3463         (copy_type_recursive, arch_composite_type): Update.
3464         * f-typeprint.c (f_type_print_base): Update.  Print "Type" prefix
3465         in summary mode when needed.
3466         * eval.c (evaluate_funcall): Update.
3467         * dwarf2read.c (fixup_go_packaging, read_structure_type)
3468         (process_structure_scope, read_enumeration_type)
3469         (read_namespace_type, read_module_type, determine_prefix): Update.
3470         * cp-support.c (inspect_type): Update.
3471         * coffread.c (process_coff_symbol, decode_base_type): Update.
3472         * c-varobj.c (c_is_path_expr_parent): Update.
3473         * c-typeprint.c (c_type_print_base_struct_union): Update.
3474         (c_type_print_base_1): Update.  Print struct/class/union/enum in
3475         summary when using C language.
3476         * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
3477         (gen_maybe_namespace_elt): Update.
3478         * ada-lang.c (ada_type_name): Simplify.
3479         (empty_record, ada_template_to_fixed_record_type_1)
3480         (template_to_static_fixed_type)
3481         (to_record_with_fixed_variant_part, ada_check_typedef): Update.
3482
3483 2018-06-01  Tom Tromey  <tom@tromey.com>
3484
3485         * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
3486         c_print_type.
3487         * c-typeprint.c (c_print_type_1): Add "language" parameter.
3488         (c_print_type): Update.
3489         (c_print_type): New overload.
3490         (c_type_print_varspec_prefix, c_type_print_args)
3491         (c_type_print_varspec_suffix, c_print_type_no_offsets)
3492         (c_type_print_base_struct_union, c_type_print_base_1)
3493         (cp_type_print_method_args): Add "language" parameter.
3494         (c_type_print_base): Update.
3495         * c-lang.h (c_print_type): Add new overload.
3496
3497 2018-06-01  Tom Tromey  <tom@tromey.com>
3498
3499         * typeprint.h (c_type_print_varspec_suffix): Don't declare.
3500         * c-typeprint.c (c_type_print_varspec_suffix): Now static.
3501
3502 2018-06-01  Alan Hayward  <alan.hayward@arm.com>
3503
3504         * aarch64-tdep.c (aarch64_sve_register_names): New const
3505         var.
3506         * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
3507         (AARCH64_SVE_Z_REGS_NUM): New define.
3508         (AARCH64_SVE_P_REGS_NUM): Likewise.
3509         (AARCH64_SVE_NUM_REGS): Likewise.
3510
3511 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
3512
3513         * nat/linux-ptrace.h [__alpha__]
3514         (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
3515         definitions.
3516
3517 2018-05-31  Maciej W. Rozycki  <macro@mips.com>
3518
3519         * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
3520         the endianness selected.
3521         * NEWS: Document `set endian auto' mode operation update.
3522
3523 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
3524
3525         * Makefile.in: Add new header.
3526         * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
3527         (sve_vl_from_vg): Likewise.
3528         (sve_vq_from_vl): Likewise.
3529         (sve_vl_from_vq): Likewise.
3530         (sve_vq_from_vg): Likewise.
3531         (sve_vg_from_vq): Likewise.
3532         * configure.nat: Add new c file.
3533         * nat/aarch64-sve-linux-ptrace.c: New file.
3534         * nat/aarch64-sve-linux-ptrace.h: New file.
3535
3536 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
3537
3538         * aarch64-linux-nat.c (aarch64_linux_read_description):
3539         Add parmeter zero.
3540         * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
3541         Likewise.
3542         * aarch64-tdep.c (tdesc_aarch64_list): Add.
3543         (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
3544         (aarch64_gdbarch_init): Add parmeter zero.
3545         * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
3546         * arch/aarch64.c (aarch64_create_target_description): Check VQ.
3547         * arch/aarch64.h (aarch64_create_target_description): Add VQ.
3548         parmeter.
3549         * doc/gdb.texinfo: Describe SVE feature
3550         * features/aarch64-sve.c: New file.
3551
3552 2018-05-31  Omair Javaid  <omair.javaid@linaro.org>
3553
3554         PR gdb/23210
3555         * gdbarch.sh (significant_addr_bit): Default to zero when
3556         not set by target architecture.
3557         * gdbarch.c: Re-generated.
3558         * utils.c (address_significant): Update.
3559
3560 2018-05-30  Joel Brobecker  <brobecker@adacore.com>
3561
3562         * stack.c (func_command): Remove trailing newline in call to error.
3563
3564 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3565
3566         * regcache.h (regcache_raw_collect): Remove, update callers to
3567         use regcache::raw_collect.
3568         * regcache.c (regcache_raw_collect): Remove.
3569
3570 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3571
3572         * regcache.h (regcache_raw_supply): Remove, update callers to
3573         use detached_regcache::raw_supply.
3574         * regcache.c (regcache_raw_supply): Remove.
3575
3576 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3577
3578         * regcache.h (regcache_cooked_write_part): Remove, update
3579         callers to use regcache::cooked_write_part.
3580         * regcache.c (regcache_cooked_write_part): Remove.
3581
3582 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3583
3584         * regcache.h (regcache_cooked_read_part): Remove, update callers
3585         to use readable_regcache::cooked_read_part.
3586         * regcache.c (regcache_cooked_read_part): Remove.
3587
3588 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3589
3590         * regcache.h (regcache_cooked_read_value): Remove, update
3591         callers to use readable_regcache::cooked_read_value.
3592         * regcache.c (regcache_cooked_read_value): Remove.
3593
3594 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3595
3596         * regcache.h (regcache_cooked_write): Remove, update callers to
3597         use regcache::cooked_write.
3598         * regcache.c (regcache_cooked_write): Remove.
3599
3600 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3601
3602         * regcache.h (regcache_invalidate): Remove, update callers to
3603         use detached_regcache::invalidate instead.
3604         * regcache.c (regcache_invalidate): Remove.
3605
3606 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3607
3608         * regcache.h (regcache_raw_write_part): Remove, update callers
3609         to use regcache::raw_write_part instead.
3610         * regcache.c (regcache_raw_write_part): Remove.
3611
3612 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3613
3614         * regcache.h (regcache_raw_read_part): Remove, update callers to
3615         use readable_regcache::raw_read_part instead.
3616         * regcache.c (regcache_raw_read_part): Remove.
3617
3618 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3619
3620         * regcache.h (regcache_cooked_read): Remove, update callers to
3621         use readable_regcache::cooked_read instead.
3622         * regcache.c (regcache_cooked_read): Remove.
3623
3624 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3625
3626         * regcache.h (regcache_raw_write): Remove, update callers to use
3627         regcache::raw_write instead.
3628         * regcache.c (regcache_raw_write): Remove.
3629
3630 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3631
3632         * regcache.h (regcache_raw_read): Remove, update callers to use
3633         readable_regcache::raw_read instead.
3634         * regcache.c (regcache_raw_read): Remove.
3635
3636 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3637
3638         * regcache.h (regcache_raw_update): Remove, update callers to
3639         use readable_regcache::raw_update instead.
3640         * regcache.c (regcache_raw_update): Remove.
3641
3642 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3643
3644         * regcache.h (regcache_register_status): Remove, update callers
3645         to use reg_buffer::get_register_status directly instead.
3646         * regcache.c (regcache_register_status): Remove.
3647
3648 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3649
3650         * regcache.h (regcache_get_ptid): Remove, update all callers to
3651         call regcache::ptid instead.
3652         * regcache.c (regcache_get_ptid): Remove.
3653
3654 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3655
3656         * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
3657
3658 2018-05-30  Pedro Alves  <palves@redhat.com>
3659
3660         * common/common-exceptions.h (exception_rethrow): Use
3661         ATTRIBUTE_NORETURN.
3662
3663 2018-05-29  Simon Marchi  <simon.marchi@polymtl.ca>
3664
3665         * breakpoint.c (print_solib_event, check_status_catch_solib):
3666         Remove struct keyword in range-based for loops.
3667         * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
3668         * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
3669         Likewise.
3670         * linespec.c (find_superclass_methods, search_minsyms_for_name):
3671         Likewise.
3672         * symfile.c (addr_info_make_relative): Likewise.
3673         * thread.c (value_in_thread_stack_temporaries): Likewise.
3674
3675 2018-06-12  Weimin Pan  <weimin.pan@oracle.com>
3676
3677         PR gdb/16841
3678         * valops.c (value_struct_elt_for_reference): Call check_typedef on
3679         aggregate type to get its real type before accessing it.
3680
3681 2018-05-29  Weimin Pan  <weimin.pan@oracle.com>
3682
3683         * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
3684         * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
3685         * coff-pe-read.c (add_pe_forwarded_sym): Replace
3686         lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
3687         * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
3688         * jit.c (jit_breakpoint_re_set_internal): Likewise.
3689         * printcmd.c (info_address_command): Likewise.
3690
3691 2018-05-29  Tom Tromey  <tom@tromey.com>
3692
3693         * windows-nat.c (handle_exception): Update fall-through comment.
3694
3695 2018-05-29  Tom Tromey  <tom@tromey.com>
3696
3697         * progspace.h (so_list_ptr): Remove typedef.  Don't declare VEC.
3698         (struct program_space) <added_solibs>: Now a std::vector.
3699         * breakpoint.c (print_solib_event): Update.
3700         (check_status_catch_solib): Update.
3701         * progspace.c (clear_program_space_solib_cache): Update.
3702         * solib.c (update_solib_list): Update.
3703
3704 2018-05-29  Tom Tromey  <tom@tromey.com>
3705
3706         * python/py-type.c (typy_richcompare): Update.
3707         * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
3708         * gdbtypes.h (types_deeply_equal): Return bool.
3709         (types_equal): Likewise.
3710         * gdbtypes.c (type_equality_entry_d): Remove typedef.  Don't
3711         declare VEC.
3712         (check_types_equal): Change worklist to std::vector.  Return
3713         bool.
3714         (struct type_equality_entry): Add constructor.
3715         (compare_maybe_null_strings): Return bool.
3716         (check_types_worklist): Return bool.  Change worklist to
3717         std::vector.
3718         (types_deeply_equal): Use std::vector.
3719         (types_equal): Return bool.
3720         (compare_maybe_null_strings): Simplify.
3721
3722 2018-05-29  Tom Tromey  <tom@tromey.com>
3723
3724         * record-btrace.c (tp_t): Remove typedef.  Don't declare VEC.
3725
3726 2018-05-29  Tom Tromey  <tom@tromey.com>
3727
3728         * objc-lang.h: Don't include cp-support.h.
3729         * common/gdb_vecs.h (const_char_ptr): Remove typedef.  Don't
3730         declare VEC.
3731
3732 2018-05-27  Tom Tromey  <tom@tromey.com>
3733
3734         * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
3735
3736 2018-05-25  Tom Tromey  <tom@tromey.com>
3737
3738         * value.c (value::location): Initialize.
3739
3740 2018-05-25  Tom Tromey  <tom@tromey.com>
3741
3742         * dbxread.c (init_bincl_list): Remove.
3743         (bincl_list): Now a std::vector.
3744         (bincls_allocated, next_bincl): Remove.
3745         (free_bincl_list, do_free_bincl_list_cleanup)
3746         (make_cleanup_free_bincl_list): Remove.
3747         (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
3748         unique_xmalloc_ptr.
3749         (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
3750         (struct header_file_location): Add constructor.
3751         (add_bincl_to_list): Remove.
3752
3753 2018-05-25  Tom Tromey  <tom@tromey.com>
3754
3755         * tui/tui.c (tui_enable): Update.
3756         * mi/mi-interp.c (mi_interp::init): Update.
3757         * interps.h (class interp) <name>: New method.
3758         <m_name>: Rename from name.
3759         (~scoped_restore_interp): Update.
3760         * interps.c (interp::interp): Update.
3761         (interp_add, interp_set, interp_lookup_existing)
3762         (current_interp_named_p): Update.
3763
3764 2018-05-25  Tom Tromey  <tom@tromey.com>
3765
3766         * interps.c (interp_name): Remove.
3767         * mi/mi-interp.c (mi_interp::init): Update.
3768         * interps.h (interp_name): Remove.
3769         (~scoped_restore_interp): Update.
3770         * tui/tui.c (tui_enable): Update.
3771
3772 2018-05-25  Tom Tromey  <tom@tromey.com>
3773
3774         * utils.c (fputs_maybe_filtered): Update.
3775         * linespec.c (decode_line_full): Update.
3776         * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
3777         (mi_print_breakpoint_for_event, mi_solib_loaded)
3778         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
3779         (mi_user_selected_context_changed): Update.
3780         * mi/mi-main.c (mi_execute_command): Update.
3781         * cli/cli-script.c (execute_control_command): Update.
3782         * python/python.c (execute_gdb_command): Update.
3783         * solib.c (info_sharedlibrary_command): Update.
3784         * interps.c (interp_ui_out): Remove.
3785         * interps.h (interp_ui_out): Remove.
3786
3787 2018-05-25  Tom Tromey  <tom@tromey.com>
3788
3789         * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
3790         * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
3791         * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
3792
3793 2018-05-25  Tom Tromey  <tom@tromey.com>
3794
3795         * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
3796         * interps.c (interp_exec): Use scoped_restore.
3797
3798 2018-05-25  Tom Tromey  <tom@tromey.com>
3799
3800         * remote.c (remote_target::remote_file_get): Use
3801         gdb::byte_vector.
3802         (remote_target::remote_file_put): Likewise.
3803
3804 2018-05-25  Tom Tromey  <tom@tromey.com>
3805
3806         * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
3807         a std::string.
3808         (get_pe_section_index, add_pe_exported_sym): Update.
3809         (read_pe_exported_syms): Use gdb::def_vector.
3810
3811 2018-05-25  Tom Tromey  <tom@tromey.com>
3812
3813         * frame.c (remove_prev_frame): Remove.
3814         (get_prev_frame_if_no_cycle): Use TRY/CATCH.
3815
3816 2018-05-25  Maciej W. Rozycki  <macro@mips.com>
3817
3818         * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
3819         Remove prototypes.
3820         * mips-linux-nat.c (supply_fpregset): Always call
3821         `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
3822         (fill_fpregset): Always call `mips64_fill_fpregset' rather than
3823         `mips_fill_fpregset'.
3824         * mips-linux-tdep.c (mips_supply_fpregset)
3825         (mips_supply_fpregset_wrapper, mips_fill_fpregset)
3826         (mips_fill_fpregset_wrapper): Remove functions.
3827         (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
3828         (mips_linux_fpregset): Remove variable.
3829         (mips_linux_iterate_over_regset_sections): Use
3830         `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
3831         (mips_linux_o32_sigframe_init): Remove comment.
3832
3833 2018-05-25  Pedro Alves  <palves@redhat.com>
3834
3835         * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
3836         (struct readahead_cache, struct packet_reg, struct
3837         remote_arch_state, class remote_state): Move higher up in the
3838         file.
3839         (remote_target::m_remote_state): Now an object instead of a pointer.
3840         (remote_target::get_remote_state): Adjust.
3841
3842 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
3843
3844         * stack.c (select_and_print_frame): Delete.
3845         (struct function_bounds): Move struct within function.
3846         (func_command): Most content moved into new function
3847         find_frame_for_function, use new function, print result, add
3848         function comment.
3849         (find_frame_for_function): New function, now returns a result.
3850
3851 2018-05-24  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
3852
3853         * stack.c (iterate_over_block_arg_vars): Fix comment.
3854         (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
3855
3856 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
3857
3858         PR gdb/23203
3859         * frame.c
3860         (scoped_restore_selected_frame::scoped_restore_selected_frame):
3861         Define.
3862         (scoped_restore_selected_frame::~scoped_restore_selected_frame):
3863         Define.
3864         * frame.h (class scoped_restore_selected_frame): New class.
3865         * stack.c (print_frame_local_vars): Remove catching and rethrowing
3866         of any exception, use scoped_restore_selected_frame to restore the
3867         frame instead.
3868
3869 2018-05-24  Pedro Alves  <palves@redhat.com>
3870
3871         * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
3872         override.
3873
3874 2018-05-23  Tom Tromey  <tom@tromey.com>
3875
3876         * complaints.c (struct complaints): Remove.
3877         (symfile_complaint_book): Remove.
3878         (series): New global.
3879         (complaint_internal): Update.
3880         (clear_complaints): Update.
3881
3882 2018-05-23  Tom Tromey  <tom@tromey.com>
3883
3884         * complaints.c (counters): New global.
3885         (struct complain): Remove.
3886         (struct complaints) <root>: Remove.
3887         (complaint_sentinel): Remove.
3888         (symfile_complaint_book): Update.
3889         (find_complaint) Remove.
3890         (complaint_internal, clear_complaints): Update.
3891
3892 2018-05-23  Tom Tromey  <tom@tromey.com>
3893
3894         * complaints.c (struct complain) <file, line>: Remove.
3895         (find_complaint): Remove file, line parameters.
3896         (complaint_internal): Update.
3897
3898 2018-05-23  Tom Tromey  <tom@tromey.com>
3899
3900         * complaints.c (vcomplaint): Remove.
3901         (complaint_internal) Merge in contents of vcomplaint.
3902
3903 2018-05-23  Tom Tromey  <tom@tromey.com>
3904
3905         * complaints.c (struct complaints) <explanation>: Remove.
3906         (symfile_explanations): Remove.
3907         (symfile_complaint_book): Update.
3908         (vcomplaint): Update.
3909         (struct explanation): Remove.
3910
3911 2018-05-23  Tom Tromey  <tom@tromey.com>
3912
3913         * complaints.c (symfile_complaints): Remove.
3914         (complaint_internal): Remove "complaints" parameter.
3915         (clear_complaints, vcomplaint): Remove "c" parameter.
3916         (get_complaints): Remove.
3917         * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
3918         (dwarf2_debug_line_missing_file_complaint)
3919         (dwarf2_debug_line_missing_end_sequence_complaint)
3920         (dwarf2_complex_location_expr_complaint)
3921         (dwarf2_const_value_length_mismatch_complaint)
3922         (dwarf2_section_buffer_overflow_complaint)
3923         (dwarf2_macro_malformed_definition_complaint)
3924         (dwarf2_invalid_attrib_class_complaint)
3925         (create_addrmap_from_index, dw2_symtab_iter_next)
3926         (dw2_expand_marked_cus)
3927         (dw2_debug_names_iterator::find_vec_in_debug_names)
3928         (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
3929         (create_debug_type_hash_table, init_cutu_and_read_dies)
3930         (partial_die_parent_scope, add_partial_enumeration)
3931         (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
3932         (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
3933         (read_import_statement, read_file_scope, create_dwo_cu_reader)
3934         (create_cus_hash_table, create_dwp_hash_table)
3935         (inherit_abstract_dies, read_func_scope, read_call_site_scope)
3936         (dwarf2_rnglists_process, dwarf2_ranges_process)
3937         (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
3938         (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
3939         (handle_struct_member_die, process_structure_scope)
3940         (read_array_type, read_common_block, read_module_type)
3941         (read_tag_pointer_type, read_typedef, read_base_type)
3942         (read_subrange_type, load_partial_dies, partial_die_info::read)
3943         (partial_die_info::read, partial_die_info::read)
3944         (partial_die_info::read, read_checked_initial_length_and_offset)
3945         (dwarf2_string_attr, read_formatted_entries)
3946         (dwarf_decode_line_header)
3947         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
3948         (new_symbol, dwarf2_const_value_attr, lookup_die_type)
3949         (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
3950         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
3951         (get_signatured_type, get_DW_AT_signature_type)
3952         (decode_locdesc, file_file_name, consume_improper_spaces)
3953         (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
3954         (dwarf_decode_macro_bytes, dwarf_decode_macros)
3955         (dwarf2_symbol_mark_computed, set_die_type)
3956         (read_attribute_value): Update.
3957         * stap-probe.c (handle_stap_probe, get_stap_base_address):
3958         Update.
3959         * dbxread.c (unknown_symtype_complaint)
3960         (lbrac_mismatch_complaint, repeated_header_complaint)
3961         (set_namestring, function_outside_compilation_unit_complaint)
3962         (read_dbx_symtab, process_one_symbol): Update.
3963         * gdbtypes.c (stub_noname_complaint): Update.
3964         * windows-nat.c (handle_unload_dll): Update.
3965         * coffread.c (coff_symtab_read, enter_linenos, decode_type)
3966         (decode_base_type): Update.
3967         * xcoffread.c (bf_notfound_complaint, ef_complaint)
3968         (eb_complaint, record_include_begin, record_include_end)
3969         (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
3970         (process_xcoff_symbol, read_symbol)
3971         (function_outside_compilation_unit_complaint)
3972         (scan_xcoff_symtab): Update.
3973         * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
3974         * buildsym.c (finish_block_internal, make_blockvector)
3975         (end_symtab_get_static_block, augment_type_symtab): Update.
3976         * dtrace-probe.c (dtrace_process_dof)
3977         (dtrace_static_probe_ops::get_probes): Update.
3978         * complaints.h (struct complaint): Don't declare.
3979         (symfile_complaints): Remove.
3980         (complaint_internal): Remove "complaints" parameter.
3981         (complaint): Likewise.
3982         (clear_complaints): Likewise.
3983         * symfile.c (syms_from_objfile_1, finish_new_objfile)
3984         (reread_symbols): Update.
3985         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
3986         (dwarf2_frame_cache, decode_frame_entry): Update.
3987         * dwarf2loc.c (dwarf_reg_to_regnum): Update.
3988         * objc-lang.c (lookup_objc_class, lookup_child_selector)
3989         (info_selectors_command): Update.
3990         * macrotab.c (macro_include, check_for_redefinition)
3991         (macro_undef): Update.
3992         * objfiles.c (filter_overlapping_sections): Update.
3993         * stabsread.c (invalid_cpp_abbrev_complaint)
3994         (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
3995         (define_symbol, error_type, read_type, rs6000_builtin_type)
3996         (stabs_method_name_from_physname, read_member_functions)
3997         (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
3998         (attach_fields_to_type, complain_about_struct_wipeout)
3999         (read_range_type, read_args, common_block_start)
4000         (common_block_end, cleanup_undefined_types_1, scan_file_globals):
4001         Update.
4002         * mdebugread.c (index_complaint, unknown_ext_complaint)
4003         (basic_type_complaint, bad_tag_guess_complaint)
4004         (bad_rfd_entry_complaint, unexpected_type_code_complaint)
4005         (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
4006         (parse_procedure, parse_lines)
4007         (function_outside_compilation_unit_complaint)
4008         (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
4009         (bad_tag_guess_complaint, reg_value_complaint): Update.
4010         * cp-support.c (demangled_name_complaint): Update.
4011         * macroscope.c (sal_macro_scope): Update.
4012         * dwarf-index-write.c (class debug_names): Update.
4013
4014 2018-05-23  Tom Tromey  <tom@tromey.com>
4015
4016         * complaints.c (clear_complaints): Remove "noisy" parameter.
4017         * complaints.h (clear_complaints): Update.
4018         * symfile.c (syms_from_objfile_1, finish_new_objfile)
4019         (reread_symbols): Update.
4020
4021 2018-05-23  Tom Tromey  <tom@tromey.com>
4022
4023         * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
4024         SUBSEQUENT_MESSAGE.
4025         (vcomplaint, clear_complaints): Update.
4026         (symfile_explanations): Remove some messages.
4027
4028 2018-05-23  Tom Tromey  <tom@tromey.com>
4029
4030         * complaints.c (internal_complaint): Remove.
4031         * complaints.h (internal_complaint): Remove.
4032
4033 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
4034
4035         * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
4036
4037 2018-05-22  Pedro Alves  <palves@redhat.com>
4038
4039         * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
4040         (remote_fileio_badfd, remote_fileio_return_errno)
4041         (remote_fileio_return_success, remote_fileio_func_open)
4042         (remote_fileio_func_open, remote_fileio_func_close)
4043         (remote_fileio_func_read, remote_fileio_func_write)
4044         (remote_fileio_func_lseek, remote_fileio_func_rename)
4045         (remote_fileio_func_unlink, remote_fileio_func_stat)
4046         (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
4047         (remote_fileio_func_isatty, remote_fileio_func_system): Add
4048         remote_target parameter.
4049         (remote_fio_func_map) <func>: Add remote_target parameter.
4050         (do_remote_fileio_request, remote_fileio_request):
4051         * remote-fileio.h (remote_fileio_request):
4052         * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
4053         remote_target parameter.
4054         (remote_notif_process, handle_notification): Adjust to pass down
4055         the remote.
4056         (remote_notif_state_allocate): Add remote_target parameter.  Save
4057         it.
4058         * remote-notif.h (struct remote_target): Forward declare.
4059         (struct notif_client) <parse, ack, can_get_pending_events>: Add
4060         remote_target parameter.
4061         (struct remote_notif_state) <remote>: New field.
4062         (remote_notif_ack, remote_notif_parse): Add remote_target
4063         parameter.
4064         (remote_notif_state_allocate, remote_notif_state_allocate): Add
4065         remote_target parameter.
4066         * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
4067         (threads_listing_context, rmt_thread_action, protocol_feature)
4068         (packet_reg, stop_reply, stop_reply_p, enum packet_support)
4069         (packet_result, struct threads_listing_context, remote_state):
4070         Move definitions and declarations higher up.
4071         (remote_target) <~remote_target>: Declare.
4072         (remote_download_command_source, remote_file_put, remote_file_get)
4073         (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
4074         (remote_hostio_pread_vFile, remote_hostio_send_command)
4075         (remote_hostio_set_filesystem, remote_hostio_open)
4076         (remote_hostio_close, remote_hostio_unlink, remote_state)
4077         (get_remote_state, get_remote_packet_size, get_memory_packet_size)
4078         (get_memory_write_packet_size, get_memory_read_packet_size)
4079         (append_pending_thread_resumptions, remote_detach_1)
4080         (append_resumption, remote_resume_with_vcont)
4081         (add_current_inferior_and_thread, wait_ns, wait_as)
4082         (process_stop_reply, remote_notice_new_inferior)
4083         (process_initial_stop_replies, remote_add_thread)
4084         (btrace_sync_conf, remote_btrace_maybe_reopen)
4085         (remove_new_fork_children, kill_new_fork_children)
4086         (discard_pending_stop_replies, stop_reply_queue_length)
4087         (check_pending_events_prevent_wildcard_vcont)
4088         (discard_pending_stop_replies_in_queue, stop_reply)
4089         (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
4090         (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
4091         (remote_interrupt_as, remote_interrupt_ns)
4092         (remote_get_noisy_reply, remote_query_attached)
4093         (remote_add_inferior, remote_current_thread, get_current_thread)
4094         (set_thread, set_general_thread, set_continue_thread)
4095         (set_general_process, write_ptid)
4096         (remote_unpack_thread_info_response, remote_get_threadinfo)
4097         (parse_threadlist_response, remote_get_threadlist)
4098         (remote_threadlist_iterator, remote_get_threads_with_ql)
4099         (remote_get_threads_with_qxfer)
4100         (remote_get_threads_with_qthreadinfo, extended_remote_restart)
4101         (get_offsets, remote_check_symbols, remote_supported_packet)
4102         (remote_query_supported, remote_packet_size)
4103         (remote_serial_quit_handler, remote_detach_pid)
4104         (remote_vcont_probe, remote_resume_with_hc)
4105         (send_interrupt_sequence, interrupt_query)
4106         (remote_notif_get_pending_events, fetch_register_using_p)
4107         (send_g_packet, process_g_packet, fetch_registers_using_g)
4108         (store_register_using_P, store_registers_using_G)
4109         (set_remote_traceframe, check_binary_download)
4110         (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
4111         (remote_xfer_live_readonly_partial, remote_read_bytes)
4112         (remote_send_printf, remote_flash_write, readchar)
4113         (remote_serial_write, putpkt, putpkt_binary, skip_frame)
4114         (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
4115         (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
4116         (extended_remote_disable_randomization, extended_remote_run)
4117         (send_environment_packet, extended_remote_environment_support)
4118         (extended_remote_set_inferior_cwd, remote_write_qxfer)
4119         (remote_read_qxfer, push_stop_reply, vcont_r_supported)
4120         (packet_command): Now methods of ...
4121         (remote_target): ... this class.
4122         (m_remote_state) <remote_target>: New field.
4123         (struct remote_state) <stop_reply_queue,
4124         remote_async_inferior_event_token, wait_forever_enabled_p>: New
4125         fields.
4126         (remote_state::remote_state): Allocate stop_reply_queue.
4127         (remote_state): Delete global.
4128         (get_remote_state_raw): Delete.
4129         (remote_target::get_remote_state): Allocate m_remote_state on
4130         demand.
4131         (get_current_remote_target): New.
4132         (remote_ops, extended_remote_ops): Delete.
4133         (wait_forever_enabled_p, remote_async_inferior_event_token):
4134         Delete, moved to struct remote_state.
4135         (remote_target::close): Delete self.  Destruction bits split to
4136         ...
4137         (remote_target::~remote_target): ... this.
4138         (show_memory_packet_size): Adjust to use
4139         get_current_remote_target.
4140         (struct protocol_feature) <func>: Add remote_target parameter.
4141         All callers adjusted.
4142         (curr_quit_handler_target): New.
4143         (remote_serial_quit_handler): Reimplement.
4144         (remote_target::open_1): Adjust to use get_current_remote_target.
4145         Heap-allocate remote_target/extended_remote_target instances.
4146         (vcont_builder::vcont_builder): Add remote_target parameter, and
4147         save it in m_remote.  All callers adjusted.
4148         (vcont_builder::m_remote): New field.
4149         (vcont_builder::restart, vcont_builder::flush)
4150         (vcont_builder::push_action): Use it.
4151         (remote_target::commit_resume): Use it.
4152         (struct queue_iter_param) <remote>: New field.
4153         (remote_target::remove_new_fork_children): Fill in 'remote' field.
4154         (check_pending_event_prevents_wildcard_vcont_callback_data): New.
4155         (check_pending_event_prevents_wildcard_vcont_callback)
4156         (remote_target::check_pending_events_prevent_wildcard_vcont)
4157         (remote_target::discard_pending_stop_replies)
4158         (remote_target::discard_pending_stop_replies_in_queue)
4159         (remote_target::remote_notif_remove_queued_reply): Fill in
4160         'remote' field.
4161         (remote_notif_get_pending_events): New.
4162         (remote_target::readchar, remote_target::remote_serial_write):
4163         Save/restore curr_quit_handler_target.
4164         (putpkt): New.
4165         (kill_new_fork_children): Fill in 'remote' field.
4166         (packet_command): Use get_current_remote_target, defer to
4167         remote_target method of same name.
4168         (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
4169         parameter, and save it in m_remote.  All callers adjusted.
4170         (scoped_remote_fd::release): Use m_remote.
4171         (scoped_remote_fd::m_remote): New field.
4172         (remote_file_put, remote_file_get, remote_file_delete): Use
4173         get_current_remote_target, defer to remote_target method of same
4174         name.
4175         (remote_btrace_reset): Add remote_state paremeter.  Update all
4176         callers.
4177         (remote_async_inferior_event_handler). Pass down 'data'.
4178         (remote_new_objfile): Use get_current_remote_target.
4179         (remote_target::vcont_r_supported): New.
4180         (set_range_stepping): Use get_current_remote_target and
4181         remote_target::vcont_r_supported.
4182         (_initialize_remote): Don't allocate 'remote_state' and
4183         'stop_reply_queue' globals.
4184         * remote.h (struct remote_target): Forward declare.
4185         (getpkt, putpkt, remote_notif_get_pending_events): Add
4186         'remote_target' parameter.
4187
4188 2018-05-22  Pedro Alves  <palves@redhat.com>
4189
4190         * remote.c (vcont_builder): Now a class.  Make all data members
4191         private.
4192         (vcont_builder) <vcont_builder, restart, flush, push_action>:
4193         Declare methods.
4194         (vcont_builder_restart): Rename to ...
4195         (vcont_builder::restart): ... this.
4196         (vcont_builder_flush): Rename to ...
4197         (vcont_builder::flush): ... this.
4198         (vcont_builder_push_action): Rename to ...
4199         (vcont_builder::push_action): ... this.
4200         (remote_target::commit_resume): Adjust.
4201
4202 2018-05-22  Pedro Alves  <palves@redhat.com>
4203
4204         * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
4205         (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
4206         (get_fixed_memory_packet_size): New.
4207         (get_memory_packet_size): Use it.
4208         (set_memory_packet_size): Don't override the config size with
4209         DEFAULT_MAX_MEMORY_PACKET_SIZE.
4210         (show_memory_packet_size): Use get_fixed_memory_packet_size.
4211         Don't refer to get_memory_packet_size if not connected to a remote
4212         target.  Show "(default)" if configured size is 0.
4213
4214 2018-05-22  Pedro Alves  <palves@redhat.com>
4215
4216         * remote.c (remote_target::mourn_inferior): Move
4217         discard_pending_stop_replies call here from ...
4218         (_initialize_remote): ... here.
4219
4220 2018-05-22  Pedro Alves  <palves@redhat.com>
4221
4222         * remote.c (compare_section_command): Remove set_general_process
4223         call.
4224
4225 2018-05-22  Pedro Alves  <palves@redhat.com>
4226
4227         * remote.c (struct packet_reg, struct remote_arch_state):
4228         Move higher up in the file.
4229         (remote_state) <m_arch_states>: Store remote_arch_state values
4230         instead of remote_arch_state pointers.
4231         (remote_state::get_remote_arch_state): Adjust.
4232
4233 2018-05-22  Pedro Alves  <palves@redhat.com>
4234
4235         * remote.c: Include <unordered_map>.
4236         (remote_state): Now a class.
4237         (remote_state) <get_remote_arch_state>: Declare method.
4238         <get_remote_arch_state>: New field.
4239         (remote_arch_state) <remote_arch_state>: Declare ctor.
4240         <regs>: Now a unique_ptr.
4241         (remote_gdbarch_data_handle): Delete.
4242         (get_remote_arch_state): Delete.
4243         (remote_state::get_remote_arch_state): New.
4244         (get_remote_state): Adjust to call remote_state's
4245         get_remote_arch_state method.
4246         (init_remote_state): Delete, bits factored out to ...
4247         (remote_arch_state::remote_arch_state): ... this new method.
4248         (get_remote_packet_size, get_memory_packet_size)
4249         (process_g_packet, remote_target::fetch_registers)
4250         (remote_target::prepare_to_store, store_registers_using_G)
4251         (remote_target::store_registers, remote_target::get_trace_status):
4252         Adjust to call remote_state's method.
4253         (_initialize_remote): Remove reference to
4254         remote_gdbarch_data_handle.
4255
4256 2018-05-22  Pedro Alves  <palves@redhat.com>
4257
4258         * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
4259         pread>: New method declarations.
4260         (remote_target::open_1): Adjust.
4261         (readahead_cache_invalidate): Rename to ...
4262         (readahead_cache::invalidate): ... this, and adjust to be a class
4263         method.
4264         (readahead_cache_invalidate_fd): Rename to ...
4265         (readahead_cache::invalidate_fd): ... this, and adjust to be a
4266         class method.
4267         (remote_hostio_pwrite): Adjust.
4268         (remote_hostio_pread_from_cache): Rename to ...
4269         (readahead_cache::pread): ... this, and adjust to be a class
4270         method.
4271         (remote_hostio_close): Adjust.
4272
4273 2018-05-22  Pedro Alves  <palves@redhat.com>
4274
4275         * remote.c (remote_hostio_close_cleanup): Delete.
4276         (class scoped_remote_fd): New.
4277         (remote_file_put, remote_file_get): Use it.
4278
4279 2018-05-22  Pedro Alves  <palves@redhat.com>
4280
4281         (struct vCont_action_support): Use bool and initialize all fields.
4282         (struct readahead_cache): Initialize all fields.
4283         (remote_state): Use bool and initialize all fields.
4284         (remote_state::remote_state, remote_state::~remote_state): New.
4285         (new_remote_state): Delete.
4286         (_initialize_remote): Use new to allocate remote_state.
4287
4288 2018-05-22  Pedro Alves  <palves@redhat.com>
4289             張俊芝  <zjz@zjz.name>
4290
4291         PR gdb/22973
4292         * c-exp.y: Include "c-support.h".
4293         (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
4294         of tolower.  Use c_ident_is_alpha to scan names.
4295         * c-lang.c: Include "c-support.h".
4296         (convert_ucn, convert_octal, convert_hex, convert_escape): Use
4297         ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
4298         * c-support.h: New file, with bits factored out from ...
4299         * cp-name-parser.y: ... this file.
4300         Include "c-support.h".
4301         (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
4302         c-support.h and renamed.
4303         (symbol_end, yylex): Adjust.
4304
4305 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
4306
4307         * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
4308         parameter type to CORE_ADDR.
4309         * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
4310         parameter type in declaration to CORE_ADDR.
4311         * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
4312         target_auxv_search to get AT_HWCAP and use the result to get the
4313         target description.
4314         * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
4315         to CORE_ADDR. Remove the cast of the return value to unsigned
4316         long. Fix error predicate of target_auxv_search.
4317         (ppc_linux_nat_target::read_description): Change the type of the
4318         hwcap variable to CORE_ADDR.
4319
4320 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
4321
4322         * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
4323         if the size of fpscr is larger than 32 bits.
4324
4325 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
4326
4327         * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
4328         (ppc32_linux_vsxregmap): New global.
4329         (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
4330         regcache_supply_regset, and regcache_collect_regset.
4331         * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
4332         * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
4333         (fetch_vsx_register, store_vsx_register): Remove.
4334         (fetch_vsx_registers): Add regno parameter. Get regset using
4335         ppc_linux_vsxregset. Use regset to supply registers.
4336         (store_vsx_registers): Add regno parameter. Get regset using
4337         ppc_linux_vsxregset. Use regset to collect registers.
4338         (fetch_register): Call fetch_vsx_registers instead of
4339         fetch_vsx_register.
4340         (store_register): Call store_vsx_registers instead of
4341         store_vsx_register.
4342         (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
4343         new regno parameter.
4344         (store_ppc_registers): Call store_vsx_registers with -1 for the
4345         new regno parameter.
4346         * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
4347         (ppc_collect_vsxregset): Remove.
4348
4349 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
4350
4351         * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
4352         offset fields.
4353         * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
4354         for vector register offset fields.
4355         (ppc64_fbsd_reg_offsets): Likewise.
4356         * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
4357         to vector register offset fields.
4358         * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
4359         to vector register offset fields.
4360         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
4361         vector register offset fields.
4362         * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
4363         initializers for vector register offset fields.
4364         (rs6000_aix64_reg_offsets): Likewise.
4365         * rs6000-tdep.c (ppc_vrreg_offset): Remove.
4366         (ppc_supply_vrregset): Remove.
4367         (ppc_collect_vrregset): Remove.
4368         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
4369         (ppc_linux_vrregset) : New function.
4370         (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
4371         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
4372         (ppc32_linux_vrregset): Remove.
4373         (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
4374         and use result instead of ppc32_linux_vrregset.
4375         (ppc32_linux_reg_offsets): Remove initializers for vector register
4376         offset fields.
4377         (ppc64_linux_reg_offsets): Likewise.
4378         * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
4379         * ppc-linux-nat.c: Include regset.h.
4380         (gdb_vrregset_t): Adjust comment to account for little-endian
4381         mode.
4382         (supply_vrregset, fill_vrregset): Remove.
4383         (fetch_altivec_register, store_altivec_register): Remove.
4384         (fetch_altivec_registers): Add regno parameter. Get regset using
4385         ppc_linux_vrregset. Use regset to supply registers.
4386         (store_altivec_registers): Add regno parameter. Get regset using
4387         ppc_linux_vrregset. Use regset to collect registers.
4388         (fetch_register): Call fetch_altivec_registers instead of
4389         fetch_altivec_register.
4390         (store_register): Call store_altivec_registers instead of
4391         store_altivec_register.
4392         (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
4393         the new regno parameter.
4394         (store_ppc_registers): Call store_altivec_registers with -1 for
4395         the new regno parameter.
4396
4397 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
4398
4399         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
4400         (PPC_LINUX_SIZEOF_VSXREGSET): Define.
4401         * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
4402         (gdb_vrregset_t): Change array type size to
4403         PPC_LINUX_SIZEOF_VRREGSET.
4404         (gdb_vsxregset_t): Change array type size to
4405         PPC_LINUX_SIZEOF_VSXREGSET.
4406         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
4407         Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
4408         PPC_LINUX_SIZEOF_VSXREGSET.
4409
4410 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
4411
4412         * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
4413         * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
4414         nat/ppc-linux.c.
4415         (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
4416         ppc_linux_target_wordsize with tid.
4417         (ppc_linux_nat_target::read_description): Call ppc_linux_target
4418         wordsize with tid.
4419         * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
4420         (ppc64_64bit_inferior_p): Add static and inline specifiers.
4421         (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
4422         tid parameter. Remove static specifier.
4423         * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
4424         (ppc_linux_target_wordsize): New declaration.
4425
4426 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
4427
4428         * arch/ppc-linux-common.c: New file.
4429         * arch/ppc-linux-common.h: New file.
4430         * arch/ppc-linux-tdesc.h: New file.
4431         * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
4432         * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
4433         (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
4434         arch/ppc-linux-tdesc.h.
4435         * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
4436         arch/ppc-linux-tdesc.h.
4437         (ppc_linux_nat_target::read_description): Remove target
4438         description matching code. Fill a ppc_linux_features struct and
4439         call ppc_linux_match_description with it. Move comment about ISA
4440         2.05 to ppc-linux-common.c.
4441         * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
4442         arch/ppc-linux-tdesc.h.
4443         (ppc_linux_core_read_description): Remove target description
4444         matching code. Fill a ppc_linux_features struct and call
4445         ppc_linux_match_description with it.
4446         * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
4447         (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
4448         (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
4449         (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
4450         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
4451         (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
4452         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
4453         (tdesc_powerpc_e500l): Remove.
4454
4455 2018-05-22  Joel Brobecker  <brobecker@adacore.com>
4456
4457         * ada-lang.c (catch_assert_command): Pass empty string instead
4458         of NULL for excep_string argument.
4459
4460 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
4461
4462         * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
4463         the width of the requested register exceeds the width of the
4464         `ptrace' data type.
4465
4466 2018-05-21  Tom Tromey  <tom@tromey.com>
4467
4468         * printcmd.c (output_command): Remove.
4469         (output_command_const): Rename to output_command.
4470         * valprint.h (output_command): Rename from output_command_const.
4471         * tracepoint.c (trace_dump_actions): Call output_command.
4472
4473 2018-05-21  Tom Tromey  <tom@tromey.com>
4474
4475         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
4476         (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
4477         * ada-lang.h (create_ada_exception_catchpoint): Update.
4478         * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
4479         std::string.
4480         (create_excep_cond_exprs, ~ada_catchpoint)
4481         (should_stop_exception, print_one_exception)
4482         (print_mention_exception, print_recreate_exception): Update.
4483         (ada_get_next_arg): Remove.
4484         (catch_ada_exception_command_split): Use std::string.  Change type
4485         of "excep_string", "cond_string".
4486         (catch_ada_exception_command): Update.
4487         (create_ada_exception_catchpoint): Change type of excep_string.
4488         (ada_exception_sal): Remove excep_string parameter.
4489         (~ada_catchpoint): Remove.
4490
4491 2018-05-21  Tom Tromey  <tom@tromey.com>
4492
4493         * ada-lang.c (ada_collect_symbol_completion_matches): Remove
4494         cleanup.
4495
4496 2018-05-21  Tom Tromey  <tom@tromey.com>
4497
4498         * ada-lang.c (ada_exception_message_1, ada_exception_message):
4499         Return unique_xmalloc_ptr.
4500         (print_it_exception): Update.
4501
4502 2018-05-21  Tom Tromey  <tom@tromey.com>
4503
4504         * tracepoint.c (trace_dump_actions): Use std::string.
4505
4506 2018-05-21  Tom Tromey  <tom@tromey.com>
4507
4508         * symfile.c (reread_symbols): Use std::string for original_name.
4509
4510 2018-05-21  Tom Tromey  <tom@tromey.com>
4511
4512         * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
4513         (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN.  Default
4514         constructor.
4515
4516 2018-05-20  Simon Marchi  <simon.marchi@polymtl.ca>
4517
4518         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
4519         instance to...
4520         (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
4521         * objfiles.c (get_objfile_bfd_data): Allocate
4522         objfile_per_bfd_storage with obstack_new when allocating on
4523         obstack.
4524
4525 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
4526
4527         * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
4528         OBSTACK_ZALLOC.
4529         * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
4530         * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
4531         * mdebugread.c (mdebug_build_psymtabs): Likewise.
4532         (add_pending): Likewise.
4533         (parse_symbol): Likewise.
4534         (parse_partial_symbols): Likewise.
4535         (psymtab_to_symtab_1): Likewise.
4536         (new_psymtab): Likewise.
4537         (elfmdebug_build_psymtabs): Likewise.
4538         * minsyms.c (terminate_minimal_symbol_table): Likewise.
4539         * objfiles.c (get_objfile_bfd_data): Likewise.
4540         (objfile_register_static_link): Likewise.
4541         * psymtab.c (allocate_psymtab): Likewise.
4542         * stabsread.c (read_member_functions): Likewise.
4543         * xcoffread.c (xcoff_end_psymtab): Likewise.
4544
4545 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
4546
4547         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
4548         compiler supports std::is_trivially_constructible.
4549         * common/poison.h: Include obstack.h.
4550         (IsMallocable): Define to is_trivially_constructible if the
4551         compiler supports it, define to true_type otherwise.
4552         (xobnew): New.
4553         (XOBNEW): Redefine.
4554         (xobnewvec): New.
4555         (XOBNEWVEC): Redefine.
4556         * gdb_obstack.h (obstack_zalloc): New.
4557         (OBSTACK_ZALLOC): Redefine.
4558         (obstack_calloc): New.
4559         (OBSTACK_CALLOC): Redefine.
4560         (obstack_new): New.
4561         * gdbarch.sh: Include gdb_obstack in gdbarch.h.
4562         (gdbarch_obstack): New declaration in gdbarch.h, definition in
4563         gdbarch.c.
4564         (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
4565         obstack_calloc/obstack_zalloc.
4566         (gdbarch_obstack_zalloc): Remove.
4567         * target-descriptions.c (tdesc_data_init): Use obstack_new.
4568
4569 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4570
4571         * stack.c (backtrace_command_1): Remove useless variable int i.
4572
4573 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4574
4575         * stack.c (print_frame_info): Fix comment.
4576
4577 2018-05-18  Tom Tromey  <tom@tromey.com>
4578
4579         * dwarf2read.c (struct dwz_file): Add constructor, initializers.
4580         <dwz_bfd>: Now a gdb_bfd_ref_ptr.
4581         (~dwarf2_per_objfile): Update
4582         (dwarf2_get_dwz_file): Use new.
4583         * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
4584         unique_ptr.
4585
4586 2018-05-18  Tom Tromey  <tom@tromey.com>
4587
4588         * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
4589         unique_ptr.
4590         * dwarf2read.c (struct dwp_file): Add constructor and
4591         initializers.
4592         (open_and_init_dwp_file): Return a unique_ptr.
4593         (dwarf2_per_objfile, create_dwp_hash_table)
4594         (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
4595         (lookup_dwo_unit_in_dwp): Update.
4596         (open_and_init_dwp_file, get_dwp_file): Update.
4597
4598 2018-05-18  Tom Tromey  <tom@tromey.com>
4599
4600         * dwarf2read.c (dwarf2_per_objfile): Update.
4601         (struct mapped_index): Add initializers.
4602         (dwarf2_read_index): Use new.
4603         (dw2_symtab_iter_init): Update.
4604         * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
4605         unique_ptr.
4606
4607 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
4608
4609         * dwarf2read.c (mapped_index) <total_size>: Remove.
4610
4611 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
4612
4613         * unittests/format_pieces-selftests.c (test_format_specifier):
4614         Add ARI comments.
4615
4616 2018-05-18  Tom Tromey  <tom@tromey.com>
4617
4618         * c-typeprint.c (maybe_print_hole): New function.
4619         (c_print_type_struct_field_offset): Update.
4620         (c_type_print_base_struct_union): Call maybe_print_hole.
4621
4622 2018-05-17  Keith Seitz  <keiths@redhat.com>
4623
4624         * breakpoint.c (build_bpstat_chain): New function, moved from
4625         bpstat_stop_status.
4626         (bpstat_stop_status): Add optional parameter, `stop_chain'.
4627         If no stop chain is passed, call build_bpstat_chain to build it.
4628         * breakpoint.h (build_bpstat_chain): Declare.
4629         (bpstat_stop_status): Move documentation here from breakpoint.c.
4630         * infrun.c (handle_signal_stop): Before eliding inlined frames,
4631         build the stop chain and pass it to skip_inline_frames.
4632         Pass this stop chain to bpstat_stop_status.
4633         * inline-frame.c: Include breakpoint.h.
4634         (stopped_by_user_bp_inline_frame): New function.
4635         (skip_inline_frames): Add parameter `stop_chain'.
4636         Move documention to inline-frame.h.
4637         If non-NULL, use stopped_by_user_bp_inline_frame to determine
4638         whether the frame should be elided.
4639         * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
4640         Add moved documentation and update for new parameter.
4641
4642 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
4643
4644         PR cli/14975
4645         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4646         unittests/format_pieces-selftests.c.
4647         * common/format.h (format_piece) <operator==>: New.
4648         (format_pieces) <operator[]>: Remove.
4649         * common/format.c (format_pieces::format_pieces): Handle \e.
4650         * unittests/format_pieces-selftests.c: New.
4651
4652 2018-05-17  Tom Tromey  <tom@tromey.com>
4653
4654         PR symtab/23010:
4655         * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
4656         (dw2_instantiate_symtab): Add skip_partial parameter.
4657         (dw2_find_last_source_symtab, dw2_map_expand_apply)
4658         (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
4659         (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
4660         (dw2_expand_symtabs_matching_one)
4661         (dw2_find_pc_sect_compunit_symtab)
4662         (dw2_debug_names_lookup_symbol)
4663         (dw2_debug_names_expand_symtabs_for_function): Update.
4664         (init_cutu_and_read_dies): Add skip_partial parameter.
4665         (process_psymtab_comp_unit, build_type_psymtabs_1)
4666         (process_skeletonless_type_unit, load_partial_comp_unit)
4667         (psymtab_to_symtab_1): Update.
4668         (load_full_comp_unit): Add skip_partial parameter.
4669         (process_imported_unit_die, dwarf2_read_addr_index)
4670         (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
4671         (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
4672         (read_signatured_type): Update.
4673
4674 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
4675
4676         * value.c (release_value): Remove unused variable.
4677         (record_latest_value): Likewise.
4678         (access_value_history): Likewise.
4679         (preserve_values): Likewise.
4680
4681 2018-05-17  Tom Tromey  <tom@tromey.com>
4682
4683         * extension.h (struct ext_lang_type_printers) <py_type_printers>:
4684         Initialize.
4685
4686 2018-05-16  Maciej W. Rozycki  <macro@mips.com>
4687
4688         PR gdb/22286
4689         * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
4690         Also handle registers whose width is not a multiple of
4691         PTRACE_TYPE_RET.
4692         (linux_nat_trad_target::store_register): Likewise.
4693
4694 2018-05-16  Tom Tromey  <tom@tromey.com>
4695
4696         * gdbcore.h (core_bfd): Redefine.
4697         * corelow.c (core_target::close): Update.
4698         (core_target_open): Update.
4699         * progspace.h (struct program_space) <cbfd>: Now a
4700         gdb_bfd_ref_ptr.
4701
4702 2018-05-16  Tom Tromey  <tom@tromey.com>
4703
4704         PR cli/19551:
4705         * symfile-add-flags.h (enum symfile_add_flags)
4706         <SYMFILE_NOT_FILENAME>: New constant.
4707         * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME.  Get
4708         objfile name from BFD.
4709         (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
4710         * minidebug.c (find_separate_debug_file_in_section): Put
4711         ".gnu_debugdata" into BFD's file name.
4712
4713 2018-05-16  Simon Marchi  <simon.marchi@ericsson.com>
4714
4715         * regcache.c (regcache_read_ftype, regcache_write_ftype):
4716         Remove.
4717
4718 2018-05-15  Tamar Christina  <tamar.christina@arm.com>
4719
4720         PR binutils/21446
4721         * aarch64-tdep.c (aarch64_analyze_prologue,
4722         aarch64_software_single_step, aarch64_displaced_step_copy_insn):
4723         Indicate not interested in errors.
4724
4725 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
4726
4727         * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
4728         Supply the MIPS_ZERO_REGNUM register.
4729
4730 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
4731
4732         * mips-tdep.c (mask_address_var): Make variable static.
4733
4734 2018-05-14  Tom Tromey  <tom@tromey.com>
4735
4736         * dwarf2read.c (rust_union_quirks): Clear rust_unions.
4737
4738 2018-05-11  Andrew Burgess  <andrew.burgess@embecosm.com>
4739
4740         * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
4741         FXSAVE_ADDR for the mxcsr register.
4742
4743 2018-05-11  Max Filippov  <jcmvbkbc@gmail.com>
4744
4745         * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
4746
4747 2018-05-11  Pedro Alves  <palves@redhat.com>
4748
4749         * corelow.c (core_target) <core_target>: No longer inline.
4750         Initialize m_core_gdbarch, m_core_vec and build the section table
4751         here.
4752         <~core_target>: New.
4753         <core_gdbarch, get_core_register_section>: New methods.
4754         <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
4755         factored out from ...
4756         <core_data, core_vec, core_gdbarch>: ... these deleted globals.
4757         (core_ops): Delete.
4758         (sniff_core_bfd): Add gdbarch parameter.
4759         (core_close): Delete, merged into ...
4760         (core_target::close): ... here.  Delete self.
4761         (core_close_cleanup): Delete.
4762         (core_target_open): Allocate a core_target on the heap.  Use a
4763         unique_ptr instead of a cleanup.  Bits moved into the core_target
4764         ctor.  Adjust to use core_target methods instead of globals.
4765         (get_core_register_section): Rename to ...
4766         (core_target::get_core_register_section): ... this and adjust.
4767         (struct get_core_registers_cb_data): New.
4768         (get_core_registers_cb): Use it.  Use bool.
4769         (core_target::fetch_registers, core_target::files_info)
4770         (core_target::xfer_partial, core_target::read_description)
4771         (core_target::pid_to, core_target::thread_name): Adjust to
4772         reference class fields instead of globals.
4773         * target.h (struct target_ops_deleter, target_ops_up): New.
4774
4775 2018-05-11  Pedro Alves  <palves@redhat.com>
4776
4777         * corefile.c (core_file_command): Move to corelow.c.
4778         * corelow.c (the_core_target): Delete.
4779         (core_file_command): Moved from corefile.c.  Check exec_bfd
4780         instead of the_core_target.  Use target_detach instead of calling
4781         into the_core_target directly.
4782         (maybe_say_no_core_file_now): New.
4783         (core_target::detach): Use it.
4784         (_initialize_corelow): Remove references to the_core_target.
4785         * gdbcore.h (the_core_target): Delete.
4786
4787 2018-05-11  Tom Tromey  <tromey@redhat.com>
4788             Pedro Alves  <palves@redhat.com>
4789
4790         * corefile.c (core_bfd): Remove.
4791         * gdbcore.h (core_bfd): Now a macro.
4792         * progspace.h (struct program_space) <cbfd>: New field.
4793
4794 2018-05-11  Tom Tromey  <tom@tromey.com>
4795
4796         * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
4797         gdb::def_vector.
4798
4799 2018-05-10  Tom Tromey  <tom@tromey.com>
4800
4801         * configure: Rebuild.
4802         * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
4803
4804 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
4805
4806         PR server/23158:
4807         * regformats/regdat.sh: Adjust script, following the addition
4808         of the new expedite_regs parameter to init_target_desc.
4809
4810 2018-05-10  Omair Javaid  <omair.javaid@linaro.org>
4811     
4812         PR gdb/23127
4813         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
4814         set_gdbarch_significant_addr_bit.
4815         * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
4816         set_gdbarch_significant_addr_bit.
4817         * utils.c (address_significant): Update to sign extend addr.
4818
4819 2018-05-09  Max Filippov  <jcmvbkbc@gmail.com>
4820
4821         * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
4822         (xtensa_linux_init_abi): Limit tdep->num_regs by
4823         tdep->num_nopriv_regs.
4824         * xtensa-tdep.c (xtensa_derive_tdep): Calculate
4825         tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
4826         not initialized.
4827
4828 2018-05-08  Simon Marchi  <simon.marchi@ericsson.com>
4829
4830         * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
4831
4832 2018-05-08  Andrew Burgess  <andrew.burgess@embecosm.com>
4833
4834         * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
4835         (I387_MXCSR_INIT_VAL): New constant.
4836         * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
4837         buffer if it was supplied by the inferior.
4838         * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
4839         (i387_xsave_get_clear_bv): New function.
4840         (i387_supply_xsave): Only read x87 control registers from the
4841         xsave buffer if the feature is enabled, and the state will have
4842         been written, otherwise, provide a suitable default.
4843         (i387_collect_xsave): Pre-clear all registers in xsave buffer,
4844         including x87 control registers.  Update control registers if they
4845         have changed from the default value, and mark features as enabled
4846         as required.
4847         * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
4848
4849 2018-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
4850
4851         * spu-tdep.c (info_spu_event_command): Fix output formatting.
4852
4853 2018-05-07  Tom Tromey  <tom@tromey.com>
4854
4855         * configure: Rebuild.
4856         * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
4857
4858 2018-05-07  Tom Tromey  <tom@tromey.com>
4859
4860         PR tdep/20362:
4861         * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
4862         bit.  Use correct value for VDIV.
4863
4864 2018-05-04  Tom Tromey  <tom@tromey.com>
4865
4866         * configure: Rebuild.
4867         * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
4868
4869 2018-05-04  Tom Tromey  <tom@tromey.com>
4870
4871         * linux-record.c (record_linux_system_call) <case
4872         RECORD_SYS_RECVFROM>: Add "break".
4873
4874 2018-05-04  Tom Tromey  <tom@tromey.com>
4875
4876         * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
4877         Add missing "break".
4878         * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
4879         Add missing "break".
4880
4881 2018-05-04  Tom Tromey  <tom@tromey.com>
4882
4883         * rs6000-tdep.c (ppc_process_record_op4)
4884         (ppc_process_record_op63): Add fall-through comment.
4885
4886 2018-05-04  Tom Tromey  <tom@tromey.com>
4887
4888         * i386-tdep.c (i386_process_record): Add fall-through comment.
4889
4890 2018-05-04  Tom Tromey  <tom@tromey.com>
4891
4892         * stabsread.c (define_symbol) <case 'p'>: Add fall-through
4893         comment.
4894
4895 2018-05-04  Tom Tromey  <tom@tromey.com>
4896
4897         * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
4898         * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
4899         * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
4900         comment.
4901         * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
4902         comment.
4903         * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
4904         comment.
4905
4906 2018-05-04  Tom Tromey  <tom@tromey.com>
4907
4908         * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
4909
4910 2018-05-04  Tom Tromey  <tom@tromey.com>
4911
4912         * s390-tdep.c (s390_process_record): Fix fall-through comments.
4913         * xcoffread.c (scan_xcoff_symtab): Move comment later.
4914         * symfile.c (section_is_mapped): Fix fall-through comment.
4915         * stabsread.c (define_symbol, read_member_functions): Fix
4916         fall-through comment.
4917         * s390-linux-tdep.c (s390_process_record): Fix fall-through
4918         comment.
4919         * remote.c (remote_wait_as): Fix fall-through comment.
4920         * p-exp.y (yylex): Fix fall-through comment.
4921         * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
4922         comment.
4923         * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
4924         * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
4925         * jv-exp.y (yylex): Fix fall-through comment.
4926         * go-exp.y (lex_one_token): Fix fall-through comment.
4927         * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
4928         fall-through comment.
4929         * f-exp.y (yylex): Fix fall-through comment.
4930         * dwarf2read.c (process_die): Fix fall-through comments.
4931         * dbxread.c (process_one_symbol): Fix fall-through comment.
4932         * d-exp.y (lex_one_token): Fix fall-through comment.
4933         * cp-name-parser.y (yylex): Fix fall-through comment.
4934         * coffread.c (coff_symtab_read): Fix fall-through comment.
4935         * c-exp.y (lex_one_token): Fix fall-through comment.
4936         * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
4937         comment.
4938         * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
4939         comment.
4940
4941 2018-05-04  Tom Tromey  <tom@tromey.com>
4942
4943         PR python/22730:
4944         * NEWS: Mention gdb.execute change.
4945         * gdbcmd.h (execute_control_command): Don't declare.
4946         * python/python.c (execute_gdb_command): Use read_command_lines_1,
4947         execute_control_commands, execute_control_commands_to_string.
4948         * cli/cli-script.h (execute_control_commands)
4949         (execute_control_commands_to_string): Declare.
4950         (execute_control_command): Add from_tty parameter.
4951         * cli/cli-script.c (execute_control_commands)
4952         (execute_control_commands_to_string): New functions.
4953         (execute_user_command): Use execute_control_commands.
4954         (execute_control_command_1): Add "from_tty" parameter.  Update.
4955         (execute_control_command): Likewise.
4956
4957 2018-05-04  Tom Tromey  <tom@tromey.com>
4958
4959         PR python/22731:
4960         * NEWS: Mention that breakpoint commands are writable.
4961         * python/py-breakpoint.c (bppy_set_commands): New function.
4962         (breakpoint_object_getset) <"commands">: Use it.
4963
4964 2018-05-04  Tom Tromey  <tom@tromey.com>
4965
4966         * tracepoint.c (actions_command): Update.
4967         * mi/mi-cmd-break.c (mi_command_line_array)
4968         (mi_command_line_array_cnt, mi_command_line_array_ptr)
4969         (mi_read_next_line): Remove.
4970         (mi_cmd_break_commands): Update.
4971         * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
4972         function_view.
4973         * cli/cli-script.c (get_command_line): Update.
4974         (process_next_line): Use function_view.  Constify.
4975         (recurse_read_control_structure, read_command_lines)
4976         (read_command_lines_1): Change argument types to function_view.
4977         (do_define_command, document_command): Update.
4978         * breakpoint.h (check_tracepoint_command): Don't declare.
4979         * breakpoint.c (check_tracepoint_command): Remove.
4980         (commands_command_1, create_tracepoint_from_upload): Update.
4981
4982 2018-05-04  Tom Tromey  <tom@tromey.com>
4983
4984         PR gdb/11750:
4985         * cli/cli-script.h (enum command_control_type) <define_control>:
4986         New constant.
4987         * cli/cli-script.c (multi_line_command_p): Handle define_control.
4988         (build_command_line, execute_control_command_1)
4989         (process_next_line): Likewise.
4990         (do_define_command): New function, extracted from define_command.
4991         (define_command): Use it.
4992
4993 2018-05-04  Tom Tromey  <tom@tromey.com>
4994
4995         * tracepoint.c (actions_command): Update.
4996         * cli/cli-script.h (read_command_lines): Update.
4997         * cli/cli-script.c (read_command_lines): Constify prompt_arg.
4998         (MAX_TMPBUF): Remove define.
4999         (define_command): Use string_printf.
5000         (document_command): Likewise.
5001         * breakpoint.c (commands_command_1): Update.
5002
5003 2018-05-04  Tom Tromey  <tom@tromey.com>
5004
5005         * top.c (execute_command): Update.
5006         * cli/cli-script.h (print_command_lines): Now varargs.
5007         * cli/cli-script.c (print_command_lines): Now varargs.
5008         (execute_control_command_1) <case while_control, case if_control>:
5009         Update.
5010
5011 2018-05-04  Tom Tromey  <tom@tromey.com>
5012
5013         * tracepoint.c (all_tracepoint_actions): Rename from
5014         all_tracepoint_actions_and_cleanup.  Change return type.
5015         (actions_command, encode_actions_1, encode_actions)
5016         (trace_dump_actions, tdump_command): Update.
5017         * remote.c (remote_download_command_source): Update.
5018         * python/python.c (gdbpy_eval_from_control_command)
5019         (python_command, python_interactive_command): Update.
5020         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
5021         * guile/guile.c (guile_command)
5022         (gdbscm_eval_from_control_command, guile_command): Update.
5023         * compile/compile.c (compile_code_command)
5024         (compile_print_command, compile_to_object): Update.
5025         * cli/cli-script.h (struct command_lines_deleter): New.
5026         (counted_command_line): New typedef.
5027         (struct command_line): Add constructor, destructor.
5028         <body_list>: Remove.
5029         <body_list_0, body_list_1>: New members.
5030         (command_line_up): Remove typedef.
5031         (read_command_lines, read_command_lines_1, get_command_line):
5032         Update.
5033         (copy_command_lines): Don't declare.
5034         * cli/cli-script.c (build_command_line): Use "new".
5035         (get_command_line): Return counted_command_line.
5036         (print_command_lines, execute_user_command)
5037         (execute_control_command_1, while_command, if_command): Update.
5038         (realloc_body_list): Remove.
5039         (process_next_line, recurse_read_control_structure): Update.
5040         (read_command_lines, read_command_lines_1): Return counted_command_line.
5041         (free_command_lines): Use "delete".
5042         (copy_command_lines): Remove.
5043         (define_command, document_command, show_user_1): Update.
5044         * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
5045         a counted_command_line.
5046         * breakpoint.h (counted_command_line): Remove typedef.
5047         (breakpoint_set_commands): Update.
5048         * breakpoint.c (check_no_tracepoint_commands)
5049         (validate_commands_for_breakpoint): Update.
5050         (breakpoint_set_commands): Change commands to be a
5051         counted_command_line.
5052         (commands_command_1, update_dprintf_command_list)
5053         (create_tracepoint_from_upload): Update.
5054
5055 2018-05-04  Tom Tromey  <tom@tromey.com>
5056
5057         * cli/cli-decode.h (cmd_list_element): New constructor.
5058         (~cmd_list_element): New destructor.
5059         (struct cmd_list_element): Add initializers.
5060         * cli/cli-decode.c (do_add_cmd): Use "new".
5061         (delete_cmd): Use "delete".
5062
5063 2018-05-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
5064             Pedro Alves <palves@redhat.com>
5065
5066         PR breakpoints/19806 and support for PR external/20207.
5067         * NEWS: Mention Aarch64 watchpoint improvements.
5068         * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
5069         watchpoints and PR external/20207 watchpoints.
5070         * nat/aarch64-linux-hw-point.c
5071         (kernel_supports_any_contiguous_range): New.
5072         (aarch64_watchpoint_offset): New.
5073         (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
5074         (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
5075         (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
5076         (aarch64_align_watchpoint): New parameters aligned_offset_p and
5077         next_addr_orig_p.  Support PR external/20207 watchpoints.
5078         (aarch64_downgrade_regs): New.
5079         (aarch64_dr_state_insert_one_point): New parameters offset and
5080         addr_orig.
5081         (aarch64_dr_state_remove_one_point): Likewise.
5082         (aarch64_handle_breakpoint): Update caller.
5083         (aarch64_handle_aligned_watchpoint): Likewise.
5084         (aarch64_handle_unaligned_watchpoint): Support addr_orig and
5085         aligned_offset.
5086         (aarch64_linux_set_debug_regs): Remove const from state.  Call
5087         aarch64_downgrade_regs.
5088         (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
5089         * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
5090         (DR_CONTROL_MASK): ... this.
5091         (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
5092         (unsigned int aarch64_watchpoint_offset): New prototype.
5093         (aarch64_linux_set_debug_regs): Remove const from state.
5094         * utils.c (align_up, align_down): Move to ...
5095         * common/common-utils.c (align_up, align_down): ... here.
5096         * utils.h (align_up, align_down): Move to ...
5097         * common/common-utils.h (align_up, align_down): ... here.
5098
5099 2018-05-04  Joel Brobecker  <brobecker@adacore.com>
5100
5101         * sparc-tdep.c (sparc_structure_return_p): Re-implement to
5102         match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
5103         (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
5104         Re-implement to match the ABI as summarized in GCC's
5105         gcc/config/sparc/sparc.c.  All callers updated.
5106         (sparc32_store_arguments): Remove assertion.
5107
5108 2018-05-04  Tom Tromey  <tom@tromey.com>
5109
5110         * printcmd.c: Don't include tui.h.
5111         (decode_format): Use skip_spaces.
5112
5113 2018-05-04  Tom Tromey  <tom@tromey.com>
5114
5115         PR gdb/22619:
5116         * printcmd.c (last_count): New global.
5117         (x_command): Use saved count when repeating.
5118
5119 2018-05-04  Tom Tromey  <tom@tromey.com>
5120
5121         * nto-procfs.c (do_closedir_cleanup): Remove.
5122         (procfs_pidlist): Use gdb_dir_up.
5123         * procfs.c (do_closedir_cleanup): Remove.
5124         (proc_update_threads): Use gdb_dir_up.
5125         * common/filestuff.h (struct gdb_dir_deleter): New.
5126         (gdb_dir_up): New typedef.
5127
5128 2018-05-04  Tom Tromey  <tom@tromey.com>
5129
5130         * ada-lang.c (print_mention_exception): Use std::string.
5131
5132 2018-05-04  Tom Tromey  <tom@tromey.com>
5133
5134         * ada-lang.c (create_excep_cond_exprs): Update.
5135         (ada_exception_catchpoint_cond_string): Use std::string.
5136
5137 2018-05-04  Tom Tromey  <tom@tromey.com>
5138
5139         * ada-lang.c (xget_renaming_scope): Return std::string.
5140         (old_renaming_is_invisible): Update.
5141
5142 2018-05-04  Tom Tromey  <tom@tromey.com>
5143
5144         * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
5145         (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
5146
5147 2018-05-04  Ulrich Weigand  <uweigand@de.ibm.com>
5148
5149         * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
5150
5151 2018-05-04  Tom Tromey  <tom@tromey.com>
5152
5153         * remote.c (remote_query_supported_append): Change type.
5154         (remote_check_symbols): Update.
5155
5156 2018-05-04  Paul Pluzhnikov  <ppluzhnikov@google.com>
5157
5158         PR gdb/11420
5159         * configure.ac: Prepend libpython.
5160         * python/python-config.py: Likewise.
5161         * configure: Regenerate.
5162
5163 2018-05-03  Simon Marchi  <simon.marchi@ericsson.com>
5164
5165         * Makefile.in (%.c: %.l): Use -t instead of --stdout.
5166
5167 2018-05-03  Pedro Alves  <palves@redhat.com>
5168
5169         * s390-linux-nat.c
5170         (s390_linux_nat_target::have_continuable_watchpoint): Mark with
5171         override.  Write 'true' instead of '1'.
5172         (s390_linux_nat_target::watchpoint_addr_within_range): Remove
5173         declaration.
5174
5175 2018-05-02  Pedro Alves  <palves@redhat.com>
5176
5177         * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
5178         add_inf_child_target.
5179         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
5180         add_inf_child_target.
5181         * aix-thread.c (aix_thread_target_info): New.
5182         (aix_thread_target) <shortname, longname, doc>: Delete.
5183         <info>: New.
5184         * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
5185         add_inf_child_target.
5186         * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
5187         add_inf_child_target.
5188         * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
5189         add_inf_child_target.
5190         * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
5191         add_inf_child_target.
5192         * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
5193         add_inf_child_target.
5194         * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
5195         add_inf_child_target.
5196         * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
5197         add_inf_child_target.
5198         * arm-linux-nat.c (_initialize_arm_linux_nat): Use
5199         add_inf_child_target.
5200         * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
5201         add_inf_child_target.
5202         * bfd-target.c (target_bfd_target_info): New.
5203         (target_bfd) <shortname, longname, doc>: Delete.
5204         <info>: New.
5205         * bsd-kvm.c (bsd_kvm_target_info): New.
5206         (bsd_kvm_target) <shortname, longname, doc>: Delete.
5207         <info>: New.
5208         (bsd_kvm_target::open): Rename to ...
5209         (bsd_kvm_target_open): ... this.  Adjust.
5210         * bsd-uthread.c (bsd_uthread_target_info): New.
5211         (bsd_uthread_target) <shortname, longname, doc>: Delete.
5212         <info>: New.
5213         * corefile.c (core_file_command): Adjust.
5214         * corelow.c (core_target_info): New.
5215         (core_target) <shortname, longname, doc>: Delete.
5216         <info>: New.
5217         (core_target::open): Rename to ...
5218         (core_target_open): ... this.  Adjust.
5219         * ctf.c (ctf_target_info): New.
5220         (ctf_target) <shortname, longname, doc>: Delete.
5221         <info>: New.
5222         (ctf_target::open): Rename to ...
5223         (ctf_target_open): ... this.
5224         (_initialize_ctf): Adjust.
5225         * exec.c (exec_target_info): New.
5226         (exec_target) <shortname, longname, doc>: Delete.
5227         <info>: New.
5228         (exec_target::open): Rename to ...
5229         (exec_target_open): ... this.
5230         * gdbcore.h (core_target_open): Declare.
5231         * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
5232         * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
5233         add_inf_child_target.
5234         * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
5235         add_inf_child_target.
5236         * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
5237         add_inf_child_target.
5238         * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
5239         add_inf_child_target.
5240         * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
5241         add_inf_child_target.
5242         * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
5243         add_inf_child_target.
5244         * i386-linux-nat.c (_initialize_i386_linux_nat): Use
5245         add_inf_child_target.
5246         * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
5247         add_inf_child_target.
5248         * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
5249         add_inf_child_target.
5250         * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
5251         add_inf_child_target.
5252         * inf-child.c (inf_child_target_info): New.
5253         (inf_child_target::info): New.
5254         (inf_child_open_target): Remove 'target' parameter.  Use
5255         get_native_target instead.
5256         (inf_child_target::open): Delete.
5257         (add_inf_child_target): New.
5258         * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
5259         Delete.
5260         <info>: New.
5261         (add_inf_child_target): Declare.
5262         (inf_child_open_target): Declare.
5263         * linux-thread-db.c (thread_db_target_info): New.
5264         (thread_db_target) <shortname, longname, doc>: Delete.
5265         <info>: New.
5266         * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
5267         add_inf_child_target.
5268         * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
5269         add_inf_child_target.
5270         * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
5271         add_inf_child_target.
5272         * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
5273         add_inf_child_target.
5274         * make-target-delegates (print_class): Adjust.
5275         * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
5276         add_inf_child_target.
5277         * mips-linux-nat.c (_initialize_mips_linux_nat): Use
5278         add_inf_child_target.
5279         * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
5280         add_inf_child_target.
5281         * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
5282         add_inf_child_target.
5283         * nto-procfs.c (nto_native_target_info): New.
5284         (nto_procfs_target_native) <shortname, longname, doc>:
5285         Delete.
5286         <info>: New.
5287         (nto_procfs_target_info): New.
5288         (nto_procfs_target_procfs) <shortname, longname, doc>:
5289         Delete.
5290         <info>: New.
5291         (init_procfs_targets): Adjust.
5292         * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
5293         add_inf_child_target.
5294         * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
5295         add_inf_child_target.
5296         * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
5297         add_inf_child_target.
5298         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
5299         add_inf_child_target.
5300         * ravenscar-thread.c (ravenscar_target_info): New.
5301         (ravenscar_thread_target) <shortname, longname, doc>:
5302         Delete.
5303         <info>: New.
5304         * record-btrace.c (record_btrace_target_info):
5305         (record_btrace_target) <shortname, longname, doc>: Delete.
5306         <info>: New.
5307         (record_btrace_target::open): Rename to ...
5308         (record_btrace_target_open): ... this.  Adjust.
5309         * record-full.c (record_longname, record_doc): New.
5310         (record_full_base_target) <shortname, longname, doc>: Delete.
5311         <info>: New.
5312         (record_full_target_info): New.
5313         (record_full_target): <shortname>: Delete.
5314         <info>: New.
5315         (record_full_core_open_1, record_full_open_1): Update comments.
5316         (record_full_base_target::open): Rename to ...
5317         (record_full_open): ... this.
5318         (cmd_record_full_restore): Update.
5319         (_initialize_record_full): Update.
5320         * remote-sim.c (remote_sim_target_info): New.
5321         (gdbsim_target) <shortname, longname, doc>: Delete.
5322         <info>: New.
5323         (gdbsim_target::open): Rename to ...
5324         (gdbsim_target_open): ... this.
5325         (_initialize_remote_sim): Adjust.
5326         * remote.c (remote_doc): New.
5327         (remote_target_info): New.
5328         (remote_target) <shortname, longname, doc>: Delete.
5329         <info>: New.
5330         (extended_remote_target_info): New.
5331         (extended_remote_target) <shortname, longname, doc>: Delete.
5332         <info>: New.
5333         (remote_target::open_1): Make static.  Adjust.
5334         * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
5335         * s390-linux-nat.c (_initialize_s390_nat): Use
5336         add_inf_child_target.
5337         * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
5338         add_inf_child_target.
5339         * sol-thread.c (thread_db_target_info): New.
5340         (sol_thread_target) <shortname, longname, doc>: Delete.
5341         <info>: New.
5342         * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
5343         add_inf_child_target.
5344         * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
5345         add_inf_child_target.
5346         * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
5347         add_inf_child_target.
5348         * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
5349         add_inf_child_target.
5350         * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
5351         add_inf_child_target.
5352         * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
5353         add_inf_child_target.
5354         * spu-linux-nat.c (_initialize_spu_nat): Use
5355         add_inf_child_target.
5356         * spu-multiarch.c (spu_multiarch_target_info): New.
5357         (spu_multiarch_target) <shortname, longname, doc>: Delete.
5358         <info>: New.
5359         * target-delegates.c: Regenerate.
5360         * target.c: Include <unordered_map>.
5361         (target_ops_p): Delete.
5362         (DEF_VEC_P(target_ops_p)): Delete.
5363         (target_factories): New.
5364         (test_target_info): New.
5365         (test_target_ops::info): New.
5366         (open_target): Adjust to use target_factories.
5367         (add_target_with_completer): Rename to ...
5368         (add_target): ... this.  Change prototype.  Register target_info
5369         and open callback in target_factories.  Register target_info in
5370         command context instead of target_ops.
5371         (add_target): Delete old implementation.
5372         (add_deprecated_target_alias): Change prototype.  Adjust.
5373         (the_native_target): New.
5374         (set_native_target, get_native_target): New.
5375         (find_default_run_target): Use the_native_target.
5376         (find_attach_target, find_run_target): Simplify.
5377         (target_ops::open): Delete.
5378         (dummy_target_info): New.
5379         (dummy_target::shortname, dummy_target::longname)
5380         (dummy_target::doc): Delete.
5381         (dummy_target::info): New.
5382         (debug_target::shortname, debug_target::longname)
5383         (debug_target::doc): Delete.
5384         (debug_target::info): New.
5385         * target.h (struct target_info): New.
5386         (target_ops::~target_ops): Add comment.
5387         (target_ops::info): New.
5388         (target_ops::shortname, target_ops::longname, target_ops::doc): No
5389         longer virtual.  Implement in terms of target_info.
5390         (set_native_target, get_native_target): Declare.
5391         (target_open_ftype): New.
5392         (add_target, add_target_with_completer)
5393         (add_deprecated_target_alias): Change prototype.
5394         (test_target) <shortname, longname, doc>: Delete.
5395         <info>: New.
5396         * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
5397         add_inf_child_target.
5398         * tracefile-tfile.c (tfile_target_info): New.
5399         (tfile_target) <shortname, longname, doc>: Delete.
5400         <info>: New.
5401         (tfile_target::open): Rename to ...
5402         (tfile_target_open): ... this.
5403         (_initialize_tracefile_tfile): Adjust.
5404         * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
5405         add_inf_child_target.
5406         * windows-nat.c (_initialize_windows_nat): Use
5407         add_inf_child_target.
5408         * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
5409         add_inf_child_target.
5410
5411 2018-05-02  Pedro Alves  <palves@redhat.com>
5412
5413         * linux-nat.h (linux_nat_target) <low_new_thread,
5414         low_delete_thread, low_new_fork, low_forget_process,
5415         low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
5416         New virtual methods.
5417         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
5418         (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
5419         (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
5420         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
5421         (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
5422         Delete.
5423         * linux-fork.c (delete_fork): Adjust to call low method.
5424         * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
5425         (linux_nat_new_fork, linux_nat_forget_process_hook)
5426         (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
5427         (linux_nat_status_is_event):
5428         (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
5429         (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
5430         to call low method.
5431         (sigtrap_is_event): Rename to ...
5432         (linux_nat_target::low_status_is_event): ... this.
5433         (linux_nat_set_status_is_event): Delete.
5434         (save_stop_reason, linux_nat_wait_1)
5435         (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
5436         low methods.
5437         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
5438         (linux_nat_set_new_fork, linux_nat_set_forget_process)
5439         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
5440         (linux_nat_set_prepare_to_resume): Delete.
5441         * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
5442         low virtual methods.
5443         * amd64-linux-nat.c: Likewise.
5444         * arm-linux-nat.c: Likewise.
5445         * i386-linux-nat.c: Likewise.
5446         * ia64-linux-nat.c: Likewise.
5447         * mips-linux-nat.c: Likewise.
5448         * ppc-linux-nat.c: Likewise.
5449         * s390-linux-nat.c: Likewise.
5450         * sparc64-linux-nat.c: Likewise.
5451         * x86-linux-nat.c: Likewise.
5452         * x86-linux-nat.h: Include "nat/x86-linux.h".
5453         (x86_linux_nat_target) <low_new_fork, low_forget_process,
5454         low_prepare_to_resume, low_new_thread, low_delete_thread>:
5455         Override methods.
5456
5457 2018-05-02  Pedro Alves  <palves@redhat.com>
5458
5459         * target.h (target_ops)
5460         <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
5461         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
5462         stopped_by_watchpoint, have_continuable_watchpoint,
5463         stopped_data_address, watchpoint_addr_within_range,
5464         can_accel_watchpoint_condition, can_run, thread_alive,
5465         has_all_memory, has_memory, has_stack, has_registers,
5466         has_execution, can_async_p, is_async_p, supports_non_stop,
5467         always_non_stop_p, can_execute_reverse, supports_multi_process,
5468         supports_enable_disable_tracepoint,
5469         supports_disable_randomization, supports_string_tracing,
5470         supports_evaluation_of_breakpoint_conditions,
5471         can_run_breakpoint_commands, filesystem_is_local,
5472         can_download_tracepoint, get_trace_state_variable_value,
5473         set_trace_notes, get_tib_address, use_agent, can_use_agent,
5474         record_is_replaying, record_will_replay,
5475         augmented_libraries_svr4_read>: Adjust to return bool.
5476         * aarch64-linux-nat.c: All implementations adjusted.
5477         * aix-thread.c: All implementations adjusted.
5478         * arm-linux-nat.c: All implementations adjusted.
5479         * breakpoint.c: All implementations adjusted.
5480         * bsd-kvm.c: All implementations adjusted.
5481         * bsd-uthread.c: All implementations adjusted.
5482         * corelow.c: All implementations adjusted.
5483         * ctf.c: All implementations adjusted.
5484         * darwin-nat.c: All implementations adjusted.
5485         * darwin-nat.h: All implementations adjusted.
5486         * exec.c: All implementations adjusted.
5487         * fbsd-nat.c: All implementations adjusted.
5488         * fbsd-nat.h: All implementations adjusted.
5489         * gnu-nat.c: All implementations adjusted.
5490         * gnu-nat.h: All implementations adjusted.
5491         * go32-nat.c: All implementations adjusted.
5492         * ia64-linux-nat.c: All implementations adjusted.
5493         * inf-child.c: All implementations adjusted.
5494         * inf-child.h: All implementations adjusted.
5495         * inf-ptrace.c: All implementations adjusted.
5496         * inf-ptrace.h: All implementations adjusted.
5497         * linux-nat.c: All implementations adjusted.
5498         * linux-nat.h: All implementations adjusted.
5499         * mips-linux-nat.c: All implementations adjusted.
5500         * nto-procfs.c: All implementations adjusted.
5501         * ppc-linux-nat.c: All implementations adjusted.
5502         * procfs.c: All implementations adjusted.
5503         * ravenscar-thread.c: All implementations adjusted.
5504         * record-btrace.c: All implementations adjusted.
5505         * record-full.c: All implementations adjusted.
5506         * remote-sim.c: All implementations adjusted.
5507         * remote.c: All implementations adjusted.
5508         * s390-linux-nat.c: All implementations adjusted.
5509         * sol-thread.c: All implementations adjusted.
5510         * spu-multiarch.c: All implementations adjusted.
5511         * target-delegates.c: All implementations adjusted.
5512         * target.c: All implementations adjusted.
5513         * target.h: All implementations adjusted.
5514         * tracefile-tfile.c: All implementations adjusted.
5515         * tracefile.c: All implementations adjusted.
5516         * tracefile.h: All implementations adjusted.
5517         * windows-nat.c: All implementations adjusted.
5518         * x86-linux-nat.h: All implementations adjusted.
5519         * x86-nat.h: All implementations adjusted.
5520
5521 2018-05-02  Pedro Alves  <palves@redhat.com>
5522
5523         * make-target-delegates (scan_target_h): Don't trim lines here.
5524         Replace sequences of tabs and/or whitespace with a single
5525         whitespace.
5526         (top level, parsing methods): Trim each line before processing it
5527         here.
5528
5529 2018-05-02  Pedro Alves  <palves@redhat.com>
5530             John Baldwin  <jhb@freebsd.org>
5531
5532         * target.h (enum strata) <debug_stratum>: New.
5533         (struct target_ops) <all delegation methods>: Replace by C++
5534         virtual methods, and drop "to_" prefix.  All references updated
5535         throughout.
5536         <to_shortname, to_longname, to_doc, to_data,
5537         to_have_steppable_watchpoint, to_have_continuable_watchpoint,
5538         to_has_thread_control, to_attach_no_wait>: Delete, replaced by
5539         virtual methods.  All references updated throughout.
5540         <can_attach, supports_terminal_ours, can_create_inferior,
5541         get_thread_control_capabilities, attach_no_wait>: New
5542         virtual methods.
5543         <insert_breakpoint, remove_breakpoint>: Now
5544         TARGET_DEFAULT_NORETURN methods.
5545         <info_proc>: Now returns bool.
5546         <to_magic>: Delete.
5547         (OPS_MAGIC): Delete.
5548         (current_target): Delete.  All references replaced by references
5549         to ...
5550         (target_stack): ... this.  New.
5551         (target_shortname, target_longname): Adjust.
5552         (target_can_run): Now a function declaration.
5553         (default_child_has_all_memory, default_child_has_memory)
5554         (default_child_has_stack, default_child_has_registers)
5555         (default_child_has_execution): Remove target_ops parameter.
5556         (complete_target_initialization): Delete.
5557         (memory_breakpoint_target): New template class.
5558         (test_target_ops): Refactor as a C++ class with virtual methods.
5559         * make-target-delegates (NAME_PART): Tighten.
5560         (POINTER_PART, CP_SYMBOL): New.
5561         (SIMPLE_RETURN_PART): Reimplement.
5562         (VEC_RETURN_PART): Expect less.
5563         (RETURN_PART, VIRTUAL_PART): New.
5564         (METHOD): Adjust to C++ virtual methods.
5565         (scan_target_h): Remove reference to C99.
5566         (dname): Output "target_ops::" prefix.
5567         (write_function_header): Adjust to output a C++ class method.
5568         (write_declaration): New.
5569         (write_delegator): Adjust to output a C++ class method.
5570         (tdname): Output "dummy_target::" prefix.
5571         (write_tdefault, write_debugmethod): Adjust to output a C++ class
5572         method.
5573         (tdefault_names, debug_names): Delete.
5574         (return_types, tdefaults, styles, argtypes_array): New.
5575         (top level): All methods are delegators.
5576         (print_class): New.
5577         (top level): Print dummy_target and debug_target classes.
5578         * target-delegates.c: Regenerate.
5579         * target-debug.h (target_debug_print_enum_info_proc_what)
5580         (target_debug_print_thread_control_capabilities)
5581         (target_debug_print_thread_info_p): New.
5582         * target.c (dummy_target): Delete.
5583         (the_dummy_target, the_debug_target): New.
5584         (target_stack): Now extern.
5585         (set_targetdebug): Push/unpush debug target.
5586         (default_child_has_all_memory, default_child_has_memory)
5587         (default_child_has_stack, default_child_has_registers)
5588         (default_child_has_execution): Remove target_ops parameter.
5589         (complete_target_initialization): Delete.
5590         (add_target_with_completer): No longer call
5591         complete_target_initialization.
5592         (target_supports_terminal_ours): Use regular delegation.
5593         (update_current_target): Delete.
5594         (push_target): No longer check magic number.  Don't call
5595         update_current_target.
5596         (unpush_target): Don't call update_current_target.
5597         (target_is_pushed): No longer check magic number.
5598         (target_require_runnable): Skip for all stratums over
5599         process_stratum.
5600         (target_ops::info_proc): New.
5601         (target_info_proc): Use find_target_at and
5602         find_default_run_target.
5603         (target_supports_disable_randomization): Use regular delegation.
5604         (target_get_osdata): Use find_target_at.
5605         (target_ops::open, target_ops::close, target_ops::can_attach)
5606         (target_ops::attach, target_ops::can_create_inferior)
5607         (target_ops::create_inferior, target_ops::can_run)
5608         (target_can_run): New.
5609         (default_fileio_target): Use regular delegation.
5610         (target_ops::fileio_open, target_ops::fileio_pwrite)
5611         (target_ops::fileio_pread, target_ops::fileio_fstat)
5612         (target_ops::fileio_close, target_ops::fileio_unlink)
5613         (target_ops::fileio_readlink): New.
5614         (target_fileio_open_1, target_fileio_unlink)
5615         (target_fileio_readlink): Always call the target method.  Handle
5616         FILEIO_ENOSYS.
5617         (return_zero, return_zero_has_execution): Delete.
5618         (init_dummy_target): Delete.
5619         (dummy_target::dummy_target, dummy_target::shortname)
5620         (dummy_target::longname, dummy_target::doc)
5621         (debug_target::debug_target, debug_target::shortname)
5622         (debug_target::longname, debug_target::doc): New.
5623         (target_supports_delete_record): Use regular delegation.
5624         (setup_target_debug): Delete.
5625         (maintenance_print_target_stack): Skip debug_stratum.
5626         (initialize_targets): Instantiate the_dummy_target and
5627         the_debug_target.
5628         * auxv.c (target_auxv_parse): Remove 'ops' parameter.  Adjust to
5629         use target_stack.
5630         (target_auxv_search, fprint_target_auxv): Adjust.
5631         (info_auxv_command): Adjust to use target_stack.
5632         * auxv.h (target_auxv_parse): Remove 'ops' parameter.
5633         * exceptions.c (print_flush): Handle a NULL target_stack.
5634         * regcache.c (target_ops_no_register): Refactor as class with
5635         virtual methods.
5636
5637         * exec.c (exec_target): New class.
5638         (exec_ops): Now an exec_target.
5639         (exec_open, exec_close_1, exec_get_section_table)
5640         (exec_xfer_partial, exec_files_info, exec_has_memory)
5641         (exec_make_note_section): Refactor as exec_target methods.
5642         (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
5643         Delete.
5644         (exec_target::find_memory_regions): New.
5645         (_initialize_exec): Don't call init_exec_ops.
5646         * gdbcore.h (exec_file_clear): Delete.
5647
5648         * corefile.c (core_target): Delete.
5649         (core_file_command): Adjust.
5650         * corelow.c (core_target): New class.
5651         (the_core_target): New.
5652         (core_close): Remove target_ops parameter.
5653         (core_close_cleanup): Adjust.
5654         (core_target::close): New.
5655         (core_open, core_detach, get_core_registers, core_files_info)
5656         (core_xfer_partial, core_thread_alive, core_read_description)
5657         (core_pid_to_str, core_thread_name, core_has_memory)
5658         (core_has_stack, core_has_registers, core_info_proc): Rework as
5659         core_target methods.
5660         (ignore, core_remove_breakpoint, init_core_ops): Delete.
5661         (_initialize_corelow): Initialize the_core_target.
5662         * gdbcore.h (core_target): Delete.
5663         (the_core_target): New.
5664
5665         * ctf.c: (ctf_target): New class.
5666         (ctf_ops): Now a ctf_target.
5667         (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
5668         (ctf_xfer_partial, ctf_get_trace_state_variable_value)
5669         (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
5670         methods.
5671         (init_ctf_ops): Delete.
5672         (_initialize_ctf): Don't call it.
5673         * tracefile-tfile.c (tfile_target): New class.
5674         (tfile_ops): Now a tfile_target.
5675         (tfile_open, tfile_close, tfile_files_info)
5676         (tfile_get_tracepoint_status, tfile_trace_find)
5677         (tfile_fetch_registers, tfile_xfer_partial)
5678         (tfile_get_trace_state_variable_value, tfile_traceframe_info):
5679         Refactor as tfile_target methods.
5680         (tfile_xfer_partial_features): Remove target_ops parameter.
5681         (init_tfile_ops): Delete.
5682         (_initialize_tracefile_tfile): Don't call it.
5683         * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
5684         (tracefile_has_stack, tracefile_has_registers)
5685         (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
5686         tracefile_target methods.
5687         (init_tracefile_ops): Delete.
5688         (tracefile_target::tracefile_target): New.
5689         * tracefile.h: Include "target.h".
5690         (tracefile_target): New class.
5691         (init_tracefile_ops): Delete.
5692
5693         * spu-multiarch.c (spu_multiarch_target): New class.
5694         (spu_ops): Now a spu_multiarch_target.
5695         (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
5696         (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
5697         (spu_search_memory, spu_mourn_inferior): Refactor as
5698         spu_multiarch_target methods.
5699         (init_spu_ops): Delete.
5700         (_initialize_spu_multiarch): Remove references to init_spu_ops,
5701         complete_target_initialization.
5702
5703         * ravenscar-thread.c (ravenscar_thread_target): New class.
5704         (ravenscar_ops): Now a ravenscar_thread_target.
5705         (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
5706         (ravenscar_thread_alive, ravenscar_pid_to_str)
5707         (ravenscar_fetch_registers, ravenscar_store_registers)
5708         (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
5709         (ravenscar_stopped_by_hw_breakpoint)
5710         (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
5711         (ravenscar_mourn_inferior, ravenscar_core_of_thread)
5712         (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
5713         methods.
5714         (init_ravenscar_thread_ops): Delete.
5715         (_initialize_ravenscar): Remove references to
5716         init_ravenscar_thread_ops and complete_target_initialization.
5717
5718         * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
5719         (bsd_uthread_target): New class.
5720         (bsd_uthread_ops): Now a bsd_uthread_target.
5721         (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
5722         (bsd_uthread_close, bsd_uthread_mourn_inferior)
5723         (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
5724         (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
5725         (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
5726         (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
5727         (bsd_uthread_target): Delete function.
5728         (_initialize_bsd_uthread): Remove reference to
5729         complete_target_initialization.
5730
5731         * bfd-target.c (target_bfd_data): Delete.  Fields folded into ...
5732         (target_bfd): ... this new class.
5733         (target_bfd_xfer_partial, target_bfd_get_section_table)
5734         (target_bfd_close): Refactor as target_bfd methods.
5735         (target_bfd::~target_bfd): New.
5736         (target_bfd_reopen): Adjust.
5737         (target_bfd::close): New.
5738
5739         * record-btrace.c (record_btrace_target): New class.
5740         (record_btrace_ops): Now a record_btrace_target.
5741         (record_btrace_open, record_btrace_stop_recording)
5742         (record_btrace_disconnect, record_btrace_close)
5743         (record_btrace_async, record_btrace_info)
5744         (record_btrace_insn_history, record_btrace_insn_history_range)
5745         (record_btrace_insn_history_from, record_btrace_call_history)
5746         (record_btrace_call_history_range)
5747         (record_btrace_call_history_from, record_btrace_record_method)
5748         (record_btrace_is_replaying, record_btrace_will_replay)
5749         (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
5750         (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
5751         (record_btrace_store_registers, record_btrace_prepare_to_store)
5752         (record_btrace_to_get_unwinder)
5753         (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
5754         (record_btrace_commit_resume, record_btrace_wait)
5755         (record_btrace_stop, record_btrace_can_execute_reverse)
5756         (record_btrace_stopped_by_sw_breakpoint)
5757         (record_btrace_supports_stopped_by_sw_breakpoint)
5758         (record_btrace_stopped_by_hw_breakpoint)
5759         (record_btrace_supports_stopped_by_hw_breakpoint)
5760         (record_btrace_update_thread_list, record_btrace_thread_alive)
5761         (record_btrace_goto_begin, record_btrace_goto_end)
5762         (record_btrace_goto, record_btrace_stop_replaying_all)
5763         (record_btrace_execution_direction)
5764         (record_btrace_prepare_to_generate_core)
5765         (record_btrace_done_generating_core): Refactor as
5766         record_btrace_target methods.
5767         (init_record_btrace_ops): Delete.
5768         (_initialize_record_btrace): Remove reference to
5769         init_record_btrace_ops.
5770         * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
5771         the execution_direction global.
5772         (record_full_base_target, record_full_target)
5773         (record_full_core_target): New classes.
5774         (record_full_ops): Now a record_full_target.
5775         (record_full_core_ops): Now a record_full_core_target.
5776         (record_full_target::detach, record_full_target::disconnect)
5777         (record_full_core_target::disconnect)
5778         (record_full_target::mourn_inferior, record_full_target::kill):
5779         New.
5780         (record_full_open, record_full_close, record_full_async): Refactor
5781         as methods of the record_full_base_target class.
5782         (record_full_resume, record_full_commit_resume): Refactor
5783         as methods of the record_full_target class.
5784         (record_full_wait, record_full_stopped_by_watchpoint)
5785         (record_full_stopped_data_address)
5786         (record_full_stopped_by_sw_breakpoint)
5787         (record_full_supports_stopped_by_sw_breakpoint)
5788         (record_full_stopped_by_hw_breakpoint)
5789         (record_full_supports_stopped_by_hw_breakpoint): Refactor as
5790         methods of the record_full_base_target class.
5791         (record_full_store_registers, record_full_xfer_partial)
5792         (record_full_insert_breakpoint, record_full_remove_breakpoint):
5793         Refactor as methods of the record_full_target class.
5794         (record_full_can_execute_reverse, record_full_get_bookmark)
5795         (record_full_goto_bookmark, record_full_execution_direction)
5796         (record_full_record_method, record_full_info, record_full_delete)
5797         (record_full_is_replaying, record_full_will_replay)
5798         (record_full_goto_begin, record_full_goto_end, record_full_goto)
5799         (record_full_stop_replaying): Refactor as methods of the
5800         record_full_base_target class.
5801         (record_full_core_resume, record_full_core_kill)
5802         (record_full_core_fetch_registers)
5803         (record_full_core_prepare_to_store)
5804         (record_full_core_store_registers, record_full_core_xfer_partial)
5805         (record_full_core_insert_breakpoint)
5806         (record_full_core_remove_breakpoint)
5807         (record_full_core_has_execution): Refactor
5808         as methods of the record_full_core_target class.
5809         (record_full_base_target::supports_delete_record): New.
5810         (init_record_full_ops): Delete.
5811         (init_record_full_core_ops): Delete.
5812         (record_full_save): Refactor as method of the
5813         record_full_base_target class.
5814         (_initialize_record_full): Remove references to
5815         init_record_full_ops and init_record_full_core_ops.
5816
5817         * remote.c (remote_target, extended_remote_target): New classes.
5818         (remote_ops): Now a remote_target.
5819         (extended_remote_ops): Now an extended_remote_target.
5820         (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
5821         (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
5822         (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
5823         (remote_pass_signals, remote_set_syscall_catchpoint)
5824         (remote_program_signals, )
5825         (remote_thread_always_alive): Remove target_ops parameter.
5826         (remote_thread_alive, remote_thread_name)
5827         (remote_update_thread_list, remote_threads_extra_info)
5828         (remote_static_tracepoint_marker_at)
5829         (remote_static_tracepoint_markers_by_strid)
5830         (remote_get_ada_task_ptid, remote_close, remote_start_remote)
5831         (remote_open): Refactor as methods of remote_target.
5832         (extended_remote_open, extended_remote_detach)
5833         (extended_remote_attach, extended_remote_post_attach):
5834         (extended_remote_supports_disable_randomization)
5835         (extended_remote_create_inferior): : Refactor as method of
5836         extended_remote_target.
5837         (remote_set_permissions, remote_open_1, remote_detach)
5838         (remote_follow_fork, remote_follow_exec, remote_disconnect)
5839         (remote_resume, remote_commit_resume, remote_stop)
5840         (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
5841         (remote_terminal_ours, remote_wait, remote_fetch_registers)
5842         (remote_prepare_to_store, remote_store_registers)
5843         (remote_flash_erase, remote_flash_done, remote_files_info)
5844         (remote_kill, remote_mourn, remote_insert_breakpoint)
5845         (remote_remove_breakpoint, remote_insert_watchpoint)
5846         (remote_watchpoint_addr_within_range)
5847         (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
5848         (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
5849         (remote_supports_stopped_by_sw_breakpoint)
5850         (remote_stopped_by_hw_breakpoint)
5851         (remote_supports_stopped_by_hw_breakpoint)
5852         (remote_stopped_by_watchpoint, remote_stopped_data_address)
5853         (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
5854         (remote_verify_memory): Refactor as methods of remote_target.
5855         (remote_write_qxfer, remote_read_qxfer): Remove target_ops
5856         parameter.
5857         (remote_xfer_partial, remote_get_memory_xfer_limit)
5858         (remote_search_memory, remote_rcmd, remote_memory_map)
5859         (remote_pid_to_str, remote_get_thread_local_address)
5860         (remote_get_tib_address, remote_read_description): Refactor as
5861         methods of remote_target.
5862         (remote_target::fileio_open, remote_target::fileio_pwrite)
5863         (remote_target::fileio_pread, remote_target::fileio_close): New.
5864         (remote_hostio_readlink, remote_hostio_fstat)
5865         (remote_filesystem_is_local, remote_can_execute_reverse)
5866         (remote_supports_non_stop, remote_supports_disable_randomization)
5867         (remote_supports_multi_process, remote_supports_cond_breakpoints)
5868         (remote_supports_enable_disable_tracepoint)
5869         (remote_supports_string_tracing)
5870         (remote_can_run_breakpoint_commands, remote_trace_init)
5871         (remote_download_tracepoint, remote_can_download_tracepoint)
5872         (remote_download_trace_state_variable, remote_enable_tracepoint)
5873         (remote_disable_tracepoint, remote_trace_set_readonly_regions)
5874         (remote_trace_start, remote_get_trace_status)
5875         (remote_get_tracepoint_status, remote_trace_stop)
5876         (remote_trace_find, remote_get_trace_state_variable_value)
5877         (remote_save_trace_data, remote_get_raw_trace_data)
5878         (remote_set_disconnected_tracing, remote_core_of_thread)
5879         (remote_set_circular_trace_buffer, remote_traceframe_info)
5880         (remote_get_min_fast_tracepoint_insn_len)
5881         (remote_set_trace_buffer_size, remote_set_trace_notes)
5882         (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
5883         (remote_disable_btrace, remote_teardown_btrace)
5884         (remote_read_btrace, remote_btrace_conf)
5885         (remote_augmented_libraries_svr4_read, remote_load)
5886         (remote_pid_to_exec_file, remote_can_do_single_step)
5887         (remote_execution_direction, remote_thread_handle_to_thread_info):
5888         Refactor as methods of remote_target.
5889         (init_remote_ops, init_extended_remote_ops): Delete.
5890         (remote_can_async_p, remote_is_async_p, remote_async)
5891         (remote_thread_events, remote_upload_tracepoints)
5892         (remote_upload_trace_state_variables): Refactor as methods of
5893         remote_target.
5894         (_initialize_remote): Remove references to init_remote_ops and
5895         init_extended_remote_ops.
5896
5897         * remote-sim.c (gdbsim_target): New class.
5898         (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
5899         (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
5900         (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
5901         (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
5902         (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
5903         (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
5904         Refactor as methods of gdbsim_target.
5905         (gdbsim_ops): Now a gdbsim_target.
5906         (init_gdbsim_ops): Delete.
5907         (gdbsim_cntrl_c): Adjust.
5908         (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
5909
5910         * amd64-linux-nat.c (amd64_linux_nat_target): New class.
5911         (the_amd64_linux_nat_target): New.
5912         (amd64_linux_fetch_inferior_registers)
5913         (amd64_linux_store_inferior_registers): Refactor as methods of
5914         amd64_linux_nat_target.
5915         (_initialize_amd64_linux_nat): Adjust.  Set linux_target.
5916         * i386-linux-nat.c: Don't include "linux-nat.h".
5917         (i386_linux_nat_target): New class.
5918         (the_i386_linux_nat_target): New.
5919         (i386_linux_fetch_inferior_registers)
5920         (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
5921         as methods of i386_linux_nat_target.
5922         (_initialize_i386_linux_nat): Adjust.  Set linux_target.
5923         * inf-child.c (inf_child_ops): Delete.
5924         (inf_child_fetch_inferior_registers)
5925         (inf_child_store_inferior_registers): Delete.
5926         (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
5927         methods of inf_child_target.
5928         (inf_child_target::supports_terminal_ours)
5929         (inf_child_target::terminal_init)
5930         (inf_child_target::terminal_inferior)
5931         (inf_child_target::terminal_ours_for_output)
5932         (inf_child_target::terminal_ours, inf_child_target::interrupt)
5933         (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
5934         New.
5935         (inf_child_open, inf_child_disconnect, inf_child_close)
5936         (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
5937         (inf_child_post_startup_inferior, inf_child_can_run)
5938         (inf_child_pid_to_exec_file): Refactor as methods of
5939         inf_child_target.
5940         (inf_child_follow_fork): Delete.
5941         (inf_child_target::can_create_inferior)
5942         (inf_child_target::can_attach): New.
5943         (inf_child_target::has_all_memory, inf_child_target::has_memory)
5944         (inf_child_target::has_stack, inf_child_target::has_registers)
5945         (inf_child_target::has_execution): New.
5946         (inf_child_fileio_open, inf_child_fileio_pwrite)
5947         (inf_child_fileio_pread, inf_child_fileio_fstat)
5948         (inf_child_fileio_close, inf_child_fileio_unlink)
5949         (inf_child_fileio_readlink, inf_child_use_agent)
5950         (inf_child_can_use_agent): Refactor as methods of
5951         inf_child_target.
5952         (return_zero, inf_child_target): Delete.
5953         (inf_child_target::inf_child_target): New.
5954         * inf-child.h: Include "target.h".
5955         (inf_child_target): Delete function prototype.
5956         (inf_child_target): New class.
5957         (inf_child_open_target, inf_child_mourn_inferior)
5958         (inf_child_maybe_unpush_target): Delete.
5959         * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
5960         (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
5961         (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
5962         (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
5963         (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
5964         (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
5965         (inf_ptrace_wait, inf_ptrace_xfer_partial)
5966         (inf_ptrace_thread_alive, inf_ptrace_files_info)
5967         (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
5968         methods of inf_ptrace_target.
5969         (inf_ptrace_target): Delete function.
5970         * inf-ptrace.h: Include "inf-child.h".
5971         (inf_ptrace_target): Delete function declaration.
5972         (inf_ptrace_target): New class.
5973         (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
5974         * linux-nat.c (linux_target): New.
5975         (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
5976         (linux_nat_target::~linux_nat_target): New.
5977         (linux_child_post_attach, linux_child_post_startup_inferior)
5978         (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
5979         (linux_child_remove_fork_catchpoint)
5980         (linux_child_insert_vfork_catchpoint)
5981         (linux_child_remove_vfork_catchpoint)
5982         (linux_child_insert_exec_catchpoint)
5983         (linux_child_remove_exec_catchpoint)
5984         (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
5985         (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
5986         (linux_nat_resume, linux_nat_stopped_by_watchpoint)
5987         (linux_nat_stopped_data_address)
5988         (linux_nat_stopped_by_sw_breakpoint)
5989         (linux_nat_supports_stopped_by_sw_breakpoint)
5990         (linux_nat_stopped_by_hw_breakpoint)
5991         (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
5992         (linux_nat_kill, linux_nat_mourn_inferior)
5993         (linux_nat_xfer_partial, linux_nat_thread_alive)
5994         (linux_nat_update_thread_list, linux_nat_pid_to_str)
5995         (linux_nat_thread_name, linux_child_pid_to_exec_file)
5996         (linux_child_static_tracepoint_markers_by_strid)
5997         (linux_nat_is_async_p, linux_nat_can_async_p)
5998         (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
5999         (linux_nat_supports_multi_process)
6000         (linux_nat_supports_disable_randomization, linux_nat_async)
6001         (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
6002         (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
6003         (linux_nat_fileio_open, linux_nat_fileio_readlink)
6004         (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
6005         methods of linux_nat_target.
6006         (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
6007         (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
6008         parameter.
6009         (check_stopped_by_watchpoint): Adjust.
6010         (linux_xfer_partial): Delete.
6011         (linux_target_install_ops, linux_target, linux_nat_add_target):
6012         Delete.
6013         (linux_nat_target::linux_nat_target): New.
6014         * linux-nat.h: Include "inf-ptrace.h".
6015         (linux_nat_target): New.
6016         (linux_target, linux_target_install_ops, linux_nat_add_target):
6017         Delete function declarations.
6018         (linux_target): Declare global.
6019         * linux-thread-db.c (thread_db_target): New.
6020         (thread_db_target::thread_db_target): New.
6021         (thread_db_ops): Delete.
6022         (the_thread_db_target): New.
6023         (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
6024         (thread_db_update_thread_list, thread_db_pid_to_str)
6025         (thread_db_extra_thread_info)
6026         (thread_db_thread_handle_to_thread_info)
6027         (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
6028         (thread_db_resume): Refactor as methods of thread_db_target.
6029         (init_thread_db_ops): Delete.
6030         (_initialize_thread_db): Remove reference to init_thread_db_ops.
6031         * x86-linux-nat.c: Don't include "linux-nat.h".
6032         (super_post_startup_inferior): Delete.
6033         (x86_linux_nat_target::~x86_linux_nat_target): New.
6034         (x86_linux_child_post_startup_inferior)
6035         (x86_linux_read_description, x86_linux_enable_btrace)
6036         (x86_linux_disable_btrace, x86_linux_teardown_btrace)
6037         (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
6038         methods of x86_linux_nat_target.
6039         (x86_linux_create_target): Delete.  Bits folded ...
6040         (x86_linux_add_target): ... here.  Now takes a linux_nat_target
6041         pointer.
6042         * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
6043         (x86_linux_nat_target): New class.
6044         (x86_linux_create_target): Delete.
6045         (x86_linux_add_target): Now takes a linux_nat_target pointer.
6046         * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
6047         (x86_region_ok_for_watchpoint, x86_stopped_data_address)
6048         (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
6049         (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
6050         (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
6051         make extern.
6052         (x86_use_watchpoints): Delete.
6053         * x86-nat.h: Include "breakpoint.h" and "target.h".
6054         (x86_use_watchpoints): Delete.
6055         (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
6056         (x86_stopped_by_watchpoint, x86_stopped_data_address)
6057         (x86_insert_watchpoint, x86_remove_watchpoint)
6058         (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
6059         (x86_stopped_by_hw_breakpoint): New declarations.
6060         (x86_nat_target): New template class.
6061
6062         * ppc-linux-nat.c (ppc_linux_nat_target): New class.
6063         (the_ppc_linux_nat_target): New.
6064         (ppc_linux_fetch_inferior_registers)
6065         (ppc_linux_can_use_hw_breakpoint)
6066         (ppc_linux_region_ok_for_hw_watchpoint)
6067         (ppc_linux_ranged_break_num_registers)
6068         (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
6069         (ppc_linux_insert_mask_watchpoint)
6070         (ppc_linux_remove_mask_watchpoint)
6071         (ppc_linux_can_accel_watchpoint_condition)
6072         (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
6073         (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
6074         (ppc_linux_watchpoint_addr_within_range)
6075         (ppc_linux_masked_watch_num_registers)
6076         (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
6077         (ppc_linux_read_description): Refactor as methods of
6078         ppc_linux_nat_target.
6079         (_initialize_ppc_linux_nat): Adjust.  Set linux_target.
6080
6081         * procfs.c (procfs_xfer_partial): Delete forward declaration.
6082         (procfs_target): New class.
6083         (the_procfs_target): New.
6084         (procfs_target): Delete function.
6085         (procfs_auxv_parse, procfs_attach, procfs_detach)
6086         (procfs_fetch_registers, procfs_store_registers, procfs_wait)
6087         (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
6088         (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
6089         (procfs_create_inferior, procfs_update_thread_list)
6090         (procfs_thread_alive, procfs_pid_to_str)
6091         (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
6092         (procfs_stopped_data_address, procfs_insert_watchpoint)
6093         (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
6094         (proc_find_memory_regions, procfs_info_proc)
6095         (procfs_make_note_section): Refactor as methods of procfs_target.
6096         (_initialize_procfs): Adjust.
6097         * sol-thread.c (sol_thread_target): New class.
6098         (sol_thread_ops): Now a sol_thread_target.
6099         (sol_thread_detach, sol_thread_resume, sol_thread_wait)
6100         (sol_thread_fetch_registers, sol_thread_store_registers)
6101         (sol_thread_xfer_partial, sol_thread_mourn_inferior)
6102         (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
6103         (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
6104         (init_sol_thread_ops): Delete.
6105         (_initialize_sol_thread): Adjust.  Remove references to
6106         init_sol_thread_ops and complete_target_initialization.
6107
6108         * windows-nat.c (windows_nat_target): New class.
6109         (windows_fetch_inferior_registers)
6110         (windows_store_inferior_registers, windows_resume, windows_wait)
6111         (windows_attach, windows_detach, windows_pid_to_exec_file)
6112         (windows_files_info, windows_create_inferior)
6113         (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
6114         (windows_close, windows_pid_to_str, windows_xfer_partial)
6115         (windows_get_tib_address, windows_get_ada_task_ptid)
6116         (windows_thread_name, windows_thread_alive): Refactor as
6117         windows_nat_target methods.
6118         (do_initial_windows_stuff): Adjust.
6119         (windows_target): Delete function.
6120         (_initialize_windows_nat): Adjust.
6121
6122         * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
6123         (darwin_mourn_inferior, darwin_kill_inferior)
6124         (darwin_create_inferior, darwin_attach, darwin_detach)
6125         (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
6126         (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
6127         (darwin_supports_multi_process): Refactor as darwin_nat_target
6128         methods.
6129         (darwin_resume_to, darwin_files_info): Delete.
6130         (_initialize_darwin_inferior): Rename to ...
6131         (_initialize_darwin_nat): ... this.  Adjust to C++ification.
6132         * darwin-nat.h: Include "inf-child.h".
6133         (darwin_nat_target): New class.
6134         (darwin_complete_target): Delete.
6135         * i386-darwin-nat.c (i386_darwin_nat_target): New class.
6136         (darwin_target): New.
6137         (i386_darwin_fetch_inferior_registers)
6138         (i386_darwin_store_inferior_registers): Refactor as methods of
6139         darwin_nat_target.
6140         (darwin_complete_target): Delete, with ...
6141         (_initialize_i386_darwin_nat): ... bits factored out here.
6142
6143         * alpha-linux-nat.c (alpha_linux_nat_target): New class.
6144         (the_alpha_linux_nat_target): New.
6145         (alpha_linux_register_u_offset): Refactor as
6146         alpha_linux_nat_target method.
6147         (_initialize_alpha_linux_nat): Adjust.
6148         * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
6149         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
6150         (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
6151         methods of linux_nat_trad_target.
6152         (linux_trad_target): Delete.
6153         * linux-nat-trad.h (linux_trad_target): Delete function.
6154         (linux_nat_trad_target): New class.
6155         * mips-linux-nat.c (mips_linux_nat_target): New class.
6156         (super_fetch_registers, super_store_registers, super_close):
6157         Delete.
6158         (the_mips_linux_nat_target): New.
6159         (mips64_linux_regsets_fetch_registers)
6160         (mips64_linux_regsets_store_registers)
6161         (mips64_linux_fetch_registers, mips64_linux_store_registers)
6162         (mips_linux_register_u_offset, mips_linux_read_description)
6163         (mips_linux_can_use_hw_breakpoint)
6164         (mips_linux_stopped_by_watchpoint)
6165         (mips_linux_stopped_data_address)
6166         (mips_linux_region_ok_for_hw_watchpoint)
6167         (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
6168         (mips_linux_close): Refactor as methods of mips_linux_nat.
6169         (_initialize_mips_linux_nat): Adjust to C++ification.
6170
6171         * aix-thread.c (aix_thread_target): New class.
6172         (aix_thread_ops): Now an aix_thread_target.
6173         (aix_thread_detach, aix_thread_resume, aix_thread_wait)
6174         (aix_thread_fetch_registers, aix_thread_store_registers)
6175         (aix_thread_xfer_partial, aix_thread_mourn_inferior)
6176         (aix_thread_thread_alive, aix_thread_pid_to_str)
6177         (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
6178         Refactor as methods of aix_thread_target.
6179         (init_aix_thread_ops): Delete.
6180         (_initialize_aix_thread): Remove references to init_aix_thread_ops
6181         and complete_target_initialization.
6182         * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
6183         (rs6000_nat_target): New class.
6184         (the_rs6000_nat_target): New.
6185         (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
6186         (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
6187         (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
6188         (super_create_inferior): Delete.
6189         (_initialize_rs6000_nat): Adjust to C++ification.
6190
6191         * arm-linux-nat.c (arm_linux_nat_target): New class.
6192         (the_arm_linux_nat_target): New.
6193         (arm_linux_fetch_inferior_registers)
6194         (arm_linux_store_inferior_registers, arm_linux_read_description)
6195         (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
6196         (arm_linux_remove_hw_breakpoint)
6197         (arm_linux_region_ok_for_hw_watchpoint)
6198         (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
6199         (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
6200         (arm_linux_watchpoint_addr_within_range): Refactor as methods of
6201         arm_linux_nat_target.
6202         (_initialize_arm_linux_nat): Adjust to C++ification.
6203
6204         * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
6205         (the_aarch64_linux_nat_target): New.
6206         (aarch64_linux_fetch_inferior_registers)
6207         (aarch64_linux_store_inferior_registers)
6208         (aarch64_linux_child_post_startup_inferior)
6209         (aarch64_linux_read_description)
6210         (aarch64_linux_can_use_hw_breakpoint)
6211         (aarch64_linux_insert_hw_breakpoint)
6212         (aarch64_linux_remove_hw_breakpoint)
6213         (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
6214         (aarch64_linux_region_ok_for_hw_watchpoint)
6215         (aarch64_linux_stopped_data_address)
6216         (aarch64_linux_stopped_by_watchpoint)
6217         (aarch64_linux_watchpoint_addr_within_range)
6218         (aarch64_linux_can_do_single_step): Refactor as methods of
6219         aarch64_linux_nat_target.
6220         (super_post_startup_inferior): Delete.
6221         (_initialize_aarch64_linux_nat): Adjust to C++ification.
6222
6223         * hppa-linux-nat.c (hppa_linux_nat_target): New class.
6224         (the_hppa_linux_nat_target): New.
6225         (hppa_linux_fetch_inferior_registers)
6226         (hppa_linux_store_inferior_registers): Refactor as methods of
6227         hppa_linux_nat_target.
6228         (_initialize_hppa_linux_nat): Adjust to C++ification.
6229
6230         * ia64-linux-nat.c (ia64_linux_nat_target): New class.
6231         (the_ia64_linux_nat_target): New.
6232         (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
6233         (ia64_linux_stopped_data_address)
6234         (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
6235         (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
6236         ia64_linux_nat_target methods.
6237         (super_xfer_partial): Delete.
6238         (_initialize_ia64_linux_nat): Adjust to C++ification.
6239
6240         * m32r-linux-nat.c (m32r_linux_nat_target): New class.
6241         (the_m32r_linux_nat_target): New.
6242         (m32r_linux_fetch_inferior_registers)
6243         (m32r_linux_store_inferior_registers): Refactor as
6244         m32r_linux_nat_target methods.
6245         (_initialize_m32r_linux_nat): Adjust to C++ification.
6246
6247         * m68k-linux-nat.c (m68k_linux_nat_target): New class.
6248         (the_m68k_linux_nat_target): New.
6249         (m68k_linux_fetch_inferior_registers)
6250         (m68k_linux_store_inferior_registers): Refactor as
6251         m68k_linux_nat_target methods.
6252         (_initialize_m68k_linux_nat): Adjust to C++ification.
6253
6254         * s390-linux-nat.c (s390_linux_nat_target): New class.
6255         (the_s390_linux_nat_target): New.
6256         (s390_linux_fetch_inferior_registers)
6257         (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
6258         (s390_insert_watchpoint, s390_remove_watchpoint)
6259         (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
6260         (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
6261         (s390_auxv_parse, s390_read_description): Refactor as methods of
6262         s390_linux_nat_target.
6263         (_initialize_s390_nat): Adjust to C++ification.
6264
6265         * sparc-linux-nat.c (sparc_linux_nat_target): New class.
6266         (the_sparc_linux_nat_target): New.
6267         (_initialize_sparc_linux_nat): Adjust to C++ification.
6268         * sparc-nat.c (sparc_fetch_inferior_registers)
6269         (sparc_store_inferior_registers): Remove target_ops parameter.
6270         * sparc-nat.h (sparc_fetch_inferior_registers)
6271         (sparc_store_inferior_registers): Remove target_ops parameter.
6272         * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
6273         (the_sparc64_linux_nat_target): New.
6274         (_initialize_sparc64_linux_nat): Adjust to C++ification.
6275
6276         * spu-linux-nat.c (spu_linux_nat_target): New class.
6277         (the_spu_linux_nat_target): New.
6278         (spu_child_post_startup_inferior, spu_child_post_attach)
6279         (spu_child_wait, spu_fetch_inferior_registers)
6280         (spu_store_inferior_registers, spu_xfer_partial)
6281         (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
6282         methods.
6283         (_initialize_spu_nat): Adjust to C++ification.
6284
6285         * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
6286         (the_tilegx_linux_nat_target): New.
6287         (fetch_inferior_registers, store_inferior_registers):
6288         Refactor as methods.
6289         (_initialize_tile_linux_nat): Adjust to C++ification.
6290
6291         * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
6292         (the_xtensa_linux_nat_target): New.
6293         (xtensa_linux_fetch_inferior_registers)
6294         (xtensa_linux_store_inferior_registers): Refactor as
6295         xtensa_linux_nat_target methods.
6296         (_initialize_xtensa_linux_nat): Adjust to C++ification.
6297
6298         * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
6299         (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
6300         (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
6301         (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
6302         (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
6303         (fbsd_stopped_by_sw_breakpoint)
6304         (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
6305         (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
6306         (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
6307         (fbsd_post_startup_inferior, fbsd_post_attach)
6308         (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
6309         (fbsd_set_syscall_catchpoint)
6310         (super_xfer_partial, super_resume, super_wait)
6311         (fbsd_supports_stopped_by_hw_breakpoint): Delete.
6312         (fbsd_handle_debug_trap): Remove target_ops parameter.
6313         (fbsd_nat_add_target): Delete.
6314         * fbsd-nat.h: Include "inf-ptrace.h".
6315         (fbsd_nat_add_target): Delete.
6316         (USE_SIGTRAP_SIGINFO): Define.
6317         (fbsd_nat_target): New class.
6318
6319         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
6320         (amd64bsd_store_inferior_registers): Remove target_ops parameter.
6321         (amd64bsd_target): Delete.
6322         * amd64-bsd-nat.h: New file.
6323         * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
6324         "x86-bsd-nat.h".
6325         (amd64_fbsd_nat_target): New class.
6326         (the_amd64_fbsd_nat_target): New.
6327         (amd64fbsd_read_description): Refactor as method of
6328         amd64_fbsd_nat_target.
6329         (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
6330         (_initialize_amd64fbsd_nat): Adjust to C++ification.
6331         * amd64-nat.h (amd64bsd_target): Delete function declaration.
6332         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
6333         (i386bsd_store_inferior_registers): Remove target_ops parameter.
6334         (i386bsd_target): Delete.
6335         * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
6336         (i386bsd_fetch_inferior_registers)
6337         (i386bsd_store_inferior_registers): Declare.
6338         (i386_bsd_nat_target): New class.
6339         * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
6340         (the_i386_fbsd_nat_target): New.
6341         (i386fbsd_resume, i386fbsd_read_description): Refactor as
6342         i386_fbsd_nat_target methods.
6343         (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
6344         (_initialize_i386fbsd_nat): Adjust to C++ification.
6345         * x86-bsd-nat.c (super_mourn_inferior): Delete.
6346         (x86bsd_mourn_inferior, x86bsd_target): Delete.
6347         (_initialize_x86_bsd_nat): Adjust to C++ification.
6348         * x86-bsd-nat.h: Include "x86-nat.h".
6349         (x86bsd_target): Delete declaration.
6350         (x86bsd_nat_target): New class.
6351
6352         * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
6353         (the_aarch64_fbsd_nat_target): New.
6354         (aarch64_fbsd_fetch_inferior_registers)
6355         (aarch64_fbsd_store_inferior_registers): Refactor as methods of
6356         aarch64_fbsd_nat_target.
6357         (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
6358         * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
6359         (the_alpha_bsd_nat_target): New.
6360         (alphabsd_fetch_inferior_registers)
6361         (alphabsd_store_inferior_registers): Refactor as
6362         alpha_bsd_nat_target methods.
6363         (_initialize_alphabsd_nat): Refactor as methods of
6364         alpha_bsd_nat_target.
6365         * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
6366         (the_amd64_nbsd_nat_target): New.
6367         (_initialize_amd64nbsd_nat): Adjust to C++ification.
6368         * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
6369         (the_amd64_obsd_nat_target): New.
6370         (_initialize_amd64obsd_nat): Adjust to C++ification.
6371         * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
6372         (the_arm_fbsd_nat_target): New.
6373         (arm_fbsd_fetch_inferior_registers)
6374         (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
6375         (_initialize_arm_fbsd_nat): Refactor as methods of
6376         arm_fbsd_nat_target.
6377         (_initialize_arm_fbsd_nat): Adjust to C++ification.
6378         * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
6379         (the_arm_netbsd_nat_target): New.
6380         (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
6381         arm_netbsd_nat_target.
6382         (_initialize_arm_netbsd_nat): Adjust to C++ification.
6383         * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
6384         (the_hppa_nbsd_nat_target): New.
6385         (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
6386         hppa_nbsd_nat_target methods.
6387         (_initialize_hppanbsd_nat): Adjust to C++ification.
6388         * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
6389         (the_hppa_obsd_nat_target): New.
6390         (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
6391         methods of hppa_obsd_nat_target.
6392         (_initialize_hppaobsd_nat): Adjust to C++ification.  Use
6393         add_target.
6394         * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
6395         (_initialize_i386nbsd_nat): Adjust to C++ification.  Use
6396         add_target.
6397         * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
6398         (_initialize_i386obsd_nat): Use add_target.
6399         * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
6400         (the_m68k_bsd_nat_target): New.
6401         (m68kbsd_fetch_inferior_registers)
6402         (m68kbsd_store_inferior_registers): Refactor as methods of
6403         m68k_bsd_nat_target.
6404         (_initialize_m68kbsd_nat): Adjust to C++ification.
6405         * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
6406         (the_mips_fbsd_nat_target): New.
6407         (mips_fbsd_fetch_inferior_registers)
6408         (mips_fbsd_store_inferior_registers): Refactor as methods of
6409         mips_fbsd_nat_target.
6410         (_initialize_mips_fbsd_nat): Adjust to C++ification.  Use
6411         add_target.
6412         * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
6413         (the_mips_nbsd_nat_target): New.
6414         (mipsnbsd_fetch_inferior_registers)
6415         (mipsnbsd_store_inferior_registers): Refactor as methods of
6416         mips_nbsd_nat_target.
6417         (_initialize_mipsnbsd_nat): Adjust to C++ification.
6418         * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
6419         (the_mips64_obsd_nat_target): New.
6420         (mips64obsd_fetch_inferior_registers)
6421         (mips64obsd_store_inferior_registers): Refactor as methods of
6422         mips64_obsd_nat_target.
6423         (_initialize_mips64obsd_nat): Adjust to C++ification.  Use
6424         add_target.
6425         * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
6426         nbsd_nat_target.
6427         * nbsd-nat.h: Include "inf-ptrace.h".
6428         (nbsd_nat_target): New class.
6429         * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
6430         (obsd_wait): Refactor as methods of obsd_nat_target.
6431         (obsd_add_target): Delete.
6432         * obsd-nat.h: Include "inf-ptrace.h".
6433         (obsd_nat_target): New class.
6434         * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
6435         (the_ppc_fbsd_nat_target): New.
6436         (ppcfbsd_fetch_inferior_registers)
6437         (ppcfbsd_store_inferior_registers): Refactor as methods of
6438         ppc_fbsd_nat_target.
6439         (_initialize_ppcfbsd_nat): Adjust to C++ification.  Use
6440         add_target.
6441         * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
6442         (the_ppc_nbsd_nat_target): New.
6443         (ppcnbsd_fetch_inferior_registers)
6444         (ppcnbsd_store_inferior_registers): Refactor as methods of
6445         ppc_nbsd_nat_target.
6446         (_initialize_ppcnbsd_nat): Adjust to C++ification.
6447         * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
6448         (the_ppc_obsd_nat_target): New.
6449         (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
6450         methods of ppc_obsd_nat_target.
6451         (_initialize_ppcobsd_nat): Adjust to C++ification.  Use
6452         add_target.
6453         * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
6454         (the_sh_nbsd_nat_target): New.
6455         (shnbsd_fetch_inferior_registers)
6456         (shnbsd_store_inferior_registers): Refactor as methods of
6457         sh_nbsd_nat_target.
6458         (_initialize_shnbsd_nat): Adjust to C++ification.
6459         * sparc-nat.c (sparc_xfer_wcookie): Make extern.
6460         (inf_ptrace_xfer_partial): Delete.
6461         (sparc_xfer_partial, sparc_target): Delete.
6462         * sparc-nat.h (sparc_fetch_inferior_registers)
6463         (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
6464         (sparc_target): Delete function declaration.
6465         (sparc_target): New template class.
6466         * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
6467         (_initialize_sparcnbsd_nat): Adjust to C++ification.
6468         * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
6469         (_initialize_sparc64fbsd_nat): Adjust to C++ification.  Use
6470         add_target.
6471         * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
6472         (_initialize_sparc64nbsd_nat): Adjust to C++ification.
6473         * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
6474         (_initialize_sparc64obsd_nat): Adjust to C++ification.  Use
6475         add_target.
6476         * vax-bsd-nat.c (vax_bsd_nat_target): New class.
6477         (the_vax_bsd_nat_target): New.
6478         (vaxbsd_fetch_inferior_registers)
6479         (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
6480         methods.
6481         (_initialize_vaxbsd_nat): Adjust to C++ification.
6482
6483         * bsd-kvm.c (bsd_kvm_target): New class.
6484         (bsd_kvm_ops): Now a bsd_kvm_target.
6485         (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
6486         (bsd_kvm_files_info, bsd_kvm_fetch_registers)
6487         (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
6488         bsd_kvm_target.
6489         (bsd_kvm_return_one): Delete.
6490         (bsd_kvm_add_target): Adjust to C++ification.
6491
6492         * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
6493         (nto_procfs_target_procfs): New classes.
6494         (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
6495         (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
6496         (procfs_post_attach, procfs_wait, procfs_fetch_registers)
6497         (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
6498         (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
6499         (procfs_remove_hw_breakpoint, procfs_resume)
6500         (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
6501         (procfs_kill_inferior, procfs_store_registers)
6502         (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
6503         as methods of nto_procfs_target.
6504         (nto_procfs_ops): Now an nto_procfs_target_procfs.
6505         (nto_native_ops): Delete.
6506         (procfs_open, procfs_native_open): Delete.
6507         (nto_native_ops): Now an nto_procfs_target_native.
6508         (init_procfs_targets): Adjust to C++ification.
6509         (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
6510         (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
6511         Refactor as methods of nto_procfs_target.
6512
6513         * go32-nat.c (go32_nat_target): New class.
6514         (the_go32_nat_target): New.
6515         (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
6516         (go32_store_registers, go32_xfer_partial, go32_files_info)
6517         (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
6518         (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
6519         (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
6520         (go32_pid_to_str): Refactor as methods of go32_nat_target.
6521         (go32_target): Delete.
6522         (_initialize_go32_nat): Adjust to C++ification.
6523
6524         * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
6525         (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
6526         (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
6527         (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
6528         gnu_nat_target.
6529         (gnu_target): Delete.
6530         * gnu-nat.h (gnu_target): Delete.
6531         (gnu_nat_target): New class.
6532         * i386-gnu-nat.c (gnu_base_target): New.
6533         (i386_gnu_nat_target): New class.
6534         (the_i386_gnu_nat_target): New.
6535         (_initialize_i386gnu_nat): Adjust to C++ification.
6536
6537 2018-05-02  Pedro Alves  <palves@redhat.com>
6538
6539         * bfd-target.c (target_bfd_xclose): Rename to ...
6540         (target_bfd_close): ... this.
6541         (target_bfd_reopen): Adjust.
6542         * target.c (target_close): Remove references to to_xclose.
6543         * target.h (target_ops::to_xclose): Delete.
6544         (target_ops::to_close): Update comments.
6545
6546 2018-05-02  Pedro Alves  <palves@redhat.com>
6547
6548         * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
6549         "linux-nat.h".
6550         * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
6551         * inf-ptrace.c (inf_ptrace_register_u_offset)
6552         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
6553         (inf_ptrace_store_register, inf_ptrace_store_registers)
6554         (inf_ptrace_trad_target): Move to ...
6555         * linux-nat-trad.c: ... this new file.
6556         * linux-nat-trad.h: New file.
6557         * linux-nat.c (linux_target_install_ops): Make extern.
6558         (linux_trad_target): Delete.
6559         * linux-nat.h (linux_trad_target): Delete declaration.
6560         (linux_target_install_ops): Declare.
6561         * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
6562         "linux-nat.h".
6563
6564 2018-05-02  Pedro Alves  <palves@redhat.com>
6565
6566         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
6567         procfs_target/add_target here.
6568         * procfs.c (procfs_target): Make static.
6569         (_initialize_procfs): Call add_target here.
6570         * procfs.h (struct target_ops): Remove forward declaration.
6571         (procfs_target): Remove declaration.
6572         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
6573
6574 2018-05-02  Pedro Alves  <palves@redhat.com>
6575
6576         * procfs.c (procfs_stopped_by_watchpoint)
6577         (procfs_insert_watchpoint, procfs_remove_watchpoint)
6578         (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
6579         Forward declare.
6580         (procfs_use_watchpoints): Delete, move contents...
6581         (procfs_target): ... here.
6582         * procfs.h (procfs_use_watchpoints): Delete declaration.
6583         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
6584         procfs_use_watchpoints.
6585         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
6586         procfs_use_watchpoints.
6587
6588 2018-05-02  Tom Tromey  <tom@tromey.com>
6589
6590         PR python/20084:
6591         * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
6592         and var_zuinteger_unlimited.
6593         * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
6594         and PARAM_ZUINTEGER_UNLIMITED.
6595         (set_parameter_value): Handle var_zuinteger and
6596         var_zuinteger_unlimited.
6597         (add_setshow_generic): Likewise.
6598         (parmpy_init): Likewise.
6599
6600 2018-04-28  Dan Robertson  <danlrobertson89@gmail.com>
6601
6602         PR rust/23124
6603         * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
6604         pointer is not null before dereferencing it.
6605
6606 2018-04-30  Tom Tromey  <tom@tromey.com>
6607
6608         * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
6609         is_mi_like_p.
6610
6611 2018-04-30  Tom Tromey  <tom@tromey.com>
6612
6613         * breakpoint.c (mention): Remove use of is_mi_like_p.
6614         (print_mention_ranged_breakpoint): Likewise.
6615         * break-catch-throw.c (print_it_exception_catchpoint): Remove use
6616         of is_mi_like_p.
6617
6618 2018-04-30  Tom Tromey  <tom@tromey.com>
6619
6620         * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
6621
6622 2018-04-30  Tom Tromey  <tom@tromey.com>
6623
6624         * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
6625         (info_spu_event_command): Remove some uses of is_mi_like_p.
6626
6627 2018-04-30  Tom Tromey  <tom@tromey.com>
6628
6629         * python/py-framefilter.c (py_print_single_arg)
6630         (enumerate_locals, py_print_args, py_print_frame): Remove some
6631         uses of is_mi_like_p.
6632
6633 2018-04-30  Tom Tromey  <tom@tromey.com>
6634
6635         * ui-out.c: Update.
6636         * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
6637         * ui-out.h (ui_out::is_mi_like_p): Now const.
6638         (ui_out::do_is_mi_like_p): Now const.
6639         * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
6640
6641 2018-04-30  Tom Tromey  <tom@tromey.com>
6642
6643         * varobj.c (varobj_set_visualizer): Use new_reference.
6644         * python/python.c (gdbpy_decode_line): Use new_reference.
6645         * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
6646         new_reference.
6647
6648 2018-04-30  Tom Tromey  <tom@tromey.com>
6649
6650         * varobj.c (install_new_value): Use new_reference.
6651         * value.h (value_incref): Return void.  Swap intro comment with
6652         value_decref.
6653         * value.c (set_value_parent): Use new_reference.
6654         (value_incref): Return void.  Update intro comment.
6655         (release_value): Use new_reference.
6656         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
6657
6658 2018-04-30  Tom Tromey  <tom@tromey.com>
6659
6660         * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
6661         * gdb_bfd.h (new_bfd_ref): Remove.
6662         (gdb_bfd_open): Update comment.
6663         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
6664         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
6665         (gdb_bfd_fdopenr): Use new_reference.
6666         * exec.c (exec_file_attach): Use new_reference.
6667
6668 2018-04-30  Tom Tromey  <tom@tromey.com>
6669
6670         * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
6671         method.
6672
6673 2018-04-30  Tom Tromey  <tom@tromey.com>
6674
6675         * jit.c (jit_read_code_entry): Use type_align.
6676         * i386-tdep.c (i386_gdbarch_init): Don't call
6677         set_gdbarch_long_long_align_bit.
6678         * gdbarch.sh: Remove long_long_align_bit.
6679         * gdbarch.c, gdbarch.h: Rebuild.
6680         * arc-tdep.c (arc_type_align): New function.
6681         (arc_gdbarch_init): Use arc_type_align.  Don't call
6682         set_gdbarch_long_long_align_bit.
6683
6684 2018-04-30  Tom Tromey  <tom@tromey.com>
6685
6686         * rust-lang.c (rust_type_alignment): Remove.
6687         (rust_composite_type): Use type_align.
6688
6689 2018-04-30  Tom Tromey  <tom@tromey.com>
6690
6691         * NEWS: Mention Type.align.
6692         * python/py-type.c (typy_get_alignof): New function.
6693         (type_object_getset): Add "alignof".
6694
6695 2018-04-30  Tom Tromey  <tom@tromey.com>
6696
6697         PR exp/17095:
6698         * NEWS: Update.
6699         * std-operator.def (UNOP_ALIGNOF): New operator.
6700         * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
6701         New.
6702         * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
6703         * c-lang.c (c_op_print_tab): Add alignof.
6704         * c-exp.y (ALIGNOF): New token.
6705         (exp): Add "ALIGNOF" production.
6706         (ident_tokens): Add _Alignof and alignof.
6707
6708 2018-04-30  Tom Tromey  <tom@tromey.com>
6709
6710         * i386-tdep.c (i386_type_align): New function.
6711         (i386_gdbarch_init): Update.
6712         * gdbarch.sh (type_align): New method.
6713         * gdbarch.c, gdbarch.h: Rebuild.
6714         * arch-utils.h (default_type_align): Declare.
6715         * arch-utils.c (default_type_align): New function.
6716         * gdbtypes.h (TYPE_ALIGN_BITS): New define.
6717         (struct type) <align_log2>: New field.
6718         <instance_flags>: Now a bitfield.
6719         (TYPE_RAW_ALIGN): New macro.
6720         (type_align, type_raw_align, set_type_align): Declare.
6721         * gdbtypes.c (type_align, type_raw_align, set_type_align): New
6722         functions.
6723         * dwarf2read.c (quirk_rust_enum): Set type alignment.
6724         (get_alignment, maybe_set_alignment): New functions.
6725         (read_structure_type, read_enumeration_type, read_array_type)
6726         (read_set_type, read_tag_pointer_type, read_tag_reference_type)
6727         (read_subrange_type, read_base_type): Set type alignment.
6728
6729 2018-04-30  Simon Marchi  <simon.marchi@ericsson.com>
6730
6731         * dwarf2read.c (read_index_from_section): Use bool.
6732
6733 2018-04-29  Fabian Groffen  <grobian@gentoo.org>
6734
6735         PR gdb/22950
6736         * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
6737         with #ifdef.
6738
6739 2018-04-29  John Reiser  <jreiser@BitWagon.com>
6740
6741         PR build/22873
6742         * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
6743         last step, and do it atomically.
6744
6745 2018-04-27  Alexandre Oliva  <aoliva@redhat.com>
6746
6747         * compile/compile-c-types.c (convert_int, convert_float):
6748         Update for C FE v1.
6749
6750 2018-04-27  Tom Tromey  <tom@tromey.com>
6751
6752         PR rust/22545:
6753         * rust-lang.c (rust_inclusive_range_type_p): New function.
6754         (rust_range): Handle inclusive ranges.
6755         (rust_compute_range): Likewise.
6756         * rust-exp.y (struct rust_op) <inclusive>: New field.
6757         (DOTDOTEQ): New constant.
6758         (range_expr): Add "..=" productions.
6759         (operator_tokens): Add "..=" token.
6760         (ast_range): Add "inclusive" parameter.
6761         (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
6762         ranges.
6763         * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
6764         bounds values.
6765         * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
6766         LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
6767         Update comments.
6768         * expprint.c (print_subexp_standard): Handle new bounds values.
6769         (dump_subexp_body_standard): Likewise.
6770
6771 2018-04-27  Tom Tromey  <tom@tromey.com>
6772
6773         * configure: Rebuild.
6774         * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
6775         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
6776         "OVERRIDE".
6777         (class symbol_needs_eval_context): Likewise.
6778         * dwarf2read.c (mock_mapped_index::symbol_name_count)
6779         (mock_mapped_index::symbol_name_at): Use "override".  Remove
6780         "virtual".
6781         * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
6782         "override".
6783         (class dwarf_expr_executor): Use "override", not "OVERRIDE".
6784         * aarch64-tdep.c (instruction_reader::read): Use "override".
6785         (instruction_reader_test::read): Likewise.
6786         * arm-tdep.c (instruction_reader::read): Use "override".
6787         (instruction_reader_thumb::read): Likewise.
6788
6789 2018-04-26  Andrzej Kaczmarek  <andrzej.kaczmarek@codecoup.pl>
6790
6791         PR remote/9665
6792         * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
6793         instead of remote_send.
6794         (remote_send): Remove.
6795
6796 2018-04-26  Pedro Alves  <palves@redhat.com>
6797
6798         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
6799         find_function_start_sal instead of find_pc_line.
6800
6801 2018-04-26  Pedro Alves  <palves@redhat.com>
6802
6803         * breakpoint.c (set_breakpoint_location_function): Handle
6804         mst_data_gnu_ifunc.
6805         * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
6806         * elfread.c (elf_symtab_read): Give data symbols with
6807         BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
6808         (elf_rel_plt_read): Update comment.
6809         * linespec.c (convert_linespec_to_sals): Handle
6810         mst_data_gnu_ifunc.
6811         (minsym_found): Handle mst_data_gnu_ifunc.
6812         * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
6813         (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
6814         * parse.c (find_minsym_type_and_address): Handle
6815         mst_data_gnu_ifunc.
6816         * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
6817         * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
6818         * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
6819         comment.
6820         <mst_data_gnu_ifunc>: New enumerator.
6821
6822 2018-04-26  Pedro Alves  <palves@redhat.com>
6823
6824         * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
6825         (lookup_minimal_symbol_by_pc_section): ... this.  Replace
6826         'want_trampoline' parameter by a lookup_msym_prefer parameter.
6827         Handle it.
6828         (lookup_minimal_symbol_by_pc_section): Delete old implementation.
6829         (lookup_minimal_symbol_by_pc): Adjust.
6830         (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
6831         (lookup_solib_trampoline_symbol_by_pc): Adjust.
6832         * minsyms.h (lookup_msym_prefer): New enum.
6833         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
6834         parameter by a lookup_msym_prefer parameter.
6835
6836 2018-04-26  Pedro Alves  <palves@redhat.com>
6837
6838         * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
6839         ends in "@plt" instead of looking at the symbol's section.
6840
6841 2018-04-26  Pedro Alves  <palves@redhat.com>
6842
6843         * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete.  Remove
6844         all references.
6845         (find_pc_partial_function_gnu_ifunc): Rename to ...
6846         (find_pc_partial_function): ... this, and remove references to
6847         'is_gnu_ifunc_p'.
6848         (find_pc_partial_function): Delete old implementation.
6849         * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
6850
6851 2018-04-26  Pedro Alves  <palves@redhat.com>
6852
6853         * linespec.c (struct bound_minimal_symbol_search_key): New.
6854         (convert_linespec_to_sals): Sort minimal symbols earlier.  Don't
6855         skip first line if we found a GNU ifunc minimal symbol by name.
6856         (compare_msymbols): Change parameters to work with a destructured
6857         lhs minsym.
6858         (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
6859         functions.
6860
6861 2018-04-26  Pedro Alves  <palves@redhat.com>
6862
6863         * breakpoint.c (set_breakpoint_location_function): Don't resolve
6864         ifunc targets here.  Instead, if we have an ifunc minsym, use its
6865         address/name.
6866         (add_location_to_breakpoint): Store the minsym and the objfile in
6867         the breakpoint location.
6868         * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
6869         * linespec.c (minsym_found): Resolve GNU ifunc targets here.
6870         Record the minsym in the sal.
6871         * symtab.h (symtab_and_line) <msymbol>: New field.
6872
6873 2018-04-26  Pedro Alves  <palves@redhat.com>
6874
6875         * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
6876         unless we actually resolved the ifunc.
6877
6878 2018-04-26  Pedro Alves  <palves@redhat.com>
6879
6880         * c-exp.y (variable production): Prefer ifunc minsyms over
6881         regular function symbols.
6882         * symtab.c (find_gnu_ifunc): New function.
6883         * minsyms.h (lookup_msym_prefer): New enum.
6884         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
6885         parameter by a lookup_msym_prefer parameter.
6886         * symtab.h (find_gnu_ifunc): New declaration.
6887
6888 2018-04-26  Pedro Alves  <palves@redhat.com>
6889
6890         * blockframe.c (find_gnu_ifunc_target_type): New function.
6891         (find_function_type): New.
6892         * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
6893         return a value with a memory address.
6894         (eval_call): For calls to GNU ifunc functions, try to find the
6895         type of the target function from the type that the resolver
6896         returns.
6897         * gdbtypes.c (objfile_type): Don't install a return type for ifunc
6898         symbols.
6899         * infcall.c (find_function_return_type): Delete.
6900         (find_function_addr): Add 'function_type' parameter.  For calls to
6901         GNU ifunc functions, try to find the type of the target function
6902         from the type that the resolver returns, and return it via
6903         FUNCTION_TYPE.
6904         (call_function_by_hand_dummy): Adjust to use the function type
6905         returned by find_function_addr.
6906         (find_function_addr): Add 'function_type' parameter and move
6907         description here.
6908         * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
6909         declarations.
6910
6911 2018-04-26  Pedro Alves  <palves@redhat.com>
6912
6913         * c-exp.y (variable production): Skip finding an alias for ifunc
6914         symbols.
6915
6916 2018-04-26  Pedro Alves  <palves@redhat.com>
6917
6918         * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
6919
6920 2018-04-25  Pedro Alves  <palves@redhat.com>
6921
6922         * infcmd.c (kill_command): Print the pid as string, not the whole
6923         thread's ptid.  Add comment.  s/has been killed/killed/ in output
6924         message.
6925         * remote.c (remote_detach_1): Print the pid as string, not the
6926         whole thread's ptid.
6927
6928 2018-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
6929             Sergio Durigan Junior  <sergiodj@redhat.com>
6930             Pedro Alves  <palves@redhat.com>
6931
6932         * infcmd.c (kill_command): Print message when inferior has
6933         been killed.
6934         * inferior.c (print_inferior_events): Remove 'static'.  Set as
6935         '1'.
6936         (add_inferior): Improve message printed when
6937         'print_inferior_events' is on.
6938         (exit_inferior): Remove message printed when
6939         'print_inferior_events' is on.
6940         (detach_inferior): Improve message printed when
6941         'print_inferior_events' is on.
6942         (initialize_inferiors): Use 'add_inferior_silent' to set
6943         'current_inferior_'.
6944         * inferior.h (print_inferior_events): Declare here as
6945         'extern'.
6946         * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
6947         '[Detaching...]' messages when 'print_inferior_events' is on.
6948         Use 'add_thread_silent' instead of 'add_thread'.  Add '[' and ']'
6949         as prefix/suffix for messages.  Remove periods.  Fix erroneous
6950         'Detaching after fork from child...', replace it by '... from
6951         parent...'.
6952         (handle_vfork_child_exec_or_exit): Add '[' and ']' as
6953         prefix/suffix when printing 'Detaching...' messages.  Print
6954         them when 'print_inferior_events' is on.
6955         * remote.c (remote_detach_1): Print message when detaching
6956         from inferior and '!is_fork_parent'.
6957
6958 2018-04-24  Tom Tromey  <tom@tromey.com>
6959
6960         * cli-out.h: Reindent.
6961
6962 2018-04-24  Tom Tromey  <tom@tromey.com>
6963
6964         * cli-out.c (cli_ui_out::out_field_fmt): Remove.
6965         (cli_ui_out::do_field_string): Use fputs_filtered.
6966         * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
6967
6968 2018-04-23  Tom Tromey  <tom@tromey.com>
6969
6970         * guile/scm-frame.c (gdbscm_frame_read_var): Use
6971         gdb::unique_xmalloc_ptr.
6972
6973 2018-04-23  Tom Tromey  <tom@tromey.com>
6974
6975         * configure: Rebuild.
6976
6977 2018-04-22  Rajendra SY  <rajendra.sy@gmail.com>
6978
6979         PR gdb/23095
6980         * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
6981         prepare_for_testing.  Set normal_bp to r_debug_state if target
6982         is bsd.
6983
6984 2018-04-21  Pedro Alves  <palves@redhat.com>
6985             Rajendra SY  <rajendra.sy@gmail.com>
6986
6987         * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
6988         * remote.c (extended_remote_attach): In all-stop mode, mark the
6989         thread as executing.
6990
6991 2018-04-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6992
6993         * thread.c (thread_apply_all_command): Fix comment.
6994         (thread_command): Fix comment.
6995
6996 2018-04-10  Alan Hayward  <alan.hayward@arm.com>
6997
6998         * common/tdesc.h (tdesc_create_feature): Remove xml filename
6999         parameter.
7000         * features/aarch64-core.c (create_feature_aarch64_core):
7001         Regenerate.
7002         * features/aarch64-fpu.c (create_feature_aarch64_fpu):
7003         Likewise.
7004         * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
7005         Likewise.
7006         * features/i386/32bit-avx512.c
7007         (create_feature_i386_32bit_avx512): Likewise.
7008         * features/i386/32bit-core.c (create_feature_i386_32bit_core):
7009         Likewise.
7010         * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
7011         Likewise.
7012         * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
7013         Likewise.
7014         * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
7015         Likewise.
7016         * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
7017         Likewise.
7018         * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
7019         Likewise.
7020         * features/i386/64bit-avx512.c
7021         (create_feature_i386_64bit_avx512): Likewise.
7022         * features/i386/64bit-core.c (create_feature_i386_64bit_core):
7023         Likewise.
7024         * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
7025         Likewise.
7026         * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
7027         Likewise.
7028         * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
7029         Likewise.
7030         * features/i386/64bit-segments.c
7031         (create_feature_i386_64bit_segments): Likewise.
7032         * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
7033         Likewise.
7034         * features/i386/x32-core.c
7035         (create_feature_i386_x32_core): Likewise.
7036         * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
7037         * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
7038         * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
7039         * target-descriptions.c: In generated code, don't pass xml
7040         filename.
7041
7042 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
7043
7044         * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
7045         (print_xml_feature::visit_post): Likewise.
7046         (print_xml_feature::visit): Likewise.
7047         * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
7048         (print_xml_feature): Add new class.
7049         * regformats/regdat.sh: Null xmltarget on feature targets.
7050         * target-descriptions.c (struct target_desc): Add xmltarget.
7051         (maintenance_check_tdesc_xml_convert): Add unittest function.
7052         (tdesc_get_features_xml): Add function to get xml.
7053         (maintenance_check_xml_descriptions): Test xml generation.
7054         * xml-tdesc.c (string_read_description_xml): Add function.
7055         * xml-tdesc.h (string_read_description_xml): Add declaration.
7056
7057 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
7058
7059         * features/Makefile: Add feature marker to targets with new style
7060         target descriptions.
7061         * regformats/aarch64.dat: Regenerate.
7062         * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
7063         * regformats/i386/amd64-avx-linux.dat: Likewise.
7064         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
7065         * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
7066         * regformats/i386/amd64-linux.dat: Likewise.
7067         * regformats/i386/amd64-mpx-linux.dat: Likewise.
7068         * regformats/i386/amd64.dat: Likewise.
7069         * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
7070         * regformats/i386/i386-avx-linux.dat: Likewise.
7071         * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
7072         * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
7073         * regformats/i386/i386-linux.dat: Likewise.
7074         * regformats/i386/i386-mmx-linux.dat: Likewise.
7075         * regformats/i386/i386-mpx-linux.dat: Likewise.
7076         * regformats/i386/i386.dat: Likewise.
7077         * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
7078         * regformats/i386/x32-avx-linux.dat: Likewise.
7079         * regformats/i386/x32-linux.dat: Likewise.
7080         * regformats/tic6x-c62x-linux.dat: Likewise.
7081         * regformats/tic6x-c64x-linux.dat: Likewise.
7082         * regformats/tic6x-c64xp-linux.dat: Likewise.
7083         * regformats/regdat.sh: Parse feature marker.
7084
7085 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
7086
7087         * common/tdesc.h (tdesc_architecture_name): Add new declaration.
7088         (tdesc_osabi_name): Likewise.
7089         * target-descriptions.c (tdesc_architecture_name): Add new
7090         function.
7091         (tdesc_osabi_name): Likewise.
7092
7093 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
7094
7095         * common/tdesc.c (tdesc_predefined_type): Move to here.
7096         (tdesc_named_type): Likewise.
7097         (tdesc_create_vector): Likewise.
7098         (tdesc_create_struct): Likewise.
7099         (tdesc_set_struct_size): Likewise.
7100         (tdesc_create_union): Likewise.
7101         (tdesc_create_flags): Likewise.
7102         (tdesc_create_enum): Likewise.
7103         (tdesc_add_field): Likewise.
7104         (tdesc_add_typed_bitfield): Likewise.
7105         (tdesc_add_bitfield): Likewise.
7106         (tdesc_add_flag): Likewise.
7107         (tdesc_add_enum_value): Likewise.
7108         * common/tdesc.h (struct tdesc_type_builtin): Likewise.
7109         (struct tdesc_type_vector): Likewise.
7110         (struct tdesc_type_field): Likewise.
7111         (struct tdesc_type_with_fields): Likewise.
7112         (tdesc_create_enum): Add declaration.
7113         (tdesc_add_typed_bitfield): Likewise.
7114         (tdesc_add_enum_value): Likewise.
7115         * target-descriptions.c (tdesc_type_field): Move from here.
7116         (tdesc_type_builtin): Likewise.
7117         (tdesc_type_vector): Likewise.
7118         (tdesc_type_with_fields): Likewise.
7119         (tdesc_predefined_types): Likewise.
7120         (tdesc_named_type): Likewise.
7121         (tdesc_create_vector): Likewise.
7122         (tdesc_create_struct): Likewise.
7123         (tdesc_set_struct_size): Likewise.
7124         (tdesc_create_union): Likewise.
7125         (tdesc_create_flags): Likewise.
7126         (tdesc_create_enum): Likewise.
7127         (tdesc_add_field): Likewise.
7128         (tdesc_add_typed_bitfield): Likewise.
7129         (tdesc_add_bitfield): Likewise.
7130         (tdesc_add_flag): Likewise.
7131         (tdesc_add_enum_value): Likewise.
7132         * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
7133         (tdesc_add_typed_bitfield): Likewise.
7134         (tdesc_add_enum_value): Likewise.
7135
7136 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
7137
7138         * common/tdesc.c (tdesc_feature::accept): Move to here.
7139         (tdesc_feature::operator==): Likewise.
7140         (tdesc_create_reg): Likewise.
7141         * common/tdesc.h (tdesc_type_kind): Likewise.
7142         (struct tdesc_type): Likewise.
7143         (struct tdesc_feature): Likewise.
7144         * regformats/regdat.sh: Create a feature.
7145         * target-descriptions.c (tdesc_type_kind): Move from here.
7146         (tdesc_type): Likewise.
7147         (tdesc_type_up): Likewise.
7148         (tdesc_feature): Likewise.
7149         (tdesc_create_reg): Likewise.
7150
7151 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
7152
7153         * Makefile.in: Add arch/tdesc.c
7154         * common/tdesc.c: New file.
7155         * common/tdesc.h (tdesc_element_visitor): Move to here.
7156         (tdesc_element): Likewise.
7157         (tdesc_reg): Likewise.
7158         (tdesc_reg_up): Likewise.
7159         * regformats/regdef.h (reg): Add offset to constructors.
7160         * target-descriptions.c (tdesc_element_visitor): Move from here.
7161         (tdesc_element): Likewise.
7162         (tdesc_reg): Likewise.
7163         (tdesc_reg_up): Likewise.
7164
7165 2018-04-17  Tom Tromey  <tom@tromey.com>
7166
7167         * dwarf2read.c (quirk_rust_enum): Conditionally drop the
7168         discriminant field.
7169
7170 2018-04-17  Tom Tromey  <tom@tromey.com>
7171
7172         * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
7173
7174 2018-04-17  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7175
7176         * symtab.c (print_symbol_info): Skip printing filename and line
7177         number when `last' is NULL.
7178         (symtab_symbol_info): Use empty string instead of NULL for first
7179         invocation of print_symbol_info.
7180         (rbreak_command): Pass NULL to `last' parameter of
7181         print_symbol_info.
7182
7183 2018-04-16  Simon Marchi  <simon.marchi@ericsson.com>
7184
7185         * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
7186         instead of nullptr.
7187
7188 2018-04-16  Pedro Alves  <palves@redhat.com>
7189
7190         * MAINTAINERS (sh): Remove.
7191         * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
7192         (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
7193         (ALLDEPFILES): Remove sh64-tdep.c.
7194         * NEWS: Mentions that support for SH-5/SH64 is removed.
7195         * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
7196         (sh*-*-openbsd*): Ditto.
7197         (sh64-*-elf*): Remove.
7198         (sh*): Remove.
7199         * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
7200         * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
7201         * sh-tdep.c: No longer include "sh64-tdep.h".
7202         (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
7203         * sh64-tdep.c, sh64-tdep.h: Remove files.
7204
7205 2018-04-16  Pedro Alves  <palves@redhat.com>
7206
7207         * MAINTAINERS: Remove m88k.
7208         * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
7209         (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
7210         (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
7211         * NEWS: Mention that support for m88k was removed.
7212         * configure.host (m88*-*-*): Remove support.
7213         * configure.nat (m88k-*-*): Remove support.
7214         * configure.tgt (m88*-*-openbsd*): Remove.
7215         * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
7216
7217 2018-04-15  Simon Marchi  <simon.marchi@polymtl.ca>
7218
7219         * configure.tgt (x86_tobjs): New variable.
7220         (amd64_tobjs, i386_tobjs): Use it.
7221
7222 2018-04-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7223
7224         * symtab.c (print_symbol_info): Precede the symbol definition by
7225         the line number when available.
7226         * NEWS: Advertise this enhancement.
7227
7228 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
7229
7230         * NEWS (New options): announce set/show record btrace cpu.
7231         * btrace.c: Include record-btrace.h.
7232         (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
7233         the vendor is unknown.
7234         (btrace_compute_ftrace_1): Add cpu parameter.  Update callers.
7235         Maybe overwrite the btrace configuration's cpu.
7236         (btrace_compute_ftrace): Add cpu parameter.  Update callers.
7237         (btrace_fetch): Add cpu parameter.  Update callers.
7238         (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
7239         Maybe overwrite the btrace configuration's cpu.  Skip enabling
7240         errata workarounds if the vendor is unknown.
7241         * python/py-record-btrace.c: Include record-btrace.h.
7242         (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
7243         (recpy_bt_function_call_history): Call record_btrace_get_cpu.
7244         * record-btrace.c (record_btrace_cpu_state_kind): New.
7245         (record_btrace_cpu): New.
7246         (set_record_btrace_cpu_cmdlist): New.
7247         (record_btrace_get_cpu): New.
7248         (require_btrace_thread, record_btrace_info)
7249         (record_btrace_resume_thread): Call record_btrace_get_cpu.
7250         (cmd_set_record_btrace_cpu_none): New.
7251         (cmd_set_record_btrace_cpu_auto): New.
7252         (cmd_set_record_btrace_cpu): New.
7253         (cmd_show_record_btrace_cpu): New.
7254         (_initialize_record_btrace): Initialize set/show record btrace cpu
7255         commands.
7256         * record-btrace.h (record_btrace_get_cpu): New.
7257
7258 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
7259
7260         * record.c (set_record_command): Fix typo in message.
7261
7262 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
7263
7264         * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
7265
7266 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
7267
7268         * infrun.c (process_event_stop_test): Call
7269         gdbarch_in_indirect_branch_thunk.
7270         * gdbarch.sh (in_indirect_branch_thunk): New.
7271         * gdbarch.c: Regenerated.
7272         * gdbarch.h: Regenerated.
7273         * x86-tdep.h: New.
7274         * x86-tdep.c: New.
7275         * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
7276         (HFILES_NO_SRCDIR): Add x86-tdep.h.
7277         (ALLDEPFILES): Add x86-tdep.c.
7278         * arch-utils.h (default_in_indirect_branch_thunk): New.
7279         * arch-utils.c (default_in_indirect_branch_thunk): New.
7280         * i386-tdep: Include x86-tdep.h.
7281         (i386_in_indirect_branch_thunk): New.
7282         (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
7283         function.
7284         * amd64-tdep: Include x86-tdep.h.
7285         (amd64_in_indirect_branch_thunk): New.
7286         (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
7287
7288 2018-04-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
7289
7290         PR gdb/23053
7291         * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
7292         (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
7293         (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
7294         regression.
7295
7296 2018-04-12  Tom Tromey  <tom@tromey.com>
7297
7298         * rust-lang.c (rust_print_struct_def): Remove univariant code.
7299         (rust_evaluate_subexp): Likewise.
7300
7301 2018-04-12  Pedro Alves  <palves@redhat.com>
7302
7303         * procfs.c (procfs_detach): Make forward declaration's prototype
7304         match definition's protototype.
7305         (proc_get_LDT_entry): Remove stale do_cleanups call.
7306
7307 2018-04-12  Pedro Alves  <palves@redhat.com>
7308
7309         * target.h (target_ops::to_has_exited): Delete.
7310         (target_has_exited): Delete.
7311         * target-delegates.c: Regenerate.
7312
7313 2018-04-11  Pedro Alves  <palves@redhat.com>
7314
7315         * target.c (fileio_fh_t::t): Add comment.
7316         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
7317         (target_fileio_close): Handle a NULL target.
7318         (invalidate_fileio_fh): New.
7319         (target_close): Call it.
7320         * remote.c (remote_hostio_send_command): No longer check whether
7321         remote_desc is open.
7322
7323 2018-04-11  Pedro Alves  <palves@redhat.com>
7324
7325         * target.c (fileio_fh_t): Make it a named struct instead of a
7326         typedef.
7327         (fileio_fh_t::is_closed): New method.
7328         (DEF_VEC_O (fileio_fh_t)): Remove.
7329         (fileio_fhandles): Now a std::vector.
7330         (is_closed_fileio_fh): Delete.
7331         (acquire_fileio_fd): Adjust.  Rename parameters.
7332         (release_fileio_fd): Adjust.
7333         (fileio_fd_to_fh): Reimplement as a function instead of a macro.
7334         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
7335         (target_fileio_close): Adjust.
7336
7337 2018-04-10  Simon Marchi  <simon.marchi@ericsson.com>
7338
7339         * auto-load.c (auto_load_safe_path_vec_update): Iterate by
7340         index.
7341
7342 2018-04-10  Pedro Alves  <palves@redhat.com>
7343
7344         * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
7345         (scoped_finish_thread_state): New class.
7346         * infcmd.c (run_command_1): Use it instead of finish_thread_state
7347         cleanup.
7348         * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
7349         (fetch_inferior_event, normal_stop): Likewise.
7350         * thread.c (finish_thread_state_cleanup): Delete.
7351
7352 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
7353             Pedro Alves  <palves@redhat.com>
7354
7355         * value.c: Include "selftest.h" and "common/array-view.h".
7356         (struct range) <operator ==>: New.
7357         (test_ranges_contain): New.
7358         (check_ranges_vector): New.
7359         (test_insert_into_bit_range_vector): New.
7360         (_initialize_values): Register selftests.
7361         * common/array-view.h (operator==, operator!=): New.
7362
7363 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
7364
7365         * common/gdb_vecs.h (unordered_remove): Add overload that takes
7366         an iterator.
7367         * inline-frame.c: Include <algorithm>.
7368         (struct inline_state): Add constructor.
7369         (inline_state_s): Remove.
7370         (DEF_VEC_O(inline_state_s)): Remove.
7371         (inline_states): Change type to std::vector.
7372         (find_inline_frame_state): Adjust to std::vector.
7373         (allocate_inline_frame_state): Remove.
7374         (clear_inline_frame_state): Adjust to std::vector.
7375         (skip_inline_frames): Adjust to std::vector.
7376
7377 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
7378
7379         * tracepoint.h (struct trace_state_variable): Add constructor.
7380         <name>: Change type to std::string.
7381         * tracepoint.c (tsv_s): Remove.
7382         (DEF_VEC_O(tsv_s)): Remove.
7383         (tvariables): Change to std::vector.
7384         (create_trace_state_variable): Adjust to std::vector.
7385         (find_trace_state_variable): Likewise.
7386         (find_trace_state_variable_by_number): Likewise.
7387         (delete_trace_state_variable): Likewise.
7388         (trace_variable_command): Adjust to std::string.
7389         (delete_trace_variable_command): Likewise.
7390         (tvariables_info_1): Adjust to std::vector.
7391         (save_trace_state_variables): Likewise.
7392         (start_tracing): Likewise.
7393         (merge_uploaded_trace_state_variables): Adjust to std::vector
7394         and std::string.
7395         * target.h (struct target_ops)
7396         <to_download_trace_state_variable>: Pass reference to
7397         trace_state_variable.
7398         * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
7399         * target-delegates.c: Re-generate.
7400         * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
7401         (mi_tsv_deleted): Likewise.
7402         * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
7403         * remote.c (remote_download_trace_state_variable): Change
7404         pointer to reference and adjust.
7405         * make-target-delegates (parse_argtypes): Handle references.
7406         (write_function_header): Likewise.
7407         (munge_type): Likewise.
7408
7409 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
7410
7411         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7412         string_view-selftests.c.
7413         * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
7414         testsuite.
7415         * unittests/basic_string_view/cons/char/1.cc: Likewise.
7416         * unittests/basic_string_view/cons/char/2.cc: Likewise.
7417         * unittests/basic_string_view/cons/char/3.cc: Likewise.
7418         * unittests/basic_string_view/element_access/char/1.cc:
7419         Likewise.
7420         * unittests/basic_string_view/element_access/char/empty.cc:
7421         Likewise.
7422         * unittests/basic_string_view/element_access/char/front_back.cc:
7423         Likewise.
7424         * unittests/basic_string_view/inserters/char/2.cc: Likewise.
7425         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
7426         Likewise.
7427         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
7428         Likewise.
7429         * unittests/basic_string_view/modifiers/swap/char/1.cc:
7430         Likewise.
7431         * unittests/basic_string_view/operations/compare/char/1.cc:
7432         Likewise.
7433         * unittests/basic_string_view/operations/compare/char/13650.cc:
7434         Likewise.
7435         * unittests/basic_string_view/operations/copy/char/1.cc:
7436         Likewise.
7437         * unittests/basic_string_view/operations/data/char/1.cc:
7438         Likewise.
7439         * unittests/basic_string_view/operations/find/char/1.cc:
7440         Likewise.
7441         * unittests/basic_string_view/operations/find/char/2.cc:
7442         Likewise.
7443         * unittests/basic_string_view/operations/find/char/3.cc:
7444         Likewise.
7445         * unittests/basic_string_view/operations/find/char/4.cc:
7446         Likewise.
7447         * unittests/basic_string_view/operations/rfind/char/1.cc:
7448         Likewise.
7449         * unittests/basic_string_view/operations/rfind/char/2.cc:
7450         Likewise.
7451         * unittests/basic_string_view/operations/rfind/char/3.cc:
7452         Likewise.
7453         * unittests/basic_string_view/operations/substr/char/1.cc:
7454         Likewise.
7455         * unittests/basic_string_view/operators/char/2.cc: Likewise.
7456         * unittests/string_view-selftests.c: New file.
7457
7458 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
7459
7460         * unittests/basic_string_view/capacity/1.cc: New file.
7461         * unittests/basic_string_view/capacity/empty_neg.cc: New file.
7462         * unittests/basic_string_view/cons/char/1.cc: New file.
7463         * unittests/basic_string_view/cons/char/2.cc: New file.
7464         * unittests/basic_string_view/cons/char/3.cc: New file.
7465         * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
7466         * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
7467         * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
7468         * unittests/basic_string_view/element_access/char/1.cc: New file.
7469         * unittests/basic_string_view/element_access/char/2.cc: New file.
7470         * unittests/basic_string_view/element_access/char/empty.cc: New file.
7471         * unittests/basic_string_view/element_access/char/front_back.cc: New file.
7472         * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
7473         * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
7474         * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
7475         * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
7476         * unittests/basic_string_view/include.cc: New file.
7477         * unittests/basic_string_view/inserters/char/1.cc: New file.
7478         * unittests/basic_string_view/inserters/char/2.cc: New file.
7479         * unittests/basic_string_view/inserters/char/3.cc: New file.
7480         * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
7481         * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
7482         * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
7483         * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
7484         * unittests/basic_string_view/literals/types.cc: New file.
7485         * unittests/basic_string_view/literals/values.cc: New file.
7486         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
7487         * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
7488         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
7489         * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
7490         * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
7491         * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
7492         * unittests/basic_string_view/operations/compare/char/1.cc: New file.
7493         * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
7494         * unittests/basic_string_view/operations/compare/char/2.cc: New file.
7495         * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
7496         * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
7497         * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
7498         * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
7499         * unittests/basic_string_view/operations/copy/char/1.cc: New file.
7500         * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
7501         * unittests/basic_string_view/operations/data/char/1.cc: New file.
7502         * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
7503         * unittests/basic_string_view/operations/find/char/1.cc: New file.
7504         * unittests/basic_string_view/operations/find/char/2.cc: New file.
7505         * unittests/basic_string_view/operations/find/char/3.cc: New file.
7506         * unittests/basic_string_view/operations/find/char/4.cc: New file.
7507         * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
7508         * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
7509         * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
7510         * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
7511         * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
7512         * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
7513         * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
7514         * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
7515         * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
7516         * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
7517         * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
7518         * unittests/basic_string_view/operations/substr/char/1.cc: New file.
7519         * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
7520         * unittests/basic_string_view/operators/char/2.cc: New file.
7521         * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
7522         * unittests/basic_string_view/range_access/char/1.cc: New file.
7523         * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
7524         * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
7525         * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
7526         * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
7527         * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
7528         * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
7529         * unittests/basic_string_view/requirements/typedefs.cc: New file.
7530         * unittests/basic_string_view/typedefs.cc: New file.
7531         * unittests/basic_string_view/types/1.cc: New file.
7532
7533 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
7534
7535         * common/gdb_string_view.h: Remove libstdc++ implementation
7536         details, adjust to gdb reality.
7537         * common/gdb_string_view.tcc: Likewise.
7538         * cli/cli-script.c (struct string_view): Remove.
7539         (user_args) <m_args>: Change element type to gdb::string_view.
7540         (user_args::insert_args): Adjust.
7541
7542 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
7543
7544         * common/gdb_string_view.h: New file.
7545         * common/gdb_string_view.tcc: New file.
7546
7547 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
7548
7549         * ax_cxx_compile_stdcxx.m4: Sync with upstream.
7550         * configure: Re-generate.
7551
7552 2018-04-09  Pedro Alves  <palves@redhat.com>
7553
7554         * gdbarch.sh: Include "observable.h" instead of "observer.h".
7555         (set_target_gdbarch): Call
7556         gdb::observers::architecture_changed.notify instead of
7557         observer_notify_architecture_changed.
7558
7559 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
7560
7561         * tracepoint.c (struct current_traceframe_cleanup): Remove.
7562         (do_restore_current_traceframe_cleanup): Remove.
7563         (restore_current_traceframe_cleanup_dtor): Remove.
7564         (make_cleanup_restore_current_traceframe): Remove.
7565         (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
7566         New.
7567         * tracepoint.h (struct scoped_restore_current_traceframe): New.
7568         * infrun.c (fetch_inferior_event): Use
7569         scoped_restore_current_traceframe.
7570
7571 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
7572
7573         * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
7574         Remove.
7575         <n_allocated_type_units>: Remove.
7576         <all_type_units>: Change to std::vector.
7577         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
7578         to std::vector change.
7579         (dwarf2_per_objfile::get_cutu): Likewise.
7580         (dwarf2_per_objfile::get_tu): Likewise.
7581         (create_signatured_type_table_from_index): Likewise.
7582         (create_signatured_type_table_from_debug_names): Likewise.
7583         (dw2_symtab_iter_next): Likewise.
7584         (dw2_print_stats): Likewise.
7585         (dw2_expand_all_symtabs): Likewise.
7586         (dw2_expand_marked_cus): Likewise.
7587         (dw2_debug_names_iterator::next): Likewise.
7588         (dwarf2_initialize_objfile): Likewise.
7589         (add_signatured_type_cu_to_table): Likewise.
7590         (create_all_type_units): Likewise.
7591         (add_type_unit): Likewise.
7592         (struct tu_abbrev_offset): Add constructor.
7593         (build_type_psymtabs_1): Adjust to std::vector change.
7594         (print_tu_stats): Likewise.
7595         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
7596         (write_debug_names): Likewise.
7597
7598 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
7599
7600         * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
7601         Make an std::vector.
7602         <n_comp_units>: Remove.
7603         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
7604         to std::vector change.
7605         (dwarf2_per_objfile::get_cutu): Likewise.
7606         (dwarf2_per_objfile::get_cu): Likewise.
7607         (create_cus_from_index): Likewise.
7608         (create_addrmap_from_index): Likewise.
7609         (create_addrmap_from_aranges): Likewise.
7610         (dwarf2_read_index): Likewise.
7611         (dw2_find_last_source_symtab): Likewise.
7612         (dw2_map_symtabs_matching_filename): Likewise.
7613         (dw2_symtab_iter_next): Likewise.
7614         (dw2_print_stats): Likewise.
7615         (dw2_expand_all_symtabs): Likewise.
7616         (dw2_expand_symtabs_with_fullname): Likewise.
7617         (dw2_expand_marked_cus): Likewise.
7618         (dw2_map_symbol_filenames): Likewise.
7619         (create_cus_from_debug_names): Likewise.
7620         (dwarf2_read_debug_names): Likewise.
7621         (dw2_debug_names_iterator::next): Likewise.
7622         (dwarf2_initialize_objfile): Likewise.
7623         (set_partial_user): Likewise.
7624         (dwarf2_build_psymtabs_hard): Likewise.
7625         (read_comp_units_from_section): Remove arguments, adjust to
7626         std::vector change.
7627         (create_all_comp_units): Adjust to std::vector and
7628         read_comp_units_from_section changes.
7629         (dwarf2_find_containing_comp_unit): Adjust to std::vector
7630         change.
7631         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
7632         (psyms_seen_size): Likewise.
7633         (write_gdbindex): Likewise.
7634         (write_debug_names): Likewise.
7635
7636 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
7637
7638         * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
7639         with dwarf2_per_objfile.
7640         (create_cus_from_index): Likewise.
7641         (create_signatured_type_table_from_index): Likewise.
7642         (dwarf2_read_index): Likewise.
7643         (dwarf2_initialize_objfile): Likewise.
7644         (dwarf2_fetch_die_loc_sect_off):  Get dwarf2_per_objfile from
7645         per_cu rather than get_dwarf2_per_objfile.
7646
7647 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
7648
7649         * dwarf2read.h (struct signatured_type): Forward declare.
7650         (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
7651         New methods.
7652         * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
7653         (dw2_get_cutu): ...this.
7654         (dwarf2_per_objfile::get_cu): Rename from...
7655         (dw2_get_cu): ...this.
7656         (dwarf2_per_objfile::get_tu): New.
7657         (create_addrmap_from_index): Adjust.
7658         (create_addrmap_from_aranges): Adjust.
7659         (dw2_find_last_source_symtab): Adjust.
7660         (dw2_map_symtabs_matching_filename): Adjust.
7661         (dw2_symtab_iter_next): Adjust.
7662         (dw2_print_stats): Adjust.
7663         (dw2_expand_all_symtabs): Adjust.
7664         (dw2_expand_symtabs_with_fullname): Adjust.
7665         (dw2_expand_marked_cus): Adjust.
7666         (dw_expand_symtabs_matching_file_matcher): Adjust.
7667         (dw2_map_symbol_filenames): Adjust.
7668         (dw2_debug_names_iterator::next): Adjust.
7669         (dwarf2_initialize_objfile): Adjust.
7670         (set_partial_user): Adjust.
7671         (dwarf2_build_psymtabs_hard): Adjust.
7672
7673 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
7674
7675         * dwarf2read.c (create_signatured_type_table_from_debug_names):
7676         Remove unused variables.
7677         (dw2_map_symtabs_matching_filename): Likewise.
7678         (dwarf2_record_block_ranges): Likewise.
7679         (dwarf2_read_addr_index): Likewise.
7680         (follow_die_offset): Likewise.
7681
7682 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
7683
7684         * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
7685         to symbol_file_add_main.
7686
7687 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
7688
7689         PR mi/22299
7690         * mi/mi-console.c (do_fputc_async_safe): New.
7691         (mi_console_file::write_async_safe): New.
7692         (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
7693         * mi/mi-console.h (class mi_console_file) <write_async_safe>:
7694         New.
7695         * ui-file.c (ui_file::putstrn): Adjust call to
7696         fputstrn_unfiltered.
7697         * utils.c (printchar): Replace do_fputs and do_fprintf
7698         parameters by do_fputc.
7699         (fputstr_filtered): Adjust call to printchar.
7700         (fputstr_unfiltered): Likewise.
7701         (fputstrn_filtered): Likewise.
7702         (fputstrn_unfiltered): Add do_fputc parameter, pass to
7703         printchar.
7704         * utils.h (do_fputc_ftype): New typedef.
7705         (fputstrn_unfiltered): Add do_fputc parameter.
7706
7707 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
7708
7709         * regformats/i386/i386-avx.dat: Remove.
7710
7711 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
7712
7713         PR gdb/22979
7714         * amd64-tdep.c (amd64_none_init_abi): New function.
7715         (amd64_x32_none_init_abi): New function.
7716         (_initialize_amd64_tdep): Register handlers for x86-64 and
7717         x64_32 with GDB_OSABI_NONE.
7718         * osabi.c (gdbarch_init_osabi): Allow running handlers for the
7719         GDB_OSABI_NONE osabi.
7720
7721 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
7722
7723         PR gdb/22980
7724         * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
7725         GDB_OSABI_NONE.
7726         * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
7727         * osabi.c (gdb_osabi_names): Add "unknown" entry.
7728
7729 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
7730
7731         * common/byte-vector.h (char_vector): New type.
7732         * target.h (target_read_alloc): Return
7733         gdb::optional<byte_vector>.
7734         (target_read_stralloc): Return gdb::optional<char_vector>.
7735         (target_get_osdata): Return gdb::optional<char_vector>.
7736         * target.c (target_read_alloc_1): Templatize.  Replacement
7737         manual memory management with vector.
7738         (target_read_alloc): Change return type, adjust.
7739         (target_read_stralloc): Change return type, adjust.
7740         (target_get_osdata): Change return type, adjust.
7741         * auxv.c (struct auxv_info) <length>: Remove.
7742         <data>: Change type to gdb::optional<byte_vector>.
7743         (auxv_inferior_data_cleanup): Free auxv_info with delete.
7744         (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
7745         (target_auxv_search): Adjust.
7746         (fprint_target_auxv): Adjust.
7747         * avr-tdep.c (avr_io_reg_read_command): Adjust.
7748         * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
7749         (linux_make_corefile_notes): Adjust.
7750         * osdata.c (get_osdata): Adjust.
7751         * remote.c (remote_get_threads_with_qxfer): Adjust.
7752         (remote_memory_map): Adjust.
7753         (remote_traceframe_info): Adjust.
7754         (btrace_read_config): Adjust.
7755         (remote_read_btrace): Adjust.
7756         (remote_pid_to_exec_file): Adjust.
7757         * solib-aix.c (solib_aix_get_library_list): Adjust.
7758         * solib-dsbt.c (decode_loadmap): Don't free buf.
7759         (dsbt_get_initial_loadmaps): Adjust.
7760         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
7761         * solib-target.c (solib_target_current_sos): Adjust.
7762         * tracepoint.c (sdata_make_value): Adjust.
7763         * xml-support.c (xinclude_start_include): Adjust.
7764         (xml_fetch_content_from_file): Adjust.
7765         * xml-support.h (xml_fetch_another): Change return type.
7766         (xml_fetch_content_from_file): Change return type.
7767         * xml-syscall.c (xml_init_syscalls_info): Adjust.
7768         * xml-tdesc.c (file_read_description_xml): Adjust.
7769         (fetch_available_features_from_target): Change return type.
7770         (target_fetch_description_xml): Adjust.
7771         (target_read_description_xml): Adjust.
7772
7773 2018-04-06  Tom Tromey  <tom@tromey.com>
7774
7775         * value.c (~value): Update.
7776         (struct value) <contents>: Now unique_xmalloc_ptr.
7777         (value_contents_bits_eq, allocate_value_contents)
7778         (value_contents_raw, value_contents_all_raw)
7779         (value_contents_for_printing, value_contents_for_printing_const)
7780         (set_value_enclosing_type): Update.
7781
7782 2018-04-06  Tom Tromey  <tom@tromey.com>
7783
7784         * value.c (range_s): Remove typedef, VEC.
7785         (struct range): Add operator<.
7786         (range_lessthan): Remove.
7787         (ranges_contain): Change type.
7788         (~value): Update.
7789         (struct value) <unavailable, optimized_out>: Now std::vector.
7790         (value_entirely_available)
7791         (value_entirely_covered_by_range_vector)
7792         (value_entirely_unavailable, value_entirely_optimized_out):
7793         Update.
7794         (insert_into_bit_range_vector): Change argument type.
7795         (find_first_range_overlap): Likewise.
7796         (struct ranges_and_idx, value_contents_bits_eq)
7797         (require_not_optimized_out, require_available): Update.
7798         (ranges_copy_adjusted): Change argument types.
7799         (value_optimized_out, value_copy, value_fetch_lazy): Update.
7800
7801 2018-04-06  Tom Tromey  <tom@tromey.com>
7802
7803         * value.c (~value): Update.
7804         (struct value) <parent>: Now a value_ref_ptr.
7805         (value_parent, set_value_parent, value_address, value_copy):
7806         Update.
7807
7808 2018-04-06  Tom Tromey  <tom@tromey.com>
7809
7810         * value.c (struct value): Add constructor, destructor, and member
7811         initializers.
7812         (allocate_value_lazy, value_decref): Update.
7813
7814 2018-04-06  Tom Tromey  <tom@tromey.com>
7815
7816         * value.c (struct value) <released, next>: Remove.
7817         (all_values): Now a std::vector.
7818         (allocate_value_lazy): Update.
7819         (value_next): Remove.
7820         (value_mark, value_free_to_mark, release_value)
7821         (value_release_to_mark): Update.
7822
7823 2018-04-06  Tom Tromey  <tom@tromey.com>
7824
7825         * value.h (fetch_subexp_value, value_release_to_mark): Update.
7826         (free_value_chain): Remove.
7827         * value.c (free_value_chain): Remove.
7828         (value_release_to_mark): Return a std::vector.
7829         * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
7830         std::vector.
7831         (check_condition): Update.
7832         * eval.c (fetch_subexp_value): Change "val_chain" to a
7833         std::vector.
7834         * breakpoint.c (update_watchpoint): Update.
7835         (can_use_hardware_watchpoint): Change "vals" to a std::vector.
7836
7837 2018-04-06  Tom Tromey  <tom@tromey.com>
7838
7839         * value.h (free_all_values): Remove.
7840         * value.c (free_all_values): Remove.
7841
7842 2018-04-06  Tom Tromey  <tom@tromey.com>
7843
7844         * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
7845         (value_history_chain, value_history_count): Remove.
7846         (value_history): New global.
7847         (record_latest_value, access_value_history, show_values)
7848         (preserve_values): Update.
7849
7850 2018-04-06  Tom Tromey  <tom@tromey.com>
7851
7852         * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
7853         * varobj.c (varobj_set_display_format, varobj_set_value)
7854         (install_default_visualizer, construct_visualizer)
7855         (install_new_value, ~varobj, varobj_get_value_type)
7856         (my_value_of_variable, varobj_editable_p): Update.
7857         * c-varobj.c (c_describe_child, c_value_of_variable)
7858         (cplus_number_of_children, cplus_describe_child): Update.
7859         * ada-varobj.c (ada_number_of_children, ada_name_of_child)
7860         (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
7861         (ada_value_of_variable, ada_value_is_changeable_p): Update.
7862
7863 2018-04-06  Tom Tromey  <tom@tromey.com>
7864
7865         * printcmd.c (last_examine_address): Change type to
7866         value_ref_ptr.
7867         (do_examine, x_command): Update.
7868
7869 2018-04-06  Tom Tromey  <tom@tromey.com>
7870
7871         * value.c (release_value): Update.
7872         * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
7873         (struct bpstats) <val>: Now a value_ref_ptr.
7874         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
7875         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
7876         (~watchpoint, print_it_watchpoint, watch_command_1)
7877         (invalidate_bp_value_on_memory_change): Update.
7878
7879 2018-04-06  Tom Tromey  <tom@tromey.com>
7880
7881         * varobj.c (varobj_clear_saved_item)
7882         (update_dynamic_varobj_children, install_new_value, ~varobj):
7883         Update.
7884         * value.h (value_incref): Move declaration earlier.
7885         (value_decref): Rename from value_free.
7886         (struct value_ref_policy): New.
7887         (value_ref_ptr): New typedef.
7888         (struct value_deleter): Remove.
7889         (gdb_value_up): Remove typedef.
7890         (release_value): Change return type.
7891         (release_value_or_incref): Remove.
7892         * value.c (set_value_parent): Update.
7893         (value_incref): Change return type.
7894         (value_decref): Rename from value_free.
7895         (value_free_to_mark, free_all_values, free_value_chain): Update.
7896         (release_value): Return value_ref_ptr.
7897         (release_value_or_incref): Remove.
7898         (record_latest_value, set_internalvar, clear_internalvar):
7899         Update.
7900         * stack.c (info_frame_command): Don't call value_free.
7901         * python/py-value.c (valpy_dealloc, valpy_new)
7902         (value_to_value_object): Update.
7903         * printcmd.c (do_examine): Update.
7904         * opencl-lang.c (lval_func_free_closure): Update.
7905         * mi/mi-main.c (register_changed_p): Don't call value_free.
7906         * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
7907         * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
7908         * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
7909         value_free.
7910         * guile/scm-value.c (vlscm_free_value_smob)
7911         (vlscm_scm_from_value): Update.
7912         * frame.c (frame_register_unwind, frame_unwind_register_signed)
7913         (frame_unwind_register_unsigned, get_frame_register_bytes)
7914         (put_frame_register_bytes): Don't call value_free.
7915         * findvar.c (address_from_register): Don't call value_free.
7916         * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
7917         * dwarf2loc.c (entry_data_value_free_closure)
7918         (value_of_dwarf_reg_entry, free_pieced_value_closure)
7919         (dwarf2_evaluate_loc_desc_full): Update.
7920         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
7921         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
7922         (~watchpoint, watch_command_1)
7923         (invalidate_bp_value_on_memory_change): Update.
7924         * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
7925
7926 2018-04-06  Simon Marchi  <simon.marchi@polymtl.ca>
7927
7928         PR gdb/23022
7929         * warning.m4: Add -Wno-error=deprecated-register.
7930         * configure: Re-generate.
7931
7932 2018-04-05  Tom Tromey  <tom@tromey.com>
7933
7934         * linespec.h: Remove include of "vec.h".
7935
7936 2018-04-05  Tom Tromey  <tom@tromey.com>
7937
7938         * linespec.c (typep): Remove typedef.
7939         (find_methods, find_superclass_methods): Take a std::vector.
7940         (find_method): Use std::vector.
7941
7942 2018-04-05  Tom Tromey  <tom@tromey.com>
7943
7944         * utils.c (compare_strings): Remove.
7945         * utils.h (compare_strings): Remove.
7946         * objc-lang.h (find_imps): Update.
7947         * objc-lang.c (find_methods): Take a std::vector.
7948         (uniquify_strings, find_imps): Likewise.
7949         * linespec.c (find_methods): Take a std::vector.
7950         (decode_objc): Use std::vector.
7951         (add_all_symbol_names_from_pspace, find_superclass_methods): Take
7952         a std::vector.
7953         (find_method, find_function_symbols): Use std::vector.
7954
7955 2018-04-05  Tom Tromey  <tom@tromey.com>
7956
7957         * completer.c (completion_tracker::completion_tracker): Remove
7958         cast.
7959         (completion_tracker::discard_completions): Likewise.
7960         * breakpoint.c (ambiguous_names_p): Remove cast.
7961         * ada-lang.c (_initialize_ada_language): Remove cast.
7962         * utils.h (streq): Update.
7963         (streq_hash): Add new declaration.
7964         * utils.c (streq): Return bool.
7965         (streq_hash): New function.
7966
7967 2018-04-05  Tom Tromey  <tom@tromey.com>
7968
7969         * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
7970         Remove a string copy.
7971
7972 2018-04-05  Tom Tromey  <tom@tromey.com>
7973
7974         * linespec.c (filter_results): Use std::vector.
7975         (decode_line_2, decode_line_full): Update.
7976
7977 2018-04-05  Tom Tromey  <tom@tromey.com>
7978
7979         * linespec.c (canonical_to_fullform): Return std::string.
7980         (filter_results): Update.
7981         (struct decode_line_2_item): Add constructor.
7982         <fullform, displayform>: Now std::string.
7983         (decode_line_2_compare_items): Now a std::sort comparator.
7984         (decode_line_2): Update.
7985
7986 2018-04-05  Tom Tromey  <tom@tromey.com>
7987
7988         * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
7989         (unexpected_linespec_error): Update.
7990         (linespec_parse_basic, parse_linespec): Update.
7991
7992 2018-04-05  Tom Tromey  <tom@tromey.com>
7993
7994         * linespec.c (linespec_parse_basic): Reindent.
7995
7996 2018-04-05  Tom Tromey  <tom@tromey.com>
7997
7998         * minsyms.h (iterate_over_minimal_symbols): Update.
7999         * minsyms.c (iterate_over_minimal_symbols): Take a
8000         gdb::function_view.
8001         * linespec.c (struct collect_minsyms): Remove.
8002         (compare_msyms): Now a std::sort comparator.
8003         (add_minsym): Add parameters.
8004         (search_minsyms_for_name): Update.  Use std::vector.
8005
8006 2018-04-03  Tom Tromey  <tom@tromey.com>
8007
8008         * mipsread.c (read_alphacoff_dynamic_symtab): Use
8009         gdb::byte_vector.
8010
8011 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
8012
8013         * MAINTAINERS (Write After Approval): Add Weimin Pan.
8014
8015 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
8016
8017         PR gdb/16959
8018         * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when 
8019         printing static type.
8020
8021 2018-04-01  Tom Tromey  <tom@tromey.com>
8022
8023         * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
8024         (rs6000_xfer_shared_libraries): Update.
8025
8026 2018-04-01  Simon Marchi  <simon.marchi@polymtl.ca>
8027
8028         * common/gdb_vecs.h (char_ptr): Remove.
8029         * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
8030
8031 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
8032
8033         * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
8034         with std::vector.
8035         * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
8036
8037 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
8038
8039         * tracepoint.h (struct uploaded_tp): Initialize fields.
8040         <actions, step_actions, cmd_strings>: Change type to
8041         std::vector<char *>.
8042         * tracepoint.c (get_uploaded_tp): Allocate with new.
8043         (free_uploaded_tps): Free with delete.
8044         (parse_tracepoint_definition): Adjust to std::vector change.
8045         * breakpoint.c (read_uploaded_action): Likewise.
8046         (create_tracepoint_from_upload): Likewise.
8047         * ctf.c (ctf_write_uploaded_tp): Likewise.
8048         (SET_ARRAY_FIELD): Likewise.
8049         * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
8050
8051 2018-03-30  Tom Tromey  <tom@tromey.com>
8052
8053         * solib-svr4.c (lm_info_read): Use gdb::byte_vector.  Return
8054         std::unique_ptr.
8055         (svr4_keep_data_in_core): Update.
8056         (svr4_read_so_list): Update.
8057
8058 2018-03-30  Tom Tromey  <tom@tromey.com>
8059
8060         * windows-nat.c (handle_output_debug_string, handle_exception):
8061         Update.
8062         * target.h (target_read_string): Update.
8063         * target.c (target_read_string): Change "string" to
8064         unique_xmalloc_ptr.
8065         * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
8066         Update.
8067         * solib-frv.c (frv_current_sos): Update.
8068         * solib-dsbt.c (dsbt_current_sos): Update.
8069         * solib-darwin.c (darwin_current_sos): Update.
8070         * linux-thread-db.c (inferior_has_bug): Update.
8071         * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
8072         Update.  Remove alloca.
8073         * ada-lang.c (ada_main_name): Update.
8074
8075 2018-03-30  Tom Tromey  <tom@tromey.com>
8076
8077         * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
8078         (struct dwo_file_deleter): New.
8079         (dwo_file_up): New typedef.
8080         (open_and_init_dwo_file): Use dwo_file_up.
8081         (free_dwo_file_cleanup): Remove.
8082
8083 2018-03-30  Tom Tromey  <tom@tromey.com>
8084
8085         * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
8086         (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
8087
8088 2018-03-30  Tom Tromey  <tom@tromey.com>
8089
8090         * dwarf2read.c (class free_cached_comp_units): New class.
8091         (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
8092         (free_cached_comp_units): Remove function.
8093
8094 2018-03-30  Tom Tromey  <tom@tromey.com>
8095
8096         * utils.h (make_cleanup_unpush_target): Remove.
8097         * inf-ptrace.c (struct target_unpusher): New.
8098         (target_unpush_up) New typedef.
8099         (inf_ptrace_create_inferior, inf_ptrace_attach): Use
8100         target_unpush_up.
8101         * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
8102
8103 2018-03-27  Tom Tromey  <tom@tromey.com>
8104
8105         * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
8106
8107 2018-03-27  Pedro Alves  <palves@redhat.com>
8108             Tom Tromey  <tom@tromey.com>
8109
8110         * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
8111         destructor.  Now a class.
8112         (gdb_readline_wrapper_cleanup): Remove function.
8113         (gdb_readline_wrapper): Remove cleanups.
8114
8115 2018-03-27  Tom Tromey  <tom@tromey.com>
8116
8117         * typeprint.h (struct type_print_options) <local_typedefs,
8118         global_typedefs>: Remove "struct" keyword.
8119         (class typedef_hash_table): New class.
8120         (recursively_update_typedef_hash, add_template_parameters)
8121         (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
8122         (find_typedef_in_hash): Don't declare.
8123         * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
8124         (typedef_hash_table::recursively_update): Rename from
8125         recursively_update_typedef_hash.  Now a member.
8126         (typedef_hash_table::add_template_parameters): Rename from
8127         add_template_parameters.  Now a member.
8128         (typedef_hash_table::typedef_hash_table): Now a constructor;
8129         rename from create_typedef_hash.
8130         (typedef_hash_table::~typedef_hash_table): Now a destructor;
8131         rename from free_typedef_hash.
8132         (do_free_typedef_hash, make_cleanup_free_typedef_hash)
8133         (do_free_global_table): Remove.
8134         (typedef_hash_table::typedef_hash_table): New constructor; renamed
8135         from copy_type_recursive.
8136         (create_global_typedef_table): Remove.
8137         (typedef_hash_table::find_global_typedef): Now a member of
8138         typedef_hash_table.
8139         (typedef_hash_table::find_typedef): Rename from
8140         find_typedef_in_hash; now a member.
8141         (whatis_exp): Update.
8142         * extension.h (struct ext_lang_type_printers): Add constructor and
8143         destructor.
8144         (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
8145         declare.
8146         * extension.c (ext_lang_type_printers::ext_lang_type_printers):
8147         Now a constructor; rename from start_ext_lang_type_printers.
8148         (ext_lang_type_printers): Now a destructor; rename from
8149         free_ext_lang_type_printers.
8150         * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
8151         Update.
8152         (c_type_print_base_struct_union): Update.  Remove cleanups.
8153
8154 2018-03-27  Tom Tromey  <tom@tromey.com>
8155
8156         * dwarf-index-write.c: Include <cmath>.
8157
8158 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
8159
8160         * NEWS: Add entry describing new "set|show varsize-limit" command.
8161         * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
8162         command.
8163         * printcmd.c (_initialize_printcmd): Add "set var" alias of
8164         "set variable".
8165
8166 2018-03-27  Simon Marchi  <simon.marchi@ericsson.com>
8167
8168         * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
8169         dwarf-index-write.c
8170         (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
8171         * dwarf-index-common.c: New file.
8172         * dwarf-index-common.h: New file.
8173         * dwarf-index-write.c: New file.
8174         * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
8175         (struct dwarf2_section_info): Move from here.
8176         (dwarf2_section_info_def): Likewise.
8177         (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
8178         (offset_type): Likewise.
8179         (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
8180         (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
8181         (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
8182         (byte_swap): Likewise.
8183         (MAYBE_SWAP): Likewise.
8184         (dwarf2_per_cu_ptr): Likewise.
8185         (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
8186         (struct tu_stats): Likewise.
8187         (struct dwarf2_per_objfile): Likewise.
8188         (struct dwarf2_per_cu_data): Likewise.
8189         (struct signatured_type): Likewise.
8190         (sig_type_ptr): Likewise.
8191         (DEF_VEC_P (sig_type_ptr)): Likewise.
8192         (INDEX4_SUFFIX): Likewise.
8193         (INDEX5_SUFFIX): Likewise.
8194         (DEBUG_STR_SUFFIX): Likewise.
8195         (dwarf2_read_section): Make non-static.
8196         (mapped_index_string_hash): Move from here.
8197         (dwarf5_djb_hash): Likewise.
8198         (file_write): Likewise.
8199         (class data_buf): Likewise.
8200         (struct symtab_index_entry): Likewise.
8201         (struct mapped_symtab): Likewise.
8202         (find_slot): Likewise.
8203         (hash_expand): Likewise.
8204         (add_index_entry): Likewise.
8205         (uniquify_cu_indices): Likewise.
8206         (class c_str_view): Likewise.
8207         (class c_str_view_hasher): Likewise.
8208         (class vector_hasher): Likewise.
8209         (write_hash_table): Likewise.
8210         (psym_index_map): Likewise.
8211         (struct addrmap_index_data): Likewise.
8212         (add_address_entry): Likewise.
8213         (add_address_entry_worker): Likewise.
8214         (write_address_map): Likewise.
8215         (symbol_kind): Likewise.
8216         (write_psymbols): Likewise.
8217         (struct signatured_type_index_data): Likewise.
8218         (write_one_signatured_type): Likewise.
8219         (recursively_count_psymbols): Likewise.
8220         (recursively_write_psymbols): Likewise.
8221         (class debug_names): Likewise.
8222         (check_dwarf64_offsets): Likewise.
8223         (psyms_seen_size): Likewise.
8224         (write_gdbindex): Likewise.
8225         (write_debug_names): Likewise.
8226         (assert_file_size): Likewise.
8227         (write_psymtabs_to_index): Likewise.
8228         (save_gdb_index_command): Likewise.
8229         (_initialize_dwarf2_read): Don't register the "save gdb-index"
8230         command.
8231         * dwarf2read.h: New file.
8232
8233 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
8234
8235         PR gdb/22670
8236         * dwarf2read.c (dwarf2_physname): Do not return the demangled
8237         symbol name if the CU's language stores symbol names in linkage
8238         format.
8239         * language.h (struct language_defn)
8240         <la_store_sym_names_in_linkage_form_p>: New field.  Adjust
8241         all instances of this struct.
8242
8243 2018-03-26  Tom Tromey  <tom@tromey.com>
8244
8245         * stack.c (backtrace_command_1): Remove verbose code.
8246
8247 2018-03-26  Tom Tromey  <tom@tromey.com>
8248
8249         * python/py-framefilter.c (py_print_type): Don't catch
8250         exceptions.  Return void.
8251         (py_print_value): Likewise.
8252         (py_print_single_arg): Likewise.
8253         (enumerate_args): Don't catch exceptions.
8254         (py_print_args): Likewise.
8255         (py_print_frame): Likewise.
8256         (gdbpy_apply_frame_filter): Catch exceptions here.
8257
8258 2018-03-26  Tom Tromey  <tom@tromey.com>
8259
8260         * stack.c (_initialize_stack): Remove trailing newlines from help
8261         text.  Add "Usage" line to "backtrace" help.
8262
8263 2018-03-26  Tom Tromey  <tom@tromey.com>
8264
8265         PR python/16486:
8266         * python/py-framefilter.c (py_print_args): Call wrap_hint.
8267
8268 2018-03-26  Tom Tromey  <tom@tromey.com>
8269
8270         * python/py-framefilter.c (py_print_single_arg): Return
8271         EXT_LANG_BT_ERROR from catch.
8272
8273 2018-03-26  Tom Tromey  <tom@tromey.com>
8274
8275         PR backtrace/15584:
8276         * stack.c (backtrace_command_1): Move some code into no-filters
8277         "if".
8278
8279 2018-03-26  Tom Tromey  <tom@tromey.com>
8280
8281         * python/py-framefilter.c (throw_quit_or_print_exception): New
8282         function.
8283         (gdbpy_apply_frame_filter): Use it.
8284
8285 2018-03-26  Tom Tromey  <tom@tromey.com>
8286
8287         PR cli/17716:
8288         * python/py-framefilter.c (py_print_type, py_print_value)
8289         (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
8290         RETURN_MASK_ERROR.
8291
8292 2018-03-26  Tom Tromey  <tom@tromey.com>
8293
8294         * python/py-framefilter.c (enumerate_args): Use
8295         gdb::unique_xmalloc_ptr.
8296
8297 2018-03-26  Tom Tromey  <tom@tromey.com>
8298
8299         * python/py-framefilter.c (py_print_frame): Return
8300         EXT_LANG_BT_OK.
8301         (gdbpy_apply_frame_filter): Update comment.
8302         * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
8303         Remove.
8304         <EXT_LANG_BT_NO_FILTERS>: Change value.
8305
8306 2018-03-26  Tom Tromey  <tom@tromey.com>
8307
8308         PR backtrace/15582:
8309         * stack.c (backtrace_command): Parse "hide" argument.
8310         * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
8311         * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
8312         constant.
8313
8314 2018-03-26  Tom Tromey  <tom@tromey.com>
8315
8316         * stack.c (backtrace_command_1): Remove "show_locals" parameter,
8317         add "flags".
8318         (backtrace_command): Remove "fulltrace", add "flags".
8319
8320 2018-03-26  Tom Tromey  <tom@tromey.com>
8321
8322         * stack.c (backtrace_command): Rewrite command line parsing.
8323
8324 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
8325
8326         * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
8327
8328 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
8329
8330         * filename-seen-cache.h: Add include guard.
8331
8332 2018-03-26  Keith Seitz  <keiths@redhat.com>
8333
8334         * symfile.c (place_section): Remove "struct" from section_addr_info
8335         in comment.
8336         * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
8337         "struct" keyword from section_addr_info.
8338
8339 2018-03-26  Alan Hayward  <alan.hayward@arm.com>
8340
8341         * regformats/regdef.h (reg): Add constructors.
8342
8343 2018-03-25  Pedro Alves  <palves@redhat.com>
8344
8345         * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
8346         if then/else bodies in var_func_name extraction.
8347
8348 2018-03-23  Weimin Pan  <weimin.pan@oracle.com>
8349
8350         * minsyms.c (lookup_minimal_symbol_and_objfile): Use
8351         lookup_minimal_symbol() to find symbol entry.
8352         * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
8353
8354 2018-03-23  Keith Seitz  <keiths@redhat.com>
8355
8356         PR c++/22968
8357         * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
8358         nested type definitions for C++, too.
8359
8360 2018-03-23  Tom Tromey  <tom@tromey.com>
8361
8362         * machoread.c (struct oso_el): Add a constructor.  Don't define as
8363         a typedef.
8364         (macho_register_oso): Remove.
8365         (macho_symtab_read): Take a std::vector.
8366         (oso_el_compare_name): Now a std::sort comparator.
8367         (macho_symfile_read_all_oso): Take a std::vector.
8368         (macho_symfile_read): Use std::vector.  Remove cleanups.
8369
8370 2018-03-22  Tom Tromey  <tom@tromey.com>
8371
8372         * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
8373         (record_full_goto_bookmark): Use std::string.
8374
8375 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8376
8377         PR tdep/18295
8378         * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
8379         a single mask.
8380
8381 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8382
8383         * rs6000-tdep.c (store_insn_p): New function.
8384         (skip_prologue): New variable alloca_reg_offset. Set lr_reg
8385         and cr_reg to their unshifted values. Use store_insn_p to
8386         match LR saves using either R1 or fdata->alloca_reg. Use
8387         store_insn_p to match CR saves. Set alloca_reg_offset
8388         when alloca_reg and framep are set. Remove lr_reg shift
8389         when assigning to fdata->lr_register.
8390
8391 2018-03-22  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8392
8393         * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
8394         command line args instead of emitting a warning.
8395
8396 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
8397
8398         * tracepoint.h (struct static_tracepoint_marker): Initialize
8399         fields, define default constructor, move constructor and move
8400         assignment, disable the rest.
8401         <str_id, extra>: Make std::string.
8402         (release_static_tracepoint_marker): Remove.
8403         (free_current_marker): Remove.
8404         * tracepoint.c (free_current_marker): Remove.
8405         (parse_static_tracepoint_marker_definition): Adjust to
8406         std::string, use new hex2str overload.
8407         (release_static_tracepoint_marker): Remove.
8408         (print_one_static_tracepoint_marker): Get marker by reference
8409         and adjust to std::string.
8410         (info_static_tracepoint_markers_command): Adjust to std::vector
8411         changes
8412         * target.h (static_tracepoint_marker_p): Remove typedef.
8413         (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
8414         (struct target_ops) <to_static_tracepoint_marker_at>: Return
8415         bool.
8416         <to_static_tracepoint_markers_by_strid>: Return std::vector.
8417         * target-debug.h
8418         (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
8419         (target_debug_print_std_vector_static_tracepoint_marker): New.
8420         (target_debug_print_struct_static_tracepoint_marker_p): Rename
8421         to...
8422         (target_debug_print_static_tracepoint_marker_p): ... this.
8423         * target-delegates.c: Re-generate.
8424         * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
8425         Make std::string.
8426         * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
8427         (decode_static_tracepoint_spec): Adjust to std::vector.
8428         (tracepoint_print_one_detail): Adjust to std::string.
8429         (strace_marker_decode_location): Adjust to std::string.
8430         (update_static_tracepoint): Adjust to std::string, remove call
8431         to release_static_tracepoint_marker.
8432         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
8433         Adjust to std::vector.
8434         * remote.c (remote_static_tracepoint_marker_at): Return bool.
8435         (remote_static_tracepoint_markers_by_strid): Adjust to
8436         std::vector.
8437         * common/rsp-low.h (hex2str): New overload with explicit count
8438         of bytes.
8439         * common/rsp-low.c (hex2str): New overload with explicit count
8440         of bytes.
8441         * unittests/rsp-low-selftests.c (test_hex2str): New function.
8442         (_initialize_rsp_low_selftests): Add test_hex2str test.
8443         * unittests/tracepoint-selftests.c
8444         (test_parse_static_tracepoint_marker_definition): Adjust to
8445         std::string.
8446
8447 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
8448
8449         * tracepoint.c (parse_static_tracepoint_marker_definition):
8450         Consider case where the definition is followed by more
8451         definitions.
8452         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8453         tracepoint-selftests.c.
8454         * unittests/tracepoint-selftests.c: New.
8455
8456 2018-03-21  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8457
8458         * MAINTAINERS (Write After Approval): Add Pedro Franco de
8459         Carvalho.
8460
8461 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
8462
8463         * symtab.c (find_pc_sect_line): fixed indentation.
8464
8465 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
8466
8467         * symtab.c (find_pc_sect_line): now uses binary search.
8468
8469 2018-03-19  Tom Tromey  <tom@tromey.com>
8470
8471         * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
8472         "IDENT" production.
8473
8474 2018-03-19  Pedro Alves  <palves@redhat.com>
8475             Tom Tromey  <tom@tromey.com>
8476
8477         * unittests/observable-selftests.c: New file.
8478         * common/observable.h: New file.
8479         * observable.h: New file.
8480         * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
8481         arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
8482         breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
8483         corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
8484         extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
8485         infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
8486         linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
8487         mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
8488         ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
8489         python/py-breakpoint.c, python/py-finishbreakpoint.c,
8490         python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
8491         record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
8492         riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
8493         spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
8494         symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
8495         tui/tui-interp.c, valops.c: Update all users.
8496         * tui/tui-hooks.c (tui_bp_created_observer)
8497         (tui_bp_deleted_observer, tui_bp_modified_observer)
8498         (tui_inferior_exit_observer, tui_before_prompt_observer)
8499         (tui_normal_stop_observer, tui_register_changed_observer):
8500         Remove.
8501         (tui_observers_token): New global.
8502         (attach_or_detach, tui_attach_detach_observers): New functions.
8503         (tui_install_hooks, tui_remove_hooks): Use
8504         tui_attach_detach_observers.
8505         * record-btrace.c (record_btrace_thread_observer): Remove.
8506         (record_btrace_thread_observer_token): New global.
8507         * observer.sh: Remove.
8508         * observer.c: Rename to observable.c.
8509         * observable.c (namespace gdb_observers): Define new objects.
8510         (observer_debug): Move into gdb_observers namespace.
8511         (struct observer, struct observer_list, xalloc_observer_list_node)
8512         (xfree_observer_list_node, generic_observer_attach)
8513         (generic_observer_detach, generic_observer_notify): Remove.
8514         (_initialize_observer): Update.
8515         Don't include observer.inc.
8516         * Makefile.in (generated_files): Remove observer.h, observer.inc.
8517         (clean mostlyclean): Likewise.
8518         (observer.h, observer.inc): Remove targets.
8519         (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
8520         (COMMON_SFILES): Use observable.c, not observer.c.
8521         * .gitignore: Remove observer.h.
8522
8523 2018-03-18  Tom Tromey  <tom@tromey.com>
8524
8525         * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
8526         gdb::def_vector.
8527         (bfd_lookup_symbol_from_dyn_symtab): Likewise.
8528
8529 2018-03-17  Tom Tromey  <tom@tromey.com>
8530
8531         * auto-load.c (auto_load_objfile_script_1): Use std::string.
8532
8533 2018-03-17  Tom Tromey  <tom@tromey.com>
8534
8535         * target.c (class scoped_target_fd): New.
8536         (target_fileio_close_cleanup): Remove.
8537         (target_fileio_read_alloc_1): Use scoped_target_fd.
8538
8539 2018-03-16  Simon Marchi  <simon.marchi@polymtl.ca>
8540
8541         * silent-rules.mk: New.
8542         * Makefile.in: Include silent-rules.mk
8543         (srcdir, VPATH, top_srcdir): Move up.
8544         (COMPILE): Add ECHO_CXX.
8545         (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
8546         (init.c): Add ECHO_INIT_C.
8547         (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
8548         (version.c): Add ECHO_GEN.
8549         (printcmd.o): Add ECHO_CXX.
8550         (target-float.o): Add ECHO_CXX.
8551         (ada-exp.o): Add ECHO_CXX.
8552         (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
8553         (insight$(EXEEXT)): Add ECHO_CXXLD.
8554         * gnulib/configure.ac: Add AM_SILENT_RULES.
8555         * gnulib/aclocal.m4: Re-generate.
8556         * gnulib/configure: Re-generate.
8557         * gnulib/import/Makefile.in: Re-generate.
8558
8559 2018-03-16  Tom Tromey  <tom@tromey.com>
8560
8561         * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
8562         * utils.h (make_cleanup_free_section_addr_info): Don't declare.
8563         * utils.c (do_free_section_addr_info)
8564         (make_cleanup_free_section_addr_info): Remove.
8565         * symfile.h (struct other_sections): Add constructor.
8566         (struct section_addr_info): Remove.
8567         (section_addr_info): New typedef.
8568         (struct sym_fns) <sym_offsets>: Change type of parameter.
8569         (build_section_addr_info_from_objfile)
8570         (relative_addr_info_to_section_offsets, addr_info_make_relative)
8571         (default_symfile_offsets, symbol_file_add)
8572         (symbol_file_add_from_bfd)
8573         (build_section_addr_info_from_section_table): Update.
8574         (alloc_section_addr_info, free_section_addr_info): Don't declare.
8575         * symfile.c (alloc_section_addr_info): Remove.
8576         (build_section_addr_info_from_section_table): Change return type.
8577         Update.
8578         (build_section_addr_info_from_bfd)
8579         (build_section_addr_info_from_objfile): Likewise.
8580         (free_section_addr_info): Remove.
8581         (relative_addr_info_to_section_offsets): Change type of "addrs".
8582         (addrs_section_compar): Now a std::sort comparator.
8583         (addrs_section_sort): Change return type.
8584         (addr_info_make_relative): Change type of "addrs".  Update.
8585         (default_symfile_offsets, syms_from_objfile_1)
8586         (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
8587         (symbol_file_add_separate): Update.
8588         (symbol_file_add): Change type of "addrs".  Update.
8589         (add_symbol_file_command): Update.  Remove cleanups.
8590         * symfile-mem.c (symbol_file_add_from_memory): Update.  Remove
8591         cleanups.
8592         * symfile-debug.c (debug_sym_offsets): Change type of "info".
8593         * solib.c (solib_read_symbols): Update.
8594         * objfiles.c (objfile_relocate): Update.  Remove cleanups.
8595         * machoread.c (macho_symfile_offsets): Update.
8596         * jit.c (jit_bfd_try_read_symtab): Update.
8597
8598 2018-03-15  Simon Marchi  <simon.marchi@polymtl.ca>
8599
8600         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8601         unittests/utils-selftests.c.
8602         * unittests/utils-selftests.c: New file.
8603
8604 2018-03-14  Tom Tromey  <tom@tromey.com>
8605
8606         PR cli/14977:
8607         * printcmd.c (printf_c_string, printf_wide_c_string): Special case
8608         for NULL.
8609
8610 2018-03-14  Tom Tromey  <tom@tromey.com>
8611
8612         PR cli/19918:
8613         * printcmd.c (printf_pointer): Allow "-" in format.
8614
8615 2018-03-14  Tom Tromey  <tom@tromey.com>
8616
8617         * printcmd.c (_initialize_printcmd): Add usage to printf.
8618
8619 2018-03-14  Yao Qi  <qiyao@sourceware.org>
8620
8621         * MAINTAINERS: Update my email address.
8622
8623 2018-03-13  Tom Tromey  <tom@tromey.com>
8624
8625         * machoread.c (macho_check_dsym): Change filenamep to a
8626         std::string*.
8627         (macho_symfile_read): Update.
8628         * symfile.c (load_command): Use std::string.
8629
8630 2018-03-12  Andrew Burgess  <andrew.burgess@embecosm.com>
8631
8632         * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
8633         to error message string.
8634         (riscv_register_name): Use xsnprintf instead of sprintf.
8635         (riscv_insn::fetch_instruction): Use gdb_assert instead of
8636         internal_error.
8637         (riscv_print_arg_location): Use gdb_assert_not_reached instead of
8638         error.
8639         (riscv_push_dummy_call): Likewise.
8640
8641 2018-03-12  Tom Tromey  <tom@tromey.com>
8642
8643         * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
8644         Use gdb::byte_vector.
8645         * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
8646
8647 2018-03-12  Yao Qi  <yao.qi@linaro.org>
8648
8649         * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
8650         parameter type to readable_regcache.
8651         * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
8652         the declaration.
8653
8654 2018-03-11  Tom Tromey  <tom@tromey.com>
8655
8656         * dwarf2read.c (struct nextfield): Add initializers.
8657         (struct nextfnfield): Remove.
8658         (struct fnfieldlist): Add initializers.  Remove "length" and
8659         "head", use std::vector.
8660         (struct decl_field_list): Remove.
8661         (struct field_info): Add initializers.
8662         <fields, baseclasses>: Now std::vector.
8663         <nbaseclasses, nfnfields, typedef_field_list_count,
8664         nested_types_list_count>: Remove.
8665         (dwarf2_add_field, dwarf2_add_type_defn)
8666         (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
8667         (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
8668         (process_structure_scope): Update.
8669
8670 2018-03-11  Tom Tromey  <tom@tromey.com>
8671
8672         * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
8673         for use by std::sort.
8674         (build_type_psymtabs_1): Use std::vector.
8675
8676 2018-03-09  Eli Zaretskii  <eliz@gnu.org>
8677
8678         * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
8679         and LIBMPFR in the printed configuration.
8680
8681 2018-03-08  Tom Tromey  <tom@tromey.com>
8682
8683         * source.c (get_filename_and_charpos): Use scoped_fd.
8684         * nto-procfs.c (procfs_open_1): Use scoped_fd.
8685         (procfs_pidlist): Likewise.
8686         * procfs.c (proc_get_LDT_entry): Use scoped_fd.
8687         (iterate_over_mappings): Likewise.
8688
8689 2018-03-08  Tom Tromey  <tom@tromey.com>
8690
8691         * infcall.c (struct call_return_meta_info)
8692         <stack_temporaries_enabled>: Remove.
8693         (get_call_return_value, call_function_by_hand_dummy): Update.
8694         * thread.c (disable_thread_stack_temporaries): Remove.
8695         (enable_thread_stack_temporaries): Remove.
8696         (thread_stack_temporaries_enabled_p): Return bool.
8697         (push_thread_stack_temporary, value_in_thread_stack_temporaries)
8698         (get_last_thread_stack_temporary): Update.
8699         * eval.c (evaluate_subexp): Update.
8700         * gdbthread.h (class enable_thread_stack_temporaries): Now a
8701         class, not a function.
8702         (value_ptr, value_vec): Remove typedefs.
8703         (class thread_info) <stack_temporaries_enabled>: Now bool.
8704         <stack_temporaries>: Now a std::vector.
8705         (thread_stack_temporaries_enabled_p)
8706         (value_in_thread_stack_temporaries): Return bool.
8707
8708 2018-03-08  Simon Marchi  <simon.marchi@ericsson.com>
8709
8710         * remote.c (putpkt_binary): Fix omitted bytes reporting.
8711         (getpkt_or_notif_sane_1): Likewise.
8712
8713 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
8714
8715         * build-id.c (build_id_to_debug_bfd): Use std::string.
8716
8717 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
8718
8719         * build-id.c (find_separate_debug_file_by_buildid): Return
8720         std::string.
8721         * build-id.h (find_separate_debug_file_by_buildid): Return
8722         std::string.
8723         * coffread.c (coff_symfile_read): Adjust to std::string.
8724         * elfread.c (elf_symfile_read): Adjust to std::string.
8725         * symfile.c (separate_debug_file_exists): Change parameter to
8726         std::string.
8727         (find_separate_debug_file): Return std::string.
8728         (find_separate_debug_file_by_debuglink): Return std::string.
8729         * symfile.h (find_separate_debug_file_by_debuglink): Return
8730         std::string.
8731
8732 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
8733
8734         * common/xml-utils.c (xml_escape_text): Move code to...
8735         (xml_escape_text_append): ... this new function.
8736         * common/xml-utils.h (xml_escape_text_append): New declaration.
8737         * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
8738         New function.
8739         (_initialize_xml_utils): register test_xml_escape_text_append as
8740         a selftest.
8741
8742 2018-03-07  Alan Hayward  <alan.hayward@arm.com>
8743
8744         * defs.h: Remove MAX_REGISTER_SIZE.
8745         * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
8746         asserts.
8747         * python/py-unwind.c (pyuw_sniffer): Likewise.
8748
8749 2018-03-07  Tom Tromey  <tom@tromey.com>
8750
8751         * linux-tdep.c (linux_info_proc): Update.
8752         * target.h (struct target_ops) <to_fileio_readlink>: Return
8753         optional<string>.
8754         (target_fileio_readlink): Return optional<string>.
8755         * remote.c (remote_hostio_readlink): Return optional<string>.
8756         * inf-child.c (inf_child_fileio_readlink): Return
8757         optional<string>.
8758         * target.c (target_fileio_readlink): Return optional<string>.
8759
8760 2018-03-07  Andrew Burgess  <andrew.burgess@embecosm.com>
8761
8762         * regcache.c (cooked_read_test): Add riscv to the list of
8763         architectures that have a save_reggroup.
8764
8765 2018-03-07  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8766
8767         * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
8768         value is not a dynamic class object.
8769
8770 2018-03-06  Tom Tromey  <tom@tromey.com>
8771
8772         * rust-exp.y: Formatting fixes.
8773
8774 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
8775
8776         * riscv-tdep.c (riscv_register_name): Remove target description
8777         support.
8778         (riscv_gdbarch_init): Remove target description check.
8779
8780 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
8781
8782         * riscv-tdep.c: Remove 'Contributed by ...' lines from header
8783         comment.
8784         * riscv-tdep.h: Likewise.
8785
8786 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
8787
8788         * riscv-tdep.c (riscv_pseudo_register_read): Delete.
8789         (riscv_pseudo_register_write): Delete.
8790         (riscv_gdbarch_init): Remove all use of pseudo registers.
8791
8792 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
8793
8794         * record-btrace.c (btrace_print_lines): Replace cleanup
8795         parameter with RAII equivalents.
8796         (btrace_insn_history): Replace cleanup with RAII equivalents.
8797         * ui-out.h (make_cleanup_ui_out_list_begin_end,
8798         make_cleanup_ui_out_tuple_begin_end): Remove.
8799         * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
8800         make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
8801         make_cleanup_ui_out_list_begin_end): Remove.
8802
8803 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
8804
8805         * record-btrace.c (record_btrace_maybe_mark_async_event): Change
8806         parameter types to std::vector.  Use bool.
8807         (record_btrace_wait): Replace VEC(tp_t) with
8808         std::vector<thread_info *>.
8809         * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
8810
8811 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
8812
8813         * record-btrace.c (record_btrace_disable_callback): Remove.
8814         (struct scoped_btrace_disable): New.
8815         (record_btrace_open): Use scoped_btrace_disable.
8816
8817 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
8818
8819         * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
8820         reading values from registers.
8821
8822 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
8823
8824         * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
8825         where appropriate.
8826
8827 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
8828
8829         * riscv-tdep.c (riscv_print_arg_location): Add header comment,
8830         change parameter type.  Use GDB's print functions, and use
8831         core_addr_to_string where appropriate.
8832         (riscv_push_dummy_call): Use core_addr_to_string where
8833         appropriate, update call to riscv_print_arg_location, and reindent
8834         a few lines.
8835         (riscv_return_value): Update call to riscv_print_arg_location.
8836
8837 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
8838             Tim Newsome <tim@sifive.com>
8839             Albert Ou <a0u@eecs.berkeley.edu>
8840             Darius Rad <darius@bluespec.com>
8841
8842         * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
8843         (HFILES_NO_SRCDIR): Add riscv-tdep.h.
8844         (ALLDEPFILES): Add riscv-tdep.c
8845         * configure.tgt: Add riscv support.
8846         * riscv-tdep.c: New file.
8847         * riscv-tdep.h: New file.
8848         * NEWS: Mention new target.
8849         * MAINTAINERS: Add entry for riscv.
8850
8851 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
8852
8853         * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
8854         fields within aggregates.
8855
8856 2018-03-04  Simon Marchi  <simon.marchi@polymtl.ca>
8857
8858         * record-btrace.c (btrace_print_lines): Change type of flags to
8859         gdb_disassembly_flags.
8860
8861 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
8862
8863         * fbsd-nat.c: Include "inf-ptrace.h".
8864         (USE_SIGTRAP_SIGINFO): Conditionally define.
8865         [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
8866         (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
8867         [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
8868         function.
8869         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
8870         Likewise.
8871         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
8872         Likewise.
8873         (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
8874         "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
8875         "supports_stopped_by_hw_breakpoint" target methods.
8876
8877 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
8878
8879         * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
8880         * fbsd-nat.c (debug_fbsd_nat): New variable.
8881         (show_fbsd_nat_debug): New function.
8882         (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
8883         (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
8884
8885 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
8886
8887         * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
8888         * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
8889         prototype.
8890         * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
8891         (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
8892         method.
8893
8894 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
8895
8896         * common/gdb_vecs.c (free_char_ptr_vec): Remove.
8897         * common/gdb_vecs.h (free_char_ptr_vec): Remove.
8898
8899 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
8900
8901         * charset.c (struct charset_vector): New.
8902         (charsets): Change type to charset_vector.
8903         (find_charset_names): Adjust.
8904         (add_one): Adjust.
8905         (_initialize_charset): Adjust.
8906
8907 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
8908
8909         * progspace.h (struct program_space) <deleted_solibs>: Change
8910         type to std::vector<std::string>.
8911         * progspace.c (clear_program_space_solib_cache): Adjust.
8912         * breakpoint.c (print_solib_event): Adjust.
8913         (check_status_catch_solib): Adjust.
8914         * solib.c (update_solib_list): Adjust.
8915         * ui-out.h (class ui_out) <field_string>: New overload.
8916         * ui-out.c (ui_out::field_string): New overload.
8917
8918 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
8919
8920         * progspace.h (struct program_space): Add constructor and
8921         destructor, initialize fields.
8922         (add_program_space): Remove.
8923         * progspace.c (add_program_space): Rename to...
8924         (program_space::program_space): ... this.
8925         (release_program_space): Rename to...
8926         (program_space::~program_space): ... this.
8927         (delete_program_space): Use delete to delete program_space.
8928         (initialize_progspace): Use new to allocate program_space.
8929         * inferior.c (add_inferior_with_spaces): Likewise.
8930         (clone_inferior_command): Likewise.
8931         * infrun.c (follow_fork_inferior): Likewise.
8932         (handle_vfork_child_exec_or_exit): Likewise.
8933
8934 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
8935
8936         * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
8937         (delim_string_to_char_ptr_vec): Return std::vector of
8938         gdb::unique_xmalloc_ptr.
8939         (dirnames_to_char_ptr_vec_append): Take std::vector of
8940         gdb::unique_xmalloc_ptr.
8941         (dirnames_to_char_ptr_vec): Return std::vector of
8942         gdb::unique_xmalloc_ptr.
8943         * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
8944         Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
8945         (delim_string_to_char_ptr_vec): Return an std::vector of
8946         gdb::unique_xmalloc_ptr, adjust the code.
8947         (dirnames_to_char_ptr_vec_append): Take an std::vector of
8948         gdb::unique_xmalloc_ptr, adjust the code.
8949         (dirnames_to_char_ptr_vec): Return an std::vector of
8950         gdb::unique_xmalloc_ptr, adjust the code.
8951         * auto-load.c (auto_load_safe_path_vec): Change type to
8952         std::vector of gdb::unique_xmalloc_ptr.
8953         (auto_load_expand_dir_vars): Return an std::vector of
8954         gdb::unique_xmalloc_ptr, adjust the code.
8955         (auto_load_safe_path_vec_update): Adjust.
8956         (filename_is_in_auto_load_safe_path_vec): Adjust.
8957         (auto_load_objfile_script_1): Adjust.
8958         * build-id.c (build_id_to_debug_bfd): Adjust.
8959         * linux-thread-db.c (thread_db_load_search): Adjust.
8960         * source.c (add_path): Adjust.
8961         (openp): Adjust.
8962         * symfile.c (find_separate_debug_file): Adjust.
8963         * utils.c (do_free_char_ptr_vec): Remove.
8964         (make_cleanup_free_char_ptr_vec): Remove.
8965
8966 2018-03-01  Sergio Durigan Junior  <sergiodj@redhat.com>
8967
8968         PR gdb/22907
8969         * common/pathstuff.c: Conditionally include "<windows.h>".
8970
8971 2018-03-01  Georg Sauthoff  <mail@georg.so>
8972
8973         PR gdb/22888
8974         * gcore.in: Quote variables and switch interpreter to bash.
8975
8976 2018-03-01  Tom Tromey  <tom@tromey.com>
8977
8978         * dwarf2read.c (alloc_discriminant_info): Fix default_index
8979         assertion.  Add assertion for discriminant_index.
8980         (quirk_rust_enum): Use correct base type name in univariant case.
8981
8982 2018-03-01  Simon Marchi  <simon.marchi@ericsson.com>
8983
8984         * record.c (get_call_history_modifiers): Return a
8985         record_print_flags.
8986         (cmd_record_call_history): Adjust.
8987         * record-btrace.c (record_btrace_call_history): Adjust.
8988         (record_btrace_call_history_range): Adjust.
8989         (record_btrace_call_history_from): Adjust.
8990         * target-debug.h (target_debug_print_record_print_flags): New.
8991         * target-delegates.c: Re-generate.
8992         * target.c (target_call_history): Change flags type.
8993         (target_call_history_from): Likewise.
8994         (target_call_history_range): Likewise.
8995         * target.h (struct target_ops) <target_call_history>: Likewise.
8996         (target_call_history_from): Likewise.
8997         (target_call_history_range): Likewise.
8998
8999 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
9000             Simon Marchi  <simon.marchi@polymtl.ca>
9001
9002         * common/common-utils.c: Include "sys/stat.h".
9003         (is_regular_file): Move here from "source.c"; change return
9004         type to "bool".
9005         * common/common-utils.h (is_regular_file): New prototype.
9006         * common/pathstuff.c (contains_dir_separator): New function.
9007         * common/pathstuff.h (contains_dir_separator): New prototype.
9008         * source.c: Don't include "sys/stat.h".
9009         (is_regular_file): Move to "common/common-utils.c".
9010
9011 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
9012
9013         * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
9014         (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
9015         * auto-load.c: Include "common/pathstuff.h".
9016         * common/common-def.h (current_directory): Move here.
9017         * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
9018         function.
9019         * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
9020         prototype.
9021         * common/pathstuff.c: New file.
9022         * common/pathstuff.h: New file.
9023         * compile/compile.c: Include "common/pathstuff.h".
9024         * defs.h (current_directory): Move to "common/common-defs.h".
9025         * dwarf2read.c: Include "common/pathstuff.h".
9026         * exec.c: Likewise.
9027         * guile/scm-safe-call.c: Likewise.
9028         * linux-thread-db.c: Likewise.
9029         * main.c: Likewise.
9030         * nto-tdep.c: Likewise.
9031         * objfiles.c: Likewise.
9032         * source.c: Likewise.
9033         * symtab.c: Likewise.
9034         * utils.c: Include "common/pathstuff.h".
9035         (gdb_realpath): Move to "common/pathstuff.c".
9036         (gdb_realpath_keepfile): Likewise.
9037         (gdb_abspath): Likewise.
9038         * utils.h (gdb_realpath): Move to "common/pathstuff.h".
9039         (gdb_realpath_keepfile): Likewise.
9040         (gdb_abspath): Likewise.
9041
9042 2018-02-28  John Baldwin  <jhb@FreeBSD.org>
9043
9044         * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
9045         wildcard process pid for super_resume for kernels with a
9046         specific bug.
9047
9048 2018-02-27  Phil Muldoon  <pmuldoon@redhat.com>
9049
9050         * compile/compile.c (get_args): Add additional comments
9051         explaining function.
9052
9053 2018-02-27  Simon Marchi  <simon.marchi@polymtl.ca>
9054             Tom Tromey  <tom@tromey.com>
9055
9056         * target.h (memory_write_request_s): Remove typedef.  Don't define
9057         VEC.
9058         (target_write_memory_blocks): Change argument to std::vector.
9059         (struct memory_write_request): Add constructor.
9060         * target-memory.c (compare_block_starting_address): Return bool.
9061         Change argument types.
9062         (claim_memory): Change arguments to use std::vector.
9063         (split_regular_and_flash_blocks, blocks_to_erase)
9064         (compute_garbled_blocks): Likewise.
9065         (cleanup_request_data, cleanup_write_requests_vector): Remove.
9066         (target_write_memory_blocks): Change argument to std::vector.
9067         * symfile.c (struct load_section_data): Add constructor and
9068         destructor.  Use std::vector for "requests".
9069         (struct load_progress_data): Add initializers.
9070         (load_section_callback): Update.  Use "new".
9071         (clear_memory_write_data): Remove.
9072         (generic_load): Update.
9073
9074 2018-02-27  Alan Hayward  <alan.hayward@arm.com>
9075
9076         * arch/aarch64.h: Use common/tdesc.h.
9077
9078 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
9079
9080         * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
9081         architecture with a 64-bit ABI.
9082
9083 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
9084
9085         * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
9086         ahead of target description loading.
9087
9088 2018-02-26  Tom Tromey  <tom@tromey.com>
9089
9090         * stack.c (backtrace_command_1): Update.
9091         * python/python-internal.h (gdbpy_apply_frame_filter): Change type
9092         of "flags".
9093         * python/py-framefilter.c (py_print_frame)
9094         (gdbpy_apply_frame_filter): Change type of "flags".
9095         * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
9096         of "flags".
9097         (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
9098         (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
9099         * extension.h (enum frame_filter_flag): Rename from
9100         frame_filter_flags.
9101         (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
9102         (apply_ext_lang_frame_filter): Change type of "flags".
9103         * extension.c (apply_ext_lang_frame_filter): Change type of
9104         "flags".
9105         * extension-priv.h (struct extension_language_ops)
9106         <apply_frame_filter>: Change type of "flags".
9107
9108 2018-02-26  Tom Tromey  <tom@tromey.com>
9109
9110         PR python/16497:
9111         * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag.  Fix
9112         off-by-one in py_end computation.
9113         * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
9114         PRINT_MORE_FRAMES.
9115         * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
9116         constant.
9117
9118 2018-02-26  Tom Tromey  <tom@tromey.com>
9119
9120         * dwarf2read.c (struct variant_field): New.
9121         (struct nextfield) <variant>: New field.
9122         (dwarf2_add_field): Handle DW_TAG_variant_part.
9123         (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
9124         discriminated union.
9125         (read_structure_type): Handle DW_TAG_variant_part.
9126         (handle_struct_member_die): New function, extracted from
9127         process_structure_scope.  Handle DW_TAG_variant.
9128         (process_structure_scope): Handle discriminated unions.  Call
9129         handle_struct_member_die.
9130
9131 2018-02-26  Tom Tromey  <tom@tromey.com>
9132
9133         * rust-lang.h (rust_last_path_segment): Declare.
9134         * rust-lang.c (rust_last_path_segment): Now public.  Change
9135         contract.
9136         (struct disr_info): Remove.
9137         (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
9138         (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
9139         (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
9140         (rust_enum_p, rust_enum_variant): New function.
9141         (rust_underscore_fields): Remove "offset" parameter.
9142         (rust_print_enum): New function.
9143         (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
9144         <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
9145         (rust_print_struct_def): Add "for_rust_enum" parameter.  Handle
9146         enums.
9147         (rust_internal_print_type): New function, from rust_print_type.
9148         Remove enum code.
9149         (rust_print_type): Call rust_internal_print_type.
9150         (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
9151         Update enum handling.
9152         * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
9153         (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
9154         (rust_union_quirks): New functions.
9155         (process_full_comp_unit, process_full_type_unit): Call
9156         rust_union_quirks.
9157         (process_structure_scope): Update rust_unions if necessary.
9158
9159 2018-02-26  Tom Tromey  <tom@tromey.com>
9160
9161         * value.h (value_union_variant): Declare.
9162         * valops.c (value_union_variant): New function.
9163         * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
9164         (struct discriminant_info): New.
9165         (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
9166         enumerator.
9167         (struct main_type) <flag_discriminated_union>: New field.
9168
9169 2018-02-26  Tom Tromey  <tom@tromey.com>
9170
9171         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9172         unittests/unpack-selftests.c.
9173         * unittests/unpack-selftests.c: New file.
9174         * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
9175
9176 2018-02-26  Yao Qi  <yao.qi@linaro.org>
9177
9178         * dwarf2read.c (struct partial_die_info) <read>: New method.
9179         (read_partial_die): Remove the declaration.
9180         (load_partial_dies): Update.
9181         (partial_die_info::partial_die_info):
9182         (read_partial_die): Change it to partial_die_info::read.
9183
9184 2018-02-26  Yao Qi  <yao.qi@linaro.org>
9185
9186         * dwarf2read.c (struct partial_die_info) <fixup>: New method.
9187         (fixup_partial_die): Remove declaration.
9188         (scan_partial_symbols): Update.
9189         (partial_die_parent_scope): Likewise.
9190         (partial_die_full_name): Likewise.
9191         (fixup_partial_die): Change it to partial_die_info::fixup.
9192
9193 2018-02-26  Yao Qi  <yao.qi@linaro.org>
9194
9195         * dwarf2read.c (read_partial_die): Update the declaration.
9196         (load_partial_dies): Caller update.
9197         (read_partial_die): Remove one argument abbrev_len.
9198
9199 2018-02-26  Yao Qi  <yao.qi@linaro.org>
9200
9201         * dwarf2read.c (struct partial_die_info): Add ctor, delete
9202         assignment operator.
9203         (load_partial_dies): Use ctor and copy ctor.
9204         (read_partial_die): Update.
9205         (dwarf2_cu::find_partial_die): Use ctor.
9206
9207 2018-02-26  Yao Qi  <yao.qi@linaro.org>
9208
9209         * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
9210         (find_partial_die_in_comp_unit): Change it to
9211         dwarf2_cu::find_partial_die.
9212         (find_partial_die): Update.
9213
9214 2018-02-26  Yao Qi  <yao.qi@linaro.org>
9215
9216         * dwarf2read.c (read_partial_die): Remove the code checking abbrev
9217         is NULL.
9218
9219 2018-02-26  Yao Qi  <yao.qi@linaro.org>
9220
9221         * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
9222
9223 2018-02-26  Alan Hayward  <alan.hayward@arm.com>
9224
9225         * arch/amd64.h: Use common/tdesc.h.
9226         * arch/i386.c: Likewise.
9227         * arch/i386.h: Likewise.
9228         * arch/tic6x.c: Likewise.
9229         * arch/tdesc.h: Move file from here...
9230         * common/tdesc.h: ...to here.
9231         * features/aarch64-core.c: Regenerate.
9232         * features/aarch64-fpu.c: Regenerate.
9233         * features/i386/32bit-avx.c: Regenerate.
9234         * features/i386/32bit-avx512.c: Regenerate.
9235         * features/i386/32bit-core.c: Regenerate.
9236         * features/i386/32bit-linux.c: Regenerate.
9237         * features/i386/32bit-mpx.c: Regenerate.
9238         * features/i386/32bit-pkeys.c: Regenerate.
9239         * features/i386/32bit-sse.c: Regenerate.
9240         * features/i386/64bit-avx.c: Regenerate.
9241         * features/i386/64bit-avx512.c: Regenerate.
9242         * features/i386/64bit-core.c: Regenerate.
9243         * features/i386/64bit-linux.c: Regenerate.
9244         * features/i386/64bit-mpx.c: Regenerate.
9245         * features/i386/64bit-pkeys.c: Regenerate.
9246         * features/i386/64bit-segments.c: Regenerate.
9247         * features/i386/64bit-sse.c: Regenerate.
9248         * features/i386/x32-core.c: Regenerate.
9249         * features/tic6x-c6xp.c: Regenerate.
9250         * features/tic6x-core.c: Regenerate.
9251         * features/tic6x-gp.c: Regenerate.
9252         * target-descriptions.c: Use common/tdesc.h.
9253         * target-descriptions.h: Likewise.
9254
9255 2018-02-24  Tom Tromey  <tom@tromey.com>
9256
9257         * linux-thread-db.c (try_thread_db_load_from_pdir_1)
9258         (try_thread_db_load_from_dir, thread_db_load_search): Use
9259         std::string.
9260         (info_auto_load_libthread_db_compare): Return bool.  Change
9261         argument types.
9262         (info_auto_load_libthread_db): Use std::vector, std::string.
9263         Remove cleanups.
9264
9265 2018-02-24  Tom Tromey  <tom@tromey.com>
9266
9267         * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
9268         std::string.
9269         * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
9270         std::string*.
9271         * gdbarch.c: Rebuild.
9272         * gdbarch.h: Rebuild.
9273         * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
9274         * arch-utils.h (default_fast_tracepoint_valid_at): Update.
9275         * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
9276         std::string*.
9277
9278 2018-02-23  Simon Marchi  <simon.marchi@polymtl.ca>
9279
9280         * gdbtypes.h (sect_offset): Change type to uint64_t.
9281         (sect_offset_str): New function.
9282         * dwarf2read.c (create_addrmap_from_aranges): Use
9283         sect_offset_str.
9284         (error_check_comp_unit_head): Likewise.
9285         (create_debug_type_hash_table): Likewise.
9286         (read_cutu_die_from_dwo): Likewise.
9287         (init_cutu_and_read_dies): Likewise.
9288         (init_cutu_and_read_dies_no_follow): Likewise.
9289         (process_psymtab_comp_unit_reader): Likewise.
9290         (partial_die_parent_scope): Likewise.
9291         (peek_die_abbrev): Likewise.
9292         (process_queue): Likewise.
9293         (dwarf2_physname): Likewise.
9294         (read_namespace_alias): Likewise.
9295         (read_import_statement): Likewise.
9296         (create_dwo_cu_reader): Likewise.
9297         (create_cus_hash_table): Likewise.
9298         (lookup_dwo_cutu): Likewise.
9299         (inherit_abstract_dies): Likewise.
9300         (read_func_scope): Likewise.
9301         (read_call_site_scope): Likewise.
9302         (dwarf2_add_member_fn): Likewise.
9303         (read_common_block): Likewise.
9304         (read_module_type): Likewise.
9305         (read_typedef): Likewise.
9306         (read_subrange_type): Likewise.
9307         (load_partial_dies): Likewise.
9308         (read_partial_die): Likewise.
9309         (find_partial_die): Likewise.
9310         (read_str_index): Likewise.
9311         (dwarf2_string_attr): Likewise.
9312         (build_error_marker_type): Likewise.
9313         (lookup_die_type): Likewise.
9314         (dump_die_shallow): Likewise.
9315         (follow_die_ref): Likewise.
9316         (dwarf2_fetch_die_loc_sect_off): Likewise.
9317         (dwarf2_fetch_constant_bytes): Likewise.
9318         (follow_die_sig): Likewise.
9319         (get_signatured_type): Likewise.
9320         (get_DW_AT_signature_type): Likewise.
9321         (dwarf2_find_containing_comp_unit): Likewise.
9322         (set_die_type): Likewise.
9323
9324 2018-02-21  John Baldwin  <jhb@FreeBSD.org>
9325
9326         * arch/aarch64.c: Include "common-defs.h".
9327         * arch/amd64.c: Likewise.
9328         * arch/i386.c: Likewise.
9329
9330 2018-02-21  Tom Tromey  <tom@tromey.com>
9331
9332         * value.h: (extract_field_op): Update.
9333         * eval.c (extract_field_op): Return a const char *.
9334         * expression.h (parse_expression_for_completion): Update.
9335         * completer.c (complete_expression): Update.
9336         (add_struct_fields): Make fieldname const.
9337         * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
9338         (mark_completion_tag, parse_exp_in_context_1): Update.
9339         (parse_expression_for_completion): Change "name" to
9340         unique_xmalloc_ptr*.
9341
9342 2018-02-21  Tom Tromey  <tom@tromey.com>
9343
9344         * infcall.c (call_function_by_hand_dummy): Use std::vector.
9345
9346 2018-02-21  Yao Qi  <yao.qi@linaro.org>
9347
9348         * avr-tdep.c (avr_read_pc): Change parameter type to
9349         readable_regcache.
9350         * gdbarch.sh (read_pc): Likewise.
9351         * gdbarch.c: Re-generated.
9352         * gdbarch.h: Re-generated.
9353         * hppa-tdep.c (hppa_read_pc): Change parameter type to
9354         readable_regcache.
9355         * ia64-tdep.c (ia64_read_pc): Likewise.
9356         * mips-tdep.c (mips_read_pc): Likewise.
9357         * spu-tdep.c (spu_read_pc): Likewise.
9358
9359 2018-02-21  Yao Qi  <yao.qi@linaro.org>
9360
9361         * Makefile.in (COMMON_SFILES): Add regcache-dump.c
9362         * regcache-dump.c: New file.
9363         * regcache.c: Move register_dump to regcache-dump.c.
9364         (maintenance_print_registers): Likewise.
9365         (maintenance_print_raw_registers): Likewise.
9366         (maintenance_print_cooked_registers): Likewise.
9367         (maintenance_print_register_groups): Likewise.
9368         (maintenance_print_remote_registers): Likewise.
9369         (_initialize_regcache): Likewise.
9370         * regcache.h (register_dump): Moved from regcache.c.
9371
9372 2018-02-21  Yao Qi  <yao.qi@linaro.org>
9373
9374         * regcache.c (regcache::regcache): Update.
9375         (regcache::invalidate): Move it to detached_regcache::invalidate.
9376         (get_thread_arch_aspace_regcache): Update.
9377         (regcache::raw_update): Update.
9378         (regcache::cooked_read): Remove some code.
9379         (regcache::cooked_read_value): Likewise.
9380         (regcache::raw_write): Remove assert on m_readonly_p.
9381         (regcache::raw_supply_integer): Move it to
9382         detached_regcache::raw_supply_integer.
9383         (regcache::raw_supply_zeroed): Likewise.
9384         * regcache.h (detached_regcache) <raw_supply_integer>: New
9385         declaration.
9386         <raw_supply_zeroed, invalidate>: Likewise.
9387         (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
9388         <invalidate>: Likewise.
9389         <m_readonly_p>: Removed.
9390
9391 2018-02-21  Yao Qi  <yao.qi@linaro.org>
9392
9393         * infcmd.c (get_return_value): Let stop_regs point to
9394         get_current_regcache.
9395         * regcache.c (regcache::regcache): Remove.
9396         (register_dump_reg_buffer): New class.
9397         (regcache_print): Adjust.
9398         * regcache.h (regcache): Remove constructors.
9399
9400 2018-02-21  Yao Qi  <yao.qi@linaro.org>
9401
9402         * regcache.c (class register_dump): New class.
9403         (register_dump_regcache, register_dump_none): New class.
9404         (register_dump_remote, register_dump_groups): New class.
9405         (regcache_print): Update.
9406         * regcache.h (regcache_dump_what): Move it to regcache.c.
9407         (regcache) <dump>: Remove.
9408
9409 2018-02-21  Yao Qi  <yao.qi@linaro.org>
9410
9411         * jit.c (struct jit_unwind_private) <regcache>: Change its type to
9412          reg_buffer_rw *.
9413         (jit_unwind_reg_set_impl): Call raw_supply.
9414         (jit_frame_sniffer): Use reg_buffer_rw.
9415         * record-full.c (record_full_core_regbuf): Change its type.
9416         (record_full_core_open_1): Use reg_buffer_rw.
9417         (record_full_close): Likewise.
9418         (record_full_core_fetch_registers): Use regcache->raw_supply.
9419         (record_full_core_store_registers): Likewise.
9420         * regcache.c (regcache::get_register_status): Move it to
9421         reg_buffer.
9422         (regcache_raw_set_cached_value): Remove.
9423         (regcache::raw_set_cached_value): Remove.
9424         (regcache::raw_write): Call raw_supply.
9425         (regcache::raw_supply): Move it to reg_buffer_rw.
9426         * regcache.h (regcache_raw_set_cached_value): Remove.
9427         (reg_buffer_rw): New class.
9428
9429 2018-02-21  Yao Qi  <yao.qi@linaro.org>
9430
9431         * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
9432         readonly_detached_regcache.
9433         (dummy_frame_prev_register): Use regcache->cooked_read.
9434         * frame.c (frame_save_as_regcache): Change return type.
9435         (frame_pop): Update.
9436         * frame.h (frame_save_as_regcache): Update declaration.
9437         * inferior.h (get_infcall_suspend_state_regcache): Update
9438         declaration.
9439         * infrun.c (infcall_suspend_state) <registers>: use
9440         readonly_detached_regcache.
9441         (save_infcall_suspend_state): Don't use regcache_dup.
9442         (get_infcall_suspend_state_regcache): Change return type.
9443         * linux-fork.c (struct fork_info) <savedregs>: Change to
9444         readonly_detached_regcache.
9445         <pc>: New field.
9446         (fork_save_infrun_state): Don't use regcache_dup.
9447         (info_checkpoints_command): Adjust.
9448         * mi/mi-main.c (register_changed_p): Update declaration.
9449         (mi_cmd_data_list_changed_registers): Use
9450         readonly_detached_regcache.
9451         (register_changed_p): Change parameter type to
9452         readonly_detached_regcache.
9453         * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
9454         readonly_detached_regcache.
9455         (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
9456         * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
9457         New.
9458         (regcache::save): Move it to reg_buffer.
9459         (regcache::restore): Change parameter type.
9460         (regcache_dup): Remove.
9461         * regcache.h (reg_buffer) <save>: New method.
9462         (readonly_detached_regcache): New class.
9463         * spu-tdep.c (spu2ppu_cache) <regcache>: Use
9464         readonly_detached_regcache.
9465         (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
9466
9467 2018-02-21  Yao Qi  <yao.qi@linaro.org>
9468
9469         * frame.c (frame_save_as_regcache): Use regcache method save.
9470         (frame_pop): Use regcache method restore.
9471         * infrun.c (restore_infcall_suspend_state): Likewise.
9472         * linux-fork.c (fork_load_infrun_state): Likewise.
9473         * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
9474         save.
9475         * regcache.c (regcache_save): Remove.
9476         (regcache::restore): More asserts.
9477         (regcache_cpy): Remove.
9478         * regcache.h (regcache_save): Remove the declaration.
9479         (regcache::restore): Move from private to public.
9480         Remove the friend declaration of regcache_cpy.
9481         (regcache_cpy): Remove declaration.
9482
9483 2018-02-21  Yao Qi  <yao.qi@linaro.org>
9484
9485         * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
9486         parameter type to 'readable_regcache *'.
9487         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
9488         * arm-tdep.c (arm_neon_quad_read): Likewise.
9489         (arm_pseudo_read): Likewise.
9490         * avr-tdep.c (avr_pseudo_register_read): Likewise.
9491         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
9492         * frv-tdep.c (frv_pseudo_register_read): Likewise.
9493         * gdbarch.c: Re-generated.
9494         * gdbarch.h: Re-generated.
9495         * gdbarch.sh (pseudo_register_read): Change parameter type to
9496         'readable_regcache *'.
9497         (pseudo_register_read_value): Likewise.
9498         * h8300-tdep.c (pseudo_from_raw_register): Likewise.
9499         (h8300_pseudo_register_read): Likewise.
9500         * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
9501         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
9502         (i386_pseudo_register_read_into_value): Likewise.
9503         (i386_pseudo_register_read_value): Likewise.
9504         * i386-tdep.h (i386_pseudo_register_read_into_value): Update
9505         declaration.
9506         * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
9507         * m32c-tdep.c (m32c_raw_read): Likewise.
9508         (m32c_read_flg): Likewise.
9509         (m32c_banked_register): Likewise.
9510         (m32c_banked_read): Likewise.
9511         (m32c_sb_read): Likewise.
9512         (m32c_part_read): Likewise.
9513         (m32c_cat_read): Likewise.
9514         (m32c_r3r2r1r0_read): Likewise.
9515         (m32c_pseudo_register_read): Likewise.
9516         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
9517         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
9518         (mep_pseudo_cr64_read): Likewise.
9519         (mep_pseudo_register_read): Likewise.
9520         * mips-tdep.c (mips_pseudo_register_read): Likewise.
9521         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
9522         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
9523         * regcache.c (regcache::raw_read): Move it to readable_regcache.
9524         (regcache::cooked_read): Likewise.
9525         (regcache::cooked_read_value): Likewise.
9526         (regcache_cooked_read_signed):
9527         (regcache::cooked_read): Likewise.
9528         * regcache.h (readable_regcache): New class.
9529         (regcache): Inherit readable_regcache.  Move some methods to
9530         readable_regcache.
9531         * rl78-tdep.c (rl78_pseudo_register_read): Change
9532         parameter type to 'readable_regcache *'.
9533         * rs6000-tdep.c (do_regcache_raw_read): Remove.
9534         (e500_pseudo_register_read): Change parameter type to
9535         'readable_regcache *'.
9536         (dfp_pseudo_register_read): Likewise.
9537         (vsx_pseudo_register_read): Likewise.
9538         (efpr_pseudo_register_read): Likewise.
9539         * s390-tdep.c (s390_pseudo_register_read): Likewise.
9540         * sh-tdep.c (sh_pseudo_register_read): Likewise.
9541         * sh64-tdep.c (pseudo_register_read_portions): Likewise.
9542         (sh64_pseudo_register_read): Likewise.
9543         * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
9544         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
9545         * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
9546         (spu_pseudo_register_read): Likewise.
9547         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
9548         (xtensa_pseudo_register_read): Likewise.
9549
9550 2018-02-21  Yao Qi  <yao.qi@linaro.org>
9551
9552         * regcache.c (regcache::regcache): Call reg_buffer ctor.
9553         (regcache::arch): Move it to reg_buffer::arch.
9554         (regcache::register_buffer): Likewise.
9555         (regcache::assert_regnum): Likewise.
9556         (regcache::num_raw_registers): Likewise.
9557         * regcache.h (reg_buffer): New class.
9558         (regcache): Inherit reg_buffer.
9559
9560 2018-02-20  Simon Marchi  <simon.marchi@ericsson.com>
9561
9562         * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
9563         gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
9564
9565 2018-02-20  Markus Metzger  <markus.t.metzger@intel.com>
9566
9567         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
9568
9569 2018-02-19  Alan Hayward  <alan.hayward@arm.com>
9570
9571         * Makefile.in: (COMMON_SFILES): Add common/*.c files.
9572         (SFILES): Remove common/*.c files.
9573         (COMMON_OBS): Remove some *.o files built from common/*.c files.
9574         * common/common.host: Add common reference.
9575         * configure.ac: Likewise.
9576         * configure: Regenerate.
9577
9578 2018-02-16  Yao Qi  <yao.qi@linaro.org>
9579
9580         * block.c (block_namespace_info): Inherit allocate_on_obstack.
9581         (block_initialize_namespace): Use new.
9582         * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
9583         (dwarf2_free_objfile): Use delete.
9584         * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
9585         (copy_type_recursive): Use new.
9586         * gdb_obstack.h (allocate_on_obstack): New.
9587
9588 2018-02-15  Yao Qi  <yao.qi@linaro.org>
9589
9590         PR gdb/22849
9591         * inferior.c (exit_inferior_1): Reset inf->control.
9592
9593 2018-02-15  Joel Brobecker  <brobecker@adacore.com>
9594
9595         * ada-lang.c (ada_to_fixed_value_create): Delete advance
9596         declaration.
9597
9598 2018-02-14  Pedro Alves  <palves@redhat.com>
9599
9600         * frame-unwind.c (frame_unwind_try_unwinder): Always call
9601         frame_cleanup_after_sniffer on exception.
9602
9603 2018-02-14  Tom Tromey  <tom@tromey.com>
9604
9605         * solist.h (struct target_so_ops) <bfd_open>: Make pathname
9606         const.
9607         (solib_bfd_open): Make pathname const.
9608         * solib.c (solib_bfd_open): Make pathname const.
9609         * solib-spu.c (spu_bfd_fopen): Make name const.
9610         (spu_bfd_open): Make pathname const.
9611         * solib-darwin.c (darwin_bfd_open): Make pathname const.
9612         * solib-aix.c (solib_aix_bfd_open): Make pathname const.
9613
9614 2018-02-14  Tom Tromey  <tom@tromey.com>
9615
9616         * symfile.c (symfile_bfd_open): Update.
9617         * source.h (openp, source_full_path_of, find_and_open_source):
9618         Change argument type to unique_xmalloc_ptr.
9619         * source.c (openp): Take a unique_xmalloc_ptr.
9620         (source_full_path_of, find_and_open_source): Likewise.
9621         (open_source_file, symtab_to_fullname): Update.
9622         * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
9623         unique_xmalloc_ptr.
9624         * solib.c (solib_find_1): Use unique_xmalloc_ptr.
9625         (exec_file_find): Update.
9626         * psymtab.c (psymtab_to_fullname): Update.
9627         * nto-tdep.h (nto_find_and_open_solib): Update.
9628         * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
9629         unique_xmalloc_ptr.
9630         * exec.c (exec_file_attach): Update.
9631         * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
9632         * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
9633
9634 2018-02-14  Tom Tromey  <tom@tromey.com>
9635
9636         * solib.c: Include source.h.
9637         * nto-tdep.c: Include source.h.
9638         * mi/mi-cmd-env.c: Include source.h.
9639         * infcmd.c: Include source.h.
9640         * exec.c: Include source.h.
9641         * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
9642         (add_path, directory_switch, source_path, init_source_path): Move
9643         declarations...
9644         * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
9645         (add_path, directory_switch, source_path, init_source_path):
9646         ...here.
9647
9648 2018-02-14  Tom Tromey  <tom@tromey.com>
9649
9650         * solist.h (exec_file_find, solib_find): Return
9651         unique_xmalloc_ptr.
9652         (solib_bfd_fopen): Take a const char *.
9653         * solib.c (solib_find_1): Return unique_xmalloc_ptr.
9654         (exec_file_find, solib_find): Likewise.
9655         (solib_bfd_fopen): Do not take ownership of "pathname".
9656         (solib_bfd_open): Use unique_xmalloc_ptr.
9657         * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
9658         * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
9659         * infrun.c (follow_exec): Use unique_xmalloc_ptr.
9660         * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
9661
9662 2018-02-14  Joel Brobecker  <brobecker@adacore.com>
9663
9664         * ada-lang.c (name_match_type_from_name): Remove reference to
9665         ada_name_for_lookup in function's documentation.
9666         * ada-lang.h (ada_name_for_lookup): Delete declaration.
9667
9668 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
9669
9670         * defs.h (enum openp_flags): New enum.
9671         (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
9672         Move to enum openp_flags.
9673         (openp_flags): New enum flags.
9674         (openp): Change parameter type to openp_flags.
9675         * source.c (openp): Change parameter type to openp_flags.
9676         * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
9677         * dwarf2read.c (try_open_dwop_file): Use openp_flags.
9678
9679 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
9680
9681         * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
9682         per-command.
9683
9684 2018-02-12  Andrew Burgess  <andrew.burgess@embecosm.com>
9685
9686         * dwarf2read.c (dwarf2_release_queue): Delete function, move body
9687         into...
9688         (class dwarf2_queue_guard): ...the destructor of this new class.
9689         (dw2_do_instantiate_symtab): Create instance of the new class
9690         dwarf2_queue_guard, remove cleanup.
9691
9692 2018-02-09  Tom Tromey  <tom@tromey.com>
9693
9694         * source.c (find_source_lines): Don't reference past the end of
9695         the vector.
9696
9697 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
9698
9699         * remote.c (remote_btrace_maybe_reopen): Change error message.
9700         * btrace.c (btrace_enable): Likewise.
9701         (parse_xml_btrace): Likewise.
9702         (parse_xml_btrace_conf): Likewise.
9703
9704 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
9705
9706         * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
9707         (linux_enable_pt, linux_enable_bts): Call
9708         diagnose_perf_event_open_fail.
9709
9710 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
9711
9712         * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
9713         Remove parameter and change return type.  Update callers.  Move it.
9714         (linux_enable_bts, linux_enable_pt): Improve error message.
9715         (linux_enable_pt): Remove zero buffer size check.
9716         (linux_enable_btrace): Improve error messages.  Remove NULL return
9717         check.
9718
9719 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
9720
9721         * btrace.c (btrace_enable): Remove target_supports_btrace call.
9722         * nat/linux-btrace.c (perf_event_pt_event_type): Move.
9723         (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
9724         (linux_supports_pt, linux_supports_btrace): Remove.
9725         (linux_enable_bts): Call cpu_supports_bts.
9726         * nat/linux-btrace.h (linux_supports_btrace): Remove.
9727         * remote.c (remote_supports_btrace): Remove.
9728         (init_remote_ops): Remove remote_supports_btrace.
9729         * target-delegates.c: Regenerated.
9730         * target.c (target_supports_btrace): Remove.
9731         * target.h (target_ops) <to_supports_btrace>: Remove
9732         (target_supports_btrace): Remove.
9733         * x86-linux-nat.c (x86_linux_create_target): Remove
9734         linux_supports_btrace.
9735
9736 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
9737
9738         * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
9739         btrace failed.
9740         * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
9741         exception and use message in own exception.
9742
9743 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
9744
9745         * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
9746         (perf_event_pt_event_type): Use gdb_file_up.
9747         (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
9748         scoped_fd, and scoped_mmap.
9749
9750 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
9751
9752         * common/scoped_mmap.h: New.
9753         * unittests/scoped_mmap-selftest.c: New.
9754         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9755         unittests/scoped_mmap-selftest.c.
9756
9757 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
9758
9759         * common/scoped_fd.h: New.
9760         * unittests/scoped_fd-selftest.c: New.
9761         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9762         unittests/scoped_fd-selftest.c.
9763
9764 2018-02-09  Tom Tromey  <tom@tromey.com>
9765
9766         * auto-load.c (auto_load_section_scripts): Use
9767         gdb::unique_xmalloc_ptr.
9768
9769 2018-02-09  Tom Tromey  <tom@tromey.com>
9770
9771         * auto-load.c (execute_script_contents): Use std::string.
9772
9773 2018-02-09  Joel Brobecker  <brobecker@adacore.com>
9774
9775         * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
9776         Python function, rather than a new command.
9777
9778 2018-02-08  Tom Tromey  <tom@tromey.com>
9779
9780         * solib.c (solib_find_1): Use std::string.
9781         (solib_bfd_fopen): Use unique_xmalloc_ptr.
9782
9783 2018-02-08  Tom Tromey  <tom@tromey.com>
9784
9785         * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
9786
9787 2018-02-08  Tom Tromey  <tom@tromey.com>
9788
9789         * source.c (find_source_lines): Use gdb::def_vector.
9790
9791 2018-02-08  Tom Tromey  <tom@tromey.com>
9792
9793         * macrocmd.c (struct temporary_macro_definition): New.
9794         (macro_define_command): Use temporary_macro_definition.  Remove
9795         cleanups.
9796         (free_macro_definition_ptr): Remove.
9797
9798 2018-02-08  Tom Tromey  <tom@tromey.com>
9799
9800         * macroexp.c (maybe_expand): Use std::string.
9801
9802 2018-02-08  Tom Tromey  <tom@tromey.com>
9803
9804         * macroexp.c (struct macro_buffer): Add initializers for some
9805         members.
9806         (init_buffer, init_shared_buffer, free_buffer)
9807         (free_buffer_return_text): Remove.
9808         (macro_buffer): New constructors.
9809         (~macro_buffer): New destructor.
9810         (macro_buffer::set_shared): New method.
9811         (macro_buffer::resize_buffer, macro_buffer::appendc)
9812         (macro_buffer::appendmem): Now methods, not free functions.
9813         (set_token, append_tokens_without_splicing, stringify)
9814         (macro_stringify): Update.
9815         (gather_arguments): Change return type.  Remove argc_p argument,
9816         add args_ptr argument.  Use std::vector.
9817         (substitute_args): Remove argc argument.  Accept std::vector.
9818         (expand): Update.  Use std::vector.
9819         (scan, macro_expand, macro_expand_next): Update.
9820
9821 2018-02-08  Tom Tromey  <tom@tromey.com>
9822
9823         * symtab.c (default_collect_symbol_completion_matches_break_on):
9824         Use unique_xmalloc_ptr.
9825         * macroscope.h: (sal_macro_scope, user_macro_scope)
9826         (default_macro_scope): Return unique_xmalloc_ptr.
9827         * macroscope.c (sal_macro_scope, user_macro_scope)
9828         (default_macro_scope): Return unique_xmalloc_ptr.
9829         * macroexp.h (macro_expand, macro_expand_once): Return
9830         unique_xmalloc_ptr.
9831         * macroexp.c (macro_expand, macro_expand_once): Return
9832         unique_xmalloc_ptr.
9833         * macrocmd.c (macro_expand_command, macro_expand_once_command)
9834         (info_macro_command, info_macros_command): Use
9835         unique_xmalloc_ptr.
9836         * compile/compile-c-support.c (write_macro_definitions): Use
9837         unique_xmalloc_ptr.
9838         * c-exp.y (c_parse): Use unique_xmalloc_ptr.
9839
9840 2018-02-07  Simon Marchi  <simon.marchi@ericsson.com>
9841
9842         * value.c (value_static_field): Assign field type instead of
9843         containing type when returning an optimized out value.
9844
9845 2018-02-06  Yao Qi  <yao.qi@linaro.org>
9846
9847         * ft32-tdep.c (ft32_read_pc): Remove.
9848         (ft32_write_pc): Remove.
9849         (ft32_gdbarch_init): Update.
9850         * m32r-tdep.c (m32r_read_pc): Remove.
9851         (m32r_gdbarch_init): Update.
9852         * mep-tdep.c (mep_read_pc): Remove.
9853         (mep_gdbarch_init): Update.
9854         * microblaze-tdep.c (microblaze_write_pc): Remove.
9855         (microblaze_gdbarch_init): Update.
9856         * mn10300-tdep.c (mn10300_read_pc): Remove.
9857         (mn10300_write_pc): Remove.
9858         (mn10300_gdbarch_init): Update.
9859         * moxie-tdep.c (moxie_read_pc): Remove.
9860         (moxie_write_pc): Remove.
9861         (moxie_gdbarch_init): Update.
9862
9863 2018-02-06  Yao Qi  <yao.qi@linaro.org>
9864
9865         * expprint.c (print_subexp_standard): Handle
9866         OP_F77_UNDETERMINED_ARGLIST.
9867         (dump_subexp_body_standard): Likewise.
9868
9869 2018-02-05  Alan Hayward  <alan.hayward@arm.com>
9870
9871         * target-descriptions.c (tdesc_element_visitor) Add empty
9872         implementations.
9873         (tdesc_type): Move make_gdb_type from here.
9874         (tdesc_type_builtin): Likewise.
9875         (tdesc_type_vector): Likewise.
9876         (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
9877         (make_gdb_type_struct): Move from tdesc_type_with_fields.
9878         (make_gdb_type_union): Likewise.
9879         (make_gdb_type_flags): Likewise.
9880         (make_gdb_type_enum): Likewise.
9881         (make_gdb_type): New function.
9882         (tdesc_register_type): Use static make_gdb_type.
9883
9884 2018-02-05  Ruslan Kabatsayev <b7.10110111@gmail.com>
9885
9886         * infcmd.c (default_print_one_register_info): Align natural-format
9887         column values consistently one under another.
9888         (pad_to_column): New function.
9889
9890 2018-02-05  Joel Brobecker  <brobecker@adacore.com>
9891
9892         * dwarf2read.c (dwarf2_physname): Move commment.
9893
9894 2018-02-01  Leszek Swirski  <leszeks@google.com>
9895
9896         * varobj.c (varobj_formatted_print_options): Allow recursive
9897         pretty printing if pretty printing is enabled.
9898
9899 2018-02-01  Leszek Swirski  <leszeks@google.com>
9900
9901         * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
9902         names after a structop as a filename.
9903
9904 2018-02-01  Yao Qi  <yao.qi@linaro.org>
9905
9906         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
9907         (arm_record_coproc_data_proc): Likewise.
9908
9909 2018-02-01  Yao Qi  <yao.qi@linaro.org>
9910
9911         * arm-tdep.c (arm_record_extension_space): Change ret to signed.
9912
9913 2018-01-31  Nikola Prica  <nikola.prica@rt-rk.com>
9914
9915         * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
9916         assign shifted lr_reg to fdata->lr_register when lr_reg is set.
9917
9918 2018-01-31  Pedro Alves  <palves@redhat.com>
9919
9920         * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
9921         * inflow.c (child_terminal_save_inferior): Wrap reference to
9922         tcgetpgrp in HAVE_TERMIOS_H.
9923         (child_interrupt, child_pass_ctrlc): Wrap references to signal in
9924         _WIN32.
9925         * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
9926         always iterate over all inferiors.
9927         (gdbsim_cntrl_c): Adjust.
9928         * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
9929
9930 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
9931
9932         * gdbtypes.c (lookup_array_range_type): Make sure the array's
9933         index type is objfile-owned if the element type is as well.
9934
9935 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
9936
9937         GDB 8.1 released.
9938
9939 2018-01-30  Philipp Rudo  <prudo@linux.vnet.ibm.com>
9940
9941         * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
9942         "features/s390x-linux64.c".
9943         (_initialize_s390_linux_tdep): Remove initialization of tdescs
9944         s390_linux32 and s390x_linux64.
9945         (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
9946         default tdesc.
9947         * s390-tdep.c: Include "features/s390-linux32.c" and
9948         "features/s390x-linux64.c".
9949         (s390_tdesc_valid): Add check for tdesc_has_registers.
9950         (s390_gdbarch_init): Make sure there is always a valid tdesc.
9951         (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
9952         tdesc_s390x_linux64.
9953         * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
9954         tdesc_s390x_linux64 to...
9955         * s390-tdep.h: ...here.
9956
9957 2018-01-30  Pedro Alves  <palves@redhat.com>
9958
9959         PR gdb/13211
9960         * config.in, configure: Regenerate.
9961         * configure.ac: Check for getpgid.
9962         * go32-nat.c (go32_pass_ctrlc): New.
9963         (go32_target): Install it.
9964         * inf-child.c (inf_child_target): Install
9965         child_terminal_save_inferior, child_pass_ctrlc and
9966         child_interrupt.
9967         * inf-ptrace.c (inf_ptrace_interrupt): Delete.
9968         (inf_ptrace_target): No longer install it.
9969         * infcmd.c (interrupt_target_1): Adjust.
9970         * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
9971         (child_interrupt): Declare.
9972         (inferior::terminal_state): New.
9973         * inflow.c (struct terminal_info): Update comments.
9974         (inferior_process_group): Delete.
9975         (terminal_is_ours): Delete.
9976         (gdb_tty_state): New.
9977         (child_terminal_init): Adjust.
9978         (is_gdb_terminal, sharing_input_terminal_1)
9979         (sharing_input_terminal): New functions.
9980         (child_terminal_inferior): Adjust.  Use sharing_input_terminal.
9981         Set the process's actual process group in the foreground if
9982         possible.  Handle is_ours_for_output/is_ours distinction.  Don't
9983         mark terminal as the inferior's if not sharing GDB's terminal.
9984         Don't check attach_flag.
9985         (child_terminal_ours_for_output, child_terminal_ours): Adjust to
9986         pass down a target_terminal_state.
9987         (child_terminal_save_inferior): New, factored out from ...
9988         (child_terminal_ours_1): ... this.  Handle
9989         target_terminal_state::is_ours_for_output.
9990         (child_interrupt, child_pass_ctrlc): New.
9991         (inflow_inferior_exit): Clear the inferior's terminal_state.
9992         (copy_terminal_info): Copy the inferior's terminal state.
9993         (_initialize_inflow): Remove reference to terminal_is_ours.
9994         * inflow.h (inferior_process_group): Delete.
9995         * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
9996         * procfs.c (procfs_target): Don't install procfs_interrupt.
9997         (procfs_interrupt): Delete.
9998         * remote.c (remote_serial_quit_handler): Adjust.
9999         (remote_interrupt): Remove ptid parameter.  Adjust.
10000         * target-delegates.c: Regenerate.
10001         * target.c: Include "terminal.h".
10002         (target_terminal::terminal_state): Rename to ...
10003         (target_terminal::m_terminal_state): ... this.
10004         (target_terminal::init): Adjust.
10005         (target_terminal::inferior): Adjust to per-inferior
10006         terminal_state.
10007         (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
10008         (target_terminal::ours, target_terminal::ours_for_output): Use
10009         target_terminal_is_ours_kind.
10010         (target_interrupt): Remove ptid parameter.  Adjust.
10011         (default_target_pass_ctrlc): Adjust.
10012         * target.h (target_ops::to_terminal_save_inferior): New field.
10013         (target_ops::to_interrupt): Remove ptid_t parameter.
10014         (target_interrupt): Remove ptid_t parameter.  Update comment.
10015         (target_pass_ctrlc): Update comment.
10016         * target/target.h (target_terminal_state): New scoped enum,
10017         factored out of ...
10018         (target_terminal::terminal_state): ... here.
10019         (target_terminal::inferior): Update comments.
10020         (target_terminal::restore_inferior): New.
10021         (target_terminal::is_inferior, target_terminal::is_ours)
10022         (target_terminal::is_ours_for_output): Adjust.
10023         (target_terminal::scoped_restore_terminal_state): Adjust to
10024         rename, and call restore_inferior() instead of inferior().
10025         (target_terminal::scoped_restore_terminal_state::m_state): Change
10026         type.
10027         (target_terminal::terminal_state): Rename to ...
10028         (target_terminal::m_terminal_state): ... this and change type.
10029
10030 2018-01-30  Pedro Alves  <palves@redhat.com>
10031
10032         * linux-nat.c (wait_for_signal): New function.
10033         (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
10034         directly.
10035         (async_terminal_is_ours)
10036         (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
10037         (linux_nat_add_target): Don't override
10038         to_terminal_inferior/to_terminal_ours.
10039
10040 2018-01-29  Sergio Durigan Junior  <sergiodj@redhat.com>
10041
10042         * remote.c (remote_follow_fork): Don't call "detach_inferior".
10043
10044 2018-01-28  Simon Marchi  <simon.marchi@ericsson.com>
10045
10046         * dwarf2read.c (free_dwo_files): Add forward-declaration.
10047         (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
10048         dwarf2_per_objfile_free here.
10049         (dwarf2_per_objfile_free): Remove.
10050         (_initialize_dwarf2_read): Don't register
10051         dwarf2_per_objfile_free as a registry cleanup.
10052
10053 2018-01-27  Eli Zaretskii  <eliz@gnu.org>
10054
10055         Avoid compilation errors in MinGW native builds
10056
10057         The error is triggered by including python-internal.h, and the
10058         error message is:
10059
10060              In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
10061                       from build-gnulib/import/math.h:27,
10062                       from d:/usr/Python26/include/pyport.h:235,
10063                       from d:/usr/Python26/include/Python.h:58,
10064                       from python/python-internal.h:94,
10065                       from python/py-arch.c:24:
10066              d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
10067         using ::hypot;
10068                 ^~~~~
10069
10070         This happens because Python headers define 'hypot' to expand t
10071         '_hypot' in the Windows builds.
10072         * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
10073         'hypoth'.  This avoids a compilation error.
10074
10075 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
10076
10077         * MAINTAINERS (Write After Approval): Fix ordering.
10078
10079 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
10080
10081         * MAINTAINERS (Write After Approval): Add Alan Hayward.
10082
10083 2018-01-26  Alan Modra  <amodra@gmail.com>
10084
10085         * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
10086         (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
10087         Remove nop.  Make const.  Comment.
10088         (powerpc32_plt_stub_so_2): New.
10089         (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
10090         Correct count.  Update uses.
10091         (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
10092         Move common code reading PLT entry word.  Correct
10093         powerpc32_plt_stub PLT address calculation.
10094         * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
10095         (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
10096         (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
10097         (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
10098         (ppc64_standard_linkage8): Likewise.
10099         * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
10100         Correct insns description.
10101         * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
10102
10103 2018-01-24  Pedro Alves  <palves@redhat.com>
10104
10105         GCC PR libstdc++/83906
10106         * gdbtypes.c (operator==(const dynamic_prop &,
10107         const dynamic_prop &)): New.
10108         (operator==(const range_bounds &, const range_bounds &)): New.
10109         (check_types_equal): Use them instead of memcmp.
10110         * gdbtypes.h (operator==(const dynamic_prop &,
10111         const dynamic_prop &)): Declare.
10112         (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
10113         (operator==(const range_bounds &, const range_bounds &)): Declare.
10114         (operator!=(const range_bounds &, const range_bounds &)): Declare.
10115
10116 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
10117
10118         * s390-linux-tdep.c (s390_record_address_mask)
10119         (s390_record_calc_disp_common, s390_record_calc_disp)
10120         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
10121         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
10122         (s390_process_record): Move to s390-tdep.c.
10123         (s390_linux_init_abi_any): Adjust.
10124         * s390-tdep.c (s390_record_address_mask)
10125         (s390_record_calc_disp_common, s390_record_calc_disp)
10126         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
10127         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
10128         (s390_process_record): Moved from s390-linux-tdep.c
10129         (s390_gdbarch_init): Adjust.
10130
10131 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
10132
10133         * s390-linux-nat.c (s390-tdep.h): New include.
10134         * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
10135         (HFILES_NO_SRCDIR): Add s390-tdep.h.
10136         (ALLDEPFILES): Add s390-tdep.c.
10137         * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
10138         * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
10139         * s390-tdep.h: ...this.  New file.
10140         * s390-linux-tdep.c (s390-tdep.h): New include.
10141         (_initialize_s390_tdep): Rename to...
10142         (_initialize_s390_linux_tdep): ...this and adjust.
10143         (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
10144         (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
10145         s390-tdep.h.
10146         (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
10147         (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
10148         (s390_is_partial_instruction, s390_software_single_step)
10149         (is_non_branch_ril, s390_displaced_step_copy_insn)
10150         (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
10151         (s390_prologue_data, s390_addr, s390_store, s390_load)
10152         (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
10153         (s390_register_call_saved, s390_guess_tracepoint_registers)
10154         (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
10155         (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
10156         (s390_pseudo_register_name, s390_pseudo_register_type)
10157         (s390_pseudo_register_read, s390_pseudo_register_write)
10158         (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
10159         (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
10160         (s390_addr_bits_remove, s390_address_class_type_flags)
10161         (s390_address_class_type_flags_to_name)
10162         (s390_address_class_name_to_type_flags, s390_effective_inner_type)
10163         (s390_function_arg_float, s390_function_arg_vector)
10164         (is_power_of_two, s390_function_arg_integer, s390_arg_state)
10165         (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
10166         (s390_frame_align, s390_register_return_value, s390_return_value)
10167         (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
10168         (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
10169         (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
10170         (s390_trad_frame_prev_register, s390_unwind_cache)
10171         (s390_prologue_frame_unwind_cache)
10172         (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
10173         (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
10174         (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
10175         (s390_stub_frame_this_id, s390_stub_frame_prev_register)
10176         (s390_stub_frame_sniffer, s390_stub_frame_unwind)
10177         (s390_frame_base_address, s390_local_base_address)
10178         (s390_frame_base, s390_gcc_target_options)
10179         (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
10180         (s390_validate_reg_range, s390_tdesc_valid)
10181         (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
10182         * s390-tdep.c: ...this.  New file.
10183
10184 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
10185
10186         * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
10187         (s390_process_record, s390_gdbarch_tdep_alloc)
10188         (s390_linux_init_abi_any): Use/set new hook.
10189
10190 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
10191
10192         * s390-linux-tdep.c (osabi.h): New include.
10193         (s390_linux_init_abi_31, s390_linux_init_abi_64)
10194         (s390_linux_init_abi_any): New functions.
10195         (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
10196
10197 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
10198
10199         * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
10200         tdesc_has_registers check
10201
10202 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
10203
10204         * s390-linux-tdep.c (s390_tdesc_valid): New function.
10205         (s390_validate_reg_range): New macro.
10206         (s390_gdbarch_init): Adjust.
10207
10208 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
10209
10210         * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
10211         (s390_gdbarch_tdep_alloc): Adjust.
10212         (s390_gdbarch_init): Adjust.
10213
10214 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
10215
10216         * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
10217         <have_tdb>: Change type to bool.
10218         (s390_gdbarch_tdep_alloc): Adjust.
10219         (s390_gdbarch_init): Adjust.
10220
10221 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
10222
10223         * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
10224         (gdbarch_tdep) <have_upper, have_vx>: New fields.
10225         (s390_gdbarch_tdep_alloc): New function.
10226         (s390_gdbarch_init): Allocate tdep at start and use its fields
10227         instead of separate variables.
10228
10229 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
10230
10231         * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
10232         when looking for cached gdbarch and add comment for remaining.
10233
10234 2018-01-22  Pedro Alves  <palves@redhat.com>
10235             Sergio Durigan Junior  <sergiodj@redhat.com>
10236
10237         * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
10238         case.
10239
10240 2018-01-22  Maciej W. Rozycki  <macro@mips.com>
10241
10242         * MAINTAINERS: Update my company e-mail address.
10243
10244 2018-01-22  Yao Qi  <yao.qi@linaro.org>
10245
10246         * regcache.c (cooked_write_test): New function.
10247         (_initialize_regcache): Register the test.
10248
10249 2018-01-22  Yao Qi  <yao.qi@linaro.org>
10250
10251         * ia64-tdep.c (ia64_pseudo_register_read): Call
10252         regcache->cooked_read instead of regcache_cooked_read_unsigned.
10253         * m32c-tdep.c (m32c_cat_read): Likewise.
10254         (m32c_r3r2r1r0_read): Likewise.
10255         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
10256         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
10257
10258 2018-01-22  Yao Qi  <yao.qi@linaro.org>
10259
10260         * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
10261         method raw_read instead of regcache_raw_read.
10262         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
10263         * arm-tdep.c (arm_neon_quad_read): Likewise.
10264         * avr-tdep.c (avr_pseudo_register_read): Likewise.
10265         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
10266         * frv-tdep.c (frv_pseudo_register_read): Likewise.
10267         * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
10268         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
10269         (i386_pseudo_register_read_into_value): Likewise.
10270         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
10271         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
10272         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
10273         * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
10274         * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
10275         * sparc-tdep.c (sparc32_pseudo_register_read):  Likewise.
10276         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
10277         * spu-tdep.c (spu_pseudo_register_read_spu):  Likewise.
10278         * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
10279
10280 2018-01-22  Yao Qi  <yao.qi@linaro.org>
10281
10282         * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
10283         * configure.tgt: Remove target mt.
10284         * mt-tdep.c: Remove.
10285         * regcache.c (cooked_read_test): Remove the check for mt.
10286
10287 2018-01-22  Yao Qi  <yao.qi@linaro.org>
10288
10289         * jit.c (jit_frame_prev_register): Call regcache::cooked_read
10290         instead of gdbarch_pseudo_register_read_value.
10291
10292 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
10293
10294         * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
10295         language is Ada.
10296
10297 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
10298
10299         * linespec.c (create_sals_line_offset): Remove code that preserved
10300         the symtab_and_line's line number.
10301
10302 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
10303
10304         * varobj.c (varobj_create): Don't set valid_block when creating a
10305         floating varobj.
10306
10307 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
10308
10309         * varobj.c (varobj_create): Remove out of date comment.
10310
10311 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
10312
10313         PR mi/20395
10314         * ada-exp.y (write_var_from_sym): Pass extra parameter when
10315         updating innermost block.
10316         * parse.c (innermost_block_tracker::update): Take extra type
10317         parameter, and check types match before updating innermost block.
10318         (write_dollar_variable): Update innermost block for registers.
10319         * parser-defs.h (enum innermost_block_tracker_type): New enum.
10320         (innermost_block_tracker::innermost_block_tracker): Initialise
10321         m_types member.
10322         (innermost_block_tracker::reset): Take type parameter.
10323         (innermost_block_tracker::update): Take type parameter, and pass
10324         type through as needed.
10325         (innermost_block_tracker::m_types): New member.
10326         * varobj.c (varobj_create): Pass type when reseting innermost
10327         block.
10328
10329 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
10330
10331         * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
10332         * ada-lang.c (resolve_subexp): Likewise.
10333         * breakpoint.c (set_breakpoint_condition) Likewise.
10334         (watch_command_1) Likewise.
10335         * c-exp.y (variable): Likewise.
10336         * d-exp.y (PrimaryExpression): Likewise.
10337         * f-exp.y (variable): Likewise.
10338         * go-exp.y (variable): Likewise.
10339         * m2-exp.y (variable): Likewise.
10340         * objfiles.c (objfile::~objfile): Likewise.
10341         * p-exp.y (variable): Likewise.
10342         * parse.c (innermost_block): Change type.
10343         * parser-defs.h (class innermost_block_tracker): New.
10344         (innermost_block): Change to innermost_block_tracker.
10345         * printcmd.c (display_command): Switch to innermost_block API.
10346         (do_one_display): Likewise.
10347         * rust-exp.y (do_one_display): Likewise.
10348         * symfile.c (clear_symtab_users): Likewise.
10349         * varobj.c (varobj_create): Switch to innermost_block API, replace
10350         use of innermost_block with block stored on varobj object.
10351
10352 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
10353
10354         * expression.h (innermost_block): Remove declaration.
10355         * varobj.c: Add 'parser-defs.h' include.
10356
10357 2018-01-19  Tom Tromey  <tom@tromey.com>
10358
10359         * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
10360         symbols in the static and global blocks.
10361
10362 2018-01-19  James Clarke  <jrtc27@jrtc27.com>
10363
10364         * nat/linux-ptrace.c: Remove unnecessary reinclusion of
10365         gdb_ptrace.h, and move including gdb_wait.h ...
10366         * nat/linux-ptrace.h: ... to here.
10367
10368 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
10369
10370         * inf-ptrace.c (inf_ptrace_detach): Adjust call to
10371         inf_ptrace_detach_success.
10372         (inf_ptrace_detach_success): Add inferior parameter, use it
10373         instead of inferior_ptid, pass it to detach_inferior.
10374         * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
10375         parameter.
10376         * inferior.c (detach_inferior): Add overload that takes an
10377         inferior object.
10378         * inferior.h (detach_inferior): Likewise.
10379         * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
10380         use inferior_ptid, adjust call to inf_ptrace_detach_success.
10381         * linux-thread-db.c (thread_db_detach): Use inf parameter.
10382
10383 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
10384
10385         * target.h (struct target_ops) <to_detach>: Add inferior
10386         parameter.
10387         (target_detach): Likewise.
10388         * target.c (dispose_inferior): Pass inferior down.
10389         (target_detach): Pass inferior down.  Assert that it is equal to
10390         the current inferior.
10391         * aix-thread.c (aix_thread_detach): Pass inferior down.
10392         * corefile.c (core_file_command): Pass current_inferior() down.
10393         * corelow.c (core_detach): Add inferior parameter.
10394         * darwin-nat.c (darwin_detach): Likewise.
10395         * gnu-nat.c (gnu_detach): Likewise.
10396         * inf-ptrace.c (inf_ptrace_detach): Likewise.
10397         * infcmd.c (detach_command): Pass current_inferior() down to
10398         target_detach.
10399         * infrun.c (follow_fork_inferior): Pass parent_inf to
10400         target_detach.
10401         (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
10402         target_detach.
10403         * linux-nat.c (linux_nat_detach): Add inferior parameter.
10404         * linux-thread-db.c (thread_db_detach): Likewise.
10405         * nto-procfs.c (procfs_detach): Likewise.
10406         * procfs.c (procfs_detach): Likewise.
10407         * record.c (record_detach): Likewise.
10408         * record.h (struct inferior): Forward-declare.
10409         (record_detach): Add inferior parameter.
10410         * remote-sim.c (gdbsim_detach): Likewise.
10411         * remote.c (remote_detach_1): Likewise.
10412         (remote_detach): Likewise.
10413         (extended_remote_detach): Likewise.
10414         * sol-thread.c (sol_thread_detach): Likewise.
10415         * target-debug.h (target_debug_print_inferior_p): New macro.
10416         * target-delegates.c: Re-generate.
10417         * top.c (kill_or_detach): Pass inferior down to target_detach.
10418         * windows-nat.c (windows_detach): Add inferior parameter.
10419
10420 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
10421
10422         * target.h (struct target_ops) <to_detach>: Remove args
10423         parameter.
10424         (target_detach): Likewise.
10425         * target.c (dispose_inferior): Adjust.
10426         (target_detach): Remove args parameter, adjust.
10427         * aix-thread.c (aix_thread_detach): Adjust.
10428         * corefile.c (core_file_command): Adjust.
10429         * corelow.c (core_detach): Adjust.
10430         * darwin-nat.c (darwin_detach): Adjust.
10431         * gnu-nat.c (gnu_detach): Adjust.
10432         * inf-ptrace.c (inf_ptrace_detach): Adjust.
10433         * infcmd.c (detach_command): Adjust
10434         * infrun.c (follow_fork_inferior): Adjust.
10435         (handle_vfork_child_exec_or_exit): Adjust.
10436         * linux-fork.c (linux_fork_detach): Remove args parameter.
10437         * linux-fork.h (linux_fork_detach): Likewise.
10438         * linux-nat.c (linux_nat_detach): Likewise, and adjust.
10439         * linux-thread-db.c (thread_db_detach): Likewise.
10440         * nto-procfs.c (procfs_detach): Likewise.
10441         * procfs.c (procfs_detach): Likewise.
10442         (do_detach): Remove signo parameter.
10443         * record.c (record_detach): Remove args parameter.
10444         * record.h (record_detach): Likewise.
10445         * remote-sim.c (gdbsim_detach): Likewise.
10446         * remote.c (remote_detach_1): Likewise.
10447         (remote_detach): Likewise.
10448         (extended_remote_detach): Likewise.
10449         * sol-thread.c (sol_thread_detach): Likewise.
10450         * target-delegates.c: Re-generate.
10451         * top.c (struct qt_args) <args>: Remove field.
10452         (kill_or_detach): Don't pass args.
10453         (quit_force): Don't set args.
10454         * windows-nat.c (windows_detach): Remove args parameter.
10455
10456 2018-01-19  Yao Qi  <yao.qi@linaro.org>
10457
10458         * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
10459         (arm_linux_init_abi): Install it.
10460
10461 2018-01-19  Yao Qi  <yao.qi@linaro.org>
10462
10463         * osabi.c (gdb_osabi_names): Extend the regexp for
10464         arm-linux-gnueabihf.
10465
10466 2018-01-18  Yao Qi  <yao.qi@linaro.org>
10467
10468         * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
10469         m_abbrevs.
10470         (abbrev_table::add_abbrev): Update.
10471         (abbrev_table::lookup_abbrev): Update.
10472
10473 2018-01-18  Yao Qi  <yao.qi@linaro.org>
10474
10475         * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
10476
10477 2018-01-17  Sergio Durigan Junior  <sergiodj@redhat.com>
10478
10479         * compile/compile.c (compile_to_object): Convert "triplet_rx"
10480         to "std::string".
10481
10482 2018-01-17  Tom Tromey  <tom@tromey.com>
10483
10484         * dwarf2read.c (symbolp): Remove typedef.  Don't instantiate VEC.
10485
10486 2018-01-17  Tom Tromey  <tom@tromey.com>
10487
10488         * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
10489         * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
10490         (create_array_type_with_stride): Update.
10491         * dwarf2read.c (set_die_type): Update.
10492
10493 2018-01-17  Tom Tromey  <tom@tromey.com>
10494
10495         * dwarf2read.c (delayed_method_info): Remove typedef.
10496         (dwarf2_cu::method_info): Now a std::vector.
10497         (add_to_method_list): Update.
10498         (free_delayed_list): Remove.
10499         (compute_delayed_physnames): Update.
10500         (process_full_comp_unit, process_full_type_unit): Clear the method
10501         list.  Remove cleanups.
10502         (psymtab_include_file_name): Add name_holder parameter.  Use
10503         unique_xmalloc_ptr.
10504         (dwarf_decode_lines): Update.
10505
10506 2018-01-17  Tom Tromey  <tom@tromey.com>
10507             Simon Marchi  <simon.marchi@ericsson.com>
10508
10509         * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
10510         (dwarf2_per_objfile::free_cached_comp_units)
10511         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
10512         (init_cutu_and_read_dies_no_follow): Update.
10513         (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
10514         (dwarf2_cu::~dwarf2_cu): New.
10515         (free_heap_comp_unit, free_stack_comp_unit): Remove.
10516         (age_cached_comp_units, free_one_cached_comp_unit): Update.
10517
10518 2018-01-17  Tom Tromey  <tom@tromey.com>
10519             Simon Marchi  <simon.marchi@ericsson.com>
10520
10521         * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
10522         (struct die_reader_specs) <abbrev_table>: New member.
10523         (struct abbrev_table): Add constructor.
10524         <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
10525         <abbrev_obstack>: Now an auto_obstack.
10526         (abbrev_table_up): New typedef.
10527         (init_cu_die_reader): Add abbrev_table parameter.
10528         (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
10529         Add result_dwo_abbrev_table.
10530         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
10531         (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
10532         Update.
10533         (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
10534         parameter.
10535         (skip_children): Update.
10536         (abbrev_table::alloc_abbrev): Rename from
10537         abbrev_table_alloc_abbrev.
10538         (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
10539         (abbrev_table::lookup_abbrev): Rename from
10540         abbrev_table_lookup_abbrev.
10541         (abbrev_table_read_table): Return abbrev_table_up.
10542         (abbrev_table_free, abbrev_table_free_cleanup)
10543         (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
10544         (load_partial_dies): Update.
10545
10546 2018-01-17  Tom Tromey  <tom@tromey.com>
10547
10548         * dwarf2read.c (dwarf2_compute_name): Update comment.
10549         (read_func_scope, read_variable): Update.
10550         (new_symbol): Remove.
10551         (new_symbol_full): Rename to new_symbol.
10552
10553 2018-01-17  Mike Gulick  <mgulick@mathworks.com>
10554
10555         PR gdb/16577
10556         * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
10557         a warning instead of throwing an error, set section size to 0 and return
10558         NULL.
10559         * gdb_bfd.h (gdb_bfd_map_section): Update description.
10560
10561 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
10562
10563         * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
10564         std::string.
10565         (linux_ptrace_attach_fail_reason_string): Likewise.
10566         * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
10567         Likewise.
10568         (linux_ptrace_attach_fail_reason_string): Likewise.
10569         * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
10570
10571 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
10572
10573         * linux-nat.c (linux_nat_attach): Remove xstrdup.
10574
10575 2018-01-17  Eldar Abusalimov  <eldar.abusalimov@jetbrains.com>
10576
10577         PR gdb/21559
10578         * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
10579         checking for fs_base/gs_base fields in struct user_regs_struct.
10580         * configure: Regenerate.
10581
10582 2018-01-17  Yao Qi  <yao.qi@linaro.org>
10583
10584         * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
10585         function.
10586         (aarch64_linux_init_abi): Install it to gdbarch hook
10587         gcc_target_options.
10588
10589 2018-01-15  Pedro Alves  <palves@redhat.com>
10590
10591         * common/signals-state-save-restore.c
10592         (save_original_signals_state): Fix typos.
10593
10594 2017-01-12  Tom Tromey  <tom@tromey.com>
10595             Sergio Durigan Junior  <sergiodj@redhat.com>
10596
10597         * Makefile.in (install-only): Install gdb-add-index.
10598
10599 2018-01-12  John Baldwin  <jhb@FreeBSD.org>
10600
10601         * fbsd-tdep.c (KVE_PROTECTION): Correct value.
10602
10603 2018-01-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10604
10605         * infrun.c (keep_going_pass_signal): Clear step-over info when
10606         insert_breakpoints fails.
10607
10608 2018-01-11  Pedro Alves  <palves@redhat.com>
10609
10610         PR gdb/22583
10611         * infrun.c (resume): Rename to ...
10612         (resume_1): ... this.
10613         (resume): Reimplement as wrapper around resume_1.
10614
10615 2018-01-11  Pedro Alves  <palves@redhat.com>
10616
10617         PR remote/22597
10618         * remote.c (remote_parse_stop_reply): Default to the last-set
10619         general thread instead of to 'magic_null_ptid'.
10620
10621 2018-01-10  Pedro Alves  <palves@redhat.com>
10622
10623         * language.h (language_get_symbol_name_matcher): Rename ...
10624         (get_symbol_name_matcher): ... this.
10625         * language.c (language_get_symbol_name_matcher): Ditto.
10626         * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
10627         callers adjusted.
10628
10629 2018-01-10  Pedro Alves  <palves@redhat.com>
10630
10631         PR gdb/22670
10632         * dwarf2read.c
10633         (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
10634         Adjust to use language_get_symbol_name_matcher instead of
10635         language_defn::la_get_symbol_name_matcher.
10636         * language.c (language_get_symbol_name_matcher): If in Ada mode
10637         and the lookup name is a verbatim match, return Ada's matcher.
10638         * language.h (language_get_symbol_name_matcher): Adjust comment.
10639         (ada_lookup_name_info::verbatim_p):: New method.
10640
10641 2018-01-10  Pedro Alves  <palves@redhat.com>
10642
10643         PR gdb/22670
10644         * ada-lang.c (ada_collect_symbol_completion_matches): If the
10645         minsym's language is language_auto or language_cplus, pass down
10646         language_ada instead.
10647         * symtab.c (compare_symbol_name): Don't frob symbol language here.
10648
10649 2018-01-10  Pedro Alves  <palves@redhat.com>
10650
10651         PR gdb/22670
10652         * minsyms.c (linkage_name_str): New function.
10653         (iterate_over_minimal_symbols): Use it.
10654
10655 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
10656
10657         * NEWS: Document that 'info proc' now works on FreeBSD.
10658
10659 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
10660
10661         * configure.ac: Check for kinfo_getfile in libutil.
10662         * configure: Regenerate.
10663         * config.in: Regenerate.
10664         * fbsd-nat.c: Include "fbsd-tdep.h".
10665         (fbsd_fetch_cmdline): New.
10666         (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
10667         rather than calling error.
10668         (fbsd_info_proc): New.
10669         (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
10670         (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
10671         (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
10672
10673 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
10674
10675         * fbsd-nat.c (struct free_deleter): Remove.
10676         (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
10677
10678 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
10679
10680         * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
10681         NULL for an empty pathname.
10682
10683 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
10684
10685         * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
10686         (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
10687         (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
10688         (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
10689         (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
10690         (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
10691         (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
10692         (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
10693         (kinfo_proc_layout_32, kinfo_proc_layout_i386)
10694         (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
10695         (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
10696         (fbsd_core_fetch_timeval, fbsd_print_sigset)
10697         (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
10698         (fbsd_init_abi):  Install gdbarch "core_info_proc" method.
10699         * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
10700
10701 2018-01-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>
10702
10703         * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
10704         (gnu_xfer_auxv): New function.
10705         (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
10706         TARGET_OBJECT_AUXV.
10707
10708 2018-01-08  Yao Qi  <yao.qi@linaro.org>
10709             Simon Marchi  <simon.marchi@ericsson.com>
10710
10711         * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
10712         common/selftest.c.
10713         (COMMON_OBS): Remove selftest.o.
10714         * configure.ac: Append selftest-arch.c and common/selftest.c to
10715         CONFIG_SRCS.  Append selftest-arch.o and selftest.o to COMMON_OBS.
10716         * configure: Re-generated.
10717         * maint.c (maintenance_selftest): Wrap selftests::run_tests with
10718         GDB_SELF_TEST.
10719         (maintenance_info_selftests): Likewise.
10720
10721 2018-01-08  Xavier Roirand  <roirand@adacore.com>
10722
10723         * ada-valprint.c (val_print_packed_array_elements): Use
10724         proper number of elements when printing an array indexed
10725         by an enumeration type.
10726
10727 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
10728
10729         * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
10730         (dw2_get_file_names_reader): Adjust.
10731         (lookup_dwo_signatured_type): Adjust.
10732         (lookup_dwp_signatured_type): Adjust.
10733         (lookup_signatured_type): Adjust.
10734         (create_type_unit_group): Adjust.
10735         (get_type_unit_group): Adjust.
10736         (process_psymtab_comp_unit_reader): Adjust.
10737         (build_type_psymtabs_reader): Adjust.
10738         (scan_partial_symbols): Adjust.
10739         (add_partial_symbol): Adjust.
10740         (add_partial_subprogram): Adjust.
10741         (peek_die_abbrev): Adjust.
10742         (fixup_go_packaging): Adjust.
10743         (process_imported_unit_die): Adjust.
10744         (dwarf2_compute_name): Adjust.
10745         (dwarf2_physname): Adjust.
10746         (read_import_statement): Adjust.
10747         (handle_DW_AT_stmt_list): Adjust.
10748         (read_file_scope): Adjust.
10749         (read_func_scope): Adjust.
10750         (read_lexical_block_scope): Adjust.
10751         (read_call_site_scope): Adjust.
10752         (read_variable): Adjust.
10753         (dwarf2_rnglists_process): Adjust.
10754         (dwarf2_ranges_process): Adjust.
10755         (dwarf2_ranges_read): Adjust.
10756         (dwarf2_get_pc_bounds): Adjust.
10757         (dwarf2_record_block_ranges): Adjust.
10758         (dwarf2_add_field): Adjust.
10759         (dwarf2_add_member_fn): Adjust.
10760         (read_structure_type): Adjust.
10761         (process_structure_scope): Adjust.
10762         (read_enumeration_type): Adjust.
10763         (read_array_type): Adjust.
10764         (mark_common_block_symbol_computed): Adjust.
10765         (read_common_block): Adjust.
10766         (read_namespace_type): Adjust.
10767         (read_namespace): Adjust.
10768         (read_module_type): Adjust.
10769         (read_tag_pointer_type): Adjust.
10770         (read_tag_ptr_to_member_type): Adjust.
10771         (read_tag_string_type): Adjust.
10772         (read_subroutine_type): Adjust.
10773         (read_typedef): Adjust.
10774         (read_base_type): Adjust.
10775         (attr_to_dynamic_prop): Adjust.
10776         (read_subrange_type): Adjust.
10777         (read_unspecified_type): Adjust.
10778         (dwarf2_read_abbrevs): Adjust.
10779         (load_partial_dies): Adjust.
10780         (read_partial_die): Adjust.
10781         (find_partial_die): Adjust.
10782         (guess_partial_die_structure_name): Adjust.
10783         (fixup_partial_die): Adjust.
10784         (read_attribute_value): Adjust.
10785         (read_addr_index): Adjust.
10786         (read_addr_index_from_leb128): Adjust.
10787         (read_str_index): Adjust.
10788         (dwarf2_string_attr): Adjust.
10789         (get_debug_line_section): Adjust.
10790         (dwarf_decode_line_header): Adjust.
10791         (lnp_state_machine::check_line_address): Adjust.
10792         (dwarf_decode_lines_1): Adjust.
10793         (dwarf_decode_lines): Adjust.
10794         (dwarf2_start_symtab): Adjust.
10795         (var_decode_location): Adjust.
10796         (new_symbol_full): Adjust.
10797         (dwarf2_const_value_data): Adjust.
10798         (dwarf2_const_value_attr): Adjust.
10799         (dwarf2_const_value): Adjust.
10800         (die_type): Adjust.
10801         (die_containing_type): Adjust.
10802         (build_error_marker_type): Adjust.
10803         (lookup_die_type): Adjust.
10804         (guess_full_die_structure_name): Adjust.
10805         (anonymous_struct_prefix): Adjust.
10806         (determine_prefix): Adjust.
10807         (dwarf2_name): Adjust.
10808         (follow_die_ref_or_sig): Adjust.
10809         (follow_die_offset): Adjust.
10810         (follow_die_ref): Adjust.
10811         (follow_die_sig_1): Adjust.
10812         (follow_die_sig): Adjust.
10813         (get_signatured_type): Adjust.
10814         (get_DW_AT_signature_type): Adjust.
10815         (decode_locdesc): Adjust.
10816         (dwarf_decode_macros): Adjust.
10817         (cu_debug_loc_section): Adjust.
10818         (fill_in_loclist_baton): Adjust.
10819         (dwarf2_symbol_mark_computed): Adjust.
10820         (init_one_comp_unit): Don't assign
10821         dwarf2_cu::dwarf2_per_objfile.
10822         (set_die_type): Adjust.
10823
10824 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
10825
10826         * dwarf2read.c (struct mapped_debug_names): Add constructor.
10827         <dwarf2_per_objfile>: New field.
10828         (dwarf2_per_objfile): Remove global.
10829         (get_dwarf2_per_objfile): New function.
10830         (set_dwarf2_per_objfile): New function.
10831         (dwarf2_build_psymtabs_hard): Change objfile parameter to
10832         dwarf2_per_objfile.
10833         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
10834         (read_abbrev_offset): Likewise.
10835         (read_indirect_string): Likewise.
10836         (read_indirect_line_string): Likewise.
10837         (read_indirect_string_at_offset): Likewise.
10838         (read_indirect_string_from_dwz): Likewise.
10839         (dwarf2_find_containing_comp_unit): Change objfile parameter to
10840         dwarf2_per_objfile.
10841         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
10842         (create_all_comp_units): Change objfile parameter to
10843         dwarf2_per_objfile.
10844         (create_all_type_units): Likewise.
10845         (process_queue): Add dwarf2_per_objfile parameter.
10846         (read_and_check_comp_unit_head): Likewise.
10847         (lookup_dwo_unit_in_dwp): Likewise.
10848         (get_dwp_file): Likewise.
10849         (process_cu_includes): Likewise.
10850         (struct free_dwo_file_cleanup_data): New struct.
10851         (dwarf2_has_info): Use get_dwarf2_per_objfile and
10852         set_dwarf2_per_objfile.
10853         (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
10854         (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
10855         context, adjust calls.
10856         (dw2_instantiate_symtab): Likewise.
10857         (dw2_get_cutu): Add dwarf2_per_objfile parameter.
10858         (dw2_get_cu): Likewise.
10859         (create_cu_from_index_list): Change objfile parameter to
10860         dwarf2_per_objfile.
10861         (create_cus_from_index_list): Get dwarf2_per_objfile from
10862         context, adjust calls.
10863         (create_cus_from_index): Likewise.
10864         (create_signatured_type_table_from_index): Change objfile
10865         parameter to dwarf2_per_objfile.
10866         (create_signatured_type_table_from_debug_names): Change objfile
10867         parameter to dwarf2_per_objfile.
10868         (create_addrmap_from_index): Likewise.
10869         (create_addrmap_from_aranges): Likewise.
10870         (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
10871         (dw2_setup): Remove.
10872         (dw2_get_file_names_reader): Get dwarf2_per_objfile from
10873         context.
10874         (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
10875         get_dwarf2_per_objfile.
10876         (dw2_forget_cached_source_info): Likewise.
10877         (dw2_map_symtabs_matching_filename): Likewise.
10878         (struct dw2_symtab_iterator) <index>: Remove.
10879         <dwarf2_per_objfile>: New field.
10880         (dw2_symtab_iter_init): Replace index parameter with
10881         dwarf2_per_objfile.
10882         (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
10883         (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
10884         (dw2_print_stats): Likewise.
10885         (dw2_dump): Likewise.
10886         (dw2_expand_symtabs_for_function): Likewise.
10887         (dw2_expand_all_symtabs): Likewise.
10888         (dw2_expand_symtabs_with_fullname): Likewise.
10889         (dw2_expand_marked_cus): Replace index and objfile parameters
10890         with dwarf2_per_objfile.
10891         (dw_expand_symtabs_matching_file_matcher): Add
10892         dwarf2_per_objfile parameter and adjust calls.
10893         (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
10894         adjust calls.
10895         (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
10896         (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
10897         adjust calls.
10898         (create_cus_from_debug_names_list): Replace objfile parameter
10899         with dwarf2_per_objfile and adjust calls.
10900         (create_cus_from_debug_names): Likewise.
10901         (dwarf2_read_debug_names): Likewise.
10902         (mapped_debug_names::namei_to_name): Adjust call.
10903         (dw2_debug_names_iterator::next): Likewise.
10904         (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
10905         (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
10906         (dw2_debug_names_dump): Likewise.
10907         (dw2_debug_names_expand_symtabs_for_function): Likewise.
10908         (dw2_debug_names_expand_symtabs_matching): Likewise.
10909         (dwarf2_initialize_objfile): Likewise.
10910         (dwarf2_build_psymtabs): Likewise.
10911         (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
10912         this_cu.
10913         (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
10914         (read_and_check_comp_unit_head): Likewise.
10915         (read_abbrev_offset): Likewise.
10916         (create_debug_type_hash_table): Likewise.
10917         (create_debug_types_hash_table): Likewise.
10918         (create_all_type_units): Replace objfile parameter with
10919         dwarf2_per_objfile.
10920         (add_type_unit): Add dwarf2_per_objfile parameter.
10921         (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
10922         with dwarf2_per_objfile.
10923         (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
10924         (lookup_dwp_signatured_type): Likewise.
10925         (lookup_signatured_type): Likewise.
10926         (read_cutu_die_from_dwo): Likewise.
10927         (init_tu_and_read_dwo_dies): Likewise.
10928         (init_cutu_and_read_dies): Likewise.
10929         (init_cutu_and_read_dies_no_follow): Likewise.
10930         (allocate_type_unit_groups_table): Add objfile parameter.
10931         (create_type_unit_group): Use dwarf2_per_objfile from cu.
10932         (get_type_unit_group): Likewise.
10933         (process_psymtab_comp_unit): Update call.
10934         (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
10935         (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
10936         (print_tu_stats): Likewise.
10937         (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
10938         in void* parameter.
10939         (build_type_psymtabs): Change objfile parameter to
10940         dwarf2_per_objfile.
10941         (process_skeletonless_type_unit): Use dwarf2_per_objfile
10942         passed in void* parameter.
10943         (process_skeletonless_type_units): Change objfile parameter to
10944         dwarf2_per_objfile.
10945         (set_partial_user): Likewise.
10946         (dwarf2_build_psymtabs_hard): Likewise.
10947         (read_comp_units_from_section): Likewise.
10948         (create_all_comp_units): Likewise.
10949         (scan_partial_symbols): Update calls.
10950         (add_partial_symbol): Likewise.
10951         (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
10952         (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
10953         (process_queue): Add dwarf2_per_objfile parameter.
10954         (get_compunit_symtab): Use dwarf2_per_objfile from cu.
10955         (compute_compunit_symtab_includes): Likewise.
10956         (process_cu_includes): Add dwarf2_per_objfile parameter.
10957         (process_full_comp_unit): Use dwarf2_per_objfile from cu.
10958         (process_full_type_unit): Likewise.
10959         (process_imported_unit_die): Update call.
10960         (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
10961         (read_file_scope): Likewise.
10962         (allocate_dwo_file_hash_table): Add objfile parameter.
10963         (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
10964         (create_cus_hash_table): Likewise.
10965         (create_dwp_hash_table): Likewise.
10966         (create_dwo_unit_in_dwp_v1): Likewise.
10967         (create_dwp_v2_section): Likewise.
10968         (create_dwo_unit_in_dwp_v2): Likewise.
10969         (lookup_dwo_unit_in_dwp): Likewise.
10970         (try_open_dwop_file): Likewise.
10971         (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
10972         (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
10973         cleanup to include a reference to dwarf2_per_objfile.
10974         (open_dwp_file): Add dwarf2_per_objfile parameter.
10975         (open_and_init_dwp_file): Likewise.
10976         (get_dwp_file): Likewise.
10977         (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
10978         (queue_and_load_all_dwo_tus): Update call.
10979         (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
10980         data.
10981         (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
10982         (dwarf2_ranges_process): Likewise.
10983         (dwarf2_get_pc_bounds): Likewise.
10984         (mark_common_block_symbol_computed): Likewise.
10985         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
10986         (dwarf2_read_abbrevs): Update call.
10987         (read_partial_die): Use dwarf2_per_objfile from cu.
10988         (find_partial_die): Likewise.
10989         (fixup_partial_die): Likewise.
10990         (read_attribute_value): Likewise.
10991         (read_indirect_string_at_offset_from): Add objfile parameter.
10992         (read_indirect_string_at_offset): Add dwarf2_per_objfile
10993         parameter.
10994         (read_indirect_string_from_dwz): Add objfile parameter.
10995         (read_indirect_string): Add objfile parameter.
10996         (read_addr_index_1): Add dwarf2_per_objfile parameter.
10997         (read_addr_index): Use dwarf2_per_objfile from cu.
10998         (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
10999         call dw2_setup.
11000         (read_str_index): Use dwarf2_per_objfile from cu.
11001         (get_debug_line_section): Likewise.
11002         (read_formatted_entries): Add dwarf2_per_objfile parameter.
11003         (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
11004         (new_symbol_full): Use dwarf2_per_objfile from cu.
11005         (build_error_marker_type): Likewise.
11006         (lookup_die_type): Likewise.
11007         (determine_prefix): Likewise.
11008         (follow_die_offset): Likewise.
11009         (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
11010         (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
11011         (dwarf2_fetch_die_type_sect_off): Likewise.
11012         (dwarf2_get_die_type): Likewise.
11013         (follow_die_sig_1): Use dwarf2_per_objfile from cu.
11014         (get_signatured_type): Likewise.
11015         (get_DW_AT_signature_type): Likewise.
11016         (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
11017         (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
11018         (cu_debug_loc_section): Likewise.
11019         (fill_in_loclist_baton): Likewise.
11020         (dwarf2_symbol_mark_computed): Likewise.
11021         (dwarf2_find_containing_comp_unit): Change objfile parameter to
11022         dwarf2_per_objfile.
11023         (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
11024         parameter.
11025         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
11026         (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
11027         (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
11028         (set_die_type): Use dwarf2_free_objfile from cu.
11029         (get_die_type_at_offset): Likewise.
11030         (dwarf2_per_objfile_free): Don't assign global variable.
11031         (debug_names) <constructor>: Add dwarf2_per_objfile
11032         parameter, update m_debugstrlookup construction.
11033         (debug_names::debug_str_lookup): Add dwarf2_per_objfile
11034         parameter.
11035         <m_dwarf2_per_objfile>: New field.
11036         <lookup>: Use m_dwarf2_per_objfile.
11037         (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
11038         (psyms_seen_size): Likewise.
11039         (write_gdbindex): Replace objfile parameter with
11040         dwarf2_per_objfile.
11041         (write_debug_names): Likewise.
11042         (write_psymtabs_to_index): Likewise.
11043         (save_gdb_index_command): Use get_dwarf2_per_objfile, update
11044         calls.
11045
11046 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
11047
11048         * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
11049         <dwarf2_per_objfile>: New field.
11050         (struct dwarf2_per_cu_data) <objfile>: Remove.
11051         <dwarf2_per_objfile>: New field.
11052         (create_cu_from_index_list): Assign dwarf2_per_objfile instead
11053         of objfile.
11054         (create_signatured_type_table_from_index): Likewise.
11055         (create_debug_type_hash_table): Likewise.
11056         (fill_in_sig_entry_from_dwo_entry): Likewise.
11057         (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
11058         (create_type_unit_group): Assign dwarf2_per_objfile instead of
11059         objfile.
11060         (create_partial_symtab): Access objfile through
11061         dwarf2_per_objfile.
11062         (process_psymtab_comp_unit_reader): Likewise.
11063         (read_comp_units_from_section): Likewise.
11064         (scan_partial_symbols): Likewise.
11065         (add_partial_symbol): Likewise.
11066         (add_partial_subprogram): Likewise.
11067         (peek_die_abbrev): Likewise.
11068         (fixup_go_packaging): Likewise.
11069         (process_full_comp_unit): Likewise.
11070         (process_full_type_unit): Likewise.
11071         (process_imported_unit_die): Likewise.
11072         (dwarf2_compute_name): Likewise.
11073         (dwarf2_physname): Likewise.
11074         (read_import_statement): Likewise.
11075         (create_cus_hash_table): Assign dwarf2_physname instead of
11076         objfile.
11077         (read_func_scope): Access objfile through dwarf2_per_objfile.
11078         (read_lexical_block_scope): Likewise.
11079         (read_call_site_scope): Likewise.
11080         (read_variable): Likewise.
11081         (dwarf2_rnglists_process): Likewise.
11082         (dwarf2_ranges_process): Likewise.
11083         (dwarf2_ranges_read): Likewise.
11084         (dwarf2_record_block_ranges): Likewise.
11085         (dwarf2_add_field): Likewise.
11086         (dwarf2_add_member_fn): Likewise.
11087         (read_structure_type): Likewise.
11088         (process_structure_scope): Likewise.
11089         (read_enumeration_type): Likewise.
11090         (read_array_type): Likewise.
11091         (read_common_block): Likewise.
11092         (read_namespace_type): Likewise.
11093         (read_namespace): Likewise.
11094         (read_module_type): Likewise.
11095         (read_tag_pointer_type): Likewise.
11096         (read_tag_ptr_to_member_type): Likewise.
11097         (read_tag_string_type): Likewise.
11098         (read_subroutine_type): Likewise.
11099         (read_typedef): Likewise.
11100         (read_base_type): Likewise.
11101         (attr_to_dynamic_prop): Likewise.
11102         (read_subrange_type): Likewise.
11103         (read_unspecified_type): Likewise.
11104         (load_partial_dies): Likewise.
11105         (read_partial_die): Likewise.
11106         (find_partial_die): Likewise.
11107         (guess_partial_die_structure_name): Likewise.
11108         (fixup_partial_die): Likewise.
11109         (read_attribute_value): Likewise.
11110         (read_addr_index_from_leb128): Likewise.
11111         (dwarf2_read_addr_index): Likewise.
11112         (dwarf2_string_attr): Likewise.
11113         (lnp_state_machine::check_line_address): Likewise.
11114         (dwarf_decode_lines_1): Likewise.
11115         (dwarf_decode_lines): Likewise.
11116         (dwarf2_start_symtab): Likewise.
11117         (var_decode_location): Likewise.
11118         (new_symbol_full): Likewise.
11119         (dwarf2_const_value_data): Likewise.
11120         (dwarf2_const_value_attr): Likewise.
11121         (dwarf2_const_value): Likewise.
11122         (die_type): Likewise.
11123         (die_containing_type): Likewise.
11124         (lookup_die_type): Likewise.
11125         (guess_full_die_structure_name): Likewise.
11126         (anonymous_struct_prefix): Likewise.
11127         (dwarf2_name): Likewise.
11128         (follow_die_ref_or_sig): Likewise.
11129         (follow_die_offset): Likewise.
11130         (follow_die_ref): Likewise.
11131         (dwarf2_fetch_die_loc_sect_off): Likewise.
11132         (dwarf2_fetch_constant_bytes): Likewise.
11133         (dwarf2_fetch_die_type_sect_off): Likewise.
11134         (dwarf2_get_die_type): Likewise.
11135         (follow_die_sig): Likewise.
11136         (decode_locdesc): Likewise.
11137         (dwarf2_per_cu_objfile): Likewise.
11138         (dwarf2_per_cu_text_offset): Likewise.
11139         (init_one_comp_unit): Assign dwarf2_per_objfile instead of
11140         objfile.
11141         (set_die_type): Access objfile through
11142         dwarf2_per_objfile.
11143
11144 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
11145
11146         * valprint.c (converted_character_d): Remove typedef.
11147         (DEF_VEC_O (converted_character_d)): Remove.
11148         (count_next_character): Use std::vector.
11149         (print_converted_chars_to_obstack): Likewise.
11150         (generic_printstr): Likewise.
11151
11152 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
11153
11154         * xml-support.h (struct gdb_xml_value): Add constructor.
11155         <value>: Change type to unique_xmalloc_ptr.
11156         (gdb_xml_value_s): Remove typedef.
11157         (DEF_VEC_O (gdb_xml_value_s)): Remove.
11158         (gdb_xml_element_start_handler): Change parameter type to
11159         std::vector.
11160         (xml_find_attribute): Likewise.
11161         * xml-support.c (xml_find_attribute): Change parameter type to
11162         std::vector and adjust.
11163         (gdb_xml_values_cleanup): Remove.
11164         (gdb_xml_parser::start_element): Adjust to std::vector.
11165         (xinclude_start_include): Change paraeter type to std::vector
11166         and adjust.
11167         * btrace.c (check_xml_btrace_version): Likewise.
11168         (parse_xml_btrace_block): Likewise.
11169         (parse_xml_btrace_pt_config_cpu): Likewise.
11170         (parse_xml_btrace_pt): Likewise.
11171         (parse_xml_btrace_conf_bts): Likewise.
11172         (parse_xml_btrace_conf_pt): Likewise.
11173         * memory-map.c (memory_map_start_memory): Likewise.
11174         (memory_map_start_property): Likewise.
11175         * osdata.c (osdata_start_osdata): Likewise.
11176         (osdata_start_item): Likewise.
11177         (osdata_start_column): Likewise.
11178         * remote.c (start_thread): Likewise.
11179         * solib-aix.c (library_list_start_library): Likewise.
11180         (library_list_start_list): Likewise.
11181         * solib-svr4.c (library_list_start_library): Likewise.
11182         (svr4_library_list_start_list): Likewise.
11183         * solib-target.c (library_list_start_segment): Likewise.
11184         (library_list_start_section): Likewise.
11185         (library_list_start_library): Likewise.
11186         (library_list_start_list): Likewise.
11187         * tracepoint.c (traceframe_info_start_memory): Likewise.
11188         (traceframe_info_start_tvar): Likewise.
11189         * xml-syscall.c (syscall_start_syscall): Likewise.
11190         * xml-tdesc.c (tdesc_start_target): Likewise.
11191         (tdesc_start_feature): Likewise.
11192         (tdesc_start_reg): Likewise.
11193         (tdesc_start_union): Likewise.
11194         (tdesc_start_struct): Likewise.
11195         (tdesc_start_flags): Likewise.
11196         (tdesc_start_enum): Likewise.
11197         (tdesc_start_field): Likewise.
11198         (tdesc_start_enum_value): Likewise.
11199         (tdesc_start_vector): Likewise.
11200
11201 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
11202
11203         * extension.h (struct xmethod_worker) <clone>: Remove.
11204         * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
11205         Remove.
11206         (python_xmethod_worker::clone): Remove.
11207         * valops.c (find_overload_match): Use std::move instead of
11208         clone.
11209
11210 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
11211
11212         * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
11213         (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
11214         <free_xmethod_worker_data>: Remove.
11215         <get_matching_xmethod_workers>: Chance VEC to std::vector.
11216         <get_xmethod_arg_types>: Remove.
11217         <get_xmethod_result_type>: Remove.
11218         <invoke_xmethod>: Remove.
11219         * extension.c (new_xmethod_worker): Remove.
11220         (clone_xmethod_worker): Remove.
11221         (get_matching_xmethod_workers): Return void, pass std::vector by
11222         pointer.
11223         (get_xmethod_arg_types): Rename to...
11224         (xmethod_worker::get_arg_types): ... this, and adjust.
11225         (get_xmethod_result_type): Rename to...
11226         (xmethod_worker::get_result_type): ... this, and adjust.
11227         (invoke_xmethod): Remove.
11228         (free_xmethod_worker): Remove.
11229         (free_xmethod_worker_vec): Remove.
11230         * extension.h (enum ext_lang_rc): Move here from
11231         extension-priv.h.
11232         (struct xmethod_worker): Add constructor and destructor.
11233         <data>: Remove.
11234         <value>: Remove.
11235         <invoke, clone, do_get_result_type, do_get_arg_types>: New
11236         virtual pure methods.
11237         <get_arg_types, get_result_type>: New methods.
11238         (xmethod_worker_ptr): Remove typedef.
11239         (DEF_VEC_P (xmethod_worker_ptr)): Remove.
11240         (xmethod_worker_vec): Remove typedef.
11241         (xmethod_worker_up): New typedef.
11242         (invoke_xmethod): Remove.
11243         (clone_xmethod_worker): Remove.
11244         (free_xmethod_worker): Remove.
11245         (free_xmethod_worker_vec): Remove.
11246         (get_xmethod_arg_types): Remove.
11247         (get_xmethod_result_type): Remove.
11248         * valops.c (find_method_list): Use std::vector, don't use
11249         intermediate vector.
11250         (value_find_oload_method_list): Use std::vector.
11251         (find_overload_match): Use std::vector.
11252         (find_oload_champ): Use std::vector.
11253         * value.c (value_free): Use operator delete.
11254         (value_of_xmethod): Rename to...
11255         (value_from_xmethod): ... this.  Don't assign
11256         xmethod_worker::value, take rvalue-reference.
11257         (result_type_of_xmethod): Adjust.
11258         (call_xmethod): Adjust.
11259         * value.h: Include extension.h.
11260         (struct xmethod_worker): Don't forward-declare.
11261         (value_of_xmethod): Rename to...
11262         (value_from_xmethod): ... this, take rvalue-reference.
11263         * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
11264         (struct python_xmethod_worker): ... this, add constructor and
11265         destructor.
11266         <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
11267         (gdbpy_free_xmethod_worker_data): Rename to...
11268         (python_xmethod_worker::~python_xmethod_worker): ... this and
11269         adjust.
11270         (gdbpy_clone_xmethod_worker_data): Rename to...
11271         (python_xmethod_worker::clone): ... this and adjust.
11272         (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
11273         temporary vector.
11274         (gdbpy_get_xmethod_arg_types): Rename to...
11275         (python_xmethod_worker::do_get_arg_types): ... this and adjust.
11276         (gdbpy_get_xmethod_result_type): Rename to...
11277         (python_xmethod_worker::do_get_result_type): ... this and
11278         adjust.
11279         (gdbpy_invoke_xmethod): Rename to...
11280         (python_xmethod_worker::invoke): ... this and adjust.
11281         (new_python_xmethod_worker): Rename to...
11282         (python_xmethod_worker::python_xmethod_worker): ... this and
11283         adjust.
11284         * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
11285         Remove.
11286         (gdbpy_free_xmethod_worker_data): Remove.
11287         (gdbpy_get_matching_xmethod_workers): Use std::vector.
11288         (gdbpy_get_xmethod_arg_types): Remove.
11289         (gdbpy_get_xmethod_result_type): Remove.
11290         (gdbpy_invoke_xmethod): Remove.
11291         * python/python.c (python_extension_ops): Remove obsolete
11292         callbacks.
11293
11294 2018-01-05  Pedro Alves  <palves@redhat.com>
11295
11296         PR gdb/18653
11297         * common/signals-state-save-restore.c
11298         (save_original_signals_state): New parameter 'quiet'.  Warn if we
11299         find a custom handler preinstalled, instead of internal erroring.
11300         But only warn if !quiet.
11301         * common/signals-state-save-restore.h
11302         (save_original_signals_state): New parameter 'quiet'.
11303         * main.c (captured_main_1): Move save_original_signals_state call
11304         after option handling, and pass QUIET.
11305
11306 2018-01-05  Pedro Alves  <palves@redhat.com>
11307
11308         * spu-tdep.c (spu_catch_start): Pass
11309         symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
11310
11311 2018-01-05  Pedro Alves  <palves@redhat.com>
11312
11313         PR gdb/22670
11314         * ada-lang.c (literal_symbol_name_matcher): New function.
11315         (ada_get_symbol_name_matcher): Use it for
11316         symbol_name_match_type::SEARCH_NAME.
11317         * block.c (block_lookup_symbol): New parameter 'match_type'.  Pass
11318         it down instead of assuming symbol_name_match_type::FULL.
11319         * block.h (block_lookup_symbol): New parameter 'match_type'.
11320         * c-valprint.c (print_unpacked_pointer): Use
11321         lookup_symbol_search_name instead of lookup_symbol.
11322         * compile/compile-object-load.c (get_out_value_type): Pass down
11323         symbol_name_match_type::SEARCH_NAME.
11324         * cp-namespace.c (cp_basic_lookup_symbol): Pass down
11325         symbol_name_match_type::FULL.
11326         * cp-support.c (cp_get_symbol_name_matcher): Handle
11327         symbol_name_match_type::SEARCH_NAME.
11328         * infrun.c (insert_exception_resume_breakpoint): Use
11329         lookup_symbol_search_name.
11330         * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
11331         * psymtab.c (maintenance_check_psymtabs): Use
11332         symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
11333         * stack.c (print_frame_args): Use lookup_symbol_search_name and
11334         SYMBOL_SEARCH_NAME.
11335         * symtab.c (lookup_local_symbol): Don't demangle the lookup name
11336         if symbol_name_match_type::SEARCH_NAME.
11337         (lookup_symbol_in_language): Pass down
11338         symbol_name_match_type::FULL.
11339         (lookup_symbol_search_name): New.
11340         (lookup_language_this): Pass down
11341         symbol_name_match_type::SEARCH_NAME.
11342         (lookup_symbol_aux, lookup_local_symbol): New parameter
11343         'match_type'.  Pass it down.
11344         * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
11345         (lookup_symbol_search_name): New declaration.
11346         (lookup_symbol_in_block): New 'match_type' parameter.
11347
11348 2018-01-05  Pedro Alves  <palves@redhat.com>
11349
11350         PR gdb/22670
11351         * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
11352         ada_lookup_symbol.
11353         (ada_lookup_symbol): Reimplement in terms of
11354         ada_lookup_symbol_list, bits factored out from
11355         ada_lookup_encoded_symbol.
11356
11357 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
11358
11359         * ada-exp.y (write_object_renaming): When subscripting an array
11360         using a symbol as the index, pass the block in call to
11361         ada_lookup_encoded_symbol when looking that symbol up.
11362
11363 2018-01-05  Jerome Guitton  <guitton@adacore.com>
11364
11365         * ada-lang.c (ada_array_length): Use ada_index_type instead of
11366         TYPE_INDEX_TYPE.
11367
11368 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
11369
11370         * ada-lang.c (ada_to_fixed_value_create): Add handling of
11371         the case where VALUE_LVAL (val0) is not lval_memory.
11372
11373 2018-01-05  Xavier Roirand  <roirand@adacore.com>
11374
11375         * ada-valprint.c (print_optional_low_bound): Handle
11376         character-indexed array printing like boolean-indexed array
11377         printing.
11378
11379 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
11380
11381         * NEWS: Create a new section for the next release branch.
11382         Rename the section of the current branch, now that it has
11383         been cut.
11384
11385 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
11386
11387         GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
11388         * version.in: Bump version to 8.1.50.DATE-git.
11389
11390 2018-01-03  Xavier Roirand  <roirand@adacore.com>
11391
11392         * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
11393         Add field.
11394         * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
11395         Add field.
11396         (default_exception_support_info) <catch_handlers_sym>: Add field.
11397         (exception_support_info_fallback) <catch_handlers_sym>: Add field.
11398         (ada_exception_name_addr_1): Add "catch handlers" handling.
11399         (ada_exception_catchpoint_cond_string) <ex>: New parameter.
11400         Update all callers.
11401         (create_excep_cond_exprs) <ex>: Add parameter.
11402         (re_set_exception): Update create_excep_cond_exprs call.
11403         (print_it_exception, print_one_exception, print_mention_exception)
11404         (print_recreate_exception): Add "catch handler" handling.
11405         (allocate_location_catch_handlers, re_set_catch_handlers)
11406         (check_status_catch_handlers, print_it_catch_handlers)
11407         (print_one_catch_handlers, print_mention_catch_handlers)
11408         (print_recreate_catch_handlers): New function.
11409         (catch_handlers_breakpoint_ops): New variable.
11410         (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
11411         Add parameter.  Add "catch handler" handling.
11412         (ada_exception_sym_name, ada_exception_breakpoint_ops):
11413         Add "catch handler" handling.
11414         (ada_exception_catchpoint_cond_string): Add "catch handler"
11415         handling.
11416         (create_ada_exception_catchpoint): Update create_excep_cond_exprs
11417         call.
11418         (catch_ada_handlers_command): New function.
11419         (initialize_ada_catchpoint_ops): Initialize "catch handlers"
11420         operations structure.
11421         (_initialize_ada_language): Add "catch handlers" command entry.
11422         * NEWS: Document "catch handlers" feature.
11423
11424 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
11425
11426         * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
11427         account when creating the array type of the slice.
11428         (ada_value_slice): Likewise.
11429
11430 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
11431
11432         * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
11433         New enum value.
11434         (create_array_type_with_stride): Add byte_stride_prop parameter.
11435         * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
11436         New parameter.  Update all callers in this file.
11437         (array_type_has_dynamic_stride): New function.
11438         (is_dynamic_type_internal, resolve_dynamic_array): Add handling
11439         of arrays with dynamic byte strides.
11440         * dwarf2read.c (read_array_type): Add support for dynamic
11441         DW_AT_byte_stride attributes.
11442
11443 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
11444
11445         * dwarf2read.c (read_unspecified_type): Treat
11446         DW_TAG_enumeration_type DIEs from Ada units as stubs.
11447
11448 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
11449
11450         Update copyright year range in all GDB files.
11451
11452 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
11453
11454         * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
11455         and gdb/testsuite/gdb.base/step-line.c.
11456
11457 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
11458
11459         * copyright.py (main): Dump the contents of
11460         MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
11461         even if BY_HAND is empty.
11462
11463 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
11464
11465         * top.c (print_gdb_version): Update Copyright year in version
11466         message.
11467
11468 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
11469
11470         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
11471
11472 For older changes see ChangeLog-2017.
11473 \f
11474 Local Variables:
11475 mode: change-log
11476 left-margin: 8
11477 fill-column: 74
11478 version-control: never
11479 coding: utf-8
11480 End: