RISC-V: Add configure support for riscv*-linux*.
[external/binutils.git] / gdb / ChangeLog
1 2018-08-09  Jim Wilson  <jimw@sifive.com>
2
3         * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
4         (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
5         * NEWS: Mention new GNU/Linux RISC-V target.
6         * configure.host: Add riscv*-*-linux*.
7         * configure.nat: Add riscv*.
8         * configure.tgt: Add riscv*-*-linux*.
9         * riscv-linux-nat.c: New file.
10         * riscv-linux-tdep.c: New file.
11
12 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
13
14         * infrun.c (resume): Make static, add forward declaration.
15         (proceed): Update header comment.
16         * infrun.h (resume): Delete declaration.
17
18 2018-08-09  Tom Tromey  <tom@tromey.com>
19
20         * riscv-tdep.h: Minor formatting fixes.
21
22 2018-08-09  Simon Marchi  <simon.marchi@ericsson.com>
23
24         * common/scoped_mmap.c (mmap_file): Silence ARI warning.
25         * dwarf-index-cache.c (create_dir_and_check): Likewise.
26         (test_mkdir_recursive): Likewise.
27         * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
28
29 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
30
31         * valarith.c (value_subscripted_rvalue): If an array is not in
32         memory, and we don't know the upper bound, then we can't know that
33         the requested element exists or not.
34
35 2018-08-08  Simon Marchi  <simon.marchi@ericsson.com>
36
37         * target.c (str_comma_list_concat_elem): Fix typo in comment.
38         (target_options_to_string): Add comment.
39
40 2018-08-08  Tom Tromey  <tom@tromey.com>
41
42         * unittests/scoped_mmap-selftests.c: Check result of "write".
43
44 2018-08-08  Jim Wilson  <jimw@sifive.com>
45
46         * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
47         (decode_register_index_short): New.
48         (decode_j_type_insn, decode_cj_type_insn): New.
49         (decode_b_type_insn, decode_cb_type_insn): New.
50         (riscv_insn::decode): Add support for jumps, branches, lr, and sc.  New
51         local xlen.  Check xlen when decoding ambiguous compressed insns.  In
52         compressed decode, use is_c_lui_insn instead of is_lui_insn, and
53         is_c_sw_insn instead of is_sw_insn.
54         (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
55         (riscv_software_single_step): New.
56         * riscv-tdep.h (riscv_software_single_step): Declare.
57
58         * riscv-tdep.c (riscv_isa_xlen): Drop static.
59         * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
60
61 2018-08-08  Andrew Burgess  <andrew.burgess@embecosm.com>
62
63         PR gdb/18050:
64         * target.c (dispose_inferior): Don't dispose of inferiors that are
65         already killed.
66
67 2018-08-08  Szabolcs Nagy  <szabolcs.nagy@arm.com>
68
69         * remote.c (remote_target::download_tracepoint): Change char* to
70         const char*.
71
72 2018-08-07  Simon Marchi  <simon.marchi@polymtl.ca>
73
74         * target.h (target_options_to_string): Return an std::string.
75         * target.c (str_comma_list_concat_elem): Return void, use
76         std::string.
77         (do_option): Likewise.
78         (target_options_to_string): Return an std::string.
79         * linux-nat.c (linux_nat_target::wait): Adjust.
80         * target-debug.h (target_debug_print_options): Adjust.
81
82 2018-08-07  Tom Tromey  <tom@tromey.com>
83
84         * Makefile.in (CPPFLAGS): New variable.
85         (INTERNAL_CPPFLAGS): Use it.
86
87 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
88
89         * NEWS: Mention the index cache.
90
91 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
92
93         * common/pathstuff.h (get_standard_cache_dir): New.
94         * common/pathstuff.c (get_standard_cache_dir): New.
95         * build-id.h (build_id_to_string): New.
96         * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
97         DEBUG_STR_SUFFIX): Move to here.
98         * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
99         DEBUG_STR_SUFFIX): Move from there.
100         (write_psymtabs_to_index): Make non-static, add basename
101         parameter.  Write to temporary files, rename when done.
102         (save_gdb_index_command): Adjust call to
103         write_psymtabs_to_index.
104         * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
105         field.
106         * dwarf2read.c (dwz_file) <index_cache_res>: New field.
107         (get_gdb_index_contents_from_cache): New.
108         (get_gdb_index_contents_from_cache_dwz): New.
109         (dwarf2_initialize_objfile): Read index from cache.
110         (dwarf2_build_psymtabs): Save to index.
111         * dwarf-index-cache.h: New file.
112         * dwarf-index-cache.c: New file.
113         * dwarf-index-write.h: New file.
114
115 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
116
117         * gnulib/aclocal.m4: Re-generate.
118         * gnulib/config.in: Re-generate.
119         * gnulib/configure: Re-generate.
120         * gnulib/import/Makefile.am: Re-generate.
121         * gnulib/import/Makefile.in: Re-generate.
122         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
123         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
124         * gnulib/import/m4/mkdir.m4: New file.
125         * gnulib/import/mkdir.c: New file.
126         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
127         module.
128
129 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
130
131         * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
132         * common/scoped_mmap.c: New file.
133         * common/scoped_mmap.h (destroy): New method.
134         (~scoped_mmap, reset): Use destroy.
135         (scoped_mmap): New move constructor.
136         (mmap_file): New declaration.
137         * unittests/scoped_mmap-selftests.c (test_normal,
138         test_invalid_filename, run_tests): New functions.
139         (_initialize_scoped_mmap_selftests): Register selftest.
140
141 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
142
143         * dwarf2read.c (read_gdb_index_from_section): Rename to...
144         (read_gdb_index_from_buffer): ... this.  Remove section
145         parameter, add buffer parameter.
146         (get_gdb_index_contents_ftype,
147         get_gdb_index_contents_dwz_ftype): New typedefs.
148         (dwarf2_read_gdb_index): Add callback parameters to get the
149         index contents.
150         (get_gdb_index_contents_from_section): New.
151         (dwarf2_initialize_objfile): Update call to
152         dwarf2_read_gdb_index.
153
154 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
155
156         * common/filestuff.h (gdb_fopen_cloexec): New overload.
157         (gdb_open_cloexec): Likewise.
158         * nat/linux-osdata.c (command_from_pid): Use string_printf.
159         (commandline_from_pid): Likewise.
160         (linux_xfer_osdata_threads): Likewise.
161         (linux_xfer_osdata_fds): Likewise.
162         * ada-lang.c (is_package_name): Likewise.
163         * auxv.c (procfs_xfer_auxv): Likewise.
164         * breakpoint.c (print_one_breakpoint_location): Use
165         uiout::field_fmt.
166         (print_one_catch_solib): Use string_printf.
167         * coff-pe-read.c (add_pe_exported_sym): Likewise.
168         (add_pe_forwarded_sym): Likewise.
169         * dwarf2read.c (create_type_unit_group): Likewise.
170         (build_error_marker_type): Likewise.
171         * infcall.c (get_function_name): Likewise.
172         * valprint.c (print_converted_chars_to_obstack): Likewise.
173         * xtensa-tdep.c (xtensa_register_type): Likewise.
174
175 2018-08-06  Simon Marchi  <simon.marchi@ericsson.com>
176
177         * remote.c (remote_target::download_tracepoint): Fix format
178         string errors.
179
180 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
181
182         * tracefile.c: Include common/byte-vector.h.
183         (trace_save): Change type of buf to gdb::byte_vector.  Initialize
184         with trace_regblock_size if needed.  Update uses of buf.
185
186 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
187
188         * tracepoint.h (collection_list) <m_regs_mask>: Change type to
189         std::vector<unsigned char>.
190         * tracepoint.c (collection_list::collection_list): Remove
191         m_regs_mask initializer from initializer list.  Resize
192         m_regs_mask using the largest remote register number.
193         (collection_list::add_remote_register): Remove size check on
194         m_regs_mask.  Use at to access element.
195         (collection_list::stringify): Change type of temp_buf to
196         gdb::char_vector.  Update uses of temp_buf.  Resize if needed to
197         stringify the register mask.  Use pack_hex_byte for the register
198         mask.
199
200 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
201
202         * tracepoint.h (class collection_list) <add_register>: Remove.
203         <add_remote_register, add_ax_registers, add_local_register>:
204         Declare.
205         <add_memrange>: Add scope parameter.
206         * tracepoint.c (encode_actions_1): Likewise.
207         (collection_list::add_register): Rename to ...
208         (collection_list::add_remote_register): ... this.  Update
209         comment.
210         (collection_list::add_ax_registers, add_local_register): New
211         methods.
212         (collection_list::add_memrange): Add scope parameter.  Call
213         add_local_register instead of add_register.
214         (finalize_tracepoint_aexpr): New function.
215         (collection_list::collect_symbol): Update calls to add_memrange.
216         Call add_local_register instead of add_register.  Call
217         add_ax_registers.  Call finalize_tracepoint_aexpr.
218         (encode_actions_1): Get remote regnos for $reg action.  Call
219         add_remote_register, add_ax_registers, and add_local_register.
220         Update call to add_memrange.  Call finalize_tracepoint_aexpr.
221         (validate_actionline): Call finalize_tracepoint_aexpr.
222
223 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
224
225         * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
226         Replace array buf with gdb::char_vector buf, of size
227         get_remote_packet_size ().  Replace references to buf and
228         BUF_SIZE to buf.data () and buf.size ().  Replace strcpy, strcat
229         and xsnprintf with snprintf.  Raise errors if the buffer is too
230         small.
231
232 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
233
234         * remote.c (remote_target::download_tracepoint): Fix the has_more
235         predicate in the QTDP action list iteration.
236
237 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
238
239         * remote.c (remote_target::download_tracepoint): Fix indentation
240         in for block.
241
242 2018-08-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
243
244         * proc-api.c (_initialize_proc_api): Remove c, unused.
245         * procfs.c (procfs_init_inferior): Remove signals, unused.
246         (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
247         unused.
248
249 2018-08-06  Sergey Korolev  <s.korolev@ndmsystems.com>
250             Andrew Burgess  <andrew.burgess@embecosm.com>
251
252         * linux-nat.c (linux_nat_target::follow_fork): Avoid using
253         'W_STOPCODE (0)' as this could be ambiguous.
254
255 2018-08-03  Sergio Durigan Junior  <sergiodj@redhat.com>
256
257         * ser-tcp.c (net_open): Fix thinko when deciding whether to
258         disable TCP's Nagle algorithm (use "ai_protocol" instead of
259         "ai_socktype").
260
261 2018-08-02  Tom Tromey  <tom@tromey.com>
262
263         PR symtab/16842.
264         * dwarf2read.c (read_func_scope): Set symtab on template parameter
265         symbols.
266         (process_structure_scope): Likewise.
267
268 2018-08-02  Xavier Roirand  <roirand@adacore.com>
269
270         PR gdb/22629:
271         * darwin-nat.c (darwin_kill_inferior): Fix handling of
272         kill inferior.
273
274 2018-08-02  Tom Tromey  <tom@tromey.com>
275
276         * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
277         (darwin_suspend_inferior, darwin_resume_inferior)
278         (darwin_decode_notify_message, darwin_resume_inferior_threads)
279         (darwin_check_new_threads): Check result of get_darwin_inferior.
280
281 2018-07-31  Joel Brobecker  <brobecker@adacore.com>
282
283         GDB 8.1.1 released.
284
285 2018-07-31  Jan Vrany  <jan.vrany@fit.cvut.cz>
286
287         * varobj.c (varobj_get_path_expr_parent): Report an error if
288         parent is a dynamic varobj.
289
290 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
291
292         * gnulib/aclocal.m4: Re-generate.
293         * gnulib/config.in: Re-generate.
294         * gnulib/configure: Re-generate.
295         * gnulib/import/Makefile.in: Re-generate.
296         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
297         * gnulib/import/m4/onceonly.m4: Re-generate.
298
299 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
300
301         * target-descriptions.c (struct xml_test_tdesc): New.
302         (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
303         (record_xml_tdesc): Update.
304         (maintenance_check_xml_descriptions): Update.
305         * target-descriptions.h (record_xml_tdesc): Update comment.
306
307 2018-07-30  Andrew Burgess  <andrew.burgess@embecosm.com>
308
309         * eval.c (evaluate_subexp_for_sizeof): Check for array type before
310         checking array bounds are defined.
311
312 2018-07-30  Tom Tromey  <tom@tromey.com>
313
314         * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
315         irreflexivity violation.
316
317 2018-07-30  Tom Tromey  <tom@tromey.com>
318
319         * cli/cli-decode.c (lookup_cmd): Remove lint code.
320         * value.c (unpack_long): Remove lint code.
321         * valops.c (value_ind): Remove lint code.
322         * valarith.c (value_x_binop, value_x_unop, value_equal)
323         (value_pos): Remove lint code.
324
325 2018-07-28  Tom de Vries  <tdevries@suse.de>
326
327         * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
328         with undefined upper bound as <optimized out>.
329
330 2018-07-27  Sergio Durigan Junior  <sergiodj@redhat.com>
331
332         * gcore.in: Rename variable "name" to "prefix".  Expand
333         "usage" text.
334
335 2018-07-14  Jon Turney  <jon.turney@dronecode.org.uk>
336
337         * windows-nat.c (windows_nat_target::create_inferior): Update to
338         call close() in global namespace.
339
340 2018-07-26  Tom Tromey  <tom@tromey.com>
341
342         * dwarf-index-write.c (add_address_entry): Don't add objfile
343         offsets.
344         * dbxread.c (find_stab_function): Rename from
345         find_stab_function_addr.  Return a bound_minimal_symbol.
346         (read_dbx_symtab): Use raw_text_low, raw_text_high.
347         Don't add objfile offsets.
348         (end_psymtab): Use raw_text_low, raw_text_high,
349         MSYMBOL_VALUE_RAW_ADDRESS.
350         (read_ofile_symtab): Update.
351         (process_one_symbol): Update.
352         * dwarf2read.c (create_addrmap_from_index): Don't add objfile
353         offsets.
354         (dw2_relocate): Remove.
355         (dw2_find_pc_sect_symtab): Bias PC by the text offset before
356         searching addrmap.
357         (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
358         Update.
359         (process_psymtab_comp_unit_reader, add_partial_symbol)
360         (add_partial_subprogram, dwarf2_ranges_read): Update.
361         (load_partial_dies): Update.
362         (add_address_entry): Don't add objfile offsets.
363         (dwarf2_build_include_psymtabs): Update.
364         (create_addrmap_from_aranges): Don't add objfile offsets.
365         (dw2_find_pc_sect_compunit_symtab): Update.
366         * mdebugread.c (parse_symbol): Don't add objfile offsets.
367         (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
368         Update.
369         (parse_partial_symbols): Don't add objfile offsets.  Use
370         raw_text_low, raw_text_high.  Update.
371         (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
372         * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
373         or call 'relocate' quick function.  Clear psymbol_map.
374         * psympriv.h (struct partial_symbol) <address>: Add section
375         offset.
376         <set_unrelocated_address>: Rename from set_address.
377         <raw_text_low, raw_text_high>: New methods.
378         <text_low, text_high>: Add objfile parameter.
379         (add_psymbol_to_bcache): Add 'section' parameter.  Call
380         set_unrelocated_address.
381         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
382         (find_pc_psymbol): Update.
383         (fixup_psymbol_section, relocate_psymtabs): Remove.
384         (dump_psymtab, psym_functions): Update.
385         (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
386         parameter.
387         (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
388         (start_psymtab_common): Update.
389         * symfile-debug.c (debug_qf_relocate): Remove.
390         (debug_sym_quick_functions): Update.
391         * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
392         * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
393         Update.
394
395 2018-07-26  Tom Tromey  <tromey@redhat.com>
396
397         * dbxread.c (end_psymtab): Use text_high_valid and
398         text_low_valid.
399         * mdebugread.c (parse_partial_symbols): Use text_low_valid.
400         (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
401         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
402         Update comment.
403         <text_low_valid, text_high_valid>: New fields.
404         <set_text_low, set_text_high>: Update.
405         * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
406
407 2018-07-26  Tom Tromey  <tom@tromey.com>
408
409         * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
410         Update.
411         * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
412         textlow and texthigh fields.
413         (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
414         Update.
415         * mdebugread.c (parse_lines, parse_partial_symbols)
416         (psymtab_to_symtab_1): Update.
417         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
418         Rename fields.  Update comment.  Now private.
419         <text_low, text_high, set_text_low, set_text_high>: New methods.
420         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
421         (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
422         (start_psymtab_common, maintenance_info_psymtabs)
423         (maintenance_check_psymtabs): Update.
424         * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
425         texthigh fields.
426         (scan_xcoff_symtab): Update.
427
428 2018-07-26  Tom Tromey  <tromey@redhat.com>
429
430         * psympriv.h (struct partial_symbol) <unrelocated_address,
431         address, set_address>: New methods.
432         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
433         (fixup_psymbol_section, relocate_psymtabs): Update.
434         (print_partial_symbols): Add 'objfile' parameter.  Update.
435         (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
436         Update.
437
438 2018-07-26  Tom Tromey  <tom@tromey.com>
439
440         * dwarf-index-write.c (write_psymbols, debug_names::insert)
441         (debug_names::write_psymbols): Update.
442         * psympriv.h (struct partial_symbol): Derive from
443         general_symbol_info.
444         <obj_section>: New method.
445         (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
446         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
447         (find_pc_sect_psymbol, fixup_psymbol_section)
448         (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
449         (print_partial_symbols, recursively_search_psymtabs)
450         (compare_psymbols, psymbol_hash, psymbol_compare)
451         (add_psymbol_to_bcache, maintenance_check_psymtabs)
452         (psymbol_name_matches, psym_fill_psymbol_map): Update.
453
454 2018-07-26  Tom Tromey  <tromey@redhat.com>
455
456         * dbxread.c (end_psymtab): Remove dead code.
457
458 2018-07-26  Andrew Burgess  <andrew.burgess@embecosm.com>
459
460         * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
461         DWARF unwinders are disabled.
462         * dwarf2-frame.c: Add dwarf2read.h include.
463         (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
464         disabled.
465         (dwarf2_frame_unwinders_enabled_p): Define.
466         (show_dwarf_unwinders_enabled_p): New function.
467         (_initialize_dwarf2_frame): Register switch to control DWARF
468         unwinder use.
469         * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
470         * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
471         (show_dwarf_cmdlist): Remove static keyword.
472         * dwarf2read.h (set_dwarf_cmdlist): Declare.
473         (show_dwarf_cmdlist): Declare.
474         * NEWS: Document new feature.
475
476 2018-07-26  Tom de Vries  <tdevries@suse.de>
477
478         PR breakpoints/23366
479         * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
480
481 2018-07-26  Tom de Vries  <tdevries@suse.de>
482
483         * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
484         DW_AT_count can't be translated to a dynamic prop.
485
486 2018-07-25  Tom de Vries  <tdevries@suse.de>
487
488         * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
489         try/catch.
490
491 2018-07-25  Jan Vrany  <jan.vrany@fit.cvut.cz>
492
493         * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
494
495 2018-07-25  Joel Brobecker  <brobecker@adacore.com>
496
497         * MAINTAINERS (Global Maintainers): Add Tom Tromey.
498
499 2018-07-24  Keith Seitz  <keiths@redhat.comt
500
501         PR symtab/23010
502         * dwarf2read.c (dw2_add_symbol_to_list): New function.
503         (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
504         instead of add_symbol_to_list.
505         (read_file_scope): Call prepare_one_comp_unit before reading
506         any other DIEs.
507
508 2018-07-24  Simon Marchi  <simon.marchi@ericsson.com>
509
510         * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
511
512 2018-07-24  Tom Tromey  <tom@tromey.com>
513
514         * utils.c (malloc, realloc, free): Don't declare.
515         * configure, config.in: Rebuild.
516         * configure.ac: Don't check for declarations of free, malloc, or
517         realloc.
518
519 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
520
521         * aarch64-linux-nat.c
522         (aarch64_linux_nat_target::stopped_data_address): Remove unused
523         variable.
524         * arm-linux-nat.c (fetch_regs): Likewise.
525         (store_regs): Likewise.
526         (fetch_vfp_regs): Likewise.
527         (store_vfp_regs): Likewise.
528         (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
529         (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
530         (arm_linux_nat_target::insert_watchpoint): Likewise.
531         (arm_linux_nat_target::remove_watchpoint): Likewise.
532         * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
533         Likewise.
534         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
535         Likewise.
536         * ppc-linux-nat.c (fetch_register): Likewise.
537         (fetch_all_gp_regs): Likewise.
538         (fetch_ppc_registers): Likewise.
539         (store_all_gp_regs): Likewise.
540         (store_ppc_registers): Likewise.
541         (hwdebug_insert_point): Likewise.
542         (can_use_watchpoint_cond_accel): Likewise.
543         * remote-sim.c (gdb_os_write_stdout): Likewise.
544
545 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
546             Tom Tromey  <tom@tromey.com>
547
548         * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
549         test for it.
550         * configure: Rebuild.
551
552 2018-07-22  Tom Tromey  <tom@tromey.com>
553
554         * regformats/regdat.sh: Define xmltarget_${name} inside
555         #ifndef IN_PROCESS_AGENT.
556
557 2018-07-22  Tom Tromey  <tom@tromey.com>
558
559         * value.c (value_fetch_lazy_bitfield): Remove unused variable.
560
561 2018-07-22  Tom Tromey  <tom@tromey.com>
562
563         * symfile.c (reread_symbols): Notify iter, not objfile.
564
565 2018-07-22  Tom Tromey  <tom@tromey.com>
566
567         * ravenscar-thread.c (ravenscar_thread_target::store_registers):
568         Use arch_ops.
569         (ravenscar_thread_target::prepare_to_store): Likewise.
570
571 2018-07-22  Tom Tromey  <tom@tromey.com>
572
573         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
574         unused variable.  Call value_fetch_lazy when needed.
575         * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
576         Remove unused variable.  Call value_fetch_lazy when needed.
577
578 2018-07-22  Tom Tromey  <tom@tromey.com>
579
580         * m32c-tdep.c (mark_dma): Return void.
581         (make_regs): Remove unused declarations.
582
583 2018-07-22  Tom Tromey  <tom@tromey.com>
584
585         * guile/scm-cmd.c (gdbscm_dont_repeat): Call
586         cmdscm_get_valid_command_smob_arg_unsafe for effect.
587         * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
588         bkscm_get_valid_block_smob_arg_unsafe for effect.
589
590 2018-07-22  Tom Tromey  <tom@tromey.com>
591
592         * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
593         value_type.
594
595 2018-07-22  Tom Tromey  <tom@tromey.com>
596
597         * windows-nat.c (saved_context): Conditionally define.
598         * remote.c (remote_target::remote_btrace_maybe_reopen):
599         Conditionally declare "warned".
600         * inflow.c (sigquit_ours): Conditionally define.
601         (new_tty): Move "tty" declaration inside #if.
602         * guile/guile.c (guile_datadir): Conditionally define.
603         * charset.c (set_be_le_names): Move some declarations inside #if.
604         * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
605         #if.
606         (parse_xml_btrace_conf): Likewise.
607
608 2018-07-22  Tom Tromey  <tom@tromey.com>
609
610         * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
611
612 2018-07-22  Tom Tromey  <tom@tromey.com>
613
614         * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
615         * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
616         (vlscm_convert_typed_value_from_scheme): Remove unused variable.
617         * buildsym-legacy.c (get_macro_table): Remove unused variable.
618         * stack.c (frame_apply_level_command): Remove unused variable.
619         * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
620         * sparc64-tdep.c (adi_examine_command): Remove unused variable.
621         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
622         unused variable.
623         * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
624         * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
625         * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
626         variable.
627         * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
628         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
629         variable.
630         * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
631         Remove unused variable.
632         * cli/cli-script.c (recurse_read_control_structure): Remove unused
633         variable.
634         * common/tdesc.c (print_xml_feature::visit): Remove unused
635         variable.
636         * compile/compile-object-load.c (store_regs): Remove unused
637         variables.
638         * complaints.c (clear_complaints): Remove unused variable.
639         * corelow.c (core_target_open): Remove unused variable.
640         * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
641         variable.
642         * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
643         variable.
644         * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
645         variable.
646         * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
647         variable.
648         * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
649         variable.
650         * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
651         variable.
652         * ia64-tdep.c (examine_prologue): Remove unused variable.
653         * infcall.c (run_inferior_call): Remove unused variable.
654         * inferior.c (exit_inferior): Remove unused variable.
655         * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
656         * linespec.c (decode_line_2): Remove unused variable.
657         * linux-nat.c (super_close): Remove.
658         * linux-tdep.c (linux_info_proc): Remove unused variable.
659         * mi/mi-main.c (mi_execute_command): Remove unused variable.
660         * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
661         Remove unused variable.
662         * parse.c (find_minsym_type_and_address): Remove unused variable.
663         * printcmd.c (info_symbol_command, printf_floating): Remove unused
664         variable.
665         * python/py-breakpoint.c (bppy_set_commands): Remove unused
666         variable.
667         * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
668         variables.
669         * record-btrace.c (record_btrace_target::store_registers): Remove
670         unused variable.
671         (cmd_show_record_btrace_cpu): Remove unused variable.
672         * riscv-tdep.c (riscv_register_reggroup_p)
673         (riscv_push_dummy_call, riscv_return_value): Remove unused
674         variable.
675         * rust-exp.y (literal): Remove unused variable.
676         * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
677         unused variable.
678         <STRUCTOP_ANONYMOUS>: Likewise.
679         * s390-linux-tdep.c (s390_linux_init_abi_31)
680         (s390_linux_init_abi_64): Remove unused variable.
681         * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
682         (file_select_thread, net_windows_open, _initialize_ser_windows):
683         Remove unused variables.
684         * symtab.c (find_pc_sect_line): Remove unused variable.
685         * target-memory.c (compute_garbled_blocks): Remove unused
686         variable.
687         (target_write_memory_blocks): Remove unused variable.
688         * target.c (target_stack::unpush): Remove unused variables.
689         * tracepoint.c (start_tracing, all_tracepoint_actions)
690         (merge_uploaded_trace_state_variables)
691         (print_one_static_tracepoint_marker): Remove unused variable.
692         * unittests/basic_string_view/element_access/char/1.cc (test01):
693         Remove unused variable.
694         * windows-nat.c (windows_continue, windows_add_all_dlls)
695         (do_initial_windows_stuff, windows_nat_target::create_inferior):
696         Remove unused variables.
697
698 2018-07-21  Simon Marchi  <simon.marchi@polymtl.ca>
699
700         * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
701         attr_profile in HAVE_ELF.
702         * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
703         HAVE_ELF.
704
705 2018-07-20  Simon Marchi  <simon.marchi@polymtl.ca>
706
707         * frame.c (frame_register_unwind): Change parameter name.
708         (frame_unwind_register): Likewise.
709         (frame_unwind_register_value): Likewise.
710         (frame_unwind_register_signed): Likewise.
711         (frame_unwind_register_unsigned): Likewise.
712         * frame.h (frame_register_unwind): Likewise.
713         (frame_unwind_register): Likewise.
714         (frame_unwind_register_value): Likewise.
715         (frame_unwind_register_signed): Likewise.
716         (frame_unwind_register_unsigned): Likewise.
717         (frame_unwind_arch): Likewise.
718
719 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
720
721         * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
722         ISA maintenance.
723
724 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
725
726         * mips-linux-nat.c (mips_linux_nat_target::read_description):
727         Call `get_ptrace_pid' rather than extracting the ptrace PID by
728         hand.
729
730 2018-07-20  Keith Seitz  <keiths@redhat.com>
731
732         * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
733         m_main_subfile, m_comp_dir, m_producer, m_debugformat,
734         m_compunit_symtab, m_language>: Add "m_" prefix.
735         Update all uses.
736         * buildsym.c: Update all uses.
737
738 2018-07-20  Tom Tromey  <tom@tromey.com>
739
740         * buildsym-legacy.h (record_line): Don't use record_line_ftype.
741         * buildsym.h (record_line_ftype): Remove typedef.
742
743 2018-07-20  Tom Tromey  <tom@tromey.com>
744
745         * buildsym-legacy.h (augment_type_symtab): Don't declare.
746         (end_expandable_symtab): Likewise.
747         (end_symtab_get_static_block): Likewise.
748         (end_symtab_from_static_block): Likewise.
749         * buildsym-legacy.c (augment_type_symtab): Remove.
750         (end_expandable_symtab): Remove.
751         (end_symtab_get_static_block): Remove.
752         (end_symtab_from_static_block): Remove.
753
754 2018-07-20  Tom Tromey  <tom@tromey.com>
755
756         * dwarf2read.c: Include buildsym.h.
757         (struct dwarf2_cu) <builder>: New method.
758         (fixup_go_packaging): Update.
759         (process_full_comp_unit, process_full_type_unit): Update.  Don't
760         use scoped_free_pendings.
761         (using_directives): Add "cu" parameter, remove "language".
762         (read_import_statement, setup_type_unit_groups, )
763         (read_func_scope, read_lexical_block_scope)
764         (dwarf2_record_block_ranges, read_namespace): Update.
765         (lnp_state_machine::lnp_state_machine): Add cu parameter.
766         (lnp_state_machine::handle_end_sequence): Update.
767         (class lnp_state_machine) <m_cu>: New member.
768         <m_record_line_callback>: Remove.
769         <m_currently_recording_lines>: New member.
770         (lnp_state_machine::handle_set_file): Update.
771         (noop_record_line): Remove.
772         (dwarf_record_line_p): Add cu parameter.
773         (dwarf_record_line_1, dwarf_finish_line): Likewise.
774         (lnp_state_machine::record_line)
775         (lnp_state_machine::lnp_state_machine)
776         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
777         (dwarf_decode_lines): Update.
778         (dwarf2_start_subfile): Add cu parameter.
779         (dwarf2_start_symtab, new_symbol): Update.
780         (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
781         Remove dwarf2_per_objfile parameter.
782         (dwarf_decode_macros): Update.
783
784 2018-07-20  Tom Tromey  <tom@tromey.com>
785
786         * stabsread.c (define_symbol): Update.
787         * buildsym-legacy.h (get_buildsym_compunit): Declare.
788         * dwarf2read.c (new_symbol): Update.
789         * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
790         * cp-namespace.c: Include buildsym.h.
791         (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
792         * buildsym-legacy.c (get_buildsym_compunit): New function.
793
794 2018-07-20  Tom Tromey  <tom@tromey.com>
795
796         * xcoffread.c: Include buildsym-legacy.h.
797         * windows-nat.c: Include buildsym-legacy.h.
798         * stabsread.c: Include buildsym-legacy.h.
799         * mdebugread.c: Include buildsym-legacy.h.
800         * buildsym-legacy.h: New file.
801         * buildsym-legacy.c: New file, from buildsym.c.
802         * go32-nat.c: Include buildsym-legacy.h.
803         * dwarf2read.c: Include buildsym-legacy.h.
804         * dbxread.c: Include buildsym-legacy.h.
805         * cp-namespace.c: Include buildsym-legacy.h.
806         * coffread.c: Include buildsym-legacy.h.
807         * buildsym.h: Move some contents to buildsym-legacy.h.
808         * buildsym.c: Include buildsym-legacy.h.  Move many functions to
809         buildsym-legacy.c.
810         * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
811
812 2018-07-20  Tom Tromey  <tom@tromey.com>
813
814         * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
815         * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
816         (buildsym_compunit::buildsym_compunit)
817         (buildsym_compunit::~buildsym_compunit)
818         (buildsym_compunit::get_macro_table): Define.
819
820 2018-07-20  Tom Tromey  <tom@tromey.com>
821
822         * buildsym.c (reset_symtab_globals): Remove.
823         (buildsym_compunit::end_symtab_from_static_block): Update.
824         (buildsym_compunit::augment_type_symtab): Update.
825         (end_symtab_from_static_block): Call free_buildsym_compunit.
826         (augment_type_symtab, end_symtab, end_expandable_symtab):
827         Likewise.
828
829 2018-07-20  Tom Tromey  <tom@tromey.com>
830
831         * arch-utils.c: Do not include buildsym.h.
832         * mipsread.c: Do not include buildsym.h.
833         * machoread.c: Do not include buildsym.h.
834         * elfread.c: Do not include buildsym.h.
835
836 2018-07-20  Tom Tromey  <tom@tromey.com>
837
838         * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
839         initialization.
840         (buildsym_compunit): Add new constructor.
841         (struct buildsym_compunit) <get_last_source_file, finish_block,
842         record_block_range, start_subfile, patch_subfile_names,
843         push_subfile, pop_subfile, record_line, get_compunit_symtab,
844         set_last_source_start_addr, get_last_source_start_addr,
845         get_local_using_directives, set_local_using_directives,
846         get_global_using_directives, outermost_context_p,
847         get_current_context_stack, get_context_stack_depth,
848         get_current_subfile, get_local_symbols, get_file_symbols,
849         get_global_symbols, record_debugformat, record_producer,
850         push_context, pop_context, end_symtab_get_static_block,
851         end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
852         New public methods.
853         <record_pending_block, finish_block_internal, make_blockvector,
854         watch_main_source_file_lossage, end_symtab_with_blockvector>: New
855         private methods.
856         Update all users.
857
858 2018-05-22  Tom Tromey  <tom@tromey.com>
859
860         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
861         parameter.
862         (finish_block_internal): Update.
863
864 2018-07-20  Tom Tromey  <tom@tromey.com>
865
866         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
867         parameter.
868         (finish_block_internal): Update.
869
870 2018-07-20  Tom Tromey  <tom@tromey.com>
871
872         * buildsym.h (EXTERN): Don't define or undef.
873         * buildsym.c (EXTERN): Don't define.
874
875 2018-07-20  Tom Tromey  <tom@tromey.com>
876
877         * buildsym.c: Remove TODO comment.
878
879 2018-07-20  Tom Tromey  <tom@tromey.com>
880
881         * coffread.c (coff_symtab_read): Update.
882         * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
883         (xcoff_new_init): Update.
884         * mipsread.c (mipscoff_new_init): Update.
885         * mdebugread.c (mdebug_build_psymtabs): Update.
886         * elfread.c (elf_new_init): Update.
887         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
888         Update.
889         * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
890         (coffstab_build_psymtabs, elfstab_build_psymtabs)
891         (stabsect_build_psymtabs): Update.
892         * buildsym.h (buildsym_init): Don't declare.
893         * buildsym.c: Update comment.
894         (prepare_for_building): Remove.
895         (start_symtab, restart_symtab): Update.
896         (reset_symtab_globals): Update comment.
897         (buildsym_init): Remove.
898
899 2018-07-20  Tom Tromey  <tom@tromey.com>
900
901         * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
902         * stabsread.c (patch_block_stabs, define_symbol, read_type)
903         (read_enum_type, common_block_start, common_block_end)
904         (cleanup_undefined_types_1, finish_global_stabs): Update.
905         * mdebugread.c (psymtab_to_symtab_1): Update.
906         * dwarf2read.c (fixup_go_packaging, read_func_scope)
907         (read_lexical_block_scope, new_symbol): Update.
908         * dbxread.c (process_one_symbol): Update.
909         * coffread.c (coff_symtab_read, process_coff_symbol)
910         (coff_read_enum_type): Update.
911         * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
912         declare.
913         (get_local_symbols, get_file_symbols, get_global_symbols): New
914         functions.
915         * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
916         m_global_symbols.
917         <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
918         (~scoped_free_pendings): Update.
919         (finish_block, prepare_for_building, reset_symtab_globals)
920         (end_symtab_get_static_block, end_symtab_with_blockvector)
921         (augment_type_symtab, push_context): Update.
922         (get_local_symbols, get_file_symbols, get_global_symbols): New
923         functions.
924         (buildsym_init): Update.
925
926 2018-07-20  Tom Tromey  <tom@tromey.com>
927
928         * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
929         (process_full_type_unit): Likewise.
930         (dwarf2_start_symtab): Set list_in_scope.
931
932 2018-07-20  Tom Tromey  <tom@tromey.com>
933
934         * dwarf2read.c (process_psymtab_comp_unit_reader)
935         (build_type_psymtabs_reader): Do not set list_in_scope.
936
937 2018-07-20  Tom Tromey  <tom@tromey.com>
938
939         * buildsym.c (free_pendings): Remove.
940         (add_symbol_to_list, scoped_free_pendings)
941         (finish_block_internal, buildsym_init): Update.
942
943 2018-07-20  Tom Tromey  <tom@tromey.com>
944
945         * xcoffread.c (read_xcoff_symtab): Update.
946         * dwarf2read.c (read_func_scope, read_lexical_block_scope):
947         Update.
948         * dbxread.c (process_one_symbol): Update.
949         * coffread.c (coff_symtab_read): Update.
950         * buildsym.h (finish_block): Update.
951         * buildsym.c (finish_block): Remove "listhead" argument.
952         (end_symtab_get_static_block): Update.
953
954 2018-07-20  Tom Tromey  <tom@tromey.com>
955
956         * buildsym.h (class scoped_free_pendings): Remove constructor.
957         * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
958         method.
959         <m_pending_block_obstack, m_pending_blocks>: New members.
960         (pending_block_obstack, pending_blocks): Remove.
961         (scoped_free_pendings::scoped_free_pendings): Default.
962         (~scoped_free_pendings): Update.
963         (free_pending_blocks): Remove.
964         (finish_block_internal, record_pending_block, make_blockvector)
965         (end_symtab_get_static_block, augment_type_symtab, push_context)
966         (buildsym_init): Update.
967
968 2018-07-20  Tom Tromey  <tom@tromey.com>
969
970         * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
971         m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
972         members.
973         (pending_addrmap, pending_addrmap_obstack)
974         (pending_addrmap_interesting): Remove.
975         (scoped_free_pendings, record_block_range, make_blockvector)
976         (prepare_for_building, reset_symtab_globals, buildsym_init):
977         Update.
978
979 2018-07-20  Tom Tromey  <tom@tromey.com>
980
981         * xcoffread.c (process_linenos): Update.
982         * stabsread.c (define_symbol, read_type, read_enum_type): Update.
983         * mdebugread.c (psymtab_to_symtab_1): Update.
984         * dwarf2read.c (setup_type_unit_groups)
985         (lnp_state_machine::handle_set_file, dwarf_record_line_p)
986         (lnp_state_machine::record_line, dwarf_decode_lines): Update.
987         * dbxread.c (process_one_symbol): Update.
988         * coffread.c (coff_symtab_read, enter_linenos)
989         (process_coff_symbol): Update.
990         * buildsym.h (current_subfile): Don't declare.
991         (get_current_subfile): Declare.
992         * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
993         member.
994         (start_subfile, free_buildsym_compunit, push_subfile)
995         (prepare_for_building, start_symtab): Update.
996         (get_current_subfile): New function.
997
998 2018-07-20  Tom Tromey  <tom@tromey.com>
999
1000         * coffread.c (coff_symtab_read): Update.
1001         * xcoffread.c (read_xcoff_symtab): Update.
1002         * dwarf2read.c (new_symbol): Update.
1003         (read_func_scope, read_lexical_block_scope): Update.
1004         * dbxread.c (process_one_symbol): Update.
1005         * buildsym.h (context_stack, context_stack_depth): Don't declare.
1006         (outermost_context_p): Remove macro.
1007         (outermost_context_p, get_current_context_stack)
1008         (get_context_stack_depth): Declare.
1009         (pop_context): Return struct context_stack.
1010         * buildsym.c (struct buildsym_compunit) <m_context_stack: New
1011         member.
1012         (context_stack_size): Remove.
1013         (INITIAL_CONTEXT_STACK_SIZE): Remove.
1014         (prepare_for_building, end_symtab_get_static_block)
1015         (augment_type_symtab, push_context): Update.
1016         (pop_context): Return struct context_stack.
1017         (outermost_context_p, get_current_context_stack)
1018         (get_context_stack_depth): New functions.
1019         (buildsym_init): Update.
1020
1021 2018-07-20  Tom Tromey  <tom@tromey.com>
1022
1023         * rust-exp.y: Now a pure parser.  Update all rules.
1024         (%union): Move earlier.
1025         (current_parser, work_obstack): Remove globals.
1026         (rust_parser, ~rust_parser): Update.
1027         (class rust_parser) <copy_name, concat3, crate_name, super_name,
1028         lex_character, lex_number, lex_string, lex_identifier,
1029         rust_lookup_type, convert_params_to_types, convert_ast_to_type,
1030         convert_name, convert_params_to_expression,
1031         convert_ast_to_expression, ast_basic_type, ast_operation,
1032         ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
1033         ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
1034         ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
1035         ast_array_type, ast_slice_type, ast_reference_type,
1036         ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
1037         (rust_parse): Update.
1038         (rustyyerror, rustyylex): Add parser parameter.
1039         (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
1040         (rust_lex_stringish_test, rust_lex_test_sequence)
1041         (rust_lex_test_trailing_dot, rust_lex_test_completion)
1042         (rust_lex_test_push_back, rust_lex_tests): Update.
1043
1044 2018-07-19  Pedro Alves  <palves@redhat.com>
1045
1046         * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
1047         gdb::unique_xmalloc_ptr.
1048         * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
1049         Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
1050         * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
1051         copy-initialization.
1052         * guile/scm-pretty-print.c (ppscm_print_children): Use
1053         gdb::unique_xmalloc_ptr instead of cleanups.
1054         (gdbscm_apply_val_pretty_printer): Remove cleanups.
1055         * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
1056         gdb::unique_xmalloc_ptr.
1057         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
1058         Adjust to use gdb::unique_xmalloc_ptr.
1059         * guile/scm-utils.c (extract_arg): Adjust.
1060         * guile/scm-value.c (gdbscm_value_field): Adjust to use
1061         gdb::unique_xmalloc_ptr instead of a cleanup.
1062
1063 2018-07-19  Tom Tromey  <tom@tromey.com>
1064
1065         * utils.c (do_value_free_to_mark)
1066         (make_cleanup_value_free_to_mark): Remove.
1067         * utils.h (make_cleanup_value_free_to_mark): Remove.
1068
1069 2018-07-19  Pedro Alves  <palves@redhat.com>
1070
1071         * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
1072         forwarding reference.
1073
1074 2018-07-18  Pedro Alves  <palves@redhat.com>
1075
1076         * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
1077         gdbscm_wrap.  Use gdb::unique_xmalloc_ptr<char> instead of a
1078         cleanup.
1079
1080 2018-07-18  Pedro Alves  <palves@redhat.com>
1081
1082         * guile/guile-internal.h: Add comment about mixing GDB and Scheme
1083         exceptions.
1084         (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
1085         (gdbscm_wrap): New.
1086         * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
1087         directly instead of a cleanup.
1088         * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
1089         (vlscm_unop): ... this.  Reimplement using gdbscm_wrap.
1090         (vlscm_binop_gdbthrow): New, factored out from ...
1091         (vlscm_binop): ... this.  Reimplement using gdbscm_wrap.
1092         (vlscm_rich_compare): Use gdbscm_wrap.
1093         * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
1094         instead of a cleanup.
1095         (gdbscm_lookup_global_symbol): Use xfree directly instead of a
1096         cleanup.
1097         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
1098         Use xfree directly instead of a cleanup.
1099         * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
1100         Adjust to use gdbscm_wrap and scoped_value_mark.
1101         (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
1102         (gdbscm_value_address, gdbscm_value_dereference)
1103         (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
1104         scoped_value_mark.
1105         (gdbscm_value_dynamic_type): Use scoped_value_mark.
1106         (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
1107         scoped_value_mark.
1108         (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
1109         gdbscm_wrap and scoped_value_mark.
1110         (gdbscm_value_to_string): Use xfree directly instead of a
1111         cleanup.  Move 'buffer' unique_ptr to TRY scope.
1112         (gdbscm_value_to_lazy_string): Use xfree directly instead of a
1113         cleanup.  Move 'buffer' unique_ptr to TRY scope.  Use
1114         scoped_value_mark.
1115         (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
1116         (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
1117         scoped_value_mark.
1118         (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
1119         gdbscm_wrap.
1120
1121 2018-07-18  Tom de Vries  <tdevries@suse.de>
1122
1123         * findvar.c (default_read_var_value): Also resolve dynamic type for
1124         LOC_OPTIMIZED_OUT vars.
1125
1126 2018-07-18  Maciej W. Rozycki  <macro@mips.com>
1127
1128         * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
1129         decoding.
1130
1131 2018-07-17  Tom Tromey  <tom@tromey.com>
1132
1133         * guile/scm-param.c (pascm_set_func, pascm_show_func)
1134         (compute_enum_list, pascm_set_param_value_x)
1135         (gdbscm_parameter_value): Update.
1136         * guile/guile-internal.h (gdbscm_scm_to_string): Update.
1137         (gdbscm_scm_to_host_string): Update.
1138         * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
1139         Update.
1140         * guile/scm-cmd.c (cmdscm_add_completion): Update.
1141         * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
1142         * guile/scm-string.c (gdbscm_scm_to_string): Return
1143         unique_xmalloc_ptr.
1144         (gdbscm_scm_to_host_string): Likewise.
1145
1146 2018-07-17  Tom Tromey  <tom@tromey.com>
1147
1148         * guile/guile.c (gdbscm_eval_from_control_command): Update.
1149         * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
1150         * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
1151         * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
1152         unique_xmalloc_ptr.
1153
1154 2018-07-17  Tom Tromey  <tom@tromey.com>
1155
1156         * guile/scm-param.c (pascm_signal_setshow_error): Update.
1157         * guile/guile-internal.h (gdbscm_exception_message_to_string):
1158         Update.
1159         * guile/scm-cmd.c (cmdscm_function): Update.
1160         * guile/scm-pretty-print.c
1161         (ppscm_print_exception_unless_memory_error): Update.
1162         * guile/scm-exception.c (gdbscm_exception_message_to_string):
1163         Return unique_xmalloc_ptr.
1164
1165 2018-07-17  Tom Tromey  <tom@tromey.com>
1166
1167         * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
1168         Use string_printf.
1169
1170 2018-07-17  Jim Wilson  <jimw@sifive.com>
1171
1172         * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
1173         set_gdbarch_decr_pc_after_break.  Call riscv_read_misa_reg always.
1174         (riscv_gdbarch_init): Delete local has_compressed_isa.  Delete now
1175         unecessary braces after EF_RISCV_RVC test.  Delete call to
1176         set_gdbarch_decr_pc_after_break.
1177
1178         * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
1179         RISCV_LAST_FP_REGNUM + 1.
1180         (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
1181
1182 2018-07-17  Tom Tromey  <tom@tromey.com>
1183
1184         * configure.ac: Remove --disable-gdbcli.
1185         * configure: Rebuild.
1186         * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
1187         (SUBDIR_CLI_CFLAGS): Remove.
1188         (SFILES): Use SUBDIR_CLI_SRCS.
1189         (COMMON_OBS): Use SUBDIR_CLI_OBS.
1190
1191 2018-07-17  Tom Tromey  <tom@tromey.com>
1192
1193         PR gdb/18624:
1194         * coffread.c (coff_symtab_read): Use scoped_free_pendings.
1195
1196 2018-07-16  Jim Wilson  <jimw@sifive.com>
1197
1198         * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
1199
1200 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
1201
1202         * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
1203         variable.
1204         (libunwind_frame_sniffer): Likewise.
1205         (libunwind_frame_prev_register): Likewise.
1206         (libunwind_sigtramp_frame_sniffer): Likewise.
1207         * ia64-tdep.c (ia64_access_reg): Likewise.
1208         (ia64_access_rse_reg): Likewise.
1209         (ia64_libunwind_sigtramp_frame_this_id): Likewise.
1210         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
1211
1212 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
1213
1214         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
1215
1216 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
1217
1218         * remote-sim.c (gdbsim_target::close,
1219         gdbsim_target::mourn_inferior): Remove unused variables.
1220
1221 2018-07-16  Simon Marchi  <simon.marchi@polymtl.ca>
1222
1223         * ia64-tdep.c (ktab_buf): New global.
1224         (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
1225         (get_kernel_table): Adjust.
1226
1227 2018-07-16  Tom Tromey  <tom@tromey.com>
1228
1229         * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
1230         * dwarf2read.c (using_directives, new_symbol): Use
1231         outermost_context_p.
1232         * dbxread.c (process_one_symbol): Use outermost_context_p.
1233         * coffread.c (coff_symtab_read): Use outermost_context_p.
1234
1235 2018-07-16  Tom Tromey  <tom@tromey.com>
1236
1237         * dwarf2read.c (using_directives, read_func_scope)
1238         (read_lexical_block_scope): Update.
1239         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
1240         * buildsym.h (local_using_directives, global_using_directives):
1241         Don't declare.
1242         (get_local_using_directives, set_local_using_directives)
1243         (get_global_using_directives): Declare.
1244         * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
1245         m_global_using_directives>: New members.
1246         (finish_block_internal, prepare_for_building)
1247         (reset_symtab_globals, end_symtab_get_static_block)
1248         (push_context): Update.
1249         (get_local_using_directives, set_local_using_directives)
1250         (get_global_using_directives): New functions.
1251         (buildsym_init): Update.
1252
1253 2018-07-16  Tom Tromey  <tom@tromey.com>
1254
1255         * xcoffread.c (xcoff_initial_scan): Don't call
1256         free_pending_blocks.
1257         * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
1258         * buildsym.h (class scoped_free_pendings): Add constructor.
1259         (free_pending_blocks): Don't declare.
1260         * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
1261         (free_pending_blocks): Now static.
1262
1263 2018-07-16  Tom Tromey  <tom@tromey.com>
1264
1265         * buildsym.h (push_subfile, pop_subfile): Update declarations.
1266         * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
1267         member.
1268         (struct subfile_stack): Remove.
1269         (subfile_stack): Remove.
1270         (push_subfile, pop_subfile, buildsym_init): Update.
1271
1272 2018-07-16  Tom Tromey  <tom@tromey.com>
1273
1274         * buildsym.c (push_subfile): Use gdb_assert.
1275         (pop_subfile): Use gdb_assert.
1276
1277 2018-07-16  Tom Tromey  <tom@tromey.com>
1278
1279         * buildsym.h (merge_symbol_lists): Remove.
1280         * buildsym.c (merge_symbol_lists): Remove.
1281
1282 2018-07-16  Tom Tromey  <tom@tromey.com>
1283
1284         * stabsread.c (scan_file_globals): Update comment.
1285         * stabsread.h (scan_file_globals): Move from buildsym.h.
1286         * buildsym.h (scan_file_globals): Move to stabsread.h.
1287
1288 2018-07-16  Tom Tromey  <tom@tromey.com>
1289
1290         * xcoffread.c (xcoff_new_init): Update.
1291         * mipsread.c (mipscoff_new_init): Update.
1292         * mdebugread.c (mdebug_build_psymtabs): Update.
1293         * elfread.c (elf_new_init): Update.
1294         * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
1295         (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
1296         * buildsym.h (buildsym_new_init): Don't declare.
1297         * buildsym.c (buildsym_new_init): Remove.
1298
1299 2018-07-16  Tom Tromey  <tom@tromey.com>
1300
1301         * stabsread.h (within_function): Move from buildsym.h.
1302         * stabsread.c (start_stabs): Clear within_function.
1303         * coffread.c (coff_start_symtab): Clear within_function.
1304         * buildsym.h (within_function): Move to stabsread.h.
1305         * buildsym.c (prepare_for_building): Update.
1306
1307 2018-07-16  Tom Tromey  <tom@tromey.com>
1308
1309         * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
1310         * dwarf2read.c (dwarf2_start_symtab): Don't set
1311         processing_gcc_compilation.
1312         * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
1313
1314 2018-07-16  Tom Tromey  <tom@tromey.com>
1315
1316         * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
1317         (next_symbol_text_func): Move from buildsym.h.
1318         * stabsread.c (hashname): Move from buildsym.c.
1319         * buildsym.h (HASHSIZE, symnum, next_symbol_text)
1320         (next_symbol_text_func, hashname): Move to stabsread.h.
1321         * buildsym.c: Don't include bcache.h
1322         (hashname): Move to stasbread.c.
1323
1324 2018-07-16  Tom Tromey  <tom@tromey.com>
1325
1326         * buildsym.h (context_stack_size): Don't declare.
1327         * buildsym.c (context_stack_size): New global.
1328
1329 2018-07-16  Tom Tromey  <tom@tromey.com>
1330
1331         * dbxread.c (processing_acc_compilation): New global.
1332         * buildsym.h (processing_acc_compilation): Don't declare.
1333
1334 2018-07-16  Tom Tromey  <tom@tromey.com>
1335
1336         * xcoffread.c (aix_process_linenos, complete_symtab): Update.
1337         * dbxread.c (read_ofile_symtab): Update.
1338         * coffread.c (coff_start_symtab, coff_end_symtab): Update.
1339         * buildsym.h (last_source_start_addr): Remove.
1340         (set_last_source_start_addr, get_last_source_start_addr):
1341         Declare.
1342         * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
1343         parameter.
1344         (struct buildsym_compunit) <m_last_source_start_addr>: New
1345         member.
1346         (prepare_for_building): Remove start_addr parameter.
1347         (start_symtab, restart_symtab, end_symtab_get_static_block)
1348         (end_symtab_with_blockvector): Update.
1349         (set_last_source_start_addr, get_last_source_start_addr): New
1350         functions.
1351
1352 2018-07-16  Tom Tromey  <tom@tromey.com>
1353
1354         * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
1355         member.
1356         (have_line_numbers): Remove.
1357         (record_line, prepare_for_building, end_symtab_get_static_block)
1358         (augment_type_symtab): Update.
1359
1360 2018-07-16  Tom Tromey  <tom@tromey.com>
1361
1362         * buildsym.c (~buildsym_compunit): Free the macro table.
1363         (struct buildsym_compunit) <get_macro_table, release_macros>: New
1364         methods.
1365         <m_pending_macros>: New member.
1366         (pending_macros): Remove.
1367         (~scoped_free_pendings, get_macro_table, prepare_for_building)
1368         (reset_symtab_globals, end_symtab_get_static_block)
1369         (end_symtab_with_blockvector, augment_type_symtab)
1370         (buildsym_init): Update.
1371
1372 2018-07-16  Tom Tromey  <tom@tromey.com>
1373
1374         * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
1375         parameter.
1376         (buildsym_compunit::set_last_source_file): New method.
1377         <m_last_source_file>: New member.
1378         (prepare_for_building): Remove "name" parameter.
1379         (start_symtab, restart_symtab, reset_symtab_globals): Update.
1380         (last_source_file): Remove.
1381         (set_last_source_file, get_last_source_file): Update.
1382
1383 2018-07-16  Tom Tromey  <tom@tromey.com>
1384
1385         * buildsym.c (prepare_for_building): Add assert.
1386
1387 2018-07-16  Tom Tromey  <tom@tromey.com>
1388
1389         * buildsym.c (~buildsym_compunit): Update.
1390         (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
1391         (start_subfile, patch_subfile_names)
1392         (end_symtab_with_blockvector): Update.
1393
1394 2018-07-16  Tom Tromey  <tom@tromey.com>
1395
1396         * buildsym.c (struct buildsym_compunit): Add constructor,
1397         destructor, initializers.
1398         (start_buildsym_compunit): Remove.
1399         (free_buildsym_compunit): Use "delete".
1400         (start_symtab, restart_symtab): Use "new".
1401
1402 2018-07-13  Simon Marchi  <simon.marchi@polymtl.ca>
1403
1404         * symfile.c (set_objfile_default_section_offset): Remove struct
1405         keyword.
1406
1407 2018-07-14  Stafford Horne  <shorne@gmail.com>
1408
1409         * (Responsible Maintainers): Add myself as or1k maintainer.
1410
1411 2018-07-13  Tom Tromey  <tom@tromey.com>
1412
1413         * symfile.c (set_objfile_default_section_offset): Use extra braces
1414         around initializer.
1415
1416 2018-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1417
1418         * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
1419         non-branching basr.
1420
1421 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1422
1423         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1424         unittests/cli-utils-selftests.c
1425         * unittests/cli-utils-selftests.c: New file.
1426
1427 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1428
1429         * NEWS: Mention new commands. Mention change to 'thread apply'.
1430
1431 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1432
1433         * thread.c (thr_try_catch_cmd): New function.
1434         (thread_apply_all_command): Handle qcs flags.
1435         (thread_apply_command): Handle qcs flags.
1436         (taas_command): New function.
1437         (tfaas_command): New function.
1438         (_initialize_thread): Update to setup the new commands 'taas
1439         and 'tfaas'. Change doc string for 'thread apply'.
1440
1441 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1442
1443         * stack.c: (trailing_outermost_frame): New function, mostly
1444         extracted from backtrace_command_1.
1445         (leading_innermost_frame): New function.
1446         (backtrace_command_1): Update to call trailing_outermost_frame.
1447         (frame_apply_command_count): New function.
1448         (frame_apply_level_command): New function.
1449         (frame_apply_all_command): New function.
1450         (frame_apply_command): New function.
1451         (faas_command): New function.
1452         (frame_cmd_list): New variable.
1453         (_initialize_stack): Update to setup the new commands 'frame apply'
1454         and 'faas'.
1455
1456 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1457
1458         * cli-utils.c (number_or_range_parser::get_number): Only handle
1459         numbers or convenience var as numbers.
1460         (parse_flags): New function.
1461         (parse_flags_qcs): New function.
1462         (number_or_range_parser::finished): Ensure parsing end is detected
1463         before end of string.
1464         * cli-utils.h (parse_flags): New function.
1465         (parse_flags_qcs): New function.
1466         (number_or_range_parser): Remove m_finished bool.
1467         (number_or_range_parser::skip_range): Set m_in_range to false.
1468
1469 2018-07-12  Sergio Durigan Junior  <sergiodj@redhat.com>
1470
1471         * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
1472         on Windows.
1473
1474 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
1475             Jan Kratochvil  <jan.kratochvil@redhat.com>
1476             Paul Fertser  <fercerpav@gmail.com>
1477             Tsutomu Seki  <sekiriki@gmail.com>
1478             Pedro Alves  <palves@redhat.com>
1479
1480         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1481         'unittests/parse-connection-spec-selftests.c'.
1482         (COMMON_SFILES): Add 'common/netstuff.c'.
1483         (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
1484         * NEWS (Changes since GDB 8.2): Mention IPv6 support.
1485         * common/netstuff.c: New file.
1486         * common/netstuff.h: New file.
1487         * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
1488         (wait_for_connect): Update comment.  New parameter
1489         'gdb::optional<int> sock' instead of 'struct serial *scb'.
1490         Use 'sock' directly instead of 'scb->fd'.
1491         (try_connect): New function, with code from 'net_open'.
1492         (net_open): Rewrite main loop to deal with multiple
1493         sockets/addresses.  Handle IPv6-style hostnames; implement
1494         support for IPv6 connections.
1495         * unittests/parse-connection-spec-selftests.c: New file.
1496
1497 2018-07-11  Pedro Alves  <palves@redhat.com>
1498
1499         PR gdb/23377
1500         * remote.c (remote_target::remote_detach_pid): Call
1501         set_current_process.
1502
1503 2018-07-11  Pedro Alves  <palves@redhat.com>
1504
1505         * h8300-tdep.c (h8300_gdbarch_init): Remove
1506         set_gdbarch_ecoff_reg_to_regnum calls.
1507
1508 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
1509
1510         PR c++/23373
1511         * c-typeprint.c (c_type_print_base_struct_union): Don't print
1512         offsets/sizes for static members of a class/struct.
1513
1514 2018-07-11  Alan Hayward  <alan.hayward@arm.com>
1515
1516         * target-descriptions.c (tdesc_register_bitsize): Rename.
1517         * target-descriptions.h (tdesc_register_bitsize): Likewise.
1518         * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
1519         * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
1520
1521 2018-07-10  Tom Tromey  <tom@tromey.com>
1522
1523         * breakpoint.c (moribund_locations): Now static and a
1524         std::vector.
1525         (breakpoint_init_inferior, moribund_breakpoint_here_p)
1526         (build_bpstat_chain, update_global_location_list)
1527         (breakpoint_retire_moribund): Update.
1528         * breakpoint.h (bp_location_p): Remove typedef.  Don't declare
1529         VEC.
1530
1531 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
1532
1533         * riscv-tdep.c (riscv_is_fp_regno_p): New function.
1534         (riscv_register_reggroup_p): Use new function, remove unneeded
1535         parenthesis.
1536         (riscv_push_dummy_call): Extend assert to compare against xlen or
1537         flen based on register type.
1538
1539 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
1540
1541         * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
1542
1543 2018-07-09  Andrew Burgess  <andrew.burgess@embecosm.com>
1544
1545         * remote.c (show_hardware_watchpoint_limit): New function.
1546         (show_hardware_watchpoint_length_limit): New function.
1547         (show_hardware_breakpoint_limit): New function.
1548         (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
1549         where appropriate, update help text.
1550
1551 2018-07-09  Tom Tromey  <tom@tromey.com>
1552
1553         * Makefile.in (CDEPS): Don't mention XM_CDEPS.
1554         (CLIBS): Don't mention NAT_CLIBS.
1555
1556 2018-07-09  Tom Tromey  <tom@tromey.com>
1557
1558         * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
1559         (LIBGDB_OBS, clean mostlyclean): Update.
1560         (gdb$(EXEEXT), insight$(EXEEXT)): Update.
1561
1562 2018-07-09  Tom Tromey  <tom@tromey.com>
1563
1564         * Makefile.in (%.c: %.y): Use ECHO_YACC.
1565         (%.c: %.l): Use ECHO_LEX.  Just fail if flex not available.
1566         * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
1567
1568 2018-07-09  Tom Tromey  <tom@tromey.com>
1569
1570         * Makefile.in (ALLDEPFILES): Remove exec.c.
1571         (COMMON_OBS): Remove exec.o.
1572         (COMMON_SFILES): Add exec.c.
1573
1574 2018-07-09  Tom Tromey  <tom@tromey.com>
1575
1576         * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
1577
1578 2018-07-09  Tom Tromey  <tom@tromey.com>
1579
1580         * Makefile.in (clean mostlyclean): Remove stamp-version.
1581         (version.c): Depend on stamp-version.
1582         (stamp-version): New rule, from version.c rule.
1583
1584 2018-07-09  Tom Tromey  <tom@tromey.com>
1585
1586         * Makefile.in (init.c): Depend on stamp-init.
1587         (stamp-init): New rule, from init.c rule.
1588         (clean mostlyclean): Remove stamp-init.
1589
1590 2018-07-09  Tom Tromey  <tom@tromey.com>
1591
1592         * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
1593         SUBDIR_GCC_COMPILE_SRCS.
1594
1595 2018-07-09  Tom Tromey  <tom@tromey.com>
1596
1597         * Makefile.in (init.c): Remove some unused sed rules.
1598
1599 2018-07-09  Tom Tromey  <tom@tromey.com>
1600
1601         * Makefile.in (TSOBS): Remove.
1602         (INIT_FILES): Update.
1603         (LIBGDB_OBS): Update.
1604         (COMMON_SFILES): Add inflow.c.
1605         (SFILES): Remove inflow.c.
1606
1607 2018-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
1608
1609         * contrib/gdb-add-index.sh ($dwarf5): New, use it.
1610
1611 2018-07-07  Simon Marchi  <simon.marchi@polymtl.ca>
1612
1613         * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
1614         get_saveloc_name, is_signal_frame_name, step_name,
1615         init_remote_name, create_addr_space_name,
1616         destroy_addr_space_name, search_unwind_table_name,
1617         find_dyn_list_name): Constify.
1618
1619 2018-07-05  Simon Marchi  <simon.marchi@polymtl.ca>
1620
1621         * darwin-nat.c (darwin_pthread_kill): New function.
1622         (darwin_resume_thread): Use darwin_pthread_kill.
1623
1624 2018-07-05  Tom de Vries  <tdevries@suse.de>
1625
1626         * macroexp.c (macro_buffer) <operator=>: New member function.
1627
1628 2018-07-04  Tom Tromey  <tom@tromey.com>
1629
1630         * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
1631
1632 2018-07-04  Simon Marchi  <simon.marchi@polymtl.ca>
1633
1634         * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
1635         * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
1636         * maint.c: Likewise.
1637         * top.c: Likewise.
1638
1639 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
1640
1641         * NEWS: Create a new section for the next release branch.
1642         Rename the section of the current branch, now that it has
1643         been cut.
1644
1645 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
1646
1647         GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
1648         * version.in: Bump version to 8.2.50.DATE-git.
1649
1650 2018-07-04  Vyacheslav Barinov  <v.barinov@samsung.com>
1651             Pedro Alves  <palves@redhat.com>
1652
1653         * linux-nat.c (linux_init_ptrace): Rename to ...
1654         (linux_init_ptrace_procfs): ... this.  Call
1655         linux_proc_init_warnings.
1656         (linux_nat_target::post_attach)
1657         (linux_nat_target::post_startup_inferior): Adjust.
1658         * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
1659         * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
1660
1661 2018-07-04  Tom de Vries  <tdevries@suse.de>
1662
1663         * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
1664         check ...
1665         (read_comp_unit_head): ... here.
1666
1667 2018-07-03  Tom Tromey  <tom@tromey.com>
1668
1669         * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
1670         (stop_tracing, tstatus_command)
1671         (find_matching_tracepoint_location, merge_uploaded_tracepoints)
1672         (print_one_static_tracepoint_marker): Update.
1673         * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
1674         std::vector.
1675         * breakpoint.h (breakpoint_p): Remove typedef.  Don't declare
1676         VEC.
1677         (all_tracepoints, static_tracepoints_here): Return std::vector.
1678
1679 2018-07-03  Tom Tromey  <tom@tromey.com>
1680
1681         * common/ptid.c (ptid_equal): Remove.
1682         * common/ptid.h (ptid_equal): Don't declare.
1683         * ada-tasks.c: Update.
1684         * breakpoint.c: Update.
1685         * common/agent.c: Update.
1686         * corelow.c: Update.
1687         * darwin-nat-info.c: Update.
1688         * darwin-nat.c: Update.
1689         * dcache.c: Update.
1690         * dtrace-probe.c: Update.
1691         * dummy-frame.c: Update.
1692         * fbsd-nat.c: Update.
1693         * frame.c: Update.
1694         * gdbthread.h: Update.
1695         * gnu-nat.c: Update.
1696         * go32-nat.c: Update.
1697         * inf-loop.c: Update.
1698         * inf-ptrace.c: Update.
1699         * infcall.c: Update.
1700         * infcmd.c: Update.
1701         * inflow.c: Update.
1702         * infrun.c: Update.
1703         * linux-fork.c: Update.
1704         * linux-nat.c: Update.
1705         * linux-thread-db.c: Update.
1706         * mi/mi-cmd-var.c: Update.
1707         * mi/mi-interp.c: Update.
1708         * mi/mi-main.c: Update.
1709         * nto-procfs.c: Update.
1710         * ppc-linux-tdep.c: Update.
1711         * procfs.c: Update.
1712         * python/py-inferior.c: Update.
1713         * python/py-record-btrace.c: Update.
1714         * python/py-record.c: Update.
1715         * ravenscar-thread.c: Update.
1716         * regcache.c: Update.
1717         * remote-sim.c: Update.
1718         * remote.c: Update.
1719         * sol-thread.c: Update.
1720         * solib.c: Update.
1721         * target.c: Update.
1722         * tui/tui-stack.c: Update.
1723         * varobj.c: Update.
1724         * windows-nat.c: Update.
1725         * windows-tdep.c: Update.
1726
1727 2018-07-03  Tom Tromey  <tom@tromey.com>
1728
1729         * common/ptid.c (ptid_match): Remove.
1730         * common/ptid.h (ptid_match): Don't declare.
1731         * fbsd-nat.c: Update.
1732         * infcmd.c: Update.
1733         * infrun.c: Update.
1734         * linux-nat.c: Update.
1735         * record-btrace.c: Update.
1736         * regcache.c: Update.
1737         * remote.c: Update.
1738
1739 2018-07-03  Tom Tromey  <tom@tromey.com>
1740
1741         * common/ptid.c (ptid_tid_p): Remove.
1742         * common/ptid.h (ptid_tid_p): Don't declare.
1743         * sol-thread.c: Update.
1744
1745 2018-07-03  Tom Tromey  <tom@tromey.com>
1746
1747         * common/ptid.c (ptid_lwp_p): Remove.
1748         * common/ptid.h (ptid_lwp_p): Don't declare.
1749         * fbsd-nat.c: Update.
1750         * linux-nat.c: Update.
1751         * nat/linux-procfs.c: Update.
1752         * nat/x86-linux-dregs.c: Update.
1753         * sol-thread.c: Update.
1754
1755 2018-07-03  Tom Tromey  <tom@tromey.com>
1756
1757         * common/ptid.c (ptid_is_pid): Remove.
1758         * common/ptid.h (ptid_is_pid): Don't declare.
1759         * infrun.c: Update.
1760         * linux-nat.c: Update.
1761         * mi/mi-interp.c: Update.
1762         * remote.c: Update.
1763         * thread.c: Update.
1764
1765 2018-07-03  Tom Tromey  <tom@tromey.com>
1766
1767         * common/ptid.c (ptid_get_tid): Remove.
1768         * common/ptid.h (ptid_get_tid): Don't declare.
1769         * ada-tasks.c: Update.
1770         * aix-thread.c: Update.
1771         * bsd-uthread.c: Update.
1772         * darwin-nat.c: Update.
1773         * fbsd-nat.c: Update.
1774         * i386-darwin-nat.c: Update.
1775         * infrun.c: Update.
1776         * linux-tdep.c: Update.
1777         * nto-procfs.c: Update.
1778         * ppc-ravenscar-thread.c: Update.
1779         * python/py-infthread.c: Update.
1780         * ravenscar-thread.c: Update.
1781         * sol-thread.c: Update.
1782         * sparc-ravenscar-thread.c: Update.
1783         * windows-nat.c: Update.
1784
1785 2018-07-03  Tom Tromey  <tom@tromey.com>
1786
1787         * common/ptid.c (ptid_get_lwp): Remove.
1788         * common/ptid.h (ptid_get_lwp): Don't declare.
1789         * aarch64-linux-nat.c: Update.
1790         * ada-tasks.c: Update.
1791         * aix-thread.c: Update.
1792         * amd64-linux-nat.c: Update.
1793         * arm-linux-nat.c: Update.
1794         * corelow.c: Update.
1795         * fbsd-nat.c: Update.
1796         * fbsd-tdep.c: Update.
1797         * gnu-nat.c: Update.
1798         * i386-cygwin-tdep.c: Update.
1799         * i386-gnu-nat.c: Update.
1800         * i386-linux-nat.c: Update.
1801         * ia64-linux-nat.c: Update.
1802         * inf-ptrace.c: Update.
1803         * infrun.c: Update.
1804         * linux-fork.c: Update.
1805         * linux-nat.c: Update.
1806         * linux-tdep.c: Update.
1807         * linux-thread-db.c: Update.
1808         * mips-linux-nat.c: Update.
1809         * nat/aarch64-linux-hw-point.c: Update.
1810         * nat/aarch64-linux.c: Update.
1811         * nat/linux-btrace.c: Update.
1812         * nat/linux-osdata.c: Update.
1813         * nat/linux-procfs.c: Update.
1814         * nat/x86-linux-dregs.c: Update.
1815         * obsd-nat.c: Update.
1816         * ppc-fbsd-nat.c: Update.
1817         * ppc-linux-nat.c: Update.
1818         * procfs.c: Update.
1819         * python/py-infthread.c: Update.
1820         * ravenscar-thread.c: Update.
1821         * remote.c: Update.
1822         * s390-linux-nat.c: Update.
1823         * sol-thread.c: Update.
1824         * sol2-tdep.c: Update.
1825         * spu-linux-nat.c: Update.
1826         * x86-linux-nat.c: Update.
1827         * xtensa-linux-nat.c: Update.
1828
1829 2018-07-03  Tom Tromey  <tom@tromey.com>
1830
1831         * common/ptid.c (ptid_get_pid): Remove.
1832         * common/ptid.h (ptid_get_pid): Don't declare.
1833         * aarch64-linux-nat.c: Update.
1834         * ada-lang.c: Update.
1835         * aix-thread.c: Update.
1836         * alpha-bsd-nat.c: Update.
1837         * amd64-fbsd-nat.c: Update.
1838         * amd64-linux-nat.c: Update.
1839         * arm-linux-nat.c: Update.
1840         * arm-nbsd-nat.c: Update.
1841         * auxv.c: Update.
1842         * break-catch-syscall.c: Update.
1843         * breakpoint.c: Update.
1844         * bsd-uthread.c: Update.
1845         * corelow.c: Update.
1846         * ctf.c: Update.
1847         * darwin-nat.c: Update.
1848         * fbsd-nat.c: Update.
1849         * fbsd-tdep.c: Update.
1850         * gcore.c: Update.
1851         * gnu-nat.c: Update.
1852         * hppa-nbsd-nat.c: Update.
1853         * hppa-obsd-nat.c: Update.
1854         * i386-fbsd-nat.c: Update.
1855         * ia64-linux-nat.c: Update.
1856         * inf-ptrace.c: Update.
1857         * infcmd.c: Update.
1858         * inferior.c: Update.
1859         * inferior.h: Update.
1860         * inflow.c: Update.
1861         * infrun.c: Update.
1862         * linux-fork.c: Update.
1863         * linux-nat.c: Update.
1864         * linux-tdep.c: Update.
1865         * linux-thread-db.c: Update.
1866         * m68k-bsd-nat.c: Update.
1867         * mi/mi-interp.c: Update.
1868         * mi/mi-main.c: Update.
1869         * mips-linux-nat.c: Update.
1870         * mips-nbsd-nat.c: Update.
1871         * mips64-obsd-nat.c: Update.
1872         * nat/aarch64-linux-hw-point.c: Update.
1873         * nat/aarch64-linux.c: Update.
1874         * nat/linux-btrace.c: Update.
1875         * nat/linux-osdata.c: Update.
1876         * nat/linux-procfs.c: Update.
1877         * nat/x86-linux-dregs.c: Update.
1878         * nto-procfs.c: Update.
1879         * obsd-nat.c: Update.
1880         * ppc-linux-nat.c: Update.
1881         * ppc-nbsd-nat.c: Update.
1882         * ppc-obsd-nat.c: Update.
1883         * proc-service.c: Update.
1884         * procfs.c: Update.
1885         * python/py-inferior.c: Update.
1886         * python/py-infthread.c: Update.
1887         * ravenscar-thread.c: Update.
1888         * record.c: Update.
1889         * remote-sim.c: Update.
1890         * remote.c: Update.
1891         * rs6000-nat.c: Update.
1892         * s390-linux-nat.c: Update.
1893         * sh-nbsd-nat.c: Update.
1894         * sol-thread.c: Update.
1895         * sparc-nat.c: Update.
1896         * sparc64-tdep.c: Update.
1897         * spu-linux-nat.c: Update.
1898         * spu-tdep.c: Update.
1899         * target-debug.h: Update.
1900         * target.c: Update.
1901         * thread.c: Update.
1902         * tid-parse.c: Update.
1903         * tracefile-tfile.c: Update.
1904         * vax-bsd-nat.c: Update.
1905         * windows-nat.c: Update.
1906         * x86-linux-nat.c: Update.
1907         * x86-nat.c: Update.
1908
1909 2018-07-03  Tom Tromey  <tom@tromey.com>
1910
1911         * common/ptid.c (pid_to_ptid): Remove.
1912         * common/ptid.h (pid_to_ptid): Don't declare.
1913         * aix-thread.c: Update.
1914         * arm-linux-nat.c: Update.
1915         * common/ptid.c: Update.
1916         * common/ptid.h: Update.
1917         * corelow.c: Update.
1918         * ctf.c: Update.
1919         * darwin-nat.c: Update.
1920         * fbsd-nat.c: Update.
1921         * fork-child.c: Update.
1922         * gnu-nat.c: Update.
1923         * go32-nat.c: Update.
1924         * inf-ptrace.c: Update.
1925         * infcmd.c: Update.
1926         * inferior.c: Update.
1927         * infrun.c: Update.
1928         * linux-fork.c: Update.
1929         * linux-nat.c: Update.
1930         * nat/aarch64-linux-hw-point.c: Update.
1931         * nat/fork-inferior.c: Update.
1932         * nat/x86-linux-dregs.c: Update.
1933         * nto-procfs.c: Update.
1934         * obsd-nat.c: Update.
1935         * procfs.c: Update.
1936         * progspace.c: Update.
1937         * remote.c: Update.
1938         * rs6000-nat.c: Update.
1939         * s390-linux-nat.c: Update.
1940         * sol-thread.c: Update.
1941         * spu-linux-nat.c: Update.
1942         * target.c: Update.
1943         * top.c: Update.
1944         * tracefile-tfile.c: Update.
1945         * windows-nat.c: Update.
1946
1947 2018-07-03  Tom Tromey  <tom@tromey.com>
1948
1949         * common/ptid.h (ptid_build): Don't declare.
1950         * common/ptid.c (ptid_build): Remove.
1951         * aix-thread.c: Update.
1952         * bsd-kvm.c: Update.
1953         * bsd-uthread.c: Update.
1954         * common/agent.c: Update.
1955         * common/ptid.c: Update.
1956         * common/ptid.h: Update.
1957         * corelow.c: Update.
1958         * darwin-nat.c: Update.
1959         * fbsd-nat.c: Update.
1960         * gnu-nat.c: Update.
1961         * linux-fork.c: Update.
1962         * linux-nat.c: Update.
1963         * linux-thread-db.c: Update.
1964         * nat/linux-osdata.c: Update.
1965         * nat/linux-procfs.c: Update.
1966         * nto-procfs.c: Update.
1967         * obsd-nat.c: Update.
1968         * proc-service.c: Update.
1969         * procfs.c: Update.
1970         * ravenscar-thread.c: Update.
1971         * remote-sim.c: Update.
1972         * remote.c: Update.
1973         * sol-thread.c: Update.
1974         * target.c: Update.
1975         * windows-nat.c: Update.
1976
1977 2018-07-03  Tom Tromey  <tom@tromey.com>
1978
1979         * infrun.c (follow_exec): Use exit_inferior_silent.
1980         * inferior.c (exit_inferior_num_silent): Remove.
1981         * inferior.h (exit_inferior_num_silent): Don't declare.
1982
1983 2018-07-03  Tom Tromey  <tom@tromey.com>
1984
1985         PR cli/23340:
1986         * darwin-nat.c (darwin_attach_pid): Reset inferior and
1987         inferior_ptid on error.
1988
1989 2018-07-02  Maciej W. Rozycki  <macro@mips.com>
1990             Simon Marchi  <simon.marchi@polymtl.ca>
1991
1992         PR tdep/8282
1993         * disasm.h (gdb_disassembler): Add
1994         `m_disassembler_options_holder'. member
1995         * disasm.c (get_all_disassembler_options): New function.
1996         (gdb_disassembler::gdb_disassembler): Use it.
1997         (gdb_buffered_insn_length_init_dis): Likewise.
1998         (gdb_buffered_insn_length): Adjust accordingly.
1999         (set_disassembler_options): Handle options with arguments.
2000         (show_disassembler_options_sfunc): Likewise.  Add a leading new
2001         line if showing options with descriptions.
2002         (disassembler_options_completer): Adapt to using the
2003         `disasm_options_and_args_t' structure.
2004         * mips-tdep.c (mips_disassembler_options): New variable.
2005         (mips_disassembler_options_o32): Likewise.
2006         (mips_disassembler_options_n32): Likewise.
2007         (mips_disassembler_options_n64): Likewise.
2008         (gdb_print_insn_mips): Don't set `disassembler_options'.
2009         (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
2010         functions.
2011         (mips_gdbarch_init): Always set `gdbarch_print_insn' to
2012         `gdb_print_insn_mips'.  Set `gdbarch_disassembler_options',
2013         `gdbarch_disassembler_options_implicit' and
2014         `gdbarch_valid_disassembler_options'.
2015         * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
2016         `disasm_options_and_args_t' structure.
2017         * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
2018         method.
2019         (valid_disassembler_options): Switch from `disasm_options_t' to
2020         the `disasm_options_and_args_t' structure.
2021         * NEWS: Document `set disassembler-options' support for the MIPS
2022         target.
2023         * gdbarch.h: Regenerate.
2024         * gdbarch.c: Regenerate.
2025
2026 2018-07-02  Sebastian Huber  <sebastian.huber@embedded-brains.de>
2027
2028         * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
2029
2030 2018-06-29  Joel Brobecker  <brobecker@adacore.com>
2031
2032         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
2033         parameter in call to amd64_target_description.
2034         * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
2035         * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
2036         (amd64fbsd_init_abi): Likewise.
2037         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
2038         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
2039         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
2040         * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
2041
2042 2018-06-29  Pedro Alves  <palves@redhat.com>
2043
2044         * gdb/amd64-tdep.h (amd64_create_target_description): Add
2045         "segments" parameter.
2046         * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
2047         (_initialize_amd64_tdep): Update call to
2048         amd64_create_target_description.
2049         (amd64_target_description): Add "segments" parameter.  Adjust
2050         the implementation to use it.
2051         * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
2052         call to amd64_create_target_description.
2053         * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
2054         * gdb/arch/amd64.h (amd64_create_target_description): Add
2055         "segments" register.
2056         * gdb/arch/amd64.c (amd64_create_target_description): Add
2057         "segments" parameter.  Call create_feature_i386_64bit_segments
2058         only if SEGMENTS is true.
2059         * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
2060         call to amd64_create_target_description.
2061
2062 2018-06-29  Pedro Alves  <palves@redhat.com>
2063
2064         * thread.c (thread_target_id_str): New, factored out from ...
2065         (print_thread_info_1): ... here.  Use it to compute the max
2066         "Target Id" column width.
2067
2068 2018-06-29  Pedro Alves  <palves@redhat.com>
2069
2070         * remote.c (remote_target::extra_thread_info): Delete
2071         'display_buf' and 'n' locals.  from the cache, regardless of
2072         packet mechanims is in use.  Use cache for qThreadExtra and qP
2073         methods too.
2074
2075 2018-06-29  Pedro Alves  <palves@redhat.com>
2076
2077         * blockframe.c (find_pc_sect_containing_function): New function.
2078         * breakpoint.c (print_breakpoint_location): Don't call
2079         find_pc_sect_function.
2080         * linespec.c (create_sals_line_offset): Record the location's
2081         symbol in the sal.
2082         * linespec.c (convert_address_location_to_sals): Fill in sal's
2083         symbol with find_pc_sect_containing_function.
2084         * symtab.c (find_function_start_sal): Rename to ...
2085         (find_function_start_sal_1): ... this.
2086         (find_function_start_sal): Reimplement as wrapper around
2087         find_function_start_sal_1, and use
2088         find_pc_sect_containing_function to fill in the sal's symbol.
2089         (find_function_start_sal(symbol*, bool)): Adjust.
2090         * symtab.h (find_pc_function, find_pc_sect_function): Adjust
2091         comments.
2092         (find_pc_sect_containing_function): Declare.
2093
2094 2018-06-29  Pedro Alves  <palves@redhat.com>
2095
2096         * inline-frame.c (stopped_by_user_bp_inline_frame): Return
2097         true if the the location has no symbol.
2098
2099 2018-06-28  Tom Tromey  <tom@tromey.com>
2100
2101         * NEWS: Mention --enable-codesign.
2102         * silent-rules.mk (ECHO_SIGN): New variable.
2103         * configure.ac: Add --enable-codesign.
2104         * configure: Rebuild.
2105         * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
2106         (gdb$(EXEEXT)): Optionally invoke codesign.
2107
2108 2018-06-28  Pedro Alves  <palves@redhat.com>
2109
2110         * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
2111         comments.
2112         (switch_to_thread_no_regs): Adjust comment.
2113         * infcmd.c (stop_pc): Delete.
2114         (post_create_inferior, info_program_command): Replace references
2115         to stop_pc with references to thread_info->suspend.stop_pc.
2116         * inferior.h (stop_pc): Delete declaration.
2117         * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
2118         (handle_inferior_event_1, handle_signal_stop)
2119         (process_event_stop_test, keep_going_stepped_thread)
2120         (handle_step_into_function, handle_step_into_function_backward)
2121         (print_stop_location): Replace references to stop_pc with
2122         references to thread_info->suspend.stop_pc.
2123         (struct infcall_suspend_state) <stop_pc>: Delete field.
2124         (save_infcall_suspend_state, restore_infcall_suspend_state):
2125         Remove references to inf_stat->stop_pc.
2126         * linux-fork.c (fork_load_infrun_state): Likewise.
2127         * record-btrace.c (record_btrace_set_replay): Likewise.
2128         * record-full.c (record_full_goto_entry): Likewise.
2129         * remote.c (print_one_stopped_thread): Likewise.
2130         * target.c (target_resume): Extend comment.
2131         * thread.c (set_executing_thread): New.
2132         (set_executing): Use it.
2133         (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
2134         Remove references to stop_pc.
2135
2136 2018-06-28  Pedro Alves  <palves@redhat.com>
2137
2138         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
2139         Moving fetching stop_pc until after ecs->event_thread is refreshed.
2140
2141 2018-06-28  Tom Tromey  <tom@tromey.com>
2142
2143         * coffread.c (coff_symfile_finish): Update.
2144         * xcoffread.c (xcoff_symfile_finish): Update.
2145         * elfread.c (elf_symfile_finish): Update.
2146         * symfile.h (dwarf2_free_objfile): Don't declare.
2147         * dwarf2read.c (_initialize_dwarf2_read): Use
2148         register_objfile_data_with_cleanup.
2149         (dwarf2_free_objfile): Now static.  Change signature.
2150
2151 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
2152
2153         * symfile.c (add_symbol_file_command, _initialize_symfile): Add
2154         option "-o" to add-symbol-file-load to add an offset to each
2155         section's load address.
2156         * symfile.c (set_objfile_default_section_offset): New function.
2157
2158 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
2159
2160         * symfile.c (add_symbol_file_command): Make sure that sections
2161         with the same name are sorted in the same order.
2162
2163 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
2164
2165         * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
2166         require the second argument.  If omitted, load sections at the
2167         addresses specified in the file.
2168
2169 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
2170
2171         * symfile.c (symbol_file_command, symbol_file_add_main_1)
2172         (_initialize_symfile): Add option "-o" to symbol-file to add an
2173         offset to each section of the symbol file.
2174
2175 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
2176
2177         * MAINTAINERS (Write After Approval): Add Petr Tesarik.
2178
2179 2018-06-27  Tom Tromey  <tom@tromey.com>
2180
2181         * stack.c (_initialize_stack): Update "func" help text.
2182
2183 2018-06-27  Tom Tromey  <tom@tromey.com>
2184
2185         * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
2186         std::vector.
2187         (unwind_infopy_str, pyuw_create_unwind_info)
2188         (unwind_infopy_add_saved_register, pyuw_sniffer)
2189         (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
2190         Update.
2191         (struct saved_reg): Add constructor.
2192         <value>: Now a gdbpy_ref<>.
2193
2194 2018-06-27  Tom Tromey  <tom@tromey.com>
2195
2196         * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
2197
2198 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
2199
2200         * gdb-gdb.py.in: Format using autopep8.
2201
2202 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
2203
2204         * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
2205         (type_lookup_function): Recognize CORE_ADDR values.
2206
2207 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
2208
2209         * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
2210         print tag_name.
2211
2212 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
2213
2214         * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
2215         <__lt__>: Add.
2216
2217 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
2218
2219         * gdb-gdb.py: Move to...
2220         * gdb-gdb.py.in: ... here.
2221         * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
2222         * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
2223         dependencies.
2224         (distclean): Remove gdb-gdb.py when cleaning.
2225         (gdb-gdb.py, gdb-gdb.gdb): New rules.
2226         * configure: Re-generate.
2227
2228 2018-06-27  Pedro Alves  <palves@redhat.com>
2229
2230         * proc-service.c (get_ps_regcache): New.
2231         (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
2232         (ps_lsetfpregs): Use it.
2233
2234 2018-06-27  Omair Javaid  <omair.javaid@linaro.org>
2235
2236         PR gdb/21695
2237         * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
2238         (dwarf_decode_lines_1): Adjust.
2239
2240 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
2241
2242         * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
2243         override.
2244         <info_proc>: Likewise.
2245
2246 2018-06-26  Joel Brobecker  <brobecker@adacore.com>
2247
2248         * windows-nat.c (do_windows_fetch_inferior_registers): Rename
2249         to windows_fetch_one_register, and only handle the case of
2250         fetching one register.  Move the code that reloads the context
2251         and iterates over all registers if R is negative to...
2252         (windows_nat_target::fetch_registers): ... here.
2253         (do_windows_store_inferior_registers): Rename to
2254         windows_store_one_register, and only handle the case of storing
2255         one register.  Move the code that handles the case where r is
2256         negative to...
2257         (windows_nat_target::store_registers) ... here.
2258
2259 2018-06-26  Tom Tromey  <tom@tromey.com>
2260
2261         PR rust/22574:
2262         * typeprint.c (whatis_exp): Allow ptype/o for Rust.
2263         * rust-lang.c (rust_print_struct_def): Add podata parameter.
2264         Update.
2265         (rust_internal_print_type): Add podata parameter.
2266         (rust_print_type): Update.
2267
2268 2018-06-26  Tom Tromey  <tom@tromey.com>
2269
2270         * typeprint.h (struct print_offset_data) <update, finish,
2271         maybe_print_hole>: New methods.
2272         <indentation>: New constant.
2273         * typeprint.c (print_offset_data::indentation): Define.
2274         (print_offset_data::maybe_print_hole, print_offset_data::update)
2275         (print_offset_data::finish): Move from c-typeprint.c and rename.
2276         * c-typeprint.c (OFFSET_SPC_LEN): Remove.
2277         (print_spaces_filtered_with_print_options): Update.
2278         (c_print_type_union_field_offset, maybe_print_hole)
2279         (c_print_type_struct_field_offset): Move to typeprint.c and
2280         rename.
2281         (c_type_print_base_struct_union): Update.
2282
2283 2018-06-25  Pedro Alves  <palves@redhat.com>
2284
2285         * gdbthread.h (thread_info_ref, delete_thread)
2286         (delete_thread_silent, first_thread_of_inferior)
2287         (any_thread_of_inferior, switch_to_thread)
2288         (enable_thread_stack_temporaries)
2289         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2290         (get_last_thread_stack_temporary)
2291         (value_in_thread_stack_temporaries, can_access_registers_thread):
2292         Spell out "struct thread_info" instead of just "thread_info".
2293         * inferior.h (notice_new_inferior): Likewise.
2294
2295 2018-06-25  Pedro Alves  <palves@redhat.com>
2296
2297         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
2298         pass thread_info pointer to delete_thread.
2299         (windows_nat_target::detach): Pass inferior pointer to
2300         detach_inferior.
2301         * aix-thread.c (sync_threadlists): Pass thread_info pointer to
2302         delete_thread.
2303         * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
2304         * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
2305         and pass a thread_info pointer to delete_thread.
2306         * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
2307         pass thread_info pointer to delete_thread.
2308         * go32-nat.c (go32_nat_target::mourn_inferior): Remove
2309         delete_thread_silent call.
2310         * procfs.c (procfs_target::detach): Pass inferior pointer to
2311         detach_inferior.
2312         (procfs_target::wait): Pass thread_info pointer to delete_thread.
2313         * remote-sim.c (gdbsim_target::mourn_inferior): Remove
2314         delete_thread_silent call.
2315         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
2316         pass thread_info pointer to delete_thread.
2317         (windows_nat_target::detach): Pass inferior pointer to
2318         delete_inferior.
2319
2320 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
2321
2322         * regcache.c (readable_regcache::read_part): Fix asserts.
2323         (reg_buffer::raw_collect_part): New function.
2324         (regcache::write_part): Fix asserts.
2325         (reg_buffer::raw_supply_part): New function.
2326         (regcache::transfer_regset_register): New helper function.
2327         (regcache::transfer_regset): Call new functions.
2328         (regcache_supply_regset): Use gdb_byte*.
2329         (regcache::supply_regset): Likewise.
2330         (regcache_collect_regset): Likewise.
2331         (regcache::collect_regset): Likewise.
2332         * regcache.h (reg_buffer::raw_collect_part): New declaration.
2333         (reg_buffer::raw_supply_part): Likewise.
2334         (regcache::transfer_regset_register): Likewise.
2335         (regcache::transfer_regset): Use gdb_byte*.
2336
2337 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
2338
2339         * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
2340
2341 2018-06-21  Pedro Alves  <palves@redhat.com>
2342
2343         * ada-lang.h (ada_get_task_number): Take a thread_info pointer
2344         instead of a ptid_t.  All callers adjusted.
2345         * ada-tasks.c (ada_get_task_number): Likewise.  All callers
2346         adjusted.
2347         (print_ada_task_info, display_current_task_id, task_command_1):
2348         Adjust.
2349         * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
2350         inferior_thread.
2351         (breakpoint_kind): Adjust.
2352         (remove_breakpoints_pid): Rename to ...
2353         (remove_breakpoints_inf): ... this.  Adjust to take an inferior
2354         pointer.  All callers adjusted.
2355         (bpstat_clear_actions): Use inferior_thread.
2356         (get_bpstat_thread): New.
2357         (bpstat_do_actions): Use it.
2358         (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
2359         to take a thread_info pointer.  All callers adjusted.
2360         (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
2361         (breakpoint_re_set_thread): Use inferior_thread.
2362         * breakpoint.h (struct inferior): Forward declare.
2363         (bpstat_stop_status): Update.
2364         (remove_breakpoints_pid): Delete.
2365         (remove_breakpoints_inf): New.
2366         * bsd-uthread.c (bsd_uthread_target::wait)
2367         (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
2368         * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
2369         (maint_btrace_packet_history_cmd)
2370         (maint_btrace_clear_packet_history_cmd): Adjust.
2371         (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
2372         inferior_thread.
2373         * cli/cli-interp.c: Include "inferior.h".
2374         * common/refcounted-object.h (struct
2375         refcounted_object_ref_policy): New.
2376         * compile/compile-object-load.c: Include gdbthread.h.
2377         (store_regs): Use inferior_thread.
2378         * corelow.c (core_target::close): Use current_inferior.
2379         (core_target_open): Adjust to use first_thread_of_inferior and use
2380         the current inferior.
2381         * ctf.c (ctf_target::close): Adjust to use current_inferior.
2382         * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
2383         <thread>: ... this new field.  All references adjusted.
2384         (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
2385         Take a thread_info pointer instead of a ptid_t.
2386         * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
2387         (dummy_frame_discard, register_dummy_frame_dtor): Take a
2388         thread_info pointer instead of a ptid_t.
2389         * elfread.c: Include "inferior.h".
2390         (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
2391         Use inferior_thread.
2392         * eval.c (evaluate_subexp): Likewise.
2393         * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
2394         inferior_thread.
2395         * gdb_proc_service.h (struct thread_info): Forward declare.
2396         (struct ps_prochandle) <ptid>: Delete, replaced by ...
2397         <thread>: ... this new field.  All references adjusted.
2398         * gdbarch.h, gdbarch.c: Regenerate.
2399         * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
2400         'thread' parameter.  All implementations and callers adjusted.
2401         * gdbthread.h (thread_info) <set_running>: New method.
2402         (delete_thread, delete_thread_silent): Take a thread_info pointer
2403         instead of a ptid.
2404         (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
2405         (first_thread_of_process): Delete, replaced by ...
2406         (first_thread_of_inferior): ... this new function.  All callers
2407         adjusted.
2408         (any_live_thread_of_process): Delete, replaced by ...
2409         (any_live_thread_of_inferior): ... this new function.  All callers
2410         adjusted.
2411         (switch_to_thread, switch_to_no_thread): Declare.
2412         (is_executing): Delete.
2413         (enable_thread_stack_temporaries): Update comment.
2414         <enable_thread_stack_temporaries>: Take a thread_info pointer
2415         instead of a ptid_t.  Incref the thread.
2416         <~enable_thread_stack_temporaries>: Decref the thread.
2417         <m_ptid>: Delete
2418         <m_thr>: New.
2419         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2420         (get_last_thread_stack_temporary)
2421         (value_in_thread_stack_temporaries, can_access_registers_thread):
2422         Take a thread_info pointer instead of a ptid_t.  All callers
2423         adjusted.
2424         * infcall.c (get_call_return_value): Use inferior_thread.
2425         (run_inferior_call): Work with thread pointers instead of ptid_t.
2426         (call_function_by_hand_dummy): Work with thread pointers instead
2427         of ptid_t.  Use thread_info_ref.
2428         * infcmd.c (proceed_thread_callback): Access thread's state
2429         directly.
2430         (ensure_valid_thread, ensure_not_running): Use inferior_thread,
2431         access thread's state directly.
2432         (continue_command): Use inferior_thread.
2433         (info_program_command): Use find_thread_ptid and access thread
2434         state directly.
2435         (proceed_after_attach_callback): Use thread state directly.
2436         (notice_new_inferior): Take a thread_info pointer instead of a
2437         ptid_t.  All callers adjusted.
2438         (exit_inferior): Take an inferior pointer instead of a pid.  All
2439         callers adjusted.
2440         (exit_inferior_silent): New.
2441         (detach_inferior): Delete.
2442         (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
2443         (gdb_inferior_id_to_pid, in_inferior_list): Delete.
2444         (detach_inferior_command, kill_inferior_command): Use
2445         find_inferior_id instead of valid_gdb_inferior_id and
2446         gdb_inferior_id_to_pid.
2447         (inferior_command): Use inferior and thread pointers.
2448         * inferior.h (struct thread_info): Forward declare.
2449         (notice_new_inferior): Take a thread_info pointer instead of a
2450         ptid_t.  All callers adjusted.
2451         (detach_inferior): Delete declaration.
2452         (exit_inferior, exit_inferior_silent): Take an inferior pointer
2453         instead of a pid.  All callers adjusted.
2454         (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
2455         (valid_gdb_inferior_id): Delete.
2456         * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
2457         (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
2458         (struct displaced_step_inferior_state) <pid>: Delete, replaced by
2459         ...
2460         <inf>: ... this new field.
2461         <step_ptid>: Delete, replaced by ...
2462         <step_thread>: ... this new field.
2463         (get_displaced_stepping_state): Take an inferior pointer instead
2464         of a pid.  All callers adjusted.
2465         (displaced_step_in_progress_any_inferior): Adjust.
2466         (displaced_step_in_progress_thread): Take a thread pointer instead
2467         of a ptid_t.  All callers adjusted.
2468         (displaced_step_in_progress, add_displaced_stepping_state): Take
2469         an inferior pointer instead of a pid.  All callers adjusted.
2470         (get_displaced_step_closure_by_addr): Adjust.
2471         (remove_displaced_stepping_state): Take an inferior pointer
2472         instead of a pid.  All callers adjusted.
2473         (displaced_step_prepare_throw, displaced_step_prepare)
2474         (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
2475         All callers adjusted.
2476         (start_step_over): Adjust.
2477         (infrun_thread_ptid_changed): Remove bit updating ptids in the
2478         displaced step queue.
2479         (do_target_resume): Adjust.
2480         (fetch_inferior_event): Use inferior_thread.
2481         (context_switch, get_inferior_stop_soon): Take an
2482         execution_control_state pointer instead of a ptid_t.  All callers
2483         adjusted.
2484         (switch_to_thread_cleanup): Delete.
2485         (stop_all_threads): Use scoped_restore_current_thread.
2486         * inline-frame.c: Include "gdbthread.h".
2487         (inline_state) <inline_state>: Take a thread pointer instead of a
2488         ptid_t.  All callers adjusted.
2489         <ptid>: Delete, replaced by ...
2490         <thread>: ... this new field.
2491         (find_inline_frame_state): Take a thread pointer instead of a
2492         ptid_t.  All callers adjusted.
2493         (skip_inline_frames, step_into_inline_frame)
2494         (inline_skipped_frames, inline_skipped_symbol): Take a thread
2495         pointer instead of a ptid_t.  All callers adjusted.
2496         * inline-frame.h (skip_inline_frames, step_into_inline_frame)
2497         (inline_skipped_frames, inline_skipped_symbol): Likewise.
2498         * linux-fork.c (delete_checkpoint_command): Adjust to use thread
2499         pointers directly.
2500         * linux-nat.c (get_detach_signal): Likewise.
2501         * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
2502         (thread_db_notice_clone): Adjust.
2503         (thread_db_find_new_threads_silently)
2504         (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
2505         a thread pointer instead of a ptid_t.  All callers adjusted.
2506         * mi/mi-cmd-var.c: Include "inferior.h".
2507         (mi_cmd_var_update_iter): Update to use thread pointers.
2508         * mi/mi-interp.c (mi_new_thread): Update to use the thread's
2509         inferior directly.
2510         (mi_output_running_pid, mi_inferior_count): Delete, bits factored
2511         out to ...
2512         (mi_output_running): ... this new function.
2513         (mi_on_resume_1): Adjust to use it.
2514         (mi_user_selected_context_changed): Adjust to use inferior_thread.
2515         * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
2516         directly.
2517         (interrupt_thread_callback): : Adjust to use thread and inferior
2518         pointers.
2519         * proc-service.c: Include "gdbthread.h".
2520         (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
2521         * progspace-and-thread.c: Include "inferior.h".
2522         * progspace.c: Include "inferior.h".
2523         * python/py-exitedevent.c (create_exited_event_object): Adjust to
2524         hold a reference to an inferior_object.
2525         * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
2526         inferior_thread.
2527         * python/py-inferior.c (struct inferior_object): Give the type a
2528         tag name instead of a typedef.
2529         (python_on_normal_stop): No need to check if the current thread is
2530         listed.
2531         (inferior_to_inferior_object): Change return type to
2532         inferior_object.  All callers adjusted.
2533         (find_thread_object): Delete, bits factored out to ...
2534         (thread_to_thread_object): ... this new function.
2535         * python/py-infthread.c (create_thread_object): Use
2536         inferior_to_inferior_object.
2537         (thpy_is_stopped): Use thread pointer directly.
2538         (gdbpy_selected_thread): Use inferior_thread.
2539         * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
2540         field, replaced with ...
2541         <thread>: ... this new field.  All users adjusted.
2542         (btpy_insn_or_gap_new): Drop const.
2543         (btpy_list_new): Take a thread pointer instead of a ptid_t.  All
2544         callers adjusted.
2545         * python/py-record.c: Include "gdbthread.h".
2546         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
2547         a ptid_t.  All callers adjusted.
2548         (gdbpy_current_recording): Use inferior_thread.
2549         * python/py-record.h (recpy_record_object) <ptid>: Delete
2550         field, replaced with ...
2551         <thread>: ... this new field.  All users adjusted.
2552         (recpy_element_object) <ptid>: Delete
2553         field, replaced with ...
2554         <thread>: ... this new field.  All users adjusted.
2555         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
2556         a ptid_t.  All callers adjusted.
2557         * python/py-threadevent.c: Include "gdbthread.h".
2558         (get_event_thread): Use thread_to_thread_object.
2559         * python/python-internal.h (struct inferior_object): Forward
2560         declare.
2561         (find_thread_object, find_inferior_object): Delete declarations.
2562         (thread_to_thread_object, inferior_to_inferior_object): New
2563         declarations.
2564         * record-btrace.c: Include "inferior.h".
2565         (require_btrace_thread): Use inferior_thread.
2566         (record_btrace_frame_sniffer)
2567         (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
2568         (get_thread_current_frame): Use scoped_restore_current_thread and
2569         switch_to_thread.
2570         (get_thread_current_frame): Use thread pointer directly.
2571         (record_btrace_replay_at_breakpoint): Use thread's inferior
2572         pointer directly.
2573         * record-full.c: Include "inferior.h".
2574         * regcache.c: Include "gdbthread.h".
2575         (get_thread_arch_regcache): Use the inferior's address space
2576         directly.
2577         (get_thread_regcache, registers_changed_thread): New.
2578         * regcache.h (get_thread_regcache(thread_info *thread)): New
2579         overload.
2580         (registers_changed_thread): New.
2581         (remote_target) <remote_detach_1>: Swap order of parameters.
2582         (remote_add_thread): <remote_add_thread>: Return the new thread.
2583         (get_remote_thread_info(ptid_t)): New overload.
2584         (remote_target::remote_notice_new_inferior): Use thread pointers
2585         directly.
2586         (remote_target::process_initial_stop_replies): Use
2587         thread_info::set_running.
2588         (remote_target::remote_detach_1, remote_target::detach)
2589         (extended_remote_target::detach): Adjust.
2590         * stack.c (frame_show_address): Use inferior_thread.
2591         * target-debug.h (target_debug_print_thread_info_pp): New.
2592         * target-delegates.c: Regenerate.
2593         * target.c (default_thread_address_space): Delete.
2594         (memory_xfer_partial_1): Use current_inferior.
2595         (target_detach): Use current_inferior.
2596         (target_thread_address_space): Delete.
2597         (generic_mourn_inferior): Use current_inferior.
2598         * target.h (struct target_ops) <thread_address_space>: Delete.
2599         (target_thread_address_space): Delete.
2600         * thread.c (init_thread_list): Use ALL_THREADS_SAFE.  Use thread
2601         pointers directly.
2602         (delete_thread_1, delete_thread, delete_thread_silent): Take a
2603         thread pointer instead of a ptid_t.  Adjust all callers.
2604         (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
2605         (first_thread_of_process): Delete, replaced by ...
2606         (first_thread_of_inferior): ... this new function.  All callers
2607         adjusted.
2608         (any_thread_of_process): Rename to ...
2609         (any_thread_of_inferior): ... this, and take an inferior pointer.
2610         (any_live_thread_of_process): Rename to ...
2611         (any_live_thread_of_inferior): ... this, and take an inferior
2612         pointer.
2613         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2614         (value_in_thread_stack_temporaries)
2615         (get_last_thread_stack_temporary): Take a thread pointer instead
2616         of a ptid_t.  Adjust all callers.
2617         (thread_info::set_running): New.
2618         (validate_registers_access): Use inferior_thread.
2619         (can_access_registers_ptid): Rename to ...
2620         (can_access_registers_thread): ... this, and take a thread
2621         pointer.
2622         (print_thread_info_1): Adjust to compare thread pointers instead
2623         of ptids.
2624         (switch_to_no_thread, switch_to_thread): Make extern.
2625         (scoped_restore_current_thread::~scoped_restore_current_thread):
2626         Use m_thread pointer directly.
2627         (scoped_restore_current_thread::scoped_restore_current_thread):
2628         Use inferior_thread.
2629         (thread_command): Use thread pointer directly.
2630         (thread_num_make_value_helper): Use inferior_thread.
2631         * top.c (execute_command): Use inferior_thread.
2632         * tui/tui-interp.c: Include "inferior.h".
2633         * varobj.c (varobj_create): Use inferior_thread.
2634         (value_of_root_1): Use find_thread_global_id instead of
2635         global_thread_id_to_ptid.
2636
2637 2018-06-21  Alan Hayward  <alan.hayward@arm.com>
2638
2639         * regcache.c (readable_regcache::read_part): Avoid memcpy when
2640         possible.
2641         (regcache::write_part): Likewise.
2642         (readable_regcache::cooked_read_part): Update comment.
2643         (readable_regcache::cooked_write_part): Likewise.
2644         * regcache.h: (readable_regcache::read_part): Likewise.
2645         (regcache::write_part): Likewise.
2646
2647 2018-06-21  Richard Bunt  <richard.bunt@arm.com>
2648             Dirk Schubert  <dirk.schubert@arm.com>
2649
2650         * aarch64-linux-nat.c (post_attach): New.
2651         (aarch64_linux_nat_target::post_attach): Override post_attach to
2652         record the number of hardware debug registers.
2653
2654 2018-06-20  Tom Tromey  <tom@tromey.com>
2655
2656         * python/py-param.c (add_setshow_generic): Make parameters const.
2657         (parmpy_init): Update.
2658
2659 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
2660
2661         * regcache.h (regcache_cooked_read_ftype): Rename to...
2662         (register_read_ftype): ...this, change type to function_view.
2663         (class reg_buffer) <save>: Remove src parameter.
2664         (readonly_detached_regcache) <readonly_detached_regcache>: Make
2665         parameter non-const in first overload.  Remove src parameter in
2666         second overload.
2667         * regcache.c (do_cooked_read): Remove.
2668         (readonly_detached_regcache::readonly_detached_regcache): Make
2669         parameter non-const, adjust call to other constructor.
2670         (reg_buffer::save): Remove src parameter.
2671         * frame.c (do_frame_register_read): Remove.
2672         (frame_save_as_regcache): Use lambda function.
2673         * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
2674         parameter to ppu2spu_data *.
2675         (ppu2spu_sniffer): Use lambda function.
2676
2677 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
2678
2679         * record-full.c (record_full_target::insert_breakpoint): Remove
2680         "struct" keyword, add const.
2681
2682 2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>
2683
2684         * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
2685         PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
2686         * configure.ac: Remove AC_PREREQ, add missing quoting.
2687         * gnulib/configure.ac: Modernize usage of
2688         AC_INIT/AM_INIT_AUTOMAKE.  Remove AC_PREREQ.
2689         * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
2690         (AUTOMAKE_VERSION): Bump to 1.15.1.
2691         * configure: Re-generate.
2692         * config.in: Re-generate.
2693         * aclocal.m4: Re-generate.
2694         * gnulib/aclocal.m4: Re-generate.
2695         * gnulib/config.in: Re-generate.
2696         * gnulib/configure: Re-generate.
2697         * gnulib/import/Makefile.in: Re-generate.
2698
2699 2018-06-19  Pedro Alves  <palves@redhat.com>
2700
2701         * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
2702         (lookup_minimal_symbol_by_pc_section): ... here with
2703         gdb_assert_not_reached added.
2704
2705 2018-06-19  Pedro Alves  <palves@redhat.com>
2706
2707         * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
2708         parameter with a block parameter.  Compare location's block symbol
2709         with the frame's block instead of addresses.
2710         (skip_inline_frames): Pass the current block instead of the
2711         frame's address.  Break out as soon as we determine the frame
2712         should not be skipped.
2713
2714 2018-06-18  Tom Tromey  <tom@tromey.com>
2715
2716         * solib-aix.c (solib_aix_get_section_offsets): Return
2717         unique_xmalloc_ptr.
2718         (solib_aix_solib_create_inferior_hook): Update.
2719
2720 2018-06-18  Tom Tromey  <tom@tromey.com>
2721
2722         * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
2723
2724 2018-06-18  Tom Tromey  <tom@tromey.com>
2725
2726         * solib-frv.c (frv_relocate_main_executable): Use
2727         unique_xmalloc_ptr.
2728         * solib-dsbt.c (dsbt_relocate_main_executable): Use
2729         unique_xmalloc_ptr.
2730
2731 2018-06-18  Tom Tromey  <tom@tromey.com>
2732
2733         * objfiles.h (inhibit_section_map_updates): Update.
2734         (resume_section_map_updates, resume_section_map_updates_cleanup):
2735         Remove.
2736         * solib-svr4.c (svr4_handle_solib_event): Update.
2737         * objfiles.c (inhibit_section_map_updates): Return
2738         scoped_restore_tmpl<int>.
2739         (resume_section_map_updates, resume_section_map_updates_cleanup):
2740         Remove.
2741
2742 2018-06-18  Tom Tromey  <tom@tromey.com>
2743
2744         * valprint.h (read_string): Update.
2745         * valprint.c (read_string): Change type of "buffer".
2746         (val_print_string): Update.
2747         * python/py-value.c (valpy_string): Update.
2748         * language.h (struct language_defn) <la_get_string>: Change
2749         type of "buffer".
2750         (default_get_string, c_get_string): Update.
2751         * language.c (default_get_string): Change type of "buffer".
2752         * guile/scm-value.c (gdbscm_value_to_string): Update.
2753         * c-lang.c (c_get_string): Change type of "buffer".
2754
2755 2018-06-18  Tom Tromey  <tom@tromey.com>
2756
2757         * ser-mingw.c (struct pipe_state_destroyer): New.
2758         (pipe_state_up): New typedef.
2759         (cleanup_pipe_state): Remove.
2760         (pipe_windows_open): Use pipe_state_up.  Don't release argv.
2761
2762 2018-06-18  Tom Tromey  <tom@tromey.com>
2763
2764         * rust-lang.h (rust_yyerror): Don't declare.
2765         * rust-lang.c (rust_language_defn): Update.
2766         * rust-exp.y (yyerror): Now static.
2767         * parse.c (parse_exp_in_context_1): Update.
2768         * p-lang.h (p_yyerror): Don't declare.
2769         * p-lang.c (p_language_defn): Update.
2770         * p-exp.y (yyerror): Now static.
2771         * opencl-lang.c (opencl_language_defn): Update.
2772         * objc-lang.c (objc_language_defn): Update.
2773         * m2-lang.h (m2_yyerror): Don't declare.
2774         * m2-lang.c (m2_language_defn): Update.
2775         * m2-exp.y (yyerror): Now static.
2776         * language.h (struct language_defn) <la_error>: Remove.
2777         * language.c (unk_lang_error): Remove.
2778         (unknown_language_defn, auto_language_defn): Remove.
2779         * go-lang.h (go_yyerror): Don't declare.
2780         * go-lang.c (go_language_defn): Update.
2781         * go-exp.y (yyerror): Now static.
2782         * f-lang.h (f_yyerror): Don't declare.
2783         * f-lang.c (f_language_defn): Update.
2784         * f-exp.y (yyerror): Now static.
2785         * d-lang.h (d_yyerror): Don't declare.
2786         * d-lang.c (d_language_defn): Update.
2787         * d-exp.y (yyerror): Now static.
2788         * c-lang.h (c_yyerror): Don't declare.
2789         * c-lang.c (c_language_defn, cplus_language_defn)
2790         (asm_language_defn, minimal_language_defn): Update.
2791         * c-exp.y (yyerror): Now static.
2792         * ada-lang.h (ada_yyerror): Don't declare.
2793         * ada-lang.c (ada_language_defn): Update.
2794         * ada-exp.y (yyerror): Now static.
2795
2796 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
2797
2798         * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
2799         (store_sveregs_to_thread): Likewise.
2800         (aarch64_linux_fetch_inferior_registers): Check for SVE.
2801         (aarch64_linux_store_inferior_registers): Likewise.
2802         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
2803         function.
2804         (aarch64_sve_regs_copy_to_regcache): Likewise.
2805         (aarch64_sve_regs_copy_from_regcache): Likewise.
2806         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
2807         declaration.
2808         (aarch64_sve_regs_copy_to_regcache): Likewise.
2809         (aarch64_sve_regs_copy_from_regcache): Likewise.
2810         (sve_context): Structure from Linux headers.
2811         (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
2812         (SVE_SIG_ZREG_SIZE): Likewise.
2813         (SVE_SIG_PREG_SIZE): Likewise.
2814         (SVE_SIG_FFR_SIZE): Likewise.
2815         (SVE_SIG_REGS_OFFSET): Likewise.
2816         (SVE_SIG_ZREGS_OFFSET): Likewise.
2817         (SVE_SIG_ZREG_OFFSET): Likewise.
2818         (SVE_SIG_ZREGS_SIZE): Likewise.
2819         (SVE_SIG_PREGS_OFFSET): Likewise.
2820         (SVE_SIG_PREG_OFFSET): Likewise.
2821         (SVE_SIG_PREGS_SIZE): Likewise.
2822         (SVE_SIG_FFR_OFFSET): Likewise.
2823         (SVE_SIG_REGS_SIZE): Likewise.
2824         (SVE_SIG_CONTEXT_SIZE): Likewise.
2825         (SVE_PT_REGS_MASK): Likewise.
2826         (SVE_PT_REGS_FPSIMD): Likewise.
2827         (SVE_PT_REGS_SVE): Likewise.
2828         (SVE_PT_VL_INHERIT): Likewise.
2829         (SVE_PT_VL_ONEXEC): Likewise.
2830         (SVE_PT_REGS_OFFSET): Likewise.
2831         (SVE_PT_FPSIMD_OFFSET): Likewise.
2832         (SVE_PT_FPSIMD_SIZE): Likewise.
2833         (SVE_PT_SVE_ZREG_SIZE): Likewise.
2834         (SVE_PT_SVE_PREG_SIZE): Likewise.
2835         (SVE_PT_SVE_FFR_SIZE): Likewise.
2836         (SVE_PT_SVE_FPSR_SIZE): Likewise.
2837         (SVE_PT_SVE_FPCR_SIZE): Likewise.
2838         (__SVE_SIG_TO_PT): Likewise.
2839         (SVE_PT_SVE_OFFSET): Likewise.
2840         (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
2841         (SVE_PT_SVE_ZREG_OFFSET): Likewise.
2842         (SVE_PT_SVE_ZREGS_SIZE): Likewise.
2843         (SVE_PT_SVE_PREGS_OFFSET): Likewise.
2844         (SVE_PT_SVE_PREG_OFFSET): Likewise.
2845         (SVE_PT_SVE_PREGS_SIZE): Likewise.
2846         (SVE_PT_SVE_FFR_OFFSET): Likewise.
2847         (SVE_PT_SVE_FPSR_OFFSET): Likewise.
2848         (SVE_PT_SVE_FPCR_OFFSET): Likewise.
2849         (SVE_PT_SVE_SIZE): Likewise.
2850         (SVE_PT_SIZE): Likewise.
2851         (HAS_SVE_STATE): New define.
2852
2853 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
2854
2855         * nat/aarch64-sve-linux-sigcontext.h: New file.
2856         * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
2857         new files.
2858         (SVE_VQ_MIN): Likewise.
2859         (SVE_VQ_MAX): Likewise.
2860         (SVE_VL_MIN): Likewise.
2861         (SVE_VL_MAX): Likewise.
2862         (SVE_NUM_ZREGS): Likewise.
2863         (SVE_NUM_PREGS): Likewise.
2864         (sve_vl_valid): Likewise.
2865         (struct user_sve_header): Likewise.
2866
2867 2018-06-16  Andrew Burgess  <andrew.burgess@embecosm.com>
2868             Richard Bunt <Richard.Bunt@arm.com>
2869
2870         * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
2871         was requested by GDB.
2872
2873 2018-06-15  Tom de Vries  <tdevries@suse.de>
2874
2875         * MAINTAINERS (Write After Approval): Add Tom de Vries.
2876
2877 2018-06-14  Simon Marchi  <simon.marchi@polymtl.ca>
2878
2879         * gnulib/update-gnulib.sh: Print expected versions of
2880         autoconf/aclocal.
2881
2882 2018-06-14  Simon Marchi  <simon.marchi@ericsson.com>
2883
2884         * arch-utils.c (default_type_align): Use type_length_units.
2885         * gdbtypes.c (type_align): Use type_length_units.
2886
2887 2018-06-14  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2888
2889         * cli/cli-script.c (_initialize_cli_script): Fix online documentation
2890         of 'define' command.
2891
2892 2018-06-14  Tom de Vries  <tdevries@suse.de>
2893
2894         PR cli/22573
2895         * infcmd.c (print_return_value_1): Use get_user_print_options instead of
2896         get_no_prettyformat_print_options.
2897
2898 2018-06-13  Simon Marchi  <simon.marchi@ericsson.com>
2899
2900         * sparc-nat.h: Include target.h.
2901         * sparc64-linux-nat.c (class sparc64_linux_nat_target)
2902         <fetch_registers>: Remove this argument in function call.
2903         <store_registers>: Remove this argument in function call, remove
2904         extra semicolon.
2905         <low_forget_process>: Call sparc64_forget_process instead of
2906         sparc_forget_process.
2907
2908 2018-06-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2909
2910         * procfs.c (_initialize_procfs): Use add_inf_child_target.
2911         (procfs_target::make_corefile_notes): Adjust to new
2912         target_read_alloc return type.
2913
2914 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
2915             Stephen Roberts  <stephen.roberts@arm.com>
2916
2917         PR gdb/22882
2918         * infrun.c (fetch_inferior_event): If GDB is not proceeding then
2919         run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
2920         Move should_notify_stop local into more inner scope.
2921
2922 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
2923             Stephen Roberts  <stephen.roberts@arm.com>
2924
2925         PR gdb/22882
2926         * infrun.c (resume_1): Add call to mark_async_event_handler.
2927
2928 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
2929
2930         * infrun.c (do_target_wait): Change old version of $pc printed.
2931
2932 2018-06-11  Simon Marchi  <simon.marchi@ericsson.com>
2933
2934         * dwarf2read.c (read_index_from_section): Rename to...
2935         (read_gdb_index_from_section): ... this, update all callers.
2936         (dwarf2_read_index): Rename to...
2937         (dwarf2_read_gdb_index): ... this, update all callers.
2938
2939 2018-06-11  John David Anglin  <danglin@gcc.gnu.org>
2940
2941         * gdb/hppa-linux-nat.c
2942         (hppa_linux_nat_target::fetch_inferior_registers): Rename to
2943         hppa_linux_nat_target::fetch_registers.
2944
2945 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
2946
2947         * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
2948         * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
2949         (AARCH64_DWARF_SVE_FFR): Likewise.
2950         (AARCH64_DWARF_SVE_P0): Likewise.
2951         (AARCH64_DWARF_SVE_Z0): Likewise.
2952
2953 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
2954
2955         * common/common-regcache.h (raw_compare): New function.
2956         * regcache.c (regcache::raw_compare): Likewise.
2957         * regcache.h (regcache::raw_compare): New declaration.
2958
2959 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
2960
2961         * common/common-regcache.h (reg_buffer_common): New structure.
2962         * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
2963         (reg_buffer::raw_supply): Likewise.
2964         (reg_buffer::raw_supply_integer): Likewise.
2965         (reg_buffer::raw_supply_zeroed): Likewise.
2966         (reg_buffer::raw_collect): Likewise.
2967         (reg_buffer::raw_collect_integer): Likewise.
2968         * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
2969         (reg_buffer::raw_supply): Likewise.
2970         (reg_buffer::raw_supply_integer): Likewise.
2971         (reg_buffer::raw_supply_zeroed): Likewise.
2972         (reg_buffer::raw_collect): Likewise.
2973         (reg_buffer::raw_collect_integer): Likewise.
2974
2975 2018-06-10  Tom Tromey  <tom@tromey.com>
2976
2977         * remote.c (stop_reply_p): Remove typedef.  Don't declare queue.
2978         (class remote_state) <stop_reply_queue>: Now std::vector.
2979         (remote_state::~remote_state)
2980         (remote_target::stop_reply_queue_length): Update.
2981         (struct queue_iter_param, remove_child_of_pending_fork)
2982         (struct check_pending_event_prevents_wildcard_vcont_callback_data)
2983         (check_pending_event_prevents_wildcard_vcont_callback)
2984         (remove_stop_reply_for_inferior)
2985         (remove_stop_reply_of_remote_state)
2986         (remote_notif_remove_once_on_match)
2987         (stop_reply_match_ptid_and_ws)
2988         (remote_kill_child_of_pending_fork): Remove.
2989         (remote_target::remove_new_fork_children)
2990         (remote_target::check_pending_events_prevent_wildcard_vcont)
2991         (remote_target::discard_pending_stop_replies)
2992         (remote_target::discard_pending_stop_replies_in_queue)
2993         (remote_target::remote_notif_remove_queued_reply)
2994         (remote_target::queued_stop_reply)
2995         (remote_target::push_stop_reply, remote_target::peek_stop_reply)
2996         (remote_target::wait, remote_target::kill_new_fork_children)
2997         (remote_target::async): Update.
2998
2999 2018-06-10  Tom Tromey  <tom@tromey.com>
3000
3001         * record-full.c (record_full_arch_list_cleanups): Remove.
3002         (record_full_message): Use try/catch.
3003         (record_full_wait_cleanups): Remove.
3004         (record_full_wait_1): Use try/catch.
3005         (record_full_restore): Likewise.
3006
3007 2018-06-10  Tom Tromey  <tom@tromey.com>
3008
3009         * record-full.c (record_full_breakpoint_p): Remove typedef.  Don't
3010         declare VEC.  Add constructor.
3011         <in_target_beneath>: Now bool.
3012         (record_full_breakpoints): Now a std::vector, static.
3013         (record_full_sync_record_breakpoints)
3014         (record_full_init_record_breakpoints)
3015         (record_full_target::insert_breakpoint)
3016         (record_full_target::remove_breakpoint): Update.  Don't use XNEW.
3017
3018 2018-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
3019
3020         * dwarf2read.c (process_cu_includes): Remove struct keyword.
3021         * serial.c (serial_interface_lookup): Remove struct keyword.
3022
3023 2018-06-10  Tom Tromey  <tom@tromey.com>
3024
3025         * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
3026         method.
3027         * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
3028         a method.
3029         * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
3030         method.
3031         * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
3032         "beneath" as a method.
3033         * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
3034         Use "beneath" as a method.
3035
3036 2018-06-10  Tom Tromey  <tom@tromey.com>
3037
3038         * tracefile.c (struct trace_file_writer_deleter): New.
3039         <operator()>: Rename from trace_file_writer_xfree.
3040         (trace_file_writer_up): New typedef.
3041         (tsave_command, trace_save_tfile, trace_save_ctf): Update.
3042
3043 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
3044
3045         * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
3046         <m_registers, m_register_status>: Change type to
3047         std::unique_ptr.
3048         * regcache.c (reg_buffer::reg_buffer): Use new instead of
3049         XCNEWVEC.
3050
3051 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
3052
3053         * common/common-regcache.h (enum register_status): Add
3054         underlying type "signed char".
3055         * regcache.h (reg_buffer) <m_register_status>: Change type to
3056         register_status *.
3057         * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
3058         register_status instead of signed char.
3059         (reg_buffer::save): Use REG_UNKNOWN instead of 0.
3060         (reg_buffer::get_register_status): Remove cast.
3061         (readable_regcache::raw_read): Remove cast.
3062         (readable_regcache::cooked_read): Remove cast.
3063
3064 2018-06-09  Tom Tromey  <tom@tromey.com>
3065
3066         * source.c (reverse_search_command, forward_search_command): Use
3067         scoped_fd.
3068
3069 2018-06-09  Tom Tromey  <tom@tromey.com>
3070
3071         * serial.c (serial_ops_p): Remove typedef.  Don't declare VEC.
3072         (serial_ops_list): Now static, std::vector.
3073         (serial_interface_lookup, serial_add_interface): Update.
3074
3075 2018-06-09  Tom Tromey  <tom@tromey.com>
3076
3077         * dwarf2read.c (process_cu_includes): Update.
3078         (process_full_comp_unit): Update.
3079         * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
3080         std::vector.
3081
3082 2018-06-08  Paul Koning  <paul_koning@dell.com>
3083
3084         PR gdb/23252
3085
3086         * python/python.c (do_start_initialization):
3087         Avoid call to internal Python API.
3088         (init__gdb_module): New function.
3089
3090 2018-06-08  Gary Benson <gbenson@redhat.com>
3091
3092         * linux-thread-db.c (valprint.h): New include.
3093         (struct check_thread_db_info): New structure.
3094         (check_thread_db_on_load, tdb_testinfo): New static globals.
3095         (check_thread_db, check_thread_db_callback): New functions.
3096         (try_thread_db_load_1): Run integrity checks if requested.
3097         (maintenance_check_libthread_db): New function.
3098         (_initialize_thread_db): Register "maint check libthread-db"
3099         and "maint set/show check-libthread-db".
3100         * NEWS: Mention the above new commands.
3101
3102 2018-06-08  Tom Tromey  <tom@tromey.com>
3103
3104         * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
3105         now a method.
3106
3107 2018-06-08  Tom Tromey  <tom@tromey.com>
3108
3109         * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
3110
3111 2018-06-08  Tom Tromey  <tom@tromey.com>
3112
3113         * common/btrace-common.h (struct btrace_data): Add constructor,
3114         destructor, move assignment operator.
3115         <empty, clear, fini>: New methods.
3116         <format>: Initialize.
3117         (btrace_data_init, btrace_data_fini, btrace_data_clear)
3118         (btrace_data_empty): Don't declare.
3119         * common/btrace-common.c (btrace_data_init): Remove.
3120         (btrace_data::fini): Rename from btrace_data_fini.
3121         (btrace_data::empty): Rename from btrace_data_empty.
3122         (btrace_data::clear): Rename from btrace_data_clear.  Return
3123         bool.
3124         * btrace.h (make_cleanup_btrace_data): Don't declare.
3125         * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
3126         (parse_xml_btrace): Update.
3127         (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
3128         (maint_btrace_clear_packet_history_cmd): Update.
3129
3130 2018-06-07  Pedro Alves  <palves@redhat.com>
3131
3132         * target.h (target_ops) <beneath>: Now a method.  All references
3133         updated.
3134         (class target_stack): New.
3135         * target.c (g_target_stack): New.
3136         (g_current_top_target): Delete.
3137         (current_top_target): Get the top target out of g_target_stack.
3138         (target_stack::push, target_stack::unpush): New.
3139         (push_target, unpush_target): Reimplement.
3140         (target_is_pushed): Reimplement in terms of g_target_stack.
3141         (target_ops::beneath, target_stack::find_beneath): New.
3142
3143 2018-06-07  Pedro Alves  <palves@redhat.com>
3144
3145         * target.h (find_target_beneath): Delete declaration.
3146         * target.c (find_target_beneath): Delete definition.
3147         * aix-thread.c: All callers of find_target_beneath adjusted to
3148         call target_ops::beneath instead.
3149         * bsd-uthread.c: Likewise.
3150         * linux-thread-db.c: Likewise.
3151         * ravenscar-thread.c: Likewise.
3152         * sol-thread.c: Likewise.
3153         * spu-multiarch.c: Likewise.
3154
3155 2018-06-07  Pedro Alves  <palves@redhat.com>
3156
3157         * target.h (target_ops) <beneath>: Now a method.  All references
3158         updated.
3159         (target_ops) <m_beneath>: New.
3160         * target.c (target_ops::beneath): New.
3161         * corelow.c: Adjust all references to target_ops::beneath.
3162         * linux-thread-db.c: Likewise.
3163         * make-target-delegates: Likewise.
3164         * record-btrace.c: Likewise.
3165         * record-full.c: Likewise.
3166         * remote.c: Likewise.
3167         * target.c: Likewise.
3168         * target-delegates.c: Regenerate.
3169
3170 2018-06-07  Pedro Alves  <palves@redhat.com>
3171
3172         * target.h (target_stack): Delete.
3173         (current_top_target): Declare function.
3174         * target.c (target_stack): Delete.
3175         (g_current_top_target): New.
3176         (current_top_target): New function.
3177         * auxv.c: Use current_top_target instead of target_stack
3178         throughout.
3179         * avr-tdep.c: Likewise.
3180         * breakpoint.c: Likewise.
3181         * corefile.c: Likewise.
3182         * elfread.c: Likewise.
3183         * eval.c: Likewise.
3184         * exceptions.c: Likewise.
3185         * frame.c: Likewise.
3186         * gdbarch-selftests.c: Likewise.
3187         * gnu-v3-abi.c: Likewise.
3188         * ia64-tdep.c: Likewise.
3189         * ia64-vms-tdep.c: Likewise.
3190         * infcall.c: Likewise.
3191         * infcmd.c: Likewise.
3192         * infrun.c: Likewise.
3193         * linespec.c: Likewise.
3194         * linux-tdep.c: Likewise.
3195         * minsyms.c: Likewise.
3196         * ppc-linux-nat.c: Likewise.
3197         * ppc-linux-tdep.c: Likewise.
3198         * procfs.c: Likewise.
3199         * regcache.c: Likewise.
3200         * remote.c: Likewise.
3201         * rs6000-tdep.c: Likewise.
3202         * s390-linux-nat.c: Likewise.
3203         * s390-tdep.c: Likewise.
3204         * solib-aix.c: Likewise.
3205         * solib-darwin.c: Likewise.
3206         * solib-dsbt.c: Likewise.
3207         * solib-spu.c: Likewise.
3208         * solib-svr4.c: Likewise.
3209         * solib-target.c: Likewise.
3210         * sparc-tdep.c: Likewise.
3211         * sparc64-tdep.c: Likewise.
3212         * spu-tdep.c: Likewise.
3213         * symfile.c: Likewise.
3214         * symtab.c: Likewise.
3215         * target-descriptions.c: Likewise.
3216         * target-memory.c: Likewise.
3217         * target.c: Likewise.
3218         * target.h: Likewise.
3219         * tracefile-tfile.c: Likewise.
3220         * tracepoint.c: Likewise.
3221         * valops.c: Likewise.
3222         * valprint.c: Likewise.
3223         * value.c: Likewise.
3224         * windows-tdep.c: Likewise.
3225         * mi/mi-main.c: Likewise.
3226
3227 2018-06-07  Tom Tromey  <tom@tromey.com>
3228
3229         * valprint.h (build_address_symbolic): Declare.
3230         * printcmd.c (print_address_symbolic): Update.
3231         (build_address_symbolic): Change "name" and "filename" to
3232         std::string.
3233         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
3234         Update.
3235         * defs.h (build_address_symbolic): Remove declaration.
3236
3237 2018-06-07  Alan Hayward  <alan.hayward@arm.com>
3238
3239         * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
3240         (aarch64_vnv_type): Add function.
3241         (aarch64_pseudo_register_name): Add V regs for SVE.
3242         (aarch64_pseudo_register_type): Likewise.
3243         (aarch64_pseudo_register_reggroup_p): Likewise.
3244         (aarch64_pseudo_read_value_2): Use V0 offset for SVE
3245         (aarch64_pseudo_read_value): Add V regs for SVE.
3246         (aarch64_pseudo_write_2): Use V0 offset for SVE
3247         (aarch64_pseudo_write): Add V regs for SVE.
3248         * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
3249
3250 2018-06-06  Sergio Durigan Junior  <sergiodj@redhat.com>
3251
3252         * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
3253         (sve_vl_from_vq): Likewise.
3254
3255 2018-06-05  Tom Tromey  <tom@tromey.com>
3256
3257         * cli/cli-cmds.c (show_version): Update.
3258         * top.c (print_gdb_version): Add "interactive" parameter.
3259         Update.
3260         * main.c (captured_main_1): Update.
3261         * top.h (print_gdb_version): Add "interactive" parameter and a
3262         comment.
3263
3264 2018-06-05  David Malcolm  <dmalcolm@redhat.com>
3265
3266         * common/enum-flags.h: Add trailing semicolon to example in
3267         comment.
3268
3269 2018-06-05  Tom Tromey  <tom@tromey.com>
3270
3271         PR cli/12326:
3272         * NEWS: Add entry about pager.
3273         * utils.c (pagination_disabled_for_command): New global.
3274         (prompt_for_continue): Allow "c" response to prompt.
3275         (reinitialize_more_filter): Clear
3276         pagination_disabled_for_command.
3277         (fputs_maybe_filtered): Check pagination_disabled_for_command.
3278
3279 2018-06-04  Tom Tromey  <tom@tromey.com>
3280
3281         * ada-lang.h (ada_lookup_symbol_list): Update.
3282         * ada-lang.c (resolve_subexp): Update.
3283         (symbols_are_identical_enums): Change type of syms.  Remove nsyms
3284         parameter.
3285         (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
3286         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
3287         results parameter to std::vector.
3288         (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
3289         Update.
3290         * ada-exp.y (block_lookup): Update.
3291         (select_possible_type_sym): Change type of syms.  Remove nsyms
3292         parameter.
3293         (write_var_or_type, write_name_assoc): Update.
3294
3295 2018-06-04  Joel Brobecker  <brobecker@adacore.com>
3296
3297         * windows-nat.c (windows_nat_target::xfer_partial): Return
3298         TARGET_XFER_E_IO if we need to delegate to the target beneath
3299         but BENEATH is NULL.
3300
3301 2018-06-04  Simon Marchi  <simon.marchi@ericsson.com>
3302
3303         * Makefile.in (config.status): Add configure.nat as a
3304         dependency.
3305
3306 2018-06-04  Tom Tromey  <tom@tromey.com>
3307
3308         * cp-name-parser.y (cpname_state): Add method declarations.
3309         (HANDLE_QUAL): Update.
3310         (cpname_state::d_grab, cpname_state::fill_comp)
3311         (cpname_state::make_operator, cpname_state::make_dtor)
3312         (cpname_state::make_builtin_type, cpname_state::make_name)
3313         (cpname_state::d_qualify, cpname_state::d_int_type)
3314         (cpname_state::d_unary, cpname_state::d_binary): Now methods.
3315         (%union): Move earlier.
3316
3317 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
3318
3319         * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
3320
3321 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
3322
3323         * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
3324         (aarch64_pseudo_write_1): Likewise.
3325         (aarch64_pseudo_read_value): Use helper.
3326         (aarch64_pseudo_write): Likewise.
3327
3328 2018-06-04  Pedro Alves  <palves@redhat.com>
3329
3330         * darwin-nat.c (darwin_ops): Delete.
3331         (darwin_attach_pid): Use get_native_target.
3332
3333 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
3334
3335         * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
3336         * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
3337
3338 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
3339
3340         * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
3341         * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
3342         (aarch64_gdbarch_init): Check for SVE.
3343         * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
3344
3345 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
3346
3347         * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
3348         * aarch64-tdep.h (aarch64_read_description): Likewise.
3349         * arch/aarch64.c (aarch64_create_target_description): Likewise.
3350         * arch/aarch64.h (aarch64_create_target_description): Likewise.
3351         * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
3352         * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
3353         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
3354
3355 2018-06-02  Simon Marchi  <simon.marchi@ericsson.com>
3356
3357         * value.c (value_fetch_lazy_bitfield): New.
3358         (value_fetch_lazy_memory): New.
3359         (value_fetch_lazy_register): New.
3360         (value_fetch_lazy): Factor out to smaller functions.
3361
3362 2018-06-01  Tom Tromey  <tom@tromey.com>
3363
3364         * cp-name-parser.y (backslashable, represented): Now const.
3365
3366 2018-06-01  Tom Tromey  <tom@tromey.com>
3367
3368         * cp-name-parser.y: Include parser-defs.h.
3369         (parser_fprintf): Remove declaration.
3370
3371 2018-06-01  Tom Tromey  <tom@tromey.com>
3372
3373         * cp-name-parser.y: Use %pure-parser, %lex-param, and
3374         %parse-param.
3375         (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
3376         (global_result): Remove globals.
3377         (struct cpname_state): New.
3378         (yyparse): Don't declare.
3379         (yylex, yyerror): Move declarations after %union.
3380         (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
3381         (make_name): Add state parameter.
3382         Update all callers.
3383         (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
3384         parameter.
3385         (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
3386         Update.
3387         (yylex): Add lvalp, state parameters.
3388         (yyerror): Add state parameter.
3389         (cp_demangled_name_to_comp): Update.
3390
3391 2018-06-01  Tom Tromey  <tom@tromey.com>
3392
3393         * cp-name-parser.y (parser_fprintf): Declare.
3394         (GDB_YY_REMAP_PREFIX): Define.
3395         Include yy-remap.h.  Don't redefine yy* identifiers.
3396
3397 2018-06-01  Tom Tromey  <tom@tromey.com>
3398
3399         * python/py-type.c (typy_legacy_template_argument): Update.
3400         * cp-support.h (cp_demangled_name_to_comp): Update.
3401         * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
3402         parameter to be a "std::string *".
3403         (main): Update.
3404
3405 2018-06-01  H.J. Lu  <hongjiu.lu@intel.com>
3406
3407         * ada-lex.l: Include "diagnostics.h" instead of
3408         "common/diagnostics.h".
3409         * unittests/environ-selftests.c: Likewise.
3410         * common/diagnostics.h: Moved to ../include.
3411
3412 2018-06-01  Joel Brobecker  <brobecker@adacore.com>
3413
3414         * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
3415         to language_mode_manual while calling breakpoint_re_set_one.
3416
3417 2018-06-01  Tom Tromey  <tom@tromey.com>
3418
3419         * valops.c (value_cast_structs, destructor_name_p): Update.
3420         * symtab.c (gdb_mangle_name): Update.
3421         * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
3422         Update.
3423         * p-valprint.c (pascal_object_is_vtbl_ptr_type)
3424         (pascal_object_print_value_fields, pascal_object_print_value):
3425         Update.
3426         * p-typeprint.c (pascal_type_print_derivation_info): Update.
3427         * linespec.c (find_methods): Update.
3428         * gdbtypes.h (type_name_no_tag): Remove.
3429         (type_name_or_error): Rename from type_name_no_tag_or_error.
3430         * gdbtypes.c (type_name_no_tag): Remove.
3431         (type_name_or_error): Rename from type_name_no_tag_or_error.
3432         (lookup_struct_elt_type, check_typedef): Update.
3433         * expprint.c (print_subexp_standard): Update.
3434         * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
3435         * d-namespace.c (d_lookup_nested_symbol): Update.
3436         * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
3437         (cp_print_class_member): Update.
3438         * cp-namespace.c (cp_lookup_nested_symbol): Update.
3439         * completer.c (add_struct_fields): Update.
3440         * c-typeprint.c (cp_type_print_derivation_info)
3441         (c_type_print_varspec_prefix, c_type_print_base_struct_union):
3442         Update.
3443         * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
3444         (ada_prefer_type, ada_is_exception_sym): Update.
3445
3446 2018-06-01  Tom Tromey  <tom@tromey.com>
3447
3448         * valops.c (enum_constant_from_type, value_namespace_elt)
3449         (value_maybe_namespace_elt): Update.
3450         * valarith.c (find_size_for_pointer_math): Update.
3451         * target-descriptions.c (make_gdb_type): Update.
3452         * symmisc.c (print_symbol): Update.
3453         * stabsread.c (define_symbol, read_type)
3454         (complain_about_struct_wipeout, add_undefined_type)
3455         (cleanup_undefined_types_1): Update.
3456         * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
3457         (rust_range_type_p, val_print_struct, rust_print_struct_def)
3458         (rust_internal_print_type, rust_composite_type)
3459         (rust_evaluate_funcall, rust_evaluate_subexp)
3460         (rust_inclusive_range_type_p): Update.
3461         * python/py-type.c (typy_get_tag): Update.
3462         * p-typeprint.c (pascal_type_print_base): Update.
3463         * mdebugread.c (parse_symbol, parse_type): Update.
3464         * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
3465         Update.
3466         * guile/scm-type.c (gdbscm_type_tag): Update.
3467         * go-lang.c (sixg_string_p): Update.
3468         * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
3469         Update.
3470         * gdbtypes.h (struct main_type) <tag_name>: Remove.
3471         (TYPE_TAG_NAME): Remove.
3472         * gdbtypes.c (type_name_no_tag): Simplify.
3473         (check_typedef, check_types_equal, recursive_dump_type)
3474         (copy_type_recursive, arch_composite_type): Update.
3475         * f-typeprint.c (f_type_print_base): Update.  Print "Type" prefix
3476         in summary mode when needed.
3477         * eval.c (evaluate_funcall): Update.
3478         * dwarf2read.c (fixup_go_packaging, read_structure_type)
3479         (process_structure_scope, read_enumeration_type)
3480         (read_namespace_type, read_module_type, determine_prefix): Update.
3481         * cp-support.c (inspect_type): Update.
3482         * coffread.c (process_coff_symbol, decode_base_type): Update.
3483         * c-varobj.c (c_is_path_expr_parent): Update.
3484         * c-typeprint.c (c_type_print_base_struct_union): Update.
3485         (c_type_print_base_1): Update.  Print struct/class/union/enum in
3486         summary when using C language.
3487         * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
3488         (gen_maybe_namespace_elt): Update.
3489         * ada-lang.c (ada_type_name): Simplify.
3490         (empty_record, ada_template_to_fixed_record_type_1)
3491         (template_to_static_fixed_type)
3492         (to_record_with_fixed_variant_part, ada_check_typedef): Update.
3493
3494 2018-06-01  Tom Tromey  <tom@tromey.com>
3495
3496         * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
3497         c_print_type.
3498         * c-typeprint.c (c_print_type_1): Add "language" parameter.
3499         (c_print_type): Update.
3500         (c_print_type): New overload.
3501         (c_type_print_varspec_prefix, c_type_print_args)
3502         (c_type_print_varspec_suffix, c_print_type_no_offsets)
3503         (c_type_print_base_struct_union, c_type_print_base_1)
3504         (cp_type_print_method_args): Add "language" parameter.
3505         (c_type_print_base): Update.
3506         * c-lang.h (c_print_type): Add new overload.
3507
3508 2018-06-01  Tom Tromey  <tom@tromey.com>
3509
3510         * typeprint.h (c_type_print_varspec_suffix): Don't declare.
3511         * c-typeprint.c (c_type_print_varspec_suffix): Now static.
3512
3513 2018-06-01  Alan Hayward  <alan.hayward@arm.com>
3514
3515         * aarch64-tdep.c (aarch64_sve_register_names): New const
3516         var.
3517         * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
3518         (AARCH64_SVE_Z_REGS_NUM): New define.
3519         (AARCH64_SVE_P_REGS_NUM): Likewise.
3520         (AARCH64_SVE_NUM_REGS): Likewise.
3521
3522 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
3523
3524         * nat/linux-ptrace.h [__alpha__]
3525         (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
3526         definitions.
3527
3528 2018-05-31  Maciej W. Rozycki  <macro@mips.com>
3529
3530         * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
3531         the endianness selected.
3532         * NEWS: Document `set endian auto' mode operation update.
3533
3534 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
3535
3536         * Makefile.in: Add new header.
3537         * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
3538         (sve_vl_from_vg): Likewise.
3539         (sve_vq_from_vl): Likewise.
3540         (sve_vl_from_vq): Likewise.
3541         (sve_vq_from_vg): Likewise.
3542         (sve_vg_from_vq): Likewise.
3543         * configure.nat: Add new c file.
3544         * nat/aarch64-sve-linux-ptrace.c: New file.
3545         * nat/aarch64-sve-linux-ptrace.h: New file.
3546
3547 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
3548
3549         * aarch64-linux-nat.c (aarch64_linux_read_description):
3550         Add parmeter zero.
3551         * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
3552         Likewise.
3553         * aarch64-tdep.c (tdesc_aarch64_list): Add.
3554         (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
3555         (aarch64_gdbarch_init): Add parmeter zero.
3556         * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
3557         * arch/aarch64.c (aarch64_create_target_description): Check VQ.
3558         * arch/aarch64.h (aarch64_create_target_description): Add VQ.
3559         parmeter.
3560         * doc/gdb.texinfo: Describe SVE feature
3561         * features/aarch64-sve.c: New file.
3562
3563 2018-05-31  Omair Javaid  <omair.javaid@linaro.org>
3564
3565         PR gdb/23210
3566         * gdbarch.sh (significant_addr_bit): Default to zero when
3567         not set by target architecture.
3568         * gdbarch.c: Re-generated.
3569         * utils.c (address_significant): Update.
3570
3571 2018-05-30  Joel Brobecker  <brobecker@adacore.com>
3572
3573         * stack.c (func_command): Remove trailing newline in call to error.
3574
3575 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3576
3577         * regcache.h (regcache_raw_collect): Remove, update callers to
3578         use regcache::raw_collect.
3579         * regcache.c (regcache_raw_collect): Remove.
3580
3581 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3582
3583         * regcache.h (regcache_raw_supply): Remove, update callers to
3584         use detached_regcache::raw_supply.
3585         * regcache.c (regcache_raw_supply): Remove.
3586
3587 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3588
3589         * regcache.h (regcache_cooked_write_part): Remove, update
3590         callers to use regcache::cooked_write_part.
3591         * regcache.c (regcache_cooked_write_part): Remove.
3592
3593 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3594
3595         * regcache.h (regcache_cooked_read_part): Remove, update callers
3596         to use readable_regcache::cooked_read_part.
3597         * regcache.c (regcache_cooked_read_part): Remove.
3598
3599 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3600
3601         * regcache.h (regcache_cooked_read_value): Remove, update
3602         callers to use readable_regcache::cooked_read_value.
3603         * regcache.c (regcache_cooked_read_value): Remove.
3604
3605 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3606
3607         * regcache.h (regcache_cooked_write): Remove, update callers to
3608         use regcache::cooked_write.
3609         * regcache.c (regcache_cooked_write): Remove.
3610
3611 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3612
3613         * regcache.h (regcache_invalidate): Remove, update callers to
3614         use detached_regcache::invalidate instead.
3615         * regcache.c (regcache_invalidate): Remove.
3616
3617 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3618
3619         * regcache.h (regcache_raw_write_part): Remove, update callers
3620         to use regcache::raw_write_part instead.
3621         * regcache.c (regcache_raw_write_part): Remove.
3622
3623 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3624
3625         * regcache.h (regcache_raw_read_part): Remove, update callers to
3626         use readable_regcache::raw_read_part instead.
3627         * regcache.c (regcache_raw_read_part): Remove.
3628
3629 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3630
3631         * regcache.h (regcache_cooked_read): Remove, update callers to
3632         use readable_regcache::cooked_read instead.
3633         * regcache.c (regcache_cooked_read): Remove.
3634
3635 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3636
3637         * regcache.h (regcache_raw_write): Remove, update callers to use
3638         regcache::raw_write instead.
3639         * regcache.c (regcache_raw_write): Remove.
3640
3641 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3642
3643         * regcache.h (regcache_raw_read): Remove, update callers to use
3644         readable_regcache::raw_read instead.
3645         * regcache.c (regcache_raw_read): Remove.
3646
3647 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3648
3649         * regcache.h (regcache_raw_update): Remove, update callers to
3650         use readable_regcache::raw_update instead.
3651         * regcache.c (regcache_raw_update): Remove.
3652
3653 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3654
3655         * regcache.h (regcache_register_status): Remove, update callers
3656         to use reg_buffer::get_register_status directly instead.
3657         * regcache.c (regcache_register_status): Remove.
3658
3659 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3660
3661         * regcache.h (regcache_get_ptid): Remove, update all callers to
3662         call regcache::ptid instead.
3663         * regcache.c (regcache_get_ptid): Remove.
3664
3665 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3666
3667         * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
3668
3669 2018-05-30  Pedro Alves  <palves@redhat.com>
3670
3671         * common/common-exceptions.h (exception_rethrow): Use
3672         ATTRIBUTE_NORETURN.
3673
3674 2018-05-29  Simon Marchi  <simon.marchi@polymtl.ca>
3675
3676         * breakpoint.c (print_solib_event, check_status_catch_solib):
3677         Remove struct keyword in range-based for loops.
3678         * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
3679         * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
3680         Likewise.
3681         * linespec.c (find_superclass_methods, search_minsyms_for_name):
3682         Likewise.
3683         * symfile.c (addr_info_make_relative): Likewise.
3684         * thread.c (value_in_thread_stack_temporaries): Likewise.
3685
3686 2018-06-12  Weimin Pan  <weimin.pan@oracle.com>
3687
3688         PR gdb/16841
3689         * valops.c (value_struct_elt_for_reference): Call check_typedef on
3690         aggregate type to get its real type before accessing it.
3691
3692 2018-05-29  Weimin Pan  <weimin.pan@oracle.com>
3693
3694         * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
3695         * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
3696         * coff-pe-read.c (add_pe_forwarded_sym): Replace
3697         lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
3698         * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
3699         * jit.c (jit_breakpoint_re_set_internal): Likewise.
3700         * printcmd.c (info_address_command): Likewise.
3701
3702 2018-05-29  Tom Tromey  <tom@tromey.com>
3703
3704         * windows-nat.c (handle_exception): Update fall-through comment.
3705
3706 2018-05-29  Tom Tromey  <tom@tromey.com>
3707
3708         * progspace.h (so_list_ptr): Remove typedef.  Don't declare VEC.
3709         (struct program_space) <added_solibs>: Now a std::vector.
3710         * breakpoint.c (print_solib_event): Update.
3711         (check_status_catch_solib): Update.
3712         * progspace.c (clear_program_space_solib_cache): Update.
3713         * solib.c (update_solib_list): Update.
3714
3715 2018-05-29  Tom Tromey  <tom@tromey.com>
3716
3717         * python/py-type.c (typy_richcompare): Update.
3718         * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
3719         * gdbtypes.h (types_deeply_equal): Return bool.
3720         (types_equal): Likewise.
3721         * gdbtypes.c (type_equality_entry_d): Remove typedef.  Don't
3722         declare VEC.
3723         (check_types_equal): Change worklist to std::vector.  Return
3724         bool.
3725         (struct type_equality_entry): Add constructor.
3726         (compare_maybe_null_strings): Return bool.
3727         (check_types_worklist): Return bool.  Change worklist to
3728         std::vector.
3729         (types_deeply_equal): Use std::vector.
3730         (types_equal): Return bool.
3731         (compare_maybe_null_strings): Simplify.
3732
3733 2018-05-29  Tom Tromey  <tom@tromey.com>
3734
3735         * record-btrace.c (tp_t): Remove typedef.  Don't declare VEC.
3736
3737 2018-05-29  Tom Tromey  <tom@tromey.com>
3738
3739         * objc-lang.h: Don't include cp-support.h.
3740         * common/gdb_vecs.h (const_char_ptr): Remove typedef.  Don't
3741         declare VEC.
3742
3743 2018-05-27  Tom Tromey  <tom@tromey.com>
3744
3745         * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
3746
3747 2018-05-25  Tom Tromey  <tom@tromey.com>
3748
3749         * value.c (value::location): Initialize.
3750
3751 2018-05-25  Tom Tromey  <tom@tromey.com>
3752
3753         * dbxread.c (init_bincl_list): Remove.
3754         (bincl_list): Now a std::vector.
3755         (bincls_allocated, next_bincl): Remove.
3756         (free_bincl_list, do_free_bincl_list_cleanup)
3757         (make_cleanup_free_bincl_list): Remove.
3758         (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
3759         unique_xmalloc_ptr.
3760         (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
3761         (struct header_file_location): Add constructor.
3762         (add_bincl_to_list): Remove.
3763
3764 2018-05-25  Tom Tromey  <tom@tromey.com>
3765
3766         * tui/tui.c (tui_enable): Update.
3767         * mi/mi-interp.c (mi_interp::init): Update.
3768         * interps.h (class interp) <name>: New method.
3769         <m_name>: Rename from name.
3770         (~scoped_restore_interp): Update.
3771         * interps.c (interp::interp): Update.
3772         (interp_add, interp_set, interp_lookup_existing)
3773         (current_interp_named_p): Update.
3774
3775 2018-05-25  Tom Tromey  <tom@tromey.com>
3776
3777         * interps.c (interp_name): Remove.
3778         * mi/mi-interp.c (mi_interp::init): Update.
3779         * interps.h (interp_name): Remove.
3780         (~scoped_restore_interp): Update.
3781         * tui/tui.c (tui_enable): Update.
3782
3783 2018-05-25  Tom Tromey  <tom@tromey.com>
3784
3785         * utils.c (fputs_maybe_filtered): Update.
3786         * linespec.c (decode_line_full): Update.
3787         * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
3788         (mi_print_breakpoint_for_event, mi_solib_loaded)
3789         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
3790         (mi_user_selected_context_changed): Update.
3791         * mi/mi-main.c (mi_execute_command): Update.
3792         * cli/cli-script.c (execute_control_command): Update.
3793         * python/python.c (execute_gdb_command): Update.
3794         * solib.c (info_sharedlibrary_command): Update.
3795         * interps.c (interp_ui_out): Remove.
3796         * interps.h (interp_ui_out): Remove.
3797
3798 2018-05-25  Tom Tromey  <tom@tromey.com>
3799
3800         * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
3801         * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
3802         * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
3803
3804 2018-05-25  Tom Tromey  <tom@tromey.com>
3805
3806         * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
3807         * interps.c (interp_exec): Use scoped_restore.
3808
3809 2018-05-25  Tom Tromey  <tom@tromey.com>
3810
3811         * remote.c (remote_target::remote_file_get): Use
3812         gdb::byte_vector.
3813         (remote_target::remote_file_put): Likewise.
3814
3815 2018-05-25  Tom Tromey  <tom@tromey.com>
3816
3817         * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
3818         a std::string.
3819         (get_pe_section_index, add_pe_exported_sym): Update.
3820         (read_pe_exported_syms): Use gdb::def_vector.
3821
3822 2018-05-25  Tom Tromey  <tom@tromey.com>
3823
3824         * frame.c (remove_prev_frame): Remove.
3825         (get_prev_frame_if_no_cycle): Use TRY/CATCH.
3826
3827 2018-05-25  Maciej W. Rozycki  <macro@mips.com>
3828
3829         * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
3830         Remove prototypes.
3831         * mips-linux-nat.c (supply_fpregset): Always call
3832         `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
3833         (fill_fpregset): Always call `mips64_fill_fpregset' rather than
3834         `mips_fill_fpregset'.
3835         * mips-linux-tdep.c (mips_supply_fpregset)
3836         (mips_supply_fpregset_wrapper, mips_fill_fpregset)
3837         (mips_fill_fpregset_wrapper): Remove functions.
3838         (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
3839         (mips_linux_fpregset): Remove variable.
3840         (mips_linux_iterate_over_regset_sections): Use
3841         `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
3842         (mips_linux_o32_sigframe_init): Remove comment.
3843
3844 2018-05-25  Pedro Alves  <palves@redhat.com>
3845
3846         * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
3847         (struct readahead_cache, struct packet_reg, struct
3848         remote_arch_state, class remote_state): Move higher up in the
3849         file.
3850         (remote_target::m_remote_state): Now an object instead of a pointer.
3851         (remote_target::get_remote_state): Adjust.
3852
3853 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
3854
3855         * stack.c (select_and_print_frame): Delete.
3856         (struct function_bounds): Move struct within function.
3857         (func_command): Most content moved into new function
3858         find_frame_for_function, use new function, print result, add
3859         function comment.
3860         (find_frame_for_function): New function, now returns a result.
3861
3862 2018-05-24  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
3863
3864         * stack.c (iterate_over_block_arg_vars): Fix comment.
3865         (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
3866
3867 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
3868
3869         PR gdb/23203
3870         * frame.c
3871         (scoped_restore_selected_frame::scoped_restore_selected_frame):
3872         Define.
3873         (scoped_restore_selected_frame::~scoped_restore_selected_frame):
3874         Define.
3875         * frame.h (class scoped_restore_selected_frame): New class.
3876         * stack.c (print_frame_local_vars): Remove catching and rethrowing
3877         of any exception, use scoped_restore_selected_frame to restore the
3878         frame instead.
3879
3880 2018-05-24  Pedro Alves  <palves@redhat.com>
3881
3882         * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
3883         override.
3884
3885 2018-05-23  Tom Tromey  <tom@tromey.com>
3886
3887         * complaints.c (struct complaints): Remove.
3888         (symfile_complaint_book): Remove.
3889         (series): New global.
3890         (complaint_internal): Update.
3891         (clear_complaints): Update.
3892
3893 2018-05-23  Tom Tromey  <tom@tromey.com>
3894
3895         * complaints.c (counters): New global.
3896         (struct complain): Remove.
3897         (struct complaints) <root>: Remove.
3898         (complaint_sentinel): Remove.
3899         (symfile_complaint_book): Update.
3900         (find_complaint) Remove.
3901         (complaint_internal, clear_complaints): Update.
3902
3903 2018-05-23  Tom Tromey  <tom@tromey.com>
3904
3905         * complaints.c (struct complain) <file, line>: Remove.
3906         (find_complaint): Remove file, line parameters.
3907         (complaint_internal): Update.
3908
3909 2018-05-23  Tom Tromey  <tom@tromey.com>
3910
3911         * complaints.c (vcomplaint): Remove.
3912         (complaint_internal) Merge in contents of vcomplaint.
3913
3914 2018-05-23  Tom Tromey  <tom@tromey.com>
3915
3916         * complaints.c (struct complaints) <explanation>: Remove.
3917         (symfile_explanations): Remove.
3918         (symfile_complaint_book): Update.
3919         (vcomplaint): Update.
3920         (struct explanation): Remove.
3921
3922 2018-05-23  Tom Tromey  <tom@tromey.com>
3923
3924         * complaints.c (symfile_complaints): Remove.
3925         (complaint_internal): Remove "complaints" parameter.
3926         (clear_complaints, vcomplaint): Remove "c" parameter.
3927         (get_complaints): Remove.
3928         * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
3929         (dwarf2_debug_line_missing_file_complaint)
3930         (dwarf2_debug_line_missing_end_sequence_complaint)
3931         (dwarf2_complex_location_expr_complaint)
3932         (dwarf2_const_value_length_mismatch_complaint)
3933         (dwarf2_section_buffer_overflow_complaint)
3934         (dwarf2_macro_malformed_definition_complaint)
3935         (dwarf2_invalid_attrib_class_complaint)
3936         (create_addrmap_from_index, dw2_symtab_iter_next)
3937         (dw2_expand_marked_cus)
3938         (dw2_debug_names_iterator::find_vec_in_debug_names)
3939         (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
3940         (create_debug_type_hash_table, init_cutu_and_read_dies)
3941         (partial_die_parent_scope, add_partial_enumeration)
3942         (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
3943         (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
3944         (read_import_statement, read_file_scope, create_dwo_cu_reader)
3945         (create_cus_hash_table, create_dwp_hash_table)
3946         (inherit_abstract_dies, read_func_scope, read_call_site_scope)
3947         (dwarf2_rnglists_process, dwarf2_ranges_process)
3948         (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
3949         (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
3950         (handle_struct_member_die, process_structure_scope)
3951         (read_array_type, read_common_block, read_module_type)
3952         (read_tag_pointer_type, read_typedef, read_base_type)
3953         (read_subrange_type, load_partial_dies, partial_die_info::read)
3954         (partial_die_info::read, partial_die_info::read)
3955         (partial_die_info::read, read_checked_initial_length_and_offset)
3956         (dwarf2_string_attr, read_formatted_entries)
3957         (dwarf_decode_line_header)
3958         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
3959         (new_symbol, dwarf2_const_value_attr, lookup_die_type)
3960         (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
3961         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
3962         (get_signatured_type, get_DW_AT_signature_type)
3963         (decode_locdesc, file_file_name, consume_improper_spaces)
3964         (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
3965         (dwarf_decode_macro_bytes, dwarf_decode_macros)
3966         (dwarf2_symbol_mark_computed, set_die_type)
3967         (read_attribute_value): Update.
3968         * stap-probe.c (handle_stap_probe, get_stap_base_address):
3969         Update.
3970         * dbxread.c (unknown_symtype_complaint)
3971         (lbrac_mismatch_complaint, repeated_header_complaint)
3972         (set_namestring, function_outside_compilation_unit_complaint)
3973         (read_dbx_symtab, process_one_symbol): Update.
3974         * gdbtypes.c (stub_noname_complaint): Update.
3975         * windows-nat.c (handle_unload_dll): Update.
3976         * coffread.c (coff_symtab_read, enter_linenos, decode_type)
3977         (decode_base_type): Update.
3978         * xcoffread.c (bf_notfound_complaint, ef_complaint)
3979         (eb_complaint, record_include_begin, record_include_end)
3980         (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
3981         (process_xcoff_symbol, read_symbol)
3982         (function_outside_compilation_unit_complaint)
3983         (scan_xcoff_symtab): Update.
3984         * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
3985         * buildsym.c (finish_block_internal, make_blockvector)
3986         (end_symtab_get_static_block, augment_type_symtab): Update.
3987         * dtrace-probe.c (dtrace_process_dof)
3988         (dtrace_static_probe_ops::get_probes): Update.
3989         * complaints.h (struct complaint): Don't declare.
3990         (symfile_complaints): Remove.
3991         (complaint_internal): Remove "complaints" parameter.
3992         (complaint): Likewise.
3993         (clear_complaints): Likewise.
3994         * symfile.c (syms_from_objfile_1, finish_new_objfile)
3995         (reread_symbols): Update.
3996         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
3997         (dwarf2_frame_cache, decode_frame_entry): Update.
3998         * dwarf2loc.c (dwarf_reg_to_regnum): Update.
3999         * objc-lang.c (lookup_objc_class, lookup_child_selector)
4000         (info_selectors_command): Update.
4001         * macrotab.c (macro_include, check_for_redefinition)
4002         (macro_undef): Update.
4003         * objfiles.c (filter_overlapping_sections): Update.
4004         * stabsread.c (invalid_cpp_abbrev_complaint)
4005         (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
4006         (define_symbol, error_type, read_type, rs6000_builtin_type)
4007         (stabs_method_name_from_physname, read_member_functions)
4008         (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
4009         (attach_fields_to_type, complain_about_struct_wipeout)
4010         (read_range_type, read_args, common_block_start)
4011         (common_block_end, cleanup_undefined_types_1, scan_file_globals):
4012         Update.
4013         * mdebugread.c (index_complaint, unknown_ext_complaint)
4014         (basic_type_complaint, bad_tag_guess_complaint)
4015         (bad_rfd_entry_complaint, unexpected_type_code_complaint)
4016         (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
4017         (parse_procedure, parse_lines)
4018         (function_outside_compilation_unit_complaint)
4019         (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
4020         (bad_tag_guess_complaint, reg_value_complaint): Update.
4021         * cp-support.c (demangled_name_complaint): Update.
4022         * macroscope.c (sal_macro_scope): Update.
4023         * dwarf-index-write.c (class debug_names): Update.
4024
4025 2018-05-23  Tom Tromey  <tom@tromey.com>
4026
4027         * complaints.c (clear_complaints): Remove "noisy" parameter.
4028         * complaints.h (clear_complaints): Update.
4029         * symfile.c (syms_from_objfile_1, finish_new_objfile)
4030         (reread_symbols): Update.
4031
4032 2018-05-23  Tom Tromey  <tom@tromey.com>
4033
4034         * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
4035         SUBSEQUENT_MESSAGE.
4036         (vcomplaint, clear_complaints): Update.
4037         (symfile_explanations): Remove some messages.
4038
4039 2018-05-23  Tom Tromey  <tom@tromey.com>
4040
4041         * complaints.c (internal_complaint): Remove.
4042         * complaints.h (internal_complaint): Remove.
4043
4044 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
4045
4046         * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
4047
4048 2018-05-22  Pedro Alves  <palves@redhat.com>
4049
4050         * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
4051         (remote_fileio_badfd, remote_fileio_return_errno)
4052         (remote_fileio_return_success, remote_fileio_func_open)
4053         (remote_fileio_func_open, remote_fileio_func_close)
4054         (remote_fileio_func_read, remote_fileio_func_write)
4055         (remote_fileio_func_lseek, remote_fileio_func_rename)
4056         (remote_fileio_func_unlink, remote_fileio_func_stat)
4057         (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
4058         (remote_fileio_func_isatty, remote_fileio_func_system): Add
4059         remote_target parameter.
4060         (remote_fio_func_map) <func>: Add remote_target parameter.
4061         (do_remote_fileio_request, remote_fileio_request):
4062         * remote-fileio.h (remote_fileio_request):
4063         * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
4064         remote_target parameter.
4065         (remote_notif_process, handle_notification): Adjust to pass down
4066         the remote.
4067         (remote_notif_state_allocate): Add remote_target parameter.  Save
4068         it.
4069         * remote-notif.h (struct remote_target): Forward declare.
4070         (struct notif_client) <parse, ack, can_get_pending_events>: Add
4071         remote_target parameter.
4072         (struct remote_notif_state) <remote>: New field.
4073         (remote_notif_ack, remote_notif_parse): Add remote_target
4074         parameter.
4075         (remote_notif_state_allocate, remote_notif_state_allocate): Add
4076         remote_target parameter.
4077         * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
4078         (threads_listing_context, rmt_thread_action, protocol_feature)
4079         (packet_reg, stop_reply, stop_reply_p, enum packet_support)
4080         (packet_result, struct threads_listing_context, remote_state):
4081         Move definitions and declarations higher up.
4082         (remote_target) <~remote_target>: Declare.
4083         (remote_download_command_source, remote_file_put, remote_file_get)
4084         (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
4085         (remote_hostio_pread_vFile, remote_hostio_send_command)
4086         (remote_hostio_set_filesystem, remote_hostio_open)
4087         (remote_hostio_close, remote_hostio_unlink, remote_state)
4088         (get_remote_state, get_remote_packet_size, get_memory_packet_size)
4089         (get_memory_write_packet_size, get_memory_read_packet_size)
4090         (append_pending_thread_resumptions, remote_detach_1)
4091         (append_resumption, remote_resume_with_vcont)
4092         (add_current_inferior_and_thread, wait_ns, wait_as)
4093         (process_stop_reply, remote_notice_new_inferior)
4094         (process_initial_stop_replies, remote_add_thread)
4095         (btrace_sync_conf, remote_btrace_maybe_reopen)
4096         (remove_new_fork_children, kill_new_fork_children)
4097         (discard_pending_stop_replies, stop_reply_queue_length)
4098         (check_pending_events_prevent_wildcard_vcont)
4099         (discard_pending_stop_replies_in_queue, stop_reply)
4100         (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
4101         (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
4102         (remote_interrupt_as, remote_interrupt_ns)
4103         (remote_get_noisy_reply, remote_query_attached)
4104         (remote_add_inferior, remote_current_thread, get_current_thread)
4105         (set_thread, set_general_thread, set_continue_thread)
4106         (set_general_process, write_ptid)
4107         (remote_unpack_thread_info_response, remote_get_threadinfo)
4108         (parse_threadlist_response, remote_get_threadlist)
4109         (remote_threadlist_iterator, remote_get_threads_with_ql)
4110         (remote_get_threads_with_qxfer)
4111         (remote_get_threads_with_qthreadinfo, extended_remote_restart)
4112         (get_offsets, remote_check_symbols, remote_supported_packet)
4113         (remote_query_supported, remote_packet_size)
4114         (remote_serial_quit_handler, remote_detach_pid)
4115         (remote_vcont_probe, remote_resume_with_hc)
4116         (send_interrupt_sequence, interrupt_query)
4117         (remote_notif_get_pending_events, fetch_register_using_p)
4118         (send_g_packet, process_g_packet, fetch_registers_using_g)
4119         (store_register_using_P, store_registers_using_G)
4120         (set_remote_traceframe, check_binary_download)
4121         (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
4122         (remote_xfer_live_readonly_partial, remote_read_bytes)
4123         (remote_send_printf, remote_flash_write, readchar)
4124         (remote_serial_write, putpkt, putpkt_binary, skip_frame)
4125         (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
4126         (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
4127         (extended_remote_disable_randomization, extended_remote_run)
4128         (send_environment_packet, extended_remote_environment_support)
4129         (extended_remote_set_inferior_cwd, remote_write_qxfer)
4130         (remote_read_qxfer, push_stop_reply, vcont_r_supported)
4131         (packet_command): Now methods of ...
4132         (remote_target): ... this class.
4133         (m_remote_state) <remote_target>: New field.
4134         (struct remote_state) <stop_reply_queue,
4135         remote_async_inferior_event_token, wait_forever_enabled_p>: New
4136         fields.
4137         (remote_state::remote_state): Allocate stop_reply_queue.
4138         (remote_state): Delete global.
4139         (get_remote_state_raw): Delete.
4140         (remote_target::get_remote_state): Allocate m_remote_state on
4141         demand.
4142         (get_current_remote_target): New.
4143         (remote_ops, extended_remote_ops): Delete.
4144         (wait_forever_enabled_p, remote_async_inferior_event_token):
4145         Delete, moved to struct remote_state.
4146         (remote_target::close): Delete self.  Destruction bits split to
4147         ...
4148         (remote_target::~remote_target): ... this.
4149         (show_memory_packet_size): Adjust to use
4150         get_current_remote_target.
4151         (struct protocol_feature) <func>: Add remote_target parameter.
4152         All callers adjusted.
4153         (curr_quit_handler_target): New.
4154         (remote_serial_quit_handler): Reimplement.
4155         (remote_target::open_1): Adjust to use get_current_remote_target.
4156         Heap-allocate remote_target/extended_remote_target instances.
4157         (vcont_builder::vcont_builder): Add remote_target parameter, and
4158         save it in m_remote.  All callers adjusted.
4159         (vcont_builder::m_remote): New field.
4160         (vcont_builder::restart, vcont_builder::flush)
4161         (vcont_builder::push_action): Use it.
4162         (remote_target::commit_resume): Use it.
4163         (struct queue_iter_param) <remote>: New field.
4164         (remote_target::remove_new_fork_children): Fill in 'remote' field.
4165         (check_pending_event_prevents_wildcard_vcont_callback_data): New.
4166         (check_pending_event_prevents_wildcard_vcont_callback)
4167         (remote_target::check_pending_events_prevent_wildcard_vcont)
4168         (remote_target::discard_pending_stop_replies)
4169         (remote_target::discard_pending_stop_replies_in_queue)
4170         (remote_target::remote_notif_remove_queued_reply): Fill in
4171         'remote' field.
4172         (remote_notif_get_pending_events): New.
4173         (remote_target::readchar, remote_target::remote_serial_write):
4174         Save/restore curr_quit_handler_target.
4175         (putpkt): New.
4176         (kill_new_fork_children): Fill in 'remote' field.
4177         (packet_command): Use get_current_remote_target, defer to
4178         remote_target method of same name.
4179         (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
4180         parameter, and save it in m_remote.  All callers adjusted.
4181         (scoped_remote_fd::release): Use m_remote.
4182         (scoped_remote_fd::m_remote): New field.
4183         (remote_file_put, remote_file_get, remote_file_delete): Use
4184         get_current_remote_target, defer to remote_target method of same
4185         name.
4186         (remote_btrace_reset): Add remote_state paremeter.  Update all
4187         callers.
4188         (remote_async_inferior_event_handler). Pass down 'data'.
4189         (remote_new_objfile): Use get_current_remote_target.
4190         (remote_target::vcont_r_supported): New.
4191         (set_range_stepping): Use get_current_remote_target and
4192         remote_target::vcont_r_supported.
4193         (_initialize_remote): Don't allocate 'remote_state' and
4194         'stop_reply_queue' globals.
4195         * remote.h (struct remote_target): Forward declare.
4196         (getpkt, putpkt, remote_notif_get_pending_events): Add
4197         'remote_target' parameter.
4198
4199 2018-05-22  Pedro Alves  <palves@redhat.com>
4200
4201         * remote.c (vcont_builder): Now a class.  Make all data members
4202         private.
4203         (vcont_builder) <vcont_builder, restart, flush, push_action>:
4204         Declare methods.
4205         (vcont_builder_restart): Rename to ...
4206         (vcont_builder::restart): ... this.
4207         (vcont_builder_flush): Rename to ...
4208         (vcont_builder::flush): ... this.
4209         (vcont_builder_push_action): Rename to ...
4210         (vcont_builder::push_action): ... this.
4211         (remote_target::commit_resume): Adjust.
4212
4213 2018-05-22  Pedro Alves  <palves@redhat.com>
4214
4215         * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
4216         (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
4217         (get_fixed_memory_packet_size): New.
4218         (get_memory_packet_size): Use it.
4219         (set_memory_packet_size): Don't override the config size with
4220         DEFAULT_MAX_MEMORY_PACKET_SIZE.
4221         (show_memory_packet_size): Use get_fixed_memory_packet_size.
4222         Don't refer to get_memory_packet_size if not connected to a remote
4223         target.  Show "(default)" if configured size is 0.
4224
4225 2018-05-22  Pedro Alves  <palves@redhat.com>
4226
4227         * remote.c (remote_target::mourn_inferior): Move
4228         discard_pending_stop_replies call here from ...
4229         (_initialize_remote): ... here.
4230
4231 2018-05-22  Pedro Alves  <palves@redhat.com>
4232
4233         * remote.c (compare_section_command): Remove set_general_process
4234         call.
4235
4236 2018-05-22  Pedro Alves  <palves@redhat.com>
4237
4238         * remote.c (struct packet_reg, struct remote_arch_state):
4239         Move higher up in the file.
4240         (remote_state) <m_arch_states>: Store remote_arch_state values
4241         instead of remote_arch_state pointers.
4242         (remote_state::get_remote_arch_state): Adjust.
4243
4244 2018-05-22  Pedro Alves  <palves@redhat.com>
4245
4246         * remote.c: Include <unordered_map>.
4247         (remote_state): Now a class.
4248         (remote_state) <get_remote_arch_state>: Declare method.
4249         <get_remote_arch_state>: New field.
4250         (remote_arch_state) <remote_arch_state>: Declare ctor.
4251         <regs>: Now a unique_ptr.
4252         (remote_gdbarch_data_handle): Delete.
4253         (get_remote_arch_state): Delete.
4254         (remote_state::get_remote_arch_state): New.
4255         (get_remote_state): Adjust to call remote_state's
4256         get_remote_arch_state method.
4257         (init_remote_state): Delete, bits factored out to ...
4258         (remote_arch_state::remote_arch_state): ... this new method.
4259         (get_remote_packet_size, get_memory_packet_size)
4260         (process_g_packet, remote_target::fetch_registers)
4261         (remote_target::prepare_to_store, store_registers_using_G)
4262         (remote_target::store_registers, remote_target::get_trace_status):
4263         Adjust to call remote_state's method.
4264         (_initialize_remote): Remove reference to
4265         remote_gdbarch_data_handle.
4266
4267 2018-05-22  Pedro Alves  <palves@redhat.com>
4268
4269         * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
4270         pread>: New method declarations.
4271         (remote_target::open_1): Adjust.
4272         (readahead_cache_invalidate): Rename to ...
4273         (readahead_cache::invalidate): ... this, and adjust to be a class
4274         method.
4275         (readahead_cache_invalidate_fd): Rename to ...
4276         (readahead_cache::invalidate_fd): ... this, and adjust to be a
4277         class method.
4278         (remote_hostio_pwrite): Adjust.
4279         (remote_hostio_pread_from_cache): Rename to ...
4280         (readahead_cache::pread): ... this, and adjust to be a class
4281         method.
4282         (remote_hostio_close): Adjust.
4283
4284 2018-05-22  Pedro Alves  <palves@redhat.com>
4285
4286         * remote.c (remote_hostio_close_cleanup): Delete.
4287         (class scoped_remote_fd): New.
4288         (remote_file_put, remote_file_get): Use it.
4289
4290 2018-05-22  Pedro Alves  <palves@redhat.com>
4291
4292         (struct vCont_action_support): Use bool and initialize all fields.
4293         (struct readahead_cache): Initialize all fields.
4294         (remote_state): Use bool and initialize all fields.
4295         (remote_state::remote_state, remote_state::~remote_state): New.
4296         (new_remote_state): Delete.
4297         (_initialize_remote): Use new to allocate remote_state.
4298
4299 2018-05-22  Pedro Alves  <palves@redhat.com>
4300             張俊芝  <zjz@zjz.name>
4301
4302         PR gdb/22973
4303         * c-exp.y: Include "c-support.h".
4304         (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
4305         of tolower.  Use c_ident_is_alpha to scan names.
4306         * c-lang.c: Include "c-support.h".
4307         (convert_ucn, convert_octal, convert_hex, convert_escape): Use
4308         ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
4309         * c-support.h: New file, with bits factored out from ...
4310         * cp-name-parser.y: ... this file.
4311         Include "c-support.h".
4312         (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
4313         c-support.h and renamed.
4314         (symbol_end, yylex): Adjust.
4315
4316 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
4317
4318         * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
4319         parameter type to CORE_ADDR.
4320         * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
4321         parameter type in declaration to CORE_ADDR.
4322         * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
4323         target_auxv_search to get AT_HWCAP and use the result to get the
4324         target description.
4325         * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
4326         to CORE_ADDR. Remove the cast of the return value to unsigned
4327         long. Fix error predicate of target_auxv_search.
4328         (ppc_linux_nat_target::read_description): Change the type of the
4329         hwcap variable to CORE_ADDR.
4330
4331 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
4332
4333         * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
4334         if the size of fpscr is larger than 32 bits.
4335
4336 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
4337
4338         * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
4339         (ppc32_linux_vsxregmap): New global.
4340         (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
4341         regcache_supply_regset, and regcache_collect_regset.
4342         * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
4343         * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
4344         (fetch_vsx_register, store_vsx_register): Remove.
4345         (fetch_vsx_registers): Add regno parameter. Get regset using
4346         ppc_linux_vsxregset. Use regset to supply registers.
4347         (store_vsx_registers): Add regno parameter. Get regset using
4348         ppc_linux_vsxregset. Use regset to collect registers.
4349         (fetch_register): Call fetch_vsx_registers instead of
4350         fetch_vsx_register.
4351         (store_register): Call store_vsx_registers instead of
4352         store_vsx_register.
4353         (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
4354         new regno parameter.
4355         (store_ppc_registers): Call store_vsx_registers with -1 for the
4356         new regno parameter.
4357         * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
4358         (ppc_collect_vsxregset): Remove.
4359
4360 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
4361
4362         * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
4363         offset fields.
4364         * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
4365         for vector register offset fields.
4366         (ppc64_fbsd_reg_offsets): Likewise.
4367         * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
4368         to vector register offset fields.
4369         * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
4370         to vector register offset fields.
4371         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
4372         vector register offset fields.
4373         * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
4374         initializers for vector register offset fields.
4375         (rs6000_aix64_reg_offsets): Likewise.
4376         * rs6000-tdep.c (ppc_vrreg_offset): Remove.
4377         (ppc_supply_vrregset): Remove.
4378         (ppc_collect_vrregset): Remove.
4379         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
4380         (ppc_linux_vrregset) : New function.
4381         (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
4382         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
4383         (ppc32_linux_vrregset): Remove.
4384         (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
4385         and use result instead of ppc32_linux_vrregset.
4386         (ppc32_linux_reg_offsets): Remove initializers for vector register
4387         offset fields.
4388         (ppc64_linux_reg_offsets): Likewise.
4389         * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
4390         * ppc-linux-nat.c: Include regset.h.
4391         (gdb_vrregset_t): Adjust comment to account for little-endian
4392         mode.
4393         (supply_vrregset, fill_vrregset): Remove.
4394         (fetch_altivec_register, store_altivec_register): Remove.
4395         (fetch_altivec_registers): Add regno parameter. Get regset using
4396         ppc_linux_vrregset. Use regset to supply registers.
4397         (store_altivec_registers): Add regno parameter. Get regset using
4398         ppc_linux_vrregset. Use regset to collect registers.
4399         (fetch_register): Call fetch_altivec_registers instead of
4400         fetch_altivec_register.
4401         (store_register): Call store_altivec_registers instead of
4402         store_altivec_register.
4403         (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
4404         the new regno parameter.
4405         (store_ppc_registers): Call store_altivec_registers with -1 for
4406         the new regno parameter.
4407
4408 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
4409
4410         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
4411         (PPC_LINUX_SIZEOF_VSXREGSET): Define.
4412         * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
4413         (gdb_vrregset_t): Change array type size to
4414         PPC_LINUX_SIZEOF_VRREGSET.
4415         (gdb_vsxregset_t): Change array type size to
4416         PPC_LINUX_SIZEOF_VSXREGSET.
4417         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
4418         Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
4419         PPC_LINUX_SIZEOF_VSXREGSET.
4420
4421 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
4422
4423         * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
4424         * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
4425         nat/ppc-linux.c.
4426         (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
4427         ppc_linux_target_wordsize with tid.
4428         (ppc_linux_nat_target::read_description): Call ppc_linux_target
4429         wordsize with tid.
4430         * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
4431         (ppc64_64bit_inferior_p): Add static and inline specifiers.
4432         (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
4433         tid parameter. Remove static specifier.
4434         * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
4435         (ppc_linux_target_wordsize): New declaration.
4436
4437 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
4438
4439         * arch/ppc-linux-common.c: New file.
4440         * arch/ppc-linux-common.h: New file.
4441         * arch/ppc-linux-tdesc.h: New file.
4442         * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
4443         * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
4444         (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
4445         arch/ppc-linux-tdesc.h.
4446         * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
4447         arch/ppc-linux-tdesc.h.
4448         (ppc_linux_nat_target::read_description): Remove target
4449         description matching code. Fill a ppc_linux_features struct and
4450         call ppc_linux_match_description with it. Move comment about ISA
4451         2.05 to ppc-linux-common.c.
4452         * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
4453         arch/ppc-linux-tdesc.h.
4454         (ppc_linux_core_read_description): Remove target description
4455         matching code. Fill a ppc_linux_features struct and call
4456         ppc_linux_match_description with it.
4457         * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
4458         (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
4459         (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
4460         (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
4461         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
4462         (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
4463         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
4464         (tdesc_powerpc_e500l): Remove.
4465
4466 2018-05-22  Joel Brobecker  <brobecker@adacore.com>
4467
4468         * ada-lang.c (catch_assert_command): Pass empty string instead
4469         of NULL for excep_string argument.
4470
4471 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
4472
4473         * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
4474         the width of the requested register exceeds the width of the
4475         `ptrace' data type.
4476
4477 2018-05-21  Tom Tromey  <tom@tromey.com>
4478
4479         * printcmd.c (output_command): Remove.
4480         (output_command_const): Rename to output_command.
4481         * valprint.h (output_command): Rename from output_command_const.
4482         * tracepoint.c (trace_dump_actions): Call output_command.
4483
4484 2018-05-21  Tom Tromey  <tom@tromey.com>
4485
4486         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
4487         (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
4488         * ada-lang.h (create_ada_exception_catchpoint): Update.
4489         * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
4490         std::string.
4491         (create_excep_cond_exprs, ~ada_catchpoint)
4492         (should_stop_exception, print_one_exception)
4493         (print_mention_exception, print_recreate_exception): Update.
4494         (ada_get_next_arg): Remove.
4495         (catch_ada_exception_command_split): Use std::string.  Change type
4496         of "excep_string", "cond_string".
4497         (catch_ada_exception_command): Update.
4498         (create_ada_exception_catchpoint): Change type of excep_string.
4499         (ada_exception_sal): Remove excep_string parameter.
4500         (~ada_catchpoint): Remove.
4501
4502 2018-05-21  Tom Tromey  <tom@tromey.com>
4503
4504         * ada-lang.c (ada_collect_symbol_completion_matches): Remove
4505         cleanup.
4506
4507 2018-05-21  Tom Tromey  <tom@tromey.com>
4508
4509         * ada-lang.c (ada_exception_message_1, ada_exception_message):
4510         Return unique_xmalloc_ptr.
4511         (print_it_exception): Update.
4512
4513 2018-05-21  Tom Tromey  <tom@tromey.com>
4514
4515         * tracepoint.c (trace_dump_actions): Use std::string.
4516
4517 2018-05-21  Tom Tromey  <tom@tromey.com>
4518
4519         * symfile.c (reread_symbols): Use std::string for original_name.
4520
4521 2018-05-21  Tom Tromey  <tom@tromey.com>
4522
4523         * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
4524         (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN.  Default
4525         constructor.
4526
4527 2018-05-20  Simon Marchi  <simon.marchi@polymtl.ca>
4528
4529         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
4530         instance to...
4531         (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
4532         * objfiles.c (get_objfile_bfd_data): Allocate
4533         objfile_per_bfd_storage with obstack_new when allocating on
4534         obstack.
4535
4536 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
4537
4538         * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
4539         OBSTACK_ZALLOC.
4540         * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
4541         * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
4542         * mdebugread.c (mdebug_build_psymtabs): Likewise.
4543         (add_pending): Likewise.
4544         (parse_symbol): Likewise.
4545         (parse_partial_symbols): Likewise.
4546         (psymtab_to_symtab_1): Likewise.
4547         (new_psymtab): Likewise.
4548         (elfmdebug_build_psymtabs): Likewise.
4549         * minsyms.c (terminate_minimal_symbol_table): Likewise.
4550         * objfiles.c (get_objfile_bfd_data): Likewise.
4551         (objfile_register_static_link): Likewise.
4552         * psymtab.c (allocate_psymtab): Likewise.
4553         * stabsread.c (read_member_functions): Likewise.
4554         * xcoffread.c (xcoff_end_psymtab): Likewise.
4555
4556 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
4557
4558         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
4559         compiler supports std::is_trivially_constructible.
4560         * common/poison.h: Include obstack.h.
4561         (IsMallocable): Define to is_trivially_constructible if the
4562         compiler supports it, define to true_type otherwise.
4563         (xobnew): New.
4564         (XOBNEW): Redefine.
4565         (xobnewvec): New.
4566         (XOBNEWVEC): Redefine.
4567         * gdb_obstack.h (obstack_zalloc): New.
4568         (OBSTACK_ZALLOC): Redefine.
4569         (obstack_calloc): New.
4570         (OBSTACK_CALLOC): Redefine.
4571         (obstack_new): New.
4572         * gdbarch.sh: Include gdb_obstack in gdbarch.h.
4573         (gdbarch_obstack): New declaration in gdbarch.h, definition in
4574         gdbarch.c.
4575         (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
4576         obstack_calloc/obstack_zalloc.
4577         (gdbarch_obstack_zalloc): Remove.
4578         * target-descriptions.c (tdesc_data_init): Use obstack_new.
4579
4580 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4581
4582         * stack.c (backtrace_command_1): Remove useless variable int i.
4583
4584 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4585
4586         * stack.c (print_frame_info): Fix comment.
4587
4588 2018-05-18  Tom Tromey  <tom@tromey.com>
4589
4590         * dwarf2read.c (struct dwz_file): Add constructor, initializers.
4591         <dwz_bfd>: Now a gdb_bfd_ref_ptr.
4592         (~dwarf2_per_objfile): Update
4593         (dwarf2_get_dwz_file): Use new.
4594         * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
4595         unique_ptr.
4596
4597 2018-05-18  Tom Tromey  <tom@tromey.com>
4598
4599         * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
4600         unique_ptr.
4601         * dwarf2read.c (struct dwp_file): Add constructor and
4602         initializers.
4603         (open_and_init_dwp_file): Return a unique_ptr.
4604         (dwarf2_per_objfile, create_dwp_hash_table)
4605         (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
4606         (lookup_dwo_unit_in_dwp): Update.
4607         (open_and_init_dwp_file, get_dwp_file): Update.
4608
4609 2018-05-18  Tom Tromey  <tom@tromey.com>
4610
4611         * dwarf2read.c (dwarf2_per_objfile): Update.
4612         (struct mapped_index): Add initializers.
4613         (dwarf2_read_index): Use new.
4614         (dw2_symtab_iter_init): Update.
4615         * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
4616         unique_ptr.
4617
4618 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
4619
4620         * dwarf2read.c (mapped_index) <total_size>: Remove.
4621
4622 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
4623
4624         * unittests/format_pieces-selftests.c (test_format_specifier):
4625         Add ARI comments.
4626
4627 2018-05-18  Tom Tromey  <tom@tromey.com>
4628
4629         * c-typeprint.c (maybe_print_hole): New function.
4630         (c_print_type_struct_field_offset): Update.
4631         (c_type_print_base_struct_union): Call maybe_print_hole.
4632
4633 2018-05-17  Keith Seitz  <keiths@redhat.com>
4634
4635         * breakpoint.c (build_bpstat_chain): New function, moved from
4636         bpstat_stop_status.
4637         (bpstat_stop_status): Add optional parameter, `stop_chain'.
4638         If no stop chain is passed, call build_bpstat_chain to build it.
4639         * breakpoint.h (build_bpstat_chain): Declare.
4640         (bpstat_stop_status): Move documentation here from breakpoint.c.
4641         * infrun.c (handle_signal_stop): Before eliding inlined frames,
4642         build the stop chain and pass it to skip_inline_frames.
4643         Pass this stop chain to bpstat_stop_status.
4644         * inline-frame.c: Include breakpoint.h.
4645         (stopped_by_user_bp_inline_frame): New function.
4646         (skip_inline_frames): Add parameter `stop_chain'.
4647         Move documention to inline-frame.h.
4648         If non-NULL, use stopped_by_user_bp_inline_frame to determine
4649         whether the frame should be elided.
4650         * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
4651         Add moved documentation and update for new parameter.
4652
4653 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
4654
4655         PR cli/14975
4656         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4657         unittests/format_pieces-selftests.c.
4658         * common/format.h (format_piece) <operator==>: New.
4659         (format_pieces) <operator[]>: Remove.
4660         * common/format.c (format_pieces::format_pieces): Handle \e.
4661         * unittests/format_pieces-selftests.c: New.
4662
4663 2018-05-17  Tom Tromey  <tom@tromey.com>
4664
4665         PR symtab/23010:
4666         * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
4667         (dw2_instantiate_symtab): Add skip_partial parameter.
4668         (dw2_find_last_source_symtab, dw2_map_expand_apply)
4669         (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
4670         (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
4671         (dw2_expand_symtabs_matching_one)
4672         (dw2_find_pc_sect_compunit_symtab)
4673         (dw2_debug_names_lookup_symbol)
4674         (dw2_debug_names_expand_symtabs_for_function): Update.
4675         (init_cutu_and_read_dies): Add skip_partial parameter.
4676         (process_psymtab_comp_unit, build_type_psymtabs_1)
4677         (process_skeletonless_type_unit, load_partial_comp_unit)
4678         (psymtab_to_symtab_1): Update.
4679         (load_full_comp_unit): Add skip_partial parameter.
4680         (process_imported_unit_die, dwarf2_read_addr_index)
4681         (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
4682         (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
4683         (read_signatured_type): Update.
4684
4685 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
4686
4687         * value.c (release_value): Remove unused variable.
4688         (record_latest_value): Likewise.
4689         (access_value_history): Likewise.
4690         (preserve_values): Likewise.
4691
4692 2018-05-17  Tom Tromey  <tom@tromey.com>
4693
4694         * extension.h (struct ext_lang_type_printers) <py_type_printers>:
4695         Initialize.
4696
4697 2018-05-16  Maciej W. Rozycki  <macro@mips.com>
4698
4699         PR gdb/22286
4700         * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
4701         Also handle registers whose width is not a multiple of
4702         PTRACE_TYPE_RET.
4703         (linux_nat_trad_target::store_register): Likewise.
4704
4705 2018-05-16  Tom Tromey  <tom@tromey.com>
4706
4707         * gdbcore.h (core_bfd): Redefine.
4708         * corelow.c (core_target::close): Update.
4709         (core_target_open): Update.
4710         * progspace.h (struct program_space) <cbfd>: Now a
4711         gdb_bfd_ref_ptr.
4712
4713 2018-05-16  Tom Tromey  <tom@tromey.com>
4714
4715         PR cli/19551:
4716         * symfile-add-flags.h (enum symfile_add_flags)
4717         <SYMFILE_NOT_FILENAME>: New constant.
4718         * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME.  Get
4719         objfile name from BFD.
4720         (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
4721         * minidebug.c (find_separate_debug_file_in_section): Put
4722         ".gnu_debugdata" into BFD's file name.
4723
4724 2018-05-16  Simon Marchi  <simon.marchi@ericsson.com>
4725
4726         * regcache.c (regcache_read_ftype, regcache_write_ftype):
4727         Remove.
4728
4729 2018-05-15  Tamar Christina  <tamar.christina@arm.com>
4730
4731         PR binutils/21446
4732         * aarch64-tdep.c (aarch64_analyze_prologue,
4733         aarch64_software_single_step, aarch64_displaced_step_copy_insn):
4734         Indicate not interested in errors.
4735
4736 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
4737
4738         * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
4739         Supply the MIPS_ZERO_REGNUM register.
4740
4741 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
4742
4743         * mips-tdep.c (mask_address_var): Make variable static.
4744
4745 2018-05-14  Tom Tromey  <tom@tromey.com>
4746
4747         * dwarf2read.c (rust_union_quirks): Clear rust_unions.
4748
4749 2018-05-11  Andrew Burgess  <andrew.burgess@embecosm.com>
4750
4751         * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
4752         FXSAVE_ADDR for the mxcsr register.
4753
4754 2018-05-11  Max Filippov  <jcmvbkbc@gmail.com>
4755
4756         * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
4757
4758 2018-05-11  Pedro Alves  <palves@redhat.com>
4759
4760         * corelow.c (core_target) <core_target>: No longer inline.
4761         Initialize m_core_gdbarch, m_core_vec and build the section table
4762         here.
4763         <~core_target>: New.
4764         <core_gdbarch, get_core_register_section>: New methods.
4765         <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
4766         factored out from ...
4767         <core_data, core_vec, core_gdbarch>: ... these deleted globals.
4768         (core_ops): Delete.
4769         (sniff_core_bfd): Add gdbarch parameter.
4770         (core_close): Delete, merged into ...
4771         (core_target::close): ... here.  Delete self.
4772         (core_close_cleanup): Delete.
4773         (core_target_open): Allocate a core_target on the heap.  Use a
4774         unique_ptr instead of a cleanup.  Bits moved into the core_target
4775         ctor.  Adjust to use core_target methods instead of globals.
4776         (get_core_register_section): Rename to ...
4777         (core_target::get_core_register_section): ... this and adjust.
4778         (struct get_core_registers_cb_data): New.
4779         (get_core_registers_cb): Use it.  Use bool.
4780         (core_target::fetch_registers, core_target::files_info)
4781         (core_target::xfer_partial, core_target::read_description)
4782         (core_target::pid_to, core_target::thread_name): Adjust to
4783         reference class fields instead of globals.
4784         * target.h (struct target_ops_deleter, target_ops_up): New.
4785
4786 2018-05-11  Pedro Alves  <palves@redhat.com>
4787
4788         * corefile.c (core_file_command): Move to corelow.c.
4789         * corelow.c (the_core_target): Delete.
4790         (core_file_command): Moved from corefile.c.  Check exec_bfd
4791         instead of the_core_target.  Use target_detach instead of calling
4792         into the_core_target directly.
4793         (maybe_say_no_core_file_now): New.
4794         (core_target::detach): Use it.
4795         (_initialize_corelow): Remove references to the_core_target.
4796         * gdbcore.h (the_core_target): Delete.
4797
4798 2018-05-11  Tom Tromey  <tromey@redhat.com>
4799             Pedro Alves  <palves@redhat.com>
4800
4801         * corefile.c (core_bfd): Remove.
4802         * gdbcore.h (core_bfd): Now a macro.
4803         * progspace.h (struct program_space) <cbfd>: New field.
4804
4805 2018-05-11  Tom Tromey  <tom@tromey.com>
4806
4807         * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
4808         gdb::def_vector.
4809
4810 2018-05-10  Tom Tromey  <tom@tromey.com>
4811
4812         * configure: Rebuild.
4813         * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
4814
4815 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
4816
4817         PR server/23158:
4818         * regformats/regdat.sh: Adjust script, following the addition
4819         of the new expedite_regs parameter to init_target_desc.
4820
4821 2018-05-10  Omair Javaid  <omair.javaid@linaro.org>
4822     
4823         PR gdb/23127
4824         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
4825         set_gdbarch_significant_addr_bit.
4826         * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
4827         set_gdbarch_significant_addr_bit.
4828         * utils.c (address_significant): Update to sign extend addr.
4829
4830 2018-05-09  Max Filippov  <jcmvbkbc@gmail.com>
4831
4832         * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
4833         (xtensa_linux_init_abi): Limit tdep->num_regs by
4834         tdep->num_nopriv_regs.
4835         * xtensa-tdep.c (xtensa_derive_tdep): Calculate
4836         tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
4837         not initialized.
4838
4839 2018-05-08  Simon Marchi  <simon.marchi@ericsson.com>
4840
4841         * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
4842
4843 2018-05-08  Andrew Burgess  <andrew.burgess@embecosm.com>
4844
4845         * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
4846         (I387_MXCSR_INIT_VAL): New constant.
4847         * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
4848         buffer if it was supplied by the inferior.
4849         * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
4850         (i387_xsave_get_clear_bv): New function.
4851         (i387_supply_xsave): Only read x87 control registers from the
4852         xsave buffer if the feature is enabled, and the state will have
4853         been written, otherwise, provide a suitable default.
4854         (i387_collect_xsave): Pre-clear all registers in xsave buffer,
4855         including x87 control registers.  Update control registers if they
4856         have changed from the default value, and mark features as enabled
4857         as required.
4858         * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
4859
4860 2018-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
4861
4862         * spu-tdep.c (info_spu_event_command): Fix output formatting.
4863
4864 2018-05-07  Tom Tromey  <tom@tromey.com>
4865
4866         * configure: Rebuild.
4867         * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
4868
4869 2018-05-07  Tom Tromey  <tom@tromey.com>
4870
4871         PR tdep/20362:
4872         * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
4873         bit.  Use correct value for VDIV.
4874
4875 2018-05-04  Tom Tromey  <tom@tromey.com>
4876
4877         * configure: Rebuild.
4878         * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
4879
4880 2018-05-04  Tom Tromey  <tom@tromey.com>
4881
4882         * linux-record.c (record_linux_system_call) <case
4883         RECORD_SYS_RECVFROM>: Add "break".
4884
4885 2018-05-04  Tom Tromey  <tom@tromey.com>
4886
4887         * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
4888         Add missing "break".
4889         * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
4890         Add missing "break".
4891
4892 2018-05-04  Tom Tromey  <tom@tromey.com>
4893
4894         * rs6000-tdep.c (ppc_process_record_op4)
4895         (ppc_process_record_op63): Add fall-through comment.
4896
4897 2018-05-04  Tom Tromey  <tom@tromey.com>
4898
4899         * i386-tdep.c (i386_process_record): Add fall-through comment.
4900
4901 2018-05-04  Tom Tromey  <tom@tromey.com>
4902
4903         * stabsread.c (define_symbol) <case 'p'>: Add fall-through
4904         comment.
4905
4906 2018-05-04  Tom Tromey  <tom@tromey.com>
4907
4908         * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
4909         * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
4910         * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
4911         comment.
4912         * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
4913         comment.
4914         * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
4915         comment.
4916
4917 2018-05-04  Tom Tromey  <tom@tromey.com>
4918
4919         * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
4920
4921 2018-05-04  Tom Tromey  <tom@tromey.com>
4922
4923         * s390-tdep.c (s390_process_record): Fix fall-through comments.
4924         * xcoffread.c (scan_xcoff_symtab): Move comment later.
4925         * symfile.c (section_is_mapped): Fix fall-through comment.
4926         * stabsread.c (define_symbol, read_member_functions): Fix
4927         fall-through comment.
4928         * s390-linux-tdep.c (s390_process_record): Fix fall-through
4929         comment.
4930         * remote.c (remote_wait_as): Fix fall-through comment.
4931         * p-exp.y (yylex): Fix fall-through comment.
4932         * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
4933         comment.
4934         * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
4935         * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
4936         * jv-exp.y (yylex): Fix fall-through comment.
4937         * go-exp.y (lex_one_token): Fix fall-through comment.
4938         * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
4939         fall-through comment.
4940         * f-exp.y (yylex): Fix fall-through comment.
4941         * dwarf2read.c (process_die): Fix fall-through comments.
4942         * dbxread.c (process_one_symbol): Fix fall-through comment.
4943         * d-exp.y (lex_one_token): Fix fall-through comment.
4944         * cp-name-parser.y (yylex): Fix fall-through comment.
4945         * coffread.c (coff_symtab_read): Fix fall-through comment.
4946         * c-exp.y (lex_one_token): Fix fall-through comment.
4947         * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
4948         comment.
4949         * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
4950         comment.
4951
4952 2018-05-04  Tom Tromey  <tom@tromey.com>
4953
4954         PR python/22730:
4955         * NEWS: Mention gdb.execute change.
4956         * gdbcmd.h (execute_control_command): Don't declare.
4957         * python/python.c (execute_gdb_command): Use read_command_lines_1,
4958         execute_control_commands, execute_control_commands_to_string.
4959         * cli/cli-script.h (execute_control_commands)
4960         (execute_control_commands_to_string): Declare.
4961         (execute_control_command): Add from_tty parameter.
4962         * cli/cli-script.c (execute_control_commands)
4963         (execute_control_commands_to_string): New functions.
4964         (execute_user_command): Use execute_control_commands.
4965         (execute_control_command_1): Add "from_tty" parameter.  Update.
4966         (execute_control_command): Likewise.
4967
4968 2018-05-04  Tom Tromey  <tom@tromey.com>
4969
4970         PR python/22731:
4971         * NEWS: Mention that breakpoint commands are writable.
4972         * python/py-breakpoint.c (bppy_set_commands): New function.
4973         (breakpoint_object_getset) <"commands">: Use it.
4974
4975 2018-05-04  Tom Tromey  <tom@tromey.com>
4976
4977         * tracepoint.c (actions_command): Update.
4978         * mi/mi-cmd-break.c (mi_command_line_array)
4979         (mi_command_line_array_cnt, mi_command_line_array_ptr)
4980         (mi_read_next_line): Remove.
4981         (mi_cmd_break_commands): Update.
4982         * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
4983         function_view.
4984         * cli/cli-script.c (get_command_line): Update.
4985         (process_next_line): Use function_view.  Constify.
4986         (recurse_read_control_structure, read_command_lines)
4987         (read_command_lines_1): Change argument types to function_view.
4988         (do_define_command, document_command): Update.
4989         * breakpoint.h (check_tracepoint_command): Don't declare.
4990         * breakpoint.c (check_tracepoint_command): Remove.
4991         (commands_command_1, create_tracepoint_from_upload): Update.
4992
4993 2018-05-04  Tom Tromey  <tom@tromey.com>
4994
4995         PR gdb/11750:
4996         * cli/cli-script.h (enum command_control_type) <define_control>:
4997         New constant.
4998         * cli/cli-script.c (multi_line_command_p): Handle define_control.
4999         (build_command_line, execute_control_command_1)
5000         (process_next_line): Likewise.
5001         (do_define_command): New function, extracted from define_command.
5002         (define_command): Use it.
5003
5004 2018-05-04  Tom Tromey  <tom@tromey.com>
5005
5006         * tracepoint.c (actions_command): Update.
5007         * cli/cli-script.h (read_command_lines): Update.
5008         * cli/cli-script.c (read_command_lines): Constify prompt_arg.
5009         (MAX_TMPBUF): Remove define.
5010         (define_command): Use string_printf.
5011         (document_command): Likewise.
5012         * breakpoint.c (commands_command_1): Update.
5013
5014 2018-05-04  Tom Tromey  <tom@tromey.com>
5015
5016         * top.c (execute_command): Update.
5017         * cli/cli-script.h (print_command_lines): Now varargs.
5018         * cli/cli-script.c (print_command_lines): Now varargs.
5019         (execute_control_command_1) <case while_control, case if_control>:
5020         Update.
5021
5022 2018-05-04  Tom Tromey  <tom@tromey.com>
5023
5024         * tracepoint.c (all_tracepoint_actions): Rename from
5025         all_tracepoint_actions_and_cleanup.  Change return type.
5026         (actions_command, encode_actions_1, encode_actions)
5027         (trace_dump_actions, tdump_command): Update.
5028         * remote.c (remote_download_command_source): Update.
5029         * python/python.c (gdbpy_eval_from_control_command)
5030         (python_command, python_interactive_command): Update.
5031         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
5032         * guile/guile.c (guile_command)
5033         (gdbscm_eval_from_control_command, guile_command): Update.
5034         * compile/compile.c (compile_code_command)
5035         (compile_print_command, compile_to_object): Update.
5036         * cli/cli-script.h (struct command_lines_deleter): New.
5037         (counted_command_line): New typedef.
5038         (struct command_line): Add constructor, destructor.
5039         <body_list>: Remove.
5040         <body_list_0, body_list_1>: New members.
5041         (command_line_up): Remove typedef.
5042         (read_command_lines, read_command_lines_1, get_command_line):
5043         Update.
5044         (copy_command_lines): Don't declare.
5045         * cli/cli-script.c (build_command_line): Use "new".
5046         (get_command_line): Return counted_command_line.
5047         (print_command_lines, execute_user_command)
5048         (execute_control_command_1, while_command, if_command): Update.
5049         (realloc_body_list): Remove.
5050         (process_next_line, recurse_read_control_structure): Update.
5051         (read_command_lines, read_command_lines_1): Return counted_command_line.
5052         (free_command_lines): Use "delete".
5053         (copy_command_lines): Remove.
5054         (define_command, document_command, show_user_1): Update.
5055         * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
5056         a counted_command_line.
5057         * breakpoint.h (counted_command_line): Remove typedef.
5058         (breakpoint_set_commands): Update.
5059         * breakpoint.c (check_no_tracepoint_commands)
5060         (validate_commands_for_breakpoint): Update.
5061         (breakpoint_set_commands): Change commands to be a
5062         counted_command_line.
5063         (commands_command_1, update_dprintf_command_list)
5064         (create_tracepoint_from_upload): Update.
5065
5066 2018-05-04  Tom Tromey  <tom@tromey.com>
5067
5068         * cli/cli-decode.h (cmd_list_element): New constructor.
5069         (~cmd_list_element): New destructor.
5070         (struct cmd_list_element): Add initializers.
5071         * cli/cli-decode.c (do_add_cmd): Use "new".
5072         (delete_cmd): Use "delete".
5073
5074 2018-05-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
5075             Pedro Alves <palves@redhat.com>
5076
5077         PR breakpoints/19806 and support for PR external/20207.
5078         * NEWS: Mention Aarch64 watchpoint improvements.
5079         * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
5080         watchpoints and PR external/20207 watchpoints.
5081         * nat/aarch64-linux-hw-point.c
5082         (kernel_supports_any_contiguous_range): New.
5083         (aarch64_watchpoint_offset): New.
5084         (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
5085         (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
5086         (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
5087         (aarch64_align_watchpoint): New parameters aligned_offset_p and
5088         next_addr_orig_p.  Support PR external/20207 watchpoints.
5089         (aarch64_downgrade_regs): New.
5090         (aarch64_dr_state_insert_one_point): New parameters offset and
5091         addr_orig.
5092         (aarch64_dr_state_remove_one_point): Likewise.
5093         (aarch64_handle_breakpoint): Update caller.
5094         (aarch64_handle_aligned_watchpoint): Likewise.
5095         (aarch64_handle_unaligned_watchpoint): Support addr_orig and
5096         aligned_offset.
5097         (aarch64_linux_set_debug_regs): Remove const from state.  Call
5098         aarch64_downgrade_regs.
5099         (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
5100         * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
5101         (DR_CONTROL_MASK): ... this.
5102         (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
5103         (unsigned int aarch64_watchpoint_offset): New prototype.
5104         (aarch64_linux_set_debug_regs): Remove const from state.
5105         * utils.c (align_up, align_down): Move to ...
5106         * common/common-utils.c (align_up, align_down): ... here.
5107         * utils.h (align_up, align_down): Move to ...
5108         * common/common-utils.h (align_up, align_down): ... here.
5109
5110 2018-05-04  Joel Brobecker  <brobecker@adacore.com>
5111
5112         * sparc-tdep.c (sparc_structure_return_p): Re-implement to
5113         match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
5114         (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
5115         Re-implement to match the ABI as summarized in GCC's
5116         gcc/config/sparc/sparc.c.  All callers updated.
5117         (sparc32_store_arguments): Remove assertion.
5118
5119 2018-05-04  Tom Tromey  <tom@tromey.com>
5120
5121         * printcmd.c: Don't include tui.h.
5122         (decode_format): Use skip_spaces.
5123
5124 2018-05-04  Tom Tromey  <tom@tromey.com>
5125
5126         PR gdb/22619:
5127         * printcmd.c (last_count): New global.
5128         (x_command): Use saved count when repeating.
5129
5130 2018-05-04  Tom Tromey  <tom@tromey.com>
5131
5132         * nto-procfs.c (do_closedir_cleanup): Remove.
5133         (procfs_pidlist): Use gdb_dir_up.
5134         * procfs.c (do_closedir_cleanup): Remove.
5135         (proc_update_threads): Use gdb_dir_up.
5136         * common/filestuff.h (struct gdb_dir_deleter): New.
5137         (gdb_dir_up): New typedef.
5138
5139 2018-05-04  Tom Tromey  <tom@tromey.com>
5140
5141         * ada-lang.c (print_mention_exception): Use std::string.
5142
5143 2018-05-04  Tom Tromey  <tom@tromey.com>
5144
5145         * ada-lang.c (create_excep_cond_exprs): Update.
5146         (ada_exception_catchpoint_cond_string): Use std::string.
5147
5148 2018-05-04  Tom Tromey  <tom@tromey.com>
5149
5150         * ada-lang.c (xget_renaming_scope): Return std::string.
5151         (old_renaming_is_invisible): Update.
5152
5153 2018-05-04  Tom Tromey  <tom@tromey.com>
5154
5155         * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
5156         (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
5157
5158 2018-05-04  Ulrich Weigand  <uweigand@de.ibm.com>
5159
5160         * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
5161
5162 2018-05-04  Tom Tromey  <tom@tromey.com>
5163
5164         * remote.c (remote_query_supported_append): Change type.
5165         (remote_check_symbols): Update.
5166
5167 2018-05-04  Paul Pluzhnikov  <ppluzhnikov@google.com>
5168
5169         PR gdb/11420
5170         * configure.ac: Prepend libpython.
5171         * python/python-config.py: Likewise.
5172         * configure: Regenerate.
5173
5174 2018-05-03  Simon Marchi  <simon.marchi@ericsson.com>
5175
5176         * Makefile.in (%.c: %.l): Use -t instead of --stdout.
5177
5178 2018-05-03  Pedro Alves  <palves@redhat.com>
5179
5180         * s390-linux-nat.c
5181         (s390_linux_nat_target::have_continuable_watchpoint): Mark with
5182         override.  Write 'true' instead of '1'.
5183         (s390_linux_nat_target::watchpoint_addr_within_range): Remove
5184         declaration.
5185
5186 2018-05-02  Pedro Alves  <palves@redhat.com>
5187
5188         * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
5189         add_inf_child_target.
5190         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
5191         add_inf_child_target.
5192         * aix-thread.c (aix_thread_target_info): New.
5193         (aix_thread_target) <shortname, longname, doc>: Delete.
5194         <info>: New.
5195         * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
5196         add_inf_child_target.
5197         * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
5198         add_inf_child_target.
5199         * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
5200         add_inf_child_target.
5201         * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
5202         add_inf_child_target.
5203         * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
5204         add_inf_child_target.
5205         * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
5206         add_inf_child_target.
5207         * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
5208         add_inf_child_target.
5209         * arm-linux-nat.c (_initialize_arm_linux_nat): Use
5210         add_inf_child_target.
5211         * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
5212         add_inf_child_target.
5213         * bfd-target.c (target_bfd_target_info): New.
5214         (target_bfd) <shortname, longname, doc>: Delete.
5215         <info>: New.
5216         * bsd-kvm.c (bsd_kvm_target_info): New.
5217         (bsd_kvm_target) <shortname, longname, doc>: Delete.
5218         <info>: New.
5219         (bsd_kvm_target::open): Rename to ...
5220         (bsd_kvm_target_open): ... this.  Adjust.
5221         * bsd-uthread.c (bsd_uthread_target_info): New.
5222         (bsd_uthread_target) <shortname, longname, doc>: Delete.
5223         <info>: New.
5224         * corefile.c (core_file_command): Adjust.
5225         * corelow.c (core_target_info): New.
5226         (core_target) <shortname, longname, doc>: Delete.
5227         <info>: New.
5228         (core_target::open): Rename to ...
5229         (core_target_open): ... this.  Adjust.
5230         * ctf.c (ctf_target_info): New.
5231         (ctf_target) <shortname, longname, doc>: Delete.
5232         <info>: New.
5233         (ctf_target::open): Rename to ...
5234         (ctf_target_open): ... this.
5235         (_initialize_ctf): Adjust.
5236         * exec.c (exec_target_info): New.
5237         (exec_target) <shortname, longname, doc>: Delete.
5238         <info>: New.
5239         (exec_target::open): Rename to ...
5240         (exec_target_open): ... this.
5241         * gdbcore.h (core_target_open): Declare.
5242         * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
5243         * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
5244         add_inf_child_target.
5245         * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
5246         add_inf_child_target.
5247         * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
5248         add_inf_child_target.
5249         * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
5250         add_inf_child_target.
5251         * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
5252         add_inf_child_target.
5253         * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
5254         add_inf_child_target.
5255         * i386-linux-nat.c (_initialize_i386_linux_nat): Use
5256         add_inf_child_target.
5257         * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
5258         add_inf_child_target.
5259         * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
5260         add_inf_child_target.
5261         * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
5262         add_inf_child_target.
5263         * inf-child.c (inf_child_target_info): New.
5264         (inf_child_target::info): New.
5265         (inf_child_open_target): Remove 'target' parameter.  Use
5266         get_native_target instead.
5267         (inf_child_target::open): Delete.
5268         (add_inf_child_target): New.
5269         * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
5270         Delete.
5271         <info>: New.
5272         (add_inf_child_target): Declare.
5273         (inf_child_open_target): Declare.
5274         * linux-thread-db.c (thread_db_target_info): New.
5275         (thread_db_target) <shortname, longname, doc>: Delete.
5276         <info>: New.
5277         * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
5278         add_inf_child_target.
5279         * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
5280         add_inf_child_target.
5281         * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
5282         add_inf_child_target.
5283         * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
5284         add_inf_child_target.
5285         * make-target-delegates (print_class): Adjust.
5286         * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
5287         add_inf_child_target.
5288         * mips-linux-nat.c (_initialize_mips_linux_nat): Use
5289         add_inf_child_target.
5290         * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
5291         add_inf_child_target.
5292         * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
5293         add_inf_child_target.
5294         * nto-procfs.c (nto_native_target_info): New.
5295         (nto_procfs_target_native) <shortname, longname, doc>:
5296         Delete.
5297         <info>: New.
5298         (nto_procfs_target_info): New.
5299         (nto_procfs_target_procfs) <shortname, longname, doc>:
5300         Delete.
5301         <info>: New.
5302         (init_procfs_targets): Adjust.
5303         * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
5304         add_inf_child_target.
5305         * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
5306         add_inf_child_target.
5307         * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
5308         add_inf_child_target.
5309         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
5310         add_inf_child_target.
5311         * ravenscar-thread.c (ravenscar_target_info): New.
5312         (ravenscar_thread_target) <shortname, longname, doc>:
5313         Delete.
5314         <info>: New.
5315         * record-btrace.c (record_btrace_target_info):
5316         (record_btrace_target) <shortname, longname, doc>: Delete.
5317         <info>: New.
5318         (record_btrace_target::open): Rename to ...
5319         (record_btrace_target_open): ... this.  Adjust.
5320         * record-full.c (record_longname, record_doc): New.
5321         (record_full_base_target) <shortname, longname, doc>: Delete.
5322         <info>: New.
5323         (record_full_target_info): New.
5324         (record_full_target): <shortname>: Delete.
5325         <info>: New.
5326         (record_full_core_open_1, record_full_open_1): Update comments.
5327         (record_full_base_target::open): Rename to ...
5328         (record_full_open): ... this.
5329         (cmd_record_full_restore): Update.
5330         (_initialize_record_full): Update.
5331         * remote-sim.c (remote_sim_target_info): New.
5332         (gdbsim_target) <shortname, longname, doc>: Delete.
5333         <info>: New.
5334         (gdbsim_target::open): Rename to ...
5335         (gdbsim_target_open): ... this.
5336         (_initialize_remote_sim): Adjust.
5337         * remote.c (remote_doc): New.
5338         (remote_target_info): New.
5339         (remote_target) <shortname, longname, doc>: Delete.
5340         <info>: New.
5341         (extended_remote_target_info): New.
5342         (extended_remote_target) <shortname, longname, doc>: Delete.
5343         <info>: New.
5344         (remote_target::open_1): Make static.  Adjust.
5345         * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
5346         * s390-linux-nat.c (_initialize_s390_nat): Use
5347         add_inf_child_target.
5348         * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
5349         add_inf_child_target.
5350         * sol-thread.c (thread_db_target_info): New.
5351         (sol_thread_target) <shortname, longname, doc>: Delete.
5352         <info>: New.
5353         * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
5354         add_inf_child_target.
5355         * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
5356         add_inf_child_target.
5357         * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
5358         add_inf_child_target.
5359         * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
5360         add_inf_child_target.
5361         * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
5362         add_inf_child_target.
5363         * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
5364         add_inf_child_target.
5365         * spu-linux-nat.c (_initialize_spu_nat): Use
5366         add_inf_child_target.
5367         * spu-multiarch.c (spu_multiarch_target_info): New.
5368         (spu_multiarch_target) <shortname, longname, doc>: Delete.
5369         <info>: New.
5370         * target-delegates.c: Regenerate.
5371         * target.c: Include <unordered_map>.
5372         (target_ops_p): Delete.
5373         (DEF_VEC_P(target_ops_p)): Delete.
5374         (target_factories): New.
5375         (test_target_info): New.
5376         (test_target_ops::info): New.
5377         (open_target): Adjust to use target_factories.
5378         (add_target_with_completer): Rename to ...
5379         (add_target): ... this.  Change prototype.  Register target_info
5380         and open callback in target_factories.  Register target_info in
5381         command context instead of target_ops.
5382         (add_target): Delete old implementation.
5383         (add_deprecated_target_alias): Change prototype.  Adjust.
5384         (the_native_target): New.
5385         (set_native_target, get_native_target): New.
5386         (find_default_run_target): Use the_native_target.
5387         (find_attach_target, find_run_target): Simplify.
5388         (target_ops::open): Delete.
5389         (dummy_target_info): New.
5390         (dummy_target::shortname, dummy_target::longname)
5391         (dummy_target::doc): Delete.
5392         (dummy_target::info): New.
5393         (debug_target::shortname, debug_target::longname)
5394         (debug_target::doc): Delete.
5395         (debug_target::info): New.
5396         * target.h (struct target_info): New.
5397         (target_ops::~target_ops): Add comment.
5398         (target_ops::info): New.
5399         (target_ops::shortname, target_ops::longname, target_ops::doc): No
5400         longer virtual.  Implement in terms of target_info.
5401         (set_native_target, get_native_target): Declare.
5402         (target_open_ftype): New.
5403         (add_target, add_target_with_completer)
5404         (add_deprecated_target_alias): Change prototype.
5405         (test_target) <shortname, longname, doc>: Delete.
5406         <info>: New.
5407         * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
5408         add_inf_child_target.
5409         * tracefile-tfile.c (tfile_target_info): New.
5410         (tfile_target) <shortname, longname, doc>: Delete.
5411         <info>: New.
5412         (tfile_target::open): Rename to ...
5413         (tfile_target_open): ... this.
5414         (_initialize_tracefile_tfile): Adjust.
5415         * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
5416         add_inf_child_target.
5417         * windows-nat.c (_initialize_windows_nat): Use
5418         add_inf_child_target.
5419         * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
5420         add_inf_child_target.
5421
5422 2018-05-02  Pedro Alves  <palves@redhat.com>
5423
5424         * linux-nat.h (linux_nat_target) <low_new_thread,
5425         low_delete_thread, low_new_fork, low_forget_process,
5426         low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
5427         New virtual methods.
5428         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
5429         (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
5430         (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
5431         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
5432         (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
5433         Delete.
5434         * linux-fork.c (delete_fork): Adjust to call low method.
5435         * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
5436         (linux_nat_new_fork, linux_nat_forget_process_hook)
5437         (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
5438         (linux_nat_status_is_event):
5439         (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
5440         (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
5441         to call low method.
5442         (sigtrap_is_event): Rename to ...
5443         (linux_nat_target::low_status_is_event): ... this.
5444         (linux_nat_set_status_is_event): Delete.
5445         (save_stop_reason, linux_nat_wait_1)
5446         (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
5447         low methods.
5448         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
5449         (linux_nat_set_new_fork, linux_nat_set_forget_process)
5450         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
5451         (linux_nat_set_prepare_to_resume): Delete.
5452         * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
5453         low virtual methods.
5454         * amd64-linux-nat.c: Likewise.
5455         * arm-linux-nat.c: Likewise.
5456         * i386-linux-nat.c: Likewise.
5457         * ia64-linux-nat.c: Likewise.
5458         * mips-linux-nat.c: Likewise.
5459         * ppc-linux-nat.c: Likewise.
5460         * s390-linux-nat.c: Likewise.
5461         * sparc64-linux-nat.c: Likewise.
5462         * x86-linux-nat.c: Likewise.
5463         * x86-linux-nat.h: Include "nat/x86-linux.h".
5464         (x86_linux_nat_target) <low_new_fork, low_forget_process,
5465         low_prepare_to_resume, low_new_thread, low_delete_thread>:
5466         Override methods.
5467
5468 2018-05-02  Pedro Alves  <palves@redhat.com>
5469
5470         * target.h (target_ops)
5471         <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
5472         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
5473         stopped_by_watchpoint, have_continuable_watchpoint,
5474         stopped_data_address, watchpoint_addr_within_range,
5475         can_accel_watchpoint_condition, can_run, thread_alive,
5476         has_all_memory, has_memory, has_stack, has_registers,
5477         has_execution, can_async_p, is_async_p, supports_non_stop,
5478         always_non_stop_p, can_execute_reverse, supports_multi_process,
5479         supports_enable_disable_tracepoint,
5480         supports_disable_randomization, supports_string_tracing,
5481         supports_evaluation_of_breakpoint_conditions,
5482         can_run_breakpoint_commands, filesystem_is_local,
5483         can_download_tracepoint, get_trace_state_variable_value,
5484         set_trace_notes, get_tib_address, use_agent, can_use_agent,
5485         record_is_replaying, record_will_replay,
5486         augmented_libraries_svr4_read>: Adjust to return bool.
5487         * aarch64-linux-nat.c: All implementations adjusted.
5488         * aix-thread.c: All implementations adjusted.
5489         * arm-linux-nat.c: All implementations adjusted.
5490         * breakpoint.c: All implementations adjusted.
5491         * bsd-kvm.c: All implementations adjusted.
5492         * bsd-uthread.c: All implementations adjusted.
5493         * corelow.c: All implementations adjusted.
5494         * ctf.c: All implementations adjusted.
5495         * darwin-nat.c: All implementations adjusted.
5496         * darwin-nat.h: All implementations adjusted.
5497         * exec.c: All implementations adjusted.
5498         * fbsd-nat.c: All implementations adjusted.
5499         * fbsd-nat.h: All implementations adjusted.
5500         * gnu-nat.c: All implementations adjusted.
5501         * gnu-nat.h: All implementations adjusted.
5502         * go32-nat.c: All implementations adjusted.
5503         * ia64-linux-nat.c: All implementations adjusted.
5504         * inf-child.c: All implementations adjusted.
5505         * inf-child.h: All implementations adjusted.
5506         * inf-ptrace.c: All implementations adjusted.
5507         * inf-ptrace.h: All implementations adjusted.
5508         * linux-nat.c: All implementations adjusted.
5509         * linux-nat.h: All implementations adjusted.
5510         * mips-linux-nat.c: All implementations adjusted.
5511         * nto-procfs.c: All implementations adjusted.
5512         * ppc-linux-nat.c: All implementations adjusted.
5513         * procfs.c: All implementations adjusted.
5514         * ravenscar-thread.c: All implementations adjusted.
5515         * record-btrace.c: All implementations adjusted.
5516         * record-full.c: All implementations adjusted.
5517         * remote-sim.c: All implementations adjusted.
5518         * remote.c: All implementations adjusted.
5519         * s390-linux-nat.c: All implementations adjusted.
5520         * sol-thread.c: All implementations adjusted.
5521         * spu-multiarch.c: All implementations adjusted.
5522         * target-delegates.c: All implementations adjusted.
5523         * target.c: All implementations adjusted.
5524         * target.h: All implementations adjusted.
5525         * tracefile-tfile.c: All implementations adjusted.
5526         * tracefile.c: All implementations adjusted.
5527         * tracefile.h: All implementations adjusted.
5528         * windows-nat.c: All implementations adjusted.
5529         * x86-linux-nat.h: All implementations adjusted.
5530         * x86-nat.h: All implementations adjusted.
5531
5532 2018-05-02  Pedro Alves  <palves@redhat.com>
5533
5534         * make-target-delegates (scan_target_h): Don't trim lines here.
5535         Replace sequences of tabs and/or whitespace with a single
5536         whitespace.
5537         (top level, parsing methods): Trim each line before processing it
5538         here.
5539
5540 2018-05-02  Pedro Alves  <palves@redhat.com>
5541             John Baldwin  <jhb@freebsd.org>
5542
5543         * target.h (enum strata) <debug_stratum>: New.
5544         (struct target_ops) <all delegation methods>: Replace by C++
5545         virtual methods, and drop "to_" prefix.  All references updated
5546         throughout.
5547         <to_shortname, to_longname, to_doc, to_data,
5548         to_have_steppable_watchpoint, to_have_continuable_watchpoint,
5549         to_has_thread_control, to_attach_no_wait>: Delete, replaced by
5550         virtual methods.  All references updated throughout.
5551         <can_attach, supports_terminal_ours, can_create_inferior,
5552         get_thread_control_capabilities, attach_no_wait>: New
5553         virtual methods.
5554         <insert_breakpoint, remove_breakpoint>: Now
5555         TARGET_DEFAULT_NORETURN methods.
5556         <info_proc>: Now returns bool.
5557         <to_magic>: Delete.
5558         (OPS_MAGIC): Delete.
5559         (current_target): Delete.  All references replaced by references
5560         to ...
5561         (target_stack): ... this.  New.
5562         (target_shortname, target_longname): Adjust.
5563         (target_can_run): Now a function declaration.
5564         (default_child_has_all_memory, default_child_has_memory)
5565         (default_child_has_stack, default_child_has_registers)
5566         (default_child_has_execution): Remove target_ops parameter.
5567         (complete_target_initialization): Delete.
5568         (memory_breakpoint_target): New template class.
5569         (test_target_ops): Refactor as a C++ class with virtual methods.
5570         * make-target-delegates (NAME_PART): Tighten.
5571         (POINTER_PART, CP_SYMBOL): New.
5572         (SIMPLE_RETURN_PART): Reimplement.
5573         (VEC_RETURN_PART): Expect less.
5574         (RETURN_PART, VIRTUAL_PART): New.
5575         (METHOD): Adjust to C++ virtual methods.
5576         (scan_target_h): Remove reference to C99.
5577         (dname): Output "target_ops::" prefix.
5578         (write_function_header): Adjust to output a C++ class method.
5579         (write_declaration): New.
5580         (write_delegator): Adjust to output a C++ class method.
5581         (tdname): Output "dummy_target::" prefix.
5582         (write_tdefault, write_debugmethod): Adjust to output a C++ class
5583         method.
5584         (tdefault_names, debug_names): Delete.
5585         (return_types, tdefaults, styles, argtypes_array): New.
5586         (top level): All methods are delegators.
5587         (print_class): New.
5588         (top level): Print dummy_target and debug_target classes.
5589         * target-delegates.c: Regenerate.
5590         * target-debug.h (target_debug_print_enum_info_proc_what)
5591         (target_debug_print_thread_control_capabilities)
5592         (target_debug_print_thread_info_p): New.
5593         * target.c (dummy_target): Delete.
5594         (the_dummy_target, the_debug_target): New.
5595         (target_stack): Now extern.
5596         (set_targetdebug): Push/unpush debug target.
5597         (default_child_has_all_memory, default_child_has_memory)
5598         (default_child_has_stack, default_child_has_registers)
5599         (default_child_has_execution): Remove target_ops parameter.
5600         (complete_target_initialization): Delete.
5601         (add_target_with_completer): No longer call
5602         complete_target_initialization.
5603         (target_supports_terminal_ours): Use regular delegation.
5604         (update_current_target): Delete.
5605         (push_target): No longer check magic number.  Don't call
5606         update_current_target.
5607         (unpush_target): Don't call update_current_target.
5608         (target_is_pushed): No longer check magic number.
5609         (target_require_runnable): Skip for all stratums over
5610         process_stratum.
5611         (target_ops::info_proc): New.
5612         (target_info_proc): Use find_target_at and
5613         find_default_run_target.
5614         (target_supports_disable_randomization): Use regular delegation.
5615         (target_get_osdata): Use find_target_at.
5616         (target_ops::open, target_ops::close, target_ops::can_attach)
5617         (target_ops::attach, target_ops::can_create_inferior)
5618         (target_ops::create_inferior, target_ops::can_run)
5619         (target_can_run): New.
5620         (default_fileio_target): Use regular delegation.
5621         (target_ops::fileio_open, target_ops::fileio_pwrite)
5622         (target_ops::fileio_pread, target_ops::fileio_fstat)
5623         (target_ops::fileio_close, target_ops::fileio_unlink)
5624         (target_ops::fileio_readlink): New.
5625         (target_fileio_open_1, target_fileio_unlink)
5626         (target_fileio_readlink): Always call the target method.  Handle
5627         FILEIO_ENOSYS.
5628         (return_zero, return_zero_has_execution): Delete.
5629         (init_dummy_target): Delete.
5630         (dummy_target::dummy_target, dummy_target::shortname)
5631         (dummy_target::longname, dummy_target::doc)
5632         (debug_target::debug_target, debug_target::shortname)
5633         (debug_target::longname, debug_target::doc): New.
5634         (target_supports_delete_record): Use regular delegation.
5635         (setup_target_debug): Delete.
5636         (maintenance_print_target_stack): Skip debug_stratum.
5637         (initialize_targets): Instantiate the_dummy_target and
5638         the_debug_target.
5639         * auxv.c (target_auxv_parse): Remove 'ops' parameter.  Adjust to
5640         use target_stack.
5641         (target_auxv_search, fprint_target_auxv): Adjust.
5642         (info_auxv_command): Adjust to use target_stack.
5643         * auxv.h (target_auxv_parse): Remove 'ops' parameter.
5644         * exceptions.c (print_flush): Handle a NULL target_stack.
5645         * regcache.c (target_ops_no_register): Refactor as class with
5646         virtual methods.
5647
5648         * exec.c (exec_target): New class.
5649         (exec_ops): Now an exec_target.
5650         (exec_open, exec_close_1, exec_get_section_table)
5651         (exec_xfer_partial, exec_files_info, exec_has_memory)
5652         (exec_make_note_section): Refactor as exec_target methods.
5653         (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
5654         Delete.
5655         (exec_target::find_memory_regions): New.
5656         (_initialize_exec): Don't call init_exec_ops.
5657         * gdbcore.h (exec_file_clear): Delete.
5658
5659         * corefile.c (core_target): Delete.
5660         (core_file_command): Adjust.
5661         * corelow.c (core_target): New class.
5662         (the_core_target): New.
5663         (core_close): Remove target_ops parameter.
5664         (core_close_cleanup): Adjust.
5665         (core_target::close): New.
5666         (core_open, core_detach, get_core_registers, core_files_info)
5667         (core_xfer_partial, core_thread_alive, core_read_description)
5668         (core_pid_to_str, core_thread_name, core_has_memory)
5669         (core_has_stack, core_has_registers, core_info_proc): Rework as
5670         core_target methods.
5671         (ignore, core_remove_breakpoint, init_core_ops): Delete.
5672         (_initialize_corelow): Initialize the_core_target.
5673         * gdbcore.h (core_target): Delete.
5674         (the_core_target): New.
5675
5676         * ctf.c: (ctf_target): New class.
5677         (ctf_ops): Now a ctf_target.
5678         (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
5679         (ctf_xfer_partial, ctf_get_trace_state_variable_value)
5680         (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
5681         methods.
5682         (init_ctf_ops): Delete.
5683         (_initialize_ctf): Don't call it.
5684         * tracefile-tfile.c (tfile_target): New class.
5685         (tfile_ops): Now a tfile_target.
5686         (tfile_open, tfile_close, tfile_files_info)
5687         (tfile_get_tracepoint_status, tfile_trace_find)
5688         (tfile_fetch_registers, tfile_xfer_partial)
5689         (tfile_get_trace_state_variable_value, tfile_traceframe_info):
5690         Refactor as tfile_target methods.
5691         (tfile_xfer_partial_features): Remove target_ops parameter.
5692         (init_tfile_ops): Delete.
5693         (_initialize_tracefile_tfile): Don't call it.
5694         * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
5695         (tracefile_has_stack, tracefile_has_registers)
5696         (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
5697         tracefile_target methods.
5698         (init_tracefile_ops): Delete.
5699         (tracefile_target::tracefile_target): New.
5700         * tracefile.h: Include "target.h".
5701         (tracefile_target): New class.
5702         (init_tracefile_ops): Delete.
5703
5704         * spu-multiarch.c (spu_multiarch_target): New class.
5705         (spu_ops): Now a spu_multiarch_target.
5706         (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
5707         (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
5708         (spu_search_memory, spu_mourn_inferior): Refactor as
5709         spu_multiarch_target methods.
5710         (init_spu_ops): Delete.
5711         (_initialize_spu_multiarch): Remove references to init_spu_ops,
5712         complete_target_initialization.
5713
5714         * ravenscar-thread.c (ravenscar_thread_target): New class.
5715         (ravenscar_ops): Now a ravenscar_thread_target.
5716         (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
5717         (ravenscar_thread_alive, ravenscar_pid_to_str)
5718         (ravenscar_fetch_registers, ravenscar_store_registers)
5719         (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
5720         (ravenscar_stopped_by_hw_breakpoint)
5721         (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
5722         (ravenscar_mourn_inferior, ravenscar_core_of_thread)
5723         (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
5724         methods.
5725         (init_ravenscar_thread_ops): Delete.
5726         (_initialize_ravenscar): Remove references to
5727         init_ravenscar_thread_ops and complete_target_initialization.
5728
5729         * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
5730         (bsd_uthread_target): New class.
5731         (bsd_uthread_ops): Now a bsd_uthread_target.
5732         (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
5733         (bsd_uthread_close, bsd_uthread_mourn_inferior)
5734         (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
5735         (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
5736         (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
5737         (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
5738         (bsd_uthread_target): Delete function.
5739         (_initialize_bsd_uthread): Remove reference to
5740         complete_target_initialization.
5741
5742         * bfd-target.c (target_bfd_data): Delete.  Fields folded into ...
5743         (target_bfd): ... this new class.
5744         (target_bfd_xfer_partial, target_bfd_get_section_table)
5745         (target_bfd_close): Refactor as target_bfd methods.
5746         (target_bfd::~target_bfd): New.
5747         (target_bfd_reopen): Adjust.
5748         (target_bfd::close): New.
5749
5750         * record-btrace.c (record_btrace_target): New class.
5751         (record_btrace_ops): Now a record_btrace_target.
5752         (record_btrace_open, record_btrace_stop_recording)
5753         (record_btrace_disconnect, record_btrace_close)
5754         (record_btrace_async, record_btrace_info)
5755         (record_btrace_insn_history, record_btrace_insn_history_range)
5756         (record_btrace_insn_history_from, record_btrace_call_history)
5757         (record_btrace_call_history_range)
5758         (record_btrace_call_history_from, record_btrace_record_method)
5759         (record_btrace_is_replaying, record_btrace_will_replay)
5760         (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
5761         (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
5762         (record_btrace_store_registers, record_btrace_prepare_to_store)
5763         (record_btrace_to_get_unwinder)
5764         (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
5765         (record_btrace_commit_resume, record_btrace_wait)
5766         (record_btrace_stop, record_btrace_can_execute_reverse)
5767         (record_btrace_stopped_by_sw_breakpoint)
5768         (record_btrace_supports_stopped_by_sw_breakpoint)
5769         (record_btrace_stopped_by_hw_breakpoint)
5770         (record_btrace_supports_stopped_by_hw_breakpoint)
5771         (record_btrace_update_thread_list, record_btrace_thread_alive)
5772         (record_btrace_goto_begin, record_btrace_goto_end)
5773         (record_btrace_goto, record_btrace_stop_replaying_all)
5774         (record_btrace_execution_direction)
5775         (record_btrace_prepare_to_generate_core)
5776         (record_btrace_done_generating_core): Refactor as
5777         record_btrace_target methods.
5778         (init_record_btrace_ops): Delete.
5779         (_initialize_record_btrace): Remove reference to
5780         init_record_btrace_ops.
5781         * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
5782         the execution_direction global.
5783         (record_full_base_target, record_full_target)
5784         (record_full_core_target): New classes.
5785         (record_full_ops): Now a record_full_target.
5786         (record_full_core_ops): Now a record_full_core_target.
5787         (record_full_target::detach, record_full_target::disconnect)
5788         (record_full_core_target::disconnect)
5789         (record_full_target::mourn_inferior, record_full_target::kill):
5790         New.
5791         (record_full_open, record_full_close, record_full_async): Refactor
5792         as methods of the record_full_base_target class.
5793         (record_full_resume, record_full_commit_resume): Refactor
5794         as methods of the record_full_target class.
5795         (record_full_wait, record_full_stopped_by_watchpoint)
5796         (record_full_stopped_data_address)
5797         (record_full_stopped_by_sw_breakpoint)
5798         (record_full_supports_stopped_by_sw_breakpoint)
5799         (record_full_stopped_by_hw_breakpoint)
5800         (record_full_supports_stopped_by_hw_breakpoint): Refactor as
5801         methods of the record_full_base_target class.
5802         (record_full_store_registers, record_full_xfer_partial)
5803         (record_full_insert_breakpoint, record_full_remove_breakpoint):
5804         Refactor as methods of the record_full_target class.
5805         (record_full_can_execute_reverse, record_full_get_bookmark)
5806         (record_full_goto_bookmark, record_full_execution_direction)
5807         (record_full_record_method, record_full_info, record_full_delete)
5808         (record_full_is_replaying, record_full_will_replay)
5809         (record_full_goto_begin, record_full_goto_end, record_full_goto)
5810         (record_full_stop_replaying): Refactor as methods of the
5811         record_full_base_target class.
5812         (record_full_core_resume, record_full_core_kill)
5813         (record_full_core_fetch_registers)
5814         (record_full_core_prepare_to_store)
5815         (record_full_core_store_registers, record_full_core_xfer_partial)
5816         (record_full_core_insert_breakpoint)
5817         (record_full_core_remove_breakpoint)
5818         (record_full_core_has_execution): Refactor
5819         as methods of the record_full_core_target class.
5820         (record_full_base_target::supports_delete_record): New.
5821         (init_record_full_ops): Delete.
5822         (init_record_full_core_ops): Delete.
5823         (record_full_save): Refactor as method of the
5824         record_full_base_target class.
5825         (_initialize_record_full): Remove references to
5826         init_record_full_ops and init_record_full_core_ops.
5827
5828         * remote.c (remote_target, extended_remote_target): New classes.
5829         (remote_ops): Now a remote_target.
5830         (extended_remote_ops): Now an extended_remote_target.
5831         (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
5832         (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
5833         (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
5834         (remote_pass_signals, remote_set_syscall_catchpoint)
5835         (remote_program_signals, )
5836         (remote_thread_always_alive): Remove target_ops parameter.
5837         (remote_thread_alive, remote_thread_name)
5838         (remote_update_thread_list, remote_threads_extra_info)
5839         (remote_static_tracepoint_marker_at)
5840         (remote_static_tracepoint_markers_by_strid)
5841         (remote_get_ada_task_ptid, remote_close, remote_start_remote)
5842         (remote_open): Refactor as methods of remote_target.
5843         (extended_remote_open, extended_remote_detach)
5844         (extended_remote_attach, extended_remote_post_attach):
5845         (extended_remote_supports_disable_randomization)
5846         (extended_remote_create_inferior): : Refactor as method of
5847         extended_remote_target.
5848         (remote_set_permissions, remote_open_1, remote_detach)
5849         (remote_follow_fork, remote_follow_exec, remote_disconnect)
5850         (remote_resume, remote_commit_resume, remote_stop)
5851         (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
5852         (remote_terminal_ours, remote_wait, remote_fetch_registers)
5853         (remote_prepare_to_store, remote_store_registers)
5854         (remote_flash_erase, remote_flash_done, remote_files_info)
5855         (remote_kill, remote_mourn, remote_insert_breakpoint)
5856         (remote_remove_breakpoint, remote_insert_watchpoint)
5857         (remote_watchpoint_addr_within_range)
5858         (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
5859         (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
5860         (remote_supports_stopped_by_sw_breakpoint)
5861         (remote_stopped_by_hw_breakpoint)
5862         (remote_supports_stopped_by_hw_breakpoint)
5863         (remote_stopped_by_watchpoint, remote_stopped_data_address)
5864         (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
5865         (remote_verify_memory): Refactor as methods of remote_target.
5866         (remote_write_qxfer, remote_read_qxfer): Remove target_ops
5867         parameter.
5868         (remote_xfer_partial, remote_get_memory_xfer_limit)
5869         (remote_search_memory, remote_rcmd, remote_memory_map)
5870         (remote_pid_to_str, remote_get_thread_local_address)
5871         (remote_get_tib_address, remote_read_description): Refactor as
5872         methods of remote_target.
5873         (remote_target::fileio_open, remote_target::fileio_pwrite)
5874         (remote_target::fileio_pread, remote_target::fileio_close): New.
5875         (remote_hostio_readlink, remote_hostio_fstat)
5876         (remote_filesystem_is_local, remote_can_execute_reverse)
5877         (remote_supports_non_stop, remote_supports_disable_randomization)
5878         (remote_supports_multi_process, remote_supports_cond_breakpoints)
5879         (remote_supports_enable_disable_tracepoint)
5880         (remote_supports_string_tracing)
5881         (remote_can_run_breakpoint_commands, remote_trace_init)
5882         (remote_download_tracepoint, remote_can_download_tracepoint)
5883         (remote_download_trace_state_variable, remote_enable_tracepoint)
5884         (remote_disable_tracepoint, remote_trace_set_readonly_regions)
5885         (remote_trace_start, remote_get_trace_status)
5886         (remote_get_tracepoint_status, remote_trace_stop)
5887         (remote_trace_find, remote_get_trace_state_variable_value)
5888         (remote_save_trace_data, remote_get_raw_trace_data)
5889         (remote_set_disconnected_tracing, remote_core_of_thread)
5890         (remote_set_circular_trace_buffer, remote_traceframe_info)
5891         (remote_get_min_fast_tracepoint_insn_len)
5892         (remote_set_trace_buffer_size, remote_set_trace_notes)
5893         (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
5894         (remote_disable_btrace, remote_teardown_btrace)
5895         (remote_read_btrace, remote_btrace_conf)
5896         (remote_augmented_libraries_svr4_read, remote_load)
5897         (remote_pid_to_exec_file, remote_can_do_single_step)
5898         (remote_execution_direction, remote_thread_handle_to_thread_info):
5899         Refactor as methods of remote_target.
5900         (init_remote_ops, init_extended_remote_ops): Delete.
5901         (remote_can_async_p, remote_is_async_p, remote_async)
5902         (remote_thread_events, remote_upload_tracepoints)
5903         (remote_upload_trace_state_variables): Refactor as methods of
5904         remote_target.
5905         (_initialize_remote): Remove references to init_remote_ops and
5906         init_extended_remote_ops.
5907
5908         * remote-sim.c (gdbsim_target): New class.
5909         (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
5910         (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
5911         (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
5912         (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
5913         (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
5914         (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
5915         Refactor as methods of gdbsim_target.
5916         (gdbsim_ops): Now a gdbsim_target.
5917         (init_gdbsim_ops): Delete.
5918         (gdbsim_cntrl_c): Adjust.
5919         (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
5920
5921         * amd64-linux-nat.c (amd64_linux_nat_target): New class.
5922         (the_amd64_linux_nat_target): New.
5923         (amd64_linux_fetch_inferior_registers)
5924         (amd64_linux_store_inferior_registers): Refactor as methods of
5925         amd64_linux_nat_target.
5926         (_initialize_amd64_linux_nat): Adjust.  Set linux_target.
5927         * i386-linux-nat.c: Don't include "linux-nat.h".
5928         (i386_linux_nat_target): New class.
5929         (the_i386_linux_nat_target): New.
5930         (i386_linux_fetch_inferior_registers)
5931         (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
5932         as methods of i386_linux_nat_target.
5933         (_initialize_i386_linux_nat): Adjust.  Set linux_target.
5934         * inf-child.c (inf_child_ops): Delete.
5935         (inf_child_fetch_inferior_registers)
5936         (inf_child_store_inferior_registers): Delete.
5937         (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
5938         methods of inf_child_target.
5939         (inf_child_target::supports_terminal_ours)
5940         (inf_child_target::terminal_init)
5941         (inf_child_target::terminal_inferior)
5942         (inf_child_target::terminal_ours_for_output)
5943         (inf_child_target::terminal_ours, inf_child_target::interrupt)
5944         (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
5945         New.
5946         (inf_child_open, inf_child_disconnect, inf_child_close)
5947         (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
5948         (inf_child_post_startup_inferior, inf_child_can_run)
5949         (inf_child_pid_to_exec_file): Refactor as methods of
5950         inf_child_target.
5951         (inf_child_follow_fork): Delete.
5952         (inf_child_target::can_create_inferior)
5953         (inf_child_target::can_attach): New.
5954         (inf_child_target::has_all_memory, inf_child_target::has_memory)
5955         (inf_child_target::has_stack, inf_child_target::has_registers)
5956         (inf_child_target::has_execution): New.
5957         (inf_child_fileio_open, inf_child_fileio_pwrite)
5958         (inf_child_fileio_pread, inf_child_fileio_fstat)
5959         (inf_child_fileio_close, inf_child_fileio_unlink)
5960         (inf_child_fileio_readlink, inf_child_use_agent)
5961         (inf_child_can_use_agent): Refactor as methods of
5962         inf_child_target.
5963         (return_zero, inf_child_target): Delete.
5964         (inf_child_target::inf_child_target): New.
5965         * inf-child.h: Include "target.h".
5966         (inf_child_target): Delete function prototype.
5967         (inf_child_target): New class.
5968         (inf_child_open_target, inf_child_mourn_inferior)
5969         (inf_child_maybe_unpush_target): Delete.
5970         * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
5971         (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
5972         (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
5973         (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
5974         (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
5975         (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
5976         (inf_ptrace_wait, inf_ptrace_xfer_partial)
5977         (inf_ptrace_thread_alive, inf_ptrace_files_info)
5978         (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
5979         methods of inf_ptrace_target.
5980         (inf_ptrace_target): Delete function.
5981         * inf-ptrace.h: Include "inf-child.h".
5982         (inf_ptrace_target): Delete function declaration.
5983         (inf_ptrace_target): New class.
5984         (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
5985         * linux-nat.c (linux_target): New.
5986         (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
5987         (linux_nat_target::~linux_nat_target): New.
5988         (linux_child_post_attach, linux_child_post_startup_inferior)
5989         (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
5990         (linux_child_remove_fork_catchpoint)
5991         (linux_child_insert_vfork_catchpoint)
5992         (linux_child_remove_vfork_catchpoint)
5993         (linux_child_insert_exec_catchpoint)
5994         (linux_child_remove_exec_catchpoint)
5995         (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
5996         (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
5997         (linux_nat_resume, linux_nat_stopped_by_watchpoint)
5998         (linux_nat_stopped_data_address)
5999         (linux_nat_stopped_by_sw_breakpoint)
6000         (linux_nat_supports_stopped_by_sw_breakpoint)
6001         (linux_nat_stopped_by_hw_breakpoint)
6002         (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
6003         (linux_nat_kill, linux_nat_mourn_inferior)
6004         (linux_nat_xfer_partial, linux_nat_thread_alive)
6005         (linux_nat_update_thread_list, linux_nat_pid_to_str)
6006         (linux_nat_thread_name, linux_child_pid_to_exec_file)
6007         (linux_child_static_tracepoint_markers_by_strid)
6008         (linux_nat_is_async_p, linux_nat_can_async_p)
6009         (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
6010         (linux_nat_supports_multi_process)
6011         (linux_nat_supports_disable_randomization, linux_nat_async)
6012         (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
6013         (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
6014         (linux_nat_fileio_open, linux_nat_fileio_readlink)
6015         (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
6016         methods of linux_nat_target.
6017         (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
6018         (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
6019         parameter.
6020         (check_stopped_by_watchpoint): Adjust.
6021         (linux_xfer_partial): Delete.
6022         (linux_target_install_ops, linux_target, linux_nat_add_target):
6023         Delete.
6024         (linux_nat_target::linux_nat_target): New.
6025         * linux-nat.h: Include "inf-ptrace.h".
6026         (linux_nat_target): New.
6027         (linux_target, linux_target_install_ops, linux_nat_add_target):
6028         Delete function declarations.
6029         (linux_target): Declare global.
6030         * linux-thread-db.c (thread_db_target): New.
6031         (thread_db_target::thread_db_target): New.
6032         (thread_db_ops): Delete.
6033         (the_thread_db_target): New.
6034         (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
6035         (thread_db_update_thread_list, thread_db_pid_to_str)
6036         (thread_db_extra_thread_info)
6037         (thread_db_thread_handle_to_thread_info)
6038         (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
6039         (thread_db_resume): Refactor as methods of thread_db_target.
6040         (init_thread_db_ops): Delete.
6041         (_initialize_thread_db): Remove reference to init_thread_db_ops.
6042         * x86-linux-nat.c: Don't include "linux-nat.h".
6043         (super_post_startup_inferior): Delete.
6044         (x86_linux_nat_target::~x86_linux_nat_target): New.
6045         (x86_linux_child_post_startup_inferior)
6046         (x86_linux_read_description, x86_linux_enable_btrace)
6047         (x86_linux_disable_btrace, x86_linux_teardown_btrace)
6048         (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
6049         methods of x86_linux_nat_target.
6050         (x86_linux_create_target): Delete.  Bits folded ...
6051         (x86_linux_add_target): ... here.  Now takes a linux_nat_target
6052         pointer.
6053         * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
6054         (x86_linux_nat_target): New class.
6055         (x86_linux_create_target): Delete.
6056         (x86_linux_add_target): Now takes a linux_nat_target pointer.
6057         * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
6058         (x86_region_ok_for_watchpoint, x86_stopped_data_address)
6059         (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
6060         (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
6061         (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
6062         make extern.
6063         (x86_use_watchpoints): Delete.
6064         * x86-nat.h: Include "breakpoint.h" and "target.h".
6065         (x86_use_watchpoints): Delete.
6066         (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
6067         (x86_stopped_by_watchpoint, x86_stopped_data_address)
6068         (x86_insert_watchpoint, x86_remove_watchpoint)
6069         (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
6070         (x86_stopped_by_hw_breakpoint): New declarations.
6071         (x86_nat_target): New template class.
6072
6073         * ppc-linux-nat.c (ppc_linux_nat_target): New class.
6074         (the_ppc_linux_nat_target): New.
6075         (ppc_linux_fetch_inferior_registers)
6076         (ppc_linux_can_use_hw_breakpoint)
6077         (ppc_linux_region_ok_for_hw_watchpoint)
6078         (ppc_linux_ranged_break_num_registers)
6079         (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
6080         (ppc_linux_insert_mask_watchpoint)
6081         (ppc_linux_remove_mask_watchpoint)
6082         (ppc_linux_can_accel_watchpoint_condition)
6083         (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
6084         (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
6085         (ppc_linux_watchpoint_addr_within_range)
6086         (ppc_linux_masked_watch_num_registers)
6087         (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
6088         (ppc_linux_read_description): Refactor as methods of
6089         ppc_linux_nat_target.
6090         (_initialize_ppc_linux_nat): Adjust.  Set linux_target.
6091
6092         * procfs.c (procfs_xfer_partial): Delete forward declaration.
6093         (procfs_target): New class.
6094         (the_procfs_target): New.
6095         (procfs_target): Delete function.
6096         (procfs_auxv_parse, procfs_attach, procfs_detach)
6097         (procfs_fetch_registers, procfs_store_registers, procfs_wait)
6098         (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
6099         (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
6100         (procfs_create_inferior, procfs_update_thread_list)
6101         (procfs_thread_alive, procfs_pid_to_str)
6102         (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
6103         (procfs_stopped_data_address, procfs_insert_watchpoint)
6104         (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
6105         (proc_find_memory_regions, procfs_info_proc)
6106         (procfs_make_note_section): Refactor as methods of procfs_target.
6107         (_initialize_procfs): Adjust.
6108         * sol-thread.c (sol_thread_target): New class.
6109         (sol_thread_ops): Now a sol_thread_target.
6110         (sol_thread_detach, sol_thread_resume, sol_thread_wait)
6111         (sol_thread_fetch_registers, sol_thread_store_registers)
6112         (sol_thread_xfer_partial, sol_thread_mourn_inferior)
6113         (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
6114         (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
6115         (init_sol_thread_ops): Delete.
6116         (_initialize_sol_thread): Adjust.  Remove references to
6117         init_sol_thread_ops and complete_target_initialization.
6118
6119         * windows-nat.c (windows_nat_target): New class.
6120         (windows_fetch_inferior_registers)
6121         (windows_store_inferior_registers, windows_resume, windows_wait)
6122         (windows_attach, windows_detach, windows_pid_to_exec_file)
6123         (windows_files_info, windows_create_inferior)
6124         (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
6125         (windows_close, windows_pid_to_str, windows_xfer_partial)
6126         (windows_get_tib_address, windows_get_ada_task_ptid)
6127         (windows_thread_name, windows_thread_alive): Refactor as
6128         windows_nat_target methods.
6129         (do_initial_windows_stuff): Adjust.
6130         (windows_target): Delete function.
6131         (_initialize_windows_nat): Adjust.
6132
6133         * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
6134         (darwin_mourn_inferior, darwin_kill_inferior)
6135         (darwin_create_inferior, darwin_attach, darwin_detach)
6136         (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
6137         (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
6138         (darwin_supports_multi_process): Refactor as darwin_nat_target
6139         methods.
6140         (darwin_resume_to, darwin_files_info): Delete.
6141         (_initialize_darwin_inferior): Rename to ...
6142         (_initialize_darwin_nat): ... this.  Adjust to C++ification.
6143         * darwin-nat.h: Include "inf-child.h".
6144         (darwin_nat_target): New class.
6145         (darwin_complete_target): Delete.
6146         * i386-darwin-nat.c (i386_darwin_nat_target): New class.
6147         (darwin_target): New.
6148         (i386_darwin_fetch_inferior_registers)
6149         (i386_darwin_store_inferior_registers): Refactor as methods of
6150         darwin_nat_target.
6151         (darwin_complete_target): Delete, with ...
6152         (_initialize_i386_darwin_nat): ... bits factored out here.
6153
6154         * alpha-linux-nat.c (alpha_linux_nat_target): New class.
6155         (the_alpha_linux_nat_target): New.
6156         (alpha_linux_register_u_offset): Refactor as
6157         alpha_linux_nat_target method.
6158         (_initialize_alpha_linux_nat): Adjust.
6159         * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
6160         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
6161         (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
6162         methods of linux_nat_trad_target.
6163         (linux_trad_target): Delete.
6164         * linux-nat-trad.h (linux_trad_target): Delete function.
6165         (linux_nat_trad_target): New class.
6166         * mips-linux-nat.c (mips_linux_nat_target): New class.
6167         (super_fetch_registers, super_store_registers, super_close):
6168         Delete.
6169         (the_mips_linux_nat_target): New.
6170         (mips64_linux_regsets_fetch_registers)
6171         (mips64_linux_regsets_store_registers)
6172         (mips64_linux_fetch_registers, mips64_linux_store_registers)
6173         (mips_linux_register_u_offset, mips_linux_read_description)
6174         (mips_linux_can_use_hw_breakpoint)
6175         (mips_linux_stopped_by_watchpoint)
6176         (mips_linux_stopped_data_address)
6177         (mips_linux_region_ok_for_hw_watchpoint)
6178         (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
6179         (mips_linux_close): Refactor as methods of mips_linux_nat.
6180         (_initialize_mips_linux_nat): Adjust to C++ification.
6181
6182         * aix-thread.c (aix_thread_target): New class.
6183         (aix_thread_ops): Now an aix_thread_target.
6184         (aix_thread_detach, aix_thread_resume, aix_thread_wait)
6185         (aix_thread_fetch_registers, aix_thread_store_registers)
6186         (aix_thread_xfer_partial, aix_thread_mourn_inferior)
6187         (aix_thread_thread_alive, aix_thread_pid_to_str)
6188         (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
6189         Refactor as methods of aix_thread_target.
6190         (init_aix_thread_ops): Delete.
6191         (_initialize_aix_thread): Remove references to init_aix_thread_ops
6192         and complete_target_initialization.
6193         * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
6194         (rs6000_nat_target): New class.
6195         (the_rs6000_nat_target): New.
6196         (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
6197         (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
6198         (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
6199         (super_create_inferior): Delete.
6200         (_initialize_rs6000_nat): Adjust to C++ification.
6201
6202         * arm-linux-nat.c (arm_linux_nat_target): New class.
6203         (the_arm_linux_nat_target): New.
6204         (arm_linux_fetch_inferior_registers)
6205         (arm_linux_store_inferior_registers, arm_linux_read_description)
6206         (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
6207         (arm_linux_remove_hw_breakpoint)
6208         (arm_linux_region_ok_for_hw_watchpoint)
6209         (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
6210         (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
6211         (arm_linux_watchpoint_addr_within_range): Refactor as methods of
6212         arm_linux_nat_target.
6213         (_initialize_arm_linux_nat): Adjust to C++ification.
6214
6215         * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
6216         (the_aarch64_linux_nat_target): New.
6217         (aarch64_linux_fetch_inferior_registers)
6218         (aarch64_linux_store_inferior_registers)
6219         (aarch64_linux_child_post_startup_inferior)
6220         (aarch64_linux_read_description)
6221         (aarch64_linux_can_use_hw_breakpoint)
6222         (aarch64_linux_insert_hw_breakpoint)
6223         (aarch64_linux_remove_hw_breakpoint)
6224         (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
6225         (aarch64_linux_region_ok_for_hw_watchpoint)
6226         (aarch64_linux_stopped_data_address)
6227         (aarch64_linux_stopped_by_watchpoint)
6228         (aarch64_linux_watchpoint_addr_within_range)
6229         (aarch64_linux_can_do_single_step): Refactor as methods of
6230         aarch64_linux_nat_target.
6231         (super_post_startup_inferior): Delete.
6232         (_initialize_aarch64_linux_nat): Adjust to C++ification.
6233
6234         * hppa-linux-nat.c (hppa_linux_nat_target): New class.
6235         (the_hppa_linux_nat_target): New.
6236         (hppa_linux_fetch_inferior_registers)
6237         (hppa_linux_store_inferior_registers): Refactor as methods of
6238         hppa_linux_nat_target.
6239         (_initialize_hppa_linux_nat): Adjust to C++ification.
6240
6241         * ia64-linux-nat.c (ia64_linux_nat_target): New class.
6242         (the_ia64_linux_nat_target): New.
6243         (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
6244         (ia64_linux_stopped_data_address)
6245         (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
6246         (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
6247         ia64_linux_nat_target methods.
6248         (super_xfer_partial): Delete.
6249         (_initialize_ia64_linux_nat): Adjust to C++ification.
6250
6251         * m32r-linux-nat.c (m32r_linux_nat_target): New class.
6252         (the_m32r_linux_nat_target): New.
6253         (m32r_linux_fetch_inferior_registers)
6254         (m32r_linux_store_inferior_registers): Refactor as
6255         m32r_linux_nat_target methods.
6256         (_initialize_m32r_linux_nat): Adjust to C++ification.
6257
6258         * m68k-linux-nat.c (m68k_linux_nat_target): New class.
6259         (the_m68k_linux_nat_target): New.
6260         (m68k_linux_fetch_inferior_registers)
6261         (m68k_linux_store_inferior_registers): Refactor as
6262         m68k_linux_nat_target methods.
6263         (_initialize_m68k_linux_nat): Adjust to C++ification.
6264
6265         * s390-linux-nat.c (s390_linux_nat_target): New class.
6266         (the_s390_linux_nat_target): New.
6267         (s390_linux_fetch_inferior_registers)
6268         (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
6269         (s390_insert_watchpoint, s390_remove_watchpoint)
6270         (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
6271         (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
6272         (s390_auxv_parse, s390_read_description): Refactor as methods of
6273         s390_linux_nat_target.
6274         (_initialize_s390_nat): Adjust to C++ification.
6275
6276         * sparc-linux-nat.c (sparc_linux_nat_target): New class.
6277         (the_sparc_linux_nat_target): New.
6278         (_initialize_sparc_linux_nat): Adjust to C++ification.
6279         * sparc-nat.c (sparc_fetch_inferior_registers)
6280         (sparc_store_inferior_registers): Remove target_ops parameter.
6281         * sparc-nat.h (sparc_fetch_inferior_registers)
6282         (sparc_store_inferior_registers): Remove target_ops parameter.
6283         * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
6284         (the_sparc64_linux_nat_target): New.
6285         (_initialize_sparc64_linux_nat): Adjust to C++ification.
6286
6287         * spu-linux-nat.c (spu_linux_nat_target): New class.
6288         (the_spu_linux_nat_target): New.
6289         (spu_child_post_startup_inferior, spu_child_post_attach)
6290         (spu_child_wait, spu_fetch_inferior_registers)
6291         (spu_store_inferior_registers, spu_xfer_partial)
6292         (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
6293         methods.
6294         (_initialize_spu_nat): Adjust to C++ification.
6295
6296         * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
6297         (the_tilegx_linux_nat_target): New.
6298         (fetch_inferior_registers, store_inferior_registers):
6299         Refactor as methods.
6300         (_initialize_tile_linux_nat): Adjust to C++ification.
6301
6302         * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
6303         (the_xtensa_linux_nat_target): New.
6304         (xtensa_linux_fetch_inferior_registers)
6305         (xtensa_linux_store_inferior_registers): Refactor as
6306         xtensa_linux_nat_target methods.
6307         (_initialize_xtensa_linux_nat): Adjust to C++ification.
6308
6309         * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
6310         (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
6311         (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
6312         (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
6313         (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
6314         (fbsd_stopped_by_sw_breakpoint)
6315         (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
6316         (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
6317         (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
6318         (fbsd_post_startup_inferior, fbsd_post_attach)
6319         (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
6320         (fbsd_set_syscall_catchpoint)
6321         (super_xfer_partial, super_resume, super_wait)
6322         (fbsd_supports_stopped_by_hw_breakpoint): Delete.
6323         (fbsd_handle_debug_trap): Remove target_ops parameter.
6324         (fbsd_nat_add_target): Delete.
6325         * fbsd-nat.h: Include "inf-ptrace.h".
6326         (fbsd_nat_add_target): Delete.
6327         (USE_SIGTRAP_SIGINFO): Define.
6328         (fbsd_nat_target): New class.
6329
6330         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
6331         (amd64bsd_store_inferior_registers): Remove target_ops parameter.
6332         (amd64bsd_target): Delete.
6333         * amd64-bsd-nat.h: New file.
6334         * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
6335         "x86-bsd-nat.h".
6336         (amd64_fbsd_nat_target): New class.
6337         (the_amd64_fbsd_nat_target): New.
6338         (amd64fbsd_read_description): Refactor as method of
6339         amd64_fbsd_nat_target.
6340         (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
6341         (_initialize_amd64fbsd_nat): Adjust to C++ification.
6342         * amd64-nat.h (amd64bsd_target): Delete function declaration.
6343         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
6344         (i386bsd_store_inferior_registers): Remove target_ops parameter.
6345         (i386bsd_target): Delete.
6346         * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
6347         (i386bsd_fetch_inferior_registers)
6348         (i386bsd_store_inferior_registers): Declare.
6349         (i386_bsd_nat_target): New class.
6350         * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
6351         (the_i386_fbsd_nat_target): New.
6352         (i386fbsd_resume, i386fbsd_read_description): Refactor as
6353         i386_fbsd_nat_target methods.
6354         (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
6355         (_initialize_i386fbsd_nat): Adjust to C++ification.
6356         * x86-bsd-nat.c (super_mourn_inferior): Delete.
6357         (x86bsd_mourn_inferior, x86bsd_target): Delete.
6358         (_initialize_x86_bsd_nat): Adjust to C++ification.
6359         * x86-bsd-nat.h: Include "x86-nat.h".
6360         (x86bsd_target): Delete declaration.
6361         (x86bsd_nat_target): New class.
6362
6363         * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
6364         (the_aarch64_fbsd_nat_target): New.
6365         (aarch64_fbsd_fetch_inferior_registers)
6366         (aarch64_fbsd_store_inferior_registers): Refactor as methods of
6367         aarch64_fbsd_nat_target.
6368         (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
6369         * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
6370         (the_alpha_bsd_nat_target): New.
6371         (alphabsd_fetch_inferior_registers)
6372         (alphabsd_store_inferior_registers): Refactor as
6373         alpha_bsd_nat_target methods.
6374         (_initialize_alphabsd_nat): Refactor as methods of
6375         alpha_bsd_nat_target.
6376         * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
6377         (the_amd64_nbsd_nat_target): New.
6378         (_initialize_amd64nbsd_nat): Adjust to C++ification.
6379         * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
6380         (the_amd64_obsd_nat_target): New.
6381         (_initialize_amd64obsd_nat): Adjust to C++ification.
6382         * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
6383         (the_arm_fbsd_nat_target): New.
6384         (arm_fbsd_fetch_inferior_registers)
6385         (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
6386         (_initialize_arm_fbsd_nat): Refactor as methods of
6387         arm_fbsd_nat_target.
6388         (_initialize_arm_fbsd_nat): Adjust to C++ification.
6389         * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
6390         (the_arm_netbsd_nat_target): New.
6391         (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
6392         arm_netbsd_nat_target.
6393         (_initialize_arm_netbsd_nat): Adjust to C++ification.
6394         * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
6395         (the_hppa_nbsd_nat_target): New.
6396         (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
6397         hppa_nbsd_nat_target methods.
6398         (_initialize_hppanbsd_nat): Adjust to C++ification.
6399         * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
6400         (the_hppa_obsd_nat_target): New.
6401         (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
6402         methods of hppa_obsd_nat_target.
6403         (_initialize_hppaobsd_nat): Adjust to C++ification.  Use
6404         add_target.
6405         * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
6406         (_initialize_i386nbsd_nat): Adjust to C++ification.  Use
6407         add_target.
6408         * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
6409         (_initialize_i386obsd_nat): Use add_target.
6410         * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
6411         (the_m68k_bsd_nat_target): New.
6412         (m68kbsd_fetch_inferior_registers)
6413         (m68kbsd_store_inferior_registers): Refactor as methods of
6414         m68k_bsd_nat_target.
6415         (_initialize_m68kbsd_nat): Adjust to C++ification.
6416         * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
6417         (the_mips_fbsd_nat_target): New.
6418         (mips_fbsd_fetch_inferior_registers)
6419         (mips_fbsd_store_inferior_registers): Refactor as methods of
6420         mips_fbsd_nat_target.
6421         (_initialize_mips_fbsd_nat): Adjust to C++ification.  Use
6422         add_target.
6423         * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
6424         (the_mips_nbsd_nat_target): New.
6425         (mipsnbsd_fetch_inferior_registers)
6426         (mipsnbsd_store_inferior_registers): Refactor as methods of
6427         mips_nbsd_nat_target.
6428         (_initialize_mipsnbsd_nat): Adjust to C++ification.
6429         * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
6430         (the_mips64_obsd_nat_target): New.
6431         (mips64obsd_fetch_inferior_registers)
6432         (mips64obsd_store_inferior_registers): Refactor as methods of
6433         mips64_obsd_nat_target.
6434         (_initialize_mips64obsd_nat): Adjust to C++ification.  Use
6435         add_target.
6436         * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
6437         nbsd_nat_target.
6438         * nbsd-nat.h: Include "inf-ptrace.h".
6439         (nbsd_nat_target): New class.
6440         * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
6441         (obsd_wait): Refactor as methods of obsd_nat_target.
6442         (obsd_add_target): Delete.
6443         * obsd-nat.h: Include "inf-ptrace.h".
6444         (obsd_nat_target): New class.
6445         * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
6446         (the_ppc_fbsd_nat_target): New.
6447         (ppcfbsd_fetch_inferior_registers)
6448         (ppcfbsd_store_inferior_registers): Refactor as methods of
6449         ppc_fbsd_nat_target.
6450         (_initialize_ppcfbsd_nat): Adjust to C++ification.  Use
6451         add_target.
6452         * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
6453         (the_ppc_nbsd_nat_target): New.
6454         (ppcnbsd_fetch_inferior_registers)
6455         (ppcnbsd_store_inferior_registers): Refactor as methods of
6456         ppc_nbsd_nat_target.
6457         (_initialize_ppcnbsd_nat): Adjust to C++ification.
6458         * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
6459         (the_ppc_obsd_nat_target): New.
6460         (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
6461         methods of ppc_obsd_nat_target.
6462         (_initialize_ppcobsd_nat): Adjust to C++ification.  Use
6463         add_target.
6464         * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
6465         (the_sh_nbsd_nat_target): New.
6466         (shnbsd_fetch_inferior_registers)
6467         (shnbsd_store_inferior_registers): Refactor as methods of
6468         sh_nbsd_nat_target.
6469         (_initialize_shnbsd_nat): Adjust to C++ification.
6470         * sparc-nat.c (sparc_xfer_wcookie): Make extern.
6471         (inf_ptrace_xfer_partial): Delete.
6472         (sparc_xfer_partial, sparc_target): Delete.
6473         * sparc-nat.h (sparc_fetch_inferior_registers)
6474         (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
6475         (sparc_target): Delete function declaration.
6476         (sparc_target): New template class.
6477         * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
6478         (_initialize_sparcnbsd_nat): Adjust to C++ification.
6479         * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
6480         (_initialize_sparc64fbsd_nat): Adjust to C++ification.  Use
6481         add_target.
6482         * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
6483         (_initialize_sparc64nbsd_nat): Adjust to C++ification.
6484         * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
6485         (_initialize_sparc64obsd_nat): Adjust to C++ification.  Use
6486         add_target.
6487         * vax-bsd-nat.c (vax_bsd_nat_target): New class.
6488         (the_vax_bsd_nat_target): New.
6489         (vaxbsd_fetch_inferior_registers)
6490         (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
6491         methods.
6492         (_initialize_vaxbsd_nat): Adjust to C++ification.
6493
6494         * bsd-kvm.c (bsd_kvm_target): New class.
6495         (bsd_kvm_ops): Now a bsd_kvm_target.
6496         (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
6497         (bsd_kvm_files_info, bsd_kvm_fetch_registers)
6498         (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
6499         bsd_kvm_target.
6500         (bsd_kvm_return_one): Delete.
6501         (bsd_kvm_add_target): Adjust to C++ification.
6502
6503         * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
6504         (nto_procfs_target_procfs): New classes.
6505         (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
6506         (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
6507         (procfs_post_attach, procfs_wait, procfs_fetch_registers)
6508         (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
6509         (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
6510         (procfs_remove_hw_breakpoint, procfs_resume)
6511         (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
6512         (procfs_kill_inferior, procfs_store_registers)
6513         (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
6514         as methods of nto_procfs_target.
6515         (nto_procfs_ops): Now an nto_procfs_target_procfs.
6516         (nto_native_ops): Delete.
6517         (procfs_open, procfs_native_open): Delete.
6518         (nto_native_ops): Now an nto_procfs_target_native.
6519         (init_procfs_targets): Adjust to C++ification.
6520         (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
6521         (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
6522         Refactor as methods of nto_procfs_target.
6523
6524         * go32-nat.c (go32_nat_target): New class.
6525         (the_go32_nat_target): New.
6526         (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
6527         (go32_store_registers, go32_xfer_partial, go32_files_info)
6528         (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
6529         (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
6530         (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
6531         (go32_pid_to_str): Refactor as methods of go32_nat_target.
6532         (go32_target): Delete.
6533         (_initialize_go32_nat): Adjust to C++ification.
6534
6535         * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
6536         (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
6537         (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
6538         (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
6539         gnu_nat_target.
6540         (gnu_target): Delete.
6541         * gnu-nat.h (gnu_target): Delete.
6542         (gnu_nat_target): New class.
6543         * i386-gnu-nat.c (gnu_base_target): New.
6544         (i386_gnu_nat_target): New class.
6545         (the_i386_gnu_nat_target): New.
6546         (_initialize_i386gnu_nat): Adjust to C++ification.
6547
6548 2018-05-02  Pedro Alves  <palves@redhat.com>
6549
6550         * bfd-target.c (target_bfd_xclose): Rename to ...
6551         (target_bfd_close): ... this.
6552         (target_bfd_reopen): Adjust.
6553         * target.c (target_close): Remove references to to_xclose.
6554         * target.h (target_ops::to_xclose): Delete.
6555         (target_ops::to_close): Update comments.
6556
6557 2018-05-02  Pedro Alves  <palves@redhat.com>
6558
6559         * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
6560         "linux-nat.h".
6561         * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
6562         * inf-ptrace.c (inf_ptrace_register_u_offset)
6563         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
6564         (inf_ptrace_store_register, inf_ptrace_store_registers)
6565         (inf_ptrace_trad_target): Move to ...
6566         * linux-nat-trad.c: ... this new file.
6567         * linux-nat-trad.h: New file.
6568         * linux-nat.c (linux_target_install_ops): Make extern.
6569         (linux_trad_target): Delete.
6570         * linux-nat.h (linux_trad_target): Delete declaration.
6571         (linux_target_install_ops): Declare.
6572         * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
6573         "linux-nat.h".
6574
6575 2018-05-02  Pedro Alves  <palves@redhat.com>
6576
6577         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
6578         procfs_target/add_target here.
6579         * procfs.c (procfs_target): Make static.
6580         (_initialize_procfs): Call add_target here.
6581         * procfs.h (struct target_ops): Remove forward declaration.
6582         (procfs_target): Remove declaration.
6583         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
6584
6585 2018-05-02  Pedro Alves  <palves@redhat.com>
6586
6587         * procfs.c (procfs_stopped_by_watchpoint)
6588         (procfs_insert_watchpoint, procfs_remove_watchpoint)
6589         (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
6590         Forward declare.
6591         (procfs_use_watchpoints): Delete, move contents...
6592         (procfs_target): ... here.
6593         * procfs.h (procfs_use_watchpoints): Delete declaration.
6594         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
6595         procfs_use_watchpoints.
6596         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
6597         procfs_use_watchpoints.
6598
6599 2018-05-02  Tom Tromey  <tom@tromey.com>
6600
6601         PR python/20084:
6602         * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
6603         and var_zuinteger_unlimited.
6604         * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
6605         and PARAM_ZUINTEGER_UNLIMITED.
6606         (set_parameter_value): Handle var_zuinteger and
6607         var_zuinteger_unlimited.
6608         (add_setshow_generic): Likewise.
6609         (parmpy_init): Likewise.
6610
6611 2018-04-28  Dan Robertson  <danlrobertson89@gmail.com>
6612
6613         PR rust/23124
6614         * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
6615         pointer is not null before dereferencing it.
6616
6617 2018-04-30  Tom Tromey  <tom@tromey.com>
6618
6619         * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
6620         is_mi_like_p.
6621
6622 2018-04-30  Tom Tromey  <tom@tromey.com>
6623
6624         * breakpoint.c (mention): Remove use of is_mi_like_p.
6625         (print_mention_ranged_breakpoint): Likewise.
6626         * break-catch-throw.c (print_it_exception_catchpoint): Remove use
6627         of is_mi_like_p.
6628
6629 2018-04-30  Tom Tromey  <tom@tromey.com>
6630
6631         * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
6632
6633 2018-04-30  Tom Tromey  <tom@tromey.com>
6634
6635         * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
6636         (info_spu_event_command): Remove some uses of is_mi_like_p.
6637
6638 2018-04-30  Tom Tromey  <tom@tromey.com>
6639
6640         * python/py-framefilter.c (py_print_single_arg)
6641         (enumerate_locals, py_print_args, py_print_frame): Remove some
6642         uses of is_mi_like_p.
6643
6644 2018-04-30  Tom Tromey  <tom@tromey.com>
6645
6646         * ui-out.c: Update.
6647         * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
6648         * ui-out.h (ui_out::is_mi_like_p): Now const.
6649         (ui_out::do_is_mi_like_p): Now const.
6650         * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
6651
6652 2018-04-30  Tom Tromey  <tom@tromey.com>
6653
6654         * varobj.c (varobj_set_visualizer): Use new_reference.
6655         * python/python.c (gdbpy_decode_line): Use new_reference.
6656         * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
6657         new_reference.
6658
6659 2018-04-30  Tom Tromey  <tom@tromey.com>
6660
6661         * varobj.c (install_new_value): Use new_reference.
6662         * value.h (value_incref): Return void.  Swap intro comment with
6663         value_decref.
6664         * value.c (set_value_parent): Use new_reference.
6665         (value_incref): Return void.  Update intro comment.
6666         (release_value): Use new_reference.
6667         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
6668
6669 2018-04-30  Tom Tromey  <tom@tromey.com>
6670
6671         * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
6672         * gdb_bfd.h (new_bfd_ref): Remove.
6673         (gdb_bfd_open): Update comment.
6674         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
6675         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
6676         (gdb_bfd_fdopenr): Use new_reference.
6677         * exec.c (exec_file_attach): Use new_reference.
6678
6679 2018-04-30  Tom Tromey  <tom@tromey.com>
6680
6681         * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
6682         method.
6683
6684 2018-04-30  Tom Tromey  <tom@tromey.com>
6685
6686         * jit.c (jit_read_code_entry): Use type_align.
6687         * i386-tdep.c (i386_gdbarch_init): Don't call
6688         set_gdbarch_long_long_align_bit.
6689         * gdbarch.sh: Remove long_long_align_bit.
6690         * gdbarch.c, gdbarch.h: Rebuild.
6691         * arc-tdep.c (arc_type_align): New function.
6692         (arc_gdbarch_init): Use arc_type_align.  Don't call
6693         set_gdbarch_long_long_align_bit.
6694
6695 2018-04-30  Tom Tromey  <tom@tromey.com>
6696
6697         * rust-lang.c (rust_type_alignment): Remove.
6698         (rust_composite_type): Use type_align.
6699
6700 2018-04-30  Tom Tromey  <tom@tromey.com>
6701
6702         * NEWS: Mention Type.align.
6703         * python/py-type.c (typy_get_alignof): New function.
6704         (type_object_getset): Add "alignof".
6705
6706 2018-04-30  Tom Tromey  <tom@tromey.com>
6707
6708         PR exp/17095:
6709         * NEWS: Update.
6710         * std-operator.def (UNOP_ALIGNOF): New operator.
6711         * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
6712         New.
6713         * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
6714         * c-lang.c (c_op_print_tab): Add alignof.
6715         * c-exp.y (ALIGNOF): New token.
6716         (exp): Add "ALIGNOF" production.
6717         (ident_tokens): Add _Alignof and alignof.
6718
6719 2018-04-30  Tom Tromey  <tom@tromey.com>
6720
6721         * i386-tdep.c (i386_type_align): New function.
6722         (i386_gdbarch_init): Update.
6723         * gdbarch.sh (type_align): New method.
6724         * gdbarch.c, gdbarch.h: Rebuild.
6725         * arch-utils.h (default_type_align): Declare.
6726         * arch-utils.c (default_type_align): New function.
6727         * gdbtypes.h (TYPE_ALIGN_BITS): New define.
6728         (struct type) <align_log2>: New field.
6729         <instance_flags>: Now a bitfield.
6730         (TYPE_RAW_ALIGN): New macro.
6731         (type_align, type_raw_align, set_type_align): Declare.
6732         * gdbtypes.c (type_align, type_raw_align, set_type_align): New
6733         functions.
6734         * dwarf2read.c (quirk_rust_enum): Set type alignment.
6735         (get_alignment, maybe_set_alignment): New functions.
6736         (read_structure_type, read_enumeration_type, read_array_type)
6737         (read_set_type, read_tag_pointer_type, read_tag_reference_type)
6738         (read_subrange_type, read_base_type): Set type alignment.
6739
6740 2018-04-30  Simon Marchi  <simon.marchi@ericsson.com>
6741
6742         * dwarf2read.c (read_index_from_section): Use bool.
6743
6744 2018-04-29  Fabian Groffen  <grobian@gentoo.org>
6745
6746         PR gdb/22950
6747         * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
6748         with #ifdef.
6749
6750 2018-04-29  John Reiser  <jreiser@BitWagon.com>
6751
6752         PR build/22873
6753         * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
6754         last step, and do it atomically.
6755
6756 2018-04-27  Alexandre Oliva  <aoliva@redhat.com>
6757
6758         * compile/compile-c-types.c (convert_int, convert_float):
6759         Update for C FE v1.
6760
6761 2018-04-27  Tom Tromey  <tom@tromey.com>
6762
6763         PR rust/22545:
6764         * rust-lang.c (rust_inclusive_range_type_p): New function.
6765         (rust_range): Handle inclusive ranges.
6766         (rust_compute_range): Likewise.
6767         * rust-exp.y (struct rust_op) <inclusive>: New field.
6768         (DOTDOTEQ): New constant.
6769         (range_expr): Add "..=" productions.
6770         (operator_tokens): Add "..=" token.
6771         (ast_range): Add "inclusive" parameter.
6772         (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
6773         ranges.
6774         * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
6775         bounds values.
6776         * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
6777         LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
6778         Update comments.
6779         * expprint.c (print_subexp_standard): Handle new bounds values.
6780         (dump_subexp_body_standard): Likewise.
6781
6782 2018-04-27  Tom Tromey  <tom@tromey.com>
6783
6784         * configure: Rebuild.
6785         * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
6786         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
6787         "OVERRIDE".
6788         (class symbol_needs_eval_context): Likewise.
6789         * dwarf2read.c (mock_mapped_index::symbol_name_count)
6790         (mock_mapped_index::symbol_name_at): Use "override".  Remove
6791         "virtual".
6792         * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
6793         "override".
6794         (class dwarf_expr_executor): Use "override", not "OVERRIDE".
6795         * aarch64-tdep.c (instruction_reader::read): Use "override".
6796         (instruction_reader_test::read): Likewise.
6797         * arm-tdep.c (instruction_reader::read): Use "override".
6798         (instruction_reader_thumb::read): Likewise.
6799
6800 2018-04-26  Andrzej Kaczmarek  <andrzej.kaczmarek@codecoup.pl>
6801
6802         PR remote/9665
6803         * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
6804         instead of remote_send.
6805         (remote_send): Remove.
6806
6807 2018-04-26  Pedro Alves  <palves@redhat.com>
6808
6809         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
6810         find_function_start_sal instead of find_pc_line.
6811
6812 2018-04-26  Pedro Alves  <palves@redhat.com>
6813
6814         * breakpoint.c (set_breakpoint_location_function): Handle
6815         mst_data_gnu_ifunc.
6816         * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
6817         * elfread.c (elf_symtab_read): Give data symbols with
6818         BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
6819         (elf_rel_plt_read): Update comment.
6820         * linespec.c (convert_linespec_to_sals): Handle
6821         mst_data_gnu_ifunc.
6822         (minsym_found): Handle mst_data_gnu_ifunc.
6823         * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
6824         (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
6825         * parse.c (find_minsym_type_and_address): Handle
6826         mst_data_gnu_ifunc.
6827         * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
6828         * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
6829         * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
6830         comment.
6831         <mst_data_gnu_ifunc>: New enumerator.
6832
6833 2018-04-26  Pedro Alves  <palves@redhat.com>
6834
6835         * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
6836         (lookup_minimal_symbol_by_pc_section): ... this.  Replace
6837         'want_trampoline' parameter by a lookup_msym_prefer parameter.
6838         Handle it.
6839         (lookup_minimal_symbol_by_pc_section): Delete old implementation.
6840         (lookup_minimal_symbol_by_pc): Adjust.
6841         (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
6842         (lookup_solib_trampoline_symbol_by_pc): Adjust.
6843         * minsyms.h (lookup_msym_prefer): New enum.
6844         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
6845         parameter by a lookup_msym_prefer parameter.
6846
6847 2018-04-26  Pedro Alves  <palves@redhat.com>
6848
6849         * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
6850         ends in "@plt" instead of looking at the symbol's section.
6851
6852 2018-04-26  Pedro Alves  <palves@redhat.com>
6853
6854         * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete.  Remove
6855         all references.
6856         (find_pc_partial_function_gnu_ifunc): Rename to ...
6857         (find_pc_partial_function): ... this, and remove references to
6858         'is_gnu_ifunc_p'.
6859         (find_pc_partial_function): Delete old implementation.
6860         * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
6861
6862 2018-04-26  Pedro Alves  <palves@redhat.com>
6863
6864         * linespec.c (struct bound_minimal_symbol_search_key): New.
6865         (convert_linespec_to_sals): Sort minimal symbols earlier.  Don't
6866         skip first line if we found a GNU ifunc minimal symbol by name.
6867         (compare_msymbols): Change parameters to work with a destructured
6868         lhs minsym.
6869         (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
6870         functions.
6871
6872 2018-04-26  Pedro Alves  <palves@redhat.com>
6873
6874         * breakpoint.c (set_breakpoint_location_function): Don't resolve
6875         ifunc targets here.  Instead, if we have an ifunc minsym, use its
6876         address/name.
6877         (add_location_to_breakpoint): Store the minsym and the objfile in
6878         the breakpoint location.
6879         * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
6880         * linespec.c (minsym_found): Resolve GNU ifunc targets here.
6881         Record the minsym in the sal.
6882         * symtab.h (symtab_and_line) <msymbol>: New field.
6883
6884 2018-04-26  Pedro Alves  <palves@redhat.com>
6885
6886         * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
6887         unless we actually resolved the ifunc.
6888
6889 2018-04-26  Pedro Alves  <palves@redhat.com>
6890
6891         * c-exp.y (variable production): Prefer ifunc minsyms over
6892         regular function symbols.
6893         * symtab.c (find_gnu_ifunc): New function.
6894         * minsyms.h (lookup_msym_prefer): New enum.
6895         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
6896         parameter by a lookup_msym_prefer parameter.
6897         * symtab.h (find_gnu_ifunc): New declaration.
6898
6899 2018-04-26  Pedro Alves  <palves@redhat.com>
6900
6901         * blockframe.c (find_gnu_ifunc_target_type): New function.
6902         (find_function_type): New.
6903         * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
6904         return a value with a memory address.
6905         (eval_call): For calls to GNU ifunc functions, try to find the
6906         type of the target function from the type that the resolver
6907         returns.
6908         * gdbtypes.c (objfile_type): Don't install a return type for ifunc
6909         symbols.
6910         * infcall.c (find_function_return_type): Delete.
6911         (find_function_addr): Add 'function_type' parameter.  For calls to
6912         GNU ifunc functions, try to find the type of the target function
6913         from the type that the resolver returns, and return it via
6914         FUNCTION_TYPE.
6915         (call_function_by_hand_dummy): Adjust to use the function type
6916         returned by find_function_addr.
6917         (find_function_addr): Add 'function_type' parameter and move
6918         description here.
6919         * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
6920         declarations.
6921
6922 2018-04-26  Pedro Alves  <palves@redhat.com>
6923
6924         * c-exp.y (variable production): Skip finding an alias for ifunc
6925         symbols.
6926
6927 2018-04-26  Pedro Alves  <palves@redhat.com>
6928
6929         * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
6930
6931 2018-04-25  Pedro Alves  <palves@redhat.com>
6932
6933         * infcmd.c (kill_command): Print the pid as string, not the whole
6934         thread's ptid.  Add comment.  s/has been killed/killed/ in output
6935         message.
6936         * remote.c (remote_detach_1): Print the pid as string, not the
6937         whole thread's ptid.
6938
6939 2018-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
6940             Sergio Durigan Junior  <sergiodj@redhat.com>
6941             Pedro Alves  <palves@redhat.com>
6942
6943         * infcmd.c (kill_command): Print message when inferior has
6944         been killed.
6945         * inferior.c (print_inferior_events): Remove 'static'.  Set as
6946         '1'.
6947         (add_inferior): Improve message printed when
6948         'print_inferior_events' is on.
6949         (exit_inferior): Remove message printed when
6950         'print_inferior_events' is on.
6951         (detach_inferior): Improve message printed when
6952         'print_inferior_events' is on.
6953         (initialize_inferiors): Use 'add_inferior_silent' to set
6954         'current_inferior_'.
6955         * inferior.h (print_inferior_events): Declare here as
6956         'extern'.
6957         * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
6958         '[Detaching...]' messages when 'print_inferior_events' is on.
6959         Use 'add_thread_silent' instead of 'add_thread'.  Add '[' and ']'
6960         as prefix/suffix for messages.  Remove periods.  Fix erroneous
6961         'Detaching after fork from child...', replace it by '... from
6962         parent...'.
6963         (handle_vfork_child_exec_or_exit): Add '[' and ']' as
6964         prefix/suffix when printing 'Detaching...' messages.  Print
6965         them when 'print_inferior_events' is on.
6966         * remote.c (remote_detach_1): Print message when detaching
6967         from inferior and '!is_fork_parent'.
6968
6969 2018-04-24  Tom Tromey  <tom@tromey.com>
6970
6971         * cli-out.h: Reindent.
6972
6973 2018-04-24  Tom Tromey  <tom@tromey.com>
6974
6975         * cli-out.c (cli_ui_out::out_field_fmt): Remove.
6976         (cli_ui_out::do_field_string): Use fputs_filtered.
6977         * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
6978
6979 2018-04-23  Tom Tromey  <tom@tromey.com>
6980
6981         * guile/scm-frame.c (gdbscm_frame_read_var): Use
6982         gdb::unique_xmalloc_ptr.
6983
6984 2018-04-23  Tom Tromey  <tom@tromey.com>
6985
6986         * configure: Rebuild.
6987
6988 2018-04-22  Rajendra SY  <rajendra.sy@gmail.com>
6989
6990         PR gdb/23095
6991         * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
6992         prepare_for_testing.  Set normal_bp to r_debug_state if target
6993         is bsd.
6994
6995 2018-04-21  Pedro Alves  <palves@redhat.com>
6996             Rajendra SY  <rajendra.sy@gmail.com>
6997
6998         * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
6999         * remote.c (extended_remote_attach): In all-stop mode, mark the
7000         thread as executing.
7001
7002 2018-04-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
7003
7004         * thread.c (thread_apply_all_command): Fix comment.
7005         (thread_command): Fix comment.
7006
7007 2018-04-10  Alan Hayward  <alan.hayward@arm.com>
7008
7009         * common/tdesc.h (tdesc_create_feature): Remove xml filename
7010         parameter.
7011         * features/aarch64-core.c (create_feature_aarch64_core):
7012         Regenerate.
7013         * features/aarch64-fpu.c (create_feature_aarch64_fpu):
7014         Likewise.
7015         * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
7016         Likewise.
7017         * features/i386/32bit-avx512.c
7018         (create_feature_i386_32bit_avx512): Likewise.
7019         * features/i386/32bit-core.c (create_feature_i386_32bit_core):
7020         Likewise.
7021         * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
7022         Likewise.
7023         * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
7024         Likewise.
7025         * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
7026         Likewise.
7027         * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
7028         Likewise.
7029         * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
7030         Likewise.
7031         * features/i386/64bit-avx512.c
7032         (create_feature_i386_64bit_avx512): Likewise.
7033         * features/i386/64bit-core.c (create_feature_i386_64bit_core):
7034         Likewise.
7035         * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
7036         Likewise.
7037         * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
7038         Likewise.
7039         * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
7040         Likewise.
7041         * features/i386/64bit-segments.c
7042         (create_feature_i386_64bit_segments): Likewise.
7043         * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
7044         Likewise.
7045         * features/i386/x32-core.c
7046         (create_feature_i386_x32_core): Likewise.
7047         * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
7048         * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
7049         * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
7050         * target-descriptions.c: In generated code, don't pass xml
7051         filename.
7052
7053 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
7054
7055         * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
7056         (print_xml_feature::visit_post): Likewise.
7057         (print_xml_feature::visit): Likewise.
7058         * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
7059         (print_xml_feature): Add new class.
7060         * regformats/regdat.sh: Null xmltarget on feature targets.
7061         * target-descriptions.c (struct target_desc): Add xmltarget.
7062         (maintenance_check_tdesc_xml_convert): Add unittest function.
7063         (tdesc_get_features_xml): Add function to get xml.
7064         (maintenance_check_xml_descriptions): Test xml generation.
7065         * xml-tdesc.c (string_read_description_xml): Add function.
7066         * xml-tdesc.h (string_read_description_xml): Add declaration.
7067
7068 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
7069
7070         * features/Makefile: Add feature marker to targets with new style
7071         target descriptions.
7072         * regformats/aarch64.dat: Regenerate.
7073         * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
7074         * regformats/i386/amd64-avx-linux.dat: Likewise.
7075         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
7076         * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
7077         * regformats/i386/amd64-linux.dat: Likewise.
7078         * regformats/i386/amd64-mpx-linux.dat: Likewise.
7079         * regformats/i386/amd64.dat: Likewise.
7080         * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
7081         * regformats/i386/i386-avx-linux.dat: Likewise.
7082         * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
7083         * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
7084         * regformats/i386/i386-linux.dat: Likewise.
7085         * regformats/i386/i386-mmx-linux.dat: Likewise.
7086         * regformats/i386/i386-mpx-linux.dat: Likewise.
7087         * regformats/i386/i386.dat: Likewise.
7088         * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
7089         * regformats/i386/x32-avx-linux.dat: Likewise.
7090         * regformats/i386/x32-linux.dat: Likewise.
7091         * regformats/tic6x-c62x-linux.dat: Likewise.
7092         * regformats/tic6x-c64x-linux.dat: Likewise.
7093         * regformats/tic6x-c64xp-linux.dat: Likewise.
7094         * regformats/regdat.sh: Parse feature marker.
7095
7096 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
7097
7098         * common/tdesc.h (tdesc_architecture_name): Add new declaration.
7099         (tdesc_osabi_name): Likewise.
7100         * target-descriptions.c (tdesc_architecture_name): Add new
7101         function.
7102         (tdesc_osabi_name): Likewise.
7103
7104 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
7105
7106         * common/tdesc.c (tdesc_predefined_type): Move to here.
7107         (tdesc_named_type): Likewise.
7108         (tdesc_create_vector): Likewise.
7109         (tdesc_create_struct): Likewise.
7110         (tdesc_set_struct_size): Likewise.
7111         (tdesc_create_union): Likewise.
7112         (tdesc_create_flags): Likewise.
7113         (tdesc_create_enum): Likewise.
7114         (tdesc_add_field): Likewise.
7115         (tdesc_add_typed_bitfield): Likewise.
7116         (tdesc_add_bitfield): Likewise.
7117         (tdesc_add_flag): Likewise.
7118         (tdesc_add_enum_value): Likewise.
7119         * common/tdesc.h (struct tdesc_type_builtin): Likewise.
7120         (struct tdesc_type_vector): Likewise.
7121         (struct tdesc_type_field): Likewise.
7122         (struct tdesc_type_with_fields): Likewise.
7123         (tdesc_create_enum): Add declaration.
7124         (tdesc_add_typed_bitfield): Likewise.
7125         (tdesc_add_enum_value): Likewise.
7126         * target-descriptions.c (tdesc_type_field): Move from here.
7127         (tdesc_type_builtin): Likewise.
7128         (tdesc_type_vector): Likewise.
7129         (tdesc_type_with_fields): Likewise.
7130         (tdesc_predefined_types): Likewise.
7131         (tdesc_named_type): Likewise.
7132         (tdesc_create_vector): Likewise.
7133         (tdesc_create_struct): Likewise.
7134         (tdesc_set_struct_size): Likewise.
7135         (tdesc_create_union): Likewise.
7136         (tdesc_create_flags): Likewise.
7137         (tdesc_create_enum): Likewise.
7138         (tdesc_add_field): Likewise.
7139         (tdesc_add_typed_bitfield): Likewise.
7140         (tdesc_add_bitfield): Likewise.
7141         (tdesc_add_flag): Likewise.
7142         (tdesc_add_enum_value): Likewise.
7143         * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
7144         (tdesc_add_typed_bitfield): Likewise.
7145         (tdesc_add_enum_value): Likewise.
7146
7147 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
7148
7149         * common/tdesc.c (tdesc_feature::accept): Move to here.
7150         (tdesc_feature::operator==): Likewise.
7151         (tdesc_create_reg): Likewise.
7152         * common/tdesc.h (tdesc_type_kind): Likewise.
7153         (struct tdesc_type): Likewise.
7154         (struct tdesc_feature): Likewise.
7155         * regformats/regdat.sh: Create a feature.
7156         * target-descriptions.c (tdesc_type_kind): Move from here.
7157         (tdesc_type): Likewise.
7158         (tdesc_type_up): Likewise.
7159         (tdesc_feature): Likewise.
7160         (tdesc_create_reg): Likewise.
7161
7162 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
7163
7164         * Makefile.in: Add arch/tdesc.c
7165         * common/tdesc.c: New file.
7166         * common/tdesc.h (tdesc_element_visitor): Move to here.
7167         (tdesc_element): Likewise.
7168         (tdesc_reg): Likewise.
7169         (tdesc_reg_up): Likewise.
7170         * regformats/regdef.h (reg): Add offset to constructors.
7171         * target-descriptions.c (tdesc_element_visitor): Move from here.
7172         (tdesc_element): Likewise.
7173         (tdesc_reg): Likewise.
7174         (tdesc_reg_up): Likewise.
7175
7176 2018-04-17  Tom Tromey  <tom@tromey.com>
7177
7178         * dwarf2read.c (quirk_rust_enum): Conditionally drop the
7179         discriminant field.
7180
7181 2018-04-17  Tom Tromey  <tom@tromey.com>
7182
7183         * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
7184
7185 2018-04-17  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7186
7187         * symtab.c (print_symbol_info): Skip printing filename and line
7188         number when `last' is NULL.
7189         (symtab_symbol_info): Use empty string instead of NULL for first
7190         invocation of print_symbol_info.
7191         (rbreak_command): Pass NULL to `last' parameter of
7192         print_symbol_info.
7193
7194 2018-04-16  Simon Marchi  <simon.marchi@ericsson.com>
7195
7196         * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
7197         instead of nullptr.
7198
7199 2018-04-16  Pedro Alves  <palves@redhat.com>
7200
7201         * MAINTAINERS (sh): Remove.
7202         * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
7203         (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
7204         (ALLDEPFILES): Remove sh64-tdep.c.
7205         * NEWS: Mentions that support for SH-5/SH64 is removed.
7206         * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
7207         (sh*-*-openbsd*): Ditto.
7208         (sh64-*-elf*): Remove.
7209         (sh*): Remove.
7210         * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
7211         * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
7212         * sh-tdep.c: No longer include "sh64-tdep.h".
7213         (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
7214         * sh64-tdep.c, sh64-tdep.h: Remove files.
7215
7216 2018-04-16  Pedro Alves  <palves@redhat.com>
7217
7218         * MAINTAINERS: Remove m88k.
7219         * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
7220         (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
7221         (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
7222         * NEWS: Mention that support for m88k was removed.
7223         * configure.host (m88*-*-*): Remove support.
7224         * configure.nat (m88k-*-*): Remove support.
7225         * configure.tgt (m88*-*-openbsd*): Remove.
7226         * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
7227
7228 2018-04-15  Simon Marchi  <simon.marchi@polymtl.ca>
7229
7230         * configure.tgt (x86_tobjs): New variable.
7231         (amd64_tobjs, i386_tobjs): Use it.
7232
7233 2018-04-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7234
7235         * symtab.c (print_symbol_info): Precede the symbol definition by
7236         the line number when available.
7237         * NEWS: Advertise this enhancement.
7238
7239 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
7240
7241         * NEWS (New options): announce set/show record btrace cpu.
7242         * btrace.c: Include record-btrace.h.
7243         (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
7244         the vendor is unknown.
7245         (btrace_compute_ftrace_1): Add cpu parameter.  Update callers.
7246         Maybe overwrite the btrace configuration's cpu.
7247         (btrace_compute_ftrace): Add cpu parameter.  Update callers.
7248         (btrace_fetch): Add cpu parameter.  Update callers.
7249         (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
7250         Maybe overwrite the btrace configuration's cpu.  Skip enabling
7251         errata workarounds if the vendor is unknown.
7252         * python/py-record-btrace.c: Include record-btrace.h.
7253         (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
7254         (recpy_bt_function_call_history): Call record_btrace_get_cpu.
7255         * record-btrace.c (record_btrace_cpu_state_kind): New.
7256         (record_btrace_cpu): New.
7257         (set_record_btrace_cpu_cmdlist): New.
7258         (record_btrace_get_cpu): New.
7259         (require_btrace_thread, record_btrace_info)
7260         (record_btrace_resume_thread): Call record_btrace_get_cpu.
7261         (cmd_set_record_btrace_cpu_none): New.
7262         (cmd_set_record_btrace_cpu_auto): New.
7263         (cmd_set_record_btrace_cpu): New.
7264         (cmd_show_record_btrace_cpu): New.
7265         (_initialize_record_btrace): Initialize set/show record btrace cpu
7266         commands.
7267         * record-btrace.h (record_btrace_get_cpu): New.
7268
7269 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
7270
7271         * record.c (set_record_command): Fix typo in message.
7272
7273 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
7274
7275         * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
7276
7277 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
7278
7279         * infrun.c (process_event_stop_test): Call
7280         gdbarch_in_indirect_branch_thunk.
7281         * gdbarch.sh (in_indirect_branch_thunk): New.
7282         * gdbarch.c: Regenerated.
7283         * gdbarch.h: Regenerated.
7284         * x86-tdep.h: New.
7285         * x86-tdep.c: New.
7286         * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
7287         (HFILES_NO_SRCDIR): Add x86-tdep.h.
7288         (ALLDEPFILES): Add x86-tdep.c.
7289         * arch-utils.h (default_in_indirect_branch_thunk): New.
7290         * arch-utils.c (default_in_indirect_branch_thunk): New.
7291         * i386-tdep: Include x86-tdep.h.
7292         (i386_in_indirect_branch_thunk): New.
7293         (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
7294         function.
7295         * amd64-tdep: Include x86-tdep.h.
7296         (amd64_in_indirect_branch_thunk): New.
7297         (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
7298
7299 2018-04-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
7300
7301         PR gdb/23053
7302         * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
7303         (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
7304         (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
7305         regression.
7306
7307 2018-04-12  Tom Tromey  <tom@tromey.com>
7308
7309         * rust-lang.c (rust_print_struct_def): Remove univariant code.
7310         (rust_evaluate_subexp): Likewise.
7311
7312 2018-04-12  Pedro Alves  <palves@redhat.com>
7313
7314         * procfs.c (procfs_detach): Make forward declaration's prototype
7315         match definition's protototype.
7316         (proc_get_LDT_entry): Remove stale do_cleanups call.
7317
7318 2018-04-12  Pedro Alves  <palves@redhat.com>
7319
7320         * target.h (target_ops::to_has_exited): Delete.
7321         (target_has_exited): Delete.
7322         * target-delegates.c: Regenerate.
7323
7324 2018-04-11  Pedro Alves  <palves@redhat.com>
7325
7326         * target.c (fileio_fh_t::t): Add comment.
7327         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
7328         (target_fileio_close): Handle a NULL target.
7329         (invalidate_fileio_fh): New.
7330         (target_close): Call it.
7331         * remote.c (remote_hostio_send_command): No longer check whether
7332         remote_desc is open.
7333
7334 2018-04-11  Pedro Alves  <palves@redhat.com>
7335
7336         * target.c (fileio_fh_t): Make it a named struct instead of a
7337         typedef.
7338         (fileio_fh_t::is_closed): New method.
7339         (DEF_VEC_O (fileio_fh_t)): Remove.
7340         (fileio_fhandles): Now a std::vector.
7341         (is_closed_fileio_fh): Delete.
7342         (acquire_fileio_fd): Adjust.  Rename parameters.
7343         (release_fileio_fd): Adjust.
7344         (fileio_fd_to_fh): Reimplement as a function instead of a macro.
7345         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
7346         (target_fileio_close): Adjust.
7347
7348 2018-04-10  Simon Marchi  <simon.marchi@ericsson.com>
7349
7350         * auto-load.c (auto_load_safe_path_vec_update): Iterate by
7351         index.
7352
7353 2018-04-10  Pedro Alves  <palves@redhat.com>
7354
7355         * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
7356         (scoped_finish_thread_state): New class.
7357         * infcmd.c (run_command_1): Use it instead of finish_thread_state
7358         cleanup.
7359         * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
7360         (fetch_inferior_event, normal_stop): Likewise.
7361         * thread.c (finish_thread_state_cleanup): Delete.
7362
7363 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
7364             Pedro Alves  <palves@redhat.com>
7365
7366         * value.c: Include "selftest.h" and "common/array-view.h".
7367         (struct range) <operator ==>: New.
7368         (test_ranges_contain): New.
7369         (check_ranges_vector): New.
7370         (test_insert_into_bit_range_vector): New.
7371         (_initialize_values): Register selftests.
7372         * common/array-view.h (operator==, operator!=): New.
7373
7374 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
7375
7376         * common/gdb_vecs.h (unordered_remove): Add overload that takes
7377         an iterator.
7378         * inline-frame.c: Include <algorithm>.
7379         (struct inline_state): Add constructor.
7380         (inline_state_s): Remove.
7381         (DEF_VEC_O(inline_state_s)): Remove.
7382         (inline_states): Change type to std::vector.
7383         (find_inline_frame_state): Adjust to std::vector.
7384         (allocate_inline_frame_state): Remove.
7385         (clear_inline_frame_state): Adjust to std::vector.
7386         (skip_inline_frames): Adjust to std::vector.
7387
7388 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
7389
7390         * tracepoint.h (struct trace_state_variable): Add constructor.
7391         <name>: Change type to std::string.
7392         * tracepoint.c (tsv_s): Remove.
7393         (DEF_VEC_O(tsv_s)): Remove.
7394         (tvariables): Change to std::vector.
7395         (create_trace_state_variable): Adjust to std::vector.
7396         (find_trace_state_variable): Likewise.
7397         (find_trace_state_variable_by_number): Likewise.
7398         (delete_trace_state_variable): Likewise.
7399         (trace_variable_command): Adjust to std::string.
7400         (delete_trace_variable_command): Likewise.
7401         (tvariables_info_1): Adjust to std::vector.
7402         (save_trace_state_variables): Likewise.
7403         (start_tracing): Likewise.
7404         (merge_uploaded_trace_state_variables): Adjust to std::vector
7405         and std::string.
7406         * target.h (struct target_ops)
7407         <to_download_trace_state_variable>: Pass reference to
7408         trace_state_variable.
7409         * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
7410         * target-delegates.c: Re-generate.
7411         * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
7412         (mi_tsv_deleted): Likewise.
7413         * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
7414         * remote.c (remote_download_trace_state_variable): Change
7415         pointer to reference and adjust.
7416         * make-target-delegates (parse_argtypes): Handle references.
7417         (write_function_header): Likewise.
7418         (munge_type): Likewise.
7419
7420 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
7421
7422         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7423         string_view-selftests.c.
7424         * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
7425         testsuite.
7426         * unittests/basic_string_view/cons/char/1.cc: Likewise.
7427         * unittests/basic_string_view/cons/char/2.cc: Likewise.
7428         * unittests/basic_string_view/cons/char/3.cc: Likewise.
7429         * unittests/basic_string_view/element_access/char/1.cc:
7430         Likewise.
7431         * unittests/basic_string_view/element_access/char/empty.cc:
7432         Likewise.
7433         * unittests/basic_string_view/element_access/char/front_back.cc:
7434         Likewise.
7435         * unittests/basic_string_view/inserters/char/2.cc: Likewise.
7436         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
7437         Likewise.
7438         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
7439         Likewise.
7440         * unittests/basic_string_view/modifiers/swap/char/1.cc:
7441         Likewise.
7442         * unittests/basic_string_view/operations/compare/char/1.cc:
7443         Likewise.
7444         * unittests/basic_string_view/operations/compare/char/13650.cc:
7445         Likewise.
7446         * unittests/basic_string_view/operations/copy/char/1.cc:
7447         Likewise.
7448         * unittests/basic_string_view/operations/data/char/1.cc:
7449         Likewise.
7450         * unittests/basic_string_view/operations/find/char/1.cc:
7451         Likewise.
7452         * unittests/basic_string_view/operations/find/char/2.cc:
7453         Likewise.
7454         * unittests/basic_string_view/operations/find/char/3.cc:
7455         Likewise.
7456         * unittests/basic_string_view/operations/find/char/4.cc:
7457         Likewise.
7458         * unittests/basic_string_view/operations/rfind/char/1.cc:
7459         Likewise.
7460         * unittests/basic_string_view/operations/rfind/char/2.cc:
7461         Likewise.
7462         * unittests/basic_string_view/operations/rfind/char/3.cc:
7463         Likewise.
7464         * unittests/basic_string_view/operations/substr/char/1.cc:
7465         Likewise.
7466         * unittests/basic_string_view/operators/char/2.cc: Likewise.
7467         * unittests/string_view-selftests.c: New file.
7468
7469 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
7470
7471         * unittests/basic_string_view/capacity/1.cc: New file.
7472         * unittests/basic_string_view/capacity/empty_neg.cc: New file.
7473         * unittests/basic_string_view/cons/char/1.cc: New file.
7474         * unittests/basic_string_view/cons/char/2.cc: New file.
7475         * unittests/basic_string_view/cons/char/3.cc: New file.
7476         * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
7477         * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
7478         * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
7479         * unittests/basic_string_view/element_access/char/1.cc: New file.
7480         * unittests/basic_string_view/element_access/char/2.cc: New file.
7481         * unittests/basic_string_view/element_access/char/empty.cc: New file.
7482         * unittests/basic_string_view/element_access/char/front_back.cc: New file.
7483         * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
7484         * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
7485         * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
7486         * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
7487         * unittests/basic_string_view/include.cc: New file.
7488         * unittests/basic_string_view/inserters/char/1.cc: New file.
7489         * unittests/basic_string_view/inserters/char/2.cc: New file.
7490         * unittests/basic_string_view/inserters/char/3.cc: New file.
7491         * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
7492         * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
7493         * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
7494         * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
7495         * unittests/basic_string_view/literals/types.cc: New file.
7496         * unittests/basic_string_view/literals/values.cc: New file.
7497         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
7498         * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
7499         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
7500         * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
7501         * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
7502         * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
7503         * unittests/basic_string_view/operations/compare/char/1.cc: New file.
7504         * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
7505         * unittests/basic_string_view/operations/compare/char/2.cc: New file.
7506         * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
7507         * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
7508         * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
7509         * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
7510         * unittests/basic_string_view/operations/copy/char/1.cc: New file.
7511         * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
7512         * unittests/basic_string_view/operations/data/char/1.cc: New file.
7513         * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
7514         * unittests/basic_string_view/operations/find/char/1.cc: New file.
7515         * unittests/basic_string_view/operations/find/char/2.cc: New file.
7516         * unittests/basic_string_view/operations/find/char/3.cc: New file.
7517         * unittests/basic_string_view/operations/find/char/4.cc: New file.
7518         * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
7519         * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
7520         * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
7521         * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
7522         * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
7523         * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
7524         * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
7525         * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
7526         * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
7527         * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
7528         * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
7529         * unittests/basic_string_view/operations/substr/char/1.cc: New file.
7530         * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
7531         * unittests/basic_string_view/operators/char/2.cc: New file.
7532         * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
7533         * unittests/basic_string_view/range_access/char/1.cc: New file.
7534         * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
7535         * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
7536         * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
7537         * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
7538         * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
7539         * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
7540         * unittests/basic_string_view/requirements/typedefs.cc: New file.
7541         * unittests/basic_string_view/typedefs.cc: New file.
7542         * unittests/basic_string_view/types/1.cc: New file.
7543
7544 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
7545
7546         * common/gdb_string_view.h: Remove libstdc++ implementation
7547         details, adjust to gdb reality.
7548         * common/gdb_string_view.tcc: Likewise.
7549         * cli/cli-script.c (struct string_view): Remove.
7550         (user_args) <m_args>: Change element type to gdb::string_view.
7551         (user_args::insert_args): Adjust.
7552
7553 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
7554
7555         * common/gdb_string_view.h: New file.
7556         * common/gdb_string_view.tcc: New file.
7557
7558 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
7559
7560         * ax_cxx_compile_stdcxx.m4: Sync with upstream.
7561         * configure: Re-generate.
7562
7563 2018-04-09  Pedro Alves  <palves@redhat.com>
7564
7565         * gdbarch.sh: Include "observable.h" instead of "observer.h".
7566         (set_target_gdbarch): Call
7567         gdb::observers::architecture_changed.notify instead of
7568         observer_notify_architecture_changed.
7569
7570 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
7571
7572         * tracepoint.c (struct current_traceframe_cleanup): Remove.
7573         (do_restore_current_traceframe_cleanup): Remove.
7574         (restore_current_traceframe_cleanup_dtor): Remove.
7575         (make_cleanup_restore_current_traceframe): Remove.
7576         (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
7577         New.
7578         * tracepoint.h (struct scoped_restore_current_traceframe): New.
7579         * infrun.c (fetch_inferior_event): Use
7580         scoped_restore_current_traceframe.
7581
7582 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
7583
7584         * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
7585         Remove.
7586         <n_allocated_type_units>: Remove.
7587         <all_type_units>: Change to std::vector.
7588         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
7589         to std::vector change.
7590         (dwarf2_per_objfile::get_cutu): Likewise.
7591         (dwarf2_per_objfile::get_tu): Likewise.
7592         (create_signatured_type_table_from_index): Likewise.
7593         (create_signatured_type_table_from_debug_names): Likewise.
7594         (dw2_symtab_iter_next): Likewise.
7595         (dw2_print_stats): Likewise.
7596         (dw2_expand_all_symtabs): Likewise.
7597         (dw2_expand_marked_cus): Likewise.
7598         (dw2_debug_names_iterator::next): Likewise.
7599         (dwarf2_initialize_objfile): Likewise.
7600         (add_signatured_type_cu_to_table): Likewise.
7601         (create_all_type_units): Likewise.
7602         (add_type_unit): Likewise.
7603         (struct tu_abbrev_offset): Add constructor.
7604         (build_type_psymtabs_1): Adjust to std::vector change.
7605         (print_tu_stats): Likewise.
7606         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
7607         (write_debug_names): Likewise.
7608
7609 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
7610
7611         * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
7612         Make an std::vector.
7613         <n_comp_units>: Remove.
7614         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
7615         to std::vector change.
7616         (dwarf2_per_objfile::get_cutu): Likewise.
7617         (dwarf2_per_objfile::get_cu): Likewise.
7618         (create_cus_from_index): Likewise.
7619         (create_addrmap_from_index): Likewise.
7620         (create_addrmap_from_aranges): Likewise.
7621         (dwarf2_read_index): Likewise.
7622         (dw2_find_last_source_symtab): Likewise.
7623         (dw2_map_symtabs_matching_filename): Likewise.
7624         (dw2_symtab_iter_next): Likewise.
7625         (dw2_print_stats): Likewise.
7626         (dw2_expand_all_symtabs): Likewise.
7627         (dw2_expand_symtabs_with_fullname): Likewise.
7628         (dw2_expand_marked_cus): Likewise.
7629         (dw2_map_symbol_filenames): Likewise.
7630         (create_cus_from_debug_names): Likewise.
7631         (dwarf2_read_debug_names): Likewise.
7632         (dw2_debug_names_iterator::next): Likewise.
7633         (dwarf2_initialize_objfile): Likewise.
7634         (set_partial_user): Likewise.
7635         (dwarf2_build_psymtabs_hard): Likewise.
7636         (read_comp_units_from_section): Remove arguments, adjust to
7637         std::vector change.
7638         (create_all_comp_units): Adjust to std::vector and
7639         read_comp_units_from_section changes.
7640         (dwarf2_find_containing_comp_unit): Adjust to std::vector
7641         change.
7642         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
7643         (psyms_seen_size): Likewise.
7644         (write_gdbindex): Likewise.
7645         (write_debug_names): Likewise.
7646
7647 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
7648
7649         * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
7650         with dwarf2_per_objfile.
7651         (create_cus_from_index): Likewise.
7652         (create_signatured_type_table_from_index): Likewise.
7653         (dwarf2_read_index): Likewise.
7654         (dwarf2_initialize_objfile): Likewise.
7655         (dwarf2_fetch_die_loc_sect_off):  Get dwarf2_per_objfile from
7656         per_cu rather than get_dwarf2_per_objfile.
7657
7658 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
7659
7660         * dwarf2read.h (struct signatured_type): Forward declare.
7661         (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
7662         New methods.
7663         * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
7664         (dw2_get_cutu): ...this.
7665         (dwarf2_per_objfile::get_cu): Rename from...
7666         (dw2_get_cu): ...this.
7667         (dwarf2_per_objfile::get_tu): New.
7668         (create_addrmap_from_index): Adjust.
7669         (create_addrmap_from_aranges): Adjust.
7670         (dw2_find_last_source_symtab): Adjust.
7671         (dw2_map_symtabs_matching_filename): Adjust.
7672         (dw2_symtab_iter_next): Adjust.
7673         (dw2_print_stats): Adjust.
7674         (dw2_expand_all_symtabs): Adjust.
7675         (dw2_expand_symtabs_with_fullname): Adjust.
7676         (dw2_expand_marked_cus): Adjust.
7677         (dw_expand_symtabs_matching_file_matcher): Adjust.
7678         (dw2_map_symbol_filenames): Adjust.
7679         (dw2_debug_names_iterator::next): Adjust.
7680         (dwarf2_initialize_objfile): Adjust.
7681         (set_partial_user): Adjust.
7682         (dwarf2_build_psymtabs_hard): Adjust.
7683
7684 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
7685
7686         * dwarf2read.c (create_signatured_type_table_from_debug_names):
7687         Remove unused variables.
7688         (dw2_map_symtabs_matching_filename): Likewise.
7689         (dwarf2_record_block_ranges): Likewise.
7690         (dwarf2_read_addr_index): Likewise.
7691         (follow_die_offset): Likewise.
7692
7693 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
7694
7695         * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
7696         to symbol_file_add_main.
7697
7698 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
7699
7700         PR mi/22299
7701         * mi/mi-console.c (do_fputc_async_safe): New.
7702         (mi_console_file::write_async_safe): New.
7703         (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
7704         * mi/mi-console.h (class mi_console_file) <write_async_safe>:
7705         New.
7706         * ui-file.c (ui_file::putstrn): Adjust call to
7707         fputstrn_unfiltered.
7708         * utils.c (printchar): Replace do_fputs and do_fprintf
7709         parameters by do_fputc.
7710         (fputstr_filtered): Adjust call to printchar.
7711         (fputstr_unfiltered): Likewise.
7712         (fputstrn_filtered): Likewise.
7713         (fputstrn_unfiltered): Add do_fputc parameter, pass to
7714         printchar.
7715         * utils.h (do_fputc_ftype): New typedef.
7716         (fputstrn_unfiltered): Add do_fputc parameter.
7717
7718 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
7719
7720         * regformats/i386/i386-avx.dat: Remove.
7721
7722 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
7723
7724         PR gdb/22979
7725         * amd64-tdep.c (amd64_none_init_abi): New function.
7726         (amd64_x32_none_init_abi): New function.
7727         (_initialize_amd64_tdep): Register handlers for x86-64 and
7728         x64_32 with GDB_OSABI_NONE.
7729         * osabi.c (gdbarch_init_osabi): Allow running handlers for the
7730         GDB_OSABI_NONE osabi.
7731
7732 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
7733
7734         PR gdb/22980
7735         * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
7736         GDB_OSABI_NONE.
7737         * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
7738         * osabi.c (gdb_osabi_names): Add "unknown" entry.
7739
7740 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
7741
7742         * common/byte-vector.h (char_vector): New type.
7743         * target.h (target_read_alloc): Return
7744         gdb::optional<byte_vector>.
7745         (target_read_stralloc): Return gdb::optional<char_vector>.
7746         (target_get_osdata): Return gdb::optional<char_vector>.
7747         * target.c (target_read_alloc_1): Templatize.  Replacement
7748         manual memory management with vector.
7749         (target_read_alloc): Change return type, adjust.
7750         (target_read_stralloc): Change return type, adjust.
7751         (target_get_osdata): Change return type, adjust.
7752         * auxv.c (struct auxv_info) <length>: Remove.
7753         <data>: Change type to gdb::optional<byte_vector>.
7754         (auxv_inferior_data_cleanup): Free auxv_info with delete.
7755         (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
7756         (target_auxv_search): Adjust.
7757         (fprint_target_auxv): Adjust.
7758         * avr-tdep.c (avr_io_reg_read_command): Adjust.
7759         * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
7760         (linux_make_corefile_notes): Adjust.
7761         * osdata.c (get_osdata): Adjust.
7762         * remote.c (remote_get_threads_with_qxfer): Adjust.
7763         (remote_memory_map): Adjust.
7764         (remote_traceframe_info): Adjust.
7765         (btrace_read_config): Adjust.
7766         (remote_read_btrace): Adjust.
7767         (remote_pid_to_exec_file): Adjust.
7768         * solib-aix.c (solib_aix_get_library_list): Adjust.
7769         * solib-dsbt.c (decode_loadmap): Don't free buf.
7770         (dsbt_get_initial_loadmaps): Adjust.
7771         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
7772         * solib-target.c (solib_target_current_sos): Adjust.
7773         * tracepoint.c (sdata_make_value): Adjust.
7774         * xml-support.c (xinclude_start_include): Adjust.
7775         (xml_fetch_content_from_file): Adjust.
7776         * xml-support.h (xml_fetch_another): Change return type.
7777         (xml_fetch_content_from_file): Change return type.
7778         * xml-syscall.c (xml_init_syscalls_info): Adjust.
7779         * xml-tdesc.c (file_read_description_xml): Adjust.
7780         (fetch_available_features_from_target): Change return type.
7781         (target_fetch_description_xml): Adjust.
7782         (target_read_description_xml): Adjust.
7783
7784 2018-04-06  Tom Tromey  <tom@tromey.com>
7785
7786         * value.c (~value): Update.
7787         (struct value) <contents>: Now unique_xmalloc_ptr.
7788         (value_contents_bits_eq, allocate_value_contents)
7789         (value_contents_raw, value_contents_all_raw)
7790         (value_contents_for_printing, value_contents_for_printing_const)
7791         (set_value_enclosing_type): Update.
7792
7793 2018-04-06  Tom Tromey  <tom@tromey.com>
7794
7795         * value.c (range_s): Remove typedef, VEC.
7796         (struct range): Add operator<.
7797         (range_lessthan): Remove.
7798         (ranges_contain): Change type.
7799         (~value): Update.
7800         (struct value) <unavailable, optimized_out>: Now std::vector.
7801         (value_entirely_available)
7802         (value_entirely_covered_by_range_vector)
7803         (value_entirely_unavailable, value_entirely_optimized_out):
7804         Update.
7805         (insert_into_bit_range_vector): Change argument type.
7806         (find_first_range_overlap): Likewise.
7807         (struct ranges_and_idx, value_contents_bits_eq)
7808         (require_not_optimized_out, require_available): Update.
7809         (ranges_copy_adjusted): Change argument types.
7810         (value_optimized_out, value_copy, value_fetch_lazy): Update.
7811
7812 2018-04-06  Tom Tromey  <tom@tromey.com>
7813
7814         * value.c (~value): Update.
7815         (struct value) <parent>: Now a value_ref_ptr.
7816         (value_parent, set_value_parent, value_address, value_copy):
7817         Update.
7818
7819 2018-04-06  Tom Tromey  <tom@tromey.com>
7820
7821         * value.c (struct value): Add constructor, destructor, and member
7822         initializers.
7823         (allocate_value_lazy, value_decref): Update.
7824
7825 2018-04-06  Tom Tromey  <tom@tromey.com>
7826
7827         * value.c (struct value) <released, next>: Remove.
7828         (all_values): Now a std::vector.
7829         (allocate_value_lazy): Update.
7830         (value_next): Remove.
7831         (value_mark, value_free_to_mark, release_value)
7832         (value_release_to_mark): Update.
7833
7834 2018-04-06  Tom Tromey  <tom@tromey.com>
7835
7836         * value.h (fetch_subexp_value, value_release_to_mark): Update.
7837         (free_value_chain): Remove.
7838         * value.c (free_value_chain): Remove.
7839         (value_release_to_mark): Return a std::vector.
7840         * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
7841         std::vector.
7842         (check_condition): Update.
7843         * eval.c (fetch_subexp_value): Change "val_chain" to a
7844         std::vector.
7845         * breakpoint.c (update_watchpoint): Update.
7846         (can_use_hardware_watchpoint): Change "vals" to a std::vector.
7847
7848 2018-04-06  Tom Tromey  <tom@tromey.com>
7849
7850         * value.h (free_all_values): Remove.
7851         * value.c (free_all_values): Remove.
7852
7853 2018-04-06  Tom Tromey  <tom@tromey.com>
7854
7855         * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
7856         (value_history_chain, value_history_count): Remove.
7857         (value_history): New global.
7858         (record_latest_value, access_value_history, show_values)
7859         (preserve_values): Update.
7860
7861 2018-04-06  Tom Tromey  <tom@tromey.com>
7862
7863         * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
7864         * varobj.c (varobj_set_display_format, varobj_set_value)
7865         (install_default_visualizer, construct_visualizer)
7866         (install_new_value, ~varobj, varobj_get_value_type)
7867         (my_value_of_variable, varobj_editable_p): Update.
7868         * c-varobj.c (c_describe_child, c_value_of_variable)
7869         (cplus_number_of_children, cplus_describe_child): Update.
7870         * ada-varobj.c (ada_number_of_children, ada_name_of_child)
7871         (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
7872         (ada_value_of_variable, ada_value_is_changeable_p): Update.
7873
7874 2018-04-06  Tom Tromey  <tom@tromey.com>
7875
7876         * printcmd.c (last_examine_address): Change type to
7877         value_ref_ptr.
7878         (do_examine, x_command): Update.
7879
7880 2018-04-06  Tom Tromey  <tom@tromey.com>
7881
7882         * value.c (release_value): Update.
7883         * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
7884         (struct bpstats) <val>: Now a value_ref_ptr.
7885         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
7886         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
7887         (~watchpoint, print_it_watchpoint, watch_command_1)
7888         (invalidate_bp_value_on_memory_change): Update.
7889
7890 2018-04-06  Tom Tromey  <tom@tromey.com>
7891
7892         * varobj.c (varobj_clear_saved_item)
7893         (update_dynamic_varobj_children, install_new_value, ~varobj):
7894         Update.
7895         * value.h (value_incref): Move declaration earlier.
7896         (value_decref): Rename from value_free.
7897         (struct value_ref_policy): New.
7898         (value_ref_ptr): New typedef.
7899         (struct value_deleter): Remove.
7900         (gdb_value_up): Remove typedef.
7901         (release_value): Change return type.
7902         (release_value_or_incref): Remove.
7903         * value.c (set_value_parent): Update.
7904         (value_incref): Change return type.
7905         (value_decref): Rename from value_free.
7906         (value_free_to_mark, free_all_values, free_value_chain): Update.
7907         (release_value): Return value_ref_ptr.
7908         (release_value_or_incref): Remove.
7909         (record_latest_value, set_internalvar, clear_internalvar):
7910         Update.
7911         * stack.c (info_frame_command): Don't call value_free.
7912         * python/py-value.c (valpy_dealloc, valpy_new)
7913         (value_to_value_object): Update.
7914         * printcmd.c (do_examine): Update.
7915         * opencl-lang.c (lval_func_free_closure): Update.
7916         * mi/mi-main.c (register_changed_p): Don't call value_free.
7917         * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
7918         * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
7919         * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
7920         value_free.
7921         * guile/scm-value.c (vlscm_free_value_smob)
7922         (vlscm_scm_from_value): Update.
7923         * frame.c (frame_register_unwind, frame_unwind_register_signed)
7924         (frame_unwind_register_unsigned, get_frame_register_bytes)
7925         (put_frame_register_bytes): Don't call value_free.
7926         * findvar.c (address_from_register): Don't call value_free.
7927         * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
7928         * dwarf2loc.c (entry_data_value_free_closure)
7929         (value_of_dwarf_reg_entry, free_pieced_value_closure)
7930         (dwarf2_evaluate_loc_desc_full): Update.
7931         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
7932         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
7933         (~watchpoint, watch_command_1)
7934         (invalidate_bp_value_on_memory_change): Update.
7935         * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
7936
7937 2018-04-06  Simon Marchi  <simon.marchi@polymtl.ca>
7938
7939         PR gdb/23022
7940         * warning.m4: Add -Wno-error=deprecated-register.
7941         * configure: Re-generate.
7942
7943 2018-04-05  Tom Tromey  <tom@tromey.com>
7944
7945         * linespec.h: Remove include of "vec.h".
7946
7947 2018-04-05  Tom Tromey  <tom@tromey.com>
7948
7949         * linespec.c (typep): Remove typedef.
7950         (find_methods, find_superclass_methods): Take a std::vector.
7951         (find_method): Use std::vector.
7952
7953 2018-04-05  Tom Tromey  <tom@tromey.com>
7954
7955         * utils.c (compare_strings): Remove.
7956         * utils.h (compare_strings): Remove.
7957         * objc-lang.h (find_imps): Update.
7958         * objc-lang.c (find_methods): Take a std::vector.
7959         (uniquify_strings, find_imps): Likewise.
7960         * linespec.c (find_methods): Take a std::vector.
7961         (decode_objc): Use std::vector.
7962         (add_all_symbol_names_from_pspace, find_superclass_methods): Take
7963         a std::vector.
7964         (find_method, find_function_symbols): Use std::vector.
7965
7966 2018-04-05  Tom Tromey  <tom@tromey.com>
7967
7968         * completer.c (completion_tracker::completion_tracker): Remove
7969         cast.
7970         (completion_tracker::discard_completions): Likewise.
7971         * breakpoint.c (ambiguous_names_p): Remove cast.
7972         * ada-lang.c (_initialize_ada_language): Remove cast.
7973         * utils.h (streq): Update.
7974         (streq_hash): Add new declaration.
7975         * utils.c (streq): Return bool.
7976         (streq_hash): New function.
7977
7978 2018-04-05  Tom Tromey  <tom@tromey.com>
7979
7980         * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
7981         Remove a string copy.
7982
7983 2018-04-05  Tom Tromey  <tom@tromey.com>
7984
7985         * linespec.c (filter_results): Use std::vector.
7986         (decode_line_2, decode_line_full): Update.
7987
7988 2018-04-05  Tom Tromey  <tom@tromey.com>
7989
7990         * linespec.c (canonical_to_fullform): Return std::string.
7991         (filter_results): Update.
7992         (struct decode_line_2_item): Add constructor.
7993         <fullform, displayform>: Now std::string.
7994         (decode_line_2_compare_items): Now a std::sort comparator.
7995         (decode_line_2): Update.
7996
7997 2018-04-05  Tom Tromey  <tom@tromey.com>
7998
7999         * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
8000         (unexpected_linespec_error): Update.
8001         (linespec_parse_basic, parse_linespec): Update.
8002
8003 2018-04-05  Tom Tromey  <tom@tromey.com>
8004
8005         * linespec.c (linespec_parse_basic): Reindent.
8006
8007 2018-04-05  Tom Tromey  <tom@tromey.com>
8008
8009         * minsyms.h (iterate_over_minimal_symbols): Update.
8010         * minsyms.c (iterate_over_minimal_symbols): Take a
8011         gdb::function_view.
8012         * linespec.c (struct collect_minsyms): Remove.
8013         (compare_msyms): Now a std::sort comparator.
8014         (add_minsym): Add parameters.
8015         (search_minsyms_for_name): Update.  Use std::vector.
8016
8017 2018-04-03  Tom Tromey  <tom@tromey.com>
8018
8019         * mipsread.c (read_alphacoff_dynamic_symtab): Use
8020         gdb::byte_vector.
8021
8022 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
8023
8024         * MAINTAINERS (Write After Approval): Add Weimin Pan.
8025
8026 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
8027
8028         PR gdb/16959
8029         * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when 
8030         printing static type.
8031
8032 2018-04-01  Tom Tromey  <tom@tromey.com>
8033
8034         * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
8035         (rs6000_xfer_shared_libraries): Update.
8036
8037 2018-04-01  Simon Marchi  <simon.marchi@polymtl.ca>
8038
8039         * common/gdb_vecs.h (char_ptr): Remove.
8040         * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
8041
8042 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
8043
8044         * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
8045         with std::vector.
8046         * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
8047
8048 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
8049
8050         * tracepoint.h (struct uploaded_tp): Initialize fields.
8051         <actions, step_actions, cmd_strings>: Change type to
8052         std::vector<char *>.
8053         * tracepoint.c (get_uploaded_tp): Allocate with new.
8054         (free_uploaded_tps): Free with delete.
8055         (parse_tracepoint_definition): Adjust to std::vector change.
8056         * breakpoint.c (read_uploaded_action): Likewise.
8057         (create_tracepoint_from_upload): Likewise.
8058         * ctf.c (ctf_write_uploaded_tp): Likewise.
8059         (SET_ARRAY_FIELD): Likewise.
8060         * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
8061
8062 2018-03-30  Tom Tromey  <tom@tromey.com>
8063
8064         * solib-svr4.c (lm_info_read): Use gdb::byte_vector.  Return
8065         std::unique_ptr.
8066         (svr4_keep_data_in_core): Update.
8067         (svr4_read_so_list): Update.
8068
8069 2018-03-30  Tom Tromey  <tom@tromey.com>
8070
8071         * windows-nat.c (handle_output_debug_string, handle_exception):
8072         Update.
8073         * target.h (target_read_string): Update.
8074         * target.c (target_read_string): Change "string" to
8075         unique_xmalloc_ptr.
8076         * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
8077         Update.
8078         * solib-frv.c (frv_current_sos): Update.
8079         * solib-dsbt.c (dsbt_current_sos): Update.
8080         * solib-darwin.c (darwin_current_sos): Update.
8081         * linux-thread-db.c (inferior_has_bug): Update.
8082         * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
8083         Update.  Remove alloca.
8084         * ada-lang.c (ada_main_name): Update.
8085
8086 2018-03-30  Tom Tromey  <tom@tromey.com>
8087
8088         * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
8089         (struct dwo_file_deleter): New.
8090         (dwo_file_up): New typedef.
8091         (open_and_init_dwo_file): Use dwo_file_up.
8092         (free_dwo_file_cleanup): Remove.
8093
8094 2018-03-30  Tom Tromey  <tom@tromey.com>
8095
8096         * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
8097         (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
8098
8099 2018-03-30  Tom Tromey  <tom@tromey.com>
8100
8101         * dwarf2read.c (class free_cached_comp_units): New class.
8102         (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
8103         (free_cached_comp_units): Remove function.
8104
8105 2018-03-30  Tom Tromey  <tom@tromey.com>
8106
8107         * utils.h (make_cleanup_unpush_target): Remove.
8108         * inf-ptrace.c (struct target_unpusher): New.
8109         (target_unpush_up) New typedef.
8110         (inf_ptrace_create_inferior, inf_ptrace_attach): Use
8111         target_unpush_up.
8112         * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
8113
8114 2018-03-27  Tom Tromey  <tom@tromey.com>
8115
8116         * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
8117
8118 2018-03-27  Pedro Alves  <palves@redhat.com>
8119             Tom Tromey  <tom@tromey.com>
8120
8121         * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
8122         destructor.  Now a class.
8123         (gdb_readline_wrapper_cleanup): Remove function.
8124         (gdb_readline_wrapper): Remove cleanups.
8125
8126 2018-03-27  Tom Tromey  <tom@tromey.com>
8127
8128         * typeprint.h (struct type_print_options) <local_typedefs,
8129         global_typedefs>: Remove "struct" keyword.
8130         (class typedef_hash_table): New class.
8131         (recursively_update_typedef_hash, add_template_parameters)
8132         (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
8133         (find_typedef_in_hash): Don't declare.
8134         * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
8135         (typedef_hash_table::recursively_update): Rename from
8136         recursively_update_typedef_hash.  Now a member.
8137         (typedef_hash_table::add_template_parameters): Rename from
8138         add_template_parameters.  Now a member.
8139         (typedef_hash_table::typedef_hash_table): Now a constructor;
8140         rename from create_typedef_hash.
8141         (typedef_hash_table::~typedef_hash_table): Now a destructor;
8142         rename from free_typedef_hash.
8143         (do_free_typedef_hash, make_cleanup_free_typedef_hash)
8144         (do_free_global_table): Remove.
8145         (typedef_hash_table::typedef_hash_table): New constructor; renamed
8146         from copy_type_recursive.
8147         (create_global_typedef_table): Remove.
8148         (typedef_hash_table::find_global_typedef): Now a member of
8149         typedef_hash_table.
8150         (typedef_hash_table::find_typedef): Rename from
8151         find_typedef_in_hash; now a member.
8152         (whatis_exp): Update.
8153         * extension.h (struct ext_lang_type_printers): Add constructor and
8154         destructor.
8155         (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
8156         declare.
8157         * extension.c (ext_lang_type_printers::ext_lang_type_printers):
8158         Now a constructor; rename from start_ext_lang_type_printers.
8159         (ext_lang_type_printers): Now a destructor; rename from
8160         free_ext_lang_type_printers.
8161         * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
8162         Update.
8163         (c_type_print_base_struct_union): Update.  Remove cleanups.
8164
8165 2018-03-27  Tom Tromey  <tom@tromey.com>
8166
8167         * dwarf-index-write.c: Include <cmath>.
8168
8169 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
8170
8171         * NEWS: Add entry describing new "set|show varsize-limit" command.
8172         * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
8173         command.
8174         * printcmd.c (_initialize_printcmd): Add "set var" alias of
8175         "set variable".
8176
8177 2018-03-27  Simon Marchi  <simon.marchi@ericsson.com>
8178
8179         * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
8180         dwarf-index-write.c
8181         (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
8182         * dwarf-index-common.c: New file.
8183         * dwarf-index-common.h: New file.
8184         * dwarf-index-write.c: New file.
8185         * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
8186         (struct dwarf2_section_info): Move from here.
8187         (dwarf2_section_info_def): Likewise.
8188         (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
8189         (offset_type): Likewise.
8190         (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
8191         (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
8192         (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
8193         (byte_swap): Likewise.
8194         (MAYBE_SWAP): Likewise.
8195         (dwarf2_per_cu_ptr): Likewise.
8196         (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
8197         (struct tu_stats): Likewise.
8198         (struct dwarf2_per_objfile): Likewise.
8199         (struct dwarf2_per_cu_data): Likewise.
8200         (struct signatured_type): Likewise.
8201         (sig_type_ptr): Likewise.
8202         (DEF_VEC_P (sig_type_ptr)): Likewise.
8203         (INDEX4_SUFFIX): Likewise.
8204         (INDEX5_SUFFIX): Likewise.
8205         (DEBUG_STR_SUFFIX): Likewise.
8206         (dwarf2_read_section): Make non-static.
8207         (mapped_index_string_hash): Move from here.
8208         (dwarf5_djb_hash): Likewise.
8209         (file_write): Likewise.
8210         (class data_buf): Likewise.
8211         (struct symtab_index_entry): Likewise.
8212         (struct mapped_symtab): Likewise.
8213         (find_slot): Likewise.
8214         (hash_expand): Likewise.
8215         (add_index_entry): Likewise.
8216         (uniquify_cu_indices): Likewise.
8217         (class c_str_view): Likewise.
8218         (class c_str_view_hasher): Likewise.
8219         (class vector_hasher): Likewise.
8220         (write_hash_table): Likewise.
8221         (psym_index_map): Likewise.
8222         (struct addrmap_index_data): Likewise.
8223         (add_address_entry): Likewise.
8224         (add_address_entry_worker): Likewise.
8225         (write_address_map): Likewise.
8226         (symbol_kind): Likewise.
8227         (write_psymbols): Likewise.
8228         (struct signatured_type_index_data): Likewise.
8229         (write_one_signatured_type): Likewise.
8230         (recursively_count_psymbols): Likewise.
8231         (recursively_write_psymbols): Likewise.
8232         (class debug_names): Likewise.
8233         (check_dwarf64_offsets): Likewise.
8234         (psyms_seen_size): Likewise.
8235         (write_gdbindex): Likewise.
8236         (write_debug_names): Likewise.
8237         (assert_file_size): Likewise.
8238         (write_psymtabs_to_index): Likewise.
8239         (save_gdb_index_command): Likewise.
8240         (_initialize_dwarf2_read): Don't register the "save gdb-index"
8241         command.
8242         * dwarf2read.h: New file.
8243
8244 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
8245
8246         PR gdb/22670
8247         * dwarf2read.c (dwarf2_physname): Do not return the demangled
8248         symbol name if the CU's language stores symbol names in linkage
8249         format.
8250         * language.h (struct language_defn)
8251         <la_store_sym_names_in_linkage_form_p>: New field.  Adjust
8252         all instances of this struct.
8253
8254 2018-03-26  Tom Tromey  <tom@tromey.com>
8255
8256         * stack.c (backtrace_command_1): Remove verbose code.
8257
8258 2018-03-26  Tom Tromey  <tom@tromey.com>
8259
8260         * python/py-framefilter.c (py_print_type): Don't catch
8261         exceptions.  Return void.
8262         (py_print_value): Likewise.
8263         (py_print_single_arg): Likewise.
8264         (enumerate_args): Don't catch exceptions.
8265         (py_print_args): Likewise.
8266         (py_print_frame): Likewise.
8267         (gdbpy_apply_frame_filter): Catch exceptions here.
8268
8269 2018-03-26  Tom Tromey  <tom@tromey.com>
8270
8271         * stack.c (_initialize_stack): Remove trailing newlines from help
8272         text.  Add "Usage" line to "backtrace" help.
8273
8274 2018-03-26  Tom Tromey  <tom@tromey.com>
8275
8276         PR python/16486:
8277         * python/py-framefilter.c (py_print_args): Call wrap_hint.
8278
8279 2018-03-26  Tom Tromey  <tom@tromey.com>
8280
8281         * python/py-framefilter.c (py_print_single_arg): Return
8282         EXT_LANG_BT_ERROR from catch.
8283
8284 2018-03-26  Tom Tromey  <tom@tromey.com>
8285
8286         PR backtrace/15584:
8287         * stack.c (backtrace_command_1): Move some code into no-filters
8288         "if".
8289
8290 2018-03-26  Tom Tromey  <tom@tromey.com>
8291
8292         * python/py-framefilter.c (throw_quit_or_print_exception): New
8293         function.
8294         (gdbpy_apply_frame_filter): Use it.
8295
8296 2018-03-26  Tom Tromey  <tom@tromey.com>
8297
8298         PR cli/17716:
8299         * python/py-framefilter.c (py_print_type, py_print_value)
8300         (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
8301         RETURN_MASK_ERROR.
8302
8303 2018-03-26  Tom Tromey  <tom@tromey.com>
8304
8305         * python/py-framefilter.c (enumerate_args): Use
8306         gdb::unique_xmalloc_ptr.
8307
8308 2018-03-26  Tom Tromey  <tom@tromey.com>
8309
8310         * python/py-framefilter.c (py_print_frame): Return
8311         EXT_LANG_BT_OK.
8312         (gdbpy_apply_frame_filter): Update comment.
8313         * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
8314         Remove.
8315         <EXT_LANG_BT_NO_FILTERS>: Change value.
8316
8317 2018-03-26  Tom Tromey  <tom@tromey.com>
8318
8319         PR backtrace/15582:
8320         * stack.c (backtrace_command): Parse "hide" argument.
8321         * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
8322         * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
8323         constant.
8324
8325 2018-03-26  Tom Tromey  <tom@tromey.com>
8326
8327         * stack.c (backtrace_command_1): Remove "show_locals" parameter,
8328         add "flags".
8329         (backtrace_command): Remove "fulltrace", add "flags".
8330
8331 2018-03-26  Tom Tromey  <tom@tromey.com>
8332
8333         * stack.c (backtrace_command): Rewrite command line parsing.
8334
8335 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
8336
8337         * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
8338
8339 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
8340
8341         * filename-seen-cache.h: Add include guard.
8342
8343 2018-03-26  Keith Seitz  <keiths@redhat.com>
8344
8345         * symfile.c (place_section): Remove "struct" from section_addr_info
8346         in comment.
8347         * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
8348         "struct" keyword from section_addr_info.
8349
8350 2018-03-26  Alan Hayward  <alan.hayward@arm.com>
8351
8352         * regformats/regdef.h (reg): Add constructors.
8353
8354 2018-03-25  Pedro Alves  <palves@redhat.com>
8355
8356         * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
8357         if then/else bodies in var_func_name extraction.
8358
8359 2018-03-23  Weimin Pan  <weimin.pan@oracle.com>
8360
8361         * minsyms.c (lookup_minimal_symbol_and_objfile): Use
8362         lookup_minimal_symbol() to find symbol entry.
8363         * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
8364
8365 2018-03-23  Keith Seitz  <keiths@redhat.com>
8366
8367         PR c++/22968
8368         * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
8369         nested type definitions for C++, too.
8370
8371 2018-03-23  Tom Tromey  <tom@tromey.com>
8372
8373         * machoread.c (struct oso_el): Add a constructor.  Don't define as
8374         a typedef.
8375         (macho_register_oso): Remove.
8376         (macho_symtab_read): Take a std::vector.
8377         (oso_el_compare_name): Now a std::sort comparator.
8378         (macho_symfile_read_all_oso): Take a std::vector.
8379         (macho_symfile_read): Use std::vector.  Remove cleanups.
8380
8381 2018-03-22  Tom Tromey  <tom@tromey.com>
8382
8383         * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
8384         (record_full_goto_bookmark): Use std::string.
8385
8386 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8387
8388         PR tdep/18295
8389         * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
8390         a single mask.
8391
8392 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8393
8394         * rs6000-tdep.c (store_insn_p): New function.
8395         (skip_prologue): New variable alloca_reg_offset. Set lr_reg
8396         and cr_reg to their unshifted values. Use store_insn_p to
8397         match LR saves using either R1 or fdata->alloca_reg. Use
8398         store_insn_p to match CR saves. Set alloca_reg_offset
8399         when alloca_reg and framep are set. Remove lr_reg shift
8400         when assigning to fdata->lr_register.
8401
8402 2018-03-22  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8403
8404         * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
8405         command line args instead of emitting a warning.
8406
8407 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
8408
8409         * tracepoint.h (struct static_tracepoint_marker): Initialize
8410         fields, define default constructor, move constructor and move
8411         assignment, disable the rest.
8412         <str_id, extra>: Make std::string.
8413         (release_static_tracepoint_marker): Remove.
8414         (free_current_marker): Remove.
8415         * tracepoint.c (free_current_marker): Remove.
8416         (parse_static_tracepoint_marker_definition): Adjust to
8417         std::string, use new hex2str overload.
8418         (release_static_tracepoint_marker): Remove.
8419         (print_one_static_tracepoint_marker): Get marker by reference
8420         and adjust to std::string.
8421         (info_static_tracepoint_markers_command): Adjust to std::vector
8422         changes
8423         * target.h (static_tracepoint_marker_p): Remove typedef.
8424         (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
8425         (struct target_ops) <to_static_tracepoint_marker_at>: Return
8426         bool.
8427         <to_static_tracepoint_markers_by_strid>: Return std::vector.
8428         * target-debug.h
8429         (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
8430         (target_debug_print_std_vector_static_tracepoint_marker): New.
8431         (target_debug_print_struct_static_tracepoint_marker_p): Rename
8432         to...
8433         (target_debug_print_static_tracepoint_marker_p): ... this.
8434         * target-delegates.c: Re-generate.
8435         * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
8436         Make std::string.
8437         * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
8438         (decode_static_tracepoint_spec): Adjust to std::vector.
8439         (tracepoint_print_one_detail): Adjust to std::string.
8440         (strace_marker_decode_location): Adjust to std::string.
8441         (update_static_tracepoint): Adjust to std::string, remove call
8442         to release_static_tracepoint_marker.
8443         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
8444         Adjust to std::vector.
8445         * remote.c (remote_static_tracepoint_marker_at): Return bool.
8446         (remote_static_tracepoint_markers_by_strid): Adjust to
8447         std::vector.
8448         * common/rsp-low.h (hex2str): New overload with explicit count
8449         of bytes.
8450         * common/rsp-low.c (hex2str): New overload with explicit count
8451         of bytes.
8452         * unittests/rsp-low-selftests.c (test_hex2str): New function.
8453         (_initialize_rsp_low_selftests): Add test_hex2str test.
8454         * unittests/tracepoint-selftests.c
8455         (test_parse_static_tracepoint_marker_definition): Adjust to
8456         std::string.
8457
8458 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
8459
8460         * tracepoint.c (parse_static_tracepoint_marker_definition):
8461         Consider case where the definition is followed by more
8462         definitions.
8463         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8464         tracepoint-selftests.c.
8465         * unittests/tracepoint-selftests.c: New.
8466
8467 2018-03-21  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8468
8469         * MAINTAINERS (Write After Approval): Add Pedro Franco de
8470         Carvalho.
8471
8472 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
8473
8474         * symtab.c (find_pc_sect_line): fixed indentation.
8475
8476 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
8477
8478         * symtab.c (find_pc_sect_line): now uses binary search.
8479
8480 2018-03-19  Tom Tromey  <tom@tromey.com>
8481
8482         * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
8483         "IDENT" production.
8484
8485 2018-03-19  Pedro Alves  <palves@redhat.com>
8486             Tom Tromey  <tom@tromey.com>
8487
8488         * unittests/observable-selftests.c: New file.
8489         * common/observable.h: New file.
8490         * observable.h: New file.
8491         * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
8492         arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
8493         breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
8494         corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
8495         extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
8496         infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
8497         linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
8498         mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
8499         ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
8500         python/py-breakpoint.c, python/py-finishbreakpoint.c,
8501         python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
8502         record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
8503         riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
8504         spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
8505         symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
8506         tui/tui-interp.c, valops.c: Update all users.
8507         * tui/tui-hooks.c (tui_bp_created_observer)
8508         (tui_bp_deleted_observer, tui_bp_modified_observer)
8509         (tui_inferior_exit_observer, tui_before_prompt_observer)
8510         (tui_normal_stop_observer, tui_register_changed_observer):
8511         Remove.
8512         (tui_observers_token): New global.
8513         (attach_or_detach, tui_attach_detach_observers): New functions.
8514         (tui_install_hooks, tui_remove_hooks): Use
8515         tui_attach_detach_observers.
8516         * record-btrace.c (record_btrace_thread_observer): Remove.
8517         (record_btrace_thread_observer_token): New global.
8518         * observer.sh: Remove.
8519         * observer.c: Rename to observable.c.
8520         * observable.c (namespace gdb_observers): Define new objects.
8521         (observer_debug): Move into gdb_observers namespace.
8522         (struct observer, struct observer_list, xalloc_observer_list_node)
8523         (xfree_observer_list_node, generic_observer_attach)
8524         (generic_observer_detach, generic_observer_notify): Remove.
8525         (_initialize_observer): Update.
8526         Don't include observer.inc.
8527         * Makefile.in (generated_files): Remove observer.h, observer.inc.
8528         (clean mostlyclean): Likewise.
8529         (observer.h, observer.inc): Remove targets.
8530         (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
8531         (COMMON_SFILES): Use observable.c, not observer.c.
8532         * .gitignore: Remove observer.h.
8533
8534 2018-03-18  Tom Tromey  <tom@tromey.com>
8535
8536         * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
8537         gdb::def_vector.
8538         (bfd_lookup_symbol_from_dyn_symtab): Likewise.
8539
8540 2018-03-17  Tom Tromey  <tom@tromey.com>
8541
8542         * auto-load.c (auto_load_objfile_script_1): Use std::string.
8543
8544 2018-03-17  Tom Tromey  <tom@tromey.com>
8545
8546         * target.c (class scoped_target_fd): New.
8547         (target_fileio_close_cleanup): Remove.
8548         (target_fileio_read_alloc_1): Use scoped_target_fd.
8549
8550 2018-03-16  Simon Marchi  <simon.marchi@polymtl.ca>
8551
8552         * silent-rules.mk: New.
8553         * Makefile.in: Include silent-rules.mk
8554         (srcdir, VPATH, top_srcdir): Move up.
8555         (COMPILE): Add ECHO_CXX.
8556         (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
8557         (init.c): Add ECHO_INIT_C.
8558         (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
8559         (version.c): Add ECHO_GEN.
8560         (printcmd.o): Add ECHO_CXX.
8561         (target-float.o): Add ECHO_CXX.
8562         (ada-exp.o): Add ECHO_CXX.
8563         (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
8564         (insight$(EXEEXT)): Add ECHO_CXXLD.
8565         * gnulib/configure.ac: Add AM_SILENT_RULES.
8566         * gnulib/aclocal.m4: Re-generate.
8567         * gnulib/configure: Re-generate.
8568         * gnulib/import/Makefile.in: Re-generate.
8569
8570 2018-03-16  Tom Tromey  <tom@tromey.com>
8571
8572         * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
8573         * utils.h (make_cleanup_free_section_addr_info): Don't declare.
8574         * utils.c (do_free_section_addr_info)
8575         (make_cleanup_free_section_addr_info): Remove.
8576         * symfile.h (struct other_sections): Add constructor.
8577         (struct section_addr_info): Remove.
8578         (section_addr_info): New typedef.
8579         (struct sym_fns) <sym_offsets>: Change type of parameter.
8580         (build_section_addr_info_from_objfile)
8581         (relative_addr_info_to_section_offsets, addr_info_make_relative)
8582         (default_symfile_offsets, symbol_file_add)
8583         (symbol_file_add_from_bfd)
8584         (build_section_addr_info_from_section_table): Update.
8585         (alloc_section_addr_info, free_section_addr_info): Don't declare.
8586         * symfile.c (alloc_section_addr_info): Remove.
8587         (build_section_addr_info_from_section_table): Change return type.
8588         Update.
8589         (build_section_addr_info_from_bfd)
8590         (build_section_addr_info_from_objfile): Likewise.
8591         (free_section_addr_info): Remove.
8592         (relative_addr_info_to_section_offsets): Change type of "addrs".
8593         (addrs_section_compar): Now a std::sort comparator.
8594         (addrs_section_sort): Change return type.
8595         (addr_info_make_relative): Change type of "addrs".  Update.
8596         (default_symfile_offsets, syms_from_objfile_1)
8597         (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
8598         (symbol_file_add_separate): Update.
8599         (symbol_file_add): Change type of "addrs".  Update.
8600         (add_symbol_file_command): Update.  Remove cleanups.
8601         * symfile-mem.c (symbol_file_add_from_memory): Update.  Remove
8602         cleanups.
8603         * symfile-debug.c (debug_sym_offsets): Change type of "info".
8604         * solib.c (solib_read_symbols): Update.
8605         * objfiles.c (objfile_relocate): Update.  Remove cleanups.
8606         * machoread.c (macho_symfile_offsets): Update.
8607         * jit.c (jit_bfd_try_read_symtab): Update.
8608
8609 2018-03-15  Simon Marchi  <simon.marchi@polymtl.ca>
8610
8611         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8612         unittests/utils-selftests.c.
8613         * unittests/utils-selftests.c: New file.
8614
8615 2018-03-14  Tom Tromey  <tom@tromey.com>
8616
8617         PR cli/14977:
8618         * printcmd.c (printf_c_string, printf_wide_c_string): Special case
8619         for NULL.
8620
8621 2018-03-14  Tom Tromey  <tom@tromey.com>
8622
8623         PR cli/19918:
8624         * printcmd.c (printf_pointer): Allow "-" in format.
8625
8626 2018-03-14  Tom Tromey  <tom@tromey.com>
8627
8628         * printcmd.c (_initialize_printcmd): Add usage to printf.
8629
8630 2018-03-14  Yao Qi  <qiyao@sourceware.org>
8631
8632         * MAINTAINERS: Update my email address.
8633
8634 2018-03-13  Tom Tromey  <tom@tromey.com>
8635
8636         * machoread.c (macho_check_dsym): Change filenamep to a
8637         std::string*.
8638         (macho_symfile_read): Update.
8639         * symfile.c (load_command): Use std::string.
8640
8641 2018-03-12  Andrew Burgess  <andrew.burgess@embecosm.com>
8642
8643         * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
8644         to error message string.
8645         (riscv_register_name): Use xsnprintf instead of sprintf.
8646         (riscv_insn::fetch_instruction): Use gdb_assert instead of
8647         internal_error.
8648         (riscv_print_arg_location): Use gdb_assert_not_reached instead of
8649         error.
8650         (riscv_push_dummy_call): Likewise.
8651
8652 2018-03-12  Tom Tromey  <tom@tromey.com>
8653
8654         * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
8655         Use gdb::byte_vector.
8656         * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
8657
8658 2018-03-12  Yao Qi  <yao.qi@linaro.org>
8659
8660         * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
8661         parameter type to readable_regcache.
8662         * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
8663         the declaration.
8664
8665 2018-03-11  Tom Tromey  <tom@tromey.com>
8666
8667         * dwarf2read.c (struct nextfield): Add initializers.
8668         (struct nextfnfield): Remove.
8669         (struct fnfieldlist): Add initializers.  Remove "length" and
8670         "head", use std::vector.
8671         (struct decl_field_list): Remove.
8672         (struct field_info): Add initializers.
8673         <fields, baseclasses>: Now std::vector.
8674         <nbaseclasses, nfnfields, typedef_field_list_count,
8675         nested_types_list_count>: Remove.
8676         (dwarf2_add_field, dwarf2_add_type_defn)
8677         (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
8678         (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
8679         (process_structure_scope): Update.
8680
8681 2018-03-11  Tom Tromey  <tom@tromey.com>
8682
8683         * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
8684         for use by std::sort.
8685         (build_type_psymtabs_1): Use std::vector.
8686
8687 2018-03-09  Eli Zaretskii  <eliz@gnu.org>
8688
8689         * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
8690         and LIBMPFR in the printed configuration.
8691
8692 2018-03-08  Tom Tromey  <tom@tromey.com>
8693
8694         * source.c (get_filename_and_charpos): Use scoped_fd.
8695         * nto-procfs.c (procfs_open_1): Use scoped_fd.
8696         (procfs_pidlist): Likewise.
8697         * procfs.c (proc_get_LDT_entry): Use scoped_fd.
8698         (iterate_over_mappings): Likewise.
8699
8700 2018-03-08  Tom Tromey  <tom@tromey.com>
8701
8702         * infcall.c (struct call_return_meta_info)
8703         <stack_temporaries_enabled>: Remove.
8704         (get_call_return_value, call_function_by_hand_dummy): Update.
8705         * thread.c (disable_thread_stack_temporaries): Remove.
8706         (enable_thread_stack_temporaries): Remove.
8707         (thread_stack_temporaries_enabled_p): Return bool.
8708         (push_thread_stack_temporary, value_in_thread_stack_temporaries)
8709         (get_last_thread_stack_temporary): Update.
8710         * eval.c (evaluate_subexp): Update.
8711         * gdbthread.h (class enable_thread_stack_temporaries): Now a
8712         class, not a function.
8713         (value_ptr, value_vec): Remove typedefs.
8714         (class thread_info) <stack_temporaries_enabled>: Now bool.
8715         <stack_temporaries>: Now a std::vector.
8716         (thread_stack_temporaries_enabled_p)
8717         (value_in_thread_stack_temporaries): Return bool.
8718
8719 2018-03-08  Simon Marchi  <simon.marchi@ericsson.com>
8720
8721         * remote.c (putpkt_binary): Fix omitted bytes reporting.
8722         (getpkt_or_notif_sane_1): Likewise.
8723
8724 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
8725
8726         * build-id.c (build_id_to_debug_bfd): Use std::string.
8727
8728 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
8729
8730         * build-id.c (find_separate_debug_file_by_buildid): Return
8731         std::string.
8732         * build-id.h (find_separate_debug_file_by_buildid): Return
8733         std::string.
8734         * coffread.c (coff_symfile_read): Adjust to std::string.
8735         * elfread.c (elf_symfile_read): Adjust to std::string.
8736         * symfile.c (separate_debug_file_exists): Change parameter to
8737         std::string.
8738         (find_separate_debug_file): Return std::string.
8739         (find_separate_debug_file_by_debuglink): Return std::string.
8740         * symfile.h (find_separate_debug_file_by_debuglink): Return
8741         std::string.
8742
8743 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
8744
8745         * common/xml-utils.c (xml_escape_text): Move code to...
8746         (xml_escape_text_append): ... this new function.
8747         * common/xml-utils.h (xml_escape_text_append): New declaration.
8748         * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
8749         New function.
8750         (_initialize_xml_utils): register test_xml_escape_text_append as
8751         a selftest.
8752
8753 2018-03-07  Alan Hayward  <alan.hayward@arm.com>
8754
8755         * defs.h: Remove MAX_REGISTER_SIZE.
8756         * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
8757         asserts.
8758         * python/py-unwind.c (pyuw_sniffer): Likewise.
8759
8760 2018-03-07  Tom Tromey  <tom@tromey.com>
8761
8762         * linux-tdep.c (linux_info_proc): Update.
8763         * target.h (struct target_ops) <to_fileio_readlink>: Return
8764         optional<string>.
8765         (target_fileio_readlink): Return optional<string>.
8766         * remote.c (remote_hostio_readlink): Return optional<string>.
8767         * inf-child.c (inf_child_fileio_readlink): Return
8768         optional<string>.
8769         * target.c (target_fileio_readlink): Return optional<string>.
8770
8771 2018-03-07  Andrew Burgess  <andrew.burgess@embecosm.com>
8772
8773         * regcache.c (cooked_read_test): Add riscv to the list of
8774         architectures that have a save_reggroup.
8775
8776 2018-03-07  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8777
8778         * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
8779         value is not a dynamic class object.
8780
8781 2018-03-06  Tom Tromey  <tom@tromey.com>
8782
8783         * rust-exp.y: Formatting fixes.
8784
8785 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
8786
8787         * riscv-tdep.c (riscv_register_name): Remove target description
8788         support.
8789         (riscv_gdbarch_init): Remove target description check.
8790
8791 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
8792
8793         * riscv-tdep.c: Remove 'Contributed by ...' lines from header
8794         comment.
8795         * riscv-tdep.h: Likewise.
8796
8797 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
8798
8799         * riscv-tdep.c (riscv_pseudo_register_read): Delete.
8800         (riscv_pseudo_register_write): Delete.
8801         (riscv_gdbarch_init): Remove all use of pseudo registers.
8802
8803 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
8804
8805         * record-btrace.c (btrace_print_lines): Replace cleanup
8806         parameter with RAII equivalents.
8807         (btrace_insn_history): Replace cleanup with RAII equivalents.
8808         * ui-out.h (make_cleanup_ui_out_list_begin_end,
8809         make_cleanup_ui_out_tuple_begin_end): Remove.
8810         * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
8811         make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
8812         make_cleanup_ui_out_list_begin_end): Remove.
8813
8814 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
8815
8816         * record-btrace.c (record_btrace_maybe_mark_async_event): Change
8817         parameter types to std::vector.  Use bool.
8818         (record_btrace_wait): Replace VEC(tp_t) with
8819         std::vector<thread_info *>.
8820         * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
8821
8822 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
8823
8824         * record-btrace.c (record_btrace_disable_callback): Remove.
8825         (struct scoped_btrace_disable): New.
8826         (record_btrace_open): Use scoped_btrace_disable.
8827
8828 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
8829
8830         * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
8831         reading values from registers.
8832
8833 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
8834
8835         * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
8836         where appropriate.
8837
8838 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
8839
8840         * riscv-tdep.c (riscv_print_arg_location): Add header comment,
8841         change parameter type.  Use GDB's print functions, and use
8842         core_addr_to_string where appropriate.
8843         (riscv_push_dummy_call): Use core_addr_to_string where
8844         appropriate, update call to riscv_print_arg_location, and reindent
8845         a few lines.
8846         (riscv_return_value): Update call to riscv_print_arg_location.
8847
8848 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
8849             Tim Newsome <tim@sifive.com>
8850             Albert Ou <a0u@eecs.berkeley.edu>
8851             Darius Rad <darius@bluespec.com>
8852
8853         * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
8854         (HFILES_NO_SRCDIR): Add riscv-tdep.h.
8855         (ALLDEPFILES): Add riscv-tdep.c
8856         * configure.tgt: Add riscv support.
8857         * riscv-tdep.c: New file.
8858         * riscv-tdep.h: New file.
8859         * NEWS: Mention new target.
8860         * MAINTAINERS: Add entry for riscv.
8861
8862 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
8863
8864         * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
8865         fields within aggregates.
8866
8867 2018-03-04  Simon Marchi  <simon.marchi@polymtl.ca>
8868
8869         * record-btrace.c (btrace_print_lines): Change type of flags to
8870         gdb_disassembly_flags.
8871
8872 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
8873
8874         * fbsd-nat.c: Include "inf-ptrace.h".
8875         (USE_SIGTRAP_SIGINFO): Conditionally define.
8876         [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
8877         (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
8878         [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
8879         function.
8880         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
8881         Likewise.
8882         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
8883         Likewise.
8884         (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
8885         "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
8886         "supports_stopped_by_hw_breakpoint" target methods.
8887
8888 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
8889
8890         * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
8891         * fbsd-nat.c (debug_fbsd_nat): New variable.
8892         (show_fbsd_nat_debug): New function.
8893         (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
8894         (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
8895
8896 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
8897
8898         * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
8899         * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
8900         prototype.
8901         * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
8902         (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
8903         method.
8904
8905 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
8906
8907         * common/gdb_vecs.c (free_char_ptr_vec): Remove.
8908         * common/gdb_vecs.h (free_char_ptr_vec): Remove.
8909
8910 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
8911
8912         * charset.c (struct charset_vector): New.
8913         (charsets): Change type to charset_vector.
8914         (find_charset_names): Adjust.
8915         (add_one): Adjust.
8916         (_initialize_charset): Adjust.
8917
8918 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
8919
8920         * progspace.h (struct program_space) <deleted_solibs>: Change
8921         type to std::vector<std::string>.
8922         * progspace.c (clear_program_space_solib_cache): Adjust.
8923         * breakpoint.c (print_solib_event): Adjust.
8924         (check_status_catch_solib): Adjust.
8925         * solib.c (update_solib_list): Adjust.
8926         * ui-out.h (class ui_out) <field_string>: New overload.
8927         * ui-out.c (ui_out::field_string): New overload.
8928
8929 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
8930
8931         * progspace.h (struct program_space): Add constructor and
8932         destructor, initialize fields.
8933         (add_program_space): Remove.
8934         * progspace.c (add_program_space): Rename to...
8935         (program_space::program_space): ... this.
8936         (release_program_space): Rename to...
8937         (program_space::~program_space): ... this.
8938         (delete_program_space): Use delete to delete program_space.
8939         (initialize_progspace): Use new to allocate program_space.
8940         * inferior.c (add_inferior_with_spaces): Likewise.
8941         (clone_inferior_command): Likewise.
8942         * infrun.c (follow_fork_inferior): Likewise.
8943         (handle_vfork_child_exec_or_exit): Likewise.
8944
8945 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
8946
8947         * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
8948         (delim_string_to_char_ptr_vec): Return std::vector of
8949         gdb::unique_xmalloc_ptr.
8950         (dirnames_to_char_ptr_vec_append): Take std::vector of
8951         gdb::unique_xmalloc_ptr.
8952         (dirnames_to_char_ptr_vec): Return std::vector of
8953         gdb::unique_xmalloc_ptr.
8954         * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
8955         Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
8956         (delim_string_to_char_ptr_vec): Return an std::vector of
8957         gdb::unique_xmalloc_ptr, adjust the code.
8958         (dirnames_to_char_ptr_vec_append): Take an std::vector of
8959         gdb::unique_xmalloc_ptr, adjust the code.
8960         (dirnames_to_char_ptr_vec): Return an std::vector of
8961         gdb::unique_xmalloc_ptr, adjust the code.
8962         * auto-load.c (auto_load_safe_path_vec): Change type to
8963         std::vector of gdb::unique_xmalloc_ptr.
8964         (auto_load_expand_dir_vars): Return an std::vector of
8965         gdb::unique_xmalloc_ptr, adjust the code.
8966         (auto_load_safe_path_vec_update): Adjust.
8967         (filename_is_in_auto_load_safe_path_vec): Adjust.
8968         (auto_load_objfile_script_1): Adjust.
8969         * build-id.c (build_id_to_debug_bfd): Adjust.
8970         * linux-thread-db.c (thread_db_load_search): Adjust.
8971         * source.c (add_path): Adjust.
8972         (openp): Adjust.
8973         * symfile.c (find_separate_debug_file): Adjust.
8974         * utils.c (do_free_char_ptr_vec): Remove.
8975         (make_cleanup_free_char_ptr_vec): Remove.
8976
8977 2018-03-01  Sergio Durigan Junior  <sergiodj@redhat.com>
8978
8979         PR gdb/22907
8980         * common/pathstuff.c: Conditionally include "<windows.h>".
8981
8982 2018-03-01  Georg Sauthoff  <mail@georg.so>
8983
8984         PR gdb/22888
8985         * gcore.in: Quote variables and switch interpreter to bash.
8986
8987 2018-03-01  Tom Tromey  <tom@tromey.com>
8988
8989         * dwarf2read.c (alloc_discriminant_info): Fix default_index
8990         assertion.  Add assertion for discriminant_index.
8991         (quirk_rust_enum): Use correct base type name in univariant case.
8992
8993 2018-03-01  Simon Marchi  <simon.marchi@ericsson.com>
8994
8995         * record.c (get_call_history_modifiers): Return a
8996         record_print_flags.
8997         (cmd_record_call_history): Adjust.
8998         * record-btrace.c (record_btrace_call_history): Adjust.
8999         (record_btrace_call_history_range): Adjust.
9000         (record_btrace_call_history_from): Adjust.
9001         * target-debug.h (target_debug_print_record_print_flags): New.
9002         * target-delegates.c: Re-generate.
9003         * target.c (target_call_history): Change flags type.
9004         (target_call_history_from): Likewise.
9005         (target_call_history_range): Likewise.
9006         * target.h (struct target_ops) <target_call_history>: Likewise.
9007         (target_call_history_from): Likewise.
9008         (target_call_history_range): Likewise.
9009
9010 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
9011             Simon Marchi  <simon.marchi@polymtl.ca>
9012
9013         * common/common-utils.c: Include "sys/stat.h".
9014         (is_regular_file): Move here from "source.c"; change return
9015         type to "bool".
9016         * common/common-utils.h (is_regular_file): New prototype.
9017         * common/pathstuff.c (contains_dir_separator): New function.
9018         * common/pathstuff.h (contains_dir_separator): New prototype.
9019         * source.c: Don't include "sys/stat.h".
9020         (is_regular_file): Move to "common/common-utils.c".
9021
9022 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
9023
9024         * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
9025         (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
9026         * auto-load.c: Include "common/pathstuff.h".
9027         * common/common-def.h (current_directory): Move here.
9028         * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
9029         function.
9030         * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
9031         prototype.
9032         * common/pathstuff.c: New file.
9033         * common/pathstuff.h: New file.
9034         * compile/compile.c: Include "common/pathstuff.h".
9035         * defs.h (current_directory): Move to "common/common-defs.h".
9036         * dwarf2read.c: Include "common/pathstuff.h".
9037         * exec.c: Likewise.
9038         * guile/scm-safe-call.c: Likewise.
9039         * linux-thread-db.c: Likewise.
9040         * main.c: Likewise.
9041         * nto-tdep.c: Likewise.
9042         * objfiles.c: Likewise.
9043         * source.c: Likewise.
9044         * symtab.c: Likewise.
9045         * utils.c: Include "common/pathstuff.h".
9046         (gdb_realpath): Move to "common/pathstuff.c".
9047         (gdb_realpath_keepfile): Likewise.
9048         (gdb_abspath): Likewise.
9049         * utils.h (gdb_realpath): Move to "common/pathstuff.h".
9050         (gdb_realpath_keepfile): Likewise.
9051         (gdb_abspath): Likewise.
9052
9053 2018-02-28  John Baldwin  <jhb@FreeBSD.org>
9054
9055         * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
9056         wildcard process pid for super_resume for kernels with a
9057         specific bug.
9058
9059 2018-02-27  Phil Muldoon  <pmuldoon@redhat.com>
9060
9061         * compile/compile.c (get_args): Add additional comments
9062         explaining function.
9063
9064 2018-02-27  Simon Marchi  <simon.marchi@polymtl.ca>
9065             Tom Tromey  <tom@tromey.com>
9066
9067         * target.h (memory_write_request_s): Remove typedef.  Don't define
9068         VEC.
9069         (target_write_memory_blocks): Change argument to std::vector.
9070         (struct memory_write_request): Add constructor.
9071         * target-memory.c (compare_block_starting_address): Return bool.
9072         Change argument types.
9073         (claim_memory): Change arguments to use std::vector.
9074         (split_regular_and_flash_blocks, blocks_to_erase)
9075         (compute_garbled_blocks): Likewise.
9076         (cleanup_request_data, cleanup_write_requests_vector): Remove.
9077         (target_write_memory_blocks): Change argument to std::vector.
9078         * symfile.c (struct load_section_data): Add constructor and
9079         destructor.  Use std::vector for "requests".
9080         (struct load_progress_data): Add initializers.
9081         (load_section_callback): Update.  Use "new".
9082         (clear_memory_write_data): Remove.
9083         (generic_load): Update.
9084
9085 2018-02-27  Alan Hayward  <alan.hayward@arm.com>
9086
9087         * arch/aarch64.h: Use common/tdesc.h.
9088
9089 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
9090
9091         * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
9092         architecture with a 64-bit ABI.
9093
9094 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
9095
9096         * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
9097         ahead of target description loading.
9098
9099 2018-02-26  Tom Tromey  <tom@tromey.com>
9100
9101         * stack.c (backtrace_command_1): Update.
9102         * python/python-internal.h (gdbpy_apply_frame_filter): Change type
9103         of "flags".
9104         * python/py-framefilter.c (py_print_frame)
9105         (gdbpy_apply_frame_filter): Change type of "flags".
9106         * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
9107         of "flags".
9108         (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
9109         (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
9110         * extension.h (enum frame_filter_flag): Rename from
9111         frame_filter_flags.
9112         (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
9113         (apply_ext_lang_frame_filter): Change type of "flags".
9114         * extension.c (apply_ext_lang_frame_filter): Change type of
9115         "flags".
9116         * extension-priv.h (struct extension_language_ops)
9117         <apply_frame_filter>: Change type of "flags".
9118
9119 2018-02-26  Tom Tromey  <tom@tromey.com>
9120
9121         PR python/16497:
9122         * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag.  Fix
9123         off-by-one in py_end computation.
9124         * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
9125         PRINT_MORE_FRAMES.
9126         * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
9127         constant.
9128
9129 2018-02-26  Tom Tromey  <tom@tromey.com>
9130
9131         * dwarf2read.c (struct variant_field): New.
9132         (struct nextfield) <variant>: New field.
9133         (dwarf2_add_field): Handle DW_TAG_variant_part.
9134         (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
9135         discriminated union.
9136         (read_structure_type): Handle DW_TAG_variant_part.
9137         (handle_struct_member_die): New function, extracted from
9138         process_structure_scope.  Handle DW_TAG_variant.
9139         (process_structure_scope): Handle discriminated unions.  Call
9140         handle_struct_member_die.
9141
9142 2018-02-26  Tom Tromey  <tom@tromey.com>
9143
9144         * rust-lang.h (rust_last_path_segment): Declare.
9145         * rust-lang.c (rust_last_path_segment): Now public.  Change
9146         contract.
9147         (struct disr_info): Remove.
9148         (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
9149         (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
9150         (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
9151         (rust_enum_p, rust_enum_variant): New function.
9152         (rust_underscore_fields): Remove "offset" parameter.
9153         (rust_print_enum): New function.
9154         (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
9155         <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
9156         (rust_print_struct_def): Add "for_rust_enum" parameter.  Handle
9157         enums.
9158         (rust_internal_print_type): New function, from rust_print_type.
9159         Remove enum code.
9160         (rust_print_type): Call rust_internal_print_type.
9161         (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
9162         Update enum handling.
9163         * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
9164         (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
9165         (rust_union_quirks): New functions.
9166         (process_full_comp_unit, process_full_type_unit): Call
9167         rust_union_quirks.
9168         (process_structure_scope): Update rust_unions if necessary.
9169
9170 2018-02-26  Tom Tromey  <tom@tromey.com>
9171
9172         * value.h (value_union_variant): Declare.
9173         * valops.c (value_union_variant): New function.
9174         * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
9175         (struct discriminant_info): New.
9176         (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
9177         enumerator.
9178         (struct main_type) <flag_discriminated_union>: New field.
9179
9180 2018-02-26  Tom Tromey  <tom@tromey.com>
9181
9182         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9183         unittests/unpack-selftests.c.
9184         * unittests/unpack-selftests.c: New file.
9185         * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
9186
9187 2018-02-26  Yao Qi  <yao.qi@linaro.org>
9188
9189         * dwarf2read.c (struct partial_die_info) <read>: New method.
9190         (read_partial_die): Remove the declaration.
9191         (load_partial_dies): Update.
9192         (partial_die_info::partial_die_info):
9193         (read_partial_die): Change it to partial_die_info::read.
9194
9195 2018-02-26  Yao Qi  <yao.qi@linaro.org>
9196
9197         * dwarf2read.c (struct partial_die_info) <fixup>: New method.
9198         (fixup_partial_die): Remove declaration.
9199         (scan_partial_symbols): Update.
9200         (partial_die_parent_scope): Likewise.
9201         (partial_die_full_name): Likewise.
9202         (fixup_partial_die): Change it to partial_die_info::fixup.
9203
9204 2018-02-26  Yao Qi  <yao.qi@linaro.org>
9205
9206         * dwarf2read.c (read_partial_die): Update the declaration.
9207         (load_partial_dies): Caller update.
9208         (read_partial_die): Remove one argument abbrev_len.
9209
9210 2018-02-26  Yao Qi  <yao.qi@linaro.org>
9211
9212         * dwarf2read.c (struct partial_die_info): Add ctor, delete
9213         assignment operator.
9214         (load_partial_dies): Use ctor and copy ctor.
9215         (read_partial_die): Update.
9216         (dwarf2_cu::find_partial_die): Use ctor.
9217
9218 2018-02-26  Yao Qi  <yao.qi@linaro.org>
9219
9220         * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
9221         (find_partial_die_in_comp_unit): Change it to
9222         dwarf2_cu::find_partial_die.
9223         (find_partial_die): Update.
9224
9225 2018-02-26  Yao Qi  <yao.qi@linaro.org>
9226
9227         * dwarf2read.c (read_partial_die): Remove the code checking abbrev
9228         is NULL.
9229
9230 2018-02-26  Yao Qi  <yao.qi@linaro.org>
9231
9232         * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
9233
9234 2018-02-26  Alan Hayward  <alan.hayward@arm.com>
9235
9236         * arch/amd64.h: Use common/tdesc.h.
9237         * arch/i386.c: Likewise.
9238         * arch/i386.h: Likewise.
9239         * arch/tic6x.c: Likewise.
9240         * arch/tdesc.h: Move file from here...
9241         * common/tdesc.h: ...to here.
9242         * features/aarch64-core.c: Regenerate.
9243         * features/aarch64-fpu.c: Regenerate.
9244         * features/i386/32bit-avx.c: Regenerate.
9245         * features/i386/32bit-avx512.c: Regenerate.
9246         * features/i386/32bit-core.c: Regenerate.
9247         * features/i386/32bit-linux.c: Regenerate.
9248         * features/i386/32bit-mpx.c: Regenerate.
9249         * features/i386/32bit-pkeys.c: Regenerate.
9250         * features/i386/32bit-sse.c: Regenerate.
9251         * features/i386/64bit-avx.c: Regenerate.
9252         * features/i386/64bit-avx512.c: Regenerate.
9253         * features/i386/64bit-core.c: Regenerate.
9254         * features/i386/64bit-linux.c: Regenerate.
9255         * features/i386/64bit-mpx.c: Regenerate.
9256         * features/i386/64bit-pkeys.c: Regenerate.
9257         * features/i386/64bit-segments.c: Regenerate.
9258         * features/i386/64bit-sse.c: Regenerate.
9259         * features/i386/x32-core.c: Regenerate.
9260         * features/tic6x-c6xp.c: Regenerate.
9261         * features/tic6x-core.c: Regenerate.
9262         * features/tic6x-gp.c: Regenerate.
9263         * target-descriptions.c: Use common/tdesc.h.
9264         * target-descriptions.h: Likewise.
9265
9266 2018-02-24  Tom Tromey  <tom@tromey.com>
9267
9268         * linux-thread-db.c (try_thread_db_load_from_pdir_1)
9269         (try_thread_db_load_from_dir, thread_db_load_search): Use
9270         std::string.
9271         (info_auto_load_libthread_db_compare): Return bool.  Change
9272         argument types.
9273         (info_auto_load_libthread_db): Use std::vector, std::string.
9274         Remove cleanups.
9275
9276 2018-02-24  Tom Tromey  <tom@tromey.com>
9277
9278         * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
9279         std::string.
9280         * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
9281         std::string*.
9282         * gdbarch.c: Rebuild.
9283         * gdbarch.h: Rebuild.
9284         * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
9285         * arch-utils.h (default_fast_tracepoint_valid_at): Update.
9286         * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
9287         std::string*.
9288
9289 2018-02-23  Simon Marchi  <simon.marchi@polymtl.ca>
9290
9291         * gdbtypes.h (sect_offset): Change type to uint64_t.
9292         (sect_offset_str): New function.
9293         * dwarf2read.c (create_addrmap_from_aranges): Use
9294         sect_offset_str.
9295         (error_check_comp_unit_head): Likewise.
9296         (create_debug_type_hash_table): Likewise.
9297         (read_cutu_die_from_dwo): Likewise.
9298         (init_cutu_and_read_dies): Likewise.
9299         (init_cutu_and_read_dies_no_follow): Likewise.
9300         (process_psymtab_comp_unit_reader): Likewise.
9301         (partial_die_parent_scope): Likewise.
9302         (peek_die_abbrev): Likewise.
9303         (process_queue): Likewise.
9304         (dwarf2_physname): Likewise.
9305         (read_namespace_alias): Likewise.
9306         (read_import_statement): Likewise.
9307         (create_dwo_cu_reader): Likewise.
9308         (create_cus_hash_table): Likewise.
9309         (lookup_dwo_cutu): Likewise.
9310         (inherit_abstract_dies): Likewise.
9311         (read_func_scope): Likewise.
9312         (read_call_site_scope): Likewise.
9313         (dwarf2_add_member_fn): Likewise.
9314         (read_common_block): Likewise.
9315         (read_module_type): Likewise.
9316         (read_typedef): Likewise.
9317         (read_subrange_type): Likewise.
9318         (load_partial_dies): Likewise.
9319         (read_partial_die): Likewise.
9320         (find_partial_die): Likewise.
9321         (read_str_index): Likewise.
9322         (dwarf2_string_attr): Likewise.
9323         (build_error_marker_type): Likewise.
9324         (lookup_die_type): Likewise.
9325         (dump_die_shallow): Likewise.
9326         (follow_die_ref): Likewise.
9327         (dwarf2_fetch_die_loc_sect_off): Likewise.
9328         (dwarf2_fetch_constant_bytes): Likewise.
9329         (follow_die_sig): Likewise.
9330         (get_signatured_type): Likewise.
9331         (get_DW_AT_signature_type): Likewise.
9332         (dwarf2_find_containing_comp_unit): Likewise.
9333         (set_die_type): Likewise.
9334
9335 2018-02-21  John Baldwin  <jhb@FreeBSD.org>
9336
9337         * arch/aarch64.c: Include "common-defs.h".
9338         * arch/amd64.c: Likewise.
9339         * arch/i386.c: Likewise.
9340
9341 2018-02-21  Tom Tromey  <tom@tromey.com>
9342
9343         * value.h: (extract_field_op): Update.
9344         * eval.c (extract_field_op): Return a const char *.
9345         * expression.h (parse_expression_for_completion): Update.
9346         * completer.c (complete_expression): Update.
9347         (add_struct_fields): Make fieldname const.
9348         * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
9349         (mark_completion_tag, parse_exp_in_context_1): Update.
9350         (parse_expression_for_completion): Change "name" to
9351         unique_xmalloc_ptr*.
9352
9353 2018-02-21  Tom Tromey  <tom@tromey.com>
9354
9355         * infcall.c (call_function_by_hand_dummy): Use std::vector.
9356
9357 2018-02-21  Yao Qi  <yao.qi@linaro.org>
9358
9359         * avr-tdep.c (avr_read_pc): Change parameter type to
9360         readable_regcache.
9361         * gdbarch.sh (read_pc): Likewise.
9362         * gdbarch.c: Re-generated.
9363         * gdbarch.h: Re-generated.
9364         * hppa-tdep.c (hppa_read_pc): Change parameter type to
9365         readable_regcache.
9366         * ia64-tdep.c (ia64_read_pc): Likewise.
9367         * mips-tdep.c (mips_read_pc): Likewise.
9368         * spu-tdep.c (spu_read_pc): Likewise.
9369
9370 2018-02-21  Yao Qi  <yao.qi@linaro.org>
9371
9372         * Makefile.in (COMMON_SFILES): Add regcache-dump.c
9373         * regcache-dump.c: New file.
9374         * regcache.c: Move register_dump to regcache-dump.c.
9375         (maintenance_print_registers): Likewise.
9376         (maintenance_print_raw_registers): Likewise.
9377         (maintenance_print_cooked_registers): Likewise.
9378         (maintenance_print_register_groups): Likewise.
9379         (maintenance_print_remote_registers): Likewise.
9380         (_initialize_regcache): Likewise.
9381         * regcache.h (register_dump): Moved from regcache.c.
9382
9383 2018-02-21  Yao Qi  <yao.qi@linaro.org>
9384
9385         * regcache.c (regcache::regcache): Update.
9386         (regcache::invalidate): Move it to detached_regcache::invalidate.
9387         (get_thread_arch_aspace_regcache): Update.
9388         (regcache::raw_update): Update.
9389         (regcache::cooked_read): Remove some code.
9390         (regcache::cooked_read_value): Likewise.
9391         (regcache::raw_write): Remove assert on m_readonly_p.
9392         (regcache::raw_supply_integer): Move it to
9393         detached_regcache::raw_supply_integer.
9394         (regcache::raw_supply_zeroed): Likewise.
9395         * regcache.h (detached_regcache) <raw_supply_integer>: New
9396         declaration.
9397         <raw_supply_zeroed, invalidate>: Likewise.
9398         (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
9399         <invalidate>: Likewise.
9400         <m_readonly_p>: Removed.
9401
9402 2018-02-21  Yao Qi  <yao.qi@linaro.org>
9403
9404         * infcmd.c (get_return_value): Let stop_regs point to
9405         get_current_regcache.
9406         * regcache.c (regcache::regcache): Remove.
9407         (register_dump_reg_buffer): New class.
9408         (regcache_print): Adjust.
9409         * regcache.h (regcache): Remove constructors.
9410
9411 2018-02-21  Yao Qi  <yao.qi@linaro.org>
9412
9413         * regcache.c (class register_dump): New class.
9414         (register_dump_regcache, register_dump_none): New class.
9415         (register_dump_remote, register_dump_groups): New class.
9416         (regcache_print): Update.
9417         * regcache.h (regcache_dump_what): Move it to regcache.c.
9418         (regcache) <dump>: Remove.
9419
9420 2018-02-21  Yao Qi  <yao.qi@linaro.org>
9421
9422         * jit.c (struct jit_unwind_private) <regcache>: Change its type to
9423          reg_buffer_rw *.
9424         (jit_unwind_reg_set_impl): Call raw_supply.
9425         (jit_frame_sniffer): Use reg_buffer_rw.
9426         * record-full.c (record_full_core_regbuf): Change its type.
9427         (record_full_core_open_1): Use reg_buffer_rw.
9428         (record_full_close): Likewise.
9429         (record_full_core_fetch_registers): Use regcache->raw_supply.
9430         (record_full_core_store_registers): Likewise.
9431         * regcache.c (regcache::get_register_status): Move it to
9432         reg_buffer.
9433         (regcache_raw_set_cached_value): Remove.
9434         (regcache::raw_set_cached_value): Remove.
9435         (regcache::raw_write): Call raw_supply.
9436         (regcache::raw_supply): Move it to reg_buffer_rw.
9437         * regcache.h (regcache_raw_set_cached_value): Remove.
9438         (reg_buffer_rw): New class.
9439
9440 2018-02-21  Yao Qi  <yao.qi@linaro.org>
9441
9442         * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
9443         readonly_detached_regcache.
9444         (dummy_frame_prev_register): Use regcache->cooked_read.
9445         * frame.c (frame_save_as_regcache): Change return type.
9446         (frame_pop): Update.
9447         * frame.h (frame_save_as_regcache): Update declaration.
9448         * inferior.h (get_infcall_suspend_state_regcache): Update
9449         declaration.
9450         * infrun.c (infcall_suspend_state) <registers>: use
9451         readonly_detached_regcache.
9452         (save_infcall_suspend_state): Don't use regcache_dup.
9453         (get_infcall_suspend_state_regcache): Change return type.
9454         * linux-fork.c (struct fork_info) <savedregs>: Change to
9455         readonly_detached_regcache.
9456         <pc>: New field.
9457         (fork_save_infrun_state): Don't use regcache_dup.
9458         (info_checkpoints_command): Adjust.
9459         * mi/mi-main.c (register_changed_p): Update declaration.
9460         (mi_cmd_data_list_changed_registers): Use
9461         readonly_detached_regcache.
9462         (register_changed_p): Change parameter type to
9463         readonly_detached_regcache.
9464         * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
9465         readonly_detached_regcache.
9466         (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
9467         * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
9468         New.
9469         (regcache::save): Move it to reg_buffer.
9470         (regcache::restore): Change parameter type.
9471         (regcache_dup): Remove.
9472         * regcache.h (reg_buffer) <save>: New method.
9473         (readonly_detached_regcache): New class.
9474         * spu-tdep.c (spu2ppu_cache) <regcache>: Use
9475         readonly_detached_regcache.
9476         (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
9477
9478 2018-02-21  Yao Qi  <yao.qi@linaro.org>
9479
9480         * frame.c (frame_save_as_regcache): Use regcache method save.
9481         (frame_pop): Use regcache method restore.
9482         * infrun.c (restore_infcall_suspend_state): Likewise.
9483         * linux-fork.c (fork_load_infrun_state): Likewise.
9484         * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
9485         save.
9486         * regcache.c (regcache_save): Remove.
9487         (regcache::restore): More asserts.
9488         (regcache_cpy): Remove.
9489         * regcache.h (regcache_save): Remove the declaration.
9490         (regcache::restore): Move from private to public.
9491         Remove the friend declaration of regcache_cpy.
9492         (regcache_cpy): Remove declaration.
9493
9494 2018-02-21  Yao Qi  <yao.qi@linaro.org>
9495
9496         * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
9497         parameter type to 'readable_regcache *'.
9498         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
9499         * arm-tdep.c (arm_neon_quad_read): Likewise.
9500         (arm_pseudo_read): Likewise.
9501         * avr-tdep.c (avr_pseudo_register_read): Likewise.
9502         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
9503         * frv-tdep.c (frv_pseudo_register_read): Likewise.
9504         * gdbarch.c: Re-generated.
9505         * gdbarch.h: Re-generated.
9506         * gdbarch.sh (pseudo_register_read): Change parameter type to
9507         'readable_regcache *'.
9508         (pseudo_register_read_value): Likewise.
9509         * h8300-tdep.c (pseudo_from_raw_register): Likewise.
9510         (h8300_pseudo_register_read): Likewise.
9511         * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
9512         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
9513         (i386_pseudo_register_read_into_value): Likewise.
9514         (i386_pseudo_register_read_value): Likewise.
9515         * i386-tdep.h (i386_pseudo_register_read_into_value): Update
9516         declaration.
9517         * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
9518         * m32c-tdep.c (m32c_raw_read): Likewise.
9519         (m32c_read_flg): Likewise.
9520         (m32c_banked_register): Likewise.
9521         (m32c_banked_read): Likewise.
9522         (m32c_sb_read): Likewise.
9523         (m32c_part_read): Likewise.
9524         (m32c_cat_read): Likewise.
9525         (m32c_r3r2r1r0_read): Likewise.
9526         (m32c_pseudo_register_read): Likewise.
9527         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
9528         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
9529         (mep_pseudo_cr64_read): Likewise.
9530         (mep_pseudo_register_read): Likewise.
9531         * mips-tdep.c (mips_pseudo_register_read): Likewise.
9532         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
9533         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
9534         * regcache.c (regcache::raw_read): Move it to readable_regcache.
9535         (regcache::cooked_read): Likewise.
9536         (regcache::cooked_read_value): Likewise.
9537         (regcache_cooked_read_signed):
9538         (regcache::cooked_read): Likewise.
9539         * regcache.h (readable_regcache): New class.
9540         (regcache): Inherit readable_regcache.  Move some methods to
9541         readable_regcache.
9542         * rl78-tdep.c (rl78_pseudo_register_read): Change
9543         parameter type to 'readable_regcache *'.
9544         * rs6000-tdep.c (do_regcache_raw_read): Remove.
9545         (e500_pseudo_register_read): Change parameter type to
9546         'readable_regcache *'.
9547         (dfp_pseudo_register_read): Likewise.
9548         (vsx_pseudo_register_read): Likewise.
9549         (efpr_pseudo_register_read): Likewise.
9550         * s390-tdep.c (s390_pseudo_register_read): Likewise.
9551         * sh-tdep.c (sh_pseudo_register_read): Likewise.
9552         * sh64-tdep.c (pseudo_register_read_portions): Likewise.
9553         (sh64_pseudo_register_read): Likewise.
9554         * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
9555         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
9556         * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
9557         (spu_pseudo_register_read): Likewise.
9558         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
9559         (xtensa_pseudo_register_read): Likewise.
9560
9561 2018-02-21  Yao Qi  <yao.qi@linaro.org>
9562
9563         * regcache.c (regcache::regcache): Call reg_buffer ctor.
9564         (regcache::arch): Move it to reg_buffer::arch.
9565         (regcache::register_buffer): Likewise.
9566         (regcache::assert_regnum): Likewise.
9567         (regcache::num_raw_registers): Likewise.
9568         * regcache.h (reg_buffer): New class.
9569         (regcache): Inherit reg_buffer.
9570
9571 2018-02-20  Simon Marchi  <simon.marchi@ericsson.com>
9572
9573         * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
9574         gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
9575
9576 2018-02-20  Markus Metzger  <markus.t.metzger@intel.com>
9577
9578         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
9579
9580 2018-02-19  Alan Hayward  <alan.hayward@arm.com>
9581
9582         * Makefile.in: (COMMON_SFILES): Add common/*.c files.
9583         (SFILES): Remove common/*.c files.
9584         (COMMON_OBS): Remove some *.o files built from common/*.c files.
9585         * common/common.host: Add common reference.
9586         * configure.ac: Likewise.
9587         * configure: Regenerate.
9588
9589 2018-02-16  Yao Qi  <yao.qi@linaro.org>
9590
9591         * block.c (block_namespace_info): Inherit allocate_on_obstack.
9592         (block_initialize_namespace): Use new.
9593         * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
9594         (dwarf2_free_objfile): Use delete.
9595         * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
9596         (copy_type_recursive): Use new.
9597         * gdb_obstack.h (allocate_on_obstack): New.
9598
9599 2018-02-15  Yao Qi  <yao.qi@linaro.org>
9600
9601         PR gdb/22849
9602         * inferior.c (exit_inferior_1): Reset inf->control.
9603
9604 2018-02-15  Joel Brobecker  <brobecker@adacore.com>
9605
9606         * ada-lang.c (ada_to_fixed_value_create): Delete advance
9607         declaration.
9608
9609 2018-02-14  Pedro Alves  <palves@redhat.com>
9610
9611         * frame-unwind.c (frame_unwind_try_unwinder): Always call
9612         frame_cleanup_after_sniffer on exception.
9613
9614 2018-02-14  Tom Tromey  <tom@tromey.com>
9615
9616         * solist.h (struct target_so_ops) <bfd_open>: Make pathname
9617         const.
9618         (solib_bfd_open): Make pathname const.
9619         * solib.c (solib_bfd_open): Make pathname const.
9620         * solib-spu.c (spu_bfd_fopen): Make name const.
9621         (spu_bfd_open): Make pathname const.
9622         * solib-darwin.c (darwin_bfd_open): Make pathname const.
9623         * solib-aix.c (solib_aix_bfd_open): Make pathname const.
9624
9625 2018-02-14  Tom Tromey  <tom@tromey.com>
9626
9627         * symfile.c (symfile_bfd_open): Update.
9628         * source.h (openp, source_full_path_of, find_and_open_source):
9629         Change argument type to unique_xmalloc_ptr.
9630         * source.c (openp): Take a unique_xmalloc_ptr.
9631         (source_full_path_of, find_and_open_source): Likewise.
9632         (open_source_file, symtab_to_fullname): Update.
9633         * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
9634         unique_xmalloc_ptr.
9635         * solib.c (solib_find_1): Use unique_xmalloc_ptr.
9636         (exec_file_find): Update.
9637         * psymtab.c (psymtab_to_fullname): Update.
9638         * nto-tdep.h (nto_find_and_open_solib): Update.
9639         * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
9640         unique_xmalloc_ptr.
9641         * exec.c (exec_file_attach): Update.
9642         * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
9643         * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
9644
9645 2018-02-14  Tom Tromey  <tom@tromey.com>
9646
9647         * solib.c: Include source.h.
9648         * nto-tdep.c: Include source.h.
9649         * mi/mi-cmd-env.c: Include source.h.
9650         * infcmd.c: Include source.h.
9651         * exec.c: Include source.h.
9652         * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
9653         (add_path, directory_switch, source_path, init_source_path): Move
9654         declarations...
9655         * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
9656         (add_path, directory_switch, source_path, init_source_path):
9657         ...here.
9658
9659 2018-02-14  Tom Tromey  <tom@tromey.com>
9660
9661         * solist.h (exec_file_find, solib_find): Return
9662         unique_xmalloc_ptr.
9663         (solib_bfd_fopen): Take a const char *.
9664         * solib.c (solib_find_1): Return unique_xmalloc_ptr.
9665         (exec_file_find, solib_find): Likewise.
9666         (solib_bfd_fopen): Do not take ownership of "pathname".
9667         (solib_bfd_open): Use unique_xmalloc_ptr.
9668         * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
9669         * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
9670         * infrun.c (follow_exec): Use unique_xmalloc_ptr.
9671         * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
9672
9673 2018-02-14  Joel Brobecker  <brobecker@adacore.com>
9674
9675         * ada-lang.c (name_match_type_from_name): Remove reference to
9676         ada_name_for_lookup in function's documentation.
9677         * ada-lang.h (ada_name_for_lookup): Delete declaration.
9678
9679 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
9680
9681         * defs.h (enum openp_flags): New enum.
9682         (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
9683         Move to enum openp_flags.
9684         (openp_flags): New enum flags.
9685         (openp): Change parameter type to openp_flags.
9686         * source.c (openp): Change parameter type to openp_flags.
9687         * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
9688         * dwarf2read.c (try_open_dwop_file): Use openp_flags.
9689
9690 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
9691
9692         * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
9693         per-command.
9694
9695 2018-02-12  Andrew Burgess  <andrew.burgess@embecosm.com>
9696
9697         * dwarf2read.c (dwarf2_release_queue): Delete function, move body
9698         into...
9699         (class dwarf2_queue_guard): ...the destructor of this new class.
9700         (dw2_do_instantiate_symtab): Create instance of the new class
9701         dwarf2_queue_guard, remove cleanup.
9702
9703 2018-02-09  Tom Tromey  <tom@tromey.com>
9704
9705         * source.c (find_source_lines): Don't reference past the end of
9706         the vector.
9707
9708 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
9709
9710         * remote.c (remote_btrace_maybe_reopen): Change error message.
9711         * btrace.c (btrace_enable): Likewise.
9712         (parse_xml_btrace): Likewise.
9713         (parse_xml_btrace_conf): Likewise.
9714
9715 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
9716
9717         * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
9718         (linux_enable_pt, linux_enable_bts): Call
9719         diagnose_perf_event_open_fail.
9720
9721 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
9722
9723         * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
9724         Remove parameter and change return type.  Update callers.  Move it.
9725         (linux_enable_bts, linux_enable_pt): Improve error message.
9726         (linux_enable_pt): Remove zero buffer size check.
9727         (linux_enable_btrace): Improve error messages.  Remove NULL return
9728         check.
9729
9730 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
9731
9732         * btrace.c (btrace_enable): Remove target_supports_btrace call.
9733         * nat/linux-btrace.c (perf_event_pt_event_type): Move.
9734         (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
9735         (linux_supports_pt, linux_supports_btrace): Remove.
9736         (linux_enable_bts): Call cpu_supports_bts.
9737         * nat/linux-btrace.h (linux_supports_btrace): Remove.
9738         * remote.c (remote_supports_btrace): Remove.
9739         (init_remote_ops): Remove remote_supports_btrace.
9740         * target-delegates.c: Regenerated.
9741         * target.c (target_supports_btrace): Remove.
9742         * target.h (target_ops) <to_supports_btrace>: Remove
9743         (target_supports_btrace): Remove.
9744         * x86-linux-nat.c (x86_linux_create_target): Remove
9745         linux_supports_btrace.
9746
9747 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
9748
9749         * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
9750         btrace failed.
9751         * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
9752         exception and use message in own exception.
9753
9754 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
9755
9756         * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
9757         (perf_event_pt_event_type): Use gdb_file_up.
9758         (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
9759         scoped_fd, and scoped_mmap.
9760
9761 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
9762
9763         * common/scoped_mmap.h: New.
9764         * unittests/scoped_mmap-selftest.c: New.
9765         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9766         unittests/scoped_mmap-selftest.c.
9767
9768 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
9769
9770         * common/scoped_fd.h: New.
9771         * unittests/scoped_fd-selftest.c: New.
9772         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9773         unittests/scoped_fd-selftest.c.
9774
9775 2018-02-09  Tom Tromey  <tom@tromey.com>
9776
9777         * auto-load.c (auto_load_section_scripts): Use
9778         gdb::unique_xmalloc_ptr.
9779
9780 2018-02-09  Tom Tromey  <tom@tromey.com>
9781
9782         * auto-load.c (execute_script_contents): Use std::string.
9783
9784 2018-02-09  Joel Brobecker  <brobecker@adacore.com>
9785
9786         * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
9787         Python function, rather than a new command.
9788
9789 2018-02-08  Tom Tromey  <tom@tromey.com>
9790
9791         * solib.c (solib_find_1): Use std::string.
9792         (solib_bfd_fopen): Use unique_xmalloc_ptr.
9793
9794 2018-02-08  Tom Tromey  <tom@tromey.com>
9795
9796         * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
9797
9798 2018-02-08  Tom Tromey  <tom@tromey.com>
9799
9800         * source.c (find_source_lines): Use gdb::def_vector.
9801
9802 2018-02-08  Tom Tromey  <tom@tromey.com>
9803
9804         * macrocmd.c (struct temporary_macro_definition): New.
9805         (macro_define_command): Use temporary_macro_definition.  Remove
9806         cleanups.
9807         (free_macro_definition_ptr): Remove.
9808
9809 2018-02-08  Tom Tromey  <tom@tromey.com>
9810
9811         * macroexp.c (maybe_expand): Use std::string.
9812
9813 2018-02-08  Tom Tromey  <tom@tromey.com>
9814
9815         * macroexp.c (struct macro_buffer): Add initializers for some
9816         members.
9817         (init_buffer, init_shared_buffer, free_buffer)
9818         (free_buffer_return_text): Remove.
9819         (macro_buffer): New constructors.
9820         (~macro_buffer): New destructor.
9821         (macro_buffer::set_shared): New method.
9822         (macro_buffer::resize_buffer, macro_buffer::appendc)
9823         (macro_buffer::appendmem): Now methods, not free functions.
9824         (set_token, append_tokens_without_splicing, stringify)
9825         (macro_stringify): Update.
9826         (gather_arguments): Change return type.  Remove argc_p argument,
9827         add args_ptr argument.  Use std::vector.
9828         (substitute_args): Remove argc argument.  Accept std::vector.
9829         (expand): Update.  Use std::vector.
9830         (scan, macro_expand, macro_expand_next): Update.
9831
9832 2018-02-08  Tom Tromey  <tom@tromey.com>
9833
9834         * symtab.c (default_collect_symbol_completion_matches_break_on):
9835         Use unique_xmalloc_ptr.
9836         * macroscope.h: (sal_macro_scope, user_macro_scope)
9837         (default_macro_scope): Return unique_xmalloc_ptr.
9838         * macroscope.c (sal_macro_scope, user_macro_scope)
9839         (default_macro_scope): Return unique_xmalloc_ptr.
9840         * macroexp.h (macro_expand, macro_expand_once): Return
9841         unique_xmalloc_ptr.
9842         * macroexp.c (macro_expand, macro_expand_once): Return
9843         unique_xmalloc_ptr.
9844         * macrocmd.c (macro_expand_command, macro_expand_once_command)
9845         (info_macro_command, info_macros_command): Use
9846         unique_xmalloc_ptr.
9847         * compile/compile-c-support.c (write_macro_definitions): Use
9848         unique_xmalloc_ptr.
9849         * c-exp.y (c_parse): Use unique_xmalloc_ptr.
9850
9851 2018-02-07  Simon Marchi  <simon.marchi@ericsson.com>
9852
9853         * value.c (value_static_field): Assign field type instead of
9854         containing type when returning an optimized out value.
9855
9856 2018-02-06  Yao Qi  <yao.qi@linaro.org>
9857
9858         * ft32-tdep.c (ft32_read_pc): Remove.
9859         (ft32_write_pc): Remove.
9860         (ft32_gdbarch_init): Update.
9861         * m32r-tdep.c (m32r_read_pc): Remove.
9862         (m32r_gdbarch_init): Update.
9863         * mep-tdep.c (mep_read_pc): Remove.
9864         (mep_gdbarch_init): Update.
9865         * microblaze-tdep.c (microblaze_write_pc): Remove.
9866         (microblaze_gdbarch_init): Update.
9867         * mn10300-tdep.c (mn10300_read_pc): Remove.
9868         (mn10300_write_pc): Remove.
9869         (mn10300_gdbarch_init): Update.
9870         * moxie-tdep.c (moxie_read_pc): Remove.
9871         (moxie_write_pc): Remove.
9872         (moxie_gdbarch_init): Update.
9873
9874 2018-02-06  Yao Qi  <yao.qi@linaro.org>
9875
9876         * expprint.c (print_subexp_standard): Handle
9877         OP_F77_UNDETERMINED_ARGLIST.
9878         (dump_subexp_body_standard): Likewise.
9879
9880 2018-02-05  Alan Hayward  <alan.hayward@arm.com>
9881
9882         * target-descriptions.c (tdesc_element_visitor) Add empty
9883         implementations.
9884         (tdesc_type): Move make_gdb_type from here.
9885         (tdesc_type_builtin): Likewise.
9886         (tdesc_type_vector): Likewise.
9887         (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
9888         (make_gdb_type_struct): Move from tdesc_type_with_fields.
9889         (make_gdb_type_union): Likewise.
9890         (make_gdb_type_flags): Likewise.
9891         (make_gdb_type_enum): Likewise.
9892         (make_gdb_type): New function.
9893         (tdesc_register_type): Use static make_gdb_type.
9894
9895 2018-02-05  Ruslan Kabatsayev <b7.10110111@gmail.com>
9896
9897         * infcmd.c (default_print_one_register_info): Align natural-format
9898         column values consistently one under another.
9899         (pad_to_column): New function.
9900
9901 2018-02-05  Joel Brobecker  <brobecker@adacore.com>
9902
9903         * dwarf2read.c (dwarf2_physname): Move commment.
9904
9905 2018-02-01  Leszek Swirski  <leszeks@google.com>
9906
9907         * varobj.c (varobj_formatted_print_options): Allow recursive
9908         pretty printing if pretty printing is enabled.
9909
9910 2018-02-01  Leszek Swirski  <leszeks@google.com>
9911
9912         * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
9913         names after a structop as a filename.
9914
9915 2018-02-01  Yao Qi  <yao.qi@linaro.org>
9916
9917         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
9918         (arm_record_coproc_data_proc): Likewise.
9919
9920 2018-02-01  Yao Qi  <yao.qi@linaro.org>
9921
9922         * arm-tdep.c (arm_record_extension_space): Change ret to signed.
9923
9924 2018-01-31  Nikola Prica  <nikola.prica@rt-rk.com>
9925
9926         * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
9927         assign shifted lr_reg to fdata->lr_register when lr_reg is set.
9928
9929 2018-01-31  Pedro Alves  <palves@redhat.com>
9930
9931         * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
9932         * inflow.c (child_terminal_save_inferior): Wrap reference to
9933         tcgetpgrp in HAVE_TERMIOS_H.
9934         (child_interrupt, child_pass_ctrlc): Wrap references to signal in
9935         _WIN32.
9936         * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
9937         always iterate over all inferiors.
9938         (gdbsim_cntrl_c): Adjust.
9939         * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
9940
9941 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
9942
9943         * gdbtypes.c (lookup_array_range_type): Make sure the array's
9944         index type is objfile-owned if the element type is as well.
9945
9946 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
9947
9948         GDB 8.1 released.
9949
9950 2018-01-30  Philipp Rudo  <prudo@linux.vnet.ibm.com>
9951
9952         * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
9953         "features/s390x-linux64.c".
9954         (_initialize_s390_linux_tdep): Remove initialization of tdescs
9955         s390_linux32 and s390x_linux64.
9956         (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
9957         default tdesc.
9958         * s390-tdep.c: Include "features/s390-linux32.c" and
9959         "features/s390x-linux64.c".
9960         (s390_tdesc_valid): Add check for tdesc_has_registers.
9961         (s390_gdbarch_init): Make sure there is always a valid tdesc.
9962         (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
9963         tdesc_s390x_linux64.
9964         * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
9965         tdesc_s390x_linux64 to...
9966         * s390-tdep.h: ...here.
9967
9968 2018-01-30  Pedro Alves  <palves@redhat.com>
9969
9970         PR gdb/13211
9971         * config.in, configure: Regenerate.
9972         * configure.ac: Check for getpgid.
9973         * go32-nat.c (go32_pass_ctrlc): New.
9974         (go32_target): Install it.
9975         * inf-child.c (inf_child_target): Install
9976         child_terminal_save_inferior, child_pass_ctrlc and
9977         child_interrupt.
9978         * inf-ptrace.c (inf_ptrace_interrupt): Delete.
9979         (inf_ptrace_target): No longer install it.
9980         * infcmd.c (interrupt_target_1): Adjust.
9981         * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
9982         (child_interrupt): Declare.
9983         (inferior::terminal_state): New.
9984         * inflow.c (struct terminal_info): Update comments.
9985         (inferior_process_group): Delete.
9986         (terminal_is_ours): Delete.
9987         (gdb_tty_state): New.
9988         (child_terminal_init): Adjust.
9989         (is_gdb_terminal, sharing_input_terminal_1)
9990         (sharing_input_terminal): New functions.
9991         (child_terminal_inferior): Adjust.  Use sharing_input_terminal.
9992         Set the process's actual process group in the foreground if
9993         possible.  Handle is_ours_for_output/is_ours distinction.  Don't
9994         mark terminal as the inferior's if not sharing GDB's terminal.
9995         Don't check attach_flag.
9996         (child_terminal_ours_for_output, child_terminal_ours): Adjust to
9997         pass down a target_terminal_state.
9998         (child_terminal_save_inferior): New, factored out from ...
9999         (child_terminal_ours_1): ... this.  Handle
10000         target_terminal_state::is_ours_for_output.
10001         (child_interrupt, child_pass_ctrlc): New.
10002         (inflow_inferior_exit): Clear the inferior's terminal_state.
10003         (copy_terminal_info): Copy the inferior's terminal state.
10004         (_initialize_inflow): Remove reference to terminal_is_ours.
10005         * inflow.h (inferior_process_group): Delete.
10006         * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
10007         * procfs.c (procfs_target): Don't install procfs_interrupt.
10008         (procfs_interrupt): Delete.
10009         * remote.c (remote_serial_quit_handler): Adjust.
10010         (remote_interrupt): Remove ptid parameter.  Adjust.
10011         * target-delegates.c: Regenerate.
10012         * target.c: Include "terminal.h".
10013         (target_terminal::terminal_state): Rename to ...
10014         (target_terminal::m_terminal_state): ... this.
10015         (target_terminal::init): Adjust.
10016         (target_terminal::inferior): Adjust to per-inferior
10017         terminal_state.
10018         (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
10019         (target_terminal::ours, target_terminal::ours_for_output): Use
10020         target_terminal_is_ours_kind.
10021         (target_interrupt): Remove ptid parameter.  Adjust.
10022         (default_target_pass_ctrlc): Adjust.
10023         * target.h (target_ops::to_terminal_save_inferior): New field.
10024         (target_ops::to_interrupt): Remove ptid_t parameter.
10025         (target_interrupt): Remove ptid_t parameter.  Update comment.
10026         (target_pass_ctrlc): Update comment.
10027         * target/target.h (target_terminal_state): New scoped enum,
10028         factored out of ...
10029         (target_terminal::terminal_state): ... here.
10030         (target_terminal::inferior): Update comments.
10031         (target_terminal::restore_inferior): New.
10032         (target_terminal::is_inferior, target_terminal::is_ours)
10033         (target_terminal::is_ours_for_output): Adjust.
10034         (target_terminal::scoped_restore_terminal_state): Adjust to
10035         rename, and call restore_inferior() instead of inferior().
10036         (target_terminal::scoped_restore_terminal_state::m_state): Change
10037         type.
10038         (target_terminal::terminal_state): Rename to ...
10039         (target_terminal::m_terminal_state): ... this and change type.
10040
10041 2018-01-30  Pedro Alves  <palves@redhat.com>
10042
10043         * linux-nat.c (wait_for_signal): New function.
10044         (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
10045         directly.
10046         (async_terminal_is_ours)
10047         (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
10048         (linux_nat_add_target): Don't override
10049         to_terminal_inferior/to_terminal_ours.
10050
10051 2018-01-29  Sergio Durigan Junior  <sergiodj@redhat.com>
10052
10053         * remote.c (remote_follow_fork): Don't call "detach_inferior".
10054
10055 2018-01-28  Simon Marchi  <simon.marchi@ericsson.com>
10056
10057         * dwarf2read.c (free_dwo_files): Add forward-declaration.
10058         (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
10059         dwarf2_per_objfile_free here.
10060         (dwarf2_per_objfile_free): Remove.
10061         (_initialize_dwarf2_read): Don't register
10062         dwarf2_per_objfile_free as a registry cleanup.
10063
10064 2018-01-27  Eli Zaretskii  <eliz@gnu.org>
10065
10066         Avoid compilation errors in MinGW native builds
10067
10068         The error is triggered by including python-internal.h, and the
10069         error message is:
10070
10071              In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
10072                       from build-gnulib/import/math.h:27,
10073                       from d:/usr/Python26/include/pyport.h:235,
10074                       from d:/usr/Python26/include/Python.h:58,
10075                       from python/python-internal.h:94,
10076                       from python/py-arch.c:24:
10077              d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
10078         using ::hypot;
10079                 ^~~~~
10080
10081         This happens because Python headers define 'hypot' to expand t
10082         '_hypot' in the Windows builds.
10083         * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
10084         'hypoth'.  This avoids a compilation error.
10085
10086 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
10087
10088         * MAINTAINERS (Write After Approval): Fix ordering.
10089
10090 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
10091
10092         * MAINTAINERS (Write After Approval): Add Alan Hayward.
10093
10094 2018-01-26  Alan Modra  <amodra@gmail.com>
10095
10096         * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
10097         (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
10098         Remove nop.  Make const.  Comment.
10099         (powerpc32_plt_stub_so_2): New.
10100         (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
10101         Correct count.  Update uses.
10102         (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
10103         Move common code reading PLT entry word.  Correct
10104         powerpc32_plt_stub PLT address calculation.
10105         * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
10106         (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
10107         (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
10108         (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
10109         (ppc64_standard_linkage8): Likewise.
10110         * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
10111         Correct insns description.
10112         * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
10113
10114 2018-01-24  Pedro Alves  <palves@redhat.com>
10115
10116         GCC PR libstdc++/83906
10117         * gdbtypes.c (operator==(const dynamic_prop &,
10118         const dynamic_prop &)): New.
10119         (operator==(const range_bounds &, const range_bounds &)): New.
10120         (check_types_equal): Use them instead of memcmp.
10121         * gdbtypes.h (operator==(const dynamic_prop &,
10122         const dynamic_prop &)): Declare.
10123         (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
10124         (operator==(const range_bounds &, const range_bounds &)): Declare.
10125         (operator!=(const range_bounds &, const range_bounds &)): Declare.
10126
10127 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
10128
10129         * s390-linux-tdep.c (s390_record_address_mask)
10130         (s390_record_calc_disp_common, s390_record_calc_disp)
10131         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
10132         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
10133         (s390_process_record): Move to s390-tdep.c.
10134         (s390_linux_init_abi_any): Adjust.
10135         * s390-tdep.c (s390_record_address_mask)
10136         (s390_record_calc_disp_common, s390_record_calc_disp)
10137         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
10138         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
10139         (s390_process_record): Moved from s390-linux-tdep.c
10140         (s390_gdbarch_init): Adjust.
10141
10142 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
10143
10144         * s390-linux-nat.c (s390-tdep.h): New include.
10145         * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
10146         (HFILES_NO_SRCDIR): Add s390-tdep.h.
10147         (ALLDEPFILES): Add s390-tdep.c.
10148         * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
10149         * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
10150         * s390-tdep.h: ...this.  New file.
10151         * s390-linux-tdep.c (s390-tdep.h): New include.
10152         (_initialize_s390_tdep): Rename to...
10153         (_initialize_s390_linux_tdep): ...this and adjust.
10154         (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
10155         (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
10156         s390-tdep.h.
10157         (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
10158         (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
10159         (s390_is_partial_instruction, s390_software_single_step)
10160         (is_non_branch_ril, s390_displaced_step_copy_insn)
10161         (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
10162         (s390_prologue_data, s390_addr, s390_store, s390_load)
10163         (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
10164         (s390_register_call_saved, s390_guess_tracepoint_registers)
10165         (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
10166         (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
10167         (s390_pseudo_register_name, s390_pseudo_register_type)
10168         (s390_pseudo_register_read, s390_pseudo_register_write)
10169         (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
10170         (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
10171         (s390_addr_bits_remove, s390_address_class_type_flags)
10172         (s390_address_class_type_flags_to_name)
10173         (s390_address_class_name_to_type_flags, s390_effective_inner_type)
10174         (s390_function_arg_float, s390_function_arg_vector)
10175         (is_power_of_two, s390_function_arg_integer, s390_arg_state)
10176         (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
10177         (s390_frame_align, s390_register_return_value, s390_return_value)
10178         (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
10179         (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
10180         (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
10181         (s390_trad_frame_prev_register, s390_unwind_cache)
10182         (s390_prologue_frame_unwind_cache)
10183         (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
10184         (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
10185         (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
10186         (s390_stub_frame_this_id, s390_stub_frame_prev_register)
10187         (s390_stub_frame_sniffer, s390_stub_frame_unwind)
10188         (s390_frame_base_address, s390_local_base_address)
10189         (s390_frame_base, s390_gcc_target_options)
10190         (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
10191         (s390_validate_reg_range, s390_tdesc_valid)
10192         (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
10193         * s390-tdep.c: ...this.  New file.
10194
10195 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
10196
10197         * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
10198         (s390_process_record, s390_gdbarch_tdep_alloc)
10199         (s390_linux_init_abi_any): Use/set new hook.
10200
10201 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
10202
10203         * s390-linux-tdep.c (osabi.h): New include.
10204         (s390_linux_init_abi_31, s390_linux_init_abi_64)
10205         (s390_linux_init_abi_any): New functions.
10206         (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
10207
10208 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
10209
10210         * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
10211         tdesc_has_registers check
10212
10213 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
10214
10215         * s390-linux-tdep.c (s390_tdesc_valid): New function.
10216         (s390_validate_reg_range): New macro.
10217         (s390_gdbarch_init): Adjust.
10218
10219 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
10220
10221         * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
10222         (s390_gdbarch_tdep_alloc): Adjust.
10223         (s390_gdbarch_init): Adjust.
10224
10225 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
10226
10227         * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
10228         <have_tdb>: Change type to bool.
10229         (s390_gdbarch_tdep_alloc): Adjust.
10230         (s390_gdbarch_init): Adjust.
10231
10232 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
10233
10234         * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
10235         (gdbarch_tdep) <have_upper, have_vx>: New fields.
10236         (s390_gdbarch_tdep_alloc): New function.
10237         (s390_gdbarch_init): Allocate tdep at start and use its fields
10238         instead of separate variables.
10239
10240 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
10241
10242         * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
10243         when looking for cached gdbarch and add comment for remaining.
10244
10245 2018-01-22  Pedro Alves  <palves@redhat.com>
10246             Sergio Durigan Junior  <sergiodj@redhat.com>
10247
10248         * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
10249         case.
10250
10251 2018-01-22  Maciej W. Rozycki  <macro@mips.com>
10252
10253         * MAINTAINERS: Update my company e-mail address.
10254
10255 2018-01-22  Yao Qi  <yao.qi@linaro.org>
10256
10257         * regcache.c (cooked_write_test): New function.
10258         (_initialize_regcache): Register the test.
10259
10260 2018-01-22  Yao Qi  <yao.qi@linaro.org>
10261
10262         * ia64-tdep.c (ia64_pseudo_register_read): Call
10263         regcache->cooked_read instead of regcache_cooked_read_unsigned.
10264         * m32c-tdep.c (m32c_cat_read): Likewise.
10265         (m32c_r3r2r1r0_read): Likewise.
10266         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
10267         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
10268
10269 2018-01-22  Yao Qi  <yao.qi@linaro.org>
10270
10271         * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
10272         method raw_read instead of regcache_raw_read.
10273         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
10274         * arm-tdep.c (arm_neon_quad_read): Likewise.
10275         * avr-tdep.c (avr_pseudo_register_read): Likewise.
10276         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
10277         * frv-tdep.c (frv_pseudo_register_read): Likewise.
10278         * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
10279         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
10280         (i386_pseudo_register_read_into_value): Likewise.
10281         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
10282         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
10283         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
10284         * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
10285         * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
10286         * sparc-tdep.c (sparc32_pseudo_register_read):  Likewise.
10287         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
10288         * spu-tdep.c (spu_pseudo_register_read_spu):  Likewise.
10289         * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
10290
10291 2018-01-22  Yao Qi  <yao.qi@linaro.org>
10292
10293         * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
10294         * configure.tgt: Remove target mt.
10295         * mt-tdep.c: Remove.
10296         * regcache.c (cooked_read_test): Remove the check for mt.
10297
10298 2018-01-22  Yao Qi  <yao.qi@linaro.org>
10299
10300         * jit.c (jit_frame_prev_register): Call regcache::cooked_read
10301         instead of gdbarch_pseudo_register_read_value.
10302
10303 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
10304
10305         * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
10306         language is Ada.
10307
10308 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
10309
10310         * linespec.c (create_sals_line_offset): Remove code that preserved
10311         the symtab_and_line's line number.
10312
10313 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
10314
10315         * varobj.c (varobj_create): Don't set valid_block when creating a
10316         floating varobj.
10317
10318 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
10319
10320         * varobj.c (varobj_create): Remove out of date comment.
10321
10322 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
10323
10324         PR mi/20395
10325         * ada-exp.y (write_var_from_sym): Pass extra parameter when
10326         updating innermost block.
10327         * parse.c (innermost_block_tracker::update): Take extra type
10328         parameter, and check types match before updating innermost block.
10329         (write_dollar_variable): Update innermost block for registers.
10330         * parser-defs.h (enum innermost_block_tracker_type): New enum.
10331         (innermost_block_tracker::innermost_block_tracker): Initialise
10332         m_types member.
10333         (innermost_block_tracker::reset): Take type parameter.
10334         (innermost_block_tracker::update): Take type parameter, and pass
10335         type through as needed.
10336         (innermost_block_tracker::m_types): New member.
10337         * varobj.c (varobj_create): Pass type when reseting innermost
10338         block.
10339
10340 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
10341
10342         * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
10343         * ada-lang.c (resolve_subexp): Likewise.
10344         * breakpoint.c (set_breakpoint_condition) Likewise.
10345         (watch_command_1) Likewise.
10346         * c-exp.y (variable): Likewise.
10347         * d-exp.y (PrimaryExpression): Likewise.
10348         * f-exp.y (variable): Likewise.
10349         * go-exp.y (variable): Likewise.
10350         * m2-exp.y (variable): Likewise.
10351         * objfiles.c (objfile::~objfile): Likewise.
10352         * p-exp.y (variable): Likewise.
10353         * parse.c (innermost_block): Change type.
10354         * parser-defs.h (class innermost_block_tracker): New.
10355         (innermost_block): Change to innermost_block_tracker.
10356         * printcmd.c (display_command): Switch to innermost_block API.
10357         (do_one_display): Likewise.
10358         * rust-exp.y (do_one_display): Likewise.
10359         * symfile.c (clear_symtab_users): Likewise.
10360         * varobj.c (varobj_create): Switch to innermost_block API, replace
10361         use of innermost_block with block stored on varobj object.
10362
10363 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
10364
10365         * expression.h (innermost_block): Remove declaration.
10366         * varobj.c: Add 'parser-defs.h' include.
10367
10368 2018-01-19  Tom Tromey  <tom@tromey.com>
10369
10370         * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
10371         symbols in the static and global blocks.
10372
10373 2018-01-19  James Clarke  <jrtc27@jrtc27.com>
10374
10375         * nat/linux-ptrace.c: Remove unnecessary reinclusion of
10376         gdb_ptrace.h, and move including gdb_wait.h ...
10377         * nat/linux-ptrace.h: ... to here.
10378
10379 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
10380
10381         * inf-ptrace.c (inf_ptrace_detach): Adjust call to
10382         inf_ptrace_detach_success.
10383         (inf_ptrace_detach_success): Add inferior parameter, use it
10384         instead of inferior_ptid, pass it to detach_inferior.
10385         * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
10386         parameter.
10387         * inferior.c (detach_inferior): Add overload that takes an
10388         inferior object.
10389         * inferior.h (detach_inferior): Likewise.
10390         * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
10391         use inferior_ptid, adjust call to inf_ptrace_detach_success.
10392         * linux-thread-db.c (thread_db_detach): Use inf parameter.
10393
10394 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
10395
10396         * target.h (struct target_ops) <to_detach>: Add inferior
10397         parameter.
10398         (target_detach): Likewise.
10399         * target.c (dispose_inferior): Pass inferior down.
10400         (target_detach): Pass inferior down.  Assert that it is equal to
10401         the current inferior.
10402         * aix-thread.c (aix_thread_detach): Pass inferior down.
10403         * corefile.c (core_file_command): Pass current_inferior() down.
10404         * corelow.c (core_detach): Add inferior parameter.
10405         * darwin-nat.c (darwin_detach): Likewise.
10406         * gnu-nat.c (gnu_detach): Likewise.
10407         * inf-ptrace.c (inf_ptrace_detach): Likewise.
10408         * infcmd.c (detach_command): Pass current_inferior() down to
10409         target_detach.
10410         * infrun.c (follow_fork_inferior): Pass parent_inf to
10411         target_detach.
10412         (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
10413         target_detach.
10414         * linux-nat.c (linux_nat_detach): Add inferior parameter.
10415         * linux-thread-db.c (thread_db_detach): Likewise.
10416         * nto-procfs.c (procfs_detach): Likewise.
10417         * procfs.c (procfs_detach): Likewise.
10418         * record.c (record_detach): Likewise.
10419         * record.h (struct inferior): Forward-declare.
10420         (record_detach): Add inferior parameter.
10421         * remote-sim.c (gdbsim_detach): Likewise.
10422         * remote.c (remote_detach_1): Likewise.
10423         (remote_detach): Likewise.
10424         (extended_remote_detach): Likewise.
10425         * sol-thread.c (sol_thread_detach): Likewise.
10426         * target-debug.h (target_debug_print_inferior_p): New macro.
10427         * target-delegates.c: Re-generate.
10428         * top.c (kill_or_detach): Pass inferior down to target_detach.
10429         * windows-nat.c (windows_detach): Add inferior parameter.
10430
10431 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
10432
10433         * target.h (struct target_ops) <to_detach>: Remove args
10434         parameter.
10435         (target_detach): Likewise.
10436         * target.c (dispose_inferior): Adjust.
10437         (target_detach): Remove args parameter, adjust.
10438         * aix-thread.c (aix_thread_detach): Adjust.
10439         * corefile.c (core_file_command): Adjust.
10440         * corelow.c (core_detach): Adjust.
10441         * darwin-nat.c (darwin_detach): Adjust.
10442         * gnu-nat.c (gnu_detach): Adjust.
10443         * inf-ptrace.c (inf_ptrace_detach): Adjust.
10444         * infcmd.c (detach_command): Adjust
10445         * infrun.c (follow_fork_inferior): Adjust.
10446         (handle_vfork_child_exec_or_exit): Adjust.
10447         * linux-fork.c (linux_fork_detach): Remove args parameter.
10448         * linux-fork.h (linux_fork_detach): Likewise.
10449         * linux-nat.c (linux_nat_detach): Likewise, and adjust.
10450         * linux-thread-db.c (thread_db_detach): Likewise.
10451         * nto-procfs.c (procfs_detach): Likewise.
10452         * procfs.c (procfs_detach): Likewise.
10453         (do_detach): Remove signo parameter.
10454         * record.c (record_detach): Remove args parameter.
10455         * record.h (record_detach): Likewise.
10456         * remote-sim.c (gdbsim_detach): Likewise.
10457         * remote.c (remote_detach_1): Likewise.
10458         (remote_detach): Likewise.
10459         (extended_remote_detach): Likewise.
10460         * sol-thread.c (sol_thread_detach): Likewise.
10461         * target-delegates.c: Re-generate.
10462         * top.c (struct qt_args) <args>: Remove field.
10463         (kill_or_detach): Don't pass args.
10464         (quit_force): Don't set args.
10465         * windows-nat.c (windows_detach): Remove args parameter.
10466
10467 2018-01-19  Yao Qi  <yao.qi@linaro.org>
10468
10469         * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
10470         (arm_linux_init_abi): Install it.
10471
10472 2018-01-19  Yao Qi  <yao.qi@linaro.org>
10473
10474         * osabi.c (gdb_osabi_names): Extend the regexp for
10475         arm-linux-gnueabihf.
10476
10477 2018-01-18  Yao Qi  <yao.qi@linaro.org>
10478
10479         * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
10480         m_abbrevs.
10481         (abbrev_table::add_abbrev): Update.
10482         (abbrev_table::lookup_abbrev): Update.
10483
10484 2018-01-18  Yao Qi  <yao.qi@linaro.org>
10485
10486         * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
10487
10488 2018-01-17  Sergio Durigan Junior  <sergiodj@redhat.com>
10489
10490         * compile/compile.c (compile_to_object): Convert "triplet_rx"
10491         to "std::string".
10492
10493 2018-01-17  Tom Tromey  <tom@tromey.com>
10494
10495         * dwarf2read.c (symbolp): Remove typedef.  Don't instantiate VEC.
10496
10497 2018-01-17  Tom Tromey  <tom@tromey.com>
10498
10499         * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
10500         * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
10501         (create_array_type_with_stride): Update.
10502         * dwarf2read.c (set_die_type): Update.
10503
10504 2018-01-17  Tom Tromey  <tom@tromey.com>
10505
10506         * dwarf2read.c (delayed_method_info): Remove typedef.
10507         (dwarf2_cu::method_info): Now a std::vector.
10508         (add_to_method_list): Update.
10509         (free_delayed_list): Remove.
10510         (compute_delayed_physnames): Update.
10511         (process_full_comp_unit, process_full_type_unit): Clear the method
10512         list.  Remove cleanups.
10513         (psymtab_include_file_name): Add name_holder parameter.  Use
10514         unique_xmalloc_ptr.
10515         (dwarf_decode_lines): Update.
10516
10517 2018-01-17  Tom Tromey  <tom@tromey.com>
10518             Simon Marchi  <simon.marchi@ericsson.com>
10519
10520         * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
10521         (dwarf2_per_objfile::free_cached_comp_units)
10522         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
10523         (init_cutu_and_read_dies_no_follow): Update.
10524         (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
10525         (dwarf2_cu::~dwarf2_cu): New.
10526         (free_heap_comp_unit, free_stack_comp_unit): Remove.
10527         (age_cached_comp_units, free_one_cached_comp_unit): Update.
10528
10529 2018-01-17  Tom Tromey  <tom@tromey.com>
10530             Simon Marchi  <simon.marchi@ericsson.com>
10531
10532         * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
10533         (struct die_reader_specs) <abbrev_table>: New member.
10534         (struct abbrev_table): Add constructor.
10535         <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
10536         <abbrev_obstack>: Now an auto_obstack.
10537         (abbrev_table_up): New typedef.
10538         (init_cu_die_reader): Add abbrev_table parameter.
10539         (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
10540         Add result_dwo_abbrev_table.
10541         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
10542         (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
10543         Update.
10544         (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
10545         parameter.
10546         (skip_children): Update.
10547         (abbrev_table::alloc_abbrev): Rename from
10548         abbrev_table_alloc_abbrev.
10549         (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
10550         (abbrev_table::lookup_abbrev): Rename from
10551         abbrev_table_lookup_abbrev.
10552         (abbrev_table_read_table): Return abbrev_table_up.
10553         (abbrev_table_free, abbrev_table_free_cleanup)
10554         (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
10555         (load_partial_dies): Update.
10556
10557 2018-01-17  Tom Tromey  <tom@tromey.com>
10558
10559         * dwarf2read.c (dwarf2_compute_name): Update comment.
10560         (read_func_scope, read_variable): Update.
10561         (new_symbol): Remove.
10562         (new_symbol_full): Rename to new_symbol.
10563
10564 2018-01-17  Mike Gulick  <mgulick@mathworks.com>
10565
10566         PR gdb/16577
10567         * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
10568         a warning instead of throwing an error, set section size to 0 and return
10569         NULL.
10570         * gdb_bfd.h (gdb_bfd_map_section): Update description.
10571
10572 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
10573
10574         * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
10575         std::string.
10576         (linux_ptrace_attach_fail_reason_string): Likewise.
10577         * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
10578         Likewise.
10579         (linux_ptrace_attach_fail_reason_string): Likewise.
10580         * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
10581
10582 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
10583
10584         * linux-nat.c (linux_nat_attach): Remove xstrdup.
10585
10586 2018-01-17  Eldar Abusalimov  <eldar.abusalimov@jetbrains.com>
10587
10588         PR gdb/21559
10589         * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
10590         checking for fs_base/gs_base fields in struct user_regs_struct.
10591         * configure: Regenerate.
10592
10593 2018-01-17  Yao Qi  <yao.qi@linaro.org>
10594
10595         * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
10596         function.
10597         (aarch64_linux_init_abi): Install it to gdbarch hook
10598         gcc_target_options.
10599
10600 2018-01-15  Pedro Alves  <palves@redhat.com>
10601
10602         * common/signals-state-save-restore.c
10603         (save_original_signals_state): Fix typos.
10604
10605 2017-01-12  Tom Tromey  <tom@tromey.com>
10606             Sergio Durigan Junior  <sergiodj@redhat.com>
10607
10608         * Makefile.in (install-only): Install gdb-add-index.
10609
10610 2018-01-12  John Baldwin  <jhb@FreeBSD.org>
10611
10612         * fbsd-tdep.c (KVE_PROTECTION): Correct value.
10613
10614 2018-01-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10615
10616         * infrun.c (keep_going_pass_signal): Clear step-over info when
10617         insert_breakpoints fails.
10618
10619 2018-01-11  Pedro Alves  <palves@redhat.com>
10620
10621         PR gdb/22583
10622         * infrun.c (resume): Rename to ...
10623         (resume_1): ... this.
10624         (resume): Reimplement as wrapper around resume_1.
10625
10626 2018-01-11  Pedro Alves  <palves@redhat.com>
10627
10628         PR remote/22597
10629         * remote.c (remote_parse_stop_reply): Default to the last-set
10630         general thread instead of to 'magic_null_ptid'.
10631
10632 2018-01-10  Pedro Alves  <palves@redhat.com>
10633
10634         * language.h (language_get_symbol_name_matcher): Rename ...
10635         (get_symbol_name_matcher): ... this.
10636         * language.c (language_get_symbol_name_matcher): Ditto.
10637         * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
10638         callers adjusted.
10639
10640 2018-01-10  Pedro Alves  <palves@redhat.com>
10641
10642         PR gdb/22670
10643         * dwarf2read.c
10644         (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
10645         Adjust to use language_get_symbol_name_matcher instead of
10646         language_defn::la_get_symbol_name_matcher.
10647         * language.c (language_get_symbol_name_matcher): If in Ada mode
10648         and the lookup name is a verbatim match, return Ada's matcher.
10649         * language.h (language_get_symbol_name_matcher): Adjust comment.
10650         (ada_lookup_name_info::verbatim_p):: New method.
10651
10652 2018-01-10  Pedro Alves  <palves@redhat.com>
10653
10654         PR gdb/22670
10655         * ada-lang.c (ada_collect_symbol_completion_matches): If the
10656         minsym's language is language_auto or language_cplus, pass down
10657         language_ada instead.
10658         * symtab.c (compare_symbol_name): Don't frob symbol language here.
10659
10660 2018-01-10  Pedro Alves  <palves@redhat.com>
10661
10662         PR gdb/22670
10663         * minsyms.c (linkage_name_str): New function.
10664         (iterate_over_minimal_symbols): Use it.
10665
10666 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
10667
10668         * NEWS: Document that 'info proc' now works on FreeBSD.
10669
10670 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
10671
10672         * configure.ac: Check for kinfo_getfile in libutil.
10673         * configure: Regenerate.
10674         * config.in: Regenerate.
10675         * fbsd-nat.c: Include "fbsd-tdep.h".
10676         (fbsd_fetch_cmdline): New.
10677         (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
10678         rather than calling error.
10679         (fbsd_info_proc): New.
10680         (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
10681         (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
10682         (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
10683
10684 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
10685
10686         * fbsd-nat.c (struct free_deleter): Remove.
10687         (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
10688
10689 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
10690
10691         * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
10692         NULL for an empty pathname.
10693
10694 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
10695
10696         * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
10697         (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
10698         (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
10699         (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
10700         (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
10701         (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
10702         (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
10703         (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
10704         (kinfo_proc_layout_32, kinfo_proc_layout_i386)
10705         (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
10706         (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
10707         (fbsd_core_fetch_timeval, fbsd_print_sigset)
10708         (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
10709         (fbsd_init_abi):  Install gdbarch "core_info_proc" method.
10710         * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
10711
10712 2018-01-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>
10713
10714         * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
10715         (gnu_xfer_auxv): New function.
10716         (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
10717         TARGET_OBJECT_AUXV.
10718
10719 2018-01-08  Yao Qi  <yao.qi@linaro.org>
10720             Simon Marchi  <simon.marchi@ericsson.com>
10721
10722         * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
10723         common/selftest.c.
10724         (COMMON_OBS): Remove selftest.o.
10725         * configure.ac: Append selftest-arch.c and common/selftest.c to
10726         CONFIG_SRCS.  Append selftest-arch.o and selftest.o to COMMON_OBS.
10727         * configure: Re-generated.
10728         * maint.c (maintenance_selftest): Wrap selftests::run_tests with
10729         GDB_SELF_TEST.
10730         (maintenance_info_selftests): Likewise.
10731
10732 2018-01-08  Xavier Roirand  <roirand@adacore.com>
10733
10734         * ada-valprint.c (val_print_packed_array_elements): Use
10735         proper number of elements when printing an array indexed
10736         by an enumeration type.
10737
10738 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
10739
10740         * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
10741         (dw2_get_file_names_reader): Adjust.
10742         (lookup_dwo_signatured_type): Adjust.
10743         (lookup_dwp_signatured_type): Adjust.
10744         (lookup_signatured_type): Adjust.
10745         (create_type_unit_group): Adjust.
10746         (get_type_unit_group): Adjust.
10747         (process_psymtab_comp_unit_reader): Adjust.
10748         (build_type_psymtabs_reader): Adjust.
10749         (scan_partial_symbols): Adjust.
10750         (add_partial_symbol): Adjust.
10751         (add_partial_subprogram): Adjust.
10752         (peek_die_abbrev): Adjust.
10753         (fixup_go_packaging): Adjust.
10754         (process_imported_unit_die): Adjust.
10755         (dwarf2_compute_name): Adjust.
10756         (dwarf2_physname): Adjust.
10757         (read_import_statement): Adjust.
10758         (handle_DW_AT_stmt_list): Adjust.
10759         (read_file_scope): Adjust.
10760         (read_func_scope): Adjust.
10761         (read_lexical_block_scope): Adjust.
10762         (read_call_site_scope): Adjust.
10763         (read_variable): Adjust.
10764         (dwarf2_rnglists_process): Adjust.
10765         (dwarf2_ranges_process): Adjust.
10766         (dwarf2_ranges_read): Adjust.
10767         (dwarf2_get_pc_bounds): Adjust.
10768         (dwarf2_record_block_ranges): Adjust.
10769         (dwarf2_add_field): Adjust.
10770         (dwarf2_add_member_fn): Adjust.
10771         (read_structure_type): Adjust.
10772         (process_structure_scope): Adjust.
10773         (read_enumeration_type): Adjust.
10774         (read_array_type): Adjust.
10775         (mark_common_block_symbol_computed): Adjust.
10776         (read_common_block): Adjust.
10777         (read_namespace_type): Adjust.
10778         (read_namespace): Adjust.
10779         (read_module_type): Adjust.
10780         (read_tag_pointer_type): Adjust.
10781         (read_tag_ptr_to_member_type): Adjust.
10782         (read_tag_string_type): Adjust.
10783         (read_subroutine_type): Adjust.
10784         (read_typedef): Adjust.
10785         (read_base_type): Adjust.
10786         (attr_to_dynamic_prop): Adjust.
10787         (read_subrange_type): Adjust.
10788         (read_unspecified_type): Adjust.
10789         (dwarf2_read_abbrevs): Adjust.
10790         (load_partial_dies): Adjust.
10791         (read_partial_die): Adjust.
10792         (find_partial_die): Adjust.
10793         (guess_partial_die_structure_name): Adjust.
10794         (fixup_partial_die): Adjust.
10795         (read_attribute_value): Adjust.
10796         (read_addr_index): Adjust.
10797         (read_addr_index_from_leb128): Adjust.
10798         (read_str_index): Adjust.
10799         (dwarf2_string_attr): Adjust.
10800         (get_debug_line_section): Adjust.
10801         (dwarf_decode_line_header): Adjust.
10802         (lnp_state_machine::check_line_address): Adjust.
10803         (dwarf_decode_lines_1): Adjust.
10804         (dwarf_decode_lines): Adjust.
10805         (dwarf2_start_symtab): Adjust.
10806         (var_decode_location): Adjust.
10807         (new_symbol_full): Adjust.
10808         (dwarf2_const_value_data): Adjust.
10809         (dwarf2_const_value_attr): Adjust.
10810         (dwarf2_const_value): Adjust.
10811         (die_type): Adjust.
10812         (die_containing_type): Adjust.
10813         (build_error_marker_type): Adjust.
10814         (lookup_die_type): Adjust.
10815         (guess_full_die_structure_name): Adjust.
10816         (anonymous_struct_prefix): Adjust.
10817         (determine_prefix): Adjust.
10818         (dwarf2_name): Adjust.
10819         (follow_die_ref_or_sig): Adjust.
10820         (follow_die_offset): Adjust.
10821         (follow_die_ref): Adjust.
10822         (follow_die_sig_1): Adjust.
10823         (follow_die_sig): Adjust.
10824         (get_signatured_type): Adjust.
10825         (get_DW_AT_signature_type): Adjust.
10826         (decode_locdesc): Adjust.
10827         (dwarf_decode_macros): Adjust.
10828         (cu_debug_loc_section): Adjust.
10829         (fill_in_loclist_baton): Adjust.
10830         (dwarf2_symbol_mark_computed): Adjust.
10831         (init_one_comp_unit): Don't assign
10832         dwarf2_cu::dwarf2_per_objfile.
10833         (set_die_type): Adjust.
10834
10835 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
10836
10837         * dwarf2read.c (struct mapped_debug_names): Add constructor.
10838         <dwarf2_per_objfile>: New field.
10839         (dwarf2_per_objfile): Remove global.
10840         (get_dwarf2_per_objfile): New function.
10841         (set_dwarf2_per_objfile): New function.
10842         (dwarf2_build_psymtabs_hard): Change objfile parameter to
10843         dwarf2_per_objfile.
10844         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
10845         (read_abbrev_offset): Likewise.
10846         (read_indirect_string): Likewise.
10847         (read_indirect_line_string): Likewise.
10848         (read_indirect_string_at_offset): Likewise.
10849         (read_indirect_string_from_dwz): Likewise.
10850         (dwarf2_find_containing_comp_unit): Change objfile parameter to
10851         dwarf2_per_objfile.
10852         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
10853         (create_all_comp_units): Change objfile parameter to
10854         dwarf2_per_objfile.
10855         (create_all_type_units): Likewise.
10856         (process_queue): Add dwarf2_per_objfile parameter.
10857         (read_and_check_comp_unit_head): Likewise.
10858         (lookup_dwo_unit_in_dwp): Likewise.
10859         (get_dwp_file): Likewise.
10860         (process_cu_includes): Likewise.
10861         (struct free_dwo_file_cleanup_data): New struct.
10862         (dwarf2_has_info): Use get_dwarf2_per_objfile and
10863         set_dwarf2_per_objfile.
10864         (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
10865         (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
10866         context, adjust calls.
10867         (dw2_instantiate_symtab): Likewise.
10868         (dw2_get_cutu): Add dwarf2_per_objfile parameter.
10869         (dw2_get_cu): Likewise.
10870         (create_cu_from_index_list): Change objfile parameter to
10871         dwarf2_per_objfile.
10872         (create_cus_from_index_list): Get dwarf2_per_objfile from
10873         context, adjust calls.
10874         (create_cus_from_index): Likewise.
10875         (create_signatured_type_table_from_index): Change objfile
10876         parameter to dwarf2_per_objfile.
10877         (create_signatured_type_table_from_debug_names): Change objfile
10878         parameter to dwarf2_per_objfile.
10879         (create_addrmap_from_index): Likewise.
10880         (create_addrmap_from_aranges): Likewise.
10881         (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
10882         (dw2_setup): Remove.
10883         (dw2_get_file_names_reader): Get dwarf2_per_objfile from
10884         context.
10885         (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
10886         get_dwarf2_per_objfile.
10887         (dw2_forget_cached_source_info): Likewise.
10888         (dw2_map_symtabs_matching_filename): Likewise.
10889         (struct dw2_symtab_iterator) <index>: Remove.
10890         <dwarf2_per_objfile>: New field.
10891         (dw2_symtab_iter_init): Replace index parameter with
10892         dwarf2_per_objfile.
10893         (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
10894         (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
10895         (dw2_print_stats): Likewise.
10896         (dw2_dump): Likewise.
10897         (dw2_expand_symtabs_for_function): Likewise.
10898         (dw2_expand_all_symtabs): Likewise.
10899         (dw2_expand_symtabs_with_fullname): Likewise.
10900         (dw2_expand_marked_cus): Replace index and objfile parameters
10901         with dwarf2_per_objfile.
10902         (dw_expand_symtabs_matching_file_matcher): Add
10903         dwarf2_per_objfile parameter and adjust calls.
10904         (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
10905         adjust calls.
10906         (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
10907         (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
10908         adjust calls.
10909         (create_cus_from_debug_names_list): Replace objfile parameter
10910         with dwarf2_per_objfile and adjust calls.
10911         (create_cus_from_debug_names): Likewise.
10912         (dwarf2_read_debug_names): Likewise.
10913         (mapped_debug_names::namei_to_name): Adjust call.
10914         (dw2_debug_names_iterator::next): Likewise.
10915         (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
10916         (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
10917         (dw2_debug_names_dump): Likewise.
10918         (dw2_debug_names_expand_symtabs_for_function): Likewise.
10919         (dw2_debug_names_expand_symtabs_matching): Likewise.
10920         (dwarf2_initialize_objfile): Likewise.
10921         (dwarf2_build_psymtabs): Likewise.
10922         (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
10923         this_cu.
10924         (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
10925         (read_and_check_comp_unit_head): Likewise.
10926         (read_abbrev_offset): Likewise.
10927         (create_debug_type_hash_table): Likewise.
10928         (create_debug_types_hash_table): Likewise.
10929         (create_all_type_units): Replace objfile parameter with
10930         dwarf2_per_objfile.
10931         (add_type_unit): Add dwarf2_per_objfile parameter.
10932         (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
10933         with dwarf2_per_objfile.
10934         (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
10935         (lookup_dwp_signatured_type): Likewise.
10936         (lookup_signatured_type): Likewise.
10937         (read_cutu_die_from_dwo): Likewise.
10938         (init_tu_and_read_dwo_dies): Likewise.
10939         (init_cutu_and_read_dies): Likewise.
10940         (init_cutu_and_read_dies_no_follow): Likewise.
10941         (allocate_type_unit_groups_table): Add objfile parameter.
10942         (create_type_unit_group): Use dwarf2_per_objfile from cu.
10943         (get_type_unit_group): Likewise.
10944         (process_psymtab_comp_unit): Update call.
10945         (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
10946         (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
10947         (print_tu_stats): Likewise.
10948         (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
10949         in void* parameter.
10950         (build_type_psymtabs): Change objfile parameter to
10951         dwarf2_per_objfile.
10952         (process_skeletonless_type_unit): Use dwarf2_per_objfile
10953         passed in void* parameter.
10954         (process_skeletonless_type_units): Change objfile parameter to
10955         dwarf2_per_objfile.
10956         (set_partial_user): Likewise.
10957         (dwarf2_build_psymtabs_hard): Likewise.
10958         (read_comp_units_from_section): Likewise.
10959         (create_all_comp_units): Likewise.
10960         (scan_partial_symbols): Update calls.
10961         (add_partial_symbol): Likewise.
10962         (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
10963         (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
10964         (process_queue): Add dwarf2_per_objfile parameter.
10965         (get_compunit_symtab): Use dwarf2_per_objfile from cu.
10966         (compute_compunit_symtab_includes): Likewise.
10967         (process_cu_includes): Add dwarf2_per_objfile parameter.
10968         (process_full_comp_unit): Use dwarf2_per_objfile from cu.
10969         (process_full_type_unit): Likewise.
10970         (process_imported_unit_die): Update call.
10971         (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
10972         (read_file_scope): Likewise.
10973         (allocate_dwo_file_hash_table): Add objfile parameter.
10974         (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
10975         (create_cus_hash_table): Likewise.
10976         (create_dwp_hash_table): Likewise.
10977         (create_dwo_unit_in_dwp_v1): Likewise.
10978         (create_dwp_v2_section): Likewise.
10979         (create_dwo_unit_in_dwp_v2): Likewise.
10980         (lookup_dwo_unit_in_dwp): Likewise.
10981         (try_open_dwop_file): Likewise.
10982         (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
10983         (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
10984         cleanup to include a reference to dwarf2_per_objfile.
10985         (open_dwp_file): Add dwarf2_per_objfile parameter.
10986         (open_and_init_dwp_file): Likewise.
10987         (get_dwp_file): Likewise.
10988         (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
10989         (queue_and_load_all_dwo_tus): Update call.
10990         (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
10991         data.
10992         (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
10993         (dwarf2_ranges_process): Likewise.
10994         (dwarf2_get_pc_bounds): Likewise.
10995         (mark_common_block_symbol_computed): Likewise.
10996         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
10997         (dwarf2_read_abbrevs): Update call.
10998         (read_partial_die): Use dwarf2_per_objfile from cu.
10999         (find_partial_die): Likewise.
11000         (fixup_partial_die): Likewise.
11001         (read_attribute_value): Likewise.
11002         (read_indirect_string_at_offset_from): Add objfile parameter.
11003         (read_indirect_string_at_offset): Add dwarf2_per_objfile
11004         parameter.
11005         (read_indirect_string_from_dwz): Add objfile parameter.
11006         (read_indirect_string): Add objfile parameter.
11007         (read_addr_index_1): Add dwarf2_per_objfile parameter.
11008         (read_addr_index): Use dwarf2_per_objfile from cu.
11009         (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
11010         call dw2_setup.
11011         (read_str_index): Use dwarf2_per_objfile from cu.
11012         (get_debug_line_section): Likewise.
11013         (read_formatted_entries): Add dwarf2_per_objfile parameter.
11014         (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
11015         (new_symbol_full): Use dwarf2_per_objfile from cu.
11016         (build_error_marker_type): Likewise.
11017         (lookup_die_type): Likewise.
11018         (determine_prefix): Likewise.
11019         (follow_die_offset): Likewise.
11020         (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
11021         (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
11022         (dwarf2_fetch_die_type_sect_off): Likewise.
11023         (dwarf2_get_die_type): Likewise.
11024         (follow_die_sig_1): Use dwarf2_per_objfile from cu.
11025         (get_signatured_type): Likewise.
11026         (get_DW_AT_signature_type): Likewise.
11027         (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
11028         (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
11029         (cu_debug_loc_section): Likewise.
11030         (fill_in_loclist_baton): Likewise.
11031         (dwarf2_symbol_mark_computed): Likewise.
11032         (dwarf2_find_containing_comp_unit): Change objfile parameter to
11033         dwarf2_per_objfile.
11034         (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
11035         parameter.
11036         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
11037         (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
11038         (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
11039         (set_die_type): Use dwarf2_free_objfile from cu.
11040         (get_die_type_at_offset): Likewise.
11041         (dwarf2_per_objfile_free): Don't assign global variable.
11042         (debug_names) <constructor>: Add dwarf2_per_objfile
11043         parameter, update m_debugstrlookup construction.
11044         (debug_names::debug_str_lookup): Add dwarf2_per_objfile
11045         parameter.
11046         <m_dwarf2_per_objfile>: New field.
11047         <lookup>: Use m_dwarf2_per_objfile.
11048         (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
11049         (psyms_seen_size): Likewise.
11050         (write_gdbindex): Replace objfile parameter with
11051         dwarf2_per_objfile.
11052         (write_debug_names): Likewise.
11053         (write_psymtabs_to_index): Likewise.
11054         (save_gdb_index_command): Use get_dwarf2_per_objfile, update
11055         calls.
11056
11057 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
11058
11059         * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
11060         <dwarf2_per_objfile>: New field.
11061         (struct dwarf2_per_cu_data) <objfile>: Remove.
11062         <dwarf2_per_objfile>: New field.
11063         (create_cu_from_index_list): Assign dwarf2_per_objfile instead
11064         of objfile.
11065         (create_signatured_type_table_from_index): Likewise.
11066         (create_debug_type_hash_table): Likewise.
11067         (fill_in_sig_entry_from_dwo_entry): Likewise.
11068         (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
11069         (create_type_unit_group): Assign dwarf2_per_objfile instead of
11070         objfile.
11071         (create_partial_symtab): Access objfile through
11072         dwarf2_per_objfile.
11073         (process_psymtab_comp_unit_reader): Likewise.
11074         (read_comp_units_from_section): Likewise.
11075         (scan_partial_symbols): Likewise.
11076         (add_partial_symbol): Likewise.
11077         (add_partial_subprogram): Likewise.
11078         (peek_die_abbrev): Likewise.
11079         (fixup_go_packaging): Likewise.
11080         (process_full_comp_unit): Likewise.
11081         (process_full_type_unit): Likewise.
11082         (process_imported_unit_die): Likewise.
11083         (dwarf2_compute_name): Likewise.
11084         (dwarf2_physname): Likewise.
11085         (read_import_statement): Likewise.
11086         (create_cus_hash_table): Assign dwarf2_physname instead of
11087         objfile.
11088         (read_func_scope): Access objfile through dwarf2_per_objfile.
11089         (read_lexical_block_scope): Likewise.
11090         (read_call_site_scope): Likewise.
11091         (read_variable): Likewise.
11092         (dwarf2_rnglists_process): Likewise.
11093         (dwarf2_ranges_process): Likewise.
11094         (dwarf2_ranges_read): Likewise.
11095         (dwarf2_record_block_ranges): Likewise.
11096         (dwarf2_add_field): Likewise.
11097         (dwarf2_add_member_fn): Likewise.
11098         (read_structure_type): Likewise.
11099         (process_structure_scope): Likewise.
11100         (read_enumeration_type): Likewise.
11101         (read_array_type): Likewise.
11102         (read_common_block): Likewise.
11103         (read_namespace_type): Likewise.
11104         (read_namespace): Likewise.
11105         (read_module_type): Likewise.
11106         (read_tag_pointer_type): Likewise.
11107         (read_tag_ptr_to_member_type): Likewise.
11108         (read_tag_string_type): Likewise.
11109         (read_subroutine_type): Likewise.
11110         (read_typedef): Likewise.
11111         (read_base_type): Likewise.
11112         (attr_to_dynamic_prop): Likewise.
11113         (read_subrange_type): Likewise.
11114         (read_unspecified_type): Likewise.
11115         (load_partial_dies): Likewise.
11116         (read_partial_die): Likewise.
11117         (find_partial_die): Likewise.
11118         (guess_partial_die_structure_name): Likewise.
11119         (fixup_partial_die): Likewise.
11120         (read_attribute_value): Likewise.
11121         (read_addr_index_from_leb128): Likewise.
11122         (dwarf2_read_addr_index): Likewise.
11123         (dwarf2_string_attr): Likewise.
11124         (lnp_state_machine::check_line_address): Likewise.
11125         (dwarf_decode_lines_1): Likewise.
11126         (dwarf_decode_lines): Likewise.
11127         (dwarf2_start_symtab): Likewise.
11128         (var_decode_location): Likewise.
11129         (new_symbol_full): Likewise.
11130         (dwarf2_const_value_data): Likewise.
11131         (dwarf2_const_value_attr): Likewise.
11132         (dwarf2_const_value): Likewise.
11133         (die_type): Likewise.
11134         (die_containing_type): Likewise.
11135         (lookup_die_type): Likewise.
11136         (guess_full_die_structure_name): Likewise.
11137         (anonymous_struct_prefix): Likewise.
11138         (dwarf2_name): Likewise.
11139         (follow_die_ref_or_sig): Likewise.
11140         (follow_die_offset): Likewise.
11141         (follow_die_ref): Likewise.
11142         (dwarf2_fetch_die_loc_sect_off): Likewise.
11143         (dwarf2_fetch_constant_bytes): Likewise.
11144         (dwarf2_fetch_die_type_sect_off): Likewise.
11145         (dwarf2_get_die_type): Likewise.
11146         (follow_die_sig): Likewise.
11147         (decode_locdesc): Likewise.
11148         (dwarf2_per_cu_objfile): Likewise.
11149         (dwarf2_per_cu_text_offset): Likewise.
11150         (init_one_comp_unit): Assign dwarf2_per_objfile instead of
11151         objfile.
11152         (set_die_type): Access objfile through
11153         dwarf2_per_objfile.
11154
11155 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
11156
11157         * valprint.c (converted_character_d): Remove typedef.
11158         (DEF_VEC_O (converted_character_d)): Remove.
11159         (count_next_character): Use std::vector.
11160         (print_converted_chars_to_obstack): Likewise.
11161         (generic_printstr): Likewise.
11162
11163 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
11164
11165         * xml-support.h (struct gdb_xml_value): Add constructor.
11166         <value>: Change type to unique_xmalloc_ptr.
11167         (gdb_xml_value_s): Remove typedef.
11168         (DEF_VEC_O (gdb_xml_value_s)): Remove.
11169         (gdb_xml_element_start_handler): Change parameter type to
11170         std::vector.
11171         (xml_find_attribute): Likewise.
11172         * xml-support.c (xml_find_attribute): Change parameter type to
11173         std::vector and adjust.
11174         (gdb_xml_values_cleanup): Remove.
11175         (gdb_xml_parser::start_element): Adjust to std::vector.
11176         (xinclude_start_include): Change paraeter type to std::vector
11177         and adjust.
11178         * btrace.c (check_xml_btrace_version): Likewise.
11179         (parse_xml_btrace_block): Likewise.
11180         (parse_xml_btrace_pt_config_cpu): Likewise.
11181         (parse_xml_btrace_pt): Likewise.
11182         (parse_xml_btrace_conf_bts): Likewise.
11183         (parse_xml_btrace_conf_pt): Likewise.
11184         * memory-map.c (memory_map_start_memory): Likewise.
11185         (memory_map_start_property): Likewise.
11186         * osdata.c (osdata_start_osdata): Likewise.
11187         (osdata_start_item): Likewise.
11188         (osdata_start_column): Likewise.
11189         * remote.c (start_thread): Likewise.
11190         * solib-aix.c (library_list_start_library): Likewise.
11191         (library_list_start_list): Likewise.
11192         * solib-svr4.c (library_list_start_library): Likewise.
11193         (svr4_library_list_start_list): Likewise.
11194         * solib-target.c (library_list_start_segment): Likewise.
11195         (library_list_start_section): Likewise.
11196         (library_list_start_library): Likewise.
11197         (library_list_start_list): Likewise.
11198         * tracepoint.c (traceframe_info_start_memory): Likewise.
11199         (traceframe_info_start_tvar): Likewise.
11200         * xml-syscall.c (syscall_start_syscall): Likewise.
11201         * xml-tdesc.c (tdesc_start_target): Likewise.
11202         (tdesc_start_feature): Likewise.
11203         (tdesc_start_reg): Likewise.
11204         (tdesc_start_union): Likewise.
11205         (tdesc_start_struct): Likewise.
11206         (tdesc_start_flags): Likewise.
11207         (tdesc_start_enum): Likewise.
11208         (tdesc_start_field): Likewise.
11209         (tdesc_start_enum_value): Likewise.
11210         (tdesc_start_vector): Likewise.
11211
11212 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
11213
11214         * extension.h (struct xmethod_worker) <clone>: Remove.
11215         * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
11216         Remove.
11217         (python_xmethod_worker::clone): Remove.
11218         * valops.c (find_overload_match): Use std::move instead of
11219         clone.
11220
11221 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
11222
11223         * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
11224         (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
11225         <free_xmethod_worker_data>: Remove.
11226         <get_matching_xmethod_workers>: Chance VEC to std::vector.
11227         <get_xmethod_arg_types>: Remove.
11228         <get_xmethod_result_type>: Remove.
11229         <invoke_xmethod>: Remove.
11230         * extension.c (new_xmethod_worker): Remove.
11231         (clone_xmethod_worker): Remove.
11232         (get_matching_xmethod_workers): Return void, pass std::vector by
11233         pointer.
11234         (get_xmethod_arg_types): Rename to...
11235         (xmethod_worker::get_arg_types): ... this, and adjust.
11236         (get_xmethod_result_type): Rename to...
11237         (xmethod_worker::get_result_type): ... this, and adjust.
11238         (invoke_xmethod): Remove.
11239         (free_xmethod_worker): Remove.
11240         (free_xmethod_worker_vec): Remove.
11241         * extension.h (enum ext_lang_rc): Move here from
11242         extension-priv.h.
11243         (struct xmethod_worker): Add constructor and destructor.
11244         <data>: Remove.
11245         <value>: Remove.
11246         <invoke, clone, do_get_result_type, do_get_arg_types>: New
11247         virtual pure methods.
11248         <get_arg_types, get_result_type>: New methods.
11249         (xmethod_worker_ptr): Remove typedef.
11250         (DEF_VEC_P (xmethod_worker_ptr)): Remove.
11251         (xmethod_worker_vec): Remove typedef.
11252         (xmethod_worker_up): New typedef.
11253         (invoke_xmethod): Remove.
11254         (clone_xmethod_worker): Remove.
11255         (free_xmethod_worker): Remove.
11256         (free_xmethod_worker_vec): Remove.
11257         (get_xmethod_arg_types): Remove.
11258         (get_xmethod_result_type): Remove.
11259         * valops.c (find_method_list): Use std::vector, don't use
11260         intermediate vector.
11261         (value_find_oload_method_list): Use std::vector.
11262         (find_overload_match): Use std::vector.
11263         (find_oload_champ): Use std::vector.
11264         * value.c (value_free): Use operator delete.
11265         (value_of_xmethod): Rename to...
11266         (value_from_xmethod): ... this.  Don't assign
11267         xmethod_worker::value, take rvalue-reference.
11268         (result_type_of_xmethod): Adjust.
11269         (call_xmethod): Adjust.
11270         * value.h: Include extension.h.
11271         (struct xmethod_worker): Don't forward-declare.
11272         (value_of_xmethod): Rename to...
11273         (value_from_xmethod): ... this, take rvalue-reference.
11274         * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
11275         (struct python_xmethod_worker): ... this, add constructor and
11276         destructor.
11277         <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
11278         (gdbpy_free_xmethod_worker_data): Rename to...
11279         (python_xmethod_worker::~python_xmethod_worker): ... this and
11280         adjust.
11281         (gdbpy_clone_xmethod_worker_data): Rename to...
11282         (python_xmethod_worker::clone): ... this and adjust.
11283         (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
11284         temporary vector.
11285         (gdbpy_get_xmethod_arg_types): Rename to...
11286         (python_xmethod_worker::do_get_arg_types): ... this and adjust.
11287         (gdbpy_get_xmethod_result_type): Rename to...
11288         (python_xmethod_worker::do_get_result_type): ... this and
11289         adjust.
11290         (gdbpy_invoke_xmethod): Rename to...
11291         (python_xmethod_worker::invoke): ... this and adjust.
11292         (new_python_xmethod_worker): Rename to...
11293         (python_xmethod_worker::python_xmethod_worker): ... this and
11294         adjust.
11295         * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
11296         Remove.
11297         (gdbpy_free_xmethod_worker_data): Remove.
11298         (gdbpy_get_matching_xmethod_workers): Use std::vector.
11299         (gdbpy_get_xmethod_arg_types): Remove.
11300         (gdbpy_get_xmethod_result_type): Remove.
11301         (gdbpy_invoke_xmethod): Remove.
11302         * python/python.c (python_extension_ops): Remove obsolete
11303         callbacks.
11304
11305 2018-01-05  Pedro Alves  <palves@redhat.com>
11306
11307         PR gdb/18653
11308         * common/signals-state-save-restore.c
11309         (save_original_signals_state): New parameter 'quiet'.  Warn if we
11310         find a custom handler preinstalled, instead of internal erroring.
11311         But only warn if !quiet.
11312         * common/signals-state-save-restore.h
11313         (save_original_signals_state): New parameter 'quiet'.
11314         * main.c (captured_main_1): Move save_original_signals_state call
11315         after option handling, and pass QUIET.
11316
11317 2018-01-05  Pedro Alves  <palves@redhat.com>
11318
11319         * spu-tdep.c (spu_catch_start): Pass
11320         symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
11321
11322 2018-01-05  Pedro Alves  <palves@redhat.com>
11323
11324         PR gdb/22670
11325         * ada-lang.c (literal_symbol_name_matcher): New function.
11326         (ada_get_symbol_name_matcher): Use it for
11327         symbol_name_match_type::SEARCH_NAME.
11328         * block.c (block_lookup_symbol): New parameter 'match_type'.  Pass
11329         it down instead of assuming symbol_name_match_type::FULL.
11330         * block.h (block_lookup_symbol): New parameter 'match_type'.
11331         * c-valprint.c (print_unpacked_pointer): Use
11332         lookup_symbol_search_name instead of lookup_symbol.
11333         * compile/compile-object-load.c (get_out_value_type): Pass down
11334         symbol_name_match_type::SEARCH_NAME.
11335         * cp-namespace.c (cp_basic_lookup_symbol): Pass down
11336         symbol_name_match_type::FULL.
11337         * cp-support.c (cp_get_symbol_name_matcher): Handle
11338         symbol_name_match_type::SEARCH_NAME.
11339         * infrun.c (insert_exception_resume_breakpoint): Use
11340         lookup_symbol_search_name.
11341         * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
11342         * psymtab.c (maintenance_check_psymtabs): Use
11343         symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
11344         * stack.c (print_frame_args): Use lookup_symbol_search_name and
11345         SYMBOL_SEARCH_NAME.
11346         * symtab.c (lookup_local_symbol): Don't demangle the lookup name
11347         if symbol_name_match_type::SEARCH_NAME.
11348         (lookup_symbol_in_language): Pass down
11349         symbol_name_match_type::FULL.
11350         (lookup_symbol_search_name): New.
11351         (lookup_language_this): Pass down
11352         symbol_name_match_type::SEARCH_NAME.
11353         (lookup_symbol_aux, lookup_local_symbol): New parameter
11354         'match_type'.  Pass it down.
11355         * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
11356         (lookup_symbol_search_name): New declaration.
11357         (lookup_symbol_in_block): New 'match_type' parameter.
11358
11359 2018-01-05  Pedro Alves  <palves@redhat.com>
11360
11361         PR gdb/22670
11362         * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
11363         ada_lookup_symbol.
11364         (ada_lookup_symbol): Reimplement in terms of
11365         ada_lookup_symbol_list, bits factored out from
11366         ada_lookup_encoded_symbol.
11367
11368 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
11369
11370         * ada-exp.y (write_object_renaming): When subscripting an array
11371         using a symbol as the index, pass the block in call to
11372         ada_lookup_encoded_symbol when looking that symbol up.
11373
11374 2018-01-05  Jerome Guitton  <guitton@adacore.com>
11375
11376         * ada-lang.c (ada_array_length): Use ada_index_type instead of
11377         TYPE_INDEX_TYPE.
11378
11379 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
11380
11381         * ada-lang.c (ada_to_fixed_value_create): Add handling of
11382         the case where VALUE_LVAL (val0) is not lval_memory.
11383
11384 2018-01-05  Xavier Roirand  <roirand@adacore.com>
11385
11386         * ada-valprint.c (print_optional_low_bound): Handle
11387         character-indexed array printing like boolean-indexed array
11388         printing.
11389
11390 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
11391
11392         * NEWS: Create a new section for the next release branch.
11393         Rename the section of the current branch, now that it has
11394         been cut.
11395
11396 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
11397
11398         GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
11399         * version.in: Bump version to 8.1.50.DATE-git.
11400
11401 2018-01-03  Xavier Roirand  <roirand@adacore.com>
11402
11403         * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
11404         Add field.
11405         * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
11406         Add field.
11407         (default_exception_support_info) <catch_handlers_sym>: Add field.
11408         (exception_support_info_fallback) <catch_handlers_sym>: Add field.
11409         (ada_exception_name_addr_1): Add "catch handlers" handling.
11410         (ada_exception_catchpoint_cond_string) <ex>: New parameter.
11411         Update all callers.
11412         (create_excep_cond_exprs) <ex>: Add parameter.
11413         (re_set_exception): Update create_excep_cond_exprs call.
11414         (print_it_exception, print_one_exception, print_mention_exception)
11415         (print_recreate_exception): Add "catch handler" handling.
11416         (allocate_location_catch_handlers, re_set_catch_handlers)
11417         (check_status_catch_handlers, print_it_catch_handlers)
11418         (print_one_catch_handlers, print_mention_catch_handlers)
11419         (print_recreate_catch_handlers): New function.
11420         (catch_handlers_breakpoint_ops): New variable.
11421         (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
11422         Add parameter.  Add "catch handler" handling.
11423         (ada_exception_sym_name, ada_exception_breakpoint_ops):
11424         Add "catch handler" handling.
11425         (ada_exception_catchpoint_cond_string): Add "catch handler"
11426         handling.
11427         (create_ada_exception_catchpoint): Update create_excep_cond_exprs
11428         call.
11429         (catch_ada_handlers_command): New function.
11430         (initialize_ada_catchpoint_ops): Initialize "catch handlers"
11431         operations structure.
11432         (_initialize_ada_language): Add "catch handlers" command entry.
11433         * NEWS: Document "catch handlers" feature.
11434
11435 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
11436
11437         * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
11438         account when creating the array type of the slice.
11439         (ada_value_slice): Likewise.
11440
11441 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
11442
11443         * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
11444         New enum value.
11445         (create_array_type_with_stride): Add byte_stride_prop parameter.
11446         * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
11447         New parameter.  Update all callers in this file.
11448         (array_type_has_dynamic_stride): New function.
11449         (is_dynamic_type_internal, resolve_dynamic_array): Add handling
11450         of arrays with dynamic byte strides.
11451         * dwarf2read.c (read_array_type): Add support for dynamic
11452         DW_AT_byte_stride attributes.
11453
11454 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
11455
11456         * dwarf2read.c (read_unspecified_type): Treat
11457         DW_TAG_enumeration_type DIEs from Ada units as stubs.
11458
11459 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
11460
11461         Update copyright year range in all GDB files.
11462
11463 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
11464
11465         * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
11466         and gdb/testsuite/gdb.base/step-line.c.
11467
11468 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
11469
11470         * copyright.py (main): Dump the contents of
11471         MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
11472         even if BY_HAND is empty.
11473
11474 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
11475
11476         * top.c (print_gdb_version): Update Copyright year in version
11477         message.
11478
11479 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
11480
11481         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
11482
11483 For older changes see ChangeLog-2017.
11484 \f
11485 Local Variables:
11486 mode: change-log
11487 left-margin: 8
11488 fill-column: 74
11489 version-control: never
11490 coding: utf-8
11491 End: