Use pulongest in aarch64-linux-tdep.c
[external/binutils.git] / gdb / ChangeLog
1 2018-08-15  Tom Tromey  <tom@tromey.com>
2
3         * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
4
5 2018-08-14  Jan Vrany  <jan.vrany@fit.cvut.cz>
6
7         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
8         If used, use find_pc_partial_function to find address range
9         to disassemble.
10         * mi/mi-main.c (mi_cmd_list_features): Report
11         "data-disassemble-a-option" feature.
12         * NEWS: Mention new -data-disassemble option -a.
13
14 2018-08-13  Tom Tromey  <tom@tromey.com>
15
16         * common/common-defs.h (_FORTIFY_SOURCE): Define.
17
18 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
19
20         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
21         (aarch64_linux_collect_sve_regset): Likewise.
22         (aarch64_linux_iterate_over_regset_sections): Check for SVE.
23         * regcache.h (regcache_map_entry_size): New function.
24
25 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
26
27         * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
28         (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
29         (SVE_HEADER_VL_LENGTH): Likewise.
30         (SVE_HEADER_MAX_VL_LENGTH): Likewise.
31         (SVE_HEADER_FLAGS_LENGTH): Likewise.
32         (SVE_HEADER_RESERVED_LENGTH): Likewise.
33         (SVE_HEADER_SIZE_OFFSET): Likewise.
34         (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
35         (SVE_HEADER_VL_OFFSET): Likewise.
36         (SVE_HEADER_MAX_VL_OFFSET): Likewise.
37         (SVE_HEADER_FLAGS_OFFSET): Likewise.
38         (SVE_HEADER_RESERVED_OFFSET): Likewise.
39         (SVE_HEADER_SIZE): Likewise.
40         (aarch64_linux_core_read_vq): Add function.
41         (aarch64_linux_core_read_description): Check for SVE section.
42
43 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
44
45         * aarch64-fbsd-tdep.c
46         (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
47         collect_size.
48         * aarch64-linux-tdep.c
49         (aarch64_linux_iterate_over_regset_sections): Likewise.
50         * alpha-linux-tdep.c
51         (alpha_linux_iterate_over_regset_sections):
52         * alpha-nbsd-tdep.c
53         (alphanbsd_iterate_over_regset_sections): Likewise.
54         * amd64-fbsd-tdep.c
55         (amd64fbsd_iterate_over_regset_sections): Likewise.
56         * amd64-linux-tdep.c
57         (amd64_linux_iterate_over_regset_sections): Likewise.
58         * arm-bsd-tdep.c
59         (armbsd_iterate_over_regset_sections): Likewise.
60         * arm-fbsd-tdep.c
61         (arm_fbsd_iterate_over_regset_sections): Likewise.
62         * arm-linux-tdep.c
63         (arm_linux_iterate_over_regset_sections): Likewise.
64         * corelow.c (get_core_registers_cb): Likewise.
65         (core_target::fetch_registers): Likewise.
66         * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
67         * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
68         * gdbarch.h (void): Regenerate.
69         * gdbarch.sh: Add supply_size and collect_size.
70         * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
71         * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
72         * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
73         * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
74         * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
75         * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
76         * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
77         * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
78         * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
79         * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
80         * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
81         * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
82         * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
83         * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
84         * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
85         * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
86         * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
87         * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
88         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
89         * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
90         * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
91         * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
92         * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
93         * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
94         * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
95         * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
96         * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
97         * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
98         * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
99         * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
100
101 2018-08-10  Simon Marchi  <simon.marchi@ericsson.com>
102
103         * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
104         with string_printf.
105
106 2018-08-10  Keith Seitz  <keiths@redhat.com>
107
108         * compile/compile-c-support.c (add_code_header, add_code_footer):
109         Move into policy class.
110         (c_push_user_expression, pop_user_expression_nop)
111         (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
112         (compile_program): New host class.
113         (c_compile_program): New typedef.
114         (c_compute_porgram): Use c_compile_program.
115
116 2018-08-10  Keith Seitz  <keiths@redhat.com>
117
118         * compile/compile-internal.h (compile_instance::~compile_instance):
119         Remove calls to htab_delete.
120         <m_type_map, m_symbol_err_map>: Switch type to htab_up.
121         * compile.c (compile_instance::compile_instance): Initialize
122         htab unique pointers.
123         (compile_instance::get_cached_type, compile_instance::insert_type)
124         (compile_instance::error_symbol_once): Update for unique_ptr.
125
126 2018-08-10  Keith Seitz  <keiths@redhat.com>
127
128         * compile/compile-c-symbols.c (struct symbol_error)
129         (hash_symbol_error, eq_symbol_error, del_symbol_error)
130         (compile_instance::insert_symbol_error)
131         (compile_instance::error_symbol_once): Move to ...
132         * compile/compile.c: ... here.
133
134 2018-08-10  Keith Seitz  <keiths@redhat.com>
135
136         * compile/compile-c-support.c (c_get_compile_context): Use `new'
137         instead of `new_compile_instance'.
138         * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
139         Update description.
140         If the symbol error map is not initialized, create it.
141         (generate_c_for_for_one_symbol): Do not check/initialize
142         the symbol error map.
143         * compile/compile-c-types.c (compile_c_instance): Make a class.
144         Update all callers.
145         (compile_instance::compile_instance): Initialize the type cache.
146         (get_cached_type): New function.
147         (insert_type): Update description.
148         (compile_c_instance::m_default_cflags): Define.
149         (convert_type): Update description.  Use get_cached_type.
150         (delete_instance): Moved to destructor.
151         (new_compile_instance): Moved to constructor.
152         * compile/compile-c.h (compile_c_instance): Make class inheriting
153         from compile_instance.
154         <base>: Remove field.
155         <type_map, symbol_err_map>: Move to base class.
156         <c_plugin>: Rename to `m_plugin' and remove pointer type.
157         * compile/compile-internal.h (compile_instance): Make class.
158         <type_map_t, symbol_err_map_t>: Define.
159         <fe>: Rename to `m_gcc_fe'.
160         <scope, block, gcc_target_options>: Add `m_' prefix.
161         <m_type_map, m_symbol_err_map>: New fields, moved from
162         compile_c_instance.
163         <destroy>: Remove.
164         (convert_type, new_compile_instance): Remove.
165         * compile/compile.c (cleanup_compile_instance): Remove.
166         (compile_to_object): Use unique_ptr to eliminate cleanups.
167         (compile_instance::set_print_callback, compile_instance::version)
168         (compile_instance::set_verbose)
169         (compile_instance::set_driver_filename)
170         (compile_instance::set_triplet_regexp)
171         (compile_instance::set_arguments)
172         (compile_instance::set_source_file)
173         (compile_instance::compile): Define.
174
175 2018-08-10  Keith Seitz  <keiths@redhat.com>
176
177         * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
178         * compile/compile-c-types.c: Define GCC_METHODN macros and include
179         gcc-c-fe.def to define C plugin.
180         (delete_instance): Delete `c_plugin'.
181         (new_compile_instance): Initialize `c_plugin'.
182         * compile/compile-c.h: Include gcc_c_plugin.h.
183         (struct compile_c_instance) <c_plugin>: New member.
184         * gcc-c-plugin.h: New file.
185         Update all callers with API change.
186
187 2018-08-10  Keith Seitz  <keiths@redhat.com>
188
189         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
190         (HFILES_NO_SRCDIR): ... to here.
191         Add compile-internal.h and compile-c.h.
192         * compile/compile-c-support.c: Include compile-c.h.
193         * compile/compile-c-symbols.c: Include compile-c.h.
194         (generate_c_for_variable_locations): Update comment.
195         * compile/compile-c-types.c: Include compile-c.h.
196         * compile/compile-c.h: New file -- moved C language declarations
197         from other files here.
198         * compile/compile-internal.h: Do not include hashtab.h or
199         common/enum-flags.h.
200         (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
201         (gcc_convert_symbol, gcc_symbol_address)
202         (generate_c_for_variable_locations, c_get_mode_for_size)
203         (c_get_range_decl_name): Definitions moved to compile-c.h.
204         * compile/compile-loc2c.c: Include compile-c.h.
205
206 2018-08-10  Keith Seitz  <keiths@redhat.com>
207
208         * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
209         (c_symbol_substitution_name): ... this.
210         Update all callers.
211
212 2018-08-10  Keith Seitz  <keiths@redhat.com>
213
214         * compile/compile-c-support.c (c_compute_program): Use
215         unique_xmalloc_ptr to eliminate cleanup.
216         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
217         Return a unique_xmalloc_ptr and eliminate cleanup.
218         * compile/compile-internal.h (generate_c_for_variable_locations):
219         Return unique_xmalloc_ptr and update description.
220
221 2018-08-10  Alan Hayward  <alan.hayward@arm.com>
222
223         * corelow.c (core_target::get_core_register_section): Rename
224         min_size to section_min_size.
225
226 2018-08-09  Jim Wilson  <jimw@sifive.com>
227
228         * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
229         (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
230         * NEWS: Mention new GNU/Linux RISC-V target.
231         * configure.host: Add riscv*-*-linux*.
232         * configure.nat: Add riscv*.
233         * configure.tgt: Add riscv*-*-linux*.
234         * riscv-linux-nat.c: New file.
235         * riscv-linux-tdep.c: New file.
236
237 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
238
239         * infrun.c (resume): Make static, add forward declaration.
240         (proceed): Update header comment.
241         * infrun.h (resume): Delete declaration.
242
243 2018-08-09  Tom Tromey  <tom@tromey.com>
244
245         * riscv-tdep.h: Minor formatting fixes.
246
247 2018-08-09  Simon Marchi  <simon.marchi@ericsson.com>
248
249         * common/scoped_mmap.c (mmap_file): Silence ARI warning.
250         * dwarf-index-cache.c (create_dir_and_check): Likewise.
251         (test_mkdir_recursive): Likewise.
252         * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
253
254 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
255
256         * valarith.c (value_subscripted_rvalue): If an array is not in
257         memory, and we don't know the upper bound, then we can't know that
258         the requested element exists or not.
259
260 2018-08-08  Simon Marchi  <simon.marchi@ericsson.com>
261
262         * target.c (str_comma_list_concat_elem): Fix typo in comment.
263         (target_options_to_string): Add comment.
264
265 2018-08-08  Tom Tromey  <tom@tromey.com>
266
267         * unittests/scoped_mmap-selftests.c: Check result of "write".
268
269 2018-08-08  Jim Wilson  <jimw@sifive.com>
270
271         * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
272         (decode_register_index_short): New.
273         (decode_j_type_insn, decode_cj_type_insn): New.
274         (decode_b_type_insn, decode_cb_type_insn): New.
275         (riscv_insn::decode): Add support for jumps, branches, lr, and sc.  New
276         local xlen.  Check xlen when decoding ambiguous compressed insns.  In
277         compressed decode, use is_c_lui_insn instead of is_lui_insn, and
278         is_c_sw_insn instead of is_sw_insn.
279         (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
280         (riscv_software_single_step): New.
281         * riscv-tdep.h (riscv_software_single_step): Declare.
282
283         * riscv-tdep.c (riscv_isa_xlen): Drop static.
284         * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
285
286 2018-08-08  Andrew Burgess  <andrew.burgess@embecosm.com>
287
288         PR gdb/18050:
289         * target.c (dispose_inferior): Don't dispose of inferiors that are
290         already killed.
291
292 2018-08-08  Szabolcs Nagy  <szabolcs.nagy@arm.com>
293
294         * remote.c (remote_target::download_tracepoint): Change char* to
295         const char*.
296
297 2018-08-07  Simon Marchi  <simon.marchi@polymtl.ca>
298
299         * target.h (target_options_to_string): Return an std::string.
300         * target.c (str_comma_list_concat_elem): Return void, use
301         std::string.
302         (do_option): Likewise.
303         (target_options_to_string): Return an std::string.
304         * linux-nat.c (linux_nat_target::wait): Adjust.
305         * target-debug.h (target_debug_print_options): Adjust.
306
307 2018-08-07  Tom Tromey  <tom@tromey.com>
308
309         * Makefile.in (CPPFLAGS): New variable.
310         (INTERNAL_CPPFLAGS): Use it.
311
312 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
313
314         * NEWS: Mention the index cache.
315
316 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
317
318         * common/pathstuff.h (get_standard_cache_dir): New.
319         * common/pathstuff.c (get_standard_cache_dir): New.
320         * build-id.h (build_id_to_string): New.
321         * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
322         DEBUG_STR_SUFFIX): Move to here.
323         * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
324         DEBUG_STR_SUFFIX): Move from there.
325         (write_psymtabs_to_index): Make non-static, add basename
326         parameter.  Write to temporary files, rename when done.
327         (save_gdb_index_command): Adjust call to
328         write_psymtabs_to_index.
329         * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
330         field.
331         * dwarf2read.c (dwz_file) <index_cache_res>: New field.
332         (get_gdb_index_contents_from_cache): New.
333         (get_gdb_index_contents_from_cache_dwz): New.
334         (dwarf2_initialize_objfile): Read index from cache.
335         (dwarf2_build_psymtabs): Save to index.
336         * dwarf-index-cache.h: New file.
337         * dwarf-index-cache.c: New file.
338         * dwarf-index-write.h: New file.
339
340 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
341
342         * gnulib/aclocal.m4: Re-generate.
343         * gnulib/config.in: Re-generate.
344         * gnulib/configure: Re-generate.
345         * gnulib/import/Makefile.am: Re-generate.
346         * gnulib/import/Makefile.in: Re-generate.
347         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
348         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
349         * gnulib/import/m4/mkdir.m4: New file.
350         * gnulib/import/mkdir.c: New file.
351         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
352         module.
353
354 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
355
356         * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
357         * common/scoped_mmap.c: New file.
358         * common/scoped_mmap.h (destroy): New method.
359         (~scoped_mmap, reset): Use destroy.
360         (scoped_mmap): New move constructor.
361         (mmap_file): New declaration.
362         * unittests/scoped_mmap-selftests.c (test_normal,
363         test_invalid_filename, run_tests): New functions.
364         (_initialize_scoped_mmap_selftests): Register selftest.
365
366 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
367
368         * dwarf2read.c (read_gdb_index_from_section): Rename to...
369         (read_gdb_index_from_buffer): ... this.  Remove section
370         parameter, add buffer parameter.
371         (get_gdb_index_contents_ftype,
372         get_gdb_index_contents_dwz_ftype): New typedefs.
373         (dwarf2_read_gdb_index): Add callback parameters to get the
374         index contents.
375         (get_gdb_index_contents_from_section): New.
376         (dwarf2_initialize_objfile): Update call to
377         dwarf2_read_gdb_index.
378
379 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
380
381         * common/filestuff.h (gdb_fopen_cloexec): New overload.
382         (gdb_open_cloexec): Likewise.
383         * nat/linux-osdata.c (command_from_pid): Use string_printf.
384         (commandline_from_pid): Likewise.
385         (linux_xfer_osdata_threads): Likewise.
386         (linux_xfer_osdata_fds): Likewise.
387         * ada-lang.c (is_package_name): Likewise.
388         * auxv.c (procfs_xfer_auxv): Likewise.
389         * breakpoint.c (print_one_breakpoint_location): Use
390         uiout::field_fmt.
391         (print_one_catch_solib): Use string_printf.
392         * coff-pe-read.c (add_pe_exported_sym): Likewise.
393         (add_pe_forwarded_sym): Likewise.
394         * dwarf2read.c (create_type_unit_group): Likewise.
395         (build_error_marker_type): Likewise.
396         * infcall.c (get_function_name): Likewise.
397         * valprint.c (print_converted_chars_to_obstack): Likewise.
398         * xtensa-tdep.c (xtensa_register_type): Likewise.
399
400 2018-08-06  Simon Marchi  <simon.marchi@ericsson.com>
401
402         * remote.c (remote_target::download_tracepoint): Fix format
403         string errors.
404
405 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
406
407         * tracefile.c: Include common/byte-vector.h.
408         (trace_save): Change type of buf to gdb::byte_vector.  Initialize
409         with trace_regblock_size if needed.  Update uses of buf.
410
411 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
412
413         * tracepoint.h (collection_list) <m_regs_mask>: Change type to
414         std::vector<unsigned char>.
415         * tracepoint.c (collection_list::collection_list): Remove
416         m_regs_mask initializer from initializer list.  Resize
417         m_regs_mask using the largest remote register number.
418         (collection_list::add_remote_register): Remove size check on
419         m_regs_mask.  Use at to access element.
420         (collection_list::stringify): Change type of temp_buf to
421         gdb::char_vector.  Update uses of temp_buf.  Resize if needed to
422         stringify the register mask.  Use pack_hex_byte for the register
423         mask.
424
425 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
426
427         * tracepoint.h (class collection_list) <add_register>: Remove.
428         <add_remote_register, add_ax_registers, add_local_register>:
429         Declare.
430         <add_memrange>: Add scope parameter.
431         * tracepoint.c (encode_actions_1): Likewise.
432         (collection_list::add_register): Rename to ...
433         (collection_list::add_remote_register): ... this.  Update
434         comment.
435         (collection_list::add_ax_registers, add_local_register): New
436         methods.
437         (collection_list::add_memrange): Add scope parameter.  Call
438         add_local_register instead of add_register.
439         (finalize_tracepoint_aexpr): New function.
440         (collection_list::collect_symbol): Update calls to add_memrange.
441         Call add_local_register instead of add_register.  Call
442         add_ax_registers.  Call finalize_tracepoint_aexpr.
443         (encode_actions_1): Get remote regnos for $reg action.  Call
444         add_remote_register, add_ax_registers, and add_local_register.
445         Update call to add_memrange.  Call finalize_tracepoint_aexpr.
446         (validate_actionline): Call finalize_tracepoint_aexpr.
447
448 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
449
450         * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
451         Replace array buf with gdb::char_vector buf, of size
452         get_remote_packet_size ().  Replace references to buf and
453         BUF_SIZE to buf.data () and buf.size ().  Replace strcpy, strcat
454         and xsnprintf with snprintf.  Raise errors if the buffer is too
455         small.
456
457 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
458
459         * remote.c (remote_target::download_tracepoint): Fix the has_more
460         predicate in the QTDP action list iteration.
461
462 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
463
464         * remote.c (remote_target::download_tracepoint): Fix indentation
465         in for block.
466
467 2018-08-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
468
469         * proc-api.c (_initialize_proc_api): Remove c, unused.
470         * procfs.c (procfs_init_inferior): Remove signals, unused.
471         (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
472         unused.
473
474 2018-08-06  Sergey Korolev  <s.korolev@ndmsystems.com>
475             Andrew Burgess  <andrew.burgess@embecosm.com>
476
477         * linux-nat.c (linux_nat_target::follow_fork): Avoid using
478         'W_STOPCODE (0)' as this could be ambiguous.
479
480 2018-08-03  Sergio Durigan Junior  <sergiodj@redhat.com>
481
482         * ser-tcp.c (net_open): Fix thinko when deciding whether to
483         disable TCP's Nagle algorithm (use "ai_protocol" instead of
484         "ai_socktype").
485
486 2018-08-02  Tom Tromey  <tom@tromey.com>
487
488         PR symtab/16842.
489         * dwarf2read.c (read_func_scope): Set symtab on template parameter
490         symbols.
491         (process_structure_scope): Likewise.
492
493 2018-08-02  Xavier Roirand  <roirand@adacore.com>
494
495         PR gdb/22629:
496         * darwin-nat.c (darwin_kill_inferior): Fix handling of
497         kill inferior.
498
499 2018-08-02  Tom Tromey  <tom@tromey.com>
500
501         * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
502         (darwin_suspend_inferior, darwin_resume_inferior)
503         (darwin_decode_notify_message, darwin_resume_inferior_threads)
504         (darwin_check_new_threads): Check result of get_darwin_inferior.
505
506 2018-07-31  Joel Brobecker  <brobecker@adacore.com>
507
508         GDB 8.1.1 released.
509
510 2018-07-31  Jan Vrany  <jan.vrany@fit.cvut.cz>
511
512         * varobj.c (varobj_get_path_expr_parent): Report an error if
513         parent is a dynamic varobj.
514
515 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
516
517         * gnulib/aclocal.m4: Re-generate.
518         * gnulib/config.in: Re-generate.
519         * gnulib/configure: Re-generate.
520         * gnulib/import/Makefile.in: Re-generate.
521         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
522         * gnulib/import/m4/onceonly.m4: Re-generate.
523
524 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
525
526         * target-descriptions.c (struct xml_test_tdesc): New.
527         (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
528         (record_xml_tdesc): Update.
529         (maintenance_check_xml_descriptions): Update.
530         * target-descriptions.h (record_xml_tdesc): Update comment.
531
532 2018-07-30  Andrew Burgess  <andrew.burgess@embecosm.com>
533
534         * eval.c (evaluate_subexp_for_sizeof): Check for array type before
535         checking array bounds are defined.
536
537 2018-07-30  Tom Tromey  <tom@tromey.com>
538
539         * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
540         irreflexivity violation.
541
542 2018-07-30  Tom Tromey  <tom@tromey.com>
543
544         * cli/cli-decode.c (lookup_cmd): Remove lint code.
545         * value.c (unpack_long): Remove lint code.
546         * valops.c (value_ind): Remove lint code.
547         * valarith.c (value_x_binop, value_x_unop, value_equal)
548         (value_pos): Remove lint code.
549
550 2018-07-28  Tom de Vries  <tdevries@suse.de>
551
552         * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
553         with undefined upper bound as <optimized out>.
554
555 2018-07-27  Sergio Durigan Junior  <sergiodj@redhat.com>
556
557         * gcore.in: Rename variable "name" to "prefix".  Expand
558         "usage" text.
559
560 2018-07-14  Jon Turney  <jon.turney@dronecode.org.uk>
561
562         * windows-nat.c (windows_nat_target::create_inferior): Update to
563         call close() in global namespace.
564
565 2018-07-26  Tom Tromey  <tom@tromey.com>
566
567         * dwarf-index-write.c (add_address_entry): Don't add objfile
568         offsets.
569         * dbxread.c (find_stab_function): Rename from
570         find_stab_function_addr.  Return a bound_minimal_symbol.
571         (read_dbx_symtab): Use raw_text_low, raw_text_high.
572         Don't add objfile offsets.
573         (end_psymtab): Use raw_text_low, raw_text_high,
574         MSYMBOL_VALUE_RAW_ADDRESS.
575         (read_ofile_symtab): Update.
576         (process_one_symbol): Update.
577         * dwarf2read.c (create_addrmap_from_index): Don't add objfile
578         offsets.
579         (dw2_relocate): Remove.
580         (dw2_find_pc_sect_symtab): Bias PC by the text offset before
581         searching addrmap.
582         (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
583         Update.
584         (process_psymtab_comp_unit_reader, add_partial_symbol)
585         (add_partial_subprogram, dwarf2_ranges_read): Update.
586         (load_partial_dies): Update.
587         (add_address_entry): Don't add objfile offsets.
588         (dwarf2_build_include_psymtabs): Update.
589         (create_addrmap_from_aranges): Don't add objfile offsets.
590         (dw2_find_pc_sect_compunit_symtab): Update.
591         * mdebugread.c (parse_symbol): Don't add objfile offsets.
592         (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
593         Update.
594         (parse_partial_symbols): Don't add objfile offsets.  Use
595         raw_text_low, raw_text_high.  Update.
596         (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
597         * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
598         or call 'relocate' quick function.  Clear psymbol_map.
599         * psympriv.h (struct partial_symbol) <address>: Add section
600         offset.
601         <set_unrelocated_address>: Rename from set_address.
602         <raw_text_low, raw_text_high>: New methods.
603         <text_low, text_high>: Add objfile parameter.
604         (add_psymbol_to_bcache): Add 'section' parameter.  Call
605         set_unrelocated_address.
606         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
607         (find_pc_psymbol): Update.
608         (fixup_psymbol_section, relocate_psymtabs): Remove.
609         (dump_psymtab, psym_functions): Update.
610         (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
611         parameter.
612         (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
613         (start_psymtab_common): Update.
614         * symfile-debug.c (debug_qf_relocate): Remove.
615         (debug_sym_quick_functions): Update.
616         * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
617         * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
618         Update.
619
620 2018-07-26  Tom Tromey  <tromey@redhat.com>
621
622         * dbxread.c (end_psymtab): Use text_high_valid and
623         text_low_valid.
624         * mdebugread.c (parse_partial_symbols): Use text_low_valid.
625         (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
626         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
627         Update comment.
628         <text_low_valid, text_high_valid>: New fields.
629         <set_text_low, set_text_high>: Update.
630         * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
631
632 2018-07-26  Tom Tromey  <tom@tromey.com>
633
634         * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
635         Update.
636         * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
637         textlow and texthigh fields.
638         (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
639         Update.
640         * mdebugread.c (parse_lines, parse_partial_symbols)
641         (psymtab_to_symtab_1): Update.
642         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
643         Rename fields.  Update comment.  Now private.
644         <text_low, text_high, set_text_low, set_text_high>: New methods.
645         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
646         (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
647         (start_psymtab_common, maintenance_info_psymtabs)
648         (maintenance_check_psymtabs): Update.
649         * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
650         texthigh fields.
651         (scan_xcoff_symtab): Update.
652
653 2018-07-26  Tom Tromey  <tromey@redhat.com>
654
655         * psympriv.h (struct partial_symbol) <unrelocated_address,
656         address, set_address>: New methods.
657         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
658         (fixup_psymbol_section, relocate_psymtabs): Update.
659         (print_partial_symbols): Add 'objfile' parameter.  Update.
660         (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
661         Update.
662
663 2018-07-26  Tom Tromey  <tom@tromey.com>
664
665         * dwarf-index-write.c (write_psymbols, debug_names::insert)
666         (debug_names::write_psymbols): Update.
667         * psympriv.h (struct partial_symbol): Derive from
668         general_symbol_info.
669         <obj_section>: New method.
670         (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
671         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
672         (find_pc_sect_psymbol, fixup_psymbol_section)
673         (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
674         (print_partial_symbols, recursively_search_psymtabs)
675         (compare_psymbols, psymbol_hash, psymbol_compare)
676         (add_psymbol_to_bcache, maintenance_check_psymtabs)
677         (psymbol_name_matches, psym_fill_psymbol_map): Update.
678
679 2018-07-26  Tom Tromey  <tromey@redhat.com>
680
681         * dbxread.c (end_psymtab): Remove dead code.
682
683 2018-07-26  Andrew Burgess  <andrew.burgess@embecosm.com>
684
685         * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
686         DWARF unwinders are disabled.
687         * dwarf2-frame.c: Add dwarf2read.h include.
688         (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
689         disabled.
690         (dwarf2_frame_unwinders_enabled_p): Define.
691         (show_dwarf_unwinders_enabled_p): New function.
692         (_initialize_dwarf2_frame): Register switch to control DWARF
693         unwinder use.
694         * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
695         * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
696         (show_dwarf_cmdlist): Remove static keyword.
697         * dwarf2read.h (set_dwarf_cmdlist): Declare.
698         (show_dwarf_cmdlist): Declare.
699         * NEWS: Document new feature.
700
701 2018-07-26  Tom de Vries  <tdevries@suse.de>
702
703         PR breakpoints/23366
704         * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
705
706 2018-07-26  Tom de Vries  <tdevries@suse.de>
707
708         * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
709         DW_AT_count can't be translated to a dynamic prop.
710
711 2018-07-25  Tom de Vries  <tdevries@suse.de>
712
713         * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
714         try/catch.
715
716 2018-07-25  Jan Vrany  <jan.vrany@fit.cvut.cz>
717
718         * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
719
720 2018-07-25  Joel Brobecker  <brobecker@adacore.com>
721
722         * MAINTAINERS (Global Maintainers): Add Tom Tromey.
723
724 2018-07-24  Keith Seitz  <keiths@redhat.comt
725
726         PR symtab/23010
727         * dwarf2read.c (dw2_add_symbol_to_list): New function.
728         (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
729         instead of add_symbol_to_list.
730         (read_file_scope): Call prepare_one_comp_unit before reading
731         any other DIEs.
732
733 2018-07-24  Simon Marchi  <simon.marchi@ericsson.com>
734
735         * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
736
737 2018-07-24  Tom Tromey  <tom@tromey.com>
738
739         * utils.c (malloc, realloc, free): Don't declare.
740         * configure, config.in: Rebuild.
741         * configure.ac: Don't check for declarations of free, malloc, or
742         realloc.
743
744 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
745
746         * aarch64-linux-nat.c
747         (aarch64_linux_nat_target::stopped_data_address): Remove unused
748         variable.
749         * arm-linux-nat.c (fetch_regs): Likewise.
750         (store_regs): Likewise.
751         (fetch_vfp_regs): Likewise.
752         (store_vfp_regs): Likewise.
753         (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
754         (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
755         (arm_linux_nat_target::insert_watchpoint): Likewise.
756         (arm_linux_nat_target::remove_watchpoint): Likewise.
757         * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
758         Likewise.
759         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
760         Likewise.
761         * ppc-linux-nat.c (fetch_register): Likewise.
762         (fetch_all_gp_regs): Likewise.
763         (fetch_ppc_registers): Likewise.
764         (store_all_gp_regs): Likewise.
765         (store_ppc_registers): Likewise.
766         (hwdebug_insert_point): Likewise.
767         (can_use_watchpoint_cond_accel): Likewise.
768         * remote-sim.c (gdb_os_write_stdout): Likewise.
769
770 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
771             Tom Tromey  <tom@tromey.com>
772
773         * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
774         test for it.
775         * configure: Rebuild.
776
777 2018-07-22  Tom Tromey  <tom@tromey.com>
778
779         * regformats/regdat.sh: Define xmltarget_${name} inside
780         #ifndef IN_PROCESS_AGENT.
781
782 2018-07-22  Tom Tromey  <tom@tromey.com>
783
784         * value.c (value_fetch_lazy_bitfield): Remove unused variable.
785
786 2018-07-22  Tom Tromey  <tom@tromey.com>
787
788         * symfile.c (reread_symbols): Notify iter, not objfile.
789
790 2018-07-22  Tom Tromey  <tom@tromey.com>
791
792         * ravenscar-thread.c (ravenscar_thread_target::store_registers):
793         Use arch_ops.
794         (ravenscar_thread_target::prepare_to_store): Likewise.
795
796 2018-07-22  Tom Tromey  <tom@tromey.com>
797
798         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
799         unused variable.  Call value_fetch_lazy when needed.
800         * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
801         Remove unused variable.  Call value_fetch_lazy when needed.
802
803 2018-07-22  Tom Tromey  <tom@tromey.com>
804
805         * m32c-tdep.c (mark_dma): Return void.
806         (make_regs): Remove unused declarations.
807
808 2018-07-22  Tom Tromey  <tom@tromey.com>
809
810         * guile/scm-cmd.c (gdbscm_dont_repeat): Call
811         cmdscm_get_valid_command_smob_arg_unsafe for effect.
812         * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
813         bkscm_get_valid_block_smob_arg_unsafe for effect.
814
815 2018-07-22  Tom Tromey  <tom@tromey.com>
816
817         * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
818         value_type.
819
820 2018-07-22  Tom Tromey  <tom@tromey.com>
821
822         * windows-nat.c (saved_context): Conditionally define.
823         * remote.c (remote_target::remote_btrace_maybe_reopen):
824         Conditionally declare "warned".
825         * inflow.c (sigquit_ours): Conditionally define.
826         (new_tty): Move "tty" declaration inside #if.
827         * guile/guile.c (guile_datadir): Conditionally define.
828         * charset.c (set_be_le_names): Move some declarations inside #if.
829         * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
830         #if.
831         (parse_xml_btrace_conf): Likewise.
832
833 2018-07-22  Tom Tromey  <tom@tromey.com>
834
835         * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
836
837 2018-07-22  Tom Tromey  <tom@tromey.com>
838
839         * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
840         * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
841         (vlscm_convert_typed_value_from_scheme): Remove unused variable.
842         * buildsym-legacy.c (get_macro_table): Remove unused variable.
843         * stack.c (frame_apply_level_command): Remove unused variable.
844         * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
845         * sparc64-tdep.c (adi_examine_command): Remove unused variable.
846         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
847         unused variable.
848         * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
849         * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
850         * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
851         variable.
852         * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
853         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
854         variable.
855         * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
856         Remove unused variable.
857         * cli/cli-script.c (recurse_read_control_structure): Remove unused
858         variable.
859         * common/tdesc.c (print_xml_feature::visit): Remove unused
860         variable.
861         * compile/compile-object-load.c (store_regs): Remove unused
862         variables.
863         * complaints.c (clear_complaints): Remove unused variable.
864         * corelow.c (core_target_open): Remove unused variable.
865         * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
866         variable.
867         * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
868         variable.
869         * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
870         variable.
871         * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
872         variable.
873         * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
874         variable.
875         * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
876         variable.
877         * ia64-tdep.c (examine_prologue): Remove unused variable.
878         * infcall.c (run_inferior_call): Remove unused variable.
879         * inferior.c (exit_inferior): Remove unused variable.
880         * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
881         * linespec.c (decode_line_2): Remove unused variable.
882         * linux-nat.c (super_close): Remove.
883         * linux-tdep.c (linux_info_proc): Remove unused variable.
884         * mi/mi-main.c (mi_execute_command): Remove unused variable.
885         * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
886         Remove unused variable.
887         * parse.c (find_minsym_type_and_address): Remove unused variable.
888         * printcmd.c (info_symbol_command, printf_floating): Remove unused
889         variable.
890         * python/py-breakpoint.c (bppy_set_commands): Remove unused
891         variable.
892         * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
893         variables.
894         * record-btrace.c (record_btrace_target::store_registers): Remove
895         unused variable.
896         (cmd_show_record_btrace_cpu): Remove unused variable.
897         * riscv-tdep.c (riscv_register_reggroup_p)
898         (riscv_push_dummy_call, riscv_return_value): Remove unused
899         variable.
900         * rust-exp.y (literal): Remove unused variable.
901         * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
902         unused variable.
903         <STRUCTOP_ANONYMOUS>: Likewise.
904         * s390-linux-tdep.c (s390_linux_init_abi_31)
905         (s390_linux_init_abi_64): Remove unused variable.
906         * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
907         (file_select_thread, net_windows_open, _initialize_ser_windows):
908         Remove unused variables.
909         * symtab.c (find_pc_sect_line): Remove unused variable.
910         * target-memory.c (compute_garbled_blocks): Remove unused
911         variable.
912         (target_write_memory_blocks): Remove unused variable.
913         * target.c (target_stack::unpush): Remove unused variables.
914         * tracepoint.c (start_tracing, all_tracepoint_actions)
915         (merge_uploaded_trace_state_variables)
916         (print_one_static_tracepoint_marker): Remove unused variable.
917         * unittests/basic_string_view/element_access/char/1.cc (test01):
918         Remove unused variable.
919         * windows-nat.c (windows_continue, windows_add_all_dlls)
920         (do_initial_windows_stuff, windows_nat_target::create_inferior):
921         Remove unused variables.
922
923 2018-07-21  Simon Marchi  <simon.marchi@polymtl.ca>
924
925         * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
926         attr_profile in HAVE_ELF.
927         * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
928         HAVE_ELF.
929
930 2018-07-20  Simon Marchi  <simon.marchi@polymtl.ca>
931
932         * frame.c (frame_register_unwind): Change parameter name.
933         (frame_unwind_register): Likewise.
934         (frame_unwind_register_value): Likewise.
935         (frame_unwind_register_signed): Likewise.
936         (frame_unwind_register_unsigned): Likewise.
937         * frame.h (frame_register_unwind): Likewise.
938         (frame_unwind_register): Likewise.
939         (frame_unwind_register_value): Likewise.
940         (frame_unwind_register_signed): Likewise.
941         (frame_unwind_register_unsigned): Likewise.
942         (frame_unwind_arch): Likewise.
943
944 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
945
946         * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
947         ISA maintenance.
948
949 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
950
951         * mips-linux-nat.c (mips_linux_nat_target::read_description):
952         Call `get_ptrace_pid' rather than extracting the ptrace PID by
953         hand.
954
955 2018-07-20  Keith Seitz  <keiths@redhat.com>
956
957         * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
958         m_main_subfile, m_comp_dir, m_producer, m_debugformat,
959         m_compunit_symtab, m_language>: Add "m_" prefix.
960         Update all uses.
961         * buildsym.c: Update all uses.
962
963 2018-07-20  Tom Tromey  <tom@tromey.com>
964
965         * buildsym-legacy.h (record_line): Don't use record_line_ftype.
966         * buildsym.h (record_line_ftype): Remove typedef.
967
968 2018-07-20  Tom Tromey  <tom@tromey.com>
969
970         * buildsym-legacy.h (augment_type_symtab): Don't declare.
971         (end_expandable_symtab): Likewise.
972         (end_symtab_get_static_block): Likewise.
973         (end_symtab_from_static_block): Likewise.
974         * buildsym-legacy.c (augment_type_symtab): Remove.
975         (end_expandable_symtab): Remove.
976         (end_symtab_get_static_block): Remove.
977         (end_symtab_from_static_block): Remove.
978
979 2018-07-20  Tom Tromey  <tom@tromey.com>
980
981         * dwarf2read.c: Include buildsym.h.
982         (struct dwarf2_cu) <builder>: New method.
983         (fixup_go_packaging): Update.
984         (process_full_comp_unit, process_full_type_unit): Update.  Don't
985         use scoped_free_pendings.
986         (using_directives): Add "cu" parameter, remove "language".
987         (read_import_statement, setup_type_unit_groups, )
988         (read_func_scope, read_lexical_block_scope)
989         (dwarf2_record_block_ranges, read_namespace): Update.
990         (lnp_state_machine::lnp_state_machine): Add cu parameter.
991         (lnp_state_machine::handle_end_sequence): Update.
992         (class lnp_state_machine) <m_cu>: New member.
993         <m_record_line_callback>: Remove.
994         <m_currently_recording_lines>: New member.
995         (lnp_state_machine::handle_set_file): Update.
996         (noop_record_line): Remove.
997         (dwarf_record_line_p): Add cu parameter.
998         (dwarf_record_line_1, dwarf_finish_line): Likewise.
999         (lnp_state_machine::record_line)
1000         (lnp_state_machine::lnp_state_machine)
1001         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
1002         (dwarf_decode_lines): Update.
1003         (dwarf2_start_subfile): Add cu parameter.
1004         (dwarf2_start_symtab, new_symbol): Update.
1005         (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
1006         Remove dwarf2_per_objfile parameter.
1007         (dwarf_decode_macros): Update.
1008
1009 2018-07-20  Tom Tromey  <tom@tromey.com>
1010
1011         * stabsread.c (define_symbol): Update.
1012         * buildsym-legacy.h (get_buildsym_compunit): Declare.
1013         * dwarf2read.c (new_symbol): Update.
1014         * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
1015         * cp-namespace.c: Include buildsym.h.
1016         (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
1017         * buildsym-legacy.c (get_buildsym_compunit): New function.
1018
1019 2018-07-20  Tom Tromey  <tom@tromey.com>
1020
1021         * xcoffread.c: Include buildsym-legacy.h.
1022         * windows-nat.c: Include buildsym-legacy.h.
1023         * stabsread.c: Include buildsym-legacy.h.
1024         * mdebugread.c: Include buildsym-legacy.h.
1025         * buildsym-legacy.h: New file.
1026         * buildsym-legacy.c: New file, from buildsym.c.
1027         * go32-nat.c: Include buildsym-legacy.h.
1028         * dwarf2read.c: Include buildsym-legacy.h.
1029         * dbxread.c: Include buildsym-legacy.h.
1030         * cp-namespace.c: Include buildsym-legacy.h.
1031         * coffread.c: Include buildsym-legacy.h.
1032         * buildsym.h: Move some contents to buildsym-legacy.h.
1033         * buildsym.c: Include buildsym-legacy.h.  Move many functions to
1034         buildsym-legacy.c.
1035         * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
1036
1037 2018-07-20  Tom Tromey  <tom@tromey.com>
1038
1039         * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
1040         * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
1041         (buildsym_compunit::buildsym_compunit)
1042         (buildsym_compunit::~buildsym_compunit)
1043         (buildsym_compunit::get_macro_table): Define.
1044
1045 2018-07-20  Tom Tromey  <tom@tromey.com>
1046
1047         * buildsym.c (reset_symtab_globals): Remove.
1048         (buildsym_compunit::end_symtab_from_static_block): Update.
1049         (buildsym_compunit::augment_type_symtab): Update.
1050         (end_symtab_from_static_block): Call free_buildsym_compunit.
1051         (augment_type_symtab, end_symtab, end_expandable_symtab):
1052         Likewise.
1053
1054 2018-07-20  Tom Tromey  <tom@tromey.com>
1055
1056         * arch-utils.c: Do not include buildsym.h.
1057         * mipsread.c: Do not include buildsym.h.
1058         * machoread.c: Do not include buildsym.h.
1059         * elfread.c: Do not include buildsym.h.
1060
1061 2018-07-20  Tom Tromey  <tom@tromey.com>
1062
1063         * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
1064         initialization.
1065         (buildsym_compunit): Add new constructor.
1066         (struct buildsym_compunit) <get_last_source_file, finish_block,
1067         record_block_range, start_subfile, patch_subfile_names,
1068         push_subfile, pop_subfile, record_line, get_compunit_symtab,
1069         set_last_source_start_addr, get_last_source_start_addr,
1070         get_local_using_directives, set_local_using_directives,
1071         get_global_using_directives, outermost_context_p,
1072         get_current_context_stack, get_context_stack_depth,
1073         get_current_subfile, get_local_symbols, get_file_symbols,
1074         get_global_symbols, record_debugformat, record_producer,
1075         push_context, pop_context, end_symtab_get_static_block,
1076         end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
1077         New public methods.
1078         <record_pending_block, finish_block_internal, make_blockvector,
1079         watch_main_source_file_lossage, end_symtab_with_blockvector>: New
1080         private methods.
1081         Update all users.
1082
1083 2018-05-22  Tom Tromey  <tom@tromey.com>
1084
1085         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
1086         parameter.
1087         (finish_block_internal): Update.
1088
1089 2018-07-20  Tom Tromey  <tom@tromey.com>
1090
1091         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
1092         parameter.
1093         (finish_block_internal): Update.
1094
1095 2018-07-20  Tom Tromey  <tom@tromey.com>
1096
1097         * buildsym.h (EXTERN): Don't define or undef.
1098         * buildsym.c (EXTERN): Don't define.
1099
1100 2018-07-20  Tom Tromey  <tom@tromey.com>
1101
1102         * buildsym.c: Remove TODO comment.
1103
1104 2018-07-20  Tom Tromey  <tom@tromey.com>
1105
1106         * coffread.c (coff_symtab_read): Update.
1107         * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
1108         (xcoff_new_init): Update.
1109         * mipsread.c (mipscoff_new_init): Update.
1110         * mdebugread.c (mdebug_build_psymtabs): Update.
1111         * elfread.c (elf_new_init): Update.
1112         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
1113         Update.
1114         * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
1115         (coffstab_build_psymtabs, elfstab_build_psymtabs)
1116         (stabsect_build_psymtabs): Update.
1117         * buildsym.h (buildsym_init): Don't declare.
1118         * buildsym.c: Update comment.
1119         (prepare_for_building): Remove.
1120         (start_symtab, restart_symtab): Update.
1121         (reset_symtab_globals): Update comment.
1122         (buildsym_init): Remove.
1123
1124 2018-07-20  Tom Tromey  <tom@tromey.com>
1125
1126         * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
1127         * stabsread.c (patch_block_stabs, define_symbol, read_type)
1128         (read_enum_type, common_block_start, common_block_end)
1129         (cleanup_undefined_types_1, finish_global_stabs): Update.
1130         * mdebugread.c (psymtab_to_symtab_1): Update.
1131         * dwarf2read.c (fixup_go_packaging, read_func_scope)
1132         (read_lexical_block_scope, new_symbol): Update.
1133         * dbxread.c (process_one_symbol): Update.
1134         * coffread.c (coff_symtab_read, process_coff_symbol)
1135         (coff_read_enum_type): Update.
1136         * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
1137         declare.
1138         (get_local_symbols, get_file_symbols, get_global_symbols): New
1139         functions.
1140         * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
1141         m_global_symbols.
1142         <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
1143         (~scoped_free_pendings): Update.
1144         (finish_block, prepare_for_building, reset_symtab_globals)
1145         (end_symtab_get_static_block, end_symtab_with_blockvector)
1146         (augment_type_symtab, push_context): Update.
1147         (get_local_symbols, get_file_symbols, get_global_symbols): New
1148         functions.
1149         (buildsym_init): Update.
1150
1151 2018-07-20  Tom Tromey  <tom@tromey.com>
1152
1153         * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
1154         (process_full_type_unit): Likewise.
1155         (dwarf2_start_symtab): Set list_in_scope.
1156
1157 2018-07-20  Tom Tromey  <tom@tromey.com>
1158
1159         * dwarf2read.c (process_psymtab_comp_unit_reader)
1160         (build_type_psymtabs_reader): Do not set list_in_scope.
1161
1162 2018-07-20  Tom Tromey  <tom@tromey.com>
1163
1164         * buildsym.c (free_pendings): Remove.
1165         (add_symbol_to_list, scoped_free_pendings)
1166         (finish_block_internal, buildsym_init): Update.
1167
1168 2018-07-20  Tom Tromey  <tom@tromey.com>
1169
1170         * xcoffread.c (read_xcoff_symtab): Update.
1171         * dwarf2read.c (read_func_scope, read_lexical_block_scope):
1172         Update.
1173         * dbxread.c (process_one_symbol): Update.
1174         * coffread.c (coff_symtab_read): Update.
1175         * buildsym.h (finish_block): Update.
1176         * buildsym.c (finish_block): Remove "listhead" argument.
1177         (end_symtab_get_static_block): Update.
1178
1179 2018-07-20  Tom Tromey  <tom@tromey.com>
1180
1181         * buildsym.h (class scoped_free_pendings): Remove constructor.
1182         * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
1183         method.
1184         <m_pending_block_obstack, m_pending_blocks>: New members.
1185         (pending_block_obstack, pending_blocks): Remove.
1186         (scoped_free_pendings::scoped_free_pendings): Default.
1187         (~scoped_free_pendings): Update.
1188         (free_pending_blocks): Remove.
1189         (finish_block_internal, record_pending_block, make_blockvector)
1190         (end_symtab_get_static_block, augment_type_symtab, push_context)
1191         (buildsym_init): Update.
1192
1193 2018-07-20  Tom Tromey  <tom@tromey.com>
1194
1195         * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
1196         m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
1197         members.
1198         (pending_addrmap, pending_addrmap_obstack)
1199         (pending_addrmap_interesting): Remove.
1200         (scoped_free_pendings, record_block_range, make_blockvector)
1201         (prepare_for_building, reset_symtab_globals, buildsym_init):
1202         Update.
1203
1204 2018-07-20  Tom Tromey  <tom@tromey.com>
1205
1206         * xcoffread.c (process_linenos): Update.
1207         * stabsread.c (define_symbol, read_type, read_enum_type): Update.
1208         * mdebugread.c (psymtab_to_symtab_1): Update.
1209         * dwarf2read.c (setup_type_unit_groups)
1210         (lnp_state_machine::handle_set_file, dwarf_record_line_p)
1211         (lnp_state_machine::record_line, dwarf_decode_lines): Update.
1212         * dbxread.c (process_one_symbol): Update.
1213         * coffread.c (coff_symtab_read, enter_linenos)
1214         (process_coff_symbol): Update.
1215         * buildsym.h (current_subfile): Don't declare.
1216         (get_current_subfile): Declare.
1217         * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
1218         member.
1219         (start_subfile, free_buildsym_compunit, push_subfile)
1220         (prepare_for_building, start_symtab): Update.
1221         (get_current_subfile): New function.
1222
1223 2018-07-20  Tom Tromey  <tom@tromey.com>
1224
1225         * coffread.c (coff_symtab_read): Update.
1226         * xcoffread.c (read_xcoff_symtab): Update.
1227         * dwarf2read.c (new_symbol): Update.
1228         (read_func_scope, read_lexical_block_scope): Update.
1229         * dbxread.c (process_one_symbol): Update.
1230         * buildsym.h (context_stack, context_stack_depth): Don't declare.
1231         (outermost_context_p): Remove macro.
1232         (outermost_context_p, get_current_context_stack)
1233         (get_context_stack_depth): Declare.
1234         (pop_context): Return struct context_stack.
1235         * buildsym.c (struct buildsym_compunit) <m_context_stack: New
1236         member.
1237         (context_stack_size): Remove.
1238         (INITIAL_CONTEXT_STACK_SIZE): Remove.
1239         (prepare_for_building, end_symtab_get_static_block)
1240         (augment_type_symtab, push_context): Update.
1241         (pop_context): Return struct context_stack.
1242         (outermost_context_p, get_current_context_stack)
1243         (get_context_stack_depth): New functions.
1244         (buildsym_init): Update.
1245
1246 2018-07-20  Tom Tromey  <tom@tromey.com>
1247
1248         * rust-exp.y: Now a pure parser.  Update all rules.
1249         (%union): Move earlier.
1250         (current_parser, work_obstack): Remove globals.
1251         (rust_parser, ~rust_parser): Update.
1252         (class rust_parser) <copy_name, concat3, crate_name, super_name,
1253         lex_character, lex_number, lex_string, lex_identifier,
1254         rust_lookup_type, convert_params_to_types, convert_ast_to_type,
1255         convert_name, convert_params_to_expression,
1256         convert_ast_to_expression, ast_basic_type, ast_operation,
1257         ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
1258         ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
1259         ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
1260         ast_array_type, ast_slice_type, ast_reference_type,
1261         ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
1262         (rust_parse): Update.
1263         (rustyyerror, rustyylex): Add parser parameter.
1264         (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
1265         (rust_lex_stringish_test, rust_lex_test_sequence)
1266         (rust_lex_test_trailing_dot, rust_lex_test_completion)
1267         (rust_lex_test_push_back, rust_lex_tests): Update.
1268
1269 2018-07-19  Pedro Alves  <palves@redhat.com>
1270
1271         * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
1272         gdb::unique_xmalloc_ptr.
1273         * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
1274         Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
1275         * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
1276         copy-initialization.
1277         * guile/scm-pretty-print.c (ppscm_print_children): Use
1278         gdb::unique_xmalloc_ptr instead of cleanups.
1279         (gdbscm_apply_val_pretty_printer): Remove cleanups.
1280         * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
1281         gdb::unique_xmalloc_ptr.
1282         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
1283         Adjust to use gdb::unique_xmalloc_ptr.
1284         * guile/scm-utils.c (extract_arg): Adjust.
1285         * guile/scm-value.c (gdbscm_value_field): Adjust to use
1286         gdb::unique_xmalloc_ptr instead of a cleanup.
1287
1288 2018-07-19  Tom Tromey  <tom@tromey.com>
1289
1290         * utils.c (do_value_free_to_mark)
1291         (make_cleanup_value_free_to_mark): Remove.
1292         * utils.h (make_cleanup_value_free_to_mark): Remove.
1293
1294 2018-07-19  Pedro Alves  <palves@redhat.com>
1295
1296         * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
1297         forwarding reference.
1298
1299 2018-07-18  Pedro Alves  <palves@redhat.com>
1300
1301         * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
1302         gdbscm_wrap.  Use gdb::unique_xmalloc_ptr<char> instead of a
1303         cleanup.
1304
1305 2018-07-18  Pedro Alves  <palves@redhat.com>
1306
1307         * guile/guile-internal.h: Add comment about mixing GDB and Scheme
1308         exceptions.
1309         (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
1310         (gdbscm_wrap): New.
1311         * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
1312         directly instead of a cleanup.
1313         * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
1314         (vlscm_unop): ... this.  Reimplement using gdbscm_wrap.
1315         (vlscm_binop_gdbthrow): New, factored out from ...
1316         (vlscm_binop): ... this.  Reimplement using gdbscm_wrap.
1317         (vlscm_rich_compare): Use gdbscm_wrap.
1318         * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
1319         instead of a cleanup.
1320         (gdbscm_lookup_global_symbol): Use xfree directly instead of a
1321         cleanup.
1322         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
1323         Use xfree directly instead of a cleanup.
1324         * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
1325         Adjust to use gdbscm_wrap and scoped_value_mark.
1326         (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
1327         (gdbscm_value_address, gdbscm_value_dereference)
1328         (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
1329         scoped_value_mark.
1330         (gdbscm_value_dynamic_type): Use scoped_value_mark.
1331         (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
1332         scoped_value_mark.
1333         (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
1334         gdbscm_wrap and scoped_value_mark.
1335         (gdbscm_value_to_string): Use xfree directly instead of a
1336         cleanup.  Move 'buffer' unique_ptr to TRY scope.
1337         (gdbscm_value_to_lazy_string): Use xfree directly instead of a
1338         cleanup.  Move 'buffer' unique_ptr to TRY scope.  Use
1339         scoped_value_mark.
1340         (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
1341         (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
1342         scoped_value_mark.
1343         (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
1344         gdbscm_wrap.
1345
1346 2018-07-18  Tom de Vries  <tdevries@suse.de>
1347
1348         * findvar.c (default_read_var_value): Also resolve dynamic type for
1349         LOC_OPTIMIZED_OUT vars.
1350
1351 2018-07-18  Maciej W. Rozycki  <macro@mips.com>
1352
1353         * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
1354         decoding.
1355
1356 2018-07-17  Tom Tromey  <tom@tromey.com>
1357
1358         * guile/scm-param.c (pascm_set_func, pascm_show_func)
1359         (compute_enum_list, pascm_set_param_value_x)
1360         (gdbscm_parameter_value): Update.
1361         * guile/guile-internal.h (gdbscm_scm_to_string): Update.
1362         (gdbscm_scm_to_host_string): Update.
1363         * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
1364         Update.
1365         * guile/scm-cmd.c (cmdscm_add_completion): Update.
1366         * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
1367         * guile/scm-string.c (gdbscm_scm_to_string): Return
1368         unique_xmalloc_ptr.
1369         (gdbscm_scm_to_host_string): Likewise.
1370
1371 2018-07-17  Tom Tromey  <tom@tromey.com>
1372
1373         * guile/guile.c (gdbscm_eval_from_control_command): Update.
1374         * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
1375         * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
1376         * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
1377         unique_xmalloc_ptr.
1378
1379 2018-07-17  Tom Tromey  <tom@tromey.com>
1380
1381         * guile/scm-param.c (pascm_signal_setshow_error): Update.
1382         * guile/guile-internal.h (gdbscm_exception_message_to_string):
1383         Update.
1384         * guile/scm-cmd.c (cmdscm_function): Update.
1385         * guile/scm-pretty-print.c
1386         (ppscm_print_exception_unless_memory_error): Update.
1387         * guile/scm-exception.c (gdbscm_exception_message_to_string):
1388         Return unique_xmalloc_ptr.
1389
1390 2018-07-17  Tom Tromey  <tom@tromey.com>
1391
1392         * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
1393         Use string_printf.
1394
1395 2018-07-17  Jim Wilson  <jimw@sifive.com>
1396
1397         * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
1398         set_gdbarch_decr_pc_after_break.  Call riscv_read_misa_reg always.
1399         (riscv_gdbarch_init): Delete local has_compressed_isa.  Delete now
1400         unecessary braces after EF_RISCV_RVC test.  Delete call to
1401         set_gdbarch_decr_pc_after_break.
1402
1403         * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
1404         RISCV_LAST_FP_REGNUM + 1.
1405         (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
1406
1407 2018-07-17  Tom Tromey  <tom@tromey.com>
1408
1409         * configure.ac: Remove --disable-gdbcli.
1410         * configure: Rebuild.
1411         * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
1412         (SUBDIR_CLI_CFLAGS): Remove.
1413         (SFILES): Use SUBDIR_CLI_SRCS.
1414         (COMMON_OBS): Use SUBDIR_CLI_OBS.
1415
1416 2018-07-17  Tom Tromey  <tom@tromey.com>
1417
1418         PR gdb/18624:
1419         * coffread.c (coff_symtab_read): Use scoped_free_pendings.
1420
1421 2018-07-16  Jim Wilson  <jimw@sifive.com>
1422
1423         * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
1424
1425 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
1426
1427         * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
1428         variable.
1429         (libunwind_frame_sniffer): Likewise.
1430         (libunwind_frame_prev_register): Likewise.
1431         (libunwind_sigtramp_frame_sniffer): Likewise.
1432         * ia64-tdep.c (ia64_access_reg): Likewise.
1433         (ia64_access_rse_reg): Likewise.
1434         (ia64_libunwind_sigtramp_frame_this_id): Likewise.
1435         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
1436
1437 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
1438
1439         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
1440
1441 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
1442
1443         * remote-sim.c (gdbsim_target::close,
1444         gdbsim_target::mourn_inferior): Remove unused variables.
1445
1446 2018-07-16  Simon Marchi  <simon.marchi@polymtl.ca>
1447
1448         * ia64-tdep.c (ktab_buf): New global.
1449         (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
1450         (get_kernel_table): Adjust.
1451
1452 2018-07-16  Tom Tromey  <tom@tromey.com>
1453
1454         * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
1455         * dwarf2read.c (using_directives, new_symbol): Use
1456         outermost_context_p.
1457         * dbxread.c (process_one_symbol): Use outermost_context_p.
1458         * coffread.c (coff_symtab_read): Use outermost_context_p.
1459
1460 2018-07-16  Tom Tromey  <tom@tromey.com>
1461
1462         * dwarf2read.c (using_directives, read_func_scope)
1463         (read_lexical_block_scope): Update.
1464         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
1465         * buildsym.h (local_using_directives, global_using_directives):
1466         Don't declare.
1467         (get_local_using_directives, set_local_using_directives)
1468         (get_global_using_directives): Declare.
1469         * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
1470         m_global_using_directives>: New members.
1471         (finish_block_internal, prepare_for_building)
1472         (reset_symtab_globals, end_symtab_get_static_block)
1473         (push_context): Update.
1474         (get_local_using_directives, set_local_using_directives)
1475         (get_global_using_directives): New functions.
1476         (buildsym_init): Update.
1477
1478 2018-07-16  Tom Tromey  <tom@tromey.com>
1479
1480         * xcoffread.c (xcoff_initial_scan): Don't call
1481         free_pending_blocks.
1482         * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
1483         * buildsym.h (class scoped_free_pendings): Add constructor.
1484         (free_pending_blocks): Don't declare.
1485         * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
1486         (free_pending_blocks): Now static.
1487
1488 2018-07-16  Tom Tromey  <tom@tromey.com>
1489
1490         * buildsym.h (push_subfile, pop_subfile): Update declarations.
1491         * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
1492         member.
1493         (struct subfile_stack): Remove.
1494         (subfile_stack): Remove.
1495         (push_subfile, pop_subfile, buildsym_init): Update.
1496
1497 2018-07-16  Tom Tromey  <tom@tromey.com>
1498
1499         * buildsym.c (push_subfile): Use gdb_assert.
1500         (pop_subfile): Use gdb_assert.
1501
1502 2018-07-16  Tom Tromey  <tom@tromey.com>
1503
1504         * buildsym.h (merge_symbol_lists): Remove.
1505         * buildsym.c (merge_symbol_lists): Remove.
1506
1507 2018-07-16  Tom Tromey  <tom@tromey.com>
1508
1509         * stabsread.c (scan_file_globals): Update comment.
1510         * stabsread.h (scan_file_globals): Move from buildsym.h.
1511         * buildsym.h (scan_file_globals): Move to stabsread.h.
1512
1513 2018-07-16  Tom Tromey  <tom@tromey.com>
1514
1515         * xcoffread.c (xcoff_new_init): Update.
1516         * mipsread.c (mipscoff_new_init): Update.
1517         * mdebugread.c (mdebug_build_psymtabs): Update.
1518         * elfread.c (elf_new_init): Update.
1519         * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
1520         (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
1521         * buildsym.h (buildsym_new_init): Don't declare.
1522         * buildsym.c (buildsym_new_init): Remove.
1523
1524 2018-07-16  Tom Tromey  <tom@tromey.com>
1525
1526         * stabsread.h (within_function): Move from buildsym.h.
1527         * stabsread.c (start_stabs): Clear within_function.
1528         * coffread.c (coff_start_symtab): Clear within_function.
1529         * buildsym.h (within_function): Move to stabsread.h.
1530         * buildsym.c (prepare_for_building): Update.
1531
1532 2018-07-16  Tom Tromey  <tom@tromey.com>
1533
1534         * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
1535         * dwarf2read.c (dwarf2_start_symtab): Don't set
1536         processing_gcc_compilation.
1537         * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
1538
1539 2018-07-16  Tom Tromey  <tom@tromey.com>
1540
1541         * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
1542         (next_symbol_text_func): Move from buildsym.h.
1543         * stabsread.c (hashname): Move from buildsym.c.
1544         * buildsym.h (HASHSIZE, symnum, next_symbol_text)
1545         (next_symbol_text_func, hashname): Move to stabsread.h.
1546         * buildsym.c: Don't include bcache.h
1547         (hashname): Move to stasbread.c.
1548
1549 2018-07-16  Tom Tromey  <tom@tromey.com>
1550
1551         * buildsym.h (context_stack_size): Don't declare.
1552         * buildsym.c (context_stack_size): New global.
1553
1554 2018-07-16  Tom Tromey  <tom@tromey.com>
1555
1556         * dbxread.c (processing_acc_compilation): New global.
1557         * buildsym.h (processing_acc_compilation): Don't declare.
1558
1559 2018-07-16  Tom Tromey  <tom@tromey.com>
1560
1561         * xcoffread.c (aix_process_linenos, complete_symtab): Update.
1562         * dbxread.c (read_ofile_symtab): Update.
1563         * coffread.c (coff_start_symtab, coff_end_symtab): Update.
1564         * buildsym.h (last_source_start_addr): Remove.
1565         (set_last_source_start_addr, get_last_source_start_addr):
1566         Declare.
1567         * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
1568         parameter.
1569         (struct buildsym_compunit) <m_last_source_start_addr>: New
1570         member.
1571         (prepare_for_building): Remove start_addr parameter.
1572         (start_symtab, restart_symtab, end_symtab_get_static_block)
1573         (end_symtab_with_blockvector): Update.
1574         (set_last_source_start_addr, get_last_source_start_addr): New
1575         functions.
1576
1577 2018-07-16  Tom Tromey  <tom@tromey.com>
1578
1579         * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
1580         member.
1581         (have_line_numbers): Remove.
1582         (record_line, prepare_for_building, end_symtab_get_static_block)
1583         (augment_type_symtab): Update.
1584
1585 2018-07-16  Tom Tromey  <tom@tromey.com>
1586
1587         * buildsym.c (~buildsym_compunit): Free the macro table.
1588         (struct buildsym_compunit) <get_macro_table, release_macros>: New
1589         methods.
1590         <m_pending_macros>: New member.
1591         (pending_macros): Remove.
1592         (~scoped_free_pendings, get_macro_table, prepare_for_building)
1593         (reset_symtab_globals, end_symtab_get_static_block)
1594         (end_symtab_with_blockvector, augment_type_symtab)
1595         (buildsym_init): Update.
1596
1597 2018-07-16  Tom Tromey  <tom@tromey.com>
1598
1599         * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
1600         parameter.
1601         (buildsym_compunit::set_last_source_file): New method.
1602         <m_last_source_file>: New member.
1603         (prepare_for_building): Remove "name" parameter.
1604         (start_symtab, restart_symtab, reset_symtab_globals): Update.
1605         (last_source_file): Remove.
1606         (set_last_source_file, get_last_source_file): Update.
1607
1608 2018-07-16  Tom Tromey  <tom@tromey.com>
1609
1610         * buildsym.c (prepare_for_building): Add assert.
1611
1612 2018-07-16  Tom Tromey  <tom@tromey.com>
1613
1614         * buildsym.c (~buildsym_compunit): Update.
1615         (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
1616         (start_subfile, patch_subfile_names)
1617         (end_symtab_with_blockvector): Update.
1618
1619 2018-07-16  Tom Tromey  <tom@tromey.com>
1620
1621         * buildsym.c (struct buildsym_compunit): Add constructor,
1622         destructor, initializers.
1623         (start_buildsym_compunit): Remove.
1624         (free_buildsym_compunit): Use "delete".
1625         (start_symtab, restart_symtab): Use "new".
1626
1627 2018-07-13  Simon Marchi  <simon.marchi@polymtl.ca>
1628
1629         * symfile.c (set_objfile_default_section_offset): Remove struct
1630         keyword.
1631
1632 2018-07-14  Stafford Horne  <shorne@gmail.com>
1633
1634         * (Responsible Maintainers): Add myself as or1k maintainer.
1635
1636 2018-07-13  Tom Tromey  <tom@tromey.com>
1637
1638         * symfile.c (set_objfile_default_section_offset): Use extra braces
1639         around initializer.
1640
1641 2018-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1642
1643         * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
1644         non-branching basr.
1645
1646 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1647
1648         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1649         unittests/cli-utils-selftests.c
1650         * unittests/cli-utils-selftests.c: New file.
1651
1652 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1653
1654         * NEWS: Mention new commands. Mention change to 'thread apply'.
1655
1656 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1657
1658         * thread.c (thr_try_catch_cmd): New function.
1659         (thread_apply_all_command): Handle qcs flags.
1660         (thread_apply_command): Handle qcs flags.
1661         (taas_command): New function.
1662         (tfaas_command): New function.
1663         (_initialize_thread): Update to setup the new commands 'taas
1664         and 'tfaas'. Change doc string for 'thread apply'.
1665
1666 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1667
1668         * stack.c: (trailing_outermost_frame): New function, mostly
1669         extracted from backtrace_command_1.
1670         (leading_innermost_frame): New function.
1671         (backtrace_command_1): Update to call trailing_outermost_frame.
1672         (frame_apply_command_count): New function.
1673         (frame_apply_level_command): New function.
1674         (frame_apply_all_command): New function.
1675         (frame_apply_command): New function.
1676         (faas_command): New function.
1677         (frame_cmd_list): New variable.
1678         (_initialize_stack): Update to setup the new commands 'frame apply'
1679         and 'faas'.
1680
1681 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1682
1683         * cli-utils.c (number_or_range_parser::get_number): Only handle
1684         numbers or convenience var as numbers.
1685         (parse_flags): New function.
1686         (parse_flags_qcs): New function.
1687         (number_or_range_parser::finished): Ensure parsing end is detected
1688         before end of string.
1689         * cli-utils.h (parse_flags): New function.
1690         (parse_flags_qcs): New function.
1691         (number_or_range_parser): Remove m_finished bool.
1692         (number_or_range_parser::skip_range): Set m_in_range to false.
1693
1694 2018-07-12  Sergio Durigan Junior  <sergiodj@redhat.com>
1695
1696         * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
1697         on Windows.
1698
1699 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
1700             Jan Kratochvil  <jan.kratochvil@redhat.com>
1701             Paul Fertser  <fercerpav@gmail.com>
1702             Tsutomu Seki  <sekiriki@gmail.com>
1703             Pedro Alves  <palves@redhat.com>
1704
1705         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1706         'unittests/parse-connection-spec-selftests.c'.
1707         (COMMON_SFILES): Add 'common/netstuff.c'.
1708         (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
1709         * NEWS (Changes since GDB 8.2): Mention IPv6 support.
1710         * common/netstuff.c: New file.
1711         * common/netstuff.h: New file.
1712         * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
1713         (wait_for_connect): Update comment.  New parameter
1714         'gdb::optional<int> sock' instead of 'struct serial *scb'.
1715         Use 'sock' directly instead of 'scb->fd'.
1716         (try_connect): New function, with code from 'net_open'.
1717         (net_open): Rewrite main loop to deal with multiple
1718         sockets/addresses.  Handle IPv6-style hostnames; implement
1719         support for IPv6 connections.
1720         * unittests/parse-connection-spec-selftests.c: New file.
1721
1722 2018-07-11  Pedro Alves  <palves@redhat.com>
1723
1724         PR gdb/23377
1725         * remote.c (remote_target::remote_detach_pid): Call
1726         set_current_process.
1727
1728 2018-07-11  Pedro Alves  <palves@redhat.com>
1729
1730         * h8300-tdep.c (h8300_gdbarch_init): Remove
1731         set_gdbarch_ecoff_reg_to_regnum calls.
1732
1733 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
1734
1735         PR c++/23373
1736         * c-typeprint.c (c_type_print_base_struct_union): Don't print
1737         offsets/sizes for static members of a class/struct.
1738
1739 2018-07-11  Alan Hayward  <alan.hayward@arm.com>
1740
1741         * target-descriptions.c (tdesc_register_bitsize): Rename.
1742         * target-descriptions.h (tdesc_register_bitsize): Likewise.
1743         * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
1744         * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
1745
1746 2018-07-10  Tom Tromey  <tom@tromey.com>
1747
1748         * breakpoint.c (moribund_locations): Now static and a
1749         std::vector.
1750         (breakpoint_init_inferior, moribund_breakpoint_here_p)
1751         (build_bpstat_chain, update_global_location_list)
1752         (breakpoint_retire_moribund): Update.
1753         * breakpoint.h (bp_location_p): Remove typedef.  Don't declare
1754         VEC.
1755
1756 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
1757
1758         * riscv-tdep.c (riscv_is_fp_regno_p): New function.
1759         (riscv_register_reggroup_p): Use new function, remove unneeded
1760         parenthesis.
1761         (riscv_push_dummy_call): Extend assert to compare against xlen or
1762         flen based on register type.
1763
1764 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
1765
1766         * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
1767
1768 2018-07-09  Andrew Burgess  <andrew.burgess@embecosm.com>
1769
1770         * remote.c (show_hardware_watchpoint_limit): New function.
1771         (show_hardware_watchpoint_length_limit): New function.
1772         (show_hardware_breakpoint_limit): New function.
1773         (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
1774         where appropriate, update help text.
1775
1776 2018-07-09  Tom Tromey  <tom@tromey.com>
1777
1778         * Makefile.in (CDEPS): Don't mention XM_CDEPS.
1779         (CLIBS): Don't mention NAT_CLIBS.
1780
1781 2018-07-09  Tom Tromey  <tom@tromey.com>
1782
1783         * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
1784         (LIBGDB_OBS, clean mostlyclean): Update.
1785         (gdb$(EXEEXT), insight$(EXEEXT)): Update.
1786
1787 2018-07-09  Tom Tromey  <tom@tromey.com>
1788
1789         * Makefile.in (%.c: %.y): Use ECHO_YACC.
1790         (%.c: %.l): Use ECHO_LEX.  Just fail if flex not available.
1791         * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
1792
1793 2018-07-09  Tom Tromey  <tom@tromey.com>
1794
1795         * Makefile.in (ALLDEPFILES): Remove exec.c.
1796         (COMMON_OBS): Remove exec.o.
1797         (COMMON_SFILES): Add exec.c.
1798
1799 2018-07-09  Tom Tromey  <tom@tromey.com>
1800
1801         * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
1802
1803 2018-07-09  Tom Tromey  <tom@tromey.com>
1804
1805         * Makefile.in (clean mostlyclean): Remove stamp-version.
1806         (version.c): Depend on stamp-version.
1807         (stamp-version): New rule, from version.c rule.
1808
1809 2018-07-09  Tom Tromey  <tom@tromey.com>
1810
1811         * Makefile.in (init.c): Depend on stamp-init.
1812         (stamp-init): New rule, from init.c rule.
1813         (clean mostlyclean): Remove stamp-init.
1814
1815 2018-07-09  Tom Tromey  <tom@tromey.com>
1816
1817         * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
1818         SUBDIR_GCC_COMPILE_SRCS.
1819
1820 2018-07-09  Tom Tromey  <tom@tromey.com>
1821
1822         * Makefile.in (init.c): Remove some unused sed rules.
1823
1824 2018-07-09  Tom Tromey  <tom@tromey.com>
1825
1826         * Makefile.in (TSOBS): Remove.
1827         (INIT_FILES): Update.
1828         (LIBGDB_OBS): Update.
1829         (COMMON_SFILES): Add inflow.c.
1830         (SFILES): Remove inflow.c.
1831
1832 2018-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
1833
1834         * contrib/gdb-add-index.sh ($dwarf5): New, use it.
1835
1836 2018-07-07  Simon Marchi  <simon.marchi@polymtl.ca>
1837
1838         * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
1839         get_saveloc_name, is_signal_frame_name, step_name,
1840         init_remote_name, create_addr_space_name,
1841         destroy_addr_space_name, search_unwind_table_name,
1842         find_dyn_list_name): Constify.
1843
1844 2018-07-05  Simon Marchi  <simon.marchi@polymtl.ca>
1845
1846         * darwin-nat.c (darwin_pthread_kill): New function.
1847         (darwin_resume_thread): Use darwin_pthread_kill.
1848
1849 2018-07-05  Tom de Vries  <tdevries@suse.de>
1850
1851         * macroexp.c (macro_buffer) <operator=>: New member function.
1852
1853 2018-07-04  Tom Tromey  <tom@tromey.com>
1854
1855         * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
1856
1857 2018-07-04  Simon Marchi  <simon.marchi@polymtl.ca>
1858
1859         * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
1860         * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
1861         * maint.c: Likewise.
1862         * top.c: Likewise.
1863
1864 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
1865
1866         * NEWS: Create a new section for the next release branch.
1867         Rename the section of the current branch, now that it has
1868         been cut.
1869
1870 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
1871
1872         GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
1873         * version.in: Bump version to 8.2.50.DATE-git.
1874
1875 2018-07-04  Vyacheslav Barinov  <v.barinov@samsung.com>
1876             Pedro Alves  <palves@redhat.com>
1877
1878         * linux-nat.c (linux_init_ptrace): Rename to ...
1879         (linux_init_ptrace_procfs): ... this.  Call
1880         linux_proc_init_warnings.
1881         (linux_nat_target::post_attach)
1882         (linux_nat_target::post_startup_inferior): Adjust.
1883         * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
1884         * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
1885
1886 2018-07-04  Tom de Vries  <tdevries@suse.de>
1887
1888         * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
1889         check ...
1890         (read_comp_unit_head): ... here.
1891
1892 2018-07-03  Tom Tromey  <tom@tromey.com>
1893
1894         * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
1895         (stop_tracing, tstatus_command)
1896         (find_matching_tracepoint_location, merge_uploaded_tracepoints)
1897         (print_one_static_tracepoint_marker): Update.
1898         * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
1899         std::vector.
1900         * breakpoint.h (breakpoint_p): Remove typedef.  Don't declare
1901         VEC.
1902         (all_tracepoints, static_tracepoints_here): Return std::vector.
1903
1904 2018-07-03  Tom Tromey  <tom@tromey.com>
1905
1906         * common/ptid.c (ptid_equal): Remove.
1907         * common/ptid.h (ptid_equal): Don't declare.
1908         * ada-tasks.c: Update.
1909         * breakpoint.c: Update.
1910         * common/agent.c: Update.
1911         * corelow.c: Update.
1912         * darwin-nat-info.c: Update.
1913         * darwin-nat.c: Update.
1914         * dcache.c: Update.
1915         * dtrace-probe.c: Update.
1916         * dummy-frame.c: Update.
1917         * fbsd-nat.c: Update.
1918         * frame.c: Update.
1919         * gdbthread.h: Update.
1920         * gnu-nat.c: Update.
1921         * go32-nat.c: Update.
1922         * inf-loop.c: Update.
1923         * inf-ptrace.c: Update.
1924         * infcall.c: Update.
1925         * infcmd.c: Update.
1926         * inflow.c: Update.
1927         * infrun.c: Update.
1928         * linux-fork.c: Update.
1929         * linux-nat.c: Update.
1930         * linux-thread-db.c: Update.
1931         * mi/mi-cmd-var.c: Update.
1932         * mi/mi-interp.c: Update.
1933         * mi/mi-main.c: Update.
1934         * nto-procfs.c: Update.
1935         * ppc-linux-tdep.c: Update.
1936         * procfs.c: Update.
1937         * python/py-inferior.c: Update.
1938         * python/py-record-btrace.c: Update.
1939         * python/py-record.c: Update.
1940         * ravenscar-thread.c: Update.
1941         * regcache.c: Update.
1942         * remote-sim.c: Update.
1943         * remote.c: Update.
1944         * sol-thread.c: Update.
1945         * solib.c: Update.
1946         * target.c: Update.
1947         * tui/tui-stack.c: Update.
1948         * varobj.c: Update.
1949         * windows-nat.c: Update.
1950         * windows-tdep.c: Update.
1951
1952 2018-07-03  Tom Tromey  <tom@tromey.com>
1953
1954         * common/ptid.c (ptid_match): Remove.
1955         * common/ptid.h (ptid_match): Don't declare.
1956         * fbsd-nat.c: Update.
1957         * infcmd.c: Update.
1958         * infrun.c: Update.
1959         * linux-nat.c: Update.
1960         * record-btrace.c: Update.
1961         * regcache.c: Update.
1962         * remote.c: Update.
1963
1964 2018-07-03  Tom Tromey  <tom@tromey.com>
1965
1966         * common/ptid.c (ptid_tid_p): Remove.
1967         * common/ptid.h (ptid_tid_p): Don't declare.
1968         * sol-thread.c: Update.
1969
1970 2018-07-03  Tom Tromey  <tom@tromey.com>
1971
1972         * common/ptid.c (ptid_lwp_p): Remove.
1973         * common/ptid.h (ptid_lwp_p): Don't declare.
1974         * fbsd-nat.c: Update.
1975         * linux-nat.c: Update.
1976         * nat/linux-procfs.c: Update.
1977         * nat/x86-linux-dregs.c: Update.
1978         * sol-thread.c: Update.
1979
1980 2018-07-03  Tom Tromey  <tom@tromey.com>
1981
1982         * common/ptid.c (ptid_is_pid): Remove.
1983         * common/ptid.h (ptid_is_pid): Don't declare.
1984         * infrun.c: Update.
1985         * linux-nat.c: Update.
1986         * mi/mi-interp.c: Update.
1987         * remote.c: Update.
1988         * thread.c: Update.
1989
1990 2018-07-03  Tom Tromey  <tom@tromey.com>
1991
1992         * common/ptid.c (ptid_get_tid): Remove.
1993         * common/ptid.h (ptid_get_tid): Don't declare.
1994         * ada-tasks.c: Update.
1995         * aix-thread.c: Update.
1996         * bsd-uthread.c: Update.
1997         * darwin-nat.c: Update.
1998         * fbsd-nat.c: Update.
1999         * i386-darwin-nat.c: Update.
2000         * infrun.c: Update.
2001         * linux-tdep.c: Update.
2002         * nto-procfs.c: Update.
2003         * ppc-ravenscar-thread.c: Update.
2004         * python/py-infthread.c: Update.
2005         * ravenscar-thread.c: Update.
2006         * sol-thread.c: Update.
2007         * sparc-ravenscar-thread.c: Update.
2008         * windows-nat.c: Update.
2009
2010 2018-07-03  Tom Tromey  <tom@tromey.com>
2011
2012         * common/ptid.c (ptid_get_lwp): Remove.
2013         * common/ptid.h (ptid_get_lwp): Don't declare.
2014         * aarch64-linux-nat.c: Update.
2015         * ada-tasks.c: Update.
2016         * aix-thread.c: Update.
2017         * amd64-linux-nat.c: Update.
2018         * arm-linux-nat.c: Update.
2019         * corelow.c: Update.
2020         * fbsd-nat.c: Update.
2021         * fbsd-tdep.c: Update.
2022         * gnu-nat.c: Update.
2023         * i386-cygwin-tdep.c: Update.
2024         * i386-gnu-nat.c: Update.
2025         * i386-linux-nat.c: Update.
2026         * ia64-linux-nat.c: Update.
2027         * inf-ptrace.c: Update.
2028         * infrun.c: Update.
2029         * linux-fork.c: Update.
2030         * linux-nat.c: Update.
2031         * linux-tdep.c: Update.
2032         * linux-thread-db.c: Update.
2033         * mips-linux-nat.c: Update.
2034         * nat/aarch64-linux-hw-point.c: Update.
2035         * nat/aarch64-linux.c: Update.
2036         * nat/linux-btrace.c: Update.
2037         * nat/linux-osdata.c: Update.
2038         * nat/linux-procfs.c: Update.
2039         * nat/x86-linux-dregs.c: Update.
2040         * obsd-nat.c: Update.
2041         * ppc-fbsd-nat.c: Update.
2042         * ppc-linux-nat.c: Update.
2043         * procfs.c: Update.
2044         * python/py-infthread.c: Update.
2045         * ravenscar-thread.c: Update.
2046         * remote.c: Update.
2047         * s390-linux-nat.c: Update.
2048         * sol-thread.c: Update.
2049         * sol2-tdep.c: Update.
2050         * spu-linux-nat.c: Update.
2051         * x86-linux-nat.c: Update.
2052         * xtensa-linux-nat.c: Update.
2053
2054 2018-07-03  Tom Tromey  <tom@tromey.com>
2055
2056         * common/ptid.c (ptid_get_pid): Remove.
2057         * common/ptid.h (ptid_get_pid): Don't declare.
2058         * aarch64-linux-nat.c: Update.
2059         * ada-lang.c: Update.
2060         * aix-thread.c: Update.
2061         * alpha-bsd-nat.c: Update.
2062         * amd64-fbsd-nat.c: Update.
2063         * amd64-linux-nat.c: Update.
2064         * arm-linux-nat.c: Update.
2065         * arm-nbsd-nat.c: Update.
2066         * auxv.c: Update.
2067         * break-catch-syscall.c: Update.
2068         * breakpoint.c: Update.
2069         * bsd-uthread.c: Update.
2070         * corelow.c: Update.
2071         * ctf.c: Update.
2072         * darwin-nat.c: Update.
2073         * fbsd-nat.c: Update.
2074         * fbsd-tdep.c: Update.
2075         * gcore.c: Update.
2076         * gnu-nat.c: Update.
2077         * hppa-nbsd-nat.c: Update.
2078         * hppa-obsd-nat.c: Update.
2079         * i386-fbsd-nat.c: Update.
2080         * ia64-linux-nat.c: Update.
2081         * inf-ptrace.c: Update.
2082         * infcmd.c: Update.
2083         * inferior.c: Update.
2084         * inferior.h: Update.
2085         * inflow.c: Update.
2086         * infrun.c: Update.
2087         * linux-fork.c: Update.
2088         * linux-nat.c: Update.
2089         * linux-tdep.c: Update.
2090         * linux-thread-db.c: Update.
2091         * m68k-bsd-nat.c: Update.
2092         * mi/mi-interp.c: Update.
2093         * mi/mi-main.c: Update.
2094         * mips-linux-nat.c: Update.
2095         * mips-nbsd-nat.c: Update.
2096         * mips64-obsd-nat.c: Update.
2097         * nat/aarch64-linux-hw-point.c: Update.
2098         * nat/aarch64-linux.c: Update.
2099         * nat/linux-btrace.c: Update.
2100         * nat/linux-osdata.c: Update.
2101         * nat/linux-procfs.c: Update.
2102         * nat/x86-linux-dregs.c: Update.
2103         * nto-procfs.c: Update.
2104         * obsd-nat.c: Update.
2105         * ppc-linux-nat.c: Update.
2106         * ppc-nbsd-nat.c: Update.
2107         * ppc-obsd-nat.c: Update.
2108         * proc-service.c: Update.
2109         * procfs.c: Update.
2110         * python/py-inferior.c: Update.
2111         * python/py-infthread.c: Update.
2112         * ravenscar-thread.c: Update.
2113         * record.c: Update.
2114         * remote-sim.c: Update.
2115         * remote.c: Update.
2116         * rs6000-nat.c: Update.
2117         * s390-linux-nat.c: Update.
2118         * sh-nbsd-nat.c: Update.
2119         * sol-thread.c: Update.
2120         * sparc-nat.c: Update.
2121         * sparc64-tdep.c: Update.
2122         * spu-linux-nat.c: Update.
2123         * spu-tdep.c: Update.
2124         * target-debug.h: Update.
2125         * target.c: Update.
2126         * thread.c: Update.
2127         * tid-parse.c: Update.
2128         * tracefile-tfile.c: Update.
2129         * vax-bsd-nat.c: Update.
2130         * windows-nat.c: Update.
2131         * x86-linux-nat.c: Update.
2132         * x86-nat.c: Update.
2133
2134 2018-07-03  Tom Tromey  <tom@tromey.com>
2135
2136         * common/ptid.c (pid_to_ptid): Remove.
2137         * common/ptid.h (pid_to_ptid): Don't declare.
2138         * aix-thread.c: Update.
2139         * arm-linux-nat.c: Update.
2140         * common/ptid.c: Update.
2141         * common/ptid.h: Update.
2142         * corelow.c: Update.
2143         * ctf.c: Update.
2144         * darwin-nat.c: Update.
2145         * fbsd-nat.c: Update.
2146         * fork-child.c: Update.
2147         * gnu-nat.c: Update.
2148         * go32-nat.c: Update.
2149         * inf-ptrace.c: Update.
2150         * infcmd.c: Update.
2151         * inferior.c: Update.
2152         * infrun.c: Update.
2153         * linux-fork.c: Update.
2154         * linux-nat.c: Update.
2155         * nat/aarch64-linux-hw-point.c: Update.
2156         * nat/fork-inferior.c: Update.
2157         * nat/x86-linux-dregs.c: Update.
2158         * nto-procfs.c: Update.
2159         * obsd-nat.c: Update.
2160         * procfs.c: Update.
2161         * progspace.c: Update.
2162         * remote.c: Update.
2163         * rs6000-nat.c: Update.
2164         * s390-linux-nat.c: Update.
2165         * sol-thread.c: Update.
2166         * spu-linux-nat.c: Update.
2167         * target.c: Update.
2168         * top.c: Update.
2169         * tracefile-tfile.c: Update.
2170         * windows-nat.c: Update.
2171
2172 2018-07-03  Tom Tromey  <tom@tromey.com>
2173
2174         * common/ptid.h (ptid_build): Don't declare.
2175         * common/ptid.c (ptid_build): Remove.
2176         * aix-thread.c: Update.
2177         * bsd-kvm.c: Update.
2178         * bsd-uthread.c: Update.
2179         * common/agent.c: Update.
2180         * common/ptid.c: Update.
2181         * common/ptid.h: Update.
2182         * corelow.c: Update.
2183         * darwin-nat.c: Update.
2184         * fbsd-nat.c: Update.
2185         * gnu-nat.c: Update.
2186         * linux-fork.c: Update.
2187         * linux-nat.c: Update.
2188         * linux-thread-db.c: Update.
2189         * nat/linux-osdata.c: Update.
2190         * nat/linux-procfs.c: Update.
2191         * nto-procfs.c: Update.
2192         * obsd-nat.c: Update.
2193         * proc-service.c: Update.
2194         * procfs.c: Update.
2195         * ravenscar-thread.c: Update.
2196         * remote-sim.c: Update.
2197         * remote.c: Update.
2198         * sol-thread.c: Update.
2199         * target.c: Update.
2200         * windows-nat.c: Update.
2201
2202 2018-07-03  Tom Tromey  <tom@tromey.com>
2203
2204         * infrun.c (follow_exec): Use exit_inferior_silent.
2205         * inferior.c (exit_inferior_num_silent): Remove.
2206         * inferior.h (exit_inferior_num_silent): Don't declare.
2207
2208 2018-07-03  Tom Tromey  <tom@tromey.com>
2209
2210         PR cli/23340:
2211         * darwin-nat.c (darwin_attach_pid): Reset inferior and
2212         inferior_ptid on error.
2213
2214 2018-07-02  Maciej W. Rozycki  <macro@mips.com>
2215             Simon Marchi  <simon.marchi@polymtl.ca>
2216
2217         PR tdep/8282
2218         * disasm.h (gdb_disassembler): Add
2219         `m_disassembler_options_holder'. member
2220         * disasm.c (get_all_disassembler_options): New function.
2221         (gdb_disassembler::gdb_disassembler): Use it.
2222         (gdb_buffered_insn_length_init_dis): Likewise.
2223         (gdb_buffered_insn_length): Adjust accordingly.
2224         (set_disassembler_options): Handle options with arguments.
2225         (show_disassembler_options_sfunc): Likewise.  Add a leading new
2226         line if showing options with descriptions.
2227         (disassembler_options_completer): Adapt to using the
2228         `disasm_options_and_args_t' structure.
2229         * mips-tdep.c (mips_disassembler_options): New variable.
2230         (mips_disassembler_options_o32): Likewise.
2231         (mips_disassembler_options_n32): Likewise.
2232         (mips_disassembler_options_n64): Likewise.
2233         (gdb_print_insn_mips): Don't set `disassembler_options'.
2234         (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
2235         functions.
2236         (mips_gdbarch_init): Always set `gdbarch_print_insn' to
2237         `gdb_print_insn_mips'.  Set `gdbarch_disassembler_options',
2238         `gdbarch_disassembler_options_implicit' and
2239         `gdbarch_valid_disassembler_options'.
2240         * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
2241         `disasm_options_and_args_t' structure.
2242         * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
2243         method.
2244         (valid_disassembler_options): Switch from `disasm_options_t' to
2245         the `disasm_options_and_args_t' structure.
2246         * NEWS: Document `set disassembler-options' support for the MIPS
2247         target.
2248         * gdbarch.h: Regenerate.
2249         * gdbarch.c: Regenerate.
2250
2251 2018-07-02  Sebastian Huber  <sebastian.huber@embedded-brains.de>
2252
2253         * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
2254
2255 2018-06-29  Joel Brobecker  <brobecker@adacore.com>
2256
2257         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
2258         parameter in call to amd64_target_description.
2259         * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
2260         * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
2261         (amd64fbsd_init_abi): Likewise.
2262         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
2263         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
2264         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
2265         * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
2266
2267 2018-06-29  Pedro Alves  <palves@redhat.com>
2268
2269         * gdb/amd64-tdep.h (amd64_create_target_description): Add
2270         "segments" parameter.
2271         * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
2272         (_initialize_amd64_tdep): Update call to
2273         amd64_create_target_description.
2274         (amd64_target_description): Add "segments" parameter.  Adjust
2275         the implementation to use it.
2276         * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
2277         call to amd64_create_target_description.
2278         * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
2279         * gdb/arch/amd64.h (amd64_create_target_description): Add
2280         "segments" register.
2281         * gdb/arch/amd64.c (amd64_create_target_description): Add
2282         "segments" parameter.  Call create_feature_i386_64bit_segments
2283         only if SEGMENTS is true.
2284         * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
2285         call to amd64_create_target_description.
2286
2287 2018-06-29  Pedro Alves  <palves@redhat.com>
2288
2289         * thread.c (thread_target_id_str): New, factored out from ...
2290         (print_thread_info_1): ... here.  Use it to compute the max
2291         "Target Id" column width.
2292
2293 2018-06-29  Pedro Alves  <palves@redhat.com>
2294
2295         * remote.c (remote_target::extra_thread_info): Delete
2296         'display_buf' and 'n' locals.  from the cache, regardless of
2297         packet mechanims is in use.  Use cache for qThreadExtra and qP
2298         methods too.
2299
2300 2018-06-29  Pedro Alves  <palves@redhat.com>
2301
2302         * blockframe.c (find_pc_sect_containing_function): New function.
2303         * breakpoint.c (print_breakpoint_location): Don't call
2304         find_pc_sect_function.
2305         * linespec.c (create_sals_line_offset): Record the location's
2306         symbol in the sal.
2307         * linespec.c (convert_address_location_to_sals): Fill in sal's
2308         symbol with find_pc_sect_containing_function.
2309         * symtab.c (find_function_start_sal): Rename to ...
2310         (find_function_start_sal_1): ... this.
2311         (find_function_start_sal): Reimplement as wrapper around
2312         find_function_start_sal_1, and use
2313         find_pc_sect_containing_function to fill in the sal's symbol.
2314         (find_function_start_sal(symbol*, bool)): Adjust.
2315         * symtab.h (find_pc_function, find_pc_sect_function): Adjust
2316         comments.
2317         (find_pc_sect_containing_function): Declare.
2318
2319 2018-06-29  Pedro Alves  <palves@redhat.com>
2320
2321         * inline-frame.c (stopped_by_user_bp_inline_frame): Return
2322         true if the the location has no symbol.
2323
2324 2018-06-28  Tom Tromey  <tom@tromey.com>
2325
2326         * NEWS: Mention --enable-codesign.
2327         * silent-rules.mk (ECHO_SIGN): New variable.
2328         * configure.ac: Add --enable-codesign.
2329         * configure: Rebuild.
2330         * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
2331         (gdb$(EXEEXT)): Optionally invoke codesign.
2332
2333 2018-06-28  Pedro Alves  <palves@redhat.com>
2334
2335         * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
2336         comments.
2337         (switch_to_thread_no_regs): Adjust comment.
2338         * infcmd.c (stop_pc): Delete.
2339         (post_create_inferior, info_program_command): Replace references
2340         to stop_pc with references to thread_info->suspend.stop_pc.
2341         * inferior.h (stop_pc): Delete declaration.
2342         * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
2343         (handle_inferior_event_1, handle_signal_stop)
2344         (process_event_stop_test, keep_going_stepped_thread)
2345         (handle_step_into_function, handle_step_into_function_backward)
2346         (print_stop_location): Replace references to stop_pc with
2347         references to thread_info->suspend.stop_pc.
2348         (struct infcall_suspend_state) <stop_pc>: Delete field.
2349         (save_infcall_suspend_state, restore_infcall_suspend_state):
2350         Remove references to inf_stat->stop_pc.
2351         * linux-fork.c (fork_load_infrun_state): Likewise.
2352         * record-btrace.c (record_btrace_set_replay): Likewise.
2353         * record-full.c (record_full_goto_entry): Likewise.
2354         * remote.c (print_one_stopped_thread): Likewise.
2355         * target.c (target_resume): Extend comment.
2356         * thread.c (set_executing_thread): New.
2357         (set_executing): Use it.
2358         (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
2359         Remove references to stop_pc.
2360
2361 2018-06-28  Pedro Alves  <palves@redhat.com>
2362
2363         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
2364         Moving fetching stop_pc until after ecs->event_thread is refreshed.
2365
2366 2018-06-28  Tom Tromey  <tom@tromey.com>
2367
2368         * coffread.c (coff_symfile_finish): Update.
2369         * xcoffread.c (xcoff_symfile_finish): Update.
2370         * elfread.c (elf_symfile_finish): Update.
2371         * symfile.h (dwarf2_free_objfile): Don't declare.
2372         * dwarf2read.c (_initialize_dwarf2_read): Use
2373         register_objfile_data_with_cleanup.
2374         (dwarf2_free_objfile): Now static.  Change signature.
2375
2376 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
2377
2378         * symfile.c (add_symbol_file_command, _initialize_symfile): Add
2379         option "-o" to add-symbol-file-load to add an offset to each
2380         section's load address.
2381         * symfile.c (set_objfile_default_section_offset): New function.
2382
2383 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
2384
2385         * symfile.c (add_symbol_file_command): Make sure that sections
2386         with the same name are sorted in the same order.
2387
2388 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
2389
2390         * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
2391         require the second argument.  If omitted, load sections at the
2392         addresses specified in the file.
2393
2394 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
2395
2396         * symfile.c (symbol_file_command, symbol_file_add_main_1)
2397         (_initialize_symfile): Add option "-o" to symbol-file to add an
2398         offset to each section of the symbol file.
2399
2400 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
2401
2402         * MAINTAINERS (Write After Approval): Add Petr Tesarik.
2403
2404 2018-06-27  Tom Tromey  <tom@tromey.com>
2405
2406         * stack.c (_initialize_stack): Update "func" help text.
2407
2408 2018-06-27  Tom Tromey  <tom@tromey.com>
2409
2410         * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
2411         std::vector.
2412         (unwind_infopy_str, pyuw_create_unwind_info)
2413         (unwind_infopy_add_saved_register, pyuw_sniffer)
2414         (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
2415         Update.
2416         (struct saved_reg): Add constructor.
2417         <value>: Now a gdbpy_ref<>.
2418
2419 2018-06-27  Tom Tromey  <tom@tromey.com>
2420
2421         * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
2422
2423 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
2424
2425         * gdb-gdb.py.in: Format using autopep8.
2426
2427 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
2428
2429         * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
2430         (type_lookup_function): Recognize CORE_ADDR values.
2431
2432 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
2433
2434         * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
2435         print tag_name.
2436
2437 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
2438
2439         * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
2440         <__lt__>: Add.
2441
2442 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
2443
2444         * gdb-gdb.py: Move to...
2445         * gdb-gdb.py.in: ... here.
2446         * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
2447         * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
2448         dependencies.
2449         (distclean): Remove gdb-gdb.py when cleaning.
2450         (gdb-gdb.py, gdb-gdb.gdb): New rules.
2451         * configure: Re-generate.
2452
2453 2018-06-27  Pedro Alves  <palves@redhat.com>
2454
2455         * proc-service.c (get_ps_regcache): New.
2456         (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
2457         (ps_lsetfpregs): Use it.
2458
2459 2018-06-27  Omair Javaid  <omair.javaid@linaro.org>
2460
2461         PR gdb/21695
2462         * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
2463         (dwarf_decode_lines_1): Adjust.
2464
2465 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
2466
2467         * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
2468         override.
2469         <info_proc>: Likewise.
2470
2471 2018-06-26  Joel Brobecker  <brobecker@adacore.com>
2472
2473         * windows-nat.c (do_windows_fetch_inferior_registers): Rename
2474         to windows_fetch_one_register, and only handle the case of
2475         fetching one register.  Move the code that reloads the context
2476         and iterates over all registers if R is negative to...
2477         (windows_nat_target::fetch_registers): ... here.
2478         (do_windows_store_inferior_registers): Rename to
2479         windows_store_one_register, and only handle the case of storing
2480         one register.  Move the code that handles the case where r is
2481         negative to...
2482         (windows_nat_target::store_registers) ... here.
2483
2484 2018-06-26  Tom Tromey  <tom@tromey.com>
2485
2486         PR rust/22574:
2487         * typeprint.c (whatis_exp): Allow ptype/o for Rust.
2488         * rust-lang.c (rust_print_struct_def): Add podata parameter.
2489         Update.
2490         (rust_internal_print_type): Add podata parameter.
2491         (rust_print_type): Update.
2492
2493 2018-06-26  Tom Tromey  <tom@tromey.com>
2494
2495         * typeprint.h (struct print_offset_data) <update, finish,
2496         maybe_print_hole>: New methods.
2497         <indentation>: New constant.
2498         * typeprint.c (print_offset_data::indentation): Define.
2499         (print_offset_data::maybe_print_hole, print_offset_data::update)
2500         (print_offset_data::finish): Move from c-typeprint.c and rename.
2501         * c-typeprint.c (OFFSET_SPC_LEN): Remove.
2502         (print_spaces_filtered_with_print_options): Update.
2503         (c_print_type_union_field_offset, maybe_print_hole)
2504         (c_print_type_struct_field_offset): Move to typeprint.c and
2505         rename.
2506         (c_type_print_base_struct_union): Update.
2507
2508 2018-06-25  Pedro Alves  <palves@redhat.com>
2509
2510         * gdbthread.h (thread_info_ref, delete_thread)
2511         (delete_thread_silent, first_thread_of_inferior)
2512         (any_thread_of_inferior, switch_to_thread)
2513         (enable_thread_stack_temporaries)
2514         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2515         (get_last_thread_stack_temporary)
2516         (value_in_thread_stack_temporaries, can_access_registers_thread):
2517         Spell out "struct thread_info" instead of just "thread_info".
2518         * inferior.h (notice_new_inferior): Likewise.
2519
2520 2018-06-25  Pedro Alves  <palves@redhat.com>
2521
2522         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
2523         pass thread_info pointer to delete_thread.
2524         (windows_nat_target::detach): Pass inferior pointer to
2525         detach_inferior.
2526         * aix-thread.c (sync_threadlists): Pass thread_info pointer to
2527         delete_thread.
2528         * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
2529         * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
2530         and pass a thread_info pointer to delete_thread.
2531         * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
2532         pass thread_info pointer to delete_thread.
2533         * go32-nat.c (go32_nat_target::mourn_inferior): Remove
2534         delete_thread_silent call.
2535         * procfs.c (procfs_target::detach): Pass inferior pointer to
2536         detach_inferior.
2537         (procfs_target::wait): Pass thread_info pointer to delete_thread.
2538         * remote-sim.c (gdbsim_target::mourn_inferior): Remove
2539         delete_thread_silent call.
2540         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
2541         pass thread_info pointer to delete_thread.
2542         (windows_nat_target::detach): Pass inferior pointer to
2543         delete_inferior.
2544
2545 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
2546
2547         * regcache.c (readable_regcache::read_part): Fix asserts.
2548         (reg_buffer::raw_collect_part): New function.
2549         (regcache::write_part): Fix asserts.
2550         (reg_buffer::raw_supply_part): New function.
2551         (regcache::transfer_regset_register): New helper function.
2552         (regcache::transfer_regset): Call new functions.
2553         (regcache_supply_regset): Use gdb_byte*.
2554         (regcache::supply_regset): Likewise.
2555         (regcache_collect_regset): Likewise.
2556         (regcache::collect_regset): Likewise.
2557         * regcache.h (reg_buffer::raw_collect_part): New declaration.
2558         (reg_buffer::raw_supply_part): Likewise.
2559         (regcache::transfer_regset_register): Likewise.
2560         (regcache::transfer_regset): Use gdb_byte*.
2561
2562 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
2563
2564         * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
2565
2566 2018-06-21  Pedro Alves  <palves@redhat.com>
2567
2568         * ada-lang.h (ada_get_task_number): Take a thread_info pointer
2569         instead of a ptid_t.  All callers adjusted.
2570         * ada-tasks.c (ada_get_task_number): Likewise.  All callers
2571         adjusted.
2572         (print_ada_task_info, display_current_task_id, task_command_1):
2573         Adjust.
2574         * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
2575         inferior_thread.
2576         (breakpoint_kind): Adjust.
2577         (remove_breakpoints_pid): Rename to ...
2578         (remove_breakpoints_inf): ... this.  Adjust to take an inferior
2579         pointer.  All callers adjusted.
2580         (bpstat_clear_actions): Use inferior_thread.
2581         (get_bpstat_thread): New.
2582         (bpstat_do_actions): Use it.
2583         (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
2584         to take a thread_info pointer.  All callers adjusted.
2585         (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
2586         (breakpoint_re_set_thread): Use inferior_thread.
2587         * breakpoint.h (struct inferior): Forward declare.
2588         (bpstat_stop_status): Update.
2589         (remove_breakpoints_pid): Delete.
2590         (remove_breakpoints_inf): New.
2591         * bsd-uthread.c (bsd_uthread_target::wait)
2592         (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
2593         * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
2594         (maint_btrace_packet_history_cmd)
2595         (maint_btrace_clear_packet_history_cmd): Adjust.
2596         (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
2597         inferior_thread.
2598         * cli/cli-interp.c: Include "inferior.h".
2599         * common/refcounted-object.h (struct
2600         refcounted_object_ref_policy): New.
2601         * compile/compile-object-load.c: Include gdbthread.h.
2602         (store_regs): Use inferior_thread.
2603         * corelow.c (core_target::close): Use current_inferior.
2604         (core_target_open): Adjust to use first_thread_of_inferior and use
2605         the current inferior.
2606         * ctf.c (ctf_target::close): Adjust to use current_inferior.
2607         * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
2608         <thread>: ... this new field.  All references adjusted.
2609         (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
2610         Take a thread_info pointer instead of a ptid_t.
2611         * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
2612         (dummy_frame_discard, register_dummy_frame_dtor): Take a
2613         thread_info pointer instead of a ptid_t.
2614         * elfread.c: Include "inferior.h".
2615         (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
2616         Use inferior_thread.
2617         * eval.c (evaluate_subexp): Likewise.
2618         * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
2619         inferior_thread.
2620         * gdb_proc_service.h (struct thread_info): Forward declare.
2621         (struct ps_prochandle) <ptid>: Delete, replaced by ...
2622         <thread>: ... this new field.  All references adjusted.
2623         * gdbarch.h, gdbarch.c: Regenerate.
2624         * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
2625         'thread' parameter.  All implementations and callers adjusted.
2626         * gdbthread.h (thread_info) <set_running>: New method.
2627         (delete_thread, delete_thread_silent): Take a thread_info pointer
2628         instead of a ptid.
2629         (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
2630         (first_thread_of_process): Delete, replaced by ...
2631         (first_thread_of_inferior): ... this new function.  All callers
2632         adjusted.
2633         (any_live_thread_of_process): Delete, replaced by ...
2634         (any_live_thread_of_inferior): ... this new function.  All callers
2635         adjusted.
2636         (switch_to_thread, switch_to_no_thread): Declare.
2637         (is_executing): Delete.
2638         (enable_thread_stack_temporaries): Update comment.
2639         <enable_thread_stack_temporaries>: Take a thread_info pointer
2640         instead of a ptid_t.  Incref the thread.
2641         <~enable_thread_stack_temporaries>: Decref the thread.
2642         <m_ptid>: Delete
2643         <m_thr>: New.
2644         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2645         (get_last_thread_stack_temporary)
2646         (value_in_thread_stack_temporaries, can_access_registers_thread):
2647         Take a thread_info pointer instead of a ptid_t.  All callers
2648         adjusted.
2649         * infcall.c (get_call_return_value): Use inferior_thread.
2650         (run_inferior_call): Work with thread pointers instead of ptid_t.
2651         (call_function_by_hand_dummy): Work with thread pointers instead
2652         of ptid_t.  Use thread_info_ref.
2653         * infcmd.c (proceed_thread_callback): Access thread's state
2654         directly.
2655         (ensure_valid_thread, ensure_not_running): Use inferior_thread,
2656         access thread's state directly.
2657         (continue_command): Use inferior_thread.
2658         (info_program_command): Use find_thread_ptid and access thread
2659         state directly.
2660         (proceed_after_attach_callback): Use thread state directly.
2661         (notice_new_inferior): Take a thread_info pointer instead of a
2662         ptid_t.  All callers adjusted.
2663         (exit_inferior): Take an inferior pointer instead of a pid.  All
2664         callers adjusted.
2665         (exit_inferior_silent): New.
2666         (detach_inferior): Delete.
2667         (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
2668         (gdb_inferior_id_to_pid, in_inferior_list): Delete.
2669         (detach_inferior_command, kill_inferior_command): Use
2670         find_inferior_id instead of valid_gdb_inferior_id and
2671         gdb_inferior_id_to_pid.
2672         (inferior_command): Use inferior and thread pointers.
2673         * inferior.h (struct thread_info): Forward declare.
2674         (notice_new_inferior): Take a thread_info pointer instead of a
2675         ptid_t.  All callers adjusted.
2676         (detach_inferior): Delete declaration.
2677         (exit_inferior, exit_inferior_silent): Take an inferior pointer
2678         instead of a pid.  All callers adjusted.
2679         (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
2680         (valid_gdb_inferior_id): Delete.
2681         * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
2682         (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
2683         (struct displaced_step_inferior_state) <pid>: Delete, replaced by
2684         ...
2685         <inf>: ... this new field.
2686         <step_ptid>: Delete, replaced by ...
2687         <step_thread>: ... this new field.
2688         (get_displaced_stepping_state): Take an inferior pointer instead
2689         of a pid.  All callers adjusted.
2690         (displaced_step_in_progress_any_inferior): Adjust.
2691         (displaced_step_in_progress_thread): Take a thread pointer instead
2692         of a ptid_t.  All callers adjusted.
2693         (displaced_step_in_progress, add_displaced_stepping_state): Take
2694         an inferior pointer instead of a pid.  All callers adjusted.
2695         (get_displaced_step_closure_by_addr): Adjust.
2696         (remove_displaced_stepping_state): Take an inferior pointer
2697         instead of a pid.  All callers adjusted.
2698         (displaced_step_prepare_throw, displaced_step_prepare)
2699         (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
2700         All callers adjusted.
2701         (start_step_over): Adjust.
2702         (infrun_thread_ptid_changed): Remove bit updating ptids in the
2703         displaced step queue.
2704         (do_target_resume): Adjust.
2705         (fetch_inferior_event): Use inferior_thread.
2706         (context_switch, get_inferior_stop_soon): Take an
2707         execution_control_state pointer instead of a ptid_t.  All callers
2708         adjusted.
2709         (switch_to_thread_cleanup): Delete.
2710         (stop_all_threads): Use scoped_restore_current_thread.
2711         * inline-frame.c: Include "gdbthread.h".
2712         (inline_state) <inline_state>: Take a thread pointer instead of a
2713         ptid_t.  All callers adjusted.
2714         <ptid>: Delete, replaced by ...
2715         <thread>: ... this new field.
2716         (find_inline_frame_state): Take a thread pointer instead of a
2717         ptid_t.  All callers adjusted.
2718         (skip_inline_frames, step_into_inline_frame)
2719         (inline_skipped_frames, inline_skipped_symbol): Take a thread
2720         pointer instead of a ptid_t.  All callers adjusted.
2721         * inline-frame.h (skip_inline_frames, step_into_inline_frame)
2722         (inline_skipped_frames, inline_skipped_symbol): Likewise.
2723         * linux-fork.c (delete_checkpoint_command): Adjust to use thread
2724         pointers directly.
2725         * linux-nat.c (get_detach_signal): Likewise.
2726         * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
2727         (thread_db_notice_clone): Adjust.
2728         (thread_db_find_new_threads_silently)
2729         (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
2730         a thread pointer instead of a ptid_t.  All callers adjusted.
2731         * mi/mi-cmd-var.c: Include "inferior.h".
2732         (mi_cmd_var_update_iter): Update to use thread pointers.
2733         * mi/mi-interp.c (mi_new_thread): Update to use the thread's
2734         inferior directly.
2735         (mi_output_running_pid, mi_inferior_count): Delete, bits factored
2736         out to ...
2737         (mi_output_running): ... this new function.
2738         (mi_on_resume_1): Adjust to use it.
2739         (mi_user_selected_context_changed): Adjust to use inferior_thread.
2740         * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
2741         directly.
2742         (interrupt_thread_callback): : Adjust to use thread and inferior
2743         pointers.
2744         * proc-service.c: Include "gdbthread.h".
2745         (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
2746         * progspace-and-thread.c: Include "inferior.h".
2747         * progspace.c: Include "inferior.h".
2748         * python/py-exitedevent.c (create_exited_event_object): Adjust to
2749         hold a reference to an inferior_object.
2750         * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
2751         inferior_thread.
2752         * python/py-inferior.c (struct inferior_object): Give the type a
2753         tag name instead of a typedef.
2754         (python_on_normal_stop): No need to check if the current thread is
2755         listed.
2756         (inferior_to_inferior_object): Change return type to
2757         inferior_object.  All callers adjusted.
2758         (find_thread_object): Delete, bits factored out to ...
2759         (thread_to_thread_object): ... this new function.
2760         * python/py-infthread.c (create_thread_object): Use
2761         inferior_to_inferior_object.
2762         (thpy_is_stopped): Use thread pointer directly.
2763         (gdbpy_selected_thread): Use inferior_thread.
2764         * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
2765         field, replaced with ...
2766         <thread>: ... this new field.  All users adjusted.
2767         (btpy_insn_or_gap_new): Drop const.
2768         (btpy_list_new): Take a thread pointer instead of a ptid_t.  All
2769         callers adjusted.
2770         * python/py-record.c: Include "gdbthread.h".
2771         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
2772         a ptid_t.  All callers adjusted.
2773         (gdbpy_current_recording): Use inferior_thread.
2774         * python/py-record.h (recpy_record_object) <ptid>: Delete
2775         field, replaced with ...
2776         <thread>: ... this new field.  All users adjusted.
2777         (recpy_element_object) <ptid>: Delete
2778         field, replaced with ...
2779         <thread>: ... this new field.  All users adjusted.
2780         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
2781         a ptid_t.  All callers adjusted.
2782         * python/py-threadevent.c: Include "gdbthread.h".
2783         (get_event_thread): Use thread_to_thread_object.
2784         * python/python-internal.h (struct inferior_object): Forward
2785         declare.
2786         (find_thread_object, find_inferior_object): Delete declarations.
2787         (thread_to_thread_object, inferior_to_inferior_object): New
2788         declarations.
2789         * record-btrace.c: Include "inferior.h".
2790         (require_btrace_thread): Use inferior_thread.
2791         (record_btrace_frame_sniffer)
2792         (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
2793         (get_thread_current_frame): Use scoped_restore_current_thread and
2794         switch_to_thread.
2795         (get_thread_current_frame): Use thread pointer directly.
2796         (record_btrace_replay_at_breakpoint): Use thread's inferior
2797         pointer directly.
2798         * record-full.c: Include "inferior.h".
2799         * regcache.c: Include "gdbthread.h".
2800         (get_thread_arch_regcache): Use the inferior's address space
2801         directly.
2802         (get_thread_regcache, registers_changed_thread): New.
2803         * regcache.h (get_thread_regcache(thread_info *thread)): New
2804         overload.
2805         (registers_changed_thread): New.
2806         (remote_target) <remote_detach_1>: Swap order of parameters.
2807         (remote_add_thread): <remote_add_thread>: Return the new thread.
2808         (get_remote_thread_info(ptid_t)): New overload.
2809         (remote_target::remote_notice_new_inferior): Use thread pointers
2810         directly.
2811         (remote_target::process_initial_stop_replies): Use
2812         thread_info::set_running.
2813         (remote_target::remote_detach_1, remote_target::detach)
2814         (extended_remote_target::detach): Adjust.
2815         * stack.c (frame_show_address): Use inferior_thread.
2816         * target-debug.h (target_debug_print_thread_info_pp): New.
2817         * target-delegates.c: Regenerate.
2818         * target.c (default_thread_address_space): Delete.
2819         (memory_xfer_partial_1): Use current_inferior.
2820         (target_detach): Use current_inferior.
2821         (target_thread_address_space): Delete.
2822         (generic_mourn_inferior): Use current_inferior.
2823         * target.h (struct target_ops) <thread_address_space>: Delete.
2824         (target_thread_address_space): Delete.
2825         * thread.c (init_thread_list): Use ALL_THREADS_SAFE.  Use thread
2826         pointers directly.
2827         (delete_thread_1, delete_thread, delete_thread_silent): Take a
2828         thread pointer instead of a ptid_t.  Adjust all callers.
2829         (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
2830         (first_thread_of_process): Delete, replaced by ...
2831         (first_thread_of_inferior): ... this new function.  All callers
2832         adjusted.
2833         (any_thread_of_process): Rename to ...
2834         (any_thread_of_inferior): ... this, and take an inferior pointer.
2835         (any_live_thread_of_process): Rename to ...
2836         (any_live_thread_of_inferior): ... this, and take an inferior
2837         pointer.
2838         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2839         (value_in_thread_stack_temporaries)
2840         (get_last_thread_stack_temporary): Take a thread pointer instead
2841         of a ptid_t.  Adjust all callers.
2842         (thread_info::set_running): New.
2843         (validate_registers_access): Use inferior_thread.
2844         (can_access_registers_ptid): Rename to ...
2845         (can_access_registers_thread): ... this, and take a thread
2846         pointer.
2847         (print_thread_info_1): Adjust to compare thread pointers instead
2848         of ptids.
2849         (switch_to_no_thread, switch_to_thread): Make extern.
2850         (scoped_restore_current_thread::~scoped_restore_current_thread):
2851         Use m_thread pointer directly.
2852         (scoped_restore_current_thread::scoped_restore_current_thread):
2853         Use inferior_thread.
2854         (thread_command): Use thread pointer directly.
2855         (thread_num_make_value_helper): Use inferior_thread.
2856         * top.c (execute_command): Use inferior_thread.
2857         * tui/tui-interp.c: Include "inferior.h".
2858         * varobj.c (varobj_create): Use inferior_thread.
2859         (value_of_root_1): Use find_thread_global_id instead of
2860         global_thread_id_to_ptid.
2861
2862 2018-06-21  Alan Hayward  <alan.hayward@arm.com>
2863
2864         * regcache.c (readable_regcache::read_part): Avoid memcpy when
2865         possible.
2866         (regcache::write_part): Likewise.
2867         (readable_regcache::cooked_read_part): Update comment.
2868         (readable_regcache::cooked_write_part): Likewise.
2869         * regcache.h: (readable_regcache::read_part): Likewise.
2870         (regcache::write_part): Likewise.
2871
2872 2018-06-21  Richard Bunt  <richard.bunt@arm.com>
2873             Dirk Schubert  <dirk.schubert@arm.com>
2874
2875         * aarch64-linux-nat.c (post_attach): New.
2876         (aarch64_linux_nat_target::post_attach): Override post_attach to
2877         record the number of hardware debug registers.
2878
2879 2018-06-20  Tom Tromey  <tom@tromey.com>
2880
2881         * python/py-param.c (add_setshow_generic): Make parameters const.
2882         (parmpy_init): Update.
2883
2884 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
2885
2886         * regcache.h (regcache_cooked_read_ftype): Rename to...
2887         (register_read_ftype): ...this, change type to function_view.
2888         (class reg_buffer) <save>: Remove src parameter.
2889         (readonly_detached_regcache) <readonly_detached_regcache>: Make
2890         parameter non-const in first overload.  Remove src parameter in
2891         second overload.
2892         * regcache.c (do_cooked_read): Remove.
2893         (readonly_detached_regcache::readonly_detached_regcache): Make
2894         parameter non-const, adjust call to other constructor.
2895         (reg_buffer::save): Remove src parameter.
2896         * frame.c (do_frame_register_read): Remove.
2897         (frame_save_as_regcache): Use lambda function.
2898         * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
2899         parameter to ppu2spu_data *.
2900         (ppu2spu_sniffer): Use lambda function.
2901
2902 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
2903
2904         * record-full.c (record_full_target::insert_breakpoint): Remove
2905         "struct" keyword, add const.
2906
2907 2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>
2908
2909         * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
2910         PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
2911         * configure.ac: Remove AC_PREREQ, add missing quoting.
2912         * gnulib/configure.ac: Modernize usage of
2913         AC_INIT/AM_INIT_AUTOMAKE.  Remove AC_PREREQ.
2914         * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
2915         (AUTOMAKE_VERSION): Bump to 1.15.1.
2916         * configure: Re-generate.
2917         * config.in: Re-generate.
2918         * aclocal.m4: Re-generate.
2919         * gnulib/aclocal.m4: Re-generate.
2920         * gnulib/config.in: Re-generate.
2921         * gnulib/configure: Re-generate.
2922         * gnulib/import/Makefile.in: Re-generate.
2923
2924 2018-06-19  Pedro Alves  <palves@redhat.com>
2925
2926         * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
2927         (lookup_minimal_symbol_by_pc_section): ... here with
2928         gdb_assert_not_reached added.
2929
2930 2018-06-19  Pedro Alves  <palves@redhat.com>
2931
2932         * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
2933         parameter with a block parameter.  Compare location's block symbol
2934         with the frame's block instead of addresses.
2935         (skip_inline_frames): Pass the current block instead of the
2936         frame's address.  Break out as soon as we determine the frame
2937         should not be skipped.
2938
2939 2018-06-18  Tom Tromey  <tom@tromey.com>
2940
2941         * solib-aix.c (solib_aix_get_section_offsets): Return
2942         unique_xmalloc_ptr.
2943         (solib_aix_solib_create_inferior_hook): Update.
2944
2945 2018-06-18  Tom Tromey  <tom@tromey.com>
2946
2947         * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
2948
2949 2018-06-18  Tom Tromey  <tom@tromey.com>
2950
2951         * solib-frv.c (frv_relocate_main_executable): Use
2952         unique_xmalloc_ptr.
2953         * solib-dsbt.c (dsbt_relocate_main_executable): Use
2954         unique_xmalloc_ptr.
2955
2956 2018-06-18  Tom Tromey  <tom@tromey.com>
2957
2958         * objfiles.h (inhibit_section_map_updates): Update.
2959         (resume_section_map_updates, resume_section_map_updates_cleanup):
2960         Remove.
2961         * solib-svr4.c (svr4_handle_solib_event): Update.
2962         * objfiles.c (inhibit_section_map_updates): Return
2963         scoped_restore_tmpl<int>.
2964         (resume_section_map_updates, resume_section_map_updates_cleanup):
2965         Remove.
2966
2967 2018-06-18  Tom Tromey  <tom@tromey.com>
2968
2969         * valprint.h (read_string): Update.
2970         * valprint.c (read_string): Change type of "buffer".
2971         (val_print_string): Update.
2972         * python/py-value.c (valpy_string): Update.
2973         * language.h (struct language_defn) <la_get_string>: Change
2974         type of "buffer".
2975         (default_get_string, c_get_string): Update.
2976         * language.c (default_get_string): Change type of "buffer".
2977         * guile/scm-value.c (gdbscm_value_to_string): Update.
2978         * c-lang.c (c_get_string): Change type of "buffer".
2979
2980 2018-06-18  Tom Tromey  <tom@tromey.com>
2981
2982         * ser-mingw.c (struct pipe_state_destroyer): New.
2983         (pipe_state_up): New typedef.
2984         (cleanup_pipe_state): Remove.
2985         (pipe_windows_open): Use pipe_state_up.  Don't release argv.
2986
2987 2018-06-18  Tom Tromey  <tom@tromey.com>
2988
2989         * rust-lang.h (rust_yyerror): Don't declare.
2990         * rust-lang.c (rust_language_defn): Update.
2991         * rust-exp.y (yyerror): Now static.
2992         * parse.c (parse_exp_in_context_1): Update.
2993         * p-lang.h (p_yyerror): Don't declare.
2994         * p-lang.c (p_language_defn): Update.
2995         * p-exp.y (yyerror): Now static.
2996         * opencl-lang.c (opencl_language_defn): Update.
2997         * objc-lang.c (objc_language_defn): Update.
2998         * m2-lang.h (m2_yyerror): Don't declare.
2999         * m2-lang.c (m2_language_defn): Update.
3000         * m2-exp.y (yyerror): Now static.
3001         * language.h (struct language_defn) <la_error>: Remove.
3002         * language.c (unk_lang_error): Remove.
3003         (unknown_language_defn, auto_language_defn): Remove.
3004         * go-lang.h (go_yyerror): Don't declare.
3005         * go-lang.c (go_language_defn): Update.
3006         * go-exp.y (yyerror): Now static.
3007         * f-lang.h (f_yyerror): Don't declare.
3008         * f-lang.c (f_language_defn): Update.
3009         * f-exp.y (yyerror): Now static.
3010         * d-lang.h (d_yyerror): Don't declare.
3011         * d-lang.c (d_language_defn): Update.
3012         * d-exp.y (yyerror): Now static.
3013         * c-lang.h (c_yyerror): Don't declare.
3014         * c-lang.c (c_language_defn, cplus_language_defn)
3015         (asm_language_defn, minimal_language_defn): Update.
3016         * c-exp.y (yyerror): Now static.
3017         * ada-lang.h (ada_yyerror): Don't declare.
3018         * ada-lang.c (ada_language_defn): Update.
3019         * ada-exp.y (yyerror): Now static.
3020
3021 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
3022
3023         * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
3024         (store_sveregs_to_thread): Likewise.
3025         (aarch64_linux_fetch_inferior_registers): Check for SVE.
3026         (aarch64_linux_store_inferior_registers): Likewise.
3027         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
3028         function.
3029         (aarch64_sve_regs_copy_to_regcache): Likewise.
3030         (aarch64_sve_regs_copy_from_regcache): Likewise.
3031         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
3032         declaration.
3033         (aarch64_sve_regs_copy_to_regcache): Likewise.
3034         (aarch64_sve_regs_copy_from_regcache): Likewise.
3035         (sve_context): Structure from Linux headers.
3036         (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
3037         (SVE_SIG_ZREG_SIZE): Likewise.
3038         (SVE_SIG_PREG_SIZE): Likewise.
3039         (SVE_SIG_FFR_SIZE): Likewise.
3040         (SVE_SIG_REGS_OFFSET): Likewise.
3041         (SVE_SIG_ZREGS_OFFSET): Likewise.
3042         (SVE_SIG_ZREG_OFFSET): Likewise.
3043         (SVE_SIG_ZREGS_SIZE): Likewise.
3044         (SVE_SIG_PREGS_OFFSET): Likewise.
3045         (SVE_SIG_PREG_OFFSET): Likewise.
3046         (SVE_SIG_PREGS_SIZE): Likewise.
3047         (SVE_SIG_FFR_OFFSET): Likewise.
3048         (SVE_SIG_REGS_SIZE): Likewise.
3049         (SVE_SIG_CONTEXT_SIZE): Likewise.
3050         (SVE_PT_REGS_MASK): Likewise.
3051         (SVE_PT_REGS_FPSIMD): Likewise.
3052         (SVE_PT_REGS_SVE): Likewise.
3053         (SVE_PT_VL_INHERIT): Likewise.
3054         (SVE_PT_VL_ONEXEC): Likewise.
3055         (SVE_PT_REGS_OFFSET): Likewise.
3056         (SVE_PT_FPSIMD_OFFSET): Likewise.
3057         (SVE_PT_FPSIMD_SIZE): Likewise.
3058         (SVE_PT_SVE_ZREG_SIZE): Likewise.
3059         (SVE_PT_SVE_PREG_SIZE): Likewise.
3060         (SVE_PT_SVE_FFR_SIZE): Likewise.
3061         (SVE_PT_SVE_FPSR_SIZE): Likewise.
3062         (SVE_PT_SVE_FPCR_SIZE): Likewise.
3063         (__SVE_SIG_TO_PT): Likewise.
3064         (SVE_PT_SVE_OFFSET): Likewise.
3065         (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
3066         (SVE_PT_SVE_ZREG_OFFSET): Likewise.
3067         (SVE_PT_SVE_ZREGS_SIZE): Likewise.
3068         (SVE_PT_SVE_PREGS_OFFSET): Likewise.
3069         (SVE_PT_SVE_PREG_OFFSET): Likewise.
3070         (SVE_PT_SVE_PREGS_SIZE): Likewise.
3071         (SVE_PT_SVE_FFR_OFFSET): Likewise.
3072         (SVE_PT_SVE_FPSR_OFFSET): Likewise.
3073         (SVE_PT_SVE_FPCR_OFFSET): Likewise.
3074         (SVE_PT_SVE_SIZE): Likewise.
3075         (SVE_PT_SIZE): Likewise.
3076         (HAS_SVE_STATE): New define.
3077
3078 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
3079
3080         * nat/aarch64-sve-linux-sigcontext.h: New file.
3081         * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
3082         new files.
3083         (SVE_VQ_MIN): Likewise.
3084         (SVE_VQ_MAX): Likewise.
3085         (SVE_VL_MIN): Likewise.
3086         (SVE_VL_MAX): Likewise.
3087         (SVE_NUM_ZREGS): Likewise.
3088         (SVE_NUM_PREGS): Likewise.
3089         (sve_vl_valid): Likewise.
3090         (struct user_sve_header): Likewise.
3091
3092 2018-06-16  Andrew Burgess  <andrew.burgess@embecosm.com>
3093             Richard Bunt <Richard.Bunt@arm.com>
3094
3095         * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
3096         was requested by GDB.
3097
3098 2018-06-15  Tom de Vries  <tdevries@suse.de>
3099
3100         * MAINTAINERS (Write After Approval): Add Tom de Vries.
3101
3102 2018-06-14  Simon Marchi  <simon.marchi@polymtl.ca>
3103
3104         * gnulib/update-gnulib.sh: Print expected versions of
3105         autoconf/aclocal.
3106
3107 2018-06-14  Simon Marchi  <simon.marchi@ericsson.com>
3108
3109         * arch-utils.c (default_type_align): Use type_length_units.
3110         * gdbtypes.c (type_align): Use type_length_units.
3111
3112 2018-06-14  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
3113
3114         * cli/cli-script.c (_initialize_cli_script): Fix online documentation
3115         of 'define' command.
3116
3117 2018-06-14  Tom de Vries  <tdevries@suse.de>
3118
3119         PR cli/22573
3120         * infcmd.c (print_return_value_1): Use get_user_print_options instead of
3121         get_no_prettyformat_print_options.
3122
3123 2018-06-13  Simon Marchi  <simon.marchi@ericsson.com>
3124
3125         * sparc-nat.h: Include target.h.
3126         * sparc64-linux-nat.c (class sparc64_linux_nat_target)
3127         <fetch_registers>: Remove this argument in function call.
3128         <store_registers>: Remove this argument in function call, remove
3129         extra semicolon.
3130         <low_forget_process>: Call sparc64_forget_process instead of
3131         sparc_forget_process.
3132
3133 2018-06-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3134
3135         * procfs.c (_initialize_procfs): Use add_inf_child_target.
3136         (procfs_target::make_corefile_notes): Adjust to new
3137         target_read_alloc return type.
3138
3139 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
3140             Stephen Roberts  <stephen.roberts@arm.com>
3141
3142         PR gdb/22882
3143         * infrun.c (fetch_inferior_event): If GDB is not proceeding then
3144         run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
3145         Move should_notify_stop local into more inner scope.
3146
3147 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
3148             Stephen Roberts  <stephen.roberts@arm.com>
3149
3150         PR gdb/22882
3151         * infrun.c (resume_1): Add call to mark_async_event_handler.
3152
3153 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
3154
3155         * infrun.c (do_target_wait): Change old version of $pc printed.
3156
3157 2018-06-11  Simon Marchi  <simon.marchi@ericsson.com>
3158
3159         * dwarf2read.c (read_index_from_section): Rename to...
3160         (read_gdb_index_from_section): ... this, update all callers.
3161         (dwarf2_read_index): Rename to...
3162         (dwarf2_read_gdb_index): ... this, update all callers.
3163
3164 2018-06-11  John David Anglin  <danglin@gcc.gnu.org>
3165
3166         * gdb/hppa-linux-nat.c
3167         (hppa_linux_nat_target::fetch_inferior_registers): Rename to
3168         hppa_linux_nat_target::fetch_registers.
3169
3170 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
3171
3172         * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
3173         * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
3174         (AARCH64_DWARF_SVE_FFR): Likewise.
3175         (AARCH64_DWARF_SVE_P0): Likewise.
3176         (AARCH64_DWARF_SVE_Z0): Likewise.
3177
3178 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
3179
3180         * common/common-regcache.h (raw_compare): New function.
3181         * regcache.c (regcache::raw_compare): Likewise.
3182         * regcache.h (regcache::raw_compare): New declaration.
3183
3184 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
3185
3186         * common/common-regcache.h (reg_buffer_common): New structure.
3187         * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
3188         (reg_buffer::raw_supply): Likewise.
3189         (reg_buffer::raw_supply_integer): Likewise.
3190         (reg_buffer::raw_supply_zeroed): Likewise.
3191         (reg_buffer::raw_collect): Likewise.
3192         (reg_buffer::raw_collect_integer): Likewise.
3193         * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
3194         (reg_buffer::raw_supply): Likewise.
3195         (reg_buffer::raw_supply_integer): Likewise.
3196         (reg_buffer::raw_supply_zeroed): Likewise.
3197         (reg_buffer::raw_collect): Likewise.
3198         (reg_buffer::raw_collect_integer): Likewise.
3199
3200 2018-06-10  Tom Tromey  <tom@tromey.com>
3201
3202         * remote.c (stop_reply_p): Remove typedef.  Don't declare queue.
3203         (class remote_state) <stop_reply_queue>: Now std::vector.
3204         (remote_state::~remote_state)
3205         (remote_target::stop_reply_queue_length): Update.
3206         (struct queue_iter_param, remove_child_of_pending_fork)
3207         (struct check_pending_event_prevents_wildcard_vcont_callback_data)
3208         (check_pending_event_prevents_wildcard_vcont_callback)
3209         (remove_stop_reply_for_inferior)
3210         (remove_stop_reply_of_remote_state)
3211         (remote_notif_remove_once_on_match)
3212         (stop_reply_match_ptid_and_ws)
3213         (remote_kill_child_of_pending_fork): Remove.
3214         (remote_target::remove_new_fork_children)
3215         (remote_target::check_pending_events_prevent_wildcard_vcont)
3216         (remote_target::discard_pending_stop_replies)
3217         (remote_target::discard_pending_stop_replies_in_queue)
3218         (remote_target::remote_notif_remove_queued_reply)
3219         (remote_target::queued_stop_reply)
3220         (remote_target::push_stop_reply, remote_target::peek_stop_reply)
3221         (remote_target::wait, remote_target::kill_new_fork_children)
3222         (remote_target::async): Update.
3223
3224 2018-06-10  Tom Tromey  <tom@tromey.com>
3225
3226         * record-full.c (record_full_arch_list_cleanups): Remove.
3227         (record_full_message): Use try/catch.
3228         (record_full_wait_cleanups): Remove.
3229         (record_full_wait_1): Use try/catch.
3230         (record_full_restore): Likewise.
3231
3232 2018-06-10  Tom Tromey  <tom@tromey.com>
3233
3234         * record-full.c (record_full_breakpoint_p): Remove typedef.  Don't
3235         declare VEC.  Add constructor.
3236         <in_target_beneath>: Now bool.
3237         (record_full_breakpoints): Now a std::vector, static.
3238         (record_full_sync_record_breakpoints)
3239         (record_full_init_record_breakpoints)
3240         (record_full_target::insert_breakpoint)
3241         (record_full_target::remove_breakpoint): Update.  Don't use XNEW.
3242
3243 2018-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
3244
3245         * dwarf2read.c (process_cu_includes): Remove struct keyword.
3246         * serial.c (serial_interface_lookup): Remove struct keyword.
3247
3248 2018-06-10  Tom Tromey  <tom@tromey.com>
3249
3250         * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
3251         method.
3252         * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
3253         a method.
3254         * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
3255         method.
3256         * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
3257         "beneath" as a method.
3258         * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
3259         Use "beneath" as a method.
3260
3261 2018-06-10  Tom Tromey  <tom@tromey.com>
3262
3263         * tracefile.c (struct trace_file_writer_deleter): New.
3264         <operator()>: Rename from trace_file_writer_xfree.
3265         (trace_file_writer_up): New typedef.
3266         (tsave_command, trace_save_tfile, trace_save_ctf): Update.
3267
3268 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
3269
3270         * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
3271         <m_registers, m_register_status>: Change type to
3272         std::unique_ptr.
3273         * regcache.c (reg_buffer::reg_buffer): Use new instead of
3274         XCNEWVEC.
3275
3276 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
3277
3278         * common/common-regcache.h (enum register_status): Add
3279         underlying type "signed char".
3280         * regcache.h (reg_buffer) <m_register_status>: Change type to
3281         register_status *.
3282         * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
3283         register_status instead of signed char.
3284         (reg_buffer::save): Use REG_UNKNOWN instead of 0.
3285         (reg_buffer::get_register_status): Remove cast.
3286         (readable_regcache::raw_read): Remove cast.
3287         (readable_regcache::cooked_read): Remove cast.
3288
3289 2018-06-09  Tom Tromey  <tom@tromey.com>
3290
3291         * source.c (reverse_search_command, forward_search_command): Use
3292         scoped_fd.
3293
3294 2018-06-09  Tom Tromey  <tom@tromey.com>
3295
3296         * serial.c (serial_ops_p): Remove typedef.  Don't declare VEC.
3297         (serial_ops_list): Now static, std::vector.
3298         (serial_interface_lookup, serial_add_interface): Update.
3299
3300 2018-06-09  Tom Tromey  <tom@tromey.com>
3301
3302         * dwarf2read.c (process_cu_includes): Update.
3303         (process_full_comp_unit): Update.
3304         * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
3305         std::vector.
3306
3307 2018-06-08  Paul Koning  <paul_koning@dell.com>
3308
3309         PR gdb/23252
3310
3311         * python/python.c (do_start_initialization):
3312         Avoid call to internal Python API.
3313         (init__gdb_module): New function.
3314
3315 2018-06-08  Gary Benson <gbenson@redhat.com>
3316
3317         * linux-thread-db.c (valprint.h): New include.
3318         (struct check_thread_db_info): New structure.
3319         (check_thread_db_on_load, tdb_testinfo): New static globals.
3320         (check_thread_db, check_thread_db_callback): New functions.
3321         (try_thread_db_load_1): Run integrity checks if requested.
3322         (maintenance_check_libthread_db): New function.
3323         (_initialize_thread_db): Register "maint check libthread-db"
3324         and "maint set/show check-libthread-db".
3325         * NEWS: Mention the above new commands.
3326
3327 2018-06-08  Tom Tromey  <tom@tromey.com>
3328
3329         * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
3330         now a method.
3331
3332 2018-06-08  Tom Tromey  <tom@tromey.com>
3333
3334         * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
3335
3336 2018-06-08  Tom Tromey  <tom@tromey.com>
3337
3338         * common/btrace-common.h (struct btrace_data): Add constructor,
3339         destructor, move assignment operator.
3340         <empty, clear, fini>: New methods.
3341         <format>: Initialize.
3342         (btrace_data_init, btrace_data_fini, btrace_data_clear)
3343         (btrace_data_empty): Don't declare.
3344         * common/btrace-common.c (btrace_data_init): Remove.
3345         (btrace_data::fini): Rename from btrace_data_fini.
3346         (btrace_data::empty): Rename from btrace_data_empty.
3347         (btrace_data::clear): Rename from btrace_data_clear.  Return
3348         bool.
3349         * btrace.h (make_cleanup_btrace_data): Don't declare.
3350         * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
3351         (parse_xml_btrace): Update.
3352         (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
3353         (maint_btrace_clear_packet_history_cmd): Update.
3354
3355 2018-06-07  Pedro Alves  <palves@redhat.com>
3356
3357         * target.h (target_ops) <beneath>: Now a method.  All references
3358         updated.
3359         (class target_stack): New.
3360         * target.c (g_target_stack): New.
3361         (g_current_top_target): Delete.
3362         (current_top_target): Get the top target out of g_target_stack.
3363         (target_stack::push, target_stack::unpush): New.
3364         (push_target, unpush_target): Reimplement.
3365         (target_is_pushed): Reimplement in terms of g_target_stack.
3366         (target_ops::beneath, target_stack::find_beneath): New.
3367
3368 2018-06-07  Pedro Alves  <palves@redhat.com>
3369
3370         * target.h (find_target_beneath): Delete declaration.
3371         * target.c (find_target_beneath): Delete definition.
3372         * aix-thread.c: All callers of find_target_beneath adjusted to
3373         call target_ops::beneath instead.
3374         * bsd-uthread.c: Likewise.
3375         * linux-thread-db.c: Likewise.
3376         * ravenscar-thread.c: Likewise.
3377         * sol-thread.c: Likewise.
3378         * spu-multiarch.c: Likewise.
3379
3380 2018-06-07  Pedro Alves  <palves@redhat.com>
3381
3382         * target.h (target_ops) <beneath>: Now a method.  All references
3383         updated.
3384         (target_ops) <m_beneath>: New.
3385         * target.c (target_ops::beneath): New.
3386         * corelow.c: Adjust all references to target_ops::beneath.
3387         * linux-thread-db.c: Likewise.
3388         * make-target-delegates: Likewise.
3389         * record-btrace.c: Likewise.
3390         * record-full.c: Likewise.
3391         * remote.c: Likewise.
3392         * target.c: Likewise.
3393         * target-delegates.c: Regenerate.
3394
3395 2018-06-07  Pedro Alves  <palves@redhat.com>
3396
3397         * target.h (target_stack): Delete.
3398         (current_top_target): Declare function.
3399         * target.c (target_stack): Delete.
3400         (g_current_top_target): New.
3401         (current_top_target): New function.
3402         * auxv.c: Use current_top_target instead of target_stack
3403         throughout.
3404         * avr-tdep.c: Likewise.
3405         * breakpoint.c: Likewise.
3406         * corefile.c: Likewise.
3407         * elfread.c: Likewise.
3408         * eval.c: Likewise.
3409         * exceptions.c: Likewise.
3410         * frame.c: Likewise.
3411         * gdbarch-selftests.c: Likewise.
3412         * gnu-v3-abi.c: Likewise.
3413         * ia64-tdep.c: Likewise.
3414         * ia64-vms-tdep.c: Likewise.
3415         * infcall.c: Likewise.
3416         * infcmd.c: Likewise.
3417         * infrun.c: Likewise.
3418         * linespec.c: Likewise.
3419         * linux-tdep.c: Likewise.
3420         * minsyms.c: Likewise.
3421         * ppc-linux-nat.c: Likewise.
3422         * ppc-linux-tdep.c: Likewise.
3423         * procfs.c: Likewise.
3424         * regcache.c: Likewise.
3425         * remote.c: Likewise.
3426         * rs6000-tdep.c: Likewise.
3427         * s390-linux-nat.c: Likewise.
3428         * s390-tdep.c: Likewise.
3429         * solib-aix.c: Likewise.
3430         * solib-darwin.c: Likewise.
3431         * solib-dsbt.c: Likewise.
3432         * solib-spu.c: Likewise.
3433         * solib-svr4.c: Likewise.
3434         * solib-target.c: Likewise.
3435         * sparc-tdep.c: Likewise.
3436         * sparc64-tdep.c: Likewise.
3437         * spu-tdep.c: Likewise.
3438         * symfile.c: Likewise.
3439         * symtab.c: Likewise.
3440         * target-descriptions.c: Likewise.
3441         * target-memory.c: Likewise.
3442         * target.c: Likewise.
3443         * target.h: Likewise.
3444         * tracefile-tfile.c: Likewise.
3445         * tracepoint.c: Likewise.
3446         * valops.c: Likewise.
3447         * valprint.c: Likewise.
3448         * value.c: Likewise.
3449         * windows-tdep.c: Likewise.
3450         * mi/mi-main.c: Likewise.
3451
3452 2018-06-07  Tom Tromey  <tom@tromey.com>
3453
3454         * valprint.h (build_address_symbolic): Declare.
3455         * printcmd.c (print_address_symbolic): Update.
3456         (build_address_symbolic): Change "name" and "filename" to
3457         std::string.
3458         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
3459         Update.
3460         * defs.h (build_address_symbolic): Remove declaration.
3461
3462 2018-06-07  Alan Hayward  <alan.hayward@arm.com>
3463
3464         * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
3465         (aarch64_vnv_type): Add function.
3466         (aarch64_pseudo_register_name): Add V regs for SVE.
3467         (aarch64_pseudo_register_type): Likewise.
3468         (aarch64_pseudo_register_reggroup_p): Likewise.
3469         (aarch64_pseudo_read_value_2): Use V0 offset for SVE
3470         (aarch64_pseudo_read_value): Add V regs for SVE.
3471         (aarch64_pseudo_write_2): Use V0 offset for SVE
3472         (aarch64_pseudo_write): Add V regs for SVE.
3473         * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
3474
3475 2018-06-06  Sergio Durigan Junior  <sergiodj@redhat.com>
3476
3477         * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
3478         (sve_vl_from_vq): Likewise.
3479
3480 2018-06-05  Tom Tromey  <tom@tromey.com>
3481
3482         * cli/cli-cmds.c (show_version): Update.
3483         * top.c (print_gdb_version): Add "interactive" parameter.
3484         Update.
3485         * main.c (captured_main_1): Update.
3486         * top.h (print_gdb_version): Add "interactive" parameter and a
3487         comment.
3488
3489 2018-06-05  David Malcolm  <dmalcolm@redhat.com>
3490
3491         * common/enum-flags.h: Add trailing semicolon to example in
3492         comment.
3493
3494 2018-06-05  Tom Tromey  <tom@tromey.com>
3495
3496         PR cli/12326:
3497         * NEWS: Add entry about pager.
3498         * utils.c (pagination_disabled_for_command): New global.
3499         (prompt_for_continue): Allow "c" response to prompt.
3500         (reinitialize_more_filter): Clear
3501         pagination_disabled_for_command.
3502         (fputs_maybe_filtered): Check pagination_disabled_for_command.
3503
3504 2018-06-04  Tom Tromey  <tom@tromey.com>
3505
3506         * ada-lang.h (ada_lookup_symbol_list): Update.
3507         * ada-lang.c (resolve_subexp): Update.
3508         (symbols_are_identical_enums): Change type of syms.  Remove nsyms
3509         parameter.
3510         (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
3511         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
3512         results parameter to std::vector.
3513         (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
3514         Update.
3515         * ada-exp.y (block_lookup): Update.
3516         (select_possible_type_sym): Change type of syms.  Remove nsyms
3517         parameter.
3518         (write_var_or_type, write_name_assoc): Update.
3519
3520 2018-06-04  Joel Brobecker  <brobecker@adacore.com>
3521
3522         * windows-nat.c (windows_nat_target::xfer_partial): Return
3523         TARGET_XFER_E_IO if we need to delegate to the target beneath
3524         but BENEATH is NULL.
3525
3526 2018-06-04  Simon Marchi  <simon.marchi@ericsson.com>
3527
3528         * Makefile.in (config.status): Add configure.nat as a
3529         dependency.
3530
3531 2018-06-04  Tom Tromey  <tom@tromey.com>
3532
3533         * cp-name-parser.y (cpname_state): Add method declarations.
3534         (HANDLE_QUAL): Update.
3535         (cpname_state::d_grab, cpname_state::fill_comp)
3536         (cpname_state::make_operator, cpname_state::make_dtor)
3537         (cpname_state::make_builtin_type, cpname_state::make_name)
3538         (cpname_state::d_qualify, cpname_state::d_int_type)
3539         (cpname_state::d_unary, cpname_state::d_binary): Now methods.
3540         (%union): Move earlier.
3541
3542 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
3543
3544         * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
3545
3546 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
3547
3548         * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
3549         (aarch64_pseudo_write_1): Likewise.
3550         (aarch64_pseudo_read_value): Use helper.
3551         (aarch64_pseudo_write): Likewise.
3552
3553 2018-06-04  Pedro Alves  <palves@redhat.com>
3554
3555         * darwin-nat.c (darwin_ops): Delete.
3556         (darwin_attach_pid): Use get_native_target.
3557
3558 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
3559
3560         * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
3561         * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
3562
3563 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
3564
3565         * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
3566         * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
3567         (aarch64_gdbarch_init): Check for SVE.
3568         * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
3569
3570 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
3571
3572         * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
3573         * aarch64-tdep.h (aarch64_read_description): Likewise.
3574         * arch/aarch64.c (aarch64_create_target_description): Likewise.
3575         * arch/aarch64.h (aarch64_create_target_description): Likewise.
3576         * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
3577         * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
3578         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
3579
3580 2018-06-02  Simon Marchi  <simon.marchi@ericsson.com>
3581
3582         * value.c (value_fetch_lazy_bitfield): New.
3583         (value_fetch_lazy_memory): New.
3584         (value_fetch_lazy_register): New.
3585         (value_fetch_lazy): Factor out to smaller functions.
3586
3587 2018-06-01  Tom Tromey  <tom@tromey.com>
3588
3589         * cp-name-parser.y (backslashable, represented): Now const.
3590
3591 2018-06-01  Tom Tromey  <tom@tromey.com>
3592
3593         * cp-name-parser.y: Include parser-defs.h.
3594         (parser_fprintf): Remove declaration.
3595
3596 2018-06-01  Tom Tromey  <tom@tromey.com>
3597
3598         * cp-name-parser.y: Use %pure-parser, %lex-param, and
3599         %parse-param.
3600         (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
3601         (global_result): Remove globals.
3602         (struct cpname_state): New.
3603         (yyparse): Don't declare.
3604         (yylex, yyerror): Move declarations after %union.
3605         (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
3606         (make_name): Add state parameter.
3607         Update all callers.
3608         (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
3609         parameter.
3610         (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
3611         Update.
3612         (yylex): Add lvalp, state parameters.
3613         (yyerror): Add state parameter.
3614         (cp_demangled_name_to_comp): Update.
3615
3616 2018-06-01  Tom Tromey  <tom@tromey.com>
3617
3618         * cp-name-parser.y (parser_fprintf): Declare.
3619         (GDB_YY_REMAP_PREFIX): Define.
3620         Include yy-remap.h.  Don't redefine yy* identifiers.
3621
3622 2018-06-01  Tom Tromey  <tom@tromey.com>
3623
3624         * python/py-type.c (typy_legacy_template_argument): Update.
3625         * cp-support.h (cp_demangled_name_to_comp): Update.
3626         * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
3627         parameter to be a "std::string *".
3628         (main): Update.
3629
3630 2018-06-01  H.J. Lu  <hongjiu.lu@intel.com>
3631
3632         * ada-lex.l: Include "diagnostics.h" instead of
3633         "common/diagnostics.h".
3634         * unittests/environ-selftests.c: Likewise.
3635         * common/diagnostics.h: Moved to ../include.
3636
3637 2018-06-01  Joel Brobecker  <brobecker@adacore.com>
3638
3639         * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
3640         to language_mode_manual while calling breakpoint_re_set_one.
3641
3642 2018-06-01  Tom Tromey  <tom@tromey.com>
3643
3644         * valops.c (value_cast_structs, destructor_name_p): Update.
3645         * symtab.c (gdb_mangle_name): Update.
3646         * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
3647         Update.
3648         * p-valprint.c (pascal_object_is_vtbl_ptr_type)
3649         (pascal_object_print_value_fields, pascal_object_print_value):
3650         Update.
3651         * p-typeprint.c (pascal_type_print_derivation_info): Update.
3652         * linespec.c (find_methods): Update.
3653         * gdbtypes.h (type_name_no_tag): Remove.
3654         (type_name_or_error): Rename from type_name_no_tag_or_error.
3655         * gdbtypes.c (type_name_no_tag): Remove.
3656         (type_name_or_error): Rename from type_name_no_tag_or_error.
3657         (lookup_struct_elt_type, check_typedef): Update.
3658         * expprint.c (print_subexp_standard): Update.
3659         * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
3660         * d-namespace.c (d_lookup_nested_symbol): Update.
3661         * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
3662         (cp_print_class_member): Update.
3663         * cp-namespace.c (cp_lookup_nested_symbol): Update.
3664         * completer.c (add_struct_fields): Update.
3665         * c-typeprint.c (cp_type_print_derivation_info)
3666         (c_type_print_varspec_prefix, c_type_print_base_struct_union):
3667         Update.
3668         * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
3669         (ada_prefer_type, ada_is_exception_sym): Update.
3670
3671 2018-06-01  Tom Tromey  <tom@tromey.com>
3672
3673         * valops.c (enum_constant_from_type, value_namespace_elt)
3674         (value_maybe_namespace_elt): Update.
3675         * valarith.c (find_size_for_pointer_math): Update.
3676         * target-descriptions.c (make_gdb_type): Update.
3677         * symmisc.c (print_symbol): Update.
3678         * stabsread.c (define_symbol, read_type)
3679         (complain_about_struct_wipeout, add_undefined_type)
3680         (cleanup_undefined_types_1): Update.
3681         * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
3682         (rust_range_type_p, val_print_struct, rust_print_struct_def)
3683         (rust_internal_print_type, rust_composite_type)
3684         (rust_evaluate_funcall, rust_evaluate_subexp)
3685         (rust_inclusive_range_type_p): Update.
3686         * python/py-type.c (typy_get_tag): Update.
3687         * p-typeprint.c (pascal_type_print_base): Update.
3688         * mdebugread.c (parse_symbol, parse_type): Update.
3689         * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
3690         Update.
3691         * guile/scm-type.c (gdbscm_type_tag): Update.
3692         * go-lang.c (sixg_string_p): Update.
3693         * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
3694         Update.
3695         * gdbtypes.h (struct main_type) <tag_name>: Remove.
3696         (TYPE_TAG_NAME): Remove.
3697         * gdbtypes.c (type_name_no_tag): Simplify.
3698         (check_typedef, check_types_equal, recursive_dump_type)
3699         (copy_type_recursive, arch_composite_type): Update.
3700         * f-typeprint.c (f_type_print_base): Update.  Print "Type" prefix
3701         in summary mode when needed.
3702         * eval.c (evaluate_funcall): Update.
3703         * dwarf2read.c (fixup_go_packaging, read_structure_type)
3704         (process_structure_scope, read_enumeration_type)
3705         (read_namespace_type, read_module_type, determine_prefix): Update.
3706         * cp-support.c (inspect_type): Update.
3707         * coffread.c (process_coff_symbol, decode_base_type): Update.
3708         * c-varobj.c (c_is_path_expr_parent): Update.
3709         * c-typeprint.c (c_type_print_base_struct_union): Update.
3710         (c_type_print_base_1): Update.  Print struct/class/union/enum in
3711         summary when using C language.
3712         * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
3713         (gen_maybe_namespace_elt): Update.
3714         * ada-lang.c (ada_type_name): Simplify.
3715         (empty_record, ada_template_to_fixed_record_type_1)
3716         (template_to_static_fixed_type)
3717         (to_record_with_fixed_variant_part, ada_check_typedef): Update.
3718
3719 2018-06-01  Tom Tromey  <tom@tromey.com>
3720
3721         * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
3722         c_print_type.
3723         * c-typeprint.c (c_print_type_1): Add "language" parameter.
3724         (c_print_type): Update.
3725         (c_print_type): New overload.
3726         (c_type_print_varspec_prefix, c_type_print_args)
3727         (c_type_print_varspec_suffix, c_print_type_no_offsets)
3728         (c_type_print_base_struct_union, c_type_print_base_1)
3729         (cp_type_print_method_args): Add "language" parameter.
3730         (c_type_print_base): Update.
3731         * c-lang.h (c_print_type): Add new overload.
3732
3733 2018-06-01  Tom Tromey  <tom@tromey.com>
3734
3735         * typeprint.h (c_type_print_varspec_suffix): Don't declare.
3736         * c-typeprint.c (c_type_print_varspec_suffix): Now static.
3737
3738 2018-06-01  Alan Hayward  <alan.hayward@arm.com>
3739
3740         * aarch64-tdep.c (aarch64_sve_register_names): New const
3741         var.
3742         * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
3743         (AARCH64_SVE_Z_REGS_NUM): New define.
3744         (AARCH64_SVE_P_REGS_NUM): Likewise.
3745         (AARCH64_SVE_NUM_REGS): Likewise.
3746
3747 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
3748
3749         * nat/linux-ptrace.h [__alpha__]
3750         (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
3751         definitions.
3752
3753 2018-05-31  Maciej W. Rozycki  <macro@mips.com>
3754
3755         * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
3756         the endianness selected.
3757         * NEWS: Document `set endian auto' mode operation update.
3758
3759 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
3760
3761         * Makefile.in: Add new header.
3762         * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
3763         (sve_vl_from_vg): Likewise.
3764         (sve_vq_from_vl): Likewise.
3765         (sve_vl_from_vq): Likewise.
3766         (sve_vq_from_vg): Likewise.
3767         (sve_vg_from_vq): Likewise.
3768         * configure.nat: Add new c file.
3769         * nat/aarch64-sve-linux-ptrace.c: New file.
3770         * nat/aarch64-sve-linux-ptrace.h: New file.
3771
3772 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
3773
3774         * aarch64-linux-nat.c (aarch64_linux_read_description):
3775         Add parmeter zero.
3776         * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
3777         Likewise.
3778         * aarch64-tdep.c (tdesc_aarch64_list): Add.
3779         (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
3780         (aarch64_gdbarch_init): Add parmeter zero.
3781         * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
3782         * arch/aarch64.c (aarch64_create_target_description): Check VQ.
3783         * arch/aarch64.h (aarch64_create_target_description): Add VQ.
3784         parmeter.
3785         * doc/gdb.texinfo: Describe SVE feature
3786         * features/aarch64-sve.c: New file.
3787
3788 2018-05-31  Omair Javaid  <omair.javaid@linaro.org>
3789
3790         PR gdb/23210
3791         * gdbarch.sh (significant_addr_bit): Default to zero when
3792         not set by target architecture.
3793         * gdbarch.c: Re-generated.
3794         * utils.c (address_significant): Update.
3795
3796 2018-05-30  Joel Brobecker  <brobecker@adacore.com>
3797
3798         * stack.c (func_command): Remove trailing newline in call to error.
3799
3800 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3801
3802         * regcache.h (regcache_raw_collect): Remove, update callers to
3803         use regcache::raw_collect.
3804         * regcache.c (regcache_raw_collect): Remove.
3805
3806 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3807
3808         * regcache.h (regcache_raw_supply): Remove, update callers to
3809         use detached_regcache::raw_supply.
3810         * regcache.c (regcache_raw_supply): Remove.
3811
3812 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3813
3814         * regcache.h (regcache_cooked_write_part): Remove, update
3815         callers to use regcache::cooked_write_part.
3816         * regcache.c (regcache_cooked_write_part): Remove.
3817
3818 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3819
3820         * regcache.h (regcache_cooked_read_part): Remove, update callers
3821         to use readable_regcache::cooked_read_part.
3822         * regcache.c (regcache_cooked_read_part): Remove.
3823
3824 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3825
3826         * regcache.h (regcache_cooked_read_value): Remove, update
3827         callers to use readable_regcache::cooked_read_value.
3828         * regcache.c (regcache_cooked_read_value): Remove.
3829
3830 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3831
3832         * regcache.h (regcache_cooked_write): Remove, update callers to
3833         use regcache::cooked_write.
3834         * regcache.c (regcache_cooked_write): Remove.
3835
3836 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3837
3838         * regcache.h (regcache_invalidate): Remove, update callers to
3839         use detached_regcache::invalidate instead.
3840         * regcache.c (regcache_invalidate): Remove.
3841
3842 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3843
3844         * regcache.h (regcache_raw_write_part): Remove, update callers
3845         to use regcache::raw_write_part instead.
3846         * regcache.c (regcache_raw_write_part): Remove.
3847
3848 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3849
3850         * regcache.h (regcache_raw_read_part): Remove, update callers to
3851         use readable_regcache::raw_read_part instead.
3852         * regcache.c (regcache_raw_read_part): Remove.
3853
3854 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3855
3856         * regcache.h (regcache_cooked_read): Remove, update callers to
3857         use readable_regcache::cooked_read instead.
3858         * regcache.c (regcache_cooked_read): Remove.
3859
3860 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3861
3862         * regcache.h (regcache_raw_write): Remove, update callers to use
3863         regcache::raw_write instead.
3864         * regcache.c (regcache_raw_write): Remove.
3865
3866 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3867
3868         * regcache.h (regcache_raw_read): Remove, update callers to use
3869         readable_regcache::raw_read instead.
3870         * regcache.c (regcache_raw_read): Remove.
3871
3872 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3873
3874         * regcache.h (regcache_raw_update): Remove, update callers to
3875         use readable_regcache::raw_update instead.
3876         * regcache.c (regcache_raw_update): Remove.
3877
3878 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3879
3880         * regcache.h (regcache_register_status): Remove, update callers
3881         to use reg_buffer::get_register_status directly instead.
3882         * regcache.c (regcache_register_status): Remove.
3883
3884 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3885
3886         * regcache.h (regcache_get_ptid): Remove, update all callers to
3887         call regcache::ptid instead.
3888         * regcache.c (regcache_get_ptid): Remove.
3889
3890 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3891
3892         * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
3893
3894 2018-05-30  Pedro Alves  <palves@redhat.com>
3895
3896         * common/common-exceptions.h (exception_rethrow): Use
3897         ATTRIBUTE_NORETURN.
3898
3899 2018-05-29  Simon Marchi  <simon.marchi@polymtl.ca>
3900
3901         * breakpoint.c (print_solib_event, check_status_catch_solib):
3902         Remove struct keyword in range-based for loops.
3903         * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
3904         * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
3905         Likewise.
3906         * linespec.c (find_superclass_methods, search_minsyms_for_name):
3907         Likewise.
3908         * symfile.c (addr_info_make_relative): Likewise.
3909         * thread.c (value_in_thread_stack_temporaries): Likewise.
3910
3911 2018-06-12  Weimin Pan  <weimin.pan@oracle.com>
3912
3913         PR gdb/16841
3914         * valops.c (value_struct_elt_for_reference): Call check_typedef on
3915         aggregate type to get its real type before accessing it.
3916
3917 2018-05-29  Weimin Pan  <weimin.pan@oracle.com>
3918
3919         * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
3920         * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
3921         * coff-pe-read.c (add_pe_forwarded_sym): Replace
3922         lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
3923         * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
3924         * jit.c (jit_breakpoint_re_set_internal): Likewise.
3925         * printcmd.c (info_address_command): Likewise.
3926
3927 2018-05-29  Tom Tromey  <tom@tromey.com>
3928
3929         * windows-nat.c (handle_exception): Update fall-through comment.
3930
3931 2018-05-29  Tom Tromey  <tom@tromey.com>
3932
3933         * progspace.h (so_list_ptr): Remove typedef.  Don't declare VEC.
3934         (struct program_space) <added_solibs>: Now a std::vector.
3935         * breakpoint.c (print_solib_event): Update.
3936         (check_status_catch_solib): Update.
3937         * progspace.c (clear_program_space_solib_cache): Update.
3938         * solib.c (update_solib_list): Update.
3939
3940 2018-05-29  Tom Tromey  <tom@tromey.com>
3941
3942         * python/py-type.c (typy_richcompare): Update.
3943         * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
3944         * gdbtypes.h (types_deeply_equal): Return bool.
3945         (types_equal): Likewise.
3946         * gdbtypes.c (type_equality_entry_d): Remove typedef.  Don't
3947         declare VEC.
3948         (check_types_equal): Change worklist to std::vector.  Return
3949         bool.
3950         (struct type_equality_entry): Add constructor.
3951         (compare_maybe_null_strings): Return bool.
3952         (check_types_worklist): Return bool.  Change worklist to
3953         std::vector.
3954         (types_deeply_equal): Use std::vector.
3955         (types_equal): Return bool.
3956         (compare_maybe_null_strings): Simplify.
3957
3958 2018-05-29  Tom Tromey  <tom@tromey.com>
3959
3960         * record-btrace.c (tp_t): Remove typedef.  Don't declare VEC.
3961
3962 2018-05-29  Tom Tromey  <tom@tromey.com>
3963
3964         * objc-lang.h: Don't include cp-support.h.
3965         * common/gdb_vecs.h (const_char_ptr): Remove typedef.  Don't
3966         declare VEC.
3967
3968 2018-05-27  Tom Tromey  <tom@tromey.com>
3969
3970         * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
3971
3972 2018-05-25  Tom Tromey  <tom@tromey.com>
3973
3974         * value.c (value::location): Initialize.
3975
3976 2018-05-25  Tom Tromey  <tom@tromey.com>
3977
3978         * dbxread.c (init_bincl_list): Remove.
3979         (bincl_list): Now a std::vector.
3980         (bincls_allocated, next_bincl): Remove.
3981         (free_bincl_list, do_free_bincl_list_cleanup)
3982         (make_cleanup_free_bincl_list): Remove.
3983         (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
3984         unique_xmalloc_ptr.
3985         (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
3986         (struct header_file_location): Add constructor.
3987         (add_bincl_to_list): Remove.
3988
3989 2018-05-25  Tom Tromey  <tom@tromey.com>
3990
3991         * tui/tui.c (tui_enable): Update.
3992         * mi/mi-interp.c (mi_interp::init): Update.
3993         * interps.h (class interp) <name>: New method.
3994         <m_name>: Rename from name.
3995         (~scoped_restore_interp): Update.
3996         * interps.c (interp::interp): Update.
3997         (interp_add, interp_set, interp_lookup_existing)
3998         (current_interp_named_p): Update.
3999
4000 2018-05-25  Tom Tromey  <tom@tromey.com>
4001
4002         * interps.c (interp_name): Remove.
4003         * mi/mi-interp.c (mi_interp::init): Update.
4004         * interps.h (interp_name): Remove.
4005         (~scoped_restore_interp): Update.
4006         * tui/tui.c (tui_enable): Update.
4007
4008 2018-05-25  Tom Tromey  <tom@tromey.com>
4009
4010         * utils.c (fputs_maybe_filtered): Update.
4011         * linespec.c (decode_line_full): Update.
4012         * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
4013         (mi_print_breakpoint_for_event, mi_solib_loaded)
4014         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
4015         (mi_user_selected_context_changed): Update.
4016         * mi/mi-main.c (mi_execute_command): Update.
4017         * cli/cli-script.c (execute_control_command): Update.
4018         * python/python.c (execute_gdb_command): Update.
4019         * solib.c (info_sharedlibrary_command): Update.
4020         * interps.c (interp_ui_out): Remove.
4021         * interps.h (interp_ui_out): Remove.
4022
4023 2018-05-25  Tom Tromey  <tom@tromey.com>
4024
4025         * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
4026         * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
4027         * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
4028
4029 2018-05-25  Tom Tromey  <tom@tromey.com>
4030
4031         * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
4032         * interps.c (interp_exec): Use scoped_restore.
4033
4034 2018-05-25  Tom Tromey  <tom@tromey.com>
4035
4036         * remote.c (remote_target::remote_file_get): Use
4037         gdb::byte_vector.
4038         (remote_target::remote_file_put): Likewise.
4039
4040 2018-05-25  Tom Tromey  <tom@tromey.com>
4041
4042         * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
4043         a std::string.
4044         (get_pe_section_index, add_pe_exported_sym): Update.
4045         (read_pe_exported_syms): Use gdb::def_vector.
4046
4047 2018-05-25  Tom Tromey  <tom@tromey.com>
4048
4049         * frame.c (remove_prev_frame): Remove.
4050         (get_prev_frame_if_no_cycle): Use TRY/CATCH.
4051
4052 2018-05-25  Maciej W. Rozycki  <macro@mips.com>
4053
4054         * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
4055         Remove prototypes.
4056         * mips-linux-nat.c (supply_fpregset): Always call
4057         `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
4058         (fill_fpregset): Always call `mips64_fill_fpregset' rather than
4059         `mips_fill_fpregset'.
4060         * mips-linux-tdep.c (mips_supply_fpregset)
4061         (mips_supply_fpregset_wrapper, mips_fill_fpregset)
4062         (mips_fill_fpregset_wrapper): Remove functions.
4063         (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
4064         (mips_linux_fpregset): Remove variable.
4065         (mips_linux_iterate_over_regset_sections): Use
4066         `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
4067         (mips_linux_o32_sigframe_init): Remove comment.
4068
4069 2018-05-25  Pedro Alves  <palves@redhat.com>
4070
4071         * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
4072         (struct readahead_cache, struct packet_reg, struct
4073         remote_arch_state, class remote_state): Move higher up in the
4074         file.
4075         (remote_target::m_remote_state): Now an object instead of a pointer.
4076         (remote_target::get_remote_state): Adjust.
4077
4078 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
4079
4080         * stack.c (select_and_print_frame): Delete.
4081         (struct function_bounds): Move struct within function.
4082         (func_command): Most content moved into new function
4083         find_frame_for_function, use new function, print result, add
4084         function comment.
4085         (find_frame_for_function): New function, now returns a result.
4086
4087 2018-05-24  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4088
4089         * stack.c (iterate_over_block_arg_vars): Fix comment.
4090         (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
4091
4092 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
4093
4094         PR gdb/23203
4095         * frame.c
4096         (scoped_restore_selected_frame::scoped_restore_selected_frame):
4097         Define.
4098         (scoped_restore_selected_frame::~scoped_restore_selected_frame):
4099         Define.
4100         * frame.h (class scoped_restore_selected_frame): New class.
4101         * stack.c (print_frame_local_vars): Remove catching and rethrowing
4102         of any exception, use scoped_restore_selected_frame to restore the
4103         frame instead.
4104
4105 2018-05-24  Pedro Alves  <palves@redhat.com>
4106
4107         * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
4108         override.
4109
4110 2018-05-23  Tom Tromey  <tom@tromey.com>
4111
4112         * complaints.c (struct complaints): Remove.
4113         (symfile_complaint_book): Remove.
4114         (series): New global.
4115         (complaint_internal): Update.
4116         (clear_complaints): Update.
4117
4118 2018-05-23  Tom Tromey  <tom@tromey.com>
4119
4120         * complaints.c (counters): New global.
4121         (struct complain): Remove.
4122         (struct complaints) <root>: Remove.
4123         (complaint_sentinel): Remove.
4124         (symfile_complaint_book): Update.
4125         (find_complaint) Remove.
4126         (complaint_internal, clear_complaints): Update.
4127
4128 2018-05-23  Tom Tromey  <tom@tromey.com>
4129
4130         * complaints.c (struct complain) <file, line>: Remove.
4131         (find_complaint): Remove file, line parameters.
4132         (complaint_internal): Update.
4133
4134 2018-05-23  Tom Tromey  <tom@tromey.com>
4135
4136         * complaints.c (vcomplaint): Remove.
4137         (complaint_internal) Merge in contents of vcomplaint.
4138
4139 2018-05-23  Tom Tromey  <tom@tromey.com>
4140
4141         * complaints.c (struct complaints) <explanation>: Remove.
4142         (symfile_explanations): Remove.
4143         (symfile_complaint_book): Update.
4144         (vcomplaint): Update.
4145         (struct explanation): Remove.
4146
4147 2018-05-23  Tom Tromey  <tom@tromey.com>
4148
4149         * complaints.c (symfile_complaints): Remove.
4150         (complaint_internal): Remove "complaints" parameter.
4151         (clear_complaints, vcomplaint): Remove "c" parameter.
4152         (get_complaints): Remove.
4153         * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
4154         (dwarf2_debug_line_missing_file_complaint)
4155         (dwarf2_debug_line_missing_end_sequence_complaint)
4156         (dwarf2_complex_location_expr_complaint)
4157         (dwarf2_const_value_length_mismatch_complaint)
4158         (dwarf2_section_buffer_overflow_complaint)
4159         (dwarf2_macro_malformed_definition_complaint)
4160         (dwarf2_invalid_attrib_class_complaint)
4161         (create_addrmap_from_index, dw2_symtab_iter_next)
4162         (dw2_expand_marked_cus)
4163         (dw2_debug_names_iterator::find_vec_in_debug_names)
4164         (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
4165         (create_debug_type_hash_table, init_cutu_and_read_dies)
4166         (partial_die_parent_scope, add_partial_enumeration)
4167         (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
4168         (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
4169         (read_import_statement, read_file_scope, create_dwo_cu_reader)
4170         (create_cus_hash_table, create_dwp_hash_table)
4171         (inherit_abstract_dies, read_func_scope, read_call_site_scope)
4172         (dwarf2_rnglists_process, dwarf2_ranges_process)
4173         (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
4174         (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
4175         (handle_struct_member_die, process_structure_scope)
4176         (read_array_type, read_common_block, read_module_type)
4177         (read_tag_pointer_type, read_typedef, read_base_type)
4178         (read_subrange_type, load_partial_dies, partial_die_info::read)
4179         (partial_die_info::read, partial_die_info::read)
4180         (partial_die_info::read, read_checked_initial_length_and_offset)
4181         (dwarf2_string_attr, read_formatted_entries)
4182         (dwarf_decode_line_header)
4183         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
4184         (new_symbol, dwarf2_const_value_attr, lookup_die_type)
4185         (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
4186         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
4187         (get_signatured_type, get_DW_AT_signature_type)
4188         (decode_locdesc, file_file_name, consume_improper_spaces)
4189         (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
4190         (dwarf_decode_macro_bytes, dwarf_decode_macros)
4191         (dwarf2_symbol_mark_computed, set_die_type)
4192         (read_attribute_value): Update.
4193         * stap-probe.c (handle_stap_probe, get_stap_base_address):
4194         Update.
4195         * dbxread.c (unknown_symtype_complaint)
4196         (lbrac_mismatch_complaint, repeated_header_complaint)
4197         (set_namestring, function_outside_compilation_unit_complaint)
4198         (read_dbx_symtab, process_one_symbol): Update.
4199         * gdbtypes.c (stub_noname_complaint): Update.
4200         * windows-nat.c (handle_unload_dll): Update.
4201         * coffread.c (coff_symtab_read, enter_linenos, decode_type)
4202         (decode_base_type): Update.
4203         * xcoffread.c (bf_notfound_complaint, ef_complaint)
4204         (eb_complaint, record_include_begin, record_include_end)
4205         (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
4206         (process_xcoff_symbol, read_symbol)
4207         (function_outside_compilation_unit_complaint)
4208         (scan_xcoff_symtab): Update.
4209         * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
4210         * buildsym.c (finish_block_internal, make_blockvector)
4211         (end_symtab_get_static_block, augment_type_symtab): Update.
4212         * dtrace-probe.c (dtrace_process_dof)
4213         (dtrace_static_probe_ops::get_probes): Update.
4214         * complaints.h (struct complaint): Don't declare.
4215         (symfile_complaints): Remove.
4216         (complaint_internal): Remove "complaints" parameter.
4217         (complaint): Likewise.
4218         (clear_complaints): Likewise.
4219         * symfile.c (syms_from_objfile_1, finish_new_objfile)
4220         (reread_symbols): Update.
4221         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
4222         (dwarf2_frame_cache, decode_frame_entry): Update.
4223         * dwarf2loc.c (dwarf_reg_to_regnum): Update.
4224         * objc-lang.c (lookup_objc_class, lookup_child_selector)
4225         (info_selectors_command): Update.
4226         * macrotab.c (macro_include, check_for_redefinition)
4227         (macro_undef): Update.
4228         * objfiles.c (filter_overlapping_sections): Update.
4229         * stabsread.c (invalid_cpp_abbrev_complaint)
4230         (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
4231         (define_symbol, error_type, read_type, rs6000_builtin_type)
4232         (stabs_method_name_from_physname, read_member_functions)
4233         (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
4234         (attach_fields_to_type, complain_about_struct_wipeout)
4235         (read_range_type, read_args, common_block_start)
4236         (common_block_end, cleanup_undefined_types_1, scan_file_globals):
4237         Update.
4238         * mdebugread.c (index_complaint, unknown_ext_complaint)
4239         (basic_type_complaint, bad_tag_guess_complaint)
4240         (bad_rfd_entry_complaint, unexpected_type_code_complaint)
4241         (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
4242         (parse_procedure, parse_lines)
4243         (function_outside_compilation_unit_complaint)
4244         (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
4245         (bad_tag_guess_complaint, reg_value_complaint): Update.
4246         * cp-support.c (demangled_name_complaint): Update.
4247         * macroscope.c (sal_macro_scope): Update.
4248         * dwarf-index-write.c (class debug_names): Update.
4249
4250 2018-05-23  Tom Tromey  <tom@tromey.com>
4251
4252         * complaints.c (clear_complaints): Remove "noisy" parameter.
4253         * complaints.h (clear_complaints): Update.
4254         * symfile.c (syms_from_objfile_1, finish_new_objfile)
4255         (reread_symbols): Update.
4256
4257 2018-05-23  Tom Tromey  <tom@tromey.com>
4258
4259         * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
4260         SUBSEQUENT_MESSAGE.
4261         (vcomplaint, clear_complaints): Update.
4262         (symfile_explanations): Remove some messages.
4263
4264 2018-05-23  Tom Tromey  <tom@tromey.com>
4265
4266         * complaints.c (internal_complaint): Remove.
4267         * complaints.h (internal_complaint): Remove.
4268
4269 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
4270
4271         * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
4272
4273 2018-05-22  Pedro Alves  <palves@redhat.com>
4274
4275         * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
4276         (remote_fileio_badfd, remote_fileio_return_errno)
4277         (remote_fileio_return_success, remote_fileio_func_open)
4278         (remote_fileio_func_open, remote_fileio_func_close)
4279         (remote_fileio_func_read, remote_fileio_func_write)
4280         (remote_fileio_func_lseek, remote_fileio_func_rename)
4281         (remote_fileio_func_unlink, remote_fileio_func_stat)
4282         (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
4283         (remote_fileio_func_isatty, remote_fileio_func_system): Add
4284         remote_target parameter.
4285         (remote_fio_func_map) <func>: Add remote_target parameter.
4286         (do_remote_fileio_request, remote_fileio_request):
4287         * remote-fileio.h (remote_fileio_request):
4288         * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
4289         remote_target parameter.
4290         (remote_notif_process, handle_notification): Adjust to pass down
4291         the remote.
4292         (remote_notif_state_allocate): Add remote_target parameter.  Save
4293         it.
4294         * remote-notif.h (struct remote_target): Forward declare.
4295         (struct notif_client) <parse, ack, can_get_pending_events>: Add
4296         remote_target parameter.
4297         (struct remote_notif_state) <remote>: New field.
4298         (remote_notif_ack, remote_notif_parse): Add remote_target
4299         parameter.
4300         (remote_notif_state_allocate, remote_notif_state_allocate): Add
4301         remote_target parameter.
4302         * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
4303         (threads_listing_context, rmt_thread_action, protocol_feature)
4304         (packet_reg, stop_reply, stop_reply_p, enum packet_support)
4305         (packet_result, struct threads_listing_context, remote_state):
4306         Move definitions and declarations higher up.
4307         (remote_target) <~remote_target>: Declare.
4308         (remote_download_command_source, remote_file_put, remote_file_get)
4309         (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
4310         (remote_hostio_pread_vFile, remote_hostio_send_command)
4311         (remote_hostio_set_filesystem, remote_hostio_open)
4312         (remote_hostio_close, remote_hostio_unlink, remote_state)
4313         (get_remote_state, get_remote_packet_size, get_memory_packet_size)
4314         (get_memory_write_packet_size, get_memory_read_packet_size)
4315         (append_pending_thread_resumptions, remote_detach_1)
4316         (append_resumption, remote_resume_with_vcont)
4317         (add_current_inferior_and_thread, wait_ns, wait_as)
4318         (process_stop_reply, remote_notice_new_inferior)
4319         (process_initial_stop_replies, remote_add_thread)
4320         (btrace_sync_conf, remote_btrace_maybe_reopen)
4321         (remove_new_fork_children, kill_new_fork_children)
4322         (discard_pending_stop_replies, stop_reply_queue_length)
4323         (check_pending_events_prevent_wildcard_vcont)
4324         (discard_pending_stop_replies_in_queue, stop_reply)
4325         (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
4326         (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
4327         (remote_interrupt_as, remote_interrupt_ns)
4328         (remote_get_noisy_reply, remote_query_attached)
4329         (remote_add_inferior, remote_current_thread, get_current_thread)
4330         (set_thread, set_general_thread, set_continue_thread)
4331         (set_general_process, write_ptid)
4332         (remote_unpack_thread_info_response, remote_get_threadinfo)
4333         (parse_threadlist_response, remote_get_threadlist)
4334         (remote_threadlist_iterator, remote_get_threads_with_ql)
4335         (remote_get_threads_with_qxfer)
4336         (remote_get_threads_with_qthreadinfo, extended_remote_restart)
4337         (get_offsets, remote_check_symbols, remote_supported_packet)
4338         (remote_query_supported, remote_packet_size)
4339         (remote_serial_quit_handler, remote_detach_pid)
4340         (remote_vcont_probe, remote_resume_with_hc)
4341         (send_interrupt_sequence, interrupt_query)
4342         (remote_notif_get_pending_events, fetch_register_using_p)
4343         (send_g_packet, process_g_packet, fetch_registers_using_g)
4344         (store_register_using_P, store_registers_using_G)
4345         (set_remote_traceframe, check_binary_download)
4346         (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
4347         (remote_xfer_live_readonly_partial, remote_read_bytes)
4348         (remote_send_printf, remote_flash_write, readchar)
4349         (remote_serial_write, putpkt, putpkt_binary, skip_frame)
4350         (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
4351         (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
4352         (extended_remote_disable_randomization, extended_remote_run)
4353         (send_environment_packet, extended_remote_environment_support)
4354         (extended_remote_set_inferior_cwd, remote_write_qxfer)
4355         (remote_read_qxfer, push_stop_reply, vcont_r_supported)
4356         (packet_command): Now methods of ...
4357         (remote_target): ... this class.
4358         (m_remote_state) <remote_target>: New field.
4359         (struct remote_state) <stop_reply_queue,
4360         remote_async_inferior_event_token, wait_forever_enabled_p>: New
4361         fields.
4362         (remote_state::remote_state): Allocate stop_reply_queue.
4363         (remote_state): Delete global.
4364         (get_remote_state_raw): Delete.
4365         (remote_target::get_remote_state): Allocate m_remote_state on
4366         demand.
4367         (get_current_remote_target): New.
4368         (remote_ops, extended_remote_ops): Delete.
4369         (wait_forever_enabled_p, remote_async_inferior_event_token):
4370         Delete, moved to struct remote_state.
4371         (remote_target::close): Delete self.  Destruction bits split to
4372         ...
4373         (remote_target::~remote_target): ... this.
4374         (show_memory_packet_size): Adjust to use
4375         get_current_remote_target.
4376         (struct protocol_feature) <func>: Add remote_target parameter.
4377         All callers adjusted.
4378         (curr_quit_handler_target): New.
4379         (remote_serial_quit_handler): Reimplement.
4380         (remote_target::open_1): Adjust to use get_current_remote_target.
4381         Heap-allocate remote_target/extended_remote_target instances.
4382         (vcont_builder::vcont_builder): Add remote_target parameter, and
4383         save it in m_remote.  All callers adjusted.
4384         (vcont_builder::m_remote): New field.
4385         (vcont_builder::restart, vcont_builder::flush)
4386         (vcont_builder::push_action): Use it.
4387         (remote_target::commit_resume): Use it.
4388         (struct queue_iter_param) <remote>: New field.
4389         (remote_target::remove_new_fork_children): Fill in 'remote' field.
4390         (check_pending_event_prevents_wildcard_vcont_callback_data): New.
4391         (check_pending_event_prevents_wildcard_vcont_callback)
4392         (remote_target::check_pending_events_prevent_wildcard_vcont)
4393         (remote_target::discard_pending_stop_replies)
4394         (remote_target::discard_pending_stop_replies_in_queue)
4395         (remote_target::remote_notif_remove_queued_reply): Fill in
4396         'remote' field.
4397         (remote_notif_get_pending_events): New.
4398         (remote_target::readchar, remote_target::remote_serial_write):
4399         Save/restore curr_quit_handler_target.
4400         (putpkt): New.
4401         (kill_new_fork_children): Fill in 'remote' field.
4402         (packet_command): Use get_current_remote_target, defer to
4403         remote_target method of same name.
4404         (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
4405         parameter, and save it in m_remote.  All callers adjusted.
4406         (scoped_remote_fd::release): Use m_remote.
4407         (scoped_remote_fd::m_remote): New field.
4408         (remote_file_put, remote_file_get, remote_file_delete): Use
4409         get_current_remote_target, defer to remote_target method of same
4410         name.
4411         (remote_btrace_reset): Add remote_state paremeter.  Update all
4412         callers.
4413         (remote_async_inferior_event_handler). Pass down 'data'.
4414         (remote_new_objfile): Use get_current_remote_target.
4415         (remote_target::vcont_r_supported): New.
4416         (set_range_stepping): Use get_current_remote_target and
4417         remote_target::vcont_r_supported.
4418         (_initialize_remote): Don't allocate 'remote_state' and
4419         'stop_reply_queue' globals.
4420         * remote.h (struct remote_target): Forward declare.
4421         (getpkt, putpkt, remote_notif_get_pending_events): Add
4422         'remote_target' parameter.
4423
4424 2018-05-22  Pedro Alves  <palves@redhat.com>
4425
4426         * remote.c (vcont_builder): Now a class.  Make all data members
4427         private.
4428         (vcont_builder) <vcont_builder, restart, flush, push_action>:
4429         Declare methods.
4430         (vcont_builder_restart): Rename to ...
4431         (vcont_builder::restart): ... this.
4432         (vcont_builder_flush): Rename to ...
4433         (vcont_builder::flush): ... this.
4434         (vcont_builder_push_action): Rename to ...
4435         (vcont_builder::push_action): ... this.
4436         (remote_target::commit_resume): Adjust.
4437
4438 2018-05-22  Pedro Alves  <palves@redhat.com>
4439
4440         * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
4441         (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
4442         (get_fixed_memory_packet_size): New.
4443         (get_memory_packet_size): Use it.
4444         (set_memory_packet_size): Don't override the config size with
4445         DEFAULT_MAX_MEMORY_PACKET_SIZE.
4446         (show_memory_packet_size): Use get_fixed_memory_packet_size.
4447         Don't refer to get_memory_packet_size if not connected to a remote
4448         target.  Show "(default)" if configured size is 0.
4449
4450 2018-05-22  Pedro Alves  <palves@redhat.com>
4451
4452         * remote.c (remote_target::mourn_inferior): Move
4453         discard_pending_stop_replies call here from ...
4454         (_initialize_remote): ... here.
4455
4456 2018-05-22  Pedro Alves  <palves@redhat.com>
4457
4458         * remote.c (compare_section_command): Remove set_general_process
4459         call.
4460
4461 2018-05-22  Pedro Alves  <palves@redhat.com>
4462
4463         * remote.c (struct packet_reg, struct remote_arch_state):
4464         Move higher up in the file.
4465         (remote_state) <m_arch_states>: Store remote_arch_state values
4466         instead of remote_arch_state pointers.
4467         (remote_state::get_remote_arch_state): Adjust.
4468
4469 2018-05-22  Pedro Alves  <palves@redhat.com>
4470
4471         * remote.c: Include <unordered_map>.
4472         (remote_state): Now a class.
4473         (remote_state) <get_remote_arch_state>: Declare method.
4474         <get_remote_arch_state>: New field.
4475         (remote_arch_state) <remote_arch_state>: Declare ctor.
4476         <regs>: Now a unique_ptr.
4477         (remote_gdbarch_data_handle): Delete.
4478         (get_remote_arch_state): Delete.
4479         (remote_state::get_remote_arch_state): New.
4480         (get_remote_state): Adjust to call remote_state's
4481         get_remote_arch_state method.
4482         (init_remote_state): Delete, bits factored out to ...
4483         (remote_arch_state::remote_arch_state): ... this new method.
4484         (get_remote_packet_size, get_memory_packet_size)
4485         (process_g_packet, remote_target::fetch_registers)
4486         (remote_target::prepare_to_store, store_registers_using_G)
4487         (remote_target::store_registers, remote_target::get_trace_status):
4488         Adjust to call remote_state's method.
4489         (_initialize_remote): Remove reference to
4490         remote_gdbarch_data_handle.
4491
4492 2018-05-22  Pedro Alves  <palves@redhat.com>
4493
4494         * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
4495         pread>: New method declarations.
4496         (remote_target::open_1): Adjust.
4497         (readahead_cache_invalidate): Rename to ...
4498         (readahead_cache::invalidate): ... this, and adjust to be a class
4499         method.
4500         (readahead_cache_invalidate_fd): Rename to ...
4501         (readahead_cache::invalidate_fd): ... this, and adjust to be a
4502         class method.
4503         (remote_hostio_pwrite): Adjust.
4504         (remote_hostio_pread_from_cache): Rename to ...
4505         (readahead_cache::pread): ... this, and adjust to be a class
4506         method.
4507         (remote_hostio_close): Adjust.
4508
4509 2018-05-22  Pedro Alves  <palves@redhat.com>
4510
4511         * remote.c (remote_hostio_close_cleanup): Delete.
4512         (class scoped_remote_fd): New.
4513         (remote_file_put, remote_file_get): Use it.
4514
4515 2018-05-22  Pedro Alves  <palves@redhat.com>
4516
4517         (struct vCont_action_support): Use bool and initialize all fields.
4518         (struct readahead_cache): Initialize all fields.
4519         (remote_state): Use bool and initialize all fields.
4520         (remote_state::remote_state, remote_state::~remote_state): New.
4521         (new_remote_state): Delete.
4522         (_initialize_remote): Use new to allocate remote_state.
4523
4524 2018-05-22  Pedro Alves  <palves@redhat.com>
4525             張俊芝  <zjz@zjz.name>
4526
4527         PR gdb/22973
4528         * c-exp.y: Include "c-support.h".
4529         (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
4530         of tolower.  Use c_ident_is_alpha to scan names.
4531         * c-lang.c: Include "c-support.h".
4532         (convert_ucn, convert_octal, convert_hex, convert_escape): Use
4533         ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
4534         * c-support.h: New file, with bits factored out from ...
4535         * cp-name-parser.y: ... this file.
4536         Include "c-support.h".
4537         (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
4538         c-support.h and renamed.
4539         (symbol_end, yylex): Adjust.
4540
4541 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
4542
4543         * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
4544         parameter type to CORE_ADDR.
4545         * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
4546         parameter type in declaration to CORE_ADDR.
4547         * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
4548         target_auxv_search to get AT_HWCAP and use the result to get the
4549         target description.
4550         * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
4551         to CORE_ADDR. Remove the cast of the return value to unsigned
4552         long. Fix error predicate of target_auxv_search.
4553         (ppc_linux_nat_target::read_description): Change the type of the
4554         hwcap variable to CORE_ADDR.
4555
4556 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
4557
4558         * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
4559         if the size of fpscr is larger than 32 bits.
4560
4561 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
4562
4563         * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
4564         (ppc32_linux_vsxregmap): New global.
4565         (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
4566         regcache_supply_regset, and regcache_collect_regset.
4567         * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
4568         * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
4569         (fetch_vsx_register, store_vsx_register): Remove.
4570         (fetch_vsx_registers): Add regno parameter. Get regset using
4571         ppc_linux_vsxregset. Use regset to supply registers.
4572         (store_vsx_registers): Add regno parameter. Get regset using
4573         ppc_linux_vsxregset. Use regset to collect registers.
4574         (fetch_register): Call fetch_vsx_registers instead of
4575         fetch_vsx_register.
4576         (store_register): Call store_vsx_registers instead of
4577         store_vsx_register.
4578         (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
4579         new regno parameter.
4580         (store_ppc_registers): Call store_vsx_registers with -1 for the
4581         new regno parameter.
4582         * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
4583         (ppc_collect_vsxregset): Remove.
4584
4585 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
4586
4587         * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
4588         offset fields.
4589         * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
4590         for vector register offset fields.
4591         (ppc64_fbsd_reg_offsets): Likewise.
4592         * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
4593         to vector register offset fields.
4594         * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
4595         to vector register offset fields.
4596         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
4597         vector register offset fields.
4598         * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
4599         initializers for vector register offset fields.
4600         (rs6000_aix64_reg_offsets): Likewise.
4601         * rs6000-tdep.c (ppc_vrreg_offset): Remove.
4602         (ppc_supply_vrregset): Remove.
4603         (ppc_collect_vrregset): Remove.
4604         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
4605         (ppc_linux_vrregset) : New function.
4606         (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
4607         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
4608         (ppc32_linux_vrregset): Remove.
4609         (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
4610         and use result instead of ppc32_linux_vrregset.
4611         (ppc32_linux_reg_offsets): Remove initializers for vector register
4612         offset fields.
4613         (ppc64_linux_reg_offsets): Likewise.
4614         * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
4615         * ppc-linux-nat.c: Include regset.h.
4616         (gdb_vrregset_t): Adjust comment to account for little-endian
4617         mode.
4618         (supply_vrregset, fill_vrregset): Remove.
4619         (fetch_altivec_register, store_altivec_register): Remove.
4620         (fetch_altivec_registers): Add regno parameter. Get regset using
4621         ppc_linux_vrregset. Use regset to supply registers.
4622         (store_altivec_registers): Add regno parameter. Get regset using
4623         ppc_linux_vrregset. Use regset to collect registers.
4624         (fetch_register): Call fetch_altivec_registers instead of
4625         fetch_altivec_register.
4626         (store_register): Call store_altivec_registers instead of
4627         store_altivec_register.
4628         (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
4629         the new regno parameter.
4630         (store_ppc_registers): Call store_altivec_registers with -1 for
4631         the new regno parameter.
4632
4633 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
4634
4635         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
4636         (PPC_LINUX_SIZEOF_VSXREGSET): Define.
4637         * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
4638         (gdb_vrregset_t): Change array type size to
4639         PPC_LINUX_SIZEOF_VRREGSET.
4640         (gdb_vsxregset_t): Change array type size to
4641         PPC_LINUX_SIZEOF_VSXREGSET.
4642         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
4643         Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
4644         PPC_LINUX_SIZEOF_VSXREGSET.
4645
4646 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
4647
4648         * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
4649         * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
4650         nat/ppc-linux.c.
4651         (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
4652         ppc_linux_target_wordsize with tid.
4653         (ppc_linux_nat_target::read_description): Call ppc_linux_target
4654         wordsize with tid.
4655         * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
4656         (ppc64_64bit_inferior_p): Add static and inline specifiers.
4657         (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
4658         tid parameter. Remove static specifier.
4659         * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
4660         (ppc_linux_target_wordsize): New declaration.
4661
4662 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
4663
4664         * arch/ppc-linux-common.c: New file.
4665         * arch/ppc-linux-common.h: New file.
4666         * arch/ppc-linux-tdesc.h: New file.
4667         * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
4668         * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
4669         (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
4670         arch/ppc-linux-tdesc.h.
4671         * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
4672         arch/ppc-linux-tdesc.h.
4673         (ppc_linux_nat_target::read_description): Remove target
4674         description matching code. Fill a ppc_linux_features struct and
4675         call ppc_linux_match_description with it. Move comment about ISA
4676         2.05 to ppc-linux-common.c.
4677         * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
4678         arch/ppc-linux-tdesc.h.
4679         (ppc_linux_core_read_description): Remove target description
4680         matching code. Fill a ppc_linux_features struct and call
4681         ppc_linux_match_description with it.
4682         * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
4683         (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
4684         (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
4685         (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
4686         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
4687         (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
4688         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
4689         (tdesc_powerpc_e500l): Remove.
4690
4691 2018-05-22  Joel Brobecker  <brobecker@adacore.com>
4692
4693         * ada-lang.c (catch_assert_command): Pass empty string instead
4694         of NULL for excep_string argument.
4695
4696 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
4697
4698         * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
4699         the width of the requested register exceeds the width of the
4700         `ptrace' data type.
4701
4702 2018-05-21  Tom Tromey  <tom@tromey.com>
4703
4704         * printcmd.c (output_command): Remove.
4705         (output_command_const): Rename to output_command.
4706         * valprint.h (output_command): Rename from output_command_const.
4707         * tracepoint.c (trace_dump_actions): Call output_command.
4708
4709 2018-05-21  Tom Tromey  <tom@tromey.com>
4710
4711         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
4712         (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
4713         * ada-lang.h (create_ada_exception_catchpoint): Update.
4714         * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
4715         std::string.
4716         (create_excep_cond_exprs, ~ada_catchpoint)
4717         (should_stop_exception, print_one_exception)
4718         (print_mention_exception, print_recreate_exception): Update.
4719         (ada_get_next_arg): Remove.
4720         (catch_ada_exception_command_split): Use std::string.  Change type
4721         of "excep_string", "cond_string".
4722         (catch_ada_exception_command): Update.
4723         (create_ada_exception_catchpoint): Change type of excep_string.
4724         (ada_exception_sal): Remove excep_string parameter.
4725         (~ada_catchpoint): Remove.
4726
4727 2018-05-21  Tom Tromey  <tom@tromey.com>
4728
4729         * ada-lang.c (ada_collect_symbol_completion_matches): Remove
4730         cleanup.
4731
4732 2018-05-21  Tom Tromey  <tom@tromey.com>
4733
4734         * ada-lang.c (ada_exception_message_1, ada_exception_message):
4735         Return unique_xmalloc_ptr.
4736         (print_it_exception): Update.
4737
4738 2018-05-21  Tom Tromey  <tom@tromey.com>
4739
4740         * tracepoint.c (trace_dump_actions): Use std::string.
4741
4742 2018-05-21  Tom Tromey  <tom@tromey.com>
4743
4744         * symfile.c (reread_symbols): Use std::string for original_name.
4745
4746 2018-05-21  Tom Tromey  <tom@tromey.com>
4747
4748         * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
4749         (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN.  Default
4750         constructor.
4751
4752 2018-05-20  Simon Marchi  <simon.marchi@polymtl.ca>
4753
4754         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
4755         instance to...
4756         (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
4757         * objfiles.c (get_objfile_bfd_data): Allocate
4758         objfile_per_bfd_storage with obstack_new when allocating on
4759         obstack.
4760
4761 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
4762
4763         * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
4764         OBSTACK_ZALLOC.
4765         * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
4766         * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
4767         * mdebugread.c (mdebug_build_psymtabs): Likewise.
4768         (add_pending): Likewise.
4769         (parse_symbol): Likewise.
4770         (parse_partial_symbols): Likewise.
4771         (psymtab_to_symtab_1): Likewise.
4772         (new_psymtab): Likewise.
4773         (elfmdebug_build_psymtabs): Likewise.
4774         * minsyms.c (terminate_minimal_symbol_table): Likewise.
4775         * objfiles.c (get_objfile_bfd_data): Likewise.
4776         (objfile_register_static_link): Likewise.
4777         * psymtab.c (allocate_psymtab): Likewise.
4778         * stabsread.c (read_member_functions): Likewise.
4779         * xcoffread.c (xcoff_end_psymtab): Likewise.
4780
4781 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
4782
4783         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
4784         compiler supports std::is_trivially_constructible.
4785         * common/poison.h: Include obstack.h.
4786         (IsMallocable): Define to is_trivially_constructible if the
4787         compiler supports it, define to true_type otherwise.
4788         (xobnew): New.
4789         (XOBNEW): Redefine.
4790         (xobnewvec): New.
4791         (XOBNEWVEC): Redefine.
4792         * gdb_obstack.h (obstack_zalloc): New.
4793         (OBSTACK_ZALLOC): Redefine.
4794         (obstack_calloc): New.
4795         (OBSTACK_CALLOC): Redefine.
4796         (obstack_new): New.
4797         * gdbarch.sh: Include gdb_obstack in gdbarch.h.
4798         (gdbarch_obstack): New declaration in gdbarch.h, definition in
4799         gdbarch.c.
4800         (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
4801         obstack_calloc/obstack_zalloc.
4802         (gdbarch_obstack_zalloc): Remove.
4803         * target-descriptions.c (tdesc_data_init): Use obstack_new.
4804
4805 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4806
4807         * stack.c (backtrace_command_1): Remove useless variable int i.
4808
4809 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4810
4811         * stack.c (print_frame_info): Fix comment.
4812
4813 2018-05-18  Tom Tromey  <tom@tromey.com>
4814
4815         * dwarf2read.c (struct dwz_file): Add constructor, initializers.
4816         <dwz_bfd>: Now a gdb_bfd_ref_ptr.
4817         (~dwarf2_per_objfile): Update
4818         (dwarf2_get_dwz_file): Use new.
4819         * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
4820         unique_ptr.
4821
4822 2018-05-18  Tom Tromey  <tom@tromey.com>
4823
4824         * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
4825         unique_ptr.
4826         * dwarf2read.c (struct dwp_file): Add constructor and
4827         initializers.
4828         (open_and_init_dwp_file): Return a unique_ptr.
4829         (dwarf2_per_objfile, create_dwp_hash_table)
4830         (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
4831         (lookup_dwo_unit_in_dwp): Update.
4832         (open_and_init_dwp_file, get_dwp_file): Update.
4833
4834 2018-05-18  Tom Tromey  <tom@tromey.com>
4835
4836         * dwarf2read.c (dwarf2_per_objfile): Update.
4837         (struct mapped_index): Add initializers.
4838         (dwarf2_read_index): Use new.
4839         (dw2_symtab_iter_init): Update.
4840         * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
4841         unique_ptr.
4842
4843 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
4844
4845         * dwarf2read.c (mapped_index) <total_size>: Remove.
4846
4847 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
4848
4849         * unittests/format_pieces-selftests.c (test_format_specifier):
4850         Add ARI comments.
4851
4852 2018-05-18  Tom Tromey  <tom@tromey.com>
4853
4854         * c-typeprint.c (maybe_print_hole): New function.
4855         (c_print_type_struct_field_offset): Update.
4856         (c_type_print_base_struct_union): Call maybe_print_hole.
4857
4858 2018-05-17  Keith Seitz  <keiths@redhat.com>
4859
4860         * breakpoint.c (build_bpstat_chain): New function, moved from
4861         bpstat_stop_status.
4862         (bpstat_stop_status): Add optional parameter, `stop_chain'.
4863         If no stop chain is passed, call build_bpstat_chain to build it.
4864         * breakpoint.h (build_bpstat_chain): Declare.
4865         (bpstat_stop_status): Move documentation here from breakpoint.c.
4866         * infrun.c (handle_signal_stop): Before eliding inlined frames,
4867         build the stop chain and pass it to skip_inline_frames.
4868         Pass this stop chain to bpstat_stop_status.
4869         * inline-frame.c: Include breakpoint.h.
4870         (stopped_by_user_bp_inline_frame): New function.
4871         (skip_inline_frames): Add parameter `stop_chain'.
4872         Move documention to inline-frame.h.
4873         If non-NULL, use stopped_by_user_bp_inline_frame to determine
4874         whether the frame should be elided.
4875         * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
4876         Add moved documentation and update for new parameter.
4877
4878 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
4879
4880         PR cli/14975
4881         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4882         unittests/format_pieces-selftests.c.
4883         * common/format.h (format_piece) <operator==>: New.
4884         (format_pieces) <operator[]>: Remove.
4885         * common/format.c (format_pieces::format_pieces): Handle \e.
4886         * unittests/format_pieces-selftests.c: New.
4887
4888 2018-05-17  Tom Tromey  <tom@tromey.com>
4889
4890         PR symtab/23010:
4891         * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
4892         (dw2_instantiate_symtab): Add skip_partial parameter.
4893         (dw2_find_last_source_symtab, dw2_map_expand_apply)
4894         (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
4895         (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
4896         (dw2_expand_symtabs_matching_one)
4897         (dw2_find_pc_sect_compunit_symtab)
4898         (dw2_debug_names_lookup_symbol)
4899         (dw2_debug_names_expand_symtabs_for_function): Update.
4900         (init_cutu_and_read_dies): Add skip_partial parameter.
4901         (process_psymtab_comp_unit, build_type_psymtabs_1)
4902         (process_skeletonless_type_unit, load_partial_comp_unit)
4903         (psymtab_to_symtab_1): Update.
4904         (load_full_comp_unit): Add skip_partial parameter.
4905         (process_imported_unit_die, dwarf2_read_addr_index)
4906         (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
4907         (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
4908         (read_signatured_type): Update.
4909
4910 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
4911
4912         * value.c (release_value): Remove unused variable.
4913         (record_latest_value): Likewise.
4914         (access_value_history): Likewise.
4915         (preserve_values): Likewise.
4916
4917 2018-05-17  Tom Tromey  <tom@tromey.com>
4918
4919         * extension.h (struct ext_lang_type_printers) <py_type_printers>:
4920         Initialize.
4921
4922 2018-05-16  Maciej W. Rozycki  <macro@mips.com>
4923
4924         PR gdb/22286
4925         * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
4926         Also handle registers whose width is not a multiple of
4927         PTRACE_TYPE_RET.
4928         (linux_nat_trad_target::store_register): Likewise.
4929
4930 2018-05-16  Tom Tromey  <tom@tromey.com>
4931
4932         * gdbcore.h (core_bfd): Redefine.
4933         * corelow.c (core_target::close): Update.
4934         (core_target_open): Update.
4935         * progspace.h (struct program_space) <cbfd>: Now a
4936         gdb_bfd_ref_ptr.
4937
4938 2018-05-16  Tom Tromey  <tom@tromey.com>
4939
4940         PR cli/19551:
4941         * symfile-add-flags.h (enum symfile_add_flags)
4942         <SYMFILE_NOT_FILENAME>: New constant.
4943         * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME.  Get
4944         objfile name from BFD.
4945         (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
4946         * minidebug.c (find_separate_debug_file_in_section): Put
4947         ".gnu_debugdata" into BFD's file name.
4948
4949 2018-05-16  Simon Marchi  <simon.marchi@ericsson.com>
4950
4951         * regcache.c (regcache_read_ftype, regcache_write_ftype):
4952         Remove.
4953
4954 2018-05-15  Tamar Christina  <tamar.christina@arm.com>
4955
4956         PR binutils/21446
4957         * aarch64-tdep.c (aarch64_analyze_prologue,
4958         aarch64_software_single_step, aarch64_displaced_step_copy_insn):
4959         Indicate not interested in errors.
4960
4961 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
4962
4963         * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
4964         Supply the MIPS_ZERO_REGNUM register.
4965
4966 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
4967
4968         * mips-tdep.c (mask_address_var): Make variable static.
4969
4970 2018-05-14  Tom Tromey  <tom@tromey.com>
4971
4972         * dwarf2read.c (rust_union_quirks): Clear rust_unions.
4973
4974 2018-05-11  Andrew Burgess  <andrew.burgess@embecosm.com>
4975
4976         * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
4977         FXSAVE_ADDR for the mxcsr register.
4978
4979 2018-05-11  Max Filippov  <jcmvbkbc@gmail.com>
4980
4981         * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
4982
4983 2018-05-11  Pedro Alves  <palves@redhat.com>
4984
4985         * corelow.c (core_target) <core_target>: No longer inline.
4986         Initialize m_core_gdbarch, m_core_vec and build the section table
4987         here.
4988         <~core_target>: New.
4989         <core_gdbarch, get_core_register_section>: New methods.
4990         <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
4991         factored out from ...
4992         <core_data, core_vec, core_gdbarch>: ... these deleted globals.
4993         (core_ops): Delete.
4994         (sniff_core_bfd): Add gdbarch parameter.
4995         (core_close): Delete, merged into ...
4996         (core_target::close): ... here.  Delete self.
4997         (core_close_cleanup): Delete.
4998         (core_target_open): Allocate a core_target on the heap.  Use a
4999         unique_ptr instead of a cleanup.  Bits moved into the core_target
5000         ctor.  Adjust to use core_target methods instead of globals.
5001         (get_core_register_section): Rename to ...
5002         (core_target::get_core_register_section): ... this and adjust.
5003         (struct get_core_registers_cb_data): New.
5004         (get_core_registers_cb): Use it.  Use bool.
5005         (core_target::fetch_registers, core_target::files_info)
5006         (core_target::xfer_partial, core_target::read_description)
5007         (core_target::pid_to, core_target::thread_name): Adjust to
5008         reference class fields instead of globals.
5009         * target.h (struct target_ops_deleter, target_ops_up): New.
5010
5011 2018-05-11  Pedro Alves  <palves@redhat.com>
5012
5013         * corefile.c (core_file_command): Move to corelow.c.
5014         * corelow.c (the_core_target): Delete.
5015         (core_file_command): Moved from corefile.c.  Check exec_bfd
5016         instead of the_core_target.  Use target_detach instead of calling
5017         into the_core_target directly.
5018         (maybe_say_no_core_file_now): New.
5019         (core_target::detach): Use it.
5020         (_initialize_corelow): Remove references to the_core_target.
5021         * gdbcore.h (the_core_target): Delete.
5022
5023 2018-05-11  Tom Tromey  <tromey@redhat.com>
5024             Pedro Alves  <palves@redhat.com>
5025
5026         * corefile.c (core_bfd): Remove.
5027         * gdbcore.h (core_bfd): Now a macro.
5028         * progspace.h (struct program_space) <cbfd>: New field.
5029
5030 2018-05-11  Tom Tromey  <tom@tromey.com>
5031
5032         * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
5033         gdb::def_vector.
5034
5035 2018-05-10  Tom Tromey  <tom@tromey.com>
5036
5037         * configure: Rebuild.
5038         * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
5039
5040 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
5041
5042         PR server/23158:
5043         * regformats/regdat.sh: Adjust script, following the addition
5044         of the new expedite_regs parameter to init_target_desc.
5045
5046 2018-05-10  Omair Javaid  <omair.javaid@linaro.org>
5047     
5048         PR gdb/23127
5049         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
5050         set_gdbarch_significant_addr_bit.
5051         * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
5052         set_gdbarch_significant_addr_bit.
5053         * utils.c (address_significant): Update to sign extend addr.
5054
5055 2018-05-09  Max Filippov  <jcmvbkbc@gmail.com>
5056
5057         * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
5058         (xtensa_linux_init_abi): Limit tdep->num_regs by
5059         tdep->num_nopriv_regs.
5060         * xtensa-tdep.c (xtensa_derive_tdep): Calculate
5061         tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
5062         not initialized.
5063
5064 2018-05-08  Simon Marchi  <simon.marchi@ericsson.com>
5065
5066         * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
5067
5068 2018-05-08  Andrew Burgess  <andrew.burgess@embecosm.com>
5069
5070         * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
5071         (I387_MXCSR_INIT_VAL): New constant.
5072         * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
5073         buffer if it was supplied by the inferior.
5074         * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
5075         (i387_xsave_get_clear_bv): New function.
5076         (i387_supply_xsave): Only read x87 control registers from the
5077         xsave buffer if the feature is enabled, and the state will have
5078         been written, otherwise, provide a suitable default.
5079         (i387_collect_xsave): Pre-clear all registers in xsave buffer,
5080         including x87 control registers.  Update control registers if they
5081         have changed from the default value, and mark features as enabled
5082         as required.
5083         * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
5084
5085 2018-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
5086
5087         * spu-tdep.c (info_spu_event_command): Fix output formatting.
5088
5089 2018-05-07  Tom Tromey  <tom@tromey.com>
5090
5091         * configure: Rebuild.
5092         * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
5093
5094 2018-05-07  Tom Tromey  <tom@tromey.com>
5095
5096         PR tdep/20362:
5097         * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
5098         bit.  Use correct value for VDIV.
5099
5100 2018-05-04  Tom Tromey  <tom@tromey.com>
5101
5102         * configure: Rebuild.
5103         * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
5104
5105 2018-05-04  Tom Tromey  <tom@tromey.com>
5106
5107         * linux-record.c (record_linux_system_call) <case
5108         RECORD_SYS_RECVFROM>: Add "break".
5109
5110 2018-05-04  Tom Tromey  <tom@tromey.com>
5111
5112         * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
5113         Add missing "break".
5114         * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
5115         Add missing "break".
5116
5117 2018-05-04  Tom Tromey  <tom@tromey.com>
5118
5119         * rs6000-tdep.c (ppc_process_record_op4)
5120         (ppc_process_record_op63): Add fall-through comment.
5121
5122 2018-05-04  Tom Tromey  <tom@tromey.com>
5123
5124         * i386-tdep.c (i386_process_record): Add fall-through comment.
5125
5126 2018-05-04  Tom Tromey  <tom@tromey.com>
5127
5128         * stabsread.c (define_symbol) <case 'p'>: Add fall-through
5129         comment.
5130
5131 2018-05-04  Tom Tromey  <tom@tromey.com>
5132
5133         * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
5134         * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
5135         * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
5136         comment.
5137         * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
5138         comment.
5139         * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
5140         comment.
5141
5142 2018-05-04  Tom Tromey  <tom@tromey.com>
5143
5144         * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
5145
5146 2018-05-04  Tom Tromey  <tom@tromey.com>
5147
5148         * s390-tdep.c (s390_process_record): Fix fall-through comments.
5149         * xcoffread.c (scan_xcoff_symtab): Move comment later.
5150         * symfile.c (section_is_mapped): Fix fall-through comment.
5151         * stabsread.c (define_symbol, read_member_functions): Fix
5152         fall-through comment.
5153         * s390-linux-tdep.c (s390_process_record): Fix fall-through
5154         comment.
5155         * remote.c (remote_wait_as): Fix fall-through comment.
5156         * p-exp.y (yylex): Fix fall-through comment.
5157         * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
5158         comment.
5159         * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
5160         * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
5161         * jv-exp.y (yylex): Fix fall-through comment.
5162         * go-exp.y (lex_one_token): Fix fall-through comment.
5163         * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
5164         fall-through comment.
5165         * f-exp.y (yylex): Fix fall-through comment.
5166         * dwarf2read.c (process_die): Fix fall-through comments.
5167         * dbxread.c (process_one_symbol): Fix fall-through comment.
5168         * d-exp.y (lex_one_token): Fix fall-through comment.
5169         * cp-name-parser.y (yylex): Fix fall-through comment.
5170         * coffread.c (coff_symtab_read): Fix fall-through comment.
5171         * c-exp.y (lex_one_token): Fix fall-through comment.
5172         * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
5173         comment.
5174         * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
5175         comment.
5176
5177 2018-05-04  Tom Tromey  <tom@tromey.com>
5178
5179         PR python/22730:
5180         * NEWS: Mention gdb.execute change.
5181         * gdbcmd.h (execute_control_command): Don't declare.
5182         * python/python.c (execute_gdb_command): Use read_command_lines_1,
5183         execute_control_commands, execute_control_commands_to_string.
5184         * cli/cli-script.h (execute_control_commands)
5185         (execute_control_commands_to_string): Declare.
5186         (execute_control_command): Add from_tty parameter.
5187         * cli/cli-script.c (execute_control_commands)
5188         (execute_control_commands_to_string): New functions.
5189         (execute_user_command): Use execute_control_commands.
5190         (execute_control_command_1): Add "from_tty" parameter.  Update.
5191         (execute_control_command): Likewise.
5192
5193 2018-05-04  Tom Tromey  <tom@tromey.com>
5194
5195         PR python/22731:
5196         * NEWS: Mention that breakpoint commands are writable.
5197         * python/py-breakpoint.c (bppy_set_commands): New function.
5198         (breakpoint_object_getset) <"commands">: Use it.
5199
5200 2018-05-04  Tom Tromey  <tom@tromey.com>
5201
5202         * tracepoint.c (actions_command): Update.
5203         * mi/mi-cmd-break.c (mi_command_line_array)
5204         (mi_command_line_array_cnt, mi_command_line_array_ptr)
5205         (mi_read_next_line): Remove.
5206         (mi_cmd_break_commands): Update.
5207         * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
5208         function_view.
5209         * cli/cli-script.c (get_command_line): Update.
5210         (process_next_line): Use function_view.  Constify.
5211         (recurse_read_control_structure, read_command_lines)
5212         (read_command_lines_1): Change argument types to function_view.
5213         (do_define_command, document_command): Update.
5214         * breakpoint.h (check_tracepoint_command): Don't declare.
5215         * breakpoint.c (check_tracepoint_command): Remove.
5216         (commands_command_1, create_tracepoint_from_upload): Update.
5217
5218 2018-05-04  Tom Tromey  <tom@tromey.com>
5219
5220         PR gdb/11750:
5221         * cli/cli-script.h (enum command_control_type) <define_control>:
5222         New constant.
5223         * cli/cli-script.c (multi_line_command_p): Handle define_control.
5224         (build_command_line, execute_control_command_1)
5225         (process_next_line): Likewise.
5226         (do_define_command): New function, extracted from define_command.
5227         (define_command): Use it.
5228
5229 2018-05-04  Tom Tromey  <tom@tromey.com>
5230
5231         * tracepoint.c (actions_command): Update.
5232         * cli/cli-script.h (read_command_lines): Update.
5233         * cli/cli-script.c (read_command_lines): Constify prompt_arg.
5234         (MAX_TMPBUF): Remove define.
5235         (define_command): Use string_printf.
5236         (document_command): Likewise.
5237         * breakpoint.c (commands_command_1): Update.
5238
5239 2018-05-04  Tom Tromey  <tom@tromey.com>
5240
5241         * top.c (execute_command): Update.
5242         * cli/cli-script.h (print_command_lines): Now varargs.
5243         * cli/cli-script.c (print_command_lines): Now varargs.
5244         (execute_control_command_1) <case while_control, case if_control>:
5245         Update.
5246
5247 2018-05-04  Tom Tromey  <tom@tromey.com>
5248
5249         * tracepoint.c (all_tracepoint_actions): Rename from
5250         all_tracepoint_actions_and_cleanup.  Change return type.
5251         (actions_command, encode_actions_1, encode_actions)
5252         (trace_dump_actions, tdump_command): Update.
5253         * remote.c (remote_download_command_source): Update.
5254         * python/python.c (gdbpy_eval_from_control_command)
5255         (python_command, python_interactive_command): Update.
5256         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
5257         * guile/guile.c (guile_command)
5258         (gdbscm_eval_from_control_command, guile_command): Update.
5259         * compile/compile.c (compile_code_command)
5260         (compile_print_command, compile_to_object): Update.
5261         * cli/cli-script.h (struct command_lines_deleter): New.
5262         (counted_command_line): New typedef.
5263         (struct command_line): Add constructor, destructor.
5264         <body_list>: Remove.
5265         <body_list_0, body_list_1>: New members.
5266         (command_line_up): Remove typedef.
5267         (read_command_lines, read_command_lines_1, get_command_line):
5268         Update.
5269         (copy_command_lines): Don't declare.
5270         * cli/cli-script.c (build_command_line): Use "new".
5271         (get_command_line): Return counted_command_line.
5272         (print_command_lines, execute_user_command)
5273         (execute_control_command_1, while_command, if_command): Update.
5274         (realloc_body_list): Remove.
5275         (process_next_line, recurse_read_control_structure): Update.
5276         (read_command_lines, read_command_lines_1): Return counted_command_line.
5277         (free_command_lines): Use "delete".
5278         (copy_command_lines): Remove.
5279         (define_command, document_command, show_user_1): Update.
5280         * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
5281         a counted_command_line.
5282         * breakpoint.h (counted_command_line): Remove typedef.
5283         (breakpoint_set_commands): Update.
5284         * breakpoint.c (check_no_tracepoint_commands)
5285         (validate_commands_for_breakpoint): Update.
5286         (breakpoint_set_commands): Change commands to be a
5287         counted_command_line.
5288         (commands_command_1, update_dprintf_command_list)
5289         (create_tracepoint_from_upload): Update.
5290
5291 2018-05-04  Tom Tromey  <tom@tromey.com>
5292
5293         * cli/cli-decode.h (cmd_list_element): New constructor.
5294         (~cmd_list_element): New destructor.
5295         (struct cmd_list_element): Add initializers.
5296         * cli/cli-decode.c (do_add_cmd): Use "new".
5297         (delete_cmd): Use "delete".
5298
5299 2018-05-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
5300             Pedro Alves <palves@redhat.com>
5301
5302         PR breakpoints/19806 and support for PR external/20207.
5303         * NEWS: Mention Aarch64 watchpoint improvements.
5304         * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
5305         watchpoints and PR external/20207 watchpoints.
5306         * nat/aarch64-linux-hw-point.c
5307         (kernel_supports_any_contiguous_range): New.
5308         (aarch64_watchpoint_offset): New.
5309         (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
5310         (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
5311         (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
5312         (aarch64_align_watchpoint): New parameters aligned_offset_p and
5313         next_addr_orig_p.  Support PR external/20207 watchpoints.
5314         (aarch64_downgrade_regs): New.
5315         (aarch64_dr_state_insert_one_point): New parameters offset and
5316         addr_orig.
5317         (aarch64_dr_state_remove_one_point): Likewise.
5318         (aarch64_handle_breakpoint): Update caller.
5319         (aarch64_handle_aligned_watchpoint): Likewise.
5320         (aarch64_handle_unaligned_watchpoint): Support addr_orig and
5321         aligned_offset.
5322         (aarch64_linux_set_debug_regs): Remove const from state.  Call
5323         aarch64_downgrade_regs.
5324         (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
5325         * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
5326         (DR_CONTROL_MASK): ... this.
5327         (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
5328         (unsigned int aarch64_watchpoint_offset): New prototype.
5329         (aarch64_linux_set_debug_regs): Remove const from state.
5330         * utils.c (align_up, align_down): Move to ...
5331         * common/common-utils.c (align_up, align_down): ... here.
5332         * utils.h (align_up, align_down): Move to ...
5333         * common/common-utils.h (align_up, align_down): ... here.
5334
5335 2018-05-04  Joel Brobecker  <brobecker@adacore.com>
5336
5337         * sparc-tdep.c (sparc_structure_return_p): Re-implement to
5338         match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
5339         (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
5340         Re-implement to match the ABI as summarized in GCC's
5341         gcc/config/sparc/sparc.c.  All callers updated.
5342         (sparc32_store_arguments): Remove assertion.
5343
5344 2018-05-04  Tom Tromey  <tom@tromey.com>
5345
5346         * printcmd.c: Don't include tui.h.
5347         (decode_format): Use skip_spaces.
5348
5349 2018-05-04  Tom Tromey  <tom@tromey.com>
5350
5351         PR gdb/22619:
5352         * printcmd.c (last_count): New global.
5353         (x_command): Use saved count when repeating.
5354
5355 2018-05-04  Tom Tromey  <tom@tromey.com>
5356
5357         * nto-procfs.c (do_closedir_cleanup): Remove.
5358         (procfs_pidlist): Use gdb_dir_up.
5359         * procfs.c (do_closedir_cleanup): Remove.
5360         (proc_update_threads): Use gdb_dir_up.
5361         * common/filestuff.h (struct gdb_dir_deleter): New.
5362         (gdb_dir_up): New typedef.
5363
5364 2018-05-04  Tom Tromey  <tom@tromey.com>
5365
5366         * ada-lang.c (print_mention_exception): Use std::string.
5367
5368 2018-05-04  Tom Tromey  <tom@tromey.com>
5369
5370         * ada-lang.c (create_excep_cond_exprs): Update.
5371         (ada_exception_catchpoint_cond_string): Use std::string.
5372
5373 2018-05-04  Tom Tromey  <tom@tromey.com>
5374
5375         * ada-lang.c (xget_renaming_scope): Return std::string.
5376         (old_renaming_is_invisible): Update.
5377
5378 2018-05-04  Tom Tromey  <tom@tromey.com>
5379
5380         * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
5381         (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
5382
5383 2018-05-04  Ulrich Weigand  <uweigand@de.ibm.com>
5384
5385         * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
5386
5387 2018-05-04  Tom Tromey  <tom@tromey.com>
5388
5389         * remote.c (remote_query_supported_append): Change type.
5390         (remote_check_symbols): Update.
5391
5392 2018-05-04  Paul Pluzhnikov  <ppluzhnikov@google.com>
5393
5394         PR gdb/11420
5395         * configure.ac: Prepend libpython.
5396         * python/python-config.py: Likewise.
5397         * configure: Regenerate.
5398
5399 2018-05-03  Simon Marchi  <simon.marchi@ericsson.com>
5400
5401         * Makefile.in (%.c: %.l): Use -t instead of --stdout.
5402
5403 2018-05-03  Pedro Alves  <palves@redhat.com>
5404
5405         * s390-linux-nat.c
5406         (s390_linux_nat_target::have_continuable_watchpoint): Mark with
5407         override.  Write 'true' instead of '1'.
5408         (s390_linux_nat_target::watchpoint_addr_within_range): Remove
5409         declaration.
5410
5411 2018-05-02  Pedro Alves  <palves@redhat.com>
5412
5413         * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
5414         add_inf_child_target.
5415         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
5416         add_inf_child_target.
5417         * aix-thread.c (aix_thread_target_info): New.
5418         (aix_thread_target) <shortname, longname, doc>: Delete.
5419         <info>: New.
5420         * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
5421         add_inf_child_target.
5422         * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
5423         add_inf_child_target.
5424         * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
5425         add_inf_child_target.
5426         * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
5427         add_inf_child_target.
5428         * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
5429         add_inf_child_target.
5430         * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
5431         add_inf_child_target.
5432         * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
5433         add_inf_child_target.
5434         * arm-linux-nat.c (_initialize_arm_linux_nat): Use
5435         add_inf_child_target.
5436         * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
5437         add_inf_child_target.
5438         * bfd-target.c (target_bfd_target_info): New.
5439         (target_bfd) <shortname, longname, doc>: Delete.
5440         <info>: New.
5441         * bsd-kvm.c (bsd_kvm_target_info): New.
5442         (bsd_kvm_target) <shortname, longname, doc>: Delete.
5443         <info>: New.
5444         (bsd_kvm_target::open): Rename to ...
5445         (bsd_kvm_target_open): ... this.  Adjust.
5446         * bsd-uthread.c (bsd_uthread_target_info): New.
5447         (bsd_uthread_target) <shortname, longname, doc>: Delete.
5448         <info>: New.
5449         * corefile.c (core_file_command): Adjust.
5450         * corelow.c (core_target_info): New.
5451         (core_target) <shortname, longname, doc>: Delete.
5452         <info>: New.
5453         (core_target::open): Rename to ...
5454         (core_target_open): ... this.  Adjust.
5455         * ctf.c (ctf_target_info): New.
5456         (ctf_target) <shortname, longname, doc>: Delete.
5457         <info>: New.
5458         (ctf_target::open): Rename to ...
5459         (ctf_target_open): ... this.
5460         (_initialize_ctf): Adjust.
5461         * exec.c (exec_target_info): New.
5462         (exec_target) <shortname, longname, doc>: Delete.
5463         <info>: New.
5464         (exec_target::open): Rename to ...
5465         (exec_target_open): ... this.
5466         * gdbcore.h (core_target_open): Declare.
5467         * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
5468         * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
5469         add_inf_child_target.
5470         * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
5471         add_inf_child_target.
5472         * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
5473         add_inf_child_target.
5474         * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
5475         add_inf_child_target.
5476         * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
5477         add_inf_child_target.
5478         * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
5479         add_inf_child_target.
5480         * i386-linux-nat.c (_initialize_i386_linux_nat): Use
5481         add_inf_child_target.
5482         * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
5483         add_inf_child_target.
5484         * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
5485         add_inf_child_target.
5486         * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
5487         add_inf_child_target.
5488         * inf-child.c (inf_child_target_info): New.
5489         (inf_child_target::info): New.
5490         (inf_child_open_target): Remove 'target' parameter.  Use
5491         get_native_target instead.
5492         (inf_child_target::open): Delete.
5493         (add_inf_child_target): New.
5494         * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
5495         Delete.
5496         <info>: New.
5497         (add_inf_child_target): Declare.
5498         (inf_child_open_target): Declare.
5499         * linux-thread-db.c (thread_db_target_info): New.
5500         (thread_db_target) <shortname, longname, doc>: Delete.
5501         <info>: New.
5502         * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
5503         add_inf_child_target.
5504         * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
5505         add_inf_child_target.
5506         * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
5507         add_inf_child_target.
5508         * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
5509         add_inf_child_target.
5510         * make-target-delegates (print_class): Adjust.
5511         * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
5512         add_inf_child_target.
5513         * mips-linux-nat.c (_initialize_mips_linux_nat): Use
5514         add_inf_child_target.
5515         * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
5516         add_inf_child_target.
5517         * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
5518         add_inf_child_target.
5519         * nto-procfs.c (nto_native_target_info): New.
5520         (nto_procfs_target_native) <shortname, longname, doc>:
5521         Delete.
5522         <info>: New.
5523         (nto_procfs_target_info): New.
5524         (nto_procfs_target_procfs) <shortname, longname, doc>:
5525         Delete.
5526         <info>: New.
5527         (init_procfs_targets): Adjust.
5528         * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
5529         add_inf_child_target.
5530         * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
5531         add_inf_child_target.
5532         * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
5533         add_inf_child_target.
5534         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
5535         add_inf_child_target.
5536         * ravenscar-thread.c (ravenscar_target_info): New.
5537         (ravenscar_thread_target) <shortname, longname, doc>:
5538         Delete.
5539         <info>: New.
5540         * record-btrace.c (record_btrace_target_info):
5541         (record_btrace_target) <shortname, longname, doc>: Delete.
5542         <info>: New.
5543         (record_btrace_target::open): Rename to ...
5544         (record_btrace_target_open): ... this.  Adjust.
5545         * record-full.c (record_longname, record_doc): New.
5546         (record_full_base_target) <shortname, longname, doc>: Delete.
5547         <info>: New.
5548         (record_full_target_info): New.
5549         (record_full_target): <shortname>: Delete.
5550         <info>: New.
5551         (record_full_core_open_1, record_full_open_1): Update comments.
5552         (record_full_base_target::open): Rename to ...
5553         (record_full_open): ... this.
5554         (cmd_record_full_restore): Update.
5555         (_initialize_record_full): Update.
5556         * remote-sim.c (remote_sim_target_info): New.
5557         (gdbsim_target) <shortname, longname, doc>: Delete.
5558         <info>: New.
5559         (gdbsim_target::open): Rename to ...
5560         (gdbsim_target_open): ... this.
5561         (_initialize_remote_sim): Adjust.
5562         * remote.c (remote_doc): New.
5563         (remote_target_info): New.
5564         (remote_target) <shortname, longname, doc>: Delete.
5565         <info>: New.
5566         (extended_remote_target_info): New.
5567         (extended_remote_target) <shortname, longname, doc>: Delete.
5568         <info>: New.
5569         (remote_target::open_1): Make static.  Adjust.
5570         * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
5571         * s390-linux-nat.c (_initialize_s390_nat): Use
5572         add_inf_child_target.
5573         * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
5574         add_inf_child_target.
5575         * sol-thread.c (thread_db_target_info): New.
5576         (sol_thread_target) <shortname, longname, doc>: Delete.
5577         <info>: New.
5578         * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
5579         add_inf_child_target.
5580         * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
5581         add_inf_child_target.
5582         * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
5583         add_inf_child_target.
5584         * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
5585         add_inf_child_target.
5586         * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
5587         add_inf_child_target.
5588         * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
5589         add_inf_child_target.
5590         * spu-linux-nat.c (_initialize_spu_nat): Use
5591         add_inf_child_target.
5592         * spu-multiarch.c (spu_multiarch_target_info): New.
5593         (spu_multiarch_target) <shortname, longname, doc>: Delete.
5594         <info>: New.
5595         * target-delegates.c: Regenerate.
5596         * target.c: Include <unordered_map>.
5597         (target_ops_p): Delete.
5598         (DEF_VEC_P(target_ops_p)): Delete.
5599         (target_factories): New.
5600         (test_target_info): New.
5601         (test_target_ops::info): New.
5602         (open_target): Adjust to use target_factories.
5603         (add_target_with_completer): Rename to ...
5604         (add_target): ... this.  Change prototype.  Register target_info
5605         and open callback in target_factories.  Register target_info in
5606         command context instead of target_ops.
5607         (add_target): Delete old implementation.
5608         (add_deprecated_target_alias): Change prototype.  Adjust.
5609         (the_native_target): New.
5610         (set_native_target, get_native_target): New.
5611         (find_default_run_target): Use the_native_target.
5612         (find_attach_target, find_run_target): Simplify.
5613         (target_ops::open): Delete.
5614         (dummy_target_info): New.
5615         (dummy_target::shortname, dummy_target::longname)
5616         (dummy_target::doc): Delete.
5617         (dummy_target::info): New.
5618         (debug_target::shortname, debug_target::longname)
5619         (debug_target::doc): Delete.
5620         (debug_target::info): New.
5621         * target.h (struct target_info): New.
5622         (target_ops::~target_ops): Add comment.
5623         (target_ops::info): New.
5624         (target_ops::shortname, target_ops::longname, target_ops::doc): No
5625         longer virtual.  Implement in terms of target_info.
5626         (set_native_target, get_native_target): Declare.
5627         (target_open_ftype): New.
5628         (add_target, add_target_with_completer)
5629         (add_deprecated_target_alias): Change prototype.
5630         (test_target) <shortname, longname, doc>: Delete.
5631         <info>: New.
5632         * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
5633         add_inf_child_target.
5634         * tracefile-tfile.c (tfile_target_info): New.
5635         (tfile_target) <shortname, longname, doc>: Delete.
5636         <info>: New.
5637         (tfile_target::open): Rename to ...
5638         (tfile_target_open): ... this.
5639         (_initialize_tracefile_tfile): Adjust.
5640         * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
5641         add_inf_child_target.
5642         * windows-nat.c (_initialize_windows_nat): Use
5643         add_inf_child_target.
5644         * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
5645         add_inf_child_target.
5646
5647 2018-05-02  Pedro Alves  <palves@redhat.com>
5648
5649         * linux-nat.h (linux_nat_target) <low_new_thread,
5650         low_delete_thread, low_new_fork, low_forget_process,
5651         low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
5652         New virtual methods.
5653         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
5654         (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
5655         (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
5656         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
5657         (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
5658         Delete.
5659         * linux-fork.c (delete_fork): Adjust to call low method.
5660         * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
5661         (linux_nat_new_fork, linux_nat_forget_process_hook)
5662         (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
5663         (linux_nat_status_is_event):
5664         (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
5665         (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
5666         to call low method.
5667         (sigtrap_is_event): Rename to ...
5668         (linux_nat_target::low_status_is_event): ... this.
5669         (linux_nat_set_status_is_event): Delete.
5670         (save_stop_reason, linux_nat_wait_1)
5671         (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
5672         low methods.
5673         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
5674         (linux_nat_set_new_fork, linux_nat_set_forget_process)
5675         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
5676         (linux_nat_set_prepare_to_resume): Delete.
5677         * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
5678         low virtual methods.
5679         * amd64-linux-nat.c: Likewise.
5680         * arm-linux-nat.c: Likewise.
5681         * i386-linux-nat.c: Likewise.
5682         * ia64-linux-nat.c: Likewise.
5683         * mips-linux-nat.c: Likewise.
5684         * ppc-linux-nat.c: Likewise.
5685         * s390-linux-nat.c: Likewise.
5686         * sparc64-linux-nat.c: Likewise.
5687         * x86-linux-nat.c: Likewise.
5688         * x86-linux-nat.h: Include "nat/x86-linux.h".
5689         (x86_linux_nat_target) <low_new_fork, low_forget_process,
5690         low_prepare_to_resume, low_new_thread, low_delete_thread>:
5691         Override methods.
5692
5693 2018-05-02  Pedro Alves  <palves@redhat.com>
5694
5695         * target.h (target_ops)
5696         <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
5697         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
5698         stopped_by_watchpoint, have_continuable_watchpoint,
5699         stopped_data_address, watchpoint_addr_within_range,
5700         can_accel_watchpoint_condition, can_run, thread_alive,
5701         has_all_memory, has_memory, has_stack, has_registers,
5702         has_execution, can_async_p, is_async_p, supports_non_stop,
5703         always_non_stop_p, can_execute_reverse, supports_multi_process,
5704         supports_enable_disable_tracepoint,
5705         supports_disable_randomization, supports_string_tracing,
5706         supports_evaluation_of_breakpoint_conditions,
5707         can_run_breakpoint_commands, filesystem_is_local,
5708         can_download_tracepoint, get_trace_state_variable_value,
5709         set_trace_notes, get_tib_address, use_agent, can_use_agent,
5710         record_is_replaying, record_will_replay,
5711         augmented_libraries_svr4_read>: Adjust to return bool.
5712         * aarch64-linux-nat.c: All implementations adjusted.
5713         * aix-thread.c: All implementations adjusted.
5714         * arm-linux-nat.c: All implementations adjusted.
5715         * breakpoint.c: All implementations adjusted.
5716         * bsd-kvm.c: All implementations adjusted.
5717         * bsd-uthread.c: All implementations adjusted.
5718         * corelow.c: All implementations adjusted.
5719         * ctf.c: All implementations adjusted.
5720         * darwin-nat.c: All implementations adjusted.
5721         * darwin-nat.h: All implementations adjusted.
5722         * exec.c: All implementations adjusted.
5723         * fbsd-nat.c: All implementations adjusted.
5724         * fbsd-nat.h: All implementations adjusted.
5725         * gnu-nat.c: All implementations adjusted.
5726         * gnu-nat.h: All implementations adjusted.
5727         * go32-nat.c: All implementations adjusted.
5728         * ia64-linux-nat.c: All implementations adjusted.
5729         * inf-child.c: All implementations adjusted.
5730         * inf-child.h: All implementations adjusted.
5731         * inf-ptrace.c: All implementations adjusted.
5732         * inf-ptrace.h: All implementations adjusted.
5733         * linux-nat.c: All implementations adjusted.
5734         * linux-nat.h: All implementations adjusted.
5735         * mips-linux-nat.c: All implementations adjusted.
5736         * nto-procfs.c: All implementations adjusted.
5737         * ppc-linux-nat.c: All implementations adjusted.
5738         * procfs.c: All implementations adjusted.
5739         * ravenscar-thread.c: All implementations adjusted.
5740         * record-btrace.c: All implementations adjusted.
5741         * record-full.c: All implementations adjusted.
5742         * remote-sim.c: All implementations adjusted.
5743         * remote.c: All implementations adjusted.
5744         * s390-linux-nat.c: All implementations adjusted.
5745         * sol-thread.c: All implementations adjusted.
5746         * spu-multiarch.c: All implementations adjusted.
5747         * target-delegates.c: All implementations adjusted.
5748         * target.c: All implementations adjusted.
5749         * target.h: All implementations adjusted.
5750         * tracefile-tfile.c: All implementations adjusted.
5751         * tracefile.c: All implementations adjusted.
5752         * tracefile.h: All implementations adjusted.
5753         * windows-nat.c: All implementations adjusted.
5754         * x86-linux-nat.h: All implementations adjusted.
5755         * x86-nat.h: All implementations adjusted.
5756
5757 2018-05-02  Pedro Alves  <palves@redhat.com>
5758
5759         * make-target-delegates (scan_target_h): Don't trim lines here.
5760         Replace sequences of tabs and/or whitespace with a single
5761         whitespace.
5762         (top level, parsing methods): Trim each line before processing it
5763         here.
5764
5765 2018-05-02  Pedro Alves  <palves@redhat.com>
5766             John Baldwin  <jhb@freebsd.org>
5767
5768         * target.h (enum strata) <debug_stratum>: New.
5769         (struct target_ops) <all delegation methods>: Replace by C++
5770         virtual methods, and drop "to_" prefix.  All references updated
5771         throughout.
5772         <to_shortname, to_longname, to_doc, to_data,
5773         to_have_steppable_watchpoint, to_have_continuable_watchpoint,
5774         to_has_thread_control, to_attach_no_wait>: Delete, replaced by
5775         virtual methods.  All references updated throughout.
5776         <can_attach, supports_terminal_ours, can_create_inferior,
5777         get_thread_control_capabilities, attach_no_wait>: New
5778         virtual methods.
5779         <insert_breakpoint, remove_breakpoint>: Now
5780         TARGET_DEFAULT_NORETURN methods.
5781         <info_proc>: Now returns bool.
5782         <to_magic>: Delete.
5783         (OPS_MAGIC): Delete.
5784         (current_target): Delete.  All references replaced by references
5785         to ...
5786         (target_stack): ... this.  New.
5787         (target_shortname, target_longname): Adjust.
5788         (target_can_run): Now a function declaration.
5789         (default_child_has_all_memory, default_child_has_memory)
5790         (default_child_has_stack, default_child_has_registers)
5791         (default_child_has_execution): Remove target_ops parameter.
5792         (complete_target_initialization): Delete.
5793         (memory_breakpoint_target): New template class.
5794         (test_target_ops): Refactor as a C++ class with virtual methods.
5795         * make-target-delegates (NAME_PART): Tighten.
5796         (POINTER_PART, CP_SYMBOL): New.
5797         (SIMPLE_RETURN_PART): Reimplement.
5798         (VEC_RETURN_PART): Expect less.
5799         (RETURN_PART, VIRTUAL_PART): New.
5800         (METHOD): Adjust to C++ virtual methods.
5801         (scan_target_h): Remove reference to C99.
5802         (dname): Output "target_ops::" prefix.
5803         (write_function_header): Adjust to output a C++ class method.
5804         (write_declaration): New.
5805         (write_delegator): Adjust to output a C++ class method.
5806         (tdname): Output "dummy_target::" prefix.
5807         (write_tdefault, write_debugmethod): Adjust to output a C++ class
5808         method.
5809         (tdefault_names, debug_names): Delete.
5810         (return_types, tdefaults, styles, argtypes_array): New.
5811         (top level): All methods are delegators.
5812         (print_class): New.
5813         (top level): Print dummy_target and debug_target classes.
5814         * target-delegates.c: Regenerate.
5815         * target-debug.h (target_debug_print_enum_info_proc_what)
5816         (target_debug_print_thread_control_capabilities)
5817         (target_debug_print_thread_info_p): New.
5818         * target.c (dummy_target): Delete.
5819         (the_dummy_target, the_debug_target): New.
5820         (target_stack): Now extern.
5821         (set_targetdebug): Push/unpush debug target.
5822         (default_child_has_all_memory, default_child_has_memory)
5823         (default_child_has_stack, default_child_has_registers)
5824         (default_child_has_execution): Remove target_ops parameter.
5825         (complete_target_initialization): Delete.
5826         (add_target_with_completer): No longer call
5827         complete_target_initialization.
5828         (target_supports_terminal_ours): Use regular delegation.
5829         (update_current_target): Delete.
5830         (push_target): No longer check magic number.  Don't call
5831         update_current_target.
5832         (unpush_target): Don't call update_current_target.
5833         (target_is_pushed): No longer check magic number.
5834         (target_require_runnable): Skip for all stratums over
5835         process_stratum.
5836         (target_ops::info_proc): New.
5837         (target_info_proc): Use find_target_at and
5838         find_default_run_target.
5839         (target_supports_disable_randomization): Use regular delegation.
5840         (target_get_osdata): Use find_target_at.
5841         (target_ops::open, target_ops::close, target_ops::can_attach)
5842         (target_ops::attach, target_ops::can_create_inferior)
5843         (target_ops::create_inferior, target_ops::can_run)
5844         (target_can_run): New.
5845         (default_fileio_target): Use regular delegation.
5846         (target_ops::fileio_open, target_ops::fileio_pwrite)
5847         (target_ops::fileio_pread, target_ops::fileio_fstat)
5848         (target_ops::fileio_close, target_ops::fileio_unlink)
5849         (target_ops::fileio_readlink): New.
5850         (target_fileio_open_1, target_fileio_unlink)
5851         (target_fileio_readlink): Always call the target method.  Handle
5852         FILEIO_ENOSYS.
5853         (return_zero, return_zero_has_execution): Delete.
5854         (init_dummy_target): Delete.
5855         (dummy_target::dummy_target, dummy_target::shortname)
5856         (dummy_target::longname, dummy_target::doc)
5857         (debug_target::debug_target, debug_target::shortname)
5858         (debug_target::longname, debug_target::doc): New.
5859         (target_supports_delete_record): Use regular delegation.
5860         (setup_target_debug): Delete.
5861         (maintenance_print_target_stack): Skip debug_stratum.
5862         (initialize_targets): Instantiate the_dummy_target and
5863         the_debug_target.
5864         * auxv.c (target_auxv_parse): Remove 'ops' parameter.  Adjust to
5865         use target_stack.
5866         (target_auxv_search, fprint_target_auxv): Adjust.
5867         (info_auxv_command): Adjust to use target_stack.
5868         * auxv.h (target_auxv_parse): Remove 'ops' parameter.
5869         * exceptions.c (print_flush): Handle a NULL target_stack.
5870         * regcache.c (target_ops_no_register): Refactor as class with
5871         virtual methods.
5872
5873         * exec.c (exec_target): New class.
5874         (exec_ops): Now an exec_target.
5875         (exec_open, exec_close_1, exec_get_section_table)
5876         (exec_xfer_partial, exec_files_info, exec_has_memory)
5877         (exec_make_note_section): Refactor as exec_target methods.
5878         (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
5879         Delete.
5880         (exec_target::find_memory_regions): New.
5881         (_initialize_exec): Don't call init_exec_ops.
5882         * gdbcore.h (exec_file_clear): Delete.
5883
5884         * corefile.c (core_target): Delete.
5885         (core_file_command): Adjust.
5886         * corelow.c (core_target): New class.
5887         (the_core_target): New.
5888         (core_close): Remove target_ops parameter.
5889         (core_close_cleanup): Adjust.
5890         (core_target::close): New.
5891         (core_open, core_detach, get_core_registers, core_files_info)
5892         (core_xfer_partial, core_thread_alive, core_read_description)
5893         (core_pid_to_str, core_thread_name, core_has_memory)
5894         (core_has_stack, core_has_registers, core_info_proc): Rework as
5895         core_target methods.
5896         (ignore, core_remove_breakpoint, init_core_ops): Delete.
5897         (_initialize_corelow): Initialize the_core_target.
5898         * gdbcore.h (core_target): Delete.
5899         (the_core_target): New.
5900
5901         * ctf.c: (ctf_target): New class.
5902         (ctf_ops): Now a ctf_target.
5903         (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
5904         (ctf_xfer_partial, ctf_get_trace_state_variable_value)
5905         (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
5906         methods.
5907         (init_ctf_ops): Delete.
5908         (_initialize_ctf): Don't call it.
5909         * tracefile-tfile.c (tfile_target): New class.
5910         (tfile_ops): Now a tfile_target.
5911         (tfile_open, tfile_close, tfile_files_info)
5912         (tfile_get_tracepoint_status, tfile_trace_find)
5913         (tfile_fetch_registers, tfile_xfer_partial)
5914         (tfile_get_trace_state_variable_value, tfile_traceframe_info):
5915         Refactor as tfile_target methods.
5916         (tfile_xfer_partial_features): Remove target_ops parameter.
5917         (init_tfile_ops): Delete.
5918         (_initialize_tracefile_tfile): Don't call it.
5919         * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
5920         (tracefile_has_stack, tracefile_has_registers)
5921         (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
5922         tracefile_target methods.
5923         (init_tracefile_ops): Delete.
5924         (tracefile_target::tracefile_target): New.
5925         * tracefile.h: Include "target.h".
5926         (tracefile_target): New class.
5927         (init_tracefile_ops): Delete.
5928
5929         * spu-multiarch.c (spu_multiarch_target): New class.
5930         (spu_ops): Now a spu_multiarch_target.
5931         (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
5932         (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
5933         (spu_search_memory, spu_mourn_inferior): Refactor as
5934         spu_multiarch_target methods.
5935         (init_spu_ops): Delete.
5936         (_initialize_spu_multiarch): Remove references to init_spu_ops,
5937         complete_target_initialization.
5938
5939         * ravenscar-thread.c (ravenscar_thread_target): New class.
5940         (ravenscar_ops): Now a ravenscar_thread_target.
5941         (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
5942         (ravenscar_thread_alive, ravenscar_pid_to_str)
5943         (ravenscar_fetch_registers, ravenscar_store_registers)
5944         (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
5945         (ravenscar_stopped_by_hw_breakpoint)
5946         (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
5947         (ravenscar_mourn_inferior, ravenscar_core_of_thread)
5948         (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
5949         methods.
5950         (init_ravenscar_thread_ops): Delete.
5951         (_initialize_ravenscar): Remove references to
5952         init_ravenscar_thread_ops and complete_target_initialization.
5953
5954         * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
5955         (bsd_uthread_target): New class.
5956         (bsd_uthread_ops): Now a bsd_uthread_target.
5957         (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
5958         (bsd_uthread_close, bsd_uthread_mourn_inferior)
5959         (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
5960         (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
5961         (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
5962         (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
5963         (bsd_uthread_target): Delete function.
5964         (_initialize_bsd_uthread): Remove reference to
5965         complete_target_initialization.
5966
5967         * bfd-target.c (target_bfd_data): Delete.  Fields folded into ...
5968         (target_bfd): ... this new class.
5969         (target_bfd_xfer_partial, target_bfd_get_section_table)
5970         (target_bfd_close): Refactor as target_bfd methods.
5971         (target_bfd::~target_bfd): New.
5972         (target_bfd_reopen): Adjust.
5973         (target_bfd::close): New.
5974
5975         * record-btrace.c (record_btrace_target): New class.
5976         (record_btrace_ops): Now a record_btrace_target.
5977         (record_btrace_open, record_btrace_stop_recording)
5978         (record_btrace_disconnect, record_btrace_close)
5979         (record_btrace_async, record_btrace_info)
5980         (record_btrace_insn_history, record_btrace_insn_history_range)
5981         (record_btrace_insn_history_from, record_btrace_call_history)
5982         (record_btrace_call_history_range)
5983         (record_btrace_call_history_from, record_btrace_record_method)
5984         (record_btrace_is_replaying, record_btrace_will_replay)
5985         (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
5986         (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
5987         (record_btrace_store_registers, record_btrace_prepare_to_store)
5988         (record_btrace_to_get_unwinder)
5989         (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
5990         (record_btrace_commit_resume, record_btrace_wait)
5991         (record_btrace_stop, record_btrace_can_execute_reverse)
5992         (record_btrace_stopped_by_sw_breakpoint)
5993         (record_btrace_supports_stopped_by_sw_breakpoint)
5994         (record_btrace_stopped_by_hw_breakpoint)
5995         (record_btrace_supports_stopped_by_hw_breakpoint)
5996         (record_btrace_update_thread_list, record_btrace_thread_alive)
5997         (record_btrace_goto_begin, record_btrace_goto_end)
5998         (record_btrace_goto, record_btrace_stop_replaying_all)
5999         (record_btrace_execution_direction)
6000         (record_btrace_prepare_to_generate_core)
6001         (record_btrace_done_generating_core): Refactor as
6002         record_btrace_target methods.
6003         (init_record_btrace_ops): Delete.
6004         (_initialize_record_btrace): Remove reference to
6005         init_record_btrace_ops.
6006         * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
6007         the execution_direction global.
6008         (record_full_base_target, record_full_target)
6009         (record_full_core_target): New classes.
6010         (record_full_ops): Now a record_full_target.
6011         (record_full_core_ops): Now a record_full_core_target.
6012         (record_full_target::detach, record_full_target::disconnect)
6013         (record_full_core_target::disconnect)
6014         (record_full_target::mourn_inferior, record_full_target::kill):
6015         New.
6016         (record_full_open, record_full_close, record_full_async): Refactor
6017         as methods of the record_full_base_target class.
6018         (record_full_resume, record_full_commit_resume): Refactor
6019         as methods of the record_full_target class.
6020         (record_full_wait, record_full_stopped_by_watchpoint)
6021         (record_full_stopped_data_address)
6022         (record_full_stopped_by_sw_breakpoint)
6023         (record_full_supports_stopped_by_sw_breakpoint)
6024         (record_full_stopped_by_hw_breakpoint)
6025         (record_full_supports_stopped_by_hw_breakpoint): Refactor as
6026         methods of the record_full_base_target class.
6027         (record_full_store_registers, record_full_xfer_partial)
6028         (record_full_insert_breakpoint, record_full_remove_breakpoint):
6029         Refactor as methods of the record_full_target class.
6030         (record_full_can_execute_reverse, record_full_get_bookmark)
6031         (record_full_goto_bookmark, record_full_execution_direction)
6032         (record_full_record_method, record_full_info, record_full_delete)
6033         (record_full_is_replaying, record_full_will_replay)
6034         (record_full_goto_begin, record_full_goto_end, record_full_goto)
6035         (record_full_stop_replaying): Refactor as methods of the
6036         record_full_base_target class.
6037         (record_full_core_resume, record_full_core_kill)
6038         (record_full_core_fetch_registers)
6039         (record_full_core_prepare_to_store)
6040         (record_full_core_store_registers, record_full_core_xfer_partial)
6041         (record_full_core_insert_breakpoint)
6042         (record_full_core_remove_breakpoint)
6043         (record_full_core_has_execution): Refactor
6044         as methods of the record_full_core_target class.
6045         (record_full_base_target::supports_delete_record): New.
6046         (init_record_full_ops): Delete.
6047         (init_record_full_core_ops): Delete.
6048         (record_full_save): Refactor as method of the
6049         record_full_base_target class.
6050         (_initialize_record_full): Remove references to
6051         init_record_full_ops and init_record_full_core_ops.
6052
6053         * remote.c (remote_target, extended_remote_target): New classes.
6054         (remote_ops): Now a remote_target.
6055         (extended_remote_ops): Now an extended_remote_target.
6056         (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
6057         (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
6058         (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
6059         (remote_pass_signals, remote_set_syscall_catchpoint)
6060         (remote_program_signals, )
6061         (remote_thread_always_alive): Remove target_ops parameter.
6062         (remote_thread_alive, remote_thread_name)
6063         (remote_update_thread_list, remote_threads_extra_info)
6064         (remote_static_tracepoint_marker_at)
6065         (remote_static_tracepoint_markers_by_strid)
6066         (remote_get_ada_task_ptid, remote_close, remote_start_remote)
6067         (remote_open): Refactor as methods of remote_target.
6068         (extended_remote_open, extended_remote_detach)
6069         (extended_remote_attach, extended_remote_post_attach):
6070         (extended_remote_supports_disable_randomization)
6071         (extended_remote_create_inferior): : Refactor as method of
6072         extended_remote_target.
6073         (remote_set_permissions, remote_open_1, remote_detach)
6074         (remote_follow_fork, remote_follow_exec, remote_disconnect)
6075         (remote_resume, remote_commit_resume, remote_stop)
6076         (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
6077         (remote_terminal_ours, remote_wait, remote_fetch_registers)
6078         (remote_prepare_to_store, remote_store_registers)
6079         (remote_flash_erase, remote_flash_done, remote_files_info)
6080         (remote_kill, remote_mourn, remote_insert_breakpoint)
6081         (remote_remove_breakpoint, remote_insert_watchpoint)
6082         (remote_watchpoint_addr_within_range)
6083         (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
6084         (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
6085         (remote_supports_stopped_by_sw_breakpoint)
6086         (remote_stopped_by_hw_breakpoint)
6087         (remote_supports_stopped_by_hw_breakpoint)
6088         (remote_stopped_by_watchpoint, remote_stopped_data_address)
6089         (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
6090         (remote_verify_memory): Refactor as methods of remote_target.
6091         (remote_write_qxfer, remote_read_qxfer): Remove target_ops
6092         parameter.
6093         (remote_xfer_partial, remote_get_memory_xfer_limit)
6094         (remote_search_memory, remote_rcmd, remote_memory_map)
6095         (remote_pid_to_str, remote_get_thread_local_address)
6096         (remote_get_tib_address, remote_read_description): Refactor as
6097         methods of remote_target.
6098         (remote_target::fileio_open, remote_target::fileio_pwrite)
6099         (remote_target::fileio_pread, remote_target::fileio_close): New.
6100         (remote_hostio_readlink, remote_hostio_fstat)
6101         (remote_filesystem_is_local, remote_can_execute_reverse)
6102         (remote_supports_non_stop, remote_supports_disable_randomization)
6103         (remote_supports_multi_process, remote_supports_cond_breakpoints)
6104         (remote_supports_enable_disable_tracepoint)
6105         (remote_supports_string_tracing)
6106         (remote_can_run_breakpoint_commands, remote_trace_init)
6107         (remote_download_tracepoint, remote_can_download_tracepoint)
6108         (remote_download_trace_state_variable, remote_enable_tracepoint)
6109         (remote_disable_tracepoint, remote_trace_set_readonly_regions)
6110         (remote_trace_start, remote_get_trace_status)
6111         (remote_get_tracepoint_status, remote_trace_stop)
6112         (remote_trace_find, remote_get_trace_state_variable_value)
6113         (remote_save_trace_data, remote_get_raw_trace_data)
6114         (remote_set_disconnected_tracing, remote_core_of_thread)
6115         (remote_set_circular_trace_buffer, remote_traceframe_info)
6116         (remote_get_min_fast_tracepoint_insn_len)
6117         (remote_set_trace_buffer_size, remote_set_trace_notes)
6118         (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
6119         (remote_disable_btrace, remote_teardown_btrace)
6120         (remote_read_btrace, remote_btrace_conf)
6121         (remote_augmented_libraries_svr4_read, remote_load)
6122         (remote_pid_to_exec_file, remote_can_do_single_step)
6123         (remote_execution_direction, remote_thread_handle_to_thread_info):
6124         Refactor as methods of remote_target.
6125         (init_remote_ops, init_extended_remote_ops): Delete.
6126         (remote_can_async_p, remote_is_async_p, remote_async)
6127         (remote_thread_events, remote_upload_tracepoints)
6128         (remote_upload_trace_state_variables): Refactor as methods of
6129         remote_target.
6130         (_initialize_remote): Remove references to init_remote_ops and
6131         init_extended_remote_ops.
6132
6133         * remote-sim.c (gdbsim_target): New class.
6134         (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
6135         (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
6136         (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
6137         (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
6138         (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
6139         (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
6140         Refactor as methods of gdbsim_target.
6141         (gdbsim_ops): Now a gdbsim_target.
6142         (init_gdbsim_ops): Delete.
6143         (gdbsim_cntrl_c): Adjust.
6144         (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
6145
6146         * amd64-linux-nat.c (amd64_linux_nat_target): New class.
6147         (the_amd64_linux_nat_target): New.
6148         (amd64_linux_fetch_inferior_registers)
6149         (amd64_linux_store_inferior_registers): Refactor as methods of
6150         amd64_linux_nat_target.
6151         (_initialize_amd64_linux_nat): Adjust.  Set linux_target.
6152         * i386-linux-nat.c: Don't include "linux-nat.h".
6153         (i386_linux_nat_target): New class.
6154         (the_i386_linux_nat_target): New.
6155         (i386_linux_fetch_inferior_registers)
6156         (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
6157         as methods of i386_linux_nat_target.
6158         (_initialize_i386_linux_nat): Adjust.  Set linux_target.
6159         * inf-child.c (inf_child_ops): Delete.
6160         (inf_child_fetch_inferior_registers)
6161         (inf_child_store_inferior_registers): Delete.
6162         (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
6163         methods of inf_child_target.
6164         (inf_child_target::supports_terminal_ours)
6165         (inf_child_target::terminal_init)
6166         (inf_child_target::terminal_inferior)
6167         (inf_child_target::terminal_ours_for_output)
6168         (inf_child_target::terminal_ours, inf_child_target::interrupt)
6169         (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
6170         New.
6171         (inf_child_open, inf_child_disconnect, inf_child_close)
6172         (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
6173         (inf_child_post_startup_inferior, inf_child_can_run)
6174         (inf_child_pid_to_exec_file): Refactor as methods of
6175         inf_child_target.
6176         (inf_child_follow_fork): Delete.
6177         (inf_child_target::can_create_inferior)
6178         (inf_child_target::can_attach): New.
6179         (inf_child_target::has_all_memory, inf_child_target::has_memory)
6180         (inf_child_target::has_stack, inf_child_target::has_registers)
6181         (inf_child_target::has_execution): New.
6182         (inf_child_fileio_open, inf_child_fileio_pwrite)
6183         (inf_child_fileio_pread, inf_child_fileio_fstat)
6184         (inf_child_fileio_close, inf_child_fileio_unlink)
6185         (inf_child_fileio_readlink, inf_child_use_agent)
6186         (inf_child_can_use_agent): Refactor as methods of
6187         inf_child_target.
6188         (return_zero, inf_child_target): Delete.
6189         (inf_child_target::inf_child_target): New.
6190         * inf-child.h: Include "target.h".
6191         (inf_child_target): Delete function prototype.
6192         (inf_child_target): New class.
6193         (inf_child_open_target, inf_child_mourn_inferior)
6194         (inf_child_maybe_unpush_target): Delete.
6195         * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
6196         (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
6197         (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
6198         (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
6199         (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
6200         (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
6201         (inf_ptrace_wait, inf_ptrace_xfer_partial)
6202         (inf_ptrace_thread_alive, inf_ptrace_files_info)
6203         (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
6204         methods of inf_ptrace_target.
6205         (inf_ptrace_target): Delete function.
6206         * inf-ptrace.h: Include "inf-child.h".
6207         (inf_ptrace_target): Delete function declaration.
6208         (inf_ptrace_target): New class.
6209         (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
6210         * linux-nat.c (linux_target): New.
6211         (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
6212         (linux_nat_target::~linux_nat_target): New.
6213         (linux_child_post_attach, linux_child_post_startup_inferior)
6214         (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
6215         (linux_child_remove_fork_catchpoint)
6216         (linux_child_insert_vfork_catchpoint)
6217         (linux_child_remove_vfork_catchpoint)
6218         (linux_child_insert_exec_catchpoint)
6219         (linux_child_remove_exec_catchpoint)
6220         (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
6221         (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
6222         (linux_nat_resume, linux_nat_stopped_by_watchpoint)
6223         (linux_nat_stopped_data_address)
6224         (linux_nat_stopped_by_sw_breakpoint)
6225         (linux_nat_supports_stopped_by_sw_breakpoint)
6226         (linux_nat_stopped_by_hw_breakpoint)
6227         (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
6228         (linux_nat_kill, linux_nat_mourn_inferior)
6229         (linux_nat_xfer_partial, linux_nat_thread_alive)
6230         (linux_nat_update_thread_list, linux_nat_pid_to_str)
6231         (linux_nat_thread_name, linux_child_pid_to_exec_file)
6232         (linux_child_static_tracepoint_markers_by_strid)
6233         (linux_nat_is_async_p, linux_nat_can_async_p)
6234         (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
6235         (linux_nat_supports_multi_process)
6236         (linux_nat_supports_disable_randomization, linux_nat_async)
6237         (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
6238         (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
6239         (linux_nat_fileio_open, linux_nat_fileio_readlink)
6240         (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
6241         methods of linux_nat_target.
6242         (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
6243         (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
6244         parameter.
6245         (check_stopped_by_watchpoint): Adjust.
6246         (linux_xfer_partial): Delete.
6247         (linux_target_install_ops, linux_target, linux_nat_add_target):
6248         Delete.
6249         (linux_nat_target::linux_nat_target): New.
6250         * linux-nat.h: Include "inf-ptrace.h".
6251         (linux_nat_target): New.
6252         (linux_target, linux_target_install_ops, linux_nat_add_target):
6253         Delete function declarations.
6254         (linux_target): Declare global.
6255         * linux-thread-db.c (thread_db_target): New.
6256         (thread_db_target::thread_db_target): New.
6257         (thread_db_ops): Delete.
6258         (the_thread_db_target): New.
6259         (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
6260         (thread_db_update_thread_list, thread_db_pid_to_str)
6261         (thread_db_extra_thread_info)
6262         (thread_db_thread_handle_to_thread_info)
6263         (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
6264         (thread_db_resume): Refactor as methods of thread_db_target.
6265         (init_thread_db_ops): Delete.
6266         (_initialize_thread_db): Remove reference to init_thread_db_ops.
6267         * x86-linux-nat.c: Don't include "linux-nat.h".
6268         (super_post_startup_inferior): Delete.
6269         (x86_linux_nat_target::~x86_linux_nat_target): New.
6270         (x86_linux_child_post_startup_inferior)
6271         (x86_linux_read_description, x86_linux_enable_btrace)
6272         (x86_linux_disable_btrace, x86_linux_teardown_btrace)
6273         (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
6274         methods of x86_linux_nat_target.
6275         (x86_linux_create_target): Delete.  Bits folded ...
6276         (x86_linux_add_target): ... here.  Now takes a linux_nat_target
6277         pointer.
6278         * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
6279         (x86_linux_nat_target): New class.
6280         (x86_linux_create_target): Delete.
6281         (x86_linux_add_target): Now takes a linux_nat_target pointer.
6282         * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
6283         (x86_region_ok_for_watchpoint, x86_stopped_data_address)
6284         (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
6285         (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
6286         (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
6287         make extern.
6288         (x86_use_watchpoints): Delete.
6289         * x86-nat.h: Include "breakpoint.h" and "target.h".
6290         (x86_use_watchpoints): Delete.
6291         (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
6292         (x86_stopped_by_watchpoint, x86_stopped_data_address)
6293         (x86_insert_watchpoint, x86_remove_watchpoint)
6294         (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
6295         (x86_stopped_by_hw_breakpoint): New declarations.
6296         (x86_nat_target): New template class.
6297
6298         * ppc-linux-nat.c (ppc_linux_nat_target): New class.
6299         (the_ppc_linux_nat_target): New.
6300         (ppc_linux_fetch_inferior_registers)
6301         (ppc_linux_can_use_hw_breakpoint)
6302         (ppc_linux_region_ok_for_hw_watchpoint)
6303         (ppc_linux_ranged_break_num_registers)
6304         (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
6305         (ppc_linux_insert_mask_watchpoint)
6306         (ppc_linux_remove_mask_watchpoint)
6307         (ppc_linux_can_accel_watchpoint_condition)
6308         (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
6309         (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
6310         (ppc_linux_watchpoint_addr_within_range)
6311         (ppc_linux_masked_watch_num_registers)
6312         (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
6313         (ppc_linux_read_description): Refactor as methods of
6314         ppc_linux_nat_target.
6315         (_initialize_ppc_linux_nat): Adjust.  Set linux_target.
6316
6317         * procfs.c (procfs_xfer_partial): Delete forward declaration.
6318         (procfs_target): New class.
6319         (the_procfs_target): New.
6320         (procfs_target): Delete function.
6321         (procfs_auxv_parse, procfs_attach, procfs_detach)
6322         (procfs_fetch_registers, procfs_store_registers, procfs_wait)
6323         (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
6324         (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
6325         (procfs_create_inferior, procfs_update_thread_list)
6326         (procfs_thread_alive, procfs_pid_to_str)
6327         (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
6328         (procfs_stopped_data_address, procfs_insert_watchpoint)
6329         (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
6330         (proc_find_memory_regions, procfs_info_proc)
6331         (procfs_make_note_section): Refactor as methods of procfs_target.
6332         (_initialize_procfs): Adjust.
6333         * sol-thread.c (sol_thread_target): New class.
6334         (sol_thread_ops): Now a sol_thread_target.
6335         (sol_thread_detach, sol_thread_resume, sol_thread_wait)
6336         (sol_thread_fetch_registers, sol_thread_store_registers)
6337         (sol_thread_xfer_partial, sol_thread_mourn_inferior)
6338         (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
6339         (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
6340         (init_sol_thread_ops): Delete.
6341         (_initialize_sol_thread): Adjust.  Remove references to
6342         init_sol_thread_ops and complete_target_initialization.
6343
6344         * windows-nat.c (windows_nat_target): New class.
6345         (windows_fetch_inferior_registers)
6346         (windows_store_inferior_registers, windows_resume, windows_wait)
6347         (windows_attach, windows_detach, windows_pid_to_exec_file)
6348         (windows_files_info, windows_create_inferior)
6349         (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
6350         (windows_close, windows_pid_to_str, windows_xfer_partial)
6351         (windows_get_tib_address, windows_get_ada_task_ptid)
6352         (windows_thread_name, windows_thread_alive): Refactor as
6353         windows_nat_target methods.
6354         (do_initial_windows_stuff): Adjust.
6355         (windows_target): Delete function.
6356         (_initialize_windows_nat): Adjust.
6357
6358         * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
6359         (darwin_mourn_inferior, darwin_kill_inferior)
6360         (darwin_create_inferior, darwin_attach, darwin_detach)
6361         (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
6362         (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
6363         (darwin_supports_multi_process): Refactor as darwin_nat_target
6364         methods.
6365         (darwin_resume_to, darwin_files_info): Delete.
6366         (_initialize_darwin_inferior): Rename to ...
6367         (_initialize_darwin_nat): ... this.  Adjust to C++ification.
6368         * darwin-nat.h: Include "inf-child.h".
6369         (darwin_nat_target): New class.
6370         (darwin_complete_target): Delete.
6371         * i386-darwin-nat.c (i386_darwin_nat_target): New class.
6372         (darwin_target): New.
6373         (i386_darwin_fetch_inferior_registers)
6374         (i386_darwin_store_inferior_registers): Refactor as methods of
6375         darwin_nat_target.
6376         (darwin_complete_target): Delete, with ...
6377         (_initialize_i386_darwin_nat): ... bits factored out here.
6378
6379         * alpha-linux-nat.c (alpha_linux_nat_target): New class.
6380         (the_alpha_linux_nat_target): New.
6381         (alpha_linux_register_u_offset): Refactor as
6382         alpha_linux_nat_target method.
6383         (_initialize_alpha_linux_nat): Adjust.
6384         * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
6385         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
6386         (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
6387         methods of linux_nat_trad_target.
6388         (linux_trad_target): Delete.
6389         * linux-nat-trad.h (linux_trad_target): Delete function.
6390         (linux_nat_trad_target): New class.
6391         * mips-linux-nat.c (mips_linux_nat_target): New class.
6392         (super_fetch_registers, super_store_registers, super_close):
6393         Delete.
6394         (the_mips_linux_nat_target): New.
6395         (mips64_linux_regsets_fetch_registers)
6396         (mips64_linux_regsets_store_registers)
6397         (mips64_linux_fetch_registers, mips64_linux_store_registers)
6398         (mips_linux_register_u_offset, mips_linux_read_description)
6399         (mips_linux_can_use_hw_breakpoint)
6400         (mips_linux_stopped_by_watchpoint)
6401         (mips_linux_stopped_data_address)
6402         (mips_linux_region_ok_for_hw_watchpoint)
6403         (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
6404         (mips_linux_close): Refactor as methods of mips_linux_nat.
6405         (_initialize_mips_linux_nat): Adjust to C++ification.
6406
6407         * aix-thread.c (aix_thread_target): New class.
6408         (aix_thread_ops): Now an aix_thread_target.
6409         (aix_thread_detach, aix_thread_resume, aix_thread_wait)
6410         (aix_thread_fetch_registers, aix_thread_store_registers)
6411         (aix_thread_xfer_partial, aix_thread_mourn_inferior)
6412         (aix_thread_thread_alive, aix_thread_pid_to_str)
6413         (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
6414         Refactor as methods of aix_thread_target.
6415         (init_aix_thread_ops): Delete.
6416         (_initialize_aix_thread): Remove references to init_aix_thread_ops
6417         and complete_target_initialization.
6418         * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
6419         (rs6000_nat_target): New class.
6420         (the_rs6000_nat_target): New.
6421         (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
6422         (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
6423         (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
6424         (super_create_inferior): Delete.
6425         (_initialize_rs6000_nat): Adjust to C++ification.
6426
6427         * arm-linux-nat.c (arm_linux_nat_target): New class.
6428         (the_arm_linux_nat_target): New.
6429         (arm_linux_fetch_inferior_registers)
6430         (arm_linux_store_inferior_registers, arm_linux_read_description)
6431         (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
6432         (arm_linux_remove_hw_breakpoint)
6433         (arm_linux_region_ok_for_hw_watchpoint)
6434         (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
6435         (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
6436         (arm_linux_watchpoint_addr_within_range): Refactor as methods of
6437         arm_linux_nat_target.
6438         (_initialize_arm_linux_nat): Adjust to C++ification.
6439
6440         * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
6441         (the_aarch64_linux_nat_target): New.
6442         (aarch64_linux_fetch_inferior_registers)
6443         (aarch64_linux_store_inferior_registers)
6444         (aarch64_linux_child_post_startup_inferior)
6445         (aarch64_linux_read_description)
6446         (aarch64_linux_can_use_hw_breakpoint)
6447         (aarch64_linux_insert_hw_breakpoint)
6448         (aarch64_linux_remove_hw_breakpoint)
6449         (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
6450         (aarch64_linux_region_ok_for_hw_watchpoint)
6451         (aarch64_linux_stopped_data_address)
6452         (aarch64_linux_stopped_by_watchpoint)
6453         (aarch64_linux_watchpoint_addr_within_range)
6454         (aarch64_linux_can_do_single_step): Refactor as methods of
6455         aarch64_linux_nat_target.
6456         (super_post_startup_inferior): Delete.
6457         (_initialize_aarch64_linux_nat): Adjust to C++ification.
6458
6459         * hppa-linux-nat.c (hppa_linux_nat_target): New class.
6460         (the_hppa_linux_nat_target): New.
6461         (hppa_linux_fetch_inferior_registers)
6462         (hppa_linux_store_inferior_registers): Refactor as methods of
6463         hppa_linux_nat_target.
6464         (_initialize_hppa_linux_nat): Adjust to C++ification.
6465
6466         * ia64-linux-nat.c (ia64_linux_nat_target): New class.
6467         (the_ia64_linux_nat_target): New.
6468         (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
6469         (ia64_linux_stopped_data_address)
6470         (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
6471         (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
6472         ia64_linux_nat_target methods.
6473         (super_xfer_partial): Delete.
6474         (_initialize_ia64_linux_nat): Adjust to C++ification.
6475
6476         * m32r-linux-nat.c (m32r_linux_nat_target): New class.
6477         (the_m32r_linux_nat_target): New.
6478         (m32r_linux_fetch_inferior_registers)
6479         (m32r_linux_store_inferior_registers): Refactor as
6480         m32r_linux_nat_target methods.
6481         (_initialize_m32r_linux_nat): Adjust to C++ification.
6482
6483         * m68k-linux-nat.c (m68k_linux_nat_target): New class.
6484         (the_m68k_linux_nat_target): New.
6485         (m68k_linux_fetch_inferior_registers)
6486         (m68k_linux_store_inferior_registers): Refactor as
6487         m68k_linux_nat_target methods.
6488         (_initialize_m68k_linux_nat): Adjust to C++ification.
6489
6490         * s390-linux-nat.c (s390_linux_nat_target): New class.
6491         (the_s390_linux_nat_target): New.
6492         (s390_linux_fetch_inferior_registers)
6493         (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
6494         (s390_insert_watchpoint, s390_remove_watchpoint)
6495         (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
6496         (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
6497         (s390_auxv_parse, s390_read_description): Refactor as methods of
6498         s390_linux_nat_target.
6499         (_initialize_s390_nat): Adjust to C++ification.
6500
6501         * sparc-linux-nat.c (sparc_linux_nat_target): New class.
6502         (the_sparc_linux_nat_target): New.
6503         (_initialize_sparc_linux_nat): Adjust to C++ification.
6504         * sparc-nat.c (sparc_fetch_inferior_registers)
6505         (sparc_store_inferior_registers): Remove target_ops parameter.
6506         * sparc-nat.h (sparc_fetch_inferior_registers)
6507         (sparc_store_inferior_registers): Remove target_ops parameter.
6508         * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
6509         (the_sparc64_linux_nat_target): New.
6510         (_initialize_sparc64_linux_nat): Adjust to C++ification.
6511
6512         * spu-linux-nat.c (spu_linux_nat_target): New class.
6513         (the_spu_linux_nat_target): New.
6514         (spu_child_post_startup_inferior, spu_child_post_attach)
6515         (spu_child_wait, spu_fetch_inferior_registers)
6516         (spu_store_inferior_registers, spu_xfer_partial)
6517         (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
6518         methods.
6519         (_initialize_spu_nat): Adjust to C++ification.
6520
6521         * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
6522         (the_tilegx_linux_nat_target): New.
6523         (fetch_inferior_registers, store_inferior_registers):
6524         Refactor as methods.
6525         (_initialize_tile_linux_nat): Adjust to C++ification.
6526
6527         * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
6528         (the_xtensa_linux_nat_target): New.
6529         (xtensa_linux_fetch_inferior_registers)
6530         (xtensa_linux_store_inferior_registers): Refactor as
6531         xtensa_linux_nat_target methods.
6532         (_initialize_xtensa_linux_nat): Adjust to C++ification.
6533
6534         * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
6535         (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
6536         (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
6537         (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
6538         (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
6539         (fbsd_stopped_by_sw_breakpoint)
6540         (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
6541         (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
6542         (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
6543         (fbsd_post_startup_inferior, fbsd_post_attach)
6544         (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
6545         (fbsd_set_syscall_catchpoint)
6546         (super_xfer_partial, super_resume, super_wait)
6547         (fbsd_supports_stopped_by_hw_breakpoint): Delete.
6548         (fbsd_handle_debug_trap): Remove target_ops parameter.
6549         (fbsd_nat_add_target): Delete.
6550         * fbsd-nat.h: Include "inf-ptrace.h".
6551         (fbsd_nat_add_target): Delete.
6552         (USE_SIGTRAP_SIGINFO): Define.
6553         (fbsd_nat_target): New class.
6554
6555         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
6556         (amd64bsd_store_inferior_registers): Remove target_ops parameter.
6557         (amd64bsd_target): Delete.
6558         * amd64-bsd-nat.h: New file.
6559         * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
6560         "x86-bsd-nat.h".
6561         (amd64_fbsd_nat_target): New class.
6562         (the_amd64_fbsd_nat_target): New.
6563         (amd64fbsd_read_description): Refactor as method of
6564         amd64_fbsd_nat_target.
6565         (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
6566         (_initialize_amd64fbsd_nat): Adjust to C++ification.
6567         * amd64-nat.h (amd64bsd_target): Delete function declaration.
6568         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
6569         (i386bsd_store_inferior_registers): Remove target_ops parameter.
6570         (i386bsd_target): Delete.
6571         * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
6572         (i386bsd_fetch_inferior_registers)
6573         (i386bsd_store_inferior_registers): Declare.
6574         (i386_bsd_nat_target): New class.
6575         * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
6576         (the_i386_fbsd_nat_target): New.
6577         (i386fbsd_resume, i386fbsd_read_description): Refactor as
6578         i386_fbsd_nat_target methods.
6579         (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
6580         (_initialize_i386fbsd_nat): Adjust to C++ification.
6581         * x86-bsd-nat.c (super_mourn_inferior): Delete.
6582         (x86bsd_mourn_inferior, x86bsd_target): Delete.
6583         (_initialize_x86_bsd_nat): Adjust to C++ification.
6584         * x86-bsd-nat.h: Include "x86-nat.h".
6585         (x86bsd_target): Delete declaration.
6586         (x86bsd_nat_target): New class.
6587
6588         * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
6589         (the_aarch64_fbsd_nat_target): New.
6590         (aarch64_fbsd_fetch_inferior_registers)
6591         (aarch64_fbsd_store_inferior_registers): Refactor as methods of
6592         aarch64_fbsd_nat_target.
6593         (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
6594         * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
6595         (the_alpha_bsd_nat_target): New.
6596         (alphabsd_fetch_inferior_registers)
6597         (alphabsd_store_inferior_registers): Refactor as
6598         alpha_bsd_nat_target methods.
6599         (_initialize_alphabsd_nat): Refactor as methods of
6600         alpha_bsd_nat_target.
6601         * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
6602         (the_amd64_nbsd_nat_target): New.
6603         (_initialize_amd64nbsd_nat): Adjust to C++ification.
6604         * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
6605         (the_amd64_obsd_nat_target): New.
6606         (_initialize_amd64obsd_nat): Adjust to C++ification.
6607         * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
6608         (the_arm_fbsd_nat_target): New.
6609         (arm_fbsd_fetch_inferior_registers)
6610         (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
6611         (_initialize_arm_fbsd_nat): Refactor as methods of
6612         arm_fbsd_nat_target.
6613         (_initialize_arm_fbsd_nat): Adjust to C++ification.
6614         * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
6615         (the_arm_netbsd_nat_target): New.
6616         (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
6617         arm_netbsd_nat_target.
6618         (_initialize_arm_netbsd_nat): Adjust to C++ification.
6619         * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
6620         (the_hppa_nbsd_nat_target): New.
6621         (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
6622         hppa_nbsd_nat_target methods.
6623         (_initialize_hppanbsd_nat): Adjust to C++ification.
6624         * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
6625         (the_hppa_obsd_nat_target): New.
6626         (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
6627         methods of hppa_obsd_nat_target.
6628         (_initialize_hppaobsd_nat): Adjust to C++ification.  Use
6629         add_target.
6630         * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
6631         (_initialize_i386nbsd_nat): Adjust to C++ification.  Use
6632         add_target.
6633         * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
6634         (_initialize_i386obsd_nat): Use add_target.
6635         * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
6636         (the_m68k_bsd_nat_target): New.
6637         (m68kbsd_fetch_inferior_registers)
6638         (m68kbsd_store_inferior_registers): Refactor as methods of
6639         m68k_bsd_nat_target.
6640         (_initialize_m68kbsd_nat): Adjust to C++ification.
6641         * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
6642         (the_mips_fbsd_nat_target): New.
6643         (mips_fbsd_fetch_inferior_registers)
6644         (mips_fbsd_store_inferior_registers): Refactor as methods of
6645         mips_fbsd_nat_target.
6646         (_initialize_mips_fbsd_nat): Adjust to C++ification.  Use
6647         add_target.
6648         * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
6649         (the_mips_nbsd_nat_target): New.
6650         (mipsnbsd_fetch_inferior_registers)
6651         (mipsnbsd_store_inferior_registers): Refactor as methods of
6652         mips_nbsd_nat_target.
6653         (_initialize_mipsnbsd_nat): Adjust to C++ification.
6654         * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
6655         (the_mips64_obsd_nat_target): New.
6656         (mips64obsd_fetch_inferior_registers)
6657         (mips64obsd_store_inferior_registers): Refactor as methods of
6658         mips64_obsd_nat_target.
6659         (_initialize_mips64obsd_nat): Adjust to C++ification.  Use
6660         add_target.
6661         * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
6662         nbsd_nat_target.
6663         * nbsd-nat.h: Include "inf-ptrace.h".
6664         (nbsd_nat_target): New class.
6665         * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
6666         (obsd_wait): Refactor as methods of obsd_nat_target.
6667         (obsd_add_target): Delete.
6668         * obsd-nat.h: Include "inf-ptrace.h".
6669         (obsd_nat_target): New class.
6670         * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
6671         (the_ppc_fbsd_nat_target): New.
6672         (ppcfbsd_fetch_inferior_registers)
6673         (ppcfbsd_store_inferior_registers): Refactor as methods of
6674         ppc_fbsd_nat_target.
6675         (_initialize_ppcfbsd_nat): Adjust to C++ification.  Use
6676         add_target.
6677         * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
6678         (the_ppc_nbsd_nat_target): New.
6679         (ppcnbsd_fetch_inferior_registers)
6680         (ppcnbsd_store_inferior_registers): Refactor as methods of
6681         ppc_nbsd_nat_target.
6682         (_initialize_ppcnbsd_nat): Adjust to C++ification.
6683         * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
6684         (the_ppc_obsd_nat_target): New.
6685         (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
6686         methods of ppc_obsd_nat_target.
6687         (_initialize_ppcobsd_nat): Adjust to C++ification.  Use
6688         add_target.
6689         * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
6690         (the_sh_nbsd_nat_target): New.
6691         (shnbsd_fetch_inferior_registers)
6692         (shnbsd_store_inferior_registers): Refactor as methods of
6693         sh_nbsd_nat_target.
6694         (_initialize_shnbsd_nat): Adjust to C++ification.
6695         * sparc-nat.c (sparc_xfer_wcookie): Make extern.
6696         (inf_ptrace_xfer_partial): Delete.
6697         (sparc_xfer_partial, sparc_target): Delete.
6698         * sparc-nat.h (sparc_fetch_inferior_registers)
6699         (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
6700         (sparc_target): Delete function declaration.
6701         (sparc_target): New template class.
6702         * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
6703         (_initialize_sparcnbsd_nat): Adjust to C++ification.
6704         * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
6705         (_initialize_sparc64fbsd_nat): Adjust to C++ification.  Use
6706         add_target.
6707         * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
6708         (_initialize_sparc64nbsd_nat): Adjust to C++ification.
6709         * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
6710         (_initialize_sparc64obsd_nat): Adjust to C++ification.  Use
6711         add_target.
6712         * vax-bsd-nat.c (vax_bsd_nat_target): New class.
6713         (the_vax_bsd_nat_target): New.
6714         (vaxbsd_fetch_inferior_registers)
6715         (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
6716         methods.
6717         (_initialize_vaxbsd_nat): Adjust to C++ification.
6718
6719         * bsd-kvm.c (bsd_kvm_target): New class.
6720         (bsd_kvm_ops): Now a bsd_kvm_target.
6721         (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
6722         (bsd_kvm_files_info, bsd_kvm_fetch_registers)
6723         (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
6724         bsd_kvm_target.
6725         (bsd_kvm_return_one): Delete.
6726         (bsd_kvm_add_target): Adjust to C++ification.
6727
6728         * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
6729         (nto_procfs_target_procfs): New classes.
6730         (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
6731         (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
6732         (procfs_post_attach, procfs_wait, procfs_fetch_registers)
6733         (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
6734         (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
6735         (procfs_remove_hw_breakpoint, procfs_resume)
6736         (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
6737         (procfs_kill_inferior, procfs_store_registers)
6738         (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
6739         as methods of nto_procfs_target.
6740         (nto_procfs_ops): Now an nto_procfs_target_procfs.
6741         (nto_native_ops): Delete.
6742         (procfs_open, procfs_native_open): Delete.
6743         (nto_native_ops): Now an nto_procfs_target_native.
6744         (init_procfs_targets): Adjust to C++ification.
6745         (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
6746         (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
6747         Refactor as methods of nto_procfs_target.
6748
6749         * go32-nat.c (go32_nat_target): New class.
6750         (the_go32_nat_target): New.
6751         (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
6752         (go32_store_registers, go32_xfer_partial, go32_files_info)
6753         (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
6754         (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
6755         (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
6756         (go32_pid_to_str): Refactor as methods of go32_nat_target.
6757         (go32_target): Delete.
6758         (_initialize_go32_nat): Adjust to C++ification.
6759
6760         * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
6761         (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
6762         (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
6763         (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
6764         gnu_nat_target.
6765         (gnu_target): Delete.
6766         * gnu-nat.h (gnu_target): Delete.
6767         (gnu_nat_target): New class.
6768         * i386-gnu-nat.c (gnu_base_target): New.
6769         (i386_gnu_nat_target): New class.
6770         (the_i386_gnu_nat_target): New.
6771         (_initialize_i386gnu_nat): Adjust to C++ification.
6772
6773 2018-05-02  Pedro Alves  <palves@redhat.com>
6774
6775         * bfd-target.c (target_bfd_xclose): Rename to ...
6776         (target_bfd_close): ... this.
6777         (target_bfd_reopen): Adjust.
6778         * target.c (target_close): Remove references to to_xclose.
6779         * target.h (target_ops::to_xclose): Delete.
6780         (target_ops::to_close): Update comments.
6781
6782 2018-05-02  Pedro Alves  <palves@redhat.com>
6783
6784         * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
6785         "linux-nat.h".
6786         * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
6787         * inf-ptrace.c (inf_ptrace_register_u_offset)
6788         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
6789         (inf_ptrace_store_register, inf_ptrace_store_registers)
6790         (inf_ptrace_trad_target): Move to ...
6791         * linux-nat-trad.c: ... this new file.
6792         * linux-nat-trad.h: New file.
6793         * linux-nat.c (linux_target_install_ops): Make extern.
6794         (linux_trad_target): Delete.
6795         * linux-nat.h (linux_trad_target): Delete declaration.
6796         (linux_target_install_ops): Declare.
6797         * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
6798         "linux-nat.h".
6799
6800 2018-05-02  Pedro Alves  <palves@redhat.com>
6801
6802         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
6803         procfs_target/add_target here.
6804         * procfs.c (procfs_target): Make static.
6805         (_initialize_procfs): Call add_target here.
6806         * procfs.h (struct target_ops): Remove forward declaration.
6807         (procfs_target): Remove declaration.
6808         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
6809
6810 2018-05-02  Pedro Alves  <palves@redhat.com>
6811
6812         * procfs.c (procfs_stopped_by_watchpoint)
6813         (procfs_insert_watchpoint, procfs_remove_watchpoint)
6814         (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
6815         Forward declare.
6816         (procfs_use_watchpoints): Delete, move contents...
6817         (procfs_target): ... here.
6818         * procfs.h (procfs_use_watchpoints): Delete declaration.
6819         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
6820         procfs_use_watchpoints.
6821         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
6822         procfs_use_watchpoints.
6823
6824 2018-05-02  Tom Tromey  <tom@tromey.com>
6825
6826         PR python/20084:
6827         * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
6828         and var_zuinteger_unlimited.
6829         * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
6830         and PARAM_ZUINTEGER_UNLIMITED.
6831         (set_parameter_value): Handle var_zuinteger and
6832         var_zuinteger_unlimited.
6833         (add_setshow_generic): Likewise.
6834         (parmpy_init): Likewise.
6835
6836 2018-04-28  Dan Robertson  <danlrobertson89@gmail.com>
6837
6838         PR rust/23124
6839         * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
6840         pointer is not null before dereferencing it.
6841
6842 2018-04-30  Tom Tromey  <tom@tromey.com>
6843
6844         * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
6845         is_mi_like_p.
6846
6847 2018-04-30  Tom Tromey  <tom@tromey.com>
6848
6849         * breakpoint.c (mention): Remove use of is_mi_like_p.
6850         (print_mention_ranged_breakpoint): Likewise.
6851         * break-catch-throw.c (print_it_exception_catchpoint): Remove use
6852         of is_mi_like_p.
6853
6854 2018-04-30  Tom Tromey  <tom@tromey.com>
6855
6856         * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
6857
6858 2018-04-30  Tom Tromey  <tom@tromey.com>
6859
6860         * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
6861         (info_spu_event_command): Remove some uses of is_mi_like_p.
6862
6863 2018-04-30  Tom Tromey  <tom@tromey.com>
6864
6865         * python/py-framefilter.c (py_print_single_arg)
6866         (enumerate_locals, py_print_args, py_print_frame): Remove some
6867         uses of is_mi_like_p.
6868
6869 2018-04-30  Tom Tromey  <tom@tromey.com>
6870
6871         * ui-out.c: Update.
6872         * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
6873         * ui-out.h (ui_out::is_mi_like_p): Now const.
6874         (ui_out::do_is_mi_like_p): Now const.
6875         * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
6876
6877 2018-04-30  Tom Tromey  <tom@tromey.com>
6878
6879         * varobj.c (varobj_set_visualizer): Use new_reference.
6880         * python/python.c (gdbpy_decode_line): Use new_reference.
6881         * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
6882         new_reference.
6883
6884 2018-04-30  Tom Tromey  <tom@tromey.com>
6885
6886         * varobj.c (install_new_value): Use new_reference.
6887         * value.h (value_incref): Return void.  Swap intro comment with
6888         value_decref.
6889         * value.c (set_value_parent): Use new_reference.
6890         (value_incref): Return void.  Update intro comment.
6891         (release_value): Use new_reference.
6892         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
6893
6894 2018-04-30  Tom Tromey  <tom@tromey.com>
6895
6896         * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
6897         * gdb_bfd.h (new_bfd_ref): Remove.
6898         (gdb_bfd_open): Update comment.
6899         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
6900         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
6901         (gdb_bfd_fdopenr): Use new_reference.
6902         * exec.c (exec_file_attach): Use new_reference.
6903
6904 2018-04-30  Tom Tromey  <tom@tromey.com>
6905
6906         * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
6907         method.
6908
6909 2018-04-30  Tom Tromey  <tom@tromey.com>
6910
6911         * jit.c (jit_read_code_entry): Use type_align.
6912         * i386-tdep.c (i386_gdbarch_init): Don't call
6913         set_gdbarch_long_long_align_bit.
6914         * gdbarch.sh: Remove long_long_align_bit.
6915         * gdbarch.c, gdbarch.h: Rebuild.
6916         * arc-tdep.c (arc_type_align): New function.
6917         (arc_gdbarch_init): Use arc_type_align.  Don't call
6918         set_gdbarch_long_long_align_bit.
6919
6920 2018-04-30  Tom Tromey  <tom@tromey.com>
6921
6922         * rust-lang.c (rust_type_alignment): Remove.
6923         (rust_composite_type): Use type_align.
6924
6925 2018-04-30  Tom Tromey  <tom@tromey.com>
6926
6927         * NEWS: Mention Type.align.
6928         * python/py-type.c (typy_get_alignof): New function.
6929         (type_object_getset): Add "alignof".
6930
6931 2018-04-30  Tom Tromey  <tom@tromey.com>
6932
6933         PR exp/17095:
6934         * NEWS: Update.
6935         * std-operator.def (UNOP_ALIGNOF): New operator.
6936         * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
6937         New.
6938         * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
6939         * c-lang.c (c_op_print_tab): Add alignof.
6940         * c-exp.y (ALIGNOF): New token.
6941         (exp): Add "ALIGNOF" production.
6942         (ident_tokens): Add _Alignof and alignof.
6943
6944 2018-04-30  Tom Tromey  <tom@tromey.com>
6945
6946         * i386-tdep.c (i386_type_align): New function.
6947         (i386_gdbarch_init): Update.
6948         * gdbarch.sh (type_align): New method.
6949         * gdbarch.c, gdbarch.h: Rebuild.
6950         * arch-utils.h (default_type_align): Declare.
6951         * arch-utils.c (default_type_align): New function.
6952         * gdbtypes.h (TYPE_ALIGN_BITS): New define.
6953         (struct type) <align_log2>: New field.
6954         <instance_flags>: Now a bitfield.
6955         (TYPE_RAW_ALIGN): New macro.
6956         (type_align, type_raw_align, set_type_align): Declare.
6957         * gdbtypes.c (type_align, type_raw_align, set_type_align): New
6958         functions.
6959         * dwarf2read.c (quirk_rust_enum): Set type alignment.
6960         (get_alignment, maybe_set_alignment): New functions.
6961         (read_structure_type, read_enumeration_type, read_array_type)
6962         (read_set_type, read_tag_pointer_type, read_tag_reference_type)
6963         (read_subrange_type, read_base_type): Set type alignment.
6964
6965 2018-04-30  Simon Marchi  <simon.marchi@ericsson.com>
6966
6967         * dwarf2read.c (read_index_from_section): Use bool.
6968
6969 2018-04-29  Fabian Groffen  <grobian@gentoo.org>
6970
6971         PR gdb/22950
6972         * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
6973         with #ifdef.
6974
6975 2018-04-29  John Reiser  <jreiser@BitWagon.com>
6976
6977         PR build/22873
6978         * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
6979         last step, and do it atomically.
6980
6981 2018-04-27  Alexandre Oliva  <aoliva@redhat.com>
6982
6983         * compile/compile-c-types.c (convert_int, convert_float):
6984         Update for C FE v1.
6985
6986 2018-04-27  Tom Tromey  <tom@tromey.com>
6987
6988         PR rust/22545:
6989         * rust-lang.c (rust_inclusive_range_type_p): New function.
6990         (rust_range): Handle inclusive ranges.
6991         (rust_compute_range): Likewise.
6992         * rust-exp.y (struct rust_op) <inclusive>: New field.
6993         (DOTDOTEQ): New constant.
6994         (range_expr): Add "..=" productions.
6995         (operator_tokens): Add "..=" token.
6996         (ast_range): Add "inclusive" parameter.
6997         (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
6998         ranges.
6999         * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
7000         bounds values.
7001         * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
7002         LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
7003         Update comments.
7004         * expprint.c (print_subexp_standard): Handle new bounds values.
7005         (dump_subexp_body_standard): Likewise.
7006
7007 2018-04-27  Tom Tromey  <tom@tromey.com>
7008
7009         * configure: Rebuild.
7010         * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
7011         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
7012         "OVERRIDE".
7013         (class symbol_needs_eval_context): Likewise.
7014         * dwarf2read.c (mock_mapped_index::symbol_name_count)
7015         (mock_mapped_index::symbol_name_at): Use "override".  Remove
7016         "virtual".
7017         * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
7018         "override".
7019         (class dwarf_expr_executor): Use "override", not "OVERRIDE".
7020         * aarch64-tdep.c (instruction_reader::read): Use "override".
7021         (instruction_reader_test::read): Likewise.
7022         * arm-tdep.c (instruction_reader::read): Use "override".
7023         (instruction_reader_thumb::read): Likewise.
7024
7025 2018-04-26  Andrzej Kaczmarek  <andrzej.kaczmarek@codecoup.pl>
7026
7027         PR remote/9665
7028         * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
7029         instead of remote_send.
7030         (remote_send): Remove.
7031
7032 2018-04-26  Pedro Alves  <palves@redhat.com>
7033
7034         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
7035         find_function_start_sal instead of find_pc_line.
7036
7037 2018-04-26  Pedro Alves  <palves@redhat.com>
7038
7039         * breakpoint.c (set_breakpoint_location_function): Handle
7040         mst_data_gnu_ifunc.
7041         * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
7042         * elfread.c (elf_symtab_read): Give data symbols with
7043         BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
7044         (elf_rel_plt_read): Update comment.
7045         * linespec.c (convert_linespec_to_sals): Handle
7046         mst_data_gnu_ifunc.
7047         (minsym_found): Handle mst_data_gnu_ifunc.
7048         * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
7049         (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
7050         * parse.c (find_minsym_type_and_address): Handle
7051         mst_data_gnu_ifunc.
7052         * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
7053         * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
7054         * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
7055         comment.
7056         <mst_data_gnu_ifunc>: New enumerator.
7057
7058 2018-04-26  Pedro Alves  <palves@redhat.com>
7059
7060         * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
7061         (lookup_minimal_symbol_by_pc_section): ... this.  Replace
7062         'want_trampoline' parameter by a lookup_msym_prefer parameter.
7063         Handle it.
7064         (lookup_minimal_symbol_by_pc_section): Delete old implementation.
7065         (lookup_minimal_symbol_by_pc): Adjust.
7066         (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
7067         (lookup_solib_trampoline_symbol_by_pc): Adjust.
7068         * minsyms.h (lookup_msym_prefer): New enum.
7069         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
7070         parameter by a lookup_msym_prefer parameter.
7071
7072 2018-04-26  Pedro Alves  <palves@redhat.com>
7073
7074         * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
7075         ends in "@plt" instead of looking at the symbol's section.
7076
7077 2018-04-26  Pedro Alves  <palves@redhat.com>
7078
7079         * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete.  Remove
7080         all references.
7081         (find_pc_partial_function_gnu_ifunc): Rename to ...
7082         (find_pc_partial_function): ... this, and remove references to
7083         'is_gnu_ifunc_p'.
7084         (find_pc_partial_function): Delete old implementation.
7085         * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
7086
7087 2018-04-26  Pedro Alves  <palves@redhat.com>
7088
7089         * linespec.c (struct bound_minimal_symbol_search_key): New.
7090         (convert_linespec_to_sals): Sort minimal symbols earlier.  Don't
7091         skip first line if we found a GNU ifunc minimal symbol by name.
7092         (compare_msymbols): Change parameters to work with a destructured
7093         lhs minsym.
7094         (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
7095         functions.
7096
7097 2018-04-26  Pedro Alves  <palves@redhat.com>
7098
7099         * breakpoint.c (set_breakpoint_location_function): Don't resolve
7100         ifunc targets here.  Instead, if we have an ifunc minsym, use its
7101         address/name.
7102         (add_location_to_breakpoint): Store the minsym and the objfile in
7103         the breakpoint location.
7104         * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
7105         * linespec.c (minsym_found): Resolve GNU ifunc targets here.
7106         Record the minsym in the sal.
7107         * symtab.h (symtab_and_line) <msymbol>: New field.
7108
7109 2018-04-26  Pedro Alves  <palves@redhat.com>
7110
7111         * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
7112         unless we actually resolved the ifunc.
7113
7114 2018-04-26  Pedro Alves  <palves@redhat.com>
7115
7116         * c-exp.y (variable production): Prefer ifunc minsyms over
7117         regular function symbols.
7118         * symtab.c (find_gnu_ifunc): New function.
7119         * minsyms.h (lookup_msym_prefer): New enum.
7120         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
7121         parameter by a lookup_msym_prefer parameter.
7122         * symtab.h (find_gnu_ifunc): New declaration.
7123
7124 2018-04-26  Pedro Alves  <palves@redhat.com>
7125
7126         * blockframe.c (find_gnu_ifunc_target_type): New function.
7127         (find_function_type): New.
7128         * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
7129         return a value with a memory address.
7130         (eval_call): For calls to GNU ifunc functions, try to find the
7131         type of the target function from the type that the resolver
7132         returns.
7133         * gdbtypes.c (objfile_type): Don't install a return type for ifunc
7134         symbols.
7135         * infcall.c (find_function_return_type): Delete.
7136         (find_function_addr): Add 'function_type' parameter.  For calls to
7137         GNU ifunc functions, try to find the type of the target function
7138         from the type that the resolver returns, and return it via
7139         FUNCTION_TYPE.
7140         (call_function_by_hand_dummy): Adjust to use the function type
7141         returned by find_function_addr.
7142         (find_function_addr): Add 'function_type' parameter and move
7143         description here.
7144         * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
7145         declarations.
7146
7147 2018-04-26  Pedro Alves  <palves@redhat.com>
7148
7149         * c-exp.y (variable production): Skip finding an alias for ifunc
7150         symbols.
7151
7152 2018-04-26  Pedro Alves  <palves@redhat.com>
7153
7154         * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
7155
7156 2018-04-25  Pedro Alves  <palves@redhat.com>
7157
7158         * infcmd.c (kill_command): Print the pid as string, not the whole
7159         thread's ptid.  Add comment.  s/has been killed/killed/ in output
7160         message.
7161         * remote.c (remote_detach_1): Print the pid as string, not the
7162         whole thread's ptid.
7163
7164 2018-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
7165             Sergio Durigan Junior  <sergiodj@redhat.com>
7166             Pedro Alves  <palves@redhat.com>
7167
7168         * infcmd.c (kill_command): Print message when inferior has
7169         been killed.
7170         * inferior.c (print_inferior_events): Remove 'static'.  Set as
7171         '1'.
7172         (add_inferior): Improve message printed when
7173         'print_inferior_events' is on.
7174         (exit_inferior): Remove message printed when
7175         'print_inferior_events' is on.
7176         (detach_inferior): Improve message printed when
7177         'print_inferior_events' is on.
7178         (initialize_inferiors): Use 'add_inferior_silent' to set
7179         'current_inferior_'.
7180         * inferior.h (print_inferior_events): Declare here as
7181         'extern'.
7182         * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
7183         '[Detaching...]' messages when 'print_inferior_events' is on.
7184         Use 'add_thread_silent' instead of 'add_thread'.  Add '[' and ']'
7185         as prefix/suffix for messages.  Remove periods.  Fix erroneous
7186         'Detaching after fork from child...', replace it by '... from
7187         parent...'.
7188         (handle_vfork_child_exec_or_exit): Add '[' and ']' as
7189         prefix/suffix when printing 'Detaching...' messages.  Print
7190         them when 'print_inferior_events' is on.
7191         * remote.c (remote_detach_1): Print message when detaching
7192         from inferior and '!is_fork_parent'.
7193
7194 2018-04-24  Tom Tromey  <tom@tromey.com>
7195
7196         * cli-out.h: Reindent.
7197
7198 2018-04-24  Tom Tromey  <tom@tromey.com>
7199
7200         * cli-out.c (cli_ui_out::out_field_fmt): Remove.
7201         (cli_ui_out::do_field_string): Use fputs_filtered.
7202         * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
7203
7204 2018-04-23  Tom Tromey  <tom@tromey.com>
7205
7206         * guile/scm-frame.c (gdbscm_frame_read_var): Use
7207         gdb::unique_xmalloc_ptr.
7208
7209 2018-04-23  Tom Tromey  <tom@tromey.com>
7210
7211         * configure: Rebuild.
7212
7213 2018-04-22  Rajendra SY  <rajendra.sy@gmail.com>
7214
7215         PR gdb/23095
7216         * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
7217         prepare_for_testing.  Set normal_bp to r_debug_state if target
7218         is bsd.
7219
7220 2018-04-21  Pedro Alves  <palves@redhat.com>
7221             Rajendra SY  <rajendra.sy@gmail.com>
7222
7223         * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
7224         * remote.c (extended_remote_attach): In all-stop mode, mark the
7225         thread as executing.
7226
7227 2018-04-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
7228
7229         * thread.c (thread_apply_all_command): Fix comment.
7230         (thread_command): Fix comment.
7231
7232 2018-04-10  Alan Hayward  <alan.hayward@arm.com>
7233
7234         * common/tdesc.h (tdesc_create_feature): Remove xml filename
7235         parameter.
7236         * features/aarch64-core.c (create_feature_aarch64_core):
7237         Regenerate.
7238         * features/aarch64-fpu.c (create_feature_aarch64_fpu):
7239         Likewise.
7240         * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
7241         Likewise.
7242         * features/i386/32bit-avx512.c
7243         (create_feature_i386_32bit_avx512): Likewise.
7244         * features/i386/32bit-core.c (create_feature_i386_32bit_core):
7245         Likewise.
7246         * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
7247         Likewise.
7248         * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
7249         Likewise.
7250         * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
7251         Likewise.
7252         * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
7253         Likewise.
7254         * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
7255         Likewise.
7256         * features/i386/64bit-avx512.c
7257         (create_feature_i386_64bit_avx512): Likewise.
7258         * features/i386/64bit-core.c (create_feature_i386_64bit_core):
7259         Likewise.
7260         * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
7261         Likewise.
7262         * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
7263         Likewise.
7264         * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
7265         Likewise.
7266         * features/i386/64bit-segments.c
7267         (create_feature_i386_64bit_segments): Likewise.
7268         * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
7269         Likewise.
7270         * features/i386/x32-core.c
7271         (create_feature_i386_x32_core): Likewise.
7272         * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
7273         * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
7274         * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
7275         * target-descriptions.c: In generated code, don't pass xml
7276         filename.
7277
7278 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
7279
7280         * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
7281         (print_xml_feature::visit_post): Likewise.
7282         (print_xml_feature::visit): Likewise.
7283         * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
7284         (print_xml_feature): Add new class.
7285         * regformats/regdat.sh: Null xmltarget on feature targets.
7286         * target-descriptions.c (struct target_desc): Add xmltarget.
7287         (maintenance_check_tdesc_xml_convert): Add unittest function.
7288         (tdesc_get_features_xml): Add function to get xml.
7289         (maintenance_check_xml_descriptions): Test xml generation.
7290         * xml-tdesc.c (string_read_description_xml): Add function.
7291         * xml-tdesc.h (string_read_description_xml): Add declaration.
7292
7293 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
7294
7295         * features/Makefile: Add feature marker to targets with new style
7296         target descriptions.
7297         * regformats/aarch64.dat: Regenerate.
7298         * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
7299         * regformats/i386/amd64-avx-linux.dat: Likewise.
7300         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
7301         * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
7302         * regformats/i386/amd64-linux.dat: Likewise.
7303         * regformats/i386/amd64-mpx-linux.dat: Likewise.
7304         * regformats/i386/amd64.dat: Likewise.
7305         * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
7306         * regformats/i386/i386-avx-linux.dat: Likewise.
7307         * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
7308         * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
7309         * regformats/i386/i386-linux.dat: Likewise.
7310         * regformats/i386/i386-mmx-linux.dat: Likewise.
7311         * regformats/i386/i386-mpx-linux.dat: Likewise.
7312         * regformats/i386/i386.dat: Likewise.
7313         * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
7314         * regformats/i386/x32-avx-linux.dat: Likewise.
7315         * regformats/i386/x32-linux.dat: Likewise.
7316         * regformats/tic6x-c62x-linux.dat: Likewise.
7317         * regformats/tic6x-c64x-linux.dat: Likewise.
7318         * regformats/tic6x-c64xp-linux.dat: Likewise.
7319         * regformats/regdat.sh: Parse feature marker.
7320
7321 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
7322
7323         * common/tdesc.h (tdesc_architecture_name): Add new declaration.
7324         (tdesc_osabi_name): Likewise.
7325         * target-descriptions.c (tdesc_architecture_name): Add new
7326         function.
7327         (tdesc_osabi_name): Likewise.
7328
7329 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
7330
7331         * common/tdesc.c (tdesc_predefined_type): Move to here.
7332         (tdesc_named_type): Likewise.
7333         (tdesc_create_vector): Likewise.
7334         (tdesc_create_struct): Likewise.
7335         (tdesc_set_struct_size): Likewise.
7336         (tdesc_create_union): Likewise.
7337         (tdesc_create_flags): Likewise.
7338         (tdesc_create_enum): Likewise.
7339         (tdesc_add_field): Likewise.
7340         (tdesc_add_typed_bitfield): Likewise.
7341         (tdesc_add_bitfield): Likewise.
7342         (tdesc_add_flag): Likewise.
7343         (tdesc_add_enum_value): Likewise.
7344         * common/tdesc.h (struct tdesc_type_builtin): Likewise.
7345         (struct tdesc_type_vector): Likewise.
7346         (struct tdesc_type_field): Likewise.
7347         (struct tdesc_type_with_fields): Likewise.
7348         (tdesc_create_enum): Add declaration.
7349         (tdesc_add_typed_bitfield): Likewise.
7350         (tdesc_add_enum_value): Likewise.
7351         * target-descriptions.c (tdesc_type_field): Move from here.
7352         (tdesc_type_builtin): Likewise.
7353         (tdesc_type_vector): Likewise.
7354         (tdesc_type_with_fields): Likewise.
7355         (tdesc_predefined_types): Likewise.
7356         (tdesc_named_type): Likewise.
7357         (tdesc_create_vector): Likewise.
7358         (tdesc_create_struct): Likewise.
7359         (tdesc_set_struct_size): Likewise.
7360         (tdesc_create_union): Likewise.
7361         (tdesc_create_flags): Likewise.
7362         (tdesc_create_enum): Likewise.
7363         (tdesc_add_field): Likewise.
7364         (tdesc_add_typed_bitfield): Likewise.
7365         (tdesc_add_bitfield): Likewise.
7366         (tdesc_add_flag): Likewise.
7367         (tdesc_add_enum_value): Likewise.
7368         * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
7369         (tdesc_add_typed_bitfield): Likewise.
7370         (tdesc_add_enum_value): Likewise.
7371
7372 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
7373
7374         * common/tdesc.c (tdesc_feature::accept): Move to here.
7375         (tdesc_feature::operator==): Likewise.
7376         (tdesc_create_reg): Likewise.
7377         * common/tdesc.h (tdesc_type_kind): Likewise.
7378         (struct tdesc_type): Likewise.
7379         (struct tdesc_feature): Likewise.
7380         * regformats/regdat.sh: Create a feature.
7381         * target-descriptions.c (tdesc_type_kind): Move from here.
7382         (tdesc_type): Likewise.
7383         (tdesc_type_up): Likewise.
7384         (tdesc_feature): Likewise.
7385         (tdesc_create_reg): Likewise.
7386
7387 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
7388
7389         * Makefile.in: Add arch/tdesc.c
7390         * common/tdesc.c: New file.
7391         * common/tdesc.h (tdesc_element_visitor): Move to here.
7392         (tdesc_element): Likewise.
7393         (tdesc_reg): Likewise.
7394         (tdesc_reg_up): Likewise.
7395         * regformats/regdef.h (reg): Add offset to constructors.
7396         * target-descriptions.c (tdesc_element_visitor): Move from here.
7397         (tdesc_element): Likewise.
7398         (tdesc_reg): Likewise.
7399         (tdesc_reg_up): Likewise.
7400
7401 2018-04-17  Tom Tromey  <tom@tromey.com>
7402
7403         * dwarf2read.c (quirk_rust_enum): Conditionally drop the
7404         discriminant field.
7405
7406 2018-04-17  Tom Tromey  <tom@tromey.com>
7407
7408         * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
7409
7410 2018-04-17  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7411
7412         * symtab.c (print_symbol_info): Skip printing filename and line
7413         number when `last' is NULL.
7414         (symtab_symbol_info): Use empty string instead of NULL for first
7415         invocation of print_symbol_info.
7416         (rbreak_command): Pass NULL to `last' parameter of
7417         print_symbol_info.
7418
7419 2018-04-16  Simon Marchi  <simon.marchi@ericsson.com>
7420
7421         * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
7422         instead of nullptr.
7423
7424 2018-04-16  Pedro Alves  <palves@redhat.com>
7425
7426         * MAINTAINERS (sh): Remove.
7427         * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
7428         (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
7429         (ALLDEPFILES): Remove sh64-tdep.c.
7430         * NEWS: Mentions that support for SH-5/SH64 is removed.
7431         * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
7432         (sh*-*-openbsd*): Ditto.
7433         (sh64-*-elf*): Remove.
7434         (sh*): Remove.
7435         * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
7436         * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
7437         * sh-tdep.c: No longer include "sh64-tdep.h".
7438         (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
7439         * sh64-tdep.c, sh64-tdep.h: Remove files.
7440
7441 2018-04-16  Pedro Alves  <palves@redhat.com>
7442
7443         * MAINTAINERS: Remove m88k.
7444         * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
7445         (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
7446         (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
7447         * NEWS: Mention that support for m88k was removed.
7448         * configure.host (m88*-*-*): Remove support.
7449         * configure.nat (m88k-*-*): Remove support.
7450         * configure.tgt (m88*-*-openbsd*): Remove.
7451         * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
7452
7453 2018-04-15  Simon Marchi  <simon.marchi@polymtl.ca>
7454
7455         * configure.tgt (x86_tobjs): New variable.
7456         (amd64_tobjs, i386_tobjs): Use it.
7457
7458 2018-04-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7459
7460         * symtab.c (print_symbol_info): Precede the symbol definition by
7461         the line number when available.
7462         * NEWS: Advertise this enhancement.
7463
7464 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
7465
7466         * NEWS (New options): announce set/show record btrace cpu.
7467         * btrace.c: Include record-btrace.h.
7468         (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
7469         the vendor is unknown.
7470         (btrace_compute_ftrace_1): Add cpu parameter.  Update callers.
7471         Maybe overwrite the btrace configuration's cpu.
7472         (btrace_compute_ftrace): Add cpu parameter.  Update callers.
7473         (btrace_fetch): Add cpu parameter.  Update callers.
7474         (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
7475         Maybe overwrite the btrace configuration's cpu.  Skip enabling
7476         errata workarounds if the vendor is unknown.
7477         * python/py-record-btrace.c: Include record-btrace.h.
7478         (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
7479         (recpy_bt_function_call_history): Call record_btrace_get_cpu.
7480         * record-btrace.c (record_btrace_cpu_state_kind): New.
7481         (record_btrace_cpu): New.
7482         (set_record_btrace_cpu_cmdlist): New.
7483         (record_btrace_get_cpu): New.
7484         (require_btrace_thread, record_btrace_info)
7485         (record_btrace_resume_thread): Call record_btrace_get_cpu.
7486         (cmd_set_record_btrace_cpu_none): New.
7487         (cmd_set_record_btrace_cpu_auto): New.
7488         (cmd_set_record_btrace_cpu): New.
7489         (cmd_show_record_btrace_cpu): New.
7490         (_initialize_record_btrace): Initialize set/show record btrace cpu
7491         commands.
7492         * record-btrace.h (record_btrace_get_cpu): New.
7493
7494 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
7495
7496         * record.c (set_record_command): Fix typo in message.
7497
7498 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
7499
7500         * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
7501
7502 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
7503
7504         * infrun.c (process_event_stop_test): Call
7505         gdbarch_in_indirect_branch_thunk.
7506         * gdbarch.sh (in_indirect_branch_thunk): New.
7507         * gdbarch.c: Regenerated.
7508         * gdbarch.h: Regenerated.
7509         * x86-tdep.h: New.
7510         * x86-tdep.c: New.
7511         * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
7512         (HFILES_NO_SRCDIR): Add x86-tdep.h.
7513         (ALLDEPFILES): Add x86-tdep.c.
7514         * arch-utils.h (default_in_indirect_branch_thunk): New.
7515         * arch-utils.c (default_in_indirect_branch_thunk): New.
7516         * i386-tdep: Include x86-tdep.h.
7517         (i386_in_indirect_branch_thunk): New.
7518         (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
7519         function.
7520         * amd64-tdep: Include x86-tdep.h.
7521         (amd64_in_indirect_branch_thunk): New.
7522         (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
7523
7524 2018-04-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
7525
7526         PR gdb/23053
7527         * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
7528         (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
7529         (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
7530         regression.
7531
7532 2018-04-12  Tom Tromey  <tom@tromey.com>
7533
7534         * rust-lang.c (rust_print_struct_def): Remove univariant code.
7535         (rust_evaluate_subexp): Likewise.
7536
7537 2018-04-12  Pedro Alves  <palves@redhat.com>
7538
7539         * procfs.c (procfs_detach): Make forward declaration's prototype
7540         match definition's protototype.
7541         (proc_get_LDT_entry): Remove stale do_cleanups call.
7542
7543 2018-04-12  Pedro Alves  <palves@redhat.com>
7544
7545         * target.h (target_ops::to_has_exited): Delete.
7546         (target_has_exited): Delete.
7547         * target-delegates.c: Regenerate.
7548
7549 2018-04-11  Pedro Alves  <palves@redhat.com>
7550
7551         * target.c (fileio_fh_t::t): Add comment.
7552         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
7553         (target_fileio_close): Handle a NULL target.
7554         (invalidate_fileio_fh): New.
7555         (target_close): Call it.
7556         * remote.c (remote_hostio_send_command): No longer check whether
7557         remote_desc is open.
7558
7559 2018-04-11  Pedro Alves  <palves@redhat.com>
7560
7561         * target.c (fileio_fh_t): Make it a named struct instead of a
7562         typedef.
7563         (fileio_fh_t::is_closed): New method.
7564         (DEF_VEC_O (fileio_fh_t)): Remove.
7565         (fileio_fhandles): Now a std::vector.
7566         (is_closed_fileio_fh): Delete.
7567         (acquire_fileio_fd): Adjust.  Rename parameters.
7568         (release_fileio_fd): Adjust.
7569         (fileio_fd_to_fh): Reimplement as a function instead of a macro.
7570         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
7571         (target_fileio_close): Adjust.
7572
7573 2018-04-10  Simon Marchi  <simon.marchi@ericsson.com>
7574
7575         * auto-load.c (auto_load_safe_path_vec_update): Iterate by
7576         index.
7577
7578 2018-04-10  Pedro Alves  <palves@redhat.com>
7579
7580         * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
7581         (scoped_finish_thread_state): New class.
7582         * infcmd.c (run_command_1): Use it instead of finish_thread_state
7583         cleanup.
7584         * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
7585         (fetch_inferior_event, normal_stop): Likewise.
7586         * thread.c (finish_thread_state_cleanup): Delete.
7587
7588 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
7589             Pedro Alves  <palves@redhat.com>
7590
7591         * value.c: Include "selftest.h" and "common/array-view.h".
7592         (struct range) <operator ==>: New.
7593         (test_ranges_contain): New.
7594         (check_ranges_vector): New.
7595         (test_insert_into_bit_range_vector): New.
7596         (_initialize_values): Register selftests.
7597         * common/array-view.h (operator==, operator!=): New.
7598
7599 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
7600
7601         * common/gdb_vecs.h (unordered_remove): Add overload that takes
7602         an iterator.
7603         * inline-frame.c: Include <algorithm>.
7604         (struct inline_state): Add constructor.
7605         (inline_state_s): Remove.
7606         (DEF_VEC_O(inline_state_s)): Remove.
7607         (inline_states): Change type to std::vector.
7608         (find_inline_frame_state): Adjust to std::vector.
7609         (allocate_inline_frame_state): Remove.
7610         (clear_inline_frame_state): Adjust to std::vector.
7611         (skip_inline_frames): Adjust to std::vector.
7612
7613 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
7614
7615         * tracepoint.h (struct trace_state_variable): Add constructor.
7616         <name>: Change type to std::string.
7617         * tracepoint.c (tsv_s): Remove.
7618         (DEF_VEC_O(tsv_s)): Remove.
7619         (tvariables): Change to std::vector.
7620         (create_trace_state_variable): Adjust to std::vector.
7621         (find_trace_state_variable): Likewise.
7622         (find_trace_state_variable_by_number): Likewise.
7623         (delete_trace_state_variable): Likewise.
7624         (trace_variable_command): Adjust to std::string.
7625         (delete_trace_variable_command): Likewise.
7626         (tvariables_info_1): Adjust to std::vector.
7627         (save_trace_state_variables): Likewise.
7628         (start_tracing): Likewise.
7629         (merge_uploaded_trace_state_variables): Adjust to std::vector
7630         and std::string.
7631         * target.h (struct target_ops)
7632         <to_download_trace_state_variable>: Pass reference to
7633         trace_state_variable.
7634         * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
7635         * target-delegates.c: Re-generate.
7636         * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
7637         (mi_tsv_deleted): Likewise.
7638         * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
7639         * remote.c (remote_download_trace_state_variable): Change
7640         pointer to reference and adjust.
7641         * make-target-delegates (parse_argtypes): Handle references.
7642         (write_function_header): Likewise.
7643         (munge_type): Likewise.
7644
7645 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
7646
7647         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7648         string_view-selftests.c.
7649         * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
7650         testsuite.
7651         * unittests/basic_string_view/cons/char/1.cc: Likewise.
7652         * unittests/basic_string_view/cons/char/2.cc: Likewise.
7653         * unittests/basic_string_view/cons/char/3.cc: Likewise.
7654         * unittests/basic_string_view/element_access/char/1.cc:
7655         Likewise.
7656         * unittests/basic_string_view/element_access/char/empty.cc:
7657         Likewise.
7658         * unittests/basic_string_view/element_access/char/front_back.cc:
7659         Likewise.
7660         * unittests/basic_string_view/inserters/char/2.cc: Likewise.
7661         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
7662         Likewise.
7663         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
7664         Likewise.
7665         * unittests/basic_string_view/modifiers/swap/char/1.cc:
7666         Likewise.
7667         * unittests/basic_string_view/operations/compare/char/1.cc:
7668         Likewise.
7669         * unittests/basic_string_view/operations/compare/char/13650.cc:
7670         Likewise.
7671         * unittests/basic_string_view/operations/copy/char/1.cc:
7672         Likewise.
7673         * unittests/basic_string_view/operations/data/char/1.cc:
7674         Likewise.
7675         * unittests/basic_string_view/operations/find/char/1.cc:
7676         Likewise.
7677         * unittests/basic_string_view/operations/find/char/2.cc:
7678         Likewise.
7679         * unittests/basic_string_view/operations/find/char/3.cc:
7680         Likewise.
7681         * unittests/basic_string_view/operations/find/char/4.cc:
7682         Likewise.
7683         * unittests/basic_string_view/operations/rfind/char/1.cc:
7684         Likewise.
7685         * unittests/basic_string_view/operations/rfind/char/2.cc:
7686         Likewise.
7687         * unittests/basic_string_view/operations/rfind/char/3.cc:
7688         Likewise.
7689         * unittests/basic_string_view/operations/substr/char/1.cc:
7690         Likewise.
7691         * unittests/basic_string_view/operators/char/2.cc: Likewise.
7692         * unittests/string_view-selftests.c: New file.
7693
7694 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
7695
7696         * unittests/basic_string_view/capacity/1.cc: New file.
7697         * unittests/basic_string_view/capacity/empty_neg.cc: New file.
7698         * unittests/basic_string_view/cons/char/1.cc: New file.
7699         * unittests/basic_string_view/cons/char/2.cc: New file.
7700         * unittests/basic_string_view/cons/char/3.cc: New file.
7701         * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
7702         * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
7703         * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
7704         * unittests/basic_string_view/element_access/char/1.cc: New file.
7705         * unittests/basic_string_view/element_access/char/2.cc: New file.
7706         * unittests/basic_string_view/element_access/char/empty.cc: New file.
7707         * unittests/basic_string_view/element_access/char/front_back.cc: New file.
7708         * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
7709         * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
7710         * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
7711         * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
7712         * unittests/basic_string_view/include.cc: New file.
7713         * unittests/basic_string_view/inserters/char/1.cc: New file.
7714         * unittests/basic_string_view/inserters/char/2.cc: New file.
7715         * unittests/basic_string_view/inserters/char/3.cc: New file.
7716         * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
7717         * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
7718         * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
7719         * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
7720         * unittests/basic_string_view/literals/types.cc: New file.
7721         * unittests/basic_string_view/literals/values.cc: New file.
7722         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
7723         * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
7724         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
7725         * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
7726         * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
7727         * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
7728         * unittests/basic_string_view/operations/compare/char/1.cc: New file.
7729         * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
7730         * unittests/basic_string_view/operations/compare/char/2.cc: New file.
7731         * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
7732         * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
7733         * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
7734         * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
7735         * unittests/basic_string_view/operations/copy/char/1.cc: New file.
7736         * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
7737         * unittests/basic_string_view/operations/data/char/1.cc: New file.
7738         * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
7739         * unittests/basic_string_view/operations/find/char/1.cc: New file.
7740         * unittests/basic_string_view/operations/find/char/2.cc: New file.
7741         * unittests/basic_string_view/operations/find/char/3.cc: New file.
7742         * unittests/basic_string_view/operations/find/char/4.cc: New file.
7743         * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
7744         * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
7745         * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
7746         * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
7747         * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
7748         * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
7749         * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
7750         * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
7751         * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
7752         * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
7753         * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
7754         * unittests/basic_string_view/operations/substr/char/1.cc: New file.
7755         * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
7756         * unittests/basic_string_view/operators/char/2.cc: New file.
7757         * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
7758         * unittests/basic_string_view/range_access/char/1.cc: New file.
7759         * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
7760         * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
7761         * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
7762         * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
7763         * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
7764         * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
7765         * unittests/basic_string_view/requirements/typedefs.cc: New file.
7766         * unittests/basic_string_view/typedefs.cc: New file.
7767         * unittests/basic_string_view/types/1.cc: New file.
7768
7769 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
7770
7771         * common/gdb_string_view.h: Remove libstdc++ implementation
7772         details, adjust to gdb reality.
7773         * common/gdb_string_view.tcc: Likewise.
7774         * cli/cli-script.c (struct string_view): Remove.
7775         (user_args) <m_args>: Change element type to gdb::string_view.
7776         (user_args::insert_args): Adjust.
7777
7778 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
7779
7780         * common/gdb_string_view.h: New file.
7781         * common/gdb_string_view.tcc: New file.
7782
7783 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
7784
7785         * ax_cxx_compile_stdcxx.m4: Sync with upstream.
7786         * configure: Re-generate.
7787
7788 2018-04-09  Pedro Alves  <palves@redhat.com>
7789
7790         * gdbarch.sh: Include "observable.h" instead of "observer.h".
7791         (set_target_gdbarch): Call
7792         gdb::observers::architecture_changed.notify instead of
7793         observer_notify_architecture_changed.
7794
7795 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
7796
7797         * tracepoint.c (struct current_traceframe_cleanup): Remove.
7798         (do_restore_current_traceframe_cleanup): Remove.
7799         (restore_current_traceframe_cleanup_dtor): Remove.
7800         (make_cleanup_restore_current_traceframe): Remove.
7801         (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
7802         New.
7803         * tracepoint.h (struct scoped_restore_current_traceframe): New.
7804         * infrun.c (fetch_inferior_event): Use
7805         scoped_restore_current_traceframe.
7806
7807 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
7808
7809         * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
7810         Remove.
7811         <n_allocated_type_units>: Remove.
7812         <all_type_units>: Change to std::vector.
7813         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
7814         to std::vector change.
7815         (dwarf2_per_objfile::get_cutu): Likewise.
7816         (dwarf2_per_objfile::get_tu): Likewise.
7817         (create_signatured_type_table_from_index): Likewise.
7818         (create_signatured_type_table_from_debug_names): Likewise.
7819         (dw2_symtab_iter_next): Likewise.
7820         (dw2_print_stats): Likewise.
7821         (dw2_expand_all_symtabs): Likewise.
7822         (dw2_expand_marked_cus): Likewise.
7823         (dw2_debug_names_iterator::next): Likewise.
7824         (dwarf2_initialize_objfile): Likewise.
7825         (add_signatured_type_cu_to_table): Likewise.
7826         (create_all_type_units): Likewise.
7827         (add_type_unit): Likewise.
7828         (struct tu_abbrev_offset): Add constructor.
7829         (build_type_psymtabs_1): Adjust to std::vector change.
7830         (print_tu_stats): Likewise.
7831         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
7832         (write_debug_names): Likewise.
7833
7834 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
7835
7836         * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
7837         Make an std::vector.
7838         <n_comp_units>: Remove.
7839         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
7840         to std::vector change.
7841         (dwarf2_per_objfile::get_cutu): Likewise.
7842         (dwarf2_per_objfile::get_cu): Likewise.
7843         (create_cus_from_index): Likewise.
7844         (create_addrmap_from_index): Likewise.
7845         (create_addrmap_from_aranges): Likewise.
7846         (dwarf2_read_index): Likewise.
7847         (dw2_find_last_source_symtab): Likewise.
7848         (dw2_map_symtabs_matching_filename): Likewise.
7849         (dw2_symtab_iter_next): Likewise.
7850         (dw2_print_stats): Likewise.
7851         (dw2_expand_all_symtabs): Likewise.
7852         (dw2_expand_symtabs_with_fullname): Likewise.
7853         (dw2_expand_marked_cus): Likewise.
7854         (dw2_map_symbol_filenames): Likewise.
7855         (create_cus_from_debug_names): Likewise.
7856         (dwarf2_read_debug_names): Likewise.
7857         (dw2_debug_names_iterator::next): Likewise.
7858         (dwarf2_initialize_objfile): Likewise.
7859         (set_partial_user): Likewise.
7860         (dwarf2_build_psymtabs_hard): Likewise.
7861         (read_comp_units_from_section): Remove arguments, adjust to
7862         std::vector change.
7863         (create_all_comp_units): Adjust to std::vector and
7864         read_comp_units_from_section changes.
7865         (dwarf2_find_containing_comp_unit): Adjust to std::vector
7866         change.
7867         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
7868         (psyms_seen_size): Likewise.
7869         (write_gdbindex): Likewise.
7870         (write_debug_names): Likewise.
7871
7872 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
7873
7874         * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
7875         with dwarf2_per_objfile.
7876         (create_cus_from_index): Likewise.
7877         (create_signatured_type_table_from_index): Likewise.
7878         (dwarf2_read_index): Likewise.
7879         (dwarf2_initialize_objfile): Likewise.
7880         (dwarf2_fetch_die_loc_sect_off):  Get dwarf2_per_objfile from
7881         per_cu rather than get_dwarf2_per_objfile.
7882
7883 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
7884
7885         * dwarf2read.h (struct signatured_type): Forward declare.
7886         (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
7887         New methods.
7888         * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
7889         (dw2_get_cutu): ...this.
7890         (dwarf2_per_objfile::get_cu): Rename from...
7891         (dw2_get_cu): ...this.
7892         (dwarf2_per_objfile::get_tu): New.
7893         (create_addrmap_from_index): Adjust.
7894         (create_addrmap_from_aranges): Adjust.
7895         (dw2_find_last_source_symtab): Adjust.
7896         (dw2_map_symtabs_matching_filename): Adjust.
7897         (dw2_symtab_iter_next): Adjust.
7898         (dw2_print_stats): Adjust.
7899         (dw2_expand_all_symtabs): Adjust.
7900         (dw2_expand_symtabs_with_fullname): Adjust.
7901         (dw2_expand_marked_cus): Adjust.
7902         (dw_expand_symtabs_matching_file_matcher): Adjust.
7903         (dw2_map_symbol_filenames): Adjust.
7904         (dw2_debug_names_iterator::next): Adjust.
7905         (dwarf2_initialize_objfile): Adjust.
7906         (set_partial_user): Adjust.
7907         (dwarf2_build_psymtabs_hard): Adjust.
7908
7909 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
7910
7911         * dwarf2read.c (create_signatured_type_table_from_debug_names):
7912         Remove unused variables.
7913         (dw2_map_symtabs_matching_filename): Likewise.
7914         (dwarf2_record_block_ranges): Likewise.
7915         (dwarf2_read_addr_index): Likewise.
7916         (follow_die_offset): Likewise.
7917
7918 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
7919
7920         * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
7921         to symbol_file_add_main.
7922
7923 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
7924
7925         PR mi/22299
7926         * mi/mi-console.c (do_fputc_async_safe): New.
7927         (mi_console_file::write_async_safe): New.
7928         (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
7929         * mi/mi-console.h (class mi_console_file) <write_async_safe>:
7930         New.
7931         * ui-file.c (ui_file::putstrn): Adjust call to
7932         fputstrn_unfiltered.
7933         * utils.c (printchar): Replace do_fputs and do_fprintf
7934         parameters by do_fputc.
7935         (fputstr_filtered): Adjust call to printchar.
7936         (fputstr_unfiltered): Likewise.
7937         (fputstrn_filtered): Likewise.
7938         (fputstrn_unfiltered): Add do_fputc parameter, pass to
7939         printchar.
7940         * utils.h (do_fputc_ftype): New typedef.
7941         (fputstrn_unfiltered): Add do_fputc parameter.
7942
7943 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
7944
7945         * regformats/i386/i386-avx.dat: Remove.
7946
7947 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
7948
7949         PR gdb/22979
7950         * amd64-tdep.c (amd64_none_init_abi): New function.
7951         (amd64_x32_none_init_abi): New function.
7952         (_initialize_amd64_tdep): Register handlers for x86-64 and
7953         x64_32 with GDB_OSABI_NONE.
7954         * osabi.c (gdbarch_init_osabi): Allow running handlers for the
7955         GDB_OSABI_NONE osabi.
7956
7957 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
7958
7959         PR gdb/22980
7960         * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
7961         GDB_OSABI_NONE.
7962         * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
7963         * osabi.c (gdb_osabi_names): Add "unknown" entry.
7964
7965 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
7966
7967         * common/byte-vector.h (char_vector): New type.
7968         * target.h (target_read_alloc): Return
7969         gdb::optional<byte_vector>.
7970         (target_read_stralloc): Return gdb::optional<char_vector>.
7971         (target_get_osdata): Return gdb::optional<char_vector>.
7972         * target.c (target_read_alloc_1): Templatize.  Replacement
7973         manual memory management with vector.
7974         (target_read_alloc): Change return type, adjust.
7975         (target_read_stralloc): Change return type, adjust.
7976         (target_get_osdata): Change return type, adjust.
7977         * auxv.c (struct auxv_info) <length>: Remove.
7978         <data>: Change type to gdb::optional<byte_vector>.
7979         (auxv_inferior_data_cleanup): Free auxv_info with delete.
7980         (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
7981         (target_auxv_search): Adjust.
7982         (fprint_target_auxv): Adjust.
7983         * avr-tdep.c (avr_io_reg_read_command): Adjust.
7984         * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
7985         (linux_make_corefile_notes): Adjust.
7986         * osdata.c (get_osdata): Adjust.
7987         * remote.c (remote_get_threads_with_qxfer): Adjust.
7988         (remote_memory_map): Adjust.
7989         (remote_traceframe_info): Adjust.
7990         (btrace_read_config): Adjust.
7991         (remote_read_btrace): Adjust.
7992         (remote_pid_to_exec_file): Adjust.
7993         * solib-aix.c (solib_aix_get_library_list): Adjust.
7994         * solib-dsbt.c (decode_loadmap): Don't free buf.
7995         (dsbt_get_initial_loadmaps): Adjust.
7996         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
7997         * solib-target.c (solib_target_current_sos): Adjust.
7998         * tracepoint.c (sdata_make_value): Adjust.
7999         * xml-support.c (xinclude_start_include): Adjust.
8000         (xml_fetch_content_from_file): Adjust.
8001         * xml-support.h (xml_fetch_another): Change return type.
8002         (xml_fetch_content_from_file): Change return type.
8003         * xml-syscall.c (xml_init_syscalls_info): Adjust.
8004         * xml-tdesc.c (file_read_description_xml): Adjust.
8005         (fetch_available_features_from_target): Change return type.
8006         (target_fetch_description_xml): Adjust.
8007         (target_read_description_xml): Adjust.
8008
8009 2018-04-06  Tom Tromey  <tom@tromey.com>
8010
8011         * value.c (~value): Update.
8012         (struct value) <contents>: Now unique_xmalloc_ptr.
8013         (value_contents_bits_eq, allocate_value_contents)
8014         (value_contents_raw, value_contents_all_raw)
8015         (value_contents_for_printing, value_contents_for_printing_const)
8016         (set_value_enclosing_type): Update.
8017
8018 2018-04-06  Tom Tromey  <tom@tromey.com>
8019
8020         * value.c (range_s): Remove typedef, VEC.
8021         (struct range): Add operator<.
8022         (range_lessthan): Remove.
8023         (ranges_contain): Change type.
8024         (~value): Update.
8025         (struct value) <unavailable, optimized_out>: Now std::vector.
8026         (value_entirely_available)
8027         (value_entirely_covered_by_range_vector)
8028         (value_entirely_unavailable, value_entirely_optimized_out):
8029         Update.
8030         (insert_into_bit_range_vector): Change argument type.
8031         (find_first_range_overlap): Likewise.
8032         (struct ranges_and_idx, value_contents_bits_eq)
8033         (require_not_optimized_out, require_available): Update.
8034         (ranges_copy_adjusted): Change argument types.
8035         (value_optimized_out, value_copy, value_fetch_lazy): Update.
8036
8037 2018-04-06  Tom Tromey  <tom@tromey.com>
8038
8039         * value.c (~value): Update.
8040         (struct value) <parent>: Now a value_ref_ptr.
8041         (value_parent, set_value_parent, value_address, value_copy):
8042         Update.
8043
8044 2018-04-06  Tom Tromey  <tom@tromey.com>
8045
8046         * value.c (struct value): Add constructor, destructor, and member
8047         initializers.
8048         (allocate_value_lazy, value_decref): Update.
8049
8050 2018-04-06  Tom Tromey  <tom@tromey.com>
8051
8052         * value.c (struct value) <released, next>: Remove.
8053         (all_values): Now a std::vector.
8054         (allocate_value_lazy): Update.
8055         (value_next): Remove.
8056         (value_mark, value_free_to_mark, release_value)
8057         (value_release_to_mark): Update.
8058
8059 2018-04-06  Tom Tromey  <tom@tromey.com>
8060
8061         * value.h (fetch_subexp_value, value_release_to_mark): Update.
8062         (free_value_chain): Remove.
8063         * value.c (free_value_chain): Remove.
8064         (value_release_to_mark): Return a std::vector.
8065         * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
8066         std::vector.
8067         (check_condition): Update.
8068         * eval.c (fetch_subexp_value): Change "val_chain" to a
8069         std::vector.
8070         * breakpoint.c (update_watchpoint): Update.
8071         (can_use_hardware_watchpoint): Change "vals" to a std::vector.
8072
8073 2018-04-06  Tom Tromey  <tom@tromey.com>
8074
8075         * value.h (free_all_values): Remove.
8076         * value.c (free_all_values): Remove.
8077
8078 2018-04-06  Tom Tromey  <tom@tromey.com>
8079
8080         * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
8081         (value_history_chain, value_history_count): Remove.
8082         (value_history): New global.
8083         (record_latest_value, access_value_history, show_values)
8084         (preserve_values): Update.
8085
8086 2018-04-06  Tom Tromey  <tom@tromey.com>
8087
8088         * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
8089         * varobj.c (varobj_set_display_format, varobj_set_value)
8090         (install_default_visualizer, construct_visualizer)
8091         (install_new_value, ~varobj, varobj_get_value_type)
8092         (my_value_of_variable, varobj_editable_p): Update.
8093         * c-varobj.c (c_describe_child, c_value_of_variable)
8094         (cplus_number_of_children, cplus_describe_child): Update.
8095         * ada-varobj.c (ada_number_of_children, ada_name_of_child)
8096         (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
8097         (ada_value_of_variable, ada_value_is_changeable_p): Update.
8098
8099 2018-04-06  Tom Tromey  <tom@tromey.com>
8100
8101         * printcmd.c (last_examine_address): Change type to
8102         value_ref_ptr.
8103         (do_examine, x_command): Update.
8104
8105 2018-04-06  Tom Tromey  <tom@tromey.com>
8106
8107         * value.c (release_value): Update.
8108         * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
8109         (struct bpstats) <val>: Now a value_ref_ptr.
8110         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
8111         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
8112         (~watchpoint, print_it_watchpoint, watch_command_1)
8113         (invalidate_bp_value_on_memory_change): Update.
8114
8115 2018-04-06  Tom Tromey  <tom@tromey.com>
8116
8117         * varobj.c (varobj_clear_saved_item)
8118         (update_dynamic_varobj_children, install_new_value, ~varobj):
8119         Update.
8120         * value.h (value_incref): Move declaration earlier.
8121         (value_decref): Rename from value_free.
8122         (struct value_ref_policy): New.
8123         (value_ref_ptr): New typedef.
8124         (struct value_deleter): Remove.
8125         (gdb_value_up): Remove typedef.
8126         (release_value): Change return type.
8127         (release_value_or_incref): Remove.
8128         * value.c (set_value_parent): Update.
8129         (value_incref): Change return type.
8130         (value_decref): Rename from value_free.
8131         (value_free_to_mark, free_all_values, free_value_chain): Update.
8132         (release_value): Return value_ref_ptr.
8133         (release_value_or_incref): Remove.
8134         (record_latest_value, set_internalvar, clear_internalvar):
8135         Update.
8136         * stack.c (info_frame_command): Don't call value_free.
8137         * python/py-value.c (valpy_dealloc, valpy_new)
8138         (value_to_value_object): Update.
8139         * printcmd.c (do_examine): Update.
8140         * opencl-lang.c (lval_func_free_closure): Update.
8141         * mi/mi-main.c (register_changed_p): Don't call value_free.
8142         * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
8143         * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
8144         * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
8145         value_free.
8146         * guile/scm-value.c (vlscm_free_value_smob)
8147         (vlscm_scm_from_value): Update.
8148         * frame.c (frame_register_unwind, frame_unwind_register_signed)
8149         (frame_unwind_register_unsigned, get_frame_register_bytes)
8150         (put_frame_register_bytes): Don't call value_free.
8151         * findvar.c (address_from_register): Don't call value_free.
8152         * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
8153         * dwarf2loc.c (entry_data_value_free_closure)
8154         (value_of_dwarf_reg_entry, free_pieced_value_closure)
8155         (dwarf2_evaluate_loc_desc_full): Update.
8156         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
8157         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
8158         (~watchpoint, watch_command_1)
8159         (invalidate_bp_value_on_memory_change): Update.
8160         * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
8161
8162 2018-04-06  Simon Marchi  <simon.marchi@polymtl.ca>
8163
8164         PR gdb/23022
8165         * warning.m4: Add -Wno-error=deprecated-register.
8166         * configure: Re-generate.
8167
8168 2018-04-05  Tom Tromey  <tom@tromey.com>
8169
8170         * linespec.h: Remove include of "vec.h".
8171
8172 2018-04-05  Tom Tromey  <tom@tromey.com>
8173
8174         * linespec.c (typep): Remove typedef.
8175         (find_methods, find_superclass_methods): Take a std::vector.
8176         (find_method): Use std::vector.
8177
8178 2018-04-05  Tom Tromey  <tom@tromey.com>
8179
8180         * utils.c (compare_strings): Remove.
8181         * utils.h (compare_strings): Remove.
8182         * objc-lang.h (find_imps): Update.
8183         * objc-lang.c (find_methods): Take a std::vector.
8184         (uniquify_strings, find_imps): Likewise.
8185         * linespec.c (find_methods): Take a std::vector.
8186         (decode_objc): Use std::vector.
8187         (add_all_symbol_names_from_pspace, find_superclass_methods): Take
8188         a std::vector.
8189         (find_method, find_function_symbols): Use std::vector.
8190
8191 2018-04-05  Tom Tromey  <tom@tromey.com>
8192
8193         * completer.c (completion_tracker::completion_tracker): Remove
8194         cast.
8195         (completion_tracker::discard_completions): Likewise.
8196         * breakpoint.c (ambiguous_names_p): Remove cast.
8197         * ada-lang.c (_initialize_ada_language): Remove cast.
8198         * utils.h (streq): Update.
8199         (streq_hash): Add new declaration.
8200         * utils.c (streq): Return bool.
8201         (streq_hash): New function.
8202
8203 2018-04-05  Tom Tromey  <tom@tromey.com>
8204
8205         * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
8206         Remove a string copy.
8207
8208 2018-04-05  Tom Tromey  <tom@tromey.com>
8209
8210         * linespec.c (filter_results): Use std::vector.
8211         (decode_line_2, decode_line_full): Update.
8212
8213 2018-04-05  Tom Tromey  <tom@tromey.com>
8214
8215         * linespec.c (canonical_to_fullform): Return std::string.
8216         (filter_results): Update.
8217         (struct decode_line_2_item): Add constructor.
8218         <fullform, displayform>: Now std::string.
8219         (decode_line_2_compare_items): Now a std::sort comparator.
8220         (decode_line_2): Update.
8221
8222 2018-04-05  Tom Tromey  <tom@tromey.com>
8223
8224         * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
8225         (unexpected_linespec_error): Update.
8226         (linespec_parse_basic, parse_linespec): Update.
8227
8228 2018-04-05  Tom Tromey  <tom@tromey.com>
8229
8230         * linespec.c (linespec_parse_basic): Reindent.
8231
8232 2018-04-05  Tom Tromey  <tom@tromey.com>
8233
8234         * minsyms.h (iterate_over_minimal_symbols): Update.
8235         * minsyms.c (iterate_over_minimal_symbols): Take a
8236         gdb::function_view.
8237         * linespec.c (struct collect_minsyms): Remove.
8238         (compare_msyms): Now a std::sort comparator.
8239         (add_minsym): Add parameters.
8240         (search_minsyms_for_name): Update.  Use std::vector.
8241
8242 2018-04-03  Tom Tromey  <tom@tromey.com>
8243
8244         * mipsread.c (read_alphacoff_dynamic_symtab): Use
8245         gdb::byte_vector.
8246
8247 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
8248
8249         * MAINTAINERS (Write After Approval): Add Weimin Pan.
8250
8251 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
8252
8253         PR gdb/16959
8254         * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when 
8255         printing static type.
8256
8257 2018-04-01  Tom Tromey  <tom@tromey.com>
8258
8259         * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
8260         (rs6000_xfer_shared_libraries): Update.
8261
8262 2018-04-01  Simon Marchi  <simon.marchi@polymtl.ca>
8263
8264         * common/gdb_vecs.h (char_ptr): Remove.
8265         * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
8266
8267 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
8268
8269         * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
8270         with std::vector.
8271         * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
8272
8273 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
8274
8275         * tracepoint.h (struct uploaded_tp): Initialize fields.
8276         <actions, step_actions, cmd_strings>: Change type to
8277         std::vector<char *>.
8278         * tracepoint.c (get_uploaded_tp): Allocate with new.
8279         (free_uploaded_tps): Free with delete.
8280         (parse_tracepoint_definition): Adjust to std::vector change.
8281         * breakpoint.c (read_uploaded_action): Likewise.
8282         (create_tracepoint_from_upload): Likewise.
8283         * ctf.c (ctf_write_uploaded_tp): Likewise.
8284         (SET_ARRAY_FIELD): Likewise.
8285         * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
8286
8287 2018-03-30  Tom Tromey  <tom@tromey.com>
8288
8289         * solib-svr4.c (lm_info_read): Use gdb::byte_vector.  Return
8290         std::unique_ptr.
8291         (svr4_keep_data_in_core): Update.
8292         (svr4_read_so_list): Update.
8293
8294 2018-03-30  Tom Tromey  <tom@tromey.com>
8295
8296         * windows-nat.c (handle_output_debug_string, handle_exception):
8297         Update.
8298         * target.h (target_read_string): Update.
8299         * target.c (target_read_string): Change "string" to
8300         unique_xmalloc_ptr.
8301         * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
8302         Update.
8303         * solib-frv.c (frv_current_sos): Update.
8304         * solib-dsbt.c (dsbt_current_sos): Update.
8305         * solib-darwin.c (darwin_current_sos): Update.
8306         * linux-thread-db.c (inferior_has_bug): Update.
8307         * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
8308         Update.  Remove alloca.
8309         * ada-lang.c (ada_main_name): Update.
8310
8311 2018-03-30  Tom Tromey  <tom@tromey.com>
8312
8313         * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
8314         (struct dwo_file_deleter): New.
8315         (dwo_file_up): New typedef.
8316         (open_and_init_dwo_file): Use dwo_file_up.
8317         (free_dwo_file_cleanup): Remove.
8318
8319 2018-03-30  Tom Tromey  <tom@tromey.com>
8320
8321         * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
8322         (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
8323
8324 2018-03-30  Tom Tromey  <tom@tromey.com>
8325
8326         * dwarf2read.c (class free_cached_comp_units): New class.
8327         (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
8328         (free_cached_comp_units): Remove function.
8329
8330 2018-03-30  Tom Tromey  <tom@tromey.com>
8331
8332         * utils.h (make_cleanup_unpush_target): Remove.
8333         * inf-ptrace.c (struct target_unpusher): New.
8334         (target_unpush_up) New typedef.
8335         (inf_ptrace_create_inferior, inf_ptrace_attach): Use
8336         target_unpush_up.
8337         * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
8338
8339 2018-03-27  Tom Tromey  <tom@tromey.com>
8340
8341         * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
8342
8343 2018-03-27  Pedro Alves  <palves@redhat.com>
8344             Tom Tromey  <tom@tromey.com>
8345
8346         * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
8347         destructor.  Now a class.
8348         (gdb_readline_wrapper_cleanup): Remove function.
8349         (gdb_readline_wrapper): Remove cleanups.
8350
8351 2018-03-27  Tom Tromey  <tom@tromey.com>
8352
8353         * typeprint.h (struct type_print_options) <local_typedefs,
8354         global_typedefs>: Remove "struct" keyword.
8355         (class typedef_hash_table): New class.
8356         (recursively_update_typedef_hash, add_template_parameters)
8357         (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
8358         (find_typedef_in_hash): Don't declare.
8359         * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
8360         (typedef_hash_table::recursively_update): Rename from
8361         recursively_update_typedef_hash.  Now a member.
8362         (typedef_hash_table::add_template_parameters): Rename from
8363         add_template_parameters.  Now a member.
8364         (typedef_hash_table::typedef_hash_table): Now a constructor;
8365         rename from create_typedef_hash.
8366         (typedef_hash_table::~typedef_hash_table): Now a destructor;
8367         rename from free_typedef_hash.
8368         (do_free_typedef_hash, make_cleanup_free_typedef_hash)
8369         (do_free_global_table): Remove.
8370         (typedef_hash_table::typedef_hash_table): New constructor; renamed
8371         from copy_type_recursive.
8372         (create_global_typedef_table): Remove.
8373         (typedef_hash_table::find_global_typedef): Now a member of
8374         typedef_hash_table.
8375         (typedef_hash_table::find_typedef): Rename from
8376         find_typedef_in_hash; now a member.
8377         (whatis_exp): Update.
8378         * extension.h (struct ext_lang_type_printers): Add constructor and
8379         destructor.
8380         (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
8381         declare.
8382         * extension.c (ext_lang_type_printers::ext_lang_type_printers):
8383         Now a constructor; rename from start_ext_lang_type_printers.
8384         (ext_lang_type_printers): Now a destructor; rename from
8385         free_ext_lang_type_printers.
8386         * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
8387         Update.
8388         (c_type_print_base_struct_union): Update.  Remove cleanups.
8389
8390 2018-03-27  Tom Tromey  <tom@tromey.com>
8391
8392         * dwarf-index-write.c: Include <cmath>.
8393
8394 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
8395
8396         * NEWS: Add entry describing new "set|show varsize-limit" command.
8397         * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
8398         command.
8399         * printcmd.c (_initialize_printcmd): Add "set var" alias of
8400         "set variable".
8401
8402 2018-03-27  Simon Marchi  <simon.marchi@ericsson.com>
8403
8404         * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
8405         dwarf-index-write.c
8406         (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
8407         * dwarf-index-common.c: New file.
8408         * dwarf-index-common.h: New file.
8409         * dwarf-index-write.c: New file.
8410         * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
8411         (struct dwarf2_section_info): Move from here.
8412         (dwarf2_section_info_def): Likewise.
8413         (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
8414         (offset_type): Likewise.
8415         (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
8416         (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
8417         (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
8418         (byte_swap): Likewise.
8419         (MAYBE_SWAP): Likewise.
8420         (dwarf2_per_cu_ptr): Likewise.
8421         (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
8422         (struct tu_stats): Likewise.
8423         (struct dwarf2_per_objfile): Likewise.
8424         (struct dwarf2_per_cu_data): Likewise.
8425         (struct signatured_type): Likewise.
8426         (sig_type_ptr): Likewise.
8427         (DEF_VEC_P (sig_type_ptr)): Likewise.
8428         (INDEX4_SUFFIX): Likewise.
8429         (INDEX5_SUFFIX): Likewise.
8430         (DEBUG_STR_SUFFIX): Likewise.
8431         (dwarf2_read_section): Make non-static.
8432         (mapped_index_string_hash): Move from here.
8433         (dwarf5_djb_hash): Likewise.
8434         (file_write): Likewise.
8435         (class data_buf): Likewise.
8436         (struct symtab_index_entry): Likewise.
8437         (struct mapped_symtab): Likewise.
8438         (find_slot): Likewise.
8439         (hash_expand): Likewise.
8440         (add_index_entry): Likewise.
8441         (uniquify_cu_indices): Likewise.
8442         (class c_str_view): Likewise.
8443         (class c_str_view_hasher): Likewise.
8444         (class vector_hasher): Likewise.
8445         (write_hash_table): Likewise.
8446         (psym_index_map): Likewise.
8447         (struct addrmap_index_data): Likewise.
8448         (add_address_entry): Likewise.
8449         (add_address_entry_worker): Likewise.
8450         (write_address_map): Likewise.
8451         (symbol_kind): Likewise.
8452         (write_psymbols): Likewise.
8453         (struct signatured_type_index_data): Likewise.
8454         (write_one_signatured_type): Likewise.
8455         (recursively_count_psymbols): Likewise.
8456         (recursively_write_psymbols): Likewise.
8457         (class debug_names): Likewise.
8458         (check_dwarf64_offsets): Likewise.
8459         (psyms_seen_size): Likewise.
8460         (write_gdbindex): Likewise.
8461         (write_debug_names): Likewise.
8462         (assert_file_size): Likewise.
8463         (write_psymtabs_to_index): Likewise.
8464         (save_gdb_index_command): Likewise.
8465         (_initialize_dwarf2_read): Don't register the "save gdb-index"
8466         command.
8467         * dwarf2read.h: New file.
8468
8469 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
8470
8471         PR gdb/22670
8472         * dwarf2read.c (dwarf2_physname): Do not return the demangled
8473         symbol name if the CU's language stores symbol names in linkage
8474         format.
8475         * language.h (struct language_defn)
8476         <la_store_sym_names_in_linkage_form_p>: New field.  Adjust
8477         all instances of this struct.
8478
8479 2018-03-26  Tom Tromey  <tom@tromey.com>
8480
8481         * stack.c (backtrace_command_1): Remove verbose code.
8482
8483 2018-03-26  Tom Tromey  <tom@tromey.com>
8484
8485         * python/py-framefilter.c (py_print_type): Don't catch
8486         exceptions.  Return void.
8487         (py_print_value): Likewise.
8488         (py_print_single_arg): Likewise.
8489         (enumerate_args): Don't catch exceptions.
8490         (py_print_args): Likewise.
8491         (py_print_frame): Likewise.
8492         (gdbpy_apply_frame_filter): Catch exceptions here.
8493
8494 2018-03-26  Tom Tromey  <tom@tromey.com>
8495
8496         * stack.c (_initialize_stack): Remove trailing newlines from help
8497         text.  Add "Usage" line to "backtrace" help.
8498
8499 2018-03-26  Tom Tromey  <tom@tromey.com>
8500
8501         PR python/16486:
8502         * python/py-framefilter.c (py_print_args): Call wrap_hint.
8503
8504 2018-03-26  Tom Tromey  <tom@tromey.com>
8505
8506         * python/py-framefilter.c (py_print_single_arg): Return
8507         EXT_LANG_BT_ERROR from catch.
8508
8509 2018-03-26  Tom Tromey  <tom@tromey.com>
8510
8511         PR backtrace/15584:
8512         * stack.c (backtrace_command_1): Move some code into no-filters
8513         "if".
8514
8515 2018-03-26  Tom Tromey  <tom@tromey.com>
8516
8517         * python/py-framefilter.c (throw_quit_or_print_exception): New
8518         function.
8519         (gdbpy_apply_frame_filter): Use it.
8520
8521 2018-03-26  Tom Tromey  <tom@tromey.com>
8522
8523         PR cli/17716:
8524         * python/py-framefilter.c (py_print_type, py_print_value)
8525         (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
8526         RETURN_MASK_ERROR.
8527
8528 2018-03-26  Tom Tromey  <tom@tromey.com>
8529
8530         * python/py-framefilter.c (enumerate_args): Use
8531         gdb::unique_xmalloc_ptr.
8532
8533 2018-03-26  Tom Tromey  <tom@tromey.com>
8534
8535         * python/py-framefilter.c (py_print_frame): Return
8536         EXT_LANG_BT_OK.
8537         (gdbpy_apply_frame_filter): Update comment.
8538         * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
8539         Remove.
8540         <EXT_LANG_BT_NO_FILTERS>: Change value.
8541
8542 2018-03-26  Tom Tromey  <tom@tromey.com>
8543
8544         PR backtrace/15582:
8545         * stack.c (backtrace_command): Parse "hide" argument.
8546         * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
8547         * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
8548         constant.
8549
8550 2018-03-26  Tom Tromey  <tom@tromey.com>
8551
8552         * stack.c (backtrace_command_1): Remove "show_locals" parameter,
8553         add "flags".
8554         (backtrace_command): Remove "fulltrace", add "flags".
8555
8556 2018-03-26  Tom Tromey  <tom@tromey.com>
8557
8558         * stack.c (backtrace_command): Rewrite command line parsing.
8559
8560 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
8561
8562         * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
8563
8564 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
8565
8566         * filename-seen-cache.h: Add include guard.
8567
8568 2018-03-26  Keith Seitz  <keiths@redhat.com>
8569
8570         * symfile.c (place_section): Remove "struct" from section_addr_info
8571         in comment.
8572         * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
8573         "struct" keyword from section_addr_info.
8574
8575 2018-03-26  Alan Hayward  <alan.hayward@arm.com>
8576
8577         * regformats/regdef.h (reg): Add constructors.
8578
8579 2018-03-25  Pedro Alves  <palves@redhat.com>
8580
8581         * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
8582         if then/else bodies in var_func_name extraction.
8583
8584 2018-03-23  Weimin Pan  <weimin.pan@oracle.com>
8585
8586         * minsyms.c (lookup_minimal_symbol_and_objfile): Use
8587         lookup_minimal_symbol() to find symbol entry.
8588         * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
8589
8590 2018-03-23  Keith Seitz  <keiths@redhat.com>
8591
8592         PR c++/22968
8593         * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
8594         nested type definitions for C++, too.
8595
8596 2018-03-23  Tom Tromey  <tom@tromey.com>
8597
8598         * machoread.c (struct oso_el): Add a constructor.  Don't define as
8599         a typedef.
8600         (macho_register_oso): Remove.
8601         (macho_symtab_read): Take a std::vector.
8602         (oso_el_compare_name): Now a std::sort comparator.
8603         (macho_symfile_read_all_oso): Take a std::vector.
8604         (macho_symfile_read): Use std::vector.  Remove cleanups.
8605
8606 2018-03-22  Tom Tromey  <tom@tromey.com>
8607
8608         * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
8609         (record_full_goto_bookmark): Use std::string.
8610
8611 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8612
8613         PR tdep/18295
8614         * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
8615         a single mask.
8616
8617 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8618
8619         * rs6000-tdep.c (store_insn_p): New function.
8620         (skip_prologue): New variable alloca_reg_offset. Set lr_reg
8621         and cr_reg to their unshifted values. Use store_insn_p to
8622         match LR saves using either R1 or fdata->alloca_reg. Use
8623         store_insn_p to match CR saves. Set alloca_reg_offset
8624         when alloca_reg and framep are set. Remove lr_reg shift
8625         when assigning to fdata->lr_register.
8626
8627 2018-03-22  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8628
8629         * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
8630         command line args instead of emitting a warning.
8631
8632 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
8633
8634         * tracepoint.h (struct static_tracepoint_marker): Initialize
8635         fields, define default constructor, move constructor and move
8636         assignment, disable the rest.
8637         <str_id, extra>: Make std::string.
8638         (release_static_tracepoint_marker): Remove.
8639         (free_current_marker): Remove.
8640         * tracepoint.c (free_current_marker): Remove.
8641         (parse_static_tracepoint_marker_definition): Adjust to
8642         std::string, use new hex2str overload.
8643         (release_static_tracepoint_marker): Remove.
8644         (print_one_static_tracepoint_marker): Get marker by reference
8645         and adjust to std::string.
8646         (info_static_tracepoint_markers_command): Adjust to std::vector
8647         changes
8648         * target.h (static_tracepoint_marker_p): Remove typedef.
8649         (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
8650         (struct target_ops) <to_static_tracepoint_marker_at>: Return
8651         bool.
8652         <to_static_tracepoint_markers_by_strid>: Return std::vector.
8653         * target-debug.h
8654         (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
8655         (target_debug_print_std_vector_static_tracepoint_marker): New.
8656         (target_debug_print_struct_static_tracepoint_marker_p): Rename
8657         to...
8658         (target_debug_print_static_tracepoint_marker_p): ... this.
8659         * target-delegates.c: Re-generate.
8660         * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
8661         Make std::string.
8662         * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
8663         (decode_static_tracepoint_spec): Adjust to std::vector.
8664         (tracepoint_print_one_detail): Adjust to std::string.
8665         (strace_marker_decode_location): Adjust to std::string.
8666         (update_static_tracepoint): Adjust to std::string, remove call
8667         to release_static_tracepoint_marker.
8668         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
8669         Adjust to std::vector.
8670         * remote.c (remote_static_tracepoint_marker_at): Return bool.
8671         (remote_static_tracepoint_markers_by_strid): Adjust to
8672         std::vector.
8673         * common/rsp-low.h (hex2str): New overload with explicit count
8674         of bytes.
8675         * common/rsp-low.c (hex2str): New overload with explicit count
8676         of bytes.
8677         * unittests/rsp-low-selftests.c (test_hex2str): New function.
8678         (_initialize_rsp_low_selftests): Add test_hex2str test.
8679         * unittests/tracepoint-selftests.c
8680         (test_parse_static_tracepoint_marker_definition): Adjust to
8681         std::string.
8682
8683 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
8684
8685         * tracepoint.c (parse_static_tracepoint_marker_definition):
8686         Consider case where the definition is followed by more
8687         definitions.
8688         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8689         tracepoint-selftests.c.
8690         * unittests/tracepoint-selftests.c: New.
8691
8692 2018-03-21  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8693
8694         * MAINTAINERS (Write After Approval): Add Pedro Franco de
8695         Carvalho.
8696
8697 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
8698
8699         * symtab.c (find_pc_sect_line): fixed indentation.
8700
8701 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
8702
8703         * symtab.c (find_pc_sect_line): now uses binary search.
8704
8705 2018-03-19  Tom Tromey  <tom@tromey.com>
8706
8707         * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
8708         "IDENT" production.
8709
8710 2018-03-19  Pedro Alves  <palves@redhat.com>
8711             Tom Tromey  <tom@tromey.com>
8712
8713         * unittests/observable-selftests.c: New file.
8714         * common/observable.h: New file.
8715         * observable.h: New file.
8716         * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
8717         arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
8718         breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
8719         corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
8720         extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
8721         infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
8722         linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
8723         mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
8724         ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
8725         python/py-breakpoint.c, python/py-finishbreakpoint.c,
8726         python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
8727         record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
8728         riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
8729         spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
8730         symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
8731         tui/tui-interp.c, valops.c: Update all users.
8732         * tui/tui-hooks.c (tui_bp_created_observer)
8733         (tui_bp_deleted_observer, tui_bp_modified_observer)
8734         (tui_inferior_exit_observer, tui_before_prompt_observer)
8735         (tui_normal_stop_observer, tui_register_changed_observer):
8736         Remove.
8737         (tui_observers_token): New global.
8738         (attach_or_detach, tui_attach_detach_observers): New functions.
8739         (tui_install_hooks, tui_remove_hooks): Use
8740         tui_attach_detach_observers.
8741         * record-btrace.c (record_btrace_thread_observer): Remove.
8742         (record_btrace_thread_observer_token): New global.
8743         * observer.sh: Remove.
8744         * observer.c: Rename to observable.c.
8745         * observable.c (namespace gdb_observers): Define new objects.
8746         (observer_debug): Move into gdb_observers namespace.
8747         (struct observer, struct observer_list, xalloc_observer_list_node)
8748         (xfree_observer_list_node, generic_observer_attach)
8749         (generic_observer_detach, generic_observer_notify): Remove.
8750         (_initialize_observer): Update.
8751         Don't include observer.inc.
8752         * Makefile.in (generated_files): Remove observer.h, observer.inc.
8753         (clean mostlyclean): Likewise.
8754         (observer.h, observer.inc): Remove targets.
8755         (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
8756         (COMMON_SFILES): Use observable.c, not observer.c.
8757         * .gitignore: Remove observer.h.
8758
8759 2018-03-18  Tom Tromey  <tom@tromey.com>
8760
8761         * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
8762         gdb::def_vector.
8763         (bfd_lookup_symbol_from_dyn_symtab): Likewise.
8764
8765 2018-03-17  Tom Tromey  <tom@tromey.com>
8766
8767         * auto-load.c (auto_load_objfile_script_1): Use std::string.
8768
8769 2018-03-17  Tom Tromey  <tom@tromey.com>
8770
8771         * target.c (class scoped_target_fd): New.
8772         (target_fileio_close_cleanup): Remove.
8773         (target_fileio_read_alloc_1): Use scoped_target_fd.
8774
8775 2018-03-16  Simon Marchi  <simon.marchi@polymtl.ca>
8776
8777         * silent-rules.mk: New.
8778         * Makefile.in: Include silent-rules.mk
8779         (srcdir, VPATH, top_srcdir): Move up.
8780         (COMPILE): Add ECHO_CXX.
8781         (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
8782         (init.c): Add ECHO_INIT_C.
8783         (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
8784         (version.c): Add ECHO_GEN.
8785         (printcmd.o): Add ECHO_CXX.
8786         (target-float.o): Add ECHO_CXX.
8787         (ada-exp.o): Add ECHO_CXX.
8788         (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
8789         (insight$(EXEEXT)): Add ECHO_CXXLD.
8790         * gnulib/configure.ac: Add AM_SILENT_RULES.
8791         * gnulib/aclocal.m4: Re-generate.
8792         * gnulib/configure: Re-generate.
8793         * gnulib/import/Makefile.in: Re-generate.
8794
8795 2018-03-16  Tom Tromey  <tom@tromey.com>
8796
8797         * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
8798         * utils.h (make_cleanup_free_section_addr_info): Don't declare.
8799         * utils.c (do_free_section_addr_info)
8800         (make_cleanup_free_section_addr_info): Remove.
8801         * symfile.h (struct other_sections): Add constructor.
8802         (struct section_addr_info): Remove.
8803         (section_addr_info): New typedef.
8804         (struct sym_fns) <sym_offsets>: Change type of parameter.
8805         (build_section_addr_info_from_objfile)
8806         (relative_addr_info_to_section_offsets, addr_info_make_relative)
8807         (default_symfile_offsets, symbol_file_add)
8808         (symbol_file_add_from_bfd)
8809         (build_section_addr_info_from_section_table): Update.
8810         (alloc_section_addr_info, free_section_addr_info): Don't declare.
8811         * symfile.c (alloc_section_addr_info): Remove.
8812         (build_section_addr_info_from_section_table): Change return type.
8813         Update.
8814         (build_section_addr_info_from_bfd)
8815         (build_section_addr_info_from_objfile): Likewise.
8816         (free_section_addr_info): Remove.
8817         (relative_addr_info_to_section_offsets): Change type of "addrs".
8818         (addrs_section_compar): Now a std::sort comparator.
8819         (addrs_section_sort): Change return type.
8820         (addr_info_make_relative): Change type of "addrs".  Update.
8821         (default_symfile_offsets, syms_from_objfile_1)
8822         (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
8823         (symbol_file_add_separate): Update.
8824         (symbol_file_add): Change type of "addrs".  Update.
8825         (add_symbol_file_command): Update.  Remove cleanups.
8826         * symfile-mem.c (symbol_file_add_from_memory): Update.  Remove
8827         cleanups.
8828         * symfile-debug.c (debug_sym_offsets): Change type of "info".
8829         * solib.c (solib_read_symbols): Update.
8830         * objfiles.c (objfile_relocate): Update.  Remove cleanups.
8831         * machoread.c (macho_symfile_offsets): Update.
8832         * jit.c (jit_bfd_try_read_symtab): Update.
8833
8834 2018-03-15  Simon Marchi  <simon.marchi@polymtl.ca>
8835
8836         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8837         unittests/utils-selftests.c.
8838         * unittests/utils-selftests.c: New file.
8839
8840 2018-03-14  Tom Tromey  <tom@tromey.com>
8841
8842         PR cli/14977:
8843         * printcmd.c (printf_c_string, printf_wide_c_string): Special case
8844         for NULL.
8845
8846 2018-03-14  Tom Tromey  <tom@tromey.com>
8847
8848         PR cli/19918:
8849         * printcmd.c (printf_pointer): Allow "-" in format.
8850
8851 2018-03-14  Tom Tromey  <tom@tromey.com>
8852
8853         * printcmd.c (_initialize_printcmd): Add usage to printf.
8854
8855 2018-03-14  Yao Qi  <qiyao@sourceware.org>
8856
8857         * MAINTAINERS: Update my email address.
8858
8859 2018-03-13  Tom Tromey  <tom@tromey.com>
8860
8861         * machoread.c (macho_check_dsym): Change filenamep to a
8862         std::string*.
8863         (macho_symfile_read): Update.
8864         * symfile.c (load_command): Use std::string.
8865
8866 2018-03-12  Andrew Burgess  <andrew.burgess@embecosm.com>
8867
8868         * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
8869         to error message string.
8870         (riscv_register_name): Use xsnprintf instead of sprintf.
8871         (riscv_insn::fetch_instruction): Use gdb_assert instead of
8872         internal_error.
8873         (riscv_print_arg_location): Use gdb_assert_not_reached instead of
8874         error.
8875         (riscv_push_dummy_call): Likewise.
8876
8877 2018-03-12  Tom Tromey  <tom@tromey.com>
8878
8879         * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
8880         Use gdb::byte_vector.
8881         * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
8882
8883 2018-03-12  Yao Qi  <yao.qi@linaro.org>
8884
8885         * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
8886         parameter type to readable_regcache.
8887         * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
8888         the declaration.
8889
8890 2018-03-11  Tom Tromey  <tom@tromey.com>
8891
8892         * dwarf2read.c (struct nextfield): Add initializers.
8893         (struct nextfnfield): Remove.
8894         (struct fnfieldlist): Add initializers.  Remove "length" and
8895         "head", use std::vector.
8896         (struct decl_field_list): Remove.
8897         (struct field_info): Add initializers.
8898         <fields, baseclasses>: Now std::vector.
8899         <nbaseclasses, nfnfields, typedef_field_list_count,
8900         nested_types_list_count>: Remove.
8901         (dwarf2_add_field, dwarf2_add_type_defn)
8902         (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
8903         (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
8904         (process_structure_scope): Update.
8905
8906 2018-03-11  Tom Tromey  <tom@tromey.com>
8907
8908         * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
8909         for use by std::sort.
8910         (build_type_psymtabs_1): Use std::vector.
8911
8912 2018-03-09  Eli Zaretskii  <eliz@gnu.org>
8913
8914         * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
8915         and LIBMPFR in the printed configuration.
8916
8917 2018-03-08  Tom Tromey  <tom@tromey.com>
8918
8919         * source.c (get_filename_and_charpos): Use scoped_fd.
8920         * nto-procfs.c (procfs_open_1): Use scoped_fd.
8921         (procfs_pidlist): Likewise.
8922         * procfs.c (proc_get_LDT_entry): Use scoped_fd.
8923         (iterate_over_mappings): Likewise.
8924
8925 2018-03-08  Tom Tromey  <tom@tromey.com>
8926
8927         * infcall.c (struct call_return_meta_info)
8928         <stack_temporaries_enabled>: Remove.
8929         (get_call_return_value, call_function_by_hand_dummy): Update.
8930         * thread.c (disable_thread_stack_temporaries): Remove.
8931         (enable_thread_stack_temporaries): Remove.
8932         (thread_stack_temporaries_enabled_p): Return bool.
8933         (push_thread_stack_temporary, value_in_thread_stack_temporaries)
8934         (get_last_thread_stack_temporary): Update.
8935         * eval.c (evaluate_subexp): Update.
8936         * gdbthread.h (class enable_thread_stack_temporaries): Now a
8937         class, not a function.
8938         (value_ptr, value_vec): Remove typedefs.
8939         (class thread_info) <stack_temporaries_enabled>: Now bool.
8940         <stack_temporaries>: Now a std::vector.
8941         (thread_stack_temporaries_enabled_p)
8942         (value_in_thread_stack_temporaries): Return bool.
8943
8944 2018-03-08  Simon Marchi  <simon.marchi@ericsson.com>
8945
8946         * remote.c (putpkt_binary): Fix omitted bytes reporting.
8947         (getpkt_or_notif_sane_1): Likewise.
8948
8949 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
8950
8951         * build-id.c (build_id_to_debug_bfd): Use std::string.
8952
8953 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
8954
8955         * build-id.c (find_separate_debug_file_by_buildid): Return
8956         std::string.
8957         * build-id.h (find_separate_debug_file_by_buildid): Return
8958         std::string.
8959         * coffread.c (coff_symfile_read): Adjust to std::string.
8960         * elfread.c (elf_symfile_read): Adjust to std::string.
8961         * symfile.c (separate_debug_file_exists): Change parameter to
8962         std::string.
8963         (find_separate_debug_file): Return std::string.
8964         (find_separate_debug_file_by_debuglink): Return std::string.
8965         * symfile.h (find_separate_debug_file_by_debuglink): Return
8966         std::string.
8967
8968 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
8969
8970         * common/xml-utils.c (xml_escape_text): Move code to...
8971         (xml_escape_text_append): ... this new function.
8972         * common/xml-utils.h (xml_escape_text_append): New declaration.
8973         * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
8974         New function.
8975         (_initialize_xml_utils): register test_xml_escape_text_append as
8976         a selftest.
8977
8978 2018-03-07  Alan Hayward  <alan.hayward@arm.com>
8979
8980         * defs.h: Remove MAX_REGISTER_SIZE.
8981         * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
8982         asserts.
8983         * python/py-unwind.c (pyuw_sniffer): Likewise.
8984
8985 2018-03-07  Tom Tromey  <tom@tromey.com>
8986
8987         * linux-tdep.c (linux_info_proc): Update.
8988         * target.h (struct target_ops) <to_fileio_readlink>: Return
8989         optional<string>.
8990         (target_fileio_readlink): Return optional<string>.
8991         * remote.c (remote_hostio_readlink): Return optional<string>.
8992         * inf-child.c (inf_child_fileio_readlink): Return
8993         optional<string>.
8994         * target.c (target_fileio_readlink): Return optional<string>.
8995
8996 2018-03-07  Andrew Burgess  <andrew.burgess@embecosm.com>
8997
8998         * regcache.c (cooked_read_test): Add riscv to the list of
8999         architectures that have a save_reggroup.
9000
9001 2018-03-07  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9002
9003         * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
9004         value is not a dynamic class object.
9005
9006 2018-03-06  Tom Tromey  <tom@tromey.com>
9007
9008         * rust-exp.y: Formatting fixes.
9009
9010 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
9011
9012         * riscv-tdep.c (riscv_register_name): Remove target description
9013         support.
9014         (riscv_gdbarch_init): Remove target description check.
9015
9016 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
9017
9018         * riscv-tdep.c: Remove 'Contributed by ...' lines from header
9019         comment.
9020         * riscv-tdep.h: Likewise.
9021
9022 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
9023
9024         * riscv-tdep.c (riscv_pseudo_register_read): Delete.
9025         (riscv_pseudo_register_write): Delete.
9026         (riscv_gdbarch_init): Remove all use of pseudo registers.
9027
9028 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
9029
9030         * record-btrace.c (btrace_print_lines): Replace cleanup
9031         parameter with RAII equivalents.
9032         (btrace_insn_history): Replace cleanup with RAII equivalents.
9033         * ui-out.h (make_cleanup_ui_out_list_begin_end,
9034         make_cleanup_ui_out_tuple_begin_end): Remove.
9035         * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
9036         make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
9037         make_cleanup_ui_out_list_begin_end): Remove.
9038
9039 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
9040
9041         * record-btrace.c (record_btrace_maybe_mark_async_event): Change
9042         parameter types to std::vector.  Use bool.
9043         (record_btrace_wait): Replace VEC(tp_t) with
9044         std::vector<thread_info *>.
9045         * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
9046
9047 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
9048
9049         * record-btrace.c (record_btrace_disable_callback): Remove.
9050         (struct scoped_btrace_disable): New.
9051         (record_btrace_open): Use scoped_btrace_disable.
9052
9053 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
9054
9055         * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
9056         reading values from registers.
9057
9058 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
9059
9060         * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
9061         where appropriate.
9062
9063 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
9064
9065         * riscv-tdep.c (riscv_print_arg_location): Add header comment,
9066         change parameter type.  Use GDB's print functions, and use
9067         core_addr_to_string where appropriate.
9068         (riscv_push_dummy_call): Use core_addr_to_string where
9069         appropriate, update call to riscv_print_arg_location, and reindent
9070         a few lines.
9071         (riscv_return_value): Update call to riscv_print_arg_location.
9072
9073 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
9074             Tim Newsome <tim@sifive.com>
9075             Albert Ou <a0u@eecs.berkeley.edu>
9076             Darius Rad <darius@bluespec.com>
9077
9078         * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
9079         (HFILES_NO_SRCDIR): Add riscv-tdep.h.
9080         (ALLDEPFILES): Add riscv-tdep.c
9081         * configure.tgt: Add riscv support.
9082         * riscv-tdep.c: New file.
9083         * riscv-tdep.h: New file.
9084         * NEWS: Mention new target.
9085         * MAINTAINERS: Add entry for riscv.
9086
9087 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
9088
9089         * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
9090         fields within aggregates.
9091
9092 2018-03-04  Simon Marchi  <simon.marchi@polymtl.ca>
9093
9094         * record-btrace.c (btrace_print_lines): Change type of flags to
9095         gdb_disassembly_flags.
9096
9097 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
9098
9099         * fbsd-nat.c: Include "inf-ptrace.h".
9100         (USE_SIGTRAP_SIGINFO): Conditionally define.
9101         [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
9102         (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
9103         [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
9104         function.
9105         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
9106         Likewise.
9107         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
9108         Likewise.
9109         (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
9110         "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
9111         "supports_stopped_by_hw_breakpoint" target methods.
9112
9113 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
9114
9115         * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
9116         * fbsd-nat.c (debug_fbsd_nat): New variable.
9117         (show_fbsd_nat_debug): New function.
9118         (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
9119         (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
9120
9121 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
9122
9123         * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
9124         * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
9125         prototype.
9126         * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
9127         (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
9128         method.
9129
9130 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
9131
9132         * common/gdb_vecs.c (free_char_ptr_vec): Remove.
9133         * common/gdb_vecs.h (free_char_ptr_vec): Remove.
9134
9135 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
9136
9137         * charset.c (struct charset_vector): New.
9138         (charsets): Change type to charset_vector.
9139         (find_charset_names): Adjust.
9140         (add_one): Adjust.
9141         (_initialize_charset): Adjust.
9142
9143 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
9144
9145         * progspace.h (struct program_space) <deleted_solibs>: Change
9146         type to std::vector<std::string>.
9147         * progspace.c (clear_program_space_solib_cache): Adjust.
9148         * breakpoint.c (print_solib_event): Adjust.
9149         (check_status_catch_solib): Adjust.
9150         * solib.c (update_solib_list): Adjust.
9151         * ui-out.h (class ui_out) <field_string>: New overload.
9152         * ui-out.c (ui_out::field_string): New overload.
9153
9154 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
9155
9156         * progspace.h (struct program_space): Add constructor and
9157         destructor, initialize fields.
9158         (add_program_space): Remove.
9159         * progspace.c (add_program_space): Rename to...
9160         (program_space::program_space): ... this.
9161         (release_program_space): Rename to...
9162         (program_space::~program_space): ... this.
9163         (delete_program_space): Use delete to delete program_space.
9164         (initialize_progspace): Use new to allocate program_space.
9165         * inferior.c (add_inferior_with_spaces): Likewise.
9166         (clone_inferior_command): Likewise.
9167         * infrun.c (follow_fork_inferior): Likewise.
9168         (handle_vfork_child_exec_or_exit): Likewise.
9169
9170 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
9171
9172         * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
9173         (delim_string_to_char_ptr_vec): Return std::vector of
9174         gdb::unique_xmalloc_ptr.
9175         (dirnames_to_char_ptr_vec_append): Take std::vector of
9176         gdb::unique_xmalloc_ptr.
9177         (dirnames_to_char_ptr_vec): Return std::vector of
9178         gdb::unique_xmalloc_ptr.
9179         * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
9180         Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
9181         (delim_string_to_char_ptr_vec): Return an std::vector of
9182         gdb::unique_xmalloc_ptr, adjust the code.
9183         (dirnames_to_char_ptr_vec_append): Take an std::vector of
9184         gdb::unique_xmalloc_ptr, adjust the code.
9185         (dirnames_to_char_ptr_vec): Return an std::vector of
9186         gdb::unique_xmalloc_ptr, adjust the code.
9187         * auto-load.c (auto_load_safe_path_vec): Change type to
9188         std::vector of gdb::unique_xmalloc_ptr.
9189         (auto_load_expand_dir_vars): Return an std::vector of
9190         gdb::unique_xmalloc_ptr, adjust the code.
9191         (auto_load_safe_path_vec_update): Adjust.
9192         (filename_is_in_auto_load_safe_path_vec): Adjust.
9193         (auto_load_objfile_script_1): Adjust.
9194         * build-id.c (build_id_to_debug_bfd): Adjust.
9195         * linux-thread-db.c (thread_db_load_search): Adjust.
9196         * source.c (add_path): Adjust.
9197         (openp): Adjust.
9198         * symfile.c (find_separate_debug_file): Adjust.
9199         * utils.c (do_free_char_ptr_vec): Remove.
9200         (make_cleanup_free_char_ptr_vec): Remove.
9201
9202 2018-03-01  Sergio Durigan Junior  <sergiodj@redhat.com>
9203
9204         PR gdb/22907
9205         * common/pathstuff.c: Conditionally include "<windows.h>".
9206
9207 2018-03-01  Georg Sauthoff  <mail@georg.so>
9208
9209         PR gdb/22888
9210         * gcore.in: Quote variables and switch interpreter to bash.
9211
9212 2018-03-01  Tom Tromey  <tom@tromey.com>
9213
9214         * dwarf2read.c (alloc_discriminant_info): Fix default_index
9215         assertion.  Add assertion for discriminant_index.
9216         (quirk_rust_enum): Use correct base type name in univariant case.
9217
9218 2018-03-01  Simon Marchi  <simon.marchi@ericsson.com>
9219
9220         * record.c (get_call_history_modifiers): Return a
9221         record_print_flags.
9222         (cmd_record_call_history): Adjust.
9223         * record-btrace.c (record_btrace_call_history): Adjust.
9224         (record_btrace_call_history_range): Adjust.
9225         (record_btrace_call_history_from): Adjust.
9226         * target-debug.h (target_debug_print_record_print_flags): New.
9227         * target-delegates.c: Re-generate.
9228         * target.c (target_call_history): Change flags type.
9229         (target_call_history_from): Likewise.
9230         (target_call_history_range): Likewise.
9231         * target.h (struct target_ops) <target_call_history>: Likewise.
9232         (target_call_history_from): Likewise.
9233         (target_call_history_range): Likewise.
9234
9235 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
9236             Simon Marchi  <simon.marchi@polymtl.ca>
9237
9238         * common/common-utils.c: Include "sys/stat.h".
9239         (is_regular_file): Move here from "source.c"; change return
9240         type to "bool".
9241         * common/common-utils.h (is_regular_file): New prototype.
9242         * common/pathstuff.c (contains_dir_separator): New function.
9243         * common/pathstuff.h (contains_dir_separator): New prototype.
9244         * source.c: Don't include "sys/stat.h".
9245         (is_regular_file): Move to "common/common-utils.c".
9246
9247 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
9248
9249         * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
9250         (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
9251         * auto-load.c: Include "common/pathstuff.h".
9252         * common/common-def.h (current_directory): Move here.
9253         * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
9254         function.
9255         * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
9256         prototype.
9257         * common/pathstuff.c: New file.
9258         * common/pathstuff.h: New file.
9259         * compile/compile.c: Include "common/pathstuff.h".
9260         * defs.h (current_directory): Move to "common/common-defs.h".
9261         * dwarf2read.c: Include "common/pathstuff.h".
9262         * exec.c: Likewise.
9263         * guile/scm-safe-call.c: Likewise.
9264         * linux-thread-db.c: Likewise.
9265         * main.c: Likewise.
9266         * nto-tdep.c: Likewise.
9267         * objfiles.c: Likewise.
9268         * source.c: Likewise.
9269         * symtab.c: Likewise.
9270         * utils.c: Include "common/pathstuff.h".
9271         (gdb_realpath): Move to "common/pathstuff.c".
9272         (gdb_realpath_keepfile): Likewise.
9273         (gdb_abspath): Likewise.
9274         * utils.h (gdb_realpath): Move to "common/pathstuff.h".
9275         (gdb_realpath_keepfile): Likewise.
9276         (gdb_abspath): Likewise.
9277
9278 2018-02-28  John Baldwin  <jhb@FreeBSD.org>
9279
9280         * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
9281         wildcard process pid for super_resume for kernels with a
9282         specific bug.
9283
9284 2018-02-27  Phil Muldoon  <pmuldoon@redhat.com>
9285
9286         * compile/compile.c (get_args): Add additional comments
9287         explaining function.
9288
9289 2018-02-27  Simon Marchi  <simon.marchi@polymtl.ca>
9290             Tom Tromey  <tom@tromey.com>
9291
9292         * target.h (memory_write_request_s): Remove typedef.  Don't define
9293         VEC.
9294         (target_write_memory_blocks): Change argument to std::vector.
9295         (struct memory_write_request): Add constructor.
9296         * target-memory.c (compare_block_starting_address): Return bool.
9297         Change argument types.
9298         (claim_memory): Change arguments to use std::vector.
9299         (split_regular_and_flash_blocks, blocks_to_erase)
9300         (compute_garbled_blocks): Likewise.
9301         (cleanup_request_data, cleanup_write_requests_vector): Remove.
9302         (target_write_memory_blocks): Change argument to std::vector.
9303         * symfile.c (struct load_section_data): Add constructor and
9304         destructor.  Use std::vector for "requests".
9305         (struct load_progress_data): Add initializers.
9306         (load_section_callback): Update.  Use "new".
9307         (clear_memory_write_data): Remove.
9308         (generic_load): Update.
9309
9310 2018-02-27  Alan Hayward  <alan.hayward@arm.com>
9311
9312         * arch/aarch64.h: Use common/tdesc.h.
9313
9314 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
9315
9316         * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
9317         architecture with a 64-bit ABI.
9318
9319 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
9320
9321         * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
9322         ahead of target description loading.
9323
9324 2018-02-26  Tom Tromey  <tom@tromey.com>
9325
9326         * stack.c (backtrace_command_1): Update.
9327         * python/python-internal.h (gdbpy_apply_frame_filter): Change type
9328         of "flags".
9329         * python/py-framefilter.c (py_print_frame)
9330         (gdbpy_apply_frame_filter): Change type of "flags".
9331         * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
9332         of "flags".
9333         (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
9334         (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
9335         * extension.h (enum frame_filter_flag): Rename from
9336         frame_filter_flags.
9337         (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
9338         (apply_ext_lang_frame_filter): Change type of "flags".
9339         * extension.c (apply_ext_lang_frame_filter): Change type of
9340         "flags".
9341         * extension-priv.h (struct extension_language_ops)
9342         <apply_frame_filter>: Change type of "flags".
9343
9344 2018-02-26  Tom Tromey  <tom@tromey.com>
9345
9346         PR python/16497:
9347         * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag.  Fix
9348         off-by-one in py_end computation.
9349         * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
9350         PRINT_MORE_FRAMES.
9351         * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
9352         constant.
9353
9354 2018-02-26  Tom Tromey  <tom@tromey.com>
9355
9356         * dwarf2read.c (struct variant_field): New.
9357         (struct nextfield) <variant>: New field.
9358         (dwarf2_add_field): Handle DW_TAG_variant_part.
9359         (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
9360         discriminated union.
9361         (read_structure_type): Handle DW_TAG_variant_part.
9362         (handle_struct_member_die): New function, extracted from
9363         process_structure_scope.  Handle DW_TAG_variant.
9364         (process_structure_scope): Handle discriminated unions.  Call
9365         handle_struct_member_die.
9366
9367 2018-02-26  Tom Tromey  <tom@tromey.com>
9368
9369         * rust-lang.h (rust_last_path_segment): Declare.
9370         * rust-lang.c (rust_last_path_segment): Now public.  Change
9371         contract.
9372         (struct disr_info): Remove.
9373         (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
9374         (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
9375         (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
9376         (rust_enum_p, rust_enum_variant): New function.
9377         (rust_underscore_fields): Remove "offset" parameter.
9378         (rust_print_enum): New function.
9379         (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
9380         <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
9381         (rust_print_struct_def): Add "for_rust_enum" parameter.  Handle
9382         enums.
9383         (rust_internal_print_type): New function, from rust_print_type.
9384         Remove enum code.
9385         (rust_print_type): Call rust_internal_print_type.
9386         (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
9387         Update enum handling.
9388         * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
9389         (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
9390         (rust_union_quirks): New functions.
9391         (process_full_comp_unit, process_full_type_unit): Call
9392         rust_union_quirks.
9393         (process_structure_scope): Update rust_unions if necessary.
9394
9395 2018-02-26  Tom Tromey  <tom@tromey.com>
9396
9397         * value.h (value_union_variant): Declare.
9398         * valops.c (value_union_variant): New function.
9399         * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
9400         (struct discriminant_info): New.
9401         (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
9402         enumerator.
9403         (struct main_type) <flag_discriminated_union>: New field.
9404
9405 2018-02-26  Tom Tromey  <tom@tromey.com>
9406
9407         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9408         unittests/unpack-selftests.c.
9409         * unittests/unpack-selftests.c: New file.
9410         * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
9411
9412 2018-02-26  Yao Qi  <yao.qi@linaro.org>
9413
9414         * dwarf2read.c (struct partial_die_info) <read>: New method.
9415         (read_partial_die): Remove the declaration.
9416         (load_partial_dies): Update.
9417         (partial_die_info::partial_die_info):
9418         (read_partial_die): Change it to partial_die_info::read.
9419
9420 2018-02-26  Yao Qi  <yao.qi@linaro.org>
9421
9422         * dwarf2read.c (struct partial_die_info) <fixup>: New method.
9423         (fixup_partial_die): Remove declaration.
9424         (scan_partial_symbols): Update.
9425         (partial_die_parent_scope): Likewise.
9426         (partial_die_full_name): Likewise.
9427         (fixup_partial_die): Change it to partial_die_info::fixup.
9428
9429 2018-02-26  Yao Qi  <yao.qi@linaro.org>
9430
9431         * dwarf2read.c (read_partial_die): Update the declaration.
9432         (load_partial_dies): Caller update.
9433         (read_partial_die): Remove one argument abbrev_len.
9434
9435 2018-02-26  Yao Qi  <yao.qi@linaro.org>
9436
9437         * dwarf2read.c (struct partial_die_info): Add ctor, delete
9438         assignment operator.
9439         (load_partial_dies): Use ctor and copy ctor.
9440         (read_partial_die): Update.
9441         (dwarf2_cu::find_partial_die): Use ctor.
9442
9443 2018-02-26  Yao Qi  <yao.qi@linaro.org>
9444
9445         * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
9446         (find_partial_die_in_comp_unit): Change it to
9447         dwarf2_cu::find_partial_die.
9448         (find_partial_die): Update.
9449
9450 2018-02-26  Yao Qi  <yao.qi@linaro.org>
9451
9452         * dwarf2read.c (read_partial_die): Remove the code checking abbrev
9453         is NULL.
9454
9455 2018-02-26  Yao Qi  <yao.qi@linaro.org>
9456
9457         * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
9458
9459 2018-02-26  Alan Hayward  <alan.hayward@arm.com>
9460
9461         * arch/amd64.h: Use common/tdesc.h.
9462         * arch/i386.c: Likewise.
9463         * arch/i386.h: Likewise.
9464         * arch/tic6x.c: Likewise.
9465         * arch/tdesc.h: Move file from here...
9466         * common/tdesc.h: ...to here.
9467         * features/aarch64-core.c: Regenerate.
9468         * features/aarch64-fpu.c: Regenerate.
9469         * features/i386/32bit-avx.c: Regenerate.
9470         * features/i386/32bit-avx512.c: Regenerate.
9471         * features/i386/32bit-core.c: Regenerate.
9472         * features/i386/32bit-linux.c: Regenerate.
9473         * features/i386/32bit-mpx.c: Regenerate.
9474         * features/i386/32bit-pkeys.c: Regenerate.
9475         * features/i386/32bit-sse.c: Regenerate.
9476         * features/i386/64bit-avx.c: Regenerate.
9477         * features/i386/64bit-avx512.c: Regenerate.
9478         * features/i386/64bit-core.c: Regenerate.
9479         * features/i386/64bit-linux.c: Regenerate.
9480         * features/i386/64bit-mpx.c: Regenerate.
9481         * features/i386/64bit-pkeys.c: Regenerate.
9482         * features/i386/64bit-segments.c: Regenerate.
9483         * features/i386/64bit-sse.c: Regenerate.
9484         * features/i386/x32-core.c: Regenerate.
9485         * features/tic6x-c6xp.c: Regenerate.
9486         * features/tic6x-core.c: Regenerate.
9487         * features/tic6x-gp.c: Regenerate.
9488         * target-descriptions.c: Use common/tdesc.h.
9489         * target-descriptions.h: Likewise.
9490
9491 2018-02-24  Tom Tromey  <tom@tromey.com>
9492
9493         * linux-thread-db.c (try_thread_db_load_from_pdir_1)
9494         (try_thread_db_load_from_dir, thread_db_load_search): Use
9495         std::string.
9496         (info_auto_load_libthread_db_compare): Return bool.  Change
9497         argument types.
9498         (info_auto_load_libthread_db): Use std::vector, std::string.
9499         Remove cleanups.
9500
9501 2018-02-24  Tom Tromey  <tom@tromey.com>
9502
9503         * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
9504         std::string.
9505         * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
9506         std::string*.
9507         * gdbarch.c: Rebuild.
9508         * gdbarch.h: Rebuild.
9509         * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
9510         * arch-utils.h (default_fast_tracepoint_valid_at): Update.
9511         * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
9512         std::string*.
9513
9514 2018-02-23  Simon Marchi  <simon.marchi@polymtl.ca>
9515
9516         * gdbtypes.h (sect_offset): Change type to uint64_t.
9517         (sect_offset_str): New function.
9518         * dwarf2read.c (create_addrmap_from_aranges): Use
9519         sect_offset_str.
9520         (error_check_comp_unit_head): Likewise.
9521         (create_debug_type_hash_table): Likewise.
9522         (read_cutu_die_from_dwo): Likewise.
9523         (init_cutu_and_read_dies): Likewise.
9524         (init_cutu_and_read_dies_no_follow): Likewise.
9525         (process_psymtab_comp_unit_reader): Likewise.
9526         (partial_die_parent_scope): Likewise.
9527         (peek_die_abbrev): Likewise.
9528         (process_queue): Likewise.
9529         (dwarf2_physname): Likewise.
9530         (read_namespace_alias): Likewise.
9531         (read_import_statement): Likewise.
9532         (create_dwo_cu_reader): Likewise.
9533         (create_cus_hash_table): Likewise.
9534         (lookup_dwo_cutu): Likewise.
9535         (inherit_abstract_dies): Likewise.
9536         (read_func_scope): Likewise.
9537         (read_call_site_scope): Likewise.
9538         (dwarf2_add_member_fn): Likewise.
9539         (read_common_block): Likewise.
9540         (read_module_type): Likewise.
9541         (read_typedef): Likewise.
9542         (read_subrange_type): Likewise.
9543         (load_partial_dies): Likewise.
9544         (read_partial_die): Likewise.
9545         (find_partial_die): Likewise.
9546         (read_str_index): Likewise.
9547         (dwarf2_string_attr): Likewise.
9548         (build_error_marker_type): Likewise.
9549         (lookup_die_type): Likewise.
9550         (dump_die_shallow): Likewise.
9551         (follow_die_ref): Likewise.
9552         (dwarf2_fetch_die_loc_sect_off): Likewise.
9553         (dwarf2_fetch_constant_bytes): Likewise.
9554         (follow_die_sig): Likewise.
9555         (get_signatured_type): Likewise.
9556         (get_DW_AT_signature_type): Likewise.
9557         (dwarf2_find_containing_comp_unit): Likewise.
9558         (set_die_type): Likewise.
9559
9560 2018-02-21  John Baldwin  <jhb@FreeBSD.org>
9561
9562         * arch/aarch64.c: Include "common-defs.h".
9563         * arch/amd64.c: Likewise.
9564         * arch/i386.c: Likewise.
9565
9566 2018-02-21  Tom Tromey  <tom@tromey.com>
9567
9568         * value.h: (extract_field_op): Update.
9569         * eval.c (extract_field_op): Return a const char *.
9570         * expression.h (parse_expression_for_completion): Update.
9571         * completer.c (complete_expression): Update.
9572         (add_struct_fields): Make fieldname const.
9573         * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
9574         (mark_completion_tag, parse_exp_in_context_1): Update.
9575         (parse_expression_for_completion): Change "name" to
9576         unique_xmalloc_ptr*.
9577
9578 2018-02-21  Tom Tromey  <tom@tromey.com>
9579
9580         * infcall.c (call_function_by_hand_dummy): Use std::vector.
9581
9582 2018-02-21  Yao Qi  <yao.qi@linaro.org>
9583
9584         * avr-tdep.c (avr_read_pc): Change parameter type to
9585         readable_regcache.
9586         * gdbarch.sh (read_pc): Likewise.
9587         * gdbarch.c: Re-generated.
9588         * gdbarch.h: Re-generated.
9589         * hppa-tdep.c (hppa_read_pc): Change parameter type to
9590         readable_regcache.
9591         * ia64-tdep.c (ia64_read_pc): Likewise.
9592         * mips-tdep.c (mips_read_pc): Likewise.
9593         * spu-tdep.c (spu_read_pc): Likewise.
9594
9595 2018-02-21  Yao Qi  <yao.qi@linaro.org>
9596
9597         * Makefile.in (COMMON_SFILES): Add regcache-dump.c
9598         * regcache-dump.c: New file.
9599         * regcache.c: Move register_dump to regcache-dump.c.
9600         (maintenance_print_registers): Likewise.
9601         (maintenance_print_raw_registers): Likewise.
9602         (maintenance_print_cooked_registers): Likewise.
9603         (maintenance_print_register_groups): Likewise.
9604         (maintenance_print_remote_registers): Likewise.
9605         (_initialize_regcache): Likewise.
9606         * regcache.h (register_dump): Moved from regcache.c.
9607
9608 2018-02-21  Yao Qi  <yao.qi@linaro.org>
9609
9610         * regcache.c (regcache::regcache): Update.
9611         (regcache::invalidate): Move it to detached_regcache::invalidate.
9612         (get_thread_arch_aspace_regcache): Update.
9613         (regcache::raw_update): Update.
9614         (regcache::cooked_read): Remove some code.
9615         (regcache::cooked_read_value): Likewise.
9616         (regcache::raw_write): Remove assert on m_readonly_p.
9617         (regcache::raw_supply_integer): Move it to
9618         detached_regcache::raw_supply_integer.
9619         (regcache::raw_supply_zeroed): Likewise.
9620         * regcache.h (detached_regcache) <raw_supply_integer>: New
9621         declaration.
9622         <raw_supply_zeroed, invalidate>: Likewise.
9623         (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
9624         <invalidate>: Likewise.
9625         <m_readonly_p>: Removed.
9626
9627 2018-02-21  Yao Qi  <yao.qi@linaro.org>
9628
9629         * infcmd.c (get_return_value): Let stop_regs point to
9630         get_current_regcache.
9631         * regcache.c (regcache::regcache): Remove.
9632         (register_dump_reg_buffer): New class.
9633         (regcache_print): Adjust.
9634         * regcache.h (regcache): Remove constructors.
9635
9636 2018-02-21  Yao Qi  <yao.qi@linaro.org>
9637
9638         * regcache.c (class register_dump): New class.
9639         (register_dump_regcache, register_dump_none): New class.
9640         (register_dump_remote, register_dump_groups): New class.
9641         (regcache_print): Update.
9642         * regcache.h (regcache_dump_what): Move it to regcache.c.
9643         (regcache) <dump>: Remove.
9644
9645 2018-02-21  Yao Qi  <yao.qi@linaro.org>
9646
9647         * jit.c (struct jit_unwind_private) <regcache>: Change its type to
9648          reg_buffer_rw *.
9649         (jit_unwind_reg_set_impl): Call raw_supply.
9650         (jit_frame_sniffer): Use reg_buffer_rw.
9651         * record-full.c (record_full_core_regbuf): Change its type.
9652         (record_full_core_open_1): Use reg_buffer_rw.
9653         (record_full_close): Likewise.
9654         (record_full_core_fetch_registers): Use regcache->raw_supply.
9655         (record_full_core_store_registers): Likewise.
9656         * regcache.c (regcache::get_register_status): Move it to
9657         reg_buffer.
9658         (regcache_raw_set_cached_value): Remove.
9659         (regcache::raw_set_cached_value): Remove.
9660         (regcache::raw_write): Call raw_supply.
9661         (regcache::raw_supply): Move it to reg_buffer_rw.
9662         * regcache.h (regcache_raw_set_cached_value): Remove.
9663         (reg_buffer_rw): New class.
9664
9665 2018-02-21  Yao Qi  <yao.qi@linaro.org>
9666
9667         * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
9668         readonly_detached_regcache.
9669         (dummy_frame_prev_register): Use regcache->cooked_read.
9670         * frame.c (frame_save_as_regcache): Change return type.
9671         (frame_pop): Update.
9672         * frame.h (frame_save_as_regcache): Update declaration.
9673         * inferior.h (get_infcall_suspend_state_regcache): Update
9674         declaration.
9675         * infrun.c (infcall_suspend_state) <registers>: use
9676         readonly_detached_regcache.
9677         (save_infcall_suspend_state): Don't use regcache_dup.
9678         (get_infcall_suspend_state_regcache): Change return type.
9679         * linux-fork.c (struct fork_info) <savedregs>: Change to
9680         readonly_detached_regcache.
9681         <pc>: New field.
9682         (fork_save_infrun_state): Don't use regcache_dup.
9683         (info_checkpoints_command): Adjust.
9684         * mi/mi-main.c (register_changed_p): Update declaration.
9685         (mi_cmd_data_list_changed_registers): Use
9686         readonly_detached_regcache.
9687         (register_changed_p): Change parameter type to
9688         readonly_detached_regcache.
9689         * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
9690         readonly_detached_regcache.
9691         (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
9692         * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
9693         New.
9694         (regcache::save): Move it to reg_buffer.
9695         (regcache::restore): Change parameter type.
9696         (regcache_dup): Remove.
9697         * regcache.h (reg_buffer) <save>: New method.
9698         (readonly_detached_regcache): New class.
9699         * spu-tdep.c (spu2ppu_cache) <regcache>: Use
9700         readonly_detached_regcache.
9701         (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
9702
9703 2018-02-21  Yao Qi  <yao.qi@linaro.org>
9704
9705         * frame.c (frame_save_as_regcache): Use regcache method save.
9706         (frame_pop): Use regcache method restore.
9707         * infrun.c (restore_infcall_suspend_state): Likewise.
9708         * linux-fork.c (fork_load_infrun_state): Likewise.
9709         * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
9710         save.
9711         * regcache.c (regcache_save): Remove.
9712         (regcache::restore): More asserts.
9713         (regcache_cpy): Remove.
9714         * regcache.h (regcache_save): Remove the declaration.
9715         (regcache::restore): Move from private to public.
9716         Remove the friend declaration of regcache_cpy.
9717         (regcache_cpy): Remove declaration.
9718
9719 2018-02-21  Yao Qi  <yao.qi@linaro.org>
9720
9721         * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
9722         parameter type to 'readable_regcache *'.
9723         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
9724         * arm-tdep.c (arm_neon_quad_read): Likewise.
9725         (arm_pseudo_read): Likewise.
9726         * avr-tdep.c (avr_pseudo_register_read): Likewise.
9727         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
9728         * frv-tdep.c (frv_pseudo_register_read): Likewise.
9729         * gdbarch.c: Re-generated.
9730         * gdbarch.h: Re-generated.
9731         * gdbarch.sh (pseudo_register_read): Change parameter type to
9732         'readable_regcache *'.
9733         (pseudo_register_read_value): Likewise.
9734         * h8300-tdep.c (pseudo_from_raw_register): Likewise.
9735         (h8300_pseudo_register_read): Likewise.
9736         * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
9737         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
9738         (i386_pseudo_register_read_into_value): Likewise.
9739         (i386_pseudo_register_read_value): Likewise.
9740         * i386-tdep.h (i386_pseudo_register_read_into_value): Update
9741         declaration.
9742         * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
9743         * m32c-tdep.c (m32c_raw_read): Likewise.
9744         (m32c_read_flg): Likewise.
9745         (m32c_banked_register): Likewise.
9746         (m32c_banked_read): Likewise.
9747         (m32c_sb_read): Likewise.
9748         (m32c_part_read): Likewise.
9749         (m32c_cat_read): Likewise.
9750         (m32c_r3r2r1r0_read): Likewise.
9751         (m32c_pseudo_register_read): Likewise.
9752         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
9753         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
9754         (mep_pseudo_cr64_read): Likewise.
9755         (mep_pseudo_register_read): Likewise.
9756         * mips-tdep.c (mips_pseudo_register_read): Likewise.
9757         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
9758         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
9759         * regcache.c (regcache::raw_read): Move it to readable_regcache.
9760         (regcache::cooked_read): Likewise.
9761         (regcache::cooked_read_value): Likewise.
9762         (regcache_cooked_read_signed):
9763         (regcache::cooked_read): Likewise.
9764         * regcache.h (readable_regcache): New class.
9765         (regcache): Inherit readable_regcache.  Move some methods to
9766         readable_regcache.
9767         * rl78-tdep.c (rl78_pseudo_register_read): Change
9768         parameter type to 'readable_regcache *'.
9769         * rs6000-tdep.c (do_regcache_raw_read): Remove.
9770         (e500_pseudo_register_read): Change parameter type to
9771         'readable_regcache *'.
9772         (dfp_pseudo_register_read): Likewise.
9773         (vsx_pseudo_register_read): Likewise.
9774         (efpr_pseudo_register_read): Likewise.
9775         * s390-tdep.c (s390_pseudo_register_read): Likewise.
9776         * sh-tdep.c (sh_pseudo_register_read): Likewise.
9777         * sh64-tdep.c (pseudo_register_read_portions): Likewise.
9778         (sh64_pseudo_register_read): Likewise.
9779         * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
9780         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
9781         * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
9782         (spu_pseudo_register_read): Likewise.
9783         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
9784         (xtensa_pseudo_register_read): Likewise.
9785
9786 2018-02-21  Yao Qi  <yao.qi@linaro.org>
9787
9788         * regcache.c (regcache::regcache): Call reg_buffer ctor.
9789         (regcache::arch): Move it to reg_buffer::arch.
9790         (regcache::register_buffer): Likewise.
9791         (regcache::assert_regnum): Likewise.
9792         (regcache::num_raw_registers): Likewise.
9793         * regcache.h (reg_buffer): New class.
9794         (regcache): Inherit reg_buffer.
9795
9796 2018-02-20  Simon Marchi  <simon.marchi@ericsson.com>
9797
9798         * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
9799         gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
9800
9801 2018-02-20  Markus Metzger  <markus.t.metzger@intel.com>
9802
9803         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
9804
9805 2018-02-19  Alan Hayward  <alan.hayward@arm.com>
9806
9807         * Makefile.in: (COMMON_SFILES): Add common/*.c files.
9808         (SFILES): Remove common/*.c files.
9809         (COMMON_OBS): Remove some *.o files built from common/*.c files.
9810         * common/common.host: Add common reference.
9811         * configure.ac: Likewise.
9812         * configure: Regenerate.
9813
9814 2018-02-16  Yao Qi  <yao.qi@linaro.org>
9815
9816         * block.c (block_namespace_info): Inherit allocate_on_obstack.
9817         (block_initialize_namespace): Use new.
9818         * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
9819         (dwarf2_free_objfile): Use delete.
9820         * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
9821         (copy_type_recursive): Use new.
9822         * gdb_obstack.h (allocate_on_obstack): New.
9823
9824 2018-02-15  Yao Qi  <yao.qi@linaro.org>
9825
9826         PR gdb/22849
9827         * inferior.c (exit_inferior_1): Reset inf->control.
9828
9829 2018-02-15  Joel Brobecker  <brobecker@adacore.com>
9830
9831         * ada-lang.c (ada_to_fixed_value_create): Delete advance
9832         declaration.
9833
9834 2018-02-14  Pedro Alves  <palves@redhat.com>
9835
9836         * frame-unwind.c (frame_unwind_try_unwinder): Always call
9837         frame_cleanup_after_sniffer on exception.
9838
9839 2018-02-14  Tom Tromey  <tom@tromey.com>
9840
9841         * solist.h (struct target_so_ops) <bfd_open>: Make pathname
9842         const.
9843         (solib_bfd_open): Make pathname const.
9844         * solib.c (solib_bfd_open): Make pathname const.
9845         * solib-spu.c (spu_bfd_fopen): Make name const.
9846         (spu_bfd_open): Make pathname const.
9847         * solib-darwin.c (darwin_bfd_open): Make pathname const.
9848         * solib-aix.c (solib_aix_bfd_open): Make pathname const.
9849
9850 2018-02-14  Tom Tromey  <tom@tromey.com>
9851
9852         * symfile.c (symfile_bfd_open): Update.
9853         * source.h (openp, source_full_path_of, find_and_open_source):
9854         Change argument type to unique_xmalloc_ptr.
9855         * source.c (openp): Take a unique_xmalloc_ptr.
9856         (source_full_path_of, find_and_open_source): Likewise.
9857         (open_source_file, symtab_to_fullname): Update.
9858         * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
9859         unique_xmalloc_ptr.
9860         * solib.c (solib_find_1): Use unique_xmalloc_ptr.
9861         (exec_file_find): Update.
9862         * psymtab.c (psymtab_to_fullname): Update.
9863         * nto-tdep.h (nto_find_and_open_solib): Update.
9864         * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
9865         unique_xmalloc_ptr.
9866         * exec.c (exec_file_attach): Update.
9867         * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
9868         * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
9869
9870 2018-02-14  Tom Tromey  <tom@tromey.com>
9871
9872         * solib.c: Include source.h.
9873         * nto-tdep.c: Include source.h.
9874         * mi/mi-cmd-env.c: Include source.h.
9875         * infcmd.c: Include source.h.
9876         * exec.c: Include source.h.
9877         * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
9878         (add_path, directory_switch, source_path, init_source_path): Move
9879         declarations...
9880         * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
9881         (add_path, directory_switch, source_path, init_source_path):
9882         ...here.
9883
9884 2018-02-14  Tom Tromey  <tom@tromey.com>
9885
9886         * solist.h (exec_file_find, solib_find): Return
9887         unique_xmalloc_ptr.
9888         (solib_bfd_fopen): Take a const char *.
9889         * solib.c (solib_find_1): Return unique_xmalloc_ptr.
9890         (exec_file_find, solib_find): Likewise.
9891         (solib_bfd_fopen): Do not take ownership of "pathname".
9892         (solib_bfd_open): Use unique_xmalloc_ptr.
9893         * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
9894         * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
9895         * infrun.c (follow_exec): Use unique_xmalloc_ptr.
9896         * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
9897
9898 2018-02-14  Joel Brobecker  <brobecker@adacore.com>
9899
9900         * ada-lang.c (name_match_type_from_name): Remove reference to
9901         ada_name_for_lookup in function's documentation.
9902         * ada-lang.h (ada_name_for_lookup): Delete declaration.
9903
9904 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
9905
9906         * defs.h (enum openp_flags): New enum.
9907         (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
9908         Move to enum openp_flags.
9909         (openp_flags): New enum flags.
9910         (openp): Change parameter type to openp_flags.
9911         * source.c (openp): Change parameter type to openp_flags.
9912         * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
9913         * dwarf2read.c (try_open_dwop_file): Use openp_flags.
9914
9915 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
9916
9917         * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
9918         per-command.
9919
9920 2018-02-12  Andrew Burgess  <andrew.burgess@embecosm.com>
9921
9922         * dwarf2read.c (dwarf2_release_queue): Delete function, move body
9923         into...
9924         (class dwarf2_queue_guard): ...the destructor of this new class.
9925         (dw2_do_instantiate_symtab): Create instance of the new class
9926         dwarf2_queue_guard, remove cleanup.
9927
9928 2018-02-09  Tom Tromey  <tom@tromey.com>
9929
9930         * source.c (find_source_lines): Don't reference past the end of
9931         the vector.
9932
9933 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
9934
9935         * remote.c (remote_btrace_maybe_reopen): Change error message.
9936         * btrace.c (btrace_enable): Likewise.
9937         (parse_xml_btrace): Likewise.
9938         (parse_xml_btrace_conf): Likewise.
9939
9940 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
9941
9942         * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
9943         (linux_enable_pt, linux_enable_bts): Call
9944         diagnose_perf_event_open_fail.
9945
9946 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
9947
9948         * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
9949         Remove parameter and change return type.  Update callers.  Move it.
9950         (linux_enable_bts, linux_enable_pt): Improve error message.
9951         (linux_enable_pt): Remove zero buffer size check.
9952         (linux_enable_btrace): Improve error messages.  Remove NULL return
9953         check.
9954
9955 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
9956
9957         * btrace.c (btrace_enable): Remove target_supports_btrace call.
9958         * nat/linux-btrace.c (perf_event_pt_event_type): Move.
9959         (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
9960         (linux_supports_pt, linux_supports_btrace): Remove.
9961         (linux_enable_bts): Call cpu_supports_bts.
9962         * nat/linux-btrace.h (linux_supports_btrace): Remove.
9963         * remote.c (remote_supports_btrace): Remove.
9964         (init_remote_ops): Remove remote_supports_btrace.
9965         * target-delegates.c: Regenerated.
9966         * target.c (target_supports_btrace): Remove.
9967         * target.h (target_ops) <to_supports_btrace>: Remove
9968         (target_supports_btrace): Remove.
9969         * x86-linux-nat.c (x86_linux_create_target): Remove
9970         linux_supports_btrace.
9971
9972 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
9973
9974         * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
9975         btrace failed.
9976         * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
9977         exception and use message in own exception.
9978
9979 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
9980
9981         * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
9982         (perf_event_pt_event_type): Use gdb_file_up.
9983         (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
9984         scoped_fd, and scoped_mmap.
9985
9986 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
9987
9988         * common/scoped_mmap.h: New.
9989         * unittests/scoped_mmap-selftest.c: New.
9990         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9991         unittests/scoped_mmap-selftest.c.
9992
9993 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
9994
9995         * common/scoped_fd.h: New.
9996         * unittests/scoped_fd-selftest.c: New.
9997         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9998         unittests/scoped_fd-selftest.c.
9999
10000 2018-02-09  Tom Tromey  <tom@tromey.com>
10001
10002         * auto-load.c (auto_load_section_scripts): Use
10003         gdb::unique_xmalloc_ptr.
10004
10005 2018-02-09  Tom Tromey  <tom@tromey.com>
10006
10007         * auto-load.c (execute_script_contents): Use std::string.
10008
10009 2018-02-09  Joel Brobecker  <brobecker@adacore.com>
10010
10011         * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
10012         Python function, rather than a new command.
10013
10014 2018-02-08  Tom Tromey  <tom@tromey.com>
10015
10016         * solib.c (solib_find_1): Use std::string.
10017         (solib_bfd_fopen): Use unique_xmalloc_ptr.
10018
10019 2018-02-08  Tom Tromey  <tom@tromey.com>
10020
10021         * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
10022
10023 2018-02-08  Tom Tromey  <tom@tromey.com>
10024
10025         * source.c (find_source_lines): Use gdb::def_vector.
10026
10027 2018-02-08  Tom Tromey  <tom@tromey.com>
10028
10029         * macrocmd.c (struct temporary_macro_definition): New.
10030         (macro_define_command): Use temporary_macro_definition.  Remove
10031         cleanups.
10032         (free_macro_definition_ptr): Remove.
10033
10034 2018-02-08  Tom Tromey  <tom@tromey.com>
10035
10036         * macroexp.c (maybe_expand): Use std::string.
10037
10038 2018-02-08  Tom Tromey  <tom@tromey.com>
10039
10040         * macroexp.c (struct macro_buffer): Add initializers for some
10041         members.
10042         (init_buffer, init_shared_buffer, free_buffer)
10043         (free_buffer_return_text): Remove.
10044         (macro_buffer): New constructors.
10045         (~macro_buffer): New destructor.
10046         (macro_buffer::set_shared): New method.
10047         (macro_buffer::resize_buffer, macro_buffer::appendc)
10048         (macro_buffer::appendmem): Now methods, not free functions.
10049         (set_token, append_tokens_without_splicing, stringify)
10050         (macro_stringify): Update.
10051         (gather_arguments): Change return type.  Remove argc_p argument,
10052         add args_ptr argument.  Use std::vector.
10053         (substitute_args): Remove argc argument.  Accept std::vector.
10054         (expand): Update.  Use std::vector.
10055         (scan, macro_expand, macro_expand_next): Update.
10056
10057 2018-02-08  Tom Tromey  <tom@tromey.com>
10058
10059         * symtab.c (default_collect_symbol_completion_matches_break_on):
10060         Use unique_xmalloc_ptr.
10061         * macroscope.h: (sal_macro_scope, user_macro_scope)
10062         (default_macro_scope): Return unique_xmalloc_ptr.
10063         * macroscope.c (sal_macro_scope, user_macro_scope)
10064         (default_macro_scope): Return unique_xmalloc_ptr.
10065         * macroexp.h (macro_expand, macro_expand_once): Return
10066         unique_xmalloc_ptr.
10067         * macroexp.c (macro_expand, macro_expand_once): Return
10068         unique_xmalloc_ptr.
10069         * macrocmd.c (macro_expand_command, macro_expand_once_command)
10070         (info_macro_command, info_macros_command): Use
10071         unique_xmalloc_ptr.
10072         * compile/compile-c-support.c (write_macro_definitions): Use
10073         unique_xmalloc_ptr.
10074         * c-exp.y (c_parse): Use unique_xmalloc_ptr.
10075
10076 2018-02-07  Simon Marchi  <simon.marchi@ericsson.com>
10077
10078         * value.c (value_static_field): Assign field type instead of
10079         containing type when returning an optimized out value.
10080
10081 2018-02-06  Yao Qi  <yao.qi@linaro.org>
10082
10083         * ft32-tdep.c (ft32_read_pc): Remove.
10084         (ft32_write_pc): Remove.
10085         (ft32_gdbarch_init): Update.
10086         * m32r-tdep.c (m32r_read_pc): Remove.
10087         (m32r_gdbarch_init): Update.
10088         * mep-tdep.c (mep_read_pc): Remove.
10089         (mep_gdbarch_init): Update.
10090         * microblaze-tdep.c (microblaze_write_pc): Remove.
10091         (microblaze_gdbarch_init): Update.
10092         * mn10300-tdep.c (mn10300_read_pc): Remove.
10093         (mn10300_write_pc): Remove.
10094         (mn10300_gdbarch_init): Update.
10095         * moxie-tdep.c (moxie_read_pc): Remove.
10096         (moxie_write_pc): Remove.
10097         (moxie_gdbarch_init): Update.
10098
10099 2018-02-06  Yao Qi  <yao.qi@linaro.org>
10100
10101         * expprint.c (print_subexp_standard): Handle
10102         OP_F77_UNDETERMINED_ARGLIST.
10103         (dump_subexp_body_standard): Likewise.
10104
10105 2018-02-05  Alan Hayward  <alan.hayward@arm.com>
10106
10107         * target-descriptions.c (tdesc_element_visitor) Add empty
10108         implementations.
10109         (tdesc_type): Move make_gdb_type from here.
10110         (tdesc_type_builtin): Likewise.
10111         (tdesc_type_vector): Likewise.
10112         (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
10113         (make_gdb_type_struct): Move from tdesc_type_with_fields.
10114         (make_gdb_type_union): Likewise.
10115         (make_gdb_type_flags): Likewise.
10116         (make_gdb_type_enum): Likewise.
10117         (make_gdb_type): New function.
10118         (tdesc_register_type): Use static make_gdb_type.
10119
10120 2018-02-05  Ruslan Kabatsayev <b7.10110111@gmail.com>
10121
10122         * infcmd.c (default_print_one_register_info): Align natural-format
10123         column values consistently one under another.
10124         (pad_to_column): New function.
10125
10126 2018-02-05  Joel Brobecker  <brobecker@adacore.com>
10127
10128         * dwarf2read.c (dwarf2_physname): Move commment.
10129
10130 2018-02-01  Leszek Swirski  <leszeks@google.com>
10131
10132         * varobj.c (varobj_formatted_print_options): Allow recursive
10133         pretty printing if pretty printing is enabled.
10134
10135 2018-02-01  Leszek Swirski  <leszeks@google.com>
10136
10137         * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
10138         names after a structop as a filename.
10139
10140 2018-02-01  Yao Qi  <yao.qi@linaro.org>
10141
10142         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
10143         (arm_record_coproc_data_proc): Likewise.
10144
10145 2018-02-01  Yao Qi  <yao.qi@linaro.org>
10146
10147         * arm-tdep.c (arm_record_extension_space): Change ret to signed.
10148
10149 2018-01-31  Nikola Prica  <nikola.prica@rt-rk.com>
10150
10151         * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
10152         assign shifted lr_reg to fdata->lr_register when lr_reg is set.
10153
10154 2018-01-31  Pedro Alves  <palves@redhat.com>
10155
10156         * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
10157         * inflow.c (child_terminal_save_inferior): Wrap reference to
10158         tcgetpgrp in HAVE_TERMIOS_H.
10159         (child_interrupt, child_pass_ctrlc): Wrap references to signal in
10160         _WIN32.
10161         * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
10162         always iterate over all inferiors.
10163         (gdbsim_cntrl_c): Adjust.
10164         * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
10165
10166 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
10167
10168         * gdbtypes.c (lookup_array_range_type): Make sure the array's
10169         index type is objfile-owned if the element type is as well.
10170
10171 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
10172
10173         GDB 8.1 released.
10174
10175 2018-01-30  Philipp Rudo  <prudo@linux.vnet.ibm.com>
10176
10177         * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
10178         "features/s390x-linux64.c".
10179         (_initialize_s390_linux_tdep): Remove initialization of tdescs
10180         s390_linux32 and s390x_linux64.
10181         (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
10182         default tdesc.
10183         * s390-tdep.c: Include "features/s390-linux32.c" and
10184         "features/s390x-linux64.c".
10185         (s390_tdesc_valid): Add check for tdesc_has_registers.
10186         (s390_gdbarch_init): Make sure there is always a valid tdesc.
10187         (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
10188         tdesc_s390x_linux64.
10189         * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
10190         tdesc_s390x_linux64 to...
10191         * s390-tdep.h: ...here.
10192
10193 2018-01-30  Pedro Alves  <palves@redhat.com>
10194
10195         PR gdb/13211
10196         * config.in, configure: Regenerate.
10197         * configure.ac: Check for getpgid.
10198         * go32-nat.c (go32_pass_ctrlc): New.
10199         (go32_target): Install it.
10200         * inf-child.c (inf_child_target): Install
10201         child_terminal_save_inferior, child_pass_ctrlc and
10202         child_interrupt.
10203         * inf-ptrace.c (inf_ptrace_interrupt): Delete.
10204         (inf_ptrace_target): No longer install it.
10205         * infcmd.c (interrupt_target_1): Adjust.
10206         * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
10207         (child_interrupt): Declare.
10208         (inferior::terminal_state): New.
10209         * inflow.c (struct terminal_info): Update comments.
10210         (inferior_process_group): Delete.
10211         (terminal_is_ours): Delete.
10212         (gdb_tty_state): New.
10213         (child_terminal_init): Adjust.
10214         (is_gdb_terminal, sharing_input_terminal_1)
10215         (sharing_input_terminal): New functions.
10216         (child_terminal_inferior): Adjust.  Use sharing_input_terminal.
10217         Set the process's actual process group in the foreground if
10218         possible.  Handle is_ours_for_output/is_ours distinction.  Don't
10219         mark terminal as the inferior's if not sharing GDB's terminal.
10220         Don't check attach_flag.
10221         (child_terminal_ours_for_output, child_terminal_ours): Adjust to
10222         pass down a target_terminal_state.
10223         (child_terminal_save_inferior): New, factored out from ...
10224         (child_terminal_ours_1): ... this.  Handle
10225         target_terminal_state::is_ours_for_output.
10226         (child_interrupt, child_pass_ctrlc): New.
10227         (inflow_inferior_exit): Clear the inferior's terminal_state.
10228         (copy_terminal_info): Copy the inferior's terminal state.
10229         (_initialize_inflow): Remove reference to terminal_is_ours.
10230         * inflow.h (inferior_process_group): Delete.
10231         * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
10232         * procfs.c (procfs_target): Don't install procfs_interrupt.
10233         (procfs_interrupt): Delete.
10234         * remote.c (remote_serial_quit_handler): Adjust.
10235         (remote_interrupt): Remove ptid parameter.  Adjust.
10236         * target-delegates.c: Regenerate.
10237         * target.c: Include "terminal.h".
10238         (target_terminal::terminal_state): Rename to ...
10239         (target_terminal::m_terminal_state): ... this.
10240         (target_terminal::init): Adjust.
10241         (target_terminal::inferior): Adjust to per-inferior
10242         terminal_state.
10243         (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
10244         (target_terminal::ours, target_terminal::ours_for_output): Use
10245         target_terminal_is_ours_kind.
10246         (target_interrupt): Remove ptid parameter.  Adjust.
10247         (default_target_pass_ctrlc): Adjust.
10248         * target.h (target_ops::to_terminal_save_inferior): New field.
10249         (target_ops::to_interrupt): Remove ptid_t parameter.
10250         (target_interrupt): Remove ptid_t parameter.  Update comment.
10251         (target_pass_ctrlc): Update comment.
10252         * target/target.h (target_terminal_state): New scoped enum,
10253         factored out of ...
10254         (target_terminal::terminal_state): ... here.
10255         (target_terminal::inferior): Update comments.
10256         (target_terminal::restore_inferior): New.
10257         (target_terminal::is_inferior, target_terminal::is_ours)
10258         (target_terminal::is_ours_for_output): Adjust.
10259         (target_terminal::scoped_restore_terminal_state): Adjust to
10260         rename, and call restore_inferior() instead of inferior().
10261         (target_terminal::scoped_restore_terminal_state::m_state): Change
10262         type.
10263         (target_terminal::terminal_state): Rename to ...
10264         (target_terminal::m_terminal_state): ... this and change type.
10265
10266 2018-01-30  Pedro Alves  <palves@redhat.com>
10267
10268         * linux-nat.c (wait_for_signal): New function.
10269         (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
10270         directly.
10271         (async_terminal_is_ours)
10272         (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
10273         (linux_nat_add_target): Don't override
10274         to_terminal_inferior/to_terminal_ours.
10275
10276 2018-01-29  Sergio Durigan Junior  <sergiodj@redhat.com>
10277
10278         * remote.c (remote_follow_fork): Don't call "detach_inferior".
10279
10280 2018-01-28  Simon Marchi  <simon.marchi@ericsson.com>
10281
10282         * dwarf2read.c (free_dwo_files): Add forward-declaration.
10283         (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
10284         dwarf2_per_objfile_free here.
10285         (dwarf2_per_objfile_free): Remove.
10286         (_initialize_dwarf2_read): Don't register
10287         dwarf2_per_objfile_free as a registry cleanup.
10288
10289 2018-01-27  Eli Zaretskii  <eliz@gnu.org>
10290
10291         Avoid compilation errors in MinGW native builds
10292
10293         The error is triggered by including python-internal.h, and the
10294         error message is:
10295
10296              In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
10297                       from build-gnulib/import/math.h:27,
10298                       from d:/usr/Python26/include/pyport.h:235,
10299                       from d:/usr/Python26/include/Python.h:58,
10300                       from python/python-internal.h:94,
10301                       from python/py-arch.c:24:
10302              d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
10303         using ::hypot;
10304                 ^~~~~
10305
10306         This happens because Python headers define 'hypot' to expand t
10307         '_hypot' in the Windows builds.
10308         * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
10309         'hypoth'.  This avoids a compilation error.
10310
10311 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
10312
10313         * MAINTAINERS (Write After Approval): Fix ordering.
10314
10315 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
10316
10317         * MAINTAINERS (Write After Approval): Add Alan Hayward.
10318
10319 2018-01-26  Alan Modra  <amodra@gmail.com>
10320
10321         * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
10322         (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
10323         Remove nop.  Make const.  Comment.
10324         (powerpc32_plt_stub_so_2): New.
10325         (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
10326         Correct count.  Update uses.
10327         (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
10328         Move common code reading PLT entry word.  Correct
10329         powerpc32_plt_stub PLT address calculation.
10330         * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
10331         (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
10332         (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
10333         (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
10334         (ppc64_standard_linkage8): Likewise.
10335         * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
10336         Correct insns description.
10337         * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
10338
10339 2018-01-24  Pedro Alves  <palves@redhat.com>
10340
10341         GCC PR libstdc++/83906
10342         * gdbtypes.c (operator==(const dynamic_prop &,
10343         const dynamic_prop &)): New.
10344         (operator==(const range_bounds &, const range_bounds &)): New.
10345         (check_types_equal): Use them instead of memcmp.
10346         * gdbtypes.h (operator==(const dynamic_prop &,
10347         const dynamic_prop &)): Declare.
10348         (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
10349         (operator==(const range_bounds &, const range_bounds &)): Declare.
10350         (operator!=(const range_bounds &, const range_bounds &)): Declare.
10351
10352 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
10353
10354         * s390-linux-tdep.c (s390_record_address_mask)
10355         (s390_record_calc_disp_common, s390_record_calc_disp)
10356         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
10357         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
10358         (s390_process_record): Move to s390-tdep.c.
10359         (s390_linux_init_abi_any): Adjust.
10360         * s390-tdep.c (s390_record_address_mask)
10361         (s390_record_calc_disp_common, s390_record_calc_disp)
10362         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
10363         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
10364         (s390_process_record): Moved from s390-linux-tdep.c
10365         (s390_gdbarch_init): Adjust.
10366
10367 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
10368
10369         * s390-linux-nat.c (s390-tdep.h): New include.
10370         * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
10371         (HFILES_NO_SRCDIR): Add s390-tdep.h.
10372         (ALLDEPFILES): Add s390-tdep.c.
10373         * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
10374         * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
10375         * s390-tdep.h: ...this.  New file.
10376         * s390-linux-tdep.c (s390-tdep.h): New include.
10377         (_initialize_s390_tdep): Rename to...
10378         (_initialize_s390_linux_tdep): ...this and adjust.
10379         (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
10380         (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
10381         s390-tdep.h.
10382         (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
10383         (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
10384         (s390_is_partial_instruction, s390_software_single_step)
10385         (is_non_branch_ril, s390_displaced_step_copy_insn)
10386         (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
10387         (s390_prologue_data, s390_addr, s390_store, s390_load)
10388         (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
10389         (s390_register_call_saved, s390_guess_tracepoint_registers)
10390         (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
10391         (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
10392         (s390_pseudo_register_name, s390_pseudo_register_type)
10393         (s390_pseudo_register_read, s390_pseudo_register_write)
10394         (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
10395         (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
10396         (s390_addr_bits_remove, s390_address_class_type_flags)
10397         (s390_address_class_type_flags_to_name)
10398         (s390_address_class_name_to_type_flags, s390_effective_inner_type)
10399         (s390_function_arg_float, s390_function_arg_vector)
10400         (is_power_of_two, s390_function_arg_integer, s390_arg_state)
10401         (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
10402         (s390_frame_align, s390_register_return_value, s390_return_value)
10403         (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
10404         (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
10405         (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
10406         (s390_trad_frame_prev_register, s390_unwind_cache)
10407         (s390_prologue_frame_unwind_cache)
10408         (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
10409         (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
10410         (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
10411         (s390_stub_frame_this_id, s390_stub_frame_prev_register)
10412         (s390_stub_frame_sniffer, s390_stub_frame_unwind)
10413         (s390_frame_base_address, s390_local_base_address)
10414         (s390_frame_base, s390_gcc_target_options)
10415         (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
10416         (s390_validate_reg_range, s390_tdesc_valid)
10417         (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
10418         * s390-tdep.c: ...this.  New file.
10419
10420 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
10421
10422         * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
10423         (s390_process_record, s390_gdbarch_tdep_alloc)
10424         (s390_linux_init_abi_any): Use/set new hook.
10425
10426 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
10427
10428         * s390-linux-tdep.c (osabi.h): New include.
10429         (s390_linux_init_abi_31, s390_linux_init_abi_64)
10430         (s390_linux_init_abi_any): New functions.
10431         (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
10432
10433 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
10434
10435         * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
10436         tdesc_has_registers check
10437
10438 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
10439
10440         * s390-linux-tdep.c (s390_tdesc_valid): New function.
10441         (s390_validate_reg_range): New macro.
10442         (s390_gdbarch_init): Adjust.
10443
10444 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
10445
10446         * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
10447         (s390_gdbarch_tdep_alloc): Adjust.
10448         (s390_gdbarch_init): Adjust.
10449
10450 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
10451
10452         * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
10453         <have_tdb>: Change type to bool.
10454         (s390_gdbarch_tdep_alloc): Adjust.
10455         (s390_gdbarch_init): Adjust.
10456
10457 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
10458
10459         * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
10460         (gdbarch_tdep) <have_upper, have_vx>: New fields.
10461         (s390_gdbarch_tdep_alloc): New function.
10462         (s390_gdbarch_init): Allocate tdep at start and use its fields
10463         instead of separate variables.
10464
10465 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
10466
10467         * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
10468         when looking for cached gdbarch and add comment for remaining.
10469
10470 2018-01-22  Pedro Alves  <palves@redhat.com>
10471             Sergio Durigan Junior  <sergiodj@redhat.com>
10472
10473         * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
10474         case.
10475
10476 2018-01-22  Maciej W. Rozycki  <macro@mips.com>
10477
10478         * MAINTAINERS: Update my company e-mail address.
10479
10480 2018-01-22  Yao Qi  <yao.qi@linaro.org>
10481
10482         * regcache.c (cooked_write_test): New function.
10483         (_initialize_regcache): Register the test.
10484
10485 2018-01-22  Yao Qi  <yao.qi@linaro.org>
10486
10487         * ia64-tdep.c (ia64_pseudo_register_read): Call
10488         regcache->cooked_read instead of regcache_cooked_read_unsigned.
10489         * m32c-tdep.c (m32c_cat_read): Likewise.
10490         (m32c_r3r2r1r0_read): Likewise.
10491         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
10492         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
10493
10494 2018-01-22  Yao Qi  <yao.qi@linaro.org>
10495
10496         * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
10497         method raw_read instead of regcache_raw_read.
10498         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
10499         * arm-tdep.c (arm_neon_quad_read): Likewise.
10500         * avr-tdep.c (avr_pseudo_register_read): Likewise.
10501         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
10502         * frv-tdep.c (frv_pseudo_register_read): Likewise.
10503         * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
10504         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
10505         (i386_pseudo_register_read_into_value): Likewise.
10506         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
10507         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
10508         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
10509         * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
10510         * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
10511         * sparc-tdep.c (sparc32_pseudo_register_read):  Likewise.
10512         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
10513         * spu-tdep.c (spu_pseudo_register_read_spu):  Likewise.
10514         * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
10515
10516 2018-01-22  Yao Qi  <yao.qi@linaro.org>
10517
10518         * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
10519         * configure.tgt: Remove target mt.
10520         * mt-tdep.c: Remove.
10521         * regcache.c (cooked_read_test): Remove the check for mt.
10522
10523 2018-01-22  Yao Qi  <yao.qi@linaro.org>
10524
10525         * jit.c (jit_frame_prev_register): Call regcache::cooked_read
10526         instead of gdbarch_pseudo_register_read_value.
10527
10528 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
10529
10530         * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
10531         language is Ada.
10532
10533 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
10534
10535         * linespec.c (create_sals_line_offset): Remove code that preserved
10536         the symtab_and_line's line number.
10537
10538 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
10539
10540         * varobj.c (varobj_create): Don't set valid_block when creating a
10541         floating varobj.
10542
10543 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
10544
10545         * varobj.c (varobj_create): Remove out of date comment.
10546
10547 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
10548
10549         PR mi/20395
10550         * ada-exp.y (write_var_from_sym): Pass extra parameter when
10551         updating innermost block.
10552         * parse.c (innermost_block_tracker::update): Take extra type
10553         parameter, and check types match before updating innermost block.
10554         (write_dollar_variable): Update innermost block for registers.
10555         * parser-defs.h (enum innermost_block_tracker_type): New enum.
10556         (innermost_block_tracker::innermost_block_tracker): Initialise
10557         m_types member.
10558         (innermost_block_tracker::reset): Take type parameter.
10559         (innermost_block_tracker::update): Take type parameter, and pass
10560         type through as needed.
10561         (innermost_block_tracker::m_types): New member.
10562         * varobj.c (varobj_create): Pass type when reseting innermost
10563         block.
10564
10565 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
10566
10567         * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
10568         * ada-lang.c (resolve_subexp): Likewise.
10569         * breakpoint.c (set_breakpoint_condition) Likewise.
10570         (watch_command_1) Likewise.
10571         * c-exp.y (variable): Likewise.
10572         * d-exp.y (PrimaryExpression): Likewise.
10573         * f-exp.y (variable): Likewise.
10574         * go-exp.y (variable): Likewise.
10575         * m2-exp.y (variable): Likewise.
10576         * objfiles.c (objfile::~objfile): Likewise.
10577         * p-exp.y (variable): Likewise.
10578         * parse.c (innermost_block): Change type.
10579         * parser-defs.h (class innermost_block_tracker): New.
10580         (innermost_block): Change to innermost_block_tracker.
10581         * printcmd.c (display_command): Switch to innermost_block API.
10582         (do_one_display): Likewise.
10583         * rust-exp.y (do_one_display): Likewise.
10584         * symfile.c (clear_symtab_users): Likewise.
10585         * varobj.c (varobj_create): Switch to innermost_block API, replace
10586         use of innermost_block with block stored on varobj object.
10587
10588 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
10589
10590         * expression.h (innermost_block): Remove declaration.
10591         * varobj.c: Add 'parser-defs.h' include.
10592
10593 2018-01-19  Tom Tromey  <tom@tromey.com>
10594
10595         * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
10596         symbols in the static and global blocks.
10597
10598 2018-01-19  James Clarke  <jrtc27@jrtc27.com>
10599
10600         * nat/linux-ptrace.c: Remove unnecessary reinclusion of
10601         gdb_ptrace.h, and move including gdb_wait.h ...
10602         * nat/linux-ptrace.h: ... to here.
10603
10604 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
10605
10606         * inf-ptrace.c (inf_ptrace_detach): Adjust call to
10607         inf_ptrace_detach_success.
10608         (inf_ptrace_detach_success): Add inferior parameter, use it
10609         instead of inferior_ptid, pass it to detach_inferior.
10610         * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
10611         parameter.
10612         * inferior.c (detach_inferior): Add overload that takes an
10613         inferior object.
10614         * inferior.h (detach_inferior): Likewise.
10615         * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
10616         use inferior_ptid, adjust call to inf_ptrace_detach_success.
10617         * linux-thread-db.c (thread_db_detach): Use inf parameter.
10618
10619 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
10620
10621         * target.h (struct target_ops) <to_detach>: Add inferior
10622         parameter.
10623         (target_detach): Likewise.
10624         * target.c (dispose_inferior): Pass inferior down.
10625         (target_detach): Pass inferior down.  Assert that it is equal to
10626         the current inferior.
10627         * aix-thread.c (aix_thread_detach): Pass inferior down.
10628         * corefile.c (core_file_command): Pass current_inferior() down.
10629         * corelow.c (core_detach): Add inferior parameter.
10630         * darwin-nat.c (darwin_detach): Likewise.
10631         * gnu-nat.c (gnu_detach): Likewise.
10632         * inf-ptrace.c (inf_ptrace_detach): Likewise.
10633         * infcmd.c (detach_command): Pass current_inferior() down to
10634         target_detach.
10635         * infrun.c (follow_fork_inferior): Pass parent_inf to
10636         target_detach.
10637         (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
10638         target_detach.
10639         * linux-nat.c (linux_nat_detach): Add inferior parameter.
10640         * linux-thread-db.c (thread_db_detach): Likewise.
10641         * nto-procfs.c (procfs_detach): Likewise.
10642         * procfs.c (procfs_detach): Likewise.
10643         * record.c (record_detach): Likewise.
10644         * record.h (struct inferior): Forward-declare.
10645         (record_detach): Add inferior parameter.
10646         * remote-sim.c (gdbsim_detach): Likewise.
10647         * remote.c (remote_detach_1): Likewise.
10648         (remote_detach): Likewise.
10649         (extended_remote_detach): Likewise.
10650         * sol-thread.c (sol_thread_detach): Likewise.
10651         * target-debug.h (target_debug_print_inferior_p): New macro.
10652         * target-delegates.c: Re-generate.
10653         * top.c (kill_or_detach): Pass inferior down to target_detach.
10654         * windows-nat.c (windows_detach): Add inferior parameter.
10655
10656 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
10657
10658         * target.h (struct target_ops) <to_detach>: Remove args
10659         parameter.
10660         (target_detach): Likewise.
10661         * target.c (dispose_inferior): Adjust.
10662         (target_detach): Remove args parameter, adjust.
10663         * aix-thread.c (aix_thread_detach): Adjust.
10664         * corefile.c (core_file_command): Adjust.
10665         * corelow.c (core_detach): Adjust.
10666         * darwin-nat.c (darwin_detach): Adjust.
10667         * gnu-nat.c (gnu_detach): Adjust.
10668         * inf-ptrace.c (inf_ptrace_detach): Adjust.
10669         * infcmd.c (detach_command): Adjust
10670         * infrun.c (follow_fork_inferior): Adjust.
10671         (handle_vfork_child_exec_or_exit): Adjust.
10672         * linux-fork.c (linux_fork_detach): Remove args parameter.
10673         * linux-fork.h (linux_fork_detach): Likewise.
10674         * linux-nat.c (linux_nat_detach): Likewise, and adjust.
10675         * linux-thread-db.c (thread_db_detach): Likewise.
10676         * nto-procfs.c (procfs_detach): Likewise.
10677         * procfs.c (procfs_detach): Likewise.
10678         (do_detach): Remove signo parameter.
10679         * record.c (record_detach): Remove args parameter.
10680         * record.h (record_detach): Likewise.
10681         * remote-sim.c (gdbsim_detach): Likewise.
10682         * remote.c (remote_detach_1): Likewise.
10683         (remote_detach): Likewise.
10684         (extended_remote_detach): Likewise.
10685         * sol-thread.c (sol_thread_detach): Likewise.
10686         * target-delegates.c: Re-generate.
10687         * top.c (struct qt_args) <args>: Remove field.
10688         (kill_or_detach): Don't pass args.
10689         (quit_force): Don't set args.
10690         * windows-nat.c (windows_detach): Remove args parameter.
10691
10692 2018-01-19  Yao Qi  <yao.qi@linaro.org>
10693
10694         * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
10695         (arm_linux_init_abi): Install it.
10696
10697 2018-01-19  Yao Qi  <yao.qi@linaro.org>
10698
10699         * osabi.c (gdb_osabi_names): Extend the regexp for
10700         arm-linux-gnueabihf.
10701
10702 2018-01-18  Yao Qi  <yao.qi@linaro.org>
10703
10704         * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
10705         m_abbrevs.
10706         (abbrev_table::add_abbrev): Update.
10707         (abbrev_table::lookup_abbrev): Update.
10708
10709 2018-01-18  Yao Qi  <yao.qi@linaro.org>
10710
10711         * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
10712
10713 2018-01-17  Sergio Durigan Junior  <sergiodj@redhat.com>
10714
10715         * compile/compile.c (compile_to_object): Convert "triplet_rx"
10716         to "std::string".
10717
10718 2018-01-17  Tom Tromey  <tom@tromey.com>
10719
10720         * dwarf2read.c (symbolp): Remove typedef.  Don't instantiate VEC.
10721
10722 2018-01-17  Tom Tromey  <tom@tromey.com>
10723
10724         * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
10725         * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
10726         (create_array_type_with_stride): Update.
10727         * dwarf2read.c (set_die_type): Update.
10728
10729 2018-01-17  Tom Tromey  <tom@tromey.com>
10730
10731         * dwarf2read.c (delayed_method_info): Remove typedef.
10732         (dwarf2_cu::method_info): Now a std::vector.
10733         (add_to_method_list): Update.
10734         (free_delayed_list): Remove.
10735         (compute_delayed_physnames): Update.
10736         (process_full_comp_unit, process_full_type_unit): Clear the method
10737         list.  Remove cleanups.
10738         (psymtab_include_file_name): Add name_holder parameter.  Use
10739         unique_xmalloc_ptr.
10740         (dwarf_decode_lines): Update.
10741
10742 2018-01-17  Tom Tromey  <tom@tromey.com>
10743             Simon Marchi  <simon.marchi@ericsson.com>
10744
10745         * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
10746         (dwarf2_per_objfile::free_cached_comp_units)
10747         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
10748         (init_cutu_and_read_dies_no_follow): Update.
10749         (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
10750         (dwarf2_cu::~dwarf2_cu): New.
10751         (free_heap_comp_unit, free_stack_comp_unit): Remove.
10752         (age_cached_comp_units, free_one_cached_comp_unit): Update.
10753
10754 2018-01-17  Tom Tromey  <tom@tromey.com>
10755             Simon Marchi  <simon.marchi@ericsson.com>
10756
10757         * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
10758         (struct die_reader_specs) <abbrev_table>: New member.
10759         (struct abbrev_table): Add constructor.
10760         <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
10761         <abbrev_obstack>: Now an auto_obstack.
10762         (abbrev_table_up): New typedef.
10763         (init_cu_die_reader): Add abbrev_table parameter.
10764         (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
10765         Add result_dwo_abbrev_table.
10766         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
10767         (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
10768         Update.
10769         (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
10770         parameter.
10771         (skip_children): Update.
10772         (abbrev_table::alloc_abbrev): Rename from
10773         abbrev_table_alloc_abbrev.
10774         (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
10775         (abbrev_table::lookup_abbrev): Rename from
10776         abbrev_table_lookup_abbrev.
10777         (abbrev_table_read_table): Return abbrev_table_up.
10778         (abbrev_table_free, abbrev_table_free_cleanup)
10779         (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
10780         (load_partial_dies): Update.
10781
10782 2018-01-17  Tom Tromey  <tom@tromey.com>
10783
10784         * dwarf2read.c (dwarf2_compute_name): Update comment.
10785         (read_func_scope, read_variable): Update.
10786         (new_symbol): Remove.
10787         (new_symbol_full): Rename to new_symbol.
10788
10789 2018-01-17  Mike Gulick  <mgulick@mathworks.com>
10790
10791         PR gdb/16577
10792         * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
10793         a warning instead of throwing an error, set section size to 0 and return
10794         NULL.
10795         * gdb_bfd.h (gdb_bfd_map_section): Update description.
10796
10797 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
10798
10799         * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
10800         std::string.
10801         (linux_ptrace_attach_fail_reason_string): Likewise.
10802         * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
10803         Likewise.
10804         (linux_ptrace_attach_fail_reason_string): Likewise.
10805         * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
10806
10807 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
10808
10809         * linux-nat.c (linux_nat_attach): Remove xstrdup.
10810
10811 2018-01-17  Eldar Abusalimov  <eldar.abusalimov@jetbrains.com>
10812
10813         PR gdb/21559
10814         * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
10815         checking for fs_base/gs_base fields in struct user_regs_struct.
10816         * configure: Regenerate.
10817
10818 2018-01-17  Yao Qi  <yao.qi@linaro.org>
10819
10820         * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
10821         function.
10822         (aarch64_linux_init_abi): Install it to gdbarch hook
10823         gcc_target_options.
10824
10825 2018-01-15  Pedro Alves  <palves@redhat.com>
10826
10827         * common/signals-state-save-restore.c
10828         (save_original_signals_state): Fix typos.
10829
10830 2017-01-12  Tom Tromey  <tom@tromey.com>
10831             Sergio Durigan Junior  <sergiodj@redhat.com>
10832
10833         * Makefile.in (install-only): Install gdb-add-index.
10834
10835 2018-01-12  John Baldwin  <jhb@FreeBSD.org>
10836
10837         * fbsd-tdep.c (KVE_PROTECTION): Correct value.
10838
10839 2018-01-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10840
10841         * infrun.c (keep_going_pass_signal): Clear step-over info when
10842         insert_breakpoints fails.
10843
10844 2018-01-11  Pedro Alves  <palves@redhat.com>
10845
10846         PR gdb/22583
10847         * infrun.c (resume): Rename to ...
10848         (resume_1): ... this.
10849         (resume): Reimplement as wrapper around resume_1.
10850
10851 2018-01-11  Pedro Alves  <palves@redhat.com>
10852
10853         PR remote/22597
10854         * remote.c (remote_parse_stop_reply): Default to the last-set
10855         general thread instead of to 'magic_null_ptid'.
10856
10857 2018-01-10  Pedro Alves  <palves@redhat.com>
10858
10859         * language.h (language_get_symbol_name_matcher): Rename ...
10860         (get_symbol_name_matcher): ... this.
10861         * language.c (language_get_symbol_name_matcher): Ditto.
10862         * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
10863         callers adjusted.
10864
10865 2018-01-10  Pedro Alves  <palves@redhat.com>
10866
10867         PR gdb/22670
10868         * dwarf2read.c
10869         (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
10870         Adjust to use language_get_symbol_name_matcher instead of
10871         language_defn::la_get_symbol_name_matcher.
10872         * language.c (language_get_symbol_name_matcher): If in Ada mode
10873         and the lookup name is a verbatim match, return Ada's matcher.
10874         * language.h (language_get_symbol_name_matcher): Adjust comment.
10875         (ada_lookup_name_info::verbatim_p):: New method.
10876
10877 2018-01-10  Pedro Alves  <palves@redhat.com>
10878
10879         PR gdb/22670
10880         * ada-lang.c (ada_collect_symbol_completion_matches): If the
10881         minsym's language is language_auto or language_cplus, pass down
10882         language_ada instead.
10883         * symtab.c (compare_symbol_name): Don't frob symbol language here.
10884
10885 2018-01-10  Pedro Alves  <palves@redhat.com>
10886
10887         PR gdb/22670
10888         * minsyms.c (linkage_name_str): New function.
10889         (iterate_over_minimal_symbols): Use it.
10890
10891 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
10892
10893         * NEWS: Document that 'info proc' now works on FreeBSD.
10894
10895 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
10896
10897         * configure.ac: Check for kinfo_getfile in libutil.
10898         * configure: Regenerate.
10899         * config.in: Regenerate.
10900         * fbsd-nat.c: Include "fbsd-tdep.h".
10901         (fbsd_fetch_cmdline): New.
10902         (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
10903         rather than calling error.
10904         (fbsd_info_proc): New.
10905         (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
10906         (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
10907         (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
10908
10909 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
10910
10911         * fbsd-nat.c (struct free_deleter): Remove.
10912         (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
10913
10914 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
10915
10916         * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
10917         NULL for an empty pathname.
10918
10919 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
10920
10921         * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
10922         (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
10923         (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
10924         (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
10925         (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
10926         (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
10927         (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
10928         (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
10929         (kinfo_proc_layout_32, kinfo_proc_layout_i386)
10930         (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
10931         (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
10932         (fbsd_core_fetch_timeval, fbsd_print_sigset)
10933         (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
10934         (fbsd_init_abi):  Install gdbarch "core_info_proc" method.
10935         * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
10936
10937 2018-01-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>
10938
10939         * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
10940         (gnu_xfer_auxv): New function.
10941         (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
10942         TARGET_OBJECT_AUXV.
10943
10944 2018-01-08  Yao Qi  <yao.qi@linaro.org>
10945             Simon Marchi  <simon.marchi@ericsson.com>
10946
10947         * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
10948         common/selftest.c.
10949         (COMMON_OBS): Remove selftest.o.
10950         * configure.ac: Append selftest-arch.c and common/selftest.c to
10951         CONFIG_SRCS.  Append selftest-arch.o and selftest.o to COMMON_OBS.
10952         * configure: Re-generated.
10953         * maint.c (maintenance_selftest): Wrap selftests::run_tests with
10954         GDB_SELF_TEST.
10955         (maintenance_info_selftests): Likewise.
10956
10957 2018-01-08  Xavier Roirand  <roirand@adacore.com>
10958
10959         * ada-valprint.c (val_print_packed_array_elements): Use
10960         proper number of elements when printing an array indexed
10961         by an enumeration type.
10962
10963 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
10964
10965         * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
10966         (dw2_get_file_names_reader): Adjust.
10967         (lookup_dwo_signatured_type): Adjust.
10968         (lookup_dwp_signatured_type): Adjust.
10969         (lookup_signatured_type): Adjust.
10970         (create_type_unit_group): Adjust.
10971         (get_type_unit_group): Adjust.
10972         (process_psymtab_comp_unit_reader): Adjust.
10973         (build_type_psymtabs_reader): Adjust.
10974         (scan_partial_symbols): Adjust.
10975         (add_partial_symbol): Adjust.
10976         (add_partial_subprogram): Adjust.
10977         (peek_die_abbrev): Adjust.
10978         (fixup_go_packaging): Adjust.
10979         (process_imported_unit_die): Adjust.
10980         (dwarf2_compute_name): Adjust.
10981         (dwarf2_physname): Adjust.
10982         (read_import_statement): Adjust.
10983         (handle_DW_AT_stmt_list): Adjust.
10984         (read_file_scope): Adjust.
10985         (read_func_scope): Adjust.
10986         (read_lexical_block_scope): Adjust.
10987         (read_call_site_scope): Adjust.
10988         (read_variable): Adjust.
10989         (dwarf2_rnglists_process): Adjust.
10990         (dwarf2_ranges_process): Adjust.
10991         (dwarf2_ranges_read): Adjust.
10992         (dwarf2_get_pc_bounds): Adjust.
10993         (dwarf2_record_block_ranges): Adjust.
10994         (dwarf2_add_field): Adjust.
10995         (dwarf2_add_member_fn): Adjust.
10996         (read_structure_type): Adjust.
10997         (process_structure_scope): Adjust.
10998         (read_enumeration_type): Adjust.
10999         (read_array_type): Adjust.
11000         (mark_common_block_symbol_computed): Adjust.
11001         (read_common_block): Adjust.
11002         (read_namespace_type): Adjust.
11003         (read_namespace): Adjust.
11004         (read_module_type): Adjust.
11005         (read_tag_pointer_type): Adjust.
11006         (read_tag_ptr_to_member_type): Adjust.
11007         (read_tag_string_type): Adjust.
11008         (read_subroutine_type): Adjust.
11009         (read_typedef): Adjust.
11010         (read_base_type): Adjust.
11011         (attr_to_dynamic_prop): Adjust.
11012         (read_subrange_type): Adjust.
11013         (read_unspecified_type): Adjust.
11014         (dwarf2_read_abbrevs): Adjust.
11015         (load_partial_dies): Adjust.
11016         (read_partial_die): Adjust.
11017         (find_partial_die): Adjust.
11018         (guess_partial_die_structure_name): Adjust.
11019         (fixup_partial_die): Adjust.
11020         (read_attribute_value): Adjust.
11021         (read_addr_index): Adjust.
11022         (read_addr_index_from_leb128): Adjust.
11023         (read_str_index): Adjust.
11024         (dwarf2_string_attr): Adjust.
11025         (get_debug_line_section): Adjust.
11026         (dwarf_decode_line_header): Adjust.
11027         (lnp_state_machine::check_line_address): Adjust.
11028         (dwarf_decode_lines_1): Adjust.
11029         (dwarf_decode_lines): Adjust.
11030         (dwarf2_start_symtab): Adjust.
11031         (var_decode_location): Adjust.
11032         (new_symbol_full): Adjust.
11033         (dwarf2_const_value_data): Adjust.
11034         (dwarf2_const_value_attr): Adjust.
11035         (dwarf2_const_value): Adjust.
11036         (die_type): Adjust.
11037         (die_containing_type): Adjust.
11038         (build_error_marker_type): Adjust.
11039         (lookup_die_type): Adjust.
11040         (guess_full_die_structure_name): Adjust.
11041         (anonymous_struct_prefix): Adjust.
11042         (determine_prefix): Adjust.
11043         (dwarf2_name): Adjust.
11044         (follow_die_ref_or_sig): Adjust.
11045         (follow_die_offset): Adjust.
11046         (follow_die_ref): Adjust.
11047         (follow_die_sig_1): Adjust.
11048         (follow_die_sig): Adjust.
11049         (get_signatured_type): Adjust.
11050         (get_DW_AT_signature_type): Adjust.
11051         (decode_locdesc): Adjust.
11052         (dwarf_decode_macros): Adjust.
11053         (cu_debug_loc_section): Adjust.
11054         (fill_in_loclist_baton): Adjust.
11055         (dwarf2_symbol_mark_computed): Adjust.
11056         (init_one_comp_unit): Don't assign
11057         dwarf2_cu::dwarf2_per_objfile.
11058         (set_die_type): Adjust.
11059
11060 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
11061
11062         * dwarf2read.c (struct mapped_debug_names): Add constructor.
11063         <dwarf2_per_objfile>: New field.
11064         (dwarf2_per_objfile): Remove global.
11065         (get_dwarf2_per_objfile): New function.
11066         (set_dwarf2_per_objfile): New function.
11067         (dwarf2_build_psymtabs_hard): Change objfile parameter to
11068         dwarf2_per_objfile.
11069         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
11070         (read_abbrev_offset): Likewise.
11071         (read_indirect_string): Likewise.
11072         (read_indirect_line_string): Likewise.
11073         (read_indirect_string_at_offset): Likewise.
11074         (read_indirect_string_from_dwz): Likewise.
11075         (dwarf2_find_containing_comp_unit): Change objfile parameter to
11076         dwarf2_per_objfile.
11077         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
11078         (create_all_comp_units): Change objfile parameter to
11079         dwarf2_per_objfile.
11080         (create_all_type_units): Likewise.
11081         (process_queue): Add dwarf2_per_objfile parameter.
11082         (read_and_check_comp_unit_head): Likewise.
11083         (lookup_dwo_unit_in_dwp): Likewise.
11084         (get_dwp_file): Likewise.
11085         (process_cu_includes): Likewise.
11086         (struct free_dwo_file_cleanup_data): New struct.
11087         (dwarf2_has_info): Use get_dwarf2_per_objfile and
11088         set_dwarf2_per_objfile.
11089         (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
11090         (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
11091         context, adjust calls.
11092         (dw2_instantiate_symtab): Likewise.
11093         (dw2_get_cutu): Add dwarf2_per_objfile parameter.
11094         (dw2_get_cu): Likewise.
11095         (create_cu_from_index_list): Change objfile parameter to
11096         dwarf2_per_objfile.
11097         (create_cus_from_index_list): Get dwarf2_per_objfile from
11098         context, adjust calls.
11099         (create_cus_from_index): Likewise.
11100         (create_signatured_type_table_from_index): Change objfile
11101         parameter to dwarf2_per_objfile.
11102         (create_signatured_type_table_from_debug_names): Change objfile
11103         parameter to dwarf2_per_objfile.
11104         (create_addrmap_from_index): Likewise.
11105         (create_addrmap_from_aranges): Likewise.
11106         (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
11107         (dw2_setup): Remove.
11108         (dw2_get_file_names_reader): Get dwarf2_per_objfile from
11109         context.
11110         (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
11111         get_dwarf2_per_objfile.
11112         (dw2_forget_cached_source_info): Likewise.
11113         (dw2_map_symtabs_matching_filename): Likewise.
11114         (struct dw2_symtab_iterator) <index>: Remove.
11115         <dwarf2_per_objfile>: New field.
11116         (dw2_symtab_iter_init): Replace index parameter with
11117         dwarf2_per_objfile.
11118         (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
11119         (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
11120         (dw2_print_stats): Likewise.
11121         (dw2_dump): Likewise.
11122         (dw2_expand_symtabs_for_function): Likewise.
11123         (dw2_expand_all_symtabs): Likewise.
11124         (dw2_expand_symtabs_with_fullname): Likewise.
11125         (dw2_expand_marked_cus): Replace index and objfile parameters
11126         with dwarf2_per_objfile.
11127         (dw_expand_symtabs_matching_file_matcher): Add
11128         dwarf2_per_objfile parameter and adjust calls.
11129         (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
11130         adjust calls.
11131         (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
11132         (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
11133         adjust calls.
11134         (create_cus_from_debug_names_list): Replace objfile parameter
11135         with dwarf2_per_objfile and adjust calls.
11136         (create_cus_from_debug_names): Likewise.
11137         (dwarf2_read_debug_names): Likewise.
11138         (mapped_debug_names::namei_to_name): Adjust call.
11139         (dw2_debug_names_iterator::next): Likewise.
11140         (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
11141         (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
11142         (dw2_debug_names_dump): Likewise.
11143         (dw2_debug_names_expand_symtabs_for_function): Likewise.
11144         (dw2_debug_names_expand_symtabs_matching): Likewise.
11145         (dwarf2_initialize_objfile): Likewise.
11146         (dwarf2_build_psymtabs): Likewise.
11147         (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
11148         this_cu.
11149         (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
11150         (read_and_check_comp_unit_head): Likewise.
11151         (read_abbrev_offset): Likewise.
11152         (create_debug_type_hash_table): Likewise.
11153         (create_debug_types_hash_table): Likewise.
11154         (create_all_type_units): Replace objfile parameter with
11155         dwarf2_per_objfile.
11156         (add_type_unit): Add dwarf2_per_objfile parameter.
11157         (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
11158         with dwarf2_per_objfile.
11159         (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
11160         (lookup_dwp_signatured_type): Likewise.
11161         (lookup_signatured_type): Likewise.
11162         (read_cutu_die_from_dwo): Likewise.
11163         (init_tu_and_read_dwo_dies): Likewise.
11164         (init_cutu_and_read_dies): Likewise.
11165         (init_cutu_and_read_dies_no_follow): Likewise.
11166         (allocate_type_unit_groups_table): Add objfile parameter.
11167         (create_type_unit_group): Use dwarf2_per_objfile from cu.
11168         (get_type_unit_group): Likewise.
11169         (process_psymtab_comp_unit): Update call.
11170         (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
11171         (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
11172         (print_tu_stats): Likewise.
11173         (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
11174         in void* parameter.
11175         (build_type_psymtabs): Change objfile parameter to
11176         dwarf2_per_objfile.
11177         (process_skeletonless_type_unit): Use dwarf2_per_objfile
11178         passed in void* parameter.
11179         (process_skeletonless_type_units): Change objfile parameter to
11180         dwarf2_per_objfile.
11181         (set_partial_user): Likewise.
11182         (dwarf2_build_psymtabs_hard): Likewise.
11183         (read_comp_units_from_section): Likewise.
11184         (create_all_comp_units): Likewise.
11185         (scan_partial_symbols): Update calls.
11186         (add_partial_symbol): Likewise.
11187         (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
11188         (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
11189         (process_queue): Add dwarf2_per_objfile parameter.
11190         (get_compunit_symtab): Use dwarf2_per_objfile from cu.
11191         (compute_compunit_symtab_includes): Likewise.
11192         (process_cu_includes): Add dwarf2_per_objfile parameter.
11193         (process_full_comp_unit): Use dwarf2_per_objfile from cu.
11194         (process_full_type_unit): Likewise.
11195         (process_imported_unit_die): Update call.
11196         (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
11197         (read_file_scope): Likewise.
11198         (allocate_dwo_file_hash_table): Add objfile parameter.
11199         (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
11200         (create_cus_hash_table): Likewise.
11201         (create_dwp_hash_table): Likewise.
11202         (create_dwo_unit_in_dwp_v1): Likewise.
11203         (create_dwp_v2_section): Likewise.
11204         (create_dwo_unit_in_dwp_v2): Likewise.
11205         (lookup_dwo_unit_in_dwp): Likewise.
11206         (try_open_dwop_file): Likewise.
11207         (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
11208         (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
11209         cleanup to include a reference to dwarf2_per_objfile.
11210         (open_dwp_file): Add dwarf2_per_objfile parameter.
11211         (open_and_init_dwp_file): Likewise.
11212         (get_dwp_file): Likewise.
11213         (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
11214         (queue_and_load_all_dwo_tus): Update call.
11215         (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
11216         data.
11217         (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
11218         (dwarf2_ranges_process): Likewise.
11219         (dwarf2_get_pc_bounds): Likewise.
11220         (mark_common_block_symbol_computed): Likewise.
11221         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
11222         (dwarf2_read_abbrevs): Update call.
11223         (read_partial_die): Use dwarf2_per_objfile from cu.
11224         (find_partial_die): Likewise.
11225         (fixup_partial_die): Likewise.
11226         (read_attribute_value): Likewise.
11227         (read_indirect_string_at_offset_from): Add objfile parameter.
11228         (read_indirect_string_at_offset): Add dwarf2_per_objfile
11229         parameter.
11230         (read_indirect_string_from_dwz): Add objfile parameter.
11231         (read_indirect_string): Add objfile parameter.
11232         (read_addr_index_1): Add dwarf2_per_objfile parameter.
11233         (read_addr_index): Use dwarf2_per_objfile from cu.
11234         (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
11235         call dw2_setup.
11236         (read_str_index): Use dwarf2_per_objfile from cu.
11237         (get_debug_line_section): Likewise.
11238         (read_formatted_entries): Add dwarf2_per_objfile parameter.
11239         (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
11240         (new_symbol_full): Use dwarf2_per_objfile from cu.
11241         (build_error_marker_type): Likewise.
11242         (lookup_die_type): Likewise.
11243         (determine_prefix): Likewise.
11244         (follow_die_offset): Likewise.
11245         (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
11246         (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
11247         (dwarf2_fetch_die_type_sect_off): Likewise.
11248         (dwarf2_get_die_type): Likewise.
11249         (follow_die_sig_1): Use dwarf2_per_objfile from cu.
11250         (get_signatured_type): Likewise.
11251         (get_DW_AT_signature_type): Likewise.
11252         (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
11253         (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
11254         (cu_debug_loc_section): Likewise.
11255         (fill_in_loclist_baton): Likewise.
11256         (dwarf2_symbol_mark_computed): Likewise.
11257         (dwarf2_find_containing_comp_unit): Change objfile parameter to
11258         dwarf2_per_objfile.
11259         (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
11260         parameter.
11261         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
11262         (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
11263         (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
11264         (set_die_type): Use dwarf2_free_objfile from cu.
11265         (get_die_type_at_offset): Likewise.
11266         (dwarf2_per_objfile_free): Don't assign global variable.
11267         (debug_names) <constructor>: Add dwarf2_per_objfile
11268         parameter, update m_debugstrlookup construction.
11269         (debug_names::debug_str_lookup): Add dwarf2_per_objfile
11270         parameter.
11271         <m_dwarf2_per_objfile>: New field.
11272         <lookup>: Use m_dwarf2_per_objfile.
11273         (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
11274         (psyms_seen_size): Likewise.
11275         (write_gdbindex): Replace objfile parameter with
11276         dwarf2_per_objfile.
11277         (write_debug_names): Likewise.
11278         (write_psymtabs_to_index): Likewise.
11279         (save_gdb_index_command): Use get_dwarf2_per_objfile, update
11280         calls.
11281
11282 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
11283
11284         * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
11285         <dwarf2_per_objfile>: New field.
11286         (struct dwarf2_per_cu_data) <objfile>: Remove.
11287         <dwarf2_per_objfile>: New field.
11288         (create_cu_from_index_list): Assign dwarf2_per_objfile instead
11289         of objfile.
11290         (create_signatured_type_table_from_index): Likewise.
11291         (create_debug_type_hash_table): Likewise.
11292         (fill_in_sig_entry_from_dwo_entry): Likewise.
11293         (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
11294         (create_type_unit_group): Assign dwarf2_per_objfile instead of
11295         objfile.
11296         (create_partial_symtab): Access objfile through
11297         dwarf2_per_objfile.
11298         (process_psymtab_comp_unit_reader): Likewise.
11299         (read_comp_units_from_section): Likewise.
11300         (scan_partial_symbols): Likewise.
11301         (add_partial_symbol): Likewise.
11302         (add_partial_subprogram): Likewise.
11303         (peek_die_abbrev): Likewise.
11304         (fixup_go_packaging): Likewise.
11305         (process_full_comp_unit): Likewise.
11306         (process_full_type_unit): Likewise.
11307         (process_imported_unit_die): Likewise.
11308         (dwarf2_compute_name): Likewise.
11309         (dwarf2_physname): Likewise.
11310         (read_import_statement): Likewise.
11311         (create_cus_hash_table): Assign dwarf2_physname instead of
11312         objfile.
11313         (read_func_scope): Access objfile through dwarf2_per_objfile.
11314         (read_lexical_block_scope): Likewise.
11315         (read_call_site_scope): Likewise.
11316         (read_variable): Likewise.
11317         (dwarf2_rnglists_process): Likewise.
11318         (dwarf2_ranges_process): Likewise.
11319         (dwarf2_ranges_read): Likewise.
11320         (dwarf2_record_block_ranges): Likewise.
11321         (dwarf2_add_field): Likewise.
11322         (dwarf2_add_member_fn): Likewise.
11323         (read_structure_type): Likewise.
11324         (process_structure_scope): Likewise.
11325         (read_enumeration_type): Likewise.
11326         (read_array_type): Likewise.
11327         (read_common_block): Likewise.
11328         (read_namespace_type): Likewise.
11329         (read_namespace): Likewise.
11330         (read_module_type): Likewise.
11331         (read_tag_pointer_type): Likewise.
11332         (read_tag_ptr_to_member_type): Likewise.
11333         (read_tag_string_type): Likewise.
11334         (read_subroutine_type): Likewise.
11335         (read_typedef): Likewise.
11336         (read_base_type): Likewise.
11337         (attr_to_dynamic_prop): Likewise.
11338         (read_subrange_type): Likewise.
11339         (read_unspecified_type): Likewise.
11340         (load_partial_dies): Likewise.
11341         (read_partial_die): Likewise.
11342         (find_partial_die): Likewise.
11343         (guess_partial_die_structure_name): Likewise.
11344         (fixup_partial_die): Likewise.
11345         (read_attribute_value): Likewise.
11346         (read_addr_index_from_leb128): Likewise.
11347         (dwarf2_read_addr_index): Likewise.
11348         (dwarf2_string_attr): Likewise.
11349         (lnp_state_machine::check_line_address): Likewise.
11350         (dwarf_decode_lines_1): Likewise.
11351         (dwarf_decode_lines): Likewise.
11352         (dwarf2_start_symtab): Likewise.
11353         (var_decode_location): Likewise.
11354         (new_symbol_full): Likewise.
11355         (dwarf2_const_value_data): Likewise.
11356         (dwarf2_const_value_attr): Likewise.
11357         (dwarf2_const_value): Likewise.
11358         (die_type): Likewise.
11359         (die_containing_type): Likewise.
11360         (lookup_die_type): Likewise.
11361         (guess_full_die_structure_name): Likewise.
11362         (anonymous_struct_prefix): Likewise.
11363         (dwarf2_name): Likewise.
11364         (follow_die_ref_or_sig): Likewise.
11365         (follow_die_offset): Likewise.
11366         (follow_die_ref): Likewise.
11367         (dwarf2_fetch_die_loc_sect_off): Likewise.
11368         (dwarf2_fetch_constant_bytes): Likewise.
11369         (dwarf2_fetch_die_type_sect_off): Likewise.
11370         (dwarf2_get_die_type): Likewise.
11371         (follow_die_sig): Likewise.
11372         (decode_locdesc): Likewise.
11373         (dwarf2_per_cu_objfile): Likewise.
11374         (dwarf2_per_cu_text_offset): Likewise.
11375         (init_one_comp_unit): Assign dwarf2_per_objfile instead of
11376         objfile.
11377         (set_die_type): Access objfile through
11378         dwarf2_per_objfile.
11379
11380 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
11381
11382         * valprint.c (converted_character_d): Remove typedef.
11383         (DEF_VEC_O (converted_character_d)): Remove.
11384         (count_next_character): Use std::vector.
11385         (print_converted_chars_to_obstack): Likewise.
11386         (generic_printstr): Likewise.
11387
11388 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
11389
11390         * xml-support.h (struct gdb_xml_value): Add constructor.
11391         <value>: Change type to unique_xmalloc_ptr.
11392         (gdb_xml_value_s): Remove typedef.
11393         (DEF_VEC_O (gdb_xml_value_s)): Remove.
11394         (gdb_xml_element_start_handler): Change parameter type to
11395         std::vector.
11396         (xml_find_attribute): Likewise.
11397         * xml-support.c (xml_find_attribute): Change parameter type to
11398         std::vector and adjust.
11399         (gdb_xml_values_cleanup): Remove.
11400         (gdb_xml_parser::start_element): Adjust to std::vector.
11401         (xinclude_start_include): Change paraeter type to std::vector
11402         and adjust.
11403         * btrace.c (check_xml_btrace_version): Likewise.
11404         (parse_xml_btrace_block): Likewise.
11405         (parse_xml_btrace_pt_config_cpu): Likewise.
11406         (parse_xml_btrace_pt): Likewise.
11407         (parse_xml_btrace_conf_bts): Likewise.
11408         (parse_xml_btrace_conf_pt): Likewise.
11409         * memory-map.c (memory_map_start_memory): Likewise.
11410         (memory_map_start_property): Likewise.
11411         * osdata.c (osdata_start_osdata): Likewise.
11412         (osdata_start_item): Likewise.
11413         (osdata_start_column): Likewise.
11414         * remote.c (start_thread): Likewise.
11415         * solib-aix.c (library_list_start_library): Likewise.
11416         (library_list_start_list): Likewise.
11417         * solib-svr4.c (library_list_start_library): Likewise.
11418         (svr4_library_list_start_list): Likewise.
11419         * solib-target.c (library_list_start_segment): Likewise.
11420         (library_list_start_section): Likewise.
11421         (library_list_start_library): Likewise.
11422         (library_list_start_list): Likewise.
11423         * tracepoint.c (traceframe_info_start_memory): Likewise.
11424         (traceframe_info_start_tvar): Likewise.
11425         * xml-syscall.c (syscall_start_syscall): Likewise.
11426         * xml-tdesc.c (tdesc_start_target): Likewise.
11427         (tdesc_start_feature): Likewise.
11428         (tdesc_start_reg): Likewise.
11429         (tdesc_start_union): Likewise.
11430         (tdesc_start_struct): Likewise.
11431         (tdesc_start_flags): Likewise.
11432         (tdesc_start_enum): Likewise.
11433         (tdesc_start_field): Likewise.
11434         (tdesc_start_enum_value): Likewise.
11435         (tdesc_start_vector): Likewise.
11436
11437 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
11438
11439         * extension.h (struct xmethod_worker) <clone>: Remove.
11440         * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
11441         Remove.
11442         (python_xmethod_worker::clone): Remove.
11443         * valops.c (find_overload_match): Use std::move instead of
11444         clone.
11445
11446 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
11447
11448         * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
11449         (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
11450         <free_xmethod_worker_data>: Remove.
11451         <get_matching_xmethod_workers>: Chance VEC to std::vector.
11452         <get_xmethod_arg_types>: Remove.
11453         <get_xmethod_result_type>: Remove.
11454         <invoke_xmethod>: Remove.
11455         * extension.c (new_xmethod_worker): Remove.
11456         (clone_xmethod_worker): Remove.
11457         (get_matching_xmethod_workers): Return void, pass std::vector by
11458         pointer.
11459         (get_xmethod_arg_types): Rename to...
11460         (xmethod_worker::get_arg_types): ... this, and adjust.
11461         (get_xmethod_result_type): Rename to...
11462         (xmethod_worker::get_result_type): ... this, and adjust.
11463         (invoke_xmethod): Remove.
11464         (free_xmethod_worker): Remove.
11465         (free_xmethod_worker_vec): Remove.
11466         * extension.h (enum ext_lang_rc): Move here from
11467         extension-priv.h.
11468         (struct xmethod_worker): Add constructor and destructor.
11469         <data>: Remove.
11470         <value>: Remove.
11471         <invoke, clone, do_get_result_type, do_get_arg_types>: New
11472         virtual pure methods.
11473         <get_arg_types, get_result_type>: New methods.
11474         (xmethod_worker_ptr): Remove typedef.
11475         (DEF_VEC_P (xmethod_worker_ptr)): Remove.
11476         (xmethod_worker_vec): Remove typedef.
11477         (xmethod_worker_up): New typedef.
11478         (invoke_xmethod): Remove.
11479         (clone_xmethod_worker): Remove.
11480         (free_xmethod_worker): Remove.
11481         (free_xmethod_worker_vec): Remove.
11482         (get_xmethod_arg_types): Remove.
11483         (get_xmethod_result_type): Remove.
11484         * valops.c (find_method_list): Use std::vector, don't use
11485         intermediate vector.
11486         (value_find_oload_method_list): Use std::vector.
11487         (find_overload_match): Use std::vector.
11488         (find_oload_champ): Use std::vector.
11489         * value.c (value_free): Use operator delete.
11490         (value_of_xmethod): Rename to...
11491         (value_from_xmethod): ... this.  Don't assign
11492         xmethod_worker::value, take rvalue-reference.
11493         (result_type_of_xmethod): Adjust.
11494         (call_xmethod): Adjust.
11495         * value.h: Include extension.h.
11496         (struct xmethod_worker): Don't forward-declare.
11497         (value_of_xmethod): Rename to...
11498         (value_from_xmethod): ... this, take rvalue-reference.
11499         * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
11500         (struct python_xmethod_worker): ... this, add constructor and
11501         destructor.
11502         <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
11503         (gdbpy_free_xmethod_worker_data): Rename to...
11504         (python_xmethod_worker::~python_xmethod_worker): ... this and
11505         adjust.
11506         (gdbpy_clone_xmethod_worker_data): Rename to...
11507         (python_xmethod_worker::clone): ... this and adjust.
11508         (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
11509         temporary vector.
11510         (gdbpy_get_xmethod_arg_types): Rename to...
11511         (python_xmethod_worker::do_get_arg_types): ... this and adjust.
11512         (gdbpy_get_xmethod_result_type): Rename to...
11513         (python_xmethod_worker::do_get_result_type): ... this and
11514         adjust.
11515         (gdbpy_invoke_xmethod): Rename to...
11516         (python_xmethod_worker::invoke): ... this and adjust.
11517         (new_python_xmethod_worker): Rename to...
11518         (python_xmethod_worker::python_xmethod_worker): ... this and
11519         adjust.
11520         * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
11521         Remove.
11522         (gdbpy_free_xmethod_worker_data): Remove.
11523         (gdbpy_get_matching_xmethod_workers): Use std::vector.
11524         (gdbpy_get_xmethod_arg_types): Remove.
11525         (gdbpy_get_xmethod_result_type): Remove.
11526         (gdbpy_invoke_xmethod): Remove.
11527         * python/python.c (python_extension_ops): Remove obsolete
11528         callbacks.
11529
11530 2018-01-05  Pedro Alves  <palves@redhat.com>
11531
11532         PR gdb/18653
11533         * common/signals-state-save-restore.c
11534         (save_original_signals_state): New parameter 'quiet'.  Warn if we
11535         find a custom handler preinstalled, instead of internal erroring.
11536         But only warn if !quiet.
11537         * common/signals-state-save-restore.h
11538         (save_original_signals_state): New parameter 'quiet'.
11539         * main.c (captured_main_1): Move save_original_signals_state call
11540         after option handling, and pass QUIET.
11541
11542 2018-01-05  Pedro Alves  <palves@redhat.com>
11543
11544         * spu-tdep.c (spu_catch_start): Pass
11545         symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
11546
11547 2018-01-05  Pedro Alves  <palves@redhat.com>
11548
11549         PR gdb/22670
11550         * ada-lang.c (literal_symbol_name_matcher): New function.
11551         (ada_get_symbol_name_matcher): Use it for
11552         symbol_name_match_type::SEARCH_NAME.
11553         * block.c (block_lookup_symbol): New parameter 'match_type'.  Pass
11554         it down instead of assuming symbol_name_match_type::FULL.
11555         * block.h (block_lookup_symbol): New parameter 'match_type'.
11556         * c-valprint.c (print_unpacked_pointer): Use
11557         lookup_symbol_search_name instead of lookup_symbol.
11558         * compile/compile-object-load.c (get_out_value_type): Pass down
11559         symbol_name_match_type::SEARCH_NAME.
11560         * cp-namespace.c (cp_basic_lookup_symbol): Pass down
11561         symbol_name_match_type::FULL.
11562         * cp-support.c (cp_get_symbol_name_matcher): Handle
11563         symbol_name_match_type::SEARCH_NAME.
11564         * infrun.c (insert_exception_resume_breakpoint): Use
11565         lookup_symbol_search_name.
11566         * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
11567         * psymtab.c (maintenance_check_psymtabs): Use
11568         symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
11569         * stack.c (print_frame_args): Use lookup_symbol_search_name and
11570         SYMBOL_SEARCH_NAME.
11571         * symtab.c (lookup_local_symbol): Don't demangle the lookup name
11572         if symbol_name_match_type::SEARCH_NAME.
11573         (lookup_symbol_in_language): Pass down
11574         symbol_name_match_type::FULL.
11575         (lookup_symbol_search_name): New.
11576         (lookup_language_this): Pass down
11577         symbol_name_match_type::SEARCH_NAME.
11578         (lookup_symbol_aux, lookup_local_symbol): New parameter
11579         'match_type'.  Pass it down.
11580         * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
11581         (lookup_symbol_search_name): New declaration.
11582         (lookup_symbol_in_block): New 'match_type' parameter.
11583
11584 2018-01-05  Pedro Alves  <palves@redhat.com>
11585
11586         PR gdb/22670
11587         * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
11588         ada_lookup_symbol.
11589         (ada_lookup_symbol): Reimplement in terms of
11590         ada_lookup_symbol_list, bits factored out from
11591         ada_lookup_encoded_symbol.
11592
11593 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
11594
11595         * ada-exp.y (write_object_renaming): When subscripting an array
11596         using a symbol as the index, pass the block in call to
11597         ada_lookup_encoded_symbol when looking that symbol up.
11598
11599 2018-01-05  Jerome Guitton  <guitton@adacore.com>
11600
11601         * ada-lang.c (ada_array_length): Use ada_index_type instead of
11602         TYPE_INDEX_TYPE.
11603
11604 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
11605
11606         * ada-lang.c (ada_to_fixed_value_create): Add handling of
11607         the case where VALUE_LVAL (val0) is not lval_memory.
11608
11609 2018-01-05  Xavier Roirand  <roirand@adacore.com>
11610
11611         * ada-valprint.c (print_optional_low_bound): Handle
11612         character-indexed array printing like boolean-indexed array
11613         printing.
11614
11615 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
11616
11617         * NEWS: Create a new section for the next release branch.
11618         Rename the section of the current branch, now that it has
11619         been cut.
11620
11621 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
11622
11623         GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
11624         * version.in: Bump version to 8.1.50.DATE-git.
11625
11626 2018-01-03  Xavier Roirand  <roirand@adacore.com>
11627
11628         * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
11629         Add field.
11630         * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
11631         Add field.
11632         (default_exception_support_info) <catch_handlers_sym>: Add field.
11633         (exception_support_info_fallback) <catch_handlers_sym>: Add field.
11634         (ada_exception_name_addr_1): Add "catch handlers" handling.
11635         (ada_exception_catchpoint_cond_string) <ex>: New parameter.
11636         Update all callers.
11637         (create_excep_cond_exprs) <ex>: Add parameter.
11638         (re_set_exception): Update create_excep_cond_exprs call.
11639         (print_it_exception, print_one_exception, print_mention_exception)
11640         (print_recreate_exception): Add "catch handler" handling.
11641         (allocate_location_catch_handlers, re_set_catch_handlers)
11642         (check_status_catch_handlers, print_it_catch_handlers)
11643         (print_one_catch_handlers, print_mention_catch_handlers)
11644         (print_recreate_catch_handlers): New function.
11645         (catch_handlers_breakpoint_ops): New variable.
11646         (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
11647         Add parameter.  Add "catch handler" handling.
11648         (ada_exception_sym_name, ada_exception_breakpoint_ops):
11649         Add "catch handler" handling.
11650         (ada_exception_catchpoint_cond_string): Add "catch handler"
11651         handling.
11652         (create_ada_exception_catchpoint): Update create_excep_cond_exprs
11653         call.
11654         (catch_ada_handlers_command): New function.
11655         (initialize_ada_catchpoint_ops): Initialize "catch handlers"
11656         operations structure.
11657         (_initialize_ada_language): Add "catch handlers" command entry.
11658         * NEWS: Document "catch handlers" feature.
11659
11660 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
11661
11662         * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
11663         account when creating the array type of the slice.
11664         (ada_value_slice): Likewise.
11665
11666 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
11667
11668         * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
11669         New enum value.
11670         (create_array_type_with_stride): Add byte_stride_prop parameter.
11671         * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
11672         New parameter.  Update all callers in this file.
11673         (array_type_has_dynamic_stride): New function.
11674         (is_dynamic_type_internal, resolve_dynamic_array): Add handling
11675         of arrays with dynamic byte strides.
11676         * dwarf2read.c (read_array_type): Add support for dynamic
11677         DW_AT_byte_stride attributes.
11678
11679 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
11680
11681         * dwarf2read.c (read_unspecified_type): Treat
11682         DW_TAG_enumeration_type DIEs from Ada units as stubs.
11683
11684 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
11685
11686         Update copyright year range in all GDB files.
11687
11688 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
11689
11690         * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
11691         and gdb/testsuite/gdb.base/step-line.c.
11692
11693 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
11694
11695         * copyright.py (main): Dump the contents of
11696         MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
11697         even if BY_HAND is empty.
11698
11699 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
11700
11701         * top.c (print_gdb_version): Update Copyright year in version
11702         message.
11703
11704 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
11705
11706         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
11707
11708 For older changes see ChangeLog-2017.
11709 \f
11710 Local Variables:
11711 mode: change-log
11712 left-margin: 8
11713 fill-column: 74
11714 version-control: never
11715 coding: utf-8
11716 End: