Add DWARF index cache
[external/binutils.git] / gdb / ChangeLog
1 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
2
3         * common/pathstuff.h (get_standard_cache_dir): New.
4         * common/pathstuff.c (get_standard_cache_dir): New.
5         * build-id.h (build_id_to_string): New.
6         * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
7         DEBUG_STR_SUFFIX): Move to here.
8         * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
9         DEBUG_STR_SUFFIX): Move from there.
10         (write_psymtabs_to_index): Make non-static, add basename
11         parameter.  Write to temporary files, rename when done.
12         (save_gdb_index_command): Adjust call to
13         write_psymtabs_to_index.
14         * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
15         field.
16         * dwarf2read.c (dwz_file) <index_cache_res>: New field.
17         (get_gdb_index_contents_from_cache): New.
18         (get_gdb_index_contents_from_cache_dwz): New.
19         (dwarf2_initialize_objfile): Read index from cache.
20         (dwarf2_build_psymtabs): Save to index.
21         * dwarf-index-cache.h: New file.
22         * dwarf-index-cache.c: New file.
23         * dwarf-index-write.h: New file.
24
25 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
26
27         * gnulib/aclocal.m4: Re-generate.
28         * gnulib/config.in: Re-generate.
29         * gnulib/configure: Re-generate.
30         * gnulib/import/Makefile.am: Re-generate.
31         * gnulib/import/Makefile.in: Re-generate.
32         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
33         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
34         * gnulib/import/m4/mkdir.m4: New file.
35         * gnulib/import/mkdir.c: New file.
36         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
37         module.
38
39 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
40
41         * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
42         * common/scoped_mmap.c: New file.
43         * common/scoped_mmap.h (destroy): New method.
44         (~scoped_mmap, reset): Use destroy.
45         (scoped_mmap): New move constructor.
46         (mmap_file): New declaration.
47         * unittests/scoped_mmap-selftests.c (test_normal,
48         test_invalid_filename, run_tests): New functions.
49         (_initialize_scoped_mmap_selftests): Register selftest.
50
51 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
52
53         * dwarf2read.c (read_gdb_index_from_section): Rename to...
54         (read_gdb_index_from_buffer): ... this.  Remove section
55         parameter, add buffer parameter.
56         (get_gdb_index_contents_ftype,
57         get_gdb_index_contents_dwz_ftype): New typedefs.
58         (dwarf2_read_gdb_index): Add callback parameters to get the
59         index contents.
60         (get_gdb_index_contents_from_section): New.
61         (dwarf2_initialize_objfile): Update call to
62         dwarf2_read_gdb_index.
63
64 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
65
66         * common/filestuff.h (gdb_fopen_cloexec): New overload.
67         (gdb_open_cloexec): Likewise.
68         * nat/linux-osdata.c (command_from_pid): Use string_printf.
69         (commandline_from_pid): Likewise.
70         (linux_xfer_osdata_threads): Likewise.
71         (linux_xfer_osdata_fds): Likewise.
72         * ada-lang.c (is_package_name): Likewise.
73         * auxv.c (procfs_xfer_auxv): Likewise.
74         * breakpoint.c (print_one_breakpoint_location): Use
75         uiout::field_fmt.
76         (print_one_catch_solib): Use string_printf.
77         * coff-pe-read.c (add_pe_exported_sym): Likewise.
78         (add_pe_forwarded_sym): Likewise.
79         * dwarf2read.c (create_type_unit_group): Likewise.
80         (build_error_marker_type): Likewise.
81         * infcall.c (get_function_name): Likewise.
82         * valprint.c (print_converted_chars_to_obstack): Likewise.
83         * xtensa-tdep.c (xtensa_register_type): Likewise.
84
85 2018-08-06  Simon Marchi  <simon.marchi@ericsson.com>
86
87         * remote.c (remote_target::download_tracepoint): Fix format
88         string errors.
89
90 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
91
92         * tracefile.c: Include common/byte-vector.h.
93         (trace_save): Change type of buf to gdb::byte_vector.  Initialize
94         with trace_regblock_size if needed.  Update uses of buf.
95
96 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
97
98         * tracepoint.h (collection_list) <m_regs_mask>: Change type to
99         std::vector<unsigned char>.
100         * tracepoint.c (collection_list::collection_list): Remove
101         m_regs_mask initializer from initializer list.  Resize
102         m_regs_mask using the largest remote register number.
103         (collection_list::add_remote_register): Remove size check on
104         m_regs_mask.  Use at to access element.
105         (collection_list::stringify): Change type of temp_buf to
106         gdb::char_vector.  Update uses of temp_buf.  Resize if needed to
107         stringify the register mask.  Use pack_hex_byte for the register
108         mask.
109
110 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
111
112         * tracepoint.h (class collection_list) <add_register>: Remove.
113         <add_remote_register, add_ax_registers, add_local_register>:
114         Declare.
115         <add_memrange>: Add scope parameter.
116         * tracepoint.c (encode_actions_1): Likewise.
117         (collection_list::add_register): Rename to ...
118         (collection_list::add_remote_register): ... this.  Update
119         comment.
120         (collection_list::add_ax_registers, add_local_register): New
121         methods.
122         (collection_list::add_memrange): Add scope parameter.  Call
123         add_local_register instead of add_register.
124         (finalize_tracepoint_aexpr): New function.
125         (collection_list::collect_symbol): Update calls to add_memrange.
126         Call add_local_register instead of add_register.  Call
127         add_ax_registers.  Call finalize_tracepoint_aexpr.
128         (encode_actions_1): Get remote regnos for $reg action.  Call
129         add_remote_register, add_ax_registers, and add_local_register.
130         Update call to add_memrange.  Call finalize_tracepoint_aexpr.
131         (validate_actionline): Call finalize_tracepoint_aexpr.
132
133 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
134
135         * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
136         Replace array buf with gdb::char_vector buf, of size
137         get_remote_packet_size ().  Replace references to buf and
138         BUF_SIZE to buf.data () and buf.size ().  Replace strcpy, strcat
139         and xsnprintf with snprintf.  Raise errors if the buffer is too
140         small.
141
142 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
143
144         * remote.c (remote_target::download_tracepoint): Fix the has_more
145         predicate in the QTDP action list iteration.
146
147 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
148
149         * remote.c (remote_target::download_tracepoint): Fix indentation
150         in for block.
151
152 2018-08-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
153
154         * proc-api.c (_initialize_proc_api): Remove c, unused.
155         * procfs.c (procfs_init_inferior): Remove signals, unused.
156         (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
157         unused.
158
159 2018-08-06  Sergey Korolev  <s.korolev@ndmsystems.com>
160             Andrew Burgess  <andrew.burgess@embecosm.com>
161
162         * linux-nat.c (linux_nat_target::follow_fork): Avoid using
163         'W_STOPCODE (0)' as this could be ambiguous.
164
165 2018-08-03  Sergio Durigan Junior  <sergiodj@redhat.com>
166
167         * ser-tcp.c (net_open): Fix thinko when deciding whether to
168         disable TCP's Nagle algorithm (use "ai_protocol" instead of
169         "ai_socktype").
170
171 2018-08-02  Tom Tromey  <tom@tromey.com>
172
173         PR symtab/16842.
174         * dwarf2read.c (read_func_scope): Set symtab on template parameter
175         symbols.
176         (process_structure_scope): Likewise.
177
178 2018-08-02  Xavier Roirand  <roirand@adacore.com>
179
180         PR gdb/22629:
181         * darwin-nat.c (darwin_kill_inferior): Fix handling of
182         kill inferior.
183
184 2018-08-02  Tom Tromey  <tom@tromey.com>
185
186         * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
187         (darwin_suspend_inferior, darwin_resume_inferior)
188         (darwin_decode_notify_message, darwin_resume_inferior_threads)
189         (darwin_check_new_threads): Check result of get_darwin_inferior.
190
191 2018-07-31  Joel Brobecker  <brobecker@adacore.com>
192
193         GDB 8.1.1 released.
194
195 2018-07-31  Jan Vrany  <jan.vrany@fit.cvut.cz>
196
197         * varobj.c (varobj_get_path_expr_parent): Report an error if
198         parent is a dynamic varobj.
199
200 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
201
202         * gnulib/aclocal.m4: Re-generate.
203         * gnulib/config.in: Re-generate.
204         * gnulib/configure: Re-generate.
205         * gnulib/import/Makefile.in: Re-generate.
206         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
207         * gnulib/import/m4/onceonly.m4: Re-generate.
208
209 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
210
211         * target-descriptions.c (struct xml_test_tdesc): New.
212         (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
213         (record_xml_tdesc): Update.
214         (maintenance_check_xml_descriptions): Update.
215         * target-descriptions.h (record_xml_tdesc): Update comment.
216
217 2018-07-30  Andrew Burgess  <andrew.burgess@embecosm.com>
218
219         * eval.c (evaluate_subexp_for_sizeof): Check for array type before
220         checking array bounds are defined.
221
222 2018-07-30  Tom Tromey  <tom@tromey.com>
223
224         * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
225         irreflexivity violation.
226
227 2018-07-30  Tom Tromey  <tom@tromey.com>
228
229         * cli/cli-decode.c (lookup_cmd): Remove lint code.
230         * value.c (unpack_long): Remove lint code.
231         * valops.c (value_ind): Remove lint code.
232         * valarith.c (value_x_binop, value_x_unop, value_equal)
233         (value_pos): Remove lint code.
234
235 2018-07-28  Tom de Vries  <tdevries@suse.de>
236
237         * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
238         with undefined upper bound as <optimized out>.
239
240 2018-07-27  Sergio Durigan Junior  <sergiodj@redhat.com>
241
242         * gcore.in: Rename variable "name" to "prefix".  Expand
243         "usage" text.
244
245 2018-07-14  Jon Turney  <jon.turney@dronecode.org.uk>
246
247         * windows-nat.c (windows_nat_target::create_inferior): Update to
248         call close() in global namespace.
249
250 2018-07-26  Tom Tromey  <tom@tromey.com>
251
252         * dwarf-index-write.c (add_address_entry): Don't add objfile
253         offsets.
254         * dbxread.c (find_stab_function): Rename from
255         find_stab_function_addr.  Return a bound_minimal_symbol.
256         (read_dbx_symtab): Use raw_text_low, raw_text_high.
257         Don't add objfile offsets.
258         (end_psymtab): Use raw_text_low, raw_text_high,
259         MSYMBOL_VALUE_RAW_ADDRESS.
260         (read_ofile_symtab): Update.
261         (process_one_symbol): Update.
262         * dwarf2read.c (create_addrmap_from_index): Don't add objfile
263         offsets.
264         (dw2_relocate): Remove.
265         (dw2_find_pc_sect_symtab): Bias PC by the text offset before
266         searching addrmap.
267         (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
268         Update.
269         (process_psymtab_comp_unit_reader, add_partial_symbol)
270         (add_partial_subprogram, dwarf2_ranges_read): Update.
271         (load_partial_dies): Update.
272         (add_address_entry): Don't add objfile offsets.
273         (dwarf2_build_include_psymtabs): Update.
274         (create_addrmap_from_aranges): Don't add objfile offsets.
275         (dw2_find_pc_sect_compunit_symtab): Update.
276         * mdebugread.c (parse_symbol): Don't add objfile offsets.
277         (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
278         Update.
279         (parse_partial_symbols): Don't add objfile offsets.  Use
280         raw_text_low, raw_text_high.  Update.
281         (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
282         * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
283         or call 'relocate' quick function.  Clear psymbol_map.
284         * psympriv.h (struct partial_symbol) <address>: Add section
285         offset.
286         <set_unrelocated_address>: Rename from set_address.
287         <raw_text_low, raw_text_high>: New methods.
288         <text_low, text_high>: Add objfile parameter.
289         (add_psymbol_to_bcache): Add 'section' parameter.  Call
290         set_unrelocated_address.
291         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
292         (find_pc_psymbol): Update.
293         (fixup_psymbol_section, relocate_psymtabs): Remove.
294         (dump_psymtab, psym_functions): Update.
295         (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
296         parameter.
297         (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
298         (start_psymtab_common): Update.
299         * symfile-debug.c (debug_qf_relocate): Remove.
300         (debug_sym_quick_functions): Update.
301         * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
302         * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
303         Update.
304
305 2018-07-26  Tom Tromey  <tromey@redhat.com>
306
307         * dbxread.c (end_psymtab): Use text_high_valid and
308         text_low_valid.
309         * mdebugread.c (parse_partial_symbols): Use text_low_valid.
310         (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
311         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
312         Update comment.
313         <text_low_valid, text_high_valid>: New fields.
314         <set_text_low, set_text_high>: Update.
315         * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
316
317 2018-07-26  Tom Tromey  <tom@tromey.com>
318
319         * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
320         Update.
321         * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
322         textlow and texthigh fields.
323         (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
324         Update.
325         * mdebugread.c (parse_lines, parse_partial_symbols)
326         (psymtab_to_symtab_1): Update.
327         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
328         Rename fields.  Update comment.  Now private.
329         <text_low, text_high, set_text_low, set_text_high>: New methods.
330         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
331         (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
332         (start_psymtab_common, maintenance_info_psymtabs)
333         (maintenance_check_psymtabs): Update.
334         * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
335         texthigh fields.
336         (scan_xcoff_symtab): Update.
337
338 2018-07-26  Tom Tromey  <tromey@redhat.com>
339
340         * psympriv.h (struct partial_symbol) <unrelocated_address,
341         address, set_address>: New methods.
342         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
343         (fixup_psymbol_section, relocate_psymtabs): Update.
344         (print_partial_symbols): Add 'objfile' parameter.  Update.
345         (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
346         Update.
347
348 2018-07-26  Tom Tromey  <tom@tromey.com>
349
350         * dwarf-index-write.c (write_psymbols, debug_names::insert)
351         (debug_names::write_psymbols): Update.
352         * psympriv.h (struct partial_symbol): Derive from
353         general_symbol_info.
354         <obj_section>: New method.
355         (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
356         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
357         (find_pc_sect_psymbol, fixup_psymbol_section)
358         (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
359         (print_partial_symbols, recursively_search_psymtabs)
360         (compare_psymbols, psymbol_hash, psymbol_compare)
361         (add_psymbol_to_bcache, maintenance_check_psymtabs)
362         (psymbol_name_matches, psym_fill_psymbol_map): Update.
363
364 2018-07-26  Tom Tromey  <tromey@redhat.com>
365
366         * dbxread.c (end_psymtab): Remove dead code.
367
368 2018-07-26  Andrew Burgess  <andrew.burgess@embecosm.com>
369
370         * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
371         DWARF unwinders are disabled.
372         * dwarf2-frame.c: Add dwarf2read.h include.
373         (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
374         disabled.
375         (dwarf2_frame_unwinders_enabled_p): Define.
376         (show_dwarf_unwinders_enabled_p): New function.
377         (_initialize_dwarf2_frame): Register switch to control DWARF
378         unwinder use.
379         * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
380         * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
381         (show_dwarf_cmdlist): Remove static keyword.
382         * dwarf2read.h (set_dwarf_cmdlist): Declare.
383         (show_dwarf_cmdlist): Declare.
384         * NEWS: Document new feature.
385
386 2018-07-26  Tom de Vries  <tdevries@suse.de>
387
388         PR breakpoints/23366
389         * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
390
391 2018-07-26  Tom de Vries  <tdevries@suse.de>
392
393         * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
394         DW_AT_count can't be translated to a dynamic prop.
395
396 2018-07-25  Tom de Vries  <tdevries@suse.de>
397
398         * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
399         try/catch.
400
401 2018-07-25  Jan Vrany  <jan.vrany@fit.cvut.cz>
402
403         * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
404
405 2018-07-25  Joel Brobecker  <brobecker@adacore.com>
406
407         * MAINTAINERS (Global Maintainers): Add Tom Tromey.
408
409 2018-07-24  Keith Seitz  <keiths@redhat.comt
410
411         PR symtab/23010
412         * dwarf2read.c (dw2_add_symbol_to_list): New function.
413         (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
414         instead of add_symbol_to_list.
415         (read_file_scope): Call prepare_one_comp_unit before reading
416         any other DIEs.
417
418 2018-07-24  Simon Marchi  <simon.marchi@ericsson.com>
419
420         * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
421
422 2018-07-24  Tom Tromey  <tom@tromey.com>
423
424         * utils.c (malloc, realloc, free): Don't declare.
425         * configure, config.in: Rebuild.
426         * configure.ac: Don't check for declarations of free, malloc, or
427         realloc.
428
429 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
430
431         * aarch64-linux-nat.c
432         (aarch64_linux_nat_target::stopped_data_address): Remove unused
433         variable.
434         * arm-linux-nat.c (fetch_regs): Likewise.
435         (store_regs): Likewise.
436         (fetch_vfp_regs): Likewise.
437         (store_vfp_regs): Likewise.
438         (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
439         (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
440         (arm_linux_nat_target::insert_watchpoint): Likewise.
441         (arm_linux_nat_target::remove_watchpoint): Likewise.
442         * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
443         Likewise.
444         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
445         Likewise.
446         * ppc-linux-nat.c (fetch_register): Likewise.
447         (fetch_all_gp_regs): Likewise.
448         (fetch_ppc_registers): Likewise.
449         (store_all_gp_regs): Likewise.
450         (store_ppc_registers): Likewise.
451         (hwdebug_insert_point): Likewise.
452         (can_use_watchpoint_cond_accel): Likewise.
453         * remote-sim.c (gdb_os_write_stdout): Likewise.
454
455 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
456             Tom Tromey  <tom@tromey.com>
457
458         * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
459         test for it.
460         * configure: Rebuild.
461
462 2018-07-22  Tom Tromey  <tom@tromey.com>
463
464         * regformats/regdat.sh: Define xmltarget_${name} inside
465         #ifndef IN_PROCESS_AGENT.
466
467 2018-07-22  Tom Tromey  <tom@tromey.com>
468
469         * value.c (value_fetch_lazy_bitfield): Remove unused variable.
470
471 2018-07-22  Tom Tromey  <tom@tromey.com>
472
473         * symfile.c (reread_symbols): Notify iter, not objfile.
474
475 2018-07-22  Tom Tromey  <tom@tromey.com>
476
477         * ravenscar-thread.c (ravenscar_thread_target::store_registers):
478         Use arch_ops.
479         (ravenscar_thread_target::prepare_to_store): Likewise.
480
481 2018-07-22  Tom Tromey  <tom@tromey.com>
482
483         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
484         unused variable.  Call value_fetch_lazy when needed.
485         * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
486         Remove unused variable.  Call value_fetch_lazy when needed.
487
488 2018-07-22  Tom Tromey  <tom@tromey.com>
489
490         * m32c-tdep.c (mark_dma): Return void.
491         (make_regs): Remove unused declarations.
492
493 2018-07-22  Tom Tromey  <tom@tromey.com>
494
495         * guile/scm-cmd.c (gdbscm_dont_repeat): Call
496         cmdscm_get_valid_command_smob_arg_unsafe for effect.
497         * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
498         bkscm_get_valid_block_smob_arg_unsafe for effect.
499
500 2018-07-22  Tom Tromey  <tom@tromey.com>
501
502         * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
503         value_type.
504
505 2018-07-22  Tom Tromey  <tom@tromey.com>
506
507         * windows-nat.c (saved_context): Conditionally define.
508         * remote.c (remote_target::remote_btrace_maybe_reopen):
509         Conditionally declare "warned".
510         * inflow.c (sigquit_ours): Conditionally define.
511         (new_tty): Move "tty" declaration inside #if.
512         * guile/guile.c (guile_datadir): Conditionally define.
513         * charset.c (set_be_le_names): Move some declarations inside #if.
514         * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
515         #if.
516         (parse_xml_btrace_conf): Likewise.
517
518 2018-07-22  Tom Tromey  <tom@tromey.com>
519
520         * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
521
522 2018-07-22  Tom Tromey  <tom@tromey.com>
523
524         * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
525         * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
526         (vlscm_convert_typed_value_from_scheme): Remove unused variable.
527         * buildsym-legacy.c (get_macro_table): Remove unused variable.
528         * stack.c (frame_apply_level_command): Remove unused variable.
529         * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
530         * sparc64-tdep.c (adi_examine_command): Remove unused variable.
531         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
532         unused variable.
533         * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
534         * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
535         * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
536         variable.
537         * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
538         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
539         variable.
540         * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
541         Remove unused variable.
542         * cli/cli-script.c (recurse_read_control_structure): Remove unused
543         variable.
544         * common/tdesc.c (print_xml_feature::visit): Remove unused
545         variable.
546         * compile/compile-object-load.c (store_regs): Remove unused
547         variables.
548         * complaints.c (clear_complaints): Remove unused variable.
549         * corelow.c (core_target_open): Remove unused variable.
550         * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
551         variable.
552         * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
553         variable.
554         * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
555         variable.
556         * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
557         variable.
558         * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
559         variable.
560         * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
561         variable.
562         * ia64-tdep.c (examine_prologue): Remove unused variable.
563         * infcall.c (run_inferior_call): Remove unused variable.
564         * inferior.c (exit_inferior): Remove unused variable.
565         * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
566         * linespec.c (decode_line_2): Remove unused variable.
567         * linux-nat.c (super_close): Remove.
568         * linux-tdep.c (linux_info_proc): Remove unused variable.
569         * mi/mi-main.c (mi_execute_command): Remove unused variable.
570         * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
571         Remove unused variable.
572         * parse.c (find_minsym_type_and_address): Remove unused variable.
573         * printcmd.c (info_symbol_command, printf_floating): Remove unused
574         variable.
575         * python/py-breakpoint.c (bppy_set_commands): Remove unused
576         variable.
577         * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
578         variables.
579         * record-btrace.c (record_btrace_target::store_registers): Remove
580         unused variable.
581         (cmd_show_record_btrace_cpu): Remove unused variable.
582         * riscv-tdep.c (riscv_register_reggroup_p)
583         (riscv_push_dummy_call, riscv_return_value): Remove unused
584         variable.
585         * rust-exp.y (literal): Remove unused variable.
586         * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
587         unused variable.
588         <STRUCTOP_ANONYMOUS>: Likewise.
589         * s390-linux-tdep.c (s390_linux_init_abi_31)
590         (s390_linux_init_abi_64): Remove unused variable.
591         * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
592         (file_select_thread, net_windows_open, _initialize_ser_windows):
593         Remove unused variables.
594         * symtab.c (find_pc_sect_line): Remove unused variable.
595         * target-memory.c (compute_garbled_blocks): Remove unused
596         variable.
597         (target_write_memory_blocks): Remove unused variable.
598         * target.c (target_stack::unpush): Remove unused variables.
599         * tracepoint.c (start_tracing, all_tracepoint_actions)
600         (merge_uploaded_trace_state_variables)
601         (print_one_static_tracepoint_marker): Remove unused variable.
602         * unittests/basic_string_view/element_access/char/1.cc (test01):
603         Remove unused variable.
604         * windows-nat.c (windows_continue, windows_add_all_dlls)
605         (do_initial_windows_stuff, windows_nat_target::create_inferior):
606         Remove unused variables.
607
608 2018-07-21  Simon Marchi  <simon.marchi@polymtl.ca>
609
610         * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
611         attr_profile in HAVE_ELF.
612         * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
613         HAVE_ELF.
614
615 2018-07-20  Simon Marchi  <simon.marchi@polymtl.ca>
616
617         * frame.c (frame_register_unwind): Change parameter name.
618         (frame_unwind_register): Likewise.
619         (frame_unwind_register_value): Likewise.
620         (frame_unwind_register_signed): Likewise.
621         (frame_unwind_register_unsigned): Likewise.
622         * frame.h (frame_register_unwind): Likewise.
623         (frame_unwind_register): Likewise.
624         (frame_unwind_register_value): Likewise.
625         (frame_unwind_register_signed): Likewise.
626         (frame_unwind_register_unsigned): Likewise.
627         (frame_unwind_arch): Likewise.
628
629 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
630
631         * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
632         ISA maintenance.
633
634 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
635
636         * mips-linux-nat.c (mips_linux_nat_target::read_description):
637         Call `get_ptrace_pid' rather than extracting the ptrace PID by
638         hand.
639
640 2018-07-20  Keith Seitz  <keiths@redhat.com>
641
642         * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
643         m_main_subfile, m_comp_dir, m_producer, m_debugformat,
644         m_compunit_symtab, m_language>: Add "m_" prefix.
645         Update all uses.
646         * buildsym.c: Update all uses.
647
648 2018-07-20  Tom Tromey  <tom@tromey.com>
649
650         * buildsym-legacy.h (record_line): Don't use record_line_ftype.
651         * buildsym.h (record_line_ftype): Remove typedef.
652
653 2018-07-20  Tom Tromey  <tom@tromey.com>
654
655         * buildsym-legacy.h (augment_type_symtab): Don't declare.
656         (end_expandable_symtab): Likewise.
657         (end_symtab_get_static_block): Likewise.
658         (end_symtab_from_static_block): Likewise.
659         * buildsym-legacy.c (augment_type_symtab): Remove.
660         (end_expandable_symtab): Remove.
661         (end_symtab_get_static_block): Remove.
662         (end_symtab_from_static_block): Remove.
663
664 2018-07-20  Tom Tromey  <tom@tromey.com>
665
666         * dwarf2read.c: Include buildsym.h.
667         (struct dwarf2_cu) <builder>: New method.
668         (fixup_go_packaging): Update.
669         (process_full_comp_unit, process_full_type_unit): Update.  Don't
670         use scoped_free_pendings.
671         (using_directives): Add "cu" parameter, remove "language".
672         (read_import_statement, setup_type_unit_groups, )
673         (read_func_scope, read_lexical_block_scope)
674         (dwarf2_record_block_ranges, read_namespace): Update.
675         (lnp_state_machine::lnp_state_machine): Add cu parameter.
676         (lnp_state_machine::handle_end_sequence): Update.
677         (class lnp_state_machine) <m_cu>: New member.
678         <m_record_line_callback>: Remove.
679         <m_currently_recording_lines>: New member.
680         (lnp_state_machine::handle_set_file): Update.
681         (noop_record_line): Remove.
682         (dwarf_record_line_p): Add cu parameter.
683         (dwarf_record_line_1, dwarf_finish_line): Likewise.
684         (lnp_state_machine::record_line)
685         (lnp_state_machine::lnp_state_machine)
686         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
687         (dwarf_decode_lines): Update.
688         (dwarf2_start_subfile): Add cu parameter.
689         (dwarf2_start_symtab, new_symbol): Update.
690         (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
691         Remove dwarf2_per_objfile parameter.
692         (dwarf_decode_macros): Update.
693
694 2018-07-20  Tom Tromey  <tom@tromey.com>
695
696         * stabsread.c (define_symbol): Update.
697         * buildsym-legacy.h (get_buildsym_compunit): Declare.
698         * dwarf2read.c (new_symbol): Update.
699         * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
700         * cp-namespace.c: Include buildsym.h.
701         (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
702         * buildsym-legacy.c (get_buildsym_compunit): New function.
703
704 2018-07-20  Tom Tromey  <tom@tromey.com>
705
706         * xcoffread.c: Include buildsym-legacy.h.
707         * windows-nat.c: Include buildsym-legacy.h.
708         * stabsread.c: Include buildsym-legacy.h.
709         * mdebugread.c: Include buildsym-legacy.h.
710         * buildsym-legacy.h: New file.
711         * buildsym-legacy.c: New file, from buildsym.c.
712         * go32-nat.c: Include buildsym-legacy.h.
713         * dwarf2read.c: Include buildsym-legacy.h.
714         * dbxread.c: Include buildsym-legacy.h.
715         * cp-namespace.c: Include buildsym-legacy.h.
716         * coffread.c: Include buildsym-legacy.h.
717         * buildsym.h: Move some contents to buildsym-legacy.h.
718         * buildsym.c: Include buildsym-legacy.h.  Move many functions to
719         buildsym-legacy.c.
720         * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
721
722 2018-07-20  Tom Tromey  <tom@tromey.com>
723
724         * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
725         * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
726         (buildsym_compunit::buildsym_compunit)
727         (buildsym_compunit::~buildsym_compunit)
728         (buildsym_compunit::get_macro_table): Define.
729
730 2018-07-20  Tom Tromey  <tom@tromey.com>
731
732         * buildsym.c (reset_symtab_globals): Remove.
733         (buildsym_compunit::end_symtab_from_static_block): Update.
734         (buildsym_compunit::augment_type_symtab): Update.
735         (end_symtab_from_static_block): Call free_buildsym_compunit.
736         (augment_type_symtab, end_symtab, end_expandable_symtab):
737         Likewise.
738
739 2018-07-20  Tom Tromey  <tom@tromey.com>
740
741         * arch-utils.c: Do not include buildsym.h.
742         * mipsread.c: Do not include buildsym.h.
743         * machoread.c: Do not include buildsym.h.
744         * elfread.c: Do not include buildsym.h.
745
746 2018-07-20  Tom Tromey  <tom@tromey.com>
747
748         * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
749         initialization.
750         (buildsym_compunit): Add new constructor.
751         (struct buildsym_compunit) <get_last_source_file, finish_block,
752         record_block_range, start_subfile, patch_subfile_names,
753         push_subfile, pop_subfile, record_line, get_compunit_symtab,
754         set_last_source_start_addr, get_last_source_start_addr,
755         get_local_using_directives, set_local_using_directives,
756         get_global_using_directives, outermost_context_p,
757         get_current_context_stack, get_context_stack_depth,
758         get_current_subfile, get_local_symbols, get_file_symbols,
759         get_global_symbols, record_debugformat, record_producer,
760         push_context, pop_context, end_symtab_get_static_block,
761         end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
762         New public methods.
763         <record_pending_block, finish_block_internal, make_blockvector,
764         watch_main_source_file_lossage, end_symtab_with_blockvector>: New
765         private methods.
766         Update all users.
767
768 2018-05-22  Tom Tromey  <tom@tromey.com>
769
770         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
771         parameter.
772         (finish_block_internal): Update.
773
774 2018-07-20  Tom Tromey  <tom@tromey.com>
775
776         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
777         parameter.
778         (finish_block_internal): Update.
779
780 2018-07-20  Tom Tromey  <tom@tromey.com>
781
782         * buildsym.h (EXTERN): Don't define or undef.
783         * buildsym.c (EXTERN): Don't define.
784
785 2018-07-20  Tom Tromey  <tom@tromey.com>
786
787         * buildsym.c: Remove TODO comment.
788
789 2018-07-20  Tom Tromey  <tom@tromey.com>
790
791         * coffread.c (coff_symtab_read): Update.
792         * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
793         (xcoff_new_init): Update.
794         * mipsread.c (mipscoff_new_init): Update.
795         * mdebugread.c (mdebug_build_psymtabs): Update.
796         * elfread.c (elf_new_init): Update.
797         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
798         Update.
799         * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
800         (coffstab_build_psymtabs, elfstab_build_psymtabs)
801         (stabsect_build_psymtabs): Update.
802         * buildsym.h (buildsym_init): Don't declare.
803         * buildsym.c: Update comment.
804         (prepare_for_building): Remove.
805         (start_symtab, restart_symtab): Update.
806         (reset_symtab_globals): Update comment.
807         (buildsym_init): Remove.
808
809 2018-07-20  Tom Tromey  <tom@tromey.com>
810
811         * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
812         * stabsread.c (patch_block_stabs, define_symbol, read_type)
813         (read_enum_type, common_block_start, common_block_end)
814         (cleanup_undefined_types_1, finish_global_stabs): Update.
815         * mdebugread.c (psymtab_to_symtab_1): Update.
816         * dwarf2read.c (fixup_go_packaging, read_func_scope)
817         (read_lexical_block_scope, new_symbol): Update.
818         * dbxread.c (process_one_symbol): Update.
819         * coffread.c (coff_symtab_read, process_coff_symbol)
820         (coff_read_enum_type): Update.
821         * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
822         declare.
823         (get_local_symbols, get_file_symbols, get_global_symbols): New
824         functions.
825         * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
826         m_global_symbols.
827         <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
828         (~scoped_free_pendings): Update.
829         (finish_block, prepare_for_building, reset_symtab_globals)
830         (end_symtab_get_static_block, end_symtab_with_blockvector)
831         (augment_type_symtab, push_context): Update.
832         (get_local_symbols, get_file_symbols, get_global_symbols): New
833         functions.
834         (buildsym_init): Update.
835
836 2018-07-20  Tom Tromey  <tom@tromey.com>
837
838         * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
839         (process_full_type_unit): Likewise.
840         (dwarf2_start_symtab): Set list_in_scope.
841
842 2018-07-20  Tom Tromey  <tom@tromey.com>
843
844         * dwarf2read.c (process_psymtab_comp_unit_reader)
845         (build_type_psymtabs_reader): Do not set list_in_scope.
846
847 2018-07-20  Tom Tromey  <tom@tromey.com>
848
849         * buildsym.c (free_pendings): Remove.
850         (add_symbol_to_list, scoped_free_pendings)
851         (finish_block_internal, buildsym_init): Update.
852
853 2018-07-20  Tom Tromey  <tom@tromey.com>
854
855         * xcoffread.c (read_xcoff_symtab): Update.
856         * dwarf2read.c (read_func_scope, read_lexical_block_scope):
857         Update.
858         * dbxread.c (process_one_symbol): Update.
859         * coffread.c (coff_symtab_read): Update.
860         * buildsym.h (finish_block): Update.
861         * buildsym.c (finish_block): Remove "listhead" argument.
862         (end_symtab_get_static_block): Update.
863
864 2018-07-20  Tom Tromey  <tom@tromey.com>
865
866         * buildsym.h (class scoped_free_pendings): Remove constructor.
867         * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
868         method.
869         <m_pending_block_obstack, m_pending_blocks>: New members.
870         (pending_block_obstack, pending_blocks): Remove.
871         (scoped_free_pendings::scoped_free_pendings): Default.
872         (~scoped_free_pendings): Update.
873         (free_pending_blocks): Remove.
874         (finish_block_internal, record_pending_block, make_blockvector)
875         (end_symtab_get_static_block, augment_type_symtab, push_context)
876         (buildsym_init): Update.
877
878 2018-07-20  Tom Tromey  <tom@tromey.com>
879
880         * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
881         m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
882         members.
883         (pending_addrmap, pending_addrmap_obstack)
884         (pending_addrmap_interesting): Remove.
885         (scoped_free_pendings, record_block_range, make_blockvector)
886         (prepare_for_building, reset_symtab_globals, buildsym_init):
887         Update.
888
889 2018-07-20  Tom Tromey  <tom@tromey.com>
890
891         * xcoffread.c (process_linenos): Update.
892         * stabsread.c (define_symbol, read_type, read_enum_type): Update.
893         * mdebugread.c (psymtab_to_symtab_1): Update.
894         * dwarf2read.c (setup_type_unit_groups)
895         (lnp_state_machine::handle_set_file, dwarf_record_line_p)
896         (lnp_state_machine::record_line, dwarf_decode_lines): Update.
897         * dbxread.c (process_one_symbol): Update.
898         * coffread.c (coff_symtab_read, enter_linenos)
899         (process_coff_symbol): Update.
900         * buildsym.h (current_subfile): Don't declare.
901         (get_current_subfile): Declare.
902         * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
903         member.
904         (start_subfile, free_buildsym_compunit, push_subfile)
905         (prepare_for_building, start_symtab): Update.
906         (get_current_subfile): New function.
907
908 2018-07-20  Tom Tromey  <tom@tromey.com>
909
910         * coffread.c (coff_symtab_read): Update.
911         * xcoffread.c (read_xcoff_symtab): Update.
912         * dwarf2read.c (new_symbol): Update.
913         (read_func_scope, read_lexical_block_scope): Update.
914         * dbxread.c (process_one_symbol): Update.
915         * buildsym.h (context_stack, context_stack_depth): Don't declare.
916         (outermost_context_p): Remove macro.
917         (outermost_context_p, get_current_context_stack)
918         (get_context_stack_depth): Declare.
919         (pop_context): Return struct context_stack.
920         * buildsym.c (struct buildsym_compunit) <m_context_stack: New
921         member.
922         (context_stack_size): Remove.
923         (INITIAL_CONTEXT_STACK_SIZE): Remove.
924         (prepare_for_building, end_symtab_get_static_block)
925         (augment_type_symtab, push_context): Update.
926         (pop_context): Return struct context_stack.
927         (outermost_context_p, get_current_context_stack)
928         (get_context_stack_depth): New functions.
929         (buildsym_init): Update.
930
931 2018-07-20  Tom Tromey  <tom@tromey.com>
932
933         * rust-exp.y: Now a pure parser.  Update all rules.
934         (%union): Move earlier.
935         (current_parser, work_obstack): Remove globals.
936         (rust_parser, ~rust_parser): Update.
937         (class rust_parser) <copy_name, concat3, crate_name, super_name,
938         lex_character, lex_number, lex_string, lex_identifier,
939         rust_lookup_type, convert_params_to_types, convert_ast_to_type,
940         convert_name, convert_params_to_expression,
941         convert_ast_to_expression, ast_basic_type, ast_operation,
942         ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
943         ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
944         ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
945         ast_array_type, ast_slice_type, ast_reference_type,
946         ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
947         (rust_parse): Update.
948         (rustyyerror, rustyylex): Add parser parameter.
949         (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
950         (rust_lex_stringish_test, rust_lex_test_sequence)
951         (rust_lex_test_trailing_dot, rust_lex_test_completion)
952         (rust_lex_test_push_back, rust_lex_tests): Update.
953
954 2018-07-19  Pedro Alves  <palves@redhat.com>
955
956         * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
957         gdb::unique_xmalloc_ptr.
958         * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
959         Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
960         * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
961         copy-initialization.
962         * guile/scm-pretty-print.c (ppscm_print_children): Use
963         gdb::unique_xmalloc_ptr instead of cleanups.
964         (gdbscm_apply_val_pretty_printer): Remove cleanups.
965         * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
966         gdb::unique_xmalloc_ptr.
967         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
968         Adjust to use gdb::unique_xmalloc_ptr.
969         * guile/scm-utils.c (extract_arg): Adjust.
970         * guile/scm-value.c (gdbscm_value_field): Adjust to use
971         gdb::unique_xmalloc_ptr instead of a cleanup.
972
973 2018-07-19  Tom Tromey  <tom@tromey.com>
974
975         * utils.c (do_value_free_to_mark)
976         (make_cleanup_value_free_to_mark): Remove.
977         * utils.h (make_cleanup_value_free_to_mark): Remove.
978
979 2018-07-19  Pedro Alves  <palves@redhat.com>
980
981         * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
982         forwarding reference.
983
984 2018-07-18  Pedro Alves  <palves@redhat.com>
985
986         * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
987         gdbscm_wrap.  Use gdb::unique_xmalloc_ptr<char> instead of a
988         cleanup.
989
990 2018-07-18  Pedro Alves  <palves@redhat.com>
991
992         * guile/guile-internal.h: Add comment about mixing GDB and Scheme
993         exceptions.
994         (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
995         (gdbscm_wrap): New.
996         * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
997         directly instead of a cleanup.
998         * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
999         (vlscm_unop): ... this.  Reimplement using gdbscm_wrap.
1000         (vlscm_binop_gdbthrow): New, factored out from ...
1001         (vlscm_binop): ... this.  Reimplement using gdbscm_wrap.
1002         (vlscm_rich_compare): Use gdbscm_wrap.
1003         * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
1004         instead of a cleanup.
1005         (gdbscm_lookup_global_symbol): Use xfree directly instead of a
1006         cleanup.
1007         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
1008         Use xfree directly instead of a cleanup.
1009         * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
1010         Adjust to use gdbscm_wrap and scoped_value_mark.
1011         (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
1012         (gdbscm_value_address, gdbscm_value_dereference)
1013         (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
1014         scoped_value_mark.
1015         (gdbscm_value_dynamic_type): Use scoped_value_mark.
1016         (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
1017         scoped_value_mark.
1018         (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
1019         gdbscm_wrap and scoped_value_mark.
1020         (gdbscm_value_to_string): Use xfree directly instead of a
1021         cleanup.  Move 'buffer' unique_ptr to TRY scope.
1022         (gdbscm_value_to_lazy_string): Use xfree directly instead of a
1023         cleanup.  Move 'buffer' unique_ptr to TRY scope.  Use
1024         scoped_value_mark.
1025         (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
1026         (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
1027         scoped_value_mark.
1028         (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
1029         gdbscm_wrap.
1030
1031 2018-07-18  Tom de Vries  <tdevries@suse.de>
1032
1033         * findvar.c (default_read_var_value): Also resolve dynamic type for
1034         LOC_OPTIMIZED_OUT vars.
1035
1036 2018-07-18  Maciej W. Rozycki  <macro@mips.com>
1037
1038         * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
1039         decoding.
1040
1041 2018-07-17  Tom Tromey  <tom@tromey.com>
1042
1043         * guile/scm-param.c (pascm_set_func, pascm_show_func)
1044         (compute_enum_list, pascm_set_param_value_x)
1045         (gdbscm_parameter_value): Update.
1046         * guile/guile-internal.h (gdbscm_scm_to_string): Update.
1047         (gdbscm_scm_to_host_string): Update.
1048         * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
1049         Update.
1050         * guile/scm-cmd.c (cmdscm_add_completion): Update.
1051         * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
1052         * guile/scm-string.c (gdbscm_scm_to_string): Return
1053         unique_xmalloc_ptr.
1054         (gdbscm_scm_to_host_string): Likewise.
1055
1056 2018-07-17  Tom Tromey  <tom@tromey.com>
1057
1058         * guile/guile.c (gdbscm_eval_from_control_command): Update.
1059         * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
1060         * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
1061         * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
1062         unique_xmalloc_ptr.
1063
1064 2018-07-17  Tom Tromey  <tom@tromey.com>
1065
1066         * guile/scm-param.c (pascm_signal_setshow_error): Update.
1067         * guile/guile-internal.h (gdbscm_exception_message_to_string):
1068         Update.
1069         * guile/scm-cmd.c (cmdscm_function): Update.
1070         * guile/scm-pretty-print.c
1071         (ppscm_print_exception_unless_memory_error): Update.
1072         * guile/scm-exception.c (gdbscm_exception_message_to_string):
1073         Return unique_xmalloc_ptr.
1074
1075 2018-07-17  Tom Tromey  <tom@tromey.com>
1076
1077         * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
1078         Use string_printf.
1079
1080 2018-07-17  Jim Wilson  <jimw@sifive.com>
1081
1082         * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
1083         set_gdbarch_decr_pc_after_break.  Call riscv_read_misa_reg always.
1084         (riscv_gdbarch_init): Delete local has_compressed_isa.  Delete now
1085         unecessary braces after EF_RISCV_RVC test.  Delete call to
1086         set_gdbarch_decr_pc_after_break.
1087
1088         * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
1089         RISCV_LAST_FP_REGNUM + 1.
1090         (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
1091
1092 2018-07-17  Tom Tromey  <tom@tromey.com>
1093
1094         * configure.ac: Remove --disable-gdbcli.
1095         * configure: Rebuild.
1096         * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
1097         (SUBDIR_CLI_CFLAGS): Remove.
1098         (SFILES): Use SUBDIR_CLI_SRCS.
1099         (COMMON_OBS): Use SUBDIR_CLI_OBS.
1100
1101 2018-07-17  Tom Tromey  <tom@tromey.com>
1102
1103         PR gdb/18624:
1104         * coffread.c (coff_symtab_read): Use scoped_free_pendings.
1105
1106 2018-07-16  Jim Wilson  <jimw@sifive.com>
1107
1108         * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
1109
1110 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
1111
1112         * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
1113         variable.
1114         (libunwind_frame_sniffer): Likewise.
1115         (libunwind_frame_prev_register): Likewise.
1116         (libunwind_sigtramp_frame_sniffer): Likewise.
1117         * ia64-tdep.c (ia64_access_reg): Likewise.
1118         (ia64_access_rse_reg): Likewise.
1119         (ia64_libunwind_sigtramp_frame_this_id): Likewise.
1120         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
1121
1122 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
1123
1124         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
1125
1126 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
1127
1128         * remote-sim.c (gdbsim_target::close,
1129         gdbsim_target::mourn_inferior): Remove unused variables.
1130
1131 2018-07-16  Simon Marchi  <simon.marchi@polymtl.ca>
1132
1133         * ia64-tdep.c (ktab_buf): New global.
1134         (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
1135         (get_kernel_table): Adjust.
1136
1137 2018-07-16  Tom Tromey  <tom@tromey.com>
1138
1139         * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
1140         * dwarf2read.c (using_directives, new_symbol): Use
1141         outermost_context_p.
1142         * dbxread.c (process_one_symbol): Use outermost_context_p.
1143         * coffread.c (coff_symtab_read): Use outermost_context_p.
1144
1145 2018-07-16  Tom Tromey  <tom@tromey.com>
1146
1147         * dwarf2read.c (using_directives, read_func_scope)
1148         (read_lexical_block_scope): Update.
1149         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
1150         * buildsym.h (local_using_directives, global_using_directives):
1151         Don't declare.
1152         (get_local_using_directives, set_local_using_directives)
1153         (get_global_using_directives): Declare.
1154         * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
1155         m_global_using_directives>: New members.
1156         (finish_block_internal, prepare_for_building)
1157         (reset_symtab_globals, end_symtab_get_static_block)
1158         (push_context): Update.
1159         (get_local_using_directives, set_local_using_directives)
1160         (get_global_using_directives): New functions.
1161         (buildsym_init): Update.
1162
1163 2018-07-16  Tom Tromey  <tom@tromey.com>
1164
1165         * xcoffread.c (xcoff_initial_scan): Don't call
1166         free_pending_blocks.
1167         * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
1168         * buildsym.h (class scoped_free_pendings): Add constructor.
1169         (free_pending_blocks): Don't declare.
1170         * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
1171         (free_pending_blocks): Now static.
1172
1173 2018-07-16  Tom Tromey  <tom@tromey.com>
1174
1175         * buildsym.h (push_subfile, pop_subfile): Update declarations.
1176         * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
1177         member.
1178         (struct subfile_stack): Remove.
1179         (subfile_stack): Remove.
1180         (push_subfile, pop_subfile, buildsym_init): Update.
1181
1182 2018-07-16  Tom Tromey  <tom@tromey.com>
1183
1184         * buildsym.c (push_subfile): Use gdb_assert.
1185         (pop_subfile): Use gdb_assert.
1186
1187 2018-07-16  Tom Tromey  <tom@tromey.com>
1188
1189         * buildsym.h (merge_symbol_lists): Remove.
1190         * buildsym.c (merge_symbol_lists): Remove.
1191
1192 2018-07-16  Tom Tromey  <tom@tromey.com>
1193
1194         * stabsread.c (scan_file_globals): Update comment.
1195         * stabsread.h (scan_file_globals): Move from buildsym.h.
1196         * buildsym.h (scan_file_globals): Move to stabsread.h.
1197
1198 2018-07-16  Tom Tromey  <tom@tromey.com>
1199
1200         * xcoffread.c (xcoff_new_init): Update.
1201         * mipsread.c (mipscoff_new_init): Update.
1202         * mdebugread.c (mdebug_build_psymtabs): Update.
1203         * elfread.c (elf_new_init): Update.
1204         * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
1205         (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
1206         * buildsym.h (buildsym_new_init): Don't declare.
1207         * buildsym.c (buildsym_new_init): Remove.
1208
1209 2018-07-16  Tom Tromey  <tom@tromey.com>
1210
1211         * stabsread.h (within_function): Move from buildsym.h.
1212         * stabsread.c (start_stabs): Clear within_function.
1213         * coffread.c (coff_start_symtab): Clear within_function.
1214         * buildsym.h (within_function): Move to stabsread.h.
1215         * buildsym.c (prepare_for_building): Update.
1216
1217 2018-07-16  Tom Tromey  <tom@tromey.com>
1218
1219         * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
1220         * dwarf2read.c (dwarf2_start_symtab): Don't set
1221         processing_gcc_compilation.
1222         * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
1223
1224 2018-07-16  Tom Tromey  <tom@tromey.com>
1225
1226         * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
1227         (next_symbol_text_func): Move from buildsym.h.
1228         * stabsread.c (hashname): Move from buildsym.c.
1229         * buildsym.h (HASHSIZE, symnum, next_symbol_text)
1230         (next_symbol_text_func, hashname): Move to stabsread.h.
1231         * buildsym.c: Don't include bcache.h
1232         (hashname): Move to stasbread.c.
1233
1234 2018-07-16  Tom Tromey  <tom@tromey.com>
1235
1236         * buildsym.h (context_stack_size): Don't declare.
1237         * buildsym.c (context_stack_size): New global.
1238
1239 2018-07-16  Tom Tromey  <tom@tromey.com>
1240
1241         * dbxread.c (processing_acc_compilation): New global.
1242         * buildsym.h (processing_acc_compilation): Don't declare.
1243
1244 2018-07-16  Tom Tromey  <tom@tromey.com>
1245
1246         * xcoffread.c (aix_process_linenos, complete_symtab): Update.
1247         * dbxread.c (read_ofile_symtab): Update.
1248         * coffread.c (coff_start_symtab, coff_end_symtab): Update.
1249         * buildsym.h (last_source_start_addr): Remove.
1250         (set_last_source_start_addr, get_last_source_start_addr):
1251         Declare.
1252         * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
1253         parameter.
1254         (struct buildsym_compunit) <m_last_source_start_addr>: New
1255         member.
1256         (prepare_for_building): Remove start_addr parameter.
1257         (start_symtab, restart_symtab, end_symtab_get_static_block)
1258         (end_symtab_with_blockvector): Update.
1259         (set_last_source_start_addr, get_last_source_start_addr): New
1260         functions.
1261
1262 2018-07-16  Tom Tromey  <tom@tromey.com>
1263
1264         * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
1265         member.
1266         (have_line_numbers): Remove.
1267         (record_line, prepare_for_building, end_symtab_get_static_block)
1268         (augment_type_symtab): Update.
1269
1270 2018-07-16  Tom Tromey  <tom@tromey.com>
1271
1272         * buildsym.c (~buildsym_compunit): Free the macro table.
1273         (struct buildsym_compunit) <get_macro_table, release_macros>: New
1274         methods.
1275         <m_pending_macros>: New member.
1276         (pending_macros): Remove.
1277         (~scoped_free_pendings, get_macro_table, prepare_for_building)
1278         (reset_symtab_globals, end_symtab_get_static_block)
1279         (end_symtab_with_blockvector, augment_type_symtab)
1280         (buildsym_init): Update.
1281
1282 2018-07-16  Tom Tromey  <tom@tromey.com>
1283
1284         * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
1285         parameter.
1286         (buildsym_compunit::set_last_source_file): New method.
1287         <m_last_source_file>: New member.
1288         (prepare_for_building): Remove "name" parameter.
1289         (start_symtab, restart_symtab, reset_symtab_globals): Update.
1290         (last_source_file): Remove.
1291         (set_last_source_file, get_last_source_file): Update.
1292
1293 2018-07-16  Tom Tromey  <tom@tromey.com>
1294
1295         * buildsym.c (prepare_for_building): Add assert.
1296
1297 2018-07-16  Tom Tromey  <tom@tromey.com>
1298
1299         * buildsym.c (~buildsym_compunit): Update.
1300         (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
1301         (start_subfile, patch_subfile_names)
1302         (end_symtab_with_blockvector): Update.
1303
1304 2018-07-16  Tom Tromey  <tom@tromey.com>
1305
1306         * buildsym.c (struct buildsym_compunit): Add constructor,
1307         destructor, initializers.
1308         (start_buildsym_compunit): Remove.
1309         (free_buildsym_compunit): Use "delete".
1310         (start_symtab, restart_symtab): Use "new".
1311
1312 2018-07-13  Simon Marchi  <simon.marchi@polymtl.ca>
1313
1314         * symfile.c (set_objfile_default_section_offset): Remove struct
1315         keyword.
1316
1317 2018-07-14  Stafford Horne  <shorne@gmail.com>
1318
1319         * (Responsible Maintainers): Add myself as or1k maintainer.
1320
1321 2018-07-13  Tom Tromey  <tom@tromey.com>
1322
1323         * symfile.c (set_objfile_default_section_offset): Use extra braces
1324         around initializer.
1325
1326 2018-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1327
1328         * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
1329         non-branching basr.
1330
1331 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1332
1333         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1334         unittests/cli-utils-selftests.c
1335         * unittests/cli-utils-selftests.c: New file.
1336
1337 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1338
1339         * NEWS: Mention new commands. Mention change to 'thread apply'.
1340
1341 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1342
1343         * thread.c (thr_try_catch_cmd): New function.
1344         (thread_apply_all_command): Handle qcs flags.
1345         (thread_apply_command): Handle qcs flags.
1346         (taas_command): New function.
1347         (tfaas_command): New function.
1348         (_initialize_thread): Update to setup the new commands 'taas
1349         and 'tfaas'. Change doc string for 'thread apply'.
1350
1351 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1352
1353         * stack.c: (trailing_outermost_frame): New function, mostly
1354         extracted from backtrace_command_1.
1355         (leading_innermost_frame): New function.
1356         (backtrace_command_1): Update to call trailing_outermost_frame.
1357         (frame_apply_command_count): New function.
1358         (frame_apply_level_command): New function.
1359         (frame_apply_all_command): New function.
1360         (frame_apply_command): New function.
1361         (faas_command): New function.
1362         (frame_cmd_list): New variable.
1363         (_initialize_stack): Update to setup the new commands 'frame apply'
1364         and 'faas'.
1365
1366 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1367
1368         * cli-utils.c (number_or_range_parser::get_number): Only handle
1369         numbers or convenience var as numbers.
1370         (parse_flags): New function.
1371         (parse_flags_qcs): New function.
1372         (number_or_range_parser::finished): Ensure parsing end is detected
1373         before end of string.
1374         * cli-utils.h (parse_flags): New function.
1375         (parse_flags_qcs): New function.
1376         (number_or_range_parser): Remove m_finished bool.
1377         (number_or_range_parser::skip_range): Set m_in_range to false.
1378
1379 2018-07-12  Sergio Durigan Junior  <sergiodj@redhat.com>
1380
1381         * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
1382         on Windows.
1383
1384 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
1385             Jan Kratochvil  <jan.kratochvil@redhat.com>
1386             Paul Fertser  <fercerpav@gmail.com>
1387             Tsutomu Seki  <sekiriki@gmail.com>
1388             Pedro Alves  <palves@redhat.com>
1389
1390         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1391         'unittests/parse-connection-spec-selftests.c'.
1392         (COMMON_SFILES): Add 'common/netstuff.c'.
1393         (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
1394         * NEWS (Changes since GDB 8.2): Mention IPv6 support.
1395         * common/netstuff.c: New file.
1396         * common/netstuff.h: New file.
1397         * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
1398         (wait_for_connect): Update comment.  New parameter
1399         'gdb::optional<int> sock' instead of 'struct serial *scb'.
1400         Use 'sock' directly instead of 'scb->fd'.
1401         (try_connect): New function, with code from 'net_open'.
1402         (net_open): Rewrite main loop to deal with multiple
1403         sockets/addresses.  Handle IPv6-style hostnames; implement
1404         support for IPv6 connections.
1405         * unittests/parse-connection-spec-selftests.c: New file.
1406
1407 2018-07-11  Pedro Alves  <palves@redhat.com>
1408
1409         PR gdb/23377
1410         * remote.c (remote_target::remote_detach_pid): Call
1411         set_current_process.
1412
1413 2018-07-11  Pedro Alves  <palves@redhat.com>
1414
1415         * h8300-tdep.c (h8300_gdbarch_init): Remove
1416         set_gdbarch_ecoff_reg_to_regnum calls.
1417
1418 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
1419
1420         PR c++/23373
1421         * c-typeprint.c (c_type_print_base_struct_union): Don't print
1422         offsets/sizes for static members of a class/struct.
1423
1424 2018-07-11  Alan Hayward  <alan.hayward@arm.com>
1425
1426         * target-descriptions.c (tdesc_register_bitsize): Rename.
1427         * target-descriptions.h (tdesc_register_bitsize): Likewise.
1428         * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
1429         * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
1430
1431 2018-07-10  Tom Tromey  <tom@tromey.com>
1432
1433         * breakpoint.c (moribund_locations): Now static and a
1434         std::vector.
1435         (breakpoint_init_inferior, moribund_breakpoint_here_p)
1436         (build_bpstat_chain, update_global_location_list)
1437         (breakpoint_retire_moribund): Update.
1438         * breakpoint.h (bp_location_p): Remove typedef.  Don't declare
1439         VEC.
1440
1441 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
1442
1443         * riscv-tdep.c (riscv_is_fp_regno_p): New function.
1444         (riscv_register_reggroup_p): Use new function, remove unneeded
1445         parenthesis.
1446         (riscv_push_dummy_call): Extend assert to compare against xlen or
1447         flen based on register type.
1448
1449 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
1450
1451         * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
1452
1453 2018-07-09  Andrew Burgess  <andrew.burgess@embecosm.com>
1454
1455         * remote.c (show_hardware_watchpoint_limit): New function.
1456         (show_hardware_watchpoint_length_limit): New function.
1457         (show_hardware_breakpoint_limit): New function.
1458         (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
1459         where appropriate, update help text.
1460
1461 2018-07-09  Tom Tromey  <tom@tromey.com>
1462
1463         * Makefile.in (CDEPS): Don't mention XM_CDEPS.
1464         (CLIBS): Don't mention NAT_CLIBS.
1465
1466 2018-07-09  Tom Tromey  <tom@tromey.com>
1467
1468         * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
1469         (LIBGDB_OBS, clean mostlyclean): Update.
1470         (gdb$(EXEEXT), insight$(EXEEXT)): Update.
1471
1472 2018-07-09  Tom Tromey  <tom@tromey.com>
1473
1474         * Makefile.in (%.c: %.y): Use ECHO_YACC.
1475         (%.c: %.l): Use ECHO_LEX.  Just fail if flex not available.
1476         * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
1477
1478 2018-07-09  Tom Tromey  <tom@tromey.com>
1479
1480         * Makefile.in (ALLDEPFILES): Remove exec.c.
1481         (COMMON_OBS): Remove exec.o.
1482         (COMMON_SFILES): Add exec.c.
1483
1484 2018-07-09  Tom Tromey  <tom@tromey.com>
1485
1486         * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
1487
1488 2018-07-09  Tom Tromey  <tom@tromey.com>
1489
1490         * Makefile.in (clean mostlyclean): Remove stamp-version.
1491         (version.c): Depend on stamp-version.
1492         (stamp-version): New rule, from version.c rule.
1493
1494 2018-07-09  Tom Tromey  <tom@tromey.com>
1495
1496         * Makefile.in (init.c): Depend on stamp-init.
1497         (stamp-init): New rule, from init.c rule.
1498         (clean mostlyclean): Remove stamp-init.
1499
1500 2018-07-09  Tom Tromey  <tom@tromey.com>
1501
1502         * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
1503         SUBDIR_GCC_COMPILE_SRCS.
1504
1505 2018-07-09  Tom Tromey  <tom@tromey.com>
1506
1507         * Makefile.in (init.c): Remove some unused sed rules.
1508
1509 2018-07-09  Tom Tromey  <tom@tromey.com>
1510
1511         * Makefile.in (TSOBS): Remove.
1512         (INIT_FILES): Update.
1513         (LIBGDB_OBS): Update.
1514         (COMMON_SFILES): Add inflow.c.
1515         (SFILES): Remove inflow.c.
1516
1517 2018-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
1518
1519         * contrib/gdb-add-index.sh ($dwarf5): New, use it.
1520
1521 2018-07-07  Simon Marchi  <simon.marchi@polymtl.ca>
1522
1523         * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
1524         get_saveloc_name, is_signal_frame_name, step_name,
1525         init_remote_name, create_addr_space_name,
1526         destroy_addr_space_name, search_unwind_table_name,
1527         find_dyn_list_name): Constify.
1528
1529 2018-07-05  Simon Marchi  <simon.marchi@polymtl.ca>
1530
1531         * darwin-nat.c (darwin_pthread_kill): New function.
1532         (darwin_resume_thread): Use darwin_pthread_kill.
1533
1534 2018-07-05  Tom de Vries  <tdevries@suse.de>
1535
1536         * macroexp.c (macro_buffer) <operator=>: New member function.
1537
1538 2018-07-04  Tom Tromey  <tom@tromey.com>
1539
1540         * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
1541
1542 2018-07-04  Simon Marchi  <simon.marchi@polymtl.ca>
1543
1544         * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
1545         * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
1546         * maint.c: Likewise.
1547         * top.c: Likewise.
1548
1549 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
1550
1551         * NEWS: Create a new section for the next release branch.
1552         Rename the section of the current branch, now that it has
1553         been cut.
1554
1555 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
1556
1557         GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
1558         * version.in: Bump version to 8.2.50.DATE-git.
1559
1560 2018-07-04  Vyacheslav Barinov  <v.barinov@samsung.com>
1561             Pedro Alves  <palves@redhat.com>
1562
1563         * linux-nat.c (linux_init_ptrace): Rename to ...
1564         (linux_init_ptrace_procfs): ... this.  Call
1565         linux_proc_init_warnings.
1566         (linux_nat_target::post_attach)
1567         (linux_nat_target::post_startup_inferior): Adjust.
1568         * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
1569         * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
1570
1571 2018-07-04  Tom de Vries  <tdevries@suse.de>
1572
1573         * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
1574         check ...
1575         (read_comp_unit_head): ... here.
1576
1577 2018-07-03  Tom Tromey  <tom@tromey.com>
1578
1579         * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
1580         (stop_tracing, tstatus_command)
1581         (find_matching_tracepoint_location, merge_uploaded_tracepoints)
1582         (print_one_static_tracepoint_marker): Update.
1583         * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
1584         std::vector.
1585         * breakpoint.h (breakpoint_p): Remove typedef.  Don't declare
1586         VEC.
1587         (all_tracepoints, static_tracepoints_here): Return std::vector.
1588
1589 2018-07-03  Tom Tromey  <tom@tromey.com>
1590
1591         * common/ptid.c (ptid_equal): Remove.
1592         * common/ptid.h (ptid_equal): Don't declare.
1593         * ada-tasks.c: Update.
1594         * breakpoint.c: Update.
1595         * common/agent.c: Update.
1596         * corelow.c: Update.
1597         * darwin-nat-info.c: Update.
1598         * darwin-nat.c: Update.
1599         * dcache.c: Update.
1600         * dtrace-probe.c: Update.
1601         * dummy-frame.c: Update.
1602         * fbsd-nat.c: Update.
1603         * frame.c: Update.
1604         * gdbthread.h: Update.
1605         * gnu-nat.c: Update.
1606         * go32-nat.c: Update.
1607         * inf-loop.c: Update.
1608         * inf-ptrace.c: Update.
1609         * infcall.c: Update.
1610         * infcmd.c: Update.
1611         * inflow.c: Update.
1612         * infrun.c: Update.
1613         * linux-fork.c: Update.
1614         * linux-nat.c: Update.
1615         * linux-thread-db.c: Update.
1616         * mi/mi-cmd-var.c: Update.
1617         * mi/mi-interp.c: Update.
1618         * mi/mi-main.c: Update.
1619         * nto-procfs.c: Update.
1620         * ppc-linux-tdep.c: Update.
1621         * procfs.c: Update.
1622         * python/py-inferior.c: Update.
1623         * python/py-record-btrace.c: Update.
1624         * python/py-record.c: Update.
1625         * ravenscar-thread.c: Update.
1626         * regcache.c: Update.
1627         * remote-sim.c: Update.
1628         * remote.c: Update.
1629         * sol-thread.c: Update.
1630         * solib.c: Update.
1631         * target.c: Update.
1632         * tui/tui-stack.c: Update.
1633         * varobj.c: Update.
1634         * windows-nat.c: Update.
1635         * windows-tdep.c: Update.
1636
1637 2018-07-03  Tom Tromey  <tom@tromey.com>
1638
1639         * common/ptid.c (ptid_match): Remove.
1640         * common/ptid.h (ptid_match): Don't declare.
1641         * fbsd-nat.c: Update.
1642         * infcmd.c: Update.
1643         * infrun.c: Update.
1644         * linux-nat.c: Update.
1645         * record-btrace.c: Update.
1646         * regcache.c: Update.
1647         * remote.c: Update.
1648
1649 2018-07-03  Tom Tromey  <tom@tromey.com>
1650
1651         * common/ptid.c (ptid_tid_p): Remove.
1652         * common/ptid.h (ptid_tid_p): Don't declare.
1653         * sol-thread.c: Update.
1654
1655 2018-07-03  Tom Tromey  <tom@tromey.com>
1656
1657         * common/ptid.c (ptid_lwp_p): Remove.
1658         * common/ptid.h (ptid_lwp_p): Don't declare.
1659         * fbsd-nat.c: Update.
1660         * linux-nat.c: Update.
1661         * nat/linux-procfs.c: Update.
1662         * nat/x86-linux-dregs.c: Update.
1663         * sol-thread.c: Update.
1664
1665 2018-07-03  Tom Tromey  <tom@tromey.com>
1666
1667         * common/ptid.c (ptid_is_pid): Remove.
1668         * common/ptid.h (ptid_is_pid): Don't declare.
1669         * infrun.c: Update.
1670         * linux-nat.c: Update.
1671         * mi/mi-interp.c: Update.
1672         * remote.c: Update.
1673         * thread.c: Update.
1674
1675 2018-07-03  Tom Tromey  <tom@tromey.com>
1676
1677         * common/ptid.c (ptid_get_tid): Remove.
1678         * common/ptid.h (ptid_get_tid): Don't declare.
1679         * ada-tasks.c: Update.
1680         * aix-thread.c: Update.
1681         * bsd-uthread.c: Update.
1682         * darwin-nat.c: Update.
1683         * fbsd-nat.c: Update.
1684         * i386-darwin-nat.c: Update.
1685         * infrun.c: Update.
1686         * linux-tdep.c: Update.
1687         * nto-procfs.c: Update.
1688         * ppc-ravenscar-thread.c: Update.
1689         * python/py-infthread.c: Update.
1690         * ravenscar-thread.c: Update.
1691         * sol-thread.c: Update.
1692         * sparc-ravenscar-thread.c: Update.
1693         * windows-nat.c: Update.
1694
1695 2018-07-03  Tom Tromey  <tom@tromey.com>
1696
1697         * common/ptid.c (ptid_get_lwp): Remove.
1698         * common/ptid.h (ptid_get_lwp): Don't declare.
1699         * aarch64-linux-nat.c: Update.
1700         * ada-tasks.c: Update.
1701         * aix-thread.c: Update.
1702         * amd64-linux-nat.c: Update.
1703         * arm-linux-nat.c: Update.
1704         * corelow.c: Update.
1705         * fbsd-nat.c: Update.
1706         * fbsd-tdep.c: Update.
1707         * gnu-nat.c: Update.
1708         * i386-cygwin-tdep.c: Update.
1709         * i386-gnu-nat.c: Update.
1710         * i386-linux-nat.c: Update.
1711         * ia64-linux-nat.c: Update.
1712         * inf-ptrace.c: Update.
1713         * infrun.c: Update.
1714         * linux-fork.c: Update.
1715         * linux-nat.c: Update.
1716         * linux-tdep.c: Update.
1717         * linux-thread-db.c: Update.
1718         * mips-linux-nat.c: Update.
1719         * nat/aarch64-linux-hw-point.c: Update.
1720         * nat/aarch64-linux.c: Update.
1721         * nat/linux-btrace.c: Update.
1722         * nat/linux-osdata.c: Update.
1723         * nat/linux-procfs.c: Update.
1724         * nat/x86-linux-dregs.c: Update.
1725         * obsd-nat.c: Update.
1726         * ppc-fbsd-nat.c: Update.
1727         * ppc-linux-nat.c: Update.
1728         * procfs.c: Update.
1729         * python/py-infthread.c: Update.
1730         * ravenscar-thread.c: Update.
1731         * remote.c: Update.
1732         * s390-linux-nat.c: Update.
1733         * sol-thread.c: Update.
1734         * sol2-tdep.c: Update.
1735         * spu-linux-nat.c: Update.
1736         * x86-linux-nat.c: Update.
1737         * xtensa-linux-nat.c: Update.
1738
1739 2018-07-03  Tom Tromey  <tom@tromey.com>
1740
1741         * common/ptid.c (ptid_get_pid): Remove.
1742         * common/ptid.h (ptid_get_pid): Don't declare.
1743         * aarch64-linux-nat.c: Update.
1744         * ada-lang.c: Update.
1745         * aix-thread.c: Update.
1746         * alpha-bsd-nat.c: Update.
1747         * amd64-fbsd-nat.c: Update.
1748         * amd64-linux-nat.c: Update.
1749         * arm-linux-nat.c: Update.
1750         * arm-nbsd-nat.c: Update.
1751         * auxv.c: Update.
1752         * break-catch-syscall.c: Update.
1753         * breakpoint.c: Update.
1754         * bsd-uthread.c: Update.
1755         * corelow.c: Update.
1756         * ctf.c: Update.
1757         * darwin-nat.c: Update.
1758         * fbsd-nat.c: Update.
1759         * fbsd-tdep.c: Update.
1760         * gcore.c: Update.
1761         * gnu-nat.c: Update.
1762         * hppa-nbsd-nat.c: Update.
1763         * hppa-obsd-nat.c: Update.
1764         * i386-fbsd-nat.c: Update.
1765         * ia64-linux-nat.c: Update.
1766         * inf-ptrace.c: Update.
1767         * infcmd.c: Update.
1768         * inferior.c: Update.
1769         * inferior.h: Update.
1770         * inflow.c: Update.
1771         * infrun.c: Update.
1772         * linux-fork.c: Update.
1773         * linux-nat.c: Update.
1774         * linux-tdep.c: Update.
1775         * linux-thread-db.c: Update.
1776         * m68k-bsd-nat.c: Update.
1777         * mi/mi-interp.c: Update.
1778         * mi/mi-main.c: Update.
1779         * mips-linux-nat.c: Update.
1780         * mips-nbsd-nat.c: Update.
1781         * mips64-obsd-nat.c: Update.
1782         * nat/aarch64-linux-hw-point.c: Update.
1783         * nat/aarch64-linux.c: Update.
1784         * nat/linux-btrace.c: Update.
1785         * nat/linux-osdata.c: Update.
1786         * nat/linux-procfs.c: Update.
1787         * nat/x86-linux-dregs.c: Update.
1788         * nto-procfs.c: Update.
1789         * obsd-nat.c: Update.
1790         * ppc-linux-nat.c: Update.
1791         * ppc-nbsd-nat.c: Update.
1792         * ppc-obsd-nat.c: Update.
1793         * proc-service.c: Update.
1794         * procfs.c: Update.
1795         * python/py-inferior.c: Update.
1796         * python/py-infthread.c: Update.
1797         * ravenscar-thread.c: Update.
1798         * record.c: Update.
1799         * remote-sim.c: Update.
1800         * remote.c: Update.
1801         * rs6000-nat.c: Update.
1802         * s390-linux-nat.c: Update.
1803         * sh-nbsd-nat.c: Update.
1804         * sol-thread.c: Update.
1805         * sparc-nat.c: Update.
1806         * sparc64-tdep.c: Update.
1807         * spu-linux-nat.c: Update.
1808         * spu-tdep.c: Update.
1809         * target-debug.h: Update.
1810         * target.c: Update.
1811         * thread.c: Update.
1812         * tid-parse.c: Update.
1813         * tracefile-tfile.c: Update.
1814         * vax-bsd-nat.c: Update.
1815         * windows-nat.c: Update.
1816         * x86-linux-nat.c: Update.
1817         * x86-nat.c: Update.
1818
1819 2018-07-03  Tom Tromey  <tom@tromey.com>
1820
1821         * common/ptid.c (pid_to_ptid): Remove.
1822         * common/ptid.h (pid_to_ptid): Don't declare.
1823         * aix-thread.c: Update.
1824         * arm-linux-nat.c: Update.
1825         * common/ptid.c: Update.
1826         * common/ptid.h: Update.
1827         * corelow.c: Update.
1828         * ctf.c: Update.
1829         * darwin-nat.c: Update.
1830         * fbsd-nat.c: Update.
1831         * fork-child.c: Update.
1832         * gnu-nat.c: Update.
1833         * go32-nat.c: Update.
1834         * inf-ptrace.c: Update.
1835         * infcmd.c: Update.
1836         * inferior.c: Update.
1837         * infrun.c: Update.
1838         * linux-fork.c: Update.
1839         * linux-nat.c: Update.
1840         * nat/aarch64-linux-hw-point.c: Update.
1841         * nat/fork-inferior.c: Update.
1842         * nat/x86-linux-dregs.c: Update.
1843         * nto-procfs.c: Update.
1844         * obsd-nat.c: Update.
1845         * procfs.c: Update.
1846         * progspace.c: Update.
1847         * remote.c: Update.
1848         * rs6000-nat.c: Update.
1849         * s390-linux-nat.c: Update.
1850         * sol-thread.c: Update.
1851         * spu-linux-nat.c: Update.
1852         * target.c: Update.
1853         * top.c: Update.
1854         * tracefile-tfile.c: Update.
1855         * windows-nat.c: Update.
1856
1857 2018-07-03  Tom Tromey  <tom@tromey.com>
1858
1859         * common/ptid.h (ptid_build): Don't declare.
1860         * common/ptid.c (ptid_build): Remove.
1861         * aix-thread.c: Update.
1862         * bsd-kvm.c: Update.
1863         * bsd-uthread.c: Update.
1864         * common/agent.c: Update.
1865         * common/ptid.c: Update.
1866         * common/ptid.h: Update.
1867         * corelow.c: Update.
1868         * darwin-nat.c: Update.
1869         * fbsd-nat.c: Update.
1870         * gnu-nat.c: Update.
1871         * linux-fork.c: Update.
1872         * linux-nat.c: Update.
1873         * linux-thread-db.c: Update.
1874         * nat/linux-osdata.c: Update.
1875         * nat/linux-procfs.c: Update.
1876         * nto-procfs.c: Update.
1877         * obsd-nat.c: Update.
1878         * proc-service.c: Update.
1879         * procfs.c: Update.
1880         * ravenscar-thread.c: Update.
1881         * remote-sim.c: Update.
1882         * remote.c: Update.
1883         * sol-thread.c: Update.
1884         * target.c: Update.
1885         * windows-nat.c: Update.
1886
1887 2018-07-03  Tom Tromey  <tom@tromey.com>
1888
1889         * infrun.c (follow_exec): Use exit_inferior_silent.
1890         * inferior.c (exit_inferior_num_silent): Remove.
1891         * inferior.h (exit_inferior_num_silent): Don't declare.
1892
1893 2018-07-03  Tom Tromey  <tom@tromey.com>
1894
1895         PR cli/23340:
1896         * darwin-nat.c (darwin_attach_pid): Reset inferior and
1897         inferior_ptid on error.
1898
1899 2018-07-02  Maciej W. Rozycki  <macro@mips.com>
1900             Simon Marchi  <simon.marchi@polymtl.ca>
1901
1902         PR tdep/8282
1903         * disasm.h (gdb_disassembler): Add
1904         `m_disassembler_options_holder'. member
1905         * disasm.c (get_all_disassembler_options): New function.
1906         (gdb_disassembler::gdb_disassembler): Use it.
1907         (gdb_buffered_insn_length_init_dis): Likewise.
1908         (gdb_buffered_insn_length): Adjust accordingly.
1909         (set_disassembler_options): Handle options with arguments.
1910         (show_disassembler_options_sfunc): Likewise.  Add a leading new
1911         line if showing options with descriptions.
1912         (disassembler_options_completer): Adapt to using the
1913         `disasm_options_and_args_t' structure.
1914         * mips-tdep.c (mips_disassembler_options): New variable.
1915         (mips_disassembler_options_o32): Likewise.
1916         (mips_disassembler_options_n32): Likewise.
1917         (mips_disassembler_options_n64): Likewise.
1918         (gdb_print_insn_mips): Don't set `disassembler_options'.
1919         (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
1920         functions.
1921         (mips_gdbarch_init): Always set `gdbarch_print_insn' to
1922         `gdb_print_insn_mips'.  Set `gdbarch_disassembler_options',
1923         `gdbarch_disassembler_options_implicit' and
1924         `gdbarch_valid_disassembler_options'.
1925         * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
1926         `disasm_options_and_args_t' structure.
1927         * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
1928         method.
1929         (valid_disassembler_options): Switch from `disasm_options_t' to
1930         the `disasm_options_and_args_t' structure.
1931         * NEWS: Document `set disassembler-options' support for the MIPS
1932         target.
1933         * gdbarch.h: Regenerate.
1934         * gdbarch.c: Regenerate.
1935
1936 2018-07-02  Sebastian Huber  <sebastian.huber@embedded-brains.de>
1937
1938         * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
1939
1940 2018-06-29  Joel Brobecker  <brobecker@adacore.com>
1941
1942         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
1943         parameter in call to amd64_target_description.
1944         * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
1945         * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
1946         (amd64fbsd_init_abi): Likewise.
1947         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
1948         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
1949         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
1950         * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
1951
1952 2018-06-29  Pedro Alves  <palves@redhat.com>
1953
1954         * gdb/amd64-tdep.h (amd64_create_target_description): Add
1955         "segments" parameter.
1956         * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
1957         (_initialize_amd64_tdep): Update call to
1958         amd64_create_target_description.
1959         (amd64_target_description): Add "segments" parameter.  Adjust
1960         the implementation to use it.
1961         * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
1962         call to amd64_create_target_description.
1963         * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
1964         * gdb/arch/amd64.h (amd64_create_target_description): Add
1965         "segments" register.
1966         * gdb/arch/amd64.c (amd64_create_target_description): Add
1967         "segments" parameter.  Call create_feature_i386_64bit_segments
1968         only if SEGMENTS is true.
1969         * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
1970         call to amd64_create_target_description.
1971
1972 2018-06-29  Pedro Alves  <palves@redhat.com>
1973
1974         * thread.c (thread_target_id_str): New, factored out from ...
1975         (print_thread_info_1): ... here.  Use it to compute the max
1976         "Target Id" column width.
1977
1978 2018-06-29  Pedro Alves  <palves@redhat.com>
1979
1980         * remote.c (remote_target::extra_thread_info): Delete
1981         'display_buf' and 'n' locals.  from the cache, regardless of
1982         packet mechanims is in use.  Use cache for qThreadExtra and qP
1983         methods too.
1984
1985 2018-06-29  Pedro Alves  <palves@redhat.com>
1986
1987         * blockframe.c (find_pc_sect_containing_function): New function.
1988         * breakpoint.c (print_breakpoint_location): Don't call
1989         find_pc_sect_function.
1990         * linespec.c (create_sals_line_offset): Record the location's
1991         symbol in the sal.
1992         * linespec.c (convert_address_location_to_sals): Fill in sal's
1993         symbol with find_pc_sect_containing_function.
1994         * symtab.c (find_function_start_sal): Rename to ...
1995         (find_function_start_sal_1): ... this.
1996         (find_function_start_sal): Reimplement as wrapper around
1997         find_function_start_sal_1, and use
1998         find_pc_sect_containing_function to fill in the sal's symbol.
1999         (find_function_start_sal(symbol*, bool)): Adjust.
2000         * symtab.h (find_pc_function, find_pc_sect_function): Adjust
2001         comments.
2002         (find_pc_sect_containing_function): Declare.
2003
2004 2018-06-29  Pedro Alves  <palves@redhat.com>
2005
2006         * inline-frame.c (stopped_by_user_bp_inline_frame): Return
2007         true if the the location has no symbol.
2008
2009 2018-06-28  Tom Tromey  <tom@tromey.com>
2010
2011         * NEWS: Mention --enable-codesign.
2012         * silent-rules.mk (ECHO_SIGN): New variable.
2013         * configure.ac: Add --enable-codesign.
2014         * configure: Rebuild.
2015         * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
2016         (gdb$(EXEEXT)): Optionally invoke codesign.
2017
2018 2018-06-28  Pedro Alves  <palves@redhat.com>
2019
2020         * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
2021         comments.
2022         (switch_to_thread_no_regs): Adjust comment.
2023         * infcmd.c (stop_pc): Delete.
2024         (post_create_inferior, info_program_command): Replace references
2025         to stop_pc with references to thread_info->suspend.stop_pc.
2026         * inferior.h (stop_pc): Delete declaration.
2027         * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
2028         (handle_inferior_event_1, handle_signal_stop)
2029         (process_event_stop_test, keep_going_stepped_thread)
2030         (handle_step_into_function, handle_step_into_function_backward)
2031         (print_stop_location): Replace references to stop_pc with
2032         references to thread_info->suspend.stop_pc.
2033         (struct infcall_suspend_state) <stop_pc>: Delete field.
2034         (save_infcall_suspend_state, restore_infcall_suspend_state):
2035         Remove references to inf_stat->stop_pc.
2036         * linux-fork.c (fork_load_infrun_state): Likewise.
2037         * record-btrace.c (record_btrace_set_replay): Likewise.
2038         * record-full.c (record_full_goto_entry): Likewise.
2039         * remote.c (print_one_stopped_thread): Likewise.
2040         * target.c (target_resume): Extend comment.
2041         * thread.c (set_executing_thread): New.
2042         (set_executing): Use it.
2043         (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
2044         Remove references to stop_pc.
2045
2046 2018-06-28  Pedro Alves  <palves@redhat.com>
2047
2048         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
2049         Moving fetching stop_pc until after ecs->event_thread is refreshed.
2050
2051 2018-06-28  Tom Tromey  <tom@tromey.com>
2052
2053         * coffread.c (coff_symfile_finish): Update.
2054         * xcoffread.c (xcoff_symfile_finish): Update.
2055         * elfread.c (elf_symfile_finish): Update.
2056         * symfile.h (dwarf2_free_objfile): Don't declare.
2057         * dwarf2read.c (_initialize_dwarf2_read): Use
2058         register_objfile_data_with_cleanup.
2059         (dwarf2_free_objfile): Now static.  Change signature.
2060
2061 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
2062
2063         * symfile.c (add_symbol_file_command, _initialize_symfile): Add
2064         option "-o" to add-symbol-file-load to add an offset to each
2065         section's load address.
2066         * symfile.c (set_objfile_default_section_offset): New function.
2067
2068 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
2069
2070         * symfile.c (add_symbol_file_command): Make sure that sections
2071         with the same name are sorted in the same order.
2072
2073 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
2074
2075         * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
2076         require the second argument.  If omitted, load sections at the
2077         addresses specified in the file.
2078
2079 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
2080
2081         * symfile.c (symbol_file_command, symbol_file_add_main_1)
2082         (_initialize_symfile): Add option "-o" to symbol-file to add an
2083         offset to each section of the symbol file.
2084
2085 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
2086
2087         * MAINTAINERS (Write After Approval): Add Petr Tesarik.
2088
2089 2018-06-27  Tom Tromey  <tom@tromey.com>
2090
2091         * stack.c (_initialize_stack): Update "func" help text.
2092
2093 2018-06-27  Tom Tromey  <tom@tromey.com>
2094
2095         * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
2096         std::vector.
2097         (unwind_infopy_str, pyuw_create_unwind_info)
2098         (unwind_infopy_add_saved_register, pyuw_sniffer)
2099         (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
2100         Update.
2101         (struct saved_reg): Add constructor.
2102         <value>: Now a gdbpy_ref<>.
2103
2104 2018-06-27  Tom Tromey  <tom@tromey.com>
2105
2106         * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
2107
2108 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
2109
2110         * gdb-gdb.py.in: Format using autopep8.
2111
2112 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
2113
2114         * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
2115         (type_lookup_function): Recognize CORE_ADDR values.
2116
2117 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
2118
2119         * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
2120         print tag_name.
2121
2122 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
2123
2124         * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
2125         <__lt__>: Add.
2126
2127 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
2128
2129         * gdb-gdb.py: Move to...
2130         * gdb-gdb.py.in: ... here.
2131         * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
2132         * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
2133         dependencies.
2134         (distclean): Remove gdb-gdb.py when cleaning.
2135         (gdb-gdb.py, gdb-gdb.gdb): New rules.
2136         * configure: Re-generate.
2137
2138 2018-06-27  Pedro Alves  <palves@redhat.com>
2139
2140         * proc-service.c (get_ps_regcache): New.
2141         (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
2142         (ps_lsetfpregs): Use it.
2143
2144 2018-06-27  Omair Javaid  <omair.javaid@linaro.org>
2145
2146         PR gdb/21695
2147         * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
2148         (dwarf_decode_lines_1): Adjust.
2149
2150 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
2151
2152         * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
2153         override.
2154         <info_proc>: Likewise.
2155
2156 2018-06-26  Joel Brobecker  <brobecker@adacore.com>
2157
2158         * windows-nat.c (do_windows_fetch_inferior_registers): Rename
2159         to windows_fetch_one_register, and only handle the case of
2160         fetching one register.  Move the code that reloads the context
2161         and iterates over all registers if R is negative to...
2162         (windows_nat_target::fetch_registers): ... here.
2163         (do_windows_store_inferior_registers): Rename to
2164         windows_store_one_register, and only handle the case of storing
2165         one register.  Move the code that handles the case where r is
2166         negative to...
2167         (windows_nat_target::store_registers) ... here.
2168
2169 2018-06-26  Tom Tromey  <tom@tromey.com>
2170
2171         PR rust/22574:
2172         * typeprint.c (whatis_exp): Allow ptype/o for Rust.
2173         * rust-lang.c (rust_print_struct_def): Add podata parameter.
2174         Update.
2175         (rust_internal_print_type): Add podata parameter.
2176         (rust_print_type): Update.
2177
2178 2018-06-26  Tom Tromey  <tom@tromey.com>
2179
2180         * typeprint.h (struct print_offset_data) <update, finish,
2181         maybe_print_hole>: New methods.
2182         <indentation>: New constant.
2183         * typeprint.c (print_offset_data::indentation): Define.
2184         (print_offset_data::maybe_print_hole, print_offset_data::update)
2185         (print_offset_data::finish): Move from c-typeprint.c and rename.
2186         * c-typeprint.c (OFFSET_SPC_LEN): Remove.
2187         (print_spaces_filtered_with_print_options): Update.
2188         (c_print_type_union_field_offset, maybe_print_hole)
2189         (c_print_type_struct_field_offset): Move to typeprint.c and
2190         rename.
2191         (c_type_print_base_struct_union): Update.
2192
2193 2018-06-25  Pedro Alves  <palves@redhat.com>
2194
2195         * gdbthread.h (thread_info_ref, delete_thread)
2196         (delete_thread_silent, first_thread_of_inferior)
2197         (any_thread_of_inferior, switch_to_thread)
2198         (enable_thread_stack_temporaries)
2199         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2200         (get_last_thread_stack_temporary)
2201         (value_in_thread_stack_temporaries, can_access_registers_thread):
2202         Spell out "struct thread_info" instead of just "thread_info".
2203         * inferior.h (notice_new_inferior): Likewise.
2204
2205 2018-06-25  Pedro Alves  <palves@redhat.com>
2206
2207         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
2208         pass thread_info pointer to delete_thread.
2209         (windows_nat_target::detach): Pass inferior pointer to
2210         detach_inferior.
2211         * aix-thread.c (sync_threadlists): Pass thread_info pointer to
2212         delete_thread.
2213         * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
2214         * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
2215         and pass a thread_info pointer to delete_thread.
2216         * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
2217         pass thread_info pointer to delete_thread.
2218         * go32-nat.c (go32_nat_target::mourn_inferior): Remove
2219         delete_thread_silent call.
2220         * procfs.c (procfs_target::detach): Pass inferior pointer to
2221         detach_inferior.
2222         (procfs_target::wait): Pass thread_info pointer to delete_thread.
2223         * remote-sim.c (gdbsim_target::mourn_inferior): Remove
2224         delete_thread_silent call.
2225         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
2226         pass thread_info pointer to delete_thread.
2227         (windows_nat_target::detach): Pass inferior pointer to
2228         delete_inferior.
2229
2230 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
2231
2232         * regcache.c (readable_regcache::read_part): Fix asserts.
2233         (reg_buffer::raw_collect_part): New function.
2234         (regcache::write_part): Fix asserts.
2235         (reg_buffer::raw_supply_part): New function.
2236         (regcache::transfer_regset_register): New helper function.
2237         (regcache::transfer_regset): Call new functions.
2238         (regcache_supply_regset): Use gdb_byte*.
2239         (regcache::supply_regset): Likewise.
2240         (regcache_collect_regset): Likewise.
2241         (regcache::collect_regset): Likewise.
2242         * regcache.h (reg_buffer::raw_collect_part): New declaration.
2243         (reg_buffer::raw_supply_part): Likewise.
2244         (regcache::transfer_regset_register): Likewise.
2245         (regcache::transfer_regset): Use gdb_byte*.
2246
2247 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
2248
2249         * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
2250
2251 2018-06-21  Pedro Alves  <palves@redhat.com>
2252
2253         * ada-lang.h (ada_get_task_number): Take a thread_info pointer
2254         instead of a ptid_t.  All callers adjusted.
2255         * ada-tasks.c (ada_get_task_number): Likewise.  All callers
2256         adjusted.
2257         (print_ada_task_info, display_current_task_id, task_command_1):
2258         Adjust.
2259         * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
2260         inferior_thread.
2261         (breakpoint_kind): Adjust.
2262         (remove_breakpoints_pid): Rename to ...
2263         (remove_breakpoints_inf): ... this.  Adjust to take an inferior
2264         pointer.  All callers adjusted.
2265         (bpstat_clear_actions): Use inferior_thread.
2266         (get_bpstat_thread): New.
2267         (bpstat_do_actions): Use it.
2268         (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
2269         to take a thread_info pointer.  All callers adjusted.
2270         (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
2271         (breakpoint_re_set_thread): Use inferior_thread.
2272         * breakpoint.h (struct inferior): Forward declare.
2273         (bpstat_stop_status): Update.
2274         (remove_breakpoints_pid): Delete.
2275         (remove_breakpoints_inf): New.
2276         * bsd-uthread.c (bsd_uthread_target::wait)
2277         (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
2278         * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
2279         (maint_btrace_packet_history_cmd)
2280         (maint_btrace_clear_packet_history_cmd): Adjust.
2281         (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
2282         inferior_thread.
2283         * cli/cli-interp.c: Include "inferior.h".
2284         * common/refcounted-object.h (struct
2285         refcounted_object_ref_policy): New.
2286         * compile/compile-object-load.c: Include gdbthread.h.
2287         (store_regs): Use inferior_thread.
2288         * corelow.c (core_target::close): Use current_inferior.
2289         (core_target_open): Adjust to use first_thread_of_inferior and use
2290         the current inferior.
2291         * ctf.c (ctf_target::close): Adjust to use current_inferior.
2292         * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
2293         <thread>: ... this new field.  All references adjusted.
2294         (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
2295         Take a thread_info pointer instead of a ptid_t.
2296         * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
2297         (dummy_frame_discard, register_dummy_frame_dtor): Take a
2298         thread_info pointer instead of a ptid_t.
2299         * elfread.c: Include "inferior.h".
2300         (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
2301         Use inferior_thread.
2302         * eval.c (evaluate_subexp): Likewise.
2303         * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
2304         inferior_thread.
2305         * gdb_proc_service.h (struct thread_info): Forward declare.
2306         (struct ps_prochandle) <ptid>: Delete, replaced by ...
2307         <thread>: ... this new field.  All references adjusted.
2308         * gdbarch.h, gdbarch.c: Regenerate.
2309         * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
2310         'thread' parameter.  All implementations and callers adjusted.
2311         * gdbthread.h (thread_info) <set_running>: New method.
2312         (delete_thread, delete_thread_silent): Take a thread_info pointer
2313         instead of a ptid.
2314         (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
2315         (first_thread_of_process): Delete, replaced by ...
2316         (first_thread_of_inferior): ... this new function.  All callers
2317         adjusted.
2318         (any_live_thread_of_process): Delete, replaced by ...
2319         (any_live_thread_of_inferior): ... this new function.  All callers
2320         adjusted.
2321         (switch_to_thread, switch_to_no_thread): Declare.
2322         (is_executing): Delete.
2323         (enable_thread_stack_temporaries): Update comment.
2324         <enable_thread_stack_temporaries>: Take a thread_info pointer
2325         instead of a ptid_t.  Incref the thread.
2326         <~enable_thread_stack_temporaries>: Decref the thread.
2327         <m_ptid>: Delete
2328         <m_thr>: New.
2329         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2330         (get_last_thread_stack_temporary)
2331         (value_in_thread_stack_temporaries, can_access_registers_thread):
2332         Take a thread_info pointer instead of a ptid_t.  All callers
2333         adjusted.
2334         * infcall.c (get_call_return_value): Use inferior_thread.
2335         (run_inferior_call): Work with thread pointers instead of ptid_t.
2336         (call_function_by_hand_dummy): Work with thread pointers instead
2337         of ptid_t.  Use thread_info_ref.
2338         * infcmd.c (proceed_thread_callback): Access thread's state
2339         directly.
2340         (ensure_valid_thread, ensure_not_running): Use inferior_thread,
2341         access thread's state directly.
2342         (continue_command): Use inferior_thread.
2343         (info_program_command): Use find_thread_ptid and access thread
2344         state directly.
2345         (proceed_after_attach_callback): Use thread state directly.
2346         (notice_new_inferior): Take a thread_info pointer instead of a
2347         ptid_t.  All callers adjusted.
2348         (exit_inferior): Take an inferior pointer instead of a pid.  All
2349         callers adjusted.
2350         (exit_inferior_silent): New.
2351         (detach_inferior): Delete.
2352         (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
2353         (gdb_inferior_id_to_pid, in_inferior_list): Delete.
2354         (detach_inferior_command, kill_inferior_command): Use
2355         find_inferior_id instead of valid_gdb_inferior_id and
2356         gdb_inferior_id_to_pid.
2357         (inferior_command): Use inferior and thread pointers.
2358         * inferior.h (struct thread_info): Forward declare.
2359         (notice_new_inferior): Take a thread_info pointer instead of a
2360         ptid_t.  All callers adjusted.
2361         (detach_inferior): Delete declaration.
2362         (exit_inferior, exit_inferior_silent): Take an inferior pointer
2363         instead of a pid.  All callers adjusted.
2364         (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
2365         (valid_gdb_inferior_id): Delete.
2366         * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
2367         (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
2368         (struct displaced_step_inferior_state) <pid>: Delete, replaced by
2369         ...
2370         <inf>: ... this new field.
2371         <step_ptid>: Delete, replaced by ...
2372         <step_thread>: ... this new field.
2373         (get_displaced_stepping_state): Take an inferior pointer instead
2374         of a pid.  All callers adjusted.
2375         (displaced_step_in_progress_any_inferior): Adjust.
2376         (displaced_step_in_progress_thread): Take a thread pointer instead
2377         of a ptid_t.  All callers adjusted.
2378         (displaced_step_in_progress, add_displaced_stepping_state): Take
2379         an inferior pointer instead of a pid.  All callers adjusted.
2380         (get_displaced_step_closure_by_addr): Adjust.
2381         (remove_displaced_stepping_state): Take an inferior pointer
2382         instead of a pid.  All callers adjusted.
2383         (displaced_step_prepare_throw, displaced_step_prepare)
2384         (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
2385         All callers adjusted.
2386         (start_step_over): Adjust.
2387         (infrun_thread_ptid_changed): Remove bit updating ptids in the
2388         displaced step queue.
2389         (do_target_resume): Adjust.
2390         (fetch_inferior_event): Use inferior_thread.
2391         (context_switch, get_inferior_stop_soon): Take an
2392         execution_control_state pointer instead of a ptid_t.  All callers
2393         adjusted.
2394         (switch_to_thread_cleanup): Delete.
2395         (stop_all_threads): Use scoped_restore_current_thread.
2396         * inline-frame.c: Include "gdbthread.h".
2397         (inline_state) <inline_state>: Take a thread pointer instead of a
2398         ptid_t.  All callers adjusted.
2399         <ptid>: Delete, replaced by ...
2400         <thread>: ... this new field.
2401         (find_inline_frame_state): Take a thread pointer instead of a
2402         ptid_t.  All callers adjusted.
2403         (skip_inline_frames, step_into_inline_frame)
2404         (inline_skipped_frames, inline_skipped_symbol): Take a thread
2405         pointer instead of a ptid_t.  All callers adjusted.
2406         * inline-frame.h (skip_inline_frames, step_into_inline_frame)
2407         (inline_skipped_frames, inline_skipped_symbol): Likewise.
2408         * linux-fork.c (delete_checkpoint_command): Adjust to use thread
2409         pointers directly.
2410         * linux-nat.c (get_detach_signal): Likewise.
2411         * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
2412         (thread_db_notice_clone): Adjust.
2413         (thread_db_find_new_threads_silently)
2414         (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
2415         a thread pointer instead of a ptid_t.  All callers adjusted.
2416         * mi/mi-cmd-var.c: Include "inferior.h".
2417         (mi_cmd_var_update_iter): Update to use thread pointers.
2418         * mi/mi-interp.c (mi_new_thread): Update to use the thread's
2419         inferior directly.
2420         (mi_output_running_pid, mi_inferior_count): Delete, bits factored
2421         out to ...
2422         (mi_output_running): ... this new function.
2423         (mi_on_resume_1): Adjust to use it.
2424         (mi_user_selected_context_changed): Adjust to use inferior_thread.
2425         * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
2426         directly.
2427         (interrupt_thread_callback): : Adjust to use thread and inferior
2428         pointers.
2429         * proc-service.c: Include "gdbthread.h".
2430         (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
2431         * progspace-and-thread.c: Include "inferior.h".
2432         * progspace.c: Include "inferior.h".
2433         * python/py-exitedevent.c (create_exited_event_object): Adjust to
2434         hold a reference to an inferior_object.
2435         * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
2436         inferior_thread.
2437         * python/py-inferior.c (struct inferior_object): Give the type a
2438         tag name instead of a typedef.
2439         (python_on_normal_stop): No need to check if the current thread is
2440         listed.
2441         (inferior_to_inferior_object): Change return type to
2442         inferior_object.  All callers adjusted.
2443         (find_thread_object): Delete, bits factored out to ...
2444         (thread_to_thread_object): ... this new function.
2445         * python/py-infthread.c (create_thread_object): Use
2446         inferior_to_inferior_object.
2447         (thpy_is_stopped): Use thread pointer directly.
2448         (gdbpy_selected_thread): Use inferior_thread.
2449         * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
2450         field, replaced with ...
2451         <thread>: ... this new field.  All users adjusted.
2452         (btpy_insn_or_gap_new): Drop const.
2453         (btpy_list_new): Take a thread pointer instead of a ptid_t.  All
2454         callers adjusted.
2455         * python/py-record.c: Include "gdbthread.h".
2456         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
2457         a ptid_t.  All callers adjusted.
2458         (gdbpy_current_recording): Use inferior_thread.
2459         * python/py-record.h (recpy_record_object) <ptid>: Delete
2460         field, replaced with ...
2461         <thread>: ... this new field.  All users adjusted.
2462         (recpy_element_object) <ptid>: Delete
2463         field, replaced with ...
2464         <thread>: ... this new field.  All users adjusted.
2465         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
2466         a ptid_t.  All callers adjusted.
2467         * python/py-threadevent.c: Include "gdbthread.h".
2468         (get_event_thread): Use thread_to_thread_object.
2469         * python/python-internal.h (struct inferior_object): Forward
2470         declare.
2471         (find_thread_object, find_inferior_object): Delete declarations.
2472         (thread_to_thread_object, inferior_to_inferior_object): New
2473         declarations.
2474         * record-btrace.c: Include "inferior.h".
2475         (require_btrace_thread): Use inferior_thread.
2476         (record_btrace_frame_sniffer)
2477         (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
2478         (get_thread_current_frame): Use scoped_restore_current_thread and
2479         switch_to_thread.
2480         (get_thread_current_frame): Use thread pointer directly.
2481         (record_btrace_replay_at_breakpoint): Use thread's inferior
2482         pointer directly.
2483         * record-full.c: Include "inferior.h".
2484         * regcache.c: Include "gdbthread.h".
2485         (get_thread_arch_regcache): Use the inferior's address space
2486         directly.
2487         (get_thread_regcache, registers_changed_thread): New.
2488         * regcache.h (get_thread_regcache(thread_info *thread)): New
2489         overload.
2490         (registers_changed_thread): New.
2491         (remote_target) <remote_detach_1>: Swap order of parameters.
2492         (remote_add_thread): <remote_add_thread>: Return the new thread.
2493         (get_remote_thread_info(ptid_t)): New overload.
2494         (remote_target::remote_notice_new_inferior): Use thread pointers
2495         directly.
2496         (remote_target::process_initial_stop_replies): Use
2497         thread_info::set_running.
2498         (remote_target::remote_detach_1, remote_target::detach)
2499         (extended_remote_target::detach): Adjust.
2500         * stack.c (frame_show_address): Use inferior_thread.
2501         * target-debug.h (target_debug_print_thread_info_pp): New.
2502         * target-delegates.c: Regenerate.
2503         * target.c (default_thread_address_space): Delete.
2504         (memory_xfer_partial_1): Use current_inferior.
2505         (target_detach): Use current_inferior.
2506         (target_thread_address_space): Delete.
2507         (generic_mourn_inferior): Use current_inferior.
2508         * target.h (struct target_ops) <thread_address_space>: Delete.
2509         (target_thread_address_space): Delete.
2510         * thread.c (init_thread_list): Use ALL_THREADS_SAFE.  Use thread
2511         pointers directly.
2512         (delete_thread_1, delete_thread, delete_thread_silent): Take a
2513         thread pointer instead of a ptid_t.  Adjust all callers.
2514         (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
2515         (first_thread_of_process): Delete, replaced by ...
2516         (first_thread_of_inferior): ... this new function.  All callers
2517         adjusted.
2518         (any_thread_of_process): Rename to ...
2519         (any_thread_of_inferior): ... this, and take an inferior pointer.
2520         (any_live_thread_of_process): Rename to ...
2521         (any_live_thread_of_inferior): ... this, and take an inferior
2522         pointer.
2523         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2524         (value_in_thread_stack_temporaries)
2525         (get_last_thread_stack_temporary): Take a thread pointer instead
2526         of a ptid_t.  Adjust all callers.
2527         (thread_info::set_running): New.
2528         (validate_registers_access): Use inferior_thread.
2529         (can_access_registers_ptid): Rename to ...
2530         (can_access_registers_thread): ... this, and take a thread
2531         pointer.
2532         (print_thread_info_1): Adjust to compare thread pointers instead
2533         of ptids.
2534         (switch_to_no_thread, switch_to_thread): Make extern.
2535         (scoped_restore_current_thread::~scoped_restore_current_thread):
2536         Use m_thread pointer directly.
2537         (scoped_restore_current_thread::scoped_restore_current_thread):
2538         Use inferior_thread.
2539         (thread_command): Use thread pointer directly.
2540         (thread_num_make_value_helper): Use inferior_thread.
2541         * top.c (execute_command): Use inferior_thread.
2542         * tui/tui-interp.c: Include "inferior.h".
2543         * varobj.c (varobj_create): Use inferior_thread.
2544         (value_of_root_1): Use find_thread_global_id instead of
2545         global_thread_id_to_ptid.
2546
2547 2018-06-21  Alan Hayward  <alan.hayward@arm.com>
2548
2549         * regcache.c (readable_regcache::read_part): Avoid memcpy when
2550         possible.
2551         (regcache::write_part): Likewise.
2552         (readable_regcache::cooked_read_part): Update comment.
2553         (readable_regcache::cooked_write_part): Likewise.
2554         * regcache.h: (readable_regcache::read_part): Likewise.
2555         (regcache::write_part): Likewise.
2556
2557 2018-06-21  Richard Bunt  <richard.bunt@arm.com>
2558             Dirk Schubert  <dirk.schubert@arm.com>
2559
2560         * aarch64-linux-nat.c (post_attach): New.
2561         (aarch64_linux_nat_target::post_attach): Override post_attach to
2562         record the number of hardware debug registers.
2563
2564 2018-06-20  Tom Tromey  <tom@tromey.com>
2565
2566         * python/py-param.c (add_setshow_generic): Make parameters const.
2567         (parmpy_init): Update.
2568
2569 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
2570
2571         * regcache.h (regcache_cooked_read_ftype): Rename to...
2572         (register_read_ftype): ...this, change type to function_view.
2573         (class reg_buffer) <save>: Remove src parameter.
2574         (readonly_detached_regcache) <readonly_detached_regcache>: Make
2575         parameter non-const in first overload.  Remove src parameter in
2576         second overload.
2577         * regcache.c (do_cooked_read): Remove.
2578         (readonly_detached_regcache::readonly_detached_regcache): Make
2579         parameter non-const, adjust call to other constructor.
2580         (reg_buffer::save): Remove src parameter.
2581         * frame.c (do_frame_register_read): Remove.
2582         (frame_save_as_regcache): Use lambda function.
2583         * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
2584         parameter to ppu2spu_data *.
2585         (ppu2spu_sniffer): Use lambda function.
2586
2587 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
2588
2589         * record-full.c (record_full_target::insert_breakpoint): Remove
2590         "struct" keyword, add const.
2591
2592 2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>
2593
2594         * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
2595         PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
2596         * configure.ac: Remove AC_PREREQ, add missing quoting.
2597         * gnulib/configure.ac: Modernize usage of
2598         AC_INIT/AM_INIT_AUTOMAKE.  Remove AC_PREREQ.
2599         * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
2600         (AUTOMAKE_VERSION): Bump to 1.15.1.
2601         * configure: Re-generate.
2602         * config.in: Re-generate.
2603         * aclocal.m4: Re-generate.
2604         * gnulib/aclocal.m4: Re-generate.
2605         * gnulib/config.in: Re-generate.
2606         * gnulib/configure: Re-generate.
2607         * gnulib/import/Makefile.in: Re-generate.
2608
2609 2018-06-19  Pedro Alves  <palves@redhat.com>
2610
2611         * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
2612         (lookup_minimal_symbol_by_pc_section): ... here with
2613         gdb_assert_not_reached added.
2614
2615 2018-06-19  Pedro Alves  <palves@redhat.com>
2616
2617         * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
2618         parameter with a block parameter.  Compare location's block symbol
2619         with the frame's block instead of addresses.
2620         (skip_inline_frames): Pass the current block instead of the
2621         frame's address.  Break out as soon as we determine the frame
2622         should not be skipped.
2623
2624 2018-06-18  Tom Tromey  <tom@tromey.com>
2625
2626         * solib-aix.c (solib_aix_get_section_offsets): Return
2627         unique_xmalloc_ptr.
2628         (solib_aix_solib_create_inferior_hook): Update.
2629
2630 2018-06-18  Tom Tromey  <tom@tromey.com>
2631
2632         * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
2633
2634 2018-06-18  Tom Tromey  <tom@tromey.com>
2635
2636         * solib-frv.c (frv_relocate_main_executable): Use
2637         unique_xmalloc_ptr.
2638         * solib-dsbt.c (dsbt_relocate_main_executable): Use
2639         unique_xmalloc_ptr.
2640
2641 2018-06-18  Tom Tromey  <tom@tromey.com>
2642
2643         * objfiles.h (inhibit_section_map_updates): Update.
2644         (resume_section_map_updates, resume_section_map_updates_cleanup):
2645         Remove.
2646         * solib-svr4.c (svr4_handle_solib_event): Update.
2647         * objfiles.c (inhibit_section_map_updates): Return
2648         scoped_restore_tmpl<int>.
2649         (resume_section_map_updates, resume_section_map_updates_cleanup):
2650         Remove.
2651
2652 2018-06-18  Tom Tromey  <tom@tromey.com>
2653
2654         * valprint.h (read_string): Update.
2655         * valprint.c (read_string): Change type of "buffer".
2656         (val_print_string): Update.
2657         * python/py-value.c (valpy_string): Update.
2658         * language.h (struct language_defn) <la_get_string>: Change
2659         type of "buffer".
2660         (default_get_string, c_get_string): Update.
2661         * language.c (default_get_string): Change type of "buffer".
2662         * guile/scm-value.c (gdbscm_value_to_string): Update.
2663         * c-lang.c (c_get_string): Change type of "buffer".
2664
2665 2018-06-18  Tom Tromey  <tom@tromey.com>
2666
2667         * ser-mingw.c (struct pipe_state_destroyer): New.
2668         (pipe_state_up): New typedef.
2669         (cleanup_pipe_state): Remove.
2670         (pipe_windows_open): Use pipe_state_up.  Don't release argv.
2671
2672 2018-06-18  Tom Tromey  <tom@tromey.com>
2673
2674         * rust-lang.h (rust_yyerror): Don't declare.
2675         * rust-lang.c (rust_language_defn): Update.
2676         * rust-exp.y (yyerror): Now static.
2677         * parse.c (parse_exp_in_context_1): Update.
2678         * p-lang.h (p_yyerror): Don't declare.
2679         * p-lang.c (p_language_defn): Update.
2680         * p-exp.y (yyerror): Now static.
2681         * opencl-lang.c (opencl_language_defn): Update.
2682         * objc-lang.c (objc_language_defn): Update.
2683         * m2-lang.h (m2_yyerror): Don't declare.
2684         * m2-lang.c (m2_language_defn): Update.
2685         * m2-exp.y (yyerror): Now static.
2686         * language.h (struct language_defn) <la_error>: Remove.
2687         * language.c (unk_lang_error): Remove.
2688         (unknown_language_defn, auto_language_defn): Remove.
2689         * go-lang.h (go_yyerror): Don't declare.
2690         * go-lang.c (go_language_defn): Update.
2691         * go-exp.y (yyerror): Now static.
2692         * f-lang.h (f_yyerror): Don't declare.
2693         * f-lang.c (f_language_defn): Update.
2694         * f-exp.y (yyerror): Now static.
2695         * d-lang.h (d_yyerror): Don't declare.
2696         * d-lang.c (d_language_defn): Update.
2697         * d-exp.y (yyerror): Now static.
2698         * c-lang.h (c_yyerror): Don't declare.
2699         * c-lang.c (c_language_defn, cplus_language_defn)
2700         (asm_language_defn, minimal_language_defn): Update.
2701         * c-exp.y (yyerror): Now static.
2702         * ada-lang.h (ada_yyerror): Don't declare.
2703         * ada-lang.c (ada_language_defn): Update.
2704         * ada-exp.y (yyerror): Now static.
2705
2706 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
2707
2708         * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
2709         (store_sveregs_to_thread): Likewise.
2710         (aarch64_linux_fetch_inferior_registers): Check for SVE.
2711         (aarch64_linux_store_inferior_registers): Likewise.
2712         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
2713         function.
2714         (aarch64_sve_regs_copy_to_regcache): Likewise.
2715         (aarch64_sve_regs_copy_from_regcache): Likewise.
2716         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
2717         declaration.
2718         (aarch64_sve_regs_copy_to_regcache): Likewise.
2719         (aarch64_sve_regs_copy_from_regcache): Likewise.
2720         (sve_context): Structure from Linux headers.
2721         (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
2722         (SVE_SIG_ZREG_SIZE): Likewise.
2723         (SVE_SIG_PREG_SIZE): Likewise.
2724         (SVE_SIG_FFR_SIZE): Likewise.
2725         (SVE_SIG_REGS_OFFSET): Likewise.
2726         (SVE_SIG_ZREGS_OFFSET): Likewise.
2727         (SVE_SIG_ZREG_OFFSET): Likewise.
2728         (SVE_SIG_ZREGS_SIZE): Likewise.
2729         (SVE_SIG_PREGS_OFFSET): Likewise.
2730         (SVE_SIG_PREG_OFFSET): Likewise.
2731         (SVE_SIG_PREGS_SIZE): Likewise.
2732         (SVE_SIG_FFR_OFFSET): Likewise.
2733         (SVE_SIG_REGS_SIZE): Likewise.
2734         (SVE_SIG_CONTEXT_SIZE): Likewise.
2735         (SVE_PT_REGS_MASK): Likewise.
2736         (SVE_PT_REGS_FPSIMD): Likewise.
2737         (SVE_PT_REGS_SVE): Likewise.
2738         (SVE_PT_VL_INHERIT): Likewise.
2739         (SVE_PT_VL_ONEXEC): Likewise.
2740         (SVE_PT_REGS_OFFSET): Likewise.
2741         (SVE_PT_FPSIMD_OFFSET): Likewise.
2742         (SVE_PT_FPSIMD_SIZE): Likewise.
2743         (SVE_PT_SVE_ZREG_SIZE): Likewise.
2744         (SVE_PT_SVE_PREG_SIZE): Likewise.
2745         (SVE_PT_SVE_FFR_SIZE): Likewise.
2746         (SVE_PT_SVE_FPSR_SIZE): Likewise.
2747         (SVE_PT_SVE_FPCR_SIZE): Likewise.
2748         (__SVE_SIG_TO_PT): Likewise.
2749         (SVE_PT_SVE_OFFSET): Likewise.
2750         (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
2751         (SVE_PT_SVE_ZREG_OFFSET): Likewise.
2752         (SVE_PT_SVE_ZREGS_SIZE): Likewise.
2753         (SVE_PT_SVE_PREGS_OFFSET): Likewise.
2754         (SVE_PT_SVE_PREG_OFFSET): Likewise.
2755         (SVE_PT_SVE_PREGS_SIZE): Likewise.
2756         (SVE_PT_SVE_FFR_OFFSET): Likewise.
2757         (SVE_PT_SVE_FPSR_OFFSET): Likewise.
2758         (SVE_PT_SVE_FPCR_OFFSET): Likewise.
2759         (SVE_PT_SVE_SIZE): Likewise.
2760         (SVE_PT_SIZE): Likewise.
2761         (HAS_SVE_STATE): New define.
2762
2763 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
2764
2765         * nat/aarch64-sve-linux-sigcontext.h: New file.
2766         * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
2767         new files.
2768         (SVE_VQ_MIN): Likewise.
2769         (SVE_VQ_MAX): Likewise.
2770         (SVE_VL_MIN): Likewise.
2771         (SVE_VL_MAX): Likewise.
2772         (SVE_NUM_ZREGS): Likewise.
2773         (SVE_NUM_PREGS): Likewise.
2774         (sve_vl_valid): Likewise.
2775         (struct user_sve_header): Likewise.
2776
2777 2018-06-16  Andrew Burgess  <andrew.burgess@embecosm.com>
2778             Richard Bunt <Richard.Bunt@arm.com>
2779
2780         * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
2781         was requested by GDB.
2782
2783 2018-06-15  Tom de Vries  <tdevries@suse.de>
2784
2785         * MAINTAINERS (Write After Approval): Add Tom de Vries.
2786
2787 2018-06-14  Simon Marchi  <simon.marchi@polymtl.ca>
2788
2789         * gnulib/update-gnulib.sh: Print expected versions of
2790         autoconf/aclocal.
2791
2792 2018-06-14  Simon Marchi  <simon.marchi@ericsson.com>
2793
2794         * arch-utils.c (default_type_align): Use type_length_units.
2795         * gdbtypes.c (type_align): Use type_length_units.
2796
2797 2018-06-14  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2798
2799         * cli/cli-script.c (_initialize_cli_script): Fix online documentation
2800         of 'define' command.
2801
2802 2018-06-14  Tom de Vries  <tdevries@suse.de>
2803
2804         PR cli/22573
2805         * infcmd.c (print_return_value_1): Use get_user_print_options instead of
2806         get_no_prettyformat_print_options.
2807
2808 2018-06-13  Simon Marchi  <simon.marchi@ericsson.com>
2809
2810         * sparc-nat.h: Include target.h.
2811         * sparc64-linux-nat.c (class sparc64_linux_nat_target)
2812         <fetch_registers>: Remove this argument in function call.
2813         <store_registers>: Remove this argument in function call, remove
2814         extra semicolon.
2815         <low_forget_process>: Call sparc64_forget_process instead of
2816         sparc_forget_process.
2817
2818 2018-06-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2819
2820         * procfs.c (_initialize_procfs): Use add_inf_child_target.
2821         (procfs_target::make_corefile_notes): Adjust to new
2822         target_read_alloc return type.
2823
2824 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
2825             Stephen Roberts  <stephen.roberts@arm.com>
2826
2827         PR gdb/22882
2828         * infrun.c (fetch_inferior_event): If GDB is not proceeding then
2829         run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
2830         Move should_notify_stop local into more inner scope.
2831
2832 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
2833             Stephen Roberts  <stephen.roberts@arm.com>
2834
2835         PR gdb/22882
2836         * infrun.c (resume_1): Add call to mark_async_event_handler.
2837
2838 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
2839
2840         * infrun.c (do_target_wait): Change old version of $pc printed.
2841
2842 2018-06-11  Simon Marchi  <simon.marchi@ericsson.com>
2843
2844         * dwarf2read.c (read_index_from_section): Rename to...
2845         (read_gdb_index_from_section): ... this, update all callers.
2846         (dwarf2_read_index): Rename to...
2847         (dwarf2_read_gdb_index): ... this, update all callers.
2848
2849 2018-06-11  John David Anglin  <danglin@gcc.gnu.org>
2850
2851         * gdb/hppa-linux-nat.c
2852         (hppa_linux_nat_target::fetch_inferior_registers): Rename to
2853         hppa_linux_nat_target::fetch_registers.
2854
2855 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
2856
2857         * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
2858         * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
2859         (AARCH64_DWARF_SVE_FFR): Likewise.
2860         (AARCH64_DWARF_SVE_P0): Likewise.
2861         (AARCH64_DWARF_SVE_Z0): Likewise.
2862
2863 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
2864
2865         * common/common-regcache.h (raw_compare): New function.
2866         * regcache.c (regcache::raw_compare): Likewise.
2867         * regcache.h (regcache::raw_compare): New declaration.
2868
2869 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
2870
2871         * common/common-regcache.h (reg_buffer_common): New structure.
2872         * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
2873         (reg_buffer::raw_supply): Likewise.
2874         (reg_buffer::raw_supply_integer): Likewise.
2875         (reg_buffer::raw_supply_zeroed): Likewise.
2876         (reg_buffer::raw_collect): Likewise.
2877         (reg_buffer::raw_collect_integer): Likewise.
2878         * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
2879         (reg_buffer::raw_supply): Likewise.
2880         (reg_buffer::raw_supply_integer): Likewise.
2881         (reg_buffer::raw_supply_zeroed): Likewise.
2882         (reg_buffer::raw_collect): Likewise.
2883         (reg_buffer::raw_collect_integer): Likewise.
2884
2885 2018-06-10  Tom Tromey  <tom@tromey.com>
2886
2887         * remote.c (stop_reply_p): Remove typedef.  Don't declare queue.
2888         (class remote_state) <stop_reply_queue>: Now std::vector.
2889         (remote_state::~remote_state)
2890         (remote_target::stop_reply_queue_length): Update.
2891         (struct queue_iter_param, remove_child_of_pending_fork)
2892         (struct check_pending_event_prevents_wildcard_vcont_callback_data)
2893         (check_pending_event_prevents_wildcard_vcont_callback)
2894         (remove_stop_reply_for_inferior)
2895         (remove_stop_reply_of_remote_state)
2896         (remote_notif_remove_once_on_match)
2897         (stop_reply_match_ptid_and_ws)
2898         (remote_kill_child_of_pending_fork): Remove.
2899         (remote_target::remove_new_fork_children)
2900         (remote_target::check_pending_events_prevent_wildcard_vcont)
2901         (remote_target::discard_pending_stop_replies)
2902         (remote_target::discard_pending_stop_replies_in_queue)
2903         (remote_target::remote_notif_remove_queued_reply)
2904         (remote_target::queued_stop_reply)
2905         (remote_target::push_stop_reply, remote_target::peek_stop_reply)
2906         (remote_target::wait, remote_target::kill_new_fork_children)
2907         (remote_target::async): Update.
2908
2909 2018-06-10  Tom Tromey  <tom@tromey.com>
2910
2911         * record-full.c (record_full_arch_list_cleanups): Remove.
2912         (record_full_message): Use try/catch.
2913         (record_full_wait_cleanups): Remove.
2914         (record_full_wait_1): Use try/catch.
2915         (record_full_restore): Likewise.
2916
2917 2018-06-10  Tom Tromey  <tom@tromey.com>
2918
2919         * record-full.c (record_full_breakpoint_p): Remove typedef.  Don't
2920         declare VEC.  Add constructor.
2921         <in_target_beneath>: Now bool.
2922         (record_full_breakpoints): Now a std::vector, static.
2923         (record_full_sync_record_breakpoints)
2924         (record_full_init_record_breakpoints)
2925         (record_full_target::insert_breakpoint)
2926         (record_full_target::remove_breakpoint): Update.  Don't use XNEW.
2927
2928 2018-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
2929
2930         * dwarf2read.c (process_cu_includes): Remove struct keyword.
2931         * serial.c (serial_interface_lookup): Remove struct keyword.
2932
2933 2018-06-10  Tom Tromey  <tom@tromey.com>
2934
2935         * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
2936         method.
2937         * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
2938         a method.
2939         * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
2940         method.
2941         * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
2942         "beneath" as a method.
2943         * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
2944         Use "beneath" as a method.
2945
2946 2018-06-10  Tom Tromey  <tom@tromey.com>
2947
2948         * tracefile.c (struct trace_file_writer_deleter): New.
2949         <operator()>: Rename from trace_file_writer_xfree.
2950         (trace_file_writer_up): New typedef.
2951         (tsave_command, trace_save_tfile, trace_save_ctf): Update.
2952
2953 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
2954
2955         * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
2956         <m_registers, m_register_status>: Change type to
2957         std::unique_ptr.
2958         * regcache.c (reg_buffer::reg_buffer): Use new instead of
2959         XCNEWVEC.
2960
2961 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
2962
2963         * common/common-regcache.h (enum register_status): Add
2964         underlying type "signed char".
2965         * regcache.h (reg_buffer) <m_register_status>: Change type to
2966         register_status *.
2967         * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
2968         register_status instead of signed char.
2969         (reg_buffer::save): Use REG_UNKNOWN instead of 0.
2970         (reg_buffer::get_register_status): Remove cast.
2971         (readable_regcache::raw_read): Remove cast.
2972         (readable_regcache::cooked_read): Remove cast.
2973
2974 2018-06-09  Tom Tromey  <tom@tromey.com>
2975
2976         * source.c (reverse_search_command, forward_search_command): Use
2977         scoped_fd.
2978
2979 2018-06-09  Tom Tromey  <tom@tromey.com>
2980
2981         * serial.c (serial_ops_p): Remove typedef.  Don't declare VEC.
2982         (serial_ops_list): Now static, std::vector.
2983         (serial_interface_lookup, serial_add_interface): Update.
2984
2985 2018-06-09  Tom Tromey  <tom@tromey.com>
2986
2987         * dwarf2read.c (process_cu_includes): Update.
2988         (process_full_comp_unit): Update.
2989         * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
2990         std::vector.
2991
2992 2018-06-08  Paul Koning  <paul_koning@dell.com>
2993
2994         PR gdb/23252
2995
2996         * python/python.c (do_start_initialization):
2997         Avoid call to internal Python API.
2998         (init__gdb_module): New function.
2999
3000 2018-06-08  Gary Benson <gbenson@redhat.com>
3001
3002         * linux-thread-db.c (valprint.h): New include.
3003         (struct check_thread_db_info): New structure.
3004         (check_thread_db_on_load, tdb_testinfo): New static globals.
3005         (check_thread_db, check_thread_db_callback): New functions.
3006         (try_thread_db_load_1): Run integrity checks if requested.
3007         (maintenance_check_libthread_db): New function.
3008         (_initialize_thread_db): Register "maint check libthread-db"
3009         and "maint set/show check-libthread-db".
3010         * NEWS: Mention the above new commands.
3011
3012 2018-06-08  Tom Tromey  <tom@tromey.com>
3013
3014         * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
3015         now a method.
3016
3017 2018-06-08  Tom Tromey  <tom@tromey.com>
3018
3019         * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
3020
3021 2018-06-08  Tom Tromey  <tom@tromey.com>
3022
3023         * common/btrace-common.h (struct btrace_data): Add constructor,
3024         destructor, move assignment operator.
3025         <empty, clear, fini>: New methods.
3026         <format>: Initialize.
3027         (btrace_data_init, btrace_data_fini, btrace_data_clear)
3028         (btrace_data_empty): Don't declare.
3029         * common/btrace-common.c (btrace_data_init): Remove.
3030         (btrace_data::fini): Rename from btrace_data_fini.
3031         (btrace_data::empty): Rename from btrace_data_empty.
3032         (btrace_data::clear): Rename from btrace_data_clear.  Return
3033         bool.
3034         * btrace.h (make_cleanup_btrace_data): Don't declare.
3035         * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
3036         (parse_xml_btrace): Update.
3037         (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
3038         (maint_btrace_clear_packet_history_cmd): Update.
3039
3040 2018-06-07  Pedro Alves  <palves@redhat.com>
3041
3042         * target.h (target_ops) <beneath>: Now a method.  All references
3043         updated.
3044         (class target_stack): New.
3045         * target.c (g_target_stack): New.
3046         (g_current_top_target): Delete.
3047         (current_top_target): Get the top target out of g_target_stack.
3048         (target_stack::push, target_stack::unpush): New.
3049         (push_target, unpush_target): Reimplement.
3050         (target_is_pushed): Reimplement in terms of g_target_stack.
3051         (target_ops::beneath, target_stack::find_beneath): New.
3052
3053 2018-06-07  Pedro Alves  <palves@redhat.com>
3054
3055         * target.h (find_target_beneath): Delete declaration.
3056         * target.c (find_target_beneath): Delete definition.
3057         * aix-thread.c: All callers of find_target_beneath adjusted to
3058         call target_ops::beneath instead.
3059         * bsd-uthread.c: Likewise.
3060         * linux-thread-db.c: Likewise.
3061         * ravenscar-thread.c: Likewise.
3062         * sol-thread.c: Likewise.
3063         * spu-multiarch.c: Likewise.
3064
3065 2018-06-07  Pedro Alves  <palves@redhat.com>
3066
3067         * target.h (target_ops) <beneath>: Now a method.  All references
3068         updated.
3069         (target_ops) <m_beneath>: New.
3070         * target.c (target_ops::beneath): New.
3071         * corelow.c: Adjust all references to target_ops::beneath.
3072         * linux-thread-db.c: Likewise.
3073         * make-target-delegates: Likewise.
3074         * record-btrace.c: Likewise.
3075         * record-full.c: Likewise.
3076         * remote.c: Likewise.
3077         * target.c: Likewise.
3078         * target-delegates.c: Regenerate.
3079
3080 2018-06-07  Pedro Alves  <palves@redhat.com>
3081
3082         * target.h (target_stack): Delete.
3083         (current_top_target): Declare function.
3084         * target.c (target_stack): Delete.
3085         (g_current_top_target): New.
3086         (current_top_target): New function.
3087         * auxv.c: Use current_top_target instead of target_stack
3088         throughout.
3089         * avr-tdep.c: Likewise.
3090         * breakpoint.c: Likewise.
3091         * corefile.c: Likewise.
3092         * elfread.c: Likewise.
3093         * eval.c: Likewise.
3094         * exceptions.c: Likewise.
3095         * frame.c: Likewise.
3096         * gdbarch-selftests.c: Likewise.
3097         * gnu-v3-abi.c: Likewise.
3098         * ia64-tdep.c: Likewise.
3099         * ia64-vms-tdep.c: Likewise.
3100         * infcall.c: Likewise.
3101         * infcmd.c: Likewise.
3102         * infrun.c: Likewise.
3103         * linespec.c: Likewise.
3104         * linux-tdep.c: Likewise.
3105         * minsyms.c: Likewise.
3106         * ppc-linux-nat.c: Likewise.
3107         * ppc-linux-tdep.c: Likewise.
3108         * procfs.c: Likewise.
3109         * regcache.c: Likewise.
3110         * remote.c: Likewise.
3111         * rs6000-tdep.c: Likewise.
3112         * s390-linux-nat.c: Likewise.
3113         * s390-tdep.c: Likewise.
3114         * solib-aix.c: Likewise.
3115         * solib-darwin.c: Likewise.
3116         * solib-dsbt.c: Likewise.
3117         * solib-spu.c: Likewise.
3118         * solib-svr4.c: Likewise.
3119         * solib-target.c: Likewise.
3120         * sparc-tdep.c: Likewise.
3121         * sparc64-tdep.c: Likewise.
3122         * spu-tdep.c: Likewise.
3123         * symfile.c: Likewise.
3124         * symtab.c: Likewise.
3125         * target-descriptions.c: Likewise.
3126         * target-memory.c: Likewise.
3127         * target.c: Likewise.
3128         * target.h: Likewise.
3129         * tracefile-tfile.c: Likewise.
3130         * tracepoint.c: Likewise.
3131         * valops.c: Likewise.
3132         * valprint.c: Likewise.
3133         * value.c: Likewise.
3134         * windows-tdep.c: Likewise.
3135         * mi/mi-main.c: Likewise.
3136
3137 2018-06-07  Tom Tromey  <tom@tromey.com>
3138
3139         * valprint.h (build_address_symbolic): Declare.
3140         * printcmd.c (print_address_symbolic): Update.
3141         (build_address_symbolic): Change "name" and "filename" to
3142         std::string.
3143         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
3144         Update.
3145         * defs.h (build_address_symbolic): Remove declaration.
3146
3147 2018-06-07  Alan Hayward  <alan.hayward@arm.com>
3148
3149         * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
3150         (aarch64_vnv_type): Add function.
3151         (aarch64_pseudo_register_name): Add V regs for SVE.
3152         (aarch64_pseudo_register_type): Likewise.
3153         (aarch64_pseudo_register_reggroup_p): Likewise.
3154         (aarch64_pseudo_read_value_2): Use V0 offset for SVE
3155         (aarch64_pseudo_read_value): Add V regs for SVE.
3156         (aarch64_pseudo_write_2): Use V0 offset for SVE
3157         (aarch64_pseudo_write): Add V regs for SVE.
3158         * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
3159
3160 2018-06-06  Sergio Durigan Junior  <sergiodj@redhat.com>
3161
3162         * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
3163         (sve_vl_from_vq): Likewise.
3164
3165 2018-06-05  Tom Tromey  <tom@tromey.com>
3166
3167         * cli/cli-cmds.c (show_version): Update.
3168         * top.c (print_gdb_version): Add "interactive" parameter.
3169         Update.
3170         * main.c (captured_main_1): Update.
3171         * top.h (print_gdb_version): Add "interactive" parameter and a
3172         comment.
3173
3174 2018-06-05  David Malcolm  <dmalcolm@redhat.com>
3175
3176         * common/enum-flags.h: Add trailing semicolon to example in
3177         comment.
3178
3179 2018-06-05  Tom Tromey  <tom@tromey.com>
3180
3181         PR cli/12326:
3182         * NEWS: Add entry about pager.
3183         * utils.c (pagination_disabled_for_command): New global.
3184         (prompt_for_continue): Allow "c" response to prompt.
3185         (reinitialize_more_filter): Clear
3186         pagination_disabled_for_command.
3187         (fputs_maybe_filtered): Check pagination_disabled_for_command.
3188
3189 2018-06-04  Tom Tromey  <tom@tromey.com>
3190
3191         * ada-lang.h (ada_lookup_symbol_list): Update.
3192         * ada-lang.c (resolve_subexp): Update.
3193         (symbols_are_identical_enums): Change type of syms.  Remove nsyms
3194         parameter.
3195         (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
3196         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
3197         results parameter to std::vector.
3198         (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
3199         Update.
3200         * ada-exp.y (block_lookup): Update.
3201         (select_possible_type_sym): Change type of syms.  Remove nsyms
3202         parameter.
3203         (write_var_or_type, write_name_assoc): Update.
3204
3205 2018-06-04  Joel Brobecker  <brobecker@adacore.com>
3206
3207         * windows-nat.c (windows_nat_target::xfer_partial): Return
3208         TARGET_XFER_E_IO if we need to delegate to the target beneath
3209         but BENEATH is NULL.
3210
3211 2018-06-04  Simon Marchi  <simon.marchi@ericsson.com>
3212
3213         * Makefile.in (config.status): Add configure.nat as a
3214         dependency.
3215
3216 2018-06-04  Tom Tromey  <tom@tromey.com>
3217
3218         * cp-name-parser.y (cpname_state): Add method declarations.
3219         (HANDLE_QUAL): Update.
3220         (cpname_state::d_grab, cpname_state::fill_comp)
3221         (cpname_state::make_operator, cpname_state::make_dtor)
3222         (cpname_state::make_builtin_type, cpname_state::make_name)
3223         (cpname_state::d_qualify, cpname_state::d_int_type)
3224         (cpname_state::d_unary, cpname_state::d_binary): Now methods.
3225         (%union): Move earlier.
3226
3227 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
3228
3229         * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
3230
3231 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
3232
3233         * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
3234         (aarch64_pseudo_write_1): Likewise.
3235         (aarch64_pseudo_read_value): Use helper.
3236         (aarch64_pseudo_write): Likewise.
3237
3238 2018-06-04  Pedro Alves  <palves@redhat.com>
3239
3240         * darwin-nat.c (darwin_ops): Delete.
3241         (darwin_attach_pid): Use get_native_target.
3242
3243 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
3244
3245         * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
3246         * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
3247
3248 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
3249
3250         * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
3251         * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
3252         (aarch64_gdbarch_init): Check for SVE.
3253         * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
3254
3255 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
3256
3257         * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
3258         * aarch64-tdep.h (aarch64_read_description): Likewise.
3259         * arch/aarch64.c (aarch64_create_target_description): Likewise.
3260         * arch/aarch64.h (aarch64_create_target_description): Likewise.
3261         * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
3262         * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
3263         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
3264
3265 2018-06-02  Simon Marchi  <simon.marchi@ericsson.com>
3266
3267         * value.c (value_fetch_lazy_bitfield): New.
3268         (value_fetch_lazy_memory): New.
3269         (value_fetch_lazy_register): New.
3270         (value_fetch_lazy): Factor out to smaller functions.
3271
3272 2018-06-01  Tom Tromey  <tom@tromey.com>
3273
3274         * cp-name-parser.y (backslashable, represented): Now const.
3275
3276 2018-06-01  Tom Tromey  <tom@tromey.com>
3277
3278         * cp-name-parser.y: Include parser-defs.h.
3279         (parser_fprintf): Remove declaration.
3280
3281 2018-06-01  Tom Tromey  <tom@tromey.com>
3282
3283         * cp-name-parser.y: Use %pure-parser, %lex-param, and
3284         %parse-param.
3285         (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
3286         (global_result): Remove globals.
3287         (struct cpname_state): New.
3288         (yyparse): Don't declare.
3289         (yylex, yyerror): Move declarations after %union.
3290         (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
3291         (make_name): Add state parameter.
3292         Update all callers.
3293         (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
3294         parameter.
3295         (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
3296         Update.
3297         (yylex): Add lvalp, state parameters.
3298         (yyerror): Add state parameter.
3299         (cp_demangled_name_to_comp): Update.
3300
3301 2018-06-01  Tom Tromey  <tom@tromey.com>
3302
3303         * cp-name-parser.y (parser_fprintf): Declare.
3304         (GDB_YY_REMAP_PREFIX): Define.
3305         Include yy-remap.h.  Don't redefine yy* identifiers.
3306
3307 2018-06-01  Tom Tromey  <tom@tromey.com>
3308
3309         * python/py-type.c (typy_legacy_template_argument): Update.
3310         * cp-support.h (cp_demangled_name_to_comp): Update.
3311         * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
3312         parameter to be a "std::string *".
3313         (main): Update.
3314
3315 2018-06-01  H.J. Lu  <hongjiu.lu@intel.com>
3316
3317         * ada-lex.l: Include "diagnostics.h" instead of
3318         "common/diagnostics.h".
3319         * unittests/environ-selftests.c: Likewise.
3320         * common/diagnostics.h: Moved to ../include.
3321
3322 2018-06-01  Joel Brobecker  <brobecker@adacore.com>
3323
3324         * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
3325         to language_mode_manual while calling breakpoint_re_set_one.
3326
3327 2018-06-01  Tom Tromey  <tom@tromey.com>
3328
3329         * valops.c (value_cast_structs, destructor_name_p): Update.
3330         * symtab.c (gdb_mangle_name): Update.
3331         * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
3332         Update.
3333         * p-valprint.c (pascal_object_is_vtbl_ptr_type)
3334         (pascal_object_print_value_fields, pascal_object_print_value):
3335         Update.
3336         * p-typeprint.c (pascal_type_print_derivation_info): Update.
3337         * linespec.c (find_methods): Update.
3338         * gdbtypes.h (type_name_no_tag): Remove.
3339         (type_name_or_error): Rename from type_name_no_tag_or_error.
3340         * gdbtypes.c (type_name_no_tag): Remove.
3341         (type_name_or_error): Rename from type_name_no_tag_or_error.
3342         (lookup_struct_elt_type, check_typedef): Update.
3343         * expprint.c (print_subexp_standard): Update.
3344         * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
3345         * d-namespace.c (d_lookup_nested_symbol): Update.
3346         * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
3347         (cp_print_class_member): Update.
3348         * cp-namespace.c (cp_lookup_nested_symbol): Update.
3349         * completer.c (add_struct_fields): Update.
3350         * c-typeprint.c (cp_type_print_derivation_info)
3351         (c_type_print_varspec_prefix, c_type_print_base_struct_union):
3352         Update.
3353         * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
3354         (ada_prefer_type, ada_is_exception_sym): Update.
3355
3356 2018-06-01  Tom Tromey  <tom@tromey.com>
3357
3358         * valops.c (enum_constant_from_type, value_namespace_elt)
3359         (value_maybe_namespace_elt): Update.
3360         * valarith.c (find_size_for_pointer_math): Update.
3361         * target-descriptions.c (make_gdb_type): Update.
3362         * symmisc.c (print_symbol): Update.
3363         * stabsread.c (define_symbol, read_type)
3364         (complain_about_struct_wipeout, add_undefined_type)
3365         (cleanup_undefined_types_1): Update.
3366         * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
3367         (rust_range_type_p, val_print_struct, rust_print_struct_def)
3368         (rust_internal_print_type, rust_composite_type)
3369         (rust_evaluate_funcall, rust_evaluate_subexp)
3370         (rust_inclusive_range_type_p): Update.
3371         * python/py-type.c (typy_get_tag): Update.
3372         * p-typeprint.c (pascal_type_print_base): Update.
3373         * mdebugread.c (parse_symbol, parse_type): Update.
3374         * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
3375         Update.
3376         * guile/scm-type.c (gdbscm_type_tag): Update.
3377         * go-lang.c (sixg_string_p): Update.
3378         * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
3379         Update.
3380         * gdbtypes.h (struct main_type) <tag_name>: Remove.
3381         (TYPE_TAG_NAME): Remove.
3382         * gdbtypes.c (type_name_no_tag): Simplify.
3383         (check_typedef, check_types_equal, recursive_dump_type)
3384         (copy_type_recursive, arch_composite_type): Update.
3385         * f-typeprint.c (f_type_print_base): Update.  Print "Type" prefix
3386         in summary mode when needed.
3387         * eval.c (evaluate_funcall): Update.
3388         * dwarf2read.c (fixup_go_packaging, read_structure_type)
3389         (process_structure_scope, read_enumeration_type)
3390         (read_namespace_type, read_module_type, determine_prefix): Update.
3391         * cp-support.c (inspect_type): Update.
3392         * coffread.c (process_coff_symbol, decode_base_type): Update.
3393         * c-varobj.c (c_is_path_expr_parent): Update.
3394         * c-typeprint.c (c_type_print_base_struct_union): Update.
3395         (c_type_print_base_1): Update.  Print struct/class/union/enum in
3396         summary when using C language.
3397         * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
3398         (gen_maybe_namespace_elt): Update.
3399         * ada-lang.c (ada_type_name): Simplify.
3400         (empty_record, ada_template_to_fixed_record_type_1)
3401         (template_to_static_fixed_type)
3402         (to_record_with_fixed_variant_part, ada_check_typedef): Update.
3403
3404 2018-06-01  Tom Tromey  <tom@tromey.com>
3405
3406         * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
3407         c_print_type.
3408         * c-typeprint.c (c_print_type_1): Add "language" parameter.
3409         (c_print_type): Update.
3410         (c_print_type): New overload.
3411         (c_type_print_varspec_prefix, c_type_print_args)
3412         (c_type_print_varspec_suffix, c_print_type_no_offsets)
3413         (c_type_print_base_struct_union, c_type_print_base_1)
3414         (cp_type_print_method_args): Add "language" parameter.
3415         (c_type_print_base): Update.
3416         * c-lang.h (c_print_type): Add new overload.
3417
3418 2018-06-01  Tom Tromey  <tom@tromey.com>
3419
3420         * typeprint.h (c_type_print_varspec_suffix): Don't declare.
3421         * c-typeprint.c (c_type_print_varspec_suffix): Now static.
3422
3423 2018-06-01  Alan Hayward  <alan.hayward@arm.com>
3424
3425         * aarch64-tdep.c (aarch64_sve_register_names): New const
3426         var.
3427         * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
3428         (AARCH64_SVE_Z_REGS_NUM): New define.
3429         (AARCH64_SVE_P_REGS_NUM): Likewise.
3430         (AARCH64_SVE_NUM_REGS): Likewise.
3431
3432 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
3433
3434         * nat/linux-ptrace.h [__alpha__]
3435         (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
3436         definitions.
3437
3438 2018-05-31  Maciej W. Rozycki  <macro@mips.com>
3439
3440         * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
3441         the endianness selected.
3442         * NEWS: Document `set endian auto' mode operation update.
3443
3444 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
3445
3446         * Makefile.in: Add new header.
3447         * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
3448         (sve_vl_from_vg): Likewise.
3449         (sve_vq_from_vl): Likewise.
3450         (sve_vl_from_vq): Likewise.
3451         (sve_vq_from_vg): Likewise.
3452         (sve_vg_from_vq): Likewise.
3453         * configure.nat: Add new c file.
3454         * nat/aarch64-sve-linux-ptrace.c: New file.
3455         * nat/aarch64-sve-linux-ptrace.h: New file.
3456
3457 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
3458
3459         * aarch64-linux-nat.c (aarch64_linux_read_description):
3460         Add parmeter zero.
3461         * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
3462         Likewise.
3463         * aarch64-tdep.c (tdesc_aarch64_list): Add.
3464         (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
3465         (aarch64_gdbarch_init): Add parmeter zero.
3466         * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
3467         * arch/aarch64.c (aarch64_create_target_description): Check VQ.
3468         * arch/aarch64.h (aarch64_create_target_description): Add VQ.
3469         parmeter.
3470         * doc/gdb.texinfo: Describe SVE feature
3471         * features/aarch64-sve.c: New file.
3472
3473 2018-05-31  Omair Javaid  <omair.javaid@linaro.org>
3474
3475         PR gdb/23210
3476         * gdbarch.sh (significant_addr_bit): Default to zero when
3477         not set by target architecture.
3478         * gdbarch.c: Re-generated.
3479         * utils.c (address_significant): Update.
3480
3481 2018-05-30  Joel Brobecker  <brobecker@adacore.com>
3482
3483         * stack.c (func_command): Remove trailing newline in call to error.
3484
3485 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3486
3487         * regcache.h (regcache_raw_collect): Remove, update callers to
3488         use regcache::raw_collect.
3489         * regcache.c (regcache_raw_collect): Remove.
3490
3491 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3492
3493         * regcache.h (regcache_raw_supply): Remove, update callers to
3494         use detached_regcache::raw_supply.
3495         * regcache.c (regcache_raw_supply): Remove.
3496
3497 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3498
3499         * regcache.h (regcache_cooked_write_part): Remove, update
3500         callers to use regcache::cooked_write_part.
3501         * regcache.c (regcache_cooked_write_part): Remove.
3502
3503 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3504
3505         * regcache.h (regcache_cooked_read_part): Remove, update callers
3506         to use readable_regcache::cooked_read_part.
3507         * regcache.c (regcache_cooked_read_part): Remove.
3508
3509 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3510
3511         * regcache.h (regcache_cooked_read_value): Remove, update
3512         callers to use readable_regcache::cooked_read_value.
3513         * regcache.c (regcache_cooked_read_value): Remove.
3514
3515 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3516
3517         * regcache.h (regcache_cooked_write): Remove, update callers to
3518         use regcache::cooked_write.
3519         * regcache.c (regcache_cooked_write): Remove.
3520
3521 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3522
3523         * regcache.h (regcache_invalidate): Remove, update callers to
3524         use detached_regcache::invalidate instead.
3525         * regcache.c (regcache_invalidate): Remove.
3526
3527 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3528
3529         * regcache.h (regcache_raw_write_part): Remove, update callers
3530         to use regcache::raw_write_part instead.
3531         * regcache.c (regcache_raw_write_part): Remove.
3532
3533 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3534
3535         * regcache.h (regcache_raw_read_part): Remove, update callers to
3536         use readable_regcache::raw_read_part instead.
3537         * regcache.c (regcache_raw_read_part): Remove.
3538
3539 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3540
3541         * regcache.h (regcache_cooked_read): Remove, update callers to
3542         use readable_regcache::cooked_read instead.
3543         * regcache.c (regcache_cooked_read): Remove.
3544
3545 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3546
3547         * regcache.h (regcache_raw_write): Remove, update callers to use
3548         regcache::raw_write instead.
3549         * regcache.c (regcache_raw_write): Remove.
3550
3551 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3552
3553         * regcache.h (regcache_raw_read): Remove, update callers to use
3554         readable_regcache::raw_read instead.
3555         * regcache.c (regcache_raw_read): Remove.
3556
3557 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3558
3559         * regcache.h (regcache_raw_update): Remove, update callers to
3560         use readable_regcache::raw_update instead.
3561         * regcache.c (regcache_raw_update): Remove.
3562
3563 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3564
3565         * regcache.h (regcache_register_status): Remove, update callers
3566         to use reg_buffer::get_register_status directly instead.
3567         * regcache.c (regcache_register_status): Remove.
3568
3569 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3570
3571         * regcache.h (regcache_get_ptid): Remove, update all callers to
3572         call regcache::ptid instead.
3573         * regcache.c (regcache_get_ptid): Remove.
3574
3575 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3576
3577         * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
3578
3579 2018-05-30  Pedro Alves  <palves@redhat.com>
3580
3581         * common/common-exceptions.h (exception_rethrow): Use
3582         ATTRIBUTE_NORETURN.
3583
3584 2018-05-29  Simon Marchi  <simon.marchi@polymtl.ca>
3585
3586         * breakpoint.c (print_solib_event, check_status_catch_solib):
3587         Remove struct keyword in range-based for loops.
3588         * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
3589         * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
3590         Likewise.
3591         * linespec.c (find_superclass_methods, search_minsyms_for_name):
3592         Likewise.
3593         * symfile.c (addr_info_make_relative): Likewise.
3594         * thread.c (value_in_thread_stack_temporaries): Likewise.
3595
3596 2018-06-12  Weimin Pan  <weimin.pan@oracle.com>
3597
3598         PR gdb/16841
3599         * valops.c (value_struct_elt_for_reference): Call check_typedef on
3600         aggregate type to get its real type before accessing it.
3601
3602 2018-05-29  Weimin Pan  <weimin.pan@oracle.com>
3603
3604         * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
3605         * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
3606         * coff-pe-read.c (add_pe_forwarded_sym): Replace
3607         lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
3608         * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
3609         * jit.c (jit_breakpoint_re_set_internal): Likewise.
3610         * printcmd.c (info_address_command): Likewise.
3611
3612 2018-05-29  Tom Tromey  <tom@tromey.com>
3613
3614         * windows-nat.c (handle_exception): Update fall-through comment.
3615
3616 2018-05-29  Tom Tromey  <tom@tromey.com>
3617
3618         * progspace.h (so_list_ptr): Remove typedef.  Don't declare VEC.
3619         (struct program_space) <added_solibs>: Now a std::vector.
3620         * breakpoint.c (print_solib_event): Update.
3621         (check_status_catch_solib): Update.
3622         * progspace.c (clear_program_space_solib_cache): Update.
3623         * solib.c (update_solib_list): Update.
3624
3625 2018-05-29  Tom Tromey  <tom@tromey.com>
3626
3627         * python/py-type.c (typy_richcompare): Update.
3628         * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
3629         * gdbtypes.h (types_deeply_equal): Return bool.
3630         (types_equal): Likewise.
3631         * gdbtypes.c (type_equality_entry_d): Remove typedef.  Don't
3632         declare VEC.
3633         (check_types_equal): Change worklist to std::vector.  Return
3634         bool.
3635         (struct type_equality_entry): Add constructor.
3636         (compare_maybe_null_strings): Return bool.
3637         (check_types_worklist): Return bool.  Change worklist to
3638         std::vector.
3639         (types_deeply_equal): Use std::vector.
3640         (types_equal): Return bool.
3641         (compare_maybe_null_strings): Simplify.
3642
3643 2018-05-29  Tom Tromey  <tom@tromey.com>
3644
3645         * record-btrace.c (tp_t): Remove typedef.  Don't declare VEC.
3646
3647 2018-05-29  Tom Tromey  <tom@tromey.com>
3648
3649         * objc-lang.h: Don't include cp-support.h.
3650         * common/gdb_vecs.h (const_char_ptr): Remove typedef.  Don't
3651         declare VEC.
3652
3653 2018-05-27  Tom Tromey  <tom@tromey.com>
3654
3655         * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
3656
3657 2018-05-25  Tom Tromey  <tom@tromey.com>
3658
3659         * value.c (value::location): Initialize.
3660
3661 2018-05-25  Tom Tromey  <tom@tromey.com>
3662
3663         * dbxread.c (init_bincl_list): Remove.
3664         (bincl_list): Now a std::vector.
3665         (bincls_allocated, next_bincl): Remove.
3666         (free_bincl_list, do_free_bincl_list_cleanup)
3667         (make_cleanup_free_bincl_list): Remove.
3668         (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
3669         unique_xmalloc_ptr.
3670         (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
3671         (struct header_file_location): Add constructor.
3672         (add_bincl_to_list): Remove.
3673
3674 2018-05-25  Tom Tromey  <tom@tromey.com>
3675
3676         * tui/tui.c (tui_enable): Update.
3677         * mi/mi-interp.c (mi_interp::init): Update.
3678         * interps.h (class interp) <name>: New method.
3679         <m_name>: Rename from name.
3680         (~scoped_restore_interp): Update.
3681         * interps.c (interp::interp): Update.
3682         (interp_add, interp_set, interp_lookup_existing)
3683         (current_interp_named_p): Update.
3684
3685 2018-05-25  Tom Tromey  <tom@tromey.com>
3686
3687         * interps.c (interp_name): Remove.
3688         * mi/mi-interp.c (mi_interp::init): Update.
3689         * interps.h (interp_name): Remove.
3690         (~scoped_restore_interp): Update.
3691         * tui/tui.c (tui_enable): Update.
3692
3693 2018-05-25  Tom Tromey  <tom@tromey.com>
3694
3695         * utils.c (fputs_maybe_filtered): Update.
3696         * linespec.c (decode_line_full): Update.
3697         * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
3698         (mi_print_breakpoint_for_event, mi_solib_loaded)
3699         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
3700         (mi_user_selected_context_changed): Update.
3701         * mi/mi-main.c (mi_execute_command): Update.
3702         * cli/cli-script.c (execute_control_command): Update.
3703         * python/python.c (execute_gdb_command): Update.
3704         * solib.c (info_sharedlibrary_command): Update.
3705         * interps.c (interp_ui_out): Remove.
3706         * interps.h (interp_ui_out): Remove.
3707
3708 2018-05-25  Tom Tromey  <tom@tromey.com>
3709
3710         * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
3711         * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
3712         * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
3713
3714 2018-05-25  Tom Tromey  <tom@tromey.com>
3715
3716         * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
3717         * interps.c (interp_exec): Use scoped_restore.
3718
3719 2018-05-25  Tom Tromey  <tom@tromey.com>
3720
3721         * remote.c (remote_target::remote_file_get): Use
3722         gdb::byte_vector.
3723         (remote_target::remote_file_put): Likewise.
3724
3725 2018-05-25  Tom Tromey  <tom@tromey.com>
3726
3727         * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
3728         a std::string.
3729         (get_pe_section_index, add_pe_exported_sym): Update.
3730         (read_pe_exported_syms): Use gdb::def_vector.
3731
3732 2018-05-25  Tom Tromey  <tom@tromey.com>
3733
3734         * frame.c (remove_prev_frame): Remove.
3735         (get_prev_frame_if_no_cycle): Use TRY/CATCH.
3736
3737 2018-05-25  Maciej W. Rozycki  <macro@mips.com>
3738
3739         * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
3740         Remove prototypes.
3741         * mips-linux-nat.c (supply_fpregset): Always call
3742         `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
3743         (fill_fpregset): Always call `mips64_fill_fpregset' rather than
3744         `mips_fill_fpregset'.
3745         * mips-linux-tdep.c (mips_supply_fpregset)
3746         (mips_supply_fpregset_wrapper, mips_fill_fpregset)
3747         (mips_fill_fpregset_wrapper): Remove functions.
3748         (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
3749         (mips_linux_fpregset): Remove variable.
3750         (mips_linux_iterate_over_regset_sections): Use
3751         `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
3752         (mips_linux_o32_sigframe_init): Remove comment.
3753
3754 2018-05-25  Pedro Alves  <palves@redhat.com>
3755
3756         * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
3757         (struct readahead_cache, struct packet_reg, struct
3758         remote_arch_state, class remote_state): Move higher up in the
3759         file.
3760         (remote_target::m_remote_state): Now an object instead of a pointer.
3761         (remote_target::get_remote_state): Adjust.
3762
3763 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
3764
3765         * stack.c (select_and_print_frame): Delete.
3766         (struct function_bounds): Move struct within function.
3767         (func_command): Most content moved into new function
3768         find_frame_for_function, use new function, print result, add
3769         function comment.
3770         (find_frame_for_function): New function, now returns a result.
3771
3772 2018-05-24  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
3773
3774         * stack.c (iterate_over_block_arg_vars): Fix comment.
3775         (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
3776
3777 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
3778
3779         PR gdb/23203
3780         * frame.c
3781         (scoped_restore_selected_frame::scoped_restore_selected_frame):
3782         Define.
3783         (scoped_restore_selected_frame::~scoped_restore_selected_frame):
3784         Define.
3785         * frame.h (class scoped_restore_selected_frame): New class.
3786         * stack.c (print_frame_local_vars): Remove catching and rethrowing
3787         of any exception, use scoped_restore_selected_frame to restore the
3788         frame instead.
3789
3790 2018-05-24  Pedro Alves  <palves@redhat.com>
3791
3792         * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
3793         override.
3794
3795 2018-05-23  Tom Tromey  <tom@tromey.com>
3796
3797         * complaints.c (struct complaints): Remove.
3798         (symfile_complaint_book): Remove.
3799         (series): New global.
3800         (complaint_internal): Update.
3801         (clear_complaints): Update.
3802
3803 2018-05-23  Tom Tromey  <tom@tromey.com>
3804
3805         * complaints.c (counters): New global.
3806         (struct complain): Remove.
3807         (struct complaints) <root>: Remove.
3808         (complaint_sentinel): Remove.
3809         (symfile_complaint_book): Update.
3810         (find_complaint) Remove.
3811         (complaint_internal, clear_complaints): Update.
3812
3813 2018-05-23  Tom Tromey  <tom@tromey.com>
3814
3815         * complaints.c (struct complain) <file, line>: Remove.
3816         (find_complaint): Remove file, line parameters.
3817         (complaint_internal): Update.
3818
3819 2018-05-23  Tom Tromey  <tom@tromey.com>
3820
3821         * complaints.c (vcomplaint): Remove.
3822         (complaint_internal) Merge in contents of vcomplaint.
3823
3824 2018-05-23  Tom Tromey  <tom@tromey.com>
3825
3826         * complaints.c (struct complaints) <explanation>: Remove.
3827         (symfile_explanations): Remove.
3828         (symfile_complaint_book): Update.
3829         (vcomplaint): Update.
3830         (struct explanation): Remove.
3831
3832 2018-05-23  Tom Tromey  <tom@tromey.com>
3833
3834         * complaints.c (symfile_complaints): Remove.
3835         (complaint_internal): Remove "complaints" parameter.
3836         (clear_complaints, vcomplaint): Remove "c" parameter.
3837         (get_complaints): Remove.
3838         * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
3839         (dwarf2_debug_line_missing_file_complaint)
3840         (dwarf2_debug_line_missing_end_sequence_complaint)
3841         (dwarf2_complex_location_expr_complaint)
3842         (dwarf2_const_value_length_mismatch_complaint)
3843         (dwarf2_section_buffer_overflow_complaint)
3844         (dwarf2_macro_malformed_definition_complaint)
3845         (dwarf2_invalid_attrib_class_complaint)
3846         (create_addrmap_from_index, dw2_symtab_iter_next)
3847         (dw2_expand_marked_cus)
3848         (dw2_debug_names_iterator::find_vec_in_debug_names)
3849         (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
3850         (create_debug_type_hash_table, init_cutu_and_read_dies)
3851         (partial_die_parent_scope, add_partial_enumeration)
3852         (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
3853         (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
3854         (read_import_statement, read_file_scope, create_dwo_cu_reader)
3855         (create_cus_hash_table, create_dwp_hash_table)
3856         (inherit_abstract_dies, read_func_scope, read_call_site_scope)
3857         (dwarf2_rnglists_process, dwarf2_ranges_process)
3858         (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
3859         (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
3860         (handle_struct_member_die, process_structure_scope)
3861         (read_array_type, read_common_block, read_module_type)
3862         (read_tag_pointer_type, read_typedef, read_base_type)
3863         (read_subrange_type, load_partial_dies, partial_die_info::read)
3864         (partial_die_info::read, partial_die_info::read)
3865         (partial_die_info::read, read_checked_initial_length_and_offset)
3866         (dwarf2_string_attr, read_formatted_entries)
3867         (dwarf_decode_line_header)
3868         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
3869         (new_symbol, dwarf2_const_value_attr, lookup_die_type)
3870         (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
3871         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
3872         (get_signatured_type, get_DW_AT_signature_type)
3873         (decode_locdesc, file_file_name, consume_improper_spaces)
3874         (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
3875         (dwarf_decode_macro_bytes, dwarf_decode_macros)
3876         (dwarf2_symbol_mark_computed, set_die_type)
3877         (read_attribute_value): Update.
3878         * stap-probe.c (handle_stap_probe, get_stap_base_address):
3879         Update.
3880         * dbxread.c (unknown_symtype_complaint)
3881         (lbrac_mismatch_complaint, repeated_header_complaint)
3882         (set_namestring, function_outside_compilation_unit_complaint)
3883         (read_dbx_symtab, process_one_symbol): Update.
3884         * gdbtypes.c (stub_noname_complaint): Update.
3885         * windows-nat.c (handle_unload_dll): Update.
3886         * coffread.c (coff_symtab_read, enter_linenos, decode_type)
3887         (decode_base_type): Update.
3888         * xcoffread.c (bf_notfound_complaint, ef_complaint)
3889         (eb_complaint, record_include_begin, record_include_end)
3890         (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
3891         (process_xcoff_symbol, read_symbol)
3892         (function_outside_compilation_unit_complaint)
3893         (scan_xcoff_symtab): Update.
3894         * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
3895         * buildsym.c (finish_block_internal, make_blockvector)
3896         (end_symtab_get_static_block, augment_type_symtab): Update.
3897         * dtrace-probe.c (dtrace_process_dof)
3898         (dtrace_static_probe_ops::get_probes): Update.
3899         * complaints.h (struct complaint): Don't declare.
3900         (symfile_complaints): Remove.
3901         (complaint_internal): Remove "complaints" parameter.
3902         (complaint): Likewise.
3903         (clear_complaints): Likewise.
3904         * symfile.c (syms_from_objfile_1, finish_new_objfile)
3905         (reread_symbols): Update.
3906         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
3907         (dwarf2_frame_cache, decode_frame_entry): Update.
3908         * dwarf2loc.c (dwarf_reg_to_regnum): Update.
3909         * objc-lang.c (lookup_objc_class, lookup_child_selector)
3910         (info_selectors_command): Update.
3911         * macrotab.c (macro_include, check_for_redefinition)
3912         (macro_undef): Update.
3913         * objfiles.c (filter_overlapping_sections): Update.
3914         * stabsread.c (invalid_cpp_abbrev_complaint)
3915         (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
3916         (define_symbol, error_type, read_type, rs6000_builtin_type)
3917         (stabs_method_name_from_physname, read_member_functions)
3918         (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
3919         (attach_fields_to_type, complain_about_struct_wipeout)
3920         (read_range_type, read_args, common_block_start)
3921         (common_block_end, cleanup_undefined_types_1, scan_file_globals):
3922         Update.
3923         * mdebugread.c (index_complaint, unknown_ext_complaint)
3924         (basic_type_complaint, bad_tag_guess_complaint)
3925         (bad_rfd_entry_complaint, unexpected_type_code_complaint)
3926         (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
3927         (parse_procedure, parse_lines)
3928         (function_outside_compilation_unit_complaint)
3929         (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
3930         (bad_tag_guess_complaint, reg_value_complaint): Update.
3931         * cp-support.c (demangled_name_complaint): Update.
3932         * macroscope.c (sal_macro_scope): Update.
3933         * dwarf-index-write.c (class debug_names): Update.
3934
3935 2018-05-23  Tom Tromey  <tom@tromey.com>
3936
3937         * complaints.c (clear_complaints): Remove "noisy" parameter.
3938         * complaints.h (clear_complaints): Update.
3939         * symfile.c (syms_from_objfile_1, finish_new_objfile)
3940         (reread_symbols): Update.
3941
3942 2018-05-23  Tom Tromey  <tom@tromey.com>
3943
3944         * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
3945         SUBSEQUENT_MESSAGE.
3946         (vcomplaint, clear_complaints): Update.
3947         (symfile_explanations): Remove some messages.
3948
3949 2018-05-23  Tom Tromey  <tom@tromey.com>
3950
3951         * complaints.c (internal_complaint): Remove.
3952         * complaints.h (internal_complaint): Remove.
3953
3954 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
3955
3956         * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
3957
3958 2018-05-22  Pedro Alves  <palves@redhat.com>
3959
3960         * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
3961         (remote_fileio_badfd, remote_fileio_return_errno)
3962         (remote_fileio_return_success, remote_fileio_func_open)
3963         (remote_fileio_func_open, remote_fileio_func_close)
3964         (remote_fileio_func_read, remote_fileio_func_write)
3965         (remote_fileio_func_lseek, remote_fileio_func_rename)
3966         (remote_fileio_func_unlink, remote_fileio_func_stat)
3967         (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
3968         (remote_fileio_func_isatty, remote_fileio_func_system): Add
3969         remote_target parameter.
3970         (remote_fio_func_map) <func>: Add remote_target parameter.
3971         (do_remote_fileio_request, remote_fileio_request):
3972         * remote-fileio.h (remote_fileio_request):
3973         * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
3974         remote_target parameter.
3975         (remote_notif_process, handle_notification): Adjust to pass down
3976         the remote.
3977         (remote_notif_state_allocate): Add remote_target parameter.  Save
3978         it.
3979         * remote-notif.h (struct remote_target): Forward declare.
3980         (struct notif_client) <parse, ack, can_get_pending_events>: Add
3981         remote_target parameter.
3982         (struct remote_notif_state) <remote>: New field.
3983         (remote_notif_ack, remote_notif_parse): Add remote_target
3984         parameter.
3985         (remote_notif_state_allocate, remote_notif_state_allocate): Add
3986         remote_target parameter.
3987         * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
3988         (threads_listing_context, rmt_thread_action, protocol_feature)
3989         (packet_reg, stop_reply, stop_reply_p, enum packet_support)
3990         (packet_result, struct threads_listing_context, remote_state):
3991         Move definitions and declarations higher up.
3992         (remote_target) <~remote_target>: Declare.
3993         (remote_download_command_source, remote_file_put, remote_file_get)
3994         (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
3995         (remote_hostio_pread_vFile, remote_hostio_send_command)
3996         (remote_hostio_set_filesystem, remote_hostio_open)
3997         (remote_hostio_close, remote_hostio_unlink, remote_state)
3998         (get_remote_state, get_remote_packet_size, get_memory_packet_size)
3999         (get_memory_write_packet_size, get_memory_read_packet_size)
4000         (append_pending_thread_resumptions, remote_detach_1)
4001         (append_resumption, remote_resume_with_vcont)
4002         (add_current_inferior_and_thread, wait_ns, wait_as)
4003         (process_stop_reply, remote_notice_new_inferior)
4004         (process_initial_stop_replies, remote_add_thread)
4005         (btrace_sync_conf, remote_btrace_maybe_reopen)
4006         (remove_new_fork_children, kill_new_fork_children)
4007         (discard_pending_stop_replies, stop_reply_queue_length)
4008         (check_pending_events_prevent_wildcard_vcont)
4009         (discard_pending_stop_replies_in_queue, stop_reply)
4010         (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
4011         (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
4012         (remote_interrupt_as, remote_interrupt_ns)
4013         (remote_get_noisy_reply, remote_query_attached)
4014         (remote_add_inferior, remote_current_thread, get_current_thread)
4015         (set_thread, set_general_thread, set_continue_thread)
4016         (set_general_process, write_ptid)
4017         (remote_unpack_thread_info_response, remote_get_threadinfo)
4018         (parse_threadlist_response, remote_get_threadlist)
4019         (remote_threadlist_iterator, remote_get_threads_with_ql)
4020         (remote_get_threads_with_qxfer)
4021         (remote_get_threads_with_qthreadinfo, extended_remote_restart)
4022         (get_offsets, remote_check_symbols, remote_supported_packet)
4023         (remote_query_supported, remote_packet_size)
4024         (remote_serial_quit_handler, remote_detach_pid)
4025         (remote_vcont_probe, remote_resume_with_hc)
4026         (send_interrupt_sequence, interrupt_query)
4027         (remote_notif_get_pending_events, fetch_register_using_p)
4028         (send_g_packet, process_g_packet, fetch_registers_using_g)
4029         (store_register_using_P, store_registers_using_G)
4030         (set_remote_traceframe, check_binary_download)
4031         (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
4032         (remote_xfer_live_readonly_partial, remote_read_bytes)
4033         (remote_send_printf, remote_flash_write, readchar)
4034         (remote_serial_write, putpkt, putpkt_binary, skip_frame)
4035         (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
4036         (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
4037         (extended_remote_disable_randomization, extended_remote_run)
4038         (send_environment_packet, extended_remote_environment_support)
4039         (extended_remote_set_inferior_cwd, remote_write_qxfer)
4040         (remote_read_qxfer, push_stop_reply, vcont_r_supported)
4041         (packet_command): Now methods of ...
4042         (remote_target): ... this class.
4043         (m_remote_state) <remote_target>: New field.
4044         (struct remote_state) <stop_reply_queue,
4045         remote_async_inferior_event_token, wait_forever_enabled_p>: New
4046         fields.
4047         (remote_state::remote_state): Allocate stop_reply_queue.
4048         (remote_state): Delete global.
4049         (get_remote_state_raw): Delete.
4050         (remote_target::get_remote_state): Allocate m_remote_state on
4051         demand.
4052         (get_current_remote_target): New.
4053         (remote_ops, extended_remote_ops): Delete.
4054         (wait_forever_enabled_p, remote_async_inferior_event_token):
4055         Delete, moved to struct remote_state.
4056         (remote_target::close): Delete self.  Destruction bits split to
4057         ...
4058         (remote_target::~remote_target): ... this.
4059         (show_memory_packet_size): Adjust to use
4060         get_current_remote_target.
4061         (struct protocol_feature) <func>: Add remote_target parameter.
4062         All callers adjusted.
4063         (curr_quit_handler_target): New.
4064         (remote_serial_quit_handler): Reimplement.
4065         (remote_target::open_1): Adjust to use get_current_remote_target.
4066         Heap-allocate remote_target/extended_remote_target instances.
4067         (vcont_builder::vcont_builder): Add remote_target parameter, and
4068         save it in m_remote.  All callers adjusted.
4069         (vcont_builder::m_remote): New field.
4070         (vcont_builder::restart, vcont_builder::flush)
4071         (vcont_builder::push_action): Use it.
4072         (remote_target::commit_resume): Use it.
4073         (struct queue_iter_param) <remote>: New field.
4074         (remote_target::remove_new_fork_children): Fill in 'remote' field.
4075         (check_pending_event_prevents_wildcard_vcont_callback_data): New.
4076         (check_pending_event_prevents_wildcard_vcont_callback)
4077         (remote_target::check_pending_events_prevent_wildcard_vcont)
4078         (remote_target::discard_pending_stop_replies)
4079         (remote_target::discard_pending_stop_replies_in_queue)
4080         (remote_target::remote_notif_remove_queued_reply): Fill in
4081         'remote' field.
4082         (remote_notif_get_pending_events): New.
4083         (remote_target::readchar, remote_target::remote_serial_write):
4084         Save/restore curr_quit_handler_target.
4085         (putpkt): New.
4086         (kill_new_fork_children): Fill in 'remote' field.
4087         (packet_command): Use get_current_remote_target, defer to
4088         remote_target method of same name.
4089         (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
4090         parameter, and save it in m_remote.  All callers adjusted.
4091         (scoped_remote_fd::release): Use m_remote.
4092         (scoped_remote_fd::m_remote): New field.
4093         (remote_file_put, remote_file_get, remote_file_delete): Use
4094         get_current_remote_target, defer to remote_target method of same
4095         name.
4096         (remote_btrace_reset): Add remote_state paremeter.  Update all
4097         callers.
4098         (remote_async_inferior_event_handler). Pass down 'data'.
4099         (remote_new_objfile): Use get_current_remote_target.
4100         (remote_target::vcont_r_supported): New.
4101         (set_range_stepping): Use get_current_remote_target and
4102         remote_target::vcont_r_supported.
4103         (_initialize_remote): Don't allocate 'remote_state' and
4104         'stop_reply_queue' globals.
4105         * remote.h (struct remote_target): Forward declare.
4106         (getpkt, putpkt, remote_notif_get_pending_events): Add
4107         'remote_target' parameter.
4108
4109 2018-05-22  Pedro Alves  <palves@redhat.com>
4110
4111         * remote.c (vcont_builder): Now a class.  Make all data members
4112         private.
4113         (vcont_builder) <vcont_builder, restart, flush, push_action>:
4114         Declare methods.
4115         (vcont_builder_restart): Rename to ...
4116         (vcont_builder::restart): ... this.
4117         (vcont_builder_flush): Rename to ...
4118         (vcont_builder::flush): ... this.
4119         (vcont_builder_push_action): Rename to ...
4120         (vcont_builder::push_action): ... this.
4121         (remote_target::commit_resume): Adjust.
4122
4123 2018-05-22  Pedro Alves  <palves@redhat.com>
4124
4125         * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
4126         (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
4127         (get_fixed_memory_packet_size): New.
4128         (get_memory_packet_size): Use it.
4129         (set_memory_packet_size): Don't override the config size with
4130         DEFAULT_MAX_MEMORY_PACKET_SIZE.
4131         (show_memory_packet_size): Use get_fixed_memory_packet_size.
4132         Don't refer to get_memory_packet_size if not connected to a remote
4133         target.  Show "(default)" if configured size is 0.
4134
4135 2018-05-22  Pedro Alves  <palves@redhat.com>
4136
4137         * remote.c (remote_target::mourn_inferior): Move
4138         discard_pending_stop_replies call here from ...
4139         (_initialize_remote): ... here.
4140
4141 2018-05-22  Pedro Alves  <palves@redhat.com>
4142
4143         * remote.c (compare_section_command): Remove set_general_process
4144         call.
4145
4146 2018-05-22  Pedro Alves  <palves@redhat.com>
4147
4148         * remote.c (struct packet_reg, struct remote_arch_state):
4149         Move higher up in the file.
4150         (remote_state) <m_arch_states>: Store remote_arch_state values
4151         instead of remote_arch_state pointers.
4152         (remote_state::get_remote_arch_state): Adjust.
4153
4154 2018-05-22  Pedro Alves  <palves@redhat.com>
4155
4156         * remote.c: Include <unordered_map>.
4157         (remote_state): Now a class.
4158         (remote_state) <get_remote_arch_state>: Declare method.
4159         <get_remote_arch_state>: New field.
4160         (remote_arch_state) <remote_arch_state>: Declare ctor.
4161         <regs>: Now a unique_ptr.
4162         (remote_gdbarch_data_handle): Delete.
4163         (get_remote_arch_state): Delete.
4164         (remote_state::get_remote_arch_state): New.
4165         (get_remote_state): Adjust to call remote_state's
4166         get_remote_arch_state method.
4167         (init_remote_state): Delete, bits factored out to ...
4168         (remote_arch_state::remote_arch_state): ... this new method.
4169         (get_remote_packet_size, get_memory_packet_size)
4170         (process_g_packet, remote_target::fetch_registers)
4171         (remote_target::prepare_to_store, store_registers_using_G)
4172         (remote_target::store_registers, remote_target::get_trace_status):
4173         Adjust to call remote_state's method.
4174         (_initialize_remote): Remove reference to
4175         remote_gdbarch_data_handle.
4176
4177 2018-05-22  Pedro Alves  <palves@redhat.com>
4178
4179         * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
4180         pread>: New method declarations.
4181         (remote_target::open_1): Adjust.
4182         (readahead_cache_invalidate): Rename to ...
4183         (readahead_cache::invalidate): ... this, and adjust to be a class
4184         method.
4185         (readahead_cache_invalidate_fd): Rename to ...
4186         (readahead_cache::invalidate_fd): ... this, and adjust to be a
4187         class method.
4188         (remote_hostio_pwrite): Adjust.
4189         (remote_hostio_pread_from_cache): Rename to ...
4190         (readahead_cache::pread): ... this, and adjust to be a class
4191         method.
4192         (remote_hostio_close): Adjust.
4193
4194 2018-05-22  Pedro Alves  <palves@redhat.com>
4195
4196         * remote.c (remote_hostio_close_cleanup): Delete.
4197         (class scoped_remote_fd): New.
4198         (remote_file_put, remote_file_get): Use it.
4199
4200 2018-05-22  Pedro Alves  <palves@redhat.com>
4201
4202         (struct vCont_action_support): Use bool and initialize all fields.
4203         (struct readahead_cache): Initialize all fields.
4204         (remote_state): Use bool and initialize all fields.
4205         (remote_state::remote_state, remote_state::~remote_state): New.
4206         (new_remote_state): Delete.
4207         (_initialize_remote): Use new to allocate remote_state.
4208
4209 2018-05-22  Pedro Alves  <palves@redhat.com>
4210             張俊芝  <zjz@zjz.name>
4211
4212         PR gdb/22973
4213         * c-exp.y: Include "c-support.h".
4214         (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
4215         of tolower.  Use c_ident_is_alpha to scan names.
4216         * c-lang.c: Include "c-support.h".
4217         (convert_ucn, convert_octal, convert_hex, convert_escape): Use
4218         ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
4219         * c-support.h: New file, with bits factored out from ...
4220         * cp-name-parser.y: ... this file.
4221         Include "c-support.h".
4222         (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
4223         c-support.h and renamed.
4224         (symbol_end, yylex): Adjust.
4225
4226 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
4227
4228         * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
4229         parameter type to CORE_ADDR.
4230         * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
4231         parameter type in declaration to CORE_ADDR.
4232         * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
4233         target_auxv_search to get AT_HWCAP and use the result to get the
4234         target description.
4235         * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
4236         to CORE_ADDR. Remove the cast of the return value to unsigned
4237         long. Fix error predicate of target_auxv_search.
4238         (ppc_linux_nat_target::read_description): Change the type of the
4239         hwcap variable to CORE_ADDR.
4240
4241 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
4242
4243         * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
4244         if the size of fpscr is larger than 32 bits.
4245
4246 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
4247
4248         * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
4249         (ppc32_linux_vsxregmap): New global.
4250         (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
4251         regcache_supply_regset, and regcache_collect_regset.
4252         * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
4253         * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
4254         (fetch_vsx_register, store_vsx_register): Remove.
4255         (fetch_vsx_registers): Add regno parameter. Get regset using
4256         ppc_linux_vsxregset. Use regset to supply registers.
4257         (store_vsx_registers): Add regno parameter. Get regset using
4258         ppc_linux_vsxregset. Use regset to collect registers.
4259         (fetch_register): Call fetch_vsx_registers instead of
4260         fetch_vsx_register.
4261         (store_register): Call store_vsx_registers instead of
4262         store_vsx_register.
4263         (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
4264         new regno parameter.
4265         (store_ppc_registers): Call store_vsx_registers with -1 for the
4266         new regno parameter.
4267         * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
4268         (ppc_collect_vsxregset): Remove.
4269
4270 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
4271
4272         * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
4273         offset fields.
4274         * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
4275         for vector register offset fields.
4276         (ppc64_fbsd_reg_offsets): Likewise.
4277         * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
4278         to vector register offset fields.
4279         * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
4280         to vector register offset fields.
4281         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
4282         vector register offset fields.
4283         * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
4284         initializers for vector register offset fields.
4285         (rs6000_aix64_reg_offsets): Likewise.
4286         * rs6000-tdep.c (ppc_vrreg_offset): Remove.
4287         (ppc_supply_vrregset): Remove.
4288         (ppc_collect_vrregset): Remove.
4289         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
4290         (ppc_linux_vrregset) : New function.
4291         (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
4292         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
4293         (ppc32_linux_vrregset): Remove.
4294         (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
4295         and use result instead of ppc32_linux_vrregset.
4296         (ppc32_linux_reg_offsets): Remove initializers for vector register
4297         offset fields.
4298         (ppc64_linux_reg_offsets): Likewise.
4299         * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
4300         * ppc-linux-nat.c: Include regset.h.
4301         (gdb_vrregset_t): Adjust comment to account for little-endian
4302         mode.
4303         (supply_vrregset, fill_vrregset): Remove.
4304         (fetch_altivec_register, store_altivec_register): Remove.
4305         (fetch_altivec_registers): Add regno parameter. Get regset using
4306         ppc_linux_vrregset. Use regset to supply registers.
4307         (store_altivec_registers): Add regno parameter. Get regset using
4308         ppc_linux_vrregset. Use regset to collect registers.
4309         (fetch_register): Call fetch_altivec_registers instead of
4310         fetch_altivec_register.
4311         (store_register): Call store_altivec_registers instead of
4312         store_altivec_register.
4313         (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
4314         the new regno parameter.
4315         (store_ppc_registers): Call store_altivec_registers with -1 for
4316         the new regno parameter.
4317
4318 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
4319
4320         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
4321         (PPC_LINUX_SIZEOF_VSXREGSET): Define.
4322         * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
4323         (gdb_vrregset_t): Change array type size to
4324         PPC_LINUX_SIZEOF_VRREGSET.
4325         (gdb_vsxregset_t): Change array type size to
4326         PPC_LINUX_SIZEOF_VSXREGSET.
4327         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
4328         Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
4329         PPC_LINUX_SIZEOF_VSXREGSET.
4330
4331 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
4332
4333         * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
4334         * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
4335         nat/ppc-linux.c.
4336         (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
4337         ppc_linux_target_wordsize with tid.
4338         (ppc_linux_nat_target::read_description): Call ppc_linux_target
4339         wordsize with tid.
4340         * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
4341         (ppc64_64bit_inferior_p): Add static and inline specifiers.
4342         (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
4343         tid parameter. Remove static specifier.
4344         * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
4345         (ppc_linux_target_wordsize): New declaration.
4346
4347 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
4348
4349         * arch/ppc-linux-common.c: New file.
4350         * arch/ppc-linux-common.h: New file.
4351         * arch/ppc-linux-tdesc.h: New file.
4352         * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
4353         * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
4354         (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
4355         arch/ppc-linux-tdesc.h.
4356         * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
4357         arch/ppc-linux-tdesc.h.
4358         (ppc_linux_nat_target::read_description): Remove target
4359         description matching code. Fill a ppc_linux_features struct and
4360         call ppc_linux_match_description with it. Move comment about ISA
4361         2.05 to ppc-linux-common.c.
4362         * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
4363         arch/ppc-linux-tdesc.h.
4364         (ppc_linux_core_read_description): Remove target description
4365         matching code. Fill a ppc_linux_features struct and call
4366         ppc_linux_match_description with it.
4367         * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
4368         (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
4369         (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
4370         (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
4371         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
4372         (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
4373         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
4374         (tdesc_powerpc_e500l): Remove.
4375
4376 2018-05-22  Joel Brobecker  <brobecker@adacore.com>
4377
4378         * ada-lang.c (catch_assert_command): Pass empty string instead
4379         of NULL for excep_string argument.
4380
4381 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
4382
4383         * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
4384         the width of the requested register exceeds the width of the
4385         `ptrace' data type.
4386
4387 2018-05-21  Tom Tromey  <tom@tromey.com>
4388
4389         * printcmd.c (output_command): Remove.
4390         (output_command_const): Rename to output_command.
4391         * valprint.h (output_command): Rename from output_command_const.
4392         * tracepoint.c (trace_dump_actions): Call output_command.
4393
4394 2018-05-21  Tom Tromey  <tom@tromey.com>
4395
4396         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
4397         (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
4398         * ada-lang.h (create_ada_exception_catchpoint): Update.
4399         * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
4400         std::string.
4401         (create_excep_cond_exprs, ~ada_catchpoint)
4402         (should_stop_exception, print_one_exception)
4403         (print_mention_exception, print_recreate_exception): Update.
4404         (ada_get_next_arg): Remove.
4405         (catch_ada_exception_command_split): Use std::string.  Change type
4406         of "excep_string", "cond_string".
4407         (catch_ada_exception_command): Update.
4408         (create_ada_exception_catchpoint): Change type of excep_string.
4409         (ada_exception_sal): Remove excep_string parameter.
4410         (~ada_catchpoint): Remove.
4411
4412 2018-05-21  Tom Tromey  <tom@tromey.com>
4413
4414         * ada-lang.c (ada_collect_symbol_completion_matches): Remove
4415         cleanup.
4416
4417 2018-05-21  Tom Tromey  <tom@tromey.com>
4418
4419         * ada-lang.c (ada_exception_message_1, ada_exception_message):
4420         Return unique_xmalloc_ptr.
4421         (print_it_exception): Update.
4422
4423 2018-05-21  Tom Tromey  <tom@tromey.com>
4424
4425         * tracepoint.c (trace_dump_actions): Use std::string.
4426
4427 2018-05-21  Tom Tromey  <tom@tromey.com>
4428
4429         * symfile.c (reread_symbols): Use std::string for original_name.
4430
4431 2018-05-21  Tom Tromey  <tom@tromey.com>
4432
4433         * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
4434         (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN.  Default
4435         constructor.
4436
4437 2018-05-20  Simon Marchi  <simon.marchi@polymtl.ca>
4438
4439         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
4440         instance to...
4441         (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
4442         * objfiles.c (get_objfile_bfd_data): Allocate
4443         objfile_per_bfd_storage with obstack_new when allocating on
4444         obstack.
4445
4446 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
4447
4448         * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
4449         OBSTACK_ZALLOC.
4450         * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
4451         * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
4452         * mdebugread.c (mdebug_build_psymtabs): Likewise.
4453         (add_pending): Likewise.
4454         (parse_symbol): Likewise.
4455         (parse_partial_symbols): Likewise.
4456         (psymtab_to_symtab_1): Likewise.
4457         (new_psymtab): Likewise.
4458         (elfmdebug_build_psymtabs): Likewise.
4459         * minsyms.c (terminate_minimal_symbol_table): Likewise.
4460         * objfiles.c (get_objfile_bfd_data): Likewise.
4461         (objfile_register_static_link): Likewise.
4462         * psymtab.c (allocate_psymtab): Likewise.
4463         * stabsread.c (read_member_functions): Likewise.
4464         * xcoffread.c (xcoff_end_psymtab): Likewise.
4465
4466 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
4467
4468         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
4469         compiler supports std::is_trivially_constructible.
4470         * common/poison.h: Include obstack.h.
4471         (IsMallocable): Define to is_trivially_constructible if the
4472         compiler supports it, define to true_type otherwise.
4473         (xobnew): New.
4474         (XOBNEW): Redefine.
4475         (xobnewvec): New.
4476         (XOBNEWVEC): Redefine.
4477         * gdb_obstack.h (obstack_zalloc): New.
4478         (OBSTACK_ZALLOC): Redefine.
4479         (obstack_calloc): New.
4480         (OBSTACK_CALLOC): Redefine.
4481         (obstack_new): New.
4482         * gdbarch.sh: Include gdb_obstack in gdbarch.h.
4483         (gdbarch_obstack): New declaration in gdbarch.h, definition in
4484         gdbarch.c.
4485         (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
4486         obstack_calloc/obstack_zalloc.
4487         (gdbarch_obstack_zalloc): Remove.
4488         * target-descriptions.c (tdesc_data_init): Use obstack_new.
4489
4490 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4491
4492         * stack.c (backtrace_command_1): Remove useless variable int i.
4493
4494 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4495
4496         * stack.c (print_frame_info): Fix comment.
4497
4498 2018-05-18  Tom Tromey  <tom@tromey.com>
4499
4500         * dwarf2read.c (struct dwz_file): Add constructor, initializers.
4501         <dwz_bfd>: Now a gdb_bfd_ref_ptr.
4502         (~dwarf2_per_objfile): Update
4503         (dwarf2_get_dwz_file): Use new.
4504         * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
4505         unique_ptr.
4506
4507 2018-05-18  Tom Tromey  <tom@tromey.com>
4508
4509         * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
4510         unique_ptr.
4511         * dwarf2read.c (struct dwp_file): Add constructor and
4512         initializers.
4513         (open_and_init_dwp_file): Return a unique_ptr.
4514         (dwarf2_per_objfile, create_dwp_hash_table)
4515         (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
4516         (lookup_dwo_unit_in_dwp): Update.
4517         (open_and_init_dwp_file, get_dwp_file): Update.
4518
4519 2018-05-18  Tom Tromey  <tom@tromey.com>
4520
4521         * dwarf2read.c (dwarf2_per_objfile): Update.
4522         (struct mapped_index): Add initializers.
4523         (dwarf2_read_index): Use new.
4524         (dw2_symtab_iter_init): Update.
4525         * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
4526         unique_ptr.
4527
4528 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
4529
4530         * dwarf2read.c (mapped_index) <total_size>: Remove.
4531
4532 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
4533
4534         * unittests/format_pieces-selftests.c (test_format_specifier):
4535         Add ARI comments.
4536
4537 2018-05-18  Tom Tromey  <tom@tromey.com>
4538
4539         * c-typeprint.c (maybe_print_hole): New function.
4540         (c_print_type_struct_field_offset): Update.
4541         (c_type_print_base_struct_union): Call maybe_print_hole.
4542
4543 2018-05-17  Keith Seitz  <keiths@redhat.com>
4544
4545         * breakpoint.c (build_bpstat_chain): New function, moved from
4546         bpstat_stop_status.
4547         (bpstat_stop_status): Add optional parameter, `stop_chain'.
4548         If no stop chain is passed, call build_bpstat_chain to build it.
4549         * breakpoint.h (build_bpstat_chain): Declare.
4550         (bpstat_stop_status): Move documentation here from breakpoint.c.
4551         * infrun.c (handle_signal_stop): Before eliding inlined frames,
4552         build the stop chain and pass it to skip_inline_frames.
4553         Pass this stop chain to bpstat_stop_status.
4554         * inline-frame.c: Include breakpoint.h.
4555         (stopped_by_user_bp_inline_frame): New function.
4556         (skip_inline_frames): Add parameter `stop_chain'.
4557         Move documention to inline-frame.h.
4558         If non-NULL, use stopped_by_user_bp_inline_frame to determine
4559         whether the frame should be elided.
4560         * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
4561         Add moved documentation and update for new parameter.
4562
4563 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
4564
4565         PR cli/14975
4566         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4567         unittests/format_pieces-selftests.c.
4568         * common/format.h (format_piece) <operator==>: New.
4569         (format_pieces) <operator[]>: Remove.
4570         * common/format.c (format_pieces::format_pieces): Handle \e.
4571         * unittests/format_pieces-selftests.c: New.
4572
4573 2018-05-17  Tom Tromey  <tom@tromey.com>
4574
4575         PR symtab/23010:
4576         * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
4577         (dw2_instantiate_symtab): Add skip_partial parameter.
4578         (dw2_find_last_source_symtab, dw2_map_expand_apply)
4579         (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
4580         (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
4581         (dw2_expand_symtabs_matching_one)
4582         (dw2_find_pc_sect_compunit_symtab)
4583         (dw2_debug_names_lookup_symbol)
4584         (dw2_debug_names_expand_symtabs_for_function): Update.
4585         (init_cutu_and_read_dies): Add skip_partial parameter.
4586         (process_psymtab_comp_unit, build_type_psymtabs_1)
4587         (process_skeletonless_type_unit, load_partial_comp_unit)
4588         (psymtab_to_symtab_1): Update.
4589         (load_full_comp_unit): Add skip_partial parameter.
4590         (process_imported_unit_die, dwarf2_read_addr_index)
4591         (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
4592         (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
4593         (read_signatured_type): Update.
4594
4595 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
4596
4597         * value.c (release_value): Remove unused variable.
4598         (record_latest_value): Likewise.
4599         (access_value_history): Likewise.
4600         (preserve_values): Likewise.
4601
4602 2018-05-17  Tom Tromey  <tom@tromey.com>
4603
4604         * extension.h (struct ext_lang_type_printers) <py_type_printers>:
4605         Initialize.
4606
4607 2018-05-16  Maciej W. Rozycki  <macro@mips.com>
4608
4609         PR gdb/22286
4610         * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
4611         Also handle registers whose width is not a multiple of
4612         PTRACE_TYPE_RET.
4613         (linux_nat_trad_target::store_register): Likewise.
4614
4615 2018-05-16  Tom Tromey  <tom@tromey.com>
4616
4617         * gdbcore.h (core_bfd): Redefine.
4618         * corelow.c (core_target::close): Update.
4619         (core_target_open): Update.
4620         * progspace.h (struct program_space) <cbfd>: Now a
4621         gdb_bfd_ref_ptr.
4622
4623 2018-05-16  Tom Tromey  <tom@tromey.com>
4624
4625         PR cli/19551:
4626         * symfile-add-flags.h (enum symfile_add_flags)
4627         <SYMFILE_NOT_FILENAME>: New constant.
4628         * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME.  Get
4629         objfile name from BFD.
4630         (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
4631         * minidebug.c (find_separate_debug_file_in_section): Put
4632         ".gnu_debugdata" into BFD's file name.
4633
4634 2018-05-16  Simon Marchi  <simon.marchi@ericsson.com>
4635
4636         * regcache.c (regcache_read_ftype, regcache_write_ftype):
4637         Remove.
4638
4639 2018-05-15  Tamar Christina  <tamar.christina@arm.com>
4640
4641         PR binutils/21446
4642         * aarch64-tdep.c (aarch64_analyze_prologue,
4643         aarch64_software_single_step, aarch64_displaced_step_copy_insn):
4644         Indicate not interested in errors.
4645
4646 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
4647
4648         * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
4649         Supply the MIPS_ZERO_REGNUM register.
4650
4651 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
4652
4653         * mips-tdep.c (mask_address_var): Make variable static.
4654
4655 2018-05-14  Tom Tromey  <tom@tromey.com>
4656
4657         * dwarf2read.c (rust_union_quirks): Clear rust_unions.
4658
4659 2018-05-11  Andrew Burgess  <andrew.burgess@embecosm.com>
4660
4661         * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
4662         FXSAVE_ADDR for the mxcsr register.
4663
4664 2018-05-11  Max Filippov  <jcmvbkbc@gmail.com>
4665
4666         * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
4667
4668 2018-05-11  Pedro Alves  <palves@redhat.com>
4669
4670         * corelow.c (core_target) <core_target>: No longer inline.
4671         Initialize m_core_gdbarch, m_core_vec and build the section table
4672         here.
4673         <~core_target>: New.
4674         <core_gdbarch, get_core_register_section>: New methods.
4675         <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
4676         factored out from ...
4677         <core_data, core_vec, core_gdbarch>: ... these deleted globals.
4678         (core_ops): Delete.
4679         (sniff_core_bfd): Add gdbarch parameter.
4680         (core_close): Delete, merged into ...
4681         (core_target::close): ... here.  Delete self.
4682         (core_close_cleanup): Delete.
4683         (core_target_open): Allocate a core_target on the heap.  Use a
4684         unique_ptr instead of a cleanup.  Bits moved into the core_target
4685         ctor.  Adjust to use core_target methods instead of globals.
4686         (get_core_register_section): Rename to ...
4687         (core_target::get_core_register_section): ... this and adjust.
4688         (struct get_core_registers_cb_data): New.
4689         (get_core_registers_cb): Use it.  Use bool.
4690         (core_target::fetch_registers, core_target::files_info)
4691         (core_target::xfer_partial, core_target::read_description)
4692         (core_target::pid_to, core_target::thread_name): Adjust to
4693         reference class fields instead of globals.
4694         * target.h (struct target_ops_deleter, target_ops_up): New.
4695
4696 2018-05-11  Pedro Alves  <palves@redhat.com>
4697
4698         * corefile.c (core_file_command): Move to corelow.c.
4699         * corelow.c (the_core_target): Delete.
4700         (core_file_command): Moved from corefile.c.  Check exec_bfd
4701         instead of the_core_target.  Use target_detach instead of calling
4702         into the_core_target directly.
4703         (maybe_say_no_core_file_now): New.
4704         (core_target::detach): Use it.
4705         (_initialize_corelow): Remove references to the_core_target.
4706         * gdbcore.h (the_core_target): Delete.
4707
4708 2018-05-11  Tom Tromey  <tromey@redhat.com>
4709             Pedro Alves  <palves@redhat.com>
4710
4711         * corefile.c (core_bfd): Remove.
4712         * gdbcore.h (core_bfd): Now a macro.
4713         * progspace.h (struct program_space) <cbfd>: New field.
4714
4715 2018-05-11  Tom Tromey  <tom@tromey.com>
4716
4717         * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
4718         gdb::def_vector.
4719
4720 2018-05-10  Tom Tromey  <tom@tromey.com>
4721
4722         * configure: Rebuild.
4723         * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
4724
4725 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
4726
4727         PR server/23158:
4728         * regformats/regdat.sh: Adjust script, following the addition
4729         of the new expedite_regs parameter to init_target_desc.
4730
4731 2018-05-10  Omair Javaid  <omair.javaid@linaro.org>
4732     
4733         PR gdb/23127
4734         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
4735         set_gdbarch_significant_addr_bit.
4736         * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
4737         set_gdbarch_significant_addr_bit.
4738         * utils.c (address_significant): Update to sign extend addr.
4739
4740 2018-05-09  Max Filippov  <jcmvbkbc@gmail.com>
4741
4742         * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
4743         (xtensa_linux_init_abi): Limit tdep->num_regs by
4744         tdep->num_nopriv_regs.
4745         * xtensa-tdep.c (xtensa_derive_tdep): Calculate
4746         tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
4747         not initialized.
4748
4749 2018-05-08  Simon Marchi  <simon.marchi@ericsson.com>
4750
4751         * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
4752
4753 2018-05-08  Andrew Burgess  <andrew.burgess@embecosm.com>
4754
4755         * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
4756         (I387_MXCSR_INIT_VAL): New constant.
4757         * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
4758         buffer if it was supplied by the inferior.
4759         * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
4760         (i387_xsave_get_clear_bv): New function.
4761         (i387_supply_xsave): Only read x87 control registers from the
4762         xsave buffer if the feature is enabled, and the state will have
4763         been written, otherwise, provide a suitable default.
4764         (i387_collect_xsave): Pre-clear all registers in xsave buffer,
4765         including x87 control registers.  Update control registers if they
4766         have changed from the default value, and mark features as enabled
4767         as required.
4768         * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
4769
4770 2018-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
4771
4772         * spu-tdep.c (info_spu_event_command): Fix output formatting.
4773
4774 2018-05-07  Tom Tromey  <tom@tromey.com>
4775
4776         * configure: Rebuild.
4777         * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
4778
4779 2018-05-07  Tom Tromey  <tom@tromey.com>
4780
4781         PR tdep/20362:
4782         * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
4783         bit.  Use correct value for VDIV.
4784
4785 2018-05-04  Tom Tromey  <tom@tromey.com>
4786
4787         * configure: Rebuild.
4788         * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
4789
4790 2018-05-04  Tom Tromey  <tom@tromey.com>
4791
4792         * linux-record.c (record_linux_system_call) <case
4793         RECORD_SYS_RECVFROM>: Add "break".
4794
4795 2018-05-04  Tom Tromey  <tom@tromey.com>
4796
4797         * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
4798         Add missing "break".
4799         * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
4800         Add missing "break".
4801
4802 2018-05-04  Tom Tromey  <tom@tromey.com>
4803
4804         * rs6000-tdep.c (ppc_process_record_op4)
4805         (ppc_process_record_op63): Add fall-through comment.
4806
4807 2018-05-04  Tom Tromey  <tom@tromey.com>
4808
4809         * i386-tdep.c (i386_process_record): Add fall-through comment.
4810
4811 2018-05-04  Tom Tromey  <tom@tromey.com>
4812
4813         * stabsread.c (define_symbol) <case 'p'>: Add fall-through
4814         comment.
4815
4816 2018-05-04  Tom Tromey  <tom@tromey.com>
4817
4818         * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
4819         * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
4820         * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
4821         comment.
4822         * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
4823         comment.
4824         * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
4825         comment.
4826
4827 2018-05-04  Tom Tromey  <tom@tromey.com>
4828
4829         * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
4830
4831 2018-05-04  Tom Tromey  <tom@tromey.com>
4832
4833         * s390-tdep.c (s390_process_record): Fix fall-through comments.
4834         * xcoffread.c (scan_xcoff_symtab): Move comment later.
4835         * symfile.c (section_is_mapped): Fix fall-through comment.
4836         * stabsread.c (define_symbol, read_member_functions): Fix
4837         fall-through comment.
4838         * s390-linux-tdep.c (s390_process_record): Fix fall-through
4839         comment.
4840         * remote.c (remote_wait_as): Fix fall-through comment.
4841         * p-exp.y (yylex): Fix fall-through comment.
4842         * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
4843         comment.
4844         * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
4845         * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
4846         * jv-exp.y (yylex): Fix fall-through comment.
4847         * go-exp.y (lex_one_token): Fix fall-through comment.
4848         * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
4849         fall-through comment.
4850         * f-exp.y (yylex): Fix fall-through comment.
4851         * dwarf2read.c (process_die): Fix fall-through comments.
4852         * dbxread.c (process_one_symbol): Fix fall-through comment.
4853         * d-exp.y (lex_one_token): Fix fall-through comment.
4854         * cp-name-parser.y (yylex): Fix fall-through comment.
4855         * coffread.c (coff_symtab_read): Fix fall-through comment.
4856         * c-exp.y (lex_one_token): Fix fall-through comment.
4857         * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
4858         comment.
4859         * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
4860         comment.
4861
4862 2018-05-04  Tom Tromey  <tom@tromey.com>
4863
4864         PR python/22730:
4865         * NEWS: Mention gdb.execute change.
4866         * gdbcmd.h (execute_control_command): Don't declare.
4867         * python/python.c (execute_gdb_command): Use read_command_lines_1,
4868         execute_control_commands, execute_control_commands_to_string.
4869         * cli/cli-script.h (execute_control_commands)
4870         (execute_control_commands_to_string): Declare.
4871         (execute_control_command): Add from_tty parameter.
4872         * cli/cli-script.c (execute_control_commands)
4873         (execute_control_commands_to_string): New functions.
4874         (execute_user_command): Use execute_control_commands.
4875         (execute_control_command_1): Add "from_tty" parameter.  Update.
4876         (execute_control_command): Likewise.
4877
4878 2018-05-04  Tom Tromey  <tom@tromey.com>
4879
4880         PR python/22731:
4881         * NEWS: Mention that breakpoint commands are writable.
4882         * python/py-breakpoint.c (bppy_set_commands): New function.
4883         (breakpoint_object_getset) <"commands">: Use it.
4884
4885 2018-05-04  Tom Tromey  <tom@tromey.com>
4886
4887         * tracepoint.c (actions_command): Update.
4888         * mi/mi-cmd-break.c (mi_command_line_array)
4889         (mi_command_line_array_cnt, mi_command_line_array_ptr)
4890         (mi_read_next_line): Remove.
4891         (mi_cmd_break_commands): Update.
4892         * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
4893         function_view.
4894         * cli/cli-script.c (get_command_line): Update.
4895         (process_next_line): Use function_view.  Constify.
4896         (recurse_read_control_structure, read_command_lines)
4897         (read_command_lines_1): Change argument types to function_view.
4898         (do_define_command, document_command): Update.
4899         * breakpoint.h (check_tracepoint_command): Don't declare.
4900         * breakpoint.c (check_tracepoint_command): Remove.
4901         (commands_command_1, create_tracepoint_from_upload): Update.
4902
4903 2018-05-04  Tom Tromey  <tom@tromey.com>
4904
4905         PR gdb/11750:
4906         * cli/cli-script.h (enum command_control_type) <define_control>:
4907         New constant.
4908         * cli/cli-script.c (multi_line_command_p): Handle define_control.
4909         (build_command_line, execute_control_command_1)
4910         (process_next_line): Likewise.
4911         (do_define_command): New function, extracted from define_command.
4912         (define_command): Use it.
4913
4914 2018-05-04  Tom Tromey  <tom@tromey.com>
4915
4916         * tracepoint.c (actions_command): Update.
4917         * cli/cli-script.h (read_command_lines): Update.
4918         * cli/cli-script.c (read_command_lines): Constify prompt_arg.
4919         (MAX_TMPBUF): Remove define.
4920         (define_command): Use string_printf.
4921         (document_command): Likewise.
4922         * breakpoint.c (commands_command_1): Update.
4923
4924 2018-05-04  Tom Tromey  <tom@tromey.com>
4925
4926         * top.c (execute_command): Update.
4927         * cli/cli-script.h (print_command_lines): Now varargs.
4928         * cli/cli-script.c (print_command_lines): Now varargs.
4929         (execute_control_command_1) <case while_control, case if_control>:
4930         Update.
4931
4932 2018-05-04  Tom Tromey  <tom@tromey.com>
4933
4934         * tracepoint.c (all_tracepoint_actions): Rename from
4935         all_tracepoint_actions_and_cleanup.  Change return type.
4936         (actions_command, encode_actions_1, encode_actions)
4937         (trace_dump_actions, tdump_command): Update.
4938         * remote.c (remote_download_command_source): Update.
4939         * python/python.c (gdbpy_eval_from_control_command)
4940         (python_command, python_interactive_command): Update.
4941         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
4942         * guile/guile.c (guile_command)
4943         (gdbscm_eval_from_control_command, guile_command): Update.
4944         * compile/compile.c (compile_code_command)
4945         (compile_print_command, compile_to_object): Update.
4946         * cli/cli-script.h (struct command_lines_deleter): New.
4947         (counted_command_line): New typedef.
4948         (struct command_line): Add constructor, destructor.
4949         <body_list>: Remove.
4950         <body_list_0, body_list_1>: New members.
4951         (command_line_up): Remove typedef.
4952         (read_command_lines, read_command_lines_1, get_command_line):
4953         Update.
4954         (copy_command_lines): Don't declare.
4955         * cli/cli-script.c (build_command_line): Use "new".
4956         (get_command_line): Return counted_command_line.
4957         (print_command_lines, execute_user_command)
4958         (execute_control_command_1, while_command, if_command): Update.
4959         (realloc_body_list): Remove.
4960         (process_next_line, recurse_read_control_structure): Update.
4961         (read_command_lines, read_command_lines_1): Return counted_command_line.
4962         (free_command_lines): Use "delete".
4963         (copy_command_lines): Remove.
4964         (define_command, document_command, show_user_1): Update.
4965         * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
4966         a counted_command_line.
4967         * breakpoint.h (counted_command_line): Remove typedef.
4968         (breakpoint_set_commands): Update.
4969         * breakpoint.c (check_no_tracepoint_commands)
4970         (validate_commands_for_breakpoint): Update.
4971         (breakpoint_set_commands): Change commands to be a
4972         counted_command_line.
4973         (commands_command_1, update_dprintf_command_list)
4974         (create_tracepoint_from_upload): Update.
4975
4976 2018-05-04  Tom Tromey  <tom@tromey.com>
4977
4978         * cli/cli-decode.h (cmd_list_element): New constructor.
4979         (~cmd_list_element): New destructor.
4980         (struct cmd_list_element): Add initializers.
4981         * cli/cli-decode.c (do_add_cmd): Use "new".
4982         (delete_cmd): Use "delete".
4983
4984 2018-05-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
4985             Pedro Alves <palves@redhat.com>
4986
4987         PR breakpoints/19806 and support for PR external/20207.
4988         * NEWS: Mention Aarch64 watchpoint improvements.
4989         * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
4990         watchpoints and PR external/20207 watchpoints.
4991         * nat/aarch64-linux-hw-point.c
4992         (kernel_supports_any_contiguous_range): New.
4993         (aarch64_watchpoint_offset): New.
4994         (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
4995         (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
4996         (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
4997         (aarch64_align_watchpoint): New parameters aligned_offset_p and
4998         next_addr_orig_p.  Support PR external/20207 watchpoints.
4999         (aarch64_downgrade_regs): New.
5000         (aarch64_dr_state_insert_one_point): New parameters offset and
5001         addr_orig.
5002         (aarch64_dr_state_remove_one_point): Likewise.
5003         (aarch64_handle_breakpoint): Update caller.
5004         (aarch64_handle_aligned_watchpoint): Likewise.
5005         (aarch64_handle_unaligned_watchpoint): Support addr_orig and
5006         aligned_offset.
5007         (aarch64_linux_set_debug_regs): Remove const from state.  Call
5008         aarch64_downgrade_regs.
5009         (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
5010         * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
5011         (DR_CONTROL_MASK): ... this.
5012         (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
5013         (unsigned int aarch64_watchpoint_offset): New prototype.
5014         (aarch64_linux_set_debug_regs): Remove const from state.
5015         * utils.c (align_up, align_down): Move to ...
5016         * common/common-utils.c (align_up, align_down): ... here.
5017         * utils.h (align_up, align_down): Move to ...
5018         * common/common-utils.h (align_up, align_down): ... here.
5019
5020 2018-05-04  Joel Brobecker  <brobecker@adacore.com>
5021
5022         * sparc-tdep.c (sparc_structure_return_p): Re-implement to
5023         match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
5024         (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
5025         Re-implement to match the ABI as summarized in GCC's
5026         gcc/config/sparc/sparc.c.  All callers updated.
5027         (sparc32_store_arguments): Remove assertion.
5028
5029 2018-05-04  Tom Tromey  <tom@tromey.com>
5030
5031         * printcmd.c: Don't include tui.h.
5032         (decode_format): Use skip_spaces.
5033
5034 2018-05-04  Tom Tromey  <tom@tromey.com>
5035
5036         PR gdb/22619:
5037         * printcmd.c (last_count): New global.
5038         (x_command): Use saved count when repeating.
5039
5040 2018-05-04  Tom Tromey  <tom@tromey.com>
5041
5042         * nto-procfs.c (do_closedir_cleanup): Remove.
5043         (procfs_pidlist): Use gdb_dir_up.
5044         * procfs.c (do_closedir_cleanup): Remove.
5045         (proc_update_threads): Use gdb_dir_up.
5046         * common/filestuff.h (struct gdb_dir_deleter): New.
5047         (gdb_dir_up): New typedef.
5048
5049 2018-05-04  Tom Tromey  <tom@tromey.com>
5050
5051         * ada-lang.c (print_mention_exception): Use std::string.
5052
5053 2018-05-04  Tom Tromey  <tom@tromey.com>
5054
5055         * ada-lang.c (create_excep_cond_exprs): Update.
5056         (ada_exception_catchpoint_cond_string): Use std::string.
5057
5058 2018-05-04  Tom Tromey  <tom@tromey.com>
5059
5060         * ada-lang.c (xget_renaming_scope): Return std::string.
5061         (old_renaming_is_invisible): Update.
5062
5063 2018-05-04  Tom Tromey  <tom@tromey.com>
5064
5065         * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
5066         (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
5067
5068 2018-05-04  Ulrich Weigand  <uweigand@de.ibm.com>
5069
5070         * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
5071
5072 2018-05-04  Tom Tromey  <tom@tromey.com>
5073
5074         * remote.c (remote_query_supported_append): Change type.
5075         (remote_check_symbols): Update.
5076
5077 2018-05-04  Paul Pluzhnikov  <ppluzhnikov@google.com>
5078
5079         PR gdb/11420
5080         * configure.ac: Prepend libpython.
5081         * python/python-config.py: Likewise.
5082         * configure: Regenerate.
5083
5084 2018-05-03  Simon Marchi  <simon.marchi@ericsson.com>
5085
5086         * Makefile.in (%.c: %.l): Use -t instead of --stdout.
5087
5088 2018-05-03  Pedro Alves  <palves@redhat.com>
5089
5090         * s390-linux-nat.c
5091         (s390_linux_nat_target::have_continuable_watchpoint): Mark with
5092         override.  Write 'true' instead of '1'.
5093         (s390_linux_nat_target::watchpoint_addr_within_range): Remove
5094         declaration.
5095
5096 2018-05-02  Pedro Alves  <palves@redhat.com>
5097
5098         * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
5099         add_inf_child_target.
5100         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
5101         add_inf_child_target.
5102         * aix-thread.c (aix_thread_target_info): New.
5103         (aix_thread_target) <shortname, longname, doc>: Delete.
5104         <info>: New.
5105         * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
5106         add_inf_child_target.
5107         * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
5108         add_inf_child_target.
5109         * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
5110         add_inf_child_target.
5111         * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
5112         add_inf_child_target.
5113         * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
5114         add_inf_child_target.
5115         * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
5116         add_inf_child_target.
5117         * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
5118         add_inf_child_target.
5119         * arm-linux-nat.c (_initialize_arm_linux_nat): Use
5120         add_inf_child_target.
5121         * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
5122         add_inf_child_target.
5123         * bfd-target.c (target_bfd_target_info): New.
5124         (target_bfd) <shortname, longname, doc>: Delete.
5125         <info>: New.
5126         * bsd-kvm.c (bsd_kvm_target_info): New.
5127         (bsd_kvm_target) <shortname, longname, doc>: Delete.
5128         <info>: New.
5129         (bsd_kvm_target::open): Rename to ...
5130         (bsd_kvm_target_open): ... this.  Adjust.
5131         * bsd-uthread.c (bsd_uthread_target_info): New.
5132         (bsd_uthread_target) <shortname, longname, doc>: Delete.
5133         <info>: New.
5134         * corefile.c (core_file_command): Adjust.
5135         * corelow.c (core_target_info): New.
5136         (core_target) <shortname, longname, doc>: Delete.
5137         <info>: New.
5138         (core_target::open): Rename to ...
5139         (core_target_open): ... this.  Adjust.
5140         * ctf.c (ctf_target_info): New.
5141         (ctf_target) <shortname, longname, doc>: Delete.
5142         <info>: New.
5143         (ctf_target::open): Rename to ...
5144         (ctf_target_open): ... this.
5145         (_initialize_ctf): Adjust.
5146         * exec.c (exec_target_info): New.
5147         (exec_target) <shortname, longname, doc>: Delete.
5148         <info>: New.
5149         (exec_target::open): Rename to ...
5150         (exec_target_open): ... this.
5151         * gdbcore.h (core_target_open): Declare.
5152         * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
5153         * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
5154         add_inf_child_target.
5155         * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
5156         add_inf_child_target.
5157         * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
5158         add_inf_child_target.
5159         * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
5160         add_inf_child_target.
5161         * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
5162         add_inf_child_target.
5163         * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
5164         add_inf_child_target.
5165         * i386-linux-nat.c (_initialize_i386_linux_nat): Use
5166         add_inf_child_target.
5167         * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
5168         add_inf_child_target.
5169         * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
5170         add_inf_child_target.
5171         * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
5172         add_inf_child_target.
5173         * inf-child.c (inf_child_target_info): New.
5174         (inf_child_target::info): New.
5175         (inf_child_open_target): Remove 'target' parameter.  Use
5176         get_native_target instead.
5177         (inf_child_target::open): Delete.
5178         (add_inf_child_target): New.
5179         * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
5180         Delete.
5181         <info>: New.
5182         (add_inf_child_target): Declare.
5183         (inf_child_open_target): Declare.
5184         * linux-thread-db.c (thread_db_target_info): New.
5185         (thread_db_target) <shortname, longname, doc>: Delete.
5186         <info>: New.
5187         * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
5188         add_inf_child_target.
5189         * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
5190         add_inf_child_target.
5191         * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
5192         add_inf_child_target.
5193         * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
5194         add_inf_child_target.
5195         * make-target-delegates (print_class): Adjust.
5196         * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
5197         add_inf_child_target.
5198         * mips-linux-nat.c (_initialize_mips_linux_nat): Use
5199         add_inf_child_target.
5200         * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
5201         add_inf_child_target.
5202         * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
5203         add_inf_child_target.
5204         * nto-procfs.c (nto_native_target_info): New.
5205         (nto_procfs_target_native) <shortname, longname, doc>:
5206         Delete.
5207         <info>: New.
5208         (nto_procfs_target_info): New.
5209         (nto_procfs_target_procfs) <shortname, longname, doc>:
5210         Delete.
5211         <info>: New.
5212         (init_procfs_targets): Adjust.
5213         * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
5214         add_inf_child_target.
5215         * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
5216         add_inf_child_target.
5217         * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
5218         add_inf_child_target.
5219         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
5220         add_inf_child_target.
5221         * ravenscar-thread.c (ravenscar_target_info): New.
5222         (ravenscar_thread_target) <shortname, longname, doc>:
5223         Delete.
5224         <info>: New.
5225         * record-btrace.c (record_btrace_target_info):
5226         (record_btrace_target) <shortname, longname, doc>: Delete.
5227         <info>: New.
5228         (record_btrace_target::open): Rename to ...
5229         (record_btrace_target_open): ... this.  Adjust.
5230         * record-full.c (record_longname, record_doc): New.
5231         (record_full_base_target) <shortname, longname, doc>: Delete.
5232         <info>: New.
5233         (record_full_target_info): New.
5234         (record_full_target): <shortname>: Delete.
5235         <info>: New.
5236         (record_full_core_open_1, record_full_open_1): Update comments.
5237         (record_full_base_target::open): Rename to ...
5238         (record_full_open): ... this.
5239         (cmd_record_full_restore): Update.
5240         (_initialize_record_full): Update.
5241         * remote-sim.c (remote_sim_target_info): New.
5242         (gdbsim_target) <shortname, longname, doc>: Delete.
5243         <info>: New.
5244         (gdbsim_target::open): Rename to ...
5245         (gdbsim_target_open): ... this.
5246         (_initialize_remote_sim): Adjust.
5247         * remote.c (remote_doc): New.
5248         (remote_target_info): New.
5249         (remote_target) <shortname, longname, doc>: Delete.
5250         <info>: New.
5251         (extended_remote_target_info): New.
5252         (extended_remote_target) <shortname, longname, doc>: Delete.
5253         <info>: New.
5254         (remote_target::open_1): Make static.  Adjust.
5255         * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
5256         * s390-linux-nat.c (_initialize_s390_nat): Use
5257         add_inf_child_target.
5258         * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
5259         add_inf_child_target.
5260         * sol-thread.c (thread_db_target_info): New.
5261         (sol_thread_target) <shortname, longname, doc>: Delete.
5262         <info>: New.
5263         * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
5264         add_inf_child_target.
5265         * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
5266         add_inf_child_target.
5267         * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
5268         add_inf_child_target.
5269         * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
5270         add_inf_child_target.
5271         * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
5272         add_inf_child_target.
5273         * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
5274         add_inf_child_target.
5275         * spu-linux-nat.c (_initialize_spu_nat): Use
5276         add_inf_child_target.
5277         * spu-multiarch.c (spu_multiarch_target_info): New.
5278         (spu_multiarch_target) <shortname, longname, doc>: Delete.
5279         <info>: New.
5280         * target-delegates.c: Regenerate.
5281         * target.c: Include <unordered_map>.
5282         (target_ops_p): Delete.
5283         (DEF_VEC_P(target_ops_p)): Delete.
5284         (target_factories): New.
5285         (test_target_info): New.
5286         (test_target_ops::info): New.
5287         (open_target): Adjust to use target_factories.
5288         (add_target_with_completer): Rename to ...
5289         (add_target): ... this.  Change prototype.  Register target_info
5290         and open callback in target_factories.  Register target_info in
5291         command context instead of target_ops.
5292         (add_target): Delete old implementation.
5293         (add_deprecated_target_alias): Change prototype.  Adjust.
5294         (the_native_target): New.
5295         (set_native_target, get_native_target): New.
5296         (find_default_run_target): Use the_native_target.
5297         (find_attach_target, find_run_target): Simplify.
5298         (target_ops::open): Delete.
5299         (dummy_target_info): New.
5300         (dummy_target::shortname, dummy_target::longname)
5301         (dummy_target::doc): Delete.
5302         (dummy_target::info): New.
5303         (debug_target::shortname, debug_target::longname)
5304         (debug_target::doc): Delete.
5305         (debug_target::info): New.
5306         * target.h (struct target_info): New.
5307         (target_ops::~target_ops): Add comment.
5308         (target_ops::info): New.
5309         (target_ops::shortname, target_ops::longname, target_ops::doc): No
5310         longer virtual.  Implement in terms of target_info.
5311         (set_native_target, get_native_target): Declare.
5312         (target_open_ftype): New.
5313         (add_target, add_target_with_completer)
5314         (add_deprecated_target_alias): Change prototype.
5315         (test_target) <shortname, longname, doc>: Delete.
5316         <info>: New.
5317         * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
5318         add_inf_child_target.
5319         * tracefile-tfile.c (tfile_target_info): New.
5320         (tfile_target) <shortname, longname, doc>: Delete.
5321         <info>: New.
5322         (tfile_target::open): Rename to ...
5323         (tfile_target_open): ... this.
5324         (_initialize_tracefile_tfile): Adjust.
5325         * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
5326         add_inf_child_target.
5327         * windows-nat.c (_initialize_windows_nat): Use
5328         add_inf_child_target.
5329         * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
5330         add_inf_child_target.
5331
5332 2018-05-02  Pedro Alves  <palves@redhat.com>
5333
5334         * linux-nat.h (linux_nat_target) <low_new_thread,
5335         low_delete_thread, low_new_fork, low_forget_process,
5336         low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
5337         New virtual methods.
5338         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
5339         (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
5340         (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
5341         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
5342         (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
5343         Delete.
5344         * linux-fork.c (delete_fork): Adjust to call low method.
5345         * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
5346         (linux_nat_new_fork, linux_nat_forget_process_hook)
5347         (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
5348         (linux_nat_status_is_event):
5349         (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
5350         (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
5351         to call low method.
5352         (sigtrap_is_event): Rename to ...
5353         (linux_nat_target::low_status_is_event): ... this.
5354         (linux_nat_set_status_is_event): Delete.
5355         (save_stop_reason, linux_nat_wait_1)
5356         (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
5357         low methods.
5358         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
5359         (linux_nat_set_new_fork, linux_nat_set_forget_process)
5360         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
5361         (linux_nat_set_prepare_to_resume): Delete.
5362         * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
5363         low virtual methods.
5364         * amd64-linux-nat.c: Likewise.
5365         * arm-linux-nat.c: Likewise.
5366         * i386-linux-nat.c: Likewise.
5367         * ia64-linux-nat.c: Likewise.
5368         * mips-linux-nat.c: Likewise.
5369         * ppc-linux-nat.c: Likewise.
5370         * s390-linux-nat.c: Likewise.
5371         * sparc64-linux-nat.c: Likewise.
5372         * x86-linux-nat.c: Likewise.
5373         * x86-linux-nat.h: Include "nat/x86-linux.h".
5374         (x86_linux_nat_target) <low_new_fork, low_forget_process,
5375         low_prepare_to_resume, low_new_thread, low_delete_thread>:
5376         Override methods.
5377
5378 2018-05-02  Pedro Alves  <palves@redhat.com>
5379
5380         * target.h (target_ops)
5381         <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
5382         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
5383         stopped_by_watchpoint, have_continuable_watchpoint,
5384         stopped_data_address, watchpoint_addr_within_range,
5385         can_accel_watchpoint_condition, can_run, thread_alive,
5386         has_all_memory, has_memory, has_stack, has_registers,
5387         has_execution, can_async_p, is_async_p, supports_non_stop,
5388         always_non_stop_p, can_execute_reverse, supports_multi_process,
5389         supports_enable_disable_tracepoint,
5390         supports_disable_randomization, supports_string_tracing,
5391         supports_evaluation_of_breakpoint_conditions,
5392         can_run_breakpoint_commands, filesystem_is_local,
5393         can_download_tracepoint, get_trace_state_variable_value,
5394         set_trace_notes, get_tib_address, use_agent, can_use_agent,
5395         record_is_replaying, record_will_replay,
5396         augmented_libraries_svr4_read>: Adjust to return bool.
5397         * aarch64-linux-nat.c: All implementations adjusted.
5398         * aix-thread.c: All implementations adjusted.
5399         * arm-linux-nat.c: All implementations adjusted.
5400         * breakpoint.c: All implementations adjusted.
5401         * bsd-kvm.c: All implementations adjusted.
5402         * bsd-uthread.c: All implementations adjusted.
5403         * corelow.c: All implementations adjusted.
5404         * ctf.c: All implementations adjusted.
5405         * darwin-nat.c: All implementations adjusted.
5406         * darwin-nat.h: All implementations adjusted.
5407         * exec.c: All implementations adjusted.
5408         * fbsd-nat.c: All implementations adjusted.
5409         * fbsd-nat.h: All implementations adjusted.
5410         * gnu-nat.c: All implementations adjusted.
5411         * gnu-nat.h: All implementations adjusted.
5412         * go32-nat.c: All implementations adjusted.
5413         * ia64-linux-nat.c: All implementations adjusted.
5414         * inf-child.c: All implementations adjusted.
5415         * inf-child.h: All implementations adjusted.
5416         * inf-ptrace.c: All implementations adjusted.
5417         * inf-ptrace.h: All implementations adjusted.
5418         * linux-nat.c: All implementations adjusted.
5419         * linux-nat.h: All implementations adjusted.
5420         * mips-linux-nat.c: All implementations adjusted.
5421         * nto-procfs.c: All implementations adjusted.
5422         * ppc-linux-nat.c: All implementations adjusted.
5423         * procfs.c: All implementations adjusted.
5424         * ravenscar-thread.c: All implementations adjusted.
5425         * record-btrace.c: All implementations adjusted.
5426         * record-full.c: All implementations adjusted.
5427         * remote-sim.c: All implementations adjusted.
5428         * remote.c: All implementations adjusted.
5429         * s390-linux-nat.c: All implementations adjusted.
5430         * sol-thread.c: All implementations adjusted.
5431         * spu-multiarch.c: All implementations adjusted.
5432         * target-delegates.c: All implementations adjusted.
5433         * target.c: All implementations adjusted.
5434         * target.h: All implementations adjusted.
5435         * tracefile-tfile.c: All implementations adjusted.
5436         * tracefile.c: All implementations adjusted.
5437         * tracefile.h: All implementations adjusted.
5438         * windows-nat.c: All implementations adjusted.
5439         * x86-linux-nat.h: All implementations adjusted.
5440         * x86-nat.h: All implementations adjusted.
5441
5442 2018-05-02  Pedro Alves  <palves@redhat.com>
5443
5444         * make-target-delegates (scan_target_h): Don't trim lines here.
5445         Replace sequences of tabs and/or whitespace with a single
5446         whitespace.
5447         (top level, parsing methods): Trim each line before processing it
5448         here.
5449
5450 2018-05-02  Pedro Alves  <palves@redhat.com>
5451             John Baldwin  <jhb@freebsd.org>
5452
5453         * target.h (enum strata) <debug_stratum>: New.
5454         (struct target_ops) <all delegation methods>: Replace by C++
5455         virtual methods, and drop "to_" prefix.  All references updated
5456         throughout.
5457         <to_shortname, to_longname, to_doc, to_data,
5458         to_have_steppable_watchpoint, to_have_continuable_watchpoint,
5459         to_has_thread_control, to_attach_no_wait>: Delete, replaced by
5460         virtual methods.  All references updated throughout.
5461         <can_attach, supports_terminal_ours, can_create_inferior,
5462         get_thread_control_capabilities, attach_no_wait>: New
5463         virtual methods.
5464         <insert_breakpoint, remove_breakpoint>: Now
5465         TARGET_DEFAULT_NORETURN methods.
5466         <info_proc>: Now returns bool.
5467         <to_magic>: Delete.
5468         (OPS_MAGIC): Delete.
5469         (current_target): Delete.  All references replaced by references
5470         to ...
5471         (target_stack): ... this.  New.
5472         (target_shortname, target_longname): Adjust.
5473         (target_can_run): Now a function declaration.
5474         (default_child_has_all_memory, default_child_has_memory)
5475         (default_child_has_stack, default_child_has_registers)
5476         (default_child_has_execution): Remove target_ops parameter.
5477         (complete_target_initialization): Delete.
5478         (memory_breakpoint_target): New template class.
5479         (test_target_ops): Refactor as a C++ class with virtual methods.
5480         * make-target-delegates (NAME_PART): Tighten.
5481         (POINTER_PART, CP_SYMBOL): New.
5482         (SIMPLE_RETURN_PART): Reimplement.
5483         (VEC_RETURN_PART): Expect less.
5484         (RETURN_PART, VIRTUAL_PART): New.
5485         (METHOD): Adjust to C++ virtual methods.
5486         (scan_target_h): Remove reference to C99.
5487         (dname): Output "target_ops::" prefix.
5488         (write_function_header): Adjust to output a C++ class method.
5489         (write_declaration): New.
5490         (write_delegator): Adjust to output a C++ class method.
5491         (tdname): Output "dummy_target::" prefix.
5492         (write_tdefault, write_debugmethod): Adjust to output a C++ class
5493         method.
5494         (tdefault_names, debug_names): Delete.
5495         (return_types, tdefaults, styles, argtypes_array): New.
5496         (top level): All methods are delegators.
5497         (print_class): New.
5498         (top level): Print dummy_target and debug_target classes.
5499         * target-delegates.c: Regenerate.
5500         * target-debug.h (target_debug_print_enum_info_proc_what)
5501         (target_debug_print_thread_control_capabilities)
5502         (target_debug_print_thread_info_p): New.
5503         * target.c (dummy_target): Delete.
5504         (the_dummy_target, the_debug_target): New.
5505         (target_stack): Now extern.
5506         (set_targetdebug): Push/unpush debug target.
5507         (default_child_has_all_memory, default_child_has_memory)
5508         (default_child_has_stack, default_child_has_registers)
5509         (default_child_has_execution): Remove target_ops parameter.
5510         (complete_target_initialization): Delete.
5511         (add_target_with_completer): No longer call
5512         complete_target_initialization.
5513         (target_supports_terminal_ours): Use regular delegation.
5514         (update_current_target): Delete.
5515         (push_target): No longer check magic number.  Don't call
5516         update_current_target.
5517         (unpush_target): Don't call update_current_target.
5518         (target_is_pushed): No longer check magic number.
5519         (target_require_runnable): Skip for all stratums over
5520         process_stratum.
5521         (target_ops::info_proc): New.
5522         (target_info_proc): Use find_target_at and
5523         find_default_run_target.
5524         (target_supports_disable_randomization): Use regular delegation.
5525         (target_get_osdata): Use find_target_at.
5526         (target_ops::open, target_ops::close, target_ops::can_attach)
5527         (target_ops::attach, target_ops::can_create_inferior)
5528         (target_ops::create_inferior, target_ops::can_run)
5529         (target_can_run): New.
5530         (default_fileio_target): Use regular delegation.
5531         (target_ops::fileio_open, target_ops::fileio_pwrite)
5532         (target_ops::fileio_pread, target_ops::fileio_fstat)
5533         (target_ops::fileio_close, target_ops::fileio_unlink)
5534         (target_ops::fileio_readlink): New.
5535         (target_fileio_open_1, target_fileio_unlink)
5536         (target_fileio_readlink): Always call the target method.  Handle
5537         FILEIO_ENOSYS.
5538         (return_zero, return_zero_has_execution): Delete.
5539         (init_dummy_target): Delete.
5540         (dummy_target::dummy_target, dummy_target::shortname)
5541         (dummy_target::longname, dummy_target::doc)
5542         (debug_target::debug_target, debug_target::shortname)
5543         (debug_target::longname, debug_target::doc): New.
5544         (target_supports_delete_record): Use regular delegation.
5545         (setup_target_debug): Delete.
5546         (maintenance_print_target_stack): Skip debug_stratum.
5547         (initialize_targets): Instantiate the_dummy_target and
5548         the_debug_target.
5549         * auxv.c (target_auxv_parse): Remove 'ops' parameter.  Adjust to
5550         use target_stack.
5551         (target_auxv_search, fprint_target_auxv): Adjust.
5552         (info_auxv_command): Adjust to use target_stack.
5553         * auxv.h (target_auxv_parse): Remove 'ops' parameter.
5554         * exceptions.c (print_flush): Handle a NULL target_stack.
5555         * regcache.c (target_ops_no_register): Refactor as class with
5556         virtual methods.
5557
5558         * exec.c (exec_target): New class.
5559         (exec_ops): Now an exec_target.
5560         (exec_open, exec_close_1, exec_get_section_table)
5561         (exec_xfer_partial, exec_files_info, exec_has_memory)
5562         (exec_make_note_section): Refactor as exec_target methods.
5563         (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
5564         Delete.
5565         (exec_target::find_memory_regions): New.
5566         (_initialize_exec): Don't call init_exec_ops.
5567         * gdbcore.h (exec_file_clear): Delete.
5568
5569         * corefile.c (core_target): Delete.
5570         (core_file_command): Adjust.
5571         * corelow.c (core_target): New class.
5572         (the_core_target): New.
5573         (core_close): Remove target_ops parameter.
5574         (core_close_cleanup): Adjust.
5575         (core_target::close): New.
5576         (core_open, core_detach, get_core_registers, core_files_info)
5577         (core_xfer_partial, core_thread_alive, core_read_description)
5578         (core_pid_to_str, core_thread_name, core_has_memory)
5579         (core_has_stack, core_has_registers, core_info_proc): Rework as
5580         core_target methods.
5581         (ignore, core_remove_breakpoint, init_core_ops): Delete.
5582         (_initialize_corelow): Initialize the_core_target.
5583         * gdbcore.h (core_target): Delete.
5584         (the_core_target): New.
5585
5586         * ctf.c: (ctf_target): New class.
5587         (ctf_ops): Now a ctf_target.
5588         (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
5589         (ctf_xfer_partial, ctf_get_trace_state_variable_value)
5590         (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
5591         methods.
5592         (init_ctf_ops): Delete.
5593         (_initialize_ctf): Don't call it.
5594         * tracefile-tfile.c (tfile_target): New class.
5595         (tfile_ops): Now a tfile_target.
5596         (tfile_open, tfile_close, tfile_files_info)
5597         (tfile_get_tracepoint_status, tfile_trace_find)
5598         (tfile_fetch_registers, tfile_xfer_partial)
5599         (tfile_get_trace_state_variable_value, tfile_traceframe_info):
5600         Refactor as tfile_target methods.
5601         (tfile_xfer_partial_features): Remove target_ops parameter.
5602         (init_tfile_ops): Delete.
5603         (_initialize_tracefile_tfile): Don't call it.
5604         * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
5605         (tracefile_has_stack, tracefile_has_registers)
5606         (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
5607         tracefile_target methods.
5608         (init_tracefile_ops): Delete.
5609         (tracefile_target::tracefile_target): New.
5610         * tracefile.h: Include "target.h".
5611         (tracefile_target): New class.
5612         (init_tracefile_ops): Delete.
5613
5614         * spu-multiarch.c (spu_multiarch_target): New class.
5615         (spu_ops): Now a spu_multiarch_target.
5616         (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
5617         (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
5618         (spu_search_memory, spu_mourn_inferior): Refactor as
5619         spu_multiarch_target methods.
5620         (init_spu_ops): Delete.
5621         (_initialize_spu_multiarch): Remove references to init_spu_ops,
5622         complete_target_initialization.
5623
5624         * ravenscar-thread.c (ravenscar_thread_target): New class.
5625         (ravenscar_ops): Now a ravenscar_thread_target.
5626         (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
5627         (ravenscar_thread_alive, ravenscar_pid_to_str)
5628         (ravenscar_fetch_registers, ravenscar_store_registers)
5629         (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
5630         (ravenscar_stopped_by_hw_breakpoint)
5631         (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
5632         (ravenscar_mourn_inferior, ravenscar_core_of_thread)
5633         (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
5634         methods.
5635         (init_ravenscar_thread_ops): Delete.
5636         (_initialize_ravenscar): Remove references to
5637         init_ravenscar_thread_ops and complete_target_initialization.
5638
5639         * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
5640         (bsd_uthread_target): New class.
5641         (bsd_uthread_ops): Now a bsd_uthread_target.
5642         (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
5643         (bsd_uthread_close, bsd_uthread_mourn_inferior)
5644         (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
5645         (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
5646         (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
5647         (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
5648         (bsd_uthread_target): Delete function.
5649         (_initialize_bsd_uthread): Remove reference to
5650         complete_target_initialization.
5651
5652         * bfd-target.c (target_bfd_data): Delete.  Fields folded into ...
5653         (target_bfd): ... this new class.
5654         (target_bfd_xfer_partial, target_bfd_get_section_table)
5655         (target_bfd_close): Refactor as target_bfd methods.
5656         (target_bfd::~target_bfd): New.
5657         (target_bfd_reopen): Adjust.
5658         (target_bfd::close): New.
5659
5660         * record-btrace.c (record_btrace_target): New class.
5661         (record_btrace_ops): Now a record_btrace_target.
5662         (record_btrace_open, record_btrace_stop_recording)
5663         (record_btrace_disconnect, record_btrace_close)
5664         (record_btrace_async, record_btrace_info)
5665         (record_btrace_insn_history, record_btrace_insn_history_range)
5666         (record_btrace_insn_history_from, record_btrace_call_history)
5667         (record_btrace_call_history_range)
5668         (record_btrace_call_history_from, record_btrace_record_method)
5669         (record_btrace_is_replaying, record_btrace_will_replay)
5670         (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
5671         (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
5672         (record_btrace_store_registers, record_btrace_prepare_to_store)
5673         (record_btrace_to_get_unwinder)
5674         (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
5675         (record_btrace_commit_resume, record_btrace_wait)
5676         (record_btrace_stop, record_btrace_can_execute_reverse)
5677         (record_btrace_stopped_by_sw_breakpoint)
5678         (record_btrace_supports_stopped_by_sw_breakpoint)
5679         (record_btrace_stopped_by_hw_breakpoint)
5680         (record_btrace_supports_stopped_by_hw_breakpoint)
5681         (record_btrace_update_thread_list, record_btrace_thread_alive)
5682         (record_btrace_goto_begin, record_btrace_goto_end)
5683         (record_btrace_goto, record_btrace_stop_replaying_all)
5684         (record_btrace_execution_direction)
5685         (record_btrace_prepare_to_generate_core)
5686         (record_btrace_done_generating_core): Refactor as
5687         record_btrace_target methods.
5688         (init_record_btrace_ops): Delete.
5689         (_initialize_record_btrace): Remove reference to
5690         init_record_btrace_ops.
5691         * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
5692         the execution_direction global.
5693         (record_full_base_target, record_full_target)
5694         (record_full_core_target): New classes.
5695         (record_full_ops): Now a record_full_target.
5696         (record_full_core_ops): Now a record_full_core_target.
5697         (record_full_target::detach, record_full_target::disconnect)
5698         (record_full_core_target::disconnect)
5699         (record_full_target::mourn_inferior, record_full_target::kill):
5700         New.
5701         (record_full_open, record_full_close, record_full_async): Refactor
5702         as methods of the record_full_base_target class.
5703         (record_full_resume, record_full_commit_resume): Refactor
5704         as methods of the record_full_target class.
5705         (record_full_wait, record_full_stopped_by_watchpoint)
5706         (record_full_stopped_data_address)
5707         (record_full_stopped_by_sw_breakpoint)
5708         (record_full_supports_stopped_by_sw_breakpoint)
5709         (record_full_stopped_by_hw_breakpoint)
5710         (record_full_supports_stopped_by_hw_breakpoint): Refactor as
5711         methods of the record_full_base_target class.
5712         (record_full_store_registers, record_full_xfer_partial)
5713         (record_full_insert_breakpoint, record_full_remove_breakpoint):
5714         Refactor as methods of the record_full_target class.
5715         (record_full_can_execute_reverse, record_full_get_bookmark)
5716         (record_full_goto_bookmark, record_full_execution_direction)
5717         (record_full_record_method, record_full_info, record_full_delete)
5718         (record_full_is_replaying, record_full_will_replay)
5719         (record_full_goto_begin, record_full_goto_end, record_full_goto)
5720         (record_full_stop_replaying): Refactor as methods of the
5721         record_full_base_target class.
5722         (record_full_core_resume, record_full_core_kill)
5723         (record_full_core_fetch_registers)
5724         (record_full_core_prepare_to_store)
5725         (record_full_core_store_registers, record_full_core_xfer_partial)
5726         (record_full_core_insert_breakpoint)
5727         (record_full_core_remove_breakpoint)
5728         (record_full_core_has_execution): Refactor
5729         as methods of the record_full_core_target class.
5730         (record_full_base_target::supports_delete_record): New.
5731         (init_record_full_ops): Delete.
5732         (init_record_full_core_ops): Delete.
5733         (record_full_save): Refactor as method of the
5734         record_full_base_target class.
5735         (_initialize_record_full): Remove references to
5736         init_record_full_ops and init_record_full_core_ops.
5737
5738         * remote.c (remote_target, extended_remote_target): New classes.
5739         (remote_ops): Now a remote_target.
5740         (extended_remote_ops): Now an extended_remote_target.
5741         (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
5742         (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
5743         (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
5744         (remote_pass_signals, remote_set_syscall_catchpoint)
5745         (remote_program_signals, )
5746         (remote_thread_always_alive): Remove target_ops parameter.
5747         (remote_thread_alive, remote_thread_name)
5748         (remote_update_thread_list, remote_threads_extra_info)
5749         (remote_static_tracepoint_marker_at)
5750         (remote_static_tracepoint_markers_by_strid)
5751         (remote_get_ada_task_ptid, remote_close, remote_start_remote)
5752         (remote_open): Refactor as methods of remote_target.
5753         (extended_remote_open, extended_remote_detach)
5754         (extended_remote_attach, extended_remote_post_attach):
5755         (extended_remote_supports_disable_randomization)
5756         (extended_remote_create_inferior): : Refactor as method of
5757         extended_remote_target.
5758         (remote_set_permissions, remote_open_1, remote_detach)
5759         (remote_follow_fork, remote_follow_exec, remote_disconnect)
5760         (remote_resume, remote_commit_resume, remote_stop)
5761         (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
5762         (remote_terminal_ours, remote_wait, remote_fetch_registers)
5763         (remote_prepare_to_store, remote_store_registers)
5764         (remote_flash_erase, remote_flash_done, remote_files_info)
5765         (remote_kill, remote_mourn, remote_insert_breakpoint)
5766         (remote_remove_breakpoint, remote_insert_watchpoint)
5767         (remote_watchpoint_addr_within_range)
5768         (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
5769         (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
5770         (remote_supports_stopped_by_sw_breakpoint)
5771         (remote_stopped_by_hw_breakpoint)
5772         (remote_supports_stopped_by_hw_breakpoint)
5773         (remote_stopped_by_watchpoint, remote_stopped_data_address)
5774         (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
5775         (remote_verify_memory): Refactor as methods of remote_target.
5776         (remote_write_qxfer, remote_read_qxfer): Remove target_ops
5777         parameter.
5778         (remote_xfer_partial, remote_get_memory_xfer_limit)
5779         (remote_search_memory, remote_rcmd, remote_memory_map)
5780         (remote_pid_to_str, remote_get_thread_local_address)
5781         (remote_get_tib_address, remote_read_description): Refactor as
5782         methods of remote_target.
5783         (remote_target::fileio_open, remote_target::fileio_pwrite)
5784         (remote_target::fileio_pread, remote_target::fileio_close): New.
5785         (remote_hostio_readlink, remote_hostio_fstat)
5786         (remote_filesystem_is_local, remote_can_execute_reverse)
5787         (remote_supports_non_stop, remote_supports_disable_randomization)
5788         (remote_supports_multi_process, remote_supports_cond_breakpoints)
5789         (remote_supports_enable_disable_tracepoint)
5790         (remote_supports_string_tracing)
5791         (remote_can_run_breakpoint_commands, remote_trace_init)
5792         (remote_download_tracepoint, remote_can_download_tracepoint)
5793         (remote_download_trace_state_variable, remote_enable_tracepoint)
5794         (remote_disable_tracepoint, remote_trace_set_readonly_regions)
5795         (remote_trace_start, remote_get_trace_status)
5796         (remote_get_tracepoint_status, remote_trace_stop)
5797         (remote_trace_find, remote_get_trace_state_variable_value)
5798         (remote_save_trace_data, remote_get_raw_trace_data)
5799         (remote_set_disconnected_tracing, remote_core_of_thread)
5800         (remote_set_circular_trace_buffer, remote_traceframe_info)
5801         (remote_get_min_fast_tracepoint_insn_len)
5802         (remote_set_trace_buffer_size, remote_set_trace_notes)
5803         (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
5804         (remote_disable_btrace, remote_teardown_btrace)
5805         (remote_read_btrace, remote_btrace_conf)
5806         (remote_augmented_libraries_svr4_read, remote_load)
5807         (remote_pid_to_exec_file, remote_can_do_single_step)
5808         (remote_execution_direction, remote_thread_handle_to_thread_info):
5809         Refactor as methods of remote_target.
5810         (init_remote_ops, init_extended_remote_ops): Delete.
5811         (remote_can_async_p, remote_is_async_p, remote_async)
5812         (remote_thread_events, remote_upload_tracepoints)
5813         (remote_upload_trace_state_variables): Refactor as methods of
5814         remote_target.
5815         (_initialize_remote): Remove references to init_remote_ops and
5816         init_extended_remote_ops.
5817
5818         * remote-sim.c (gdbsim_target): New class.
5819         (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
5820         (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
5821         (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
5822         (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
5823         (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
5824         (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
5825         Refactor as methods of gdbsim_target.
5826         (gdbsim_ops): Now a gdbsim_target.
5827         (init_gdbsim_ops): Delete.
5828         (gdbsim_cntrl_c): Adjust.
5829         (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
5830
5831         * amd64-linux-nat.c (amd64_linux_nat_target): New class.
5832         (the_amd64_linux_nat_target): New.
5833         (amd64_linux_fetch_inferior_registers)
5834         (amd64_linux_store_inferior_registers): Refactor as methods of
5835         amd64_linux_nat_target.
5836         (_initialize_amd64_linux_nat): Adjust.  Set linux_target.
5837         * i386-linux-nat.c: Don't include "linux-nat.h".
5838         (i386_linux_nat_target): New class.
5839         (the_i386_linux_nat_target): New.
5840         (i386_linux_fetch_inferior_registers)
5841         (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
5842         as methods of i386_linux_nat_target.
5843         (_initialize_i386_linux_nat): Adjust.  Set linux_target.
5844         * inf-child.c (inf_child_ops): Delete.
5845         (inf_child_fetch_inferior_registers)
5846         (inf_child_store_inferior_registers): Delete.
5847         (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
5848         methods of inf_child_target.
5849         (inf_child_target::supports_terminal_ours)
5850         (inf_child_target::terminal_init)
5851         (inf_child_target::terminal_inferior)
5852         (inf_child_target::terminal_ours_for_output)
5853         (inf_child_target::terminal_ours, inf_child_target::interrupt)
5854         (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
5855         New.
5856         (inf_child_open, inf_child_disconnect, inf_child_close)
5857         (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
5858         (inf_child_post_startup_inferior, inf_child_can_run)
5859         (inf_child_pid_to_exec_file): Refactor as methods of
5860         inf_child_target.
5861         (inf_child_follow_fork): Delete.
5862         (inf_child_target::can_create_inferior)
5863         (inf_child_target::can_attach): New.
5864         (inf_child_target::has_all_memory, inf_child_target::has_memory)
5865         (inf_child_target::has_stack, inf_child_target::has_registers)
5866         (inf_child_target::has_execution): New.
5867         (inf_child_fileio_open, inf_child_fileio_pwrite)
5868         (inf_child_fileio_pread, inf_child_fileio_fstat)
5869         (inf_child_fileio_close, inf_child_fileio_unlink)
5870         (inf_child_fileio_readlink, inf_child_use_agent)
5871         (inf_child_can_use_agent): Refactor as methods of
5872         inf_child_target.
5873         (return_zero, inf_child_target): Delete.
5874         (inf_child_target::inf_child_target): New.
5875         * inf-child.h: Include "target.h".
5876         (inf_child_target): Delete function prototype.
5877         (inf_child_target): New class.
5878         (inf_child_open_target, inf_child_mourn_inferior)
5879         (inf_child_maybe_unpush_target): Delete.
5880         * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
5881         (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
5882         (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
5883         (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
5884         (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
5885         (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
5886         (inf_ptrace_wait, inf_ptrace_xfer_partial)
5887         (inf_ptrace_thread_alive, inf_ptrace_files_info)
5888         (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
5889         methods of inf_ptrace_target.
5890         (inf_ptrace_target): Delete function.
5891         * inf-ptrace.h: Include "inf-child.h".
5892         (inf_ptrace_target): Delete function declaration.
5893         (inf_ptrace_target): New class.
5894         (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
5895         * linux-nat.c (linux_target): New.
5896         (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
5897         (linux_nat_target::~linux_nat_target): New.
5898         (linux_child_post_attach, linux_child_post_startup_inferior)
5899         (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
5900         (linux_child_remove_fork_catchpoint)
5901         (linux_child_insert_vfork_catchpoint)
5902         (linux_child_remove_vfork_catchpoint)
5903         (linux_child_insert_exec_catchpoint)
5904         (linux_child_remove_exec_catchpoint)
5905         (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
5906         (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
5907         (linux_nat_resume, linux_nat_stopped_by_watchpoint)
5908         (linux_nat_stopped_data_address)
5909         (linux_nat_stopped_by_sw_breakpoint)
5910         (linux_nat_supports_stopped_by_sw_breakpoint)
5911         (linux_nat_stopped_by_hw_breakpoint)
5912         (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
5913         (linux_nat_kill, linux_nat_mourn_inferior)
5914         (linux_nat_xfer_partial, linux_nat_thread_alive)
5915         (linux_nat_update_thread_list, linux_nat_pid_to_str)
5916         (linux_nat_thread_name, linux_child_pid_to_exec_file)
5917         (linux_child_static_tracepoint_markers_by_strid)
5918         (linux_nat_is_async_p, linux_nat_can_async_p)
5919         (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
5920         (linux_nat_supports_multi_process)
5921         (linux_nat_supports_disable_randomization, linux_nat_async)
5922         (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
5923         (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
5924         (linux_nat_fileio_open, linux_nat_fileio_readlink)
5925         (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
5926         methods of linux_nat_target.
5927         (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
5928         (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
5929         parameter.
5930         (check_stopped_by_watchpoint): Adjust.
5931         (linux_xfer_partial): Delete.
5932         (linux_target_install_ops, linux_target, linux_nat_add_target):
5933         Delete.
5934         (linux_nat_target::linux_nat_target): New.
5935         * linux-nat.h: Include "inf-ptrace.h".
5936         (linux_nat_target): New.
5937         (linux_target, linux_target_install_ops, linux_nat_add_target):
5938         Delete function declarations.
5939         (linux_target): Declare global.
5940         * linux-thread-db.c (thread_db_target): New.
5941         (thread_db_target::thread_db_target): New.
5942         (thread_db_ops): Delete.
5943         (the_thread_db_target): New.
5944         (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
5945         (thread_db_update_thread_list, thread_db_pid_to_str)
5946         (thread_db_extra_thread_info)
5947         (thread_db_thread_handle_to_thread_info)
5948         (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
5949         (thread_db_resume): Refactor as methods of thread_db_target.
5950         (init_thread_db_ops): Delete.
5951         (_initialize_thread_db): Remove reference to init_thread_db_ops.
5952         * x86-linux-nat.c: Don't include "linux-nat.h".
5953         (super_post_startup_inferior): Delete.
5954         (x86_linux_nat_target::~x86_linux_nat_target): New.
5955         (x86_linux_child_post_startup_inferior)
5956         (x86_linux_read_description, x86_linux_enable_btrace)
5957         (x86_linux_disable_btrace, x86_linux_teardown_btrace)
5958         (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
5959         methods of x86_linux_nat_target.
5960         (x86_linux_create_target): Delete.  Bits folded ...
5961         (x86_linux_add_target): ... here.  Now takes a linux_nat_target
5962         pointer.
5963         * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
5964         (x86_linux_nat_target): New class.
5965         (x86_linux_create_target): Delete.
5966         (x86_linux_add_target): Now takes a linux_nat_target pointer.
5967         * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
5968         (x86_region_ok_for_watchpoint, x86_stopped_data_address)
5969         (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
5970         (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
5971         (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
5972         make extern.
5973         (x86_use_watchpoints): Delete.
5974         * x86-nat.h: Include "breakpoint.h" and "target.h".
5975         (x86_use_watchpoints): Delete.
5976         (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
5977         (x86_stopped_by_watchpoint, x86_stopped_data_address)
5978         (x86_insert_watchpoint, x86_remove_watchpoint)
5979         (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
5980         (x86_stopped_by_hw_breakpoint): New declarations.
5981         (x86_nat_target): New template class.
5982
5983         * ppc-linux-nat.c (ppc_linux_nat_target): New class.
5984         (the_ppc_linux_nat_target): New.
5985         (ppc_linux_fetch_inferior_registers)
5986         (ppc_linux_can_use_hw_breakpoint)
5987         (ppc_linux_region_ok_for_hw_watchpoint)
5988         (ppc_linux_ranged_break_num_registers)
5989         (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
5990         (ppc_linux_insert_mask_watchpoint)
5991         (ppc_linux_remove_mask_watchpoint)
5992         (ppc_linux_can_accel_watchpoint_condition)
5993         (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
5994         (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
5995         (ppc_linux_watchpoint_addr_within_range)
5996         (ppc_linux_masked_watch_num_registers)
5997         (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
5998         (ppc_linux_read_description): Refactor as methods of
5999         ppc_linux_nat_target.
6000         (_initialize_ppc_linux_nat): Adjust.  Set linux_target.
6001
6002         * procfs.c (procfs_xfer_partial): Delete forward declaration.
6003         (procfs_target): New class.
6004         (the_procfs_target): New.
6005         (procfs_target): Delete function.
6006         (procfs_auxv_parse, procfs_attach, procfs_detach)
6007         (procfs_fetch_registers, procfs_store_registers, procfs_wait)
6008         (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
6009         (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
6010         (procfs_create_inferior, procfs_update_thread_list)
6011         (procfs_thread_alive, procfs_pid_to_str)
6012         (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
6013         (procfs_stopped_data_address, procfs_insert_watchpoint)
6014         (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
6015         (proc_find_memory_regions, procfs_info_proc)
6016         (procfs_make_note_section): Refactor as methods of procfs_target.
6017         (_initialize_procfs): Adjust.
6018         * sol-thread.c (sol_thread_target): New class.
6019         (sol_thread_ops): Now a sol_thread_target.
6020         (sol_thread_detach, sol_thread_resume, sol_thread_wait)
6021         (sol_thread_fetch_registers, sol_thread_store_registers)
6022         (sol_thread_xfer_partial, sol_thread_mourn_inferior)
6023         (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
6024         (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
6025         (init_sol_thread_ops): Delete.
6026         (_initialize_sol_thread): Adjust.  Remove references to
6027         init_sol_thread_ops and complete_target_initialization.
6028
6029         * windows-nat.c (windows_nat_target): New class.
6030         (windows_fetch_inferior_registers)
6031         (windows_store_inferior_registers, windows_resume, windows_wait)
6032         (windows_attach, windows_detach, windows_pid_to_exec_file)
6033         (windows_files_info, windows_create_inferior)
6034         (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
6035         (windows_close, windows_pid_to_str, windows_xfer_partial)
6036         (windows_get_tib_address, windows_get_ada_task_ptid)
6037         (windows_thread_name, windows_thread_alive): Refactor as
6038         windows_nat_target methods.
6039         (do_initial_windows_stuff): Adjust.
6040         (windows_target): Delete function.
6041         (_initialize_windows_nat): Adjust.
6042
6043         * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
6044         (darwin_mourn_inferior, darwin_kill_inferior)
6045         (darwin_create_inferior, darwin_attach, darwin_detach)
6046         (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
6047         (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
6048         (darwin_supports_multi_process): Refactor as darwin_nat_target
6049         methods.
6050         (darwin_resume_to, darwin_files_info): Delete.
6051         (_initialize_darwin_inferior): Rename to ...
6052         (_initialize_darwin_nat): ... this.  Adjust to C++ification.
6053         * darwin-nat.h: Include "inf-child.h".
6054         (darwin_nat_target): New class.
6055         (darwin_complete_target): Delete.
6056         * i386-darwin-nat.c (i386_darwin_nat_target): New class.
6057         (darwin_target): New.
6058         (i386_darwin_fetch_inferior_registers)
6059         (i386_darwin_store_inferior_registers): Refactor as methods of
6060         darwin_nat_target.
6061         (darwin_complete_target): Delete, with ...
6062         (_initialize_i386_darwin_nat): ... bits factored out here.
6063
6064         * alpha-linux-nat.c (alpha_linux_nat_target): New class.
6065         (the_alpha_linux_nat_target): New.
6066         (alpha_linux_register_u_offset): Refactor as
6067         alpha_linux_nat_target method.
6068         (_initialize_alpha_linux_nat): Adjust.
6069         * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
6070         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
6071         (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
6072         methods of linux_nat_trad_target.
6073         (linux_trad_target): Delete.
6074         * linux-nat-trad.h (linux_trad_target): Delete function.
6075         (linux_nat_trad_target): New class.
6076         * mips-linux-nat.c (mips_linux_nat_target): New class.
6077         (super_fetch_registers, super_store_registers, super_close):
6078         Delete.
6079         (the_mips_linux_nat_target): New.
6080         (mips64_linux_regsets_fetch_registers)
6081         (mips64_linux_regsets_store_registers)
6082         (mips64_linux_fetch_registers, mips64_linux_store_registers)
6083         (mips_linux_register_u_offset, mips_linux_read_description)
6084         (mips_linux_can_use_hw_breakpoint)
6085         (mips_linux_stopped_by_watchpoint)
6086         (mips_linux_stopped_data_address)
6087         (mips_linux_region_ok_for_hw_watchpoint)
6088         (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
6089         (mips_linux_close): Refactor as methods of mips_linux_nat.
6090         (_initialize_mips_linux_nat): Adjust to C++ification.
6091
6092         * aix-thread.c (aix_thread_target): New class.
6093         (aix_thread_ops): Now an aix_thread_target.
6094         (aix_thread_detach, aix_thread_resume, aix_thread_wait)
6095         (aix_thread_fetch_registers, aix_thread_store_registers)
6096         (aix_thread_xfer_partial, aix_thread_mourn_inferior)
6097         (aix_thread_thread_alive, aix_thread_pid_to_str)
6098         (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
6099         Refactor as methods of aix_thread_target.
6100         (init_aix_thread_ops): Delete.
6101         (_initialize_aix_thread): Remove references to init_aix_thread_ops
6102         and complete_target_initialization.
6103         * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
6104         (rs6000_nat_target): New class.
6105         (the_rs6000_nat_target): New.
6106         (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
6107         (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
6108         (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
6109         (super_create_inferior): Delete.
6110         (_initialize_rs6000_nat): Adjust to C++ification.
6111
6112         * arm-linux-nat.c (arm_linux_nat_target): New class.
6113         (the_arm_linux_nat_target): New.
6114         (arm_linux_fetch_inferior_registers)
6115         (arm_linux_store_inferior_registers, arm_linux_read_description)
6116         (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
6117         (arm_linux_remove_hw_breakpoint)
6118         (arm_linux_region_ok_for_hw_watchpoint)
6119         (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
6120         (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
6121         (arm_linux_watchpoint_addr_within_range): Refactor as methods of
6122         arm_linux_nat_target.
6123         (_initialize_arm_linux_nat): Adjust to C++ification.
6124
6125         * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
6126         (the_aarch64_linux_nat_target): New.
6127         (aarch64_linux_fetch_inferior_registers)
6128         (aarch64_linux_store_inferior_registers)
6129         (aarch64_linux_child_post_startup_inferior)
6130         (aarch64_linux_read_description)
6131         (aarch64_linux_can_use_hw_breakpoint)
6132         (aarch64_linux_insert_hw_breakpoint)
6133         (aarch64_linux_remove_hw_breakpoint)
6134         (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
6135         (aarch64_linux_region_ok_for_hw_watchpoint)
6136         (aarch64_linux_stopped_data_address)
6137         (aarch64_linux_stopped_by_watchpoint)
6138         (aarch64_linux_watchpoint_addr_within_range)
6139         (aarch64_linux_can_do_single_step): Refactor as methods of
6140         aarch64_linux_nat_target.
6141         (super_post_startup_inferior): Delete.
6142         (_initialize_aarch64_linux_nat): Adjust to C++ification.
6143
6144         * hppa-linux-nat.c (hppa_linux_nat_target): New class.
6145         (the_hppa_linux_nat_target): New.
6146         (hppa_linux_fetch_inferior_registers)
6147         (hppa_linux_store_inferior_registers): Refactor as methods of
6148         hppa_linux_nat_target.
6149         (_initialize_hppa_linux_nat): Adjust to C++ification.
6150
6151         * ia64-linux-nat.c (ia64_linux_nat_target): New class.
6152         (the_ia64_linux_nat_target): New.
6153         (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
6154         (ia64_linux_stopped_data_address)
6155         (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
6156         (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
6157         ia64_linux_nat_target methods.
6158         (super_xfer_partial): Delete.
6159         (_initialize_ia64_linux_nat): Adjust to C++ification.
6160
6161         * m32r-linux-nat.c (m32r_linux_nat_target): New class.
6162         (the_m32r_linux_nat_target): New.
6163         (m32r_linux_fetch_inferior_registers)
6164         (m32r_linux_store_inferior_registers): Refactor as
6165         m32r_linux_nat_target methods.
6166         (_initialize_m32r_linux_nat): Adjust to C++ification.
6167
6168         * m68k-linux-nat.c (m68k_linux_nat_target): New class.
6169         (the_m68k_linux_nat_target): New.
6170         (m68k_linux_fetch_inferior_registers)
6171         (m68k_linux_store_inferior_registers): Refactor as
6172         m68k_linux_nat_target methods.
6173         (_initialize_m68k_linux_nat): Adjust to C++ification.
6174
6175         * s390-linux-nat.c (s390_linux_nat_target): New class.
6176         (the_s390_linux_nat_target): New.
6177         (s390_linux_fetch_inferior_registers)
6178         (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
6179         (s390_insert_watchpoint, s390_remove_watchpoint)
6180         (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
6181         (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
6182         (s390_auxv_parse, s390_read_description): Refactor as methods of
6183         s390_linux_nat_target.
6184         (_initialize_s390_nat): Adjust to C++ification.
6185
6186         * sparc-linux-nat.c (sparc_linux_nat_target): New class.
6187         (the_sparc_linux_nat_target): New.
6188         (_initialize_sparc_linux_nat): Adjust to C++ification.
6189         * sparc-nat.c (sparc_fetch_inferior_registers)
6190         (sparc_store_inferior_registers): Remove target_ops parameter.
6191         * sparc-nat.h (sparc_fetch_inferior_registers)
6192         (sparc_store_inferior_registers): Remove target_ops parameter.
6193         * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
6194         (the_sparc64_linux_nat_target): New.
6195         (_initialize_sparc64_linux_nat): Adjust to C++ification.
6196
6197         * spu-linux-nat.c (spu_linux_nat_target): New class.
6198         (the_spu_linux_nat_target): New.
6199         (spu_child_post_startup_inferior, spu_child_post_attach)
6200         (spu_child_wait, spu_fetch_inferior_registers)
6201         (spu_store_inferior_registers, spu_xfer_partial)
6202         (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
6203         methods.
6204         (_initialize_spu_nat): Adjust to C++ification.
6205
6206         * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
6207         (the_tilegx_linux_nat_target): New.
6208         (fetch_inferior_registers, store_inferior_registers):
6209         Refactor as methods.
6210         (_initialize_tile_linux_nat): Adjust to C++ification.
6211
6212         * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
6213         (the_xtensa_linux_nat_target): New.
6214         (xtensa_linux_fetch_inferior_registers)
6215         (xtensa_linux_store_inferior_registers): Refactor as
6216         xtensa_linux_nat_target methods.
6217         (_initialize_xtensa_linux_nat): Adjust to C++ification.
6218
6219         * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
6220         (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
6221         (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
6222         (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
6223         (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
6224         (fbsd_stopped_by_sw_breakpoint)
6225         (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
6226         (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
6227         (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
6228         (fbsd_post_startup_inferior, fbsd_post_attach)
6229         (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
6230         (fbsd_set_syscall_catchpoint)
6231         (super_xfer_partial, super_resume, super_wait)
6232         (fbsd_supports_stopped_by_hw_breakpoint): Delete.
6233         (fbsd_handle_debug_trap): Remove target_ops parameter.
6234         (fbsd_nat_add_target): Delete.
6235         * fbsd-nat.h: Include "inf-ptrace.h".
6236         (fbsd_nat_add_target): Delete.
6237         (USE_SIGTRAP_SIGINFO): Define.
6238         (fbsd_nat_target): New class.
6239
6240         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
6241         (amd64bsd_store_inferior_registers): Remove target_ops parameter.
6242         (amd64bsd_target): Delete.
6243         * amd64-bsd-nat.h: New file.
6244         * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
6245         "x86-bsd-nat.h".
6246         (amd64_fbsd_nat_target): New class.
6247         (the_amd64_fbsd_nat_target): New.
6248         (amd64fbsd_read_description): Refactor as method of
6249         amd64_fbsd_nat_target.
6250         (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
6251         (_initialize_amd64fbsd_nat): Adjust to C++ification.
6252         * amd64-nat.h (amd64bsd_target): Delete function declaration.
6253         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
6254         (i386bsd_store_inferior_registers): Remove target_ops parameter.
6255         (i386bsd_target): Delete.
6256         * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
6257         (i386bsd_fetch_inferior_registers)
6258         (i386bsd_store_inferior_registers): Declare.
6259         (i386_bsd_nat_target): New class.
6260         * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
6261         (the_i386_fbsd_nat_target): New.
6262         (i386fbsd_resume, i386fbsd_read_description): Refactor as
6263         i386_fbsd_nat_target methods.
6264         (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
6265         (_initialize_i386fbsd_nat): Adjust to C++ification.
6266         * x86-bsd-nat.c (super_mourn_inferior): Delete.
6267         (x86bsd_mourn_inferior, x86bsd_target): Delete.
6268         (_initialize_x86_bsd_nat): Adjust to C++ification.
6269         * x86-bsd-nat.h: Include "x86-nat.h".
6270         (x86bsd_target): Delete declaration.
6271         (x86bsd_nat_target): New class.
6272
6273         * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
6274         (the_aarch64_fbsd_nat_target): New.
6275         (aarch64_fbsd_fetch_inferior_registers)
6276         (aarch64_fbsd_store_inferior_registers): Refactor as methods of
6277         aarch64_fbsd_nat_target.
6278         (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
6279         * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
6280         (the_alpha_bsd_nat_target): New.
6281         (alphabsd_fetch_inferior_registers)
6282         (alphabsd_store_inferior_registers): Refactor as
6283         alpha_bsd_nat_target methods.
6284         (_initialize_alphabsd_nat): Refactor as methods of
6285         alpha_bsd_nat_target.
6286         * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
6287         (the_amd64_nbsd_nat_target): New.
6288         (_initialize_amd64nbsd_nat): Adjust to C++ification.
6289         * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
6290         (the_amd64_obsd_nat_target): New.
6291         (_initialize_amd64obsd_nat): Adjust to C++ification.
6292         * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
6293         (the_arm_fbsd_nat_target): New.
6294         (arm_fbsd_fetch_inferior_registers)
6295         (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
6296         (_initialize_arm_fbsd_nat): Refactor as methods of
6297         arm_fbsd_nat_target.
6298         (_initialize_arm_fbsd_nat): Adjust to C++ification.
6299         * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
6300         (the_arm_netbsd_nat_target): New.
6301         (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
6302         arm_netbsd_nat_target.
6303         (_initialize_arm_netbsd_nat): Adjust to C++ification.
6304         * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
6305         (the_hppa_nbsd_nat_target): New.
6306         (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
6307         hppa_nbsd_nat_target methods.
6308         (_initialize_hppanbsd_nat): Adjust to C++ification.
6309         * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
6310         (the_hppa_obsd_nat_target): New.
6311         (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
6312         methods of hppa_obsd_nat_target.
6313         (_initialize_hppaobsd_nat): Adjust to C++ification.  Use
6314         add_target.
6315         * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
6316         (_initialize_i386nbsd_nat): Adjust to C++ification.  Use
6317         add_target.
6318         * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
6319         (_initialize_i386obsd_nat): Use add_target.
6320         * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
6321         (the_m68k_bsd_nat_target): New.
6322         (m68kbsd_fetch_inferior_registers)
6323         (m68kbsd_store_inferior_registers): Refactor as methods of
6324         m68k_bsd_nat_target.
6325         (_initialize_m68kbsd_nat): Adjust to C++ification.
6326         * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
6327         (the_mips_fbsd_nat_target): New.
6328         (mips_fbsd_fetch_inferior_registers)
6329         (mips_fbsd_store_inferior_registers): Refactor as methods of
6330         mips_fbsd_nat_target.
6331         (_initialize_mips_fbsd_nat): Adjust to C++ification.  Use
6332         add_target.
6333         * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
6334         (the_mips_nbsd_nat_target): New.
6335         (mipsnbsd_fetch_inferior_registers)
6336         (mipsnbsd_store_inferior_registers): Refactor as methods of
6337         mips_nbsd_nat_target.
6338         (_initialize_mipsnbsd_nat): Adjust to C++ification.
6339         * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
6340         (the_mips64_obsd_nat_target): New.
6341         (mips64obsd_fetch_inferior_registers)
6342         (mips64obsd_store_inferior_registers): Refactor as methods of
6343         mips64_obsd_nat_target.
6344         (_initialize_mips64obsd_nat): Adjust to C++ification.  Use
6345         add_target.
6346         * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
6347         nbsd_nat_target.
6348         * nbsd-nat.h: Include "inf-ptrace.h".
6349         (nbsd_nat_target): New class.
6350         * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
6351         (obsd_wait): Refactor as methods of obsd_nat_target.
6352         (obsd_add_target): Delete.
6353         * obsd-nat.h: Include "inf-ptrace.h".
6354         (obsd_nat_target): New class.
6355         * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
6356         (the_ppc_fbsd_nat_target): New.
6357         (ppcfbsd_fetch_inferior_registers)
6358         (ppcfbsd_store_inferior_registers): Refactor as methods of
6359         ppc_fbsd_nat_target.
6360         (_initialize_ppcfbsd_nat): Adjust to C++ification.  Use
6361         add_target.
6362         * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
6363         (the_ppc_nbsd_nat_target): New.
6364         (ppcnbsd_fetch_inferior_registers)
6365         (ppcnbsd_store_inferior_registers): Refactor as methods of
6366         ppc_nbsd_nat_target.
6367         (_initialize_ppcnbsd_nat): Adjust to C++ification.
6368         * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
6369         (the_ppc_obsd_nat_target): New.
6370         (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
6371         methods of ppc_obsd_nat_target.
6372         (_initialize_ppcobsd_nat): Adjust to C++ification.  Use
6373         add_target.
6374         * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
6375         (the_sh_nbsd_nat_target): New.
6376         (shnbsd_fetch_inferior_registers)
6377         (shnbsd_store_inferior_registers): Refactor as methods of
6378         sh_nbsd_nat_target.
6379         (_initialize_shnbsd_nat): Adjust to C++ification.
6380         * sparc-nat.c (sparc_xfer_wcookie): Make extern.
6381         (inf_ptrace_xfer_partial): Delete.
6382         (sparc_xfer_partial, sparc_target): Delete.
6383         * sparc-nat.h (sparc_fetch_inferior_registers)
6384         (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
6385         (sparc_target): Delete function declaration.
6386         (sparc_target): New template class.
6387         * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
6388         (_initialize_sparcnbsd_nat): Adjust to C++ification.
6389         * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
6390         (_initialize_sparc64fbsd_nat): Adjust to C++ification.  Use
6391         add_target.
6392         * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
6393         (_initialize_sparc64nbsd_nat): Adjust to C++ification.
6394         * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
6395         (_initialize_sparc64obsd_nat): Adjust to C++ification.  Use
6396         add_target.
6397         * vax-bsd-nat.c (vax_bsd_nat_target): New class.
6398         (the_vax_bsd_nat_target): New.
6399         (vaxbsd_fetch_inferior_registers)
6400         (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
6401         methods.
6402         (_initialize_vaxbsd_nat): Adjust to C++ification.
6403
6404         * bsd-kvm.c (bsd_kvm_target): New class.
6405         (bsd_kvm_ops): Now a bsd_kvm_target.
6406         (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
6407         (bsd_kvm_files_info, bsd_kvm_fetch_registers)
6408         (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
6409         bsd_kvm_target.
6410         (bsd_kvm_return_one): Delete.
6411         (bsd_kvm_add_target): Adjust to C++ification.
6412
6413         * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
6414         (nto_procfs_target_procfs): New classes.
6415         (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
6416         (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
6417         (procfs_post_attach, procfs_wait, procfs_fetch_registers)
6418         (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
6419         (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
6420         (procfs_remove_hw_breakpoint, procfs_resume)
6421         (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
6422         (procfs_kill_inferior, procfs_store_registers)
6423         (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
6424         as methods of nto_procfs_target.
6425         (nto_procfs_ops): Now an nto_procfs_target_procfs.
6426         (nto_native_ops): Delete.
6427         (procfs_open, procfs_native_open): Delete.
6428         (nto_native_ops): Now an nto_procfs_target_native.
6429         (init_procfs_targets): Adjust to C++ification.
6430         (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
6431         (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
6432         Refactor as methods of nto_procfs_target.
6433
6434         * go32-nat.c (go32_nat_target): New class.
6435         (the_go32_nat_target): New.
6436         (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
6437         (go32_store_registers, go32_xfer_partial, go32_files_info)
6438         (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
6439         (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
6440         (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
6441         (go32_pid_to_str): Refactor as methods of go32_nat_target.
6442         (go32_target): Delete.
6443         (_initialize_go32_nat): Adjust to C++ification.
6444
6445         * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
6446         (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
6447         (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
6448         (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
6449         gnu_nat_target.
6450         (gnu_target): Delete.
6451         * gnu-nat.h (gnu_target): Delete.
6452         (gnu_nat_target): New class.
6453         * i386-gnu-nat.c (gnu_base_target): New.
6454         (i386_gnu_nat_target): New class.
6455         (the_i386_gnu_nat_target): New.
6456         (_initialize_i386gnu_nat): Adjust to C++ification.
6457
6458 2018-05-02  Pedro Alves  <palves@redhat.com>
6459
6460         * bfd-target.c (target_bfd_xclose): Rename to ...
6461         (target_bfd_close): ... this.
6462         (target_bfd_reopen): Adjust.
6463         * target.c (target_close): Remove references to to_xclose.
6464         * target.h (target_ops::to_xclose): Delete.
6465         (target_ops::to_close): Update comments.
6466
6467 2018-05-02  Pedro Alves  <palves@redhat.com>
6468
6469         * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
6470         "linux-nat.h".
6471         * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
6472         * inf-ptrace.c (inf_ptrace_register_u_offset)
6473         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
6474         (inf_ptrace_store_register, inf_ptrace_store_registers)
6475         (inf_ptrace_trad_target): Move to ...
6476         * linux-nat-trad.c: ... this new file.
6477         * linux-nat-trad.h: New file.
6478         * linux-nat.c (linux_target_install_ops): Make extern.
6479         (linux_trad_target): Delete.
6480         * linux-nat.h (linux_trad_target): Delete declaration.
6481         (linux_target_install_ops): Declare.
6482         * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
6483         "linux-nat.h".
6484
6485 2018-05-02  Pedro Alves  <palves@redhat.com>
6486
6487         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
6488         procfs_target/add_target here.
6489         * procfs.c (procfs_target): Make static.
6490         (_initialize_procfs): Call add_target here.
6491         * procfs.h (struct target_ops): Remove forward declaration.
6492         (procfs_target): Remove declaration.
6493         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
6494
6495 2018-05-02  Pedro Alves  <palves@redhat.com>
6496
6497         * procfs.c (procfs_stopped_by_watchpoint)
6498         (procfs_insert_watchpoint, procfs_remove_watchpoint)
6499         (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
6500         Forward declare.
6501         (procfs_use_watchpoints): Delete, move contents...
6502         (procfs_target): ... here.
6503         * procfs.h (procfs_use_watchpoints): Delete declaration.
6504         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
6505         procfs_use_watchpoints.
6506         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
6507         procfs_use_watchpoints.
6508
6509 2018-05-02  Tom Tromey  <tom@tromey.com>
6510
6511         PR python/20084:
6512         * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
6513         and var_zuinteger_unlimited.
6514         * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
6515         and PARAM_ZUINTEGER_UNLIMITED.
6516         (set_parameter_value): Handle var_zuinteger and
6517         var_zuinteger_unlimited.
6518         (add_setshow_generic): Likewise.
6519         (parmpy_init): Likewise.
6520
6521 2018-04-28  Dan Robertson  <danlrobertson89@gmail.com>
6522
6523         PR rust/23124
6524         * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
6525         pointer is not null before dereferencing it.
6526
6527 2018-04-30  Tom Tromey  <tom@tromey.com>
6528
6529         * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
6530         is_mi_like_p.
6531
6532 2018-04-30  Tom Tromey  <tom@tromey.com>
6533
6534         * breakpoint.c (mention): Remove use of is_mi_like_p.
6535         (print_mention_ranged_breakpoint): Likewise.
6536         * break-catch-throw.c (print_it_exception_catchpoint): Remove use
6537         of is_mi_like_p.
6538
6539 2018-04-30  Tom Tromey  <tom@tromey.com>
6540
6541         * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
6542
6543 2018-04-30  Tom Tromey  <tom@tromey.com>
6544
6545         * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
6546         (info_spu_event_command): Remove some uses of is_mi_like_p.
6547
6548 2018-04-30  Tom Tromey  <tom@tromey.com>
6549
6550         * python/py-framefilter.c (py_print_single_arg)
6551         (enumerate_locals, py_print_args, py_print_frame): Remove some
6552         uses of is_mi_like_p.
6553
6554 2018-04-30  Tom Tromey  <tom@tromey.com>
6555
6556         * ui-out.c: Update.
6557         * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
6558         * ui-out.h (ui_out::is_mi_like_p): Now const.
6559         (ui_out::do_is_mi_like_p): Now const.
6560         * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
6561
6562 2018-04-30  Tom Tromey  <tom@tromey.com>
6563
6564         * varobj.c (varobj_set_visualizer): Use new_reference.
6565         * python/python.c (gdbpy_decode_line): Use new_reference.
6566         * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
6567         new_reference.
6568
6569 2018-04-30  Tom Tromey  <tom@tromey.com>
6570
6571         * varobj.c (install_new_value): Use new_reference.
6572         * value.h (value_incref): Return void.  Swap intro comment with
6573         value_decref.
6574         * value.c (set_value_parent): Use new_reference.
6575         (value_incref): Return void.  Update intro comment.
6576         (release_value): Use new_reference.
6577         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
6578
6579 2018-04-30  Tom Tromey  <tom@tromey.com>
6580
6581         * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
6582         * gdb_bfd.h (new_bfd_ref): Remove.
6583         (gdb_bfd_open): Update comment.
6584         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
6585         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
6586         (gdb_bfd_fdopenr): Use new_reference.
6587         * exec.c (exec_file_attach): Use new_reference.
6588
6589 2018-04-30  Tom Tromey  <tom@tromey.com>
6590
6591         * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
6592         method.
6593
6594 2018-04-30  Tom Tromey  <tom@tromey.com>
6595
6596         * jit.c (jit_read_code_entry): Use type_align.
6597         * i386-tdep.c (i386_gdbarch_init): Don't call
6598         set_gdbarch_long_long_align_bit.
6599         * gdbarch.sh: Remove long_long_align_bit.
6600         * gdbarch.c, gdbarch.h: Rebuild.
6601         * arc-tdep.c (arc_type_align): New function.
6602         (arc_gdbarch_init): Use arc_type_align.  Don't call
6603         set_gdbarch_long_long_align_bit.
6604
6605 2018-04-30  Tom Tromey  <tom@tromey.com>
6606
6607         * rust-lang.c (rust_type_alignment): Remove.
6608         (rust_composite_type): Use type_align.
6609
6610 2018-04-30  Tom Tromey  <tom@tromey.com>
6611
6612         * NEWS: Mention Type.align.
6613         * python/py-type.c (typy_get_alignof): New function.
6614         (type_object_getset): Add "alignof".
6615
6616 2018-04-30  Tom Tromey  <tom@tromey.com>
6617
6618         PR exp/17095:
6619         * NEWS: Update.
6620         * std-operator.def (UNOP_ALIGNOF): New operator.
6621         * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
6622         New.
6623         * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
6624         * c-lang.c (c_op_print_tab): Add alignof.
6625         * c-exp.y (ALIGNOF): New token.
6626         (exp): Add "ALIGNOF" production.
6627         (ident_tokens): Add _Alignof and alignof.
6628
6629 2018-04-30  Tom Tromey  <tom@tromey.com>
6630
6631         * i386-tdep.c (i386_type_align): New function.
6632         (i386_gdbarch_init): Update.
6633         * gdbarch.sh (type_align): New method.
6634         * gdbarch.c, gdbarch.h: Rebuild.
6635         * arch-utils.h (default_type_align): Declare.
6636         * arch-utils.c (default_type_align): New function.
6637         * gdbtypes.h (TYPE_ALIGN_BITS): New define.
6638         (struct type) <align_log2>: New field.
6639         <instance_flags>: Now a bitfield.
6640         (TYPE_RAW_ALIGN): New macro.
6641         (type_align, type_raw_align, set_type_align): Declare.
6642         * gdbtypes.c (type_align, type_raw_align, set_type_align): New
6643         functions.
6644         * dwarf2read.c (quirk_rust_enum): Set type alignment.
6645         (get_alignment, maybe_set_alignment): New functions.
6646         (read_structure_type, read_enumeration_type, read_array_type)
6647         (read_set_type, read_tag_pointer_type, read_tag_reference_type)
6648         (read_subrange_type, read_base_type): Set type alignment.
6649
6650 2018-04-30  Simon Marchi  <simon.marchi@ericsson.com>
6651
6652         * dwarf2read.c (read_index_from_section): Use bool.
6653
6654 2018-04-29  Fabian Groffen  <grobian@gentoo.org>
6655
6656         PR gdb/22950
6657         * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
6658         with #ifdef.
6659
6660 2018-04-29  John Reiser  <jreiser@BitWagon.com>
6661
6662         PR build/22873
6663         * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
6664         last step, and do it atomically.
6665
6666 2018-04-27  Alexandre Oliva  <aoliva@redhat.com>
6667
6668         * compile/compile-c-types.c (convert_int, convert_float):
6669         Update for C FE v1.
6670
6671 2018-04-27  Tom Tromey  <tom@tromey.com>
6672
6673         PR rust/22545:
6674         * rust-lang.c (rust_inclusive_range_type_p): New function.
6675         (rust_range): Handle inclusive ranges.
6676         (rust_compute_range): Likewise.
6677         * rust-exp.y (struct rust_op) <inclusive>: New field.
6678         (DOTDOTEQ): New constant.
6679         (range_expr): Add "..=" productions.
6680         (operator_tokens): Add "..=" token.
6681         (ast_range): Add "inclusive" parameter.
6682         (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
6683         ranges.
6684         * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
6685         bounds values.
6686         * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
6687         LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
6688         Update comments.
6689         * expprint.c (print_subexp_standard): Handle new bounds values.
6690         (dump_subexp_body_standard): Likewise.
6691
6692 2018-04-27  Tom Tromey  <tom@tromey.com>
6693
6694         * configure: Rebuild.
6695         * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
6696         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
6697         "OVERRIDE".
6698         (class symbol_needs_eval_context): Likewise.
6699         * dwarf2read.c (mock_mapped_index::symbol_name_count)
6700         (mock_mapped_index::symbol_name_at): Use "override".  Remove
6701         "virtual".
6702         * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
6703         "override".
6704         (class dwarf_expr_executor): Use "override", not "OVERRIDE".
6705         * aarch64-tdep.c (instruction_reader::read): Use "override".
6706         (instruction_reader_test::read): Likewise.
6707         * arm-tdep.c (instruction_reader::read): Use "override".
6708         (instruction_reader_thumb::read): Likewise.
6709
6710 2018-04-26  Andrzej Kaczmarek  <andrzej.kaczmarek@codecoup.pl>
6711
6712         PR remote/9665
6713         * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
6714         instead of remote_send.
6715         (remote_send): Remove.
6716
6717 2018-04-26  Pedro Alves  <palves@redhat.com>
6718
6719         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
6720         find_function_start_sal instead of find_pc_line.
6721
6722 2018-04-26  Pedro Alves  <palves@redhat.com>
6723
6724         * breakpoint.c (set_breakpoint_location_function): Handle
6725         mst_data_gnu_ifunc.
6726         * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
6727         * elfread.c (elf_symtab_read): Give data symbols with
6728         BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
6729         (elf_rel_plt_read): Update comment.
6730         * linespec.c (convert_linespec_to_sals): Handle
6731         mst_data_gnu_ifunc.
6732         (minsym_found): Handle mst_data_gnu_ifunc.
6733         * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
6734         (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
6735         * parse.c (find_minsym_type_and_address): Handle
6736         mst_data_gnu_ifunc.
6737         * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
6738         * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
6739         * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
6740         comment.
6741         <mst_data_gnu_ifunc>: New enumerator.
6742
6743 2018-04-26  Pedro Alves  <palves@redhat.com>
6744
6745         * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
6746         (lookup_minimal_symbol_by_pc_section): ... this.  Replace
6747         'want_trampoline' parameter by a lookup_msym_prefer parameter.
6748         Handle it.
6749         (lookup_minimal_symbol_by_pc_section): Delete old implementation.
6750         (lookup_minimal_symbol_by_pc): Adjust.
6751         (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
6752         (lookup_solib_trampoline_symbol_by_pc): Adjust.
6753         * minsyms.h (lookup_msym_prefer): New enum.
6754         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
6755         parameter by a lookup_msym_prefer parameter.
6756
6757 2018-04-26  Pedro Alves  <palves@redhat.com>
6758
6759         * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
6760         ends in "@plt" instead of looking at the symbol's section.
6761
6762 2018-04-26  Pedro Alves  <palves@redhat.com>
6763
6764         * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete.  Remove
6765         all references.
6766         (find_pc_partial_function_gnu_ifunc): Rename to ...
6767         (find_pc_partial_function): ... this, and remove references to
6768         'is_gnu_ifunc_p'.
6769         (find_pc_partial_function): Delete old implementation.
6770         * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
6771
6772 2018-04-26  Pedro Alves  <palves@redhat.com>
6773
6774         * linespec.c (struct bound_minimal_symbol_search_key): New.
6775         (convert_linespec_to_sals): Sort minimal symbols earlier.  Don't
6776         skip first line if we found a GNU ifunc minimal symbol by name.
6777         (compare_msymbols): Change parameters to work with a destructured
6778         lhs minsym.
6779         (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
6780         functions.
6781
6782 2018-04-26  Pedro Alves  <palves@redhat.com>
6783
6784         * breakpoint.c (set_breakpoint_location_function): Don't resolve
6785         ifunc targets here.  Instead, if we have an ifunc minsym, use its
6786         address/name.
6787         (add_location_to_breakpoint): Store the minsym and the objfile in
6788         the breakpoint location.
6789         * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
6790         * linespec.c (minsym_found): Resolve GNU ifunc targets here.
6791         Record the minsym in the sal.
6792         * symtab.h (symtab_and_line) <msymbol>: New field.
6793
6794 2018-04-26  Pedro Alves  <palves@redhat.com>
6795
6796         * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
6797         unless we actually resolved the ifunc.
6798
6799 2018-04-26  Pedro Alves  <palves@redhat.com>
6800
6801         * c-exp.y (variable production): Prefer ifunc minsyms over
6802         regular function symbols.
6803         * symtab.c (find_gnu_ifunc): New function.
6804         * minsyms.h (lookup_msym_prefer): New enum.
6805         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
6806         parameter by a lookup_msym_prefer parameter.
6807         * symtab.h (find_gnu_ifunc): New declaration.
6808
6809 2018-04-26  Pedro Alves  <palves@redhat.com>
6810
6811         * blockframe.c (find_gnu_ifunc_target_type): New function.
6812         (find_function_type): New.
6813         * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
6814         return a value with a memory address.
6815         (eval_call): For calls to GNU ifunc functions, try to find the
6816         type of the target function from the type that the resolver
6817         returns.
6818         * gdbtypes.c (objfile_type): Don't install a return type for ifunc
6819         symbols.
6820         * infcall.c (find_function_return_type): Delete.
6821         (find_function_addr): Add 'function_type' parameter.  For calls to
6822         GNU ifunc functions, try to find the type of the target function
6823         from the type that the resolver returns, and return it via
6824         FUNCTION_TYPE.
6825         (call_function_by_hand_dummy): Adjust to use the function type
6826         returned by find_function_addr.
6827         (find_function_addr): Add 'function_type' parameter and move
6828         description here.
6829         * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
6830         declarations.
6831
6832 2018-04-26  Pedro Alves  <palves@redhat.com>
6833
6834         * c-exp.y (variable production): Skip finding an alias for ifunc
6835         symbols.
6836
6837 2018-04-26  Pedro Alves  <palves@redhat.com>
6838
6839         * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
6840
6841 2018-04-25  Pedro Alves  <palves@redhat.com>
6842
6843         * infcmd.c (kill_command): Print the pid as string, not the whole
6844         thread's ptid.  Add comment.  s/has been killed/killed/ in output
6845         message.
6846         * remote.c (remote_detach_1): Print the pid as string, not the
6847         whole thread's ptid.
6848
6849 2018-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
6850             Sergio Durigan Junior  <sergiodj@redhat.com>
6851             Pedro Alves  <palves@redhat.com>
6852
6853         * infcmd.c (kill_command): Print message when inferior has
6854         been killed.
6855         * inferior.c (print_inferior_events): Remove 'static'.  Set as
6856         '1'.
6857         (add_inferior): Improve message printed when
6858         'print_inferior_events' is on.
6859         (exit_inferior): Remove message printed when
6860         'print_inferior_events' is on.
6861         (detach_inferior): Improve message printed when
6862         'print_inferior_events' is on.
6863         (initialize_inferiors): Use 'add_inferior_silent' to set
6864         'current_inferior_'.
6865         * inferior.h (print_inferior_events): Declare here as
6866         'extern'.
6867         * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
6868         '[Detaching...]' messages when 'print_inferior_events' is on.
6869         Use 'add_thread_silent' instead of 'add_thread'.  Add '[' and ']'
6870         as prefix/suffix for messages.  Remove periods.  Fix erroneous
6871         'Detaching after fork from child...', replace it by '... from
6872         parent...'.
6873         (handle_vfork_child_exec_or_exit): Add '[' and ']' as
6874         prefix/suffix when printing 'Detaching...' messages.  Print
6875         them when 'print_inferior_events' is on.
6876         * remote.c (remote_detach_1): Print message when detaching
6877         from inferior and '!is_fork_parent'.
6878
6879 2018-04-24  Tom Tromey  <tom@tromey.com>
6880
6881         * cli-out.h: Reindent.
6882
6883 2018-04-24  Tom Tromey  <tom@tromey.com>
6884
6885         * cli-out.c (cli_ui_out::out_field_fmt): Remove.
6886         (cli_ui_out::do_field_string): Use fputs_filtered.
6887         * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
6888
6889 2018-04-23  Tom Tromey  <tom@tromey.com>
6890
6891         * guile/scm-frame.c (gdbscm_frame_read_var): Use
6892         gdb::unique_xmalloc_ptr.
6893
6894 2018-04-23  Tom Tromey  <tom@tromey.com>
6895
6896         * configure: Rebuild.
6897
6898 2018-04-22  Rajendra SY  <rajendra.sy@gmail.com>
6899
6900         PR gdb/23095
6901         * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
6902         prepare_for_testing.  Set normal_bp to r_debug_state if target
6903         is bsd.
6904
6905 2018-04-21  Pedro Alves  <palves@redhat.com>
6906             Rajendra SY  <rajendra.sy@gmail.com>
6907
6908         * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
6909         * remote.c (extended_remote_attach): In all-stop mode, mark the
6910         thread as executing.
6911
6912 2018-04-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6913
6914         * thread.c (thread_apply_all_command): Fix comment.
6915         (thread_command): Fix comment.
6916
6917 2018-04-10  Alan Hayward  <alan.hayward@arm.com>
6918
6919         * common/tdesc.h (tdesc_create_feature): Remove xml filename
6920         parameter.
6921         * features/aarch64-core.c (create_feature_aarch64_core):
6922         Regenerate.
6923         * features/aarch64-fpu.c (create_feature_aarch64_fpu):
6924         Likewise.
6925         * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
6926         Likewise.
6927         * features/i386/32bit-avx512.c
6928         (create_feature_i386_32bit_avx512): Likewise.
6929         * features/i386/32bit-core.c (create_feature_i386_32bit_core):
6930         Likewise.
6931         * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
6932         Likewise.
6933         * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
6934         Likewise.
6935         * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
6936         Likewise.
6937         * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
6938         Likewise.
6939         * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
6940         Likewise.
6941         * features/i386/64bit-avx512.c
6942         (create_feature_i386_64bit_avx512): Likewise.
6943         * features/i386/64bit-core.c (create_feature_i386_64bit_core):
6944         Likewise.
6945         * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
6946         Likewise.
6947         * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
6948         Likewise.
6949         * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
6950         Likewise.
6951         * features/i386/64bit-segments.c
6952         (create_feature_i386_64bit_segments): Likewise.
6953         * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
6954         Likewise.
6955         * features/i386/x32-core.c
6956         (create_feature_i386_x32_core): Likewise.
6957         * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
6958         * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
6959         * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
6960         * target-descriptions.c: In generated code, don't pass xml
6961         filename.
6962
6963 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
6964
6965         * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
6966         (print_xml_feature::visit_post): Likewise.
6967         (print_xml_feature::visit): Likewise.
6968         * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
6969         (print_xml_feature): Add new class.
6970         * regformats/regdat.sh: Null xmltarget on feature targets.
6971         * target-descriptions.c (struct target_desc): Add xmltarget.
6972         (maintenance_check_tdesc_xml_convert): Add unittest function.
6973         (tdesc_get_features_xml): Add function to get xml.
6974         (maintenance_check_xml_descriptions): Test xml generation.
6975         * xml-tdesc.c (string_read_description_xml): Add function.
6976         * xml-tdesc.h (string_read_description_xml): Add declaration.
6977
6978 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
6979
6980         * features/Makefile: Add feature marker to targets with new style
6981         target descriptions.
6982         * regformats/aarch64.dat: Regenerate.
6983         * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
6984         * regformats/i386/amd64-avx-linux.dat: Likewise.
6985         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
6986         * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
6987         * regformats/i386/amd64-linux.dat: Likewise.
6988         * regformats/i386/amd64-mpx-linux.dat: Likewise.
6989         * regformats/i386/amd64.dat: Likewise.
6990         * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
6991         * regformats/i386/i386-avx-linux.dat: Likewise.
6992         * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
6993         * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
6994         * regformats/i386/i386-linux.dat: Likewise.
6995         * regformats/i386/i386-mmx-linux.dat: Likewise.
6996         * regformats/i386/i386-mpx-linux.dat: Likewise.
6997         * regformats/i386/i386.dat: Likewise.
6998         * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
6999         * regformats/i386/x32-avx-linux.dat: Likewise.
7000         * regformats/i386/x32-linux.dat: Likewise.
7001         * regformats/tic6x-c62x-linux.dat: Likewise.
7002         * regformats/tic6x-c64x-linux.dat: Likewise.
7003         * regformats/tic6x-c64xp-linux.dat: Likewise.
7004         * regformats/regdat.sh: Parse feature marker.
7005
7006 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
7007
7008         * common/tdesc.h (tdesc_architecture_name): Add new declaration.
7009         (tdesc_osabi_name): Likewise.
7010         * target-descriptions.c (tdesc_architecture_name): Add new
7011         function.
7012         (tdesc_osabi_name): Likewise.
7013
7014 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
7015
7016         * common/tdesc.c (tdesc_predefined_type): Move to here.
7017         (tdesc_named_type): Likewise.
7018         (tdesc_create_vector): Likewise.
7019         (tdesc_create_struct): Likewise.
7020         (tdesc_set_struct_size): Likewise.
7021         (tdesc_create_union): Likewise.
7022         (tdesc_create_flags): Likewise.
7023         (tdesc_create_enum): Likewise.
7024         (tdesc_add_field): Likewise.
7025         (tdesc_add_typed_bitfield): Likewise.
7026         (tdesc_add_bitfield): Likewise.
7027         (tdesc_add_flag): Likewise.
7028         (tdesc_add_enum_value): Likewise.
7029         * common/tdesc.h (struct tdesc_type_builtin): Likewise.
7030         (struct tdesc_type_vector): Likewise.
7031         (struct tdesc_type_field): Likewise.
7032         (struct tdesc_type_with_fields): Likewise.
7033         (tdesc_create_enum): Add declaration.
7034         (tdesc_add_typed_bitfield): Likewise.
7035         (tdesc_add_enum_value): Likewise.
7036         * target-descriptions.c (tdesc_type_field): Move from here.
7037         (tdesc_type_builtin): Likewise.
7038         (tdesc_type_vector): Likewise.
7039         (tdesc_type_with_fields): Likewise.
7040         (tdesc_predefined_types): Likewise.
7041         (tdesc_named_type): Likewise.
7042         (tdesc_create_vector): Likewise.
7043         (tdesc_create_struct): Likewise.
7044         (tdesc_set_struct_size): Likewise.
7045         (tdesc_create_union): Likewise.
7046         (tdesc_create_flags): Likewise.
7047         (tdesc_create_enum): Likewise.
7048         (tdesc_add_field): Likewise.
7049         (tdesc_add_typed_bitfield): Likewise.
7050         (tdesc_add_bitfield): Likewise.
7051         (tdesc_add_flag): Likewise.
7052         (tdesc_add_enum_value): Likewise.
7053         * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
7054         (tdesc_add_typed_bitfield): Likewise.
7055         (tdesc_add_enum_value): Likewise.
7056
7057 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
7058
7059         * common/tdesc.c (tdesc_feature::accept): Move to here.
7060         (tdesc_feature::operator==): Likewise.
7061         (tdesc_create_reg): Likewise.
7062         * common/tdesc.h (tdesc_type_kind): Likewise.
7063         (struct tdesc_type): Likewise.
7064         (struct tdesc_feature): Likewise.
7065         * regformats/regdat.sh: Create a feature.
7066         * target-descriptions.c (tdesc_type_kind): Move from here.
7067         (tdesc_type): Likewise.
7068         (tdesc_type_up): Likewise.
7069         (tdesc_feature): Likewise.
7070         (tdesc_create_reg): Likewise.
7071
7072 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
7073
7074         * Makefile.in: Add arch/tdesc.c
7075         * common/tdesc.c: New file.
7076         * common/tdesc.h (tdesc_element_visitor): Move to here.
7077         (tdesc_element): Likewise.
7078         (tdesc_reg): Likewise.
7079         (tdesc_reg_up): Likewise.
7080         * regformats/regdef.h (reg): Add offset to constructors.
7081         * target-descriptions.c (tdesc_element_visitor): Move from here.
7082         (tdesc_element): Likewise.
7083         (tdesc_reg): Likewise.
7084         (tdesc_reg_up): Likewise.
7085
7086 2018-04-17  Tom Tromey  <tom@tromey.com>
7087
7088         * dwarf2read.c (quirk_rust_enum): Conditionally drop the
7089         discriminant field.
7090
7091 2018-04-17  Tom Tromey  <tom@tromey.com>
7092
7093         * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
7094
7095 2018-04-17  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7096
7097         * symtab.c (print_symbol_info): Skip printing filename and line
7098         number when `last' is NULL.
7099         (symtab_symbol_info): Use empty string instead of NULL for first
7100         invocation of print_symbol_info.
7101         (rbreak_command): Pass NULL to `last' parameter of
7102         print_symbol_info.
7103
7104 2018-04-16  Simon Marchi  <simon.marchi@ericsson.com>
7105
7106         * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
7107         instead of nullptr.
7108
7109 2018-04-16  Pedro Alves  <palves@redhat.com>
7110
7111         * MAINTAINERS (sh): Remove.
7112         * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
7113         (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
7114         (ALLDEPFILES): Remove sh64-tdep.c.
7115         * NEWS: Mentions that support for SH-5/SH64 is removed.
7116         * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
7117         (sh*-*-openbsd*): Ditto.
7118         (sh64-*-elf*): Remove.
7119         (sh*): Remove.
7120         * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
7121         * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
7122         * sh-tdep.c: No longer include "sh64-tdep.h".
7123         (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
7124         * sh64-tdep.c, sh64-tdep.h: Remove files.
7125
7126 2018-04-16  Pedro Alves  <palves@redhat.com>
7127
7128         * MAINTAINERS: Remove m88k.
7129         * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
7130         (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
7131         (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
7132         * NEWS: Mention that support for m88k was removed.
7133         * configure.host (m88*-*-*): Remove support.
7134         * configure.nat (m88k-*-*): Remove support.
7135         * configure.tgt (m88*-*-openbsd*): Remove.
7136         * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
7137
7138 2018-04-15  Simon Marchi  <simon.marchi@polymtl.ca>
7139
7140         * configure.tgt (x86_tobjs): New variable.
7141         (amd64_tobjs, i386_tobjs): Use it.
7142
7143 2018-04-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7144
7145         * symtab.c (print_symbol_info): Precede the symbol definition by
7146         the line number when available.
7147         * NEWS: Advertise this enhancement.
7148
7149 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
7150
7151         * NEWS (New options): announce set/show record btrace cpu.
7152         * btrace.c: Include record-btrace.h.
7153         (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
7154         the vendor is unknown.
7155         (btrace_compute_ftrace_1): Add cpu parameter.  Update callers.
7156         Maybe overwrite the btrace configuration's cpu.
7157         (btrace_compute_ftrace): Add cpu parameter.  Update callers.
7158         (btrace_fetch): Add cpu parameter.  Update callers.
7159         (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
7160         Maybe overwrite the btrace configuration's cpu.  Skip enabling
7161         errata workarounds if the vendor is unknown.
7162         * python/py-record-btrace.c: Include record-btrace.h.
7163         (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
7164         (recpy_bt_function_call_history): Call record_btrace_get_cpu.
7165         * record-btrace.c (record_btrace_cpu_state_kind): New.
7166         (record_btrace_cpu): New.
7167         (set_record_btrace_cpu_cmdlist): New.
7168         (record_btrace_get_cpu): New.
7169         (require_btrace_thread, record_btrace_info)
7170         (record_btrace_resume_thread): Call record_btrace_get_cpu.
7171         (cmd_set_record_btrace_cpu_none): New.
7172         (cmd_set_record_btrace_cpu_auto): New.
7173         (cmd_set_record_btrace_cpu): New.
7174         (cmd_show_record_btrace_cpu): New.
7175         (_initialize_record_btrace): Initialize set/show record btrace cpu
7176         commands.
7177         * record-btrace.h (record_btrace_get_cpu): New.
7178
7179 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
7180
7181         * record.c (set_record_command): Fix typo in message.
7182
7183 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
7184
7185         * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
7186
7187 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
7188
7189         * infrun.c (process_event_stop_test): Call
7190         gdbarch_in_indirect_branch_thunk.
7191         * gdbarch.sh (in_indirect_branch_thunk): New.
7192         * gdbarch.c: Regenerated.
7193         * gdbarch.h: Regenerated.
7194         * x86-tdep.h: New.
7195         * x86-tdep.c: New.
7196         * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
7197         (HFILES_NO_SRCDIR): Add x86-tdep.h.
7198         (ALLDEPFILES): Add x86-tdep.c.
7199         * arch-utils.h (default_in_indirect_branch_thunk): New.
7200         * arch-utils.c (default_in_indirect_branch_thunk): New.
7201         * i386-tdep: Include x86-tdep.h.
7202         (i386_in_indirect_branch_thunk): New.
7203         (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
7204         function.
7205         * amd64-tdep: Include x86-tdep.h.
7206         (amd64_in_indirect_branch_thunk): New.
7207         (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
7208
7209 2018-04-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
7210
7211         PR gdb/23053
7212         * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
7213         (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
7214         (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
7215         regression.
7216
7217 2018-04-12  Tom Tromey  <tom@tromey.com>
7218
7219         * rust-lang.c (rust_print_struct_def): Remove univariant code.
7220         (rust_evaluate_subexp): Likewise.
7221
7222 2018-04-12  Pedro Alves  <palves@redhat.com>
7223
7224         * procfs.c (procfs_detach): Make forward declaration's prototype
7225         match definition's protototype.
7226         (proc_get_LDT_entry): Remove stale do_cleanups call.
7227
7228 2018-04-12  Pedro Alves  <palves@redhat.com>
7229
7230         * target.h (target_ops::to_has_exited): Delete.
7231         (target_has_exited): Delete.
7232         * target-delegates.c: Regenerate.
7233
7234 2018-04-11  Pedro Alves  <palves@redhat.com>
7235
7236         * target.c (fileio_fh_t::t): Add comment.
7237         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
7238         (target_fileio_close): Handle a NULL target.
7239         (invalidate_fileio_fh): New.
7240         (target_close): Call it.
7241         * remote.c (remote_hostio_send_command): No longer check whether
7242         remote_desc is open.
7243
7244 2018-04-11  Pedro Alves  <palves@redhat.com>
7245
7246         * target.c (fileio_fh_t): Make it a named struct instead of a
7247         typedef.
7248         (fileio_fh_t::is_closed): New method.
7249         (DEF_VEC_O (fileio_fh_t)): Remove.
7250         (fileio_fhandles): Now a std::vector.
7251         (is_closed_fileio_fh): Delete.
7252         (acquire_fileio_fd): Adjust.  Rename parameters.
7253         (release_fileio_fd): Adjust.
7254         (fileio_fd_to_fh): Reimplement as a function instead of a macro.
7255         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
7256         (target_fileio_close): Adjust.
7257
7258 2018-04-10  Simon Marchi  <simon.marchi@ericsson.com>
7259
7260         * auto-load.c (auto_load_safe_path_vec_update): Iterate by
7261         index.
7262
7263 2018-04-10  Pedro Alves  <palves@redhat.com>
7264
7265         * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
7266         (scoped_finish_thread_state): New class.
7267         * infcmd.c (run_command_1): Use it instead of finish_thread_state
7268         cleanup.
7269         * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
7270         (fetch_inferior_event, normal_stop): Likewise.
7271         * thread.c (finish_thread_state_cleanup): Delete.
7272
7273 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
7274             Pedro Alves  <palves@redhat.com>
7275
7276         * value.c: Include "selftest.h" and "common/array-view.h".
7277         (struct range) <operator ==>: New.
7278         (test_ranges_contain): New.
7279         (check_ranges_vector): New.
7280         (test_insert_into_bit_range_vector): New.
7281         (_initialize_values): Register selftests.
7282         * common/array-view.h (operator==, operator!=): New.
7283
7284 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
7285
7286         * common/gdb_vecs.h (unordered_remove): Add overload that takes
7287         an iterator.
7288         * inline-frame.c: Include <algorithm>.
7289         (struct inline_state): Add constructor.
7290         (inline_state_s): Remove.
7291         (DEF_VEC_O(inline_state_s)): Remove.
7292         (inline_states): Change type to std::vector.
7293         (find_inline_frame_state): Adjust to std::vector.
7294         (allocate_inline_frame_state): Remove.
7295         (clear_inline_frame_state): Adjust to std::vector.
7296         (skip_inline_frames): Adjust to std::vector.
7297
7298 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
7299
7300         * tracepoint.h (struct trace_state_variable): Add constructor.
7301         <name>: Change type to std::string.
7302         * tracepoint.c (tsv_s): Remove.
7303         (DEF_VEC_O(tsv_s)): Remove.
7304         (tvariables): Change to std::vector.
7305         (create_trace_state_variable): Adjust to std::vector.
7306         (find_trace_state_variable): Likewise.
7307         (find_trace_state_variable_by_number): Likewise.
7308         (delete_trace_state_variable): Likewise.
7309         (trace_variable_command): Adjust to std::string.
7310         (delete_trace_variable_command): Likewise.
7311         (tvariables_info_1): Adjust to std::vector.
7312         (save_trace_state_variables): Likewise.
7313         (start_tracing): Likewise.
7314         (merge_uploaded_trace_state_variables): Adjust to std::vector
7315         and std::string.
7316         * target.h (struct target_ops)
7317         <to_download_trace_state_variable>: Pass reference to
7318         trace_state_variable.
7319         * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
7320         * target-delegates.c: Re-generate.
7321         * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
7322         (mi_tsv_deleted): Likewise.
7323         * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
7324         * remote.c (remote_download_trace_state_variable): Change
7325         pointer to reference and adjust.
7326         * make-target-delegates (parse_argtypes): Handle references.
7327         (write_function_header): Likewise.
7328         (munge_type): Likewise.
7329
7330 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
7331
7332         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7333         string_view-selftests.c.
7334         * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
7335         testsuite.
7336         * unittests/basic_string_view/cons/char/1.cc: Likewise.
7337         * unittests/basic_string_view/cons/char/2.cc: Likewise.
7338         * unittests/basic_string_view/cons/char/3.cc: Likewise.
7339         * unittests/basic_string_view/element_access/char/1.cc:
7340         Likewise.
7341         * unittests/basic_string_view/element_access/char/empty.cc:
7342         Likewise.
7343         * unittests/basic_string_view/element_access/char/front_back.cc:
7344         Likewise.
7345         * unittests/basic_string_view/inserters/char/2.cc: Likewise.
7346         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
7347         Likewise.
7348         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
7349         Likewise.
7350         * unittests/basic_string_view/modifiers/swap/char/1.cc:
7351         Likewise.
7352         * unittests/basic_string_view/operations/compare/char/1.cc:
7353         Likewise.
7354         * unittests/basic_string_view/operations/compare/char/13650.cc:
7355         Likewise.
7356         * unittests/basic_string_view/operations/copy/char/1.cc:
7357         Likewise.
7358         * unittests/basic_string_view/operations/data/char/1.cc:
7359         Likewise.
7360         * unittests/basic_string_view/operations/find/char/1.cc:
7361         Likewise.
7362         * unittests/basic_string_view/operations/find/char/2.cc:
7363         Likewise.
7364         * unittests/basic_string_view/operations/find/char/3.cc:
7365         Likewise.
7366         * unittests/basic_string_view/operations/find/char/4.cc:
7367         Likewise.
7368         * unittests/basic_string_view/operations/rfind/char/1.cc:
7369         Likewise.
7370         * unittests/basic_string_view/operations/rfind/char/2.cc:
7371         Likewise.
7372         * unittests/basic_string_view/operations/rfind/char/3.cc:
7373         Likewise.
7374         * unittests/basic_string_view/operations/substr/char/1.cc:
7375         Likewise.
7376         * unittests/basic_string_view/operators/char/2.cc: Likewise.
7377         * unittests/string_view-selftests.c: New file.
7378
7379 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
7380
7381         * unittests/basic_string_view/capacity/1.cc: New file.
7382         * unittests/basic_string_view/capacity/empty_neg.cc: New file.
7383         * unittests/basic_string_view/cons/char/1.cc: New file.
7384         * unittests/basic_string_view/cons/char/2.cc: New file.
7385         * unittests/basic_string_view/cons/char/3.cc: New file.
7386         * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
7387         * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
7388         * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
7389         * unittests/basic_string_view/element_access/char/1.cc: New file.
7390         * unittests/basic_string_view/element_access/char/2.cc: New file.
7391         * unittests/basic_string_view/element_access/char/empty.cc: New file.
7392         * unittests/basic_string_view/element_access/char/front_back.cc: New file.
7393         * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
7394         * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
7395         * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
7396         * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
7397         * unittests/basic_string_view/include.cc: New file.
7398         * unittests/basic_string_view/inserters/char/1.cc: New file.
7399         * unittests/basic_string_view/inserters/char/2.cc: New file.
7400         * unittests/basic_string_view/inserters/char/3.cc: New file.
7401         * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
7402         * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
7403         * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
7404         * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
7405         * unittests/basic_string_view/literals/types.cc: New file.
7406         * unittests/basic_string_view/literals/values.cc: New file.
7407         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
7408         * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
7409         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
7410         * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
7411         * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
7412         * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
7413         * unittests/basic_string_view/operations/compare/char/1.cc: New file.
7414         * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
7415         * unittests/basic_string_view/operations/compare/char/2.cc: New file.
7416         * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
7417         * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
7418         * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
7419         * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
7420         * unittests/basic_string_view/operations/copy/char/1.cc: New file.
7421         * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
7422         * unittests/basic_string_view/operations/data/char/1.cc: New file.
7423         * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
7424         * unittests/basic_string_view/operations/find/char/1.cc: New file.
7425         * unittests/basic_string_view/operations/find/char/2.cc: New file.
7426         * unittests/basic_string_view/operations/find/char/3.cc: New file.
7427         * unittests/basic_string_view/operations/find/char/4.cc: New file.
7428         * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
7429         * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
7430         * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
7431         * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
7432         * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
7433         * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
7434         * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
7435         * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
7436         * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
7437         * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
7438         * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
7439         * unittests/basic_string_view/operations/substr/char/1.cc: New file.
7440         * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
7441         * unittests/basic_string_view/operators/char/2.cc: New file.
7442         * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
7443         * unittests/basic_string_view/range_access/char/1.cc: New file.
7444         * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
7445         * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
7446         * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
7447         * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
7448         * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
7449         * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
7450         * unittests/basic_string_view/requirements/typedefs.cc: New file.
7451         * unittests/basic_string_view/typedefs.cc: New file.
7452         * unittests/basic_string_view/types/1.cc: New file.
7453
7454 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
7455
7456         * common/gdb_string_view.h: Remove libstdc++ implementation
7457         details, adjust to gdb reality.
7458         * common/gdb_string_view.tcc: Likewise.
7459         * cli/cli-script.c (struct string_view): Remove.
7460         (user_args) <m_args>: Change element type to gdb::string_view.
7461         (user_args::insert_args): Adjust.
7462
7463 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
7464
7465         * common/gdb_string_view.h: New file.
7466         * common/gdb_string_view.tcc: New file.
7467
7468 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
7469
7470         * ax_cxx_compile_stdcxx.m4: Sync with upstream.
7471         * configure: Re-generate.
7472
7473 2018-04-09  Pedro Alves  <palves@redhat.com>
7474
7475         * gdbarch.sh: Include "observable.h" instead of "observer.h".
7476         (set_target_gdbarch): Call
7477         gdb::observers::architecture_changed.notify instead of
7478         observer_notify_architecture_changed.
7479
7480 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
7481
7482         * tracepoint.c (struct current_traceframe_cleanup): Remove.
7483         (do_restore_current_traceframe_cleanup): Remove.
7484         (restore_current_traceframe_cleanup_dtor): Remove.
7485         (make_cleanup_restore_current_traceframe): Remove.
7486         (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
7487         New.
7488         * tracepoint.h (struct scoped_restore_current_traceframe): New.
7489         * infrun.c (fetch_inferior_event): Use
7490         scoped_restore_current_traceframe.
7491
7492 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
7493
7494         * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
7495         Remove.
7496         <n_allocated_type_units>: Remove.
7497         <all_type_units>: Change to std::vector.
7498         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
7499         to std::vector change.
7500         (dwarf2_per_objfile::get_cutu): Likewise.
7501         (dwarf2_per_objfile::get_tu): Likewise.
7502         (create_signatured_type_table_from_index): Likewise.
7503         (create_signatured_type_table_from_debug_names): Likewise.
7504         (dw2_symtab_iter_next): Likewise.
7505         (dw2_print_stats): Likewise.
7506         (dw2_expand_all_symtabs): Likewise.
7507         (dw2_expand_marked_cus): Likewise.
7508         (dw2_debug_names_iterator::next): Likewise.
7509         (dwarf2_initialize_objfile): Likewise.
7510         (add_signatured_type_cu_to_table): Likewise.
7511         (create_all_type_units): Likewise.
7512         (add_type_unit): Likewise.
7513         (struct tu_abbrev_offset): Add constructor.
7514         (build_type_psymtabs_1): Adjust to std::vector change.
7515         (print_tu_stats): Likewise.
7516         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
7517         (write_debug_names): Likewise.
7518
7519 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
7520
7521         * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
7522         Make an std::vector.
7523         <n_comp_units>: Remove.
7524         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
7525         to std::vector change.
7526         (dwarf2_per_objfile::get_cutu): Likewise.
7527         (dwarf2_per_objfile::get_cu): Likewise.
7528         (create_cus_from_index): Likewise.
7529         (create_addrmap_from_index): Likewise.
7530         (create_addrmap_from_aranges): Likewise.
7531         (dwarf2_read_index): Likewise.
7532         (dw2_find_last_source_symtab): Likewise.
7533         (dw2_map_symtabs_matching_filename): Likewise.
7534         (dw2_symtab_iter_next): Likewise.
7535         (dw2_print_stats): Likewise.
7536         (dw2_expand_all_symtabs): Likewise.
7537         (dw2_expand_symtabs_with_fullname): Likewise.
7538         (dw2_expand_marked_cus): Likewise.
7539         (dw2_map_symbol_filenames): Likewise.
7540         (create_cus_from_debug_names): Likewise.
7541         (dwarf2_read_debug_names): Likewise.
7542         (dw2_debug_names_iterator::next): Likewise.
7543         (dwarf2_initialize_objfile): Likewise.
7544         (set_partial_user): Likewise.
7545         (dwarf2_build_psymtabs_hard): Likewise.
7546         (read_comp_units_from_section): Remove arguments, adjust to
7547         std::vector change.
7548         (create_all_comp_units): Adjust to std::vector and
7549         read_comp_units_from_section changes.
7550         (dwarf2_find_containing_comp_unit): Adjust to std::vector
7551         change.
7552         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
7553         (psyms_seen_size): Likewise.
7554         (write_gdbindex): Likewise.
7555         (write_debug_names): Likewise.
7556
7557 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
7558
7559         * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
7560         with dwarf2_per_objfile.
7561         (create_cus_from_index): Likewise.
7562         (create_signatured_type_table_from_index): Likewise.
7563         (dwarf2_read_index): Likewise.
7564         (dwarf2_initialize_objfile): Likewise.
7565         (dwarf2_fetch_die_loc_sect_off):  Get dwarf2_per_objfile from
7566         per_cu rather than get_dwarf2_per_objfile.
7567
7568 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
7569
7570         * dwarf2read.h (struct signatured_type): Forward declare.
7571         (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
7572         New methods.
7573         * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
7574         (dw2_get_cutu): ...this.
7575         (dwarf2_per_objfile::get_cu): Rename from...
7576         (dw2_get_cu): ...this.
7577         (dwarf2_per_objfile::get_tu): New.
7578         (create_addrmap_from_index): Adjust.
7579         (create_addrmap_from_aranges): Adjust.
7580         (dw2_find_last_source_symtab): Adjust.
7581         (dw2_map_symtabs_matching_filename): Adjust.
7582         (dw2_symtab_iter_next): Adjust.
7583         (dw2_print_stats): Adjust.
7584         (dw2_expand_all_symtabs): Adjust.
7585         (dw2_expand_symtabs_with_fullname): Adjust.
7586         (dw2_expand_marked_cus): Adjust.
7587         (dw_expand_symtabs_matching_file_matcher): Adjust.
7588         (dw2_map_symbol_filenames): Adjust.
7589         (dw2_debug_names_iterator::next): Adjust.
7590         (dwarf2_initialize_objfile): Adjust.
7591         (set_partial_user): Adjust.
7592         (dwarf2_build_psymtabs_hard): Adjust.
7593
7594 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
7595
7596         * dwarf2read.c (create_signatured_type_table_from_debug_names):
7597         Remove unused variables.
7598         (dw2_map_symtabs_matching_filename): Likewise.
7599         (dwarf2_record_block_ranges): Likewise.
7600         (dwarf2_read_addr_index): Likewise.
7601         (follow_die_offset): Likewise.
7602
7603 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
7604
7605         * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
7606         to symbol_file_add_main.
7607
7608 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
7609
7610         PR mi/22299
7611         * mi/mi-console.c (do_fputc_async_safe): New.
7612         (mi_console_file::write_async_safe): New.
7613         (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
7614         * mi/mi-console.h (class mi_console_file) <write_async_safe>:
7615         New.
7616         * ui-file.c (ui_file::putstrn): Adjust call to
7617         fputstrn_unfiltered.
7618         * utils.c (printchar): Replace do_fputs and do_fprintf
7619         parameters by do_fputc.
7620         (fputstr_filtered): Adjust call to printchar.
7621         (fputstr_unfiltered): Likewise.
7622         (fputstrn_filtered): Likewise.
7623         (fputstrn_unfiltered): Add do_fputc parameter, pass to
7624         printchar.
7625         * utils.h (do_fputc_ftype): New typedef.
7626         (fputstrn_unfiltered): Add do_fputc parameter.
7627
7628 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
7629
7630         * regformats/i386/i386-avx.dat: Remove.
7631
7632 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
7633
7634         PR gdb/22979
7635         * amd64-tdep.c (amd64_none_init_abi): New function.
7636         (amd64_x32_none_init_abi): New function.
7637         (_initialize_amd64_tdep): Register handlers for x86-64 and
7638         x64_32 with GDB_OSABI_NONE.
7639         * osabi.c (gdbarch_init_osabi): Allow running handlers for the
7640         GDB_OSABI_NONE osabi.
7641
7642 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
7643
7644         PR gdb/22980
7645         * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
7646         GDB_OSABI_NONE.
7647         * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
7648         * osabi.c (gdb_osabi_names): Add "unknown" entry.
7649
7650 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
7651
7652         * common/byte-vector.h (char_vector): New type.
7653         * target.h (target_read_alloc): Return
7654         gdb::optional<byte_vector>.
7655         (target_read_stralloc): Return gdb::optional<char_vector>.
7656         (target_get_osdata): Return gdb::optional<char_vector>.
7657         * target.c (target_read_alloc_1): Templatize.  Replacement
7658         manual memory management with vector.
7659         (target_read_alloc): Change return type, adjust.
7660         (target_read_stralloc): Change return type, adjust.
7661         (target_get_osdata): Change return type, adjust.
7662         * auxv.c (struct auxv_info) <length>: Remove.
7663         <data>: Change type to gdb::optional<byte_vector>.
7664         (auxv_inferior_data_cleanup): Free auxv_info with delete.
7665         (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
7666         (target_auxv_search): Adjust.
7667         (fprint_target_auxv): Adjust.
7668         * avr-tdep.c (avr_io_reg_read_command): Adjust.
7669         * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
7670         (linux_make_corefile_notes): Adjust.
7671         * osdata.c (get_osdata): Adjust.
7672         * remote.c (remote_get_threads_with_qxfer): Adjust.
7673         (remote_memory_map): Adjust.
7674         (remote_traceframe_info): Adjust.
7675         (btrace_read_config): Adjust.
7676         (remote_read_btrace): Adjust.
7677         (remote_pid_to_exec_file): Adjust.
7678         * solib-aix.c (solib_aix_get_library_list): Adjust.
7679         * solib-dsbt.c (decode_loadmap): Don't free buf.
7680         (dsbt_get_initial_loadmaps): Adjust.
7681         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
7682         * solib-target.c (solib_target_current_sos): Adjust.
7683         * tracepoint.c (sdata_make_value): Adjust.
7684         * xml-support.c (xinclude_start_include): Adjust.
7685         (xml_fetch_content_from_file): Adjust.
7686         * xml-support.h (xml_fetch_another): Change return type.
7687         (xml_fetch_content_from_file): Change return type.
7688         * xml-syscall.c (xml_init_syscalls_info): Adjust.
7689         * xml-tdesc.c (file_read_description_xml): Adjust.
7690         (fetch_available_features_from_target): Change return type.
7691         (target_fetch_description_xml): Adjust.
7692         (target_read_description_xml): Adjust.
7693
7694 2018-04-06  Tom Tromey  <tom@tromey.com>
7695
7696         * value.c (~value): Update.
7697         (struct value) <contents>: Now unique_xmalloc_ptr.
7698         (value_contents_bits_eq, allocate_value_contents)
7699         (value_contents_raw, value_contents_all_raw)
7700         (value_contents_for_printing, value_contents_for_printing_const)
7701         (set_value_enclosing_type): Update.
7702
7703 2018-04-06  Tom Tromey  <tom@tromey.com>
7704
7705         * value.c (range_s): Remove typedef, VEC.
7706         (struct range): Add operator<.
7707         (range_lessthan): Remove.
7708         (ranges_contain): Change type.
7709         (~value): Update.
7710         (struct value) <unavailable, optimized_out>: Now std::vector.
7711         (value_entirely_available)
7712         (value_entirely_covered_by_range_vector)
7713         (value_entirely_unavailable, value_entirely_optimized_out):
7714         Update.
7715         (insert_into_bit_range_vector): Change argument type.
7716         (find_first_range_overlap): Likewise.
7717         (struct ranges_and_idx, value_contents_bits_eq)
7718         (require_not_optimized_out, require_available): Update.
7719         (ranges_copy_adjusted): Change argument types.
7720         (value_optimized_out, value_copy, value_fetch_lazy): Update.
7721
7722 2018-04-06  Tom Tromey  <tom@tromey.com>
7723
7724         * value.c (~value): Update.
7725         (struct value) <parent>: Now a value_ref_ptr.
7726         (value_parent, set_value_parent, value_address, value_copy):
7727         Update.
7728
7729 2018-04-06  Tom Tromey  <tom@tromey.com>
7730
7731         * value.c (struct value): Add constructor, destructor, and member
7732         initializers.
7733         (allocate_value_lazy, value_decref): Update.
7734
7735 2018-04-06  Tom Tromey  <tom@tromey.com>
7736
7737         * value.c (struct value) <released, next>: Remove.
7738         (all_values): Now a std::vector.
7739         (allocate_value_lazy): Update.
7740         (value_next): Remove.
7741         (value_mark, value_free_to_mark, release_value)
7742         (value_release_to_mark): Update.
7743
7744 2018-04-06  Tom Tromey  <tom@tromey.com>
7745
7746         * value.h (fetch_subexp_value, value_release_to_mark): Update.
7747         (free_value_chain): Remove.
7748         * value.c (free_value_chain): Remove.
7749         (value_release_to_mark): Return a std::vector.
7750         * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
7751         std::vector.
7752         (check_condition): Update.
7753         * eval.c (fetch_subexp_value): Change "val_chain" to a
7754         std::vector.
7755         * breakpoint.c (update_watchpoint): Update.
7756         (can_use_hardware_watchpoint): Change "vals" to a std::vector.
7757
7758 2018-04-06  Tom Tromey  <tom@tromey.com>
7759
7760         * value.h (free_all_values): Remove.
7761         * value.c (free_all_values): Remove.
7762
7763 2018-04-06  Tom Tromey  <tom@tromey.com>
7764
7765         * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
7766         (value_history_chain, value_history_count): Remove.
7767         (value_history): New global.
7768         (record_latest_value, access_value_history, show_values)
7769         (preserve_values): Update.
7770
7771 2018-04-06  Tom Tromey  <tom@tromey.com>
7772
7773         * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
7774         * varobj.c (varobj_set_display_format, varobj_set_value)
7775         (install_default_visualizer, construct_visualizer)
7776         (install_new_value, ~varobj, varobj_get_value_type)
7777         (my_value_of_variable, varobj_editable_p): Update.
7778         * c-varobj.c (c_describe_child, c_value_of_variable)
7779         (cplus_number_of_children, cplus_describe_child): Update.
7780         * ada-varobj.c (ada_number_of_children, ada_name_of_child)
7781         (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
7782         (ada_value_of_variable, ada_value_is_changeable_p): Update.
7783
7784 2018-04-06  Tom Tromey  <tom@tromey.com>
7785
7786         * printcmd.c (last_examine_address): Change type to
7787         value_ref_ptr.
7788         (do_examine, x_command): Update.
7789
7790 2018-04-06  Tom Tromey  <tom@tromey.com>
7791
7792         * value.c (release_value): Update.
7793         * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
7794         (struct bpstats) <val>: Now a value_ref_ptr.
7795         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
7796         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
7797         (~watchpoint, print_it_watchpoint, watch_command_1)
7798         (invalidate_bp_value_on_memory_change): Update.
7799
7800 2018-04-06  Tom Tromey  <tom@tromey.com>
7801
7802         * varobj.c (varobj_clear_saved_item)
7803         (update_dynamic_varobj_children, install_new_value, ~varobj):
7804         Update.
7805         * value.h (value_incref): Move declaration earlier.
7806         (value_decref): Rename from value_free.
7807         (struct value_ref_policy): New.
7808         (value_ref_ptr): New typedef.
7809         (struct value_deleter): Remove.
7810         (gdb_value_up): Remove typedef.
7811         (release_value): Change return type.
7812         (release_value_or_incref): Remove.
7813         * value.c (set_value_parent): Update.
7814         (value_incref): Change return type.
7815         (value_decref): Rename from value_free.
7816         (value_free_to_mark, free_all_values, free_value_chain): Update.
7817         (release_value): Return value_ref_ptr.
7818         (release_value_or_incref): Remove.
7819         (record_latest_value, set_internalvar, clear_internalvar):
7820         Update.
7821         * stack.c (info_frame_command): Don't call value_free.
7822         * python/py-value.c (valpy_dealloc, valpy_new)
7823         (value_to_value_object): Update.
7824         * printcmd.c (do_examine): Update.
7825         * opencl-lang.c (lval_func_free_closure): Update.
7826         * mi/mi-main.c (register_changed_p): Don't call value_free.
7827         * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
7828         * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
7829         * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
7830         value_free.
7831         * guile/scm-value.c (vlscm_free_value_smob)
7832         (vlscm_scm_from_value): Update.
7833         * frame.c (frame_register_unwind, frame_unwind_register_signed)
7834         (frame_unwind_register_unsigned, get_frame_register_bytes)
7835         (put_frame_register_bytes): Don't call value_free.
7836         * findvar.c (address_from_register): Don't call value_free.
7837         * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
7838         * dwarf2loc.c (entry_data_value_free_closure)
7839         (value_of_dwarf_reg_entry, free_pieced_value_closure)
7840         (dwarf2_evaluate_loc_desc_full): Update.
7841         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
7842         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
7843         (~watchpoint, watch_command_1)
7844         (invalidate_bp_value_on_memory_change): Update.
7845         * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
7846
7847 2018-04-06  Simon Marchi  <simon.marchi@polymtl.ca>
7848
7849         PR gdb/23022
7850         * warning.m4: Add -Wno-error=deprecated-register.
7851         * configure: Re-generate.
7852
7853 2018-04-05  Tom Tromey  <tom@tromey.com>
7854
7855         * linespec.h: Remove include of "vec.h".
7856
7857 2018-04-05  Tom Tromey  <tom@tromey.com>
7858
7859         * linespec.c (typep): Remove typedef.
7860         (find_methods, find_superclass_methods): Take a std::vector.
7861         (find_method): Use std::vector.
7862
7863 2018-04-05  Tom Tromey  <tom@tromey.com>
7864
7865         * utils.c (compare_strings): Remove.
7866         * utils.h (compare_strings): Remove.
7867         * objc-lang.h (find_imps): Update.
7868         * objc-lang.c (find_methods): Take a std::vector.
7869         (uniquify_strings, find_imps): Likewise.
7870         * linespec.c (find_methods): Take a std::vector.
7871         (decode_objc): Use std::vector.
7872         (add_all_symbol_names_from_pspace, find_superclass_methods): Take
7873         a std::vector.
7874         (find_method, find_function_symbols): Use std::vector.
7875
7876 2018-04-05  Tom Tromey  <tom@tromey.com>
7877
7878         * completer.c (completion_tracker::completion_tracker): Remove
7879         cast.
7880         (completion_tracker::discard_completions): Likewise.
7881         * breakpoint.c (ambiguous_names_p): Remove cast.
7882         * ada-lang.c (_initialize_ada_language): Remove cast.
7883         * utils.h (streq): Update.
7884         (streq_hash): Add new declaration.
7885         * utils.c (streq): Return bool.
7886         (streq_hash): New function.
7887
7888 2018-04-05  Tom Tromey  <tom@tromey.com>
7889
7890         * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
7891         Remove a string copy.
7892
7893 2018-04-05  Tom Tromey  <tom@tromey.com>
7894
7895         * linespec.c (filter_results): Use std::vector.
7896         (decode_line_2, decode_line_full): Update.
7897
7898 2018-04-05  Tom Tromey  <tom@tromey.com>
7899
7900         * linespec.c (canonical_to_fullform): Return std::string.
7901         (filter_results): Update.
7902         (struct decode_line_2_item): Add constructor.
7903         <fullform, displayform>: Now std::string.
7904         (decode_line_2_compare_items): Now a std::sort comparator.
7905         (decode_line_2): Update.
7906
7907 2018-04-05  Tom Tromey  <tom@tromey.com>
7908
7909         * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
7910         (unexpected_linespec_error): Update.
7911         (linespec_parse_basic, parse_linespec): Update.
7912
7913 2018-04-05  Tom Tromey  <tom@tromey.com>
7914
7915         * linespec.c (linespec_parse_basic): Reindent.
7916
7917 2018-04-05  Tom Tromey  <tom@tromey.com>
7918
7919         * minsyms.h (iterate_over_minimal_symbols): Update.
7920         * minsyms.c (iterate_over_minimal_symbols): Take a
7921         gdb::function_view.
7922         * linespec.c (struct collect_minsyms): Remove.
7923         (compare_msyms): Now a std::sort comparator.
7924         (add_minsym): Add parameters.
7925         (search_minsyms_for_name): Update.  Use std::vector.
7926
7927 2018-04-03  Tom Tromey  <tom@tromey.com>
7928
7929         * mipsread.c (read_alphacoff_dynamic_symtab): Use
7930         gdb::byte_vector.
7931
7932 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
7933
7934         * MAINTAINERS (Write After Approval): Add Weimin Pan.
7935
7936 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
7937
7938         PR gdb/16959
7939         * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when 
7940         printing static type.
7941
7942 2018-04-01  Tom Tromey  <tom@tromey.com>
7943
7944         * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
7945         (rs6000_xfer_shared_libraries): Update.
7946
7947 2018-04-01  Simon Marchi  <simon.marchi@polymtl.ca>
7948
7949         * common/gdb_vecs.h (char_ptr): Remove.
7950         * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
7951
7952 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
7953
7954         * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
7955         with std::vector.
7956         * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
7957
7958 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
7959
7960         * tracepoint.h (struct uploaded_tp): Initialize fields.
7961         <actions, step_actions, cmd_strings>: Change type to
7962         std::vector<char *>.
7963         * tracepoint.c (get_uploaded_tp): Allocate with new.
7964         (free_uploaded_tps): Free with delete.
7965         (parse_tracepoint_definition): Adjust to std::vector change.
7966         * breakpoint.c (read_uploaded_action): Likewise.
7967         (create_tracepoint_from_upload): Likewise.
7968         * ctf.c (ctf_write_uploaded_tp): Likewise.
7969         (SET_ARRAY_FIELD): Likewise.
7970         * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
7971
7972 2018-03-30  Tom Tromey  <tom@tromey.com>
7973
7974         * solib-svr4.c (lm_info_read): Use gdb::byte_vector.  Return
7975         std::unique_ptr.
7976         (svr4_keep_data_in_core): Update.
7977         (svr4_read_so_list): Update.
7978
7979 2018-03-30  Tom Tromey  <tom@tromey.com>
7980
7981         * windows-nat.c (handle_output_debug_string, handle_exception):
7982         Update.
7983         * target.h (target_read_string): Update.
7984         * target.c (target_read_string): Change "string" to
7985         unique_xmalloc_ptr.
7986         * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
7987         Update.
7988         * solib-frv.c (frv_current_sos): Update.
7989         * solib-dsbt.c (dsbt_current_sos): Update.
7990         * solib-darwin.c (darwin_current_sos): Update.
7991         * linux-thread-db.c (inferior_has_bug): Update.
7992         * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
7993         Update.  Remove alloca.
7994         * ada-lang.c (ada_main_name): Update.
7995
7996 2018-03-30  Tom Tromey  <tom@tromey.com>
7997
7998         * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
7999         (struct dwo_file_deleter): New.
8000         (dwo_file_up): New typedef.
8001         (open_and_init_dwo_file): Use dwo_file_up.
8002         (free_dwo_file_cleanup): Remove.
8003
8004 2018-03-30  Tom Tromey  <tom@tromey.com>
8005
8006         * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
8007         (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
8008
8009 2018-03-30  Tom Tromey  <tom@tromey.com>
8010
8011         * dwarf2read.c (class free_cached_comp_units): New class.
8012         (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
8013         (free_cached_comp_units): Remove function.
8014
8015 2018-03-30  Tom Tromey  <tom@tromey.com>
8016
8017         * utils.h (make_cleanup_unpush_target): Remove.
8018         * inf-ptrace.c (struct target_unpusher): New.
8019         (target_unpush_up) New typedef.
8020         (inf_ptrace_create_inferior, inf_ptrace_attach): Use
8021         target_unpush_up.
8022         * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
8023
8024 2018-03-27  Tom Tromey  <tom@tromey.com>
8025
8026         * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
8027
8028 2018-03-27  Pedro Alves  <palves@redhat.com>
8029             Tom Tromey  <tom@tromey.com>
8030
8031         * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
8032         destructor.  Now a class.
8033         (gdb_readline_wrapper_cleanup): Remove function.
8034         (gdb_readline_wrapper): Remove cleanups.
8035
8036 2018-03-27  Tom Tromey  <tom@tromey.com>
8037
8038         * typeprint.h (struct type_print_options) <local_typedefs,
8039         global_typedefs>: Remove "struct" keyword.
8040         (class typedef_hash_table): New class.
8041         (recursively_update_typedef_hash, add_template_parameters)
8042         (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
8043         (find_typedef_in_hash): Don't declare.
8044         * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
8045         (typedef_hash_table::recursively_update): Rename from
8046         recursively_update_typedef_hash.  Now a member.
8047         (typedef_hash_table::add_template_parameters): Rename from
8048         add_template_parameters.  Now a member.
8049         (typedef_hash_table::typedef_hash_table): Now a constructor;
8050         rename from create_typedef_hash.
8051         (typedef_hash_table::~typedef_hash_table): Now a destructor;
8052         rename from free_typedef_hash.
8053         (do_free_typedef_hash, make_cleanup_free_typedef_hash)
8054         (do_free_global_table): Remove.
8055         (typedef_hash_table::typedef_hash_table): New constructor; renamed
8056         from copy_type_recursive.
8057         (create_global_typedef_table): Remove.
8058         (typedef_hash_table::find_global_typedef): Now a member of
8059         typedef_hash_table.
8060         (typedef_hash_table::find_typedef): Rename from
8061         find_typedef_in_hash; now a member.
8062         (whatis_exp): Update.
8063         * extension.h (struct ext_lang_type_printers): Add constructor and
8064         destructor.
8065         (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
8066         declare.
8067         * extension.c (ext_lang_type_printers::ext_lang_type_printers):
8068         Now a constructor; rename from start_ext_lang_type_printers.
8069         (ext_lang_type_printers): Now a destructor; rename from
8070         free_ext_lang_type_printers.
8071         * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
8072         Update.
8073         (c_type_print_base_struct_union): Update.  Remove cleanups.
8074
8075 2018-03-27  Tom Tromey  <tom@tromey.com>
8076
8077         * dwarf-index-write.c: Include <cmath>.
8078
8079 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
8080
8081         * NEWS: Add entry describing new "set|show varsize-limit" command.
8082         * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
8083         command.
8084         * printcmd.c (_initialize_printcmd): Add "set var" alias of
8085         "set variable".
8086
8087 2018-03-27  Simon Marchi  <simon.marchi@ericsson.com>
8088
8089         * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
8090         dwarf-index-write.c
8091         (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
8092         * dwarf-index-common.c: New file.
8093         * dwarf-index-common.h: New file.
8094         * dwarf-index-write.c: New file.
8095         * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
8096         (struct dwarf2_section_info): Move from here.
8097         (dwarf2_section_info_def): Likewise.
8098         (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
8099         (offset_type): Likewise.
8100         (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
8101         (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
8102         (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
8103         (byte_swap): Likewise.
8104         (MAYBE_SWAP): Likewise.
8105         (dwarf2_per_cu_ptr): Likewise.
8106         (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
8107         (struct tu_stats): Likewise.
8108         (struct dwarf2_per_objfile): Likewise.
8109         (struct dwarf2_per_cu_data): Likewise.
8110         (struct signatured_type): Likewise.
8111         (sig_type_ptr): Likewise.
8112         (DEF_VEC_P (sig_type_ptr)): Likewise.
8113         (INDEX4_SUFFIX): Likewise.
8114         (INDEX5_SUFFIX): Likewise.
8115         (DEBUG_STR_SUFFIX): Likewise.
8116         (dwarf2_read_section): Make non-static.
8117         (mapped_index_string_hash): Move from here.
8118         (dwarf5_djb_hash): Likewise.
8119         (file_write): Likewise.
8120         (class data_buf): Likewise.
8121         (struct symtab_index_entry): Likewise.
8122         (struct mapped_symtab): Likewise.
8123         (find_slot): Likewise.
8124         (hash_expand): Likewise.
8125         (add_index_entry): Likewise.
8126         (uniquify_cu_indices): Likewise.
8127         (class c_str_view): Likewise.
8128         (class c_str_view_hasher): Likewise.
8129         (class vector_hasher): Likewise.
8130         (write_hash_table): Likewise.
8131         (psym_index_map): Likewise.
8132         (struct addrmap_index_data): Likewise.
8133         (add_address_entry): Likewise.
8134         (add_address_entry_worker): Likewise.
8135         (write_address_map): Likewise.
8136         (symbol_kind): Likewise.
8137         (write_psymbols): Likewise.
8138         (struct signatured_type_index_data): Likewise.
8139         (write_one_signatured_type): Likewise.
8140         (recursively_count_psymbols): Likewise.
8141         (recursively_write_psymbols): Likewise.
8142         (class debug_names): Likewise.
8143         (check_dwarf64_offsets): Likewise.
8144         (psyms_seen_size): Likewise.
8145         (write_gdbindex): Likewise.
8146         (write_debug_names): Likewise.
8147         (assert_file_size): Likewise.
8148         (write_psymtabs_to_index): Likewise.
8149         (save_gdb_index_command): Likewise.
8150         (_initialize_dwarf2_read): Don't register the "save gdb-index"
8151         command.
8152         * dwarf2read.h: New file.
8153
8154 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
8155
8156         PR gdb/22670
8157         * dwarf2read.c (dwarf2_physname): Do not return the demangled
8158         symbol name if the CU's language stores symbol names in linkage
8159         format.
8160         * language.h (struct language_defn)
8161         <la_store_sym_names_in_linkage_form_p>: New field.  Adjust
8162         all instances of this struct.
8163
8164 2018-03-26  Tom Tromey  <tom@tromey.com>
8165
8166         * stack.c (backtrace_command_1): Remove verbose code.
8167
8168 2018-03-26  Tom Tromey  <tom@tromey.com>
8169
8170         * python/py-framefilter.c (py_print_type): Don't catch
8171         exceptions.  Return void.
8172         (py_print_value): Likewise.
8173         (py_print_single_arg): Likewise.
8174         (enumerate_args): Don't catch exceptions.
8175         (py_print_args): Likewise.
8176         (py_print_frame): Likewise.
8177         (gdbpy_apply_frame_filter): Catch exceptions here.
8178
8179 2018-03-26  Tom Tromey  <tom@tromey.com>
8180
8181         * stack.c (_initialize_stack): Remove trailing newlines from help
8182         text.  Add "Usage" line to "backtrace" help.
8183
8184 2018-03-26  Tom Tromey  <tom@tromey.com>
8185
8186         PR python/16486:
8187         * python/py-framefilter.c (py_print_args): Call wrap_hint.
8188
8189 2018-03-26  Tom Tromey  <tom@tromey.com>
8190
8191         * python/py-framefilter.c (py_print_single_arg): Return
8192         EXT_LANG_BT_ERROR from catch.
8193
8194 2018-03-26  Tom Tromey  <tom@tromey.com>
8195
8196         PR backtrace/15584:
8197         * stack.c (backtrace_command_1): Move some code into no-filters
8198         "if".
8199
8200 2018-03-26  Tom Tromey  <tom@tromey.com>
8201
8202         * python/py-framefilter.c (throw_quit_or_print_exception): New
8203         function.
8204         (gdbpy_apply_frame_filter): Use it.
8205
8206 2018-03-26  Tom Tromey  <tom@tromey.com>
8207
8208         PR cli/17716:
8209         * python/py-framefilter.c (py_print_type, py_print_value)
8210         (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
8211         RETURN_MASK_ERROR.
8212
8213 2018-03-26  Tom Tromey  <tom@tromey.com>
8214
8215         * python/py-framefilter.c (enumerate_args): Use
8216         gdb::unique_xmalloc_ptr.
8217
8218 2018-03-26  Tom Tromey  <tom@tromey.com>
8219
8220         * python/py-framefilter.c (py_print_frame): Return
8221         EXT_LANG_BT_OK.
8222         (gdbpy_apply_frame_filter): Update comment.
8223         * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
8224         Remove.
8225         <EXT_LANG_BT_NO_FILTERS>: Change value.
8226
8227 2018-03-26  Tom Tromey  <tom@tromey.com>
8228
8229         PR backtrace/15582:
8230         * stack.c (backtrace_command): Parse "hide" argument.
8231         * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
8232         * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
8233         constant.
8234
8235 2018-03-26  Tom Tromey  <tom@tromey.com>
8236
8237         * stack.c (backtrace_command_1): Remove "show_locals" parameter,
8238         add "flags".
8239         (backtrace_command): Remove "fulltrace", add "flags".
8240
8241 2018-03-26  Tom Tromey  <tom@tromey.com>
8242
8243         * stack.c (backtrace_command): Rewrite command line parsing.
8244
8245 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
8246
8247         * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
8248
8249 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
8250
8251         * filename-seen-cache.h: Add include guard.
8252
8253 2018-03-26  Keith Seitz  <keiths@redhat.com>
8254
8255         * symfile.c (place_section): Remove "struct" from section_addr_info
8256         in comment.
8257         * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
8258         "struct" keyword from section_addr_info.
8259
8260 2018-03-26  Alan Hayward  <alan.hayward@arm.com>
8261
8262         * regformats/regdef.h (reg): Add constructors.
8263
8264 2018-03-25  Pedro Alves  <palves@redhat.com>
8265
8266         * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
8267         if then/else bodies in var_func_name extraction.
8268
8269 2018-03-23  Weimin Pan  <weimin.pan@oracle.com>
8270
8271         * minsyms.c (lookup_minimal_symbol_and_objfile): Use
8272         lookup_minimal_symbol() to find symbol entry.
8273         * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
8274
8275 2018-03-23  Keith Seitz  <keiths@redhat.com>
8276
8277         PR c++/22968
8278         * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
8279         nested type definitions for C++, too.
8280
8281 2018-03-23  Tom Tromey  <tom@tromey.com>
8282
8283         * machoread.c (struct oso_el): Add a constructor.  Don't define as
8284         a typedef.
8285         (macho_register_oso): Remove.
8286         (macho_symtab_read): Take a std::vector.
8287         (oso_el_compare_name): Now a std::sort comparator.
8288         (macho_symfile_read_all_oso): Take a std::vector.
8289         (macho_symfile_read): Use std::vector.  Remove cleanups.
8290
8291 2018-03-22  Tom Tromey  <tom@tromey.com>
8292
8293         * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
8294         (record_full_goto_bookmark): Use std::string.
8295
8296 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8297
8298         PR tdep/18295
8299         * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
8300         a single mask.
8301
8302 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8303
8304         * rs6000-tdep.c (store_insn_p): New function.
8305         (skip_prologue): New variable alloca_reg_offset. Set lr_reg
8306         and cr_reg to their unshifted values. Use store_insn_p to
8307         match LR saves using either R1 or fdata->alloca_reg. Use
8308         store_insn_p to match CR saves. Set alloca_reg_offset
8309         when alloca_reg and framep are set. Remove lr_reg shift
8310         when assigning to fdata->lr_register.
8311
8312 2018-03-22  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8313
8314         * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
8315         command line args instead of emitting a warning.
8316
8317 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
8318
8319         * tracepoint.h (struct static_tracepoint_marker): Initialize
8320         fields, define default constructor, move constructor and move
8321         assignment, disable the rest.
8322         <str_id, extra>: Make std::string.
8323         (release_static_tracepoint_marker): Remove.
8324         (free_current_marker): Remove.
8325         * tracepoint.c (free_current_marker): Remove.
8326         (parse_static_tracepoint_marker_definition): Adjust to
8327         std::string, use new hex2str overload.
8328         (release_static_tracepoint_marker): Remove.
8329         (print_one_static_tracepoint_marker): Get marker by reference
8330         and adjust to std::string.
8331         (info_static_tracepoint_markers_command): Adjust to std::vector
8332         changes
8333         * target.h (static_tracepoint_marker_p): Remove typedef.
8334         (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
8335         (struct target_ops) <to_static_tracepoint_marker_at>: Return
8336         bool.
8337         <to_static_tracepoint_markers_by_strid>: Return std::vector.
8338         * target-debug.h
8339         (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
8340         (target_debug_print_std_vector_static_tracepoint_marker): New.
8341         (target_debug_print_struct_static_tracepoint_marker_p): Rename
8342         to...
8343         (target_debug_print_static_tracepoint_marker_p): ... this.
8344         * target-delegates.c: Re-generate.
8345         * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
8346         Make std::string.
8347         * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
8348         (decode_static_tracepoint_spec): Adjust to std::vector.
8349         (tracepoint_print_one_detail): Adjust to std::string.
8350         (strace_marker_decode_location): Adjust to std::string.
8351         (update_static_tracepoint): Adjust to std::string, remove call
8352         to release_static_tracepoint_marker.
8353         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
8354         Adjust to std::vector.
8355         * remote.c (remote_static_tracepoint_marker_at): Return bool.
8356         (remote_static_tracepoint_markers_by_strid): Adjust to
8357         std::vector.
8358         * common/rsp-low.h (hex2str): New overload with explicit count
8359         of bytes.
8360         * common/rsp-low.c (hex2str): New overload with explicit count
8361         of bytes.
8362         * unittests/rsp-low-selftests.c (test_hex2str): New function.
8363         (_initialize_rsp_low_selftests): Add test_hex2str test.
8364         * unittests/tracepoint-selftests.c
8365         (test_parse_static_tracepoint_marker_definition): Adjust to
8366         std::string.
8367
8368 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
8369
8370         * tracepoint.c (parse_static_tracepoint_marker_definition):
8371         Consider case where the definition is followed by more
8372         definitions.
8373         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8374         tracepoint-selftests.c.
8375         * unittests/tracepoint-selftests.c: New.
8376
8377 2018-03-21  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8378
8379         * MAINTAINERS (Write After Approval): Add Pedro Franco de
8380         Carvalho.
8381
8382 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
8383
8384         * symtab.c (find_pc_sect_line): fixed indentation.
8385
8386 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
8387
8388         * symtab.c (find_pc_sect_line): now uses binary search.
8389
8390 2018-03-19  Tom Tromey  <tom@tromey.com>
8391
8392         * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
8393         "IDENT" production.
8394
8395 2018-03-19  Pedro Alves  <palves@redhat.com>
8396             Tom Tromey  <tom@tromey.com>
8397
8398         * unittests/observable-selftests.c: New file.
8399         * common/observable.h: New file.
8400         * observable.h: New file.
8401         * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
8402         arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
8403         breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
8404         corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
8405         extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
8406         infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
8407         linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
8408         mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
8409         ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
8410         python/py-breakpoint.c, python/py-finishbreakpoint.c,
8411         python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
8412         record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
8413         riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
8414         spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
8415         symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
8416         tui/tui-interp.c, valops.c: Update all users.
8417         * tui/tui-hooks.c (tui_bp_created_observer)
8418         (tui_bp_deleted_observer, tui_bp_modified_observer)
8419         (tui_inferior_exit_observer, tui_before_prompt_observer)
8420         (tui_normal_stop_observer, tui_register_changed_observer):
8421         Remove.
8422         (tui_observers_token): New global.
8423         (attach_or_detach, tui_attach_detach_observers): New functions.
8424         (tui_install_hooks, tui_remove_hooks): Use
8425         tui_attach_detach_observers.
8426         * record-btrace.c (record_btrace_thread_observer): Remove.
8427         (record_btrace_thread_observer_token): New global.
8428         * observer.sh: Remove.
8429         * observer.c: Rename to observable.c.
8430         * observable.c (namespace gdb_observers): Define new objects.
8431         (observer_debug): Move into gdb_observers namespace.
8432         (struct observer, struct observer_list, xalloc_observer_list_node)
8433         (xfree_observer_list_node, generic_observer_attach)
8434         (generic_observer_detach, generic_observer_notify): Remove.
8435         (_initialize_observer): Update.
8436         Don't include observer.inc.
8437         * Makefile.in (generated_files): Remove observer.h, observer.inc.
8438         (clean mostlyclean): Likewise.
8439         (observer.h, observer.inc): Remove targets.
8440         (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
8441         (COMMON_SFILES): Use observable.c, not observer.c.
8442         * .gitignore: Remove observer.h.
8443
8444 2018-03-18  Tom Tromey  <tom@tromey.com>
8445
8446         * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
8447         gdb::def_vector.
8448         (bfd_lookup_symbol_from_dyn_symtab): Likewise.
8449
8450 2018-03-17  Tom Tromey  <tom@tromey.com>
8451
8452         * auto-load.c (auto_load_objfile_script_1): Use std::string.
8453
8454 2018-03-17  Tom Tromey  <tom@tromey.com>
8455
8456         * target.c (class scoped_target_fd): New.
8457         (target_fileio_close_cleanup): Remove.
8458         (target_fileio_read_alloc_1): Use scoped_target_fd.
8459
8460 2018-03-16  Simon Marchi  <simon.marchi@polymtl.ca>
8461
8462         * silent-rules.mk: New.
8463         * Makefile.in: Include silent-rules.mk
8464         (srcdir, VPATH, top_srcdir): Move up.
8465         (COMPILE): Add ECHO_CXX.
8466         (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
8467         (init.c): Add ECHO_INIT_C.
8468         (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
8469         (version.c): Add ECHO_GEN.
8470         (printcmd.o): Add ECHO_CXX.
8471         (target-float.o): Add ECHO_CXX.
8472         (ada-exp.o): Add ECHO_CXX.
8473         (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
8474         (insight$(EXEEXT)): Add ECHO_CXXLD.
8475         * gnulib/configure.ac: Add AM_SILENT_RULES.
8476         * gnulib/aclocal.m4: Re-generate.
8477         * gnulib/configure: Re-generate.
8478         * gnulib/import/Makefile.in: Re-generate.
8479
8480 2018-03-16  Tom Tromey  <tom@tromey.com>
8481
8482         * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
8483         * utils.h (make_cleanup_free_section_addr_info): Don't declare.
8484         * utils.c (do_free_section_addr_info)
8485         (make_cleanup_free_section_addr_info): Remove.
8486         * symfile.h (struct other_sections): Add constructor.
8487         (struct section_addr_info): Remove.
8488         (section_addr_info): New typedef.
8489         (struct sym_fns) <sym_offsets>: Change type of parameter.
8490         (build_section_addr_info_from_objfile)
8491         (relative_addr_info_to_section_offsets, addr_info_make_relative)
8492         (default_symfile_offsets, symbol_file_add)
8493         (symbol_file_add_from_bfd)
8494         (build_section_addr_info_from_section_table): Update.
8495         (alloc_section_addr_info, free_section_addr_info): Don't declare.
8496         * symfile.c (alloc_section_addr_info): Remove.
8497         (build_section_addr_info_from_section_table): Change return type.
8498         Update.
8499         (build_section_addr_info_from_bfd)
8500         (build_section_addr_info_from_objfile): Likewise.
8501         (free_section_addr_info): Remove.
8502         (relative_addr_info_to_section_offsets): Change type of "addrs".
8503         (addrs_section_compar): Now a std::sort comparator.
8504         (addrs_section_sort): Change return type.
8505         (addr_info_make_relative): Change type of "addrs".  Update.
8506         (default_symfile_offsets, syms_from_objfile_1)
8507         (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
8508         (symbol_file_add_separate): Update.
8509         (symbol_file_add): Change type of "addrs".  Update.
8510         (add_symbol_file_command): Update.  Remove cleanups.
8511         * symfile-mem.c (symbol_file_add_from_memory): Update.  Remove
8512         cleanups.
8513         * symfile-debug.c (debug_sym_offsets): Change type of "info".
8514         * solib.c (solib_read_symbols): Update.
8515         * objfiles.c (objfile_relocate): Update.  Remove cleanups.
8516         * machoread.c (macho_symfile_offsets): Update.
8517         * jit.c (jit_bfd_try_read_symtab): Update.
8518
8519 2018-03-15  Simon Marchi  <simon.marchi@polymtl.ca>
8520
8521         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8522         unittests/utils-selftests.c.
8523         * unittests/utils-selftests.c: New file.
8524
8525 2018-03-14  Tom Tromey  <tom@tromey.com>
8526
8527         PR cli/14977:
8528         * printcmd.c (printf_c_string, printf_wide_c_string): Special case
8529         for NULL.
8530
8531 2018-03-14  Tom Tromey  <tom@tromey.com>
8532
8533         PR cli/19918:
8534         * printcmd.c (printf_pointer): Allow "-" in format.
8535
8536 2018-03-14  Tom Tromey  <tom@tromey.com>
8537
8538         * printcmd.c (_initialize_printcmd): Add usage to printf.
8539
8540 2018-03-14  Yao Qi  <qiyao@sourceware.org>
8541
8542         * MAINTAINERS: Update my email address.
8543
8544 2018-03-13  Tom Tromey  <tom@tromey.com>
8545
8546         * machoread.c (macho_check_dsym): Change filenamep to a
8547         std::string*.
8548         (macho_symfile_read): Update.
8549         * symfile.c (load_command): Use std::string.
8550
8551 2018-03-12  Andrew Burgess  <andrew.burgess@embecosm.com>
8552
8553         * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
8554         to error message string.
8555         (riscv_register_name): Use xsnprintf instead of sprintf.
8556         (riscv_insn::fetch_instruction): Use gdb_assert instead of
8557         internal_error.
8558         (riscv_print_arg_location): Use gdb_assert_not_reached instead of
8559         error.
8560         (riscv_push_dummy_call): Likewise.
8561
8562 2018-03-12  Tom Tromey  <tom@tromey.com>
8563
8564         * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
8565         Use gdb::byte_vector.
8566         * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
8567
8568 2018-03-12  Yao Qi  <yao.qi@linaro.org>
8569
8570         * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
8571         parameter type to readable_regcache.
8572         * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
8573         the declaration.
8574
8575 2018-03-11  Tom Tromey  <tom@tromey.com>
8576
8577         * dwarf2read.c (struct nextfield): Add initializers.
8578         (struct nextfnfield): Remove.
8579         (struct fnfieldlist): Add initializers.  Remove "length" and
8580         "head", use std::vector.
8581         (struct decl_field_list): Remove.
8582         (struct field_info): Add initializers.
8583         <fields, baseclasses>: Now std::vector.
8584         <nbaseclasses, nfnfields, typedef_field_list_count,
8585         nested_types_list_count>: Remove.
8586         (dwarf2_add_field, dwarf2_add_type_defn)
8587         (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
8588         (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
8589         (process_structure_scope): Update.
8590
8591 2018-03-11  Tom Tromey  <tom@tromey.com>
8592
8593         * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
8594         for use by std::sort.
8595         (build_type_psymtabs_1): Use std::vector.
8596
8597 2018-03-09  Eli Zaretskii  <eliz@gnu.org>
8598
8599         * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
8600         and LIBMPFR in the printed configuration.
8601
8602 2018-03-08  Tom Tromey  <tom@tromey.com>
8603
8604         * source.c (get_filename_and_charpos): Use scoped_fd.
8605         * nto-procfs.c (procfs_open_1): Use scoped_fd.
8606         (procfs_pidlist): Likewise.
8607         * procfs.c (proc_get_LDT_entry): Use scoped_fd.
8608         (iterate_over_mappings): Likewise.
8609
8610 2018-03-08  Tom Tromey  <tom@tromey.com>
8611
8612         * infcall.c (struct call_return_meta_info)
8613         <stack_temporaries_enabled>: Remove.
8614         (get_call_return_value, call_function_by_hand_dummy): Update.
8615         * thread.c (disable_thread_stack_temporaries): Remove.
8616         (enable_thread_stack_temporaries): Remove.
8617         (thread_stack_temporaries_enabled_p): Return bool.
8618         (push_thread_stack_temporary, value_in_thread_stack_temporaries)
8619         (get_last_thread_stack_temporary): Update.
8620         * eval.c (evaluate_subexp): Update.
8621         * gdbthread.h (class enable_thread_stack_temporaries): Now a
8622         class, not a function.
8623         (value_ptr, value_vec): Remove typedefs.
8624         (class thread_info) <stack_temporaries_enabled>: Now bool.
8625         <stack_temporaries>: Now a std::vector.
8626         (thread_stack_temporaries_enabled_p)
8627         (value_in_thread_stack_temporaries): Return bool.
8628
8629 2018-03-08  Simon Marchi  <simon.marchi@ericsson.com>
8630
8631         * remote.c (putpkt_binary): Fix omitted bytes reporting.
8632         (getpkt_or_notif_sane_1): Likewise.
8633
8634 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
8635
8636         * build-id.c (build_id_to_debug_bfd): Use std::string.
8637
8638 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
8639
8640         * build-id.c (find_separate_debug_file_by_buildid): Return
8641         std::string.
8642         * build-id.h (find_separate_debug_file_by_buildid): Return
8643         std::string.
8644         * coffread.c (coff_symfile_read): Adjust to std::string.
8645         * elfread.c (elf_symfile_read): Adjust to std::string.
8646         * symfile.c (separate_debug_file_exists): Change parameter to
8647         std::string.
8648         (find_separate_debug_file): Return std::string.
8649         (find_separate_debug_file_by_debuglink): Return std::string.
8650         * symfile.h (find_separate_debug_file_by_debuglink): Return
8651         std::string.
8652
8653 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
8654
8655         * common/xml-utils.c (xml_escape_text): Move code to...
8656         (xml_escape_text_append): ... this new function.
8657         * common/xml-utils.h (xml_escape_text_append): New declaration.
8658         * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
8659         New function.
8660         (_initialize_xml_utils): register test_xml_escape_text_append as
8661         a selftest.
8662
8663 2018-03-07  Alan Hayward  <alan.hayward@arm.com>
8664
8665         * defs.h: Remove MAX_REGISTER_SIZE.
8666         * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
8667         asserts.
8668         * python/py-unwind.c (pyuw_sniffer): Likewise.
8669
8670 2018-03-07  Tom Tromey  <tom@tromey.com>
8671
8672         * linux-tdep.c (linux_info_proc): Update.
8673         * target.h (struct target_ops) <to_fileio_readlink>: Return
8674         optional<string>.
8675         (target_fileio_readlink): Return optional<string>.
8676         * remote.c (remote_hostio_readlink): Return optional<string>.
8677         * inf-child.c (inf_child_fileio_readlink): Return
8678         optional<string>.
8679         * target.c (target_fileio_readlink): Return optional<string>.
8680
8681 2018-03-07  Andrew Burgess  <andrew.burgess@embecosm.com>
8682
8683         * regcache.c (cooked_read_test): Add riscv to the list of
8684         architectures that have a save_reggroup.
8685
8686 2018-03-07  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8687
8688         * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
8689         value is not a dynamic class object.
8690
8691 2018-03-06  Tom Tromey  <tom@tromey.com>
8692
8693         * rust-exp.y: Formatting fixes.
8694
8695 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
8696
8697         * riscv-tdep.c (riscv_register_name): Remove target description
8698         support.
8699         (riscv_gdbarch_init): Remove target description check.
8700
8701 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
8702
8703         * riscv-tdep.c: Remove 'Contributed by ...' lines from header
8704         comment.
8705         * riscv-tdep.h: Likewise.
8706
8707 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
8708
8709         * riscv-tdep.c (riscv_pseudo_register_read): Delete.
8710         (riscv_pseudo_register_write): Delete.
8711         (riscv_gdbarch_init): Remove all use of pseudo registers.
8712
8713 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
8714
8715         * record-btrace.c (btrace_print_lines): Replace cleanup
8716         parameter with RAII equivalents.
8717         (btrace_insn_history): Replace cleanup with RAII equivalents.
8718         * ui-out.h (make_cleanup_ui_out_list_begin_end,
8719         make_cleanup_ui_out_tuple_begin_end): Remove.
8720         * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
8721         make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
8722         make_cleanup_ui_out_list_begin_end): Remove.
8723
8724 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
8725
8726         * record-btrace.c (record_btrace_maybe_mark_async_event): Change
8727         parameter types to std::vector.  Use bool.
8728         (record_btrace_wait): Replace VEC(tp_t) with
8729         std::vector<thread_info *>.
8730         * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
8731
8732 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
8733
8734         * record-btrace.c (record_btrace_disable_callback): Remove.
8735         (struct scoped_btrace_disable): New.
8736         (record_btrace_open): Use scoped_btrace_disable.
8737
8738 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
8739
8740         * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
8741         reading values from registers.
8742
8743 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
8744
8745         * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
8746         where appropriate.
8747
8748 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
8749
8750         * riscv-tdep.c (riscv_print_arg_location): Add header comment,
8751         change parameter type.  Use GDB's print functions, and use
8752         core_addr_to_string where appropriate.
8753         (riscv_push_dummy_call): Use core_addr_to_string where
8754         appropriate, update call to riscv_print_arg_location, and reindent
8755         a few lines.
8756         (riscv_return_value): Update call to riscv_print_arg_location.
8757
8758 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
8759             Tim Newsome <tim@sifive.com>
8760             Albert Ou <a0u@eecs.berkeley.edu>
8761             Darius Rad <darius@bluespec.com>
8762
8763         * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
8764         (HFILES_NO_SRCDIR): Add riscv-tdep.h.
8765         (ALLDEPFILES): Add riscv-tdep.c
8766         * configure.tgt: Add riscv support.
8767         * riscv-tdep.c: New file.
8768         * riscv-tdep.h: New file.
8769         * NEWS: Mention new target.
8770         * MAINTAINERS: Add entry for riscv.
8771
8772 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
8773
8774         * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
8775         fields within aggregates.
8776
8777 2018-03-04  Simon Marchi  <simon.marchi@polymtl.ca>
8778
8779         * record-btrace.c (btrace_print_lines): Change type of flags to
8780         gdb_disassembly_flags.
8781
8782 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
8783
8784         * fbsd-nat.c: Include "inf-ptrace.h".
8785         (USE_SIGTRAP_SIGINFO): Conditionally define.
8786         [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
8787         (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
8788         [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
8789         function.
8790         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
8791         Likewise.
8792         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
8793         Likewise.
8794         (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
8795         "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
8796         "supports_stopped_by_hw_breakpoint" target methods.
8797
8798 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
8799
8800         * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
8801         * fbsd-nat.c (debug_fbsd_nat): New variable.
8802         (show_fbsd_nat_debug): New function.
8803         (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
8804         (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
8805
8806 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
8807
8808         * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
8809         * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
8810         prototype.
8811         * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
8812         (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
8813         method.
8814
8815 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
8816
8817         * common/gdb_vecs.c (free_char_ptr_vec): Remove.
8818         * common/gdb_vecs.h (free_char_ptr_vec): Remove.
8819
8820 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
8821
8822         * charset.c (struct charset_vector): New.
8823         (charsets): Change type to charset_vector.
8824         (find_charset_names): Adjust.
8825         (add_one): Adjust.
8826         (_initialize_charset): Adjust.
8827
8828 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
8829
8830         * progspace.h (struct program_space) <deleted_solibs>: Change
8831         type to std::vector<std::string>.
8832         * progspace.c (clear_program_space_solib_cache): Adjust.
8833         * breakpoint.c (print_solib_event): Adjust.
8834         (check_status_catch_solib): Adjust.
8835         * solib.c (update_solib_list): Adjust.
8836         * ui-out.h (class ui_out) <field_string>: New overload.
8837         * ui-out.c (ui_out::field_string): New overload.
8838
8839 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
8840
8841         * progspace.h (struct program_space): Add constructor and
8842         destructor, initialize fields.
8843         (add_program_space): Remove.
8844         * progspace.c (add_program_space): Rename to...
8845         (program_space::program_space): ... this.
8846         (release_program_space): Rename to...
8847         (program_space::~program_space): ... this.
8848         (delete_program_space): Use delete to delete program_space.
8849         (initialize_progspace): Use new to allocate program_space.
8850         * inferior.c (add_inferior_with_spaces): Likewise.
8851         (clone_inferior_command): Likewise.
8852         * infrun.c (follow_fork_inferior): Likewise.
8853         (handle_vfork_child_exec_or_exit): Likewise.
8854
8855 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
8856
8857         * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
8858         (delim_string_to_char_ptr_vec): Return std::vector of
8859         gdb::unique_xmalloc_ptr.
8860         (dirnames_to_char_ptr_vec_append): Take std::vector of
8861         gdb::unique_xmalloc_ptr.
8862         (dirnames_to_char_ptr_vec): Return std::vector of
8863         gdb::unique_xmalloc_ptr.
8864         * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
8865         Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
8866         (delim_string_to_char_ptr_vec): Return an std::vector of
8867         gdb::unique_xmalloc_ptr, adjust the code.
8868         (dirnames_to_char_ptr_vec_append): Take an std::vector of
8869         gdb::unique_xmalloc_ptr, adjust the code.
8870         (dirnames_to_char_ptr_vec): Return an std::vector of
8871         gdb::unique_xmalloc_ptr, adjust the code.
8872         * auto-load.c (auto_load_safe_path_vec): Change type to
8873         std::vector of gdb::unique_xmalloc_ptr.
8874         (auto_load_expand_dir_vars): Return an std::vector of
8875         gdb::unique_xmalloc_ptr, adjust the code.
8876         (auto_load_safe_path_vec_update): Adjust.
8877         (filename_is_in_auto_load_safe_path_vec): Adjust.
8878         (auto_load_objfile_script_1): Adjust.
8879         * build-id.c (build_id_to_debug_bfd): Adjust.
8880         * linux-thread-db.c (thread_db_load_search): Adjust.
8881         * source.c (add_path): Adjust.
8882         (openp): Adjust.
8883         * symfile.c (find_separate_debug_file): Adjust.
8884         * utils.c (do_free_char_ptr_vec): Remove.
8885         (make_cleanup_free_char_ptr_vec): Remove.
8886
8887 2018-03-01  Sergio Durigan Junior  <sergiodj@redhat.com>
8888
8889         PR gdb/22907
8890         * common/pathstuff.c: Conditionally include "<windows.h>".
8891
8892 2018-03-01  Georg Sauthoff  <mail@georg.so>
8893
8894         PR gdb/22888
8895         * gcore.in: Quote variables and switch interpreter to bash.
8896
8897 2018-03-01  Tom Tromey  <tom@tromey.com>
8898
8899         * dwarf2read.c (alloc_discriminant_info): Fix default_index
8900         assertion.  Add assertion for discriminant_index.
8901         (quirk_rust_enum): Use correct base type name in univariant case.
8902
8903 2018-03-01  Simon Marchi  <simon.marchi@ericsson.com>
8904
8905         * record.c (get_call_history_modifiers): Return a
8906         record_print_flags.
8907         (cmd_record_call_history): Adjust.
8908         * record-btrace.c (record_btrace_call_history): Adjust.
8909         (record_btrace_call_history_range): Adjust.
8910         (record_btrace_call_history_from): Adjust.
8911         * target-debug.h (target_debug_print_record_print_flags): New.
8912         * target-delegates.c: Re-generate.
8913         * target.c (target_call_history): Change flags type.
8914         (target_call_history_from): Likewise.
8915         (target_call_history_range): Likewise.
8916         * target.h (struct target_ops) <target_call_history>: Likewise.
8917         (target_call_history_from): Likewise.
8918         (target_call_history_range): Likewise.
8919
8920 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
8921             Simon Marchi  <simon.marchi@polymtl.ca>
8922
8923         * common/common-utils.c: Include "sys/stat.h".
8924         (is_regular_file): Move here from "source.c"; change return
8925         type to "bool".
8926         * common/common-utils.h (is_regular_file): New prototype.
8927         * common/pathstuff.c (contains_dir_separator): New function.
8928         * common/pathstuff.h (contains_dir_separator): New prototype.
8929         * source.c: Don't include "sys/stat.h".
8930         (is_regular_file): Move to "common/common-utils.c".
8931
8932 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
8933
8934         * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
8935         (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
8936         * auto-load.c: Include "common/pathstuff.h".
8937         * common/common-def.h (current_directory): Move here.
8938         * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
8939         function.
8940         * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
8941         prototype.
8942         * common/pathstuff.c: New file.
8943         * common/pathstuff.h: New file.
8944         * compile/compile.c: Include "common/pathstuff.h".
8945         * defs.h (current_directory): Move to "common/common-defs.h".
8946         * dwarf2read.c: Include "common/pathstuff.h".
8947         * exec.c: Likewise.
8948         * guile/scm-safe-call.c: Likewise.
8949         * linux-thread-db.c: Likewise.
8950         * main.c: Likewise.
8951         * nto-tdep.c: Likewise.
8952         * objfiles.c: Likewise.
8953         * source.c: Likewise.
8954         * symtab.c: Likewise.
8955         * utils.c: Include "common/pathstuff.h".
8956         (gdb_realpath): Move to "common/pathstuff.c".
8957         (gdb_realpath_keepfile): Likewise.
8958         (gdb_abspath): Likewise.
8959         * utils.h (gdb_realpath): Move to "common/pathstuff.h".
8960         (gdb_realpath_keepfile): Likewise.
8961         (gdb_abspath): Likewise.
8962
8963 2018-02-28  John Baldwin  <jhb@FreeBSD.org>
8964
8965         * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
8966         wildcard process pid for super_resume for kernels with a
8967         specific bug.
8968
8969 2018-02-27  Phil Muldoon  <pmuldoon@redhat.com>
8970
8971         * compile/compile.c (get_args): Add additional comments
8972         explaining function.
8973
8974 2018-02-27  Simon Marchi  <simon.marchi@polymtl.ca>
8975             Tom Tromey  <tom@tromey.com>
8976
8977         * target.h (memory_write_request_s): Remove typedef.  Don't define
8978         VEC.
8979         (target_write_memory_blocks): Change argument to std::vector.
8980         (struct memory_write_request): Add constructor.
8981         * target-memory.c (compare_block_starting_address): Return bool.
8982         Change argument types.
8983         (claim_memory): Change arguments to use std::vector.
8984         (split_regular_and_flash_blocks, blocks_to_erase)
8985         (compute_garbled_blocks): Likewise.
8986         (cleanup_request_data, cleanup_write_requests_vector): Remove.
8987         (target_write_memory_blocks): Change argument to std::vector.
8988         * symfile.c (struct load_section_data): Add constructor and
8989         destructor.  Use std::vector for "requests".
8990         (struct load_progress_data): Add initializers.
8991         (load_section_callback): Update.  Use "new".
8992         (clear_memory_write_data): Remove.
8993         (generic_load): Update.
8994
8995 2018-02-27  Alan Hayward  <alan.hayward@arm.com>
8996
8997         * arch/aarch64.h: Use common/tdesc.h.
8998
8999 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
9000
9001         * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
9002         architecture with a 64-bit ABI.
9003
9004 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
9005
9006         * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
9007         ahead of target description loading.
9008
9009 2018-02-26  Tom Tromey  <tom@tromey.com>
9010
9011         * stack.c (backtrace_command_1): Update.
9012         * python/python-internal.h (gdbpy_apply_frame_filter): Change type
9013         of "flags".
9014         * python/py-framefilter.c (py_print_frame)
9015         (gdbpy_apply_frame_filter): Change type of "flags".
9016         * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
9017         of "flags".
9018         (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
9019         (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
9020         * extension.h (enum frame_filter_flag): Rename from
9021         frame_filter_flags.
9022         (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
9023         (apply_ext_lang_frame_filter): Change type of "flags".
9024         * extension.c (apply_ext_lang_frame_filter): Change type of
9025         "flags".
9026         * extension-priv.h (struct extension_language_ops)
9027         <apply_frame_filter>: Change type of "flags".
9028
9029 2018-02-26  Tom Tromey  <tom@tromey.com>
9030
9031         PR python/16497:
9032         * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag.  Fix
9033         off-by-one in py_end computation.
9034         * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
9035         PRINT_MORE_FRAMES.
9036         * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
9037         constant.
9038
9039 2018-02-26  Tom Tromey  <tom@tromey.com>
9040
9041         * dwarf2read.c (struct variant_field): New.
9042         (struct nextfield) <variant>: New field.
9043         (dwarf2_add_field): Handle DW_TAG_variant_part.
9044         (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
9045         discriminated union.
9046         (read_structure_type): Handle DW_TAG_variant_part.
9047         (handle_struct_member_die): New function, extracted from
9048         process_structure_scope.  Handle DW_TAG_variant.
9049         (process_structure_scope): Handle discriminated unions.  Call
9050         handle_struct_member_die.
9051
9052 2018-02-26  Tom Tromey  <tom@tromey.com>
9053
9054         * rust-lang.h (rust_last_path_segment): Declare.
9055         * rust-lang.c (rust_last_path_segment): Now public.  Change
9056         contract.
9057         (struct disr_info): Remove.
9058         (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
9059         (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
9060         (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
9061         (rust_enum_p, rust_enum_variant): New function.
9062         (rust_underscore_fields): Remove "offset" parameter.
9063         (rust_print_enum): New function.
9064         (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
9065         <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
9066         (rust_print_struct_def): Add "for_rust_enum" parameter.  Handle
9067         enums.
9068         (rust_internal_print_type): New function, from rust_print_type.
9069         Remove enum code.
9070         (rust_print_type): Call rust_internal_print_type.
9071         (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
9072         Update enum handling.
9073         * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
9074         (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
9075         (rust_union_quirks): New functions.
9076         (process_full_comp_unit, process_full_type_unit): Call
9077         rust_union_quirks.
9078         (process_structure_scope): Update rust_unions if necessary.
9079
9080 2018-02-26  Tom Tromey  <tom@tromey.com>
9081
9082         * value.h (value_union_variant): Declare.
9083         * valops.c (value_union_variant): New function.
9084         * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
9085         (struct discriminant_info): New.
9086         (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
9087         enumerator.
9088         (struct main_type) <flag_discriminated_union>: New field.
9089
9090 2018-02-26  Tom Tromey  <tom@tromey.com>
9091
9092         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9093         unittests/unpack-selftests.c.
9094         * unittests/unpack-selftests.c: New file.
9095         * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
9096
9097 2018-02-26  Yao Qi  <yao.qi@linaro.org>
9098
9099         * dwarf2read.c (struct partial_die_info) <read>: New method.
9100         (read_partial_die): Remove the declaration.
9101         (load_partial_dies): Update.
9102         (partial_die_info::partial_die_info):
9103         (read_partial_die): Change it to partial_die_info::read.
9104
9105 2018-02-26  Yao Qi  <yao.qi@linaro.org>
9106
9107         * dwarf2read.c (struct partial_die_info) <fixup>: New method.
9108         (fixup_partial_die): Remove declaration.
9109         (scan_partial_symbols): Update.
9110         (partial_die_parent_scope): Likewise.
9111         (partial_die_full_name): Likewise.
9112         (fixup_partial_die): Change it to partial_die_info::fixup.
9113
9114 2018-02-26  Yao Qi  <yao.qi@linaro.org>
9115
9116         * dwarf2read.c (read_partial_die): Update the declaration.
9117         (load_partial_dies): Caller update.
9118         (read_partial_die): Remove one argument abbrev_len.
9119
9120 2018-02-26  Yao Qi  <yao.qi@linaro.org>
9121
9122         * dwarf2read.c (struct partial_die_info): Add ctor, delete
9123         assignment operator.
9124         (load_partial_dies): Use ctor and copy ctor.
9125         (read_partial_die): Update.
9126         (dwarf2_cu::find_partial_die): Use ctor.
9127
9128 2018-02-26  Yao Qi  <yao.qi@linaro.org>
9129
9130         * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
9131         (find_partial_die_in_comp_unit): Change it to
9132         dwarf2_cu::find_partial_die.
9133         (find_partial_die): Update.
9134
9135 2018-02-26  Yao Qi  <yao.qi@linaro.org>
9136
9137         * dwarf2read.c (read_partial_die): Remove the code checking abbrev
9138         is NULL.
9139
9140 2018-02-26  Yao Qi  <yao.qi@linaro.org>
9141
9142         * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
9143
9144 2018-02-26  Alan Hayward  <alan.hayward@arm.com>
9145
9146         * arch/amd64.h: Use common/tdesc.h.
9147         * arch/i386.c: Likewise.
9148         * arch/i386.h: Likewise.
9149         * arch/tic6x.c: Likewise.
9150         * arch/tdesc.h: Move file from here...
9151         * common/tdesc.h: ...to here.
9152         * features/aarch64-core.c: Regenerate.
9153         * features/aarch64-fpu.c: Regenerate.
9154         * features/i386/32bit-avx.c: Regenerate.
9155         * features/i386/32bit-avx512.c: Regenerate.
9156         * features/i386/32bit-core.c: Regenerate.
9157         * features/i386/32bit-linux.c: Regenerate.
9158         * features/i386/32bit-mpx.c: Regenerate.
9159         * features/i386/32bit-pkeys.c: Regenerate.
9160         * features/i386/32bit-sse.c: Regenerate.
9161         * features/i386/64bit-avx.c: Regenerate.
9162         * features/i386/64bit-avx512.c: Regenerate.
9163         * features/i386/64bit-core.c: Regenerate.
9164         * features/i386/64bit-linux.c: Regenerate.
9165         * features/i386/64bit-mpx.c: Regenerate.
9166         * features/i386/64bit-pkeys.c: Regenerate.
9167         * features/i386/64bit-segments.c: Regenerate.
9168         * features/i386/64bit-sse.c: Regenerate.
9169         * features/i386/x32-core.c: Regenerate.
9170         * features/tic6x-c6xp.c: Regenerate.
9171         * features/tic6x-core.c: Regenerate.
9172         * features/tic6x-gp.c: Regenerate.
9173         * target-descriptions.c: Use common/tdesc.h.
9174         * target-descriptions.h: Likewise.
9175
9176 2018-02-24  Tom Tromey  <tom@tromey.com>
9177
9178         * linux-thread-db.c (try_thread_db_load_from_pdir_1)
9179         (try_thread_db_load_from_dir, thread_db_load_search): Use
9180         std::string.
9181         (info_auto_load_libthread_db_compare): Return bool.  Change
9182         argument types.
9183         (info_auto_load_libthread_db): Use std::vector, std::string.
9184         Remove cleanups.
9185
9186 2018-02-24  Tom Tromey  <tom@tromey.com>
9187
9188         * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
9189         std::string.
9190         * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
9191         std::string*.
9192         * gdbarch.c: Rebuild.
9193         * gdbarch.h: Rebuild.
9194         * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
9195         * arch-utils.h (default_fast_tracepoint_valid_at): Update.
9196         * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
9197         std::string*.
9198
9199 2018-02-23  Simon Marchi  <simon.marchi@polymtl.ca>
9200
9201         * gdbtypes.h (sect_offset): Change type to uint64_t.
9202         (sect_offset_str): New function.
9203         * dwarf2read.c (create_addrmap_from_aranges): Use
9204         sect_offset_str.
9205         (error_check_comp_unit_head): Likewise.
9206         (create_debug_type_hash_table): Likewise.
9207         (read_cutu_die_from_dwo): Likewise.
9208         (init_cutu_and_read_dies): Likewise.
9209         (init_cutu_and_read_dies_no_follow): Likewise.
9210         (process_psymtab_comp_unit_reader): Likewise.
9211         (partial_die_parent_scope): Likewise.
9212         (peek_die_abbrev): Likewise.
9213         (process_queue): Likewise.
9214         (dwarf2_physname): Likewise.
9215         (read_namespace_alias): Likewise.
9216         (read_import_statement): Likewise.
9217         (create_dwo_cu_reader): Likewise.
9218         (create_cus_hash_table): Likewise.
9219         (lookup_dwo_cutu): Likewise.
9220         (inherit_abstract_dies): Likewise.
9221         (read_func_scope): Likewise.
9222         (read_call_site_scope): Likewise.
9223         (dwarf2_add_member_fn): Likewise.
9224         (read_common_block): Likewise.
9225         (read_module_type): Likewise.
9226         (read_typedef): Likewise.
9227         (read_subrange_type): Likewise.
9228         (load_partial_dies): Likewise.
9229         (read_partial_die): Likewise.
9230         (find_partial_die): Likewise.
9231         (read_str_index): Likewise.
9232         (dwarf2_string_attr): Likewise.
9233         (build_error_marker_type): Likewise.
9234         (lookup_die_type): Likewise.
9235         (dump_die_shallow): Likewise.
9236         (follow_die_ref): Likewise.
9237         (dwarf2_fetch_die_loc_sect_off): Likewise.
9238         (dwarf2_fetch_constant_bytes): Likewise.
9239         (follow_die_sig): Likewise.
9240         (get_signatured_type): Likewise.
9241         (get_DW_AT_signature_type): Likewise.
9242         (dwarf2_find_containing_comp_unit): Likewise.
9243         (set_die_type): Likewise.
9244
9245 2018-02-21  John Baldwin  <jhb@FreeBSD.org>
9246
9247         * arch/aarch64.c: Include "common-defs.h".
9248         * arch/amd64.c: Likewise.
9249         * arch/i386.c: Likewise.
9250
9251 2018-02-21  Tom Tromey  <tom@tromey.com>
9252
9253         * value.h: (extract_field_op): Update.
9254         * eval.c (extract_field_op): Return a const char *.
9255         * expression.h (parse_expression_for_completion): Update.
9256         * completer.c (complete_expression): Update.
9257         (add_struct_fields): Make fieldname const.
9258         * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
9259         (mark_completion_tag, parse_exp_in_context_1): Update.
9260         (parse_expression_for_completion): Change "name" to
9261         unique_xmalloc_ptr*.
9262
9263 2018-02-21  Tom Tromey  <tom@tromey.com>
9264
9265         * infcall.c (call_function_by_hand_dummy): Use std::vector.
9266
9267 2018-02-21  Yao Qi  <yao.qi@linaro.org>
9268
9269         * avr-tdep.c (avr_read_pc): Change parameter type to
9270         readable_regcache.
9271         * gdbarch.sh (read_pc): Likewise.
9272         * gdbarch.c: Re-generated.
9273         * gdbarch.h: Re-generated.
9274         * hppa-tdep.c (hppa_read_pc): Change parameter type to
9275         readable_regcache.
9276         * ia64-tdep.c (ia64_read_pc): Likewise.
9277         * mips-tdep.c (mips_read_pc): Likewise.
9278         * spu-tdep.c (spu_read_pc): Likewise.
9279
9280 2018-02-21  Yao Qi  <yao.qi@linaro.org>
9281
9282         * Makefile.in (COMMON_SFILES): Add regcache-dump.c
9283         * regcache-dump.c: New file.
9284         * regcache.c: Move register_dump to regcache-dump.c.
9285         (maintenance_print_registers): Likewise.
9286         (maintenance_print_raw_registers): Likewise.
9287         (maintenance_print_cooked_registers): Likewise.
9288         (maintenance_print_register_groups): Likewise.
9289         (maintenance_print_remote_registers): Likewise.
9290         (_initialize_regcache): Likewise.
9291         * regcache.h (register_dump): Moved from regcache.c.
9292
9293 2018-02-21  Yao Qi  <yao.qi@linaro.org>
9294
9295         * regcache.c (regcache::regcache): Update.
9296         (regcache::invalidate): Move it to detached_regcache::invalidate.
9297         (get_thread_arch_aspace_regcache): Update.
9298         (regcache::raw_update): Update.
9299         (regcache::cooked_read): Remove some code.
9300         (regcache::cooked_read_value): Likewise.
9301         (regcache::raw_write): Remove assert on m_readonly_p.
9302         (regcache::raw_supply_integer): Move it to
9303         detached_regcache::raw_supply_integer.
9304         (regcache::raw_supply_zeroed): Likewise.
9305         * regcache.h (detached_regcache) <raw_supply_integer>: New
9306         declaration.
9307         <raw_supply_zeroed, invalidate>: Likewise.
9308         (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
9309         <invalidate>: Likewise.
9310         <m_readonly_p>: Removed.
9311
9312 2018-02-21  Yao Qi  <yao.qi@linaro.org>
9313
9314         * infcmd.c (get_return_value): Let stop_regs point to
9315         get_current_regcache.
9316         * regcache.c (regcache::regcache): Remove.
9317         (register_dump_reg_buffer): New class.
9318         (regcache_print): Adjust.
9319         * regcache.h (regcache): Remove constructors.
9320
9321 2018-02-21  Yao Qi  <yao.qi@linaro.org>
9322
9323         * regcache.c (class register_dump): New class.
9324         (register_dump_regcache, register_dump_none): New class.
9325         (register_dump_remote, register_dump_groups): New class.
9326         (regcache_print): Update.
9327         * regcache.h (regcache_dump_what): Move it to regcache.c.
9328         (regcache) <dump>: Remove.
9329
9330 2018-02-21  Yao Qi  <yao.qi@linaro.org>
9331
9332         * jit.c (struct jit_unwind_private) <regcache>: Change its type to
9333          reg_buffer_rw *.
9334         (jit_unwind_reg_set_impl): Call raw_supply.
9335         (jit_frame_sniffer): Use reg_buffer_rw.
9336         * record-full.c (record_full_core_regbuf): Change its type.
9337         (record_full_core_open_1): Use reg_buffer_rw.
9338         (record_full_close): Likewise.
9339         (record_full_core_fetch_registers): Use regcache->raw_supply.
9340         (record_full_core_store_registers): Likewise.
9341         * regcache.c (regcache::get_register_status): Move it to
9342         reg_buffer.
9343         (regcache_raw_set_cached_value): Remove.
9344         (regcache::raw_set_cached_value): Remove.
9345         (regcache::raw_write): Call raw_supply.
9346         (regcache::raw_supply): Move it to reg_buffer_rw.
9347         * regcache.h (regcache_raw_set_cached_value): Remove.
9348         (reg_buffer_rw): New class.
9349
9350 2018-02-21  Yao Qi  <yao.qi@linaro.org>
9351
9352         * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
9353         readonly_detached_regcache.
9354         (dummy_frame_prev_register): Use regcache->cooked_read.
9355         * frame.c (frame_save_as_regcache): Change return type.
9356         (frame_pop): Update.
9357         * frame.h (frame_save_as_regcache): Update declaration.
9358         * inferior.h (get_infcall_suspend_state_regcache): Update
9359         declaration.
9360         * infrun.c (infcall_suspend_state) <registers>: use
9361         readonly_detached_regcache.
9362         (save_infcall_suspend_state): Don't use regcache_dup.
9363         (get_infcall_suspend_state_regcache): Change return type.
9364         * linux-fork.c (struct fork_info) <savedregs>: Change to
9365         readonly_detached_regcache.
9366         <pc>: New field.
9367         (fork_save_infrun_state): Don't use regcache_dup.
9368         (info_checkpoints_command): Adjust.
9369         * mi/mi-main.c (register_changed_p): Update declaration.
9370         (mi_cmd_data_list_changed_registers): Use
9371         readonly_detached_regcache.
9372         (register_changed_p): Change parameter type to
9373         readonly_detached_regcache.
9374         * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
9375         readonly_detached_regcache.
9376         (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
9377         * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
9378         New.
9379         (regcache::save): Move it to reg_buffer.
9380         (regcache::restore): Change parameter type.
9381         (regcache_dup): Remove.
9382         * regcache.h (reg_buffer) <save>: New method.
9383         (readonly_detached_regcache): New class.
9384         * spu-tdep.c (spu2ppu_cache) <regcache>: Use
9385         readonly_detached_regcache.
9386         (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
9387
9388 2018-02-21  Yao Qi  <yao.qi@linaro.org>
9389
9390         * frame.c (frame_save_as_regcache): Use regcache method save.
9391         (frame_pop): Use regcache method restore.
9392         * infrun.c (restore_infcall_suspend_state): Likewise.
9393         * linux-fork.c (fork_load_infrun_state): Likewise.
9394         * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
9395         save.
9396         * regcache.c (regcache_save): Remove.
9397         (regcache::restore): More asserts.
9398         (regcache_cpy): Remove.
9399         * regcache.h (regcache_save): Remove the declaration.
9400         (regcache::restore): Move from private to public.
9401         Remove the friend declaration of regcache_cpy.
9402         (regcache_cpy): Remove declaration.
9403
9404 2018-02-21  Yao Qi  <yao.qi@linaro.org>
9405
9406         * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
9407         parameter type to 'readable_regcache *'.
9408         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
9409         * arm-tdep.c (arm_neon_quad_read): Likewise.
9410         (arm_pseudo_read): Likewise.
9411         * avr-tdep.c (avr_pseudo_register_read): Likewise.
9412         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
9413         * frv-tdep.c (frv_pseudo_register_read): Likewise.
9414         * gdbarch.c: Re-generated.
9415         * gdbarch.h: Re-generated.
9416         * gdbarch.sh (pseudo_register_read): Change parameter type to
9417         'readable_regcache *'.
9418         (pseudo_register_read_value): Likewise.
9419         * h8300-tdep.c (pseudo_from_raw_register): Likewise.
9420         (h8300_pseudo_register_read): Likewise.
9421         * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
9422         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
9423         (i386_pseudo_register_read_into_value): Likewise.
9424         (i386_pseudo_register_read_value): Likewise.
9425         * i386-tdep.h (i386_pseudo_register_read_into_value): Update
9426         declaration.
9427         * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
9428         * m32c-tdep.c (m32c_raw_read): Likewise.
9429         (m32c_read_flg): Likewise.
9430         (m32c_banked_register): Likewise.
9431         (m32c_banked_read): Likewise.
9432         (m32c_sb_read): Likewise.
9433         (m32c_part_read): Likewise.
9434         (m32c_cat_read): Likewise.
9435         (m32c_r3r2r1r0_read): Likewise.
9436         (m32c_pseudo_register_read): Likewise.
9437         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
9438         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
9439         (mep_pseudo_cr64_read): Likewise.
9440         (mep_pseudo_register_read): Likewise.
9441         * mips-tdep.c (mips_pseudo_register_read): Likewise.
9442         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
9443         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
9444         * regcache.c (regcache::raw_read): Move it to readable_regcache.
9445         (regcache::cooked_read): Likewise.
9446         (regcache::cooked_read_value): Likewise.
9447         (regcache_cooked_read_signed):
9448         (regcache::cooked_read): Likewise.
9449         * regcache.h (readable_regcache): New class.
9450         (regcache): Inherit readable_regcache.  Move some methods to
9451         readable_regcache.
9452         * rl78-tdep.c (rl78_pseudo_register_read): Change
9453         parameter type to 'readable_regcache *'.
9454         * rs6000-tdep.c (do_regcache_raw_read): Remove.
9455         (e500_pseudo_register_read): Change parameter type to
9456         'readable_regcache *'.
9457         (dfp_pseudo_register_read): Likewise.
9458         (vsx_pseudo_register_read): Likewise.
9459         (efpr_pseudo_register_read): Likewise.
9460         * s390-tdep.c (s390_pseudo_register_read): Likewise.
9461         * sh-tdep.c (sh_pseudo_register_read): Likewise.
9462         * sh64-tdep.c (pseudo_register_read_portions): Likewise.
9463         (sh64_pseudo_register_read): Likewise.
9464         * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
9465         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
9466         * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
9467         (spu_pseudo_register_read): Likewise.
9468         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
9469         (xtensa_pseudo_register_read): Likewise.
9470
9471 2018-02-21  Yao Qi  <yao.qi@linaro.org>
9472
9473         * regcache.c (regcache::regcache): Call reg_buffer ctor.
9474         (regcache::arch): Move it to reg_buffer::arch.
9475         (regcache::register_buffer): Likewise.
9476         (regcache::assert_regnum): Likewise.
9477         (regcache::num_raw_registers): Likewise.
9478         * regcache.h (reg_buffer): New class.
9479         (regcache): Inherit reg_buffer.
9480
9481 2018-02-20  Simon Marchi  <simon.marchi@ericsson.com>
9482
9483         * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
9484         gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
9485
9486 2018-02-20  Markus Metzger  <markus.t.metzger@intel.com>
9487
9488         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
9489
9490 2018-02-19  Alan Hayward  <alan.hayward@arm.com>
9491
9492         * Makefile.in: (COMMON_SFILES): Add common/*.c files.
9493         (SFILES): Remove common/*.c files.
9494         (COMMON_OBS): Remove some *.o files built from common/*.c files.
9495         * common/common.host: Add common reference.
9496         * configure.ac: Likewise.
9497         * configure: Regenerate.
9498
9499 2018-02-16  Yao Qi  <yao.qi@linaro.org>
9500
9501         * block.c (block_namespace_info): Inherit allocate_on_obstack.
9502         (block_initialize_namespace): Use new.
9503         * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
9504         (dwarf2_free_objfile): Use delete.
9505         * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
9506         (copy_type_recursive): Use new.
9507         * gdb_obstack.h (allocate_on_obstack): New.
9508
9509 2018-02-15  Yao Qi  <yao.qi@linaro.org>
9510
9511         PR gdb/22849
9512         * inferior.c (exit_inferior_1): Reset inf->control.
9513
9514 2018-02-15  Joel Brobecker  <brobecker@adacore.com>
9515
9516         * ada-lang.c (ada_to_fixed_value_create): Delete advance
9517         declaration.
9518
9519 2018-02-14  Pedro Alves  <palves@redhat.com>
9520
9521         * frame-unwind.c (frame_unwind_try_unwinder): Always call
9522         frame_cleanup_after_sniffer on exception.
9523
9524 2018-02-14  Tom Tromey  <tom@tromey.com>
9525
9526         * solist.h (struct target_so_ops) <bfd_open>: Make pathname
9527         const.
9528         (solib_bfd_open): Make pathname const.
9529         * solib.c (solib_bfd_open): Make pathname const.
9530         * solib-spu.c (spu_bfd_fopen): Make name const.
9531         (spu_bfd_open): Make pathname const.
9532         * solib-darwin.c (darwin_bfd_open): Make pathname const.
9533         * solib-aix.c (solib_aix_bfd_open): Make pathname const.
9534
9535 2018-02-14  Tom Tromey  <tom@tromey.com>
9536
9537         * symfile.c (symfile_bfd_open): Update.
9538         * source.h (openp, source_full_path_of, find_and_open_source):
9539         Change argument type to unique_xmalloc_ptr.
9540         * source.c (openp): Take a unique_xmalloc_ptr.
9541         (source_full_path_of, find_and_open_source): Likewise.
9542         (open_source_file, symtab_to_fullname): Update.
9543         * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
9544         unique_xmalloc_ptr.
9545         * solib.c (solib_find_1): Use unique_xmalloc_ptr.
9546         (exec_file_find): Update.
9547         * psymtab.c (psymtab_to_fullname): Update.
9548         * nto-tdep.h (nto_find_and_open_solib): Update.
9549         * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
9550         unique_xmalloc_ptr.
9551         * exec.c (exec_file_attach): Update.
9552         * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
9553         * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
9554
9555 2018-02-14  Tom Tromey  <tom@tromey.com>
9556
9557         * solib.c: Include source.h.
9558         * nto-tdep.c: Include source.h.
9559         * mi/mi-cmd-env.c: Include source.h.
9560         * infcmd.c: Include source.h.
9561         * exec.c: Include source.h.
9562         * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
9563         (add_path, directory_switch, source_path, init_source_path): Move
9564         declarations...
9565         * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
9566         (add_path, directory_switch, source_path, init_source_path):
9567         ...here.
9568
9569 2018-02-14  Tom Tromey  <tom@tromey.com>
9570
9571         * solist.h (exec_file_find, solib_find): Return
9572         unique_xmalloc_ptr.
9573         (solib_bfd_fopen): Take a const char *.
9574         * solib.c (solib_find_1): Return unique_xmalloc_ptr.
9575         (exec_file_find, solib_find): Likewise.
9576         (solib_bfd_fopen): Do not take ownership of "pathname".
9577         (solib_bfd_open): Use unique_xmalloc_ptr.
9578         * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
9579         * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
9580         * infrun.c (follow_exec): Use unique_xmalloc_ptr.
9581         * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
9582
9583 2018-02-14  Joel Brobecker  <brobecker@adacore.com>
9584
9585         * ada-lang.c (name_match_type_from_name): Remove reference to
9586         ada_name_for_lookup in function's documentation.
9587         * ada-lang.h (ada_name_for_lookup): Delete declaration.
9588
9589 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
9590
9591         * defs.h (enum openp_flags): New enum.
9592         (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
9593         Move to enum openp_flags.
9594         (openp_flags): New enum flags.
9595         (openp): Change parameter type to openp_flags.
9596         * source.c (openp): Change parameter type to openp_flags.
9597         * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
9598         * dwarf2read.c (try_open_dwop_file): Use openp_flags.
9599
9600 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
9601
9602         * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
9603         per-command.
9604
9605 2018-02-12  Andrew Burgess  <andrew.burgess@embecosm.com>
9606
9607         * dwarf2read.c (dwarf2_release_queue): Delete function, move body
9608         into...
9609         (class dwarf2_queue_guard): ...the destructor of this new class.
9610         (dw2_do_instantiate_symtab): Create instance of the new class
9611         dwarf2_queue_guard, remove cleanup.
9612
9613 2018-02-09  Tom Tromey  <tom@tromey.com>
9614
9615         * source.c (find_source_lines): Don't reference past the end of
9616         the vector.
9617
9618 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
9619
9620         * remote.c (remote_btrace_maybe_reopen): Change error message.
9621         * btrace.c (btrace_enable): Likewise.
9622         (parse_xml_btrace): Likewise.
9623         (parse_xml_btrace_conf): Likewise.
9624
9625 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
9626
9627         * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
9628         (linux_enable_pt, linux_enable_bts): Call
9629         diagnose_perf_event_open_fail.
9630
9631 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
9632
9633         * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
9634         Remove parameter and change return type.  Update callers.  Move it.
9635         (linux_enable_bts, linux_enable_pt): Improve error message.
9636         (linux_enable_pt): Remove zero buffer size check.
9637         (linux_enable_btrace): Improve error messages.  Remove NULL return
9638         check.
9639
9640 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
9641
9642         * btrace.c (btrace_enable): Remove target_supports_btrace call.
9643         * nat/linux-btrace.c (perf_event_pt_event_type): Move.
9644         (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
9645         (linux_supports_pt, linux_supports_btrace): Remove.
9646         (linux_enable_bts): Call cpu_supports_bts.
9647         * nat/linux-btrace.h (linux_supports_btrace): Remove.
9648         * remote.c (remote_supports_btrace): Remove.
9649         (init_remote_ops): Remove remote_supports_btrace.
9650         * target-delegates.c: Regenerated.
9651         * target.c (target_supports_btrace): Remove.
9652         * target.h (target_ops) <to_supports_btrace>: Remove
9653         (target_supports_btrace): Remove.
9654         * x86-linux-nat.c (x86_linux_create_target): Remove
9655         linux_supports_btrace.
9656
9657 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
9658
9659         * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
9660         btrace failed.
9661         * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
9662         exception and use message in own exception.
9663
9664 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
9665
9666         * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
9667         (perf_event_pt_event_type): Use gdb_file_up.
9668         (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
9669         scoped_fd, and scoped_mmap.
9670
9671 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
9672
9673         * common/scoped_mmap.h: New.
9674         * unittests/scoped_mmap-selftest.c: New.
9675         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9676         unittests/scoped_mmap-selftest.c.
9677
9678 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
9679
9680         * common/scoped_fd.h: New.
9681         * unittests/scoped_fd-selftest.c: New.
9682         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9683         unittests/scoped_fd-selftest.c.
9684
9685 2018-02-09  Tom Tromey  <tom@tromey.com>
9686
9687         * auto-load.c (auto_load_section_scripts): Use
9688         gdb::unique_xmalloc_ptr.
9689
9690 2018-02-09  Tom Tromey  <tom@tromey.com>
9691
9692         * auto-load.c (execute_script_contents): Use std::string.
9693
9694 2018-02-09  Joel Brobecker  <brobecker@adacore.com>
9695
9696         * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
9697         Python function, rather than a new command.
9698
9699 2018-02-08  Tom Tromey  <tom@tromey.com>
9700
9701         * solib.c (solib_find_1): Use std::string.
9702         (solib_bfd_fopen): Use unique_xmalloc_ptr.
9703
9704 2018-02-08  Tom Tromey  <tom@tromey.com>
9705
9706         * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
9707
9708 2018-02-08  Tom Tromey  <tom@tromey.com>
9709
9710         * source.c (find_source_lines): Use gdb::def_vector.
9711
9712 2018-02-08  Tom Tromey  <tom@tromey.com>
9713
9714         * macrocmd.c (struct temporary_macro_definition): New.
9715         (macro_define_command): Use temporary_macro_definition.  Remove
9716         cleanups.
9717         (free_macro_definition_ptr): Remove.
9718
9719 2018-02-08  Tom Tromey  <tom@tromey.com>
9720
9721         * macroexp.c (maybe_expand): Use std::string.
9722
9723 2018-02-08  Tom Tromey  <tom@tromey.com>
9724
9725         * macroexp.c (struct macro_buffer): Add initializers for some
9726         members.
9727         (init_buffer, init_shared_buffer, free_buffer)
9728         (free_buffer_return_text): Remove.
9729         (macro_buffer): New constructors.
9730         (~macro_buffer): New destructor.
9731         (macro_buffer::set_shared): New method.
9732         (macro_buffer::resize_buffer, macro_buffer::appendc)
9733         (macro_buffer::appendmem): Now methods, not free functions.
9734         (set_token, append_tokens_without_splicing, stringify)
9735         (macro_stringify): Update.
9736         (gather_arguments): Change return type.  Remove argc_p argument,
9737         add args_ptr argument.  Use std::vector.
9738         (substitute_args): Remove argc argument.  Accept std::vector.
9739         (expand): Update.  Use std::vector.
9740         (scan, macro_expand, macro_expand_next): Update.
9741
9742 2018-02-08  Tom Tromey  <tom@tromey.com>
9743
9744         * symtab.c (default_collect_symbol_completion_matches_break_on):
9745         Use unique_xmalloc_ptr.
9746         * macroscope.h: (sal_macro_scope, user_macro_scope)
9747         (default_macro_scope): Return unique_xmalloc_ptr.
9748         * macroscope.c (sal_macro_scope, user_macro_scope)
9749         (default_macro_scope): Return unique_xmalloc_ptr.
9750         * macroexp.h (macro_expand, macro_expand_once): Return
9751         unique_xmalloc_ptr.
9752         * macroexp.c (macro_expand, macro_expand_once): Return
9753         unique_xmalloc_ptr.
9754         * macrocmd.c (macro_expand_command, macro_expand_once_command)
9755         (info_macro_command, info_macros_command): Use
9756         unique_xmalloc_ptr.
9757         * compile/compile-c-support.c (write_macro_definitions): Use
9758         unique_xmalloc_ptr.
9759         * c-exp.y (c_parse): Use unique_xmalloc_ptr.
9760
9761 2018-02-07  Simon Marchi  <simon.marchi@ericsson.com>
9762
9763         * value.c (value_static_field): Assign field type instead of
9764         containing type when returning an optimized out value.
9765
9766 2018-02-06  Yao Qi  <yao.qi@linaro.org>
9767
9768         * ft32-tdep.c (ft32_read_pc): Remove.
9769         (ft32_write_pc): Remove.
9770         (ft32_gdbarch_init): Update.
9771         * m32r-tdep.c (m32r_read_pc): Remove.
9772         (m32r_gdbarch_init): Update.
9773         * mep-tdep.c (mep_read_pc): Remove.
9774         (mep_gdbarch_init): Update.
9775         * microblaze-tdep.c (microblaze_write_pc): Remove.
9776         (microblaze_gdbarch_init): Update.
9777         * mn10300-tdep.c (mn10300_read_pc): Remove.
9778         (mn10300_write_pc): Remove.
9779         (mn10300_gdbarch_init): Update.
9780         * moxie-tdep.c (moxie_read_pc): Remove.
9781         (moxie_write_pc): Remove.
9782         (moxie_gdbarch_init): Update.
9783
9784 2018-02-06  Yao Qi  <yao.qi@linaro.org>
9785
9786         * expprint.c (print_subexp_standard): Handle
9787         OP_F77_UNDETERMINED_ARGLIST.
9788         (dump_subexp_body_standard): Likewise.
9789
9790 2018-02-05  Alan Hayward  <alan.hayward@arm.com>
9791
9792         * target-descriptions.c (tdesc_element_visitor) Add empty
9793         implementations.
9794         (tdesc_type): Move make_gdb_type from here.
9795         (tdesc_type_builtin): Likewise.
9796         (tdesc_type_vector): Likewise.
9797         (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
9798         (make_gdb_type_struct): Move from tdesc_type_with_fields.
9799         (make_gdb_type_union): Likewise.
9800         (make_gdb_type_flags): Likewise.
9801         (make_gdb_type_enum): Likewise.
9802         (make_gdb_type): New function.
9803         (tdesc_register_type): Use static make_gdb_type.
9804
9805 2018-02-05  Ruslan Kabatsayev <b7.10110111@gmail.com>
9806
9807         * infcmd.c (default_print_one_register_info): Align natural-format
9808         column values consistently one under another.
9809         (pad_to_column): New function.
9810
9811 2018-02-05  Joel Brobecker  <brobecker@adacore.com>
9812
9813         * dwarf2read.c (dwarf2_physname): Move commment.
9814
9815 2018-02-01  Leszek Swirski  <leszeks@google.com>
9816
9817         * varobj.c (varobj_formatted_print_options): Allow recursive
9818         pretty printing if pretty printing is enabled.
9819
9820 2018-02-01  Leszek Swirski  <leszeks@google.com>
9821
9822         * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
9823         names after a structop as a filename.
9824
9825 2018-02-01  Yao Qi  <yao.qi@linaro.org>
9826
9827         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
9828         (arm_record_coproc_data_proc): Likewise.
9829
9830 2018-02-01  Yao Qi  <yao.qi@linaro.org>
9831
9832         * arm-tdep.c (arm_record_extension_space): Change ret to signed.
9833
9834 2018-01-31  Nikola Prica  <nikola.prica@rt-rk.com>
9835
9836         * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
9837         assign shifted lr_reg to fdata->lr_register when lr_reg is set.
9838
9839 2018-01-31  Pedro Alves  <palves@redhat.com>
9840
9841         * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
9842         * inflow.c (child_terminal_save_inferior): Wrap reference to
9843         tcgetpgrp in HAVE_TERMIOS_H.
9844         (child_interrupt, child_pass_ctrlc): Wrap references to signal in
9845         _WIN32.
9846         * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
9847         always iterate over all inferiors.
9848         (gdbsim_cntrl_c): Adjust.
9849         * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
9850
9851 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
9852
9853         * gdbtypes.c (lookup_array_range_type): Make sure the array's
9854         index type is objfile-owned if the element type is as well.
9855
9856 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
9857
9858         GDB 8.1 released.
9859
9860 2018-01-30  Philipp Rudo  <prudo@linux.vnet.ibm.com>
9861
9862         * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
9863         "features/s390x-linux64.c".
9864         (_initialize_s390_linux_tdep): Remove initialization of tdescs
9865         s390_linux32 and s390x_linux64.
9866         (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
9867         default tdesc.
9868         * s390-tdep.c: Include "features/s390-linux32.c" and
9869         "features/s390x-linux64.c".
9870         (s390_tdesc_valid): Add check for tdesc_has_registers.
9871         (s390_gdbarch_init): Make sure there is always a valid tdesc.
9872         (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
9873         tdesc_s390x_linux64.
9874         * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
9875         tdesc_s390x_linux64 to...
9876         * s390-tdep.h: ...here.
9877
9878 2018-01-30  Pedro Alves  <palves@redhat.com>
9879
9880         PR gdb/13211
9881         * config.in, configure: Regenerate.
9882         * configure.ac: Check for getpgid.
9883         * go32-nat.c (go32_pass_ctrlc): New.
9884         (go32_target): Install it.
9885         * inf-child.c (inf_child_target): Install
9886         child_terminal_save_inferior, child_pass_ctrlc and
9887         child_interrupt.
9888         * inf-ptrace.c (inf_ptrace_interrupt): Delete.
9889         (inf_ptrace_target): No longer install it.
9890         * infcmd.c (interrupt_target_1): Adjust.
9891         * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
9892         (child_interrupt): Declare.
9893         (inferior::terminal_state): New.
9894         * inflow.c (struct terminal_info): Update comments.
9895         (inferior_process_group): Delete.
9896         (terminal_is_ours): Delete.
9897         (gdb_tty_state): New.
9898         (child_terminal_init): Adjust.
9899         (is_gdb_terminal, sharing_input_terminal_1)
9900         (sharing_input_terminal): New functions.
9901         (child_terminal_inferior): Adjust.  Use sharing_input_terminal.
9902         Set the process's actual process group in the foreground if
9903         possible.  Handle is_ours_for_output/is_ours distinction.  Don't
9904         mark terminal as the inferior's if not sharing GDB's terminal.
9905         Don't check attach_flag.
9906         (child_terminal_ours_for_output, child_terminal_ours): Adjust to
9907         pass down a target_terminal_state.
9908         (child_terminal_save_inferior): New, factored out from ...
9909         (child_terminal_ours_1): ... this.  Handle
9910         target_terminal_state::is_ours_for_output.
9911         (child_interrupt, child_pass_ctrlc): New.
9912         (inflow_inferior_exit): Clear the inferior's terminal_state.
9913         (copy_terminal_info): Copy the inferior's terminal state.
9914         (_initialize_inflow): Remove reference to terminal_is_ours.
9915         * inflow.h (inferior_process_group): Delete.
9916         * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
9917         * procfs.c (procfs_target): Don't install procfs_interrupt.
9918         (procfs_interrupt): Delete.
9919         * remote.c (remote_serial_quit_handler): Adjust.
9920         (remote_interrupt): Remove ptid parameter.  Adjust.
9921         * target-delegates.c: Regenerate.
9922         * target.c: Include "terminal.h".
9923         (target_terminal::terminal_state): Rename to ...
9924         (target_terminal::m_terminal_state): ... this.
9925         (target_terminal::init): Adjust.
9926         (target_terminal::inferior): Adjust to per-inferior
9927         terminal_state.
9928         (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
9929         (target_terminal::ours, target_terminal::ours_for_output): Use
9930         target_terminal_is_ours_kind.
9931         (target_interrupt): Remove ptid parameter.  Adjust.
9932         (default_target_pass_ctrlc): Adjust.
9933         * target.h (target_ops::to_terminal_save_inferior): New field.
9934         (target_ops::to_interrupt): Remove ptid_t parameter.
9935         (target_interrupt): Remove ptid_t parameter.  Update comment.
9936         (target_pass_ctrlc): Update comment.
9937         * target/target.h (target_terminal_state): New scoped enum,
9938         factored out of ...
9939         (target_terminal::terminal_state): ... here.
9940         (target_terminal::inferior): Update comments.
9941         (target_terminal::restore_inferior): New.
9942         (target_terminal::is_inferior, target_terminal::is_ours)
9943         (target_terminal::is_ours_for_output): Adjust.
9944         (target_terminal::scoped_restore_terminal_state): Adjust to
9945         rename, and call restore_inferior() instead of inferior().
9946         (target_terminal::scoped_restore_terminal_state::m_state): Change
9947         type.
9948         (target_terminal::terminal_state): Rename to ...
9949         (target_terminal::m_terminal_state): ... this and change type.
9950
9951 2018-01-30  Pedro Alves  <palves@redhat.com>
9952
9953         * linux-nat.c (wait_for_signal): New function.
9954         (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
9955         directly.
9956         (async_terminal_is_ours)
9957         (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
9958         (linux_nat_add_target): Don't override
9959         to_terminal_inferior/to_terminal_ours.
9960
9961 2018-01-29  Sergio Durigan Junior  <sergiodj@redhat.com>
9962
9963         * remote.c (remote_follow_fork): Don't call "detach_inferior".
9964
9965 2018-01-28  Simon Marchi  <simon.marchi@ericsson.com>
9966
9967         * dwarf2read.c (free_dwo_files): Add forward-declaration.
9968         (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
9969         dwarf2_per_objfile_free here.
9970         (dwarf2_per_objfile_free): Remove.
9971         (_initialize_dwarf2_read): Don't register
9972         dwarf2_per_objfile_free as a registry cleanup.
9973
9974 2018-01-27  Eli Zaretskii  <eliz@gnu.org>
9975
9976         Avoid compilation errors in MinGW native builds
9977
9978         The error is triggered by including python-internal.h, and the
9979         error message is:
9980
9981              In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
9982                       from build-gnulib/import/math.h:27,
9983                       from d:/usr/Python26/include/pyport.h:235,
9984                       from d:/usr/Python26/include/Python.h:58,
9985                       from python/python-internal.h:94,
9986                       from python/py-arch.c:24:
9987              d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
9988         using ::hypot;
9989                 ^~~~~
9990
9991         This happens because Python headers define 'hypot' to expand t
9992         '_hypot' in the Windows builds.
9993         * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
9994         'hypoth'.  This avoids a compilation error.
9995
9996 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
9997
9998         * MAINTAINERS (Write After Approval): Fix ordering.
9999
10000 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
10001
10002         * MAINTAINERS (Write After Approval): Add Alan Hayward.
10003
10004 2018-01-26  Alan Modra  <amodra@gmail.com>
10005
10006         * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
10007         (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
10008         Remove nop.  Make const.  Comment.
10009         (powerpc32_plt_stub_so_2): New.
10010         (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
10011         Correct count.  Update uses.
10012         (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
10013         Move common code reading PLT entry word.  Correct
10014         powerpc32_plt_stub PLT address calculation.
10015         * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
10016         (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
10017         (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
10018         (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
10019         (ppc64_standard_linkage8): Likewise.
10020         * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
10021         Correct insns description.
10022         * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
10023
10024 2018-01-24  Pedro Alves  <palves@redhat.com>
10025
10026         GCC PR libstdc++/83906
10027         * gdbtypes.c (operator==(const dynamic_prop &,
10028         const dynamic_prop &)): New.
10029         (operator==(const range_bounds &, const range_bounds &)): New.
10030         (check_types_equal): Use them instead of memcmp.
10031         * gdbtypes.h (operator==(const dynamic_prop &,
10032         const dynamic_prop &)): Declare.
10033         (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
10034         (operator==(const range_bounds &, const range_bounds &)): Declare.
10035         (operator!=(const range_bounds &, const range_bounds &)): Declare.
10036
10037 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
10038
10039         * s390-linux-tdep.c (s390_record_address_mask)
10040         (s390_record_calc_disp_common, s390_record_calc_disp)
10041         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
10042         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
10043         (s390_process_record): Move to s390-tdep.c.
10044         (s390_linux_init_abi_any): Adjust.
10045         * s390-tdep.c (s390_record_address_mask)
10046         (s390_record_calc_disp_common, s390_record_calc_disp)
10047         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
10048         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
10049         (s390_process_record): Moved from s390-linux-tdep.c
10050         (s390_gdbarch_init): Adjust.
10051
10052 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
10053
10054         * s390-linux-nat.c (s390-tdep.h): New include.
10055         * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
10056         (HFILES_NO_SRCDIR): Add s390-tdep.h.
10057         (ALLDEPFILES): Add s390-tdep.c.
10058         * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
10059         * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
10060         * s390-tdep.h: ...this.  New file.
10061         * s390-linux-tdep.c (s390-tdep.h): New include.
10062         (_initialize_s390_tdep): Rename to...
10063         (_initialize_s390_linux_tdep): ...this and adjust.
10064         (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
10065         (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
10066         s390-tdep.h.
10067         (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
10068         (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
10069         (s390_is_partial_instruction, s390_software_single_step)
10070         (is_non_branch_ril, s390_displaced_step_copy_insn)
10071         (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
10072         (s390_prologue_data, s390_addr, s390_store, s390_load)
10073         (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
10074         (s390_register_call_saved, s390_guess_tracepoint_registers)
10075         (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
10076         (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
10077         (s390_pseudo_register_name, s390_pseudo_register_type)
10078         (s390_pseudo_register_read, s390_pseudo_register_write)
10079         (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
10080         (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
10081         (s390_addr_bits_remove, s390_address_class_type_flags)
10082         (s390_address_class_type_flags_to_name)
10083         (s390_address_class_name_to_type_flags, s390_effective_inner_type)
10084         (s390_function_arg_float, s390_function_arg_vector)
10085         (is_power_of_two, s390_function_arg_integer, s390_arg_state)
10086         (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
10087         (s390_frame_align, s390_register_return_value, s390_return_value)
10088         (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
10089         (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
10090         (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
10091         (s390_trad_frame_prev_register, s390_unwind_cache)
10092         (s390_prologue_frame_unwind_cache)
10093         (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
10094         (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
10095         (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
10096         (s390_stub_frame_this_id, s390_stub_frame_prev_register)
10097         (s390_stub_frame_sniffer, s390_stub_frame_unwind)
10098         (s390_frame_base_address, s390_local_base_address)
10099         (s390_frame_base, s390_gcc_target_options)
10100         (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
10101         (s390_validate_reg_range, s390_tdesc_valid)
10102         (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
10103         * s390-tdep.c: ...this.  New file.
10104
10105 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
10106
10107         * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
10108         (s390_process_record, s390_gdbarch_tdep_alloc)
10109         (s390_linux_init_abi_any): Use/set new hook.
10110
10111 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
10112
10113         * s390-linux-tdep.c (osabi.h): New include.
10114         (s390_linux_init_abi_31, s390_linux_init_abi_64)
10115         (s390_linux_init_abi_any): New functions.
10116         (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
10117
10118 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
10119
10120         * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
10121         tdesc_has_registers check
10122
10123 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
10124
10125         * s390-linux-tdep.c (s390_tdesc_valid): New function.
10126         (s390_validate_reg_range): New macro.
10127         (s390_gdbarch_init): Adjust.
10128
10129 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
10130
10131         * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
10132         (s390_gdbarch_tdep_alloc): Adjust.
10133         (s390_gdbarch_init): Adjust.
10134
10135 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
10136
10137         * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
10138         <have_tdb>: Change type to bool.
10139         (s390_gdbarch_tdep_alloc): Adjust.
10140         (s390_gdbarch_init): Adjust.
10141
10142 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
10143
10144         * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
10145         (gdbarch_tdep) <have_upper, have_vx>: New fields.
10146         (s390_gdbarch_tdep_alloc): New function.
10147         (s390_gdbarch_init): Allocate tdep at start and use its fields
10148         instead of separate variables.
10149
10150 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
10151
10152         * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
10153         when looking for cached gdbarch and add comment for remaining.
10154
10155 2018-01-22  Pedro Alves  <palves@redhat.com>
10156             Sergio Durigan Junior  <sergiodj@redhat.com>
10157
10158         * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
10159         case.
10160
10161 2018-01-22  Maciej W. Rozycki  <macro@mips.com>
10162
10163         * MAINTAINERS: Update my company e-mail address.
10164
10165 2018-01-22  Yao Qi  <yao.qi@linaro.org>
10166
10167         * regcache.c (cooked_write_test): New function.
10168         (_initialize_regcache): Register the test.
10169
10170 2018-01-22  Yao Qi  <yao.qi@linaro.org>
10171
10172         * ia64-tdep.c (ia64_pseudo_register_read): Call
10173         regcache->cooked_read instead of regcache_cooked_read_unsigned.
10174         * m32c-tdep.c (m32c_cat_read): Likewise.
10175         (m32c_r3r2r1r0_read): Likewise.
10176         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
10177         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
10178
10179 2018-01-22  Yao Qi  <yao.qi@linaro.org>
10180
10181         * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
10182         method raw_read instead of regcache_raw_read.
10183         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
10184         * arm-tdep.c (arm_neon_quad_read): Likewise.
10185         * avr-tdep.c (avr_pseudo_register_read): Likewise.
10186         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
10187         * frv-tdep.c (frv_pseudo_register_read): Likewise.
10188         * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
10189         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
10190         (i386_pseudo_register_read_into_value): Likewise.
10191         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
10192         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
10193         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
10194         * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
10195         * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
10196         * sparc-tdep.c (sparc32_pseudo_register_read):  Likewise.
10197         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
10198         * spu-tdep.c (spu_pseudo_register_read_spu):  Likewise.
10199         * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
10200
10201 2018-01-22  Yao Qi  <yao.qi@linaro.org>
10202
10203         * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
10204         * configure.tgt: Remove target mt.
10205         * mt-tdep.c: Remove.
10206         * regcache.c (cooked_read_test): Remove the check for mt.
10207
10208 2018-01-22  Yao Qi  <yao.qi@linaro.org>
10209
10210         * jit.c (jit_frame_prev_register): Call regcache::cooked_read
10211         instead of gdbarch_pseudo_register_read_value.
10212
10213 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
10214
10215         * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
10216         language is Ada.
10217
10218 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
10219
10220         * linespec.c (create_sals_line_offset): Remove code that preserved
10221         the symtab_and_line's line number.
10222
10223 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
10224
10225         * varobj.c (varobj_create): Don't set valid_block when creating a
10226         floating varobj.
10227
10228 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
10229
10230         * varobj.c (varobj_create): Remove out of date comment.
10231
10232 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
10233
10234         PR mi/20395
10235         * ada-exp.y (write_var_from_sym): Pass extra parameter when
10236         updating innermost block.
10237         * parse.c (innermost_block_tracker::update): Take extra type
10238         parameter, and check types match before updating innermost block.
10239         (write_dollar_variable): Update innermost block for registers.
10240         * parser-defs.h (enum innermost_block_tracker_type): New enum.
10241         (innermost_block_tracker::innermost_block_tracker): Initialise
10242         m_types member.
10243         (innermost_block_tracker::reset): Take type parameter.
10244         (innermost_block_tracker::update): Take type parameter, and pass
10245         type through as needed.
10246         (innermost_block_tracker::m_types): New member.
10247         * varobj.c (varobj_create): Pass type when reseting innermost
10248         block.
10249
10250 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
10251
10252         * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
10253         * ada-lang.c (resolve_subexp): Likewise.
10254         * breakpoint.c (set_breakpoint_condition) Likewise.
10255         (watch_command_1) Likewise.
10256         * c-exp.y (variable): Likewise.
10257         * d-exp.y (PrimaryExpression): Likewise.
10258         * f-exp.y (variable): Likewise.
10259         * go-exp.y (variable): Likewise.
10260         * m2-exp.y (variable): Likewise.
10261         * objfiles.c (objfile::~objfile): Likewise.
10262         * p-exp.y (variable): Likewise.
10263         * parse.c (innermost_block): Change type.
10264         * parser-defs.h (class innermost_block_tracker): New.
10265         (innermost_block): Change to innermost_block_tracker.
10266         * printcmd.c (display_command): Switch to innermost_block API.
10267         (do_one_display): Likewise.
10268         * rust-exp.y (do_one_display): Likewise.
10269         * symfile.c (clear_symtab_users): Likewise.
10270         * varobj.c (varobj_create): Switch to innermost_block API, replace
10271         use of innermost_block with block stored on varobj object.
10272
10273 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
10274
10275         * expression.h (innermost_block): Remove declaration.
10276         * varobj.c: Add 'parser-defs.h' include.
10277
10278 2018-01-19  Tom Tromey  <tom@tromey.com>
10279
10280         * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
10281         symbols in the static and global blocks.
10282
10283 2018-01-19  James Clarke  <jrtc27@jrtc27.com>
10284
10285         * nat/linux-ptrace.c: Remove unnecessary reinclusion of
10286         gdb_ptrace.h, and move including gdb_wait.h ...
10287         * nat/linux-ptrace.h: ... to here.
10288
10289 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
10290
10291         * inf-ptrace.c (inf_ptrace_detach): Adjust call to
10292         inf_ptrace_detach_success.
10293         (inf_ptrace_detach_success): Add inferior parameter, use it
10294         instead of inferior_ptid, pass it to detach_inferior.
10295         * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
10296         parameter.
10297         * inferior.c (detach_inferior): Add overload that takes an
10298         inferior object.
10299         * inferior.h (detach_inferior): Likewise.
10300         * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
10301         use inferior_ptid, adjust call to inf_ptrace_detach_success.
10302         * linux-thread-db.c (thread_db_detach): Use inf parameter.
10303
10304 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
10305
10306         * target.h (struct target_ops) <to_detach>: Add inferior
10307         parameter.
10308         (target_detach): Likewise.
10309         * target.c (dispose_inferior): Pass inferior down.
10310         (target_detach): Pass inferior down.  Assert that it is equal to
10311         the current inferior.
10312         * aix-thread.c (aix_thread_detach): Pass inferior down.
10313         * corefile.c (core_file_command): Pass current_inferior() down.
10314         * corelow.c (core_detach): Add inferior parameter.
10315         * darwin-nat.c (darwin_detach): Likewise.
10316         * gnu-nat.c (gnu_detach): Likewise.
10317         * inf-ptrace.c (inf_ptrace_detach): Likewise.
10318         * infcmd.c (detach_command): Pass current_inferior() down to
10319         target_detach.
10320         * infrun.c (follow_fork_inferior): Pass parent_inf to
10321         target_detach.
10322         (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
10323         target_detach.
10324         * linux-nat.c (linux_nat_detach): Add inferior parameter.
10325         * linux-thread-db.c (thread_db_detach): Likewise.
10326         * nto-procfs.c (procfs_detach): Likewise.
10327         * procfs.c (procfs_detach): Likewise.
10328         * record.c (record_detach): Likewise.
10329         * record.h (struct inferior): Forward-declare.
10330         (record_detach): Add inferior parameter.
10331         * remote-sim.c (gdbsim_detach): Likewise.
10332         * remote.c (remote_detach_1): Likewise.
10333         (remote_detach): Likewise.
10334         (extended_remote_detach): Likewise.
10335         * sol-thread.c (sol_thread_detach): Likewise.
10336         * target-debug.h (target_debug_print_inferior_p): New macro.
10337         * target-delegates.c: Re-generate.
10338         * top.c (kill_or_detach): Pass inferior down to target_detach.
10339         * windows-nat.c (windows_detach): Add inferior parameter.
10340
10341 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
10342
10343         * target.h (struct target_ops) <to_detach>: Remove args
10344         parameter.
10345         (target_detach): Likewise.
10346         * target.c (dispose_inferior): Adjust.
10347         (target_detach): Remove args parameter, adjust.
10348         * aix-thread.c (aix_thread_detach): Adjust.
10349         * corefile.c (core_file_command): Adjust.
10350         * corelow.c (core_detach): Adjust.
10351         * darwin-nat.c (darwin_detach): Adjust.
10352         * gnu-nat.c (gnu_detach): Adjust.
10353         * inf-ptrace.c (inf_ptrace_detach): Adjust.
10354         * infcmd.c (detach_command): Adjust
10355         * infrun.c (follow_fork_inferior): Adjust.
10356         (handle_vfork_child_exec_or_exit): Adjust.
10357         * linux-fork.c (linux_fork_detach): Remove args parameter.
10358         * linux-fork.h (linux_fork_detach): Likewise.
10359         * linux-nat.c (linux_nat_detach): Likewise, and adjust.
10360         * linux-thread-db.c (thread_db_detach): Likewise.
10361         * nto-procfs.c (procfs_detach): Likewise.
10362         * procfs.c (procfs_detach): Likewise.
10363         (do_detach): Remove signo parameter.
10364         * record.c (record_detach): Remove args parameter.
10365         * record.h (record_detach): Likewise.
10366         * remote-sim.c (gdbsim_detach): Likewise.
10367         * remote.c (remote_detach_1): Likewise.
10368         (remote_detach): Likewise.
10369         (extended_remote_detach): Likewise.
10370         * sol-thread.c (sol_thread_detach): Likewise.
10371         * target-delegates.c: Re-generate.
10372         * top.c (struct qt_args) <args>: Remove field.
10373         (kill_or_detach): Don't pass args.
10374         (quit_force): Don't set args.
10375         * windows-nat.c (windows_detach): Remove args parameter.
10376
10377 2018-01-19  Yao Qi  <yao.qi@linaro.org>
10378
10379         * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
10380         (arm_linux_init_abi): Install it.
10381
10382 2018-01-19  Yao Qi  <yao.qi@linaro.org>
10383
10384         * osabi.c (gdb_osabi_names): Extend the regexp for
10385         arm-linux-gnueabihf.
10386
10387 2018-01-18  Yao Qi  <yao.qi@linaro.org>
10388
10389         * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
10390         m_abbrevs.
10391         (abbrev_table::add_abbrev): Update.
10392         (abbrev_table::lookup_abbrev): Update.
10393
10394 2018-01-18  Yao Qi  <yao.qi@linaro.org>
10395
10396         * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
10397
10398 2018-01-17  Sergio Durigan Junior  <sergiodj@redhat.com>
10399
10400         * compile/compile.c (compile_to_object): Convert "triplet_rx"
10401         to "std::string".
10402
10403 2018-01-17  Tom Tromey  <tom@tromey.com>
10404
10405         * dwarf2read.c (symbolp): Remove typedef.  Don't instantiate VEC.
10406
10407 2018-01-17  Tom Tromey  <tom@tromey.com>
10408
10409         * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
10410         * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
10411         (create_array_type_with_stride): Update.
10412         * dwarf2read.c (set_die_type): Update.
10413
10414 2018-01-17  Tom Tromey  <tom@tromey.com>
10415
10416         * dwarf2read.c (delayed_method_info): Remove typedef.
10417         (dwarf2_cu::method_info): Now a std::vector.
10418         (add_to_method_list): Update.
10419         (free_delayed_list): Remove.
10420         (compute_delayed_physnames): Update.
10421         (process_full_comp_unit, process_full_type_unit): Clear the method
10422         list.  Remove cleanups.
10423         (psymtab_include_file_name): Add name_holder parameter.  Use
10424         unique_xmalloc_ptr.
10425         (dwarf_decode_lines): Update.
10426
10427 2018-01-17  Tom Tromey  <tom@tromey.com>
10428             Simon Marchi  <simon.marchi@ericsson.com>
10429
10430         * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
10431         (dwarf2_per_objfile::free_cached_comp_units)
10432         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
10433         (init_cutu_and_read_dies_no_follow): Update.
10434         (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
10435         (dwarf2_cu::~dwarf2_cu): New.
10436         (free_heap_comp_unit, free_stack_comp_unit): Remove.
10437         (age_cached_comp_units, free_one_cached_comp_unit): Update.
10438
10439 2018-01-17  Tom Tromey  <tom@tromey.com>
10440             Simon Marchi  <simon.marchi@ericsson.com>
10441
10442         * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
10443         (struct die_reader_specs) <abbrev_table>: New member.
10444         (struct abbrev_table): Add constructor.
10445         <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
10446         <abbrev_obstack>: Now an auto_obstack.
10447         (abbrev_table_up): New typedef.
10448         (init_cu_die_reader): Add abbrev_table parameter.
10449         (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
10450         Add result_dwo_abbrev_table.
10451         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
10452         (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
10453         Update.
10454         (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
10455         parameter.
10456         (skip_children): Update.
10457         (abbrev_table::alloc_abbrev): Rename from
10458         abbrev_table_alloc_abbrev.
10459         (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
10460         (abbrev_table::lookup_abbrev): Rename from
10461         abbrev_table_lookup_abbrev.
10462         (abbrev_table_read_table): Return abbrev_table_up.
10463         (abbrev_table_free, abbrev_table_free_cleanup)
10464         (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
10465         (load_partial_dies): Update.
10466
10467 2018-01-17  Tom Tromey  <tom@tromey.com>
10468
10469         * dwarf2read.c (dwarf2_compute_name): Update comment.
10470         (read_func_scope, read_variable): Update.
10471         (new_symbol): Remove.
10472         (new_symbol_full): Rename to new_symbol.
10473
10474 2018-01-17  Mike Gulick  <mgulick@mathworks.com>
10475
10476         PR gdb/16577
10477         * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
10478         a warning instead of throwing an error, set section size to 0 and return
10479         NULL.
10480         * gdb_bfd.h (gdb_bfd_map_section): Update description.
10481
10482 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
10483
10484         * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
10485         std::string.
10486         (linux_ptrace_attach_fail_reason_string): Likewise.
10487         * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
10488         Likewise.
10489         (linux_ptrace_attach_fail_reason_string): Likewise.
10490         * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
10491
10492 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
10493
10494         * linux-nat.c (linux_nat_attach): Remove xstrdup.
10495
10496 2018-01-17  Eldar Abusalimov  <eldar.abusalimov@jetbrains.com>
10497
10498         PR gdb/21559
10499         * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
10500         checking for fs_base/gs_base fields in struct user_regs_struct.
10501         * configure: Regenerate.
10502
10503 2018-01-17  Yao Qi  <yao.qi@linaro.org>
10504
10505         * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
10506         function.
10507         (aarch64_linux_init_abi): Install it to gdbarch hook
10508         gcc_target_options.
10509
10510 2018-01-15  Pedro Alves  <palves@redhat.com>
10511
10512         * common/signals-state-save-restore.c
10513         (save_original_signals_state): Fix typos.
10514
10515 2017-01-12  Tom Tromey  <tom@tromey.com>
10516             Sergio Durigan Junior  <sergiodj@redhat.com>
10517
10518         * Makefile.in (install-only): Install gdb-add-index.
10519
10520 2018-01-12  John Baldwin  <jhb@FreeBSD.org>
10521
10522         * fbsd-tdep.c (KVE_PROTECTION): Correct value.
10523
10524 2018-01-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10525
10526         * infrun.c (keep_going_pass_signal): Clear step-over info when
10527         insert_breakpoints fails.
10528
10529 2018-01-11  Pedro Alves  <palves@redhat.com>
10530
10531         PR gdb/22583
10532         * infrun.c (resume): Rename to ...
10533         (resume_1): ... this.
10534         (resume): Reimplement as wrapper around resume_1.
10535
10536 2018-01-11  Pedro Alves  <palves@redhat.com>
10537
10538         PR remote/22597
10539         * remote.c (remote_parse_stop_reply): Default to the last-set
10540         general thread instead of to 'magic_null_ptid'.
10541
10542 2018-01-10  Pedro Alves  <palves@redhat.com>
10543
10544         * language.h (language_get_symbol_name_matcher): Rename ...
10545         (get_symbol_name_matcher): ... this.
10546         * language.c (language_get_symbol_name_matcher): Ditto.
10547         * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
10548         callers adjusted.
10549
10550 2018-01-10  Pedro Alves  <palves@redhat.com>
10551
10552         PR gdb/22670
10553         * dwarf2read.c
10554         (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
10555         Adjust to use language_get_symbol_name_matcher instead of
10556         language_defn::la_get_symbol_name_matcher.
10557         * language.c (language_get_symbol_name_matcher): If in Ada mode
10558         and the lookup name is a verbatim match, return Ada's matcher.
10559         * language.h (language_get_symbol_name_matcher): Adjust comment.
10560         (ada_lookup_name_info::verbatim_p):: New method.
10561
10562 2018-01-10  Pedro Alves  <palves@redhat.com>
10563
10564         PR gdb/22670
10565         * ada-lang.c (ada_collect_symbol_completion_matches): If the
10566         minsym's language is language_auto or language_cplus, pass down
10567         language_ada instead.
10568         * symtab.c (compare_symbol_name): Don't frob symbol language here.
10569
10570 2018-01-10  Pedro Alves  <palves@redhat.com>
10571
10572         PR gdb/22670
10573         * minsyms.c (linkage_name_str): New function.
10574         (iterate_over_minimal_symbols): Use it.
10575
10576 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
10577
10578         * NEWS: Document that 'info proc' now works on FreeBSD.
10579
10580 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
10581
10582         * configure.ac: Check for kinfo_getfile in libutil.
10583         * configure: Regenerate.
10584         * config.in: Regenerate.
10585         * fbsd-nat.c: Include "fbsd-tdep.h".
10586         (fbsd_fetch_cmdline): New.
10587         (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
10588         rather than calling error.
10589         (fbsd_info_proc): New.
10590         (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
10591         (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
10592         (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
10593
10594 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
10595
10596         * fbsd-nat.c (struct free_deleter): Remove.
10597         (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
10598
10599 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
10600
10601         * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
10602         NULL for an empty pathname.
10603
10604 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
10605
10606         * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
10607         (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
10608         (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
10609         (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
10610         (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
10611         (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
10612         (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
10613         (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
10614         (kinfo_proc_layout_32, kinfo_proc_layout_i386)
10615         (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
10616         (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
10617         (fbsd_core_fetch_timeval, fbsd_print_sigset)
10618         (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
10619         (fbsd_init_abi):  Install gdbarch "core_info_proc" method.
10620         * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
10621
10622 2018-01-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>
10623
10624         * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
10625         (gnu_xfer_auxv): New function.
10626         (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
10627         TARGET_OBJECT_AUXV.
10628
10629 2018-01-08  Yao Qi  <yao.qi@linaro.org>
10630             Simon Marchi  <simon.marchi@ericsson.com>
10631
10632         * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
10633         common/selftest.c.
10634         (COMMON_OBS): Remove selftest.o.
10635         * configure.ac: Append selftest-arch.c and common/selftest.c to
10636         CONFIG_SRCS.  Append selftest-arch.o and selftest.o to COMMON_OBS.
10637         * configure: Re-generated.
10638         * maint.c (maintenance_selftest): Wrap selftests::run_tests with
10639         GDB_SELF_TEST.
10640         (maintenance_info_selftests): Likewise.
10641
10642 2018-01-08  Xavier Roirand  <roirand@adacore.com>
10643
10644         * ada-valprint.c (val_print_packed_array_elements): Use
10645         proper number of elements when printing an array indexed
10646         by an enumeration type.
10647
10648 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
10649
10650         * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
10651         (dw2_get_file_names_reader): Adjust.
10652         (lookup_dwo_signatured_type): Adjust.
10653         (lookup_dwp_signatured_type): Adjust.
10654         (lookup_signatured_type): Adjust.
10655         (create_type_unit_group): Adjust.
10656         (get_type_unit_group): Adjust.
10657         (process_psymtab_comp_unit_reader): Adjust.
10658         (build_type_psymtabs_reader): Adjust.
10659         (scan_partial_symbols): Adjust.
10660         (add_partial_symbol): Adjust.
10661         (add_partial_subprogram): Adjust.
10662         (peek_die_abbrev): Adjust.
10663         (fixup_go_packaging): Adjust.
10664         (process_imported_unit_die): Adjust.
10665         (dwarf2_compute_name): Adjust.
10666         (dwarf2_physname): Adjust.
10667         (read_import_statement): Adjust.
10668         (handle_DW_AT_stmt_list): Adjust.
10669         (read_file_scope): Adjust.
10670         (read_func_scope): Adjust.
10671         (read_lexical_block_scope): Adjust.
10672         (read_call_site_scope): Adjust.
10673         (read_variable): Adjust.
10674         (dwarf2_rnglists_process): Adjust.
10675         (dwarf2_ranges_process): Adjust.
10676         (dwarf2_ranges_read): Adjust.
10677         (dwarf2_get_pc_bounds): Adjust.
10678         (dwarf2_record_block_ranges): Adjust.
10679         (dwarf2_add_field): Adjust.
10680         (dwarf2_add_member_fn): Adjust.
10681         (read_structure_type): Adjust.
10682         (process_structure_scope): Adjust.
10683         (read_enumeration_type): Adjust.
10684         (read_array_type): Adjust.
10685         (mark_common_block_symbol_computed): Adjust.
10686         (read_common_block): Adjust.
10687         (read_namespace_type): Adjust.
10688         (read_namespace): Adjust.
10689         (read_module_type): Adjust.
10690         (read_tag_pointer_type): Adjust.
10691         (read_tag_ptr_to_member_type): Adjust.
10692         (read_tag_string_type): Adjust.
10693         (read_subroutine_type): Adjust.
10694         (read_typedef): Adjust.
10695         (read_base_type): Adjust.
10696         (attr_to_dynamic_prop): Adjust.
10697         (read_subrange_type): Adjust.
10698         (read_unspecified_type): Adjust.
10699         (dwarf2_read_abbrevs): Adjust.
10700         (load_partial_dies): Adjust.
10701         (read_partial_die): Adjust.
10702         (find_partial_die): Adjust.
10703         (guess_partial_die_structure_name): Adjust.
10704         (fixup_partial_die): Adjust.
10705         (read_attribute_value): Adjust.
10706         (read_addr_index): Adjust.
10707         (read_addr_index_from_leb128): Adjust.
10708         (read_str_index): Adjust.
10709         (dwarf2_string_attr): Adjust.
10710         (get_debug_line_section): Adjust.
10711         (dwarf_decode_line_header): Adjust.
10712         (lnp_state_machine::check_line_address): Adjust.
10713         (dwarf_decode_lines_1): Adjust.
10714         (dwarf_decode_lines): Adjust.
10715         (dwarf2_start_symtab): Adjust.
10716         (var_decode_location): Adjust.
10717         (new_symbol_full): Adjust.
10718         (dwarf2_const_value_data): Adjust.
10719         (dwarf2_const_value_attr): Adjust.
10720         (dwarf2_const_value): Adjust.
10721         (die_type): Adjust.
10722         (die_containing_type): Adjust.
10723         (build_error_marker_type): Adjust.
10724         (lookup_die_type): Adjust.
10725         (guess_full_die_structure_name): Adjust.
10726         (anonymous_struct_prefix): Adjust.
10727         (determine_prefix): Adjust.
10728         (dwarf2_name): Adjust.
10729         (follow_die_ref_or_sig): Adjust.
10730         (follow_die_offset): Adjust.
10731         (follow_die_ref): Adjust.
10732         (follow_die_sig_1): Adjust.
10733         (follow_die_sig): Adjust.
10734         (get_signatured_type): Adjust.
10735         (get_DW_AT_signature_type): Adjust.
10736         (decode_locdesc): Adjust.
10737         (dwarf_decode_macros): Adjust.
10738         (cu_debug_loc_section): Adjust.
10739         (fill_in_loclist_baton): Adjust.
10740         (dwarf2_symbol_mark_computed): Adjust.
10741         (init_one_comp_unit): Don't assign
10742         dwarf2_cu::dwarf2_per_objfile.
10743         (set_die_type): Adjust.
10744
10745 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
10746
10747         * dwarf2read.c (struct mapped_debug_names): Add constructor.
10748         <dwarf2_per_objfile>: New field.
10749         (dwarf2_per_objfile): Remove global.
10750         (get_dwarf2_per_objfile): New function.
10751         (set_dwarf2_per_objfile): New function.
10752         (dwarf2_build_psymtabs_hard): Change objfile parameter to
10753         dwarf2_per_objfile.
10754         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
10755         (read_abbrev_offset): Likewise.
10756         (read_indirect_string): Likewise.
10757         (read_indirect_line_string): Likewise.
10758         (read_indirect_string_at_offset): Likewise.
10759         (read_indirect_string_from_dwz): Likewise.
10760         (dwarf2_find_containing_comp_unit): Change objfile parameter to
10761         dwarf2_per_objfile.
10762         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
10763         (create_all_comp_units): Change objfile parameter to
10764         dwarf2_per_objfile.
10765         (create_all_type_units): Likewise.
10766         (process_queue): Add dwarf2_per_objfile parameter.
10767         (read_and_check_comp_unit_head): Likewise.
10768         (lookup_dwo_unit_in_dwp): Likewise.
10769         (get_dwp_file): Likewise.
10770         (process_cu_includes): Likewise.
10771         (struct free_dwo_file_cleanup_data): New struct.
10772         (dwarf2_has_info): Use get_dwarf2_per_objfile and
10773         set_dwarf2_per_objfile.
10774         (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
10775         (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
10776         context, adjust calls.
10777         (dw2_instantiate_symtab): Likewise.
10778         (dw2_get_cutu): Add dwarf2_per_objfile parameter.
10779         (dw2_get_cu): Likewise.
10780         (create_cu_from_index_list): Change objfile parameter to
10781         dwarf2_per_objfile.
10782         (create_cus_from_index_list): Get dwarf2_per_objfile from
10783         context, adjust calls.
10784         (create_cus_from_index): Likewise.
10785         (create_signatured_type_table_from_index): Change objfile
10786         parameter to dwarf2_per_objfile.
10787         (create_signatured_type_table_from_debug_names): Change objfile
10788         parameter to dwarf2_per_objfile.
10789         (create_addrmap_from_index): Likewise.
10790         (create_addrmap_from_aranges): Likewise.
10791         (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
10792         (dw2_setup): Remove.
10793         (dw2_get_file_names_reader): Get dwarf2_per_objfile from
10794         context.
10795         (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
10796         get_dwarf2_per_objfile.
10797         (dw2_forget_cached_source_info): Likewise.
10798         (dw2_map_symtabs_matching_filename): Likewise.
10799         (struct dw2_symtab_iterator) <index>: Remove.
10800         <dwarf2_per_objfile>: New field.
10801         (dw2_symtab_iter_init): Replace index parameter with
10802         dwarf2_per_objfile.
10803         (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
10804         (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
10805         (dw2_print_stats): Likewise.
10806         (dw2_dump): Likewise.
10807         (dw2_expand_symtabs_for_function): Likewise.
10808         (dw2_expand_all_symtabs): Likewise.
10809         (dw2_expand_symtabs_with_fullname): Likewise.
10810         (dw2_expand_marked_cus): Replace index and objfile parameters
10811         with dwarf2_per_objfile.
10812         (dw_expand_symtabs_matching_file_matcher): Add
10813         dwarf2_per_objfile parameter and adjust calls.
10814         (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
10815         adjust calls.
10816         (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
10817         (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
10818         adjust calls.
10819         (create_cus_from_debug_names_list): Replace objfile parameter
10820         with dwarf2_per_objfile and adjust calls.
10821         (create_cus_from_debug_names): Likewise.
10822         (dwarf2_read_debug_names): Likewise.
10823         (mapped_debug_names::namei_to_name): Adjust call.
10824         (dw2_debug_names_iterator::next): Likewise.
10825         (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
10826         (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
10827         (dw2_debug_names_dump): Likewise.
10828         (dw2_debug_names_expand_symtabs_for_function): Likewise.
10829         (dw2_debug_names_expand_symtabs_matching): Likewise.
10830         (dwarf2_initialize_objfile): Likewise.
10831         (dwarf2_build_psymtabs): Likewise.
10832         (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
10833         this_cu.
10834         (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
10835         (read_and_check_comp_unit_head): Likewise.
10836         (read_abbrev_offset): Likewise.
10837         (create_debug_type_hash_table): Likewise.
10838         (create_debug_types_hash_table): Likewise.
10839         (create_all_type_units): Replace objfile parameter with
10840         dwarf2_per_objfile.
10841         (add_type_unit): Add dwarf2_per_objfile parameter.
10842         (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
10843         with dwarf2_per_objfile.
10844         (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
10845         (lookup_dwp_signatured_type): Likewise.
10846         (lookup_signatured_type): Likewise.
10847         (read_cutu_die_from_dwo): Likewise.
10848         (init_tu_and_read_dwo_dies): Likewise.
10849         (init_cutu_and_read_dies): Likewise.
10850         (init_cutu_and_read_dies_no_follow): Likewise.
10851         (allocate_type_unit_groups_table): Add objfile parameter.
10852         (create_type_unit_group): Use dwarf2_per_objfile from cu.
10853         (get_type_unit_group): Likewise.
10854         (process_psymtab_comp_unit): Update call.
10855         (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
10856         (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
10857         (print_tu_stats): Likewise.
10858         (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
10859         in void* parameter.
10860         (build_type_psymtabs): Change objfile parameter to
10861         dwarf2_per_objfile.
10862         (process_skeletonless_type_unit): Use dwarf2_per_objfile
10863         passed in void* parameter.
10864         (process_skeletonless_type_units): Change objfile parameter to
10865         dwarf2_per_objfile.
10866         (set_partial_user): Likewise.
10867         (dwarf2_build_psymtabs_hard): Likewise.
10868         (read_comp_units_from_section): Likewise.
10869         (create_all_comp_units): Likewise.
10870         (scan_partial_symbols): Update calls.
10871         (add_partial_symbol): Likewise.
10872         (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
10873         (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
10874         (process_queue): Add dwarf2_per_objfile parameter.
10875         (get_compunit_symtab): Use dwarf2_per_objfile from cu.
10876         (compute_compunit_symtab_includes): Likewise.
10877         (process_cu_includes): Add dwarf2_per_objfile parameter.
10878         (process_full_comp_unit): Use dwarf2_per_objfile from cu.
10879         (process_full_type_unit): Likewise.
10880         (process_imported_unit_die): Update call.
10881         (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
10882         (read_file_scope): Likewise.
10883         (allocate_dwo_file_hash_table): Add objfile parameter.
10884         (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
10885         (create_cus_hash_table): Likewise.
10886         (create_dwp_hash_table): Likewise.
10887         (create_dwo_unit_in_dwp_v1): Likewise.
10888         (create_dwp_v2_section): Likewise.
10889         (create_dwo_unit_in_dwp_v2): Likewise.
10890         (lookup_dwo_unit_in_dwp): Likewise.
10891         (try_open_dwop_file): Likewise.
10892         (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
10893         (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
10894         cleanup to include a reference to dwarf2_per_objfile.
10895         (open_dwp_file): Add dwarf2_per_objfile parameter.
10896         (open_and_init_dwp_file): Likewise.
10897         (get_dwp_file): Likewise.
10898         (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
10899         (queue_and_load_all_dwo_tus): Update call.
10900         (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
10901         data.
10902         (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
10903         (dwarf2_ranges_process): Likewise.
10904         (dwarf2_get_pc_bounds): Likewise.
10905         (mark_common_block_symbol_computed): Likewise.
10906         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
10907         (dwarf2_read_abbrevs): Update call.
10908         (read_partial_die): Use dwarf2_per_objfile from cu.
10909         (find_partial_die): Likewise.
10910         (fixup_partial_die): Likewise.
10911         (read_attribute_value): Likewise.
10912         (read_indirect_string_at_offset_from): Add objfile parameter.
10913         (read_indirect_string_at_offset): Add dwarf2_per_objfile
10914         parameter.
10915         (read_indirect_string_from_dwz): Add objfile parameter.
10916         (read_indirect_string): Add objfile parameter.
10917         (read_addr_index_1): Add dwarf2_per_objfile parameter.
10918         (read_addr_index): Use dwarf2_per_objfile from cu.
10919         (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
10920         call dw2_setup.
10921         (read_str_index): Use dwarf2_per_objfile from cu.
10922         (get_debug_line_section): Likewise.
10923         (read_formatted_entries): Add dwarf2_per_objfile parameter.
10924         (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
10925         (new_symbol_full): Use dwarf2_per_objfile from cu.
10926         (build_error_marker_type): Likewise.
10927         (lookup_die_type): Likewise.
10928         (determine_prefix): Likewise.
10929         (follow_die_offset): Likewise.
10930         (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
10931         (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
10932         (dwarf2_fetch_die_type_sect_off): Likewise.
10933         (dwarf2_get_die_type): Likewise.
10934         (follow_die_sig_1): Use dwarf2_per_objfile from cu.
10935         (get_signatured_type): Likewise.
10936         (get_DW_AT_signature_type): Likewise.
10937         (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
10938         (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
10939         (cu_debug_loc_section): Likewise.
10940         (fill_in_loclist_baton): Likewise.
10941         (dwarf2_symbol_mark_computed): Likewise.
10942         (dwarf2_find_containing_comp_unit): Change objfile parameter to
10943         dwarf2_per_objfile.
10944         (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
10945         parameter.
10946         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
10947         (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
10948         (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
10949         (set_die_type): Use dwarf2_free_objfile from cu.
10950         (get_die_type_at_offset): Likewise.
10951         (dwarf2_per_objfile_free): Don't assign global variable.
10952         (debug_names) <constructor>: Add dwarf2_per_objfile
10953         parameter, update m_debugstrlookup construction.
10954         (debug_names::debug_str_lookup): Add dwarf2_per_objfile
10955         parameter.
10956         <m_dwarf2_per_objfile>: New field.
10957         <lookup>: Use m_dwarf2_per_objfile.
10958         (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
10959         (psyms_seen_size): Likewise.
10960         (write_gdbindex): Replace objfile parameter with
10961         dwarf2_per_objfile.
10962         (write_debug_names): Likewise.
10963         (write_psymtabs_to_index): Likewise.
10964         (save_gdb_index_command): Use get_dwarf2_per_objfile, update
10965         calls.
10966
10967 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
10968
10969         * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
10970         <dwarf2_per_objfile>: New field.
10971         (struct dwarf2_per_cu_data) <objfile>: Remove.
10972         <dwarf2_per_objfile>: New field.
10973         (create_cu_from_index_list): Assign dwarf2_per_objfile instead
10974         of objfile.
10975         (create_signatured_type_table_from_index): Likewise.
10976         (create_debug_type_hash_table): Likewise.
10977         (fill_in_sig_entry_from_dwo_entry): Likewise.
10978         (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
10979         (create_type_unit_group): Assign dwarf2_per_objfile instead of
10980         objfile.
10981         (create_partial_symtab): Access objfile through
10982         dwarf2_per_objfile.
10983         (process_psymtab_comp_unit_reader): Likewise.
10984         (read_comp_units_from_section): Likewise.
10985         (scan_partial_symbols): Likewise.
10986         (add_partial_symbol): Likewise.
10987         (add_partial_subprogram): Likewise.
10988         (peek_die_abbrev): Likewise.
10989         (fixup_go_packaging): Likewise.
10990         (process_full_comp_unit): Likewise.
10991         (process_full_type_unit): Likewise.
10992         (process_imported_unit_die): Likewise.
10993         (dwarf2_compute_name): Likewise.
10994         (dwarf2_physname): Likewise.
10995         (read_import_statement): Likewise.
10996         (create_cus_hash_table): Assign dwarf2_physname instead of
10997         objfile.
10998         (read_func_scope): Access objfile through dwarf2_per_objfile.
10999         (read_lexical_block_scope): Likewise.
11000         (read_call_site_scope): Likewise.
11001         (read_variable): Likewise.
11002         (dwarf2_rnglists_process): Likewise.
11003         (dwarf2_ranges_process): Likewise.
11004         (dwarf2_ranges_read): Likewise.
11005         (dwarf2_record_block_ranges): Likewise.
11006         (dwarf2_add_field): Likewise.
11007         (dwarf2_add_member_fn): Likewise.
11008         (read_structure_type): Likewise.
11009         (process_structure_scope): Likewise.
11010         (read_enumeration_type): Likewise.
11011         (read_array_type): Likewise.
11012         (read_common_block): Likewise.
11013         (read_namespace_type): Likewise.
11014         (read_namespace): Likewise.
11015         (read_module_type): Likewise.
11016         (read_tag_pointer_type): Likewise.
11017         (read_tag_ptr_to_member_type): Likewise.
11018         (read_tag_string_type): Likewise.
11019         (read_subroutine_type): Likewise.
11020         (read_typedef): Likewise.
11021         (read_base_type): Likewise.
11022         (attr_to_dynamic_prop): Likewise.
11023         (read_subrange_type): Likewise.
11024         (read_unspecified_type): Likewise.
11025         (load_partial_dies): Likewise.
11026         (read_partial_die): Likewise.
11027         (find_partial_die): Likewise.
11028         (guess_partial_die_structure_name): Likewise.
11029         (fixup_partial_die): Likewise.
11030         (read_attribute_value): Likewise.
11031         (read_addr_index_from_leb128): Likewise.
11032         (dwarf2_read_addr_index): Likewise.
11033         (dwarf2_string_attr): Likewise.
11034         (lnp_state_machine::check_line_address): Likewise.
11035         (dwarf_decode_lines_1): Likewise.
11036         (dwarf_decode_lines): Likewise.
11037         (dwarf2_start_symtab): Likewise.
11038         (var_decode_location): Likewise.
11039         (new_symbol_full): Likewise.
11040         (dwarf2_const_value_data): Likewise.
11041         (dwarf2_const_value_attr): Likewise.
11042         (dwarf2_const_value): Likewise.
11043         (die_type): Likewise.
11044         (die_containing_type): Likewise.
11045         (lookup_die_type): Likewise.
11046         (guess_full_die_structure_name): Likewise.
11047         (anonymous_struct_prefix): Likewise.
11048         (dwarf2_name): Likewise.
11049         (follow_die_ref_or_sig): Likewise.
11050         (follow_die_offset): Likewise.
11051         (follow_die_ref): Likewise.
11052         (dwarf2_fetch_die_loc_sect_off): Likewise.
11053         (dwarf2_fetch_constant_bytes): Likewise.
11054         (dwarf2_fetch_die_type_sect_off): Likewise.
11055         (dwarf2_get_die_type): Likewise.
11056         (follow_die_sig): Likewise.
11057         (decode_locdesc): Likewise.
11058         (dwarf2_per_cu_objfile): Likewise.
11059         (dwarf2_per_cu_text_offset): Likewise.
11060         (init_one_comp_unit): Assign dwarf2_per_objfile instead of
11061         objfile.
11062         (set_die_type): Access objfile through
11063         dwarf2_per_objfile.
11064
11065 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
11066
11067         * valprint.c (converted_character_d): Remove typedef.
11068         (DEF_VEC_O (converted_character_d)): Remove.
11069         (count_next_character): Use std::vector.
11070         (print_converted_chars_to_obstack): Likewise.
11071         (generic_printstr): Likewise.
11072
11073 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
11074
11075         * xml-support.h (struct gdb_xml_value): Add constructor.
11076         <value>: Change type to unique_xmalloc_ptr.
11077         (gdb_xml_value_s): Remove typedef.
11078         (DEF_VEC_O (gdb_xml_value_s)): Remove.
11079         (gdb_xml_element_start_handler): Change parameter type to
11080         std::vector.
11081         (xml_find_attribute): Likewise.
11082         * xml-support.c (xml_find_attribute): Change parameter type to
11083         std::vector and adjust.
11084         (gdb_xml_values_cleanup): Remove.
11085         (gdb_xml_parser::start_element): Adjust to std::vector.
11086         (xinclude_start_include): Change paraeter type to std::vector
11087         and adjust.
11088         * btrace.c (check_xml_btrace_version): Likewise.
11089         (parse_xml_btrace_block): Likewise.
11090         (parse_xml_btrace_pt_config_cpu): Likewise.
11091         (parse_xml_btrace_pt): Likewise.
11092         (parse_xml_btrace_conf_bts): Likewise.
11093         (parse_xml_btrace_conf_pt): Likewise.
11094         * memory-map.c (memory_map_start_memory): Likewise.
11095         (memory_map_start_property): Likewise.
11096         * osdata.c (osdata_start_osdata): Likewise.
11097         (osdata_start_item): Likewise.
11098         (osdata_start_column): Likewise.
11099         * remote.c (start_thread): Likewise.
11100         * solib-aix.c (library_list_start_library): Likewise.
11101         (library_list_start_list): Likewise.
11102         * solib-svr4.c (library_list_start_library): Likewise.
11103         (svr4_library_list_start_list): Likewise.
11104         * solib-target.c (library_list_start_segment): Likewise.
11105         (library_list_start_section): Likewise.
11106         (library_list_start_library): Likewise.
11107         (library_list_start_list): Likewise.
11108         * tracepoint.c (traceframe_info_start_memory): Likewise.
11109         (traceframe_info_start_tvar): Likewise.
11110         * xml-syscall.c (syscall_start_syscall): Likewise.
11111         * xml-tdesc.c (tdesc_start_target): Likewise.
11112         (tdesc_start_feature): Likewise.
11113         (tdesc_start_reg): Likewise.
11114         (tdesc_start_union): Likewise.
11115         (tdesc_start_struct): Likewise.
11116         (tdesc_start_flags): Likewise.
11117         (tdesc_start_enum): Likewise.
11118         (tdesc_start_field): Likewise.
11119         (tdesc_start_enum_value): Likewise.
11120         (tdesc_start_vector): Likewise.
11121
11122 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
11123
11124         * extension.h (struct xmethod_worker) <clone>: Remove.
11125         * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
11126         Remove.
11127         (python_xmethod_worker::clone): Remove.
11128         * valops.c (find_overload_match): Use std::move instead of
11129         clone.
11130
11131 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
11132
11133         * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
11134         (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
11135         <free_xmethod_worker_data>: Remove.
11136         <get_matching_xmethod_workers>: Chance VEC to std::vector.
11137         <get_xmethod_arg_types>: Remove.
11138         <get_xmethod_result_type>: Remove.
11139         <invoke_xmethod>: Remove.
11140         * extension.c (new_xmethod_worker): Remove.
11141         (clone_xmethod_worker): Remove.
11142         (get_matching_xmethod_workers): Return void, pass std::vector by
11143         pointer.
11144         (get_xmethod_arg_types): Rename to...
11145         (xmethod_worker::get_arg_types): ... this, and adjust.
11146         (get_xmethod_result_type): Rename to...
11147         (xmethod_worker::get_result_type): ... this, and adjust.
11148         (invoke_xmethod): Remove.
11149         (free_xmethod_worker): Remove.
11150         (free_xmethod_worker_vec): Remove.
11151         * extension.h (enum ext_lang_rc): Move here from
11152         extension-priv.h.
11153         (struct xmethod_worker): Add constructor and destructor.
11154         <data>: Remove.
11155         <value>: Remove.
11156         <invoke, clone, do_get_result_type, do_get_arg_types>: New
11157         virtual pure methods.
11158         <get_arg_types, get_result_type>: New methods.
11159         (xmethod_worker_ptr): Remove typedef.
11160         (DEF_VEC_P (xmethod_worker_ptr)): Remove.
11161         (xmethod_worker_vec): Remove typedef.
11162         (xmethod_worker_up): New typedef.
11163         (invoke_xmethod): Remove.
11164         (clone_xmethod_worker): Remove.
11165         (free_xmethod_worker): Remove.
11166         (free_xmethod_worker_vec): Remove.
11167         (get_xmethod_arg_types): Remove.
11168         (get_xmethod_result_type): Remove.
11169         * valops.c (find_method_list): Use std::vector, don't use
11170         intermediate vector.
11171         (value_find_oload_method_list): Use std::vector.
11172         (find_overload_match): Use std::vector.
11173         (find_oload_champ): Use std::vector.
11174         * value.c (value_free): Use operator delete.
11175         (value_of_xmethod): Rename to...
11176         (value_from_xmethod): ... this.  Don't assign
11177         xmethod_worker::value, take rvalue-reference.
11178         (result_type_of_xmethod): Adjust.
11179         (call_xmethod): Adjust.
11180         * value.h: Include extension.h.
11181         (struct xmethod_worker): Don't forward-declare.
11182         (value_of_xmethod): Rename to...
11183         (value_from_xmethod): ... this, take rvalue-reference.
11184         * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
11185         (struct python_xmethod_worker): ... this, add constructor and
11186         destructor.
11187         <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
11188         (gdbpy_free_xmethod_worker_data): Rename to...
11189         (python_xmethod_worker::~python_xmethod_worker): ... this and
11190         adjust.
11191         (gdbpy_clone_xmethod_worker_data): Rename to...
11192         (python_xmethod_worker::clone): ... this and adjust.
11193         (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
11194         temporary vector.
11195         (gdbpy_get_xmethod_arg_types): Rename to...
11196         (python_xmethod_worker::do_get_arg_types): ... this and adjust.
11197         (gdbpy_get_xmethod_result_type): Rename to...
11198         (python_xmethod_worker::do_get_result_type): ... this and
11199         adjust.
11200         (gdbpy_invoke_xmethod): Rename to...
11201         (python_xmethod_worker::invoke): ... this and adjust.
11202         (new_python_xmethod_worker): Rename to...
11203         (python_xmethod_worker::python_xmethod_worker): ... this and
11204         adjust.
11205         * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
11206         Remove.
11207         (gdbpy_free_xmethod_worker_data): Remove.
11208         (gdbpy_get_matching_xmethod_workers): Use std::vector.
11209         (gdbpy_get_xmethod_arg_types): Remove.
11210         (gdbpy_get_xmethod_result_type): Remove.
11211         (gdbpy_invoke_xmethod): Remove.
11212         * python/python.c (python_extension_ops): Remove obsolete
11213         callbacks.
11214
11215 2018-01-05  Pedro Alves  <palves@redhat.com>
11216
11217         PR gdb/18653
11218         * common/signals-state-save-restore.c
11219         (save_original_signals_state): New parameter 'quiet'.  Warn if we
11220         find a custom handler preinstalled, instead of internal erroring.
11221         But only warn if !quiet.
11222         * common/signals-state-save-restore.h
11223         (save_original_signals_state): New parameter 'quiet'.
11224         * main.c (captured_main_1): Move save_original_signals_state call
11225         after option handling, and pass QUIET.
11226
11227 2018-01-05  Pedro Alves  <palves@redhat.com>
11228
11229         * spu-tdep.c (spu_catch_start): Pass
11230         symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
11231
11232 2018-01-05  Pedro Alves  <palves@redhat.com>
11233
11234         PR gdb/22670
11235         * ada-lang.c (literal_symbol_name_matcher): New function.
11236         (ada_get_symbol_name_matcher): Use it for
11237         symbol_name_match_type::SEARCH_NAME.
11238         * block.c (block_lookup_symbol): New parameter 'match_type'.  Pass
11239         it down instead of assuming symbol_name_match_type::FULL.
11240         * block.h (block_lookup_symbol): New parameter 'match_type'.
11241         * c-valprint.c (print_unpacked_pointer): Use
11242         lookup_symbol_search_name instead of lookup_symbol.
11243         * compile/compile-object-load.c (get_out_value_type): Pass down
11244         symbol_name_match_type::SEARCH_NAME.
11245         * cp-namespace.c (cp_basic_lookup_symbol): Pass down
11246         symbol_name_match_type::FULL.
11247         * cp-support.c (cp_get_symbol_name_matcher): Handle
11248         symbol_name_match_type::SEARCH_NAME.
11249         * infrun.c (insert_exception_resume_breakpoint): Use
11250         lookup_symbol_search_name.
11251         * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
11252         * psymtab.c (maintenance_check_psymtabs): Use
11253         symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
11254         * stack.c (print_frame_args): Use lookup_symbol_search_name and
11255         SYMBOL_SEARCH_NAME.
11256         * symtab.c (lookup_local_symbol): Don't demangle the lookup name
11257         if symbol_name_match_type::SEARCH_NAME.
11258         (lookup_symbol_in_language): Pass down
11259         symbol_name_match_type::FULL.
11260         (lookup_symbol_search_name): New.
11261         (lookup_language_this): Pass down
11262         symbol_name_match_type::SEARCH_NAME.
11263         (lookup_symbol_aux, lookup_local_symbol): New parameter
11264         'match_type'.  Pass it down.
11265         * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
11266         (lookup_symbol_search_name): New declaration.
11267         (lookup_symbol_in_block): New 'match_type' parameter.
11268
11269 2018-01-05  Pedro Alves  <palves@redhat.com>
11270
11271         PR gdb/22670
11272         * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
11273         ada_lookup_symbol.
11274         (ada_lookup_symbol): Reimplement in terms of
11275         ada_lookup_symbol_list, bits factored out from
11276         ada_lookup_encoded_symbol.
11277
11278 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
11279
11280         * ada-exp.y (write_object_renaming): When subscripting an array
11281         using a symbol as the index, pass the block in call to
11282         ada_lookup_encoded_symbol when looking that symbol up.
11283
11284 2018-01-05  Jerome Guitton  <guitton@adacore.com>
11285
11286         * ada-lang.c (ada_array_length): Use ada_index_type instead of
11287         TYPE_INDEX_TYPE.
11288
11289 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
11290
11291         * ada-lang.c (ada_to_fixed_value_create): Add handling of
11292         the case where VALUE_LVAL (val0) is not lval_memory.
11293
11294 2018-01-05  Xavier Roirand  <roirand@adacore.com>
11295
11296         * ada-valprint.c (print_optional_low_bound): Handle
11297         character-indexed array printing like boolean-indexed array
11298         printing.
11299
11300 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
11301
11302         * NEWS: Create a new section for the next release branch.
11303         Rename the section of the current branch, now that it has
11304         been cut.
11305
11306 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
11307
11308         GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
11309         * version.in: Bump version to 8.1.50.DATE-git.
11310
11311 2018-01-03  Xavier Roirand  <roirand@adacore.com>
11312
11313         * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
11314         Add field.
11315         * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
11316         Add field.
11317         (default_exception_support_info) <catch_handlers_sym>: Add field.
11318         (exception_support_info_fallback) <catch_handlers_sym>: Add field.
11319         (ada_exception_name_addr_1): Add "catch handlers" handling.
11320         (ada_exception_catchpoint_cond_string) <ex>: New parameter.
11321         Update all callers.
11322         (create_excep_cond_exprs) <ex>: Add parameter.
11323         (re_set_exception): Update create_excep_cond_exprs call.
11324         (print_it_exception, print_one_exception, print_mention_exception)
11325         (print_recreate_exception): Add "catch handler" handling.
11326         (allocate_location_catch_handlers, re_set_catch_handlers)
11327         (check_status_catch_handlers, print_it_catch_handlers)
11328         (print_one_catch_handlers, print_mention_catch_handlers)
11329         (print_recreate_catch_handlers): New function.
11330         (catch_handlers_breakpoint_ops): New variable.
11331         (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
11332         Add parameter.  Add "catch handler" handling.
11333         (ada_exception_sym_name, ada_exception_breakpoint_ops):
11334         Add "catch handler" handling.
11335         (ada_exception_catchpoint_cond_string): Add "catch handler"
11336         handling.
11337         (create_ada_exception_catchpoint): Update create_excep_cond_exprs
11338         call.
11339         (catch_ada_handlers_command): New function.
11340         (initialize_ada_catchpoint_ops): Initialize "catch handlers"
11341         operations structure.
11342         (_initialize_ada_language): Add "catch handlers" command entry.
11343         * NEWS: Document "catch handlers" feature.
11344
11345 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
11346
11347         * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
11348         account when creating the array type of the slice.
11349         (ada_value_slice): Likewise.
11350
11351 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
11352
11353         * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
11354         New enum value.
11355         (create_array_type_with_stride): Add byte_stride_prop parameter.
11356         * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
11357         New parameter.  Update all callers in this file.
11358         (array_type_has_dynamic_stride): New function.
11359         (is_dynamic_type_internal, resolve_dynamic_array): Add handling
11360         of arrays with dynamic byte strides.
11361         * dwarf2read.c (read_array_type): Add support for dynamic
11362         DW_AT_byte_stride attributes.
11363
11364 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
11365
11366         * dwarf2read.c (read_unspecified_type): Treat
11367         DW_TAG_enumeration_type DIEs from Ada units as stubs.
11368
11369 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
11370
11371         Update copyright year range in all GDB files.
11372
11373 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
11374
11375         * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
11376         and gdb/testsuite/gdb.base/step-line.c.
11377
11378 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
11379
11380         * copyright.py (main): Dump the contents of
11381         MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
11382         even if BY_HAND is empty.
11383
11384 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
11385
11386         * top.c (print_gdb_version): Update Copyright year in version
11387         message.
11388
11389 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
11390
11391         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
11392
11393 For older changes see ChangeLog-2017.
11394 \f
11395 Local Variables:
11396 mode: change-log
11397 left-margin: 8
11398 fill-column: 74
11399 version-control: never
11400 coding: utf-8
11401 End: