Automatic date update in version.in
[external/binutils.git] / gdb / ChangeLog
1 2018-11-15  Joel Brobecker  <brobecker@adacore.com>
2
3         * unittests/copy_bitwise-selftests.c: New file.
4         * utils.c (selftests::bits_to_str, selftests::check_copy_bitwise)
5         (selftests::copy_bitwise_tests): Delete, moving this code to
6         unittests/copy_bitwise-selftests.c instead.
7         (_initialize_utils): Do not register copy_bitwise tests.
8         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9         unittests/copy_bitwise-selftests.c.
10
11 2018-11-14  Joel Brobecker  <brobecker@adacore.com>
12
13         * ada-lang.c (move_bits): Delete. Update all callers to use
14         copy_bitwise instead.
15         * dwarf2loc.c (copy_bitwise, bits_to_str::bits_to_str)
16         (selftests::check_copy_bitwise, selftests::copy_bitwise_tests):
17         Move from here to utils.c.
18         (_initialize_dwarf2loc): Remove call to register copy_bitwise
19         selftests.
20         * utils.h (copy_bitwise): Add declaration.
21         * utils.c (copy_bitwise, bits_to_str::bits_to_str)
22         (selftests::check_copy_bitwise, selftests::copy_bitwise_tests):
23         Moved here from dwarf2loc.c.
24         (_initialize_utils): Register copy_bitwise selftests.
25
26 2018-11-14  Jim Wilson  <jimw@sifive.com>
27
28         * riscv-tdep.c (struct riscv_arg_info): New field is_unnamed.
29         (riscv_call_arg_scalar_int): If unnamed arg with twice xlen alignment,
30         then increment next_regnum if odd.
31         (riscv_arg_location): New arg is_unnamed.  Set ainfo->is_unnamed.
32         (riscv_push_dummy_call): New local ftype.  Call check_typedef to set
33         function type.  Pass new arg to riscv_arg_location based on function
34         type.
35         (riscv_return_value): Pass new arg to riscv_arg_location.
36
37         * riscv-tdep.c (BIGGEST_ALIGNMENT): New.
38         (riscv_type_alignment) <TYPE_CODE_ARRAY>: If TYPE_VECTOR, return min
39         of TYPE_LENGTH and BIGGEST_ALIGNMENT.
40
41         * riscv-tdep.c (riscv_call_arg_scalar_int): Use std::min when
42         setting len.  New local align, set to max of arg align and xlen,
43         and pass to first riscv_assign_stack_location call.
44
45 2018-11-12  Simon Marchi  <simon.marchi@polymtl.ca>
46
47         * skip.c (complete_skip_number): New function.
48         (_initialize_step_skip): Add completers to some skip commands.
49
50 2018-11-09  Tom Tromey  <tom@tromey.com>
51
52         * remote.c (remote_g_packet_guess_s): Remove typedef and DEF_VEC.
53         (struct remote_g_packet_data): Derive from allocate_on_obstack.
54         <guesses>: Now a std::vector.
55         (remote_g_packet_data_init, register_remote_g_packet_guess):
56         Update.
57         (remote_read_description_p): Update.  Return bool.
58         (remote_target::read_description): Update.
59         (struct remote_g_packet_guess): Add constructor.
60
61 2018-11-09  Tom Tromey  <tom@tromey.com>
62
63         * common/scoped_fd.h (class scoped_fd): Add move constructor and
64         move assignment operator.
65         * psymtab.c (psymtab_to_fullname): Update.
66         * source.h (open_source_file): Return scoped_fd.
67         (find_and_open_source): Likewise.
68         * source.c (open_source_file): Return scoped_fd.
69         (get_filename_and_charpos): Update.
70         (print_source_lines_base): Update.  Use scoped_fd::to_file.
71         (forward_search_command): Likewise.
72         (reverse_search_command): Likewise.
73         (find_and_open_source): Return scoped_fd.
74         * tui/tui-source.c (tui_set_source_content): Update.  Use
75         gdb_file_up.
76
77 2018-11-09  John Baldwin  <jhb@FreeBSD.org>
78
79         * minsyms.c (minimal_symbol_reader::install): Fix unsigned
80         overflow.
81
82 2018-11-09  Hafiz Abid Qadeer  <abidh@codesourcery.com>
83
84         * configure: Regenerate.
85
86 2018-11-09  Tom de Vries  <tdevries@suse.de>
87
88         * symtab.c (symbol_set_names): Call symbol_find_demangled_name
89         unconditionally, to set the language of the symbol.  Manage freeing
90         returned pointer using gdb::unique_xmalloc_ptr.
91
92 2018-11-08  Tom Tromey  <tom@tromey.com>
93
94         * record.c (require_record_target): Upper-case "<TAB>".
95
96 2018-11-08  Tom Tromey  <tom@tromey.com>
97
98         * python/lib/gdb/command/pretty_printers.py
99         (InfoPrettyPrinter.invoke): Don't indent "objfile" heading.
100
101 2018-11-08  Tom Tromey  <tom@tromey.com>
102
103         PR gdb/23555:
104         PR gdb/23838:
105         * target.h (target_supports_terminal_ours): Return bool.
106         * target.c (target_supports_terminal_ours): Handle case where
107         current_top_target returns nullptr.  Return bool.
108
109 2018-11-08  Joel Brobecker  <brobecker@adacore.com>
110
111         * aarch64-tdep.c (aapcs_is_vfp_call_or_return_candidate_1):
112         return the correct count for potential HFAs.
113
114 2018-11-08  Jan Beulich  <jbeulich@suse.com>
115
116         * i387-tdep.c (i387_supply_xsave): Split handling of
117         X86_XSTATE_ZMM_H and X86_XSTATE_ZMM.
118         (i387_collect_xsave): Likewise.
119
120 2018-11-08  Andrew Burgess  <andrew.burgess@embecosm.com>
121
122         * riscv-tdep.c (riscv_insn::decode): Update header comment.
123         (riscv_frame_this_id): Catch errors thrown while building the
124         frame cache, leave the frame id as the default, which is the outer
125         frame id.
126
127 2018-11-07  Joel Brobecker  <brobecker@adacore.com>
128
129         * ada-lang.c (read_atcb): Only set task_info->called_task if
130         task_info->state == Entry_Caller_Sleep.
131         (print_ada_task_info): Do not check task_info->state before
132         checking task_info->called_task.
133         (info_task): Likewise.
134
135 2018-11-07  Joel Brobecker  <brobecker@adacore.com>
136
137         * ada-tasks.c (read_atcb): Clear task_info before computing
138         the value of each of its fields.
139
140 2018-11-07  Andrew Burgess  <andrew.burgess@embecosm.com>
141
142         * dwarf2read.c (dwarf2_init_integer_type): Check for name being
143         NULL before dereferencing it.
144
145 2018-11-06  Tom de Vries  <tdevries@suse.de>
146
147         * linux-tdep.c (linux_vsyscall_range_raw): Use xmalloc to allocate
148         program headers.
149
150 2018-11-06  Max Filippov  <jcmvbkbc@gmail.com>
151
152         * configure.tgt (xtensa*-*-linux*): Change to xtensa*-*-*linux*
153         so that it applies to uclinux as well.
154
155 2018-11-06  Marius Muench  <marius.muench@eurecom.fr>
156
157         * arm-tdep.c (arm_scan_prologue): Don't dereference FP reg
158         when on AAPCS.
159
160 2018-11-06  John Baldwin  <jhb@FreeBSD.org>
161
162         * riscv-fbsd-nat.c (getregs_supplies): Return true for
163         RISCV_CSR_SSTATUS_REGNUM.
164
165 2018-11-04  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
166
167         * source.c (open_source_file): Fix leak by transferring the
168         current s->fullname to the unique_xmalloc_ptr fullname given
169         to find_and_open_source.
170
171 2018-11-04  Tom Tromey  <tom@tromey.com>
172
173         * varobj.c (install_default_visualizer): Update.
174         * python/python-internal.h (gdbpy_get_varobj_pretty_printer):
175         Return gdbpy_ref.
176         * python/py-prettyprint.c (search_pp_list): Return gdbpy_ref.
177         (find_pretty_printer_from_progspace)
178         (find_pretty_printer_from_gdb, find_pretty_printer)
179         (gdbpy_get_varobj_pretty_printer): Return gdbpy_ref.
180         (gdbpy_get_varobj_pretty_printer, gdbpy_default_visualizer):
181         Update.
182
183 2018-11-04  Tom Tromey  <tom@tromey.com>
184
185         * python/python.c (gdbpy_parameter_value): Update.
186         * python/python-internal.h (python_string_to_unicode)
187         (python_string_to_target_python_string)
188         (host_string_to_python_string): Return gdbpy_ref.
189         * python/py-utils.c (python_string_to_unicode)
190         (unicode_to_encoded_python_string)
191         (unicode_to_target_python_string)
192         (python_string_to_target_string)
193         (python_string_to_target_python_string): Return gdbpy_ref.
194         (python_string_to_host_string): Update.
195         (host_string_to_python_string): Return gdbpy_ref.
196         * python/py-symtab.c (stpy_get_filename, stpy_get_producer)
197         (stpy_fullname): Update.
198         * python/py-progspace.c (pspy_get_filename, pspy_solib_name):
199         Update.
200         * python/py-prettyprint.c (print_string_repr): Update.
201         * python/py-objfile.c (objfpy_get_filename, objfpy_get_username)
202         (objfpy_get_build_id): Update.
203         * python/py-breakpoint.c (bppy_get_location)
204         (bppy_get_expression, bppy_get_condition, bppy_get_commands):
205         Update.
206
207 2018-11-04  Tom Tromey  <tom@tromey.com>
208
209         * python/python-internal.h (gdb_py_object_from_longest)
210         (gdb_py_object_from_ulongest): Return gdbpy_ref.
211         * python/py-value.c (valpy_int): Update.
212         * python/py-utils.c (gdb_py_object_from_longest): Return
213         gdbpy_ref.
214         (gdb_py_object_from_ulongest): Likewise.
215         * python/py-type.c (typy_get_alignof): Update.
216         * python/py-linetable.c (ltpy_get_all_source_lines)
217         (ltpy_entry_get_line, ltpy_entry_get_pc): Update.
218         * python/py-block.c (blpy_get_start, blpy_get_end): Update.
219
220 2018-11-03  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
221
222         * ada-lang.c (_initialize_ada_language): Fix typo.
223
224 2018-11-03  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
225
226         * language.c (type): Remove.
227         (_initialize_language): Remove assignment to type.
228
229 2018-11-02  Joel Brobecker  <brobecker@adacore.com>
230
231         * aarch64-ravenscar-thread.h, aarch64-ravenscar-thread.c: New files.
232         * aarch64-tdep.c: #include "aarch64-ravenscar-thread.h".
233         (aarch64_gdbarch_init): Add call to register_aarch64_ravenscar_ops.
234         * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-ravenscar-thread.o.
235         (HFILES_NO_SRCDIR): Add aarch64-ravenscar-thread.h.
236         (ALLDEPFILES): Add aarch64-ravenscar-thread.c.
237         * configure.tgt (cpu_obs) [aarch64*-*-*]: Add ravenscar-thread.o
238         and aarch64-ravenscar-thread.o.
239         * NEWS: Add entry documenting Ravenscar tasking support
240         on AArch64 ELF.
241
242 2018-11-02  Matthew Malcomson  <matthew.malcomson@arm.com>
243
244         * symtab.c (info_functions_command): Initialize quiet flag.
245         * stack.c (info_args_command): Likewise.
246
247 2018-11-01  Jim Wilson  <jimw@sifive.com>
248
249         * riscv-tdep.c (riscv_breakpoint_kind_from_pc): New local unaligned_p.
250         Set if pcptr if unaligned.  Return 2 if unaligned_p true.  Update
251         debugging messages.
252
253 2018-11-01  Joel Brobecker  <brobecker@adacore.com>
254
255         * ada-lang.c (ada_watch_location_expression): New function.
256         (ada_language_defn): Set la_watch_location_expression to
257         ada_watch_location_expression.
258
259 2018-11-01  Joel Brobecker  <brobecker@adacore.com>
260
261         * print-utils.c (int_string): Remove unnecessary trailing spaces.
262
263 2018-11-01  Joel Brobecker  <brobecker@adacore.com>
264
265         * rs6000-tdep.c (skip_prologue): Fix potential negative left
266         shifting.
267
268 2018-11-01  Jerome Guitton  <guitton@adacore.com>
269             Joel Brobecker  <brobecker@adacore.com>
270
271         * defs.h (enum gdb_osabi): Add GDB_OSABI_PIKEOS.
272         * osabi.c (gdb_osabi_names): Add name for GDB_OSABI_PIKEOS.
273         * arm-pikeos-tdep.c: New file.
274         * configure.tgt: Add arm-pikeos-tdep.o to the case of ARM
275         embedded system.
276         * Makefile.in (ALL_TARGET_OBS): Add arm-pikeos-tdep.o.
277
278 2018-11-01  Simon Marchi  <simon.marchi@ericsson.com>
279
280         * common/pathstuff.c (get_standard_temp_dir): New.
281         * common/pathstuff.h (get_standard_temp_dir): New.
282         * config.in: Re-generate.
283         * configure: Re-generate.
284         * configure.ac: Don't check for mkdtemp.
285         * gnulib/aclocal-m4-deps.mk: Re-generate.
286         * gnulib/aclocal.m4: Re-generate.
287         * gnulib/config.in: Re-generate.
288         * gnulib/configure: Re-generate.
289         * gnulib/import/Makefile.am: Re-generate.
290         * gnulib/import/Makefile.in: Re-generate.
291         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
292         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
293         * gnulib/import/m4/mkdtemp.m4: New file.
294         * gnulib/import/mkdtemp.c: New file.
295         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES):
296         Add mkdtemp module.
297         * unittests/mkdir-recursive-selftests.c (test): Use
298         get_standard_temp_dir.
299         (_initialize_mkdir_recursive_selftests): Remove HAVE_MKDTEMP
300         ifdef.
301         * compile/compile.c (get_compile_file_tempdir): Likewise.
302
303 2018-11-01  Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
304
305         * rs6000-aix-tdep.c: Include "trad-frame.h" and "frame-unwind.h".
306         (SIG_FRAME_LR_OFFSET64): New define.
307         (SIG_FRAME_FP_OFFSET64): New define.
308         (aix_sighandle_frame_cache): New Function.
309         (aix_sighandle_frame_this_id): New Function.
310         (aix_sighandle_frame_prev_register): New Function.
311         (aix_sighandle_frame_sniffer): New Function.
312         (aix_sighandle_frame_unwind): New global variable.
313         (rs6000_aix_init_osabi): Install new frame unwinder.
314
315 2018-10-31  Sergio Durigan Junior  <sergiodj@redhat.com>
316
317         PR gdb/23835
318         * common/common-defs.h: Don't redefine _FORTIFY_SOURCE if it's
319         already defined.
320
321 2018-10-31  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
322
323         * ppc-linux-nat.c: Include nat/linux-ptrace.h.
324
325 2018-10-31  Andrew Burgess  <andrew.burgess@embecosm.com>
326
327         * dwarf2read.c (struct dwarf2_cu): Add producer_is_icc field.
328         (producer_is_icc): New function.
329         (check_producer): Set producer_is_icc field on dwarf2_cu.
330         (dwarf2_init_integer_type): New function.
331         (read_base_type): Call dwarf2_init_integer_type instead of
332         init_integer_type in all cases.
333         (dwarf2_cu::dwarf2_cu): Initialise producer_is_icc field.
334         * valprint.c (maybe_negate_by_bytes): Add an assertion that the
335         LEN is greater than 0.
336
337 2018-10-30  Tom Tromey  <tom@tromey.com>
338
339         * main.c (captured_main_1): Check return value of bfd_init.
340
341 2018-10-29  Sergio Durigan Junior  <sergiodj@redhat.com>
342
343         * common/offset-type.h (DEFINE_OFFSET_REL_OP): Delete.
344         Adjust comments.
345
346 2018-10-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
347
348         * procfs.c: Include common/pathstuff.h.
349
350 2018-10-28  Andrew Burgess  <andrew.burgess@embecosm.com>
351
352         * riscv-linux-nat.c (riscv_linux_nat_target::fetch_registers):
353         Add missing braces.  No functional change.
354
355 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
356
357         * macrocmd.c (info_macro_command): Use report_unrecognized_option_error
358         to report a bad option and fix indentation.
359         * demangle.c (demangle_command): Use report_unrecognized_option_error
360         to report a bad option and correctly report the bad option.
361
362 2018-10-27  Tom Tromey  <tom@tromey.com>
363
364         PR cli/23364:
365         * darwin-nat.c (copied_shell): New global.
366         (may_have_sip): Rename from should_disable_startup_with_shell.
367         (copy_shell_to_cache, maybe_cache_shell): New functions.
368         (darwin_nat_target::create_inferior): Update.  Use
369         copied_shell.
370
371 2018-10-27  Tom Tromey  <tom@tromey.com>
372
373         * unittests/scoped_fd-selftests.c (test_to_file): New function.
374         (run_tests): Call test_to_file.
375         * dwarf-index-write.c (write_psymtabs_to_index): Do not reopen
376         temporary files.
377         * common/scoped_fd.h (scoped_fd::to_file): New method.
378
379 2018-10-27  Tom Tromey  <tom@tromey.com>
380
381         * unittests/scoped_mmap-selftests.c (test_normal): Use
382         gdb_mkostemp_cloexec.
383         * unittests/scoped_fd-selftests.c (test_destroy, test_release):
384         Use gdb_mkostemp_cloexec.
385         * gnulib/aclocal-m4-deps.mk, gnulib/aclocal.m4,
386         gnulib/config.in, gnulib/configure,
387         gnulib/import/Makefile.am, gnulib/import/Makefile.in,
388         gnulib/import/m4/gnulib-cache.m4,
389         gnulib/import/m4/gnulib-comp.m4: Update.
390         * gnulib/import/m4/mkostemp.m4: New file.
391         * gnulib/import/m4/mkstemp.m4: Remove.
392         * gnulib/import/mkostemp.c: New file.
393         * gnulib/import/mkstemp.m4: Remove.
394         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Remove
395         mkstemp, add mkostemp.  Apply new patch.
396         * gnulib/import/stdlib.in.h: Apply patch.
397         * gnulib/patches/0002-mkostemp-mkostemps-Fix-compilation-error-in-C-mode-o.patch:
398         New file.
399         * dwarf-index-write.c (write_psymtabs_to_index): Use
400         gdb_mkostemp_cloexec.
401         * common/filestuff.h (gdb_mkostemp_cloexec): New function.
402
403 2018-10-27  Tom Tromey  <tom@tromey.com>
404
405         * unittests/mkdir-recursive-selftests.c: New file.
406         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
407         unittests/mkdir-recursive-selftests.c.
408         * dwarf-index-cache.c (mkdir_recursive): Move to
409         common/filestuff.c.
410         (index_cache::store): Check return value of mkdir_recursive.
411         (create_dir_and_check, test_mkdir_recursive): Move to new file.
412         (_initialize_index_cache): Don't register test.
413         * common/filestuff.h (mkdir_recursive): Declare.
414         * common/filestuff.c (mkdir_recursive): Move from
415         dwarf-index-cache.c.  Return bool.
416
417 2018-10-27  Tom Tromey  <tom@tromey.com>
418
419         * dwarf-index-write.c (write_psymtabs_to_index): Move
420         make_temp_filename to common/pathstuff.c.
421         * common/pathstuff.h (make_temp_filename): Declare.
422         * common/pathstuff.c (make_temp_filename): New function, moved
423         from dwarf-index-write.c.
424
425 2018-10-27  Tom Tromey  <tom@tromey.com>
426
427         * procfs.c (procfs_target::create_inferior): Use get_shell.
428         * cli/cli-cmds.c (shell_escape): Use get_shell.
429         * windows-nat.c (windows_nat_target::create_inferior): Use
430         get_shell.
431         * common/pathstuff.c (get_shell): New function.
432         * nat/fork-inferior.c (SHELL_FILE, get_startup_shell): Remove.
433         (fork_inferior): Use get_shell.
434         * common/pathstuff.h (get_shell): Declare.
435
436 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
437
438         * NEWS: Mention changes to 'info [args|functions|locals|variables]'
439
440 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
441
442         * stack.c (print_variable_and_value_data): Add preg and treg.
443         (print_frame_local_vars): Add quiet, regexp and t_regexp arguments,
444         and update callers.
445         (print_frame_arg_vars): Likewise.
446         (prepare_reg): New function.
447         (info_locals_command): Extract info print args and use them.
448         (info_args_command): Likewise.
449         (_initialize_stack): Modify on-line help.
450         * symtab.c (treg_matches_sym_type_name): New function.
451         (search_symbols): New arg t_regexp.
452         (symtab_symbol_info): New args quiet, regexp, t_regexp.
453         (info_variables_command): Extract info print args and use them.
454         (info_functions_command): Likewise.
455         (info_types_command): Update call to symtab_symbol_info.
456         (_initialize_symtab): Modify on-line help.
457         * symtab.h (treg_matches_sym_type_name): New function.
458         (search_symbols): New t_regexp arg.
459
460 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
461
462         * cli-utils.c (extract_arg_maybe_quoted): New function.
463         (extract_info_print_args): New function.
464         (info_print_args_help): New function.
465         (report_unrecognized_option_error): New function.
466         * cli-utils.h (extract_arg_maybe_quoted): New function.
467         (extract_info_print_args): New function.
468         (info_print_args_help): New function.
469         (report_unrecognized_option_error): New function.
470
471 2018-10-26  Tom Tromey  <tom@tromey.com>
472
473         * dwarf2read.c (recursively_compute_inclusions): Use std::vector.
474         (compute_compunit_symtab_includes): Update.
475         * symtab.h: (symtab_ptr): Remove typedef.  Don't define a VEC.
476         (compunit_symtab_ptr): Likewise.
477
478 2018-10-26  John Baldwin  <jhb@FreeBSD.org>
479
480         * fbsd-tdep.c (fbsd_print_auxv_entry): Only use
481         default_print_auxv_entry for specific tag values.
482
483 2018-10-26  John Baldwin  <jhb@FreeBSD.org>
484
485         * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_FREEBSD_HWCAP2.
486
487 2018-10-26  Jim Wilson  <jimw@sifive.com>
488
489         * riscv-linux-tdep.c: Include tramp-frame.h and trad-frame.h.
490         (riscv_linux_sigframe_init): Declare.
491         (RISCV_INST_LI_A7_SIGRETURN, RISCV_INT_ECALL): New.
492         (riscv_linux_sigframe): New.
493         (SIGFRAME_SIGINFO_SIZE, UCONTEXT_MCONTEXT_OFFSET): New.
494         (riscv_linux_sigframe_init): Define.
495         (riscv_linux_init_abi): Call tramp_frame_prepend_unwinder.
496
497         * riscv-tdep.c (riscv_isa_xlen): Refer to riscv-tdep.h comment.
498         (riscv_isa_flen): Likewise.  Drop static.
499         * riscv-tdep.h (riscv_isa_xlen): Move riscv-tdep.c comment to here.
500         (riscv_isa_flen): Likewise.  Declare.
501
502 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
503             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
504
505         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa207_htm_vsx32l)
506         (tdesc_powerpc_isa207_htm_vsx64l): Declare.
507         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_TM_SPRREGSET)
508         (PPC32_LINUX_SIZEOF_CGPRREGSET, PPC64_LINUX_SIZEOF_CGPRREGSET)
509         (PPC_LINUX_SIZEOF_CFPRREGSET, PPC_LINUX_SIZEOF_CVMXREGSET)
510         (PPC_LINUX_SIZEOF_CVSXREGSET, PPC_LINUX_SIZEOF_CPPRREGSET)
511         (PPC_LINUX_SIZEOF_CDSCRREGSET, PPC_LINUX_SIZEOF_CTARREGSET):
512         Define.
513         (struct ppc_linux_features) <htm>: New field.
514         (ppc_linux_no_features): Add initializer for htm field.
515         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
516         new tdescs.
517         * nat/ppc-linux.h (PPC_FEATURE2_HTM, NT_PPC_TM_CGPR)
518         (NT_PPC_TM_CFPR, NT_PPC_TM_CVMX, NT_PPC_TM_CVSX)
519         (NT_PPC_TM_SPR, NT_PPC_TM_CTAR, NT_PPC_TM_CPPR, NT_PPC_TM_CDSCR):
520         Define if not already defined.
521         * features/Makefile (WHICH): Add rs6000/powerpc-isa207-htm-vsx32l
522         and rs6000/powerpc-isa207-htm-vsx64l.
523         (XMLTOC): Add rs6000/powerpc-isa207-htm-vsx32l.xml and
524         rs6000/powerpc-isa207-htm-vsx64l.xml.
525         * features/rs6000/power-htm-spr.xml: New file.
526         * features/rs6000/power-htm-core.xml: New file.
527         * features/rs6000/power64-htm-core.xml: New file.
528         * features/rs6000/power-htm-fpu.xml: New file.
529         * features/rs6000/power-htm-altivec.xml: New file.
530         * features/rs6000/power-htm-vsx.xml: New file.
531         * features/rs6000/power-htm-ppr.xml: New file.
532         * features/rs6000/power-htm-dscr.xml: New file.
533         * features/rs6000/power-htm-tar.xml: New file.
534         * features/rs6000/powerpc-isa207-htm-vsx32l.xml: New file.
535         * features/rs6000/powerpc-isa207-htm-vsx64l.xml: New file.
536         * features/rs6000/powerpc-isa207-htm-vsx32l.c: Generate.
537         * features/rs6000/powerpc-isa207-htm-vsx64l.c: Generate.
538         * regformats/rs6000/powerpc-isa207-htm-vsx32l.dat: Generate.
539         * regformats/rs6000/powerpc-isa207-htm-vsx64l.dat: Generate.
540         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
541         fetch_regset with HTM regsets.
542         (store_register, store_ppc_registers): Call store_regset with HTM
543         regsets.
544         (ppc_linux_nat_target::read_description): Set htm field in the
545         features struct if needed.
546         * ppc-linux-tdep.c: Include
547         features/rs6000/powerpc-isa207-htm-vsx32l.c and
548         features/rs6000/powerpc-isa207-htm-vsx64l.c.
549         (ppc32_regmap_tm_spr, ppc32_regmap_cgpr, ppc64_le_regmap_cgpr)
550         (ppc64_be_regmap_cgpr, ppc32_regmap_cfpr, ppc32_le_regmap_cvmx)
551         (ppc32_be_regmap_cvmx, ppc32_regmap_cvsx, ppc32_regmap_cppr)
552         (ppc32_regmap_cdscr, ppc32_regmap_ctar): New globals.
553         (ppc32_linux_tm_sprregset, ppc32_linux_cgprregset)
554         (ppc64_be_linux_cgprregset, ppc64_le_linux_cgprregset)
555         (ppc32_linux_cfprregset, ppc32_le_linux_cvmxregset)
556         (ppc32_be_linux_cvmxregset, ppc32_linux_cvsxregset)
557         (ppc32_linux_cpprregset, ppc32_linux_cdscrregset)
558         (ppc32_linux_ctarregset): New globals.
559         (ppc_linux_cgprregset, ppc_linux_cvmxregset): New functions.
560         (ppc_linux_collect_core_cpgrregset): New function.
561         (ppc_linux_iterate_over_regset_sections): Call back with the htm
562         regsets.
563         (ppc_linux_core_read_description): Check if the tm spr section is
564         present and set htm in the features struct.
565         (_initialize_ppc_linux_tdep): Call
566         initialize_tdesc_powerpc_isa207_htm_vsx32l and
567         initialize_tdesc_powerpc_isa207_htm_vsx64l.
568         * ppc-linux-tdep.h (ppc_linux_cgprregset, ppc_linux_cvmxregset):
569         Declare.
570         (ppc32_linux_tm_sprregset, ppc32_linux_cfprregset)
571         (ppc32_linux_cvsxregset, ppc32_linux_cpprregset)
572         (ppc32_linux_cdscrregset, ppc32_linux_ctarregset): Declare.
573         * ppc-tdep.h (struct gdbarch_tdep) <have_htm_spr, have_htm_core>:
574         New fields.
575         <have_htm_fpu, have_htm_altivec, have_htm_vsx>:
576         Likewise.
577         <ppc_cppr_regnum, ppc_cdscr_regnum, ppc_ctar_regnum>: Likewise.
578         <ppc_cdl0_regnum, ppc_cvsr0_regnum, ppc_cefpr0_regnum>: Likewise.
579         (enum) <PPC_TFHAR_REGNUM, PPC_TEXASR_REGNUM, PPC_TFIAR_REGNUM>:
580         New enum fields.
581         <PPC_CR0_REGNUM, PPC_CCR_REGNUM, PPC_CXER_REGNUM>: Likewise.
582         <PPC_CLR_REGNUM, PPC_CCTR_REGNUM, PPC_CF0_REGNUM>: Likewise.
583         <PPC_CFPSCR_REGNUM, PPC_CVR0_REGNUM, PPC_CVSCR_REGNUM>: Likewise.
584         <PPC_CVRSAVE_REGNUM, PPC_CVSR0_UPPER_REGNUM>: Likewise.
585         <PPC_CPPR_REGNUM, PPC_CDSCR_REGNUM>: Likewise.
586         <PPC_CTAR_REGNUM>: Likewise.
587         (PPC_IS_TMSPR_REGNUM, PPC_IS_CKPTGP_REGNUM, PPC_IS_CKPTFP_REGNUM)
588         (PPC_IS_CKPTVMX_REGNUM, PPC_IS_CKPTVSX_REGNUM): Define.
589         * rs6000-tdep.c (IS_CDFP_PSEUDOREG, IS_CVSX_PSEUDOREG)
590         (IS_CEFP_PSEUDOREG): Define.
591         (rs6000_register_name): Hide the upper halves of checkpointed VSX
592         registers.  Return names for the checkpointed DFP, VSX, and EFP
593         pseudo registers.
594         (rs6000_pseudo_register_type): Remove initial assert and raise an
595         internal error in the else clause instead.  Return types for the
596         checkpointed DFP, VSX, and EFP pseudo registers.
597         (dfp_pseudo_register_read, dfp_pseudo_register_write): Handle
598         checkpointed DFP pseudo registers.
599         (vsx_pseudo_register_read, vsx_pseudo_register_write): Handle
600         checkpointed VSX pseudo registers.
601         (efp_pseudo_register_read, efp_pseudo_register_write): Rename
602         from efpr_pseudo_register_read and
603         efpr_pseudo_register_write.  Handle checkpointed EFP pseudo
604         registers.
605         (rs6000_pseudo_register_read, rs6000_pseudo_register_write):
606         Handle checkpointed DFP, VSX, and EFP registers.
607         (dfp_ax_pseudo_register_collect, vsx_ax_pseudo_register_collect)
608         (efp_ax_pseudo_register_collect): New functions.
609         (rs6000_ax_pseudo_register_collect): Move DFP, VSX and EFP pseudo
610         register logic to new functions.  Handle checkpointed DFP, VSX,
611         and EFP pseudo registers.
612         (rs6000_gdbarch_init): Look for and validate the htm features.
613         Include checkpointed DFP, VSX and EFP pseudo-registers.
614         * NEWS: Mention access to PPR, DSCR, TAR, EBB/PMU registers and
615         HTM registers.
616
617 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
618
619         * rs6000-tdep.c (rs6000_gdbarch_init): Reject tdescs with vsx but
620         without altivec or fpu.
621
622 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
623             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
624
625         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_EBBREGSET)
626         (PPC_LINUX_SIZEOF_PMUREGSET): Declare.
627         * nat/ppc-linux.h (PPC_FEATURE2_EBB, NT_PPC_EBB, NT_PPC_PMU):
628         Define if not already defined.
629         * features/rs6000/power-ebb.xml: New file.
630         * features/rs6000/power-linux-pmu.xml: New file.
631         * features/rs6000/powerpc-isa207-vsx32l.xml: Include ebb and pmu
632         features.
633         * features/rs6000/powerpc-isa207-vsx64l.xml: Likewise.
634         * features/rs6000/powerpc-isa207-vsx32l.c: Re-generate.
635         * features/rs6000/powerpc-isa207-vsx64l.c: Re-generate.
636         * regformats/rs6000/powerpc-isa207-vsx32l.dat: Re-generate.
637         * regformats/rs6000/powerpc-isa207-vsx64l.dat: Re-generate.
638         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
639         fetch_regset with ebb and pmu regsets.
640         (store_register, store_ppc_registers): Call store_regset with ebb
641         and pmu regsets.
642         (ppc_linux_nat_target::read_description): Set isa207 field in the
643         features struct if ebb and pmu are avaiable.
644         * ppc-linux-tdep.c (ppc32_regmap_ebb, ppc32_regmap_pmu)
645         (ppc32_linux_ebbregset, ppc32_linux_pmuregset): New globals.
646         (ppc_linux_iterate_over_regset_sections): Call back with the ebb
647         and pmu regsets.
648         (ppc_linux_core_read_description): Check if the pmu section is
649         present and set isa207 in the features struct.
650         * ppc-linux-tdep.h (ppc32_linux_ebbregset)
651         (ppc32_linux_pmuregset): Declare.
652         * ppc-tdep.h (struct gdbarch_tdep) <ppc_mmcr0_regnum>: New field.
653         <ppc_mmcr2_regnum, ppc_siar_regnum, ppc_sdar_regnum>: New fields.
654         <ppc_sier_regnum>: New field.
655         (enum): <PPC_BESCR_REGNUM, PPC_EBBHR_REGNUM, PPC_EBBRR_REGNUM>:
656         New enum values.
657         <PPC_MMCR0_REGNUM, PPC_MMCR2_REGNUM, PPC_SIAR_REGNUM>: New enum
658         values.
659         <PPC_SDAR_REGNUM, PPC_SIER_REGNUM>: New enum values.
660         (PPC_IS_EBB_REGNUM, PPC_IS_PMU_REGNUM): Define.
661         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate the
662         ebb and pmu features.
663
664 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
665             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
666
667         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa207_vsx32l)
668         (tdesc_powerpc_isa207_vsx64l): Declare.
669         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_TARREGSET): Define.
670         (struct ppc_linux_features) <isa207>: New field.
671         (ppc_linux_no_features): Add initializer for isa207 field.
672         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
673         new tdescs.
674         * nat/ppc-linux.h (PPC_FEATURE2_ARCH_2_07, PPC_FEATURE2_TAR)
675         (NT_PPC_TAR): Define if not already defined.
676         * features/Makefile (WHICH): Add rs6000/powerpc-isa207-vsx32l and
677         rs6000/powerpc-isa207-vsx64l.
678         (XMLTOC): Add rs6000/powerpc-isa207-vsx32l.xml and
679         rs6000/powerpc-isa207-vsx64l.xml.
680         * features/rs6000/power-tar.xml: New file.
681         * features/rs6000/powerpc-isa207-vsx32l.xml: New file.
682         * features/rs6000/powerpc-isa207-vsx64l.xml: New file.
683         * features/rs6000/powerpc-isa207-vsx32l.c: Generate.
684         * features/rs6000/powerpc-isa207-vsx64l.c: Generate.
685         * regformats/rs6000/powerpc-isa207-vsx32l.dat: Generate.
686         * regformats/rs6000/powerpc-isa207-vsx64l.dat: Generate.
687         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
688         fetch_regset with the TAR regset.
689         (store_register, store_ppc_registers): Call store_regset with the
690         TAR regset.
691         (ppc_linux_nat_target::read_description): Set isa207 field in the
692         features struct if needed.
693         * ppc-linux-tdep.c: Include
694         features/rs6000/powerpc-isa207-vsx32l.c and
695         features/rs6000/powerpc-isa207-vsx64l.c.
696         (ppc32_regmap_tar, ppc32_linux_tarregset): New globals.
697         (ppc_linux_iterate_over_regset_sections): Call back with the tar
698         regset.
699         (ppc_linux_core_read_description): Check if the tar section is
700         present and set isa207 in the features struct.
701         (_initialize_ppc_linux_tdep): Call
702         initialize_tdesc_powerpc_isa207_vsx32l and
703         initialize_tdesc_powerpc_isa207_vsx64l.
704         * ppc-linux-tdep.h (ppc32_linux_tarregset): Declare.
705         * ppc-tdep.h (gdbarch_tdep) <ppc_tar_regnum>: New field.
706         (enum) <PPC_TAR_REGNUM>: New enum value.
707         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate tar
708         feature.
709         (ppc_process_record_op31): Record changes to TAR.
710
711 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
712             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
713
714         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa205_ppr_dscr_vsx32l)
715         (tdesc_powerpc_isa205_ppr_dscr_vsx64l): Declare.
716         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_PPRREGSET)
717         (PPC_LINUX_SIZEOF_DSCRREGSET): Define.
718         (struct ppc_linux_features) <ppr_dscr>: New field.
719         (ppc_linux_no_features): Add initializer for ppr_dscr field.
720         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
721         new tdescs.
722         * nat/ppc-linux.h (PPC_FEATURE2_DSCR, NT_PPC_PPR, NT_PPC_DSCR):
723         Define if not already defined.
724         * features/Makefile (WHICH): Add
725         rs6000/powerpc-isa205-ppr-dscr-vsx32l and
726         rs6000/powerpc-isa205-ppr-dscr-vsx64l.
727         (XMLTOC): Add rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
728         rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml.
729         * features/rs6000/power-dscr.xml: New file.
730         * features/rs6000/power-ppr.xml: New file.
731         * features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml: New file.
732         * features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml: New file.
733         * features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c: Generate.
734         * features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c: Generate.
735         * regformats/rs6000/powerpc-isa205-ppr-dscr-vsx32l.dat: Generate.
736         * regformats/rs6000/powerpc-isa205-ppr-dscr-vsx64l.dat: Generate.
737         * ppc-linux-nat.c: Include <sys/uio.h>.
738         (fetch_regset, store_regset, check_regset): New functions.
739         (fetch_register, fetch_ppc_registers): Call fetch_regset with
740         DSCR and PPR regsets.
741         (store_register, store_ppc_registers): Call store_regset with
742         DSCR and PPR regsets.
743         (ppc_linux_get_hwcap2): New function.
744         (ppc_linux_nat_target::read_description): Call
745         ppc_linux_get_hwcap2 and check_regset, set ppr_dscr field in the
746         features struct if needed.
747         * ppc-linux-tdep.c: Include
748         features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c and
749         features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c.
750         (ppc32_regmap_ppr, ppc32_regmap_dscr, ppc32_linux_pprregset)
751         (ppc32_linux_dscrregset): New globals.
752         (ppc_linux_iterate_over_regset_sections): Call back with the ppr
753         and dscr regsets.
754         (ppc_linux_core_read_description): Check if the ppr and dscr
755         sections are present and set ppr_dscr in the features struct.
756         (_initialize_ppc_linux_tdep): Call
757         initialize_tdesc_powerpc_isa205_ppr_dscr_vsx32l and
758         initialize_tdesc_powerpc_isa205_ppr_dscr_vsx64l.
759         * ppc-linux-tdep.h (ppc32_linux_pprregset)
760         (ppc32_linux_dscrregset): Declare.
761         * ppc-tdep.h (struct gdbarch_tdep) <ppc_ppr_regnum>: New field.
762         <ppc_dscr_regnum>: New field.
763         (enum) <PPC_PPR_REGNUM, PPC_DSCR_REGNUM>: New enum values.
764         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate ppr
765         and dscr features.
766         (ppc_process_record_op31): Record changes to PPR and DSCR.
767
768 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
769
770         * rs6000-tdep.c (rs6000_gdbarch_init): Replace line wrapping by a
771         second initializer line for the have_* variables.  Initialize
772         have_fpu to 0 instead of 1.
773
774 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
775
776         * arch/ppc-linux-common.c (ppc_linux_match_description):
777         Parenthesize tdesc assignements and indent them properly.
778
779 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
780
781         * ppc-linux-nat.c (fetch_register): Change if statement to else
782         if.
783         (store_register): Likewise.
784
785 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
786
787         * rs6000-tdep.c: Remove reggroups.h include.
788         (rs6000_pseudo_register_reggroup_p): Remove.
789         (rs6000_gdbarch_init): Remove call to
790         set_tdesc_pseudo_register_reggroup_p.
791
792 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
793
794         * reggroups.c (default_register_reggroup_p): Return true for
795         decfloat registers and float_reggroup.
796
797 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
798
799         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): Remove.
800         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): Replace
801         ppc_linux_collect_vrregset by regcache_collect_regset.
802
803 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
804
805         * linux-tdep.c (linux_collect_regset_section_cb): Use
806         std::vector<gdb_byte> instead of char * and malloc for buf.
807         Remove xfree.
808
809 2018-10-26  Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
810
811         * xcoffread.c (read_xcoff_symtab): Pass deduced language to
812         symtab_start instead of always using language_unknown.
813
814 2018-10-26  Andrew Burgess  <andrew.burgess@embecosm.com>
815
816         * riscv-tdep.c (riscv_read_misa_reg): Update comment, remove
817         READ_P parameter, catch and ignore register access errors from
818         either the old or new MISA location.
819         (riscv_has_feature): Update call to riscv_read_misa_reg.
820
821 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
822
823         * python/py-function.c (convert_values_to_python): Return
824         gdbpy_ref<>.  Add header comment.
825         (fnpy_call): Adjust.
826
827 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
828
829         * python/py-cmd.c (cmdpy_completer_helper): Return gdbpy_ref<>.
830         (cmdpy_completer_handle_brkchars): Adjust.
831         (cmdpy_completer): Adjust.
832
833 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
834
835         * riscv-linux-nat.c (riscv_linux_nat_target::fetch_registers):
836         Pass correct regnum to raw_supply_zeroed.
837
838 2018-10-23  Hafiz Abid Qadeer  <abidh@codesourcery.com>
839
840         * regcache.c (cooked_read_test): Add CSKY to the list of
841         architectures with a save_reggroup
842
843 2018-10-23  Simon Marchi  <simon.marchi@polymtl.ca>
844
845         PR gdb/23368
846         * infrun.c (follow_exec): In the follow_exec_mode_new case,
847         transfer terminal state from old new new inferior.
848         * terminal.h (swap_terminal_info): New function.
849         * inflow.c (swap_terminal_info): New function.
850
851 2018-10-23  Tom Tromey  <tom@tromey.com>
852
853         * record-btrace.c (get_thread_current_frame_id): Rename from
854         get_thread_current_frame.  Return a frame_id.
855         (record_btrace_start_replaying): Update.
856
857 2018-10-23  Andrew Burgess  <andrew.burgess@embecosm.com>
858
859         * riscv-tdep.c (riscv_register_name): Use the user-friendly names
860         for CSRs.
861
862 2018-10-23  Joel Brobecker  <brobecker@adacore.com>
863
864         * riscv-tdep.c (riscv_gdbarch_init): Set the gdbarch's
865         have_nonsteppable_watchpoint attribute to 1.
866
867 2018-10-23  Andrew Burgess  <andrew.burgess@embecosm.com>
868
869         * riscv-tdep.c (riscv_gdb_reg_names): Update comment, and all
870         register names.
871         (struct register_alias): Rename to...
872         (struct riscv_register_alias): ...this, and update comment.
873         (riscv_register_aliases): Update type, and alias names.  Remove
874         CSR names from this list.
875         (riscv_register_name): Use riscv_gdb_reg_names for int and float
876         register names.  Add an extra assertion.
877         (riscv_is_regnum_a_named_csr): New function.
878         (riscv_register_reggroup_p): Use riscv_is_regnum_a_named_csr.
879
880 2018-10-22  Jim Wilson  <jimw@sifive.com>
881
882         * riscv-tdep.c (riscv_push_dummy_call) <in_reg>: Check for value in
883         FP reg smaller than FP reg size, and fill with -1 instead of 0.
884
885         * riscv-tdep.c (riscv_fpreg_d_type, riscv_fpreg_q_type): New.
886         (riscv_register_type): Use them.
887         (riscv_print_one_register_info): Handle union of floats same as float.
888         * riscv-tdep.h (struct gdbarch_tdep): Add riscv_fpreg_d_type and
889         riscv_fpreg_q_type fields.
890
891 2018-10-21  Simon Marchi  <simon.marchi@ericsson.com>
892
893         * gdbarch.sh (gdbarch_num_cooked_regs): New.
894         * gdbarch.h: Re-generate.
895         * ax-gdb.c (gen_expr): Use gdbarch_num_cooked_regs.
896         * dwarf2-frame.c (dwarf2_frame_cache): Likewise.
897         * eval.c (evaluate_subexp_standard): Likewise.
898         * findvar.c (value_of_register): Likewise.
899         (value_of_register_lazy): Likewise.
900         (address_from_register): Likewise.
901         * frame.c (get_frame_register_bytes): Likewise.
902         * gdbarch-selftests.c (register_to_value_test): Likewise.
903         * h8300-tdep.c (h8300_register_type): Likewise.
904         * i386-tdep.c (i386_dbx_reg_to_regnum): Likewise.
905         (i386_svr4_reg_to_regnum): Likewise.
906         * infcmd.c (default_print_registers_info): Likewise.
907         (registers_info): Likewise.
908         (print_vector_info): Likewise.
909         (default_print_float_info): Likewise.
910         * m68hc11-tdep.c (m68hc11_frame_unwind_cache): Likewise.
911         * mdebugread.c (mdebug_reg_to_regnum): Likewise.
912         * mi/mi-main.c (mi_cmd_data_list_register_names): Likewise.
913         (mi_cmd_data_list_changed_registers): Likewise.
914         (mi_cmd_data_list_register_values): Likewise.
915         (mi_cmd_data_write_register_values): Likewise.
916         (mi_cmd_trace_frame_collected): Likewise.
917         * mips-tdep.c (print_gp_register_row): Likewise.
918         (mips_print_registers_info): Likewise.
919         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
920         * regcache.c (init_regcache_descr): Likewise.
921         (register_size): Likewise.
922         (register_dump::dump): Likewise.
923         (cooked_read_test): Likewise.
924         (cooked_write_test): Likewise.
925         * rs6000-tdep.c (rs6000_register_sim_regno): Likewise.
926         (rs6000_gdbarch_init): Likewise.
927         * stabsread.c (stab_reg_to_regnum): Likewise.
928         * stack.c (info_frame_command): Likewise.
929         * target-descriptions.c (tdesc_register_name): Likewise.
930         * trad-frame.c (trad_frame_alloc_saved_regs): Likewise.
931         * tui/tui-regs.c (tui_show_register_group): Likewise.
932         * user-regs.c (user_reg_map_name_to_regnum): Likewise.
933         (user_reg_map_regnum_to_name): Likewise.
934         (value_of_user_reg): Likewise.
935         (maintenance_print_user_registers): Likewise.
936         * xtensa-tdep.c (xtensa_find_register_by_name): Likewise.
937         (xtensa_register_name): Likewise.
938         (xtensa_register_type): Likewise.
939         (xtensa_reg_to_regnum): Likewise.
940         (xtensa_pseudo_register_read): Likewise.
941         (xtensa_pseudo_register_write): Likewise.
942
943 2018-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
944
945         * amd64-tdep.c (amd64_pseudo_register_read_value): Use
946         correctly-sized buffer with raw_read.
947         (amd64_pseudo_register_write): Use correctly-sized buffer for
948         raw_read/raw_write.
949
950 2018-10-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
951
952         * typeprint.c (_initialize_typeprint): Fix wrong prefixname arg
953         in add_prefix_cmd of set print type.
954
955 2018-10-19  Tom Tromey  <tom@tromey.com>
956
957         PR tui/18388:
958         * NEWS: Mention tabset deprecation.
959         * tui/tui-win.c (tui_tab_width, internal_tab_width): New globals.
960         (update_tab_width): New function.
961         (tui_set_tab_width, tui_show_tab_width): New functions.
962         (tui_set_tab_width_command): Use update_tab_width.
963         (_initialize_tui_win): Move to end of file.  Deprecate "tabset".
964         Add new "set tui tab-width" command.
965         * tui/tui-source.c (tui_set_source_content): Update.
966         * tui/tui-disasm.c (tui_set_disassem_content): Update.
967         * tui/tui-data.h (tui_default_tab_len, tui_set_default_tab_len):
968         Don't declare.
969         (tui_tab_width): Declare.
970         * tui/tui-data.c (default_tab_len, tui_default_tab_len)
971         (tui_set_default_tab_len): Remove.
972
973 2018-10-19  Tom Tromey  <tom@tromey.com>
974
975         * tui/tui-io.h (key_is_start_sequence, key_is_end_sequence)
976         (key_is_backspace, tui_getc): Don't declare.
977         * tui/tui-io.c (key_is_start_sequence): Now static.
978         (key_is_end_sequence, key_is_backspace): Remove.
979         (tui_getc): Now static.
980
981 2018-10-19  Tom Tromey  <tom@tromey.com>
982
983         * symfile.c (reread_symbols): Clear "static_links".
984
985 2018-10-19  Alan Hayward  <alan.hayward@arm.com>
986
987         * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_SIZE): New
988         define.
989         (aarch64_linux_sigframe_init): Extra boundary checks.
990
991 2018-10-19  Andreas Arnez  <arnez@linux.ibm.com>
992
993         * s390-tdep.c (s390_pseudo_register_type): For v0-v15 don't yield
994         the possibly non-existent tdesc type 'vec128', but the type of raw
995         register v16 instead.
996
997 2018-10-19  Gary Benson <gbenson@redhat.com>
998
999         * cli/cli-interp.c (cli_interp::~cli_interp): New function.
1000
1001 2018-10-18  Sergio Durigan Junior  <sergiodj@redhat.com>
1002
1003         PR cli/23785
1004         * cli/cli-dump.c (restore_binary_file): Check if "file" is
1005         NULL.
1006
1007 2018-10-17  Paul Koning  <paul_koning@dell.com>
1008
1009         * charset.c (convert_between_encodings): Fix unsigned overflow.
1010
1011 2018-10-17  John Baldwin  <jhb@FreeBSD.org>
1012
1013         * fbsd-nat.c (fbsd_nat_target::info_proc) Use
1014         fbsd_info_proc_mappings_header and fbsd_info_proc_mappings_entry.
1015         * fbsd-tdep.c (fbsd_vm_map_entry_flags): Mark static.
1016         (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
1017         New functions.
1018         (fbsd_core_info_proc_mappings): Use fbsd_info_proc_mappings_header
1019         and fbsd_info_proc_mappings_header.
1020         * fbsd-tdep.h (fbsd_vm_map_entry_flags): Remove.
1021         (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
1022         New.
1023
1024 2018-10-17  Joel Brobecker  <brobecker@adacore.com>
1025
1026         * MAINTAINERS (Responsible Maintainers): Add Rainer Orth as
1027         Solaris Maintainer.
1028
1029 2018-10-15  Tom Tromey  <tom@tromey.com>
1030
1031         * tui/tui.c (strcat_to_buf): Remove casts.
1032         * tui/tui-winsource.c (tui_show_source_line)
1033         (tui_set_is_exec_point_at, tui_line_is_displayed): Remove casts.
1034         * tui/tui-wingeneral.c (tui_refresh_win, box_win): Remove casts.
1035         * tui/tui-windata.c (tui_first_data_item_displayed)
1036         (tui_delete_data_content_windows, tui_erase_data_content)
1037         (tui_display_all_data, tui_display_data_from)
1038         (tui_refresh_data_win, tui_vertical_data_scroll): Remove casts.
1039         * tui/tui-win.c (tui_set_win_height)
1040         (make_invisible_and_set_new_height, parse_scrolling_args): Remove
1041         casts.
1042         * tui/tui-win.c (tui_resize_all): Remove casts.
1043         (tui_scroll_backward_command, tui_set_focus)
1044         (tui_set_tab_width_command): Likewise.
1045         * tui/tui-source.c (tui_vertical_source_scroll): Remove cast.
1046         * tui/tui-regs.c (tui_show_register_group): Remove cast.
1047         * tui/tui-layout.c (tui_set_layout_by_name): Remove cast.
1048         * tui/tui-disasm.c (tui_vertical_disassem_scroll): Remove cast.
1049         * tui/tui-data.c (tui_partial_win_by_name, tui_free_win_content):
1050         Remove casts.
1051
1052 2018-10-15  Simon Marchi  <simon.marchi@ericsson.com>
1053
1054         * MAINTAINERS (Responsible Maintainers): Add Alan Hayward as
1055         AArch64/ARM maintainer.
1056
1057 2018-10-11  Gary Benson <gbenson@redhat.com>
1058
1059         * interps.h (interp::m_name): Make private and mutable.
1060         * interps.c (interp::~interp): Free m_name.
1061
1062 2018-10-10  Sergio Durigan Junior  <sergiodj@redhat.com>
1063             Simon Marchi <simark@simark.ca>
1064
1065         * README (`configure' options): Add documentation for new
1066         "--enable-unit-tests" option.
1067         * acinclude.m4: Include "selftest.m4".
1068         * configure: Regenerate.
1069         * configure.ac: Use "GDB_AC_SELFTEST".
1070         * maint.c (maintenance_selftest): Update message informing
1071         that selftests have been disabled.
1072         (maintenance_info_selftests): Likewise.
1073         * selftest.m4: New file.
1074
1075 2018-10-10  Gary Benson <gbenson@redhat.com>
1076
1077         * remote.c (remote_target::remote_send_printf): Add
1078         missing va_end found by Coverity.
1079
1080 2018-10-10  Markus Metzger  <markus.t.metzger@intel.com>
1081
1082         * btrace.c (ftrace_update_function): Add indirect jump heuristic.
1083
1084 2018-10-09  Tom Tromey  <tom@tromey.com>
1085
1086         * configure: Rebuild.
1087         * sanitize.m4 (AM_GDB_UBSAN): Default to no.
1088         * NEWS: Update --enable-ubsan documentation.
1089
1090 2018-10-09  Gary Benson <gbenson@redhat.com>
1091
1092         * dwarf2read.c (create_dwp_hash_table): Fix buffer overrun
1093         found by Coverity.
1094
1095 2018-10-08  Tom Tromey  <tom@tromey.com>
1096
1097         * riscv-fbsd-tdep.c (riscv_fbsd_sigframe_init): Remove unused
1098         variable.
1099         (riscv_fbsd_init_abi): Likewise.
1100
1101 2018-10-08  Weimin Pan  <weimin.pan@oracle.com>
1102         * valops.c (value_struct_elt_for_reference): Rename local variable
1103         to work around the shadowing a previous local warning.
1104
1105 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
1106
1107         * Makefile.in (ALLDEPFILES): Add riscv-fbsd-nat.c.
1108         * NEWS: Mention new FreeBSD/riscv native configuration.
1109         * configure.host: Add riscv*-*-freebsd*.
1110         * configure.nat: Likewise.
1111         * riscv-fbsd-nat.c: New file.
1112
1113 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
1114
1115         * Makefile.in (ALL_TARGET_OBS): Add riscv-fbsd-tdep.o.
1116         (HFILES_NO_SRCDIR): Add riscv-fbsd-tdep.h.
1117         (ALLDEPFILES): Add riscv-fbsd-tdep.c.
1118         * NEWS: Mention new FreeBSD/riscv target.
1119         * configure.tgt: Add riscv*-*-freebsd*.
1120         * riscv-fbsd-tdep.c: New file.
1121         * riscv-fbsd-tdep.h: New file.
1122
1123 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
1124
1125         * regcache.h (struct regcache_map_entry): Note that this type can
1126         be used with traditional frame caches.
1127         * trad-frame.c (trad_frame_set_reg_regmap): New.
1128         * trad-frame.h (trad_frame_set_reg_regmap): New.
1129
1130 2018-10-08  Weimin Pan  <weimin.pan@oracle.com>
1131
1132         PR c++/16841
1133         * valops.c (get_virtual_base_offset): New function.
1134         (value_struct_elt_for_reference): Use it to get virtual base offset
1135         and add it in calculating class member address.
1136
1137 2018-10-08   John Darrington <john@darrington.wattle.id.au>
1138
1139     * dwarf2read.c (dwarf2_cu) <producer_is_codewarrior>: New field.
1140       (check_producer): Check if the producer is codewarrior.
1141       (producer_is_codewarrior): New function.
1142       (lnp_state_machine::record_line): Ignore is_stmt flag for records
1143        produced by codewarrior.
1144       (dwarf2_cu::dwarf2_cu): Initialize producer_is_codewarrior.
1145
1146 2018-10-06  Tom Tromey  <tom@tromey.com>
1147
1148         PR python/19399:
1149         * python/py-inferior.c: Add "architecture" entry.
1150         (infpy_architecture): New function.
1151
1152 2018-10-06  Tom Tromey  <tom@tromey.com>
1153
1154         PR python/21765:
1155         * python/py-symbol.c (gdbpy_initialize_symbols): Redefine
1156         SYMBOL_VARIABLES_DOMAIN, SYMBOL_FUNCTIONS_DOMAIN,
1157         SYMBOL_TYPES_DOMAIN.  Define SYMBOL_MODULE_DOMAIN,
1158         SYMBOL_COMMON_BLOCK_DOMAIN, SYMBOL_LOC_COMMON_BLOCK.
1159
1160 2018-10-06  Tom Tromey  <tom@tromey.com>
1161
1162         PR build/17077:
1163         * Makefile.in (OPCODES_CFLAGS): Remove "-I$(OPCODES_SRC)/..".
1164         * arc-tdep.c, frv-tdep.c, lm32-tdep.c, mep-tdep.c,
1165         microblaze-tdep.c, or1k-tdep.h: Use ../opcodes, not opcodes, in
1166         #include.
1167
1168 2018-10-06  Tom Tromey  <tom@tromey.com>
1169
1170         * python/py-breakpoint.c (bppy_get_location): Handle a
1171         bp_breakpoint without a location.
1172
1173 2018-10-06  Tom Tromey  <tom@tromey.com>
1174
1175         * python/lib/gdb/function/strfns.py (_MemEq, _StrLen, _StrEq)
1176         (_RegEx): Reformat help text.
1177         * python/lib/gdb/function/caller_is.py (CallerIs, CallerMatches)
1178         (AnyCallerIs, AnyCallerMatches): Reformat help text.
1179         * python/lib/gdb/function/as_string.py (_AsString): Reformat help
1180         text.
1181         * python/lib/gdb/command/xmethods.py (InfoXMethod)
1182         (EnableXMethod, DisableXMethod): Remove help indentation.
1183         Capitalize meta-syntactic variables.
1184         * python/lib/gdb/command/unwinders.py (InfoUnwinder)
1185         (EnableUnwinder, DisableUnwinder): Remove help indentation.
1186         Capitalize meta-syntactic variables.
1187         * python/lib/gdb/command/explore.py (ExploreCommand)
1188         (ExploreValueCommand, ExploreTypeCommand): Reformat help text.
1189         * python/lib/gdb/command/type_printers.py (InfoTypePrinter)
1190         (EnableTypePrinter, DisableTypePrinter): Remove help indentation.
1191         * python/lib/gdb/command/pretty_printers.py (InfoPrettyPrinter):
1192         Remove help indentation.
1193         (EnablePrettyPrinter, DisablePrettyPrinter): Likewise.
1194         * python/lib/gdb/command/frame_filters.py (EnableFrameFilter)
1195         (DisableFrameFilter, SetFrameFilterPriority)
1196         (ShowFrameFilterPriority, InfoFrameFilter): Reword help text.
1197
1198 2018-10-06  Tom Tromey  <tom@tromey.com>
1199
1200         PR tui/28819:
1201         * tui/tui-io.c (gdb_wgetch): New function.
1202         (tui_mld_getc, tui_getc): Use it.
1203
1204 2018-10-05  Tom Tromey  <tom@tromey.com>
1205
1206         * sol-thread.c (sol_thread_target::wait): Rename inner
1207         "save_ptid".
1208
1209 2018-10-04  Tom Tromey  <tom@tromey.com>
1210
1211         * configure: Rebuild.
1212         * warning.m4 (AM_GDB_WARNINGS): Add -Wshadow=local.
1213
1214 2018-10-04  Tom Tromey  <tom@tromey.com>
1215
1216         * guile/scm-frame.c (gdbscm_frame_read_var): Remove inner
1217         declaration of "block".
1218
1219 2018-10-04  Tom Tromey  <tom@tromey.com>
1220
1221         * common/filestuff.c (fdwalk): Remove inner declaration of
1222         "result".
1223
1224 2018-10-04  Tom Tromey  <tom@tromey.com>
1225
1226         * msp430-tdep.c (msp430_push_dummy_call): Rename inner
1227         "structs_addr" and hoist declaration.
1228
1229 2018-10-04  Tom Tromey  <tom@tromey.com>
1230
1231         * linux-tdep.c (linux_make_mappings_corefile_notes): Introduce new
1232         variable "size".
1233
1234 2018-10-04  Tom Tromey  <tom@tromey.com>
1235
1236         * mdebugread.c (parse_partial_symbols): Use std::string.
1237
1238 2018-10-04  Tom Tromey  <tom@tromey.com>
1239
1240         * ctf.c (SET_ARRAY_FIELD): Rename "u32".
1241         * p-valprint.c (pascal_val_print): Split inner "i" variable.
1242         * xtensa-tdep.c (xtensa_push_dummy_call): Declare "i" in loop
1243         header.
1244         * xstormy16-tdep.c (xstormy16_push_dummy_call): Declare "val" in
1245         more inner scope.
1246         * xcoffread.c (read_xcoff_symtab): Rename inner "symbol".
1247         * varobj.c (varobj_update): Rename inner "newobj",
1248         "type_changed".
1249         * valprint.c (generic_emit_char): Rename inner "buf".
1250         * valops.c (find_overload_match): Rename inner "temp".
1251         (value_struct_elt_for_reference): Declare "v" in more inner
1252         scope.
1253         * v850-tdep.c (v850_push_dummy_call): Rename "len".
1254         * unittests/array-view-selftests.c (run_tests): Rename inner
1255         "vec".
1256         * tui/tui-stack.c (tui_show_frame_info): Declare "i" in loop
1257         header.
1258         * tracepoint.c (merge_uploaded_trace_state_variables): Declare
1259         "tsv" in more inner scope.
1260         (print_one_static_tracepoint_marker): Rename inner
1261         "tuple_emitter".
1262         * tic6x-tdep.c (tic6x_analyze_prologue): Declare "inst" lower.
1263         (tic6x_push_dummy_call): Don't redeclare "addr".
1264         * target-float.c: Declare "dto" lower.
1265         * symtab.c (lookup_local_symbol): Rename inner "sym".
1266         (find_pc_sect_line): Rename inner "pc".
1267         * stack.c (print_frame): Don't redeclare "gdbarch".
1268         (return_command): Rename inner "gdbarch".
1269         * s390-tdep.c (s390_prologue_frame_unwind_cache): Renam inner
1270         "sp".
1271         * rust-lang.c (rust_internal_print_type): Declare "i" in loop
1272         header.
1273         * rs6000-tdep.c (ppc_process_record): Rename inner "addr".
1274         * riscv-tdep.c (riscv_push_dummy_call): Declare "info" in inner
1275         scope.
1276         * remote.c (remote_target::update_thread_list): Don't redeclare
1277         "tp".
1278         (remote_target::process_initial_stop_replies): Rename inner
1279         "thread".
1280         (remote_target::remote_parse_stop_reply): Don't redeclare "p".
1281         (remote_target::wait_as): Don't redeclare "stop_reply".
1282         (remote_target::get_thread_local_address): Rename inner
1283         "result".
1284         (remote_target::get_tib_address): Likewise.
1285
1286         * regcache.c (cooked_read_test): Rename "regnum".
1287         * record-btrace.c (cmd_record_btrace_start): Rename inner
1288         "exception".
1289         * ppc-sysv-tdep.c (ppc64_sysv_abi_return_value): Declare "i" in
1290         loop header.
1291         * ppc-linux-tdep.c (ppc_linux_syscall_record): Declare "i" in loop
1292         header.
1293         (ppu2spu_sniffer): Rename inner "buf".
1294         * parse.c (operator_check_standard): Rename inner "type",
1295         "objfile".
1296         * p-valprint.c (pascal_val_print): Introduce new scope for
1297         "low_bound", "high_bound".
1298         * p-exp.y (yylex): Declare "i" in loop header.
1299         * objfiles.c (objfile_relocate1): Declare "i" in loop header.
1300         Lower declaration of "s".
1301         * nios2-tdep.c (nios2_analyze_prologue): Declare "i" in loop
1302         header.
1303         (nios2_push_dummy_call): Rename "len".
1304         * nat/linux-osdata.c (linux_xfer_osdata_cpus): Rename static
1305         "buf".
1306         (linux_xfer_osdata_fds, linux_xfer_osdata_shm)
1307         (linux_xfer_osdata_sem, linux_xfer_osdata_msg)
1308         (linux_xfer_osdata_modules): Likewise.
1309         * mips-tdep.c (mips_eabi_push_dummy_call): Rename outer "len".
1310         (mips_n32n64_push_dummy_call, mips_o32_push_dummy_call)
1311         (mips_o64_push_dummy_call): Likewise.
1312         * microblaze-tdep.c (microblaze_analyze_prologue): Rename inner
1313         "op".
1314         * mi/mi-main.c (list_available_thread_groups): Rename inner
1315         "tuple_emitter".
1316         (mi_cmd_data_read_memory): Rename inner "opts".
1317         * mi/mi-cmd-var.c (varobj_update_one): Rename inner
1318         "tuple_emitter".
1319         * mep-tdep.c (mep_analyze_prologue): Declare "rn" in loop header.
1320         * mdebugread.c (parse_symbol): Rename inner "b".  Declare "f" in
1321         more inner scope.
1322         (parse_partial_symbols): Rename inner "pst", "p", "name"
1323         * main.c (captured_main_1): Rename inner "i"s.
1324         * machoread.c (macho_symfile_read_all_oso): Don't redeclare
1325         "oso2".
1326         * linux-tdep.c (linux_info_proc): Rename inner "filename".
1327         * linespec.c (linespec_lexer_lex_string): Rename inner "p".
1328         * infrun.c (handle_no_resumed): Don't redeclare "thread".
1329         (handle_signal_stop): Rename inner "gdbarch".
1330         (handle_command): Declare "signum" in loop header.
1331         * ia64-tdep.c (ia64_pseudo_register_read): Don't redeclare
1332         "status".
1333         (examine_prologue): Rename inner "sol" and "sof".
1334         (ia64_extract_return_value): Rename inner "val".  Declare another
1335         "val" in a more inner scope.
1336         * hppa-bsd-tdep.c (hppabsd_find_global_pointer): Declare "buf" in
1337         inner scope.
1338         * guile/scm-symbol.c (gdbscm_lookup_symbol): Rename inner
1339         "except".
1340         * findvar.c (default_read_var_value): Don't redeclare "addr".
1341         * f-exp.y (yylex): Declare "i" in loop header.
1342         * eval.c (evaluate_subexp_standard): Don't redeclare "type".
1343         Rename inner "type", "expect_type".
1344         (evaluate_subexp_for_sizeof): Rename inner "pc".
1345         * elfread.c (elf_symfile_read): Rename inner "abfd".
1346         * dwarf2read.c (read_debug_names_from_section): Don't redeclare
1347         "bytes_read".
1348         (process_psymtab_comp_unit_reader): Don't redeclare "gdbarch".
1349         (add_partial_subprogram): Rename inner "lowpc" and "highpc".
1350         (dwarf_decode_line_header): Rename inner "lh".
1351         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Don't redeclare
1352         "offset".  Declare "i" in loop header.
1353         (disassemble_dwarf_expression): Rename inner "addr_size".
1354         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Rename
1355         inner "result".
1356         (dwarf_expr_context::execute_stack_op): Rename inner "offset".
1357         * dwarf2-frame.c (decode_frame_entry_1): Rename inner "length"s.
1358         * disasm.c (do_mixed_source_and_assembly_deprecated): Rename inner
1359         "inner_list_emitter".
1360         (do_mixed_source_and_assembly): Rename inner "tuple_emitter".
1361         * disasm-selftests.c (print_one_insn_test): Wrap "bplen"
1362         declaration in a block.
1363         * csky-tdep.c (csky_analyze_prologue): Declare "offset" lower.
1364         * cp-valprint.c (cp_print_value_fields): Don't redeclare
1365         "obstack_final_size".
1366         * cp-support.c (inspect_type): Declare "i" in loop header.
1367         * compile/compile.c (compile_instance::insert_symbol_error):
1368         Rename inner "e".
1369         * common/agent.c (agent_run_command): Remove inner "ret"
1370         declaration.
1371         * coffread.c (coff_symfile_read): Rename inner "name".
1372         (coff_symfile_read): Rename inner "abfd".
1373         * cli/cli-utils.c (get_number_trailer): Rename inner "val".
1374         * cli/cli-cmds.c (print_disassembly): Rename inner "low" and
1375         "high".
1376         * c-exp.y (lex_one_token): Move "len" declaration lower.
1377         * breakpoint.c (create_longjmp_master_breakpoint): Don't redeclare
1378         "gdbarch".
1379         (create_exception_master_breakpoint): Likewise.  Don't redeclare
1380         "b".
1381         (watch_command_1): Declare "mark" later.
1382         (clear_command): Don't shadow "a" or "b".
1383         (delete_command): Rename inner "b".
1384         (delete_trace_command): Likewise.
1385         * arm-tdep.c (thumb_process_displaced_32bit_insn): Rename inner
1386         "op".
1387         (arm_gdbarch_init): Remove inner "e_flags".
1388         * arch/arm-get-next-pcs.c (thumb_get_next_pcs_raw): Declare
1389         "offset" in inner blocks.
1390
1391 2018-10-04  Simon Marchi  <simon.marchi@ericsson.com>
1392
1393         * dwarf-index-write.c (file_write): Don't write if the vector is
1394         empty.
1395
1396 2018-10-05  Tom de Vries  <tdevries@suse.de>
1397
1398         * python/py-progspace.c (pspy_solib_name): Fix type mismatch in
1399         PyArg_ParseTuple call.
1400
1401 2018-10-05  Tom de Vries  <tdevries@suse.de>
1402
1403         * python/py-record-btrace.c (recpy_bt_goto): Fix type mismatch in
1404         PyArg_ParseTuple call.
1405
1406 2018-10-04  Joel Brobecker  <brobecker@adacore.com>
1407
1408         * psymtab.c (recursively_search_psymtabs): Reformat parameters
1409         to avoid exceeding 80 characters per line limit.
1410
1411 2018-10-04  Tom Tromey  <tom@tromey.com>
1412
1413         * symfile.c (syms_from_objfile_1, finish_new_objfile)
1414         (reread_symbols): Update.
1415         * complaints.h (clear_complaints): Remove argument.
1416         * complaints.c (enum complaint_series): Remove.
1417         (series): Remove global.
1418         (complaint_internal): Update.
1419         (clear_complaints): Remove argument.
1420
1421 2018-10-04  Tom Tromey  <tom@tromey.com>
1422
1423         * symfile.c (symbol_file_add_with_addrs): Do not print "no
1424         debugging symbols" message if there is a separate debug objfile.
1425
1426 2018-10-04  Tom Tromey  <tom@tromey.com>
1427
1428         PR cli/19551:
1429         * symfile.c (symbol_file_add_with_addrs): Update output.
1430         * psymtab.c (require_partial_symbols): Update output.
1431
1432 2018-10-04  Tom Tromey  <tom@tromey.com>
1433
1434         PR cli/22234:
1435         * complaints.c: Emit \n.
1436
1437 2018-10-04  Tom Tromey  <tom@tromey.com>
1438
1439         * symfile.c (symbol_file_add_with_addrs, symbol_file_clear)
1440         (separate_debug_file_exists, find_separate_debug_file)
1441         (add_symbol_file_command, reread_symbols, allocate_symtab)
1442         (allocate_compunit_symtab): Use filtered printing, not
1443         unfiltered.
1444         * psymtab.c (require_partial_symbols, dump_psymtab)
1445         (allocate_psymtab): Use filtered printing, not unfiltered.
1446
1447 2018-10-04  Tom Tromey  <tom@tromey.com>
1448
1449         * complaints.c (complaint_internal): Correctly check complaint
1450         count.
1451
1452 2018-10-04  Tom Tromey  <tom@tromey.com>
1453
1454         * complaints.h (struct complaints): Remove declaration.
1455         * complaints.c (clear_complaints): Remove an unused variable.
1456
1457 2018-10-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1458
1459         * MAINTAINERS (Write After Approval): Add self.
1460
1461 2018-10-03  Tom Tromey  <tom@tromey.com>
1462
1463         * guile/scm-value.c (gdbscm_value_to_string): Initialize
1464         "buffer_contents".
1465         * coffread.c (coff_symtab_read): Initialize "newobj".
1466
1467 2018-10-03  Simon Marchi  <simon.marchi@polymtl.ca>
1468
1469         * dwarf2read.c (read_func_scope): Remove struct keyword in
1470         range-based for.
1471
1472 2018-10-03  Tom Tromey  <tom@tromey.com>
1473
1474         * README: Mention --enable-ubsan.
1475         * NEWS: Mention --enable-ubsan.
1476         * acinclude.m4: Include sanitize.m4.
1477         * configure: Rebuild.
1478         * configure.ac: Call AM_GDB_UBSAN.
1479         * sanitize.m4: New file.
1480
1481 2018-10-03  Tom Tromey  <tom@tromey.com>
1482
1483         * expression.h (enum exp_opcode): Use uint8_t as base type.
1484         * expprint.c (op_name): Handle invalid opcodes.
1485
1486 2018-10-03  Tom Tromey  <tom@tromey.com>
1487
1488         * parse.c (prefixify_expression): Add assert.
1489         (parse_exp_in_context_1): Throw exception if the expression is
1490         empty.
1491
1492 2018-10-03  Tom Tromey  <tom@tromey.com>
1493
1494         * dwarf2read.c (read_signed_leb128): Work in ULONGEST.
1495
1496 2018-10-03  Tom Tromey  <tom@tromey.com>
1497
1498         * c-exp.y (parse_number): Work in unsigned.  Remove casts.
1499
1500 2018-10-03  Tom Tromey  <tom@tromey.com>
1501
1502         * dwarf2read.c (read_subrange_type): Make "negative_mask"
1503         unsigned.
1504
1505 2018-10-03  Tom Tromey  <tom@tromey.com>
1506
1507         * findvar.c (extract_integer): Do work in an unsigned type.
1508
1509 2018-10-03  Tom Tromey  <tom@tromey.com>
1510
1511         * common/enum-flags.h (enum_flags::operator~): Add static assert.
1512         * symfile-add-flags.h (enum symfile_add_flag): Use unsigned as
1513         base type.
1514         * objfile-flags.h (enum objfile_flag): Use unsigned as base type.
1515         * gdbtypes.h (enum type_instance_flag_value): Use unsigned as base
1516         type.
1517         * c-lang.h (enum c_string_type_values): Use unsigned as base
1518         type.
1519         * btrace.h (enum btrace_thread_flag): Use unsigned as base type.
1520
1521 2018-10-03  Tom Tromey  <tom@tromey.com>
1522
1523         * dwarf2-frame.h (dwarf2_frame_state_reg_info)
1524         <~dwarf2_frame_state_reg_info>: Update.
1525         <dwarf2_frame_state_reg_info>: Update.
1526         <alloc_regs>: Add assertion.  Update.
1527         <reg>: Now a std::vector.
1528         <num_regs>: Remove.
1529         <swap>: Update.
1530         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
1531         (execute_cfa_program_test, dwarf2_frame_cache): Update.
1532
1533 2018-10-03  Tom Tromey  <tom@tromey.com>
1534
1535         * namespace.c (add_using_directive): Don't pass NULL to memcpy.
1536
1537 2018-10-03  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1538
1539         * tid-parse.c (tid_is_in_list): Fix wrong 'See' comment.
1540
1541 2018-10-02  Tom Tromey  <tom@tromey.com>
1542
1543         * aarch64-linux-tdep.c (aarch64_linux_sigframe_init): Use pulongest.
1544
1545 2018-10-02  John Darrington <john@darrington.wattle.id.au>
1546
1547         * NEWS: Mention changed commands.
1548         * ser-uds.c: New file.
1549         * configure.ac (SER_HARDWIRE): Add ser-uds.o.
1550         * configure: Regenerate.
1551         * Makefile.in: Add new file.
1552         * serial.c (serial_open): Check if filename is a socket
1553           and lookup the appropriate interface accordingly.
1554
1555 2018-10-01  Alan Hayward  <alan.hayward@arm.com>
1556
1557         * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_OFFSET): Add
1558         define.
1559         (AARCH64_EXTRA_MAGIC): Likewise.
1560         (AARCH64_FPSIMD_MAGIC): Likewise.
1561         (AARCH64_SVE_MAGIC): Likewise.
1562         (AARCH64_EXTRA_DATAP_OFFSET): Likewise.
1563         (AARCH64_FPSIMD_FPSR_OFFSET): Likewise.
1564         (AARCH64_FPSIMD_FPCR_OFFSET): Likewise.
1565         (AARCH64_FPSIMD_V0_OFFSET): Likewise.
1566         (AARCH64_FPSIMD_VREG_SIZE): Likewise.
1567         (AARCH64_SVE_CONTEXT_VL_OFFSET): Likewise.
1568         (AARCH64_SVE_CONTEXT_REGS_OFFSET): Likewise.
1569         (AARCH64_SVE_CONTEXT_P_REGS_OFFSET): Likewise.
1570         (AARCH64_SVE_CONTEXT_FFR_OFFSET): Likewise.
1571         (AARCH64_SVE_CONTEXT_SIZE): Likewise.
1572         (read_aarch64_ctx): Add function.
1573         (aarch64_linux_sigframe_init): Detect FP registers.
1574
1575 2018-10-01  Alan Hayward  <alan.hayward@arm.com>
1576
1577         * aarch64-tdep.c (AARCH64_Q0_REGNUM): Move to here.
1578         (AARCH64_D0_REGNUM): Likewise.
1579         (AARCH64_S0_REGNUM): Likewise.
1580         (AARCH64_H0_REGNUM): Likewise.
1581         (AARCH64_B0_REGNUM): Likewise.
1582         (AARCH64_SVE_V0_REGNUM): Likewise.
1583         * arch/aarch64.h (AARCH64_Q0_REGNUM): Move from here.
1584         (AARCH64_D0_REGNUM): Likewise.
1585         (AARCH64_S0_REGNUM): Likewise.
1586         (AARCH64_H0_REGNUM): Likewise.
1587         (AARCH64_B0_REGNUM): Likewise.
1588         (AARCH64_SVE_V0_REGNUM): Likewise.
1589
1590 2018-10-01  Gary Benson <gbenson@redhat.com>
1591
1592         * gdb_proc_service.h (gdb_prfpregset_t): Remove typedef.
1593         * proc-service.c (ps_lgetfpregs, ps_lsetfpregs): Use
1594         prfpregset_t instead of gdb_prfpregset_t.
1595         * configure.ac (PRFPREGSET_T_BROKEN): Remove check.
1596         * configure, config.in: Rebuild.
1597
1598 2018-10-01  Gary Benson <gbenson@redhat.com>
1599
1600         * common/gdb_proc_service.h: New file, factored out from...
1601         * gdb_proc_service.h: Moved common code to the above file.
1602         * Makefile.in (HFILES_NO_SRCDIR): Add the above new file.
1603
1604 2018-10-01  Gary Benson <gbenson@redhat.com>
1605
1606         * gdb_proc_service.h: Use elf_gregset_t if prgregset_t is
1607         undefined.  Use elf_fpregset_t if prfpregset_t is undefined.
1608
1609 2018-10-01  Gary Benson <gbenson@redhat.com>
1610
1611         * configure.ac: Check if sys/procfs.h defines elf_fpregset_t.
1612         (AC_CHECK_HEADERS): Check for linux/elf.h.
1613         * configure, config.in: Rebuild.
1614         * gdb_proc_service.h: Include linux/elf.h if sys/procfs.h
1615         doesn't define elf_fpregset_t.
1616
1617 2018-10-01  Gary Benson <gbenson@redhat.com>
1618
1619         * gdb_proc_service.h: Whitespace change.
1620
1621 2018-10-01  Tom Tromey  <tom@tromey.com>
1622
1623         * unittests/scoped_mmap-selftests.c: Don't check HAVE_UNISTD_H.
1624         * unittests/scoped_fd-selftests.c: Don't check HAVE_UNISTD_H.
1625         * common/scoped_fd.h: Don't check HAVE_UNISTD_H.
1626
1627 2018-10-01  Tom Tromey  <tom@tromey.com>
1628
1629         * README: Minor change.
1630
1631 2018-09-30  Pedro Alves  <palves@redhat.com>
1632
1633         * darwin-nat-info.c (darwin_debug_regions_recurse)
1634         (info_mach_exceptions_command): Remove unused local variables.
1635         * darwin-nat.c (darwin_decode_notify_message)
1636         (darwin_nat_target::resume, darwin_nat_target::mourn_inferior)
1637         (darwin_stop_inferior, darwin_setup_exceptions)
1638         (darwin_nat_target::kill, darwin_attach_pid, darwin_ptrace_him)
1639         (darwin_nat_target::attach, darwin_nat_target::detach)
1640         (darwin_read_write_inferior, darwin_read_dyld_info): Remove unused
1641         local variables.
1642         * i386-darwin-nat.c (i386_darwin_dr_set): Remove unused local
1643         variables.
1644
1645 2018-09-29  Tom Tromey  <tom@tromey.com>
1646
1647         * README: Remove some leftover text.
1648
1649 2018-09-29  Tom Tromey  <tom@tromey.com>
1650
1651         * PROBLEMS: Rewrite.
1652         * README: Update.
1653
1654 2018-09-28  John Baldwin  <jhb@FreeBSD.org>
1655
1656         * disasm-selftests.c (print_one_insn_test): Add bfd_arch_riscv to
1657         case with explicit breakpoint kind.
1658         * riscv-tdep.c (show_use_compressed_breakpoints): Remove
1659         'additional_info' and related logic.
1660         (riscv_debug_breakpoints): New variable.
1661         (riscv_breakpoint_kind_from_pc): Use the length of the existing
1662         instruction to determine the breakpoint kind.
1663         (_initialize_riscv_tdep): Add 'set/show debug riscv breakpoints'
1664         flag.  Update description of 'set/show riscv
1665         use-compressed-breakpoints' flag.
1666
1667 2018-09-28  Andrew Burgess  <andrew.burgess@embecosm.com>
1668
1669         (NEWS): Mention changes to frame related commands.
1670         * cli/cli-decode.c (add_cmd_suppress_notification): New function.
1671         (add_prefix_cmd_suppress_notification): New function.
1672         (add_com_suppress_notification): Call
1673         add_cmd_suppress_notification.
1674         * command.h (add_cmd_suppress_notification): Declare.
1675         (add_prefix_cmd_suppress_notification): Declare.
1676         * mi/mi-cmd-stack.c: Add 'safe-ctype.h' include.
1677         (parse_frame_specification): Moved from stack.c, with
1678         simplification to handle a single argument.
1679         (mi_cmd_stack_select_frame): Use parse_frame_specification, the
1680         switch to the selected frame.  Add a header comment.
1681         * stack.c: Remove 'safe-ctype.h' include.
1682         (find_frame_for_function): Add declaration.
1683         (find_frame_for_address): New function.
1684         (parse_frame_specification): Moved into mi/mi-cmd-stack.c.
1685         (frame_selection_by_function_completer): New function.
1686         (info_frame_command): Rename to...
1687         (info_frame_command_core): ...this, and update parameter types.
1688         (select_frame_command): Rename to...
1689         (select_frame_command_core): ...this, and update parameter types.
1690         (frame_command): Rename to...
1691         (frame_command_core): ...this, and update parameter types.
1692         (class frame_command_helper): New class to wrap implementations of
1693         frame related sub-commands.
1694         (frame_apply_cmd_list): New static global.
1695         (frame_cmd_list): Make static.
1696         (select_frame_cmd_list): New global for sub-commands.
1697         (info_frame_cmd_list): New global for sub-commands.
1698         (_initialize_stack): Register sub-commands for 'frame',
1699         'select-frame', and 'info frame'.  Update 'frame apply' commands
1700         to use frame_apply_cmd_list.  Move function local static
1701         frame_apply_list to file static frame_apply_cmd_list for
1702         consistency.
1703         * stack.h (select_frame_command): Delete declarationn.
1704         (select_frame_for_mi): Declare new function.
1705
1706 2018-09-26  Andrew Burgess  <andrew.burgess@embecosm.com>
1707
1708         * riscv-tdep.c (riscv_insn::decode): Decode c.lui.
1709         (riscv_scan_prologue): Split handling of AUIPC, LUI, ADD, ADDI,
1710         and NOP.
1711
1712 2018-09-26  Simon Marchi  <simon.marchi@ericsson.com>
1713
1714         * elf32-nds32.c (elf32_nds32_allocate_dynrelocs): Remove.
1715
1716 2018-09-26  Tom Tromey  <tom@tromey.com>
1717
1718         * valops.c (auto_abandon): Remove dead code.
1719
1720 2018-09-26  Tom Tromey  <tom@tromey.com>
1721
1722         * tui/tui-win.c (WIN_HEIGHT_USAGE): Remove extra ">"s.
1723
1724 2018-09-24  Tom Tromey  <tom@tromey.com>
1725
1726         * common/pathstuff.c (get_standard_cache_dir): Make
1727         "xdg_cache_home" and "home" const.
1728         * top.c (init_history): Make "tmpenv" const.
1729         * main.c (get_init_files): Make "homedir" const.
1730
1731 2018-09-23  Tom Tromey  <tom@tromey.com>
1732
1733         PR python/18852:
1734         * python/py-param.c (get_set_value): Use gdbpy_handle_exception.
1735
1736 2018-09-23  Tom Tromey  <tom@tromey.com>
1737
1738         * python/py-function.c (fnpy_call): Use gdbpy_handle_exception.
1739         * python/py-cmd.c (cmdpy_function): Use gdbpy_handle_exception.
1740         * python/python-internal.h (gdbpy_handle_exception): Declare.
1741         * python/py-utils.c (gdbpy_handle_exception): New function.
1742
1743 2018-09-23  Tom Tromey  <tom@tromey.com>
1744
1745         PR python/17284:
1746         * python/py-type.c (typy_template_argument): Check for negative
1747         argument number.
1748
1749 2018-09-23  Tom Tromey  <tom@tromey.com>
1750
1751         PR python/14062:
1752         * python/python.c (gdbpy_run_events): Do not ignore exceptions.
1753
1754 2018-09-23  Tom Tromey  <tom@tromey.com>
1755
1756         PR python/18170:
1757         * python/py-value.c (valpy_int): Allow conversion from pointer
1758         type.
1759
1760 2018-09-23  Tom Tromey  <tom@tromey.com>
1761
1762         PR python/20126:
1763         * python/py-value.c (valpy_int): Respect type sign.
1764
1765 2018-09-23  Tom Tromey  <tom@tromey.com>
1766
1767         PR python/18352;
1768         * python/py-value.c (valpy_float): Allow conversions from int or
1769         char.
1770         (valpy_int, valpy_long): Allow conversions from float.
1771
1772 2018-09-23  Tom Tromey  <tom@tromey.com>
1773
1774         * ctf.c (ctf_start): Use gdb_fopen_cloexec.
1775         * common/scoped_mmap.c (mmap_file): Use gdb_open_cloexec.
1776
1777 2018-09-23  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1778
1779         * amd64-sol2-tdep.c (amd64_sol2_sigtramp_p): Also recognize
1780         __sighndlr.
1781         * i386-sol2-tdep.c (i386_sol2_sigtramp_p): Likewise.
1782
1783 2018-08-02  Jon Turney  <jon.turney@dronecode.org.uk>
1784
1785         * windows-nat.c (windows_nat_target::wait): Remove a spurious
1786         target_terminal::ours().
1787
1788 2018-09-23  Simon Marchi  <simon.marchi@ericsson.com>
1789
1790         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): Change type
1791         of vl to ULONGEST.
1792
1793 2018-09-21  Yacov Simhony  <ysimhony@gmail.com>
1794
1795         * breakpoint.c (update_inserted_breakpoint_locations): Remove
1796         redundant condition.
1797
1798 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1799
1800         * proc-utils.h (PROC_CTL_WORD_TYPE): Remove.
1801
1802         * procfs.c: Don't check for PR_MODEL_NATIVE definition.
1803         * sparc-sol2-nat.c: Likewise.  Remove Linux, __arch64__ references.
1804         * sol-thread.c (ps_pdmodel): Don't guard definition.
1805
1806         * procfs.c: Fix formatting.
1807
1808         * procfs.c (sysset_t_alloc): Remove.
1809         (create_procinfo): Use XNEW instead of sysset_t_alloc.
1810         (procfs_debug_inferior): Likewise.
1811         (procfs_set_exec_trap): Likewise.
1812         (proc_set_traced_sysentry): Don't allocate argp dynamically.
1813         (proc_set_traced_sysexit): Likewise.
1814
1815         * procfs.c (create_procinfo): Use xsnprintf to fix ARI warning.
1816         (dead_procinfo): Likewise.
1817         (proc_warn): Likewise.
1818         (proc_error): Likewise.
1819         (proc_get_LDT_entry): Likewise.
1820         (do_attach): Likewise.
1821         (procfs_target::pid_to_str): Likewise.
1822         (iterate_over_mappings): Likewise.
1823
1824         * procfs.c (create_procinfo): Fix ARI warning.
1825         (proc_get_status): Likewise.
1826         (proc_stop_process): Likewise.
1827         (proc_run_process): Likewise.
1828         (proc_kill): Likewise.
1829         (proc_get_LDT_entry): Likewise.
1830         (procfs_find_LDT_entry): Likewise.
1831         (proc_update_threads): Likewise.
1832         (proc_iterate_over_threads): Likewise.
1833         (do_attach): Likewise.
1834         (procfs_xfer_memory): Likewise.
1835         (invalidate_cache): Likewise.
1836         (procfs_target::resume): Likewise.
1837         (procfs_init_inferior): Likewise.
1838         (procfs_set_exec_trap): Likewise.
1839         (procfs_target::thread_alive): Likewise.
1840         (procfs_target::pid_to_exec_file): Likewise.
1841         (iterate_over_mappings): Likewise.
1842         (procfs_target::make_corefile_notes): Likewise.
1843         * sol-thread.c (sol_thread_target::thread_alive): Likewise.
1844
1845         * procfs.c (procfs_find_LDT_entry): Silence ARI warning.
1846         (procfs_find_LDT_entry): Likewise.
1847         * sol-thread.c (ps_lgetLDT): Likewise.
1848
1849 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1850
1851         PR tdep/17903
1852         * procfs.c (procfs_target): Declare pid_to_exec_file.
1853         (procfs_target::pid_to_exec_file): New.
1854
1855 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1856
1857         * auxv.c (default_print_auxv_entry): Reflect AT_SUN_CAP_HW1
1858         renaming.
1859         Handle AT_SUN_EMULATOR, AT_SUN_BRANDNAME, AT_SUN_BRAND_AUX1,
1860         AT_SUN_BRAND_AUX2, AT_SUN_BRAND_AUX3, AT_SUN_CAP_HW2.
1861
1862 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1863
1864         * i386-v4-nat.c (regmap, supply_gregset, fill_gregset)
1865         (supply_fpregset, fill_fpregset): Move ...
1866         * i386-sol2-nat.c [PR_MODEL_NATIVE != PR_MODEL_LP64]: ... here.
1867         Remove HAVE_GREGSET_T, HAVE_FPREGET_T guards.
1868         Remove references to ioctl-based procfs.
1869         Include <sys/reg.h>.
1870         Remove PR_MODEL_NATIVE guards.
1871         * configure.nat <sol2, i386> (NATDEPFILES): Remove i386-v4-nat.o.
1872         * Makefile.in (ALLDEPFILES): Remove i386-v4-nat.c.
1873
1874 2018-09-19  Xavier Roirand  <roirand@adacore.com>
1875
1876         PR gdb/20981:
1877         * solib-darwin.c (darwin_get_dyld_bfd): New function.
1878         (darwin_solib_get_all_image_info_addr_at_init): Update call.
1879         (darwin_solib_create_inferior_hook): Handle unrelocated dyld.
1880
1881 2018-09-19  John Baldwin  <jhb@FreeBSD.org>
1882
1883         * fbsd-tdep.c (fbsd_print_sockaddr_in): Style fix.
1884         (fbsd_print_sockaddr_in6): Likewise.
1885
1886 2018-09-19  Richard Bunt  <richard.bunt@arm.com>
1887             Chris January  <chris.january@arm.com>
1888
1889         * eval.c (skip_undetermined_arglist): Skip argument list helper.
1890         (evaluate_subexp_standard): Return a dummy type when
1891         honoring EVAL_SKIP in OP_VAR_VALUE and handle skipping in the
1892         OP_F77_UNDETERMINED_ARGLIST case.
1893         * expression.h (enum noside): Update comment.
1894
1895 2018-09-19  George Vasick <george.vasick@oracle.com>
1896
1897         * solib-svr4.c (svr4_same_1): Also handle amd64 ld.so.1.
1898
1899 2018-09-19  Stefan Teleman <stefan.teleman@oracle.com>
1900             April Chin <april.chin@oracle.com>
1901             Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1902
1903         * procfs.c (MAX_PROC_NAME_SIZE): Allow for 6-digit PID_MAX and
1904         uint_t lwpid_t.
1905         (create_procinfo): Print pids in /proc without leading zeros.
1906
1907 2018-09-18  Sandra Loosemore  <sandra@codesourcery.com>
1908
1909         * nios2-tdep.c (nios2_gcc_target_options): New.
1910         (nios2_gdb_arch_init): Install new hook.
1911
1912 2018-09-18  Simon Marchi  <simon.marchi@ericsson.com>
1913
1914         * patches/0001-Fix-PR-gdb-23558-Use-system-s-getcwd-when-cross-comp.patch:
1915         New file.
1916         * update-gnulib.sh: Apply patch.
1917         * configure: Re-generate.
1918
1919 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1920
1921         * infcmd.c (_initialize_infcmd): Remove "running" from "info proc"
1922         description.  Make "info proc" command descriptions more
1923         consistent.
1924
1925 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1926
1927         * NEWS: Mention 'info proc files' command.
1928
1929 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1930
1931         * fbsd-nat.c (fbsd_nat_target::info_proc): List open file
1932         descriptors for IP_FILES and IP_ALL.
1933
1934 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1935
1936         * fbsd-tdep.c (KF_FLAGS, KF_OFFSET, KF_VNODE_TYPE, KF_SOCK_DOMAIN)
1937         (KF_SOCK_TYPE, KF_SOCK_PROTOCOL, KF_SA_LOCAL, KF_SA_PEER)
1938         (KINFO_FILE_TYPE_SOCKET, KINFO_FILE_TYPE_PIPE)
1939         (KINFO_FILE_TYPE_FIFO, KINFO_FILE_TYPE_KQUEUE)
1940         (KINFO_FILE_TYPE_CRYPTO, KINFO_FILE_TYPE_MQUEUE)
1941         (KINFO_FILE_TYPE_SHM, KINFO_FILE_TYPE_SEM, KINFO_FILE_TYPE_PTS)
1942         (KINFO_FILE_TYPE_PROCDESC, KINFO_FILE_FD_TYPE_ROOT)
1943         (KINFO_FILE_FD_TYPE_JAIL, KINFO_FILE_FD_TYPE_TRACE)
1944         (KINFO_FILE_FD_TYPE_CTTY, KINFO_FILE_FLAG_READ)
1945         (KINFO_FILE_FLAG_WRITE, KINFO_FILE_FLAG_APPEND)
1946         (KINFO_FILE_FLAG_ASYNC, KINFO_FILE_FLAG_FSYNC)
1947         (KINFO_FILE_FLAG_NONBLOCK, KINFO_FILE_FLAG_DIRECT)
1948         (KINFO_FILE_FLAG_HASLOCK, KINFO_FILE_FLAG_EXEC)
1949         (KINFO_FILE_VTYPE_VREG, KINFO_FILE_VTYPE_VDIR)
1950         (KINFO_FILE_VTYPE_VCHR, KINFO_FILE_VTYPE_VLNK)
1951         (KINFO_FILE_VTYPE_VSOCK, KINFO_FILE_VTYPE_VFIFO, FBSD_AF_UNIX)
1952         (FBSD_AF_INET, FBSD_AF_INET6, FBSD_SOCK_STREAM, FBSD_SOCK_DGRAM)
1953         (FBSD_SOCK_SEQPACKET, FBSD_IPPROTO_ICMP, FBSD_IPPROTO_TCP)
1954         (FBSD_IPPROTO_UDP, FBSD_IPPROTO_SCTP): New defines.
1955         (struct fbsd_sockaddr_in, struct fbsd_sockaddr_in6)
1956         (struct fbsd_sockaddr_un): New types.
1957         (fbsd_file_fd, fbsd_file_type, fbsd_file_flags, fbsd_ipproto)
1958         (fbsd_print_sockaddr_in, fbsd_print_sockaddr_in6)
1959         (fbsd_info_proc_files_header, fbsd_info_proc_files_entry)
1960         (fbsd_core_info_proc_files): New functions.
1961         (fbsd_core_info_proc): List open file descriptors for IP_FILES and
1962         IP_ALL.
1963         * fbsd-tdep.h (fbsd_info_proc_files_header)
1964         (fbsd_info_proc_files_entry): New.
1965
1966 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1967
1968         * defs.h (enum info_proc_what) [IP_FILES]: New value.
1969         * infcmd.c (info_proc_cmd_files): New function.
1970         (_initialize_infcmd): Register 'info proc files' command.
1971
1972 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1973
1974         * gnulib/aclocal-m4-deps.mk: Re-generate.
1975         * gnulib/aclocal.m4: Re-generate.
1976         * gnulib/config.in: Re-generate.
1977         * gnulib/configure: Re-generate.
1978         * gnulib/import/Makefile.am: Re-generate.
1979         * gnulib/import/Makefile.in: Re-generate.
1980         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
1981         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1982         * gnulib/import/arpa_inet.in.h: New file.
1983         * gnulib/import/inet_ntop.c: New file.
1984         * gnulib/import/m4/arpa_inet_h.m4: New file.
1985         * gnulib/import/m4/inet_ntop.m4: New file.
1986         * gnulib/import/m4/netinet_in_h.m4: New file.
1987         * gnulib/import/m4/socklen.m4: New file.
1988         * gnulib/import/m4/sockpfaf.m4: New file.
1989         * gnulib/import/m4/stdalign.m4: New file.
1990         * gnulib/import/m4/sys_uio_h.m4: New file.
1991         * gnulib/import/netinet_in.in.h: New file.
1992         * gnulib/import/stdalign.in.h: New file.
1993         * gnulib/import/sys_socket.c: New file.
1994         * gnulib/import/sys_socket.in.h: New file.
1995         * gnulib/import/sys_uio.in.h: New file.
1996         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add inet_ntop
1997         module.
1998
1999 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
2000
2001         * gnulib/aclocal-m4-deps.mk: New file.
2002         * gnulib/update-gnulib.sh: Generate "aclocal-m4-deps.mk"
2003         deterministically.
2004
2005 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
2006
2007         * fbsd-tdep.c (fbsd_core_vnode_path): Use KF_PATH instead of
2008         KVE_PATH.
2009
2010 2018-09-18  Tom Tromey  <tom@tromey.com>
2011
2012         * compile/compile-object-load.c (struct
2013         link_hash_table_cleanup_data): Add constructor and destructor.
2014         Use DISABLE_COPY_AND_ASSIGN.
2015         (~link_hash_table_cleanup_data): Rename from
2016         link_hash_table_free.  Now a destructor.
2017         (copy_sections): Use gdb::unique_xmalloc_ptr.  Remove cleanups.
2018
2019 2018-09-18  Tom Tromey  <tom@tromey.com>
2020
2021         * compile/compile-object-run.c (do_module_cleanup): Use delete.
2022         * compile/compile-object-load.c (struct munmap_list): Move to
2023         header file.
2024         (munmap_list::add): Rename from munmap_list_add; rewrite.
2025         (munmap_list::~munmap_list): Rename from munmap_list_free.
2026         (munmap_listp_free_cleanup): Remove.
2027         (compile_object_load): Update.
2028         * compile/compile-object-load.h (struct munmap_list): Move from
2029         compile-object-load.c.  Rewrite.
2030
2031 2018-09-18  Alan Hayward  <alan.hayward@arm.com>
2032
2033         * aarch64-tdep.c (pass_in_v): Use register size.
2034         (aarch64_extract_return_value): Likewise.
2035         (aarch64_store_return_value): Likewise.
2036
2037 2018-09-18  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2038
2039         * utils.c (dump_core) [HAVE_SETRLIMIT]: Cast RLIM_INFINITY to
2040         rlim_t.
2041
2042 2018-09-17  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2043
2044         * python/lib/gdb/command/frame_filters.py (EnableFrameFilter):
2045         Fix short help line.
2046
2047 2018-09-17  Tom Tromey  <tom@tromey.com>
2048
2049         PR python/20445:
2050         * configure: Rebuild.
2051         * configure.ac: Conditionally use -DNDEBUG for Python.
2052
2053 2018-09-17  Tom Tromey  <tom@tromey.com>
2054
2055         * configure: Rebuild.
2056         * configure.ac: Use gmp as a library dependency when checking for
2057         mpfr.
2058
2059 2018-09-17  Pedro Alves  <palves@redhat.com>
2060
2061         * python/py-inferior.c (find_inferior_object): Delete.
2062
2063 2018-09-17  Simon Marchi  <simon.marchi@ericsson.com>
2064
2065         * compile/compile-cplus-types.c
2066         (compile_cplus_instance::enter_scope): Don't use new_scope after
2067         std::move.
2068
2069 2018-09-17  Tom Tromey  <tom@tromey.com>
2070
2071         * common/pathstuff.c (get_standard_cache_dir): Use
2072         ~/Library/Caches on macOS.
2073         * common/pathstuff.h (get_standard_cache_dir): Update comment.
2074
2075 2018-09-17  Simon Marchi  <simon.marchi@polymtl.ca>
2076
2077         PR python/23669
2078         * breakpoint.c (commands_cmd_element): New.
2079         (_initialize_breakpoint): Assign commands_cmd_element.
2080         * breakpoint.h (commands_cmd_element): New.
2081         * cli/cli-script.c (while_cmd_element, if_command,
2082         define_cmd_element): New.
2083         (command_name_equals): Remove.
2084         (process_next_line): Compare commands by pointer, not by name.
2085         (_initialize_cli_script): Assign the various cmd_list_element
2086         variables.
2087         * compile/compile.c (compile_cmd_element): New.
2088         (_initialize_compile): Assign compile_cmd_element.
2089         * compile/compile.h (compile_cmd_element): New.
2090         * guile/guile.c (guile_cmd_element): New.
2091         (install_gdb_commands): Assign guile_cmd_element.
2092         * guile/guile.h (guile_cmd_element): New.
2093         * python/python.c (python_cmd_element): New.
2094         (_initialize_python): Assign python_cmd_element.
2095         * python/python.h (python_cmd_element): New.
2096         * tracepoint.c (while_stepping_cmd_element): New.
2097         (_initialize_tracepoint): Assign while_stepping_cmd_element.
2098         * tracepoint.h (while_stepping_cmd_element): New.
2099
2100 2018-09-17  Tom Tromey  <tom@tromey.com>
2101
2102         * infrun.c (save_infcall_suspend_state): Return
2103         infcall_suspend_state_up.
2104         (save_infcall_control_state): Return infcall_control_state_up.
2105         * inferior.h (save_infcall_suspend_state)
2106         (save_infcall_control_state): Declare later.  Return unique
2107         pointers.
2108
2109 2018-09-17  Tom Tromey  <tom@tromey.com>
2110
2111         * infrun.c (struct stop_context): Declare constructor,
2112         destructor, "changed" method.
2113         (stop_context::stop_context): Rename from save_stop_context.
2114         (stop_context::~stop_context): Rename from
2115         release_stop_context_cleanup.
2116         (normal_stop): Update.
2117         (stop_context::changed): Rename from stop_context_changed.  Return
2118         bool.
2119
2120 2018-09-17  Tom Tromey  <tom@tromey.com>
2121
2122         * inferior.h (struct infcall_suspend_state_deleter): New.
2123         (infcall_suspend_state_up): New typedef.
2124         (struct infcall_control_state_deleter): New.
2125         (infcall_control_state_up): New typedef.
2126         (make_cleanup_restore_infcall_suspend_state)
2127         (make_cleanup_restore_infcall_control_state): Don't declare.
2128         * infcall.c (call_function_by_hand_dummy): Update.
2129         * infrun.c (do_restore_infcall_suspend_state_cleanup)
2130         (make_cleanup_restore_infcall_suspend_state): Remove.
2131         (do_restore_infcall_control_state_cleanup)
2132         (make_cleanup_restore_infcall_control_state): Remove.
2133
2134 2018-09-17  Tom Tromey  <tom@tromey.com>
2135
2136         * gdbthread.h (struct thread_control_state): Add initializer.
2137         (class thread_info) <control>: Remove initializer.
2138         * inferior.h (struct inferior_control_state): Add initializer.
2139         (class inferior) <control>: Remove initializer.
2140         (exit_inferior_1): Update.
2141         * infrun.c (struct infcall_control_state): Add constructors.
2142         (save_infcall_control_state): Use new.
2143         (restore_infcall_control_state, discard_infcall_control_state):
2144         Use delete.
2145
2146 2018-09-17  Tom Tromey  <tom@tromey.com>
2147
2148         * infrun.c (struct infcall_suspend_state) <registers>: Now a
2149         unique_ptr.
2150         <siginfo_data>: Now a unique_xmalloc_ptr.
2151         (save_infcall_suspend_state, restore_infcall_suspend_state)
2152         (discard_infcall_suspend_state)
2153         (get_infcall_suspend_state_regcache): Update.
2154
2155 2018-09-17  Tom Tromey  <tom@tromey.com>
2156
2157         * gdbthread.h (struct thread_suspend_state): Add initializers.
2158         (class thread_info) <suspend>: Remove initializer.
2159         * infrun.c (struct infcall_suspend_state): Add initializers.
2160         (save_infcall_suspend_state): Use new.
2161         (discard_infcall_suspend_state): Use delete.
2162
2163 2018-09-16  Tom Tromey  <tom@tromey.com>
2164
2165         * python/python-internal.h (CPYCHECKER_STEALS_REFERENCE_TO_ARG):
2166         Remove.
2167         * python/py-varobj.c (py_varobj_iter_ctor): Change pyiter to
2168         rvalue reference.  Remove CPYCHECKER_STEALS_REFERENCE_TO_ARG.
2169         (py_varobj_iter_new): Likewise.
2170         (py_varobj_get_iterator): Use gdbpy_ref.
2171
2172 2018-09-16  Tom Tromey  <tom@tromey.com>
2173
2174         * python/py-threadevent.c (py_get_event_thread): Simplify.
2175         * python/py-inferior.c (infpy_thread_from_thread_handle):
2176         Return immediately after calling thread_to_thread_object.  Use
2177         Py_RETURN_NONE.
2178         (thread_to_thread_object): Set the exception on a NULL return.
2179
2180 2018-09-16  Simon Marchi  <simon.marchi@polymtl.ca>
2181
2182         * Makefile.in (LIBGDB_OBS): Sort COMMON_OBS.
2183
2184 2018-09-16  Tom Tromey  <tom@tromey.com>
2185
2186         * python/python-internal.h (CPYCHECKER_RETURNS_BORROWED_REF):
2187         Remove.
2188
2189 2018-09-16  Tom Tromey  <tom@tromey.com>
2190
2191         * python/python-internal.h (thread_to_thread_object): Change
2192         return type.
2193         * python/py-inferior.c (thread_to_thread_object): Return a new
2194         reference.
2195         (infpy_thread_from_thread_handle): Update.
2196         * python/py-infthread.c (gdbpy_selected_thread): Update.
2197         * python/py-stopevent.c (create_stop_event_object): Update.
2198         * python/py-threadevent.c (py_get_event_thread): Return a new
2199         reference.
2200         (py_get_event_thread): Update.
2201         * python/py-event.h (py_get_event_thread): Change return type.
2202         * python/py-continueevent.c (create_continue_event_object):
2203         Update.
2204
2205 2018-09-16  Tom Tromey  <tom@tromey.com>
2206
2207         * python/py-progspace.c (pspy_get_objfiles): Update.
2208         * python/python-internal.h (objfile_to_objfile_object): Change
2209         return type.
2210         * python/py-newobjfileevent.c (create_new_objfile_event_object):
2211         Update.
2212         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
2213         Update.
2214         * python/python.c (gdbpy_get_current_objfile): Update.
2215         (gdbpy_objfiles): Update.
2216         * python/py-objfile.c (objfpy_get_owner, gdbpy_lookup_objfile):
2217         Update.
2218         (objfile_to_objfile_object): Return a new reference.
2219         * python/py-symtab.c (stpy_get_objfile): Update.
2220         * python/py-prettyprint.c (find_pretty_printer_from_objfiles):
2221         Update.
2222
2223 2018-09-16  Tom Tromey  <tom@tromey.com>
2224
2225         * python/py-inferior.c (infpy_get_progspace): Update.
2226         * python/python-internal.h (pspace_to_pspace_object): Change
2227         return type.
2228         * python/py-newobjfileevent.c
2229         (create_clear_objfiles_event_object): Update.
2230         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
2231         Update.
2232         * python/python.c (gdbpy_get_current_progspace): Update.
2233         (gdbpy_progspaces): Update.
2234         * python/py-progspace.c (pspace_to_pspace_object): Return a new
2235         reference.
2236         * python/py-objfile.c (objfpy_get_progspace): Update.
2237         * python/py-prettyprint.c (find_pretty_printer_from_progspace):
2238         Update.
2239
2240 2018-09-16  Tom Tromey  <tom@tromey.com>
2241
2242         * python/lib/gdb/__init__.py (current_progspace, objfiles)
2243         (solib_name, block_for_pc, find_pc_line): New functions.
2244         (execute_unwinders): Update.
2245         * python/py-block.c (gdbpy_block_for_pc): Remove.
2246         * python/py-inferior.c (infpy_get_progspace): New function.
2247         (inferior_object_getset) <progspace>: Add.
2248         * python/py-progspace.c (pspy_objfiles): Rewrite.
2249         (pspy_solib_name, pspy_block_for_pc)
2250         (pspy_find_pc_line, pspy_is_valid): New functions.
2251         (progspace_object_methods): Add entries for solib_name,
2252         block_for_pc, find_pc_line, is_valid.
2253         * python/python-internal.h (gdbpy_block_for_pc)
2254         (build_objfiles_list): Don't declare.
2255         * python/python.c: Don't include solib.h.
2256         (gdbpy_solib_name, gdbpy_find_pc_line)
2257         (gdbpy_get_current_progspace, build_objfiles_list)
2258         (gdbpy_objfiles): Remove.
2259         (GdbMethods) <current_progspace, objfiles, block_for_pc,
2260         solib_name, find_pc_line>: Remove entries.
2261
2262 2018-09-16  Tom Tromey  <tom@tromey.com>
2263
2264         * top.c (new_ui_command): Use GNU style for metasyntactic
2265         variables.
2266         * breakpoint.c (stopat_command): Use GNU style for metasyntactic
2267         variables.
2268         * maint.c (maintenance_translate_address): Remove "<>" around
2269         text.
2270         * interps.c (interpreter_exec_cmd): Use GNU style for
2271         metasyntactic variables.
2272         * nto-procfs.c (nto_procfs_target_info): Use GNU style for
2273         metasyntactic variables.
2274         * tracepoint.c (tfind_range_command): Use GNU style for
2275         metasyntactic variables.
2276         (tfind_outside_command): Likewise.
2277         (_initialize_tracepoint): Likewise.
2278         * remote.c (extended_remote_target::create_inferior): Use GNU
2279         style for metasyntactic variables.
2280         * sparc64-tdep.c (adi_examine_command): Use GNU style for
2281         metasyntactic variables.
2282         (adi_assign_command): Likewise.
2283
2284 2018-09-16  Tom Tromey  <tom@tromey.com>
2285
2286         * disasm.c (show_disassembler_options_sfunc): Use GNU style for
2287         metasyntactic variables.  Print message if no disassembler options
2288         are available.
2289
2290 2018-09-15  Tom Tromey  <tom@tromey.com>
2291
2292         * infcmd.c (get_inferior_args): Return const char *.
2293         * inferior.h (get_inferior_args): Return type now const.
2294         * linux-tdep.c (linux_fill_prpsinfo): Update.
2295         * procfs.c (procfs_target::make_corefile_notes): Update.
2296
2297 2018-09-07  Tom Tromey  <tom@tromey.com>
2298
2299         * python/python.c (execute_gdb_command): Call bpstat_do_actions
2300         inside the TRY.
2301
2302 2018-09-14  Sandra Loosemore  <sandra@codesourcery.com>
2303
2304         * nios2-tdep.c (nios2_type_align): New.
2305         (nios2_gdb_arch_init): Install type_align hook.
2306
2307 2018-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
2308
2309         * eval.c (fake_method::fake_method): Call xzalloc directly for a
2310         type that is neither object file owned, nor gdbarch owned.
2311         * gdbtypes.c (get_type_gdbarch): Add an assert that returned
2312         gdbarch is non-NULL.
2313         (alloc_type_instance): Allocate non-objfile owned types on the
2314         gdbarch obstack.
2315         (copy_type_recursive): Allocate TYPE_FIELDS and TYPE_RANGE_DATA
2316         using TYPE_ALLOC to ensure memory is allocated on the correct
2317         obstack.
2318         * gdbtypes.h (TYPE_ALLOC): Allocate space on either the objfile
2319         obstack, or the gdbarch obstack.
2320         (TYPE_ZALLOC): Rewrite using TYPE_ALLOC.
2321
2322 2018-09-14  Tom Tromey  <tom@tromey.com>
2323
2324         * infcall.c (call_function_by_hand_dummy): Remove unnecessary
2325         block.
2326
2327 2018-09-14  Tom Tromey  <tom@tromey.com>
2328
2329         * nat/fork-inferior.c (get_startup_shell): Remove "static".
2330
2331 2018-09-13  Tom Tromey  <tom@tromey.com>
2332
2333         * python/py-inferior.c (infpy_thread_from_thread_handle): Now
2334         static.
2335
2336 2018-09-13  Tom Tromey  <tom@tromey.com>
2337
2338         * exec.c (try_open_exec_file): Use std::string.
2339
2340 2018-09-13  Tom Tromey  <tom@tromey.com>
2341
2342         * utils.h (gdb_bfd_errmsg): Return std::string.
2343         * exec.c (exec_file_attach): Update.
2344         * compile/compile-object-load.c (compile_object_load): Update.
2345         * utils.c (gdb_bfd_errmsg): Return std::string.
2346
2347 2018-09-13  Tom Tromey  <tom@tromey.com>
2348
2349         * procfs.c (struct procinfo_deleter): New.
2350         (procinfo_up): New typedef.
2351         (do_destroy_procinfo_cleanup): Remove.
2352         (procfs_target::info_proc): Use procinfo_up.  Remove cleanups.
2353
2354 2018-09-13  Tom Tromey  <tom@tromey.com>
2355
2356         * source.c (add_path): Use gdb::unique_xmalloc_ptr.
2357
2358 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
2359 2018-09-13  Tom Tromey  <tom@tromey.com>
2360
2361         * python/py-progspace.c (PSPY_REQUIRE_VALID): New macro.
2362         (pspy_get_objfiles): New function.
2363         (progspace_object_methods): New.
2364         (pspace_object_type): Add tp_methods callback.
2365         * python/python-internal.h (build_objfiles_list): New
2366         declaration.
2367         * python/python.c (build_objfiles_list): New function.
2368         (gdbpy_objfiles): Implement using build_objfiles_list.
2369         * NEWS: Mention the Progspace.objfiles method.
2370
2371 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
2372
2373         * python/py-inferior.c (infpy_get_progspace): New function.
2374         (inferior_object_getset): Add progspace property.
2375         * NEWS: Mention the new property.
2376
2377 2018-09-13  Tom Tromey  <tom@tromey.com>
2378
2379         PR rust/23650:
2380         * rust-lang.c (rust_evaluate_subexp): Use field name, not "foo".
2381
2382 2018-09-13  Tom Tromey  <tom@tromey.com>
2383
2384         PR rust/23626:
2385         * rust-lang.c (rust_enum_variant): Now static.
2386         (rust_empty_enum_p): New function.
2387         (rust_print_enum, rust_evaluate_subexp, rust_print_struct_def):
2388         Handle empty enum.
2389
2390 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
2391
2392         * python/py-inferior.c (infpy_repr): New.
2393         (inferior_object_type): Register infpy_repr.
2394         * python/py-objfile.c (objfpy_repr): New.
2395         (objfile_object_type): Register objfpy_repr.
2396
2397 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
2398
2399         * fbsd-nat.c (fbsd_nat_target::info_proc): Remove unused variable.
2400
2401 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
2402
2403         * aarch64-fbsd-tdep.h (AARCH64_FBSD_SIZEOF_GREGSET): Fix comment
2404         typo.
2405
2406 2018-09-12  Sergio Durigan Junior  <sergiodj@redhat.com>
2407
2408         * common/common-utils.c: Don't include '<sys/stat.h>'.
2409         (is_regular_file): Move to...
2410         * common/filestuff.c (is_regular_file): ... here.
2411         * common/common-utils.h (is_regular_file): Move to...
2412         * common/filestuff.h (is_regular_file): ... here.
2413
2414 2018-09-12  Simon Marchi  <simon.marchi@ericsson.com>
2415
2416         * skip.c (debug_skip): New variable.
2417         (skiplist_entry::do_skip_file_p): Add debug output.
2418         (skiplist_entry::do_skip_gfile_p): Likewise.
2419         (skiplist_entry::skip_function_p): Likewise.
2420         (_initialize_step_skip): Create debug command.
2421         * NEWS: Mention set/show debug skip.
2422
2423 2018-09-11  Xavier Roirand  <roirand@adacore.com>
2424
2425         * darwin-nat.c (should_disable_startup_with_shell):
2426         New function.
2427         (darwin_nat_target::create_inferior): Add call.
2428
2429 2018-09-11  Xavier Roirand  <roirand@adacore.com>
2430
2431         * darwin-nat.h (struct darwin_thread_info) <gdb_port,
2432         inf_port, msg_state>: Initialize.
2433         (struct darwin_thread_info) <signaled, single_step>: Change
2434         type and initialize.
2435         (struct darwin_thread_info) <event>: Initialize.
2436
2437 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
2438
2439         PR gdb/23555
2440         PR gdb/23558
2441         * gnulib/import/m4/getcwd-path-max.m4: Add cross-compilation
2442         guesses.
2443
2444 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
2445
2446         Revert:
2447         2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
2448
2449         PR gdb/23555
2450         PR gdb/23558
2451         * gnulib/aclocal.m4: Regenerate.
2452         * gnulib/config.in: Regenerate.
2453         * gnulib/configure: Regenerate.
2454         * gnulib/import/Makefile.am: Update.
2455         * gnulib/import/Makefile.in: Update.
2456         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
2457         * gnulib/import/_Noreturn.h: ... this.
2458         * gnulib/import/alloca.in.h: Update.
2459         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
2460         * gnulib/import/arg-nonnull.h: ... this.
2461         * gnulib/import/assure.h: Update.
2462         * gnulib/import/at-func.c: Update.
2463         * gnulib/import/basename-lgpl.c: Update.
2464         * gnulib/import/extra/snippet/c++defs.h: Rename to...
2465         * gnulib/import/c++defs.h: ... this.
2466         * gnulib/import/canonicalize-lgpl.c: Update.
2467         * gnulib/import/cdefs.h: Update.
2468         * gnulib/import/chdir-long.c: Update.
2469         * gnulib/import/chdir-long.h: Update.
2470         * gnulib/import/cloexec.c: Update.
2471         * gnulib/import/cloexec.h: Update.
2472         * gnulib/import/close.c: Update.
2473         * gnulib/import/closedir.c: Update.
2474         * gnulib/import/config.charset: Update.
2475         * gnulib/import/dirent-private.h: Update.
2476         * gnulib/import/dirent.in.h: Update.
2477         * gnulib/import/dirfd.c: Update.
2478         * gnulib/import/dirname-lgpl.c: Update.
2479         * gnulib/import/dirname.h: Update.
2480         * gnulib/import/dosname.h: Update.
2481         * gnulib/import/dup-safer-flag.c: Update.
2482         * gnulib/import/dup-safer.c: Update.
2483         * gnulib/import/dup.c: Update.
2484         * gnulib/import/dup2.c: Update.
2485         * gnulib/import/errno.in.h: Update.
2486         * gnulib/import/error.c: Update.
2487         * gnulib/import/error.h: Update.
2488         * gnulib/import/exitfail.c: Update.
2489         * gnulib/import/exitfail.h: Update.
2490         * gnulib/import/extra/update-copyright: Update.
2491         * gnulib/import/fchdir.c: Update.
2492         * gnulib/import/fcntl.c: Update.
2493         * gnulib/import/fcntl.in.h: Update.
2494         * gnulib/import/fd-hook.c: Update.
2495         * gnulib/import/fd-hook.h: Update.
2496         * gnulib/import/fd-safer-flag.c: Update.
2497         * gnulib/import/fd-safer.c: Update.
2498         * gnulib/import/fdopendir.c: Update.
2499         * gnulib/import/filename.h: Update.
2500         * gnulib/import/filenamecat-lgpl.c: Update.
2501         * gnulib/import/filenamecat.h: Update.
2502         * gnulib/import/flexmember.h: Update.
2503         * gnulib/import/float+.h: Update.
2504         * gnulib/import/float.c: Update.
2505         * gnulib/import/float.in.h: Update.
2506         * gnulib/import/fnmatch.c: Update.
2507         * gnulib/import/fnmatch.in.h: Update.
2508         * gnulib/import/fnmatch_loop.c: Update.
2509         * gnulib/import/fpucw.h: Update.
2510         * gnulib/import/frexp.c: Update.
2511         * gnulib/import/frexpl.c: Update.
2512         * gnulib/import/fstat.c: Update.
2513         * gnulib/import/fstatat.c: Update.
2514         * gnulib/import/getcwd-lgpl.c: Update.
2515         * gnulib/import/getcwd.c: Update.
2516         * gnulib/import/getdtablesize.c: Update.
2517         * gnulib/import/getlogin_r.c: Update.
2518         * gnulib/import/getprogname.c: Update.
2519         * gnulib/import/getprogname.h: Update.
2520         * gnulib/import/gettext.h: Update.
2521         * gnulib/import/gettimeofday.c: Update.
2522         * gnulib/import/glob-libc.h: Update.
2523         * gnulib/import/glob.c: Update.
2524         * gnulib/import/glob.in.h: Update.
2525         * gnulib/import/glob_internal.h: Update.
2526         * gnulib/import/glob_pattern_p.c: Update.
2527         * gnulib/import/globfree.c: Update.
2528         * gnulib/import/hard-locale.c: Update.
2529         * gnulib/import/hard-locale.h: Update.
2530         * gnulib/import/intprops.h: Update.
2531         * gnulib/import/inttypes.in.h: Update.
2532         * gnulib/import/isnan.c: Update.
2533         * gnulib/import/isnand-nolibm.h: Update.
2534         * gnulib/import/isnand.c: Update.
2535         * gnulib/import/isnanl-nolibm.h: Update.
2536         * gnulib/import/isnanl.c: Update.
2537         * gnulib/import/itold.c: Update.
2538         * gnulib/import/libc-config.h: Update.
2539         * gnulib/import/limits.in.h: Update.
2540         * gnulib/import/localcharset.c: Update.
2541         * gnulib/import/localcharset.h: Update.
2542         * gnulib/import/localtime-buffer.c: Update.
2543         * gnulib/import/localtime-buffer.h: Update.
2544         * gnulib/import/lstat.c: Update.
2545         * gnulib/import/m4/00gnulib.m4: Update.
2546         * gnulib/import/m4/__inline.m4: Update.
2547         * gnulib/import/m4/absolute-header.m4: Update.
2548         * gnulib/import/m4/alloca.m4: Update.
2549         * gnulib/import/m4/builtin-expect.m4: Update.
2550         * gnulib/import/m4/canonicalize.m4: Update.
2551         * gnulib/import/m4/chdir-long.m4: Update.
2552         * gnulib/import/m4/close.m4: Update.
2553         * gnulib/import/m4/closedir.m4: Update.
2554         * gnulib/import/m4/configmake.m4: Update.
2555         * gnulib/import/m4/d-ino.m4: Update.
2556         * gnulib/import/m4/d-type.m4: Update.
2557         * gnulib/import/m4/dirent_h.m4: Update.
2558         * gnulib/import/m4/dirfd.m4: Update.
2559         * gnulib/import/m4/dirname.m4: Update.
2560         * gnulib/import/m4/double-slash-root.m4: Update.
2561         * gnulib/import/m4/dup.m4: Update.
2562         * gnulib/import/m4/dup2.m4: Update.
2563         * gnulib/import/m4/eealloc.m4: Update.
2564         * gnulib/import/m4/environ.m4: Update.
2565         * gnulib/import/m4/errno_h.m4: Update.
2566         * gnulib/import/m4/error.m4: Update.
2567         * gnulib/import/m4/exponentd.m4: Update.
2568         * gnulib/import/m4/exponentl.m4: Update.
2569         * gnulib/import/m4/extensions.m4: Update.
2570         * gnulib/import/m4/extern-inline.m4: Update.
2571         * gnulib/import/m4/fchdir.m4: Update.
2572         * gnulib/import/m4/fcntl-o.m4: Update.
2573         * gnulib/import/m4/fcntl.m4: Update.
2574         * gnulib/import/m4/fcntl_h.m4: Update.
2575         * gnulib/import/m4/fdopendir.m4: Update.
2576         * gnulib/import/m4/filenamecat.m4: Update.
2577         * gnulib/import/m4/flexmember.m4: Update.
2578         * gnulib/import/m4/float_h.m4: Update.
2579         * gnulib/import/m4/fnmatch.m4: Update.
2580         * gnulib/import/m4/fnmatch_h.m4: Update.
2581         * gnulib/import/m4/fpieee.m4: Update.
2582         * gnulib/import/m4/frexp.m4: Update.
2583         * gnulib/import/m4/frexpl.m4: Update.
2584         * gnulib/import/m4/fstat.m4: Update.
2585         * gnulib/import/m4/fstatat.m4: Update.
2586         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
2587         * gnulib/import/m4/getcwd-path-max.m4: Update.
2588         * gnulib/import/m4/getcwd.m4: Update.
2589         * gnulib/import/m4/getdtablesize.m4: Update.
2590         * gnulib/import/m4/getlogin.m4: Update.
2591         * gnulib/import/m4/getlogin_r.m4: Update.
2592         * gnulib/import/m4/getpagesize.m4: Update.
2593         * gnulib/import/m4/getprogname.m4: Update.
2594         * gnulib/import/m4/gettimeofday.m4: Update.
2595         * gnulib/import/m4/glibc21.m4: Update.
2596         * gnulib/import/m4/glob.m4: Update.
2597         * gnulib/import/m4/glob_h.m4: Update.
2598         * gnulib/import/m4/gnulib-cache.m4: Update.
2599         * gnulib/import/m4/gnulib-common.m4: Update.
2600         * gnulib/import/m4/gnulib-comp.m4: Update.
2601         * gnulib/import/m4/gnulib-tool.m4: Update.
2602         * gnulib/import/m4/hard-locale.m4: Update.
2603         * gnulib/import/m4/include_next.m4: Update.
2604         * gnulib/import/m4/inttypes-pri.m4: Update.
2605         * gnulib/import/m4/inttypes.m4: Update.
2606         * gnulib/import/m4/isnand.m4: Update.
2607         * gnulib/import/m4/isnanl.m4: Update.
2608         * gnulib/import/m4/largefile.m4: Update.
2609         * gnulib/import/m4/limits-h.m4: Update.
2610         * gnulib/import/m4/localcharset.m4: Update.
2611         * gnulib/import/m4/locale-fr.m4: Update.
2612         * gnulib/import/m4/locale-ja.m4: Update.
2613         * gnulib/import/m4/locale-zh.m4: Update.
2614         * gnulib/import/m4/localtime-buffer.m4: Update.
2615         * gnulib/import/m4/longlong.m4: Update.
2616         * gnulib/import/m4/lstat.m4: Update.
2617         * gnulib/import/m4/malloc.m4: Update.
2618         * gnulib/import/m4/malloca.m4: Update.
2619         * gnulib/import/m4/math_h.m4: Update.
2620         * gnulib/import/m4/mbrtowc.m4: Update.
2621         * gnulib/import/m4/mbsinit.m4: Update.
2622         * gnulib/import/m4/mbsrtowcs.m4: Update.
2623         * gnulib/import/m4/mbstate_t.m4: Update.
2624         * gnulib/import/m4/memchr.m4: Update.
2625         * gnulib/import/m4/memmem.m4: Update.
2626         * gnulib/import/m4/mempcpy.m4: Update.
2627         * gnulib/import/m4/memrchr.m4: Update.
2628         * gnulib/import/m4/mkdir.m4: Update.
2629         * gnulib/import/m4/mkstemp.m4: Update.
2630         * gnulib/import/m4/mmap-anon.m4: Update.
2631         * gnulib/import/m4/mode_t.m4: Update.
2632         * gnulib/import/m4/msvc-inval.m4: Update.
2633         * gnulib/import/m4/msvc-nothrow.m4: Update.
2634         * gnulib/import/m4/multiarch.m4: Update.
2635         * gnulib/import/m4/nocrash.m4: Update.
2636         * gnulib/import/m4/off_t.m4: Update.
2637         * gnulib/import/m4/onceonly.m4: Update.
2638         * gnulib/import/m4/open-cloexec.m4: Update.
2639         * gnulib/import/m4/open.m4: Update.
2640         * gnulib/import/m4/openat.m4: Update.
2641         * gnulib/import/m4/opendir.m4: Update.
2642         * gnulib/import/m4/pathmax.m4: Update.
2643         * gnulib/import/m4/rawmemchr.m4: Update.
2644         * gnulib/import/m4/readdir.m4: Update.
2645         * gnulib/import/m4/readlink.m4: Update.
2646         * gnulib/import/m4/realloc.m4: Update.
2647         * gnulib/import/m4/rename.m4: Update.
2648         * gnulib/import/m4/rewinddir.m4: Update.
2649         * gnulib/import/m4/rmdir.m4: Update.
2650         * gnulib/import/m4/save-cwd.m4: Update.
2651         * gnulib/import/m4/secure_getenv.m4: Update.
2652         * gnulib/import/m4/setenv.m4: Update.
2653         * gnulib/import/m4/signal_h.m4: Update.
2654         * gnulib/import/m4/ssize_t.m4: Update.
2655         * gnulib/import/m4/stat-time.m4: Update.
2656         * gnulib/import/m4/stat.m4: Update.
2657         * gnulib/import/m4/std-gnu11.m4: Update.
2658         * gnulib/import/m4/stdbool.m4: Update.
2659         * gnulib/import/m4/stddef_h.m4: Update.
2660         * gnulib/import/m4/stdint.m4: Update.
2661         * gnulib/import/m4/stdio_h.m4: Update.
2662         * gnulib/import/m4/stdlib_h.m4: Update.
2663         * gnulib/import/m4/strchrnul.m4: Update.
2664         * gnulib/import/m4/strdup.m4: Update.
2665         * gnulib/import/m4/strerror.m4: Update.
2666         * gnulib/import/m4/string_h.m4: Update.
2667         * gnulib/import/m4/strstr.m4: Update.
2668         * gnulib/import/m4/strtok_r.m4: Update.
2669         * gnulib/import/m4/sys_socket_h.m4: Update.
2670         * gnulib/import/m4/sys_stat_h.m4: Update.
2671         * gnulib/import/m4/sys_time_h.m4: Update.
2672         * gnulib/import/m4/sys_types_h.m4: Update.
2673         * gnulib/import/m4/tempname.m4: Update.
2674         * gnulib/import/m4/time_h.m4: Update.
2675         * gnulib/import/m4/unistd-safer.m4: Update.
2676         * gnulib/import/m4/unistd_h.m4: Update.
2677         * gnulib/import/m4/warn-on-use.m4: Update.
2678         * gnulib/import/m4/wchar_h.m4: Update.
2679         * gnulib/import/m4/wchar_t.m4: Update.
2680         * gnulib/import/m4/wctype_h.m4: Update.
2681         * gnulib/import/m4/wint_t.m4: Update.
2682         * gnulib/import/malloc.c: Update.
2683         * gnulib/import/malloc/scratch_buffer.h: Update.
2684         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
2685         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
2686         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
2687         * gnulib/import/malloca.c: Update.
2688         * gnulib/import/malloca.h: Update.
2689         * gnulib/import/malloca.valgrind: Update.
2690         * gnulib/import/math.in.h: Update.
2691         * gnulib/import/mbrtowc.c: Update.
2692         * gnulib/import/mbsinit.c: Update.
2693         * gnulib/import/mbsrtowcs-impl.h: Update.
2694         * gnulib/import/mbsrtowcs-state.c: Update.
2695         * gnulib/import/mbsrtowcs.c: Update.
2696         * gnulib/import/memchr.c: Update.
2697         * gnulib/import/memmem.c: Update.
2698         * gnulib/import/mempcpy.c: Update.
2699         * gnulib/import/memrchr.c: Update.
2700         * gnulib/import/mkdir.c: Update.
2701         * gnulib/import/mkstemp.c: Update.
2702         * gnulib/import/msvc-inval.c: Update.
2703         * gnulib/import/msvc-inval.h: Update.
2704         * gnulib/import/msvc-nothrow.c: Update.
2705         * gnulib/import/msvc-nothrow.h: Update.
2706         * gnulib/import/open.c: Update.
2707         * gnulib/import/openat-die.c: Update.
2708         * gnulib/import/openat-priv.h: Update.
2709         * gnulib/import/openat-proc.c: Update.
2710         * gnulib/import/openat.c: Update.
2711         * gnulib/import/openat.h: Update.
2712         * gnulib/import/opendir.c: Update.
2713         * gnulib/import/pathmax.h: Update.
2714         * gnulib/import/pipe-safer.c: Update.
2715         * gnulib/import/rawmemchr.c: Update.
2716         * gnulib/import/readdir.c: Update.
2717         * gnulib/import/readlink.c: Update.
2718         * gnulib/import/realloc.c: Update.
2719         * gnulib/import/ref-add.sin: Update.
2720         * gnulib/import/ref-del.sin: Update.
2721         * gnulib/import/rename.c: Update.
2722         * gnulib/import/rewinddir.c: Update.
2723         * gnulib/import/rmdir.c: Update.
2724         * gnulib/import/same-inode.h: Update.
2725         * gnulib/import/save-cwd.c: Update.
2726         * gnulib/import/save-cwd.h: Update.
2727         * gnulib/import/scratch_buffer.h: Update.
2728         * gnulib/import/secure_getenv.c: Update.
2729         * gnulib/import/setenv.c: Update.
2730         * gnulib/import/signal.in.h: Update.
2731         * gnulib/import/stat-time.c: Update.
2732         * gnulib/import/stat-time.h: Update.
2733         * gnulib/import/stat-w32.c: Update.
2734         * gnulib/import/stat-w32.h: Update.
2735         * gnulib/import/stat.c: Update.
2736         * gnulib/import/stdbool.in.h: Update.
2737         * gnulib/import/stddef.in.h: Update.
2738         * gnulib/import/stdint.in.h: Update.
2739         * gnulib/import/stdio.in.h: Update.
2740         * gnulib/import/stdlib.in.h: Update.
2741         * gnulib/import/str-two-way.h: Update.
2742         * gnulib/import/strchrnul.c: Update.
2743         * gnulib/import/strdup.c: Update.
2744         * gnulib/import/streq.h: Update.
2745         * gnulib/import/strerror-override.c: Update.
2746         * gnulib/import/strerror-override.h: Update.
2747         * gnulib/import/strerror.c: Update.
2748         * gnulib/import/string.in.h: Update.
2749         * gnulib/import/stripslash.c: Update.
2750         * gnulib/import/strnlen1.c: Update.
2751         * gnulib/import/strnlen1.h: Update.
2752         * gnulib/import/strstr.c: Update.
2753         * gnulib/import/strtok_r.c: Update.
2754         * gnulib/import/sys_stat.in.h: Update.
2755         * gnulib/import/sys_time.in.h: Update.
2756         * gnulib/import/sys_types.in.h: Update.
2757         * gnulib/import/tempname.c: Update.
2758         * gnulib/import/tempname.h: Update.
2759         * gnulib/import/time.in.h: Update.
2760         * gnulib/import/unistd--.h: Update.
2761         * gnulib/import/unistd-safer.h: Update.
2762         * gnulib/import/unistd.in.h: Update.
2763         * gnulib/import/unsetenv.c: Update.
2764         * gnulib/import/verify.h: Update.
2765         * gnulib/import/extra/snippet/warn-on-use.h: Update.
2766         * gnulib/import/wchar.in.h: Update.
2767         * gnulib/import/wctype.in.h: Update.
2768         * gnulib/import/xalloc-oversized.h: Update.
2769         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
2770         "53e2c179f26a890fa6685af4b6c1397ee370433b".
2771
2772 2018-09-10  Simon Marchi  <simon.marchi@ericsson.com>
2773
2774         * record-btrace.c (get_thread_current_frame): Remove
2775         old_inferior_ptid.
2776
2777 2018-09-10  Jerome Guitton  <guitton@adacore.com>
2778
2779         * ada-lang.c (ada_value_struct_elt): Call ada_to_fixed_type
2780         with check_tag to 1 if and only if the type is tagged and the
2781         component being searched cannot been found in the current
2782         view. Otherwise, always call ada_to_fixed_type with
2783         check_tag to 0.
2784
2785 2018-09-10  Xavier Roirand  <roirand@adacore.com>
2786
2787         * ada-lang.c (ada_is_access_to_unconstrained_array): Remove static
2788         declaration.
2789         * ada-lang.h: add ada_is_access_to_unconstrained_array prototype.
2790         * ada-varobj.c (ada_varobj_get_number_of_children,
2791         ada_varobj_describe_child, ada_value_is_changeable_p): Cleanup code.
2792
2793 2018-09-10  Xavier Roirand  <roirand@adacore.com>
2794
2795         * ada-valprint.c (ada_value_print): Use type instead of
2796         enclosing type.
2797
2798 2018-09-10  Xavier Roirand  <roirand@adacore.com>
2799
2800         * ada-lang.c (ada_value_subscript): Handle case when parameter is
2801         an array of access to unconstrained array.
2802
2803 2018-09-10  Xavier Roirand  <roirand@adacore.com>
2804
2805         * ada-lang.c (ada_is_access_to_unconstrained_array): New function.
2806         (ada_check_typedef): Use it.
2807
2808 2018-09-10  Xavier Roirand  <roirand@adacore.com>
2809
2810         * ada-varobj.c (ada_varobj_describe_struct_child)
2811         (ada_varobj_describe_child): Handle union case like struct one.
2812
2813 2018-09-10  Tom Tromey  <tom@tromey.com>
2814
2815         PR python/18380:
2816         * python/python.c (_initialize_python): Make example in "python"
2817         help work in Python 3.
2818
2819 2018-09-10  Eli Zaretskii  <eliz@gnu.org>
2820
2821         * Makefile.in (transformed_name): Use INSTALL_SCRIPT instead of
2822         INSTALL_PROGRAM to install gdb-add-index.sh.  Don't append
2823         $(EXEEXT) to the script, as it is not a program.
2824
2825 2018-09-09  Simon Marchi  <simon.marchi@ericsson.com>
2826
2827         * python/py-prettyprint.c (pretty_print_one_value): Return
2828         gdbpy_ref<>.
2829         (print_string_repr): Adjust.
2830         (apply_varobj_pretty_printer): Return gdbpy_ref<>.
2831         * python/python-internal.h (apply_varobj_pretty_printer): Return
2832         gdbpy_ref<>.
2833         * varobj.c (varobj_value_get_print_value): Adjust.
2834
2835 2018-09-08  Tom Tromey  <tom@tromey.com>
2836
2837         PR python/16047:
2838         * python/py-prettyprint.c (pretty_print_one_value): Check for
2839         to_string method.
2840
2841 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2842
2843         * ada-lang.c (resolve_subexp): Pass correct OPLEN in call to
2844         replace_operator_with_call.
2845
2846 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2847
2848         * ada-lang.c (ada_value_cast): Remove unnecessary parentheses.
2849
2850 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2851
2852         * ada-typeprint.c (print_range): Print the bounds using TYPE
2853         rather than its TYPE_TARGET_TYPE.
2854
2855 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2856
2857         * ada-lang.c (ada_to_fixed_value): Minor reformatting in
2858         call to ada_to_fixed_value_create.
2859
2860 2018-09-08  Jerome Guitton  <guitton@adacore.com>
2861
2862         * ada-lang.c (ada_decode): strip dot prefix in symbol name.
2863
2864 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2865
2866         * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
2867         by calls to error.
2868
2869 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2870
2871         * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
2872         Move update of loop variable "fi".
2873
2874 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2875
2876         * ada-lang.c (value_assign_to_component): In the case of
2877         big-endian targets, extract the bits of the given VAL
2878         using an src_offset of zero if container is not a scalar.
2879
2880 2018-09-06  Simon Ser  <contact@emersion.fr>
2881
2882         PR gdb/23105
2883         * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
2884         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
2885         * fbsd-tdep.c (fbsd_make_note_desc): New.
2886         (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
2887         NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
2888         * target.h (enum target_object) Add FreeBSD-specific
2889         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
2890
2891 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
2892
2893         * compile/compile-c.h (generate_c_for_variable_locations):
2894         Change reference to pointer.
2895         * compile/compile-c-support.c (compile_program) <compute>:
2896         Likewise.
2897         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
2898         (generate_c_for_for_one_variable): Likewise
2899         (generate_c_for_variable_locations): Likewise
2900         * compile/compile-c-types.c (compile_c_instance::convert_type):
2901         Likewise
2902         * compile/compile-cplus-symbols.c (convert_one_symbol):
2903         std::move the scope passed to enter_scope.
2904         * compile/compile-cplus-types.c
2905         (compile_cplus_instance::enter_scope): Make parameter
2906         rvalue-reference.
2907         (compile_cplus_instance::new_scope): Change reference to
2908         pointer.
2909         (compile_cplus_instance::convert_type): Likewise
2910         (compile_cplus_convert_typedef): std::move the scope passed to
2911         enter_scope.
2912         (compile_cplus_convert_struct_or_union): Likewise.
2913         (compile_cplus_convert_enum): Likewise.
2914         (compile_cplus_convert_namespace): Likewise.
2915         * compile/compile-cplus.h (compile_cplus_instance)
2916         <enter_scope>: Make parameter rvalue-reference.
2917         * compile/compile-internal.h (compile_instance)
2918         <get_cached_type>: Likewise
2919         * compile/compile-loc2c.c (push): Likewise
2920         (pushf): Likewise
2921         (unary): Likewise
2922         (binary): Likewise
2923         (print_label): Likewise
2924         (pushf_register_address): Likewise
2925         (pushf_register): Likewise
2926         (do_compile_dwarf_expr_to_c): Likewise
2927         (compile_dwarf_expr_to_c): Likewise
2928         (compile_dwarf_bounds_to_c): Likewise
2929         * compile/compile.c (compile_instance::get_cached_type):
2930         Likewise
2931         * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
2932         (compile_dwarf_bounds_to_c): Likewise
2933         * dwarf2loc.c (locexpr_generate_c_location): Likewise.
2934         (dwarf2_compile_property_to_c): Likewise
2935         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
2936         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
2937         Likewise
2938
2939 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
2940
2941         * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
2942         * tui/tui-data.c (init_content_element): Don't initialize it.
2943
2944 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
2945
2946         * tui/tui-data.h (struct tui_win_info)
2947         <detail::opaque>: Remove.
2948         * tui/tui-data.c (init_win_info): Remove assignment.
2949
2950 2018-09-05  Tom Tromey  <tom@tromey.com>
2951
2952         * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
2953         -Wformat-nonliteral.
2954         * target-float.c (host_float_ops<T>::to_string)
2955         (host_float_ops<T>::from_string): Use
2956         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
2957         * configure: Rebuild.
2958
2959 2018-09-05  Simon Marchi  <simon.marchi@ericsson.com>
2960
2961         * printcmd.c (printf_c_string): Use
2962         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
2963         (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
2964
2965 2018-09-05  Tom Tromey  <tom@tromey.com>
2966
2967         * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
2968
2969 2018-09-05  Tom de Vries  <tdevries@suse.de>
2970
2971         * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
2972         with resolve_abstract_p == true.
2973         (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
2974         defaulting to false. Propagate resolve_abstract_p to
2975         dwarf2_fetch_die_loc_sect_off.
2976         * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
2977         parameter, defaulting to false.
2978         * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
2979         (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
2980         parameter.
2981         * dwarf2read.h (struct die_info): Forward-declare.
2982         (die_info_ptr): New typedef.
2983         (struct dwarf2_per_objfile): Add abstract_to_concrete field.
2984
2985 2018-09-05  Joel Brobecker  <brobecker@adacore.com>
2986
2987         GDB 8.2 released.
2988
2989 2018-09-04  Sergio Durigan Junior  <sergiodj@redhat.com>
2990             Pedro Alves  <palves@redhat.com>
2991
2992         * gnulib/Makefile.in (aclocal_m4_deps): Move to
2993         "aclocal-m4-deps.mk".  Include file here.
2994         $(srcdir)/aclocal.m4: Add "configure.ac".
2995         * gnulib/aclocal-m4-deps.mk: New file.
2996         * gnulib/update-gnulib.sh: Automatically update
2997         "aclocal-m4-deps.mk".
2998
2999 2018-09-04  Tom Tromey  <tom@tromey.com>
3000
3001         * configure: Rebuild.
3002         * configure.ac: Remove multi-ice code.
3003
3004 2018-09-04  Tom Tromey  <tom@tromey.com>
3005
3006         * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
3007         (ada-exp.o): Update.
3008
3009 2018-09-04  Tom Tromey  <tom@tromey.com>
3010
3011         * Makefile.in (printcmd.o, target-float.o): Remove.
3012         (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
3013
3014 2018-09-04  Tom Tromey  <tom@tromey.com>
3015
3016         * gnulib/Makefile.in: Remove obsolete comment.
3017         * Makefile.in: Remove obsolete comment.
3018
3019 2018-09-04  Andrew Burgess  <andrew.burgess@embecosm.com>
3020
3021         * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
3022         line with '+'.
3023
3024 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
3025
3026         * riscv-tdep.c: Add 'prologue-value.h' include.
3027         (struct riscv_unwind_cache): New struct.
3028         (riscv_debug_unwinder): New global.
3029         (riscv_scan_prologue): Update arguments, capture register details
3030         from prologue scan.
3031         (riscv_skip_prologue): Reformat arguments line, move end of
3032         prologue calculation into riscv_scan_prologue.
3033         (riscv_frame_cache): Update return type, create
3034         riscv_unwind_cache, scan the prologue, and fill in remaining cache
3035         details.
3036         (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
3037         (riscv_frame_prev_register): Use the trad_frame within the
3038         riscv_unwind_cache.
3039         (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
3040         flag.
3041
3042 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
3043
3044         * trad-frame.h (trad_frame_set_realreg): Declare.
3045         (trad_frame_set_addr): Declare.
3046         * trad-frame.c (trad_frame_set_realreg): Define new function.
3047         (trad_frame_set_addr): Define new function.
3048         (trad_frame_set_reg_realreg): Use new function.
3049         (trad_frame_set_reg_addr): Use new function.
3050
3051 2018-09-01  Keith Seitz  <keiths@redhat.com>
3052
3053         * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
3054         pulongest instead of "%lld".
3055         * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
3056         ATTRIBUTE_UNUSED.
3057
3058 2018-08-31  Tom Tromey  <tom@tromey.com>
3059
3060         * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
3061         variant part type.
3062
3063 2018-08-31  Pedro Alves  <palves@redhat.com>
3064
3065         * gdbarch.h: Regenerate.
3066
3067 2018-08-31  Pedro Alves  <palves@redhat.com>
3068
3069         * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
3070         * target.h (Hardware watchpoint interfaces): Describe
3071         continuable/steppable/non-steppable watchpoints.
3072         * gdbarch.h, gdbarch.c: Regenerate.
3073
3074 2018-08-31  Pedro Alves  <palves@redhat.com>
3075
3076         * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
3077         Delete.
3078         * s390-linux-nat.c
3079         (s390_linux_nat_target::have_continuable_watchpoint): Delete.
3080         * target.h (target_ops::have_continuable_watchpoint): Delete.
3081         (target_have_continuable_watchpoint): Delete.
3082         * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
3083         * target-delegates.c: Regenerate.
3084
3085 2018-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
3086
3087         * gnulib/Makefile.in (aclocal_m4_deps): Update according to
3088         the files present in "gnulib/import/m4/".
3089
3090 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
3091
3092         * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
3093         c.sw, c.swsp, and c.sdsp.
3094
3095 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
3096
3097         * riscv-tdep.c (struct riscv_inferior_data): Delete.
3098         (riscv_read_misa_reg): Don't cache value read into inferior data.
3099         (riscv_new_inferior_data): Delete.
3100         (riscv_inferior_data_cleanup): Delete.
3101         (riscv_inferior_data): Delete.
3102         (riscv_invalidate_inferior_data): Delete.
3103         (_initialize_riscv_tdep): Remove initialisation of inferior data.
3104
3105 2018-08-30  Simon Marchi  <simon.marchi@ericsson.com>
3106
3107         * compile/compile-cplus-types.c
3108         (compile_cplus_instance::leave_scope): Take the address of scope
3109         object.
3110         (compile_cplus_instance::convert_qualified_base): Compare quals
3111         to 0.
3112
3113 2018-08-30  Keith Seitz  <keiths@redhat.com>
3114
3115         * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
3116         Use "%s" and host_address_to_string instead of "%p" in printf.
3117
3118 2018-08-29  Keith Seitz  <keiths@redhat.com>
3119
3120         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
3121         and compile-cplus-types.c.
3122         (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
3123         * c-lang.c (cplus_language_defn): Set C++ compile functions.
3124         * c-lang.h (cplus_get_compile_context, cplus_compute_program):
3125         Declare.
3126         * compile/compile-c-support.c: Include compile-cplus.h.
3127         (load_libcompile): Templatize.
3128         (get_compile_context): "New" function.
3129         (c_get_compile_context): Use get_compile_context.
3130         (cplus_get_compile_context): New function.
3131         (cplus_push_user_expression, cplus_pop_user_expression)
3132         (cplus_add_code_header, cplus_add_input, cplus_compile_program)
3133         (cplus_compute_program): Define new structs/functions.
3134         * compile/compile-cplus-symmbols.c: New file.
3135         * compile/compile-cplus-types.c: New file.
3136         * compile/compile-cplus.h: New file.
3137         * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
3138         Declare.
3139         * compile/compile-object-load.c (get_out_value_type): Use
3140         strncmp_iw when comparing symbol names.
3141         (compile_object_load): Add mst_bss and mst_data.
3142         * compile/compile.c (_initialize_compile): Remove
3143         -Wno-implicit-function-declaration from `compile_args'.
3144         * compile/gcc-cp-plugin.h: New file.
3145         * NEWS: Mention C++ compile support and new debug options.
3146
3147 2018-08-29  Keith Seitz  <keiths@redhat.com>
3148
3149         * linespec.c (collect_info::add_symbol): Make virtual.
3150         (struct symbol_searcher_collect_info): New struct.
3151         (symbol_searcher::find_all_symbols): New method.
3152         * symtab.h (class symbol_searcher): New class.
3153
3154 2018-08-29  Keith Seitz  <keiths@redhat.com>
3155
3156         * linespec.c (struct linespec) <function_symbols, label_symbols>:
3157         Change to vector of block_symbol.  Update all users.
3158         (struct collect_info) <symbols>: Likewise.
3159         (collect_info::add_symbol): Take block_symbol as argument.
3160         Update all callers.
3161         (decode_compound_collector) <m_symbols>: Change type to vector
3162         of block_symbol.  Update all users.
3163         (decode_compound_collector::operator ()): Change parameter type
3164         to block_symbol.
3165         (find_method, find_function_symbols, find_linespec_symbols)
3166         (find_label_symbols_in_block, find_label_symbols): Change symbol
3167         vectors to block_symbol vectors.
3168         * symtab.h (symbol_found_callback_ftype): Change parameter type to
3169         block_symbol.
3170
3171 2018-08-29  Keith Seitz  <keiths@redhat.com>
3172
3173         * linespec.c (symbolp): Remove typedef and VEC definitions.
3174         (bound_minimal_symbol_d): Likewise.
3175
3176 2018-08-29  Keith Seitz  <keiths@redhat.com>
3177
3178         * linespec.c (decode_compound_collector::decode_compound_collector):
3179         Remove initialization for `m_symtabs'.
3180         (decode_compound_collector::release_symbols): Change return type
3181         to std::vector.  Update all callers.
3182         (class decode_compound_collector) <m_symbols>: Change type to
3183         std::vector.
3184         (lookup_prefix_sym): Change return type to std::vector.  Update all
3185         callers.
3186         (compare_symbols): Remove.
3187         (std_compare_symbols): Rename to `compare_symbols'.
3188         (find_method): Change `sym_classes' parameter to std::vector.
3189         Update all callers.  Use std::sort to sort sym_classes.
3190         (find_linespec_symbols): Remove cleanup.
3191
3192 2018-08-29  Keith Seitz  <keiths@redhat.com>
3193
3194         * linespec.c (struct linespec) <minimal_symbols>: Change type to
3195         std::vector.  Update all users.
3196         (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
3197         (struct collect_info) <minimal_symbols>: Likewise.
3198         (compare_msymbols): Return bool.  Change parameters to const
3199         bound_minimal_symbol references.
3200         (find_method, find_function_symbols, find_linespec_symbols): Change
3201         `minsyms' parameter to std::vector.  Update all callers.
3202
3203 2018-08-29  Keith Seitz  <keiths@redhat.com>
3204
3205         * linespec.c (struct linespec) <label_symbols>: Change type to
3206         std::vector.  Update all users.
3207         (find_label_symbols_in_block): Change `result' parameter to
3208         std::vector.  Update all callers.
3209         (find_label_symbols): Return std::vector.  Update all callers.
3210
3211 2018-08-29  Keith Seitz  <keiths@redhat.com>
3212
3213         * linespec.c (struct linespec) <function_symbols>: Change type to
3214         std::vector.  Update all users.
3215         (struct collect_info) <function_symbols>: Likewise.
3216         (convert_linespec_to_sals): Use std::sort to sort function_symbols.
3217         (std_compare_symbols): New function.
3218         (find_method, find_function_symbols, find_linespec_symbols)
3219         (find_label_symbols_in_block): Change `symbols' parameter to
3220         std::vector.  Update all callers.
3221         (find_label_symbols): Likewise for `function_symbols' and
3222         `label_funcs_ret'.
3223
3224 2018-08-29  Keith Seitz  <keiths@redhat.com>
3225
3226         * linespec.c (symtab_vector_up): Define.
3227         (struct linespec) <file_symtabs>: Change type to std::vector *.
3228         Update all uses.
3229         (struct collect_info) <file_symtabs>: Likewise.
3230         (collect_symtabs_from_filename): Return symtab_vector_up.
3231         Update all callers.
3232         (decode_objc): Remove cleanup.
3233         (symtab_collector::symtab_collector): Initialize `m_symtabs'.
3234         (symtab_collector::release_symtabs): Return symtab_vector_up.
3235         Update all callers.
3236         (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
3237         Update all users.
3238         (collect_symtabs_from_filename, symtabs_from_filename): Return
3239         symtab_vector_up.  Update all callers.
3240
3241 2018-08-29  Tom Tromey  <tom@tromey.com>
3242
3243         * csky-tdep.c (csky_analyze_prologue): Use
3244         core_addr_to_string_nz.
3245
3246 2018-08-29  Tom Tromey  <tom@tromey.com>
3247
3248         * windows-nat.c (struct xlate_exception) <them>: Change type to
3249         DWORD.
3250         (xlate): Fix formatting.  Remove last entry.
3251         (struct xlate_exception, xlate): Comment out.
3252         (windows_nat_target::resume): Use ranged for.
3253
3254 2018-08-29  Jim Wilson  <jimw@sifive.com>
3255
3256         * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
3257         (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
3258         of NT_PRFPREG.
3259         (riscv_linux_nat_target::store_registers): Likewise.
3260
3261 2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
3262
3263         PR gdb/23555
3264         PR gdb/23558
3265         * gnulib/aclocal.m4: Regenerate.
3266         * gnulib/config.in: Regenerate.
3267         * gnulib/configure: Regenerate.
3268         * gnulib/import/Makefile.am: Update.
3269         * gnulib/import/Makefile.in: Update.
3270         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
3271         * gnulib/import/_Noreturn.h: ... this.
3272         * gnulib/import/alloca.in.h: Update.
3273         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
3274         * gnulib/import/arg-nonnull.h: ... this.
3275         * gnulib/import/assure.h: Update.
3276         * gnulib/import/at-func.c: Update.
3277         * gnulib/import/basename-lgpl.c: Update.
3278         * gnulib/import/extra/snippet/c++defs.h: Rename to...
3279         * gnulib/import/c++defs.h: ... this.
3280         * gnulib/import/canonicalize-lgpl.c: Update.
3281         * gnulib/import/cdefs.h: Update.
3282         * gnulib/import/chdir-long.c: Update.
3283         * gnulib/import/chdir-long.h: Update.
3284         * gnulib/import/cloexec.c: Update.
3285         * gnulib/import/cloexec.h: Update.
3286         * gnulib/import/close.c: Update.
3287         * gnulib/import/closedir.c: Update.
3288         * gnulib/import/config.charset: Update.
3289         * gnulib/import/dirent-private.h: Update.
3290         * gnulib/import/dirent.in.h: Update.
3291         * gnulib/import/dirfd.c: Update.
3292         * gnulib/import/dirname-lgpl.c: Update.
3293         * gnulib/import/dirname.h: Update.
3294         * gnulib/import/dosname.h: Update.
3295         * gnulib/import/dup-safer-flag.c: Update.
3296         * gnulib/import/dup-safer.c: Update.
3297         * gnulib/import/dup.c: Update.
3298         * gnulib/import/dup2.c: Update.
3299         * gnulib/import/errno.in.h: Update.
3300         * gnulib/import/error.c: Update.
3301         * gnulib/import/error.h: Update.
3302         * gnulib/import/exitfail.c: Update.
3303         * gnulib/import/exitfail.h: Update.
3304         * gnulib/import/extra/update-copyright: Update.
3305         * gnulib/import/fchdir.c: Update.
3306         * gnulib/import/fcntl.c: Update.
3307         * gnulib/import/fcntl.in.h: Update.
3308         * gnulib/import/fd-hook.c: Update.
3309         * gnulib/import/fd-hook.h: Update.
3310         * gnulib/import/fd-safer-flag.c: Update.
3311         * gnulib/import/fd-safer.c: Update.
3312         * gnulib/import/fdopendir.c: Update.
3313         * gnulib/import/filename.h: Update.
3314         * gnulib/import/filenamecat-lgpl.c: Update.
3315         * gnulib/import/filenamecat.h: Update.
3316         * gnulib/import/flexmember.h: Update.
3317         * gnulib/import/float+.h: Update.
3318         * gnulib/import/float.c: Update.
3319         * gnulib/import/float.in.h: Update.
3320         * gnulib/import/fnmatch.c: Update.
3321         * gnulib/import/fnmatch.in.h: Update.
3322         * gnulib/import/fnmatch_loop.c: Update.
3323         * gnulib/import/fpucw.h: Update.
3324         * gnulib/import/frexp.c: Update.
3325         * gnulib/import/frexpl.c: Update.
3326         * gnulib/import/fstat.c: Update.
3327         * gnulib/import/fstatat.c: Update.
3328         * gnulib/import/getcwd-lgpl.c: Update.
3329         * gnulib/import/getcwd.c: Update.
3330         * gnulib/import/getdtablesize.c: Update.
3331         * gnulib/import/getlogin_r.c: Update.
3332         * gnulib/import/getprogname.c: Update.
3333         * gnulib/import/getprogname.h: Update.
3334         * gnulib/import/gettext.h: Update.
3335         * gnulib/import/gettimeofday.c: Update.
3336         * gnulib/import/glob-libc.h: Update.
3337         * gnulib/import/glob.c: Update.
3338         * gnulib/import/glob.in.h: Update.
3339         * gnulib/import/glob_internal.h: Update.
3340         * gnulib/import/glob_pattern_p.c: Update.
3341         * gnulib/import/globfree.c: Update.
3342         * gnulib/import/hard-locale.c: Update.
3343         * gnulib/import/hard-locale.h: Update.
3344         * gnulib/import/intprops.h: Update.
3345         * gnulib/import/inttypes.in.h: Update.
3346         * gnulib/import/isnan.c: Update.
3347         * gnulib/import/isnand-nolibm.h: Update.
3348         * gnulib/import/isnand.c: Update.
3349         * gnulib/import/isnanl-nolibm.h: Update.
3350         * gnulib/import/isnanl.c: Update.
3351         * gnulib/import/itold.c: Update.
3352         * gnulib/import/libc-config.h: Update.
3353         * gnulib/import/limits.in.h: Update.
3354         * gnulib/import/localcharset.c: Update.
3355         * gnulib/import/localcharset.h: Update.
3356         * gnulib/import/localtime-buffer.c: Update.
3357         * gnulib/import/localtime-buffer.h: Update.
3358         * gnulib/import/lstat.c: Update.
3359         * gnulib/import/m4/00gnulib.m4: Update.
3360         * gnulib/import/m4/__inline.m4: Update.
3361         * gnulib/import/m4/absolute-header.m4: Update.
3362         * gnulib/import/m4/alloca.m4: Update.
3363         * gnulib/import/m4/builtin-expect.m4: Update.
3364         * gnulib/import/m4/canonicalize.m4: Update.
3365         * gnulib/import/m4/chdir-long.m4: Update.
3366         * gnulib/import/m4/close.m4: Update.
3367         * gnulib/import/m4/closedir.m4: Update.
3368         * gnulib/import/m4/configmake.m4: Update.
3369         * gnulib/import/m4/d-ino.m4: Update.
3370         * gnulib/import/m4/d-type.m4: Update.
3371         * gnulib/import/m4/dirent_h.m4: Update.
3372         * gnulib/import/m4/dirfd.m4: Update.
3373         * gnulib/import/m4/dirname.m4: Update.
3374         * gnulib/import/m4/double-slash-root.m4: Update.
3375         * gnulib/import/m4/dup.m4: Update.
3376         * gnulib/import/m4/dup2.m4: Update.
3377         * gnulib/import/m4/eealloc.m4: Update.
3378         * gnulib/import/m4/environ.m4: Update.
3379         * gnulib/import/m4/errno_h.m4: Update.
3380         * gnulib/import/m4/error.m4: Update.
3381         * gnulib/import/m4/exponentd.m4: Update.
3382         * gnulib/import/m4/exponentl.m4: Update.
3383         * gnulib/import/m4/extensions.m4: Update.
3384         * gnulib/import/m4/extern-inline.m4: Update.
3385         * gnulib/import/m4/fchdir.m4: Update.
3386         * gnulib/import/m4/fcntl-o.m4: Update.
3387         * gnulib/import/m4/fcntl.m4: Update.
3388         * gnulib/import/m4/fcntl_h.m4: Update.
3389         * gnulib/import/m4/fdopendir.m4: Update.
3390         * gnulib/import/m4/filenamecat.m4: Update.
3391         * gnulib/import/m4/flexmember.m4: Update.
3392         * gnulib/import/m4/float_h.m4: Update.
3393         * gnulib/import/m4/fnmatch.m4: Update.
3394         * gnulib/import/m4/fnmatch_h.m4: Update.
3395         * gnulib/import/m4/fpieee.m4: Update.
3396         * gnulib/import/m4/frexp.m4: Update.
3397         * gnulib/import/m4/frexpl.m4: Update.
3398         * gnulib/import/m4/fstat.m4: Update.
3399         * gnulib/import/m4/fstatat.m4: Update.
3400         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
3401         * gnulib/import/m4/getcwd-path-max.m4: Update.
3402         * gnulib/import/m4/getcwd.m4: Update.
3403         * gnulib/import/m4/getdtablesize.m4: Update.
3404         * gnulib/import/m4/getlogin.m4: Update.
3405         * gnulib/import/m4/getlogin_r.m4: Update.
3406         * gnulib/import/m4/getpagesize.m4: Update.
3407         * gnulib/import/m4/getprogname.m4: Update.
3408         * gnulib/import/m4/gettimeofday.m4: Update.
3409         * gnulib/import/m4/glibc21.m4: Update.
3410         * gnulib/import/m4/glob.m4: Update.
3411         * gnulib/import/m4/glob_h.m4: Update.
3412         * gnulib/import/m4/gnulib-cache.m4: Update.
3413         * gnulib/import/m4/gnulib-common.m4: Update.
3414         * gnulib/import/m4/gnulib-comp.m4: Update.
3415         * gnulib/import/m4/gnulib-tool.m4: Update.
3416         * gnulib/import/m4/hard-locale.m4: Update.
3417         * gnulib/import/m4/include_next.m4: Update.
3418         * gnulib/import/m4/inttypes-pri.m4: Update.
3419         * gnulib/import/m4/inttypes.m4: Update.
3420         * gnulib/import/m4/isnand.m4: Update.
3421         * gnulib/import/m4/isnanl.m4: Update.
3422         * gnulib/import/m4/largefile.m4: Update.
3423         * gnulib/import/m4/limits-h.m4: Update.
3424         * gnulib/import/m4/localcharset.m4: Update.
3425         * gnulib/import/m4/locale-fr.m4: Update.
3426         * gnulib/import/m4/locale-ja.m4: Update.
3427         * gnulib/import/m4/locale-zh.m4: Update.
3428         * gnulib/import/m4/localtime-buffer.m4: Update.
3429         * gnulib/import/m4/longlong.m4: Update.
3430         * gnulib/import/m4/lstat.m4: Update.
3431         * gnulib/import/m4/malloc.m4: Update.
3432         * gnulib/import/m4/malloca.m4: Update.
3433         * gnulib/import/m4/math_h.m4: Update.
3434         * gnulib/import/m4/mbrtowc.m4: Update.
3435         * gnulib/import/m4/mbsinit.m4: Update.
3436         * gnulib/import/m4/mbsrtowcs.m4: Update.
3437         * gnulib/import/m4/mbstate_t.m4: Update.
3438         * gnulib/import/m4/memchr.m4: Update.
3439         * gnulib/import/m4/memmem.m4: Update.
3440         * gnulib/import/m4/mempcpy.m4: Update.
3441         * gnulib/import/m4/memrchr.m4: Update.
3442         * gnulib/import/m4/mkdir.m4: Update.
3443         * gnulib/import/m4/mkstemp.m4: Update.
3444         * gnulib/import/m4/mmap-anon.m4: Update.
3445         * gnulib/import/m4/mode_t.m4: Update.
3446         * gnulib/import/m4/msvc-inval.m4: Update.
3447         * gnulib/import/m4/msvc-nothrow.m4: Update.
3448         * gnulib/import/m4/multiarch.m4: Update.
3449         * gnulib/import/m4/nocrash.m4: Update.
3450         * gnulib/import/m4/off_t.m4: Update.
3451         * gnulib/import/m4/onceonly.m4: Update.
3452         * gnulib/import/m4/open-cloexec.m4: Update.
3453         * gnulib/import/m4/open.m4: Update.
3454         * gnulib/import/m4/openat.m4: Update.
3455         * gnulib/import/m4/opendir.m4: Update.
3456         * gnulib/import/m4/pathmax.m4: Update.
3457         * gnulib/import/m4/rawmemchr.m4: Update.
3458         * gnulib/import/m4/readdir.m4: Update.
3459         * gnulib/import/m4/readlink.m4: Update.
3460         * gnulib/import/m4/realloc.m4: Update.
3461         * gnulib/import/m4/rename.m4: Update.
3462         * gnulib/import/m4/rewinddir.m4: Update.
3463         * gnulib/import/m4/rmdir.m4: Update.
3464         * gnulib/import/m4/save-cwd.m4: Update.
3465         * gnulib/import/m4/secure_getenv.m4: Update.
3466         * gnulib/import/m4/setenv.m4: Update.
3467         * gnulib/import/m4/signal_h.m4: Update.
3468         * gnulib/import/m4/ssize_t.m4: Update.
3469         * gnulib/import/m4/stat-time.m4: Update.
3470         * gnulib/import/m4/stat.m4: Update.
3471         * gnulib/import/m4/std-gnu11.m4: Update.
3472         * gnulib/import/m4/stdbool.m4: Update.
3473         * gnulib/import/m4/stddef_h.m4: Update.
3474         * gnulib/import/m4/stdint.m4: Update.
3475         * gnulib/import/m4/stdio_h.m4: Update.
3476         * gnulib/import/m4/stdlib_h.m4: Update.
3477         * gnulib/import/m4/strchrnul.m4: Update.
3478         * gnulib/import/m4/strdup.m4: Update.
3479         * gnulib/import/m4/strerror.m4: Update.
3480         * gnulib/import/m4/string_h.m4: Update.
3481         * gnulib/import/m4/strstr.m4: Update.
3482         * gnulib/import/m4/strtok_r.m4: Update.
3483         * gnulib/import/m4/sys_socket_h.m4: Update.
3484         * gnulib/import/m4/sys_stat_h.m4: Update.
3485         * gnulib/import/m4/sys_time_h.m4: Update.
3486         * gnulib/import/m4/sys_types_h.m4: Update.
3487         * gnulib/import/m4/tempname.m4: Update.
3488         * gnulib/import/m4/time_h.m4: Update.
3489         * gnulib/import/m4/unistd-safer.m4: Update.
3490         * gnulib/import/m4/unistd_h.m4: Update.
3491         * gnulib/import/m4/warn-on-use.m4: Update.
3492         * gnulib/import/m4/wchar_h.m4: Update.
3493         * gnulib/import/m4/wchar_t.m4: Update.
3494         * gnulib/import/m4/wctype_h.m4: Update.
3495         * gnulib/import/m4/wint_t.m4: Update.
3496         * gnulib/import/malloc.c: Update.
3497         * gnulib/import/malloc/scratch_buffer.h: Update.
3498         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
3499         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
3500         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
3501         * gnulib/import/malloca.c: Update.
3502         * gnulib/import/malloca.h: Update.
3503         * gnulib/import/malloca.valgrind: Update.
3504         * gnulib/import/math.in.h: Update.
3505         * gnulib/import/mbrtowc.c: Update.
3506         * gnulib/import/mbsinit.c: Update.
3507         * gnulib/import/mbsrtowcs-impl.h: Update.
3508         * gnulib/import/mbsrtowcs-state.c: Update.
3509         * gnulib/import/mbsrtowcs.c: Update.
3510         * gnulib/import/memchr.c: Update.
3511         * gnulib/import/memmem.c: Update.
3512         * gnulib/import/mempcpy.c: Update.
3513         * gnulib/import/memrchr.c: Update.
3514         * gnulib/import/mkdir.c: Update.
3515         * gnulib/import/mkstemp.c: Update.
3516         * gnulib/import/msvc-inval.c: Update.
3517         * gnulib/import/msvc-inval.h: Update.
3518         * gnulib/import/msvc-nothrow.c: Update.
3519         * gnulib/import/msvc-nothrow.h: Update.
3520         * gnulib/import/open.c: Update.
3521         * gnulib/import/openat-die.c: Update.
3522         * gnulib/import/openat-priv.h: Update.
3523         * gnulib/import/openat-proc.c: Update.
3524         * gnulib/import/openat.c: Update.
3525         * gnulib/import/openat.h: Update.
3526         * gnulib/import/opendir.c: Update.
3527         * gnulib/import/pathmax.h: Update.
3528         * gnulib/import/pipe-safer.c: Update.
3529         * gnulib/import/rawmemchr.c: Update.
3530         * gnulib/import/readdir.c: Update.
3531         * gnulib/import/readlink.c: Update.
3532         * gnulib/import/realloc.c: Update.
3533         * gnulib/import/ref-add.sin: Update.
3534         * gnulib/import/ref-del.sin: Update.
3535         * gnulib/import/rename.c: Update.
3536         * gnulib/import/rewinddir.c: Update.
3537         * gnulib/import/rmdir.c: Update.
3538         * gnulib/import/same-inode.h: Update.
3539         * gnulib/import/save-cwd.c: Update.
3540         * gnulib/import/save-cwd.h: Update.
3541         * gnulib/import/scratch_buffer.h: Update.
3542         * gnulib/import/secure_getenv.c: Update.
3543         * gnulib/import/setenv.c: Update.
3544         * gnulib/import/signal.in.h: Update.
3545         * gnulib/import/stat-time.c: Update.
3546         * gnulib/import/stat-time.h: Update.
3547         * gnulib/import/stat-w32.c: Update.
3548         * gnulib/import/stat-w32.h: Update.
3549         * gnulib/import/stat.c: Update.
3550         * gnulib/import/stdbool.in.h: Update.
3551         * gnulib/import/stddef.in.h: Update.
3552         * gnulib/import/stdint.in.h: Update.
3553         * gnulib/import/stdio.in.h: Update.
3554         * gnulib/import/stdlib.in.h: Update.
3555         * gnulib/import/str-two-way.h: Update.
3556         * gnulib/import/strchrnul.c: Update.
3557         * gnulib/import/strdup.c: Update.
3558         * gnulib/import/streq.h: Update.
3559         * gnulib/import/strerror-override.c: Update.
3560         * gnulib/import/strerror-override.h: Update.
3561         * gnulib/import/strerror.c: Update.
3562         * gnulib/import/string.in.h: Update.
3563         * gnulib/import/stripslash.c: Update.
3564         * gnulib/import/strnlen1.c: Update.
3565         * gnulib/import/strnlen1.h: Update.
3566         * gnulib/import/strstr.c: Update.
3567         * gnulib/import/strtok_r.c: Update.
3568         * gnulib/import/sys_stat.in.h: Update.
3569         * gnulib/import/sys_time.in.h: Update.
3570         * gnulib/import/sys_types.in.h: Update.
3571         * gnulib/import/tempname.c: Update.
3572         * gnulib/import/tempname.h: Update.
3573         * gnulib/import/time.in.h: Update.
3574         * gnulib/import/unistd--.h: Update.
3575         * gnulib/import/unistd-safer.h: Update.
3576         * gnulib/import/unistd.in.h: Update.
3577         * gnulib/import/unsetenv.c: Update.
3578         * gnulib/import/verify.h: Update.
3579         * gnulib/import/extra/snippet/warn-on-use.h: Update.
3580         * gnulib/import/wchar.in.h: Update.
3581         * gnulib/import/wctype.in.h: Update.
3582         * gnulib/import/xalloc-oversized.h: Update.
3583         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
3584         "53e2c179f26a890fa6685af4b6c1397ee370433b".
3585
3586 2018-08-16  Gary Benson <gbenson@redhat.com>
3587
3588         PR gdb/13000:
3589         * gdb/main.c (captured_main_1): Exit with nonzero status
3590         in batch mode if the last command to be executed failed.
3591         * NEWS: Mention the above.
3592
3593 2018-08-29  Simon Marchi  <simon.marchi@ericsson.com>
3594
3595         * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
3596         end of warning message.
3597
3598 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
3599
3600         PR gdb/22943:
3601         * aarch64-tdep.c (is_hfa_or_hva): Remove function.
3602         (aarch64_extract_return_value): Use
3603         aapcs_is_vfp_call_or_return_candidate.
3604         (aarch64_return_in_memory): Likewise.
3605         (aarch64_store_return_value): Likewise.
3606
3607 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
3608
3609         * aarch64-tdep.c
3610         (aapcs_is_vfp_call_or_return_candidate): Make static
3611         (pass_in_v_or_stack): Remove function.
3612         (pass_in_v_vfp_candidate): New function.
3613         (aarch64_push_dummy_call): Check for float register candidates.
3614
3615 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
3616
3617         * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
3618         (aapcs_is_vfp_call_or_return_candidate_1): New function.
3619         (aapcs_is_vfp_call_or_return_candidate): Likewise.
3620
3621 2018-08-28  Simon Marchi  <simon.marchi@polymtl.ca>
3622
3623         PR build/23399
3624         * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
3625         (struct ipa_sym_addresses): Rename to...
3626         (struct ipa_sym_addresses_common): ... this.
3627         * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
3628
3629 2018-08-28  Tom Tromey  <tom@tromey.com>
3630
3631         * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
3632         (token_fifo): Now a std::vector.
3633         (yylex, c_parse): Update.
3634         * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
3635         (token_fifo): Now a std::vector.
3636         (yylex, d_parse): Update.
3637         * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
3638         (token_fifo): Now a std::vector.
3639         (yylex, go_parse): Update.
3640
3641 2018-08-28  Simon Marchi  <simon.marchi@ericsson.com>
3642
3643         * parser-defs.h (struct type_stack) <elements>: Change type to
3644         std::vector<union type_stack_elt>.
3645         <depth, size>: Remove.
3646         * parse.c (parse_exp_in_context_1): Adjust.
3647         (type_stack_reserve): Remove.
3648         (check_type_stack_depth): Remove.
3649         (insert_into_type_stack): Adjust to std::vector.
3650         (insert_type): Likewise.
3651         (push_type): Likewise.
3652         (push_type_int): Likewise.
3653         (insert_type_address_space): Likewise.
3654         (pop_type): Likewise.
3655         (pop_type_int): Likewise.
3656         (pop_typelist): Likewise.
3657         (pop_type_stack): Likewise.
3658         (append_type_stack): Likewise.
3659         (push_type_stack): Likewise.
3660         (get_type_stack): Likewise.
3661         (type_stack_cleanup): Likewise.
3662         (push_typelist): Likewise.
3663         (follow_types): Likewise.
3664         (_initialize_parse): Likewise.
3665
3666 2018-08-28  Hafiz Abid Qadeer  <abidh@codesourcery.com>
3667
3668         * NEWS: Mention csky target.
3669
3670 2018-08-28  Jiangshuai Li  <jiangshuai_li@c-sky.com>
3671             Hafiz Abid Qadeer  <abidh@codesourcery.com>
3672             Don Breazeal  <donb@codesourcery.com>
3673
3674         * csky-linux-tdep.c: New file.
3675         * csky-tdep.c: Likewise.
3676         * csky-tdep.h: Likewise.
3677         * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
3678         csky-tdep.o.
3679         (HFILES_NO_SRCDIR): Add csky-tdep.h.
3680         (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
3681         * configure.tgt: Add csky support.
3682
3683 2018-08-27  Jan Vrany  <jan.vrany@fit.cvut.cz>
3684
3685         * python/py-framefilter.c (py_print_frame): Print frame architecture
3686         when printing on an MI output.
3687
3688 2018-08-27  Tom Tromey  <tom@tromey.com>
3689
3690         PR build/23087:
3691         * configure: Rebuild.
3692         * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
3693
3694 2018-08-27  Tom Tromey  <tom@tromey.com>
3695
3696         * aarch64-linux-tdep.c
3697         (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
3698         casts to int.
3699
3700 2018-08-27  Tom Tromey  <tom@tromey.com>
3701
3702         * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
3703         unsigned.
3704         (ppc64_standard_linkage1, ppc64_standard_linkage2)
3705         (ppc64_standard_linkage3, ppc64_standard_linkage4)
3706         (ppc64_standard_linkage5, ppc64_standard_linkage6)
3707         (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
3708         unsigned.
3709
3710 2018-08-27  Tom Tromey  <tom@tromey.com>
3711
3712         * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
3713         (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
3714
3715 2018-08-27  Tom Tromey  <tom@tromey.com>
3716
3717         * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
3718         * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
3719         ULONGEST_MAX.
3720         * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
3721         ULONGEST_MAX.
3722         * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
3723         ULONGEST_MAX.
3724         * sparc-linux-tdep.c (sparc32_linux_sigframe)
3725         (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
3726         * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
3727         ULONGEST_MAX.
3728         * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
3729         (ppc64_linux_sigaction_tramp_frame)
3730         (ppc32_linux_sighandler_tramp_frame)
3731         (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
3732         * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
3733         (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
3734         * mn10300-linux-tdep.c (am33_linux_sigframe)
3735         (am33_linux_rt_sigframe): Use ULONGEST_MAX.
3736         * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
3737         * mips-linux-tdep.c (mips_linux_o32_sigframe)
3738         (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
3739         (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
3740         (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
3741         (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
3742         * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
3743         (mips64_fbsd_sigframe): Use ULONGEST_MAX.
3744         * microblaze-linux-tdep.c
3745         (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
3746         * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
3747         (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
3748         (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
3749         * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
3750         * common/common-types.h (ULONGEST_MAX): New define.
3751         (CORE_ADDR_MAX): Fix formatting.
3752         * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
3753         * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
3754         * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
3755         (arm_linux_rt_sigreturn_tramp_frame)
3756         (arm_eabi_linux_sigreturn_tramp_frame)
3757         (arm_eabi_linux_rt_sigreturn_tramp_frame)
3758         (thumb2_eabi_linux_sigreturn_tramp_frame)
3759         (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
3760         (arm_linux_restart_syscall_tramp_frame)
3761         (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
3762         * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
3763         * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
3764         ULONGEST_MAX.
3765         * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
3766
3767 2018-08-27  Tom Tromey  <tom@tromey.com>
3768
3769         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
3770         CORE_ADDR_MAX.
3771         * mips-tdep.c (mips_deal_with_atomic_sequence)
3772         (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
3773         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
3774         (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
3775         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
3776         CORE_ADDR_MAX.
3777         * aarch64-tdep.c (aarch64_software_single_step): Use
3778         CORE_ADDR_MAX.
3779
3780 2018-08-27  Tom Tromey  <tom@tromey.com>
3781
3782         * linespec.c (complete_linespec_component): Add cast to "char".
3783         * completer.c (completion_tracker::build_completion_result): Add
3784         cast to "char".
3785
3786 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
3787
3788         * solist.h (struct solist, struct target_so_ops): Fix
3789         indentation.
3790
3791 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
3792
3793         * ada-tasks.c (ada_task_info_s): Remove typedef.
3794         (DEF_VEC_O(ada_task_info_s)): Remove.
3795         (struct ada_tasks_inferior_data): Initialize fields.
3796         <task_list>: Make an std::vector.
3797         (get_ada_tasks_inferior_data): Allocate with new.
3798         (ada_get_task_number): Adjust.
3799         (get_task_number_from_id): Likewise.
3800         (valid_task_id): Likewise.
3801         (ada_get_task_info_from_ptid): Likewise.
3802         (iterate_over_live_ada_tasks): Likewise.
3803         (add_ada_task): Likewise.
3804         (read_known_tasks): Likewise.
3805         (ada_build_task_list): Likewise.
3806         (print_ada_task_info): Likewise.
3807         (info_task): Likewise.
3808         (task_command_1): Likewise.
3809
3810 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
3811
3812         * ada-lang.c (add_angle_brackets): Return std::string.
3813
3814 2018-08-25  Simon Marchi  <simon.marchi@polymtl.ca>
3815
3816         * python/py-threadevent.c (py_get_event_thread): Initialize
3817         pythread.
3818
3819 2018-08-24  Pedro Alves  <palves@redhat.com>
3820
3821         * python/py-bpevent.c (create_breakpoint_event_object): Use
3822         copy-initialization.
3823         * python/py-continueevent.c (emit_continue_event): Use
3824         copy-initialization.
3825         * python/py-exitedevent.c (create_exited_event_object): Return a
3826         gdbpy_ref<>.
3827         (emit_exited_event): Use copy-initialization.
3828         * python/py-inferior.c (python_new_inferior)
3829         (python_inferior_deleted, add_thread_object): Use
3830         copy-initialization.
3831         * python/py-infevents.c (create_inferior_call_event_object)
3832         (create_register_changed_event_object)
3833         (create_memory_changed_event_object): Return a gdbpy_ref<>.
3834         (emit_inferior_call_event, emit_memory_changed_event)
3835         (emit_register_changed_event): Use copy-initialization.
3836         * python/py-newobjfileevent.c (create_new_objfile_event_object):
3837         Return a gdbpy_ref<>.
3838         (emit_new_objfile_event): Use copy-initialization.
3839         (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
3840         (emit_clear_objfiles_event): Use copy-initialization.
3841         * python/py-signalevent.c (create_signal_event_object): Use
3842         copy-initialization.
3843         * python/py-threadevent.c (create_thread_event_object): Use
3844         copy-initialization.
3845
3846 2018-08-24  Pedro Alves  <palves@redhat.com>
3847             Simon Marchi  <simon.marchi@ericsson.com>
3848
3849         PR gdb/23379
3850         * python/py-continueevent.c: Include "gdbthread.h".
3851         (create_continue_event_object): Add intro comment.  Add 'ptid'
3852         parameter.  Use it to find thread to pass to
3853         create_thread_event_object.
3854         (emit_continue_event): Pass PTID down to
3855         create_continue_event_object.
3856         * python/py-event.h (py_get_event_thread): Declare.
3857         (create_thread_event_object): Remove default from 'thread'
3858         parameter.
3859         * python/py-stopevent.c (create_stop_event_object): Use
3860         py_get_event_thread.
3861         * python/py-threadevent.c (get_event_thread): Rename to ...
3862         (py_get_event_thread): ... this, make extern, add 'ptid' parameter
3863         and use it to find the thread.
3864         (create_thread_event_object): Assert that THREAD isn't null.
3865         Don't find the event thread here.
3866
3867 2018-08-23  Kevin Buettner  <kevinb@redhat.com>
3868
3869         * block.h (blockrange, blockranges): New struct declarations.
3870         (struct block): Add new field named `ranges'.
3871         (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
3872         (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
3873         macros for accessing ranges in struct block.
3874         (make_blockranges): New declaration.
3875         block.c (make_blockranges): New function.
3876         * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
3877         for block.
3878         * symtab.h (find_pc_partial_function): Add new parameter `block'.
3879         * blockframe.c (cache_pc_function_block): New static global.
3880         (clear_pc_function_cache): Clear cache_pc_function_block.
3881         (find_pc_partial_function): Move comment to symtab.h.  Add
3882         support for non-contiguous blocks.
3883         * cli/cli-cmds.c (block.h): Include.
3884         (print_disassembly): Handle printing of non-contiguous blocks.
3885         (disassemble_current_function): Likewise.
3886         (disassemble_command): Likewise.
3887
3888         * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
3889         BLOCK_START.
3890         * blockframe.c (get_pc_function_start): Likewise.
3891         * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
3892         (gcc_symbol_address): Likewise.
3893         * compile/compile-object-run.c (compile_object_run): Likewise.
3894         * compile/compile.c (get_expr_block_and_pc): Likewise.
3895         * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
3896         (func_addr_to_tail_call_list): Likewise.
3897         * findvar.c (default_read_var_value): Likewise.
3898         * inline-frame.c (inline_frame_this_id): Likewise.
3899         (skip-inline_frames): Likewise.
3900         * infcmd.c (until_next_command): Likewise.
3901         * linespec.c (convert_linespec_to_sals): Likewise.
3902         * parse.c (parse_exp_in_context_1): Likewise.
3903         * printcmd.c (build_address_symbolic): likewise.
3904         (info_address_command): Likewise.
3905         symtab.c (find_function_start_sal): Likewise.
3906         (skip_prologue_sal): Likewise.
3907         (find_function_alias_target): Likewise.
3908         (find_gnu_ifunc): Likewise.
3909         * stack.c (find_frame_funname): Likewise.
3910         * symtab.c (fixup_symbol_section): Likewise.
3911         (find_function_start_sal): Likewise.
3912         (skip_prologue_sal): Likewsie.
3913         (find_function_alias_target): Likewise.
3914         (find_gnu_ifunc): Likewise.
3915         * tracepoint.c (info_scope_command): Likewise.
3916         * value.c (value_fn_field): Likewise.
3917
3918         * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
3919         in place of find_pc_partial_function.
3920         * blockframe.c (find_function_entry_range_from_pc): New function.
3921         * symtab.h (find_function_entry_range_from_pc): Declare and document.
3922         * objfiles.c (objfile_relocate1): Relocate start and end addresses
3923         for each range in a block.
3924
3925
3926 2018-08-23  Xavier Roirand  <roirand@adacore.com>
3927
3928         * machoread.c (macho_symfile_read_all_oso): Remove uneeded
3929         incrementation.
3930
3931 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
3932
3933         * solib-svr4.c (read_program_headers_from_bfd): Return
3934         gdb::optional<gdb::byte_vector>.
3935         (svr4_exec_displacement): Adjust.
3936
3937 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
3938
3939         * solib-svr4.c (read_program_header): Return
3940         gdb::optional<gdb::byte_vector>, remove p_sect_size param.
3941         (find_program_interpreter): Return
3942         gdb::optional<gdb::byte_vector>.
3943         (scan_dyntag_auxv): Adjust.
3944         (enable_break): Adjust.
3945         (svr4_exec_displacement): Adjust.
3946
3947 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
3948
3949         * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
3950         * inf-child.c (inf_child_target::terminal_save_inferior): New.
3951
3952 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
3953
3954         * guile/scm-string.c (gdbscm_scm_from_printf): Use
3955         string_vprintf.
3956         * guile/scm-utils.c (gdbscm_printf): Likewise.
3957         * serial.c (serial_printf): Likewise.
3958         * xml-support.c (gdb_xml_parser::vdebug): Likewise.
3959
3960 2018-08-22  Jan Vrany  <jan.vrany@fit.cvut.cz>
3961
3962         * stack.c (print_frame): Print frame architecture when printing on
3963         an MI output.
3964         * NEWS: Mention new "arch" attribute in frame output.
3965
3966 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
3967
3968         * arch/aarch64.h (aarch64_regnum): Update comment.
3969
3970 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
3971
3972         * NEWS: Add SVE to 8.2 section.
3973
3974 2018-08-21  Pedro Alves  <palves@redhat.com>
3975
3976         * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
3977         out from gdbscm_parse_function_args.
3978         (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
3979         gdbscm_parse_function_args_1.
3980
3981 2018-08-21  Simon Marchi  <simon.marchi@ericsson.com>
3982
3983         PR gdb/17816
3984         * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
3985         operator.
3986
3987 2018-08-19  Simon Marchi  <simon.marchi@polymtl.ca>
3988
3989         * solib-svr4.c (svr4_exec_displacement): Fix formatting.
3990
3991 2018-08-19  Michael Spang  <spang@google.com>
3992
3993         PR gdb/11786
3994         * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
3995         for PT_TLS segments.
3996
3997 2018-08-18  Kevin Buettner  <kevinb@redhat.com>
3998
3999         * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
4000         dwarf_variable_value.
4001         * dwarf2-frame.c (class dwarf_expr_executor):
4002         Add override for dwarf_variable_value.
4003         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
4004         (class symbol_needs_eval_context): Likewise.
4005         (indirect_synthetic_pointer): Add forward declaration.
4006         (sect_variable_value): New function.
4007         (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
4008         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
4009         for DW_OP_GNU_variable_value.
4010
4011 2018-08-16  Tom Tromey  <tom@tromey.com>
4012
4013         * top.c (read_command_file): Update.
4014         (command_line_input): Remove "repeat" argument.
4015         * ada-lang.c (get_selections): Update.
4016         * linespec.c (decode_line_2): Update.
4017         * defs.h (command_line_input): Remove argument.
4018         * cli/cli-script.c (read_next_line): Update.
4019         * python/py-gdb-readline.c: Update.
4020
4021 2018-08-17  Tom Tromey  <tom@tromey.com>
4022
4023         * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
4024         command_line_input.
4025
4026 2018-08-15  Tom Tromey  <tom@tromey.com>
4027
4028         * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
4029
4030 2018-08-14  Jan Vrany  <jan.vrany@fit.cvut.cz>
4031
4032         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
4033         If used, use find_pc_partial_function to find address range
4034         to disassemble.
4035         * mi/mi-main.c (mi_cmd_list_features): Report
4036         "data-disassemble-a-option" feature.
4037         * NEWS: Mention new -data-disassemble option -a.
4038
4039 2018-08-13  Tom Tromey  <tom@tromey.com>
4040
4041         * common/common-defs.h (_FORTIFY_SOURCE): Define.
4042
4043 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
4044
4045         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
4046         (aarch64_linux_collect_sve_regset): Likewise.
4047         (aarch64_linux_iterate_over_regset_sections): Check for SVE.
4048         * regcache.h (regcache_map_entry_size): New function.
4049
4050 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
4051
4052         * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
4053         (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
4054         (SVE_HEADER_VL_LENGTH): Likewise.
4055         (SVE_HEADER_MAX_VL_LENGTH): Likewise.
4056         (SVE_HEADER_FLAGS_LENGTH): Likewise.
4057         (SVE_HEADER_RESERVED_LENGTH): Likewise.
4058         (SVE_HEADER_SIZE_OFFSET): Likewise.
4059         (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
4060         (SVE_HEADER_VL_OFFSET): Likewise.
4061         (SVE_HEADER_MAX_VL_OFFSET): Likewise.
4062         (SVE_HEADER_FLAGS_OFFSET): Likewise.
4063         (SVE_HEADER_RESERVED_OFFSET): Likewise.
4064         (SVE_HEADER_SIZE): Likewise.
4065         (aarch64_linux_core_read_vq): Add function.
4066         (aarch64_linux_core_read_description): Check for SVE section.
4067
4068 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
4069
4070         * aarch64-fbsd-tdep.c
4071         (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
4072         collect_size.
4073         * aarch64-linux-tdep.c
4074         (aarch64_linux_iterate_over_regset_sections): Likewise.
4075         * alpha-linux-tdep.c
4076         (alpha_linux_iterate_over_regset_sections):
4077         * alpha-nbsd-tdep.c
4078         (alphanbsd_iterate_over_regset_sections): Likewise.
4079         * amd64-fbsd-tdep.c
4080         (amd64fbsd_iterate_over_regset_sections): Likewise.
4081         * amd64-linux-tdep.c
4082         (amd64_linux_iterate_over_regset_sections): Likewise.
4083         * arm-bsd-tdep.c
4084         (armbsd_iterate_over_regset_sections): Likewise.
4085         * arm-fbsd-tdep.c
4086         (arm_fbsd_iterate_over_regset_sections): Likewise.
4087         * arm-linux-tdep.c
4088         (arm_linux_iterate_over_regset_sections): Likewise.
4089         * corelow.c (get_core_registers_cb): Likewise.
4090         (core_target::fetch_registers): Likewise.
4091         * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
4092         * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
4093         * gdbarch.h (void): Regenerate.
4094         * gdbarch.sh: Add supply_size and collect_size.
4095         * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
4096         * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
4097         * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
4098         * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
4099         * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
4100         * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
4101         * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
4102         * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
4103         * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
4104         * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
4105         * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
4106         * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
4107         * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
4108         * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
4109         * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
4110         * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
4111         * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
4112         * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
4113         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
4114         * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
4115         * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
4116         * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
4117         * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
4118         * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
4119         * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
4120         * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
4121         * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
4122         * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
4123         * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
4124         * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
4125
4126 2018-08-10  Simon Marchi  <simon.marchi@ericsson.com>
4127
4128         * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
4129         with string_printf.
4130
4131 2018-08-10  Keith Seitz  <keiths@redhat.com>
4132
4133         * compile/compile-c-support.c (add_code_header, add_code_footer):
4134         Move into policy class.
4135         (c_push_user_expression, pop_user_expression_nop)
4136         (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
4137         (compile_program): New host class.
4138         (c_compile_program): New typedef.
4139         (c_compute_porgram): Use c_compile_program.
4140
4141 2018-08-10  Keith Seitz  <keiths@redhat.com>
4142
4143         * compile/compile-internal.h (compile_instance::~compile_instance):
4144         Remove calls to htab_delete.
4145         <m_type_map, m_symbol_err_map>: Switch type to htab_up.
4146         * compile.c (compile_instance::compile_instance): Initialize
4147         htab unique pointers.
4148         (compile_instance::get_cached_type, compile_instance::insert_type)
4149         (compile_instance::error_symbol_once): Update for unique_ptr.
4150
4151 2018-08-10  Keith Seitz  <keiths@redhat.com>
4152
4153         * compile/compile-c-symbols.c (struct symbol_error)
4154         (hash_symbol_error, eq_symbol_error, del_symbol_error)
4155         (compile_instance::insert_symbol_error)
4156         (compile_instance::error_symbol_once): Move to ...
4157         * compile/compile.c: ... here.
4158
4159 2018-08-10  Keith Seitz  <keiths@redhat.com>
4160
4161         * compile/compile-c-support.c (c_get_compile_context): Use `new'
4162         instead of `new_compile_instance'.
4163         * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
4164         Update description.
4165         If the symbol error map is not initialized, create it.
4166         (generate_c_for_for_one_symbol): Do not check/initialize
4167         the symbol error map.
4168         * compile/compile-c-types.c (compile_c_instance): Make a class.
4169         Update all callers.
4170         (compile_instance::compile_instance): Initialize the type cache.
4171         (get_cached_type): New function.
4172         (insert_type): Update description.
4173         (compile_c_instance::m_default_cflags): Define.
4174         (convert_type): Update description.  Use get_cached_type.
4175         (delete_instance): Moved to destructor.
4176         (new_compile_instance): Moved to constructor.
4177         * compile/compile-c.h (compile_c_instance): Make class inheriting
4178         from compile_instance.
4179         <base>: Remove field.
4180         <type_map, symbol_err_map>: Move to base class.
4181         <c_plugin>: Rename to `m_plugin' and remove pointer type.
4182         * compile/compile-internal.h (compile_instance): Make class.
4183         <type_map_t, symbol_err_map_t>: Define.
4184         <fe>: Rename to `m_gcc_fe'.
4185         <scope, block, gcc_target_options>: Add `m_' prefix.
4186         <m_type_map, m_symbol_err_map>: New fields, moved from
4187         compile_c_instance.
4188         <destroy>: Remove.
4189         (convert_type, new_compile_instance): Remove.
4190         * compile/compile.c (cleanup_compile_instance): Remove.
4191         (compile_to_object): Use unique_ptr to eliminate cleanups.
4192         (compile_instance::set_print_callback, compile_instance::version)
4193         (compile_instance::set_verbose)
4194         (compile_instance::set_driver_filename)
4195         (compile_instance::set_triplet_regexp)
4196         (compile_instance::set_arguments)
4197         (compile_instance::set_source_file)
4198         (compile_instance::compile): Define.
4199
4200 2018-08-10  Keith Seitz  <keiths@redhat.com>
4201
4202         * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
4203         * compile/compile-c-types.c: Define GCC_METHODN macros and include
4204         gcc-c-fe.def to define C plugin.
4205         (delete_instance): Delete `c_plugin'.
4206         (new_compile_instance): Initialize `c_plugin'.
4207         * compile/compile-c.h: Include gcc_c_plugin.h.
4208         (struct compile_c_instance) <c_plugin>: New member.
4209         * gcc-c-plugin.h: New file.
4210         Update all callers with API change.
4211
4212 2018-08-10  Keith Seitz  <keiths@redhat.com>
4213
4214         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
4215         (HFILES_NO_SRCDIR): ... to here.
4216         Add compile-internal.h and compile-c.h.
4217         * compile/compile-c-support.c: Include compile-c.h.
4218         * compile/compile-c-symbols.c: Include compile-c.h.
4219         (generate_c_for_variable_locations): Update comment.
4220         * compile/compile-c-types.c: Include compile-c.h.
4221         * compile/compile-c.h: New file -- moved C language declarations
4222         from other files here.
4223         * compile/compile-internal.h: Do not include hashtab.h or
4224         common/enum-flags.h.
4225         (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
4226         (gcc_convert_symbol, gcc_symbol_address)
4227         (generate_c_for_variable_locations, c_get_mode_for_size)
4228         (c_get_range_decl_name): Definitions moved to compile-c.h.
4229         * compile/compile-loc2c.c: Include compile-c.h.
4230
4231 2018-08-10  Keith Seitz  <keiths@redhat.com>
4232
4233         * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
4234         (c_symbol_substitution_name): ... this.
4235         Update all callers.
4236
4237 2018-08-10  Keith Seitz  <keiths@redhat.com>
4238
4239         * compile/compile-c-support.c (c_compute_program): Use
4240         unique_xmalloc_ptr to eliminate cleanup.
4241         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
4242         Return a unique_xmalloc_ptr and eliminate cleanup.
4243         * compile/compile-internal.h (generate_c_for_variable_locations):
4244         Return unique_xmalloc_ptr and update description.
4245
4246 2018-08-10  Alan Hayward  <alan.hayward@arm.com>
4247
4248         * corelow.c (core_target::get_core_register_section): Rename
4249         min_size to section_min_size.
4250
4251 2018-08-09  Jim Wilson  <jimw@sifive.com>
4252
4253         * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
4254         (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
4255         * NEWS: Mention new GNU/Linux RISC-V target.
4256         * configure.host: Add riscv*-*-linux*.
4257         * configure.nat: Add riscv*.
4258         * configure.tgt: Add riscv*-*-linux*.
4259         * riscv-linux-nat.c: New file.
4260         * riscv-linux-tdep.c: New file.
4261
4262 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
4263
4264         * infrun.c (resume): Make static, add forward declaration.
4265         (proceed): Update header comment.
4266         * infrun.h (resume): Delete declaration.
4267
4268 2018-08-09  Tom Tromey  <tom@tromey.com>
4269
4270         * riscv-tdep.h: Minor formatting fixes.
4271
4272 2018-08-09  Simon Marchi  <simon.marchi@ericsson.com>
4273
4274         * common/scoped_mmap.c (mmap_file): Silence ARI warning.
4275         * dwarf-index-cache.c (create_dir_and_check): Likewise.
4276         (test_mkdir_recursive): Likewise.
4277         * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
4278
4279 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
4280
4281         * valarith.c (value_subscripted_rvalue): If an array is not in
4282         memory, and we don't know the upper bound, then we can't know that
4283         the requested element exists or not.
4284
4285 2018-08-08  Simon Marchi  <simon.marchi@ericsson.com>
4286
4287         * target.c (str_comma_list_concat_elem): Fix typo in comment.
4288         (target_options_to_string): Add comment.
4289
4290 2018-08-08  Tom Tromey  <tom@tromey.com>
4291
4292         * unittests/scoped_mmap-selftests.c: Check result of "write".
4293
4294 2018-08-08  Jim Wilson  <jimw@sifive.com>
4295
4296         * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
4297         (decode_register_index_short): New.
4298         (decode_j_type_insn, decode_cj_type_insn): New.
4299         (decode_b_type_insn, decode_cb_type_insn): New.
4300         (riscv_insn::decode): Add support for jumps, branches, lr, and sc.  New
4301         local xlen.  Check xlen when decoding ambiguous compressed insns.  In
4302         compressed decode, use is_c_lui_insn instead of is_lui_insn, and
4303         is_c_sw_insn instead of is_sw_insn.
4304         (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
4305         (riscv_software_single_step): New.
4306         * riscv-tdep.h (riscv_software_single_step): Declare.
4307
4308         * riscv-tdep.c (riscv_isa_xlen): Drop static.
4309         * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
4310
4311 2018-08-08  Andrew Burgess  <andrew.burgess@embecosm.com>
4312
4313         PR gdb/18050:
4314         * target.c (dispose_inferior): Don't dispose of inferiors that are
4315         already killed.
4316
4317 2018-08-08  Szabolcs Nagy  <szabolcs.nagy@arm.com>
4318
4319         * remote.c (remote_target::download_tracepoint): Change char* to
4320         const char*.
4321
4322 2018-08-07  Simon Marchi  <simon.marchi@polymtl.ca>
4323
4324         * target.h (target_options_to_string): Return an std::string.
4325         * target.c (str_comma_list_concat_elem): Return void, use
4326         std::string.
4327         (do_option): Likewise.
4328         (target_options_to_string): Return an std::string.
4329         * linux-nat.c (linux_nat_target::wait): Adjust.
4330         * target-debug.h (target_debug_print_options): Adjust.
4331
4332 2018-08-07  Tom Tromey  <tom@tromey.com>
4333
4334         * Makefile.in (CPPFLAGS): New variable.
4335         (INTERNAL_CPPFLAGS): Use it.
4336
4337 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4338
4339         * NEWS: Mention the index cache.
4340
4341 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4342
4343         * common/pathstuff.h (get_standard_cache_dir): New.
4344         * common/pathstuff.c (get_standard_cache_dir): New.
4345         * build-id.h (build_id_to_string): New.
4346         * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
4347         DEBUG_STR_SUFFIX): Move to here.
4348         * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
4349         DEBUG_STR_SUFFIX): Move from there.
4350         (write_psymtabs_to_index): Make non-static, add basename
4351         parameter.  Write to temporary files, rename when done.
4352         (save_gdb_index_command): Adjust call to
4353         write_psymtabs_to_index.
4354         * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
4355         field.
4356         * dwarf2read.c (dwz_file) <index_cache_res>: New field.
4357         (get_gdb_index_contents_from_cache): New.
4358         (get_gdb_index_contents_from_cache_dwz): New.
4359         (dwarf2_initialize_objfile): Read index from cache.
4360         (dwarf2_build_psymtabs): Save to index.
4361         * dwarf-index-cache.h: New file.
4362         * dwarf-index-cache.c: New file.
4363         * dwarf-index-write.h: New file.
4364
4365 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4366
4367         * gnulib/aclocal.m4: Re-generate.
4368         * gnulib/config.in: Re-generate.
4369         * gnulib/configure: Re-generate.
4370         * gnulib/import/Makefile.am: Re-generate.
4371         * gnulib/import/Makefile.in: Re-generate.
4372         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
4373         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
4374         * gnulib/import/m4/mkdir.m4: New file.
4375         * gnulib/import/mkdir.c: New file.
4376         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
4377         module.
4378
4379 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4380
4381         * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
4382         * common/scoped_mmap.c: New file.
4383         * common/scoped_mmap.h (destroy): New method.
4384         (~scoped_mmap, reset): Use destroy.
4385         (scoped_mmap): New move constructor.
4386         (mmap_file): New declaration.
4387         * unittests/scoped_mmap-selftests.c (test_normal,
4388         test_invalid_filename, run_tests): New functions.
4389         (_initialize_scoped_mmap_selftests): Register selftest.
4390
4391 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4392
4393         * dwarf2read.c (read_gdb_index_from_section): Rename to...
4394         (read_gdb_index_from_buffer): ... this.  Remove section
4395         parameter, add buffer parameter.
4396         (get_gdb_index_contents_ftype,
4397         get_gdb_index_contents_dwz_ftype): New typedefs.
4398         (dwarf2_read_gdb_index): Add callback parameters to get the
4399         index contents.
4400         (get_gdb_index_contents_from_section): New.
4401         (dwarf2_initialize_objfile): Update call to
4402         dwarf2_read_gdb_index.
4403
4404 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4405
4406         * common/filestuff.h (gdb_fopen_cloexec): New overload.
4407         (gdb_open_cloexec): Likewise.
4408         * nat/linux-osdata.c (command_from_pid): Use string_printf.
4409         (commandline_from_pid): Likewise.
4410         (linux_xfer_osdata_threads): Likewise.
4411         (linux_xfer_osdata_fds): Likewise.
4412         * ada-lang.c (is_package_name): Likewise.
4413         * auxv.c (procfs_xfer_auxv): Likewise.
4414         * breakpoint.c (print_one_breakpoint_location): Use
4415         uiout::field_fmt.
4416         (print_one_catch_solib): Use string_printf.
4417         * coff-pe-read.c (add_pe_exported_sym): Likewise.
4418         (add_pe_forwarded_sym): Likewise.
4419         * dwarf2read.c (create_type_unit_group): Likewise.
4420         (build_error_marker_type): Likewise.
4421         * infcall.c (get_function_name): Likewise.
4422         * valprint.c (print_converted_chars_to_obstack): Likewise.
4423         * xtensa-tdep.c (xtensa_register_type): Likewise.
4424
4425 2018-08-06  Simon Marchi  <simon.marchi@ericsson.com>
4426
4427         * remote.c (remote_target::download_tracepoint): Fix format
4428         string errors.
4429
4430 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
4431
4432         * tracefile.c: Include common/byte-vector.h.
4433         (trace_save): Change type of buf to gdb::byte_vector.  Initialize
4434         with trace_regblock_size if needed.  Update uses of buf.
4435
4436 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
4437
4438         * tracepoint.h (collection_list) <m_regs_mask>: Change type to
4439         std::vector<unsigned char>.
4440         * tracepoint.c (collection_list::collection_list): Remove
4441         m_regs_mask initializer from initializer list.  Resize
4442         m_regs_mask using the largest remote register number.
4443         (collection_list::add_remote_register): Remove size check on
4444         m_regs_mask.  Use at to access element.
4445         (collection_list::stringify): Change type of temp_buf to
4446         gdb::char_vector.  Update uses of temp_buf.  Resize if needed to
4447         stringify the register mask.  Use pack_hex_byte for the register
4448         mask.
4449
4450 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
4451
4452         * tracepoint.h (class collection_list) <add_register>: Remove.
4453         <add_remote_register, add_ax_registers, add_local_register>:
4454         Declare.
4455         <add_memrange>: Add scope parameter.
4456         * tracepoint.c (encode_actions_1): Likewise.
4457         (collection_list::add_register): Rename to ...
4458         (collection_list::add_remote_register): ... this.  Update
4459         comment.
4460         (collection_list::add_ax_registers, add_local_register): New
4461         methods.
4462         (collection_list::add_memrange): Add scope parameter.  Call
4463         add_local_register instead of add_register.
4464         (finalize_tracepoint_aexpr): New function.
4465         (collection_list::collect_symbol): Update calls to add_memrange.
4466         Call add_local_register instead of add_register.  Call
4467         add_ax_registers.  Call finalize_tracepoint_aexpr.
4468         (encode_actions_1): Get remote regnos for $reg action.  Call
4469         add_remote_register, add_ax_registers, and add_local_register.
4470         Update call to add_memrange.  Call finalize_tracepoint_aexpr.
4471         (validate_actionline): Call finalize_tracepoint_aexpr.
4472
4473 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
4474
4475         * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
4476         Replace array buf with gdb::char_vector buf, of size
4477         get_remote_packet_size ().  Replace references to buf and
4478         BUF_SIZE to buf.data () and buf.size ().  Replace strcpy, strcat
4479         and xsnprintf with snprintf.  Raise errors if the buffer is too
4480         small.
4481
4482 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
4483
4484         * remote.c (remote_target::download_tracepoint): Fix the has_more
4485         predicate in the QTDP action list iteration.
4486
4487 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
4488
4489         * remote.c (remote_target::download_tracepoint): Fix indentation
4490         in for block.
4491
4492 2018-08-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4493
4494         * proc-api.c (_initialize_proc_api): Remove c, unused.
4495         * procfs.c (procfs_init_inferior): Remove signals, unused.
4496         (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
4497         unused.
4498
4499 2018-08-06  Sergey Korolev  <s.korolev@ndmsystems.com>
4500             Andrew Burgess  <andrew.burgess@embecosm.com>
4501
4502         * linux-nat.c (linux_nat_target::follow_fork): Avoid using
4503         'W_STOPCODE (0)' as this could be ambiguous.
4504
4505 2018-08-03  Sergio Durigan Junior  <sergiodj@redhat.com>
4506
4507         * ser-tcp.c (net_open): Fix thinko when deciding whether to
4508         disable TCP's Nagle algorithm (use "ai_protocol" instead of
4509         "ai_socktype").
4510
4511 2018-08-02  Tom Tromey  <tom@tromey.com>
4512
4513         PR symtab/16842.
4514         * dwarf2read.c (read_func_scope): Set symtab on template parameter
4515         symbols.
4516         (process_structure_scope): Likewise.
4517
4518 2018-08-02  Xavier Roirand  <roirand@adacore.com>
4519
4520         PR gdb/22629:
4521         * darwin-nat.c (darwin_kill_inferior): Fix handling of
4522         kill inferior.
4523
4524 2018-08-02  Tom Tromey  <tom@tromey.com>
4525
4526         * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
4527         (darwin_suspend_inferior, darwin_resume_inferior)
4528         (darwin_decode_notify_message, darwin_resume_inferior_threads)
4529         (darwin_check_new_threads): Check result of get_darwin_inferior.
4530
4531 2018-07-31  Joel Brobecker  <brobecker@adacore.com>
4532
4533         GDB 8.1.1 released.
4534
4535 2018-07-31  Jan Vrany  <jan.vrany@fit.cvut.cz>
4536
4537         * varobj.c (varobj_get_path_expr_parent): Report an error if
4538         parent is a dynamic varobj.
4539
4540 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
4541
4542         * gnulib/aclocal.m4: Re-generate.
4543         * gnulib/config.in: Re-generate.
4544         * gnulib/configure: Re-generate.
4545         * gnulib/import/Makefile.in: Re-generate.
4546         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
4547         * gnulib/import/m4/onceonly.m4: Re-generate.
4548
4549 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
4550
4551         * target-descriptions.c (struct xml_test_tdesc): New.
4552         (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
4553         (record_xml_tdesc): Update.
4554         (maintenance_check_xml_descriptions): Update.
4555         * target-descriptions.h (record_xml_tdesc): Update comment.
4556
4557 2018-07-30  Andrew Burgess  <andrew.burgess@embecosm.com>
4558
4559         * eval.c (evaluate_subexp_for_sizeof): Check for array type before
4560         checking array bounds are defined.
4561
4562 2018-07-30  Tom Tromey  <tom@tromey.com>
4563
4564         * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
4565         irreflexivity violation.
4566
4567 2018-07-30  Tom Tromey  <tom@tromey.com>
4568
4569         * cli/cli-decode.c (lookup_cmd): Remove lint code.
4570         * value.c (unpack_long): Remove lint code.
4571         * valops.c (value_ind): Remove lint code.
4572         * valarith.c (value_x_binop, value_x_unop, value_equal)
4573         (value_pos): Remove lint code.
4574
4575 2018-07-28  Tom de Vries  <tdevries@suse.de>
4576
4577         * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
4578         with undefined upper bound as <optimized out>.
4579
4580 2018-07-27  Sergio Durigan Junior  <sergiodj@redhat.com>
4581
4582         * gcore.in: Rename variable "name" to "prefix".  Expand
4583         "usage" text.
4584
4585 2018-07-14  Jon Turney  <jon.turney@dronecode.org.uk>
4586
4587         * windows-nat.c (windows_nat_target::create_inferior): Update to
4588         call close() in global namespace.
4589
4590 2018-07-26  Tom Tromey  <tom@tromey.com>
4591
4592         * dwarf-index-write.c (add_address_entry): Don't add objfile
4593         offsets.
4594         * dbxread.c (find_stab_function): Rename from
4595         find_stab_function_addr.  Return a bound_minimal_symbol.
4596         (read_dbx_symtab): Use raw_text_low, raw_text_high.
4597         Don't add objfile offsets.
4598         (end_psymtab): Use raw_text_low, raw_text_high,
4599         MSYMBOL_VALUE_RAW_ADDRESS.
4600         (read_ofile_symtab): Update.
4601         (process_one_symbol): Update.
4602         * dwarf2read.c (create_addrmap_from_index): Don't add objfile
4603         offsets.
4604         (dw2_relocate): Remove.
4605         (dw2_find_pc_sect_symtab): Bias PC by the text offset before
4606         searching addrmap.
4607         (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
4608         Update.
4609         (process_psymtab_comp_unit_reader, add_partial_symbol)
4610         (add_partial_subprogram, dwarf2_ranges_read): Update.
4611         (load_partial_dies): Update.
4612         (add_address_entry): Don't add objfile offsets.
4613         (dwarf2_build_include_psymtabs): Update.
4614         (create_addrmap_from_aranges): Don't add objfile offsets.
4615         (dw2_find_pc_sect_compunit_symtab): Update.
4616         * mdebugread.c (parse_symbol): Don't add objfile offsets.
4617         (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
4618         Update.
4619         (parse_partial_symbols): Don't add objfile offsets.  Use
4620         raw_text_low, raw_text_high.  Update.
4621         (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
4622         * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
4623         or call 'relocate' quick function.  Clear psymbol_map.
4624         * psympriv.h (struct partial_symbol) <address>: Add section
4625         offset.
4626         <set_unrelocated_address>: Rename from set_address.
4627         <raw_text_low, raw_text_high>: New methods.
4628         <text_low, text_high>: Add objfile parameter.
4629         (add_psymbol_to_bcache): Add 'section' parameter.  Call
4630         set_unrelocated_address.
4631         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
4632         (find_pc_psymbol): Update.
4633         (fixup_psymbol_section, relocate_psymtabs): Remove.
4634         (dump_psymtab, psym_functions): Update.
4635         (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
4636         parameter.
4637         (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
4638         (start_psymtab_common): Update.
4639         * symfile-debug.c (debug_qf_relocate): Remove.
4640         (debug_sym_quick_functions): Update.
4641         * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
4642         * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
4643         Update.
4644
4645 2018-07-26  Tom Tromey  <tromey@redhat.com>
4646
4647         * dbxread.c (end_psymtab): Use text_high_valid and
4648         text_low_valid.
4649         * mdebugread.c (parse_partial_symbols): Use text_low_valid.
4650         (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
4651         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
4652         Update comment.
4653         <text_low_valid, text_high_valid>: New fields.
4654         <set_text_low, set_text_high>: Update.
4655         * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
4656
4657 2018-07-26  Tom Tromey  <tom@tromey.com>
4658
4659         * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
4660         Update.
4661         * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
4662         textlow and texthigh fields.
4663         (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
4664         Update.
4665         * mdebugread.c (parse_lines, parse_partial_symbols)
4666         (psymtab_to_symtab_1): Update.
4667         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
4668         Rename fields.  Update comment.  Now private.
4669         <text_low, text_high, set_text_low, set_text_high>: New methods.
4670         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
4671         (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
4672         (start_psymtab_common, maintenance_info_psymtabs)
4673         (maintenance_check_psymtabs): Update.
4674         * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
4675         texthigh fields.
4676         (scan_xcoff_symtab): Update.
4677
4678 2018-07-26  Tom Tromey  <tromey@redhat.com>
4679
4680         * psympriv.h (struct partial_symbol) <unrelocated_address,
4681         address, set_address>: New methods.
4682         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
4683         (fixup_psymbol_section, relocate_psymtabs): Update.
4684         (print_partial_symbols): Add 'objfile' parameter.  Update.
4685         (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
4686         Update.
4687
4688 2018-07-26  Tom Tromey  <tom@tromey.com>
4689
4690         * dwarf-index-write.c (write_psymbols, debug_names::insert)
4691         (debug_names::write_psymbols): Update.
4692         * psympriv.h (struct partial_symbol): Derive from
4693         general_symbol_info.
4694         <obj_section>: New method.
4695         (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
4696         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
4697         (find_pc_sect_psymbol, fixup_psymbol_section)
4698         (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
4699         (print_partial_symbols, recursively_search_psymtabs)
4700         (compare_psymbols, psymbol_hash, psymbol_compare)
4701         (add_psymbol_to_bcache, maintenance_check_psymtabs)
4702         (psymbol_name_matches, psym_fill_psymbol_map): Update.
4703
4704 2018-07-26  Tom Tromey  <tromey@redhat.com>
4705
4706         * dbxread.c (end_psymtab): Remove dead code.
4707
4708 2018-07-26  Andrew Burgess  <andrew.burgess@embecosm.com>
4709
4710         * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
4711         DWARF unwinders are disabled.
4712         * dwarf2-frame.c: Add dwarf2read.h include.
4713         (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
4714         disabled.
4715         (dwarf2_frame_unwinders_enabled_p): Define.
4716         (show_dwarf_unwinders_enabled_p): New function.
4717         (_initialize_dwarf2_frame): Register switch to control DWARF
4718         unwinder use.
4719         * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
4720         * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
4721         (show_dwarf_cmdlist): Remove static keyword.
4722         * dwarf2read.h (set_dwarf_cmdlist): Declare.
4723         (show_dwarf_cmdlist): Declare.
4724         * NEWS: Document new feature.
4725
4726 2018-07-26  Tom de Vries  <tdevries@suse.de>
4727
4728         PR breakpoints/23366
4729         * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
4730
4731 2018-07-26  Tom de Vries  <tdevries@suse.de>
4732
4733         * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
4734         DW_AT_count can't be translated to a dynamic prop.
4735
4736 2018-07-25  Tom de Vries  <tdevries@suse.de>
4737
4738         * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
4739         try/catch.
4740
4741 2018-07-25  Jan Vrany  <jan.vrany@fit.cvut.cz>
4742
4743         * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
4744
4745 2018-07-25  Joel Brobecker  <brobecker@adacore.com>
4746
4747         * MAINTAINERS (Global Maintainers): Add Tom Tromey.
4748
4749 2018-07-24  Keith Seitz  <keiths@redhat.comt
4750
4751         PR symtab/23010
4752         * dwarf2read.c (dw2_add_symbol_to_list): New function.
4753         (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
4754         instead of add_symbol_to_list.
4755         (read_file_scope): Call prepare_one_comp_unit before reading
4756         any other DIEs.
4757
4758 2018-07-24  Simon Marchi  <simon.marchi@ericsson.com>
4759
4760         * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
4761
4762 2018-07-24  Tom Tromey  <tom@tromey.com>
4763
4764         * utils.c (malloc, realloc, free): Don't declare.
4765         * configure, config.in: Rebuild.
4766         * configure.ac: Don't check for declarations of free, malloc, or
4767         realloc.
4768
4769 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
4770
4771         * aarch64-linux-nat.c
4772         (aarch64_linux_nat_target::stopped_data_address): Remove unused
4773         variable.
4774         * arm-linux-nat.c (fetch_regs): Likewise.
4775         (store_regs): Likewise.
4776         (fetch_vfp_regs): Likewise.
4777         (store_vfp_regs): Likewise.
4778         (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
4779         (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
4780         (arm_linux_nat_target::insert_watchpoint): Likewise.
4781         (arm_linux_nat_target::remove_watchpoint): Likewise.
4782         * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
4783         Likewise.
4784         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
4785         Likewise.
4786         * ppc-linux-nat.c (fetch_register): Likewise.
4787         (fetch_all_gp_regs): Likewise.
4788         (fetch_ppc_registers): Likewise.
4789         (store_all_gp_regs): Likewise.
4790         (store_ppc_registers): Likewise.
4791         (hwdebug_insert_point): Likewise.
4792         (can_use_watchpoint_cond_accel): Likewise.
4793         * remote-sim.c (gdb_os_write_stdout): Likewise.
4794
4795 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
4796             Tom Tromey  <tom@tromey.com>
4797
4798         * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
4799         test for it.
4800         * configure: Rebuild.
4801
4802 2018-07-22  Tom Tromey  <tom@tromey.com>
4803
4804         * regformats/regdat.sh: Define xmltarget_${name} inside
4805         #ifndef IN_PROCESS_AGENT.
4806
4807 2018-07-22  Tom Tromey  <tom@tromey.com>
4808
4809         * value.c (value_fetch_lazy_bitfield): Remove unused variable.
4810
4811 2018-07-22  Tom Tromey  <tom@tromey.com>
4812
4813         * symfile.c (reread_symbols): Notify iter, not objfile.
4814
4815 2018-07-22  Tom Tromey  <tom@tromey.com>
4816
4817         * ravenscar-thread.c (ravenscar_thread_target::store_registers):
4818         Use arch_ops.
4819         (ravenscar_thread_target::prepare_to_store): Likewise.
4820
4821 2018-07-22  Tom Tromey  <tom@tromey.com>
4822
4823         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
4824         unused variable.  Call value_fetch_lazy when needed.
4825         * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
4826         Remove unused variable.  Call value_fetch_lazy when needed.
4827
4828 2018-07-22  Tom Tromey  <tom@tromey.com>
4829
4830         * m32c-tdep.c (mark_dma): Return void.
4831         (make_regs): Remove unused declarations.
4832
4833 2018-07-22  Tom Tromey  <tom@tromey.com>
4834
4835         * guile/scm-cmd.c (gdbscm_dont_repeat): Call
4836         cmdscm_get_valid_command_smob_arg_unsafe for effect.
4837         * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
4838         bkscm_get_valid_block_smob_arg_unsafe for effect.
4839
4840 2018-07-22  Tom Tromey  <tom@tromey.com>
4841
4842         * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
4843         value_type.
4844
4845 2018-07-22  Tom Tromey  <tom@tromey.com>
4846
4847         * windows-nat.c (saved_context): Conditionally define.
4848         * remote.c (remote_target::remote_btrace_maybe_reopen):
4849         Conditionally declare "warned".
4850         * inflow.c (sigquit_ours): Conditionally define.
4851         (new_tty): Move "tty" declaration inside #if.
4852         * guile/guile.c (guile_datadir): Conditionally define.
4853         * charset.c (set_be_le_names): Move some declarations inside #if.
4854         * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
4855         #if.
4856         (parse_xml_btrace_conf): Likewise.
4857
4858 2018-07-22  Tom Tromey  <tom@tromey.com>
4859
4860         * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
4861
4862 2018-07-22  Tom Tromey  <tom@tromey.com>
4863
4864         * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
4865         * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
4866         (vlscm_convert_typed_value_from_scheme): Remove unused variable.
4867         * buildsym-legacy.c (get_macro_table): Remove unused variable.
4868         * stack.c (frame_apply_level_command): Remove unused variable.
4869         * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
4870         * sparc64-tdep.c (adi_examine_command): Remove unused variable.
4871         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
4872         unused variable.
4873         * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
4874         * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
4875         * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
4876         variable.
4877         * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
4878         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
4879         variable.
4880         * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
4881         Remove unused variable.
4882         * cli/cli-script.c (recurse_read_control_structure): Remove unused
4883         variable.
4884         * common/tdesc.c (print_xml_feature::visit): Remove unused
4885         variable.
4886         * compile/compile-object-load.c (store_regs): Remove unused
4887         variables.
4888         * complaints.c (clear_complaints): Remove unused variable.
4889         * corelow.c (core_target_open): Remove unused variable.
4890         * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
4891         variable.
4892         * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
4893         variable.
4894         * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
4895         variable.
4896         * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
4897         variable.
4898         * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
4899         variable.
4900         * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
4901         variable.
4902         * ia64-tdep.c (examine_prologue): Remove unused variable.
4903         * infcall.c (run_inferior_call): Remove unused variable.
4904         * inferior.c (exit_inferior): Remove unused variable.
4905         * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
4906         * linespec.c (decode_line_2): Remove unused variable.
4907         * linux-nat.c (super_close): Remove.
4908         * linux-tdep.c (linux_info_proc): Remove unused variable.
4909         * mi/mi-main.c (mi_execute_command): Remove unused variable.
4910         * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
4911         Remove unused variable.
4912         * parse.c (find_minsym_type_and_address): Remove unused variable.
4913         * printcmd.c (info_symbol_command, printf_floating): Remove unused
4914         variable.
4915         * python/py-breakpoint.c (bppy_set_commands): Remove unused
4916         variable.
4917         * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
4918         variables.
4919         * record-btrace.c (record_btrace_target::store_registers): Remove
4920         unused variable.
4921         (cmd_show_record_btrace_cpu): Remove unused variable.
4922         * riscv-tdep.c (riscv_register_reggroup_p)
4923         (riscv_push_dummy_call, riscv_return_value): Remove unused
4924         variable.
4925         * rust-exp.y (literal): Remove unused variable.
4926         * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
4927         unused variable.
4928         <STRUCTOP_ANONYMOUS>: Likewise.
4929         * s390-linux-tdep.c (s390_linux_init_abi_31)
4930         (s390_linux_init_abi_64): Remove unused variable.
4931         * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
4932         (file_select_thread, net_windows_open, _initialize_ser_windows):
4933         Remove unused variables.
4934         * symtab.c (find_pc_sect_line): Remove unused variable.
4935         * target-memory.c (compute_garbled_blocks): Remove unused
4936         variable.
4937         (target_write_memory_blocks): Remove unused variable.
4938         * target.c (target_stack::unpush): Remove unused variables.
4939         * tracepoint.c (start_tracing, all_tracepoint_actions)
4940         (merge_uploaded_trace_state_variables)
4941         (print_one_static_tracepoint_marker): Remove unused variable.
4942         * unittests/basic_string_view/element_access/char/1.cc (test01):
4943         Remove unused variable.
4944         * windows-nat.c (windows_continue, windows_add_all_dlls)
4945         (do_initial_windows_stuff, windows_nat_target::create_inferior):
4946         Remove unused variables.
4947
4948 2018-07-21  Simon Marchi  <simon.marchi@polymtl.ca>
4949
4950         * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
4951         attr_profile in HAVE_ELF.
4952         * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
4953         HAVE_ELF.
4954
4955 2018-07-20  Simon Marchi  <simon.marchi@polymtl.ca>
4956
4957         * frame.c (frame_register_unwind): Change parameter name.
4958         (frame_unwind_register): Likewise.
4959         (frame_unwind_register_value): Likewise.
4960         (frame_unwind_register_signed): Likewise.
4961         (frame_unwind_register_unsigned): Likewise.
4962         * frame.h (frame_register_unwind): Likewise.
4963         (frame_unwind_register): Likewise.
4964         (frame_unwind_register_value): Likewise.
4965         (frame_unwind_register_signed): Likewise.
4966         (frame_unwind_register_unsigned): Likewise.
4967         (frame_unwind_arch): Likewise.
4968
4969 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
4970
4971         * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
4972         ISA maintenance.
4973
4974 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
4975
4976         * mips-linux-nat.c (mips_linux_nat_target::read_description):
4977         Call `get_ptrace_pid' rather than extracting the ptrace PID by
4978         hand.
4979
4980 2018-07-20  Keith Seitz  <keiths@redhat.com>
4981
4982         * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
4983         m_main_subfile, m_comp_dir, m_producer, m_debugformat,
4984         m_compunit_symtab, m_language>: Add "m_" prefix.
4985         Update all uses.
4986         * buildsym.c: Update all uses.
4987
4988 2018-07-20  Tom Tromey  <tom@tromey.com>
4989
4990         * buildsym-legacy.h (record_line): Don't use record_line_ftype.
4991         * buildsym.h (record_line_ftype): Remove typedef.
4992
4993 2018-07-20  Tom Tromey  <tom@tromey.com>
4994
4995         * buildsym-legacy.h (augment_type_symtab): Don't declare.
4996         (end_expandable_symtab): Likewise.
4997         (end_symtab_get_static_block): Likewise.
4998         (end_symtab_from_static_block): Likewise.
4999         * buildsym-legacy.c (augment_type_symtab): Remove.
5000         (end_expandable_symtab): Remove.
5001         (end_symtab_get_static_block): Remove.
5002         (end_symtab_from_static_block): Remove.
5003
5004 2018-07-20  Tom Tromey  <tom@tromey.com>
5005
5006         * dwarf2read.c: Include buildsym.h.
5007         (struct dwarf2_cu) <builder>: New method.
5008         (fixup_go_packaging): Update.
5009         (process_full_comp_unit, process_full_type_unit): Update.  Don't
5010         use scoped_free_pendings.
5011         (using_directives): Add "cu" parameter, remove "language".
5012         (read_import_statement, setup_type_unit_groups, )
5013         (read_func_scope, read_lexical_block_scope)
5014         (dwarf2_record_block_ranges, read_namespace): Update.
5015         (lnp_state_machine::lnp_state_machine): Add cu parameter.
5016         (lnp_state_machine::handle_end_sequence): Update.
5017         (class lnp_state_machine) <m_cu>: New member.
5018         <m_record_line_callback>: Remove.
5019         <m_currently_recording_lines>: New member.
5020         (lnp_state_machine::handle_set_file): Update.
5021         (noop_record_line): Remove.
5022         (dwarf_record_line_p): Add cu parameter.
5023         (dwarf_record_line_1, dwarf_finish_line): Likewise.
5024         (lnp_state_machine::record_line)
5025         (lnp_state_machine::lnp_state_machine)
5026         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
5027         (dwarf_decode_lines): Update.
5028         (dwarf2_start_subfile): Add cu parameter.
5029         (dwarf2_start_symtab, new_symbol): Update.
5030         (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
5031         Remove dwarf2_per_objfile parameter.
5032         (dwarf_decode_macros): Update.
5033
5034 2018-07-20  Tom Tromey  <tom@tromey.com>
5035
5036         * stabsread.c (define_symbol): Update.
5037         * buildsym-legacy.h (get_buildsym_compunit): Declare.
5038         * dwarf2read.c (new_symbol): Update.
5039         * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
5040         * cp-namespace.c: Include buildsym.h.
5041         (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
5042         * buildsym-legacy.c (get_buildsym_compunit): New function.
5043
5044 2018-07-20  Tom Tromey  <tom@tromey.com>
5045
5046         * xcoffread.c: Include buildsym-legacy.h.
5047         * windows-nat.c: Include buildsym-legacy.h.
5048         * stabsread.c: Include buildsym-legacy.h.
5049         * mdebugread.c: Include buildsym-legacy.h.
5050         * buildsym-legacy.h: New file.
5051         * buildsym-legacy.c: New file, from buildsym.c.
5052         * go32-nat.c: Include buildsym-legacy.h.
5053         * dwarf2read.c: Include buildsym-legacy.h.
5054         * dbxread.c: Include buildsym-legacy.h.
5055         * cp-namespace.c: Include buildsym-legacy.h.
5056         * coffread.c: Include buildsym-legacy.h.
5057         * buildsym.h: Move some contents to buildsym-legacy.h.
5058         * buildsym.c: Include buildsym-legacy.h.  Move many functions to
5059         buildsym-legacy.c.
5060         * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
5061
5062 2018-07-20  Tom Tromey  <tom@tromey.com>
5063
5064         * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
5065         * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
5066         (buildsym_compunit::buildsym_compunit)
5067         (buildsym_compunit::~buildsym_compunit)
5068         (buildsym_compunit::get_macro_table): Define.
5069
5070 2018-07-20  Tom Tromey  <tom@tromey.com>
5071
5072         * buildsym.c (reset_symtab_globals): Remove.
5073         (buildsym_compunit::end_symtab_from_static_block): Update.
5074         (buildsym_compunit::augment_type_symtab): Update.
5075         (end_symtab_from_static_block): Call free_buildsym_compunit.
5076         (augment_type_symtab, end_symtab, end_expandable_symtab):
5077         Likewise.
5078
5079 2018-07-20  Tom Tromey  <tom@tromey.com>
5080
5081         * arch-utils.c: Do not include buildsym.h.
5082         * mipsread.c: Do not include buildsym.h.
5083         * machoread.c: Do not include buildsym.h.
5084         * elfread.c: Do not include buildsym.h.
5085
5086 2018-07-20  Tom Tromey  <tom@tromey.com>
5087
5088         * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
5089         initialization.
5090         (buildsym_compunit): Add new constructor.
5091         (struct buildsym_compunit) <get_last_source_file, finish_block,
5092         record_block_range, start_subfile, patch_subfile_names,
5093         push_subfile, pop_subfile, record_line, get_compunit_symtab,
5094         set_last_source_start_addr, get_last_source_start_addr,
5095         get_local_using_directives, set_local_using_directives,
5096         get_global_using_directives, outermost_context_p,
5097         get_current_context_stack, get_context_stack_depth,
5098         get_current_subfile, get_local_symbols, get_file_symbols,
5099         get_global_symbols, record_debugformat, record_producer,
5100         push_context, pop_context, end_symtab_get_static_block,
5101         end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
5102         New public methods.
5103         <record_pending_block, finish_block_internal, make_blockvector,
5104         watch_main_source_file_lossage, end_symtab_with_blockvector>: New
5105         private methods.
5106         Update all users.
5107
5108 2018-05-22  Tom Tromey  <tom@tromey.com>
5109
5110         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
5111         parameter.
5112         (finish_block_internal): Update.
5113
5114 2018-07-20  Tom Tromey  <tom@tromey.com>
5115
5116         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
5117         parameter.
5118         (finish_block_internal): Update.
5119
5120 2018-07-20  Tom Tromey  <tom@tromey.com>
5121
5122         * buildsym.h (EXTERN): Don't define or undef.
5123         * buildsym.c (EXTERN): Don't define.
5124
5125 2018-07-20  Tom Tromey  <tom@tromey.com>
5126
5127         * buildsym.c: Remove TODO comment.
5128
5129 2018-07-20  Tom Tromey  <tom@tromey.com>
5130
5131         * coffread.c (coff_symtab_read): Update.
5132         * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
5133         (xcoff_new_init): Update.
5134         * mipsread.c (mipscoff_new_init): Update.
5135         * mdebugread.c (mdebug_build_psymtabs): Update.
5136         * elfread.c (elf_new_init): Update.
5137         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
5138         Update.
5139         * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
5140         (coffstab_build_psymtabs, elfstab_build_psymtabs)
5141         (stabsect_build_psymtabs): Update.
5142         * buildsym.h (buildsym_init): Don't declare.
5143         * buildsym.c: Update comment.
5144         (prepare_for_building): Remove.
5145         (start_symtab, restart_symtab): Update.
5146         (reset_symtab_globals): Update comment.
5147         (buildsym_init): Remove.
5148
5149 2018-07-20  Tom Tromey  <tom@tromey.com>
5150
5151         * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
5152         * stabsread.c (patch_block_stabs, define_symbol, read_type)
5153         (read_enum_type, common_block_start, common_block_end)
5154         (cleanup_undefined_types_1, finish_global_stabs): Update.
5155         * mdebugread.c (psymtab_to_symtab_1): Update.
5156         * dwarf2read.c (fixup_go_packaging, read_func_scope)
5157         (read_lexical_block_scope, new_symbol): Update.
5158         * dbxread.c (process_one_symbol): Update.
5159         * coffread.c (coff_symtab_read, process_coff_symbol)
5160         (coff_read_enum_type): Update.
5161         * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
5162         declare.
5163         (get_local_symbols, get_file_symbols, get_global_symbols): New
5164         functions.
5165         * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
5166         m_global_symbols.
5167         <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
5168         (~scoped_free_pendings): Update.
5169         (finish_block, prepare_for_building, reset_symtab_globals)
5170         (end_symtab_get_static_block, end_symtab_with_blockvector)
5171         (augment_type_symtab, push_context): Update.
5172         (get_local_symbols, get_file_symbols, get_global_symbols): New
5173         functions.
5174         (buildsym_init): Update.
5175
5176 2018-07-20  Tom Tromey  <tom@tromey.com>
5177
5178         * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
5179         (process_full_type_unit): Likewise.
5180         (dwarf2_start_symtab): Set list_in_scope.
5181
5182 2018-07-20  Tom Tromey  <tom@tromey.com>
5183
5184         * dwarf2read.c (process_psymtab_comp_unit_reader)
5185         (build_type_psymtabs_reader): Do not set list_in_scope.
5186
5187 2018-07-20  Tom Tromey  <tom@tromey.com>
5188
5189         * buildsym.c (free_pendings): Remove.
5190         (add_symbol_to_list, scoped_free_pendings)
5191         (finish_block_internal, buildsym_init): Update.
5192
5193 2018-07-20  Tom Tromey  <tom@tromey.com>
5194
5195         * xcoffread.c (read_xcoff_symtab): Update.
5196         * dwarf2read.c (read_func_scope, read_lexical_block_scope):
5197         Update.
5198         * dbxread.c (process_one_symbol): Update.
5199         * coffread.c (coff_symtab_read): Update.
5200         * buildsym.h (finish_block): Update.
5201         * buildsym.c (finish_block): Remove "listhead" argument.
5202         (end_symtab_get_static_block): Update.
5203
5204 2018-07-20  Tom Tromey  <tom@tromey.com>
5205
5206         * buildsym.h (class scoped_free_pendings): Remove constructor.
5207         * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
5208         method.
5209         <m_pending_block_obstack, m_pending_blocks>: New members.
5210         (pending_block_obstack, pending_blocks): Remove.
5211         (scoped_free_pendings::scoped_free_pendings): Default.
5212         (~scoped_free_pendings): Update.
5213         (free_pending_blocks): Remove.
5214         (finish_block_internal, record_pending_block, make_blockvector)
5215         (end_symtab_get_static_block, augment_type_symtab, push_context)
5216         (buildsym_init): Update.
5217
5218 2018-07-20  Tom Tromey  <tom@tromey.com>
5219
5220         * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
5221         m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
5222         members.
5223         (pending_addrmap, pending_addrmap_obstack)
5224         (pending_addrmap_interesting): Remove.
5225         (scoped_free_pendings, record_block_range, make_blockvector)
5226         (prepare_for_building, reset_symtab_globals, buildsym_init):
5227         Update.
5228
5229 2018-07-20  Tom Tromey  <tom@tromey.com>
5230
5231         * xcoffread.c (process_linenos): Update.
5232         * stabsread.c (define_symbol, read_type, read_enum_type): Update.
5233         * mdebugread.c (psymtab_to_symtab_1): Update.
5234         * dwarf2read.c (setup_type_unit_groups)
5235         (lnp_state_machine::handle_set_file, dwarf_record_line_p)
5236         (lnp_state_machine::record_line, dwarf_decode_lines): Update.
5237         * dbxread.c (process_one_symbol): Update.
5238         * coffread.c (coff_symtab_read, enter_linenos)
5239         (process_coff_symbol): Update.
5240         * buildsym.h (current_subfile): Don't declare.
5241         (get_current_subfile): Declare.
5242         * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
5243         member.
5244         (start_subfile, free_buildsym_compunit, push_subfile)
5245         (prepare_for_building, start_symtab): Update.
5246         (get_current_subfile): New function.
5247
5248 2018-07-20  Tom Tromey  <tom@tromey.com>
5249
5250         * coffread.c (coff_symtab_read): Update.
5251         * xcoffread.c (read_xcoff_symtab): Update.
5252         * dwarf2read.c (new_symbol): Update.
5253         (read_func_scope, read_lexical_block_scope): Update.
5254         * dbxread.c (process_one_symbol): Update.
5255         * buildsym.h (context_stack, context_stack_depth): Don't declare.
5256         (outermost_context_p): Remove macro.
5257         (outermost_context_p, get_current_context_stack)
5258         (get_context_stack_depth): Declare.
5259         (pop_context): Return struct context_stack.
5260         * buildsym.c (struct buildsym_compunit) <m_context_stack: New
5261         member.
5262         (context_stack_size): Remove.
5263         (INITIAL_CONTEXT_STACK_SIZE): Remove.
5264         (prepare_for_building, end_symtab_get_static_block)
5265         (augment_type_symtab, push_context): Update.
5266         (pop_context): Return struct context_stack.
5267         (outermost_context_p, get_current_context_stack)
5268         (get_context_stack_depth): New functions.
5269         (buildsym_init): Update.
5270
5271 2018-07-20  Tom Tromey  <tom@tromey.com>
5272
5273         * rust-exp.y: Now a pure parser.  Update all rules.
5274         (%union): Move earlier.
5275         (current_parser, work_obstack): Remove globals.
5276         (rust_parser, ~rust_parser): Update.
5277         (class rust_parser) <copy_name, concat3, crate_name, super_name,
5278         lex_character, lex_number, lex_string, lex_identifier,
5279         rust_lookup_type, convert_params_to_types, convert_ast_to_type,
5280         convert_name, convert_params_to_expression,
5281         convert_ast_to_expression, ast_basic_type, ast_operation,
5282         ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
5283         ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
5284         ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
5285         ast_array_type, ast_slice_type, ast_reference_type,
5286         ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
5287         (rust_parse): Update.
5288         (rustyyerror, rustyylex): Add parser parameter.
5289         (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
5290         (rust_lex_stringish_test, rust_lex_test_sequence)
5291         (rust_lex_test_trailing_dot, rust_lex_test_completion)
5292         (rust_lex_test_push_back, rust_lex_tests): Update.
5293
5294 2018-07-19  Pedro Alves  <palves@redhat.com>
5295
5296         * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
5297         gdb::unique_xmalloc_ptr.
5298         * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
5299         Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
5300         * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
5301         copy-initialization.
5302         * guile/scm-pretty-print.c (ppscm_print_children): Use
5303         gdb::unique_xmalloc_ptr instead of cleanups.
5304         (gdbscm_apply_val_pretty_printer): Remove cleanups.
5305         * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
5306         gdb::unique_xmalloc_ptr.
5307         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
5308         Adjust to use gdb::unique_xmalloc_ptr.
5309         * guile/scm-utils.c (extract_arg): Adjust.
5310         * guile/scm-value.c (gdbscm_value_field): Adjust to use
5311         gdb::unique_xmalloc_ptr instead of a cleanup.
5312
5313 2018-07-19  Tom Tromey  <tom@tromey.com>
5314
5315         * utils.c (do_value_free_to_mark)
5316         (make_cleanup_value_free_to_mark): Remove.
5317         * utils.h (make_cleanup_value_free_to_mark): Remove.
5318
5319 2018-07-19  Pedro Alves  <palves@redhat.com>
5320
5321         * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
5322         forwarding reference.
5323
5324 2018-07-18  Pedro Alves  <palves@redhat.com>
5325
5326         * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
5327         gdbscm_wrap.  Use gdb::unique_xmalloc_ptr<char> instead of a
5328         cleanup.
5329
5330 2018-07-18  Pedro Alves  <palves@redhat.com>
5331
5332         * guile/guile-internal.h: Add comment about mixing GDB and Scheme
5333         exceptions.
5334         (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
5335         (gdbscm_wrap): New.
5336         * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
5337         directly instead of a cleanup.
5338         * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
5339         (vlscm_unop): ... this.  Reimplement using gdbscm_wrap.
5340         (vlscm_binop_gdbthrow): New, factored out from ...
5341         (vlscm_binop): ... this.  Reimplement using gdbscm_wrap.
5342         (vlscm_rich_compare): Use gdbscm_wrap.
5343         * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
5344         instead of a cleanup.
5345         (gdbscm_lookup_global_symbol): Use xfree directly instead of a
5346         cleanup.
5347         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
5348         Use xfree directly instead of a cleanup.
5349         * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
5350         Adjust to use gdbscm_wrap and scoped_value_mark.
5351         (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
5352         (gdbscm_value_address, gdbscm_value_dereference)
5353         (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
5354         scoped_value_mark.
5355         (gdbscm_value_dynamic_type): Use scoped_value_mark.
5356         (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
5357         scoped_value_mark.
5358         (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
5359         gdbscm_wrap and scoped_value_mark.
5360         (gdbscm_value_to_string): Use xfree directly instead of a
5361         cleanup.  Move 'buffer' unique_ptr to TRY scope.
5362         (gdbscm_value_to_lazy_string): Use xfree directly instead of a
5363         cleanup.  Move 'buffer' unique_ptr to TRY scope.  Use
5364         scoped_value_mark.
5365         (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
5366         (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
5367         scoped_value_mark.
5368         (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
5369         gdbscm_wrap.
5370
5371 2018-07-18  Tom de Vries  <tdevries@suse.de>
5372
5373         * findvar.c (default_read_var_value): Also resolve dynamic type for
5374         LOC_OPTIMIZED_OUT vars.
5375
5376 2018-07-18  Maciej W. Rozycki  <macro@mips.com>
5377
5378         * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
5379         decoding.
5380
5381 2018-07-17  Tom Tromey  <tom@tromey.com>
5382
5383         * guile/scm-param.c (pascm_set_func, pascm_show_func)
5384         (compute_enum_list, pascm_set_param_value_x)
5385         (gdbscm_parameter_value): Update.
5386         * guile/guile-internal.h (gdbscm_scm_to_string): Update.
5387         (gdbscm_scm_to_host_string): Update.
5388         * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
5389         Update.
5390         * guile/scm-cmd.c (cmdscm_add_completion): Update.
5391         * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
5392         * guile/scm-string.c (gdbscm_scm_to_string): Return
5393         unique_xmalloc_ptr.
5394         (gdbscm_scm_to_host_string): Likewise.
5395
5396 2018-07-17  Tom Tromey  <tom@tromey.com>
5397
5398         * guile/guile.c (gdbscm_eval_from_control_command): Update.
5399         * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
5400         * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
5401         * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
5402         unique_xmalloc_ptr.
5403
5404 2018-07-17  Tom Tromey  <tom@tromey.com>
5405
5406         * guile/scm-param.c (pascm_signal_setshow_error): Update.
5407         * guile/guile-internal.h (gdbscm_exception_message_to_string):
5408         Update.
5409         * guile/scm-cmd.c (cmdscm_function): Update.
5410         * guile/scm-pretty-print.c
5411         (ppscm_print_exception_unless_memory_error): Update.
5412         * guile/scm-exception.c (gdbscm_exception_message_to_string):
5413         Return unique_xmalloc_ptr.
5414
5415 2018-07-17  Tom Tromey  <tom@tromey.com>
5416
5417         * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
5418         Use string_printf.
5419
5420 2018-07-17  Jim Wilson  <jimw@sifive.com>
5421
5422         * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
5423         set_gdbarch_decr_pc_after_break.  Call riscv_read_misa_reg always.
5424         (riscv_gdbarch_init): Delete local has_compressed_isa.  Delete now
5425         unecessary braces after EF_RISCV_RVC test.  Delete call to
5426         set_gdbarch_decr_pc_after_break.
5427
5428         * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
5429         RISCV_LAST_FP_REGNUM + 1.
5430         (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
5431
5432 2018-07-17  Tom Tromey  <tom@tromey.com>
5433
5434         * configure.ac: Remove --disable-gdbcli.
5435         * configure: Rebuild.
5436         * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
5437         (SUBDIR_CLI_CFLAGS): Remove.
5438         (SFILES): Use SUBDIR_CLI_SRCS.
5439         (COMMON_OBS): Use SUBDIR_CLI_OBS.
5440
5441 2018-07-17  Tom Tromey  <tom@tromey.com>
5442
5443         PR gdb/18624:
5444         * coffread.c (coff_symtab_read): Use scoped_free_pendings.
5445
5446 2018-07-16  Jim Wilson  <jimw@sifive.com>
5447
5448         * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
5449
5450 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
5451
5452         * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
5453         variable.
5454         (libunwind_frame_sniffer): Likewise.
5455         (libunwind_frame_prev_register): Likewise.
5456         (libunwind_sigtramp_frame_sniffer): Likewise.
5457         * ia64-tdep.c (ia64_access_reg): Likewise.
5458         (ia64_access_rse_reg): Likewise.
5459         (ia64_libunwind_sigtramp_frame_this_id): Likewise.
5460         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
5461
5462 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
5463
5464         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
5465
5466 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
5467
5468         * remote-sim.c (gdbsim_target::close,
5469         gdbsim_target::mourn_inferior): Remove unused variables.
5470
5471 2018-07-16  Simon Marchi  <simon.marchi@polymtl.ca>
5472
5473         * ia64-tdep.c (ktab_buf): New global.
5474         (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
5475         (get_kernel_table): Adjust.
5476
5477 2018-07-16  Tom Tromey  <tom@tromey.com>
5478
5479         * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
5480         * dwarf2read.c (using_directives, new_symbol): Use
5481         outermost_context_p.
5482         * dbxread.c (process_one_symbol): Use outermost_context_p.
5483         * coffread.c (coff_symtab_read): Use outermost_context_p.
5484
5485 2018-07-16  Tom Tromey  <tom@tromey.com>
5486
5487         * dwarf2read.c (using_directives, read_func_scope)
5488         (read_lexical_block_scope): Update.
5489         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
5490         * buildsym.h (local_using_directives, global_using_directives):
5491         Don't declare.
5492         (get_local_using_directives, set_local_using_directives)
5493         (get_global_using_directives): Declare.
5494         * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
5495         m_global_using_directives>: New members.
5496         (finish_block_internal, prepare_for_building)
5497         (reset_symtab_globals, end_symtab_get_static_block)
5498         (push_context): Update.
5499         (get_local_using_directives, set_local_using_directives)
5500         (get_global_using_directives): New functions.
5501         (buildsym_init): Update.
5502
5503 2018-07-16  Tom Tromey  <tom@tromey.com>
5504
5505         * xcoffread.c (xcoff_initial_scan): Don't call
5506         free_pending_blocks.
5507         * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
5508         * buildsym.h (class scoped_free_pendings): Add constructor.
5509         (free_pending_blocks): Don't declare.
5510         * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
5511         (free_pending_blocks): Now static.
5512
5513 2018-07-16  Tom Tromey  <tom@tromey.com>
5514
5515         * buildsym.h (push_subfile, pop_subfile): Update declarations.
5516         * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
5517         member.
5518         (struct subfile_stack): Remove.
5519         (subfile_stack): Remove.
5520         (push_subfile, pop_subfile, buildsym_init): Update.
5521
5522 2018-07-16  Tom Tromey  <tom@tromey.com>
5523
5524         * buildsym.c (push_subfile): Use gdb_assert.
5525         (pop_subfile): Use gdb_assert.
5526
5527 2018-07-16  Tom Tromey  <tom@tromey.com>
5528
5529         * buildsym.h (merge_symbol_lists): Remove.
5530         * buildsym.c (merge_symbol_lists): Remove.
5531
5532 2018-07-16  Tom Tromey  <tom@tromey.com>
5533
5534         * stabsread.c (scan_file_globals): Update comment.
5535         * stabsread.h (scan_file_globals): Move from buildsym.h.
5536         * buildsym.h (scan_file_globals): Move to stabsread.h.
5537
5538 2018-07-16  Tom Tromey  <tom@tromey.com>
5539
5540         * xcoffread.c (xcoff_new_init): Update.
5541         * mipsread.c (mipscoff_new_init): Update.
5542         * mdebugread.c (mdebug_build_psymtabs): Update.
5543         * elfread.c (elf_new_init): Update.
5544         * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
5545         (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
5546         * buildsym.h (buildsym_new_init): Don't declare.
5547         * buildsym.c (buildsym_new_init): Remove.
5548
5549 2018-07-16  Tom Tromey  <tom@tromey.com>
5550
5551         * stabsread.h (within_function): Move from buildsym.h.
5552         * stabsread.c (start_stabs): Clear within_function.
5553         * coffread.c (coff_start_symtab): Clear within_function.
5554         * buildsym.h (within_function): Move to stabsread.h.
5555         * buildsym.c (prepare_for_building): Update.
5556
5557 2018-07-16  Tom Tromey  <tom@tromey.com>
5558
5559         * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
5560         * dwarf2read.c (dwarf2_start_symtab): Don't set
5561         processing_gcc_compilation.
5562         * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
5563
5564 2018-07-16  Tom Tromey  <tom@tromey.com>
5565
5566         * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
5567         (next_symbol_text_func): Move from buildsym.h.
5568         * stabsread.c (hashname): Move from buildsym.c.
5569         * buildsym.h (HASHSIZE, symnum, next_symbol_text)
5570         (next_symbol_text_func, hashname): Move to stabsread.h.
5571         * buildsym.c: Don't include bcache.h
5572         (hashname): Move to stasbread.c.
5573
5574 2018-07-16  Tom Tromey  <tom@tromey.com>
5575
5576         * buildsym.h (context_stack_size): Don't declare.
5577         * buildsym.c (context_stack_size): New global.
5578
5579 2018-07-16  Tom Tromey  <tom@tromey.com>
5580
5581         * dbxread.c (processing_acc_compilation): New global.
5582         * buildsym.h (processing_acc_compilation): Don't declare.
5583
5584 2018-07-16  Tom Tromey  <tom@tromey.com>
5585
5586         * xcoffread.c (aix_process_linenos, complete_symtab): Update.
5587         * dbxread.c (read_ofile_symtab): Update.
5588         * coffread.c (coff_start_symtab, coff_end_symtab): Update.
5589         * buildsym.h (last_source_start_addr): Remove.
5590         (set_last_source_start_addr, get_last_source_start_addr):
5591         Declare.
5592         * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
5593         parameter.
5594         (struct buildsym_compunit) <m_last_source_start_addr>: New
5595         member.
5596         (prepare_for_building): Remove start_addr parameter.
5597         (start_symtab, restart_symtab, end_symtab_get_static_block)
5598         (end_symtab_with_blockvector): Update.
5599         (set_last_source_start_addr, get_last_source_start_addr): New
5600         functions.
5601
5602 2018-07-16  Tom Tromey  <tom@tromey.com>
5603
5604         * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
5605         member.
5606         (have_line_numbers): Remove.
5607         (record_line, prepare_for_building, end_symtab_get_static_block)
5608         (augment_type_symtab): Update.
5609
5610 2018-07-16  Tom Tromey  <tom@tromey.com>
5611
5612         * buildsym.c (~buildsym_compunit): Free the macro table.
5613         (struct buildsym_compunit) <get_macro_table, release_macros>: New
5614         methods.
5615         <m_pending_macros>: New member.
5616         (pending_macros): Remove.
5617         (~scoped_free_pendings, get_macro_table, prepare_for_building)
5618         (reset_symtab_globals, end_symtab_get_static_block)
5619         (end_symtab_with_blockvector, augment_type_symtab)
5620         (buildsym_init): Update.
5621
5622 2018-07-16  Tom Tromey  <tom@tromey.com>
5623
5624         * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
5625         parameter.
5626         (buildsym_compunit::set_last_source_file): New method.
5627         <m_last_source_file>: New member.
5628         (prepare_for_building): Remove "name" parameter.
5629         (start_symtab, restart_symtab, reset_symtab_globals): Update.
5630         (last_source_file): Remove.
5631         (set_last_source_file, get_last_source_file): Update.
5632
5633 2018-07-16  Tom Tromey  <tom@tromey.com>
5634
5635         * buildsym.c (prepare_for_building): Add assert.
5636
5637 2018-07-16  Tom Tromey  <tom@tromey.com>
5638
5639         * buildsym.c (~buildsym_compunit): Update.
5640         (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
5641         (start_subfile, patch_subfile_names)
5642         (end_symtab_with_blockvector): Update.
5643
5644 2018-07-16  Tom Tromey  <tom@tromey.com>
5645
5646         * buildsym.c (struct buildsym_compunit): Add constructor,
5647         destructor, initializers.
5648         (start_buildsym_compunit): Remove.
5649         (free_buildsym_compunit): Use "delete".
5650         (start_symtab, restart_symtab): Use "new".
5651
5652 2018-07-13  Simon Marchi  <simon.marchi@polymtl.ca>
5653
5654         * symfile.c (set_objfile_default_section_offset): Remove struct
5655         keyword.
5656
5657 2018-07-14  Stafford Horne  <shorne@gmail.com>
5658
5659         * (Responsible Maintainers): Add myself as or1k maintainer.
5660
5661 2018-07-13  Tom Tromey  <tom@tromey.com>
5662
5663         * symfile.c (set_objfile_default_section_offset): Use extra braces
5664         around initializer.
5665
5666 2018-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5667
5668         * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
5669         non-branching basr.
5670
5671 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5672
5673         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5674         unittests/cli-utils-selftests.c
5675         * unittests/cli-utils-selftests.c: New file.
5676
5677 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5678
5679         * NEWS: Mention new commands. Mention change to 'thread apply'.
5680
5681 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5682
5683         * thread.c (thr_try_catch_cmd): New function.
5684         (thread_apply_all_command): Handle qcs flags.
5685         (thread_apply_command): Handle qcs flags.
5686         (taas_command): New function.
5687         (tfaas_command): New function.
5688         (_initialize_thread): Update to setup the new commands 'taas
5689         and 'tfaas'. Change doc string for 'thread apply'.
5690
5691 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5692
5693         * stack.c: (trailing_outermost_frame): New function, mostly
5694         extracted from backtrace_command_1.
5695         (leading_innermost_frame): New function.
5696         (backtrace_command_1): Update to call trailing_outermost_frame.
5697         (frame_apply_command_count): New function.
5698         (frame_apply_level_command): New function.
5699         (frame_apply_all_command): New function.
5700         (frame_apply_command): New function.
5701         (faas_command): New function.
5702         (frame_cmd_list): New variable.
5703         (_initialize_stack): Update to setup the new commands 'frame apply'
5704         and 'faas'.
5705
5706 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5707
5708         * cli-utils.c (number_or_range_parser::get_number): Only handle
5709         numbers or convenience var as numbers.
5710         (parse_flags): New function.
5711         (parse_flags_qcs): New function.
5712         (number_or_range_parser::finished): Ensure parsing end is detected
5713         before end of string.
5714         * cli-utils.h (parse_flags): New function.
5715         (parse_flags_qcs): New function.
5716         (number_or_range_parser): Remove m_finished bool.
5717         (number_or_range_parser::skip_range): Set m_in_range to false.
5718
5719 2018-07-12  Sergio Durigan Junior  <sergiodj@redhat.com>
5720
5721         * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
5722         on Windows.
5723
5724 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
5725             Jan Kratochvil  <jan.kratochvil@redhat.com>
5726             Paul Fertser  <fercerpav@gmail.com>
5727             Tsutomu Seki  <sekiriki@gmail.com>
5728             Pedro Alves  <palves@redhat.com>
5729
5730         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5731         'unittests/parse-connection-spec-selftests.c'.
5732         (COMMON_SFILES): Add 'common/netstuff.c'.
5733         (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
5734         * NEWS (Changes since GDB 8.2): Mention IPv6 support.
5735         * common/netstuff.c: New file.
5736         * common/netstuff.h: New file.
5737         * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
5738         (wait_for_connect): Update comment.  New parameter
5739         'gdb::optional<int> sock' instead of 'struct serial *scb'.
5740         Use 'sock' directly instead of 'scb->fd'.
5741         (try_connect): New function, with code from 'net_open'.
5742         (net_open): Rewrite main loop to deal with multiple
5743         sockets/addresses.  Handle IPv6-style hostnames; implement
5744         support for IPv6 connections.
5745         * unittests/parse-connection-spec-selftests.c: New file.
5746
5747 2018-07-11  Pedro Alves  <palves@redhat.com>
5748
5749         PR gdb/23377
5750         * remote.c (remote_target::remote_detach_pid): Call
5751         set_current_process.
5752
5753 2018-07-11  Pedro Alves  <palves@redhat.com>
5754
5755         * h8300-tdep.c (h8300_gdbarch_init): Remove
5756         set_gdbarch_ecoff_reg_to_regnum calls.
5757
5758 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
5759
5760         PR c++/23373
5761         * c-typeprint.c (c_type_print_base_struct_union): Don't print
5762         offsets/sizes for static members of a class/struct.
5763
5764 2018-07-11  Alan Hayward  <alan.hayward@arm.com>
5765
5766         * target-descriptions.c (tdesc_register_bitsize): Rename.
5767         * target-descriptions.h (tdesc_register_bitsize): Likewise.
5768         * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
5769         * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
5770
5771 2018-07-10  Tom Tromey  <tom@tromey.com>
5772
5773         * breakpoint.c (moribund_locations): Now static and a
5774         std::vector.
5775         (breakpoint_init_inferior, moribund_breakpoint_here_p)
5776         (build_bpstat_chain, update_global_location_list)
5777         (breakpoint_retire_moribund): Update.
5778         * breakpoint.h (bp_location_p): Remove typedef.  Don't declare
5779         VEC.
5780
5781 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
5782
5783         * riscv-tdep.c (riscv_is_fp_regno_p): New function.
5784         (riscv_register_reggroup_p): Use new function, remove unneeded
5785         parenthesis.
5786         (riscv_push_dummy_call): Extend assert to compare against xlen or
5787         flen based on register type.
5788
5789 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
5790
5791         * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
5792
5793 2018-07-09  Andrew Burgess  <andrew.burgess@embecosm.com>
5794
5795         * remote.c (show_hardware_watchpoint_limit): New function.
5796         (show_hardware_watchpoint_length_limit): New function.
5797         (show_hardware_breakpoint_limit): New function.
5798         (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
5799         where appropriate, update help text.
5800
5801 2018-07-09  Tom Tromey  <tom@tromey.com>
5802
5803         * Makefile.in (CDEPS): Don't mention XM_CDEPS.
5804         (CLIBS): Don't mention NAT_CLIBS.
5805
5806 2018-07-09  Tom Tromey  <tom@tromey.com>
5807
5808         * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
5809         (LIBGDB_OBS, clean mostlyclean): Update.
5810         (gdb$(EXEEXT), insight$(EXEEXT)): Update.
5811
5812 2018-07-09  Tom Tromey  <tom@tromey.com>
5813
5814         * Makefile.in (%.c: %.y): Use ECHO_YACC.
5815         (%.c: %.l): Use ECHO_LEX.  Just fail if flex not available.
5816         * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
5817
5818 2018-07-09  Tom Tromey  <tom@tromey.com>
5819
5820         * Makefile.in (ALLDEPFILES): Remove exec.c.
5821         (COMMON_OBS): Remove exec.o.
5822         (COMMON_SFILES): Add exec.c.
5823
5824 2018-07-09  Tom Tromey  <tom@tromey.com>
5825
5826         * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
5827
5828 2018-07-09  Tom Tromey  <tom@tromey.com>
5829
5830         * Makefile.in (clean mostlyclean): Remove stamp-version.
5831         (version.c): Depend on stamp-version.
5832         (stamp-version): New rule, from version.c rule.
5833
5834 2018-07-09  Tom Tromey  <tom@tromey.com>
5835
5836         * Makefile.in (init.c): Depend on stamp-init.
5837         (stamp-init): New rule, from init.c rule.
5838         (clean mostlyclean): Remove stamp-init.
5839
5840 2018-07-09  Tom Tromey  <tom@tromey.com>
5841
5842         * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
5843         SUBDIR_GCC_COMPILE_SRCS.
5844
5845 2018-07-09  Tom Tromey  <tom@tromey.com>
5846
5847         * Makefile.in (init.c): Remove some unused sed rules.
5848
5849 2018-07-09  Tom Tromey  <tom@tromey.com>
5850
5851         * Makefile.in (TSOBS): Remove.
5852         (INIT_FILES): Update.
5853         (LIBGDB_OBS): Update.
5854         (COMMON_SFILES): Add inflow.c.
5855         (SFILES): Remove inflow.c.
5856
5857 2018-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
5858
5859         * contrib/gdb-add-index.sh ($dwarf5): New, use it.
5860
5861 2018-07-07  Simon Marchi  <simon.marchi@polymtl.ca>
5862
5863         * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
5864         get_saveloc_name, is_signal_frame_name, step_name,
5865         init_remote_name, create_addr_space_name,
5866         destroy_addr_space_name, search_unwind_table_name,
5867         find_dyn_list_name): Constify.
5868
5869 2018-07-05  Simon Marchi  <simon.marchi@polymtl.ca>
5870
5871         * darwin-nat.c (darwin_pthread_kill): New function.
5872         (darwin_resume_thread): Use darwin_pthread_kill.
5873
5874 2018-07-05  Tom de Vries  <tdevries@suse.de>
5875
5876         * macroexp.c (macro_buffer) <operator=>: New member function.
5877
5878 2018-07-04  Tom Tromey  <tom@tromey.com>
5879
5880         * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
5881
5882 2018-07-04  Simon Marchi  <simon.marchi@polymtl.ca>
5883
5884         * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
5885         * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
5886         * maint.c: Likewise.
5887         * top.c: Likewise.
5888
5889 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
5890
5891         * NEWS: Create a new section for the next release branch.
5892         Rename the section of the current branch, now that it has
5893         been cut.
5894
5895 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
5896
5897         GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
5898         * version.in: Bump version to 8.2.50.DATE-git.
5899
5900 2018-07-04  Vyacheslav Barinov  <v.barinov@samsung.com>
5901             Pedro Alves  <palves@redhat.com>
5902
5903         * linux-nat.c (linux_init_ptrace): Rename to ...
5904         (linux_init_ptrace_procfs): ... this.  Call
5905         linux_proc_init_warnings.
5906         (linux_nat_target::post_attach)
5907         (linux_nat_target::post_startup_inferior): Adjust.
5908         * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
5909         * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
5910
5911 2018-07-04  Tom de Vries  <tdevries@suse.de>
5912
5913         * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
5914         check ...
5915         (read_comp_unit_head): ... here.
5916
5917 2018-07-03  Tom Tromey  <tom@tromey.com>
5918
5919         * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
5920         (stop_tracing, tstatus_command)
5921         (find_matching_tracepoint_location, merge_uploaded_tracepoints)
5922         (print_one_static_tracepoint_marker): Update.
5923         * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
5924         std::vector.
5925         * breakpoint.h (breakpoint_p): Remove typedef.  Don't declare
5926         VEC.
5927         (all_tracepoints, static_tracepoints_here): Return std::vector.
5928
5929 2018-07-03  Tom Tromey  <tom@tromey.com>
5930
5931         * common/ptid.c (ptid_equal): Remove.
5932         * common/ptid.h (ptid_equal): Don't declare.
5933         * ada-tasks.c: Update.
5934         * breakpoint.c: Update.
5935         * common/agent.c: Update.
5936         * corelow.c: Update.
5937         * darwin-nat-info.c: Update.
5938         * darwin-nat.c: Update.
5939         * dcache.c: Update.
5940         * dtrace-probe.c: Update.
5941         * dummy-frame.c: Update.
5942         * fbsd-nat.c: Update.
5943         * frame.c: Update.
5944         * gdbthread.h: Update.
5945         * gnu-nat.c: Update.
5946         * go32-nat.c: Update.
5947         * inf-loop.c: Update.
5948         * inf-ptrace.c: Update.
5949         * infcall.c: Update.
5950         * infcmd.c: Update.
5951         * inflow.c: Update.
5952         * infrun.c: Update.
5953         * linux-fork.c: Update.
5954         * linux-nat.c: Update.
5955         * linux-thread-db.c: Update.
5956         * mi/mi-cmd-var.c: Update.
5957         * mi/mi-interp.c: Update.
5958         * mi/mi-main.c: Update.
5959         * nto-procfs.c: Update.
5960         * ppc-linux-tdep.c: Update.
5961         * procfs.c: Update.
5962         * python/py-inferior.c: Update.
5963         * python/py-record-btrace.c: Update.
5964         * python/py-record.c: Update.
5965         * ravenscar-thread.c: Update.
5966         * regcache.c: Update.
5967         * remote-sim.c: Update.
5968         * remote.c: Update.
5969         * sol-thread.c: Update.
5970         * solib.c: Update.
5971         * target.c: Update.
5972         * tui/tui-stack.c: Update.
5973         * varobj.c: Update.
5974         * windows-nat.c: Update.
5975         * windows-tdep.c: Update.
5976
5977 2018-07-03  Tom Tromey  <tom@tromey.com>
5978
5979         * common/ptid.c (ptid_match): Remove.
5980         * common/ptid.h (ptid_match): Don't declare.
5981         * fbsd-nat.c: Update.
5982         * infcmd.c: Update.
5983         * infrun.c: Update.
5984         * linux-nat.c: Update.
5985         * record-btrace.c: Update.
5986         * regcache.c: Update.
5987         * remote.c: Update.
5988
5989 2018-07-03  Tom Tromey  <tom@tromey.com>
5990
5991         * common/ptid.c (ptid_tid_p): Remove.
5992         * common/ptid.h (ptid_tid_p): Don't declare.
5993         * sol-thread.c: Update.
5994
5995 2018-07-03  Tom Tromey  <tom@tromey.com>
5996
5997         * common/ptid.c (ptid_lwp_p): Remove.
5998         * common/ptid.h (ptid_lwp_p): Don't declare.
5999         * fbsd-nat.c: Update.
6000         * linux-nat.c: Update.
6001         * nat/linux-procfs.c: Update.
6002         * nat/x86-linux-dregs.c: Update.
6003         * sol-thread.c: Update.
6004
6005 2018-07-03  Tom Tromey  <tom@tromey.com>
6006
6007         * common/ptid.c (ptid_is_pid): Remove.
6008         * common/ptid.h (ptid_is_pid): Don't declare.
6009         * infrun.c: Update.
6010         * linux-nat.c: Update.
6011         * mi/mi-interp.c: Update.
6012         * remote.c: Update.
6013         * thread.c: Update.
6014
6015 2018-07-03  Tom Tromey  <tom@tromey.com>
6016
6017         * common/ptid.c (ptid_get_tid): Remove.
6018         * common/ptid.h (ptid_get_tid): Don't declare.
6019         * ada-tasks.c: Update.
6020         * aix-thread.c: Update.
6021         * bsd-uthread.c: Update.
6022         * darwin-nat.c: Update.
6023         * fbsd-nat.c: Update.
6024         * i386-darwin-nat.c: Update.
6025         * infrun.c: Update.
6026         * linux-tdep.c: Update.
6027         * nto-procfs.c: Update.
6028         * ppc-ravenscar-thread.c: Update.
6029         * python/py-infthread.c: Update.
6030         * ravenscar-thread.c: Update.
6031         * sol-thread.c: Update.
6032         * sparc-ravenscar-thread.c: Update.
6033         * windows-nat.c: Update.
6034
6035 2018-07-03  Tom Tromey  <tom@tromey.com>
6036
6037         * common/ptid.c (ptid_get_lwp): Remove.
6038         * common/ptid.h (ptid_get_lwp): Don't declare.
6039         * aarch64-linux-nat.c: Update.
6040         * ada-tasks.c: Update.
6041         * aix-thread.c: Update.
6042         * amd64-linux-nat.c: Update.
6043         * arm-linux-nat.c: Update.
6044         * corelow.c: Update.
6045         * fbsd-nat.c: Update.
6046         * fbsd-tdep.c: Update.
6047         * gnu-nat.c: Update.
6048         * i386-cygwin-tdep.c: Update.
6049         * i386-gnu-nat.c: Update.
6050         * i386-linux-nat.c: Update.
6051         * ia64-linux-nat.c: Update.
6052         * inf-ptrace.c: Update.
6053         * infrun.c: Update.
6054         * linux-fork.c: Update.
6055         * linux-nat.c: Update.
6056         * linux-tdep.c: Update.
6057         * linux-thread-db.c: Update.
6058         * mips-linux-nat.c: Update.
6059         * nat/aarch64-linux-hw-point.c: Update.
6060         * nat/aarch64-linux.c: Update.
6061         * nat/linux-btrace.c: Update.
6062         * nat/linux-osdata.c: Update.
6063         * nat/linux-procfs.c: Update.
6064         * nat/x86-linux-dregs.c: Update.
6065         * obsd-nat.c: Update.
6066         * ppc-fbsd-nat.c: Update.
6067         * ppc-linux-nat.c: Update.
6068         * procfs.c: Update.
6069         * python/py-infthread.c: Update.
6070         * ravenscar-thread.c: Update.
6071         * remote.c: Update.
6072         * s390-linux-nat.c: Update.
6073         * sol-thread.c: Update.
6074         * sol2-tdep.c: Update.
6075         * spu-linux-nat.c: Update.
6076         * x86-linux-nat.c: Update.
6077         * xtensa-linux-nat.c: Update.
6078
6079 2018-07-03  Tom Tromey  <tom@tromey.com>
6080
6081         * common/ptid.c (ptid_get_pid): Remove.
6082         * common/ptid.h (ptid_get_pid): Don't declare.
6083         * aarch64-linux-nat.c: Update.
6084         * ada-lang.c: Update.
6085         * aix-thread.c: Update.
6086         * alpha-bsd-nat.c: Update.
6087         * amd64-fbsd-nat.c: Update.
6088         * amd64-linux-nat.c: Update.
6089         * arm-linux-nat.c: Update.
6090         * arm-nbsd-nat.c: Update.
6091         * auxv.c: Update.
6092         * break-catch-syscall.c: Update.
6093         * breakpoint.c: Update.
6094         * bsd-uthread.c: Update.
6095         * corelow.c: Update.
6096         * ctf.c: Update.
6097         * darwin-nat.c: Update.
6098         * fbsd-nat.c: Update.
6099         * fbsd-tdep.c: Update.
6100         * gcore.c: Update.
6101         * gnu-nat.c: Update.
6102         * hppa-nbsd-nat.c: Update.
6103         * hppa-obsd-nat.c: Update.
6104         * i386-fbsd-nat.c: Update.
6105         * ia64-linux-nat.c: Update.
6106         * inf-ptrace.c: Update.
6107         * infcmd.c: Update.
6108         * inferior.c: Update.
6109         * inferior.h: Update.
6110         * inflow.c: Update.
6111         * infrun.c: Update.
6112         * linux-fork.c: Update.
6113         * linux-nat.c: Update.
6114         * linux-tdep.c: Update.
6115         * linux-thread-db.c: Update.
6116         * m68k-bsd-nat.c: Update.
6117         * mi/mi-interp.c: Update.
6118         * mi/mi-main.c: Update.
6119         * mips-linux-nat.c: Update.
6120         * mips-nbsd-nat.c: Update.
6121         * mips64-obsd-nat.c: Update.
6122         * nat/aarch64-linux-hw-point.c: Update.
6123         * nat/aarch64-linux.c: Update.
6124         * nat/linux-btrace.c: Update.
6125         * nat/linux-osdata.c: Update.
6126         * nat/linux-procfs.c: Update.
6127         * nat/x86-linux-dregs.c: Update.
6128         * nto-procfs.c: Update.
6129         * obsd-nat.c: Update.
6130         * ppc-linux-nat.c: Update.
6131         * ppc-nbsd-nat.c: Update.
6132         * ppc-obsd-nat.c: Update.
6133         * proc-service.c: Update.
6134         * procfs.c: Update.
6135         * python/py-inferior.c: Update.
6136         * python/py-infthread.c: Update.
6137         * ravenscar-thread.c: Update.
6138         * record.c: Update.
6139         * remote-sim.c: Update.
6140         * remote.c: Update.
6141         * rs6000-nat.c: Update.
6142         * s390-linux-nat.c: Update.
6143         * sh-nbsd-nat.c: Update.
6144         * sol-thread.c: Update.
6145         * sparc-nat.c: Update.
6146         * sparc64-tdep.c: Update.
6147         * spu-linux-nat.c: Update.
6148         * spu-tdep.c: Update.
6149         * target-debug.h: Update.
6150         * target.c: Update.
6151         * thread.c: Update.
6152         * tid-parse.c: Update.
6153         * tracefile-tfile.c: Update.
6154         * vax-bsd-nat.c: Update.
6155         * windows-nat.c: Update.
6156         * x86-linux-nat.c: Update.
6157         * x86-nat.c: Update.
6158
6159 2018-07-03  Tom Tromey  <tom@tromey.com>
6160
6161         * common/ptid.c (pid_to_ptid): Remove.
6162         * common/ptid.h (pid_to_ptid): Don't declare.
6163         * aix-thread.c: Update.
6164         * arm-linux-nat.c: Update.
6165         * common/ptid.c: Update.
6166         * common/ptid.h: Update.
6167         * corelow.c: Update.
6168         * ctf.c: Update.
6169         * darwin-nat.c: Update.
6170         * fbsd-nat.c: Update.
6171         * fork-child.c: Update.
6172         * gnu-nat.c: Update.
6173         * go32-nat.c: Update.
6174         * inf-ptrace.c: Update.
6175         * infcmd.c: Update.
6176         * inferior.c: Update.
6177         * infrun.c: Update.
6178         * linux-fork.c: Update.
6179         * linux-nat.c: Update.
6180         * nat/aarch64-linux-hw-point.c: Update.
6181         * nat/fork-inferior.c: Update.
6182         * nat/x86-linux-dregs.c: Update.
6183         * nto-procfs.c: Update.
6184         * obsd-nat.c: Update.
6185         * procfs.c: Update.
6186         * progspace.c: Update.
6187         * remote.c: Update.
6188         * rs6000-nat.c: Update.
6189         * s390-linux-nat.c: Update.
6190         * sol-thread.c: Update.
6191         * spu-linux-nat.c: Update.
6192         * target.c: Update.
6193         * top.c: Update.
6194         * tracefile-tfile.c: Update.
6195         * windows-nat.c: Update.
6196
6197 2018-07-03  Tom Tromey  <tom@tromey.com>
6198
6199         * common/ptid.h (ptid_build): Don't declare.
6200         * common/ptid.c (ptid_build): Remove.
6201         * aix-thread.c: Update.
6202         * bsd-kvm.c: Update.
6203         * bsd-uthread.c: Update.
6204         * common/agent.c: Update.
6205         * common/ptid.c: Update.
6206         * common/ptid.h: Update.
6207         * corelow.c: Update.
6208         * darwin-nat.c: Update.
6209         * fbsd-nat.c: Update.
6210         * gnu-nat.c: Update.
6211         * linux-fork.c: Update.
6212         * linux-nat.c: Update.
6213         * linux-thread-db.c: Update.
6214         * nat/linux-osdata.c: Update.
6215         * nat/linux-procfs.c: Update.
6216         * nto-procfs.c: Update.
6217         * obsd-nat.c: Update.
6218         * proc-service.c: Update.
6219         * procfs.c: Update.
6220         * ravenscar-thread.c: Update.
6221         * remote-sim.c: Update.
6222         * remote.c: Update.
6223         * sol-thread.c: Update.
6224         * target.c: Update.
6225         * windows-nat.c: Update.
6226
6227 2018-07-03  Tom Tromey  <tom@tromey.com>
6228
6229         * infrun.c (follow_exec): Use exit_inferior_silent.
6230         * inferior.c (exit_inferior_num_silent): Remove.
6231         * inferior.h (exit_inferior_num_silent): Don't declare.
6232
6233 2018-07-03  Tom Tromey  <tom@tromey.com>
6234
6235         PR cli/23340:
6236         * darwin-nat.c (darwin_attach_pid): Reset inferior and
6237         inferior_ptid on error.
6238
6239 2018-07-02  Maciej W. Rozycki  <macro@mips.com>
6240             Simon Marchi  <simon.marchi@polymtl.ca>
6241
6242         PR tdep/8282
6243         * disasm.h (gdb_disassembler): Add
6244         `m_disassembler_options_holder'. member
6245         * disasm.c (get_all_disassembler_options): New function.
6246         (gdb_disassembler::gdb_disassembler): Use it.
6247         (gdb_buffered_insn_length_init_dis): Likewise.
6248         (gdb_buffered_insn_length): Adjust accordingly.
6249         (set_disassembler_options): Handle options with arguments.
6250         (show_disassembler_options_sfunc): Likewise.  Add a leading new
6251         line if showing options with descriptions.
6252         (disassembler_options_completer): Adapt to using the
6253         `disasm_options_and_args_t' structure.
6254         * mips-tdep.c (mips_disassembler_options): New variable.
6255         (mips_disassembler_options_o32): Likewise.
6256         (mips_disassembler_options_n32): Likewise.
6257         (mips_disassembler_options_n64): Likewise.
6258         (gdb_print_insn_mips): Don't set `disassembler_options'.
6259         (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
6260         functions.
6261         (mips_gdbarch_init): Always set `gdbarch_print_insn' to
6262         `gdb_print_insn_mips'.  Set `gdbarch_disassembler_options',
6263         `gdbarch_disassembler_options_implicit' and
6264         `gdbarch_valid_disassembler_options'.
6265         * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
6266         `disasm_options_and_args_t' structure.
6267         * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
6268         method.
6269         (valid_disassembler_options): Switch from `disasm_options_t' to
6270         the `disasm_options_and_args_t' structure.
6271         * NEWS: Document `set disassembler-options' support for the MIPS
6272         target.
6273         * gdbarch.h: Regenerate.
6274         * gdbarch.c: Regenerate.
6275
6276 2018-07-02  Sebastian Huber  <sebastian.huber@embedded-brains.de>
6277
6278         * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
6279
6280 2018-06-29  Joel Brobecker  <brobecker@adacore.com>
6281
6282         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
6283         parameter in call to amd64_target_description.
6284         * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
6285         * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
6286         (amd64fbsd_init_abi): Likewise.
6287         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
6288         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
6289         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
6290         * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
6291
6292 2018-06-29  Pedro Alves  <palves@redhat.com>
6293
6294         * gdb/amd64-tdep.h (amd64_create_target_description): Add
6295         "segments" parameter.
6296         * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
6297         (_initialize_amd64_tdep): Update call to
6298         amd64_create_target_description.
6299         (amd64_target_description): Add "segments" parameter.  Adjust
6300         the implementation to use it.
6301         * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
6302         call to amd64_create_target_description.
6303         * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
6304         * gdb/arch/amd64.h (amd64_create_target_description): Add
6305         "segments" register.
6306         * gdb/arch/amd64.c (amd64_create_target_description): Add
6307         "segments" parameter.  Call create_feature_i386_64bit_segments
6308         only if SEGMENTS is true.
6309         * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
6310         call to amd64_create_target_description.
6311
6312 2018-06-29  Pedro Alves  <palves@redhat.com>
6313
6314         * thread.c (thread_target_id_str): New, factored out from ...
6315         (print_thread_info_1): ... here.  Use it to compute the max
6316         "Target Id" column width.
6317
6318 2018-06-29  Pedro Alves  <palves@redhat.com>
6319
6320         * remote.c (remote_target::extra_thread_info): Delete
6321         'display_buf' and 'n' locals.  from the cache, regardless of
6322         packet mechanims is in use.  Use cache for qThreadExtra and qP
6323         methods too.
6324
6325 2018-06-29  Pedro Alves  <palves@redhat.com>
6326
6327         * blockframe.c (find_pc_sect_containing_function): New function.
6328         * breakpoint.c (print_breakpoint_location): Don't call
6329         find_pc_sect_function.
6330         * linespec.c (create_sals_line_offset): Record the location's
6331         symbol in the sal.
6332         * linespec.c (convert_address_location_to_sals): Fill in sal's
6333         symbol with find_pc_sect_containing_function.
6334         * symtab.c (find_function_start_sal): Rename to ...
6335         (find_function_start_sal_1): ... this.
6336         (find_function_start_sal): Reimplement as wrapper around
6337         find_function_start_sal_1, and use
6338         find_pc_sect_containing_function to fill in the sal's symbol.
6339         (find_function_start_sal(symbol*, bool)): Adjust.
6340         * symtab.h (find_pc_function, find_pc_sect_function): Adjust
6341         comments.
6342         (find_pc_sect_containing_function): Declare.
6343
6344 2018-06-29  Pedro Alves  <palves@redhat.com>
6345
6346         * inline-frame.c (stopped_by_user_bp_inline_frame): Return
6347         true if the the location has no symbol.
6348
6349 2018-06-28  Tom Tromey  <tom@tromey.com>
6350
6351         * NEWS: Mention --enable-codesign.
6352         * silent-rules.mk (ECHO_SIGN): New variable.
6353         * configure.ac: Add --enable-codesign.
6354         * configure: Rebuild.
6355         * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
6356         (gdb$(EXEEXT)): Optionally invoke codesign.
6357
6358 2018-06-28  Pedro Alves  <palves@redhat.com>
6359
6360         * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
6361         comments.
6362         (switch_to_thread_no_regs): Adjust comment.
6363         * infcmd.c (stop_pc): Delete.
6364         (post_create_inferior, info_program_command): Replace references
6365         to stop_pc with references to thread_info->suspend.stop_pc.
6366         * inferior.h (stop_pc): Delete declaration.
6367         * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
6368         (handle_inferior_event_1, handle_signal_stop)
6369         (process_event_stop_test, keep_going_stepped_thread)
6370         (handle_step_into_function, handle_step_into_function_backward)
6371         (print_stop_location): Replace references to stop_pc with
6372         references to thread_info->suspend.stop_pc.
6373         (struct infcall_suspend_state) <stop_pc>: Delete field.
6374         (save_infcall_suspend_state, restore_infcall_suspend_state):
6375         Remove references to inf_stat->stop_pc.
6376         * linux-fork.c (fork_load_infrun_state): Likewise.
6377         * record-btrace.c (record_btrace_set_replay): Likewise.
6378         * record-full.c (record_full_goto_entry): Likewise.
6379         * remote.c (print_one_stopped_thread): Likewise.
6380         * target.c (target_resume): Extend comment.
6381         * thread.c (set_executing_thread): New.
6382         (set_executing): Use it.
6383         (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
6384         Remove references to stop_pc.
6385
6386 2018-06-28  Pedro Alves  <palves@redhat.com>
6387
6388         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
6389         Moving fetching stop_pc until after ecs->event_thread is refreshed.
6390
6391 2018-06-28  Tom Tromey  <tom@tromey.com>
6392
6393         * coffread.c (coff_symfile_finish): Update.
6394         * xcoffread.c (xcoff_symfile_finish): Update.
6395         * elfread.c (elf_symfile_finish): Update.
6396         * symfile.h (dwarf2_free_objfile): Don't declare.
6397         * dwarf2read.c (_initialize_dwarf2_read): Use
6398         register_objfile_data_with_cleanup.
6399         (dwarf2_free_objfile): Now static.  Change signature.
6400
6401 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
6402
6403         * symfile.c (add_symbol_file_command, _initialize_symfile): Add
6404         option "-o" to add-symbol-file-load to add an offset to each
6405         section's load address.
6406         * symfile.c (set_objfile_default_section_offset): New function.
6407
6408 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
6409
6410         * symfile.c (add_symbol_file_command): Make sure that sections
6411         with the same name are sorted in the same order.
6412
6413 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
6414
6415         * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
6416         require the second argument.  If omitted, load sections at the
6417         addresses specified in the file.
6418
6419 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
6420
6421         * symfile.c (symbol_file_command, symbol_file_add_main_1)
6422         (_initialize_symfile): Add option "-o" to symbol-file to add an
6423         offset to each section of the symbol file.
6424
6425 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
6426
6427         * MAINTAINERS (Write After Approval): Add Petr Tesarik.
6428
6429 2018-06-27  Tom Tromey  <tom@tromey.com>
6430
6431         * stack.c (_initialize_stack): Update "func" help text.
6432
6433 2018-06-27  Tom Tromey  <tom@tromey.com>
6434
6435         * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
6436         std::vector.
6437         (unwind_infopy_str, pyuw_create_unwind_info)
6438         (unwind_infopy_add_saved_register, pyuw_sniffer)
6439         (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
6440         Update.
6441         (struct saved_reg): Add constructor.
6442         <value>: Now a gdbpy_ref<>.
6443
6444 2018-06-27  Tom Tromey  <tom@tromey.com>
6445
6446         * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
6447
6448 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6449
6450         * gdb-gdb.py.in: Format using autopep8.
6451
6452 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6453
6454         * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
6455         (type_lookup_function): Recognize CORE_ADDR values.
6456
6457 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6458
6459         * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
6460         print tag_name.
6461
6462 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6463
6464         * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
6465         <__lt__>: Add.
6466
6467 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6468
6469         * gdb-gdb.py: Move to...
6470         * gdb-gdb.py.in: ... here.
6471         * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
6472         * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
6473         dependencies.
6474         (distclean): Remove gdb-gdb.py when cleaning.
6475         (gdb-gdb.py, gdb-gdb.gdb): New rules.
6476         * configure: Re-generate.
6477
6478 2018-06-27  Pedro Alves  <palves@redhat.com>
6479
6480         * proc-service.c (get_ps_regcache): New.
6481         (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
6482         (ps_lsetfpregs): Use it.
6483
6484 2018-06-27  Omair Javaid  <omair.javaid@linaro.org>
6485
6486         PR gdb/21695
6487         * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
6488         (dwarf_decode_lines_1): Adjust.
6489
6490 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6491
6492         * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
6493         override.
6494         <info_proc>: Likewise.
6495
6496 2018-06-26  Joel Brobecker  <brobecker@adacore.com>
6497
6498         * windows-nat.c (do_windows_fetch_inferior_registers): Rename
6499         to windows_fetch_one_register, and only handle the case of
6500         fetching one register.  Move the code that reloads the context
6501         and iterates over all registers if R is negative to...
6502         (windows_nat_target::fetch_registers): ... here.
6503         (do_windows_store_inferior_registers): Rename to
6504         windows_store_one_register, and only handle the case of storing
6505         one register.  Move the code that handles the case where r is
6506         negative to...
6507         (windows_nat_target::store_registers) ... here.
6508
6509 2018-06-26  Tom Tromey  <tom@tromey.com>
6510
6511         PR rust/22574:
6512         * typeprint.c (whatis_exp): Allow ptype/o for Rust.
6513         * rust-lang.c (rust_print_struct_def): Add podata parameter.
6514         Update.
6515         (rust_internal_print_type): Add podata parameter.
6516         (rust_print_type): Update.
6517
6518 2018-06-26  Tom Tromey  <tom@tromey.com>
6519
6520         * typeprint.h (struct print_offset_data) <update, finish,
6521         maybe_print_hole>: New methods.
6522         <indentation>: New constant.
6523         * typeprint.c (print_offset_data::indentation): Define.
6524         (print_offset_data::maybe_print_hole, print_offset_data::update)
6525         (print_offset_data::finish): Move from c-typeprint.c and rename.
6526         * c-typeprint.c (OFFSET_SPC_LEN): Remove.
6527         (print_spaces_filtered_with_print_options): Update.
6528         (c_print_type_union_field_offset, maybe_print_hole)
6529         (c_print_type_struct_field_offset): Move to typeprint.c and
6530         rename.
6531         (c_type_print_base_struct_union): Update.
6532
6533 2018-06-25  Pedro Alves  <palves@redhat.com>
6534
6535         * gdbthread.h (thread_info_ref, delete_thread)
6536         (delete_thread_silent, first_thread_of_inferior)
6537         (any_thread_of_inferior, switch_to_thread)
6538         (enable_thread_stack_temporaries)
6539         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
6540         (get_last_thread_stack_temporary)
6541         (value_in_thread_stack_temporaries, can_access_registers_thread):
6542         Spell out "struct thread_info" instead of just "thread_info".
6543         * inferior.h (notice_new_inferior): Likewise.
6544
6545 2018-06-25  Pedro Alves  <palves@redhat.com>
6546
6547         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
6548         pass thread_info pointer to delete_thread.
6549         (windows_nat_target::detach): Pass inferior pointer to
6550         detach_inferior.
6551         * aix-thread.c (sync_threadlists): Pass thread_info pointer to
6552         delete_thread.
6553         * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
6554         * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
6555         and pass a thread_info pointer to delete_thread.
6556         * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
6557         pass thread_info pointer to delete_thread.
6558         * go32-nat.c (go32_nat_target::mourn_inferior): Remove
6559         delete_thread_silent call.
6560         * procfs.c (procfs_target::detach): Pass inferior pointer to
6561         detach_inferior.
6562         (procfs_target::wait): Pass thread_info pointer to delete_thread.
6563         * remote-sim.c (gdbsim_target::mourn_inferior): Remove
6564         delete_thread_silent call.
6565         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
6566         pass thread_info pointer to delete_thread.
6567         (windows_nat_target::detach): Pass inferior pointer to
6568         delete_inferior.
6569
6570 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
6571
6572         * regcache.c (readable_regcache::read_part): Fix asserts.
6573         (reg_buffer::raw_collect_part): New function.
6574         (regcache::write_part): Fix asserts.
6575         (reg_buffer::raw_supply_part): New function.
6576         (regcache::transfer_regset_register): New helper function.
6577         (regcache::transfer_regset): Call new functions.
6578         (regcache_supply_regset): Use gdb_byte*.
6579         (regcache::supply_regset): Likewise.
6580         (regcache_collect_regset): Likewise.
6581         (regcache::collect_regset): Likewise.
6582         * regcache.h (reg_buffer::raw_collect_part): New declaration.
6583         (reg_buffer::raw_supply_part): Likewise.
6584         (regcache::transfer_regset_register): Likewise.
6585         (regcache::transfer_regset): Use gdb_byte*.
6586
6587 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
6588
6589         * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
6590
6591 2018-06-21  Pedro Alves  <palves@redhat.com>
6592
6593         * ada-lang.h (ada_get_task_number): Take a thread_info pointer
6594         instead of a ptid_t.  All callers adjusted.
6595         * ada-tasks.c (ada_get_task_number): Likewise.  All callers
6596         adjusted.
6597         (print_ada_task_info, display_current_task_id, task_command_1):
6598         Adjust.
6599         * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
6600         inferior_thread.
6601         (breakpoint_kind): Adjust.
6602         (remove_breakpoints_pid): Rename to ...
6603         (remove_breakpoints_inf): ... this.  Adjust to take an inferior
6604         pointer.  All callers adjusted.
6605         (bpstat_clear_actions): Use inferior_thread.
6606         (get_bpstat_thread): New.
6607         (bpstat_do_actions): Use it.
6608         (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
6609         to take a thread_info pointer.  All callers adjusted.
6610         (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
6611         (breakpoint_re_set_thread): Use inferior_thread.
6612         * breakpoint.h (struct inferior): Forward declare.
6613         (bpstat_stop_status): Update.
6614         (remove_breakpoints_pid): Delete.
6615         (remove_breakpoints_inf): New.
6616         * bsd-uthread.c (bsd_uthread_target::wait)
6617         (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
6618         * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
6619         (maint_btrace_packet_history_cmd)
6620         (maint_btrace_clear_packet_history_cmd): Adjust.
6621         (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
6622         inferior_thread.
6623         * cli/cli-interp.c: Include "inferior.h".
6624         * common/refcounted-object.h (struct
6625         refcounted_object_ref_policy): New.
6626         * compile/compile-object-load.c: Include gdbthread.h.
6627         (store_regs): Use inferior_thread.
6628         * corelow.c (core_target::close): Use current_inferior.
6629         (core_target_open): Adjust to use first_thread_of_inferior and use
6630         the current inferior.
6631         * ctf.c (ctf_target::close): Adjust to use current_inferior.
6632         * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
6633         <thread>: ... this new field.  All references adjusted.
6634         (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
6635         Take a thread_info pointer instead of a ptid_t.
6636         * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
6637         (dummy_frame_discard, register_dummy_frame_dtor): Take a
6638         thread_info pointer instead of a ptid_t.
6639         * elfread.c: Include "inferior.h".
6640         (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
6641         Use inferior_thread.
6642         * eval.c (evaluate_subexp): Likewise.
6643         * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
6644         inferior_thread.
6645         * gdb_proc_service.h (struct thread_info): Forward declare.
6646         (struct ps_prochandle) <ptid>: Delete, replaced by ...
6647         <thread>: ... this new field.  All references adjusted.
6648         * gdbarch.h, gdbarch.c: Regenerate.
6649         * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
6650         'thread' parameter.  All implementations and callers adjusted.
6651         * gdbthread.h (thread_info) <set_running>: New method.
6652         (delete_thread, delete_thread_silent): Take a thread_info pointer
6653         instead of a ptid.
6654         (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
6655         (first_thread_of_process): Delete, replaced by ...
6656         (first_thread_of_inferior): ... this new function.  All callers
6657         adjusted.
6658         (any_live_thread_of_process): Delete, replaced by ...
6659         (any_live_thread_of_inferior): ... this new function.  All callers
6660         adjusted.
6661         (switch_to_thread, switch_to_no_thread): Declare.
6662         (is_executing): Delete.
6663         (enable_thread_stack_temporaries): Update comment.
6664         <enable_thread_stack_temporaries>: Take a thread_info pointer
6665         instead of a ptid_t.  Incref the thread.
6666         <~enable_thread_stack_temporaries>: Decref the thread.
6667         <m_ptid>: Delete
6668         <m_thr>: New.
6669         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
6670         (get_last_thread_stack_temporary)
6671         (value_in_thread_stack_temporaries, can_access_registers_thread):
6672         Take a thread_info pointer instead of a ptid_t.  All callers
6673         adjusted.
6674         * infcall.c (get_call_return_value): Use inferior_thread.
6675         (run_inferior_call): Work with thread pointers instead of ptid_t.
6676         (call_function_by_hand_dummy): Work with thread pointers instead
6677         of ptid_t.  Use thread_info_ref.
6678         * infcmd.c (proceed_thread_callback): Access thread's state
6679         directly.
6680         (ensure_valid_thread, ensure_not_running): Use inferior_thread,
6681         access thread's state directly.
6682         (continue_command): Use inferior_thread.
6683         (info_program_command): Use find_thread_ptid and access thread
6684         state directly.
6685         (proceed_after_attach_callback): Use thread state directly.
6686         (notice_new_inferior): Take a thread_info pointer instead of a
6687         ptid_t.  All callers adjusted.
6688         (exit_inferior): Take an inferior pointer instead of a pid.  All
6689         callers adjusted.
6690         (exit_inferior_silent): New.
6691         (detach_inferior): Delete.
6692         (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
6693         (gdb_inferior_id_to_pid, in_inferior_list): Delete.
6694         (detach_inferior_command, kill_inferior_command): Use
6695         find_inferior_id instead of valid_gdb_inferior_id and
6696         gdb_inferior_id_to_pid.
6697         (inferior_command): Use inferior and thread pointers.
6698         * inferior.h (struct thread_info): Forward declare.
6699         (notice_new_inferior): Take a thread_info pointer instead of a
6700         ptid_t.  All callers adjusted.
6701         (detach_inferior): Delete declaration.
6702         (exit_inferior, exit_inferior_silent): Take an inferior pointer
6703         instead of a pid.  All callers adjusted.
6704         (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
6705         (valid_gdb_inferior_id): Delete.
6706         * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
6707         (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
6708         (struct displaced_step_inferior_state) <pid>: Delete, replaced by
6709         ...
6710         <inf>: ... this new field.
6711         <step_ptid>: Delete, replaced by ...
6712         <step_thread>: ... this new field.
6713         (get_displaced_stepping_state): Take an inferior pointer instead
6714         of a pid.  All callers adjusted.
6715         (displaced_step_in_progress_any_inferior): Adjust.
6716         (displaced_step_in_progress_thread): Take a thread pointer instead
6717         of a ptid_t.  All callers adjusted.
6718         (displaced_step_in_progress, add_displaced_stepping_state): Take
6719         an inferior pointer instead of a pid.  All callers adjusted.
6720         (get_displaced_step_closure_by_addr): Adjust.
6721         (remove_displaced_stepping_state): Take an inferior pointer
6722         instead of a pid.  All callers adjusted.
6723         (displaced_step_prepare_throw, displaced_step_prepare)
6724         (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
6725         All callers adjusted.
6726         (start_step_over): Adjust.
6727         (infrun_thread_ptid_changed): Remove bit updating ptids in the
6728         displaced step queue.
6729         (do_target_resume): Adjust.
6730         (fetch_inferior_event): Use inferior_thread.
6731         (context_switch, get_inferior_stop_soon): Take an
6732         execution_control_state pointer instead of a ptid_t.  All callers
6733         adjusted.
6734         (switch_to_thread_cleanup): Delete.
6735         (stop_all_threads): Use scoped_restore_current_thread.
6736         * inline-frame.c: Include "gdbthread.h".
6737         (inline_state) <inline_state>: Take a thread pointer instead of a
6738         ptid_t.  All callers adjusted.
6739         <ptid>: Delete, replaced by ...
6740         <thread>: ... this new field.
6741         (find_inline_frame_state): Take a thread pointer instead of a
6742         ptid_t.  All callers adjusted.
6743         (skip_inline_frames, step_into_inline_frame)
6744         (inline_skipped_frames, inline_skipped_symbol): Take a thread
6745         pointer instead of a ptid_t.  All callers adjusted.
6746         * inline-frame.h (skip_inline_frames, step_into_inline_frame)
6747         (inline_skipped_frames, inline_skipped_symbol): Likewise.
6748         * linux-fork.c (delete_checkpoint_command): Adjust to use thread
6749         pointers directly.
6750         * linux-nat.c (get_detach_signal): Likewise.
6751         * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
6752         (thread_db_notice_clone): Adjust.
6753         (thread_db_find_new_threads_silently)
6754         (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
6755         a thread pointer instead of a ptid_t.  All callers adjusted.
6756         * mi/mi-cmd-var.c: Include "inferior.h".
6757         (mi_cmd_var_update_iter): Update to use thread pointers.
6758         * mi/mi-interp.c (mi_new_thread): Update to use the thread's
6759         inferior directly.
6760         (mi_output_running_pid, mi_inferior_count): Delete, bits factored
6761         out to ...
6762         (mi_output_running): ... this new function.
6763         (mi_on_resume_1): Adjust to use it.
6764         (mi_user_selected_context_changed): Adjust to use inferior_thread.
6765         * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
6766         directly.
6767         (interrupt_thread_callback): : Adjust to use thread and inferior
6768         pointers.
6769         * proc-service.c: Include "gdbthread.h".
6770         (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
6771         * progspace-and-thread.c: Include "inferior.h".
6772         * progspace.c: Include "inferior.h".
6773         * python/py-exitedevent.c (create_exited_event_object): Adjust to
6774         hold a reference to an inferior_object.
6775         * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
6776         inferior_thread.
6777         * python/py-inferior.c (struct inferior_object): Give the type a
6778         tag name instead of a typedef.
6779         (python_on_normal_stop): No need to check if the current thread is
6780         listed.
6781         (inferior_to_inferior_object): Change return type to
6782         inferior_object.  All callers adjusted.
6783         (find_thread_object): Delete, bits factored out to ...
6784         (thread_to_thread_object): ... this new function.
6785         * python/py-infthread.c (create_thread_object): Use
6786         inferior_to_inferior_object.
6787         (thpy_is_stopped): Use thread pointer directly.
6788         (gdbpy_selected_thread): Use inferior_thread.
6789         * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
6790         field, replaced with ...
6791         <thread>: ... this new field.  All users adjusted.
6792         (btpy_insn_or_gap_new): Drop const.
6793         (btpy_list_new): Take a thread pointer instead of a ptid_t.  All
6794         callers adjusted.
6795         * python/py-record.c: Include "gdbthread.h".
6796         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
6797         a ptid_t.  All callers adjusted.
6798         (gdbpy_current_recording): Use inferior_thread.
6799         * python/py-record.h (recpy_record_object) <ptid>: Delete
6800         field, replaced with ...
6801         <thread>: ... this new field.  All users adjusted.
6802         (recpy_element_object) <ptid>: Delete
6803         field, replaced with ...
6804         <thread>: ... this new field.  All users adjusted.
6805         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
6806         a ptid_t.  All callers adjusted.
6807         * python/py-threadevent.c: Include "gdbthread.h".
6808         (get_event_thread): Use thread_to_thread_object.
6809         * python/python-internal.h (struct inferior_object): Forward
6810         declare.
6811         (find_thread_object, find_inferior_object): Delete declarations.
6812         (thread_to_thread_object, inferior_to_inferior_object): New
6813         declarations.
6814         * record-btrace.c: Include "inferior.h".
6815         (require_btrace_thread): Use inferior_thread.
6816         (record_btrace_frame_sniffer)
6817         (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
6818         (get_thread_current_frame): Use scoped_restore_current_thread and
6819         switch_to_thread.
6820         (get_thread_current_frame): Use thread pointer directly.
6821         (record_btrace_replay_at_breakpoint): Use thread's inferior
6822         pointer directly.
6823         * record-full.c: Include "inferior.h".
6824         * regcache.c: Include "gdbthread.h".
6825         (get_thread_arch_regcache): Use the inferior's address space
6826         directly.
6827         (get_thread_regcache, registers_changed_thread): New.
6828         * regcache.h (get_thread_regcache(thread_info *thread)): New
6829         overload.
6830         (registers_changed_thread): New.
6831         (remote_target) <remote_detach_1>: Swap order of parameters.
6832         (remote_add_thread): <remote_add_thread>: Return the new thread.
6833         (get_remote_thread_info(ptid_t)): New overload.
6834         (remote_target::remote_notice_new_inferior): Use thread pointers
6835         directly.
6836         (remote_target::process_initial_stop_replies): Use
6837         thread_info::set_running.
6838         (remote_target::remote_detach_1, remote_target::detach)
6839         (extended_remote_target::detach): Adjust.
6840         * stack.c (frame_show_address): Use inferior_thread.
6841         * target-debug.h (target_debug_print_thread_info_pp): New.
6842         * target-delegates.c: Regenerate.
6843         * target.c (default_thread_address_space): Delete.
6844         (memory_xfer_partial_1): Use current_inferior.
6845         (target_detach): Use current_inferior.
6846         (target_thread_address_space): Delete.
6847         (generic_mourn_inferior): Use current_inferior.
6848         * target.h (struct target_ops) <thread_address_space>: Delete.
6849         (target_thread_address_space): Delete.
6850         * thread.c (init_thread_list): Use ALL_THREADS_SAFE.  Use thread
6851         pointers directly.
6852         (delete_thread_1, delete_thread, delete_thread_silent): Take a
6853         thread pointer instead of a ptid_t.  Adjust all callers.
6854         (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
6855         (first_thread_of_process): Delete, replaced by ...
6856         (first_thread_of_inferior): ... this new function.  All callers
6857         adjusted.
6858         (any_thread_of_process): Rename to ...
6859         (any_thread_of_inferior): ... this, and take an inferior pointer.
6860         (any_live_thread_of_process): Rename to ...
6861         (any_live_thread_of_inferior): ... this, and take an inferior
6862         pointer.
6863         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
6864         (value_in_thread_stack_temporaries)
6865         (get_last_thread_stack_temporary): Take a thread pointer instead
6866         of a ptid_t.  Adjust all callers.
6867         (thread_info::set_running): New.
6868         (validate_registers_access): Use inferior_thread.
6869         (can_access_registers_ptid): Rename to ...
6870         (can_access_registers_thread): ... this, and take a thread
6871         pointer.
6872         (print_thread_info_1): Adjust to compare thread pointers instead
6873         of ptids.
6874         (switch_to_no_thread, switch_to_thread): Make extern.
6875         (scoped_restore_current_thread::~scoped_restore_current_thread):
6876         Use m_thread pointer directly.
6877         (scoped_restore_current_thread::scoped_restore_current_thread):
6878         Use inferior_thread.
6879         (thread_command): Use thread pointer directly.
6880         (thread_num_make_value_helper): Use inferior_thread.
6881         * top.c (execute_command): Use inferior_thread.
6882         * tui/tui-interp.c: Include "inferior.h".
6883         * varobj.c (varobj_create): Use inferior_thread.
6884         (value_of_root_1): Use find_thread_global_id instead of
6885         global_thread_id_to_ptid.
6886
6887 2018-06-21  Alan Hayward  <alan.hayward@arm.com>
6888
6889         * regcache.c (readable_regcache::read_part): Avoid memcpy when
6890         possible.
6891         (regcache::write_part): Likewise.
6892         (readable_regcache::cooked_read_part): Update comment.
6893         (readable_regcache::cooked_write_part): Likewise.
6894         * regcache.h: (readable_regcache::read_part): Likewise.
6895         (regcache::write_part): Likewise.
6896
6897 2018-06-21  Richard Bunt  <richard.bunt@arm.com>
6898             Dirk Schubert  <dirk.schubert@arm.com>
6899
6900         * aarch64-linux-nat.c (post_attach): New.
6901         (aarch64_linux_nat_target::post_attach): Override post_attach to
6902         record the number of hardware debug registers.
6903
6904 2018-06-20  Tom Tromey  <tom@tromey.com>
6905
6906         * python/py-param.c (add_setshow_generic): Make parameters const.
6907         (parmpy_init): Update.
6908
6909 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
6910
6911         * regcache.h (regcache_cooked_read_ftype): Rename to...
6912         (register_read_ftype): ...this, change type to function_view.
6913         (class reg_buffer) <save>: Remove src parameter.
6914         (readonly_detached_regcache) <readonly_detached_regcache>: Make
6915         parameter non-const in first overload.  Remove src parameter in
6916         second overload.
6917         * regcache.c (do_cooked_read): Remove.
6918         (readonly_detached_regcache::readonly_detached_regcache): Make
6919         parameter non-const, adjust call to other constructor.
6920         (reg_buffer::save): Remove src parameter.
6921         * frame.c (do_frame_register_read): Remove.
6922         (frame_save_as_regcache): Use lambda function.
6923         * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
6924         parameter to ppu2spu_data *.
6925         (ppu2spu_sniffer): Use lambda function.
6926
6927 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
6928
6929         * record-full.c (record_full_target::insert_breakpoint): Remove
6930         "struct" keyword, add const.
6931
6932 2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>
6933
6934         * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
6935         PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
6936         * configure.ac: Remove AC_PREREQ, add missing quoting.
6937         * gnulib/configure.ac: Modernize usage of
6938         AC_INIT/AM_INIT_AUTOMAKE.  Remove AC_PREREQ.
6939         * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
6940         (AUTOMAKE_VERSION): Bump to 1.15.1.
6941         * configure: Re-generate.
6942         * config.in: Re-generate.
6943         * aclocal.m4: Re-generate.
6944         * gnulib/aclocal.m4: Re-generate.
6945         * gnulib/config.in: Re-generate.
6946         * gnulib/configure: Re-generate.
6947         * gnulib/import/Makefile.in: Re-generate.
6948
6949 2018-06-19  Pedro Alves  <palves@redhat.com>
6950
6951         * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
6952         (lookup_minimal_symbol_by_pc_section): ... here with
6953         gdb_assert_not_reached added.
6954
6955 2018-06-19  Pedro Alves  <palves@redhat.com>
6956
6957         * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
6958         parameter with a block parameter.  Compare location's block symbol
6959         with the frame's block instead of addresses.
6960         (skip_inline_frames): Pass the current block instead of the
6961         frame's address.  Break out as soon as we determine the frame
6962         should not be skipped.
6963
6964 2018-06-18  Tom Tromey  <tom@tromey.com>
6965
6966         * solib-aix.c (solib_aix_get_section_offsets): Return
6967         unique_xmalloc_ptr.
6968         (solib_aix_solib_create_inferior_hook): Update.
6969
6970 2018-06-18  Tom Tromey  <tom@tromey.com>
6971
6972         * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
6973
6974 2018-06-18  Tom Tromey  <tom@tromey.com>
6975
6976         * solib-frv.c (frv_relocate_main_executable): Use
6977         unique_xmalloc_ptr.
6978         * solib-dsbt.c (dsbt_relocate_main_executable): Use
6979         unique_xmalloc_ptr.
6980
6981 2018-06-18  Tom Tromey  <tom@tromey.com>
6982
6983         * objfiles.h (inhibit_section_map_updates): Update.
6984         (resume_section_map_updates, resume_section_map_updates_cleanup):
6985         Remove.
6986         * solib-svr4.c (svr4_handle_solib_event): Update.
6987         * objfiles.c (inhibit_section_map_updates): Return
6988         scoped_restore_tmpl<int>.
6989         (resume_section_map_updates, resume_section_map_updates_cleanup):
6990         Remove.
6991
6992 2018-06-18  Tom Tromey  <tom@tromey.com>
6993
6994         * valprint.h (read_string): Update.
6995         * valprint.c (read_string): Change type of "buffer".
6996         (val_print_string): Update.
6997         * python/py-value.c (valpy_string): Update.
6998         * language.h (struct language_defn) <la_get_string>: Change
6999         type of "buffer".
7000         (default_get_string, c_get_string): Update.
7001         * language.c (default_get_string): Change type of "buffer".
7002         * guile/scm-value.c (gdbscm_value_to_string): Update.
7003         * c-lang.c (c_get_string): Change type of "buffer".
7004
7005 2018-06-18  Tom Tromey  <tom@tromey.com>
7006
7007         * ser-mingw.c (struct pipe_state_destroyer): New.
7008         (pipe_state_up): New typedef.
7009         (cleanup_pipe_state): Remove.
7010         (pipe_windows_open): Use pipe_state_up.  Don't release argv.
7011
7012 2018-06-18  Tom Tromey  <tom@tromey.com>
7013
7014         * rust-lang.h (rust_yyerror): Don't declare.
7015         * rust-lang.c (rust_language_defn): Update.
7016         * rust-exp.y (yyerror): Now static.
7017         * parse.c (parse_exp_in_context_1): Update.
7018         * p-lang.h (p_yyerror): Don't declare.
7019         * p-lang.c (p_language_defn): Update.
7020         * p-exp.y (yyerror): Now static.
7021         * opencl-lang.c (opencl_language_defn): Update.
7022         * objc-lang.c (objc_language_defn): Update.
7023         * m2-lang.h (m2_yyerror): Don't declare.
7024         * m2-lang.c (m2_language_defn): Update.
7025         * m2-exp.y (yyerror): Now static.
7026         * language.h (struct language_defn) <la_error>: Remove.
7027         * language.c (unk_lang_error): Remove.
7028         (unknown_language_defn, auto_language_defn): Remove.
7029         * go-lang.h (go_yyerror): Don't declare.
7030         * go-lang.c (go_language_defn): Update.
7031         * go-exp.y (yyerror): Now static.
7032         * f-lang.h (f_yyerror): Don't declare.
7033         * f-lang.c (f_language_defn): Update.
7034         * f-exp.y (yyerror): Now static.
7035         * d-lang.h (d_yyerror): Don't declare.
7036         * d-lang.c (d_language_defn): Update.
7037         * d-exp.y (yyerror): Now static.
7038         * c-lang.h (c_yyerror): Don't declare.
7039         * c-lang.c (c_language_defn, cplus_language_defn)
7040         (asm_language_defn, minimal_language_defn): Update.
7041         * c-exp.y (yyerror): Now static.
7042         * ada-lang.h (ada_yyerror): Don't declare.
7043         * ada-lang.c (ada_language_defn): Update.
7044         * ada-exp.y (yyerror): Now static.
7045
7046 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
7047
7048         * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
7049         (store_sveregs_to_thread): Likewise.
7050         (aarch64_linux_fetch_inferior_registers): Check for SVE.
7051         (aarch64_linux_store_inferior_registers): Likewise.
7052         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
7053         function.
7054         (aarch64_sve_regs_copy_to_regcache): Likewise.
7055         (aarch64_sve_regs_copy_from_regcache): Likewise.
7056         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
7057         declaration.
7058         (aarch64_sve_regs_copy_to_regcache): Likewise.
7059         (aarch64_sve_regs_copy_from_regcache): Likewise.
7060         (sve_context): Structure from Linux headers.
7061         (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
7062         (SVE_SIG_ZREG_SIZE): Likewise.
7063         (SVE_SIG_PREG_SIZE): Likewise.
7064         (SVE_SIG_FFR_SIZE): Likewise.
7065         (SVE_SIG_REGS_OFFSET): Likewise.
7066         (SVE_SIG_ZREGS_OFFSET): Likewise.
7067         (SVE_SIG_ZREG_OFFSET): Likewise.
7068         (SVE_SIG_ZREGS_SIZE): Likewise.
7069         (SVE_SIG_PREGS_OFFSET): Likewise.
7070         (SVE_SIG_PREG_OFFSET): Likewise.
7071         (SVE_SIG_PREGS_SIZE): Likewise.
7072         (SVE_SIG_FFR_OFFSET): Likewise.
7073         (SVE_SIG_REGS_SIZE): Likewise.
7074         (SVE_SIG_CONTEXT_SIZE): Likewise.
7075         (SVE_PT_REGS_MASK): Likewise.
7076         (SVE_PT_REGS_FPSIMD): Likewise.
7077         (SVE_PT_REGS_SVE): Likewise.
7078         (SVE_PT_VL_INHERIT): Likewise.
7079         (SVE_PT_VL_ONEXEC): Likewise.
7080         (SVE_PT_REGS_OFFSET): Likewise.
7081         (SVE_PT_FPSIMD_OFFSET): Likewise.
7082         (SVE_PT_FPSIMD_SIZE): Likewise.
7083         (SVE_PT_SVE_ZREG_SIZE): Likewise.
7084         (SVE_PT_SVE_PREG_SIZE): Likewise.
7085         (SVE_PT_SVE_FFR_SIZE): Likewise.
7086         (SVE_PT_SVE_FPSR_SIZE): Likewise.
7087         (SVE_PT_SVE_FPCR_SIZE): Likewise.
7088         (__SVE_SIG_TO_PT): Likewise.
7089         (SVE_PT_SVE_OFFSET): Likewise.
7090         (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
7091         (SVE_PT_SVE_ZREG_OFFSET): Likewise.
7092         (SVE_PT_SVE_ZREGS_SIZE): Likewise.
7093         (SVE_PT_SVE_PREGS_OFFSET): Likewise.
7094         (SVE_PT_SVE_PREG_OFFSET): Likewise.
7095         (SVE_PT_SVE_PREGS_SIZE): Likewise.
7096         (SVE_PT_SVE_FFR_OFFSET): Likewise.
7097         (SVE_PT_SVE_FPSR_OFFSET): Likewise.
7098         (SVE_PT_SVE_FPCR_OFFSET): Likewise.
7099         (SVE_PT_SVE_SIZE): Likewise.
7100         (SVE_PT_SIZE): Likewise.
7101         (HAS_SVE_STATE): New define.
7102
7103 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
7104
7105         * nat/aarch64-sve-linux-sigcontext.h: New file.
7106         * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
7107         new files.
7108         (SVE_VQ_MIN): Likewise.
7109         (SVE_VQ_MAX): Likewise.
7110         (SVE_VL_MIN): Likewise.
7111         (SVE_VL_MAX): Likewise.
7112         (SVE_NUM_ZREGS): Likewise.
7113         (SVE_NUM_PREGS): Likewise.
7114         (sve_vl_valid): Likewise.
7115         (struct user_sve_header): Likewise.
7116
7117 2018-06-16  Andrew Burgess  <andrew.burgess@embecosm.com>
7118             Richard Bunt <Richard.Bunt@arm.com>
7119
7120         * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
7121         was requested by GDB.
7122
7123 2018-06-15  Tom de Vries  <tdevries@suse.de>
7124
7125         * MAINTAINERS (Write After Approval): Add Tom de Vries.
7126
7127 2018-06-14  Simon Marchi  <simon.marchi@polymtl.ca>
7128
7129         * gnulib/update-gnulib.sh: Print expected versions of
7130         autoconf/aclocal.
7131
7132 2018-06-14  Simon Marchi  <simon.marchi@ericsson.com>
7133
7134         * arch-utils.c (default_type_align): Use type_length_units.
7135         * gdbtypes.c (type_align): Use type_length_units.
7136
7137 2018-06-14  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
7138
7139         * cli/cli-script.c (_initialize_cli_script): Fix online documentation
7140         of 'define' command.
7141
7142 2018-06-14  Tom de Vries  <tdevries@suse.de>
7143
7144         PR cli/22573
7145         * infcmd.c (print_return_value_1): Use get_user_print_options instead of
7146         get_no_prettyformat_print_options.
7147
7148 2018-06-13  Simon Marchi  <simon.marchi@ericsson.com>
7149
7150         * sparc-nat.h: Include target.h.
7151         * sparc64-linux-nat.c (class sparc64_linux_nat_target)
7152         <fetch_registers>: Remove this argument in function call.
7153         <store_registers>: Remove this argument in function call, remove
7154         extra semicolon.
7155         <low_forget_process>: Call sparc64_forget_process instead of
7156         sparc_forget_process.
7157
7158 2018-06-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7159
7160         * procfs.c (_initialize_procfs): Use add_inf_child_target.
7161         (procfs_target::make_corefile_notes): Adjust to new
7162         target_read_alloc return type.
7163
7164 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
7165             Stephen Roberts  <stephen.roberts@arm.com>
7166
7167         PR gdb/22882
7168         * infrun.c (fetch_inferior_event): If GDB is not proceeding then
7169         run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
7170         Move should_notify_stop local into more inner scope.
7171
7172 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
7173             Stephen Roberts  <stephen.roberts@arm.com>
7174
7175         PR gdb/22882
7176         * infrun.c (resume_1): Add call to mark_async_event_handler.
7177
7178 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
7179
7180         * infrun.c (do_target_wait): Change old version of $pc printed.
7181
7182 2018-06-11  Simon Marchi  <simon.marchi@ericsson.com>
7183
7184         * dwarf2read.c (read_index_from_section): Rename to...
7185         (read_gdb_index_from_section): ... this, update all callers.
7186         (dwarf2_read_index): Rename to...
7187         (dwarf2_read_gdb_index): ... this, update all callers.
7188
7189 2018-06-11  John David Anglin  <danglin@gcc.gnu.org>
7190
7191         * gdb/hppa-linux-nat.c
7192         (hppa_linux_nat_target::fetch_inferior_registers): Rename to
7193         hppa_linux_nat_target::fetch_registers.
7194
7195 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
7196
7197         * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
7198         * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
7199         (AARCH64_DWARF_SVE_FFR): Likewise.
7200         (AARCH64_DWARF_SVE_P0): Likewise.
7201         (AARCH64_DWARF_SVE_Z0): Likewise.
7202
7203 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
7204
7205         * common/common-regcache.h (raw_compare): New function.
7206         * regcache.c (regcache::raw_compare): Likewise.
7207         * regcache.h (regcache::raw_compare): New declaration.
7208
7209 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
7210
7211         * common/common-regcache.h (reg_buffer_common): New structure.
7212         * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
7213         (reg_buffer::raw_supply): Likewise.
7214         (reg_buffer::raw_supply_integer): Likewise.
7215         (reg_buffer::raw_supply_zeroed): Likewise.
7216         (reg_buffer::raw_collect): Likewise.
7217         (reg_buffer::raw_collect_integer): Likewise.
7218         * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
7219         (reg_buffer::raw_supply): Likewise.
7220         (reg_buffer::raw_supply_integer): Likewise.
7221         (reg_buffer::raw_supply_zeroed): Likewise.
7222         (reg_buffer::raw_collect): Likewise.
7223         (reg_buffer::raw_collect_integer): Likewise.
7224
7225 2018-06-10  Tom Tromey  <tom@tromey.com>
7226
7227         * remote.c (stop_reply_p): Remove typedef.  Don't declare queue.
7228         (class remote_state) <stop_reply_queue>: Now std::vector.
7229         (remote_state::~remote_state)
7230         (remote_target::stop_reply_queue_length): Update.
7231         (struct queue_iter_param, remove_child_of_pending_fork)
7232         (struct check_pending_event_prevents_wildcard_vcont_callback_data)
7233         (check_pending_event_prevents_wildcard_vcont_callback)
7234         (remove_stop_reply_for_inferior)
7235         (remove_stop_reply_of_remote_state)
7236         (remote_notif_remove_once_on_match)
7237         (stop_reply_match_ptid_and_ws)
7238         (remote_kill_child_of_pending_fork): Remove.
7239         (remote_target::remove_new_fork_children)
7240         (remote_target::check_pending_events_prevent_wildcard_vcont)
7241         (remote_target::discard_pending_stop_replies)
7242         (remote_target::discard_pending_stop_replies_in_queue)
7243         (remote_target::remote_notif_remove_queued_reply)
7244         (remote_target::queued_stop_reply)
7245         (remote_target::push_stop_reply, remote_target::peek_stop_reply)
7246         (remote_target::wait, remote_target::kill_new_fork_children)
7247         (remote_target::async): Update.
7248
7249 2018-06-10  Tom Tromey  <tom@tromey.com>
7250
7251         * record-full.c (record_full_arch_list_cleanups): Remove.
7252         (record_full_message): Use try/catch.
7253         (record_full_wait_cleanups): Remove.
7254         (record_full_wait_1): Use try/catch.
7255         (record_full_restore): Likewise.
7256
7257 2018-06-10  Tom Tromey  <tom@tromey.com>
7258
7259         * record-full.c (record_full_breakpoint_p): Remove typedef.  Don't
7260         declare VEC.  Add constructor.
7261         <in_target_beneath>: Now bool.
7262         (record_full_breakpoints): Now a std::vector, static.
7263         (record_full_sync_record_breakpoints)
7264         (record_full_init_record_breakpoints)
7265         (record_full_target::insert_breakpoint)
7266         (record_full_target::remove_breakpoint): Update.  Don't use XNEW.
7267
7268 2018-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
7269
7270         * dwarf2read.c (process_cu_includes): Remove struct keyword.
7271         * serial.c (serial_interface_lookup): Remove struct keyword.
7272
7273 2018-06-10  Tom Tromey  <tom@tromey.com>
7274
7275         * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
7276         method.
7277         * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
7278         a method.
7279         * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
7280         method.
7281         * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
7282         "beneath" as a method.
7283         * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
7284         Use "beneath" as a method.
7285
7286 2018-06-10  Tom Tromey  <tom@tromey.com>
7287
7288         * tracefile.c (struct trace_file_writer_deleter): New.
7289         <operator()>: Rename from trace_file_writer_xfree.
7290         (trace_file_writer_up): New typedef.
7291         (tsave_command, trace_save_tfile, trace_save_ctf): Update.
7292
7293 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
7294
7295         * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
7296         <m_registers, m_register_status>: Change type to
7297         std::unique_ptr.
7298         * regcache.c (reg_buffer::reg_buffer): Use new instead of
7299         XCNEWVEC.
7300
7301 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
7302
7303         * common/common-regcache.h (enum register_status): Add
7304         underlying type "signed char".
7305         * regcache.h (reg_buffer) <m_register_status>: Change type to
7306         register_status *.
7307         * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
7308         register_status instead of signed char.
7309         (reg_buffer::save): Use REG_UNKNOWN instead of 0.
7310         (reg_buffer::get_register_status): Remove cast.
7311         (readable_regcache::raw_read): Remove cast.
7312         (readable_regcache::cooked_read): Remove cast.
7313
7314 2018-06-09  Tom Tromey  <tom@tromey.com>
7315
7316         * source.c (reverse_search_command, forward_search_command): Use
7317         scoped_fd.
7318
7319 2018-06-09  Tom Tromey  <tom@tromey.com>
7320
7321         * serial.c (serial_ops_p): Remove typedef.  Don't declare VEC.
7322         (serial_ops_list): Now static, std::vector.
7323         (serial_interface_lookup, serial_add_interface): Update.
7324
7325 2018-06-09  Tom Tromey  <tom@tromey.com>
7326
7327         * dwarf2read.c (process_cu_includes): Update.
7328         (process_full_comp_unit): Update.
7329         * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
7330         std::vector.
7331
7332 2018-06-08  Paul Koning  <paul_koning@dell.com>
7333
7334         PR gdb/23252
7335
7336         * python/python.c (do_start_initialization):
7337         Avoid call to internal Python API.
7338         (init__gdb_module): New function.
7339
7340 2018-06-08  Gary Benson <gbenson@redhat.com>
7341
7342         * linux-thread-db.c (valprint.h): New include.
7343         (struct check_thread_db_info): New structure.
7344         (check_thread_db_on_load, tdb_testinfo): New static globals.
7345         (check_thread_db, check_thread_db_callback): New functions.
7346         (try_thread_db_load_1): Run integrity checks if requested.
7347         (maintenance_check_libthread_db): New function.
7348         (_initialize_thread_db): Register "maint check libthread-db"
7349         and "maint set/show check-libthread-db".
7350         * NEWS: Mention the above new commands.
7351
7352 2018-06-08  Tom Tromey  <tom@tromey.com>
7353
7354         * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
7355         now a method.
7356
7357 2018-06-08  Tom Tromey  <tom@tromey.com>
7358
7359         * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
7360
7361 2018-06-08  Tom Tromey  <tom@tromey.com>
7362
7363         * common/btrace-common.h (struct btrace_data): Add constructor,
7364         destructor, move assignment operator.
7365         <empty, clear, fini>: New methods.
7366         <format>: Initialize.
7367         (btrace_data_init, btrace_data_fini, btrace_data_clear)
7368         (btrace_data_empty): Don't declare.
7369         * common/btrace-common.c (btrace_data_init): Remove.
7370         (btrace_data::fini): Rename from btrace_data_fini.
7371         (btrace_data::empty): Rename from btrace_data_empty.
7372         (btrace_data::clear): Rename from btrace_data_clear.  Return
7373         bool.
7374         * btrace.h (make_cleanup_btrace_data): Don't declare.
7375         * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
7376         (parse_xml_btrace): Update.
7377         (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
7378         (maint_btrace_clear_packet_history_cmd): Update.
7379
7380 2018-06-07  Pedro Alves  <palves@redhat.com>
7381
7382         * target.h (target_ops) <beneath>: Now a method.  All references
7383         updated.
7384         (class target_stack): New.
7385         * target.c (g_target_stack): New.
7386         (g_current_top_target): Delete.
7387         (current_top_target): Get the top target out of g_target_stack.
7388         (target_stack::push, target_stack::unpush): New.
7389         (push_target, unpush_target): Reimplement.
7390         (target_is_pushed): Reimplement in terms of g_target_stack.
7391         (target_ops::beneath, target_stack::find_beneath): New.
7392
7393 2018-06-07  Pedro Alves  <palves@redhat.com>
7394
7395         * target.h (find_target_beneath): Delete declaration.
7396         * target.c (find_target_beneath): Delete definition.
7397         * aix-thread.c: All callers of find_target_beneath adjusted to
7398         call target_ops::beneath instead.
7399         * bsd-uthread.c: Likewise.
7400         * linux-thread-db.c: Likewise.
7401         * ravenscar-thread.c: Likewise.
7402         * sol-thread.c: Likewise.
7403         * spu-multiarch.c: Likewise.
7404
7405 2018-06-07  Pedro Alves  <palves@redhat.com>
7406
7407         * target.h (target_ops) <beneath>: Now a method.  All references
7408         updated.
7409         (target_ops) <m_beneath>: New.
7410         * target.c (target_ops::beneath): New.
7411         * corelow.c: Adjust all references to target_ops::beneath.
7412         * linux-thread-db.c: Likewise.
7413         * make-target-delegates: Likewise.
7414         * record-btrace.c: Likewise.
7415         * record-full.c: Likewise.
7416         * remote.c: Likewise.
7417         * target.c: Likewise.
7418         * target-delegates.c: Regenerate.
7419
7420 2018-06-07  Pedro Alves  <palves@redhat.com>
7421
7422         * target.h (target_stack): Delete.
7423         (current_top_target): Declare function.
7424         * target.c (target_stack): Delete.
7425         (g_current_top_target): New.
7426         (current_top_target): New function.
7427         * auxv.c: Use current_top_target instead of target_stack
7428         throughout.
7429         * avr-tdep.c: Likewise.
7430         * breakpoint.c: Likewise.
7431         * corefile.c: Likewise.
7432         * elfread.c: Likewise.
7433         * eval.c: Likewise.
7434         * exceptions.c: Likewise.
7435         * frame.c: Likewise.
7436         * gdbarch-selftests.c: Likewise.
7437         * gnu-v3-abi.c: Likewise.
7438         * ia64-tdep.c: Likewise.
7439         * ia64-vms-tdep.c: Likewise.
7440         * infcall.c: Likewise.
7441         * infcmd.c: Likewise.
7442         * infrun.c: Likewise.
7443         * linespec.c: Likewise.
7444         * linux-tdep.c: Likewise.
7445         * minsyms.c: Likewise.
7446         * ppc-linux-nat.c: Likewise.
7447         * ppc-linux-tdep.c: Likewise.
7448         * procfs.c: Likewise.
7449         * regcache.c: Likewise.
7450         * remote.c: Likewise.
7451         * rs6000-tdep.c: Likewise.
7452         * s390-linux-nat.c: Likewise.
7453         * s390-tdep.c: Likewise.
7454         * solib-aix.c: Likewise.
7455         * solib-darwin.c: Likewise.
7456         * solib-dsbt.c: Likewise.
7457         * solib-spu.c: Likewise.
7458         * solib-svr4.c: Likewise.
7459         * solib-target.c: Likewise.
7460         * sparc-tdep.c: Likewise.
7461         * sparc64-tdep.c: Likewise.
7462         * spu-tdep.c: Likewise.
7463         * symfile.c: Likewise.
7464         * symtab.c: Likewise.
7465         * target-descriptions.c: Likewise.
7466         * target-memory.c: Likewise.
7467         * target.c: Likewise.
7468         * target.h: Likewise.
7469         * tracefile-tfile.c: Likewise.
7470         * tracepoint.c: Likewise.
7471         * valops.c: Likewise.
7472         * valprint.c: Likewise.
7473         * value.c: Likewise.
7474         * windows-tdep.c: Likewise.
7475         * mi/mi-main.c: Likewise.
7476
7477 2018-06-07  Tom Tromey  <tom@tromey.com>
7478
7479         * valprint.h (build_address_symbolic): Declare.
7480         * printcmd.c (print_address_symbolic): Update.
7481         (build_address_symbolic): Change "name" and "filename" to
7482         std::string.
7483         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
7484         Update.
7485         * defs.h (build_address_symbolic): Remove declaration.
7486
7487 2018-06-07  Alan Hayward  <alan.hayward@arm.com>
7488
7489         * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
7490         (aarch64_vnv_type): Add function.
7491         (aarch64_pseudo_register_name): Add V regs for SVE.
7492         (aarch64_pseudo_register_type): Likewise.
7493         (aarch64_pseudo_register_reggroup_p): Likewise.
7494         (aarch64_pseudo_read_value_2): Use V0 offset for SVE
7495         (aarch64_pseudo_read_value): Add V regs for SVE.
7496         (aarch64_pseudo_write_2): Use V0 offset for SVE
7497         (aarch64_pseudo_write): Add V regs for SVE.
7498         * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
7499
7500 2018-06-06  Sergio Durigan Junior  <sergiodj@redhat.com>
7501
7502         * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
7503         (sve_vl_from_vq): Likewise.
7504
7505 2018-06-05  Tom Tromey  <tom@tromey.com>
7506
7507         * cli/cli-cmds.c (show_version): Update.
7508         * top.c (print_gdb_version): Add "interactive" parameter.
7509         Update.
7510         * main.c (captured_main_1): Update.
7511         * top.h (print_gdb_version): Add "interactive" parameter and a
7512         comment.
7513
7514 2018-06-05  David Malcolm  <dmalcolm@redhat.com>
7515
7516         * common/enum-flags.h: Add trailing semicolon to example in
7517         comment.
7518
7519 2018-06-05  Tom Tromey  <tom@tromey.com>
7520
7521         PR cli/12326:
7522         * NEWS: Add entry about pager.
7523         * utils.c (pagination_disabled_for_command): New global.
7524         (prompt_for_continue): Allow "c" response to prompt.
7525         (reinitialize_more_filter): Clear
7526         pagination_disabled_for_command.
7527         (fputs_maybe_filtered): Check pagination_disabled_for_command.
7528
7529 2018-06-04  Tom Tromey  <tom@tromey.com>
7530
7531         * ada-lang.h (ada_lookup_symbol_list): Update.
7532         * ada-lang.c (resolve_subexp): Update.
7533         (symbols_are_identical_enums): Change type of syms.  Remove nsyms
7534         parameter.
7535         (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
7536         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
7537         results parameter to std::vector.
7538         (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
7539         Update.
7540         * ada-exp.y (block_lookup): Update.
7541         (select_possible_type_sym): Change type of syms.  Remove nsyms
7542         parameter.
7543         (write_var_or_type, write_name_assoc): Update.
7544
7545 2018-06-04  Joel Brobecker  <brobecker@adacore.com>
7546
7547         * windows-nat.c (windows_nat_target::xfer_partial): Return
7548         TARGET_XFER_E_IO if we need to delegate to the target beneath
7549         but BENEATH is NULL.
7550
7551 2018-06-04  Simon Marchi  <simon.marchi@ericsson.com>
7552
7553         * Makefile.in (config.status): Add configure.nat as a
7554         dependency.
7555
7556 2018-06-04  Tom Tromey  <tom@tromey.com>
7557
7558         * cp-name-parser.y (cpname_state): Add method declarations.
7559         (HANDLE_QUAL): Update.
7560         (cpname_state::d_grab, cpname_state::fill_comp)
7561         (cpname_state::make_operator, cpname_state::make_dtor)
7562         (cpname_state::make_builtin_type, cpname_state::make_name)
7563         (cpname_state::d_qualify, cpname_state::d_int_type)
7564         (cpname_state::d_unary, cpname_state::d_binary): Now methods.
7565         (%union): Move earlier.
7566
7567 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
7568
7569         * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
7570
7571 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
7572
7573         * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
7574         (aarch64_pseudo_write_1): Likewise.
7575         (aarch64_pseudo_read_value): Use helper.
7576         (aarch64_pseudo_write): Likewise.
7577
7578 2018-06-04  Pedro Alves  <palves@redhat.com>
7579
7580         * darwin-nat.c (darwin_ops): Delete.
7581         (darwin_attach_pid): Use get_native_target.
7582
7583 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
7584
7585         * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
7586         * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
7587
7588 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
7589
7590         * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
7591         * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
7592         (aarch64_gdbarch_init): Check for SVE.
7593         * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
7594
7595 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
7596
7597         * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
7598         * aarch64-tdep.h (aarch64_read_description): Likewise.
7599         * arch/aarch64.c (aarch64_create_target_description): Likewise.
7600         * arch/aarch64.h (aarch64_create_target_description): Likewise.
7601         * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
7602         * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
7603         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
7604
7605 2018-06-02  Simon Marchi  <simon.marchi@ericsson.com>
7606
7607         * value.c (value_fetch_lazy_bitfield): New.
7608         (value_fetch_lazy_memory): New.
7609         (value_fetch_lazy_register): New.
7610         (value_fetch_lazy): Factor out to smaller functions.
7611
7612 2018-06-01  Tom Tromey  <tom@tromey.com>
7613
7614         * cp-name-parser.y (backslashable, represented): Now const.
7615
7616 2018-06-01  Tom Tromey  <tom@tromey.com>
7617
7618         * cp-name-parser.y: Include parser-defs.h.
7619         (parser_fprintf): Remove declaration.
7620
7621 2018-06-01  Tom Tromey  <tom@tromey.com>
7622
7623         * cp-name-parser.y: Use %pure-parser, %lex-param, and
7624         %parse-param.
7625         (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
7626         (global_result): Remove globals.
7627         (struct cpname_state): New.
7628         (yyparse): Don't declare.
7629         (yylex, yyerror): Move declarations after %union.
7630         (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
7631         (make_name): Add state parameter.
7632         Update all callers.
7633         (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
7634         parameter.
7635         (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
7636         Update.
7637         (yylex): Add lvalp, state parameters.
7638         (yyerror): Add state parameter.
7639         (cp_demangled_name_to_comp): Update.
7640
7641 2018-06-01  Tom Tromey  <tom@tromey.com>
7642
7643         * cp-name-parser.y (parser_fprintf): Declare.
7644         (GDB_YY_REMAP_PREFIX): Define.
7645         Include yy-remap.h.  Don't redefine yy* identifiers.
7646
7647 2018-06-01  Tom Tromey  <tom@tromey.com>
7648
7649         * python/py-type.c (typy_legacy_template_argument): Update.
7650         * cp-support.h (cp_demangled_name_to_comp): Update.
7651         * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
7652         parameter to be a "std::string *".
7653         (main): Update.
7654
7655 2018-06-01  H.J. Lu  <hongjiu.lu@intel.com>
7656
7657         * ada-lex.l: Include "diagnostics.h" instead of
7658         "common/diagnostics.h".
7659         * unittests/environ-selftests.c: Likewise.
7660         * common/diagnostics.h: Moved to ../include.
7661
7662 2018-06-01  Joel Brobecker  <brobecker@adacore.com>
7663
7664         * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
7665         to language_mode_manual while calling breakpoint_re_set_one.
7666
7667 2018-06-01  Tom Tromey  <tom@tromey.com>
7668
7669         * valops.c (value_cast_structs, destructor_name_p): Update.
7670         * symtab.c (gdb_mangle_name): Update.
7671         * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
7672         Update.
7673         * p-valprint.c (pascal_object_is_vtbl_ptr_type)
7674         (pascal_object_print_value_fields, pascal_object_print_value):
7675         Update.
7676         * p-typeprint.c (pascal_type_print_derivation_info): Update.
7677         * linespec.c (find_methods): Update.
7678         * gdbtypes.h (type_name_no_tag): Remove.
7679         (type_name_or_error): Rename from type_name_no_tag_or_error.
7680         * gdbtypes.c (type_name_no_tag): Remove.
7681         (type_name_or_error): Rename from type_name_no_tag_or_error.
7682         (lookup_struct_elt_type, check_typedef): Update.
7683         * expprint.c (print_subexp_standard): Update.
7684         * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
7685         * d-namespace.c (d_lookup_nested_symbol): Update.
7686         * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
7687         (cp_print_class_member): Update.
7688         * cp-namespace.c (cp_lookup_nested_symbol): Update.
7689         * completer.c (add_struct_fields): Update.
7690         * c-typeprint.c (cp_type_print_derivation_info)
7691         (c_type_print_varspec_prefix, c_type_print_base_struct_union):
7692         Update.
7693         * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
7694         (ada_prefer_type, ada_is_exception_sym): Update.
7695
7696 2018-06-01  Tom Tromey  <tom@tromey.com>
7697
7698         * valops.c (enum_constant_from_type, value_namespace_elt)
7699         (value_maybe_namespace_elt): Update.
7700         * valarith.c (find_size_for_pointer_math): Update.
7701         * target-descriptions.c (make_gdb_type): Update.
7702         * symmisc.c (print_symbol): Update.
7703         * stabsread.c (define_symbol, read_type)
7704         (complain_about_struct_wipeout, add_undefined_type)
7705         (cleanup_undefined_types_1): Update.
7706         * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
7707         (rust_range_type_p, val_print_struct, rust_print_struct_def)
7708         (rust_internal_print_type, rust_composite_type)
7709         (rust_evaluate_funcall, rust_evaluate_subexp)
7710         (rust_inclusive_range_type_p): Update.
7711         * python/py-type.c (typy_get_tag): Update.
7712         * p-typeprint.c (pascal_type_print_base): Update.
7713         * mdebugread.c (parse_symbol, parse_type): Update.
7714         * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
7715         Update.
7716         * guile/scm-type.c (gdbscm_type_tag): Update.
7717         * go-lang.c (sixg_string_p): Update.
7718         * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
7719         Update.
7720         * gdbtypes.h (struct main_type) <tag_name>: Remove.
7721         (TYPE_TAG_NAME): Remove.
7722         * gdbtypes.c (type_name_no_tag): Simplify.
7723         (check_typedef, check_types_equal, recursive_dump_type)
7724         (copy_type_recursive, arch_composite_type): Update.
7725         * f-typeprint.c (f_type_print_base): Update.  Print "Type" prefix
7726         in summary mode when needed.
7727         * eval.c (evaluate_funcall): Update.
7728         * dwarf2read.c (fixup_go_packaging, read_structure_type)
7729         (process_structure_scope, read_enumeration_type)
7730         (read_namespace_type, read_module_type, determine_prefix): Update.
7731         * cp-support.c (inspect_type): Update.
7732         * coffread.c (process_coff_symbol, decode_base_type): Update.
7733         * c-varobj.c (c_is_path_expr_parent): Update.
7734         * c-typeprint.c (c_type_print_base_struct_union): Update.
7735         (c_type_print_base_1): Update.  Print struct/class/union/enum in
7736         summary when using C language.
7737         * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
7738         (gen_maybe_namespace_elt): Update.
7739         * ada-lang.c (ada_type_name): Simplify.
7740         (empty_record, ada_template_to_fixed_record_type_1)
7741         (template_to_static_fixed_type)
7742         (to_record_with_fixed_variant_part, ada_check_typedef): Update.
7743
7744 2018-06-01  Tom Tromey  <tom@tromey.com>
7745
7746         * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
7747         c_print_type.
7748         * c-typeprint.c (c_print_type_1): Add "language" parameter.
7749         (c_print_type): Update.
7750         (c_print_type): New overload.
7751         (c_type_print_varspec_prefix, c_type_print_args)
7752         (c_type_print_varspec_suffix, c_print_type_no_offsets)
7753         (c_type_print_base_struct_union, c_type_print_base_1)
7754         (cp_type_print_method_args): Add "language" parameter.
7755         (c_type_print_base): Update.
7756         * c-lang.h (c_print_type): Add new overload.
7757
7758 2018-06-01  Tom Tromey  <tom@tromey.com>
7759
7760         * typeprint.h (c_type_print_varspec_suffix): Don't declare.
7761         * c-typeprint.c (c_type_print_varspec_suffix): Now static.
7762
7763 2018-06-01  Alan Hayward  <alan.hayward@arm.com>
7764
7765         * aarch64-tdep.c (aarch64_sve_register_names): New const
7766         var.
7767         * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
7768         (AARCH64_SVE_Z_REGS_NUM): New define.
7769         (AARCH64_SVE_P_REGS_NUM): Likewise.
7770         (AARCH64_SVE_NUM_REGS): Likewise.
7771
7772 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
7773
7774         * nat/linux-ptrace.h [__alpha__]
7775         (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
7776         definitions.
7777
7778 2018-05-31  Maciej W. Rozycki  <macro@mips.com>
7779
7780         * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
7781         the endianness selected.
7782         * NEWS: Document `set endian auto' mode operation update.
7783
7784 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
7785
7786         * Makefile.in: Add new header.
7787         * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
7788         (sve_vl_from_vg): Likewise.
7789         (sve_vq_from_vl): Likewise.
7790         (sve_vl_from_vq): Likewise.
7791         (sve_vq_from_vg): Likewise.
7792         (sve_vg_from_vq): Likewise.
7793         * configure.nat: Add new c file.
7794         * nat/aarch64-sve-linux-ptrace.c: New file.
7795         * nat/aarch64-sve-linux-ptrace.h: New file.
7796
7797 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
7798
7799         * aarch64-linux-nat.c (aarch64_linux_read_description):
7800         Add parmeter zero.
7801         * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
7802         Likewise.
7803         * aarch64-tdep.c (tdesc_aarch64_list): Add.
7804         (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
7805         (aarch64_gdbarch_init): Add parmeter zero.
7806         * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
7807         * arch/aarch64.c (aarch64_create_target_description): Check VQ.
7808         * arch/aarch64.h (aarch64_create_target_description): Add VQ.
7809         parmeter.
7810         * doc/gdb.texinfo: Describe SVE feature
7811         * features/aarch64-sve.c: New file.
7812
7813 2018-05-31  Omair Javaid  <omair.javaid@linaro.org>
7814
7815         PR gdb/23210
7816         * gdbarch.sh (significant_addr_bit): Default to zero when
7817         not set by target architecture.
7818         * gdbarch.c: Re-generated.
7819         * utils.c (address_significant): Update.
7820
7821 2018-05-30  Joel Brobecker  <brobecker@adacore.com>
7822
7823         * stack.c (func_command): Remove trailing newline in call to error.
7824
7825 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7826
7827         * regcache.h (regcache_raw_collect): Remove, update callers to
7828         use regcache::raw_collect.
7829         * regcache.c (regcache_raw_collect): Remove.
7830
7831 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7832
7833         * regcache.h (regcache_raw_supply): Remove, update callers to
7834         use detached_regcache::raw_supply.
7835         * regcache.c (regcache_raw_supply): Remove.
7836
7837 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7838
7839         * regcache.h (regcache_cooked_write_part): Remove, update
7840         callers to use regcache::cooked_write_part.
7841         * regcache.c (regcache_cooked_write_part): Remove.
7842
7843 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7844
7845         * regcache.h (regcache_cooked_read_part): Remove, update callers
7846         to use readable_regcache::cooked_read_part.
7847         * regcache.c (regcache_cooked_read_part): Remove.
7848
7849 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7850
7851         * regcache.h (regcache_cooked_read_value): Remove, update
7852         callers to use readable_regcache::cooked_read_value.
7853         * regcache.c (regcache_cooked_read_value): Remove.
7854
7855 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7856
7857         * regcache.h (regcache_cooked_write): Remove, update callers to
7858         use regcache::cooked_write.
7859         * regcache.c (regcache_cooked_write): Remove.
7860
7861 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7862
7863         * regcache.h (regcache_invalidate): Remove, update callers to
7864         use detached_regcache::invalidate instead.
7865         * regcache.c (regcache_invalidate): Remove.
7866
7867 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7868
7869         * regcache.h (regcache_raw_write_part): Remove, update callers
7870         to use regcache::raw_write_part instead.
7871         * regcache.c (regcache_raw_write_part): Remove.
7872
7873 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7874
7875         * regcache.h (regcache_raw_read_part): Remove, update callers to
7876         use readable_regcache::raw_read_part instead.
7877         * regcache.c (regcache_raw_read_part): Remove.
7878
7879 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7880
7881         * regcache.h (regcache_cooked_read): Remove, update callers to
7882         use readable_regcache::cooked_read instead.
7883         * regcache.c (regcache_cooked_read): Remove.
7884
7885 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7886
7887         * regcache.h (regcache_raw_write): Remove, update callers to use
7888         regcache::raw_write instead.
7889         * regcache.c (regcache_raw_write): Remove.
7890
7891 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7892
7893         * regcache.h (regcache_raw_read): Remove, update callers to use
7894         readable_regcache::raw_read instead.
7895         * regcache.c (regcache_raw_read): Remove.
7896
7897 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7898
7899         * regcache.h (regcache_raw_update): Remove, update callers to
7900         use readable_regcache::raw_update instead.
7901         * regcache.c (regcache_raw_update): Remove.
7902
7903 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7904
7905         * regcache.h (regcache_register_status): Remove, update callers
7906         to use reg_buffer::get_register_status directly instead.
7907         * regcache.c (regcache_register_status): Remove.
7908
7909 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7910
7911         * regcache.h (regcache_get_ptid): Remove, update all callers to
7912         call regcache::ptid instead.
7913         * regcache.c (regcache_get_ptid): Remove.
7914
7915 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7916
7917         * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
7918
7919 2018-05-30  Pedro Alves  <palves@redhat.com>
7920
7921         * common/common-exceptions.h (exception_rethrow): Use
7922         ATTRIBUTE_NORETURN.
7923
7924 2018-05-29  Simon Marchi  <simon.marchi@polymtl.ca>
7925
7926         * breakpoint.c (print_solib_event, check_status_catch_solib):
7927         Remove struct keyword in range-based for loops.
7928         * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
7929         * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
7930         Likewise.
7931         * linespec.c (find_superclass_methods, search_minsyms_for_name):
7932         Likewise.
7933         * symfile.c (addr_info_make_relative): Likewise.
7934         * thread.c (value_in_thread_stack_temporaries): Likewise.
7935
7936 2018-06-12  Weimin Pan  <weimin.pan@oracle.com>
7937
7938         PR gdb/16841
7939         * valops.c (value_struct_elt_for_reference): Call check_typedef on
7940         aggregate type to get its real type before accessing it.
7941
7942 2018-05-29  Weimin Pan  <weimin.pan@oracle.com>
7943
7944         * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
7945         * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
7946         * coff-pe-read.c (add_pe_forwarded_sym): Replace
7947         lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
7948         * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
7949         * jit.c (jit_breakpoint_re_set_internal): Likewise.
7950         * printcmd.c (info_address_command): Likewise.
7951
7952 2018-05-29  Tom Tromey  <tom@tromey.com>
7953
7954         * windows-nat.c (handle_exception): Update fall-through comment.
7955
7956 2018-05-29  Tom Tromey  <tom@tromey.com>
7957
7958         * progspace.h (so_list_ptr): Remove typedef.  Don't declare VEC.
7959         (struct program_space) <added_solibs>: Now a std::vector.
7960         * breakpoint.c (print_solib_event): Update.
7961         (check_status_catch_solib): Update.
7962         * progspace.c (clear_program_space_solib_cache): Update.
7963         * solib.c (update_solib_list): Update.
7964
7965 2018-05-29  Tom Tromey  <tom@tromey.com>
7966
7967         * python/py-type.c (typy_richcompare): Update.
7968         * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
7969         * gdbtypes.h (types_deeply_equal): Return bool.
7970         (types_equal): Likewise.
7971         * gdbtypes.c (type_equality_entry_d): Remove typedef.  Don't
7972         declare VEC.
7973         (check_types_equal): Change worklist to std::vector.  Return
7974         bool.
7975         (struct type_equality_entry): Add constructor.
7976         (compare_maybe_null_strings): Return bool.
7977         (check_types_worklist): Return bool.  Change worklist to
7978         std::vector.
7979         (types_deeply_equal): Use std::vector.
7980         (types_equal): Return bool.
7981         (compare_maybe_null_strings): Simplify.
7982
7983 2018-05-29  Tom Tromey  <tom@tromey.com>
7984
7985         * record-btrace.c (tp_t): Remove typedef.  Don't declare VEC.
7986
7987 2018-05-29  Tom Tromey  <tom@tromey.com>
7988
7989         * objc-lang.h: Don't include cp-support.h.
7990         * common/gdb_vecs.h (const_char_ptr): Remove typedef.  Don't
7991         declare VEC.
7992
7993 2018-05-27  Tom Tromey  <tom@tromey.com>
7994
7995         * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
7996
7997 2018-05-25  Tom Tromey  <tom@tromey.com>
7998
7999         * value.c (value::location): Initialize.
8000
8001 2018-05-25  Tom Tromey  <tom@tromey.com>
8002
8003         * dbxread.c (init_bincl_list): Remove.
8004         (bincl_list): Now a std::vector.
8005         (bincls_allocated, next_bincl): Remove.
8006         (free_bincl_list, do_free_bincl_list_cleanup)
8007         (make_cleanup_free_bincl_list): Remove.
8008         (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
8009         unique_xmalloc_ptr.
8010         (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
8011         (struct header_file_location): Add constructor.
8012         (add_bincl_to_list): Remove.
8013
8014 2018-05-25  Tom Tromey  <tom@tromey.com>
8015
8016         * tui/tui.c (tui_enable): Update.
8017         * mi/mi-interp.c (mi_interp::init): Update.
8018         * interps.h (class interp) <name>: New method.
8019         <m_name>: Rename from name.
8020         (~scoped_restore_interp): Update.
8021         * interps.c (interp::interp): Update.
8022         (interp_add, interp_set, interp_lookup_existing)
8023         (current_interp_named_p): Update.
8024
8025 2018-05-25  Tom Tromey  <tom@tromey.com>
8026
8027         * interps.c (interp_name): Remove.
8028         * mi/mi-interp.c (mi_interp::init): Update.
8029         * interps.h (interp_name): Remove.
8030         (~scoped_restore_interp): Update.
8031         * tui/tui.c (tui_enable): Update.
8032
8033 2018-05-25  Tom Tromey  <tom@tromey.com>
8034
8035         * utils.c (fputs_maybe_filtered): Update.
8036         * linespec.c (decode_line_full): Update.
8037         * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
8038         (mi_print_breakpoint_for_event, mi_solib_loaded)
8039         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
8040         (mi_user_selected_context_changed): Update.
8041         * mi/mi-main.c (mi_execute_command): Update.
8042         * cli/cli-script.c (execute_control_command): Update.
8043         * python/python.c (execute_gdb_command): Update.
8044         * solib.c (info_sharedlibrary_command): Update.
8045         * interps.c (interp_ui_out): Remove.
8046         * interps.h (interp_ui_out): Remove.
8047
8048 2018-05-25  Tom Tromey  <tom@tromey.com>
8049
8050         * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
8051         * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
8052         * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
8053
8054 2018-05-25  Tom Tromey  <tom@tromey.com>
8055
8056         * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
8057         * interps.c (interp_exec): Use scoped_restore.
8058
8059 2018-05-25  Tom Tromey  <tom@tromey.com>
8060
8061         * remote.c (remote_target::remote_file_get): Use
8062         gdb::byte_vector.
8063         (remote_target::remote_file_put): Likewise.
8064
8065 2018-05-25  Tom Tromey  <tom@tromey.com>
8066
8067         * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
8068         a std::string.
8069         (get_pe_section_index, add_pe_exported_sym): Update.
8070         (read_pe_exported_syms): Use gdb::def_vector.
8071
8072 2018-05-25  Tom Tromey  <tom@tromey.com>
8073
8074         * frame.c (remove_prev_frame): Remove.
8075         (get_prev_frame_if_no_cycle): Use TRY/CATCH.
8076
8077 2018-05-25  Maciej W. Rozycki  <macro@mips.com>
8078
8079         * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
8080         Remove prototypes.
8081         * mips-linux-nat.c (supply_fpregset): Always call
8082         `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
8083         (fill_fpregset): Always call `mips64_fill_fpregset' rather than
8084         `mips_fill_fpregset'.
8085         * mips-linux-tdep.c (mips_supply_fpregset)
8086         (mips_supply_fpregset_wrapper, mips_fill_fpregset)
8087         (mips_fill_fpregset_wrapper): Remove functions.
8088         (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
8089         (mips_linux_fpregset): Remove variable.
8090         (mips_linux_iterate_over_regset_sections): Use
8091         `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
8092         (mips_linux_o32_sigframe_init): Remove comment.
8093
8094 2018-05-25  Pedro Alves  <palves@redhat.com>
8095
8096         * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
8097         (struct readahead_cache, struct packet_reg, struct
8098         remote_arch_state, class remote_state): Move higher up in the
8099         file.
8100         (remote_target::m_remote_state): Now an object instead of a pointer.
8101         (remote_target::get_remote_state): Adjust.
8102
8103 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
8104
8105         * stack.c (select_and_print_frame): Delete.
8106         (struct function_bounds): Move struct within function.
8107         (func_command): Most content moved into new function
8108         find_frame_for_function, use new function, print result, add
8109         function comment.
8110         (find_frame_for_function): New function, now returns a result.
8111
8112 2018-05-24  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
8113
8114         * stack.c (iterate_over_block_arg_vars): Fix comment.
8115         (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
8116
8117 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
8118
8119         PR gdb/23203
8120         * frame.c
8121         (scoped_restore_selected_frame::scoped_restore_selected_frame):
8122         Define.
8123         (scoped_restore_selected_frame::~scoped_restore_selected_frame):
8124         Define.
8125         * frame.h (class scoped_restore_selected_frame): New class.
8126         * stack.c (print_frame_local_vars): Remove catching and rethrowing
8127         of any exception, use scoped_restore_selected_frame to restore the
8128         frame instead.
8129
8130 2018-05-24  Pedro Alves  <palves@redhat.com>
8131
8132         * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
8133         override.
8134
8135 2018-05-23  Tom Tromey  <tom@tromey.com>
8136
8137         * complaints.c (struct complaints): Remove.
8138         (symfile_complaint_book): Remove.
8139         (series): New global.
8140         (complaint_internal): Update.
8141         (clear_complaints): Update.
8142
8143 2018-05-23  Tom Tromey  <tom@tromey.com>
8144
8145         * complaints.c (counters): New global.
8146         (struct complain): Remove.
8147         (struct complaints) <root>: Remove.
8148         (complaint_sentinel): Remove.
8149         (symfile_complaint_book): Update.
8150         (find_complaint) Remove.
8151         (complaint_internal, clear_complaints): Update.
8152
8153 2018-05-23  Tom Tromey  <tom@tromey.com>
8154
8155         * complaints.c (struct complain) <file, line>: Remove.
8156         (find_complaint): Remove file, line parameters.
8157         (complaint_internal): Update.
8158
8159 2018-05-23  Tom Tromey  <tom@tromey.com>
8160
8161         * complaints.c (vcomplaint): Remove.
8162         (complaint_internal) Merge in contents of vcomplaint.
8163
8164 2018-05-23  Tom Tromey  <tom@tromey.com>
8165
8166         * complaints.c (struct complaints) <explanation>: Remove.
8167         (symfile_explanations): Remove.
8168         (symfile_complaint_book): Update.
8169         (vcomplaint): Update.
8170         (struct explanation): Remove.
8171
8172 2018-05-23  Tom Tromey  <tom@tromey.com>
8173
8174         * complaints.c (symfile_complaints): Remove.
8175         (complaint_internal): Remove "complaints" parameter.
8176         (clear_complaints, vcomplaint): Remove "c" parameter.
8177         (get_complaints): Remove.
8178         * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
8179         (dwarf2_debug_line_missing_file_complaint)
8180         (dwarf2_debug_line_missing_end_sequence_complaint)
8181         (dwarf2_complex_location_expr_complaint)
8182         (dwarf2_const_value_length_mismatch_complaint)
8183         (dwarf2_section_buffer_overflow_complaint)
8184         (dwarf2_macro_malformed_definition_complaint)
8185         (dwarf2_invalid_attrib_class_complaint)
8186         (create_addrmap_from_index, dw2_symtab_iter_next)
8187         (dw2_expand_marked_cus)
8188         (dw2_debug_names_iterator::find_vec_in_debug_names)
8189         (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
8190         (create_debug_type_hash_table, init_cutu_and_read_dies)
8191         (partial_die_parent_scope, add_partial_enumeration)
8192         (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
8193         (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
8194         (read_import_statement, read_file_scope, create_dwo_cu_reader)
8195         (create_cus_hash_table, create_dwp_hash_table)
8196         (inherit_abstract_dies, read_func_scope, read_call_site_scope)
8197         (dwarf2_rnglists_process, dwarf2_ranges_process)
8198         (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
8199         (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
8200         (handle_struct_member_die, process_structure_scope)
8201         (read_array_type, read_common_block, read_module_type)
8202         (read_tag_pointer_type, read_typedef, read_base_type)
8203         (read_subrange_type, load_partial_dies, partial_die_info::read)
8204         (partial_die_info::read, partial_die_info::read)
8205         (partial_die_info::read, read_checked_initial_length_and_offset)
8206         (dwarf2_string_attr, read_formatted_entries)
8207         (dwarf_decode_line_header)
8208         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
8209         (new_symbol, dwarf2_const_value_attr, lookup_die_type)
8210         (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
8211         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
8212         (get_signatured_type, get_DW_AT_signature_type)
8213         (decode_locdesc, file_file_name, consume_improper_spaces)
8214         (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
8215         (dwarf_decode_macro_bytes, dwarf_decode_macros)
8216         (dwarf2_symbol_mark_computed, set_die_type)
8217         (read_attribute_value): Update.
8218         * stap-probe.c (handle_stap_probe, get_stap_base_address):
8219         Update.
8220         * dbxread.c (unknown_symtype_complaint)
8221         (lbrac_mismatch_complaint, repeated_header_complaint)
8222         (set_namestring, function_outside_compilation_unit_complaint)
8223         (read_dbx_symtab, process_one_symbol): Update.
8224         * gdbtypes.c (stub_noname_complaint): Update.
8225         * windows-nat.c (handle_unload_dll): Update.
8226         * coffread.c (coff_symtab_read, enter_linenos, decode_type)
8227         (decode_base_type): Update.
8228         * xcoffread.c (bf_notfound_complaint, ef_complaint)
8229         (eb_complaint, record_include_begin, record_include_end)
8230         (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
8231         (process_xcoff_symbol, read_symbol)
8232         (function_outside_compilation_unit_complaint)
8233         (scan_xcoff_symtab): Update.
8234         * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
8235         * buildsym.c (finish_block_internal, make_blockvector)
8236         (end_symtab_get_static_block, augment_type_symtab): Update.
8237         * dtrace-probe.c (dtrace_process_dof)
8238         (dtrace_static_probe_ops::get_probes): Update.
8239         * complaints.h (struct complaint): Don't declare.
8240         (symfile_complaints): Remove.
8241         (complaint_internal): Remove "complaints" parameter.
8242         (complaint): Likewise.
8243         (clear_complaints): Likewise.
8244         * symfile.c (syms_from_objfile_1, finish_new_objfile)
8245         (reread_symbols): Update.
8246         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
8247         (dwarf2_frame_cache, decode_frame_entry): Update.
8248         * dwarf2loc.c (dwarf_reg_to_regnum): Update.
8249         * objc-lang.c (lookup_objc_class, lookup_child_selector)
8250         (info_selectors_command): Update.
8251         * macrotab.c (macro_include, check_for_redefinition)
8252         (macro_undef): Update.
8253         * objfiles.c (filter_overlapping_sections): Update.
8254         * stabsread.c (invalid_cpp_abbrev_complaint)
8255         (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
8256         (define_symbol, error_type, read_type, rs6000_builtin_type)
8257         (stabs_method_name_from_physname, read_member_functions)
8258         (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
8259         (attach_fields_to_type, complain_about_struct_wipeout)
8260         (read_range_type, read_args, common_block_start)
8261         (common_block_end, cleanup_undefined_types_1, scan_file_globals):
8262         Update.
8263         * mdebugread.c (index_complaint, unknown_ext_complaint)
8264         (basic_type_complaint, bad_tag_guess_complaint)
8265         (bad_rfd_entry_complaint, unexpected_type_code_complaint)
8266         (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
8267         (parse_procedure, parse_lines)
8268         (function_outside_compilation_unit_complaint)
8269         (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
8270         (bad_tag_guess_complaint, reg_value_complaint): Update.
8271         * cp-support.c (demangled_name_complaint): Update.
8272         * macroscope.c (sal_macro_scope): Update.
8273         * dwarf-index-write.c (class debug_names): Update.
8274
8275 2018-05-23  Tom Tromey  <tom@tromey.com>
8276
8277         * complaints.c (clear_complaints): Remove "noisy" parameter.
8278         * complaints.h (clear_complaints): Update.
8279         * symfile.c (syms_from_objfile_1, finish_new_objfile)
8280         (reread_symbols): Update.
8281
8282 2018-05-23  Tom Tromey  <tom@tromey.com>
8283
8284         * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
8285         SUBSEQUENT_MESSAGE.
8286         (vcomplaint, clear_complaints): Update.
8287         (symfile_explanations): Remove some messages.
8288
8289 2018-05-23  Tom Tromey  <tom@tromey.com>
8290
8291         * complaints.c (internal_complaint): Remove.
8292         * complaints.h (internal_complaint): Remove.
8293
8294 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
8295
8296         * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
8297
8298 2018-05-22  Pedro Alves  <palves@redhat.com>
8299
8300         * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
8301         (remote_fileio_badfd, remote_fileio_return_errno)
8302         (remote_fileio_return_success, remote_fileio_func_open)
8303         (remote_fileio_func_open, remote_fileio_func_close)
8304         (remote_fileio_func_read, remote_fileio_func_write)
8305         (remote_fileio_func_lseek, remote_fileio_func_rename)
8306         (remote_fileio_func_unlink, remote_fileio_func_stat)
8307         (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
8308         (remote_fileio_func_isatty, remote_fileio_func_system): Add
8309         remote_target parameter.
8310         (remote_fio_func_map) <func>: Add remote_target parameter.
8311         (do_remote_fileio_request, remote_fileio_request):
8312         * remote-fileio.h (remote_fileio_request):
8313         * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
8314         remote_target parameter.
8315         (remote_notif_process, handle_notification): Adjust to pass down
8316         the remote.
8317         (remote_notif_state_allocate): Add remote_target parameter.  Save
8318         it.
8319         * remote-notif.h (struct remote_target): Forward declare.
8320         (struct notif_client) <parse, ack, can_get_pending_events>: Add
8321         remote_target parameter.
8322         (struct remote_notif_state) <remote>: New field.
8323         (remote_notif_ack, remote_notif_parse): Add remote_target
8324         parameter.
8325         (remote_notif_state_allocate, remote_notif_state_allocate): Add
8326         remote_target parameter.
8327         * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
8328         (threads_listing_context, rmt_thread_action, protocol_feature)
8329         (packet_reg, stop_reply, stop_reply_p, enum packet_support)
8330         (packet_result, struct threads_listing_context, remote_state):
8331         Move definitions and declarations higher up.
8332         (remote_target) <~remote_target>: Declare.
8333         (remote_download_command_source, remote_file_put, remote_file_get)
8334         (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
8335         (remote_hostio_pread_vFile, remote_hostio_send_command)
8336         (remote_hostio_set_filesystem, remote_hostio_open)
8337         (remote_hostio_close, remote_hostio_unlink, remote_state)
8338         (get_remote_state, get_remote_packet_size, get_memory_packet_size)
8339         (get_memory_write_packet_size, get_memory_read_packet_size)
8340         (append_pending_thread_resumptions, remote_detach_1)
8341         (append_resumption, remote_resume_with_vcont)
8342         (add_current_inferior_and_thread, wait_ns, wait_as)
8343         (process_stop_reply, remote_notice_new_inferior)
8344         (process_initial_stop_replies, remote_add_thread)
8345         (btrace_sync_conf, remote_btrace_maybe_reopen)
8346         (remove_new_fork_children, kill_new_fork_children)
8347         (discard_pending_stop_replies, stop_reply_queue_length)
8348         (check_pending_events_prevent_wildcard_vcont)
8349         (discard_pending_stop_replies_in_queue, stop_reply)
8350         (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
8351         (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
8352         (remote_interrupt_as, remote_interrupt_ns)
8353         (remote_get_noisy_reply, remote_query_attached)
8354         (remote_add_inferior, remote_current_thread, get_current_thread)
8355         (set_thread, set_general_thread, set_continue_thread)
8356         (set_general_process, write_ptid)
8357         (remote_unpack_thread_info_response, remote_get_threadinfo)
8358         (parse_threadlist_response, remote_get_threadlist)
8359         (remote_threadlist_iterator, remote_get_threads_with_ql)
8360         (remote_get_threads_with_qxfer)
8361         (remote_get_threads_with_qthreadinfo, extended_remote_restart)
8362         (get_offsets, remote_check_symbols, remote_supported_packet)
8363         (remote_query_supported, remote_packet_size)
8364         (remote_serial_quit_handler, remote_detach_pid)
8365         (remote_vcont_probe, remote_resume_with_hc)
8366         (send_interrupt_sequence, interrupt_query)
8367         (remote_notif_get_pending_events, fetch_register_using_p)
8368         (send_g_packet, process_g_packet, fetch_registers_using_g)
8369         (store_register_using_P, store_registers_using_G)
8370         (set_remote_traceframe, check_binary_download)
8371         (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
8372         (remote_xfer_live_readonly_partial, remote_read_bytes)
8373         (remote_send_printf, remote_flash_write, readchar)
8374         (remote_serial_write, putpkt, putpkt_binary, skip_frame)
8375         (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
8376         (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
8377         (extended_remote_disable_randomization, extended_remote_run)
8378         (send_environment_packet, extended_remote_environment_support)
8379         (extended_remote_set_inferior_cwd, remote_write_qxfer)
8380         (remote_read_qxfer, push_stop_reply, vcont_r_supported)
8381         (packet_command): Now methods of ...
8382         (remote_target): ... this class.
8383         (m_remote_state) <remote_target>: New field.
8384         (struct remote_state) <stop_reply_queue,
8385         remote_async_inferior_event_token, wait_forever_enabled_p>: New
8386         fields.
8387         (remote_state::remote_state): Allocate stop_reply_queue.
8388         (remote_state): Delete global.
8389         (get_remote_state_raw): Delete.
8390         (remote_target::get_remote_state): Allocate m_remote_state on
8391         demand.
8392         (get_current_remote_target): New.
8393         (remote_ops, extended_remote_ops): Delete.
8394         (wait_forever_enabled_p, remote_async_inferior_event_token):
8395         Delete, moved to struct remote_state.
8396         (remote_target::close): Delete self.  Destruction bits split to
8397         ...
8398         (remote_target::~remote_target): ... this.
8399         (show_memory_packet_size): Adjust to use
8400         get_current_remote_target.
8401         (struct protocol_feature) <func>: Add remote_target parameter.
8402         All callers adjusted.
8403         (curr_quit_handler_target): New.
8404         (remote_serial_quit_handler): Reimplement.
8405         (remote_target::open_1): Adjust to use get_current_remote_target.
8406         Heap-allocate remote_target/extended_remote_target instances.
8407         (vcont_builder::vcont_builder): Add remote_target parameter, and
8408         save it in m_remote.  All callers adjusted.
8409         (vcont_builder::m_remote): New field.
8410         (vcont_builder::restart, vcont_builder::flush)
8411         (vcont_builder::push_action): Use it.
8412         (remote_target::commit_resume): Use it.
8413         (struct queue_iter_param) <remote>: New field.
8414         (remote_target::remove_new_fork_children): Fill in 'remote' field.
8415         (check_pending_event_prevents_wildcard_vcont_callback_data): New.
8416         (check_pending_event_prevents_wildcard_vcont_callback)
8417         (remote_target::check_pending_events_prevent_wildcard_vcont)
8418         (remote_target::discard_pending_stop_replies)
8419         (remote_target::discard_pending_stop_replies_in_queue)
8420         (remote_target::remote_notif_remove_queued_reply): Fill in
8421         'remote' field.
8422         (remote_notif_get_pending_events): New.
8423         (remote_target::readchar, remote_target::remote_serial_write):
8424         Save/restore curr_quit_handler_target.
8425         (putpkt): New.
8426         (kill_new_fork_children): Fill in 'remote' field.
8427         (packet_command): Use get_current_remote_target, defer to
8428         remote_target method of same name.
8429         (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
8430         parameter, and save it in m_remote.  All callers adjusted.
8431         (scoped_remote_fd::release): Use m_remote.
8432         (scoped_remote_fd::m_remote): New field.
8433         (remote_file_put, remote_file_get, remote_file_delete): Use
8434         get_current_remote_target, defer to remote_target method of same
8435         name.
8436         (remote_btrace_reset): Add remote_state paremeter.  Update all
8437         callers.
8438         (remote_async_inferior_event_handler). Pass down 'data'.
8439         (remote_new_objfile): Use get_current_remote_target.
8440         (remote_target::vcont_r_supported): New.
8441         (set_range_stepping): Use get_current_remote_target and
8442         remote_target::vcont_r_supported.
8443         (_initialize_remote): Don't allocate 'remote_state' and
8444         'stop_reply_queue' globals.
8445         * remote.h (struct remote_target): Forward declare.
8446         (getpkt, putpkt, remote_notif_get_pending_events): Add
8447         'remote_target' parameter.
8448
8449 2018-05-22  Pedro Alves  <palves@redhat.com>
8450
8451         * remote.c (vcont_builder): Now a class.  Make all data members
8452         private.
8453         (vcont_builder) <vcont_builder, restart, flush, push_action>:
8454         Declare methods.
8455         (vcont_builder_restart): Rename to ...
8456         (vcont_builder::restart): ... this.
8457         (vcont_builder_flush): Rename to ...
8458         (vcont_builder::flush): ... this.
8459         (vcont_builder_push_action): Rename to ...
8460         (vcont_builder::push_action): ... this.
8461         (remote_target::commit_resume): Adjust.
8462
8463 2018-05-22  Pedro Alves  <palves@redhat.com>
8464
8465         * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
8466         (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
8467         (get_fixed_memory_packet_size): New.
8468         (get_memory_packet_size): Use it.
8469         (set_memory_packet_size): Don't override the config size with
8470         DEFAULT_MAX_MEMORY_PACKET_SIZE.
8471         (show_memory_packet_size): Use get_fixed_memory_packet_size.
8472         Don't refer to get_memory_packet_size if not connected to a remote
8473         target.  Show "(default)" if configured size is 0.
8474
8475 2018-05-22  Pedro Alves  <palves@redhat.com>
8476
8477         * remote.c (remote_target::mourn_inferior): Move
8478         discard_pending_stop_replies call here from ...
8479         (_initialize_remote): ... here.
8480
8481 2018-05-22  Pedro Alves  <palves@redhat.com>
8482
8483         * remote.c (compare_section_command): Remove set_general_process
8484         call.
8485
8486 2018-05-22  Pedro Alves  <palves@redhat.com>
8487
8488         * remote.c (struct packet_reg, struct remote_arch_state):
8489         Move higher up in the file.
8490         (remote_state) <m_arch_states>: Store remote_arch_state values
8491         instead of remote_arch_state pointers.
8492         (remote_state::get_remote_arch_state): Adjust.
8493
8494 2018-05-22  Pedro Alves  <palves@redhat.com>
8495
8496         * remote.c: Include <unordered_map>.
8497         (remote_state): Now a class.
8498         (remote_state) <get_remote_arch_state>: Declare method.
8499         <get_remote_arch_state>: New field.
8500         (remote_arch_state) <remote_arch_state>: Declare ctor.
8501         <regs>: Now a unique_ptr.
8502         (remote_gdbarch_data_handle): Delete.
8503         (get_remote_arch_state): Delete.
8504         (remote_state::get_remote_arch_state): New.
8505         (get_remote_state): Adjust to call remote_state's
8506         get_remote_arch_state method.
8507         (init_remote_state): Delete, bits factored out to ...
8508         (remote_arch_state::remote_arch_state): ... this new method.
8509         (get_remote_packet_size, get_memory_packet_size)
8510         (process_g_packet, remote_target::fetch_registers)
8511         (remote_target::prepare_to_store, store_registers_using_G)
8512         (remote_target::store_registers, remote_target::get_trace_status):
8513         Adjust to call remote_state's method.
8514         (_initialize_remote): Remove reference to
8515         remote_gdbarch_data_handle.
8516
8517 2018-05-22  Pedro Alves  <palves@redhat.com>
8518
8519         * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
8520         pread>: New method declarations.
8521         (remote_target::open_1): Adjust.
8522         (readahead_cache_invalidate): Rename to ...
8523         (readahead_cache::invalidate): ... this, and adjust to be a class
8524         method.
8525         (readahead_cache_invalidate_fd): Rename to ...
8526         (readahead_cache::invalidate_fd): ... this, and adjust to be a
8527         class method.
8528         (remote_hostio_pwrite): Adjust.
8529         (remote_hostio_pread_from_cache): Rename to ...
8530         (readahead_cache::pread): ... this, and adjust to be a class
8531         method.
8532         (remote_hostio_close): Adjust.
8533
8534 2018-05-22  Pedro Alves  <palves@redhat.com>
8535
8536         * remote.c (remote_hostio_close_cleanup): Delete.
8537         (class scoped_remote_fd): New.
8538         (remote_file_put, remote_file_get): Use it.
8539
8540 2018-05-22  Pedro Alves  <palves@redhat.com>
8541
8542         (struct vCont_action_support): Use bool and initialize all fields.
8543         (struct readahead_cache): Initialize all fields.
8544         (remote_state): Use bool and initialize all fields.
8545         (remote_state::remote_state, remote_state::~remote_state): New.
8546         (new_remote_state): Delete.
8547         (_initialize_remote): Use new to allocate remote_state.
8548
8549 2018-05-22  Pedro Alves  <palves@redhat.com>
8550             張俊芝  <zjz@zjz.name>
8551
8552         PR gdb/22973
8553         * c-exp.y: Include "c-support.h".
8554         (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
8555         of tolower.  Use c_ident_is_alpha to scan names.
8556         * c-lang.c: Include "c-support.h".
8557         (convert_ucn, convert_octal, convert_hex, convert_escape): Use
8558         ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
8559         * c-support.h: New file, with bits factored out from ...
8560         * cp-name-parser.y: ... this file.
8561         Include "c-support.h".
8562         (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
8563         c-support.h and renamed.
8564         (symbol_end, yylex): Adjust.
8565
8566 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8567
8568         * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
8569         parameter type to CORE_ADDR.
8570         * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
8571         parameter type in declaration to CORE_ADDR.
8572         * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
8573         target_auxv_search to get AT_HWCAP and use the result to get the
8574         target description.
8575         * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
8576         to CORE_ADDR. Remove the cast of the return value to unsigned
8577         long. Fix error predicate of target_auxv_search.
8578         (ppc_linux_nat_target::read_description): Change the type of the
8579         hwcap variable to CORE_ADDR.
8580
8581 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8582
8583         * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
8584         if the size of fpscr is larger than 32 bits.
8585
8586 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8587
8588         * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
8589         (ppc32_linux_vsxregmap): New global.
8590         (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
8591         regcache_supply_regset, and regcache_collect_regset.
8592         * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
8593         * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
8594         (fetch_vsx_register, store_vsx_register): Remove.
8595         (fetch_vsx_registers): Add regno parameter. Get regset using
8596         ppc_linux_vsxregset. Use regset to supply registers.
8597         (store_vsx_registers): Add regno parameter. Get regset using
8598         ppc_linux_vsxregset. Use regset to collect registers.
8599         (fetch_register): Call fetch_vsx_registers instead of
8600         fetch_vsx_register.
8601         (store_register): Call store_vsx_registers instead of
8602         store_vsx_register.
8603         (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
8604         new regno parameter.
8605         (store_ppc_registers): Call store_vsx_registers with -1 for the
8606         new regno parameter.
8607         * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
8608         (ppc_collect_vsxregset): Remove.
8609
8610 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8611
8612         * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
8613         offset fields.
8614         * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
8615         for vector register offset fields.
8616         (ppc64_fbsd_reg_offsets): Likewise.
8617         * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
8618         to vector register offset fields.
8619         * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
8620         to vector register offset fields.
8621         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
8622         vector register offset fields.
8623         * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
8624         initializers for vector register offset fields.
8625         (rs6000_aix64_reg_offsets): Likewise.
8626         * rs6000-tdep.c (ppc_vrreg_offset): Remove.
8627         (ppc_supply_vrregset): Remove.
8628         (ppc_collect_vrregset): Remove.
8629         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
8630         (ppc_linux_vrregset) : New function.
8631         (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
8632         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
8633         (ppc32_linux_vrregset): Remove.
8634         (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
8635         and use result instead of ppc32_linux_vrregset.
8636         (ppc32_linux_reg_offsets): Remove initializers for vector register
8637         offset fields.
8638         (ppc64_linux_reg_offsets): Likewise.
8639         * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
8640         * ppc-linux-nat.c: Include regset.h.
8641         (gdb_vrregset_t): Adjust comment to account for little-endian
8642         mode.
8643         (supply_vrregset, fill_vrregset): Remove.
8644         (fetch_altivec_register, store_altivec_register): Remove.
8645         (fetch_altivec_registers): Add regno parameter. Get regset using
8646         ppc_linux_vrregset. Use regset to supply registers.
8647         (store_altivec_registers): Add regno parameter. Get regset using
8648         ppc_linux_vrregset. Use regset to collect registers.
8649         (fetch_register): Call fetch_altivec_registers instead of
8650         fetch_altivec_register.
8651         (store_register): Call store_altivec_registers instead of
8652         store_altivec_register.
8653         (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
8654         the new regno parameter.
8655         (store_ppc_registers): Call store_altivec_registers with -1 for
8656         the new regno parameter.
8657
8658 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8659
8660         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
8661         (PPC_LINUX_SIZEOF_VSXREGSET): Define.
8662         * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
8663         (gdb_vrregset_t): Change array type size to
8664         PPC_LINUX_SIZEOF_VRREGSET.
8665         (gdb_vsxregset_t): Change array type size to
8666         PPC_LINUX_SIZEOF_VSXREGSET.
8667         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
8668         Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
8669         PPC_LINUX_SIZEOF_VSXREGSET.
8670
8671 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8672
8673         * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
8674         * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
8675         nat/ppc-linux.c.
8676         (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
8677         ppc_linux_target_wordsize with tid.
8678         (ppc_linux_nat_target::read_description): Call ppc_linux_target
8679         wordsize with tid.
8680         * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
8681         (ppc64_64bit_inferior_p): Add static and inline specifiers.
8682         (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
8683         tid parameter. Remove static specifier.
8684         * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
8685         (ppc_linux_target_wordsize): New declaration.
8686
8687 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8688
8689         * arch/ppc-linux-common.c: New file.
8690         * arch/ppc-linux-common.h: New file.
8691         * arch/ppc-linux-tdesc.h: New file.
8692         * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
8693         * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
8694         (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
8695         arch/ppc-linux-tdesc.h.
8696         * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
8697         arch/ppc-linux-tdesc.h.
8698         (ppc_linux_nat_target::read_description): Remove target
8699         description matching code. Fill a ppc_linux_features struct and
8700         call ppc_linux_match_description with it. Move comment about ISA
8701         2.05 to ppc-linux-common.c.
8702         * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
8703         arch/ppc-linux-tdesc.h.
8704         (ppc_linux_core_read_description): Remove target description
8705         matching code. Fill a ppc_linux_features struct and call
8706         ppc_linux_match_description with it.
8707         * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
8708         (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
8709         (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
8710         (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
8711         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
8712         (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
8713         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
8714         (tdesc_powerpc_e500l): Remove.
8715
8716 2018-05-22  Joel Brobecker  <brobecker@adacore.com>
8717
8718         * ada-lang.c (catch_assert_command): Pass empty string instead
8719         of NULL for excep_string argument.
8720
8721 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
8722
8723         * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
8724         the width of the requested register exceeds the width of the
8725         `ptrace' data type.
8726
8727 2018-05-21  Tom Tromey  <tom@tromey.com>
8728
8729         * printcmd.c (output_command): Remove.
8730         (output_command_const): Rename to output_command.
8731         * valprint.h (output_command): Rename from output_command_const.
8732         * tracepoint.c (trace_dump_actions): Call output_command.
8733
8734 2018-05-21  Tom Tromey  <tom@tromey.com>
8735
8736         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
8737         (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
8738         * ada-lang.h (create_ada_exception_catchpoint): Update.
8739         * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
8740         std::string.
8741         (create_excep_cond_exprs, ~ada_catchpoint)
8742         (should_stop_exception, print_one_exception)
8743         (print_mention_exception, print_recreate_exception): Update.
8744         (ada_get_next_arg): Remove.
8745         (catch_ada_exception_command_split): Use std::string.  Change type
8746         of "excep_string", "cond_string".
8747         (catch_ada_exception_command): Update.
8748         (create_ada_exception_catchpoint): Change type of excep_string.
8749         (ada_exception_sal): Remove excep_string parameter.
8750         (~ada_catchpoint): Remove.
8751
8752 2018-05-21  Tom Tromey  <tom@tromey.com>
8753
8754         * ada-lang.c (ada_collect_symbol_completion_matches): Remove
8755         cleanup.
8756
8757 2018-05-21  Tom Tromey  <tom@tromey.com>
8758
8759         * ada-lang.c (ada_exception_message_1, ada_exception_message):
8760         Return unique_xmalloc_ptr.
8761         (print_it_exception): Update.
8762
8763 2018-05-21  Tom Tromey  <tom@tromey.com>
8764
8765         * tracepoint.c (trace_dump_actions): Use std::string.
8766
8767 2018-05-21  Tom Tromey  <tom@tromey.com>
8768
8769         * symfile.c (reread_symbols): Use std::string for original_name.
8770
8771 2018-05-21  Tom Tromey  <tom@tromey.com>
8772
8773         * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
8774         (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN.  Default
8775         constructor.
8776
8777 2018-05-20  Simon Marchi  <simon.marchi@polymtl.ca>
8778
8779         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
8780         instance to...
8781         (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
8782         * objfiles.c (get_objfile_bfd_data): Allocate
8783         objfile_per_bfd_storage with obstack_new when allocating on
8784         obstack.
8785
8786 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
8787
8788         * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
8789         OBSTACK_ZALLOC.
8790         * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
8791         * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
8792         * mdebugread.c (mdebug_build_psymtabs): Likewise.
8793         (add_pending): Likewise.
8794         (parse_symbol): Likewise.
8795         (parse_partial_symbols): Likewise.
8796         (psymtab_to_symtab_1): Likewise.
8797         (new_psymtab): Likewise.
8798         (elfmdebug_build_psymtabs): Likewise.
8799         * minsyms.c (terminate_minimal_symbol_table): Likewise.
8800         * objfiles.c (get_objfile_bfd_data): Likewise.
8801         (objfile_register_static_link): Likewise.
8802         * psymtab.c (allocate_psymtab): Likewise.
8803         * stabsread.c (read_member_functions): Likewise.
8804         * xcoffread.c (xcoff_end_psymtab): Likewise.
8805
8806 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
8807
8808         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
8809         compiler supports std::is_trivially_constructible.
8810         * common/poison.h: Include obstack.h.
8811         (IsMallocable): Define to is_trivially_constructible if the
8812         compiler supports it, define to true_type otherwise.
8813         (xobnew): New.
8814         (XOBNEW): Redefine.
8815         (xobnewvec): New.
8816         (XOBNEWVEC): Redefine.
8817         * gdb_obstack.h (obstack_zalloc): New.
8818         (OBSTACK_ZALLOC): Redefine.
8819         (obstack_calloc): New.
8820         (OBSTACK_CALLOC): Redefine.
8821         (obstack_new): New.
8822         * gdbarch.sh: Include gdb_obstack in gdbarch.h.
8823         (gdbarch_obstack): New declaration in gdbarch.h, definition in
8824         gdbarch.c.
8825         (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
8826         obstack_calloc/obstack_zalloc.
8827         (gdbarch_obstack_zalloc): Remove.
8828         * target-descriptions.c (tdesc_data_init): Use obstack_new.
8829
8830 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
8831
8832         * stack.c (backtrace_command_1): Remove useless variable int i.
8833
8834 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
8835
8836         * stack.c (print_frame_info): Fix comment.
8837
8838 2018-05-18  Tom Tromey  <tom@tromey.com>
8839
8840         * dwarf2read.c (struct dwz_file): Add constructor, initializers.
8841         <dwz_bfd>: Now a gdb_bfd_ref_ptr.
8842         (~dwarf2_per_objfile): Update
8843         (dwarf2_get_dwz_file): Use new.
8844         * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
8845         unique_ptr.
8846
8847 2018-05-18  Tom Tromey  <tom@tromey.com>
8848
8849         * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
8850         unique_ptr.
8851         * dwarf2read.c (struct dwp_file): Add constructor and
8852         initializers.
8853         (open_and_init_dwp_file): Return a unique_ptr.
8854         (dwarf2_per_objfile, create_dwp_hash_table)
8855         (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
8856         (lookup_dwo_unit_in_dwp): Update.
8857         (open_and_init_dwp_file, get_dwp_file): Update.
8858
8859 2018-05-18  Tom Tromey  <tom@tromey.com>
8860
8861         * dwarf2read.c (dwarf2_per_objfile): Update.
8862         (struct mapped_index): Add initializers.
8863         (dwarf2_read_index): Use new.
8864         (dw2_symtab_iter_init): Update.
8865         * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
8866         unique_ptr.
8867
8868 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
8869
8870         * dwarf2read.c (mapped_index) <total_size>: Remove.
8871
8872 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
8873
8874         * unittests/format_pieces-selftests.c (test_format_specifier):
8875         Add ARI comments.
8876
8877 2018-05-18  Tom Tromey  <tom@tromey.com>
8878
8879         * c-typeprint.c (maybe_print_hole): New function.
8880         (c_print_type_struct_field_offset): Update.
8881         (c_type_print_base_struct_union): Call maybe_print_hole.
8882
8883 2018-05-17  Keith Seitz  <keiths@redhat.com>
8884
8885         * breakpoint.c (build_bpstat_chain): New function, moved from
8886         bpstat_stop_status.
8887         (bpstat_stop_status): Add optional parameter, `stop_chain'.
8888         If no stop chain is passed, call build_bpstat_chain to build it.
8889         * breakpoint.h (build_bpstat_chain): Declare.
8890         (bpstat_stop_status): Move documentation here from breakpoint.c.
8891         * infrun.c (handle_signal_stop): Before eliding inlined frames,
8892         build the stop chain and pass it to skip_inline_frames.
8893         Pass this stop chain to bpstat_stop_status.
8894         * inline-frame.c: Include breakpoint.h.
8895         (stopped_by_user_bp_inline_frame): New function.
8896         (skip_inline_frames): Add parameter `stop_chain'.
8897         Move documention to inline-frame.h.
8898         If non-NULL, use stopped_by_user_bp_inline_frame to determine
8899         whether the frame should be elided.
8900         * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
8901         Add moved documentation and update for new parameter.
8902
8903 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
8904
8905         PR cli/14975
8906         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8907         unittests/format_pieces-selftests.c.
8908         * common/format.h (format_piece) <operator==>: New.
8909         (format_pieces) <operator[]>: Remove.
8910         * common/format.c (format_pieces::format_pieces): Handle \e.
8911         * unittests/format_pieces-selftests.c: New.
8912
8913 2018-05-17  Tom Tromey  <tom@tromey.com>
8914
8915         PR symtab/23010:
8916         * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
8917         (dw2_instantiate_symtab): Add skip_partial parameter.
8918         (dw2_find_last_source_symtab, dw2_map_expand_apply)
8919         (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
8920         (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
8921         (dw2_expand_symtabs_matching_one)
8922         (dw2_find_pc_sect_compunit_symtab)
8923         (dw2_debug_names_lookup_symbol)
8924         (dw2_debug_names_expand_symtabs_for_function): Update.
8925         (init_cutu_and_read_dies): Add skip_partial parameter.
8926         (process_psymtab_comp_unit, build_type_psymtabs_1)
8927         (process_skeletonless_type_unit, load_partial_comp_unit)
8928         (psymtab_to_symtab_1): Update.
8929         (load_full_comp_unit): Add skip_partial parameter.
8930         (process_imported_unit_die, dwarf2_read_addr_index)
8931         (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
8932         (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
8933         (read_signatured_type): Update.
8934
8935 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
8936
8937         * value.c (release_value): Remove unused variable.
8938         (record_latest_value): Likewise.
8939         (access_value_history): Likewise.
8940         (preserve_values): Likewise.
8941
8942 2018-05-17  Tom Tromey  <tom@tromey.com>
8943
8944         * extension.h (struct ext_lang_type_printers) <py_type_printers>:
8945         Initialize.
8946
8947 2018-05-16  Maciej W. Rozycki  <macro@mips.com>
8948
8949         PR gdb/22286
8950         * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
8951         Also handle registers whose width is not a multiple of
8952         PTRACE_TYPE_RET.
8953         (linux_nat_trad_target::store_register): Likewise.
8954
8955 2018-05-16  Tom Tromey  <tom@tromey.com>
8956
8957         * gdbcore.h (core_bfd): Redefine.
8958         * corelow.c (core_target::close): Update.
8959         (core_target_open): Update.
8960         * progspace.h (struct program_space) <cbfd>: Now a
8961         gdb_bfd_ref_ptr.
8962
8963 2018-05-16  Tom Tromey  <tom@tromey.com>
8964
8965         PR cli/19551:
8966         * symfile-add-flags.h (enum symfile_add_flags)
8967         <SYMFILE_NOT_FILENAME>: New constant.
8968         * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME.  Get
8969         objfile name from BFD.
8970         (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
8971         * minidebug.c (find_separate_debug_file_in_section): Put
8972         ".gnu_debugdata" into BFD's file name.
8973
8974 2018-05-16  Simon Marchi  <simon.marchi@ericsson.com>
8975
8976         * regcache.c (regcache_read_ftype, regcache_write_ftype):
8977         Remove.
8978
8979 2018-05-15  Tamar Christina  <tamar.christina@arm.com>
8980
8981         PR binutils/21446
8982         * aarch64-tdep.c (aarch64_analyze_prologue,
8983         aarch64_software_single_step, aarch64_displaced_step_copy_insn):
8984         Indicate not interested in errors.
8985
8986 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
8987
8988         * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
8989         Supply the MIPS_ZERO_REGNUM register.
8990
8991 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
8992
8993         * mips-tdep.c (mask_address_var): Make variable static.
8994
8995 2018-05-14  Tom Tromey  <tom@tromey.com>
8996
8997         * dwarf2read.c (rust_union_quirks): Clear rust_unions.
8998
8999 2018-05-11  Andrew Burgess  <andrew.burgess@embecosm.com>
9000
9001         * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
9002         FXSAVE_ADDR for the mxcsr register.
9003
9004 2018-05-11  Max Filippov  <jcmvbkbc@gmail.com>
9005
9006         * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
9007
9008 2018-05-11  Pedro Alves  <palves@redhat.com>
9009
9010         * corelow.c (core_target) <core_target>: No longer inline.
9011         Initialize m_core_gdbarch, m_core_vec and build the section table
9012         here.
9013         <~core_target>: New.
9014         <core_gdbarch, get_core_register_section>: New methods.
9015         <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
9016         factored out from ...
9017         <core_data, core_vec, core_gdbarch>: ... these deleted globals.
9018         (core_ops): Delete.
9019         (sniff_core_bfd): Add gdbarch parameter.
9020         (core_close): Delete, merged into ...
9021         (core_target::close): ... here.  Delete self.
9022         (core_close_cleanup): Delete.
9023         (core_target_open): Allocate a core_target on the heap.  Use a
9024         unique_ptr instead of a cleanup.  Bits moved into the core_target
9025         ctor.  Adjust to use core_target methods instead of globals.
9026         (get_core_register_section): Rename to ...
9027         (core_target::get_core_register_section): ... this and adjust.
9028         (struct get_core_registers_cb_data): New.
9029         (get_core_registers_cb): Use it.  Use bool.
9030         (core_target::fetch_registers, core_target::files_info)
9031         (core_target::xfer_partial, core_target::read_description)
9032         (core_target::pid_to, core_target::thread_name): Adjust to
9033         reference class fields instead of globals.
9034         * target.h (struct target_ops_deleter, target_ops_up): New.
9035
9036 2018-05-11  Pedro Alves  <palves@redhat.com>
9037
9038         * corefile.c (core_file_command): Move to corelow.c.
9039         * corelow.c (the_core_target): Delete.
9040         (core_file_command): Moved from corefile.c.  Check exec_bfd
9041         instead of the_core_target.  Use target_detach instead of calling
9042         into the_core_target directly.
9043         (maybe_say_no_core_file_now): New.
9044         (core_target::detach): Use it.
9045         (_initialize_corelow): Remove references to the_core_target.
9046         * gdbcore.h (the_core_target): Delete.
9047
9048 2018-05-11  Tom Tromey  <tromey@redhat.com>
9049             Pedro Alves  <palves@redhat.com>
9050
9051         * corefile.c (core_bfd): Remove.
9052         * gdbcore.h (core_bfd): Now a macro.
9053         * progspace.h (struct program_space) <cbfd>: New field.
9054
9055 2018-05-11  Tom Tromey  <tom@tromey.com>
9056
9057         * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
9058         gdb::def_vector.
9059
9060 2018-05-10  Tom Tromey  <tom@tromey.com>
9061
9062         * configure: Rebuild.
9063         * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
9064
9065 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
9066
9067         PR server/23158:
9068         * regformats/regdat.sh: Adjust script, following the addition
9069         of the new expedite_regs parameter to init_target_desc.
9070
9071 2018-05-10  Omair Javaid  <omair.javaid@linaro.org>
9072     
9073         PR gdb/23127
9074         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
9075         set_gdbarch_significant_addr_bit.
9076         * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
9077         set_gdbarch_significant_addr_bit.
9078         * utils.c (address_significant): Update to sign extend addr.
9079
9080 2018-05-09  Max Filippov  <jcmvbkbc@gmail.com>
9081
9082         * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
9083         (xtensa_linux_init_abi): Limit tdep->num_regs by
9084         tdep->num_nopriv_regs.
9085         * xtensa-tdep.c (xtensa_derive_tdep): Calculate
9086         tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
9087         not initialized.
9088
9089 2018-05-08  Simon Marchi  <simon.marchi@ericsson.com>
9090
9091         * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
9092
9093 2018-05-08  Andrew Burgess  <andrew.burgess@embecosm.com>
9094
9095         * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
9096         (I387_MXCSR_INIT_VAL): New constant.
9097         * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
9098         buffer if it was supplied by the inferior.
9099         * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
9100         (i387_xsave_get_clear_bv): New function.
9101         (i387_supply_xsave): Only read x87 control registers from the
9102         xsave buffer if the feature is enabled, and the state will have
9103         been written, otherwise, provide a suitable default.
9104         (i387_collect_xsave): Pre-clear all registers in xsave buffer,
9105         including x87 control registers.  Update control registers if they
9106         have changed from the default value, and mark features as enabled
9107         as required.
9108         * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
9109
9110 2018-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
9111
9112         * spu-tdep.c (info_spu_event_command): Fix output formatting.
9113
9114 2018-05-07  Tom Tromey  <tom@tromey.com>
9115
9116         * configure: Rebuild.
9117         * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
9118
9119 2018-05-07  Tom Tromey  <tom@tromey.com>
9120
9121         PR tdep/20362:
9122         * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
9123         bit.  Use correct value for VDIV.
9124
9125 2018-05-04  Tom Tromey  <tom@tromey.com>
9126
9127         * configure: Rebuild.
9128         * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
9129
9130 2018-05-04  Tom Tromey  <tom@tromey.com>
9131
9132         * linux-record.c (record_linux_system_call) <case
9133         RECORD_SYS_RECVFROM>: Add "break".
9134
9135 2018-05-04  Tom Tromey  <tom@tromey.com>
9136
9137         * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
9138         Add missing "break".
9139         * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
9140         Add missing "break".
9141
9142 2018-05-04  Tom Tromey  <tom@tromey.com>
9143
9144         * rs6000-tdep.c (ppc_process_record_op4)
9145         (ppc_process_record_op63): Add fall-through comment.
9146
9147 2018-05-04  Tom Tromey  <tom@tromey.com>
9148
9149         * i386-tdep.c (i386_process_record): Add fall-through comment.
9150
9151 2018-05-04  Tom Tromey  <tom@tromey.com>
9152
9153         * stabsread.c (define_symbol) <case 'p'>: Add fall-through
9154         comment.
9155
9156 2018-05-04  Tom Tromey  <tom@tromey.com>
9157
9158         * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
9159         * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
9160         * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
9161         comment.
9162         * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
9163         comment.
9164         * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
9165         comment.
9166
9167 2018-05-04  Tom Tromey  <tom@tromey.com>
9168
9169         * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
9170
9171 2018-05-04  Tom Tromey  <tom@tromey.com>
9172
9173         * s390-tdep.c (s390_process_record): Fix fall-through comments.
9174         * xcoffread.c (scan_xcoff_symtab): Move comment later.
9175         * symfile.c (section_is_mapped): Fix fall-through comment.
9176         * stabsread.c (define_symbol, read_member_functions): Fix
9177         fall-through comment.
9178         * s390-linux-tdep.c (s390_process_record): Fix fall-through
9179         comment.
9180         * remote.c (remote_wait_as): Fix fall-through comment.
9181         * p-exp.y (yylex): Fix fall-through comment.
9182         * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
9183         comment.
9184         * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
9185         * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
9186         * jv-exp.y (yylex): Fix fall-through comment.
9187         * go-exp.y (lex_one_token): Fix fall-through comment.
9188         * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
9189         fall-through comment.
9190         * f-exp.y (yylex): Fix fall-through comment.
9191         * dwarf2read.c (process_die): Fix fall-through comments.
9192         * dbxread.c (process_one_symbol): Fix fall-through comment.
9193         * d-exp.y (lex_one_token): Fix fall-through comment.
9194         * cp-name-parser.y (yylex): Fix fall-through comment.
9195         * coffread.c (coff_symtab_read): Fix fall-through comment.
9196         * c-exp.y (lex_one_token): Fix fall-through comment.
9197         * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
9198         comment.
9199         * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
9200         comment.
9201
9202 2018-05-04  Tom Tromey  <tom@tromey.com>
9203
9204         PR python/22730:
9205         * NEWS: Mention gdb.execute change.
9206         * gdbcmd.h (execute_control_command): Don't declare.
9207         * python/python.c (execute_gdb_command): Use read_command_lines_1,
9208         execute_control_commands, execute_control_commands_to_string.
9209         * cli/cli-script.h (execute_control_commands)
9210         (execute_control_commands_to_string): Declare.
9211         (execute_control_command): Add from_tty parameter.
9212         * cli/cli-script.c (execute_control_commands)
9213         (execute_control_commands_to_string): New functions.
9214         (execute_user_command): Use execute_control_commands.
9215         (execute_control_command_1): Add "from_tty" parameter.  Update.
9216         (execute_control_command): Likewise.
9217
9218 2018-05-04  Tom Tromey  <tom@tromey.com>
9219
9220         PR python/22731:
9221         * NEWS: Mention that breakpoint commands are writable.
9222         * python/py-breakpoint.c (bppy_set_commands): New function.
9223         (breakpoint_object_getset) <"commands">: Use it.
9224
9225 2018-05-04  Tom Tromey  <tom@tromey.com>
9226
9227         * tracepoint.c (actions_command): Update.
9228         * mi/mi-cmd-break.c (mi_command_line_array)
9229         (mi_command_line_array_cnt, mi_command_line_array_ptr)
9230         (mi_read_next_line): Remove.
9231         (mi_cmd_break_commands): Update.
9232         * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
9233         function_view.
9234         * cli/cli-script.c (get_command_line): Update.
9235         (process_next_line): Use function_view.  Constify.
9236         (recurse_read_control_structure, read_command_lines)
9237         (read_command_lines_1): Change argument types to function_view.
9238         (do_define_command, document_command): Update.
9239         * breakpoint.h (check_tracepoint_command): Don't declare.
9240         * breakpoint.c (check_tracepoint_command): Remove.
9241         (commands_command_1, create_tracepoint_from_upload): Update.
9242
9243 2018-05-04  Tom Tromey  <tom@tromey.com>
9244
9245         PR gdb/11750:
9246         * cli/cli-script.h (enum command_control_type) <define_control>:
9247         New constant.
9248         * cli/cli-script.c (multi_line_command_p): Handle define_control.
9249         (build_command_line, execute_control_command_1)
9250         (process_next_line): Likewise.
9251         (do_define_command): New function, extracted from define_command.
9252         (define_command): Use it.
9253
9254 2018-05-04  Tom Tromey  <tom@tromey.com>
9255
9256         * tracepoint.c (actions_command): Update.
9257         * cli/cli-script.h (read_command_lines): Update.
9258         * cli/cli-script.c (read_command_lines): Constify prompt_arg.
9259         (MAX_TMPBUF): Remove define.
9260         (define_command): Use string_printf.
9261         (document_command): Likewise.
9262         * breakpoint.c (commands_command_1): Update.
9263
9264 2018-05-04  Tom Tromey  <tom@tromey.com>
9265
9266         * top.c (execute_command): Update.
9267         * cli/cli-script.h (print_command_lines): Now varargs.
9268         * cli/cli-script.c (print_command_lines): Now varargs.
9269         (execute_control_command_1) <case while_control, case if_control>:
9270         Update.
9271
9272 2018-05-04  Tom Tromey  <tom@tromey.com>
9273
9274         * tracepoint.c (all_tracepoint_actions): Rename from
9275         all_tracepoint_actions_and_cleanup.  Change return type.
9276         (actions_command, encode_actions_1, encode_actions)
9277         (trace_dump_actions, tdump_command): Update.
9278         * remote.c (remote_download_command_source): Update.
9279         * python/python.c (gdbpy_eval_from_control_command)
9280         (python_command, python_interactive_command): Update.
9281         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
9282         * guile/guile.c (guile_command)
9283         (gdbscm_eval_from_control_command, guile_command): Update.
9284         * compile/compile.c (compile_code_command)
9285         (compile_print_command, compile_to_object): Update.
9286         * cli/cli-script.h (struct command_lines_deleter): New.
9287         (counted_command_line): New typedef.
9288         (struct command_line): Add constructor, destructor.
9289         <body_list>: Remove.
9290         <body_list_0, body_list_1>: New members.
9291         (command_line_up): Remove typedef.
9292         (read_command_lines, read_command_lines_1, get_command_line):
9293         Update.
9294         (copy_command_lines): Don't declare.
9295         * cli/cli-script.c (build_command_line): Use "new".
9296         (get_command_line): Return counted_command_line.
9297         (print_command_lines, execute_user_command)
9298         (execute_control_command_1, while_command, if_command): Update.
9299         (realloc_body_list): Remove.
9300         (process_next_line, recurse_read_control_structure): Update.
9301         (read_command_lines, read_command_lines_1): Return counted_command_line.
9302         (free_command_lines): Use "delete".
9303         (copy_command_lines): Remove.
9304         (define_command, document_command, show_user_1): Update.
9305         * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
9306         a counted_command_line.
9307         * breakpoint.h (counted_command_line): Remove typedef.
9308         (breakpoint_set_commands): Update.
9309         * breakpoint.c (check_no_tracepoint_commands)
9310         (validate_commands_for_breakpoint): Update.
9311         (breakpoint_set_commands): Change commands to be a
9312         counted_command_line.
9313         (commands_command_1, update_dprintf_command_list)
9314         (create_tracepoint_from_upload): Update.
9315
9316 2018-05-04  Tom Tromey  <tom@tromey.com>
9317
9318         * cli/cli-decode.h (cmd_list_element): New constructor.
9319         (~cmd_list_element): New destructor.
9320         (struct cmd_list_element): Add initializers.
9321         * cli/cli-decode.c (do_add_cmd): Use "new".
9322         (delete_cmd): Use "delete".
9323
9324 2018-05-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
9325             Pedro Alves <palves@redhat.com>
9326
9327         PR breakpoints/19806 and support for PR external/20207.
9328         * NEWS: Mention Aarch64 watchpoint improvements.
9329         * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
9330         watchpoints and PR external/20207 watchpoints.
9331         * nat/aarch64-linux-hw-point.c
9332         (kernel_supports_any_contiguous_range): New.
9333         (aarch64_watchpoint_offset): New.
9334         (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
9335         (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
9336         (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
9337         (aarch64_align_watchpoint): New parameters aligned_offset_p and
9338         next_addr_orig_p.  Support PR external/20207 watchpoints.
9339         (aarch64_downgrade_regs): New.
9340         (aarch64_dr_state_insert_one_point): New parameters offset and
9341         addr_orig.
9342         (aarch64_dr_state_remove_one_point): Likewise.
9343         (aarch64_handle_breakpoint): Update caller.
9344         (aarch64_handle_aligned_watchpoint): Likewise.
9345         (aarch64_handle_unaligned_watchpoint): Support addr_orig and
9346         aligned_offset.
9347         (aarch64_linux_set_debug_regs): Remove const from state.  Call
9348         aarch64_downgrade_regs.
9349         (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
9350         * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
9351         (DR_CONTROL_MASK): ... this.
9352         (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
9353         (unsigned int aarch64_watchpoint_offset): New prototype.
9354         (aarch64_linux_set_debug_regs): Remove const from state.
9355         * utils.c (align_up, align_down): Move to ...
9356         * common/common-utils.c (align_up, align_down): ... here.
9357         * utils.h (align_up, align_down): Move to ...
9358         * common/common-utils.h (align_up, align_down): ... here.
9359
9360 2018-05-04  Joel Brobecker  <brobecker@adacore.com>
9361
9362         * sparc-tdep.c (sparc_structure_return_p): Re-implement to
9363         match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
9364         (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
9365         Re-implement to match the ABI as summarized in GCC's
9366         gcc/config/sparc/sparc.c.  All callers updated.
9367         (sparc32_store_arguments): Remove assertion.
9368
9369 2018-05-04  Tom Tromey  <tom@tromey.com>
9370
9371         * printcmd.c: Don't include tui.h.
9372         (decode_format): Use skip_spaces.
9373
9374 2018-05-04  Tom Tromey  <tom@tromey.com>
9375
9376         PR gdb/22619:
9377         * printcmd.c (last_count): New global.
9378         (x_command): Use saved count when repeating.
9379
9380 2018-05-04  Tom Tromey  <tom@tromey.com>
9381
9382         * nto-procfs.c (do_closedir_cleanup): Remove.
9383         (procfs_pidlist): Use gdb_dir_up.
9384         * procfs.c (do_closedir_cleanup): Remove.
9385         (proc_update_threads): Use gdb_dir_up.
9386         * common/filestuff.h (struct gdb_dir_deleter): New.
9387         (gdb_dir_up): New typedef.
9388
9389 2018-05-04  Tom Tromey  <tom@tromey.com>
9390
9391         * ada-lang.c (print_mention_exception): Use std::string.
9392
9393 2018-05-04  Tom Tromey  <tom@tromey.com>
9394
9395         * ada-lang.c (create_excep_cond_exprs): Update.
9396         (ada_exception_catchpoint_cond_string): Use std::string.
9397
9398 2018-05-04  Tom Tromey  <tom@tromey.com>
9399
9400         * ada-lang.c (xget_renaming_scope): Return std::string.
9401         (old_renaming_is_invisible): Update.
9402
9403 2018-05-04  Tom Tromey  <tom@tromey.com>
9404
9405         * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
9406         (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
9407
9408 2018-05-04  Ulrich Weigand  <uweigand@de.ibm.com>
9409
9410         * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
9411
9412 2018-05-04  Tom Tromey  <tom@tromey.com>
9413
9414         * remote.c (remote_query_supported_append): Change type.
9415         (remote_check_symbols): Update.
9416
9417 2018-05-04  Paul Pluzhnikov  <ppluzhnikov@google.com>
9418
9419         PR gdb/11420
9420         * configure.ac: Prepend libpython.
9421         * python/python-config.py: Likewise.
9422         * configure: Regenerate.
9423
9424 2018-05-03  Simon Marchi  <simon.marchi@ericsson.com>
9425
9426         * Makefile.in (%.c: %.l): Use -t instead of --stdout.
9427
9428 2018-05-03  Pedro Alves  <palves@redhat.com>
9429
9430         * s390-linux-nat.c
9431         (s390_linux_nat_target::have_continuable_watchpoint): Mark with
9432         override.  Write 'true' instead of '1'.
9433         (s390_linux_nat_target::watchpoint_addr_within_range): Remove
9434         declaration.
9435
9436 2018-05-02  Pedro Alves  <palves@redhat.com>
9437
9438         * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
9439         add_inf_child_target.
9440         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
9441         add_inf_child_target.
9442         * aix-thread.c (aix_thread_target_info): New.
9443         (aix_thread_target) <shortname, longname, doc>: Delete.
9444         <info>: New.
9445         * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
9446         add_inf_child_target.
9447         * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
9448         add_inf_child_target.
9449         * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
9450         add_inf_child_target.
9451         * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
9452         add_inf_child_target.
9453         * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
9454         add_inf_child_target.
9455         * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
9456         add_inf_child_target.
9457         * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
9458         add_inf_child_target.
9459         * arm-linux-nat.c (_initialize_arm_linux_nat): Use
9460         add_inf_child_target.
9461         * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
9462         add_inf_child_target.
9463         * bfd-target.c (target_bfd_target_info): New.
9464         (target_bfd) <shortname, longname, doc>: Delete.
9465         <info>: New.
9466         * bsd-kvm.c (bsd_kvm_target_info): New.
9467         (bsd_kvm_target) <shortname, longname, doc>: Delete.
9468         <info>: New.
9469         (bsd_kvm_target::open): Rename to ...
9470         (bsd_kvm_target_open): ... this.  Adjust.
9471         * bsd-uthread.c (bsd_uthread_target_info): New.
9472         (bsd_uthread_target) <shortname, longname, doc>: Delete.
9473         <info>: New.
9474         * corefile.c (core_file_command): Adjust.
9475         * corelow.c (core_target_info): New.
9476         (core_target) <shortname, longname, doc>: Delete.
9477         <info>: New.
9478         (core_target::open): Rename to ...
9479         (core_target_open): ... this.  Adjust.
9480         * ctf.c (ctf_target_info): New.
9481         (ctf_target) <shortname, longname, doc>: Delete.
9482         <info>: New.
9483         (ctf_target::open): Rename to ...
9484         (ctf_target_open): ... this.
9485         (_initialize_ctf): Adjust.
9486         * exec.c (exec_target_info): New.
9487         (exec_target) <shortname, longname, doc>: Delete.
9488         <info>: New.
9489         (exec_target::open): Rename to ...
9490         (exec_target_open): ... this.
9491         * gdbcore.h (core_target_open): Declare.
9492         * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
9493         * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
9494         add_inf_child_target.
9495         * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
9496         add_inf_child_target.
9497         * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
9498         add_inf_child_target.
9499         * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
9500         add_inf_child_target.
9501         * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
9502         add_inf_child_target.
9503         * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
9504         add_inf_child_target.
9505         * i386-linux-nat.c (_initialize_i386_linux_nat): Use
9506         add_inf_child_target.
9507         * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
9508         add_inf_child_target.
9509         * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
9510         add_inf_child_target.
9511         * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
9512         add_inf_child_target.
9513         * inf-child.c (inf_child_target_info): New.
9514         (inf_child_target::info): New.
9515         (inf_child_open_target): Remove 'target' parameter.  Use
9516         get_native_target instead.
9517         (inf_child_target::open): Delete.
9518         (add_inf_child_target): New.
9519         * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
9520         Delete.
9521         <info>: New.
9522         (add_inf_child_target): Declare.
9523         (inf_child_open_target): Declare.
9524         * linux-thread-db.c (thread_db_target_info): New.
9525         (thread_db_target) <shortname, longname, doc>: Delete.
9526         <info>: New.
9527         * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
9528         add_inf_child_target.
9529         * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
9530         add_inf_child_target.
9531         * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
9532         add_inf_child_target.
9533         * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
9534         add_inf_child_target.
9535         * make-target-delegates (print_class): Adjust.
9536         * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
9537         add_inf_child_target.
9538         * mips-linux-nat.c (_initialize_mips_linux_nat): Use
9539         add_inf_child_target.
9540         * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
9541         add_inf_child_target.
9542         * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
9543         add_inf_child_target.
9544         * nto-procfs.c (nto_native_target_info): New.
9545         (nto_procfs_target_native) <shortname, longname, doc>:
9546         Delete.
9547         <info>: New.
9548         (nto_procfs_target_info): New.
9549         (nto_procfs_target_procfs) <shortname, longname, doc>:
9550         Delete.
9551         <info>: New.
9552         (init_procfs_targets): Adjust.
9553         * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
9554         add_inf_child_target.
9555         * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
9556         add_inf_child_target.
9557         * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
9558         add_inf_child_target.
9559         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
9560         add_inf_child_target.
9561         * ravenscar-thread.c (ravenscar_target_info): New.
9562         (ravenscar_thread_target) <shortname, longname, doc>:
9563         Delete.
9564         <info>: New.
9565         * record-btrace.c (record_btrace_target_info):
9566         (record_btrace_target) <shortname, longname, doc>: Delete.
9567         <info>: New.
9568         (record_btrace_target::open): Rename to ...
9569         (record_btrace_target_open): ... this.  Adjust.
9570         * record-full.c (record_longname, record_doc): New.
9571         (record_full_base_target) <shortname, longname, doc>: Delete.
9572         <info>: New.
9573         (record_full_target_info): New.
9574         (record_full_target): <shortname>: Delete.
9575         <info>: New.
9576         (record_full_core_open_1, record_full_open_1): Update comments.
9577         (record_full_base_target::open): Rename to ...
9578         (record_full_open): ... this.
9579         (cmd_record_full_restore): Update.
9580         (_initialize_record_full): Update.
9581         * remote-sim.c (remote_sim_target_info): New.
9582         (gdbsim_target) <shortname, longname, doc>: Delete.
9583         <info>: New.
9584         (gdbsim_target::open): Rename to ...
9585         (gdbsim_target_open): ... this.
9586         (_initialize_remote_sim): Adjust.
9587         * remote.c (remote_doc): New.
9588         (remote_target_info): New.
9589         (remote_target) <shortname, longname, doc>: Delete.
9590         <info>: New.
9591         (extended_remote_target_info): New.
9592         (extended_remote_target) <shortname, longname, doc>: Delete.
9593         <info>: New.
9594         (remote_target::open_1): Make static.  Adjust.
9595         * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
9596         * s390-linux-nat.c (_initialize_s390_nat): Use
9597         add_inf_child_target.
9598         * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
9599         add_inf_child_target.
9600         * sol-thread.c (thread_db_target_info): New.
9601         (sol_thread_target) <shortname, longname, doc>: Delete.
9602         <info>: New.
9603         * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
9604         add_inf_child_target.
9605         * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
9606         add_inf_child_target.
9607         * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
9608         add_inf_child_target.
9609         * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
9610         add_inf_child_target.
9611         * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
9612         add_inf_child_target.
9613         * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
9614         add_inf_child_target.
9615         * spu-linux-nat.c (_initialize_spu_nat): Use
9616         add_inf_child_target.
9617         * spu-multiarch.c (spu_multiarch_target_info): New.
9618         (spu_multiarch_target) <shortname, longname, doc>: Delete.
9619         <info>: New.
9620         * target-delegates.c: Regenerate.
9621         * target.c: Include <unordered_map>.
9622         (target_ops_p): Delete.
9623         (DEF_VEC_P(target_ops_p)): Delete.
9624         (target_factories): New.
9625         (test_target_info): New.
9626         (test_target_ops::info): New.
9627         (open_target): Adjust to use target_factories.
9628         (add_target_with_completer): Rename to ...
9629         (add_target): ... this.  Change prototype.  Register target_info
9630         and open callback in target_factories.  Register target_info in
9631         command context instead of target_ops.
9632         (add_target): Delete old implementation.
9633         (add_deprecated_target_alias): Change prototype.  Adjust.
9634         (the_native_target): New.
9635         (set_native_target, get_native_target): New.
9636         (find_default_run_target): Use the_native_target.
9637         (find_attach_target, find_run_target): Simplify.
9638         (target_ops::open): Delete.
9639         (dummy_target_info): New.
9640         (dummy_target::shortname, dummy_target::longname)
9641         (dummy_target::doc): Delete.
9642         (dummy_target::info): New.
9643         (debug_target::shortname, debug_target::longname)
9644         (debug_target::doc): Delete.
9645         (debug_target::info): New.
9646         * target.h (struct target_info): New.
9647         (target_ops::~target_ops): Add comment.
9648         (target_ops::info): New.
9649         (target_ops::shortname, target_ops::longname, target_ops::doc): No
9650         longer virtual.  Implement in terms of target_info.
9651         (set_native_target, get_native_target): Declare.
9652         (target_open_ftype): New.
9653         (add_target, add_target_with_completer)
9654         (add_deprecated_target_alias): Change prototype.
9655         (test_target) <shortname, longname, doc>: Delete.
9656         <info>: New.
9657         * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
9658         add_inf_child_target.
9659         * tracefile-tfile.c (tfile_target_info): New.
9660         (tfile_target) <shortname, longname, doc>: Delete.
9661         <info>: New.
9662         (tfile_target::open): Rename to ...
9663         (tfile_target_open): ... this.
9664         (_initialize_tracefile_tfile): Adjust.
9665         * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
9666         add_inf_child_target.
9667         * windows-nat.c (_initialize_windows_nat): Use
9668         add_inf_child_target.
9669         * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
9670         add_inf_child_target.
9671
9672 2018-05-02  Pedro Alves  <palves@redhat.com>
9673
9674         * linux-nat.h (linux_nat_target) <low_new_thread,
9675         low_delete_thread, low_new_fork, low_forget_process,
9676         low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
9677         New virtual methods.
9678         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
9679         (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
9680         (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
9681         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
9682         (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
9683         Delete.
9684         * linux-fork.c (delete_fork): Adjust to call low method.
9685         * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
9686         (linux_nat_new_fork, linux_nat_forget_process_hook)
9687         (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
9688         (linux_nat_status_is_event):
9689         (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
9690         (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
9691         to call low method.
9692         (sigtrap_is_event): Rename to ...
9693         (linux_nat_target::low_status_is_event): ... this.
9694         (linux_nat_set_status_is_event): Delete.
9695         (save_stop_reason, linux_nat_wait_1)
9696         (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
9697         low methods.
9698         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
9699         (linux_nat_set_new_fork, linux_nat_set_forget_process)
9700         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
9701         (linux_nat_set_prepare_to_resume): Delete.
9702         * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
9703         low virtual methods.
9704         * amd64-linux-nat.c: Likewise.
9705         * arm-linux-nat.c: Likewise.
9706         * i386-linux-nat.c: Likewise.
9707         * ia64-linux-nat.c: Likewise.
9708         * mips-linux-nat.c: Likewise.
9709         * ppc-linux-nat.c: Likewise.
9710         * s390-linux-nat.c: Likewise.
9711         * sparc64-linux-nat.c: Likewise.
9712         * x86-linux-nat.c: Likewise.
9713         * x86-linux-nat.h: Include "nat/x86-linux.h".
9714         (x86_linux_nat_target) <low_new_fork, low_forget_process,
9715         low_prepare_to_resume, low_new_thread, low_delete_thread>:
9716         Override methods.
9717
9718 2018-05-02  Pedro Alves  <palves@redhat.com>
9719
9720         * target.h (target_ops)
9721         <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
9722         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
9723         stopped_by_watchpoint, have_continuable_watchpoint,
9724         stopped_data_address, watchpoint_addr_within_range,
9725         can_accel_watchpoint_condition, can_run, thread_alive,
9726         has_all_memory, has_memory, has_stack, has_registers,
9727         has_execution, can_async_p, is_async_p, supports_non_stop,
9728         always_non_stop_p, can_execute_reverse, supports_multi_process,
9729         supports_enable_disable_tracepoint,
9730         supports_disable_randomization, supports_string_tracing,
9731         supports_evaluation_of_breakpoint_conditions,
9732         can_run_breakpoint_commands, filesystem_is_local,
9733         can_download_tracepoint, get_trace_state_variable_value,
9734         set_trace_notes, get_tib_address, use_agent, can_use_agent,
9735         record_is_replaying, record_will_replay,
9736         augmented_libraries_svr4_read>: Adjust to return bool.
9737         * aarch64-linux-nat.c: All implementations adjusted.
9738         * aix-thread.c: All implementations adjusted.
9739         * arm-linux-nat.c: All implementations adjusted.
9740         * breakpoint.c: All implementations adjusted.
9741         * bsd-kvm.c: All implementations adjusted.
9742         * bsd-uthread.c: All implementations adjusted.
9743         * corelow.c: All implementations adjusted.
9744         * ctf.c: All implementations adjusted.
9745         * darwin-nat.c: All implementations adjusted.
9746         * darwin-nat.h: All implementations adjusted.
9747         * exec.c: All implementations adjusted.
9748         * fbsd-nat.c: All implementations adjusted.
9749         * fbsd-nat.h: All implementations adjusted.
9750         * gnu-nat.c: All implementations adjusted.
9751         * gnu-nat.h: All implementations adjusted.
9752         * go32-nat.c: All implementations adjusted.
9753         * ia64-linux-nat.c: All implementations adjusted.
9754         * inf-child.c: All implementations adjusted.
9755         * inf-child.h: All implementations adjusted.
9756         * inf-ptrace.c: All implementations adjusted.
9757         * inf-ptrace.h: All implementations adjusted.
9758         * linux-nat.c: All implementations adjusted.
9759         * linux-nat.h: All implementations adjusted.
9760         * mips-linux-nat.c: All implementations adjusted.
9761         * nto-procfs.c: All implementations adjusted.
9762         * ppc-linux-nat.c: All implementations adjusted.
9763         * procfs.c: All implementations adjusted.
9764         * ravenscar-thread.c: All implementations adjusted.
9765         * record-btrace.c: All implementations adjusted.
9766         * record-full.c: All implementations adjusted.
9767         * remote-sim.c: All implementations adjusted.
9768         * remote.c: All implementations adjusted.
9769         * s390-linux-nat.c: All implementations adjusted.
9770         * sol-thread.c: All implementations adjusted.
9771         * spu-multiarch.c: All implementations adjusted.
9772         * target-delegates.c: All implementations adjusted.
9773         * target.c: All implementations adjusted.
9774         * target.h: All implementations adjusted.
9775         * tracefile-tfile.c: All implementations adjusted.
9776         * tracefile.c: All implementations adjusted.
9777         * tracefile.h: All implementations adjusted.
9778         * windows-nat.c: All implementations adjusted.
9779         * x86-linux-nat.h: All implementations adjusted.
9780         * x86-nat.h: All implementations adjusted.
9781
9782 2018-05-02  Pedro Alves  <palves@redhat.com>
9783
9784         * make-target-delegates (scan_target_h): Don't trim lines here.
9785         Replace sequences of tabs and/or whitespace with a single
9786         whitespace.
9787         (top level, parsing methods): Trim each line before processing it
9788         here.
9789
9790 2018-05-02  Pedro Alves  <palves@redhat.com>
9791             John Baldwin  <jhb@freebsd.org>
9792
9793         * target.h (enum strata) <debug_stratum>: New.
9794         (struct target_ops) <all delegation methods>: Replace by C++
9795         virtual methods, and drop "to_" prefix.  All references updated
9796         throughout.
9797         <to_shortname, to_longname, to_doc, to_data,
9798         to_have_steppable_watchpoint, to_have_continuable_watchpoint,
9799         to_has_thread_control, to_attach_no_wait>: Delete, replaced by
9800         virtual methods.  All references updated throughout.
9801         <can_attach, supports_terminal_ours, can_create_inferior,
9802         get_thread_control_capabilities, attach_no_wait>: New
9803         virtual methods.
9804         <insert_breakpoint, remove_breakpoint>: Now
9805         TARGET_DEFAULT_NORETURN methods.
9806         <info_proc>: Now returns bool.
9807         <to_magic>: Delete.
9808         (OPS_MAGIC): Delete.
9809         (current_target): Delete.  All references replaced by references
9810         to ...
9811         (target_stack): ... this.  New.
9812         (target_shortname, target_longname): Adjust.
9813         (target_can_run): Now a function declaration.
9814         (default_child_has_all_memory, default_child_has_memory)
9815         (default_child_has_stack, default_child_has_registers)
9816         (default_child_has_execution): Remove target_ops parameter.
9817         (complete_target_initialization): Delete.
9818         (memory_breakpoint_target): New template class.
9819         (test_target_ops): Refactor as a C++ class with virtual methods.
9820         * make-target-delegates (NAME_PART): Tighten.
9821         (POINTER_PART, CP_SYMBOL): New.
9822         (SIMPLE_RETURN_PART): Reimplement.
9823         (VEC_RETURN_PART): Expect less.
9824         (RETURN_PART, VIRTUAL_PART): New.
9825         (METHOD): Adjust to C++ virtual methods.
9826         (scan_target_h): Remove reference to C99.
9827         (dname): Output "target_ops::" prefix.
9828         (write_function_header): Adjust to output a C++ class method.
9829         (write_declaration): New.
9830         (write_delegator): Adjust to output a C++ class method.
9831         (tdname): Output "dummy_target::" prefix.
9832         (write_tdefault, write_debugmethod): Adjust to output a C++ class
9833         method.
9834         (tdefault_names, debug_names): Delete.
9835         (return_types, tdefaults, styles, argtypes_array): New.
9836         (top level): All methods are delegators.
9837         (print_class): New.
9838         (top level): Print dummy_target and debug_target classes.
9839         * target-delegates.c: Regenerate.
9840         * target-debug.h (target_debug_print_enum_info_proc_what)
9841         (target_debug_print_thread_control_capabilities)
9842         (target_debug_print_thread_info_p): New.
9843         * target.c (dummy_target): Delete.
9844         (the_dummy_target, the_debug_target): New.
9845         (target_stack): Now extern.
9846         (set_targetdebug): Push/unpush debug target.
9847         (default_child_has_all_memory, default_child_has_memory)
9848         (default_child_has_stack, default_child_has_registers)
9849         (default_child_has_execution): Remove target_ops parameter.
9850         (complete_target_initialization): Delete.
9851         (add_target_with_completer): No longer call
9852         complete_target_initialization.
9853         (target_supports_terminal_ours): Use regular delegation.
9854         (update_current_target): Delete.
9855         (push_target): No longer check magic number.  Don't call
9856         update_current_target.
9857         (unpush_target): Don't call update_current_target.
9858         (target_is_pushed): No longer check magic number.
9859         (target_require_runnable): Skip for all stratums over
9860         process_stratum.
9861         (target_ops::info_proc): New.
9862         (target_info_proc): Use find_target_at and
9863         find_default_run_target.
9864         (target_supports_disable_randomization): Use regular delegation.
9865         (target_get_osdata): Use find_target_at.
9866         (target_ops::open, target_ops::close, target_ops::can_attach)
9867         (target_ops::attach, target_ops::can_create_inferior)
9868         (target_ops::create_inferior, target_ops::can_run)
9869         (target_can_run): New.
9870         (default_fileio_target): Use regular delegation.
9871         (target_ops::fileio_open, target_ops::fileio_pwrite)
9872         (target_ops::fileio_pread, target_ops::fileio_fstat)
9873         (target_ops::fileio_close, target_ops::fileio_unlink)
9874         (target_ops::fileio_readlink): New.
9875         (target_fileio_open_1, target_fileio_unlink)
9876         (target_fileio_readlink): Always call the target method.  Handle
9877         FILEIO_ENOSYS.
9878         (return_zero, return_zero_has_execution): Delete.
9879         (init_dummy_target): Delete.
9880         (dummy_target::dummy_target, dummy_target::shortname)
9881         (dummy_target::longname, dummy_target::doc)
9882         (debug_target::debug_target, debug_target::shortname)
9883         (debug_target::longname, debug_target::doc): New.
9884         (target_supports_delete_record): Use regular delegation.
9885         (setup_target_debug): Delete.
9886         (maintenance_print_target_stack): Skip debug_stratum.
9887         (initialize_targets): Instantiate the_dummy_target and
9888         the_debug_target.
9889         * auxv.c (target_auxv_parse): Remove 'ops' parameter.  Adjust to
9890         use target_stack.
9891         (target_auxv_search, fprint_target_auxv): Adjust.
9892         (info_auxv_command): Adjust to use target_stack.
9893         * auxv.h (target_auxv_parse): Remove 'ops' parameter.
9894         * exceptions.c (print_flush): Handle a NULL target_stack.
9895         * regcache.c (target_ops_no_register): Refactor as class with
9896         virtual methods.
9897
9898         * exec.c (exec_target): New class.
9899         (exec_ops): Now an exec_target.
9900         (exec_open, exec_close_1, exec_get_section_table)
9901         (exec_xfer_partial, exec_files_info, exec_has_memory)
9902         (exec_make_note_section): Refactor as exec_target methods.
9903         (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
9904         Delete.
9905         (exec_target::find_memory_regions): New.
9906         (_initialize_exec): Don't call init_exec_ops.
9907         * gdbcore.h (exec_file_clear): Delete.
9908
9909         * corefile.c (core_target): Delete.
9910         (core_file_command): Adjust.
9911         * corelow.c (core_target): New class.
9912         (the_core_target): New.
9913         (core_close): Remove target_ops parameter.
9914         (core_close_cleanup): Adjust.
9915         (core_target::close): New.
9916         (core_open, core_detach, get_core_registers, core_files_info)
9917         (core_xfer_partial, core_thread_alive, core_read_description)
9918         (core_pid_to_str, core_thread_name, core_has_memory)
9919         (core_has_stack, core_has_registers, core_info_proc): Rework as
9920         core_target methods.
9921         (ignore, core_remove_breakpoint, init_core_ops): Delete.
9922         (_initialize_corelow): Initialize the_core_target.
9923         * gdbcore.h (core_target): Delete.
9924         (the_core_target): New.
9925
9926         * ctf.c: (ctf_target): New class.
9927         (ctf_ops): Now a ctf_target.
9928         (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
9929         (ctf_xfer_partial, ctf_get_trace_state_variable_value)
9930         (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
9931         methods.
9932         (init_ctf_ops): Delete.
9933         (_initialize_ctf): Don't call it.
9934         * tracefile-tfile.c (tfile_target): New class.
9935         (tfile_ops): Now a tfile_target.
9936         (tfile_open, tfile_close, tfile_files_info)
9937         (tfile_get_tracepoint_status, tfile_trace_find)
9938         (tfile_fetch_registers, tfile_xfer_partial)
9939         (tfile_get_trace_state_variable_value, tfile_traceframe_info):
9940         Refactor as tfile_target methods.
9941         (tfile_xfer_partial_features): Remove target_ops parameter.
9942         (init_tfile_ops): Delete.
9943         (_initialize_tracefile_tfile): Don't call it.
9944         * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
9945         (tracefile_has_stack, tracefile_has_registers)
9946         (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
9947         tracefile_target methods.
9948         (init_tracefile_ops): Delete.
9949         (tracefile_target::tracefile_target): New.
9950         * tracefile.h: Include "target.h".
9951         (tracefile_target): New class.
9952         (init_tracefile_ops): Delete.
9953
9954         * spu-multiarch.c (spu_multiarch_target): New class.
9955         (spu_ops): Now a spu_multiarch_target.
9956         (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
9957         (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
9958         (spu_search_memory, spu_mourn_inferior): Refactor as
9959         spu_multiarch_target methods.
9960         (init_spu_ops): Delete.
9961         (_initialize_spu_multiarch): Remove references to init_spu_ops,
9962         complete_target_initialization.
9963
9964         * ravenscar-thread.c (ravenscar_thread_target): New class.
9965         (ravenscar_ops): Now a ravenscar_thread_target.
9966         (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
9967         (ravenscar_thread_alive, ravenscar_pid_to_str)
9968         (ravenscar_fetch_registers, ravenscar_store_registers)
9969         (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
9970         (ravenscar_stopped_by_hw_breakpoint)
9971         (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
9972         (ravenscar_mourn_inferior, ravenscar_core_of_thread)
9973         (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
9974         methods.
9975         (init_ravenscar_thread_ops): Delete.
9976         (_initialize_ravenscar): Remove references to
9977         init_ravenscar_thread_ops and complete_target_initialization.
9978
9979         * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
9980         (bsd_uthread_target): New class.
9981         (bsd_uthread_ops): Now a bsd_uthread_target.
9982         (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
9983         (bsd_uthread_close, bsd_uthread_mourn_inferior)
9984         (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
9985         (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
9986         (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
9987         (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
9988         (bsd_uthread_target): Delete function.
9989         (_initialize_bsd_uthread): Remove reference to
9990         complete_target_initialization.
9991
9992         * bfd-target.c (target_bfd_data): Delete.  Fields folded into ...
9993         (target_bfd): ... this new class.
9994         (target_bfd_xfer_partial, target_bfd_get_section_table)
9995         (target_bfd_close): Refactor as target_bfd methods.
9996         (target_bfd::~target_bfd): New.
9997         (target_bfd_reopen): Adjust.
9998         (target_bfd::close): New.
9999
10000         * record-btrace.c (record_btrace_target): New class.
10001         (record_btrace_ops): Now a record_btrace_target.
10002         (record_btrace_open, record_btrace_stop_recording)
10003         (record_btrace_disconnect, record_btrace_close)
10004         (record_btrace_async, record_btrace_info)
10005         (record_btrace_insn_history, record_btrace_insn_history_range)
10006         (record_btrace_insn_history_from, record_btrace_call_history)
10007         (record_btrace_call_history_range)
10008         (record_btrace_call_history_from, record_btrace_record_method)
10009         (record_btrace_is_replaying, record_btrace_will_replay)
10010         (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
10011         (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
10012         (record_btrace_store_registers, record_btrace_prepare_to_store)
10013         (record_btrace_to_get_unwinder)
10014         (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
10015         (record_btrace_commit_resume, record_btrace_wait)
10016         (record_btrace_stop, record_btrace_can_execute_reverse)
10017         (record_btrace_stopped_by_sw_breakpoint)
10018         (record_btrace_supports_stopped_by_sw_breakpoint)
10019         (record_btrace_stopped_by_hw_breakpoint)
10020         (record_btrace_supports_stopped_by_hw_breakpoint)
10021         (record_btrace_update_thread_list, record_btrace_thread_alive)
10022         (record_btrace_goto_begin, record_btrace_goto_end)
10023         (record_btrace_goto, record_btrace_stop_replaying_all)
10024         (record_btrace_execution_direction)
10025         (record_btrace_prepare_to_generate_core)
10026         (record_btrace_done_generating_core): Refactor as
10027         record_btrace_target methods.
10028         (init_record_btrace_ops): Delete.
10029         (_initialize_record_btrace): Remove reference to
10030         init_record_btrace_ops.
10031         * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
10032         the execution_direction global.
10033         (record_full_base_target, record_full_target)
10034         (record_full_core_target): New classes.
10035         (record_full_ops): Now a record_full_target.
10036         (record_full_core_ops): Now a record_full_core_target.
10037         (record_full_target::detach, record_full_target::disconnect)
10038         (record_full_core_target::disconnect)
10039         (record_full_target::mourn_inferior, record_full_target::kill):
10040         New.
10041         (record_full_open, record_full_close, record_full_async): Refactor
10042         as methods of the record_full_base_target class.
10043         (record_full_resume, record_full_commit_resume): Refactor
10044         as methods of the record_full_target class.
10045         (record_full_wait, record_full_stopped_by_watchpoint)
10046         (record_full_stopped_data_address)
10047         (record_full_stopped_by_sw_breakpoint)
10048         (record_full_supports_stopped_by_sw_breakpoint)
10049         (record_full_stopped_by_hw_breakpoint)
10050         (record_full_supports_stopped_by_hw_breakpoint): Refactor as
10051         methods of the record_full_base_target class.
10052         (record_full_store_registers, record_full_xfer_partial)
10053         (record_full_insert_breakpoint, record_full_remove_breakpoint):
10054         Refactor as methods of the record_full_target class.
10055         (record_full_can_execute_reverse, record_full_get_bookmark)
10056         (record_full_goto_bookmark, record_full_execution_direction)
10057         (record_full_record_method, record_full_info, record_full_delete)
10058         (record_full_is_replaying, record_full_will_replay)
10059         (record_full_goto_begin, record_full_goto_end, record_full_goto)
10060         (record_full_stop_replaying): Refactor as methods of the
10061         record_full_base_target class.
10062         (record_full_core_resume, record_full_core_kill)
10063         (record_full_core_fetch_registers)
10064         (record_full_core_prepare_to_store)
10065         (record_full_core_store_registers, record_full_core_xfer_partial)
10066         (record_full_core_insert_breakpoint)
10067         (record_full_core_remove_breakpoint)
10068         (record_full_core_has_execution): Refactor
10069         as methods of the record_full_core_target class.
10070         (record_full_base_target::supports_delete_record): New.
10071         (init_record_full_ops): Delete.
10072         (init_record_full_core_ops): Delete.
10073         (record_full_save): Refactor as method of the
10074         record_full_base_target class.
10075         (_initialize_record_full): Remove references to
10076         init_record_full_ops and init_record_full_core_ops.
10077
10078         * remote.c (remote_target, extended_remote_target): New classes.
10079         (remote_ops): Now a remote_target.
10080         (extended_remote_ops): Now an extended_remote_target.
10081         (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
10082         (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
10083         (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
10084         (remote_pass_signals, remote_set_syscall_catchpoint)
10085         (remote_program_signals, )
10086         (remote_thread_always_alive): Remove target_ops parameter.
10087         (remote_thread_alive, remote_thread_name)
10088         (remote_update_thread_list, remote_threads_extra_info)
10089         (remote_static_tracepoint_marker_at)
10090         (remote_static_tracepoint_markers_by_strid)
10091         (remote_get_ada_task_ptid, remote_close, remote_start_remote)
10092         (remote_open): Refactor as methods of remote_target.
10093         (extended_remote_open, extended_remote_detach)
10094         (extended_remote_attach, extended_remote_post_attach):
10095         (extended_remote_supports_disable_randomization)
10096         (extended_remote_create_inferior): : Refactor as method of
10097         extended_remote_target.
10098         (remote_set_permissions, remote_open_1, remote_detach)
10099         (remote_follow_fork, remote_follow_exec, remote_disconnect)
10100         (remote_resume, remote_commit_resume, remote_stop)
10101         (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
10102         (remote_terminal_ours, remote_wait, remote_fetch_registers)
10103         (remote_prepare_to_store, remote_store_registers)
10104         (remote_flash_erase, remote_flash_done, remote_files_info)
10105         (remote_kill, remote_mourn, remote_insert_breakpoint)
10106         (remote_remove_breakpoint, remote_insert_watchpoint)
10107         (remote_watchpoint_addr_within_range)
10108         (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
10109         (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
10110         (remote_supports_stopped_by_sw_breakpoint)
10111         (remote_stopped_by_hw_breakpoint)
10112         (remote_supports_stopped_by_hw_breakpoint)
10113         (remote_stopped_by_watchpoint, remote_stopped_data_address)
10114         (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
10115         (remote_verify_memory): Refactor as methods of remote_target.
10116         (remote_write_qxfer, remote_read_qxfer): Remove target_ops
10117         parameter.
10118         (remote_xfer_partial, remote_get_memory_xfer_limit)
10119         (remote_search_memory, remote_rcmd, remote_memory_map)
10120         (remote_pid_to_str, remote_get_thread_local_address)
10121         (remote_get_tib_address, remote_read_description): Refactor as
10122         methods of remote_target.
10123         (remote_target::fileio_open, remote_target::fileio_pwrite)
10124         (remote_target::fileio_pread, remote_target::fileio_close): New.
10125         (remote_hostio_readlink, remote_hostio_fstat)
10126         (remote_filesystem_is_local, remote_can_execute_reverse)
10127         (remote_supports_non_stop, remote_supports_disable_randomization)
10128         (remote_supports_multi_process, remote_supports_cond_breakpoints)
10129         (remote_supports_enable_disable_tracepoint)
10130         (remote_supports_string_tracing)
10131         (remote_can_run_breakpoint_commands, remote_trace_init)
10132         (remote_download_tracepoint, remote_can_download_tracepoint)
10133         (remote_download_trace_state_variable, remote_enable_tracepoint)
10134         (remote_disable_tracepoint, remote_trace_set_readonly_regions)
10135         (remote_trace_start, remote_get_trace_status)
10136         (remote_get_tracepoint_status, remote_trace_stop)
10137         (remote_trace_find, remote_get_trace_state_variable_value)
10138         (remote_save_trace_data, remote_get_raw_trace_data)
10139         (remote_set_disconnected_tracing, remote_core_of_thread)
10140         (remote_set_circular_trace_buffer, remote_traceframe_info)
10141         (remote_get_min_fast_tracepoint_insn_len)
10142         (remote_set_trace_buffer_size, remote_set_trace_notes)
10143         (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
10144         (remote_disable_btrace, remote_teardown_btrace)
10145         (remote_read_btrace, remote_btrace_conf)
10146         (remote_augmented_libraries_svr4_read, remote_load)
10147         (remote_pid_to_exec_file, remote_can_do_single_step)
10148         (remote_execution_direction, remote_thread_handle_to_thread_info):
10149         Refactor as methods of remote_target.
10150         (init_remote_ops, init_extended_remote_ops): Delete.
10151         (remote_can_async_p, remote_is_async_p, remote_async)
10152         (remote_thread_events, remote_upload_tracepoints)
10153         (remote_upload_trace_state_variables): Refactor as methods of
10154         remote_target.
10155         (_initialize_remote): Remove references to init_remote_ops and
10156         init_extended_remote_ops.
10157
10158         * remote-sim.c (gdbsim_target): New class.
10159         (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
10160         (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
10161         (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
10162         (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
10163         (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
10164         (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
10165         Refactor as methods of gdbsim_target.
10166         (gdbsim_ops): Now a gdbsim_target.
10167         (init_gdbsim_ops): Delete.
10168         (gdbsim_cntrl_c): Adjust.
10169         (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
10170
10171         * amd64-linux-nat.c (amd64_linux_nat_target): New class.
10172         (the_amd64_linux_nat_target): New.
10173         (amd64_linux_fetch_inferior_registers)
10174         (amd64_linux_store_inferior_registers): Refactor as methods of
10175         amd64_linux_nat_target.
10176         (_initialize_amd64_linux_nat): Adjust.  Set linux_target.
10177         * i386-linux-nat.c: Don't include "linux-nat.h".
10178         (i386_linux_nat_target): New class.
10179         (the_i386_linux_nat_target): New.
10180         (i386_linux_fetch_inferior_registers)
10181         (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
10182         as methods of i386_linux_nat_target.
10183         (_initialize_i386_linux_nat): Adjust.  Set linux_target.
10184         * inf-child.c (inf_child_ops): Delete.
10185         (inf_child_fetch_inferior_registers)
10186         (inf_child_store_inferior_registers): Delete.
10187         (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
10188         methods of inf_child_target.
10189         (inf_child_target::supports_terminal_ours)
10190         (inf_child_target::terminal_init)
10191         (inf_child_target::terminal_inferior)
10192         (inf_child_target::terminal_ours_for_output)
10193         (inf_child_target::terminal_ours, inf_child_target::interrupt)
10194         (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
10195         New.
10196         (inf_child_open, inf_child_disconnect, inf_child_close)
10197         (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
10198         (inf_child_post_startup_inferior, inf_child_can_run)
10199         (inf_child_pid_to_exec_file): Refactor as methods of
10200         inf_child_target.
10201         (inf_child_follow_fork): Delete.
10202         (inf_child_target::can_create_inferior)
10203         (inf_child_target::can_attach): New.
10204         (inf_child_target::has_all_memory, inf_child_target::has_memory)
10205         (inf_child_target::has_stack, inf_child_target::has_registers)
10206         (inf_child_target::has_execution): New.
10207         (inf_child_fileio_open, inf_child_fileio_pwrite)
10208         (inf_child_fileio_pread, inf_child_fileio_fstat)
10209         (inf_child_fileio_close, inf_child_fileio_unlink)
10210         (inf_child_fileio_readlink, inf_child_use_agent)
10211         (inf_child_can_use_agent): Refactor as methods of
10212         inf_child_target.
10213         (return_zero, inf_child_target): Delete.
10214         (inf_child_target::inf_child_target): New.
10215         * inf-child.h: Include "target.h".
10216         (inf_child_target): Delete function prototype.
10217         (inf_child_target): New class.
10218         (inf_child_open_target, inf_child_mourn_inferior)
10219         (inf_child_maybe_unpush_target): Delete.
10220         * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
10221         (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
10222         (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
10223         (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
10224         (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
10225         (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
10226         (inf_ptrace_wait, inf_ptrace_xfer_partial)
10227         (inf_ptrace_thread_alive, inf_ptrace_files_info)
10228         (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
10229         methods of inf_ptrace_target.
10230         (inf_ptrace_target): Delete function.
10231         * inf-ptrace.h: Include "inf-child.h".
10232         (inf_ptrace_target): Delete function declaration.
10233         (inf_ptrace_target): New class.
10234         (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
10235         * linux-nat.c (linux_target): New.
10236         (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
10237         (linux_nat_target::~linux_nat_target): New.
10238         (linux_child_post_attach, linux_child_post_startup_inferior)
10239         (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
10240         (linux_child_remove_fork_catchpoint)
10241         (linux_child_insert_vfork_catchpoint)
10242         (linux_child_remove_vfork_catchpoint)
10243         (linux_child_insert_exec_catchpoint)
10244         (linux_child_remove_exec_catchpoint)
10245         (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
10246         (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
10247         (linux_nat_resume, linux_nat_stopped_by_watchpoint)
10248         (linux_nat_stopped_data_address)
10249         (linux_nat_stopped_by_sw_breakpoint)
10250         (linux_nat_supports_stopped_by_sw_breakpoint)
10251         (linux_nat_stopped_by_hw_breakpoint)
10252         (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
10253         (linux_nat_kill, linux_nat_mourn_inferior)
10254         (linux_nat_xfer_partial, linux_nat_thread_alive)
10255         (linux_nat_update_thread_list, linux_nat_pid_to_str)
10256         (linux_nat_thread_name, linux_child_pid_to_exec_file)
10257         (linux_child_static_tracepoint_markers_by_strid)
10258         (linux_nat_is_async_p, linux_nat_can_async_p)
10259         (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
10260         (linux_nat_supports_multi_process)
10261         (linux_nat_supports_disable_randomization, linux_nat_async)
10262         (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
10263         (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
10264         (linux_nat_fileio_open, linux_nat_fileio_readlink)
10265         (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
10266         methods of linux_nat_target.
10267         (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
10268         (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
10269         parameter.
10270         (check_stopped_by_watchpoint): Adjust.
10271         (linux_xfer_partial): Delete.
10272         (linux_target_install_ops, linux_target, linux_nat_add_target):
10273         Delete.
10274         (linux_nat_target::linux_nat_target): New.
10275         * linux-nat.h: Include "inf-ptrace.h".
10276         (linux_nat_target): New.
10277         (linux_target, linux_target_install_ops, linux_nat_add_target):
10278         Delete function declarations.
10279         (linux_target): Declare global.
10280         * linux-thread-db.c (thread_db_target): New.
10281         (thread_db_target::thread_db_target): New.
10282         (thread_db_ops): Delete.
10283         (the_thread_db_target): New.
10284         (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
10285         (thread_db_update_thread_list, thread_db_pid_to_str)
10286         (thread_db_extra_thread_info)
10287         (thread_db_thread_handle_to_thread_info)
10288         (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
10289         (thread_db_resume): Refactor as methods of thread_db_target.
10290         (init_thread_db_ops): Delete.
10291         (_initialize_thread_db): Remove reference to init_thread_db_ops.
10292         * x86-linux-nat.c: Don't include "linux-nat.h".
10293         (super_post_startup_inferior): Delete.
10294         (x86_linux_nat_target::~x86_linux_nat_target): New.
10295         (x86_linux_child_post_startup_inferior)
10296         (x86_linux_read_description, x86_linux_enable_btrace)
10297         (x86_linux_disable_btrace, x86_linux_teardown_btrace)
10298         (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
10299         methods of x86_linux_nat_target.
10300         (x86_linux_create_target): Delete.  Bits folded ...
10301         (x86_linux_add_target): ... here.  Now takes a linux_nat_target
10302         pointer.
10303         * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
10304         (x86_linux_nat_target): New class.
10305         (x86_linux_create_target): Delete.
10306         (x86_linux_add_target): Now takes a linux_nat_target pointer.
10307         * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
10308         (x86_region_ok_for_watchpoint, x86_stopped_data_address)
10309         (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
10310         (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
10311         (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
10312         make extern.
10313         (x86_use_watchpoints): Delete.
10314         * x86-nat.h: Include "breakpoint.h" and "target.h".
10315         (x86_use_watchpoints): Delete.
10316         (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
10317         (x86_stopped_by_watchpoint, x86_stopped_data_address)
10318         (x86_insert_watchpoint, x86_remove_watchpoint)
10319         (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
10320         (x86_stopped_by_hw_breakpoint): New declarations.
10321         (x86_nat_target): New template class.
10322
10323         * ppc-linux-nat.c (ppc_linux_nat_target): New class.
10324         (the_ppc_linux_nat_target): New.
10325         (ppc_linux_fetch_inferior_registers)
10326         (ppc_linux_can_use_hw_breakpoint)
10327         (ppc_linux_region_ok_for_hw_watchpoint)
10328         (ppc_linux_ranged_break_num_registers)
10329         (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
10330         (ppc_linux_insert_mask_watchpoint)
10331         (ppc_linux_remove_mask_watchpoint)
10332         (ppc_linux_can_accel_watchpoint_condition)
10333         (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
10334         (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
10335         (ppc_linux_watchpoint_addr_within_range)
10336         (ppc_linux_masked_watch_num_registers)
10337         (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
10338         (ppc_linux_read_description): Refactor as methods of
10339         ppc_linux_nat_target.
10340         (_initialize_ppc_linux_nat): Adjust.  Set linux_target.
10341
10342         * procfs.c (procfs_xfer_partial): Delete forward declaration.
10343         (procfs_target): New class.
10344         (the_procfs_target): New.
10345         (procfs_target): Delete function.
10346         (procfs_auxv_parse, procfs_attach, procfs_detach)
10347         (procfs_fetch_registers, procfs_store_registers, procfs_wait)
10348         (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
10349         (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
10350         (procfs_create_inferior, procfs_update_thread_list)
10351         (procfs_thread_alive, procfs_pid_to_str)
10352         (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
10353         (procfs_stopped_data_address, procfs_insert_watchpoint)
10354         (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
10355         (proc_find_memory_regions, procfs_info_proc)
10356         (procfs_make_note_section): Refactor as methods of procfs_target.
10357         (_initialize_procfs): Adjust.
10358         * sol-thread.c (sol_thread_target): New class.
10359         (sol_thread_ops): Now a sol_thread_target.
10360         (sol_thread_detach, sol_thread_resume, sol_thread_wait)
10361         (sol_thread_fetch_registers, sol_thread_store_registers)
10362         (sol_thread_xfer_partial, sol_thread_mourn_inferior)
10363         (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
10364         (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
10365         (init_sol_thread_ops): Delete.
10366         (_initialize_sol_thread): Adjust.  Remove references to
10367         init_sol_thread_ops and complete_target_initialization.
10368
10369         * windows-nat.c (windows_nat_target): New class.
10370         (windows_fetch_inferior_registers)
10371         (windows_store_inferior_registers, windows_resume, windows_wait)
10372         (windows_attach, windows_detach, windows_pid_to_exec_file)
10373         (windows_files_info, windows_create_inferior)
10374         (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
10375         (windows_close, windows_pid_to_str, windows_xfer_partial)
10376         (windows_get_tib_address, windows_get_ada_task_ptid)
10377         (windows_thread_name, windows_thread_alive): Refactor as
10378         windows_nat_target methods.
10379         (do_initial_windows_stuff): Adjust.
10380         (windows_target): Delete function.
10381         (_initialize_windows_nat): Adjust.
10382
10383         * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
10384         (darwin_mourn_inferior, darwin_kill_inferior)
10385         (darwin_create_inferior, darwin_attach, darwin_detach)
10386         (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
10387         (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
10388         (darwin_supports_multi_process): Refactor as darwin_nat_target
10389         methods.
10390         (darwin_resume_to, darwin_files_info): Delete.
10391         (_initialize_darwin_inferior): Rename to ...
10392         (_initialize_darwin_nat): ... this.  Adjust to C++ification.
10393         * darwin-nat.h: Include "inf-child.h".
10394         (darwin_nat_target): New class.
10395         (darwin_complete_target): Delete.
10396         * i386-darwin-nat.c (i386_darwin_nat_target): New class.
10397         (darwin_target): New.
10398         (i386_darwin_fetch_inferior_registers)
10399         (i386_darwin_store_inferior_registers): Refactor as methods of
10400         darwin_nat_target.
10401         (darwin_complete_target): Delete, with ...
10402         (_initialize_i386_darwin_nat): ... bits factored out here.
10403
10404         * alpha-linux-nat.c (alpha_linux_nat_target): New class.
10405         (the_alpha_linux_nat_target): New.
10406         (alpha_linux_register_u_offset): Refactor as
10407         alpha_linux_nat_target method.
10408         (_initialize_alpha_linux_nat): Adjust.
10409         * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
10410         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
10411         (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
10412         methods of linux_nat_trad_target.
10413         (linux_trad_target): Delete.
10414         * linux-nat-trad.h (linux_trad_target): Delete function.
10415         (linux_nat_trad_target): New class.
10416         * mips-linux-nat.c (mips_linux_nat_target): New class.
10417         (super_fetch_registers, super_store_registers, super_close):
10418         Delete.
10419         (the_mips_linux_nat_target): New.
10420         (mips64_linux_regsets_fetch_registers)
10421         (mips64_linux_regsets_store_registers)
10422         (mips64_linux_fetch_registers, mips64_linux_store_registers)
10423         (mips_linux_register_u_offset, mips_linux_read_description)
10424         (mips_linux_can_use_hw_breakpoint)
10425         (mips_linux_stopped_by_watchpoint)
10426         (mips_linux_stopped_data_address)
10427         (mips_linux_region_ok_for_hw_watchpoint)
10428         (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
10429         (mips_linux_close): Refactor as methods of mips_linux_nat.
10430         (_initialize_mips_linux_nat): Adjust to C++ification.
10431
10432         * aix-thread.c (aix_thread_target): New class.
10433         (aix_thread_ops): Now an aix_thread_target.
10434         (aix_thread_detach, aix_thread_resume, aix_thread_wait)
10435         (aix_thread_fetch_registers, aix_thread_store_registers)
10436         (aix_thread_xfer_partial, aix_thread_mourn_inferior)
10437         (aix_thread_thread_alive, aix_thread_pid_to_str)
10438         (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
10439         Refactor as methods of aix_thread_target.
10440         (init_aix_thread_ops): Delete.
10441         (_initialize_aix_thread): Remove references to init_aix_thread_ops
10442         and complete_target_initialization.
10443         * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
10444         (rs6000_nat_target): New class.
10445         (the_rs6000_nat_target): New.
10446         (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
10447         (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
10448         (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
10449         (super_create_inferior): Delete.
10450         (_initialize_rs6000_nat): Adjust to C++ification.
10451
10452         * arm-linux-nat.c (arm_linux_nat_target): New class.
10453         (the_arm_linux_nat_target): New.
10454         (arm_linux_fetch_inferior_registers)
10455         (arm_linux_store_inferior_registers, arm_linux_read_description)
10456         (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
10457         (arm_linux_remove_hw_breakpoint)
10458         (arm_linux_region_ok_for_hw_watchpoint)
10459         (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
10460         (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
10461         (arm_linux_watchpoint_addr_within_range): Refactor as methods of
10462         arm_linux_nat_target.
10463         (_initialize_arm_linux_nat): Adjust to C++ification.
10464
10465         * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
10466         (the_aarch64_linux_nat_target): New.
10467         (aarch64_linux_fetch_inferior_registers)
10468         (aarch64_linux_store_inferior_registers)
10469         (aarch64_linux_child_post_startup_inferior)
10470         (aarch64_linux_read_description)
10471         (aarch64_linux_can_use_hw_breakpoint)
10472         (aarch64_linux_insert_hw_breakpoint)
10473         (aarch64_linux_remove_hw_breakpoint)
10474         (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
10475         (aarch64_linux_region_ok_for_hw_watchpoint)
10476         (aarch64_linux_stopped_data_address)
10477         (aarch64_linux_stopped_by_watchpoint)
10478         (aarch64_linux_watchpoint_addr_within_range)
10479         (aarch64_linux_can_do_single_step): Refactor as methods of
10480         aarch64_linux_nat_target.
10481         (super_post_startup_inferior): Delete.
10482         (_initialize_aarch64_linux_nat): Adjust to C++ification.
10483
10484         * hppa-linux-nat.c (hppa_linux_nat_target): New class.
10485         (the_hppa_linux_nat_target): New.
10486         (hppa_linux_fetch_inferior_registers)
10487         (hppa_linux_store_inferior_registers): Refactor as methods of
10488         hppa_linux_nat_target.
10489         (_initialize_hppa_linux_nat): Adjust to C++ification.
10490
10491         * ia64-linux-nat.c (ia64_linux_nat_target): New class.
10492         (the_ia64_linux_nat_target): New.
10493         (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
10494         (ia64_linux_stopped_data_address)
10495         (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
10496         (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
10497         ia64_linux_nat_target methods.
10498         (super_xfer_partial): Delete.
10499         (_initialize_ia64_linux_nat): Adjust to C++ification.
10500
10501         * m32r-linux-nat.c (m32r_linux_nat_target): New class.
10502         (the_m32r_linux_nat_target): New.
10503         (m32r_linux_fetch_inferior_registers)
10504         (m32r_linux_store_inferior_registers): Refactor as
10505         m32r_linux_nat_target methods.
10506         (_initialize_m32r_linux_nat): Adjust to C++ification.
10507
10508         * m68k-linux-nat.c (m68k_linux_nat_target): New class.
10509         (the_m68k_linux_nat_target): New.
10510         (m68k_linux_fetch_inferior_registers)
10511         (m68k_linux_store_inferior_registers): Refactor as
10512         m68k_linux_nat_target methods.
10513         (_initialize_m68k_linux_nat): Adjust to C++ification.
10514
10515         * s390-linux-nat.c (s390_linux_nat_target): New class.
10516         (the_s390_linux_nat_target): New.
10517         (s390_linux_fetch_inferior_registers)
10518         (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
10519         (s390_insert_watchpoint, s390_remove_watchpoint)
10520         (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
10521         (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
10522         (s390_auxv_parse, s390_read_description): Refactor as methods of
10523         s390_linux_nat_target.
10524         (_initialize_s390_nat): Adjust to C++ification.
10525
10526         * sparc-linux-nat.c (sparc_linux_nat_target): New class.
10527         (the_sparc_linux_nat_target): New.
10528         (_initialize_sparc_linux_nat): Adjust to C++ification.
10529         * sparc-nat.c (sparc_fetch_inferior_registers)
10530         (sparc_store_inferior_registers): Remove target_ops parameter.
10531         * sparc-nat.h (sparc_fetch_inferior_registers)
10532         (sparc_store_inferior_registers): Remove target_ops parameter.
10533         * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
10534         (the_sparc64_linux_nat_target): New.
10535         (_initialize_sparc64_linux_nat): Adjust to C++ification.
10536
10537         * spu-linux-nat.c (spu_linux_nat_target): New class.
10538         (the_spu_linux_nat_target): New.
10539         (spu_child_post_startup_inferior, spu_child_post_attach)
10540         (spu_child_wait, spu_fetch_inferior_registers)
10541         (spu_store_inferior_registers, spu_xfer_partial)
10542         (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
10543         methods.
10544         (_initialize_spu_nat): Adjust to C++ification.
10545
10546         * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
10547         (the_tilegx_linux_nat_target): New.
10548         (fetch_inferior_registers, store_inferior_registers):
10549         Refactor as methods.
10550         (_initialize_tile_linux_nat): Adjust to C++ification.
10551
10552         * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
10553         (the_xtensa_linux_nat_target): New.
10554         (xtensa_linux_fetch_inferior_registers)
10555         (xtensa_linux_store_inferior_registers): Refactor as
10556         xtensa_linux_nat_target methods.
10557         (_initialize_xtensa_linux_nat): Adjust to C++ification.
10558
10559         * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
10560         (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
10561         (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
10562         (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
10563         (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
10564         (fbsd_stopped_by_sw_breakpoint)
10565         (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
10566         (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
10567         (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
10568         (fbsd_post_startup_inferior, fbsd_post_attach)
10569         (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
10570         (fbsd_set_syscall_catchpoint)
10571         (super_xfer_partial, super_resume, super_wait)
10572         (fbsd_supports_stopped_by_hw_breakpoint): Delete.
10573         (fbsd_handle_debug_trap): Remove target_ops parameter.
10574         (fbsd_nat_add_target): Delete.
10575         * fbsd-nat.h: Include "inf-ptrace.h".
10576         (fbsd_nat_add_target): Delete.
10577         (USE_SIGTRAP_SIGINFO): Define.
10578         (fbsd_nat_target): New class.
10579
10580         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
10581         (amd64bsd_store_inferior_registers): Remove target_ops parameter.
10582         (amd64bsd_target): Delete.
10583         * amd64-bsd-nat.h: New file.
10584         * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
10585         "x86-bsd-nat.h".
10586         (amd64_fbsd_nat_target): New class.
10587         (the_amd64_fbsd_nat_target): New.
10588         (amd64fbsd_read_description): Refactor as method of
10589         amd64_fbsd_nat_target.
10590         (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
10591         (_initialize_amd64fbsd_nat): Adjust to C++ification.
10592         * amd64-nat.h (amd64bsd_target): Delete function declaration.
10593         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
10594         (i386bsd_store_inferior_registers): Remove target_ops parameter.
10595         (i386bsd_target): Delete.
10596         * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
10597         (i386bsd_fetch_inferior_registers)
10598         (i386bsd_store_inferior_registers): Declare.
10599         (i386_bsd_nat_target): New class.
10600         * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
10601         (the_i386_fbsd_nat_target): New.
10602         (i386fbsd_resume, i386fbsd_read_description): Refactor as
10603         i386_fbsd_nat_target methods.
10604         (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
10605         (_initialize_i386fbsd_nat): Adjust to C++ification.
10606         * x86-bsd-nat.c (super_mourn_inferior): Delete.
10607         (x86bsd_mourn_inferior, x86bsd_target): Delete.
10608         (_initialize_x86_bsd_nat): Adjust to C++ification.
10609         * x86-bsd-nat.h: Include "x86-nat.h".
10610         (x86bsd_target): Delete declaration.
10611         (x86bsd_nat_target): New class.
10612
10613         * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
10614         (the_aarch64_fbsd_nat_target): New.
10615         (aarch64_fbsd_fetch_inferior_registers)
10616         (aarch64_fbsd_store_inferior_registers): Refactor as methods of
10617         aarch64_fbsd_nat_target.
10618         (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
10619         * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
10620         (the_alpha_bsd_nat_target): New.
10621         (alphabsd_fetch_inferior_registers)
10622         (alphabsd_store_inferior_registers): Refactor as
10623         alpha_bsd_nat_target methods.
10624         (_initialize_alphabsd_nat): Refactor as methods of
10625         alpha_bsd_nat_target.
10626         * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
10627         (the_amd64_nbsd_nat_target): New.
10628         (_initialize_amd64nbsd_nat): Adjust to C++ification.
10629         * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
10630         (the_amd64_obsd_nat_target): New.
10631         (_initialize_amd64obsd_nat): Adjust to C++ification.
10632         * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
10633         (the_arm_fbsd_nat_target): New.
10634         (arm_fbsd_fetch_inferior_registers)
10635         (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
10636         (_initialize_arm_fbsd_nat): Refactor as methods of
10637         arm_fbsd_nat_target.
10638         (_initialize_arm_fbsd_nat): Adjust to C++ification.
10639         * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
10640         (the_arm_netbsd_nat_target): New.
10641         (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
10642         arm_netbsd_nat_target.
10643         (_initialize_arm_netbsd_nat): Adjust to C++ification.
10644         * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
10645         (the_hppa_nbsd_nat_target): New.
10646         (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
10647         hppa_nbsd_nat_target methods.
10648         (_initialize_hppanbsd_nat): Adjust to C++ification.
10649         * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
10650         (the_hppa_obsd_nat_target): New.
10651         (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
10652         methods of hppa_obsd_nat_target.
10653         (_initialize_hppaobsd_nat): Adjust to C++ification.  Use
10654         add_target.
10655         * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
10656         (_initialize_i386nbsd_nat): Adjust to C++ification.  Use
10657         add_target.
10658         * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
10659         (_initialize_i386obsd_nat): Use add_target.
10660         * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
10661         (the_m68k_bsd_nat_target): New.
10662         (m68kbsd_fetch_inferior_registers)
10663         (m68kbsd_store_inferior_registers): Refactor as methods of
10664         m68k_bsd_nat_target.
10665         (_initialize_m68kbsd_nat): Adjust to C++ification.
10666         * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
10667         (the_mips_fbsd_nat_target): New.
10668         (mips_fbsd_fetch_inferior_registers)
10669         (mips_fbsd_store_inferior_registers): Refactor as methods of
10670         mips_fbsd_nat_target.
10671         (_initialize_mips_fbsd_nat): Adjust to C++ification.  Use
10672         add_target.
10673         * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
10674         (the_mips_nbsd_nat_target): New.
10675         (mipsnbsd_fetch_inferior_registers)
10676         (mipsnbsd_store_inferior_registers): Refactor as methods of
10677         mips_nbsd_nat_target.
10678         (_initialize_mipsnbsd_nat): Adjust to C++ification.
10679         * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
10680         (the_mips64_obsd_nat_target): New.
10681         (mips64obsd_fetch_inferior_registers)
10682         (mips64obsd_store_inferior_registers): Refactor as methods of
10683         mips64_obsd_nat_target.
10684         (_initialize_mips64obsd_nat): Adjust to C++ification.  Use
10685         add_target.
10686         * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
10687         nbsd_nat_target.
10688         * nbsd-nat.h: Include "inf-ptrace.h".
10689         (nbsd_nat_target): New class.
10690         * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
10691         (obsd_wait): Refactor as methods of obsd_nat_target.
10692         (obsd_add_target): Delete.
10693         * obsd-nat.h: Include "inf-ptrace.h".
10694         (obsd_nat_target): New class.
10695         * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
10696         (the_ppc_fbsd_nat_target): New.
10697         (ppcfbsd_fetch_inferior_registers)
10698         (ppcfbsd_store_inferior_registers): Refactor as methods of
10699         ppc_fbsd_nat_target.
10700         (_initialize_ppcfbsd_nat): Adjust to C++ification.  Use
10701         add_target.
10702         * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
10703         (the_ppc_nbsd_nat_target): New.
10704         (ppcnbsd_fetch_inferior_registers)
10705         (ppcnbsd_store_inferior_registers): Refactor as methods of
10706         ppc_nbsd_nat_target.
10707         (_initialize_ppcnbsd_nat): Adjust to C++ification.
10708         * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
10709         (the_ppc_obsd_nat_target): New.
10710         (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
10711         methods of ppc_obsd_nat_target.
10712         (_initialize_ppcobsd_nat): Adjust to C++ification.  Use
10713         add_target.
10714         * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
10715         (the_sh_nbsd_nat_target): New.
10716         (shnbsd_fetch_inferior_registers)
10717         (shnbsd_store_inferior_registers): Refactor as methods of
10718         sh_nbsd_nat_target.
10719         (_initialize_shnbsd_nat): Adjust to C++ification.
10720         * sparc-nat.c (sparc_xfer_wcookie): Make extern.
10721         (inf_ptrace_xfer_partial): Delete.
10722         (sparc_xfer_partial, sparc_target): Delete.
10723         * sparc-nat.h (sparc_fetch_inferior_registers)
10724         (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
10725         (sparc_target): Delete function declaration.
10726         (sparc_target): New template class.
10727         * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
10728         (_initialize_sparcnbsd_nat): Adjust to C++ification.
10729         * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
10730         (_initialize_sparc64fbsd_nat): Adjust to C++ification.  Use
10731         add_target.
10732         * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
10733         (_initialize_sparc64nbsd_nat): Adjust to C++ification.
10734         * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
10735         (_initialize_sparc64obsd_nat): Adjust to C++ification.  Use
10736         add_target.
10737         * vax-bsd-nat.c (vax_bsd_nat_target): New class.
10738         (the_vax_bsd_nat_target): New.
10739         (vaxbsd_fetch_inferior_registers)
10740         (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
10741         methods.
10742         (_initialize_vaxbsd_nat): Adjust to C++ification.
10743
10744         * bsd-kvm.c (bsd_kvm_target): New class.
10745         (bsd_kvm_ops): Now a bsd_kvm_target.
10746         (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
10747         (bsd_kvm_files_info, bsd_kvm_fetch_registers)
10748         (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
10749         bsd_kvm_target.
10750         (bsd_kvm_return_one): Delete.
10751         (bsd_kvm_add_target): Adjust to C++ification.
10752
10753         * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
10754         (nto_procfs_target_procfs): New classes.
10755         (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
10756         (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
10757         (procfs_post_attach, procfs_wait, procfs_fetch_registers)
10758         (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
10759         (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
10760         (procfs_remove_hw_breakpoint, procfs_resume)
10761         (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
10762         (procfs_kill_inferior, procfs_store_registers)
10763         (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
10764         as methods of nto_procfs_target.
10765         (nto_procfs_ops): Now an nto_procfs_target_procfs.
10766         (nto_native_ops): Delete.
10767         (procfs_open, procfs_native_open): Delete.
10768         (nto_native_ops): Now an nto_procfs_target_native.
10769         (init_procfs_targets): Adjust to C++ification.
10770         (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
10771         (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
10772         Refactor as methods of nto_procfs_target.
10773
10774         * go32-nat.c (go32_nat_target): New class.
10775         (the_go32_nat_target): New.
10776         (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
10777         (go32_store_registers, go32_xfer_partial, go32_files_info)
10778         (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
10779         (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
10780         (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
10781         (go32_pid_to_str): Refactor as methods of go32_nat_target.
10782         (go32_target): Delete.
10783         (_initialize_go32_nat): Adjust to C++ification.
10784
10785         * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
10786         (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
10787         (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
10788         (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
10789         gnu_nat_target.
10790         (gnu_target): Delete.
10791         * gnu-nat.h (gnu_target): Delete.
10792         (gnu_nat_target): New class.
10793         * i386-gnu-nat.c (gnu_base_target): New.
10794         (i386_gnu_nat_target): New class.
10795         (the_i386_gnu_nat_target): New.
10796         (_initialize_i386gnu_nat): Adjust to C++ification.
10797
10798 2018-05-02  Pedro Alves  <palves@redhat.com>
10799
10800         * bfd-target.c (target_bfd_xclose): Rename to ...
10801         (target_bfd_close): ... this.
10802         (target_bfd_reopen): Adjust.
10803         * target.c (target_close): Remove references to to_xclose.
10804         * target.h (target_ops::to_xclose): Delete.
10805         (target_ops::to_close): Update comments.
10806
10807 2018-05-02  Pedro Alves  <palves@redhat.com>
10808
10809         * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
10810         "linux-nat.h".
10811         * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
10812         * inf-ptrace.c (inf_ptrace_register_u_offset)
10813         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
10814         (inf_ptrace_store_register, inf_ptrace_store_registers)
10815         (inf_ptrace_trad_target): Move to ...
10816         * linux-nat-trad.c: ... this new file.
10817         * linux-nat-trad.h: New file.
10818         * linux-nat.c (linux_target_install_ops): Make extern.
10819         (linux_trad_target): Delete.
10820         * linux-nat.h (linux_trad_target): Delete declaration.
10821         (linux_target_install_ops): Declare.
10822         * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
10823         "linux-nat.h".
10824
10825 2018-05-02  Pedro Alves  <palves@redhat.com>
10826
10827         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
10828         procfs_target/add_target here.
10829         * procfs.c (procfs_target): Make static.
10830         (_initialize_procfs): Call add_target here.
10831         * procfs.h (struct target_ops): Remove forward declaration.
10832         (procfs_target): Remove declaration.
10833         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
10834
10835 2018-05-02  Pedro Alves  <palves@redhat.com>
10836
10837         * procfs.c (procfs_stopped_by_watchpoint)
10838         (procfs_insert_watchpoint, procfs_remove_watchpoint)
10839         (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
10840         Forward declare.
10841         (procfs_use_watchpoints): Delete, move contents...
10842         (procfs_target): ... here.
10843         * procfs.h (procfs_use_watchpoints): Delete declaration.
10844         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
10845         procfs_use_watchpoints.
10846         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
10847         procfs_use_watchpoints.
10848
10849 2018-05-02  Tom Tromey  <tom@tromey.com>
10850
10851         PR python/20084:
10852         * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
10853         and var_zuinteger_unlimited.
10854         * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
10855         and PARAM_ZUINTEGER_UNLIMITED.
10856         (set_parameter_value): Handle var_zuinteger and
10857         var_zuinteger_unlimited.
10858         (add_setshow_generic): Likewise.
10859         (parmpy_init): Likewise.
10860
10861 2018-04-28  Dan Robertson  <danlrobertson89@gmail.com>
10862
10863         PR rust/23124
10864         * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
10865         pointer is not null before dereferencing it.
10866
10867 2018-04-30  Tom Tromey  <tom@tromey.com>
10868
10869         * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
10870         is_mi_like_p.
10871
10872 2018-04-30  Tom Tromey  <tom@tromey.com>
10873
10874         * breakpoint.c (mention): Remove use of is_mi_like_p.
10875         (print_mention_ranged_breakpoint): Likewise.
10876         * break-catch-throw.c (print_it_exception_catchpoint): Remove use
10877         of is_mi_like_p.
10878
10879 2018-04-30  Tom Tromey  <tom@tromey.com>
10880
10881         * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
10882
10883 2018-04-30  Tom Tromey  <tom@tromey.com>
10884
10885         * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
10886         (info_spu_event_command): Remove some uses of is_mi_like_p.
10887
10888 2018-04-30  Tom Tromey  <tom@tromey.com>
10889
10890         * python/py-framefilter.c (py_print_single_arg)
10891         (enumerate_locals, py_print_args, py_print_frame): Remove some
10892         uses of is_mi_like_p.
10893
10894 2018-04-30  Tom Tromey  <tom@tromey.com>
10895
10896         * ui-out.c: Update.
10897         * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
10898         * ui-out.h (ui_out::is_mi_like_p): Now const.
10899         (ui_out::do_is_mi_like_p): Now const.
10900         * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
10901
10902 2018-04-30  Tom Tromey  <tom@tromey.com>
10903
10904         * varobj.c (varobj_set_visualizer): Use new_reference.
10905         * python/python.c (gdbpy_decode_line): Use new_reference.
10906         * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
10907         new_reference.
10908
10909 2018-04-30  Tom Tromey  <tom@tromey.com>
10910
10911         * varobj.c (install_new_value): Use new_reference.
10912         * value.h (value_incref): Return void.  Swap intro comment with
10913         value_decref.
10914         * value.c (set_value_parent): Use new_reference.
10915         (value_incref): Return void.  Update intro comment.
10916         (release_value): Use new_reference.
10917         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
10918
10919 2018-04-30  Tom Tromey  <tom@tromey.com>
10920
10921         * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
10922         * gdb_bfd.h (new_bfd_ref): Remove.
10923         (gdb_bfd_open): Update comment.
10924         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
10925         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
10926         (gdb_bfd_fdopenr): Use new_reference.
10927         * exec.c (exec_file_attach): Use new_reference.
10928
10929 2018-04-30  Tom Tromey  <tom@tromey.com>
10930
10931         * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
10932         method.
10933
10934 2018-04-30  Tom Tromey  <tom@tromey.com>
10935
10936         * jit.c (jit_read_code_entry): Use type_align.
10937         * i386-tdep.c (i386_gdbarch_init): Don't call
10938         set_gdbarch_long_long_align_bit.
10939         * gdbarch.sh: Remove long_long_align_bit.
10940         * gdbarch.c, gdbarch.h: Rebuild.
10941         * arc-tdep.c (arc_type_align): New function.
10942         (arc_gdbarch_init): Use arc_type_align.  Don't call
10943         set_gdbarch_long_long_align_bit.
10944
10945 2018-04-30  Tom Tromey  <tom@tromey.com>
10946
10947         * rust-lang.c (rust_type_alignment): Remove.
10948         (rust_composite_type): Use type_align.
10949
10950 2018-04-30  Tom Tromey  <tom@tromey.com>
10951
10952         * NEWS: Mention Type.align.
10953         * python/py-type.c (typy_get_alignof): New function.
10954         (type_object_getset): Add "alignof".
10955
10956 2018-04-30  Tom Tromey  <tom@tromey.com>
10957
10958         PR exp/17095:
10959         * NEWS: Update.
10960         * std-operator.def (UNOP_ALIGNOF): New operator.
10961         * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
10962         New.
10963         * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
10964         * c-lang.c (c_op_print_tab): Add alignof.
10965         * c-exp.y (ALIGNOF): New token.
10966         (exp): Add "ALIGNOF" production.
10967         (ident_tokens): Add _Alignof and alignof.
10968
10969 2018-04-30  Tom Tromey  <tom@tromey.com>
10970
10971         * i386-tdep.c (i386_type_align): New function.
10972         (i386_gdbarch_init): Update.
10973         * gdbarch.sh (type_align): New method.
10974         * gdbarch.c, gdbarch.h: Rebuild.
10975         * arch-utils.h (default_type_align): Declare.
10976         * arch-utils.c (default_type_align): New function.
10977         * gdbtypes.h (TYPE_ALIGN_BITS): New define.
10978         (struct type) <align_log2>: New field.
10979         <instance_flags>: Now a bitfield.
10980         (TYPE_RAW_ALIGN): New macro.
10981         (type_align, type_raw_align, set_type_align): Declare.
10982         * gdbtypes.c (type_align, type_raw_align, set_type_align): New
10983         functions.
10984         * dwarf2read.c (quirk_rust_enum): Set type alignment.
10985         (get_alignment, maybe_set_alignment): New functions.
10986         (read_structure_type, read_enumeration_type, read_array_type)
10987         (read_set_type, read_tag_pointer_type, read_tag_reference_type)
10988         (read_subrange_type, read_base_type): Set type alignment.
10989
10990 2018-04-30  Simon Marchi  <simon.marchi@ericsson.com>
10991
10992         * dwarf2read.c (read_index_from_section): Use bool.
10993
10994 2018-04-29  Fabian Groffen  <grobian@gentoo.org>
10995
10996         PR gdb/22950
10997         * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
10998         with #ifdef.
10999
11000 2018-04-29  John Reiser  <jreiser@BitWagon.com>
11001
11002         PR build/22873
11003         * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
11004         last step, and do it atomically.
11005
11006 2018-04-27  Alexandre Oliva  <aoliva@redhat.com>
11007
11008         * compile/compile-c-types.c (convert_int, convert_float):
11009         Update for C FE v1.
11010
11011 2018-04-27  Tom Tromey  <tom@tromey.com>
11012
11013         PR rust/22545:
11014         * rust-lang.c (rust_inclusive_range_type_p): New function.
11015         (rust_range): Handle inclusive ranges.
11016         (rust_compute_range): Likewise.
11017         * rust-exp.y (struct rust_op) <inclusive>: New field.
11018         (DOTDOTEQ): New constant.
11019         (range_expr): Add "..=" productions.
11020         (operator_tokens): Add "..=" token.
11021         (ast_range): Add "inclusive" parameter.
11022         (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
11023         ranges.
11024         * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
11025         bounds values.
11026         * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
11027         LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
11028         Update comments.
11029         * expprint.c (print_subexp_standard): Handle new bounds values.
11030         (dump_subexp_body_standard): Likewise.
11031
11032 2018-04-27  Tom Tromey  <tom@tromey.com>
11033
11034         * configure: Rebuild.
11035         * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
11036         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
11037         "OVERRIDE".
11038         (class symbol_needs_eval_context): Likewise.
11039         * dwarf2read.c (mock_mapped_index::symbol_name_count)
11040         (mock_mapped_index::symbol_name_at): Use "override".  Remove
11041         "virtual".
11042         * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
11043         "override".
11044         (class dwarf_expr_executor): Use "override", not "OVERRIDE".
11045         * aarch64-tdep.c (instruction_reader::read): Use "override".
11046         (instruction_reader_test::read): Likewise.
11047         * arm-tdep.c (instruction_reader::read): Use "override".
11048         (instruction_reader_thumb::read): Likewise.
11049
11050 2018-04-26  Andrzej Kaczmarek  <andrzej.kaczmarek@codecoup.pl>
11051
11052         PR remote/9665
11053         * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
11054         instead of remote_send.
11055         (remote_send): Remove.
11056
11057 2018-04-26  Pedro Alves  <palves@redhat.com>
11058
11059         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
11060         find_function_start_sal instead of find_pc_line.
11061
11062 2018-04-26  Pedro Alves  <palves@redhat.com>
11063
11064         * breakpoint.c (set_breakpoint_location_function): Handle
11065         mst_data_gnu_ifunc.
11066         * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
11067         * elfread.c (elf_symtab_read): Give data symbols with
11068         BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
11069         (elf_rel_plt_read): Update comment.
11070         * linespec.c (convert_linespec_to_sals): Handle
11071         mst_data_gnu_ifunc.
11072         (minsym_found): Handle mst_data_gnu_ifunc.
11073         * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
11074         (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
11075         * parse.c (find_minsym_type_and_address): Handle
11076         mst_data_gnu_ifunc.
11077         * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
11078         * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
11079         * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
11080         comment.
11081         <mst_data_gnu_ifunc>: New enumerator.
11082
11083 2018-04-26  Pedro Alves  <palves@redhat.com>
11084
11085         * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
11086         (lookup_minimal_symbol_by_pc_section): ... this.  Replace
11087         'want_trampoline' parameter by a lookup_msym_prefer parameter.
11088         Handle it.
11089         (lookup_minimal_symbol_by_pc_section): Delete old implementation.
11090         (lookup_minimal_symbol_by_pc): Adjust.
11091         (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
11092         (lookup_solib_trampoline_symbol_by_pc): Adjust.
11093         * minsyms.h (lookup_msym_prefer): New enum.
11094         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
11095         parameter by a lookup_msym_prefer parameter.
11096
11097 2018-04-26  Pedro Alves  <palves@redhat.com>
11098
11099         * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
11100         ends in "@plt" instead of looking at the symbol's section.
11101
11102 2018-04-26  Pedro Alves  <palves@redhat.com>
11103
11104         * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete.  Remove
11105         all references.
11106         (find_pc_partial_function_gnu_ifunc): Rename to ...
11107         (find_pc_partial_function): ... this, and remove references to
11108         'is_gnu_ifunc_p'.
11109         (find_pc_partial_function): Delete old implementation.
11110         * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
11111
11112 2018-04-26  Pedro Alves  <palves@redhat.com>
11113
11114         * linespec.c (struct bound_minimal_symbol_search_key): New.
11115         (convert_linespec_to_sals): Sort minimal symbols earlier.  Don't
11116         skip first line if we found a GNU ifunc minimal symbol by name.
11117         (compare_msymbols): Change parameters to work with a destructured
11118         lhs minsym.
11119         (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
11120         functions.
11121
11122 2018-04-26  Pedro Alves  <palves@redhat.com>
11123
11124         * breakpoint.c (set_breakpoint_location_function): Don't resolve
11125         ifunc targets here.  Instead, if we have an ifunc minsym, use its
11126         address/name.
11127         (add_location_to_breakpoint): Store the minsym and the objfile in
11128         the breakpoint location.
11129         * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
11130         * linespec.c (minsym_found): Resolve GNU ifunc targets here.
11131         Record the minsym in the sal.
11132         * symtab.h (symtab_and_line) <msymbol>: New field.
11133
11134 2018-04-26  Pedro Alves  <palves@redhat.com>
11135
11136         * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
11137         unless we actually resolved the ifunc.
11138
11139 2018-04-26  Pedro Alves  <palves@redhat.com>
11140
11141         * c-exp.y (variable production): Prefer ifunc minsyms over
11142         regular function symbols.
11143         * symtab.c (find_gnu_ifunc): New function.
11144         * minsyms.h (lookup_msym_prefer): New enum.
11145         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
11146         parameter by a lookup_msym_prefer parameter.
11147         * symtab.h (find_gnu_ifunc): New declaration.
11148
11149 2018-04-26  Pedro Alves  <palves@redhat.com>
11150
11151         * blockframe.c (find_gnu_ifunc_target_type): New function.
11152         (find_function_type): New.
11153         * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
11154         return a value with a memory address.
11155         (eval_call): For calls to GNU ifunc functions, try to find the
11156         type of the target function from the type that the resolver
11157         returns.
11158         * gdbtypes.c (objfile_type): Don't install a return type for ifunc
11159         symbols.
11160         * infcall.c (find_function_return_type): Delete.
11161         (find_function_addr): Add 'function_type' parameter.  For calls to
11162         GNU ifunc functions, try to find the type of the target function
11163         from the type that the resolver returns, and return it via
11164         FUNCTION_TYPE.
11165         (call_function_by_hand_dummy): Adjust to use the function type
11166         returned by find_function_addr.
11167         (find_function_addr): Add 'function_type' parameter and move
11168         description here.
11169         * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
11170         declarations.
11171
11172 2018-04-26  Pedro Alves  <palves@redhat.com>
11173
11174         * c-exp.y (variable production): Skip finding an alias for ifunc
11175         symbols.
11176
11177 2018-04-26  Pedro Alves  <palves@redhat.com>
11178
11179         * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
11180
11181 2018-04-25  Pedro Alves  <palves@redhat.com>
11182
11183         * infcmd.c (kill_command): Print the pid as string, not the whole
11184         thread's ptid.  Add comment.  s/has been killed/killed/ in output
11185         message.
11186         * remote.c (remote_detach_1): Print the pid as string, not the
11187         whole thread's ptid.
11188
11189 2018-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
11190             Sergio Durigan Junior  <sergiodj@redhat.com>
11191             Pedro Alves  <palves@redhat.com>
11192
11193         * infcmd.c (kill_command): Print message when inferior has
11194         been killed.
11195         * inferior.c (print_inferior_events): Remove 'static'.  Set as
11196         '1'.
11197         (add_inferior): Improve message printed when
11198         'print_inferior_events' is on.
11199         (exit_inferior): Remove message printed when
11200         'print_inferior_events' is on.
11201         (detach_inferior): Improve message printed when
11202         'print_inferior_events' is on.
11203         (initialize_inferiors): Use 'add_inferior_silent' to set
11204         'current_inferior_'.
11205         * inferior.h (print_inferior_events): Declare here as
11206         'extern'.
11207         * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
11208         '[Detaching...]' messages when 'print_inferior_events' is on.
11209         Use 'add_thread_silent' instead of 'add_thread'.  Add '[' and ']'
11210         as prefix/suffix for messages.  Remove periods.  Fix erroneous
11211         'Detaching after fork from child...', replace it by '... from
11212         parent...'.
11213         (handle_vfork_child_exec_or_exit): Add '[' and ']' as
11214         prefix/suffix when printing 'Detaching...' messages.  Print
11215         them when 'print_inferior_events' is on.
11216         * remote.c (remote_detach_1): Print message when detaching
11217         from inferior and '!is_fork_parent'.
11218
11219 2018-04-24  Tom Tromey  <tom@tromey.com>
11220
11221         * cli-out.h: Reindent.
11222
11223 2018-04-24  Tom Tromey  <tom@tromey.com>
11224
11225         * cli-out.c (cli_ui_out::out_field_fmt): Remove.
11226         (cli_ui_out::do_field_string): Use fputs_filtered.
11227         * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
11228
11229 2018-04-23  Tom Tromey  <tom@tromey.com>
11230
11231         * guile/scm-frame.c (gdbscm_frame_read_var): Use
11232         gdb::unique_xmalloc_ptr.
11233
11234 2018-04-23  Tom Tromey  <tom@tromey.com>
11235
11236         * configure: Rebuild.
11237
11238 2018-04-22  Rajendra SY  <rajendra.sy@gmail.com>
11239
11240         PR gdb/23095
11241         * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
11242         prepare_for_testing.  Set normal_bp to r_debug_state if target
11243         is bsd.
11244
11245 2018-04-21  Pedro Alves  <palves@redhat.com>
11246             Rajendra SY  <rajendra.sy@gmail.com>
11247
11248         * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
11249         * remote.c (extended_remote_attach): In all-stop mode, mark the
11250         thread as executing.
11251
11252 2018-04-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
11253
11254         * thread.c (thread_apply_all_command): Fix comment.
11255         (thread_command): Fix comment.
11256
11257 2018-04-10  Alan Hayward  <alan.hayward@arm.com>
11258
11259         * common/tdesc.h (tdesc_create_feature): Remove xml filename
11260         parameter.
11261         * features/aarch64-core.c (create_feature_aarch64_core):
11262         Regenerate.
11263         * features/aarch64-fpu.c (create_feature_aarch64_fpu):
11264         Likewise.
11265         * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
11266         Likewise.
11267         * features/i386/32bit-avx512.c
11268         (create_feature_i386_32bit_avx512): Likewise.
11269         * features/i386/32bit-core.c (create_feature_i386_32bit_core):
11270         Likewise.
11271         * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
11272         Likewise.
11273         * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
11274         Likewise.
11275         * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
11276         Likewise.
11277         * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
11278         Likewise.
11279         * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
11280         Likewise.
11281         * features/i386/64bit-avx512.c
11282         (create_feature_i386_64bit_avx512): Likewise.
11283         * features/i386/64bit-core.c (create_feature_i386_64bit_core):
11284         Likewise.
11285         * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
11286         Likewise.
11287         * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
11288         Likewise.
11289         * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
11290         Likewise.
11291         * features/i386/64bit-segments.c
11292         (create_feature_i386_64bit_segments): Likewise.
11293         * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
11294         Likewise.
11295         * features/i386/x32-core.c
11296         (create_feature_i386_x32_core): Likewise.
11297         * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
11298         * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
11299         * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
11300         * target-descriptions.c: In generated code, don't pass xml
11301         filename.
11302
11303 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
11304
11305         * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
11306         (print_xml_feature::visit_post): Likewise.
11307         (print_xml_feature::visit): Likewise.
11308         * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
11309         (print_xml_feature): Add new class.
11310         * regformats/regdat.sh: Null xmltarget on feature targets.
11311         * target-descriptions.c (struct target_desc): Add xmltarget.
11312         (maintenance_check_tdesc_xml_convert): Add unittest function.
11313         (tdesc_get_features_xml): Add function to get xml.
11314         (maintenance_check_xml_descriptions): Test xml generation.
11315         * xml-tdesc.c (string_read_description_xml): Add function.
11316         * xml-tdesc.h (string_read_description_xml): Add declaration.
11317
11318 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
11319
11320         * features/Makefile: Add feature marker to targets with new style
11321         target descriptions.
11322         * regformats/aarch64.dat: Regenerate.
11323         * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
11324         * regformats/i386/amd64-avx-linux.dat: Likewise.
11325         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
11326         * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
11327         * regformats/i386/amd64-linux.dat: Likewise.
11328         * regformats/i386/amd64-mpx-linux.dat: Likewise.
11329         * regformats/i386/amd64.dat: Likewise.
11330         * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
11331         * regformats/i386/i386-avx-linux.dat: Likewise.
11332         * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
11333         * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
11334         * regformats/i386/i386-linux.dat: Likewise.
11335         * regformats/i386/i386-mmx-linux.dat: Likewise.
11336         * regformats/i386/i386-mpx-linux.dat: Likewise.
11337         * regformats/i386/i386.dat: Likewise.
11338         * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
11339         * regformats/i386/x32-avx-linux.dat: Likewise.
11340         * regformats/i386/x32-linux.dat: Likewise.
11341         * regformats/tic6x-c62x-linux.dat: Likewise.
11342         * regformats/tic6x-c64x-linux.dat: Likewise.
11343         * regformats/tic6x-c64xp-linux.dat: Likewise.
11344         * regformats/regdat.sh: Parse feature marker.
11345
11346 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
11347
11348         * common/tdesc.h (tdesc_architecture_name): Add new declaration.
11349         (tdesc_osabi_name): Likewise.
11350         * target-descriptions.c (tdesc_architecture_name): Add new
11351         function.
11352         (tdesc_osabi_name): Likewise.
11353
11354 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
11355
11356         * common/tdesc.c (tdesc_predefined_type): Move to here.
11357         (tdesc_named_type): Likewise.
11358         (tdesc_create_vector): Likewise.
11359         (tdesc_create_struct): Likewise.
11360         (tdesc_set_struct_size): Likewise.
11361         (tdesc_create_union): Likewise.
11362         (tdesc_create_flags): Likewise.
11363         (tdesc_create_enum): Likewise.
11364         (tdesc_add_field): Likewise.
11365         (tdesc_add_typed_bitfield): Likewise.
11366         (tdesc_add_bitfield): Likewise.
11367         (tdesc_add_flag): Likewise.
11368         (tdesc_add_enum_value): Likewise.
11369         * common/tdesc.h (struct tdesc_type_builtin): Likewise.
11370         (struct tdesc_type_vector): Likewise.
11371         (struct tdesc_type_field): Likewise.
11372         (struct tdesc_type_with_fields): Likewise.
11373         (tdesc_create_enum): Add declaration.
11374         (tdesc_add_typed_bitfield): Likewise.
11375         (tdesc_add_enum_value): Likewise.
11376         * target-descriptions.c (tdesc_type_field): Move from here.
11377         (tdesc_type_builtin): Likewise.
11378         (tdesc_type_vector): Likewise.
11379         (tdesc_type_with_fields): Likewise.
11380         (tdesc_predefined_types): Likewise.
11381         (tdesc_named_type): Likewise.
11382         (tdesc_create_vector): Likewise.
11383         (tdesc_create_struct): Likewise.
11384         (tdesc_set_struct_size): Likewise.
11385         (tdesc_create_union): Likewise.
11386         (tdesc_create_flags): Likewise.
11387         (tdesc_create_enum): Likewise.
11388         (tdesc_add_field): Likewise.
11389         (tdesc_add_typed_bitfield): Likewise.
11390         (tdesc_add_bitfield): Likewise.
11391         (tdesc_add_flag): Likewise.
11392         (tdesc_add_enum_value): Likewise.
11393         * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
11394         (tdesc_add_typed_bitfield): Likewise.
11395         (tdesc_add_enum_value): Likewise.
11396
11397 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
11398
11399         * common/tdesc.c (tdesc_feature::accept): Move to here.
11400         (tdesc_feature::operator==): Likewise.
11401         (tdesc_create_reg): Likewise.
11402         * common/tdesc.h (tdesc_type_kind): Likewise.
11403         (struct tdesc_type): Likewise.
11404         (struct tdesc_feature): Likewise.
11405         * regformats/regdat.sh: Create a feature.
11406         * target-descriptions.c (tdesc_type_kind): Move from here.
11407         (tdesc_type): Likewise.
11408         (tdesc_type_up): Likewise.
11409         (tdesc_feature): Likewise.
11410         (tdesc_create_reg): Likewise.
11411
11412 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
11413
11414         * Makefile.in: Add arch/tdesc.c
11415         * common/tdesc.c: New file.
11416         * common/tdesc.h (tdesc_element_visitor): Move to here.
11417         (tdesc_element): Likewise.
11418         (tdesc_reg): Likewise.
11419         (tdesc_reg_up): Likewise.
11420         * regformats/regdef.h (reg): Add offset to constructors.
11421         * target-descriptions.c (tdesc_element_visitor): Move from here.
11422         (tdesc_element): Likewise.
11423         (tdesc_reg): Likewise.
11424         (tdesc_reg_up): Likewise.
11425
11426 2018-04-17  Tom Tromey  <tom@tromey.com>
11427
11428         * dwarf2read.c (quirk_rust_enum): Conditionally drop the
11429         discriminant field.
11430
11431 2018-04-17  Tom Tromey  <tom@tromey.com>
11432
11433         * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
11434
11435 2018-04-17  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11436
11437         * symtab.c (print_symbol_info): Skip printing filename and line
11438         number when `last' is NULL.
11439         (symtab_symbol_info): Use empty string instead of NULL for first
11440         invocation of print_symbol_info.
11441         (rbreak_command): Pass NULL to `last' parameter of
11442         print_symbol_info.
11443
11444 2018-04-16  Simon Marchi  <simon.marchi@ericsson.com>
11445
11446         * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
11447         instead of nullptr.
11448
11449 2018-04-16  Pedro Alves  <palves@redhat.com>
11450
11451         * MAINTAINERS (sh): Remove.
11452         * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
11453         (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
11454         (ALLDEPFILES): Remove sh64-tdep.c.
11455         * NEWS: Mentions that support for SH-5/SH64 is removed.
11456         * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
11457         (sh*-*-openbsd*): Ditto.
11458         (sh64-*-elf*): Remove.
11459         (sh*): Remove.
11460         * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
11461         * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
11462         * sh-tdep.c: No longer include "sh64-tdep.h".
11463         (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
11464         * sh64-tdep.c, sh64-tdep.h: Remove files.
11465
11466 2018-04-16  Pedro Alves  <palves@redhat.com>
11467
11468         * MAINTAINERS: Remove m88k.
11469         * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
11470         (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
11471         (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
11472         * NEWS: Mention that support for m88k was removed.
11473         * configure.host (m88*-*-*): Remove support.
11474         * configure.nat (m88k-*-*): Remove support.
11475         * configure.tgt (m88*-*-openbsd*): Remove.
11476         * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
11477
11478 2018-04-15  Simon Marchi  <simon.marchi@polymtl.ca>
11479
11480         * configure.tgt (x86_tobjs): New variable.
11481         (amd64_tobjs, i386_tobjs): Use it.
11482
11483 2018-04-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11484
11485         * symtab.c (print_symbol_info): Precede the symbol definition by
11486         the line number when available.
11487         * NEWS: Advertise this enhancement.
11488
11489 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
11490
11491         * NEWS (New options): announce set/show record btrace cpu.
11492         * btrace.c: Include record-btrace.h.
11493         (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
11494         the vendor is unknown.
11495         (btrace_compute_ftrace_1): Add cpu parameter.  Update callers.
11496         Maybe overwrite the btrace configuration's cpu.
11497         (btrace_compute_ftrace): Add cpu parameter.  Update callers.
11498         (btrace_fetch): Add cpu parameter.  Update callers.
11499         (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
11500         Maybe overwrite the btrace configuration's cpu.  Skip enabling
11501         errata workarounds if the vendor is unknown.
11502         * python/py-record-btrace.c: Include record-btrace.h.
11503         (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
11504         (recpy_bt_function_call_history): Call record_btrace_get_cpu.
11505         * record-btrace.c (record_btrace_cpu_state_kind): New.
11506         (record_btrace_cpu): New.
11507         (set_record_btrace_cpu_cmdlist): New.
11508         (record_btrace_get_cpu): New.
11509         (require_btrace_thread, record_btrace_info)
11510         (record_btrace_resume_thread): Call record_btrace_get_cpu.
11511         (cmd_set_record_btrace_cpu_none): New.
11512         (cmd_set_record_btrace_cpu_auto): New.
11513         (cmd_set_record_btrace_cpu): New.
11514         (cmd_show_record_btrace_cpu): New.
11515         (_initialize_record_btrace): Initialize set/show record btrace cpu
11516         commands.
11517         * record-btrace.h (record_btrace_get_cpu): New.
11518
11519 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
11520
11521         * record.c (set_record_command): Fix typo in message.
11522
11523 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
11524
11525         * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
11526
11527 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
11528
11529         * infrun.c (process_event_stop_test): Call
11530         gdbarch_in_indirect_branch_thunk.
11531         * gdbarch.sh (in_indirect_branch_thunk): New.
11532         * gdbarch.c: Regenerated.
11533         * gdbarch.h: Regenerated.
11534         * x86-tdep.h: New.
11535         * x86-tdep.c: New.
11536         * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
11537         (HFILES_NO_SRCDIR): Add x86-tdep.h.
11538         (ALLDEPFILES): Add x86-tdep.c.
11539         * arch-utils.h (default_in_indirect_branch_thunk): New.
11540         * arch-utils.c (default_in_indirect_branch_thunk): New.
11541         * i386-tdep: Include x86-tdep.h.
11542         (i386_in_indirect_branch_thunk): New.
11543         (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
11544         function.
11545         * amd64-tdep: Include x86-tdep.h.
11546         (amd64_in_indirect_branch_thunk): New.
11547         (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
11548
11549 2018-04-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
11550
11551         PR gdb/23053
11552         * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
11553         (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
11554         (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
11555         regression.
11556
11557 2018-04-12  Tom Tromey  <tom@tromey.com>
11558
11559         * rust-lang.c (rust_print_struct_def): Remove univariant code.
11560         (rust_evaluate_subexp): Likewise.
11561
11562 2018-04-12  Pedro Alves  <palves@redhat.com>
11563
11564         * procfs.c (procfs_detach): Make forward declaration's prototype
11565         match definition's protototype.
11566         (proc_get_LDT_entry): Remove stale do_cleanups call.
11567
11568 2018-04-12  Pedro Alves  <palves@redhat.com>
11569
11570         * target.h (target_ops::to_has_exited): Delete.
11571         (target_has_exited): Delete.
11572         * target-delegates.c: Regenerate.
11573
11574 2018-04-11  Pedro Alves  <palves@redhat.com>
11575
11576         * target.c (fileio_fh_t::t): Add comment.
11577         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
11578         (target_fileio_close): Handle a NULL target.
11579         (invalidate_fileio_fh): New.
11580         (target_close): Call it.
11581         * remote.c (remote_hostio_send_command): No longer check whether
11582         remote_desc is open.
11583
11584 2018-04-11  Pedro Alves  <palves@redhat.com>
11585
11586         * target.c (fileio_fh_t): Make it a named struct instead of a
11587         typedef.
11588         (fileio_fh_t::is_closed): New method.
11589         (DEF_VEC_O (fileio_fh_t)): Remove.
11590         (fileio_fhandles): Now a std::vector.
11591         (is_closed_fileio_fh): Delete.
11592         (acquire_fileio_fd): Adjust.  Rename parameters.
11593         (release_fileio_fd): Adjust.
11594         (fileio_fd_to_fh): Reimplement as a function instead of a macro.
11595         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
11596         (target_fileio_close): Adjust.
11597
11598 2018-04-10  Simon Marchi  <simon.marchi@ericsson.com>
11599
11600         * auto-load.c (auto_load_safe_path_vec_update): Iterate by
11601         index.
11602
11603 2018-04-10  Pedro Alves  <palves@redhat.com>
11604
11605         * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
11606         (scoped_finish_thread_state): New class.
11607         * infcmd.c (run_command_1): Use it instead of finish_thread_state
11608         cleanup.
11609         * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
11610         (fetch_inferior_event, normal_stop): Likewise.
11611         * thread.c (finish_thread_state_cleanup): Delete.
11612
11613 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11614             Pedro Alves  <palves@redhat.com>
11615
11616         * value.c: Include "selftest.h" and "common/array-view.h".
11617         (struct range) <operator ==>: New.
11618         (test_ranges_contain): New.
11619         (check_ranges_vector): New.
11620         (test_insert_into_bit_range_vector): New.
11621         (_initialize_values): Register selftests.
11622         * common/array-view.h (operator==, operator!=): New.
11623
11624 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11625
11626         * common/gdb_vecs.h (unordered_remove): Add overload that takes
11627         an iterator.
11628         * inline-frame.c: Include <algorithm>.
11629         (struct inline_state): Add constructor.
11630         (inline_state_s): Remove.
11631         (DEF_VEC_O(inline_state_s)): Remove.
11632         (inline_states): Change type to std::vector.
11633         (find_inline_frame_state): Adjust to std::vector.
11634         (allocate_inline_frame_state): Remove.
11635         (clear_inline_frame_state): Adjust to std::vector.
11636         (skip_inline_frames): Adjust to std::vector.
11637
11638 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11639
11640         * tracepoint.h (struct trace_state_variable): Add constructor.
11641         <name>: Change type to std::string.
11642         * tracepoint.c (tsv_s): Remove.
11643         (DEF_VEC_O(tsv_s)): Remove.
11644         (tvariables): Change to std::vector.
11645         (create_trace_state_variable): Adjust to std::vector.
11646         (find_trace_state_variable): Likewise.
11647         (find_trace_state_variable_by_number): Likewise.
11648         (delete_trace_state_variable): Likewise.
11649         (trace_variable_command): Adjust to std::string.
11650         (delete_trace_variable_command): Likewise.
11651         (tvariables_info_1): Adjust to std::vector.
11652         (save_trace_state_variables): Likewise.
11653         (start_tracing): Likewise.
11654         (merge_uploaded_trace_state_variables): Adjust to std::vector
11655         and std::string.
11656         * target.h (struct target_ops)
11657         <to_download_trace_state_variable>: Pass reference to
11658         trace_state_variable.
11659         * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
11660         * target-delegates.c: Re-generate.
11661         * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
11662         (mi_tsv_deleted): Likewise.
11663         * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
11664         * remote.c (remote_download_trace_state_variable): Change
11665         pointer to reference and adjust.
11666         * make-target-delegates (parse_argtypes): Handle references.
11667         (write_function_header): Likewise.
11668         (munge_type): Likewise.
11669
11670 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11671
11672         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11673         string_view-selftests.c.
11674         * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
11675         testsuite.
11676         * unittests/basic_string_view/cons/char/1.cc: Likewise.
11677         * unittests/basic_string_view/cons/char/2.cc: Likewise.
11678         * unittests/basic_string_view/cons/char/3.cc: Likewise.
11679         * unittests/basic_string_view/element_access/char/1.cc:
11680         Likewise.
11681         * unittests/basic_string_view/element_access/char/empty.cc:
11682         Likewise.
11683         * unittests/basic_string_view/element_access/char/front_back.cc:
11684         Likewise.
11685         * unittests/basic_string_view/inserters/char/2.cc: Likewise.
11686         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
11687         Likewise.
11688         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
11689         Likewise.
11690         * unittests/basic_string_view/modifiers/swap/char/1.cc:
11691         Likewise.
11692         * unittests/basic_string_view/operations/compare/char/1.cc:
11693         Likewise.
11694         * unittests/basic_string_view/operations/compare/char/13650.cc:
11695         Likewise.
11696         * unittests/basic_string_view/operations/copy/char/1.cc:
11697         Likewise.
11698         * unittests/basic_string_view/operations/data/char/1.cc:
11699         Likewise.
11700         * unittests/basic_string_view/operations/find/char/1.cc:
11701         Likewise.
11702         * unittests/basic_string_view/operations/find/char/2.cc:
11703         Likewise.
11704         * unittests/basic_string_view/operations/find/char/3.cc:
11705         Likewise.
11706         * unittests/basic_string_view/operations/find/char/4.cc:
11707         Likewise.
11708         * unittests/basic_string_view/operations/rfind/char/1.cc:
11709         Likewise.
11710         * unittests/basic_string_view/operations/rfind/char/2.cc:
11711         Likewise.
11712         * unittests/basic_string_view/operations/rfind/char/3.cc:
11713         Likewise.
11714         * unittests/basic_string_view/operations/substr/char/1.cc:
11715         Likewise.
11716         * unittests/basic_string_view/operators/char/2.cc: Likewise.
11717         * unittests/string_view-selftests.c: New file.
11718
11719 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11720
11721         * unittests/basic_string_view/capacity/1.cc: New file.
11722         * unittests/basic_string_view/capacity/empty_neg.cc: New file.
11723         * unittests/basic_string_view/cons/char/1.cc: New file.
11724         * unittests/basic_string_view/cons/char/2.cc: New file.
11725         * unittests/basic_string_view/cons/char/3.cc: New file.
11726         * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
11727         * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
11728         * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
11729         * unittests/basic_string_view/element_access/char/1.cc: New file.
11730         * unittests/basic_string_view/element_access/char/2.cc: New file.
11731         * unittests/basic_string_view/element_access/char/empty.cc: New file.
11732         * unittests/basic_string_view/element_access/char/front_back.cc: New file.
11733         * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
11734         * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
11735         * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
11736         * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
11737         * unittests/basic_string_view/include.cc: New file.
11738         * unittests/basic_string_view/inserters/char/1.cc: New file.
11739         * unittests/basic_string_view/inserters/char/2.cc: New file.
11740         * unittests/basic_string_view/inserters/char/3.cc: New file.
11741         * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
11742         * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
11743         * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
11744         * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
11745         * unittests/basic_string_view/literals/types.cc: New file.
11746         * unittests/basic_string_view/literals/values.cc: New file.
11747         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
11748         * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
11749         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
11750         * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
11751         * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
11752         * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
11753         * unittests/basic_string_view/operations/compare/char/1.cc: New file.
11754         * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
11755         * unittests/basic_string_view/operations/compare/char/2.cc: New file.
11756         * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
11757         * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
11758         * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
11759         * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
11760         * unittests/basic_string_view/operations/copy/char/1.cc: New file.
11761         * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
11762         * unittests/basic_string_view/operations/data/char/1.cc: New file.
11763         * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
11764         * unittests/basic_string_view/operations/find/char/1.cc: New file.
11765         * unittests/basic_string_view/operations/find/char/2.cc: New file.
11766         * unittests/basic_string_view/operations/find/char/3.cc: New file.
11767         * unittests/basic_string_view/operations/find/char/4.cc: New file.
11768         * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
11769         * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
11770         * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
11771         * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
11772         * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
11773         * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
11774         * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
11775         * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
11776         * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
11777         * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
11778         * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
11779         * unittests/basic_string_view/operations/substr/char/1.cc: New file.
11780         * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
11781         * unittests/basic_string_view/operators/char/2.cc: New file.
11782         * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
11783         * unittests/basic_string_view/range_access/char/1.cc: New file.
11784         * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
11785         * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
11786         * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
11787         * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
11788         * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
11789         * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
11790         * unittests/basic_string_view/requirements/typedefs.cc: New file.
11791         * unittests/basic_string_view/typedefs.cc: New file.
11792         * unittests/basic_string_view/types/1.cc: New file.
11793
11794 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11795
11796         * common/gdb_string_view.h: Remove libstdc++ implementation
11797         details, adjust to gdb reality.
11798         * common/gdb_string_view.tcc: Likewise.
11799         * cli/cli-script.c (struct string_view): Remove.
11800         (user_args) <m_args>: Change element type to gdb::string_view.
11801         (user_args::insert_args): Adjust.
11802
11803 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11804
11805         * common/gdb_string_view.h: New file.
11806         * common/gdb_string_view.tcc: New file.
11807
11808 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11809
11810         * ax_cxx_compile_stdcxx.m4: Sync with upstream.
11811         * configure: Re-generate.
11812
11813 2018-04-09  Pedro Alves  <palves@redhat.com>
11814
11815         * gdbarch.sh: Include "observable.h" instead of "observer.h".
11816         (set_target_gdbarch): Call
11817         gdb::observers::architecture_changed.notify instead of
11818         observer_notify_architecture_changed.
11819
11820 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11821
11822         * tracepoint.c (struct current_traceframe_cleanup): Remove.
11823         (do_restore_current_traceframe_cleanup): Remove.
11824         (restore_current_traceframe_cleanup_dtor): Remove.
11825         (make_cleanup_restore_current_traceframe): Remove.
11826         (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
11827         New.
11828         * tracepoint.h (struct scoped_restore_current_traceframe): New.
11829         * infrun.c (fetch_inferior_event): Use
11830         scoped_restore_current_traceframe.
11831
11832 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11833
11834         * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
11835         Remove.
11836         <n_allocated_type_units>: Remove.
11837         <all_type_units>: Change to std::vector.
11838         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
11839         to std::vector change.
11840         (dwarf2_per_objfile::get_cutu): Likewise.
11841         (dwarf2_per_objfile::get_tu): Likewise.
11842         (create_signatured_type_table_from_index): Likewise.
11843         (create_signatured_type_table_from_debug_names): Likewise.
11844         (dw2_symtab_iter_next): Likewise.
11845         (dw2_print_stats): Likewise.
11846         (dw2_expand_all_symtabs): Likewise.
11847         (dw2_expand_marked_cus): Likewise.
11848         (dw2_debug_names_iterator::next): Likewise.
11849         (dwarf2_initialize_objfile): Likewise.
11850         (add_signatured_type_cu_to_table): Likewise.
11851         (create_all_type_units): Likewise.
11852         (add_type_unit): Likewise.
11853         (struct tu_abbrev_offset): Add constructor.
11854         (build_type_psymtabs_1): Adjust to std::vector change.
11855         (print_tu_stats): Likewise.
11856         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
11857         (write_debug_names): Likewise.
11858
11859 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11860
11861         * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
11862         Make an std::vector.
11863         <n_comp_units>: Remove.
11864         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
11865         to std::vector change.
11866         (dwarf2_per_objfile::get_cutu): Likewise.
11867         (dwarf2_per_objfile::get_cu): Likewise.
11868         (create_cus_from_index): Likewise.
11869         (create_addrmap_from_index): Likewise.
11870         (create_addrmap_from_aranges): Likewise.
11871         (dwarf2_read_index): Likewise.
11872         (dw2_find_last_source_symtab): Likewise.
11873         (dw2_map_symtabs_matching_filename): Likewise.
11874         (dw2_symtab_iter_next): Likewise.
11875         (dw2_print_stats): Likewise.
11876         (dw2_expand_all_symtabs): Likewise.
11877         (dw2_expand_symtabs_with_fullname): Likewise.
11878         (dw2_expand_marked_cus): Likewise.
11879         (dw2_map_symbol_filenames): Likewise.
11880         (create_cus_from_debug_names): Likewise.
11881         (dwarf2_read_debug_names): Likewise.
11882         (dw2_debug_names_iterator::next): Likewise.
11883         (dwarf2_initialize_objfile): Likewise.
11884         (set_partial_user): Likewise.
11885         (dwarf2_build_psymtabs_hard): Likewise.
11886         (read_comp_units_from_section): Remove arguments, adjust to
11887         std::vector change.
11888         (create_all_comp_units): Adjust to std::vector and
11889         read_comp_units_from_section changes.
11890         (dwarf2_find_containing_comp_unit): Adjust to std::vector
11891         change.
11892         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
11893         (psyms_seen_size): Likewise.
11894         (write_gdbindex): Likewise.
11895         (write_debug_names): Likewise.
11896
11897 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11898
11899         * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
11900         with dwarf2_per_objfile.
11901         (create_cus_from_index): Likewise.
11902         (create_signatured_type_table_from_index): Likewise.
11903         (dwarf2_read_index): Likewise.
11904         (dwarf2_initialize_objfile): Likewise.
11905         (dwarf2_fetch_die_loc_sect_off):  Get dwarf2_per_objfile from
11906         per_cu rather than get_dwarf2_per_objfile.
11907
11908 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11909
11910         * dwarf2read.h (struct signatured_type): Forward declare.
11911         (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
11912         New methods.
11913         * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
11914         (dw2_get_cutu): ...this.
11915         (dwarf2_per_objfile::get_cu): Rename from...
11916         (dw2_get_cu): ...this.
11917         (dwarf2_per_objfile::get_tu): New.
11918         (create_addrmap_from_index): Adjust.
11919         (create_addrmap_from_aranges): Adjust.
11920         (dw2_find_last_source_symtab): Adjust.
11921         (dw2_map_symtabs_matching_filename): Adjust.
11922         (dw2_symtab_iter_next): Adjust.
11923         (dw2_print_stats): Adjust.
11924         (dw2_expand_all_symtabs): Adjust.
11925         (dw2_expand_symtabs_with_fullname): Adjust.
11926         (dw2_expand_marked_cus): Adjust.
11927         (dw_expand_symtabs_matching_file_matcher): Adjust.
11928         (dw2_map_symbol_filenames): Adjust.
11929         (dw2_debug_names_iterator::next): Adjust.
11930         (dwarf2_initialize_objfile): Adjust.
11931         (set_partial_user): Adjust.
11932         (dwarf2_build_psymtabs_hard): Adjust.
11933
11934 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11935
11936         * dwarf2read.c (create_signatured_type_table_from_debug_names):
11937         Remove unused variables.
11938         (dw2_map_symtabs_matching_filename): Likewise.
11939         (dwarf2_record_block_ranges): Likewise.
11940         (dwarf2_read_addr_index): Likewise.
11941         (follow_die_offset): Likewise.
11942
11943 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11944
11945         * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
11946         to symbol_file_add_main.
11947
11948 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11949
11950         PR mi/22299
11951         * mi/mi-console.c (do_fputc_async_safe): New.
11952         (mi_console_file::write_async_safe): New.
11953         (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
11954         * mi/mi-console.h (class mi_console_file) <write_async_safe>:
11955         New.
11956         * ui-file.c (ui_file::putstrn): Adjust call to
11957         fputstrn_unfiltered.
11958         * utils.c (printchar): Replace do_fputs and do_fprintf
11959         parameters by do_fputc.
11960         (fputstr_filtered): Adjust call to printchar.
11961         (fputstr_unfiltered): Likewise.
11962         (fputstrn_filtered): Likewise.
11963         (fputstrn_unfiltered): Add do_fputc parameter, pass to
11964         printchar.
11965         * utils.h (do_fputc_ftype): New typedef.
11966         (fputstrn_unfiltered): Add do_fputc parameter.
11967
11968 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11969
11970         * regformats/i386/i386-avx.dat: Remove.
11971
11972 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
11973
11974         PR gdb/22979
11975         * amd64-tdep.c (amd64_none_init_abi): New function.
11976         (amd64_x32_none_init_abi): New function.
11977         (_initialize_amd64_tdep): Register handlers for x86-64 and
11978         x64_32 with GDB_OSABI_NONE.
11979         * osabi.c (gdbarch_init_osabi): Allow running handlers for the
11980         GDB_OSABI_NONE osabi.
11981
11982 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
11983
11984         PR gdb/22980
11985         * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
11986         GDB_OSABI_NONE.
11987         * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
11988         * osabi.c (gdb_osabi_names): Add "unknown" entry.
11989
11990 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
11991
11992         * common/byte-vector.h (char_vector): New type.
11993         * target.h (target_read_alloc): Return
11994         gdb::optional<byte_vector>.
11995         (target_read_stralloc): Return gdb::optional<char_vector>.
11996         (target_get_osdata): Return gdb::optional<char_vector>.
11997         * target.c (target_read_alloc_1): Templatize.  Replacement
11998         manual memory management with vector.
11999         (target_read_alloc): Change return type, adjust.
12000         (target_read_stralloc): Change return type, adjust.
12001         (target_get_osdata): Change return type, adjust.
12002         * auxv.c (struct auxv_info) <length>: Remove.
12003         <data>: Change type to gdb::optional<byte_vector>.
12004         (auxv_inferior_data_cleanup): Free auxv_info with delete.
12005         (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
12006         (target_auxv_search): Adjust.
12007         (fprint_target_auxv): Adjust.
12008         * avr-tdep.c (avr_io_reg_read_command): Adjust.
12009         * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
12010         (linux_make_corefile_notes): Adjust.
12011         * osdata.c (get_osdata): Adjust.
12012         * remote.c (remote_get_threads_with_qxfer): Adjust.
12013         (remote_memory_map): Adjust.
12014         (remote_traceframe_info): Adjust.
12015         (btrace_read_config): Adjust.
12016         (remote_read_btrace): Adjust.
12017         (remote_pid_to_exec_file): Adjust.
12018         * solib-aix.c (solib_aix_get_library_list): Adjust.
12019         * solib-dsbt.c (decode_loadmap): Don't free buf.
12020         (dsbt_get_initial_loadmaps): Adjust.
12021         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
12022         * solib-target.c (solib_target_current_sos): Adjust.
12023         * tracepoint.c (sdata_make_value): Adjust.
12024         * xml-support.c (xinclude_start_include): Adjust.
12025         (xml_fetch_content_from_file): Adjust.
12026         * xml-support.h (xml_fetch_another): Change return type.
12027         (xml_fetch_content_from_file): Change return type.
12028         * xml-syscall.c (xml_init_syscalls_info): Adjust.
12029         * xml-tdesc.c (file_read_description_xml): Adjust.
12030         (fetch_available_features_from_target): Change return type.
12031         (target_fetch_description_xml): Adjust.
12032         (target_read_description_xml): Adjust.
12033
12034 2018-04-06  Tom Tromey  <tom@tromey.com>
12035
12036         * value.c (~value): Update.
12037         (struct value) <contents>: Now unique_xmalloc_ptr.
12038         (value_contents_bits_eq, allocate_value_contents)
12039         (value_contents_raw, value_contents_all_raw)
12040         (value_contents_for_printing, value_contents_for_printing_const)
12041         (set_value_enclosing_type): Update.
12042
12043 2018-04-06  Tom Tromey  <tom@tromey.com>
12044
12045         * value.c (range_s): Remove typedef, VEC.
12046         (struct range): Add operator<.
12047         (range_lessthan): Remove.
12048         (ranges_contain): Change type.
12049         (~value): Update.
12050         (struct value) <unavailable, optimized_out>: Now std::vector.
12051         (value_entirely_available)
12052         (value_entirely_covered_by_range_vector)
12053         (value_entirely_unavailable, value_entirely_optimized_out):
12054         Update.
12055         (insert_into_bit_range_vector): Change argument type.
12056         (find_first_range_overlap): Likewise.
12057         (struct ranges_and_idx, value_contents_bits_eq)
12058         (require_not_optimized_out, require_available): Update.
12059         (ranges_copy_adjusted): Change argument types.
12060         (value_optimized_out, value_copy, value_fetch_lazy): Update.
12061
12062 2018-04-06  Tom Tromey  <tom@tromey.com>
12063
12064         * value.c (~value): Update.
12065         (struct value) <parent>: Now a value_ref_ptr.
12066         (value_parent, set_value_parent, value_address, value_copy):
12067         Update.
12068
12069 2018-04-06  Tom Tromey  <tom@tromey.com>
12070
12071         * value.c (struct value): Add constructor, destructor, and member
12072         initializers.
12073         (allocate_value_lazy, value_decref): Update.
12074
12075 2018-04-06  Tom Tromey  <tom@tromey.com>
12076
12077         * value.c (struct value) <released, next>: Remove.
12078         (all_values): Now a std::vector.
12079         (allocate_value_lazy): Update.
12080         (value_next): Remove.
12081         (value_mark, value_free_to_mark, release_value)
12082         (value_release_to_mark): Update.
12083
12084 2018-04-06  Tom Tromey  <tom@tromey.com>
12085
12086         * value.h (fetch_subexp_value, value_release_to_mark): Update.
12087         (free_value_chain): Remove.
12088         * value.c (free_value_chain): Remove.
12089         (value_release_to_mark): Return a std::vector.
12090         * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
12091         std::vector.
12092         (check_condition): Update.
12093         * eval.c (fetch_subexp_value): Change "val_chain" to a
12094         std::vector.
12095         * breakpoint.c (update_watchpoint): Update.
12096         (can_use_hardware_watchpoint): Change "vals" to a std::vector.
12097
12098 2018-04-06  Tom Tromey  <tom@tromey.com>
12099
12100         * value.h (free_all_values): Remove.
12101         * value.c (free_all_values): Remove.
12102
12103 2018-04-06  Tom Tromey  <tom@tromey.com>
12104
12105         * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
12106         (value_history_chain, value_history_count): Remove.
12107         (value_history): New global.
12108         (record_latest_value, access_value_history, show_values)
12109         (preserve_values): Update.
12110
12111 2018-04-06  Tom Tromey  <tom@tromey.com>
12112
12113         * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
12114         * varobj.c (varobj_set_display_format, varobj_set_value)
12115         (install_default_visualizer, construct_visualizer)
12116         (install_new_value, ~varobj, varobj_get_value_type)
12117         (my_value_of_variable, varobj_editable_p): Update.
12118         * c-varobj.c (c_describe_child, c_value_of_variable)
12119         (cplus_number_of_children, cplus_describe_child): Update.
12120         * ada-varobj.c (ada_number_of_children, ada_name_of_child)
12121         (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
12122         (ada_value_of_variable, ada_value_is_changeable_p): Update.
12123
12124 2018-04-06  Tom Tromey  <tom@tromey.com>
12125
12126         * printcmd.c (last_examine_address): Change type to
12127         value_ref_ptr.
12128         (do_examine, x_command): Update.
12129
12130 2018-04-06  Tom Tromey  <tom@tromey.com>
12131
12132         * value.c (release_value): Update.
12133         * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
12134         (struct bpstats) <val>: Now a value_ref_ptr.
12135         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
12136         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
12137         (~watchpoint, print_it_watchpoint, watch_command_1)
12138         (invalidate_bp_value_on_memory_change): Update.
12139
12140 2018-04-06  Tom Tromey  <tom@tromey.com>
12141
12142         * varobj.c (varobj_clear_saved_item)
12143         (update_dynamic_varobj_children, install_new_value, ~varobj):
12144         Update.
12145         * value.h (value_incref): Move declaration earlier.
12146         (value_decref): Rename from value_free.
12147         (struct value_ref_policy): New.
12148         (value_ref_ptr): New typedef.
12149         (struct value_deleter): Remove.
12150         (gdb_value_up): Remove typedef.
12151         (release_value): Change return type.
12152         (release_value_or_incref): Remove.
12153         * value.c (set_value_parent): Update.
12154         (value_incref): Change return type.
12155         (value_decref): Rename from value_free.
12156         (value_free_to_mark, free_all_values, free_value_chain): Update.
12157         (release_value): Return value_ref_ptr.
12158         (release_value_or_incref): Remove.
12159         (record_latest_value, set_internalvar, clear_internalvar):
12160         Update.
12161         * stack.c (info_frame_command): Don't call value_free.
12162         * python/py-value.c (valpy_dealloc, valpy_new)
12163         (value_to_value_object): Update.
12164         * printcmd.c (do_examine): Update.
12165         * opencl-lang.c (lval_func_free_closure): Update.
12166         * mi/mi-main.c (register_changed_p): Don't call value_free.
12167         * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
12168         * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
12169         * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
12170         value_free.
12171         * guile/scm-value.c (vlscm_free_value_smob)
12172         (vlscm_scm_from_value): Update.
12173         * frame.c (frame_register_unwind, frame_unwind_register_signed)
12174         (frame_unwind_register_unsigned, get_frame_register_bytes)
12175         (put_frame_register_bytes): Don't call value_free.
12176         * findvar.c (address_from_register): Don't call value_free.
12177         * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
12178         * dwarf2loc.c (entry_data_value_free_closure)
12179         (value_of_dwarf_reg_entry, free_pieced_value_closure)
12180         (dwarf2_evaluate_loc_desc_full): Update.
12181         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
12182         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
12183         (~watchpoint, watch_command_1)
12184         (invalidate_bp_value_on_memory_change): Update.
12185         * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
12186
12187 2018-04-06  Simon Marchi  <simon.marchi@polymtl.ca>
12188
12189         PR gdb/23022
12190         * warning.m4: Add -Wno-error=deprecated-register.
12191         * configure: Re-generate.
12192
12193 2018-04-05  Tom Tromey  <tom@tromey.com>
12194
12195         * linespec.h: Remove include of "vec.h".
12196
12197 2018-04-05  Tom Tromey  <tom@tromey.com>
12198
12199         * linespec.c (typep): Remove typedef.
12200         (find_methods, find_superclass_methods): Take a std::vector.
12201         (find_method): Use std::vector.
12202
12203 2018-04-05  Tom Tromey  <tom@tromey.com>
12204
12205         * utils.c (compare_strings): Remove.
12206         * utils.h (compare_strings): Remove.
12207         * objc-lang.h (find_imps): Update.
12208         * objc-lang.c (find_methods): Take a std::vector.
12209         (uniquify_strings, find_imps): Likewise.
12210         * linespec.c (find_methods): Take a std::vector.
12211         (decode_objc): Use std::vector.
12212         (add_all_symbol_names_from_pspace, find_superclass_methods): Take
12213         a std::vector.
12214         (find_method, find_function_symbols): Use std::vector.
12215
12216 2018-04-05  Tom Tromey  <tom@tromey.com>
12217
12218         * completer.c (completion_tracker::completion_tracker): Remove
12219         cast.
12220         (completion_tracker::discard_completions): Likewise.
12221         * breakpoint.c (ambiguous_names_p): Remove cast.
12222         * ada-lang.c (_initialize_ada_language): Remove cast.
12223         * utils.h (streq): Update.
12224         (streq_hash): Add new declaration.
12225         * utils.c (streq): Return bool.
12226         (streq_hash): New function.
12227
12228 2018-04-05  Tom Tromey  <tom@tromey.com>
12229
12230         * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
12231         Remove a string copy.
12232
12233 2018-04-05  Tom Tromey  <tom@tromey.com>
12234
12235         * linespec.c (filter_results): Use std::vector.
12236         (decode_line_2, decode_line_full): Update.
12237
12238 2018-04-05  Tom Tromey  <tom@tromey.com>
12239
12240         * linespec.c (canonical_to_fullform): Return std::string.
12241         (filter_results): Update.
12242         (struct decode_line_2_item): Add constructor.
12243         <fullform, displayform>: Now std::string.
12244         (decode_line_2_compare_items): Now a std::sort comparator.
12245         (decode_line_2): Update.
12246
12247 2018-04-05  Tom Tromey  <tom@tromey.com>
12248
12249         * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
12250         (unexpected_linespec_error): Update.
12251         (linespec_parse_basic, parse_linespec): Update.
12252
12253 2018-04-05  Tom Tromey  <tom@tromey.com>
12254
12255         * linespec.c (linespec_parse_basic): Reindent.
12256
12257 2018-04-05  Tom Tromey  <tom@tromey.com>
12258
12259         * minsyms.h (iterate_over_minimal_symbols): Update.
12260         * minsyms.c (iterate_over_minimal_symbols): Take a
12261         gdb::function_view.
12262         * linespec.c (struct collect_minsyms): Remove.
12263         (compare_msyms): Now a std::sort comparator.
12264         (add_minsym): Add parameters.
12265         (search_minsyms_for_name): Update.  Use std::vector.
12266
12267 2018-04-03  Tom Tromey  <tom@tromey.com>
12268
12269         * mipsread.c (read_alphacoff_dynamic_symtab): Use
12270         gdb::byte_vector.
12271
12272 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
12273
12274         * MAINTAINERS (Write After Approval): Add Weimin Pan.
12275
12276 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
12277
12278         PR gdb/16959
12279         * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when 
12280         printing static type.
12281
12282 2018-04-01  Tom Tromey  <tom@tromey.com>
12283
12284         * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
12285         (rs6000_xfer_shared_libraries): Update.
12286
12287 2018-04-01  Simon Marchi  <simon.marchi@polymtl.ca>
12288
12289         * common/gdb_vecs.h (char_ptr): Remove.
12290         * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
12291
12292 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
12293
12294         * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
12295         with std::vector.
12296         * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
12297
12298 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
12299
12300         * tracepoint.h (struct uploaded_tp): Initialize fields.
12301         <actions, step_actions, cmd_strings>: Change type to
12302         std::vector<char *>.
12303         * tracepoint.c (get_uploaded_tp): Allocate with new.
12304         (free_uploaded_tps): Free with delete.
12305         (parse_tracepoint_definition): Adjust to std::vector change.
12306         * breakpoint.c (read_uploaded_action): Likewise.
12307         (create_tracepoint_from_upload): Likewise.
12308         * ctf.c (ctf_write_uploaded_tp): Likewise.
12309         (SET_ARRAY_FIELD): Likewise.
12310         * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
12311
12312 2018-03-30  Tom Tromey  <tom@tromey.com>
12313
12314         * solib-svr4.c (lm_info_read): Use gdb::byte_vector.  Return
12315         std::unique_ptr.
12316         (svr4_keep_data_in_core): Update.
12317         (svr4_read_so_list): Update.
12318
12319 2018-03-30  Tom Tromey  <tom@tromey.com>
12320
12321         * windows-nat.c (handle_output_debug_string, handle_exception):
12322         Update.
12323         * target.h (target_read_string): Update.
12324         * target.c (target_read_string): Change "string" to
12325         unique_xmalloc_ptr.
12326         * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
12327         Update.
12328         * solib-frv.c (frv_current_sos): Update.
12329         * solib-dsbt.c (dsbt_current_sos): Update.
12330         * solib-darwin.c (darwin_current_sos): Update.
12331         * linux-thread-db.c (inferior_has_bug): Update.
12332         * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
12333         Update.  Remove alloca.
12334         * ada-lang.c (ada_main_name): Update.
12335
12336 2018-03-30  Tom Tromey  <tom@tromey.com>
12337
12338         * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
12339         (struct dwo_file_deleter): New.
12340         (dwo_file_up): New typedef.
12341         (open_and_init_dwo_file): Use dwo_file_up.
12342         (free_dwo_file_cleanup): Remove.
12343
12344 2018-03-30  Tom Tromey  <tom@tromey.com>
12345
12346         * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
12347         (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
12348
12349 2018-03-30  Tom Tromey  <tom@tromey.com>
12350
12351         * dwarf2read.c (class free_cached_comp_units): New class.
12352         (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
12353         (free_cached_comp_units): Remove function.
12354
12355 2018-03-30  Tom Tromey  <tom@tromey.com>
12356
12357         * utils.h (make_cleanup_unpush_target): Remove.
12358         * inf-ptrace.c (struct target_unpusher): New.
12359         (target_unpush_up) New typedef.
12360         (inf_ptrace_create_inferior, inf_ptrace_attach): Use
12361         target_unpush_up.
12362         * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
12363
12364 2018-03-27  Tom Tromey  <tom@tromey.com>
12365
12366         * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
12367
12368 2018-03-27  Pedro Alves  <palves@redhat.com>
12369             Tom Tromey  <tom@tromey.com>
12370
12371         * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
12372         destructor.  Now a class.
12373         (gdb_readline_wrapper_cleanup): Remove function.
12374         (gdb_readline_wrapper): Remove cleanups.
12375
12376 2018-03-27  Tom Tromey  <tom@tromey.com>
12377
12378         * typeprint.h (struct type_print_options) <local_typedefs,
12379         global_typedefs>: Remove "struct" keyword.
12380         (class typedef_hash_table): New class.
12381         (recursively_update_typedef_hash, add_template_parameters)
12382         (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
12383         (find_typedef_in_hash): Don't declare.
12384         * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
12385         (typedef_hash_table::recursively_update): Rename from
12386         recursively_update_typedef_hash.  Now a member.
12387         (typedef_hash_table::add_template_parameters): Rename from
12388         add_template_parameters.  Now a member.
12389         (typedef_hash_table::typedef_hash_table): Now a constructor;
12390         rename from create_typedef_hash.
12391         (typedef_hash_table::~typedef_hash_table): Now a destructor;
12392         rename from free_typedef_hash.
12393         (do_free_typedef_hash, make_cleanup_free_typedef_hash)
12394         (do_free_global_table): Remove.
12395         (typedef_hash_table::typedef_hash_table): New constructor; renamed
12396         from copy_type_recursive.
12397         (create_global_typedef_table): Remove.
12398         (typedef_hash_table::find_global_typedef): Now a member of
12399         typedef_hash_table.
12400         (typedef_hash_table::find_typedef): Rename from
12401         find_typedef_in_hash; now a member.
12402         (whatis_exp): Update.
12403         * extension.h (struct ext_lang_type_printers): Add constructor and
12404         destructor.
12405         (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
12406         declare.
12407         * extension.c (ext_lang_type_printers::ext_lang_type_printers):
12408         Now a constructor; rename from start_ext_lang_type_printers.
12409         (ext_lang_type_printers): Now a destructor; rename from
12410         free_ext_lang_type_printers.
12411         * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
12412         Update.
12413         (c_type_print_base_struct_union): Update.  Remove cleanups.
12414
12415 2018-03-27  Tom Tromey  <tom@tromey.com>
12416
12417         * dwarf-index-write.c: Include <cmath>.
12418
12419 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
12420
12421         * NEWS: Add entry describing new "set|show varsize-limit" command.
12422         * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
12423         command.
12424         * printcmd.c (_initialize_printcmd): Add "set var" alias of
12425         "set variable".
12426
12427 2018-03-27  Simon Marchi  <simon.marchi@ericsson.com>
12428
12429         * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
12430         dwarf-index-write.c
12431         (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
12432         * dwarf-index-common.c: New file.
12433         * dwarf-index-common.h: New file.
12434         * dwarf-index-write.c: New file.
12435         * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
12436         (struct dwarf2_section_info): Move from here.
12437         (dwarf2_section_info_def): Likewise.
12438         (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
12439         (offset_type): Likewise.
12440         (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
12441         (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
12442         (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
12443         (byte_swap): Likewise.
12444         (MAYBE_SWAP): Likewise.
12445         (dwarf2_per_cu_ptr): Likewise.
12446         (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
12447         (struct tu_stats): Likewise.
12448         (struct dwarf2_per_objfile): Likewise.
12449         (struct dwarf2_per_cu_data): Likewise.
12450         (struct signatured_type): Likewise.
12451         (sig_type_ptr): Likewise.
12452         (DEF_VEC_P (sig_type_ptr)): Likewise.
12453         (INDEX4_SUFFIX): Likewise.
12454         (INDEX5_SUFFIX): Likewise.
12455         (DEBUG_STR_SUFFIX): Likewise.
12456         (dwarf2_read_section): Make non-static.
12457         (mapped_index_string_hash): Move from here.
12458         (dwarf5_djb_hash): Likewise.
12459         (file_write): Likewise.
12460         (class data_buf): Likewise.
12461         (struct symtab_index_entry): Likewise.
12462         (struct mapped_symtab): Likewise.
12463         (find_slot): Likewise.
12464         (hash_expand): Likewise.
12465         (add_index_entry): Likewise.
12466         (uniquify_cu_indices): Likewise.
12467         (class c_str_view): Likewise.
12468         (class c_str_view_hasher): Likewise.
12469         (class vector_hasher): Likewise.
12470         (write_hash_table): Likewise.
12471         (psym_index_map): Likewise.
12472         (struct addrmap_index_data): Likewise.
12473         (add_address_entry): Likewise.
12474         (add_address_entry_worker): Likewise.
12475         (write_address_map): Likewise.
12476         (symbol_kind): Likewise.
12477         (write_psymbols): Likewise.
12478         (struct signatured_type_index_data): Likewise.
12479         (write_one_signatured_type): Likewise.
12480         (recursively_count_psymbols): Likewise.
12481         (recursively_write_psymbols): Likewise.
12482         (class debug_names): Likewise.
12483         (check_dwarf64_offsets): Likewise.
12484         (psyms_seen_size): Likewise.
12485         (write_gdbindex): Likewise.
12486         (write_debug_names): Likewise.
12487         (assert_file_size): Likewise.
12488         (write_psymtabs_to_index): Likewise.
12489         (save_gdb_index_command): Likewise.
12490         (_initialize_dwarf2_read): Don't register the "save gdb-index"
12491         command.
12492         * dwarf2read.h: New file.
12493
12494 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
12495
12496         PR gdb/22670
12497         * dwarf2read.c (dwarf2_physname): Do not return the demangled
12498         symbol name if the CU's language stores symbol names in linkage
12499         format.
12500         * language.h (struct language_defn)
12501         <la_store_sym_names_in_linkage_form_p>: New field.  Adjust
12502         all instances of this struct.
12503
12504 2018-03-26  Tom Tromey  <tom@tromey.com>
12505
12506         * stack.c (backtrace_command_1): Remove verbose code.
12507
12508 2018-03-26  Tom Tromey  <tom@tromey.com>
12509
12510         * python/py-framefilter.c (py_print_type): Don't catch
12511         exceptions.  Return void.
12512         (py_print_value): Likewise.
12513         (py_print_single_arg): Likewise.
12514         (enumerate_args): Don't catch exceptions.
12515         (py_print_args): Likewise.
12516         (py_print_frame): Likewise.
12517         (gdbpy_apply_frame_filter): Catch exceptions here.
12518
12519 2018-03-26  Tom Tromey  <tom@tromey.com>
12520
12521         * stack.c (_initialize_stack): Remove trailing newlines from help
12522         text.  Add "Usage" line to "backtrace" help.
12523
12524 2018-03-26  Tom Tromey  <tom@tromey.com>
12525
12526         PR python/16486:
12527         * python/py-framefilter.c (py_print_args): Call wrap_hint.
12528
12529 2018-03-26  Tom Tromey  <tom@tromey.com>
12530
12531         * python/py-framefilter.c (py_print_single_arg): Return
12532         EXT_LANG_BT_ERROR from catch.
12533
12534 2018-03-26  Tom Tromey  <tom@tromey.com>
12535
12536         PR backtrace/15584:
12537         * stack.c (backtrace_command_1): Move some code into no-filters
12538         "if".
12539
12540 2018-03-26  Tom Tromey  <tom@tromey.com>
12541
12542         * python/py-framefilter.c (throw_quit_or_print_exception): New
12543         function.
12544         (gdbpy_apply_frame_filter): Use it.
12545
12546 2018-03-26  Tom Tromey  <tom@tromey.com>
12547
12548         PR cli/17716:
12549         * python/py-framefilter.c (py_print_type, py_print_value)
12550         (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
12551         RETURN_MASK_ERROR.
12552
12553 2018-03-26  Tom Tromey  <tom@tromey.com>
12554
12555         * python/py-framefilter.c (enumerate_args): Use
12556         gdb::unique_xmalloc_ptr.
12557
12558 2018-03-26  Tom Tromey  <tom@tromey.com>
12559
12560         * python/py-framefilter.c (py_print_frame): Return
12561         EXT_LANG_BT_OK.
12562         (gdbpy_apply_frame_filter): Update comment.
12563         * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
12564         Remove.
12565         <EXT_LANG_BT_NO_FILTERS>: Change value.
12566
12567 2018-03-26  Tom Tromey  <tom@tromey.com>
12568
12569         PR backtrace/15582:
12570         * stack.c (backtrace_command): Parse "hide" argument.
12571         * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
12572         * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
12573         constant.
12574
12575 2018-03-26  Tom Tromey  <tom@tromey.com>
12576
12577         * stack.c (backtrace_command_1): Remove "show_locals" parameter,
12578         add "flags".
12579         (backtrace_command): Remove "fulltrace", add "flags".
12580
12581 2018-03-26  Tom Tromey  <tom@tromey.com>
12582
12583         * stack.c (backtrace_command): Rewrite command line parsing.
12584
12585 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
12586
12587         * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
12588
12589 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
12590
12591         * filename-seen-cache.h: Add include guard.
12592
12593 2018-03-26  Keith Seitz  <keiths@redhat.com>
12594
12595         * symfile.c (place_section): Remove "struct" from section_addr_info
12596         in comment.
12597         * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
12598         "struct" keyword from section_addr_info.
12599
12600 2018-03-26  Alan Hayward  <alan.hayward@arm.com>
12601
12602         * regformats/regdef.h (reg): Add constructors.
12603
12604 2018-03-25  Pedro Alves  <palves@redhat.com>
12605
12606         * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
12607         if then/else bodies in var_func_name extraction.
12608
12609 2018-03-23  Weimin Pan  <weimin.pan@oracle.com>
12610
12611         * minsyms.c (lookup_minimal_symbol_and_objfile): Use
12612         lookup_minimal_symbol() to find symbol entry.
12613         * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
12614
12615 2018-03-23  Keith Seitz  <keiths@redhat.com>
12616
12617         PR c++/22968
12618         * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
12619         nested type definitions for C++, too.
12620
12621 2018-03-23  Tom Tromey  <tom@tromey.com>
12622
12623         * machoread.c (struct oso_el): Add a constructor.  Don't define as
12624         a typedef.
12625         (macho_register_oso): Remove.
12626         (macho_symtab_read): Take a std::vector.
12627         (oso_el_compare_name): Now a std::sort comparator.
12628         (macho_symfile_read_all_oso): Take a std::vector.
12629         (macho_symfile_read): Use std::vector.  Remove cleanups.
12630
12631 2018-03-22  Tom Tromey  <tom@tromey.com>
12632
12633         * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
12634         (record_full_goto_bookmark): Use std::string.
12635
12636 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
12637
12638         PR tdep/18295
12639         * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
12640         a single mask.
12641
12642 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
12643
12644         * rs6000-tdep.c (store_insn_p): New function.
12645         (skip_prologue): New variable alloca_reg_offset. Set lr_reg
12646         and cr_reg to their unshifted values. Use store_insn_p to
12647         match LR saves using either R1 or fdata->alloca_reg. Use
12648         store_insn_p to match CR saves. Set alloca_reg_offset
12649         when alloca_reg and framep are set. Remove lr_reg shift
12650         when assigning to fdata->lr_register.
12651
12652 2018-03-22  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12653
12654         * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
12655         command line args instead of emitting a warning.
12656
12657 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
12658
12659         * tracepoint.h (struct static_tracepoint_marker): Initialize
12660         fields, define default constructor, move constructor and move
12661         assignment, disable the rest.
12662         <str_id, extra>: Make std::string.
12663         (release_static_tracepoint_marker): Remove.
12664         (free_current_marker): Remove.
12665         * tracepoint.c (free_current_marker): Remove.
12666         (parse_static_tracepoint_marker_definition): Adjust to
12667         std::string, use new hex2str overload.
12668         (release_static_tracepoint_marker): Remove.
12669         (print_one_static_tracepoint_marker): Get marker by reference
12670         and adjust to std::string.
12671         (info_static_tracepoint_markers_command): Adjust to std::vector
12672         changes
12673         * target.h (static_tracepoint_marker_p): Remove typedef.
12674         (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
12675         (struct target_ops) <to_static_tracepoint_marker_at>: Return
12676         bool.
12677         <to_static_tracepoint_markers_by_strid>: Return std::vector.
12678         * target-debug.h
12679         (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
12680         (target_debug_print_std_vector_static_tracepoint_marker): New.
12681         (target_debug_print_struct_static_tracepoint_marker_p): Rename
12682         to...
12683         (target_debug_print_static_tracepoint_marker_p): ... this.
12684         * target-delegates.c: Re-generate.
12685         * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
12686         Make std::string.
12687         * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
12688         (decode_static_tracepoint_spec): Adjust to std::vector.
12689         (tracepoint_print_one_detail): Adjust to std::string.
12690         (strace_marker_decode_location): Adjust to std::string.
12691         (update_static_tracepoint): Adjust to std::string, remove call
12692         to release_static_tracepoint_marker.
12693         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
12694         Adjust to std::vector.
12695         * remote.c (remote_static_tracepoint_marker_at): Return bool.
12696         (remote_static_tracepoint_markers_by_strid): Adjust to
12697         std::vector.
12698         * common/rsp-low.h (hex2str): New overload with explicit count
12699         of bytes.
12700         * common/rsp-low.c (hex2str): New overload with explicit count
12701         of bytes.
12702         * unittests/rsp-low-selftests.c (test_hex2str): New function.
12703         (_initialize_rsp_low_selftests): Add test_hex2str test.
12704         * unittests/tracepoint-selftests.c
12705         (test_parse_static_tracepoint_marker_definition): Adjust to
12706         std::string.
12707
12708 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
12709
12710         * tracepoint.c (parse_static_tracepoint_marker_definition):
12711         Consider case where the definition is followed by more
12712         definitions.
12713         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12714         tracepoint-selftests.c.
12715         * unittests/tracepoint-selftests.c: New.
12716
12717 2018-03-21  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
12718
12719         * MAINTAINERS (Write After Approval): Add Pedro Franco de
12720         Carvalho.
12721
12722 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
12723
12724         * symtab.c (find_pc_sect_line): fixed indentation.
12725
12726 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
12727
12728         * symtab.c (find_pc_sect_line): now uses binary search.
12729
12730 2018-03-19  Tom Tromey  <tom@tromey.com>
12731
12732         * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
12733         "IDENT" production.
12734
12735 2018-03-19  Pedro Alves  <palves@redhat.com>
12736             Tom Tromey  <tom@tromey.com>
12737
12738         * unittests/observable-selftests.c: New file.
12739         * common/observable.h: New file.
12740         * observable.h: New file.
12741         * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
12742         arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
12743         breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
12744         corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
12745         extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
12746         infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
12747         linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
12748         mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
12749         ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
12750         python/py-breakpoint.c, python/py-finishbreakpoint.c,
12751         python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
12752         record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
12753         riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
12754         spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
12755         symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
12756         tui/tui-interp.c, valops.c: Update all users.
12757         * tui/tui-hooks.c (tui_bp_created_observer)
12758         (tui_bp_deleted_observer, tui_bp_modified_observer)
12759         (tui_inferior_exit_observer, tui_before_prompt_observer)
12760         (tui_normal_stop_observer, tui_register_changed_observer):
12761         Remove.
12762         (tui_observers_token): New global.
12763         (attach_or_detach, tui_attach_detach_observers): New functions.
12764         (tui_install_hooks, tui_remove_hooks): Use
12765         tui_attach_detach_observers.
12766         * record-btrace.c (record_btrace_thread_observer): Remove.
12767         (record_btrace_thread_observer_token): New global.
12768         * observer.sh: Remove.
12769         * observer.c: Rename to observable.c.
12770         * observable.c (namespace gdb_observers): Define new objects.
12771         (observer_debug): Move into gdb_observers namespace.
12772         (struct observer, struct observer_list, xalloc_observer_list_node)
12773         (xfree_observer_list_node, generic_observer_attach)
12774         (generic_observer_detach, generic_observer_notify): Remove.
12775         (_initialize_observer): Update.
12776         Don't include observer.inc.
12777         * Makefile.in (generated_files): Remove observer.h, observer.inc.
12778         (clean mostlyclean): Likewise.
12779         (observer.h, observer.inc): Remove targets.
12780         (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
12781         (COMMON_SFILES): Use observable.c, not observer.c.
12782         * .gitignore: Remove observer.h.
12783
12784 2018-03-18  Tom Tromey  <tom@tromey.com>
12785
12786         * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
12787         gdb::def_vector.
12788         (bfd_lookup_symbol_from_dyn_symtab): Likewise.
12789
12790 2018-03-17  Tom Tromey  <tom@tromey.com>
12791
12792         * auto-load.c (auto_load_objfile_script_1): Use std::string.
12793
12794 2018-03-17  Tom Tromey  <tom@tromey.com>
12795
12796         * target.c (class scoped_target_fd): New.
12797         (target_fileio_close_cleanup): Remove.
12798         (target_fileio_read_alloc_1): Use scoped_target_fd.
12799
12800 2018-03-16  Simon Marchi  <simon.marchi@polymtl.ca>
12801
12802         * silent-rules.mk: New.
12803         * Makefile.in: Include silent-rules.mk
12804         (srcdir, VPATH, top_srcdir): Move up.
12805         (COMPILE): Add ECHO_CXX.
12806         (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
12807         (init.c): Add ECHO_INIT_C.
12808         (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
12809         (version.c): Add ECHO_GEN.
12810         (printcmd.o): Add ECHO_CXX.
12811         (target-float.o): Add ECHO_CXX.
12812         (ada-exp.o): Add ECHO_CXX.
12813         (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
12814         (insight$(EXEEXT)): Add ECHO_CXXLD.
12815         * gnulib/configure.ac: Add AM_SILENT_RULES.
12816         * gnulib/aclocal.m4: Re-generate.
12817         * gnulib/configure: Re-generate.
12818         * gnulib/import/Makefile.in: Re-generate.
12819
12820 2018-03-16  Tom Tromey  <tom@tromey.com>
12821
12822         * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
12823         * utils.h (make_cleanup_free_section_addr_info): Don't declare.
12824         * utils.c (do_free_section_addr_info)
12825         (make_cleanup_free_section_addr_info): Remove.
12826         * symfile.h (struct other_sections): Add constructor.
12827         (struct section_addr_info): Remove.
12828         (section_addr_info): New typedef.
12829         (struct sym_fns) <sym_offsets>: Change type of parameter.
12830         (build_section_addr_info_from_objfile)
12831         (relative_addr_info_to_section_offsets, addr_info_make_relative)
12832         (default_symfile_offsets, symbol_file_add)
12833         (symbol_file_add_from_bfd)
12834         (build_section_addr_info_from_section_table): Update.
12835         (alloc_section_addr_info, free_section_addr_info): Don't declare.
12836         * symfile.c (alloc_section_addr_info): Remove.
12837         (build_section_addr_info_from_section_table): Change return type.
12838         Update.
12839         (build_section_addr_info_from_bfd)
12840         (build_section_addr_info_from_objfile): Likewise.
12841         (free_section_addr_info): Remove.
12842         (relative_addr_info_to_section_offsets): Change type of "addrs".
12843         (addrs_section_compar): Now a std::sort comparator.
12844         (addrs_section_sort): Change return type.
12845         (addr_info_make_relative): Change type of "addrs".  Update.
12846         (default_symfile_offsets, syms_from_objfile_1)
12847         (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
12848         (symbol_file_add_separate): Update.
12849         (symbol_file_add): Change type of "addrs".  Update.
12850         (add_symbol_file_command): Update.  Remove cleanups.
12851         * symfile-mem.c (symbol_file_add_from_memory): Update.  Remove
12852         cleanups.
12853         * symfile-debug.c (debug_sym_offsets): Change type of "info".
12854         * solib.c (solib_read_symbols): Update.
12855         * objfiles.c (objfile_relocate): Update.  Remove cleanups.
12856         * machoread.c (macho_symfile_offsets): Update.
12857         * jit.c (jit_bfd_try_read_symtab): Update.
12858
12859 2018-03-15  Simon Marchi  <simon.marchi@polymtl.ca>
12860
12861         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12862         unittests/utils-selftests.c.
12863         * unittests/utils-selftests.c: New file.
12864
12865 2018-03-14  Tom Tromey  <tom@tromey.com>
12866
12867         PR cli/14977:
12868         * printcmd.c (printf_c_string, printf_wide_c_string): Special case
12869         for NULL.
12870
12871 2018-03-14  Tom Tromey  <tom@tromey.com>
12872
12873         PR cli/19918:
12874         * printcmd.c (printf_pointer): Allow "-" in format.
12875
12876 2018-03-14  Tom Tromey  <tom@tromey.com>
12877
12878         * printcmd.c (_initialize_printcmd): Add usage to printf.
12879
12880 2018-03-14  Yao Qi  <qiyao@sourceware.org>
12881
12882         * MAINTAINERS: Update my email address.
12883
12884 2018-03-13  Tom Tromey  <tom@tromey.com>
12885
12886         * machoread.c (macho_check_dsym): Change filenamep to a
12887         std::string*.
12888         (macho_symfile_read): Update.
12889         * symfile.c (load_command): Use std::string.
12890
12891 2018-03-12  Andrew Burgess  <andrew.burgess@embecosm.com>
12892
12893         * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
12894         to error message string.
12895         (riscv_register_name): Use xsnprintf instead of sprintf.
12896         (riscv_insn::fetch_instruction): Use gdb_assert instead of
12897         internal_error.
12898         (riscv_print_arg_location): Use gdb_assert_not_reached instead of
12899         error.
12900         (riscv_push_dummy_call): Likewise.
12901
12902 2018-03-12  Tom Tromey  <tom@tromey.com>
12903
12904         * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
12905         Use gdb::byte_vector.
12906         * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
12907
12908 2018-03-12  Yao Qi  <yao.qi@linaro.org>
12909
12910         * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
12911         parameter type to readable_regcache.
12912         * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
12913         the declaration.
12914
12915 2018-03-11  Tom Tromey  <tom@tromey.com>
12916
12917         * dwarf2read.c (struct nextfield): Add initializers.
12918         (struct nextfnfield): Remove.
12919         (struct fnfieldlist): Add initializers.  Remove "length" and
12920         "head", use std::vector.
12921         (struct decl_field_list): Remove.
12922         (struct field_info): Add initializers.
12923         <fields, baseclasses>: Now std::vector.
12924         <nbaseclasses, nfnfields, typedef_field_list_count,
12925         nested_types_list_count>: Remove.
12926         (dwarf2_add_field, dwarf2_add_type_defn)
12927         (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
12928         (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
12929         (process_structure_scope): Update.
12930
12931 2018-03-11  Tom Tromey  <tom@tromey.com>
12932
12933         * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
12934         for use by std::sort.
12935         (build_type_psymtabs_1): Use std::vector.
12936
12937 2018-03-09  Eli Zaretskii  <eliz@gnu.org>
12938
12939         * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
12940         and LIBMPFR in the printed configuration.
12941
12942 2018-03-08  Tom Tromey  <tom@tromey.com>
12943
12944         * source.c (get_filename_and_charpos): Use scoped_fd.
12945         * nto-procfs.c (procfs_open_1): Use scoped_fd.
12946         (procfs_pidlist): Likewise.
12947         * procfs.c (proc_get_LDT_entry): Use scoped_fd.
12948         (iterate_over_mappings): Likewise.
12949
12950 2018-03-08  Tom Tromey  <tom@tromey.com>
12951
12952         * infcall.c (struct call_return_meta_info)
12953         <stack_temporaries_enabled>: Remove.
12954         (get_call_return_value, call_function_by_hand_dummy): Update.
12955         * thread.c (disable_thread_stack_temporaries): Remove.
12956         (enable_thread_stack_temporaries): Remove.
12957         (thread_stack_temporaries_enabled_p): Return bool.
12958         (push_thread_stack_temporary, value_in_thread_stack_temporaries)
12959         (get_last_thread_stack_temporary): Update.
12960         * eval.c (evaluate_subexp): Update.
12961         * gdbthread.h (class enable_thread_stack_temporaries): Now a
12962         class, not a function.
12963         (value_ptr, value_vec): Remove typedefs.
12964         (class thread_info) <stack_temporaries_enabled>: Now bool.
12965         <stack_temporaries>: Now a std::vector.
12966         (thread_stack_temporaries_enabled_p)
12967         (value_in_thread_stack_temporaries): Return bool.
12968
12969 2018-03-08  Simon Marchi  <simon.marchi@ericsson.com>
12970
12971         * remote.c (putpkt_binary): Fix omitted bytes reporting.
12972         (getpkt_or_notif_sane_1): Likewise.
12973
12974 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
12975
12976         * build-id.c (build_id_to_debug_bfd): Use std::string.
12977
12978 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
12979
12980         * build-id.c (find_separate_debug_file_by_buildid): Return
12981         std::string.
12982         * build-id.h (find_separate_debug_file_by_buildid): Return
12983         std::string.
12984         * coffread.c (coff_symfile_read): Adjust to std::string.
12985         * elfread.c (elf_symfile_read): Adjust to std::string.
12986         * symfile.c (separate_debug_file_exists): Change parameter to
12987         std::string.
12988         (find_separate_debug_file): Return std::string.
12989         (find_separate_debug_file_by_debuglink): Return std::string.
12990         * symfile.h (find_separate_debug_file_by_debuglink): Return
12991         std::string.
12992
12993 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
12994
12995         * common/xml-utils.c (xml_escape_text): Move code to...
12996         (xml_escape_text_append): ... this new function.
12997         * common/xml-utils.h (xml_escape_text_append): New declaration.
12998         * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
12999         New function.
13000         (_initialize_xml_utils): register test_xml_escape_text_append as
13001         a selftest.
13002
13003 2018-03-07  Alan Hayward  <alan.hayward@arm.com>
13004
13005         * defs.h: Remove MAX_REGISTER_SIZE.
13006         * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
13007         asserts.
13008         * python/py-unwind.c (pyuw_sniffer): Likewise.
13009
13010 2018-03-07  Tom Tromey  <tom@tromey.com>
13011
13012         * linux-tdep.c (linux_info_proc): Update.
13013         * target.h (struct target_ops) <to_fileio_readlink>: Return
13014         optional<string>.
13015         (target_fileio_readlink): Return optional<string>.
13016         * remote.c (remote_hostio_readlink): Return optional<string>.
13017         * inf-child.c (inf_child_fileio_readlink): Return
13018         optional<string>.
13019         * target.c (target_fileio_readlink): Return optional<string>.
13020
13021 2018-03-07  Andrew Burgess  <andrew.burgess@embecosm.com>
13022
13023         * regcache.c (cooked_read_test): Add riscv to the list of
13024         architectures that have a save_reggroup.
13025
13026 2018-03-07  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13027
13028         * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
13029         value is not a dynamic class object.
13030
13031 2018-03-06  Tom Tromey  <tom@tromey.com>
13032
13033         * rust-exp.y: Formatting fixes.
13034
13035 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
13036
13037         * riscv-tdep.c (riscv_register_name): Remove target description
13038         support.
13039         (riscv_gdbarch_init): Remove target description check.
13040
13041 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
13042
13043         * riscv-tdep.c: Remove 'Contributed by ...' lines from header
13044         comment.
13045         * riscv-tdep.h: Likewise.
13046
13047 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
13048
13049         * riscv-tdep.c (riscv_pseudo_register_read): Delete.
13050         (riscv_pseudo_register_write): Delete.
13051         (riscv_gdbarch_init): Remove all use of pseudo registers.
13052
13053 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
13054
13055         * record-btrace.c (btrace_print_lines): Replace cleanup
13056         parameter with RAII equivalents.
13057         (btrace_insn_history): Replace cleanup with RAII equivalents.
13058         * ui-out.h (make_cleanup_ui_out_list_begin_end,
13059         make_cleanup_ui_out_tuple_begin_end): Remove.
13060         * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
13061         make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
13062         make_cleanup_ui_out_list_begin_end): Remove.
13063
13064 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
13065
13066         * record-btrace.c (record_btrace_maybe_mark_async_event): Change
13067         parameter types to std::vector.  Use bool.
13068         (record_btrace_wait): Replace VEC(tp_t) with
13069         std::vector<thread_info *>.
13070         * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
13071
13072 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
13073
13074         * record-btrace.c (record_btrace_disable_callback): Remove.
13075         (struct scoped_btrace_disable): New.
13076         (record_btrace_open): Use scoped_btrace_disable.
13077
13078 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
13079
13080         * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
13081         reading values from registers.
13082
13083 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
13084
13085         * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
13086         where appropriate.
13087
13088 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
13089
13090         * riscv-tdep.c (riscv_print_arg_location): Add header comment,
13091         change parameter type.  Use GDB's print functions, and use
13092         core_addr_to_string where appropriate.
13093         (riscv_push_dummy_call): Use core_addr_to_string where
13094         appropriate, update call to riscv_print_arg_location, and reindent
13095         a few lines.
13096         (riscv_return_value): Update call to riscv_print_arg_location.
13097
13098 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
13099             Tim Newsome <tim@sifive.com>
13100             Albert Ou <a0u@eecs.berkeley.edu>
13101             Darius Rad <darius@bluespec.com>
13102
13103         * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
13104         (HFILES_NO_SRCDIR): Add riscv-tdep.h.
13105         (ALLDEPFILES): Add riscv-tdep.c
13106         * configure.tgt: Add riscv support.
13107         * riscv-tdep.c: New file.
13108         * riscv-tdep.h: New file.
13109         * NEWS: Mention new target.
13110         * MAINTAINERS: Add entry for riscv.
13111
13112 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
13113
13114         * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
13115         fields within aggregates.
13116
13117 2018-03-04  Simon Marchi  <simon.marchi@polymtl.ca>
13118
13119         * record-btrace.c (btrace_print_lines): Change type of flags to
13120         gdb_disassembly_flags.
13121
13122 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
13123
13124         * fbsd-nat.c: Include "inf-ptrace.h".
13125         (USE_SIGTRAP_SIGINFO): Conditionally define.
13126         [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
13127         (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
13128         [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
13129         function.
13130         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
13131         Likewise.
13132         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
13133         Likewise.
13134         (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
13135         "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
13136         "supports_stopped_by_hw_breakpoint" target methods.
13137
13138 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
13139
13140         * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
13141         * fbsd-nat.c (debug_fbsd_nat): New variable.
13142         (show_fbsd_nat_debug): New function.
13143         (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
13144         (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
13145
13146 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
13147
13148         * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
13149         * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
13150         prototype.
13151         * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
13152         (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
13153         method.
13154
13155 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
13156
13157         * common/gdb_vecs.c (free_char_ptr_vec): Remove.
13158         * common/gdb_vecs.h (free_char_ptr_vec): Remove.
13159
13160 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
13161
13162         * charset.c (struct charset_vector): New.
13163         (charsets): Change type to charset_vector.
13164         (find_charset_names): Adjust.
13165         (add_one): Adjust.
13166         (_initialize_charset): Adjust.
13167
13168 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
13169
13170         * progspace.h (struct program_space) <deleted_solibs>: Change
13171         type to std::vector<std::string>.
13172         * progspace.c (clear_program_space_solib_cache): Adjust.
13173         * breakpoint.c (print_solib_event): Adjust.
13174         (check_status_catch_solib): Adjust.
13175         * solib.c (update_solib_list): Adjust.
13176         * ui-out.h (class ui_out) <field_string>: New overload.
13177         * ui-out.c (ui_out::field_string): New overload.
13178
13179 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
13180
13181         * progspace.h (struct program_space): Add constructor and
13182         destructor, initialize fields.
13183         (add_program_space): Remove.
13184         * progspace.c (add_program_space): Rename to...
13185         (program_space::program_space): ... this.
13186         (release_program_space): Rename to...
13187         (program_space::~program_space): ... this.
13188         (delete_program_space): Use delete to delete program_space.
13189         (initialize_progspace): Use new to allocate program_space.
13190         * inferior.c (add_inferior_with_spaces): Likewise.
13191         (clone_inferior_command): Likewise.
13192         * infrun.c (follow_fork_inferior): Likewise.
13193         (handle_vfork_child_exec_or_exit): Likewise.
13194
13195 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
13196
13197         * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
13198         (delim_string_to_char_ptr_vec): Return std::vector of
13199         gdb::unique_xmalloc_ptr.
13200         (dirnames_to_char_ptr_vec_append): Take std::vector of
13201         gdb::unique_xmalloc_ptr.
13202         (dirnames_to_char_ptr_vec): Return std::vector of
13203         gdb::unique_xmalloc_ptr.
13204         * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
13205         Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
13206         (delim_string_to_char_ptr_vec): Return an std::vector of
13207         gdb::unique_xmalloc_ptr, adjust the code.
13208         (dirnames_to_char_ptr_vec_append): Take an std::vector of
13209         gdb::unique_xmalloc_ptr, adjust the code.
13210         (dirnames_to_char_ptr_vec): Return an std::vector of
13211         gdb::unique_xmalloc_ptr, adjust the code.
13212         * auto-load.c (auto_load_safe_path_vec): Change type to
13213         std::vector of gdb::unique_xmalloc_ptr.
13214         (auto_load_expand_dir_vars): Return an std::vector of
13215         gdb::unique_xmalloc_ptr, adjust the code.
13216         (auto_load_safe_path_vec_update): Adjust.
13217         (filename_is_in_auto_load_safe_path_vec): Adjust.
13218         (auto_load_objfile_script_1): Adjust.
13219         * build-id.c (build_id_to_debug_bfd): Adjust.
13220         * linux-thread-db.c (thread_db_load_search): Adjust.
13221         * source.c (add_path): Adjust.
13222         (openp): Adjust.
13223         * symfile.c (find_separate_debug_file): Adjust.
13224         * utils.c (do_free_char_ptr_vec): Remove.
13225         (make_cleanup_free_char_ptr_vec): Remove.
13226
13227 2018-03-01  Sergio Durigan Junior  <sergiodj@redhat.com>
13228
13229         PR gdb/22907
13230         * common/pathstuff.c: Conditionally include "<windows.h>".
13231
13232 2018-03-01  Georg Sauthoff  <mail@georg.so>
13233
13234         PR gdb/22888
13235         * gcore.in: Quote variables and switch interpreter to bash.
13236
13237 2018-03-01  Tom Tromey  <tom@tromey.com>
13238
13239         * dwarf2read.c (alloc_discriminant_info): Fix default_index
13240         assertion.  Add assertion for discriminant_index.
13241         (quirk_rust_enum): Use correct base type name in univariant case.
13242
13243 2018-03-01  Simon Marchi  <simon.marchi@ericsson.com>
13244
13245         * record.c (get_call_history_modifiers): Return a
13246         record_print_flags.
13247         (cmd_record_call_history): Adjust.
13248         * record-btrace.c (record_btrace_call_history): Adjust.
13249         (record_btrace_call_history_range): Adjust.
13250         (record_btrace_call_history_from): Adjust.
13251         * target-debug.h (target_debug_print_record_print_flags): New.
13252         * target-delegates.c: Re-generate.
13253         * target.c (target_call_history): Change flags type.
13254         (target_call_history_from): Likewise.
13255         (target_call_history_range): Likewise.
13256         * target.h (struct target_ops) <target_call_history>: Likewise.
13257         (target_call_history_from): Likewise.
13258         (target_call_history_range): Likewise.
13259
13260 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
13261             Simon Marchi  <simon.marchi@polymtl.ca>
13262
13263         * common/common-utils.c: Include "sys/stat.h".
13264         (is_regular_file): Move here from "source.c"; change return
13265         type to "bool".
13266         * common/common-utils.h (is_regular_file): New prototype.
13267         * common/pathstuff.c (contains_dir_separator): New function.
13268         * common/pathstuff.h (contains_dir_separator): New prototype.
13269         * source.c: Don't include "sys/stat.h".
13270         (is_regular_file): Move to "common/common-utils.c".
13271
13272 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
13273
13274         * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
13275         (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
13276         * auto-load.c: Include "common/pathstuff.h".
13277         * common/common-def.h (current_directory): Move here.
13278         * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
13279         function.
13280         * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
13281         prototype.
13282         * common/pathstuff.c: New file.
13283         * common/pathstuff.h: New file.
13284         * compile/compile.c: Include "common/pathstuff.h".
13285         * defs.h (current_directory): Move to "common/common-defs.h".
13286         * dwarf2read.c: Include "common/pathstuff.h".
13287         * exec.c: Likewise.
13288         * guile/scm-safe-call.c: Likewise.
13289         * linux-thread-db.c: Likewise.
13290         * main.c: Likewise.
13291         * nto-tdep.c: Likewise.
13292         * objfiles.c: Likewise.
13293         * source.c: Likewise.
13294         * symtab.c: Likewise.
13295         * utils.c: Include "common/pathstuff.h".
13296         (gdb_realpath): Move to "common/pathstuff.c".
13297         (gdb_realpath_keepfile): Likewise.
13298         (gdb_abspath): Likewise.
13299         * utils.h (gdb_realpath): Move to "common/pathstuff.h".
13300         (gdb_realpath_keepfile): Likewise.
13301         (gdb_abspath): Likewise.
13302
13303 2018-02-28  John Baldwin  <jhb@FreeBSD.org>
13304
13305         * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
13306         wildcard process pid for super_resume for kernels with a
13307         specific bug.
13308
13309 2018-02-27  Phil Muldoon  <pmuldoon@redhat.com>
13310
13311         * compile/compile.c (get_args): Add additional comments
13312         explaining function.
13313
13314 2018-02-27  Simon Marchi  <simon.marchi@polymtl.ca>
13315             Tom Tromey  <tom@tromey.com>
13316
13317         * target.h (memory_write_request_s): Remove typedef.  Don't define
13318         VEC.
13319         (target_write_memory_blocks): Change argument to std::vector.
13320         (struct memory_write_request): Add constructor.
13321         * target-memory.c (compare_block_starting_address): Return bool.
13322         Change argument types.
13323         (claim_memory): Change arguments to use std::vector.
13324         (split_regular_and_flash_blocks, blocks_to_erase)
13325         (compute_garbled_blocks): Likewise.
13326         (cleanup_request_data, cleanup_write_requests_vector): Remove.
13327         (target_write_memory_blocks): Change argument to std::vector.
13328         * symfile.c (struct load_section_data): Add constructor and
13329         destructor.  Use std::vector for "requests".
13330         (struct load_progress_data): Add initializers.
13331         (load_section_callback): Update.  Use "new".
13332         (clear_memory_write_data): Remove.
13333         (generic_load): Update.
13334
13335 2018-02-27  Alan Hayward  <alan.hayward@arm.com>
13336
13337         * arch/aarch64.h: Use common/tdesc.h.
13338
13339 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
13340
13341         * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
13342         architecture with a 64-bit ABI.
13343
13344 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
13345
13346         * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
13347         ahead of target description loading.
13348
13349 2018-02-26  Tom Tromey  <tom@tromey.com>
13350
13351         * stack.c (backtrace_command_1): Update.
13352         * python/python-internal.h (gdbpy_apply_frame_filter): Change type
13353         of "flags".
13354         * python/py-framefilter.c (py_print_frame)
13355         (gdbpy_apply_frame_filter): Change type of "flags".
13356         * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
13357         of "flags".
13358         (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
13359         (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
13360         * extension.h (enum frame_filter_flag): Rename from
13361         frame_filter_flags.
13362         (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
13363         (apply_ext_lang_frame_filter): Change type of "flags".
13364         * extension.c (apply_ext_lang_frame_filter): Change type of
13365         "flags".
13366         * extension-priv.h (struct extension_language_ops)
13367         <apply_frame_filter>: Change type of "flags".
13368
13369 2018-02-26  Tom Tromey  <tom@tromey.com>
13370
13371         PR python/16497:
13372         * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag.  Fix
13373         off-by-one in py_end computation.
13374         * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
13375         PRINT_MORE_FRAMES.
13376         * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
13377         constant.
13378
13379 2018-02-26  Tom Tromey  <tom@tromey.com>
13380
13381         * dwarf2read.c (struct variant_field): New.
13382         (struct nextfield) <variant>: New field.
13383         (dwarf2_add_field): Handle DW_TAG_variant_part.
13384         (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
13385         discriminated union.
13386         (read_structure_type): Handle DW_TAG_variant_part.
13387         (handle_struct_member_die): New function, extracted from
13388         process_structure_scope.  Handle DW_TAG_variant.
13389         (process_structure_scope): Handle discriminated unions.  Call
13390         handle_struct_member_die.
13391
13392 2018-02-26  Tom Tromey  <tom@tromey.com>
13393
13394         * rust-lang.h (rust_last_path_segment): Declare.
13395         * rust-lang.c (rust_last_path_segment): Now public.  Change
13396         contract.
13397         (struct disr_info): Remove.
13398         (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
13399         (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
13400         (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
13401         (rust_enum_p, rust_enum_variant): New function.
13402         (rust_underscore_fields): Remove "offset" parameter.
13403         (rust_print_enum): New function.
13404         (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
13405         <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
13406         (rust_print_struct_def): Add "for_rust_enum" parameter.  Handle
13407         enums.
13408         (rust_internal_print_type): New function, from rust_print_type.
13409         Remove enum code.
13410         (rust_print_type): Call rust_internal_print_type.
13411         (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
13412         Update enum handling.
13413         * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
13414         (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
13415         (rust_union_quirks): New functions.
13416         (process_full_comp_unit, process_full_type_unit): Call
13417         rust_union_quirks.
13418         (process_structure_scope): Update rust_unions if necessary.
13419
13420 2018-02-26  Tom Tromey  <tom@tromey.com>
13421
13422         * value.h (value_union_variant): Declare.
13423         * valops.c (value_union_variant): New function.
13424         * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
13425         (struct discriminant_info): New.
13426         (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
13427         enumerator.
13428         (struct main_type) <flag_discriminated_union>: New field.
13429
13430 2018-02-26  Tom Tromey  <tom@tromey.com>
13431
13432         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13433         unittests/unpack-selftests.c.
13434         * unittests/unpack-selftests.c: New file.
13435         * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
13436
13437 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13438
13439         * dwarf2read.c (struct partial_die_info) <read>: New method.
13440         (read_partial_die): Remove the declaration.
13441         (load_partial_dies): Update.
13442         (partial_die_info::partial_die_info):
13443         (read_partial_die): Change it to partial_die_info::read.
13444
13445 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13446
13447         * dwarf2read.c (struct partial_die_info) <fixup>: New method.
13448         (fixup_partial_die): Remove declaration.
13449         (scan_partial_symbols): Update.
13450         (partial_die_parent_scope): Likewise.
13451         (partial_die_full_name): Likewise.
13452         (fixup_partial_die): Change it to partial_die_info::fixup.
13453
13454 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13455
13456         * dwarf2read.c (read_partial_die): Update the declaration.
13457         (load_partial_dies): Caller update.
13458         (read_partial_die): Remove one argument abbrev_len.
13459
13460 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13461
13462         * dwarf2read.c (struct partial_die_info): Add ctor, delete
13463         assignment operator.
13464         (load_partial_dies): Use ctor and copy ctor.
13465         (read_partial_die): Update.
13466         (dwarf2_cu::find_partial_die): Use ctor.
13467
13468 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13469
13470         * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
13471         (find_partial_die_in_comp_unit): Change it to
13472         dwarf2_cu::find_partial_die.
13473         (find_partial_die): Update.
13474
13475 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13476
13477         * dwarf2read.c (read_partial_die): Remove the code checking abbrev
13478         is NULL.
13479
13480 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13481
13482         * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
13483
13484 2018-02-26  Alan Hayward  <alan.hayward@arm.com>
13485
13486         * arch/amd64.h: Use common/tdesc.h.
13487         * arch/i386.c: Likewise.
13488         * arch/i386.h: Likewise.
13489         * arch/tic6x.c: Likewise.
13490         * arch/tdesc.h: Move file from here...
13491         * common/tdesc.h: ...to here.
13492         * features/aarch64-core.c: Regenerate.
13493         * features/aarch64-fpu.c: Regenerate.
13494         * features/i386/32bit-avx.c: Regenerate.
13495         * features/i386/32bit-avx512.c: Regenerate.
13496         * features/i386/32bit-core.c: Regenerate.
13497         * features/i386/32bit-linux.c: Regenerate.
13498         * features/i386/32bit-mpx.c: Regenerate.
13499         * features/i386/32bit-pkeys.c: Regenerate.
13500         * features/i386/32bit-sse.c: Regenerate.
13501         * features/i386/64bit-avx.c: Regenerate.
13502         * features/i386/64bit-avx512.c: Regenerate.
13503         * features/i386/64bit-core.c: Regenerate.
13504         * features/i386/64bit-linux.c: Regenerate.
13505         * features/i386/64bit-mpx.c: Regenerate.
13506         * features/i386/64bit-pkeys.c: Regenerate.
13507         * features/i386/64bit-segments.c: Regenerate.
13508         * features/i386/64bit-sse.c: Regenerate.
13509         * features/i386/x32-core.c: Regenerate.
13510         * features/tic6x-c6xp.c: Regenerate.
13511         * features/tic6x-core.c: Regenerate.
13512         * features/tic6x-gp.c: Regenerate.
13513         * target-descriptions.c: Use common/tdesc.h.
13514         * target-descriptions.h: Likewise.
13515
13516 2018-02-24  Tom Tromey  <tom@tromey.com>
13517
13518         * linux-thread-db.c (try_thread_db_load_from_pdir_1)
13519         (try_thread_db_load_from_dir, thread_db_load_search): Use
13520         std::string.
13521         (info_auto_load_libthread_db_compare): Return bool.  Change
13522         argument types.
13523         (info_auto_load_libthread_db): Use std::vector, std::string.
13524         Remove cleanups.
13525
13526 2018-02-24  Tom Tromey  <tom@tromey.com>
13527
13528         * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
13529         std::string.
13530         * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
13531         std::string*.
13532         * gdbarch.c: Rebuild.
13533         * gdbarch.h: Rebuild.
13534         * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
13535         * arch-utils.h (default_fast_tracepoint_valid_at): Update.
13536         * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
13537         std::string*.
13538
13539 2018-02-23  Simon Marchi  <simon.marchi@polymtl.ca>
13540
13541         * gdbtypes.h (sect_offset): Change type to uint64_t.
13542         (sect_offset_str): New function.
13543         * dwarf2read.c (create_addrmap_from_aranges): Use
13544         sect_offset_str.
13545         (error_check_comp_unit_head): Likewise.
13546         (create_debug_type_hash_table): Likewise.
13547         (read_cutu_die_from_dwo): Likewise.
13548         (init_cutu_and_read_dies): Likewise.
13549         (init_cutu_and_read_dies_no_follow): Likewise.
13550         (process_psymtab_comp_unit_reader): Likewise.
13551         (partial_die_parent_scope): Likewise.
13552         (peek_die_abbrev): Likewise.
13553         (process_queue): Likewise.
13554         (dwarf2_physname): Likewise.
13555         (read_namespace_alias): Likewise.
13556         (read_import_statement): Likewise.
13557         (create_dwo_cu_reader): Likewise.
13558         (create_cus_hash_table): Likewise.
13559         (lookup_dwo_cutu): Likewise.
13560         (inherit_abstract_dies): Likewise.
13561         (read_func_scope): Likewise.
13562         (read_call_site_scope): Likewise.
13563         (dwarf2_add_member_fn): Likewise.
13564         (read_common_block): Likewise.
13565         (read_module_type): Likewise.
13566         (read_typedef): Likewise.
13567         (read_subrange_type): Likewise.
13568         (load_partial_dies): Likewise.
13569         (read_partial_die): Likewise.
13570         (find_partial_die): Likewise.
13571         (read_str_index): Likewise.
13572         (dwarf2_string_attr): Likewise.
13573         (build_error_marker_type): Likewise.
13574         (lookup_die_type): Likewise.
13575         (dump_die_shallow): Likewise.
13576         (follow_die_ref): Likewise.
13577         (dwarf2_fetch_die_loc_sect_off): Likewise.
13578         (dwarf2_fetch_constant_bytes): Likewise.
13579         (follow_die_sig): Likewise.
13580         (get_signatured_type): Likewise.
13581         (get_DW_AT_signature_type): Likewise.
13582         (dwarf2_find_containing_comp_unit): Likewise.
13583         (set_die_type): Likewise.
13584
13585 2018-02-21  John Baldwin  <jhb@FreeBSD.org>
13586
13587         * arch/aarch64.c: Include "common-defs.h".
13588         * arch/amd64.c: Likewise.
13589         * arch/i386.c: Likewise.
13590
13591 2018-02-21  Tom Tromey  <tom@tromey.com>
13592
13593         * value.h: (extract_field_op): Update.
13594         * eval.c (extract_field_op): Return a const char *.
13595         * expression.h (parse_expression_for_completion): Update.
13596         * completer.c (complete_expression): Update.
13597         (add_struct_fields): Make fieldname const.
13598         * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
13599         (mark_completion_tag, parse_exp_in_context_1): Update.
13600         (parse_expression_for_completion): Change "name" to
13601         unique_xmalloc_ptr*.
13602
13603 2018-02-21  Tom Tromey  <tom@tromey.com>
13604
13605         * infcall.c (call_function_by_hand_dummy): Use std::vector.
13606
13607 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13608
13609         * avr-tdep.c (avr_read_pc): Change parameter type to
13610         readable_regcache.
13611         * gdbarch.sh (read_pc): Likewise.
13612         * gdbarch.c: Re-generated.
13613         * gdbarch.h: Re-generated.
13614         * hppa-tdep.c (hppa_read_pc): Change parameter type to
13615         readable_regcache.
13616         * ia64-tdep.c (ia64_read_pc): Likewise.
13617         * mips-tdep.c (mips_read_pc): Likewise.
13618         * spu-tdep.c (spu_read_pc): Likewise.
13619
13620 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13621
13622         * Makefile.in (COMMON_SFILES): Add regcache-dump.c
13623         * regcache-dump.c: New file.
13624         * regcache.c: Move register_dump to regcache-dump.c.
13625         (maintenance_print_registers): Likewise.
13626         (maintenance_print_raw_registers): Likewise.
13627         (maintenance_print_cooked_registers): Likewise.
13628         (maintenance_print_register_groups): Likewise.
13629         (maintenance_print_remote_registers): Likewise.
13630         (_initialize_regcache): Likewise.
13631         * regcache.h (register_dump): Moved from regcache.c.
13632
13633 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13634
13635         * regcache.c (regcache::regcache): Update.
13636         (regcache::invalidate): Move it to detached_regcache::invalidate.
13637         (get_thread_arch_aspace_regcache): Update.
13638         (regcache::raw_update): Update.
13639         (regcache::cooked_read): Remove some code.
13640         (regcache::cooked_read_value): Likewise.
13641         (regcache::raw_write): Remove assert on m_readonly_p.
13642         (regcache::raw_supply_integer): Move it to
13643         detached_regcache::raw_supply_integer.
13644         (regcache::raw_supply_zeroed): Likewise.
13645         * regcache.h (detached_regcache) <raw_supply_integer>: New
13646         declaration.
13647         <raw_supply_zeroed, invalidate>: Likewise.
13648         (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
13649         <invalidate>: Likewise.
13650         <m_readonly_p>: Removed.
13651
13652 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13653
13654         * infcmd.c (get_return_value): Let stop_regs point to
13655         get_current_regcache.
13656         * regcache.c (regcache::regcache): Remove.
13657         (register_dump_reg_buffer): New class.
13658         (regcache_print): Adjust.
13659         * regcache.h (regcache): Remove constructors.
13660
13661 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13662
13663         * regcache.c (class register_dump): New class.
13664         (register_dump_regcache, register_dump_none): New class.
13665         (register_dump_remote, register_dump_groups): New class.
13666         (regcache_print): Update.
13667         * regcache.h (regcache_dump_what): Move it to regcache.c.
13668         (regcache) <dump>: Remove.
13669
13670 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13671
13672         * jit.c (struct jit_unwind_private) <regcache>: Change its type to
13673          reg_buffer_rw *.
13674         (jit_unwind_reg_set_impl): Call raw_supply.
13675         (jit_frame_sniffer): Use reg_buffer_rw.
13676         * record-full.c (record_full_core_regbuf): Change its type.
13677         (record_full_core_open_1): Use reg_buffer_rw.
13678         (record_full_close): Likewise.
13679         (record_full_core_fetch_registers): Use regcache->raw_supply.
13680         (record_full_core_store_registers): Likewise.
13681         * regcache.c (regcache::get_register_status): Move it to
13682         reg_buffer.
13683         (regcache_raw_set_cached_value): Remove.
13684         (regcache::raw_set_cached_value): Remove.
13685         (regcache::raw_write): Call raw_supply.
13686         (regcache::raw_supply): Move it to reg_buffer_rw.
13687         * regcache.h (regcache_raw_set_cached_value): Remove.
13688         (reg_buffer_rw): New class.
13689
13690 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13691
13692         * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
13693         readonly_detached_regcache.
13694         (dummy_frame_prev_register): Use regcache->cooked_read.
13695         * frame.c (frame_save_as_regcache): Change return type.
13696         (frame_pop): Update.
13697         * frame.h (frame_save_as_regcache): Update declaration.
13698         * inferior.h (get_infcall_suspend_state_regcache): Update
13699         declaration.
13700         * infrun.c (infcall_suspend_state) <registers>: use
13701         readonly_detached_regcache.
13702         (save_infcall_suspend_state): Don't use regcache_dup.
13703         (get_infcall_suspend_state_regcache): Change return type.
13704         * linux-fork.c (struct fork_info) <savedregs>: Change to
13705         readonly_detached_regcache.
13706         <pc>: New field.
13707         (fork_save_infrun_state): Don't use regcache_dup.
13708         (info_checkpoints_command): Adjust.
13709         * mi/mi-main.c (register_changed_p): Update declaration.
13710         (mi_cmd_data_list_changed_registers): Use
13711         readonly_detached_regcache.
13712         (register_changed_p): Change parameter type to
13713         readonly_detached_regcache.
13714         * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
13715         readonly_detached_regcache.
13716         (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
13717         * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
13718         New.
13719         (regcache::save): Move it to reg_buffer.
13720         (regcache::restore): Change parameter type.
13721         (regcache_dup): Remove.
13722         * regcache.h (reg_buffer) <save>: New method.
13723         (readonly_detached_regcache): New class.
13724         * spu-tdep.c (spu2ppu_cache) <regcache>: Use
13725         readonly_detached_regcache.
13726         (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
13727
13728 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13729
13730         * frame.c (frame_save_as_regcache): Use regcache method save.
13731         (frame_pop): Use regcache method restore.
13732         * infrun.c (restore_infcall_suspend_state): Likewise.
13733         * linux-fork.c (fork_load_infrun_state): Likewise.
13734         * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
13735         save.
13736         * regcache.c (regcache_save): Remove.
13737         (regcache::restore): More asserts.
13738         (regcache_cpy): Remove.
13739         * regcache.h (regcache_save): Remove the declaration.
13740         (regcache::restore): Move from private to public.
13741         Remove the friend declaration of regcache_cpy.
13742         (regcache_cpy): Remove declaration.
13743
13744 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13745
13746         * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
13747         parameter type to 'readable_regcache *'.
13748         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
13749         * arm-tdep.c (arm_neon_quad_read): Likewise.
13750         (arm_pseudo_read): Likewise.
13751         * avr-tdep.c (avr_pseudo_register_read): Likewise.
13752         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
13753         * frv-tdep.c (frv_pseudo_register_read): Likewise.
13754         * gdbarch.c: Re-generated.
13755         * gdbarch.h: Re-generated.
13756         * gdbarch.sh (pseudo_register_read): Change parameter type to
13757         'readable_regcache *'.
13758         (pseudo_register_read_value): Likewise.
13759         * h8300-tdep.c (pseudo_from_raw_register): Likewise.
13760         (h8300_pseudo_register_read): Likewise.
13761         * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
13762         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
13763         (i386_pseudo_register_read_into_value): Likewise.
13764         (i386_pseudo_register_read_value): Likewise.
13765         * i386-tdep.h (i386_pseudo_register_read_into_value): Update
13766         declaration.
13767         * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
13768         * m32c-tdep.c (m32c_raw_read): Likewise.
13769         (m32c_read_flg): Likewise.
13770         (m32c_banked_register): Likewise.
13771         (m32c_banked_read): Likewise.
13772         (m32c_sb_read): Likewise.
13773         (m32c_part_read): Likewise.
13774         (m32c_cat_read): Likewise.
13775         (m32c_r3r2r1r0_read): Likewise.
13776         (m32c_pseudo_register_read): Likewise.
13777         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
13778         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
13779         (mep_pseudo_cr64_read): Likewise.
13780         (mep_pseudo_register_read): Likewise.
13781         * mips-tdep.c (mips_pseudo_register_read): Likewise.
13782         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
13783         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
13784         * regcache.c (regcache::raw_read): Move it to readable_regcache.
13785         (regcache::cooked_read): Likewise.
13786         (regcache::cooked_read_value): Likewise.
13787         (regcache_cooked_read_signed):
13788         (regcache::cooked_read): Likewise.
13789         * regcache.h (readable_regcache): New class.
13790         (regcache): Inherit readable_regcache.  Move some methods to
13791         readable_regcache.
13792         * rl78-tdep.c (rl78_pseudo_register_read): Change
13793         parameter type to 'readable_regcache *'.
13794         * rs6000-tdep.c (do_regcache_raw_read): Remove.
13795         (e500_pseudo_register_read): Change parameter type to
13796         'readable_regcache *'.
13797         (dfp_pseudo_register_read): Likewise.
13798         (vsx_pseudo_register_read): Likewise.
13799         (efpr_pseudo_register_read): Likewise.
13800         * s390-tdep.c (s390_pseudo_register_read): Likewise.
13801         * sh-tdep.c (sh_pseudo_register_read): Likewise.
13802         * sh64-tdep.c (pseudo_register_read_portions): Likewise.
13803         (sh64_pseudo_register_read): Likewise.
13804         * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
13805         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
13806         * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
13807         (spu_pseudo_register_read): Likewise.
13808         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
13809         (xtensa_pseudo_register_read): Likewise.
13810
13811 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13812
13813         * regcache.c (regcache::regcache): Call reg_buffer ctor.
13814         (regcache::arch): Move it to reg_buffer::arch.
13815         (regcache::register_buffer): Likewise.
13816         (regcache::assert_regnum): Likewise.
13817         (regcache::num_raw_registers): Likewise.
13818         * regcache.h (reg_buffer): New class.
13819         (regcache): Inherit reg_buffer.
13820
13821 2018-02-20  Simon Marchi  <simon.marchi@ericsson.com>
13822
13823         * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
13824         gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
13825
13826 2018-02-20  Markus Metzger  <markus.t.metzger@intel.com>
13827
13828         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
13829
13830 2018-02-19  Alan Hayward  <alan.hayward@arm.com>
13831
13832         * Makefile.in: (COMMON_SFILES): Add common/*.c files.
13833         (SFILES): Remove common/*.c files.
13834         (COMMON_OBS): Remove some *.o files built from common/*.c files.
13835         * common/common.host: Add common reference.
13836         * configure.ac: Likewise.
13837         * configure: Regenerate.
13838
13839 2018-02-16  Yao Qi  <yao.qi@linaro.org>
13840
13841         * block.c (block_namespace_info): Inherit allocate_on_obstack.
13842         (block_initialize_namespace): Use new.
13843         * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
13844         (dwarf2_free_objfile): Use delete.
13845         * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
13846         (copy_type_recursive): Use new.
13847         * gdb_obstack.h (allocate_on_obstack): New.
13848
13849 2018-02-15  Yao Qi  <yao.qi@linaro.org>
13850
13851         PR gdb/22849
13852         * inferior.c (exit_inferior_1): Reset inf->control.
13853
13854 2018-02-15  Joel Brobecker  <brobecker@adacore.com>
13855
13856         * ada-lang.c (ada_to_fixed_value_create): Delete advance
13857         declaration.
13858
13859 2018-02-14  Pedro Alves  <palves@redhat.com>
13860
13861         * frame-unwind.c (frame_unwind_try_unwinder): Always call
13862         frame_cleanup_after_sniffer on exception.
13863
13864 2018-02-14  Tom Tromey  <tom@tromey.com>
13865
13866         * solist.h (struct target_so_ops) <bfd_open>: Make pathname
13867         const.
13868         (solib_bfd_open): Make pathname const.
13869         * solib.c (solib_bfd_open): Make pathname const.
13870         * solib-spu.c (spu_bfd_fopen): Make name const.
13871         (spu_bfd_open): Make pathname const.
13872         * solib-darwin.c (darwin_bfd_open): Make pathname const.
13873         * solib-aix.c (solib_aix_bfd_open): Make pathname const.
13874
13875 2018-02-14  Tom Tromey  <tom@tromey.com>
13876
13877         * symfile.c (symfile_bfd_open): Update.
13878         * source.h (openp, source_full_path_of, find_and_open_source):
13879         Change argument type to unique_xmalloc_ptr.
13880         * source.c (openp): Take a unique_xmalloc_ptr.
13881         (source_full_path_of, find_and_open_source): Likewise.
13882         (open_source_file, symtab_to_fullname): Update.
13883         * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
13884         unique_xmalloc_ptr.
13885         * solib.c (solib_find_1): Use unique_xmalloc_ptr.
13886         (exec_file_find): Update.
13887         * psymtab.c (psymtab_to_fullname): Update.
13888         * nto-tdep.h (nto_find_and_open_solib): Update.
13889         * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
13890         unique_xmalloc_ptr.
13891         * exec.c (exec_file_attach): Update.
13892         * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
13893         * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
13894
13895 2018-02-14  Tom Tromey  <tom@tromey.com>
13896
13897         * solib.c: Include source.h.
13898         * nto-tdep.c: Include source.h.
13899         * mi/mi-cmd-env.c: Include source.h.
13900         * infcmd.c: Include source.h.
13901         * exec.c: Include source.h.
13902         * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
13903         (add_path, directory_switch, source_path, init_source_path): Move
13904         declarations...
13905         * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
13906         (add_path, directory_switch, source_path, init_source_path):
13907         ...here.
13908
13909 2018-02-14  Tom Tromey  <tom@tromey.com>
13910
13911         * solist.h (exec_file_find, solib_find): Return
13912         unique_xmalloc_ptr.
13913         (solib_bfd_fopen): Take a const char *.
13914         * solib.c (solib_find_1): Return unique_xmalloc_ptr.
13915         (exec_file_find, solib_find): Likewise.
13916         (solib_bfd_fopen): Do not take ownership of "pathname".
13917         (solib_bfd_open): Use unique_xmalloc_ptr.
13918         * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
13919         * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
13920         * infrun.c (follow_exec): Use unique_xmalloc_ptr.
13921         * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
13922
13923 2018-02-14  Joel Brobecker  <brobecker@adacore.com>
13924
13925         * ada-lang.c (name_match_type_from_name): Remove reference to
13926         ada_name_for_lookup in function's documentation.
13927         * ada-lang.h (ada_name_for_lookup): Delete declaration.
13928
13929 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
13930
13931         * defs.h (enum openp_flags): New enum.
13932         (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
13933         Move to enum openp_flags.
13934         (openp_flags): New enum flags.
13935         (openp): Change parameter type to openp_flags.
13936         * source.c (openp): Change parameter type to openp_flags.
13937         * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
13938         * dwarf2read.c (try_open_dwop_file): Use openp_flags.
13939
13940 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
13941
13942         * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
13943         per-command.
13944
13945 2018-02-12  Andrew Burgess  <andrew.burgess@embecosm.com>
13946
13947         * dwarf2read.c (dwarf2_release_queue): Delete function, move body
13948         into...
13949         (class dwarf2_queue_guard): ...the destructor of this new class.
13950         (dw2_do_instantiate_symtab): Create instance of the new class
13951         dwarf2_queue_guard, remove cleanup.
13952
13953 2018-02-09  Tom Tromey  <tom@tromey.com>
13954
13955         * source.c (find_source_lines): Don't reference past the end of
13956         the vector.
13957
13958 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13959
13960         * remote.c (remote_btrace_maybe_reopen): Change error message.
13961         * btrace.c (btrace_enable): Likewise.
13962         (parse_xml_btrace): Likewise.
13963         (parse_xml_btrace_conf): Likewise.
13964
13965 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13966
13967         * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
13968         (linux_enable_pt, linux_enable_bts): Call
13969         diagnose_perf_event_open_fail.
13970
13971 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13972
13973         * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
13974         Remove parameter and change return type.  Update callers.  Move it.
13975         (linux_enable_bts, linux_enable_pt): Improve error message.
13976         (linux_enable_pt): Remove zero buffer size check.
13977         (linux_enable_btrace): Improve error messages.  Remove NULL return
13978         check.
13979
13980 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13981
13982         * btrace.c (btrace_enable): Remove target_supports_btrace call.
13983         * nat/linux-btrace.c (perf_event_pt_event_type): Move.
13984         (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
13985         (linux_supports_pt, linux_supports_btrace): Remove.
13986         (linux_enable_bts): Call cpu_supports_bts.
13987         * nat/linux-btrace.h (linux_supports_btrace): Remove.
13988         * remote.c (remote_supports_btrace): Remove.
13989         (init_remote_ops): Remove remote_supports_btrace.
13990         * target-delegates.c: Regenerated.
13991         * target.c (target_supports_btrace): Remove.
13992         * target.h (target_ops) <to_supports_btrace>: Remove
13993         (target_supports_btrace): Remove.
13994         * x86-linux-nat.c (x86_linux_create_target): Remove
13995         linux_supports_btrace.
13996
13997 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13998
13999         * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
14000         btrace failed.
14001         * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
14002         exception and use message in own exception.
14003
14004 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
14005
14006         * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
14007         (perf_event_pt_event_type): Use gdb_file_up.
14008         (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
14009         scoped_fd, and scoped_mmap.
14010
14011 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
14012
14013         * common/scoped_mmap.h: New.
14014         * unittests/scoped_mmap-selftest.c: New.
14015         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
14016         unittests/scoped_mmap-selftest.c.
14017
14018 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
14019
14020         * common/scoped_fd.h: New.
14021         * unittests/scoped_fd-selftest.c: New.
14022         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
14023         unittests/scoped_fd-selftest.c.
14024
14025 2018-02-09  Tom Tromey  <tom@tromey.com>
14026
14027         * auto-load.c (auto_load_section_scripts): Use
14028         gdb::unique_xmalloc_ptr.
14029
14030 2018-02-09  Tom Tromey  <tom@tromey.com>
14031
14032         * auto-load.c (execute_script_contents): Use std::string.
14033
14034 2018-02-09  Joel Brobecker  <brobecker@adacore.com>
14035
14036         * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
14037         Python function, rather than a new command.
14038
14039 2018-02-08  Tom Tromey  <tom@tromey.com>
14040
14041         * solib.c (solib_find_1): Use std::string.
14042         (solib_bfd_fopen): Use unique_xmalloc_ptr.
14043
14044 2018-02-08  Tom Tromey  <tom@tromey.com>
14045
14046         * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
14047
14048 2018-02-08  Tom Tromey  <tom@tromey.com>
14049
14050         * source.c (find_source_lines): Use gdb::def_vector.
14051
14052 2018-02-08  Tom Tromey  <tom@tromey.com>
14053
14054         * macrocmd.c (struct temporary_macro_definition): New.
14055         (macro_define_command): Use temporary_macro_definition.  Remove
14056         cleanups.
14057         (free_macro_definition_ptr): Remove.
14058
14059 2018-02-08  Tom Tromey  <tom@tromey.com>
14060
14061         * macroexp.c (maybe_expand): Use std::string.
14062
14063 2018-02-08  Tom Tromey  <tom@tromey.com>
14064
14065         * macroexp.c (struct macro_buffer): Add initializers for some
14066         members.
14067         (init_buffer, init_shared_buffer, free_buffer)
14068         (free_buffer_return_text): Remove.
14069         (macro_buffer): New constructors.
14070         (~macro_buffer): New destructor.
14071         (macro_buffer::set_shared): New method.
14072         (macro_buffer::resize_buffer, macro_buffer::appendc)
14073         (macro_buffer::appendmem): Now methods, not free functions.
14074         (set_token, append_tokens_without_splicing, stringify)
14075         (macro_stringify): Update.
14076         (gather_arguments): Change return type.  Remove argc_p argument,
14077         add args_ptr argument.  Use std::vector.
14078         (substitute_args): Remove argc argument.  Accept std::vector.
14079         (expand): Update.  Use std::vector.
14080         (scan, macro_expand, macro_expand_next): Update.
14081
14082 2018-02-08  Tom Tromey  <tom@tromey.com>
14083
14084         * symtab.c (default_collect_symbol_completion_matches_break_on):
14085         Use unique_xmalloc_ptr.
14086         * macroscope.h: (sal_macro_scope, user_macro_scope)
14087         (default_macro_scope): Return unique_xmalloc_ptr.
14088         * macroscope.c (sal_macro_scope, user_macro_scope)
14089         (default_macro_scope): Return unique_xmalloc_ptr.
14090         * macroexp.h (macro_expand, macro_expand_once): Return
14091         unique_xmalloc_ptr.
14092         * macroexp.c (macro_expand, macro_expand_once): Return
14093         unique_xmalloc_ptr.
14094         * macrocmd.c (macro_expand_command, macro_expand_once_command)
14095         (info_macro_command, info_macros_command): Use
14096         unique_xmalloc_ptr.
14097         * compile/compile-c-support.c (write_macro_definitions): Use
14098         unique_xmalloc_ptr.
14099         * c-exp.y (c_parse): Use unique_xmalloc_ptr.
14100
14101 2018-02-07  Simon Marchi  <simon.marchi@ericsson.com>
14102
14103         * value.c (value_static_field): Assign field type instead of
14104         containing type when returning an optimized out value.
14105
14106 2018-02-06  Yao Qi  <yao.qi@linaro.org>
14107
14108         * ft32-tdep.c (ft32_read_pc): Remove.
14109         (ft32_write_pc): Remove.
14110         (ft32_gdbarch_init): Update.
14111         * m32r-tdep.c (m32r_read_pc): Remove.
14112         (m32r_gdbarch_init): Update.
14113         * mep-tdep.c (mep_read_pc): Remove.
14114         (mep_gdbarch_init): Update.
14115         * microblaze-tdep.c (microblaze_write_pc): Remove.
14116         (microblaze_gdbarch_init): Update.
14117         * mn10300-tdep.c (mn10300_read_pc): Remove.
14118         (mn10300_write_pc): Remove.
14119         (mn10300_gdbarch_init): Update.
14120         * moxie-tdep.c (moxie_read_pc): Remove.
14121         (moxie_write_pc): Remove.
14122         (moxie_gdbarch_init): Update.
14123
14124 2018-02-06  Yao Qi  <yao.qi@linaro.org>
14125
14126         * expprint.c (print_subexp_standard): Handle
14127         OP_F77_UNDETERMINED_ARGLIST.
14128         (dump_subexp_body_standard): Likewise.
14129
14130 2018-02-05  Alan Hayward  <alan.hayward@arm.com>
14131
14132         * target-descriptions.c (tdesc_element_visitor) Add empty
14133         implementations.
14134         (tdesc_type): Move make_gdb_type from here.
14135         (tdesc_type_builtin): Likewise.
14136         (tdesc_type_vector): Likewise.
14137         (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
14138         (make_gdb_type_struct): Move from tdesc_type_with_fields.
14139         (make_gdb_type_union): Likewise.
14140         (make_gdb_type_flags): Likewise.
14141         (make_gdb_type_enum): Likewise.
14142         (make_gdb_type): New function.
14143         (tdesc_register_type): Use static make_gdb_type.
14144
14145 2018-02-05  Ruslan Kabatsayev <b7.10110111@gmail.com>
14146
14147         * infcmd.c (default_print_one_register_info): Align natural-format
14148         column values consistently one under another.
14149         (pad_to_column): New function.
14150
14151 2018-02-05  Joel Brobecker  <brobecker@adacore.com>
14152
14153         * dwarf2read.c (dwarf2_physname): Move commment.
14154
14155 2018-02-01  Leszek Swirski  <leszeks@google.com>
14156
14157         * varobj.c (varobj_formatted_print_options): Allow recursive
14158         pretty printing if pretty printing is enabled.
14159
14160 2018-02-01  Leszek Swirski  <leszeks@google.com>
14161
14162         * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
14163         names after a structop as a filename.
14164
14165 2018-02-01  Yao Qi  <yao.qi@linaro.org>
14166
14167         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
14168         (arm_record_coproc_data_proc): Likewise.
14169
14170 2018-02-01  Yao Qi  <yao.qi@linaro.org>
14171
14172         * arm-tdep.c (arm_record_extension_space): Change ret to signed.
14173
14174 2018-01-31  Nikola Prica  <nikola.prica@rt-rk.com>
14175
14176         * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
14177         assign shifted lr_reg to fdata->lr_register when lr_reg is set.
14178
14179 2018-01-31  Pedro Alves  <palves@redhat.com>
14180
14181         * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
14182         * inflow.c (child_terminal_save_inferior): Wrap reference to
14183         tcgetpgrp in HAVE_TERMIOS_H.
14184         (child_interrupt, child_pass_ctrlc): Wrap references to signal in
14185         _WIN32.
14186         * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
14187         always iterate over all inferiors.
14188         (gdbsim_cntrl_c): Adjust.
14189         * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
14190
14191 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
14192
14193         * gdbtypes.c (lookup_array_range_type): Make sure the array's
14194         index type is objfile-owned if the element type is as well.
14195
14196 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
14197
14198         GDB 8.1 released.
14199
14200 2018-01-30  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14201
14202         * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
14203         "features/s390x-linux64.c".
14204         (_initialize_s390_linux_tdep): Remove initialization of tdescs
14205         s390_linux32 and s390x_linux64.
14206         (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
14207         default tdesc.
14208         * s390-tdep.c: Include "features/s390-linux32.c" and
14209         "features/s390x-linux64.c".
14210         (s390_tdesc_valid): Add check for tdesc_has_registers.
14211         (s390_gdbarch_init): Make sure there is always a valid tdesc.
14212         (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
14213         tdesc_s390x_linux64.
14214         * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
14215         tdesc_s390x_linux64 to...
14216         * s390-tdep.h: ...here.
14217
14218 2018-01-30  Pedro Alves  <palves@redhat.com>
14219
14220         PR gdb/13211
14221         * config.in, configure: Regenerate.
14222         * configure.ac: Check for getpgid.
14223         * go32-nat.c (go32_pass_ctrlc): New.
14224         (go32_target): Install it.
14225         * inf-child.c (inf_child_target): Install
14226         child_terminal_save_inferior, child_pass_ctrlc and
14227         child_interrupt.
14228         * inf-ptrace.c (inf_ptrace_interrupt): Delete.
14229         (inf_ptrace_target): No longer install it.
14230         * infcmd.c (interrupt_target_1): Adjust.
14231         * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
14232         (child_interrupt): Declare.
14233         (inferior::terminal_state): New.
14234         * inflow.c (struct terminal_info): Update comments.
14235         (inferior_process_group): Delete.
14236         (terminal_is_ours): Delete.
14237         (gdb_tty_state): New.
14238         (child_terminal_init): Adjust.
14239         (is_gdb_terminal, sharing_input_terminal_1)
14240         (sharing_input_terminal): New functions.
14241         (child_terminal_inferior): Adjust.  Use sharing_input_terminal.
14242         Set the process's actual process group in the foreground if
14243         possible.  Handle is_ours_for_output/is_ours distinction.  Don't
14244         mark terminal as the inferior's if not sharing GDB's terminal.
14245         Don't check attach_flag.
14246         (child_terminal_ours_for_output, child_terminal_ours): Adjust to
14247         pass down a target_terminal_state.
14248         (child_terminal_save_inferior): New, factored out from ...
14249         (child_terminal_ours_1): ... this.  Handle
14250         target_terminal_state::is_ours_for_output.
14251         (child_interrupt, child_pass_ctrlc): New.
14252         (inflow_inferior_exit): Clear the inferior's terminal_state.
14253         (copy_terminal_info): Copy the inferior's terminal state.
14254         (_initialize_inflow): Remove reference to terminal_is_ours.
14255         * inflow.h (inferior_process_group): Delete.
14256         * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
14257         * procfs.c (procfs_target): Don't install procfs_interrupt.
14258         (procfs_interrupt): Delete.
14259         * remote.c (remote_serial_quit_handler): Adjust.
14260         (remote_interrupt): Remove ptid parameter.  Adjust.
14261         * target-delegates.c: Regenerate.
14262         * target.c: Include "terminal.h".
14263         (target_terminal::terminal_state): Rename to ...
14264         (target_terminal::m_terminal_state): ... this.
14265         (target_terminal::init): Adjust.
14266         (target_terminal::inferior): Adjust to per-inferior
14267         terminal_state.
14268         (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
14269         (target_terminal::ours, target_terminal::ours_for_output): Use
14270         target_terminal_is_ours_kind.
14271         (target_interrupt): Remove ptid parameter.  Adjust.
14272         (default_target_pass_ctrlc): Adjust.
14273         * target.h (target_ops::to_terminal_save_inferior): New field.
14274         (target_ops::to_interrupt): Remove ptid_t parameter.
14275         (target_interrupt): Remove ptid_t parameter.  Update comment.
14276         (target_pass_ctrlc): Update comment.
14277         * target/target.h (target_terminal_state): New scoped enum,
14278         factored out of ...
14279         (target_terminal::terminal_state): ... here.
14280         (target_terminal::inferior): Update comments.
14281         (target_terminal::restore_inferior): New.
14282         (target_terminal::is_inferior, target_terminal::is_ours)
14283         (target_terminal::is_ours_for_output): Adjust.
14284         (target_terminal::scoped_restore_terminal_state): Adjust to
14285         rename, and call restore_inferior() instead of inferior().
14286         (target_terminal::scoped_restore_terminal_state::m_state): Change
14287         type.
14288         (target_terminal::terminal_state): Rename to ...
14289         (target_terminal::m_terminal_state): ... this and change type.
14290
14291 2018-01-30  Pedro Alves  <palves@redhat.com>
14292
14293         * linux-nat.c (wait_for_signal): New function.
14294         (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
14295         directly.
14296         (async_terminal_is_ours)
14297         (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
14298         (linux_nat_add_target): Don't override
14299         to_terminal_inferior/to_terminal_ours.
14300
14301 2018-01-29  Sergio Durigan Junior  <sergiodj@redhat.com>
14302
14303         * remote.c (remote_follow_fork): Don't call "detach_inferior".
14304
14305 2018-01-28  Simon Marchi  <simon.marchi@ericsson.com>
14306
14307         * dwarf2read.c (free_dwo_files): Add forward-declaration.
14308         (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
14309         dwarf2_per_objfile_free here.
14310         (dwarf2_per_objfile_free): Remove.
14311         (_initialize_dwarf2_read): Don't register
14312         dwarf2_per_objfile_free as a registry cleanup.
14313
14314 2018-01-27  Eli Zaretskii  <eliz@gnu.org>
14315
14316         Avoid compilation errors in MinGW native builds
14317
14318         The error is triggered by including python-internal.h, and the
14319         error message is:
14320
14321              In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
14322                       from build-gnulib/import/math.h:27,
14323                       from d:/usr/Python26/include/pyport.h:235,
14324                       from d:/usr/Python26/include/Python.h:58,
14325                       from python/python-internal.h:94,
14326                       from python/py-arch.c:24:
14327              d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
14328         using ::hypot;
14329                 ^~~~~
14330
14331         This happens because Python headers define 'hypot' to expand t
14332         '_hypot' in the Windows builds.
14333         * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
14334         'hypoth'.  This avoids a compilation error.
14335
14336 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
14337
14338         * MAINTAINERS (Write After Approval): Fix ordering.
14339
14340 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
14341
14342         * MAINTAINERS (Write After Approval): Add Alan Hayward.
14343
14344 2018-01-26  Alan Modra  <amodra@gmail.com>
14345
14346         * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
14347         (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
14348         Remove nop.  Make const.  Comment.
14349         (powerpc32_plt_stub_so_2): New.
14350         (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
14351         Correct count.  Update uses.
14352         (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
14353         Move common code reading PLT entry word.  Correct
14354         powerpc32_plt_stub PLT address calculation.
14355         * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
14356         (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
14357         (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
14358         (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
14359         (ppc64_standard_linkage8): Likewise.
14360         * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
14361         Correct insns description.
14362         * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
14363
14364 2018-01-24  Pedro Alves  <palves@redhat.com>
14365
14366         GCC PR libstdc++/83906
14367         * gdbtypes.c (operator==(const dynamic_prop &,
14368         const dynamic_prop &)): New.
14369         (operator==(const range_bounds &, const range_bounds &)): New.
14370         (check_types_equal): Use them instead of memcmp.
14371         * gdbtypes.h (operator==(const dynamic_prop &,
14372         const dynamic_prop &)): Declare.
14373         (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
14374         (operator==(const range_bounds &, const range_bounds &)): Declare.
14375         (operator!=(const range_bounds &, const range_bounds &)): Declare.
14376
14377 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14378
14379         * s390-linux-tdep.c (s390_record_address_mask)
14380         (s390_record_calc_disp_common, s390_record_calc_disp)
14381         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
14382         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
14383         (s390_process_record): Move to s390-tdep.c.
14384         (s390_linux_init_abi_any): Adjust.
14385         * s390-tdep.c (s390_record_address_mask)
14386         (s390_record_calc_disp_common, s390_record_calc_disp)
14387         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
14388         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
14389         (s390_process_record): Moved from s390-linux-tdep.c
14390         (s390_gdbarch_init): Adjust.
14391
14392 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14393
14394         * s390-linux-nat.c (s390-tdep.h): New include.
14395         * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
14396         (HFILES_NO_SRCDIR): Add s390-tdep.h.
14397         (ALLDEPFILES): Add s390-tdep.c.
14398         * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
14399         * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
14400         * s390-tdep.h: ...this.  New file.
14401         * s390-linux-tdep.c (s390-tdep.h): New include.
14402         (_initialize_s390_tdep): Rename to...
14403         (_initialize_s390_linux_tdep): ...this and adjust.
14404         (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
14405         (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
14406         s390-tdep.h.
14407         (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
14408         (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
14409         (s390_is_partial_instruction, s390_software_single_step)
14410         (is_non_branch_ril, s390_displaced_step_copy_insn)
14411         (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
14412         (s390_prologue_data, s390_addr, s390_store, s390_load)
14413         (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
14414         (s390_register_call_saved, s390_guess_tracepoint_registers)
14415         (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
14416         (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
14417         (s390_pseudo_register_name, s390_pseudo_register_type)
14418         (s390_pseudo_register_read, s390_pseudo_register_write)
14419         (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
14420         (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
14421         (s390_addr_bits_remove, s390_address_class_type_flags)
14422         (s390_address_class_type_flags_to_name)
14423         (s390_address_class_name_to_type_flags, s390_effective_inner_type)
14424         (s390_function_arg_float, s390_function_arg_vector)
14425         (is_power_of_two, s390_function_arg_integer, s390_arg_state)
14426         (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
14427         (s390_frame_align, s390_register_return_value, s390_return_value)
14428         (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
14429         (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
14430         (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
14431         (s390_trad_frame_prev_register, s390_unwind_cache)
14432         (s390_prologue_frame_unwind_cache)
14433         (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
14434         (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
14435         (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
14436         (s390_stub_frame_this_id, s390_stub_frame_prev_register)
14437         (s390_stub_frame_sniffer, s390_stub_frame_unwind)
14438         (s390_frame_base_address, s390_local_base_address)
14439         (s390_frame_base, s390_gcc_target_options)
14440         (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
14441         (s390_validate_reg_range, s390_tdesc_valid)
14442         (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
14443         * s390-tdep.c: ...this.  New file.
14444
14445 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14446
14447         * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
14448         (s390_process_record, s390_gdbarch_tdep_alloc)
14449         (s390_linux_init_abi_any): Use/set new hook.
14450
14451 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14452
14453         * s390-linux-tdep.c (osabi.h): New include.
14454         (s390_linux_init_abi_31, s390_linux_init_abi_64)
14455         (s390_linux_init_abi_any): New functions.
14456         (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
14457
14458 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14459
14460         * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
14461         tdesc_has_registers check
14462
14463 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14464
14465         * s390-linux-tdep.c (s390_tdesc_valid): New function.
14466         (s390_validate_reg_range): New macro.
14467         (s390_gdbarch_init): Adjust.
14468
14469 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14470
14471         * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
14472         (s390_gdbarch_tdep_alloc): Adjust.
14473         (s390_gdbarch_init): Adjust.
14474
14475 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14476
14477         * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
14478         <have_tdb>: Change type to bool.
14479         (s390_gdbarch_tdep_alloc): Adjust.
14480         (s390_gdbarch_init): Adjust.
14481
14482 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14483
14484         * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
14485         (gdbarch_tdep) <have_upper, have_vx>: New fields.
14486         (s390_gdbarch_tdep_alloc): New function.
14487         (s390_gdbarch_init): Allocate tdep at start and use its fields
14488         instead of separate variables.
14489
14490 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14491
14492         * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
14493         when looking for cached gdbarch and add comment for remaining.
14494
14495 2018-01-22  Pedro Alves  <palves@redhat.com>
14496             Sergio Durigan Junior  <sergiodj@redhat.com>
14497
14498         * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
14499         case.
14500
14501 2018-01-22  Maciej W. Rozycki  <macro@mips.com>
14502
14503         * MAINTAINERS: Update my company e-mail address.
14504
14505 2018-01-22  Yao Qi  <yao.qi@linaro.org>
14506
14507         * regcache.c (cooked_write_test): New function.
14508         (_initialize_regcache): Register the test.
14509
14510 2018-01-22  Yao Qi  <yao.qi@linaro.org>
14511
14512         * ia64-tdep.c (ia64_pseudo_register_read): Call
14513         regcache->cooked_read instead of regcache_cooked_read_unsigned.
14514         * m32c-tdep.c (m32c_cat_read): Likewise.
14515         (m32c_r3r2r1r0_read): Likewise.
14516         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
14517         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
14518
14519 2018-01-22  Yao Qi  <yao.qi@linaro.org>
14520
14521         * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
14522         method raw_read instead of regcache_raw_read.
14523         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
14524         * arm-tdep.c (arm_neon_quad_read): Likewise.
14525         * avr-tdep.c (avr_pseudo_register_read): Likewise.
14526         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
14527         * frv-tdep.c (frv_pseudo_register_read): Likewise.
14528         * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
14529         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
14530         (i386_pseudo_register_read_into_value): Likewise.
14531         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
14532         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
14533         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
14534         * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
14535         * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
14536         * sparc-tdep.c (sparc32_pseudo_register_read):  Likewise.
14537         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
14538         * spu-tdep.c (spu_pseudo_register_read_spu):  Likewise.
14539         * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
14540
14541 2018-01-22  Yao Qi  <yao.qi@linaro.org>
14542
14543         * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
14544         * configure.tgt: Remove target mt.
14545         * mt-tdep.c: Remove.
14546         * regcache.c (cooked_read_test): Remove the check for mt.
14547
14548 2018-01-22  Yao Qi  <yao.qi@linaro.org>
14549
14550         * jit.c (jit_frame_prev_register): Call regcache::cooked_read
14551         instead of gdbarch_pseudo_register_read_value.
14552
14553 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
14554
14555         * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
14556         language is Ada.
14557
14558 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
14559
14560         * linespec.c (create_sals_line_offset): Remove code that preserved
14561         the symtab_and_line's line number.
14562
14563 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
14564
14565         * varobj.c (varobj_create): Don't set valid_block when creating a
14566         floating varobj.
14567
14568 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
14569
14570         * varobj.c (varobj_create): Remove out of date comment.
14571
14572 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
14573
14574         PR mi/20395
14575         * ada-exp.y (write_var_from_sym): Pass extra parameter when
14576         updating innermost block.
14577         * parse.c (innermost_block_tracker::update): Take extra type
14578         parameter, and check types match before updating innermost block.
14579         (write_dollar_variable): Update innermost block for registers.
14580         * parser-defs.h (enum innermost_block_tracker_type): New enum.
14581         (innermost_block_tracker::innermost_block_tracker): Initialise
14582         m_types member.
14583         (innermost_block_tracker::reset): Take type parameter.
14584         (innermost_block_tracker::update): Take type parameter, and pass
14585         type through as needed.
14586         (innermost_block_tracker::m_types): New member.
14587         * varobj.c (varobj_create): Pass type when reseting innermost
14588         block.
14589
14590 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
14591
14592         * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
14593         * ada-lang.c (resolve_subexp): Likewise.
14594         * breakpoint.c (set_breakpoint_condition) Likewise.
14595         (watch_command_1) Likewise.
14596         * c-exp.y (variable): Likewise.
14597         * d-exp.y (PrimaryExpression): Likewise.
14598         * f-exp.y (variable): Likewise.
14599         * go-exp.y (variable): Likewise.
14600         * m2-exp.y (variable): Likewise.
14601         * objfiles.c (objfile::~objfile): Likewise.
14602         * p-exp.y (variable): Likewise.
14603         * parse.c (innermost_block): Change type.
14604         * parser-defs.h (class innermost_block_tracker): New.
14605         (innermost_block): Change to innermost_block_tracker.
14606         * printcmd.c (display_command): Switch to innermost_block API.
14607         (do_one_display): Likewise.
14608         * rust-exp.y (do_one_display): Likewise.
14609         * symfile.c (clear_symtab_users): Likewise.
14610         * varobj.c (varobj_create): Switch to innermost_block API, replace
14611         use of innermost_block with block stored on varobj object.
14612
14613 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
14614
14615         * expression.h (innermost_block): Remove declaration.
14616         * varobj.c: Add 'parser-defs.h' include.
14617
14618 2018-01-19  Tom Tromey  <tom@tromey.com>
14619
14620         * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
14621         symbols in the static and global blocks.
14622
14623 2018-01-19  James Clarke  <jrtc27@jrtc27.com>
14624
14625         * nat/linux-ptrace.c: Remove unnecessary reinclusion of
14626         gdb_ptrace.h, and move including gdb_wait.h ...
14627         * nat/linux-ptrace.h: ... to here.
14628
14629 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
14630
14631         * inf-ptrace.c (inf_ptrace_detach): Adjust call to
14632         inf_ptrace_detach_success.
14633         (inf_ptrace_detach_success): Add inferior parameter, use it
14634         instead of inferior_ptid, pass it to detach_inferior.
14635         * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
14636         parameter.
14637         * inferior.c (detach_inferior): Add overload that takes an
14638         inferior object.
14639         * inferior.h (detach_inferior): Likewise.
14640         * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
14641         use inferior_ptid, adjust call to inf_ptrace_detach_success.
14642         * linux-thread-db.c (thread_db_detach): Use inf parameter.
14643
14644 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
14645
14646         * target.h (struct target_ops) <to_detach>: Add inferior
14647         parameter.
14648         (target_detach): Likewise.
14649         * target.c (dispose_inferior): Pass inferior down.
14650         (target_detach): Pass inferior down.  Assert that it is equal to
14651         the current inferior.
14652         * aix-thread.c (aix_thread_detach): Pass inferior down.
14653         * corefile.c (core_file_command): Pass current_inferior() down.
14654         * corelow.c (core_detach): Add inferior parameter.
14655         * darwin-nat.c (darwin_detach): Likewise.
14656         * gnu-nat.c (gnu_detach): Likewise.
14657         * inf-ptrace.c (inf_ptrace_detach): Likewise.
14658         * infcmd.c (detach_command): Pass current_inferior() down to
14659         target_detach.
14660         * infrun.c (follow_fork_inferior): Pass parent_inf to
14661         target_detach.
14662         (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
14663         target_detach.
14664         * linux-nat.c (linux_nat_detach): Add inferior parameter.
14665         * linux-thread-db.c (thread_db_detach): Likewise.
14666         * nto-procfs.c (procfs_detach): Likewise.
14667         * procfs.c (procfs_detach): Likewise.
14668         * record.c (record_detach): Likewise.
14669         * record.h (struct inferior): Forward-declare.
14670         (record_detach): Add inferior parameter.
14671         * remote-sim.c (gdbsim_detach): Likewise.
14672         * remote.c (remote_detach_1): Likewise.
14673         (remote_detach): Likewise.
14674         (extended_remote_detach): Likewise.
14675         * sol-thread.c (sol_thread_detach): Likewise.
14676         * target-debug.h (target_debug_print_inferior_p): New macro.
14677         * target-delegates.c: Re-generate.
14678         * top.c (kill_or_detach): Pass inferior down to target_detach.
14679         * windows-nat.c (windows_detach): Add inferior parameter.
14680
14681 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
14682
14683         * target.h (struct target_ops) <to_detach>: Remove args
14684         parameter.
14685         (target_detach): Likewise.
14686         * target.c (dispose_inferior): Adjust.
14687         (target_detach): Remove args parameter, adjust.
14688         * aix-thread.c (aix_thread_detach): Adjust.
14689         * corefile.c (core_file_command): Adjust.
14690         * corelow.c (core_detach): Adjust.
14691         * darwin-nat.c (darwin_detach): Adjust.
14692         * gnu-nat.c (gnu_detach): Adjust.
14693         * inf-ptrace.c (inf_ptrace_detach): Adjust.
14694         * infcmd.c (detach_command): Adjust
14695         * infrun.c (follow_fork_inferior): Adjust.
14696         (handle_vfork_child_exec_or_exit): Adjust.
14697         * linux-fork.c (linux_fork_detach): Remove args parameter.
14698         * linux-fork.h (linux_fork_detach): Likewise.
14699         * linux-nat.c (linux_nat_detach): Likewise, and adjust.
14700         * linux-thread-db.c (thread_db_detach): Likewise.
14701         * nto-procfs.c (procfs_detach): Likewise.
14702         * procfs.c (procfs_detach): Likewise.
14703         (do_detach): Remove signo parameter.
14704         * record.c (record_detach): Remove args parameter.
14705         * record.h (record_detach): Likewise.
14706         * remote-sim.c (gdbsim_detach): Likewise.
14707         * remote.c (remote_detach_1): Likewise.
14708         (remote_detach): Likewise.
14709         (extended_remote_detach): Likewise.
14710         * sol-thread.c (sol_thread_detach): Likewise.
14711         * target-delegates.c: Re-generate.
14712         * top.c (struct qt_args) <args>: Remove field.
14713         (kill_or_detach): Don't pass args.
14714         (quit_force): Don't set args.
14715         * windows-nat.c (windows_detach): Remove args parameter.
14716
14717 2018-01-19  Yao Qi  <yao.qi@linaro.org>
14718
14719         * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
14720         (arm_linux_init_abi): Install it.
14721
14722 2018-01-19  Yao Qi  <yao.qi@linaro.org>
14723
14724         * osabi.c (gdb_osabi_names): Extend the regexp for
14725         arm-linux-gnueabihf.
14726
14727 2018-01-18  Yao Qi  <yao.qi@linaro.org>
14728
14729         * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
14730         m_abbrevs.
14731         (abbrev_table::add_abbrev): Update.
14732         (abbrev_table::lookup_abbrev): Update.
14733
14734 2018-01-18  Yao Qi  <yao.qi@linaro.org>
14735
14736         * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
14737
14738 2018-01-17  Sergio Durigan Junior  <sergiodj@redhat.com>
14739
14740         * compile/compile.c (compile_to_object): Convert "triplet_rx"
14741         to "std::string".
14742
14743 2018-01-17  Tom Tromey  <tom@tromey.com>
14744
14745         * dwarf2read.c (symbolp): Remove typedef.  Don't instantiate VEC.
14746
14747 2018-01-17  Tom Tromey  <tom@tromey.com>
14748
14749         * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
14750         * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
14751         (create_array_type_with_stride): Update.
14752         * dwarf2read.c (set_die_type): Update.
14753
14754 2018-01-17  Tom Tromey  <tom@tromey.com>
14755
14756         * dwarf2read.c (delayed_method_info): Remove typedef.
14757         (dwarf2_cu::method_info): Now a std::vector.
14758         (add_to_method_list): Update.
14759         (free_delayed_list): Remove.
14760         (compute_delayed_physnames): Update.
14761         (process_full_comp_unit, process_full_type_unit): Clear the method
14762         list.  Remove cleanups.
14763         (psymtab_include_file_name): Add name_holder parameter.  Use
14764         unique_xmalloc_ptr.
14765         (dwarf_decode_lines): Update.
14766
14767 2018-01-17  Tom Tromey  <tom@tromey.com>
14768             Simon Marchi  <simon.marchi@ericsson.com>
14769
14770         * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
14771         (dwarf2_per_objfile::free_cached_comp_units)
14772         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
14773         (init_cutu_and_read_dies_no_follow): Update.
14774         (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
14775         (dwarf2_cu::~dwarf2_cu): New.
14776         (free_heap_comp_unit, free_stack_comp_unit): Remove.
14777         (age_cached_comp_units, free_one_cached_comp_unit): Update.
14778
14779 2018-01-17  Tom Tromey  <tom@tromey.com>
14780             Simon Marchi  <simon.marchi@ericsson.com>
14781
14782         * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
14783         (struct die_reader_specs) <abbrev_table>: New member.
14784         (struct abbrev_table): Add constructor.
14785         <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
14786         <abbrev_obstack>: Now an auto_obstack.
14787         (abbrev_table_up): New typedef.
14788         (init_cu_die_reader): Add abbrev_table parameter.
14789         (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
14790         Add result_dwo_abbrev_table.
14791         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
14792         (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
14793         Update.
14794         (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
14795         parameter.
14796         (skip_children): Update.
14797         (abbrev_table::alloc_abbrev): Rename from
14798         abbrev_table_alloc_abbrev.
14799         (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
14800         (abbrev_table::lookup_abbrev): Rename from
14801         abbrev_table_lookup_abbrev.
14802         (abbrev_table_read_table): Return abbrev_table_up.
14803         (abbrev_table_free, abbrev_table_free_cleanup)
14804         (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
14805         (load_partial_dies): Update.
14806
14807 2018-01-17  Tom Tromey  <tom@tromey.com>
14808
14809         * dwarf2read.c (dwarf2_compute_name): Update comment.
14810         (read_func_scope, read_variable): Update.
14811         (new_symbol): Remove.
14812         (new_symbol_full): Rename to new_symbol.
14813
14814 2018-01-17  Mike Gulick  <mgulick@mathworks.com>
14815
14816         PR gdb/16577
14817         * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
14818         a warning instead of throwing an error, set section size to 0 and return
14819         NULL.
14820         * gdb_bfd.h (gdb_bfd_map_section): Update description.
14821
14822 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
14823
14824         * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
14825         std::string.
14826         (linux_ptrace_attach_fail_reason_string): Likewise.
14827         * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
14828         Likewise.
14829         (linux_ptrace_attach_fail_reason_string): Likewise.
14830         * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
14831
14832 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
14833
14834         * linux-nat.c (linux_nat_attach): Remove xstrdup.
14835
14836 2018-01-17  Eldar Abusalimov  <eldar.abusalimov@jetbrains.com>
14837
14838         PR gdb/21559
14839         * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
14840         checking for fs_base/gs_base fields in struct user_regs_struct.
14841         * configure: Regenerate.
14842
14843 2018-01-17  Yao Qi  <yao.qi@linaro.org>
14844
14845         * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
14846         function.
14847         (aarch64_linux_init_abi): Install it to gdbarch hook
14848         gcc_target_options.
14849
14850 2018-01-15  Pedro Alves  <palves@redhat.com>
14851
14852         * common/signals-state-save-restore.c
14853         (save_original_signals_state): Fix typos.
14854
14855 2017-01-12  Tom Tromey  <tom@tromey.com>
14856             Sergio Durigan Junior  <sergiodj@redhat.com>
14857
14858         * Makefile.in (install-only): Install gdb-add-index.
14859
14860 2018-01-12  John Baldwin  <jhb@FreeBSD.org>
14861
14862         * fbsd-tdep.c (KVE_PROTECTION): Correct value.
14863
14864 2018-01-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
14865
14866         * infrun.c (keep_going_pass_signal): Clear step-over info when
14867         insert_breakpoints fails.
14868
14869 2018-01-11  Pedro Alves  <palves@redhat.com>
14870
14871         PR gdb/22583
14872         * infrun.c (resume): Rename to ...
14873         (resume_1): ... this.
14874         (resume): Reimplement as wrapper around resume_1.
14875
14876 2018-01-11  Pedro Alves  <palves@redhat.com>
14877
14878         PR remote/22597
14879         * remote.c (remote_parse_stop_reply): Default to the last-set
14880         general thread instead of to 'magic_null_ptid'.
14881
14882 2018-01-10  Pedro Alves  <palves@redhat.com>
14883
14884         * language.h (language_get_symbol_name_matcher): Rename ...
14885         (get_symbol_name_matcher): ... this.
14886         * language.c (language_get_symbol_name_matcher): Ditto.
14887         * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
14888         callers adjusted.
14889
14890 2018-01-10  Pedro Alves  <palves@redhat.com>
14891
14892         PR gdb/22670
14893         * dwarf2read.c
14894         (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
14895         Adjust to use language_get_symbol_name_matcher instead of
14896         language_defn::la_get_symbol_name_matcher.
14897         * language.c (language_get_symbol_name_matcher): If in Ada mode
14898         and the lookup name is a verbatim match, return Ada's matcher.
14899         * language.h (language_get_symbol_name_matcher): Adjust comment.
14900         (ada_lookup_name_info::verbatim_p):: New method.
14901
14902 2018-01-10  Pedro Alves  <palves@redhat.com>
14903
14904         PR gdb/22670
14905         * ada-lang.c (ada_collect_symbol_completion_matches): If the
14906         minsym's language is language_auto or language_cplus, pass down
14907         language_ada instead.
14908         * symtab.c (compare_symbol_name): Don't frob symbol language here.
14909
14910 2018-01-10  Pedro Alves  <palves@redhat.com>
14911
14912         PR gdb/22670
14913         * minsyms.c (linkage_name_str): New function.
14914         (iterate_over_minimal_symbols): Use it.
14915
14916 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
14917
14918         * NEWS: Document that 'info proc' now works on FreeBSD.
14919
14920 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
14921
14922         * configure.ac: Check for kinfo_getfile in libutil.
14923         * configure: Regenerate.
14924         * config.in: Regenerate.
14925         * fbsd-nat.c: Include "fbsd-tdep.h".
14926         (fbsd_fetch_cmdline): New.
14927         (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
14928         rather than calling error.
14929         (fbsd_info_proc): New.
14930         (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
14931         (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
14932         (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
14933
14934 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
14935
14936         * fbsd-nat.c (struct free_deleter): Remove.
14937         (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
14938
14939 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
14940
14941         * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
14942         NULL for an empty pathname.
14943
14944 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
14945
14946         * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
14947         (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
14948         (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
14949         (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
14950         (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
14951         (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
14952         (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
14953         (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
14954         (kinfo_proc_layout_32, kinfo_proc_layout_i386)
14955         (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
14956         (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
14957         (fbsd_core_fetch_timeval, fbsd_print_sigset)
14958         (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
14959         (fbsd_init_abi):  Install gdbarch "core_info_proc" method.
14960         * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
14961
14962 2018-01-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>
14963
14964         * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
14965         (gnu_xfer_auxv): New function.
14966         (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
14967         TARGET_OBJECT_AUXV.
14968
14969 2018-01-08  Yao Qi  <yao.qi@linaro.org>
14970             Simon Marchi  <simon.marchi@ericsson.com>
14971
14972         * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
14973         common/selftest.c.
14974         (COMMON_OBS): Remove selftest.o.
14975         * configure.ac: Append selftest-arch.c and common/selftest.c to
14976         CONFIG_SRCS.  Append selftest-arch.o and selftest.o to COMMON_OBS.
14977         * configure: Re-generated.
14978         * maint.c (maintenance_selftest): Wrap selftests::run_tests with
14979         GDB_SELF_TEST.
14980         (maintenance_info_selftests): Likewise.
14981
14982 2018-01-08  Xavier Roirand  <roirand@adacore.com>
14983
14984         * ada-valprint.c (val_print_packed_array_elements): Use
14985         proper number of elements when printing an array indexed
14986         by an enumeration type.
14987
14988 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
14989
14990         * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
14991         (dw2_get_file_names_reader): Adjust.
14992         (lookup_dwo_signatured_type): Adjust.
14993         (lookup_dwp_signatured_type): Adjust.
14994         (lookup_signatured_type): Adjust.
14995         (create_type_unit_group): Adjust.
14996         (get_type_unit_group): Adjust.
14997         (process_psymtab_comp_unit_reader): Adjust.
14998         (build_type_psymtabs_reader): Adjust.
14999         (scan_partial_symbols): Adjust.
15000         (add_partial_symbol): Adjust.
15001         (add_partial_subprogram): Adjust.
15002         (peek_die_abbrev): Adjust.
15003         (fixup_go_packaging): Adjust.
15004         (process_imported_unit_die): Adjust.
15005         (dwarf2_compute_name): Adjust.
15006         (dwarf2_physname): Adjust.
15007         (read_import_statement): Adjust.
15008         (handle_DW_AT_stmt_list): Adjust.
15009         (read_file_scope): Adjust.
15010         (read_func_scope): Adjust.
15011         (read_lexical_block_scope): Adjust.
15012         (read_call_site_scope): Adjust.
15013         (read_variable): Adjust.
15014         (dwarf2_rnglists_process): Adjust.
15015         (dwarf2_ranges_process): Adjust.
15016         (dwarf2_ranges_read): Adjust.
15017         (dwarf2_get_pc_bounds): Adjust.
15018         (dwarf2_record_block_ranges): Adjust.
15019         (dwarf2_add_field): Adjust.
15020         (dwarf2_add_member_fn): Adjust.
15021         (read_structure_type): Adjust.
15022         (process_structure_scope): Adjust.
15023         (read_enumeration_type): Adjust.
15024         (read_array_type): Adjust.
15025         (mark_common_block_symbol_computed): Adjust.
15026         (read_common_block): Adjust.
15027         (read_namespace_type): Adjust.
15028         (read_namespace): Adjust.
15029         (read_module_type): Adjust.
15030         (read_tag_pointer_type): Adjust.
15031         (read_tag_ptr_to_member_type): Adjust.
15032         (read_tag_string_type): Adjust.
15033         (read_subroutine_type): Adjust.
15034         (read_typedef): Adjust.
15035         (read_base_type): Adjust.
15036         (attr_to_dynamic_prop): Adjust.
15037         (read_subrange_type): Adjust.
15038         (read_unspecified_type): Adjust.
15039         (dwarf2_read_abbrevs): Adjust.
15040         (load_partial_dies): Adjust.
15041         (read_partial_die): Adjust.
15042         (find_partial_die): Adjust.
15043         (guess_partial_die_structure_name): Adjust.
15044         (fixup_partial_die): Adjust.
15045         (read_attribute_value): Adjust.
15046         (read_addr_index): Adjust.
15047         (read_addr_index_from_leb128): Adjust.
15048         (read_str_index): Adjust.
15049         (dwarf2_string_attr): Adjust.
15050         (get_debug_line_section): Adjust.
15051         (dwarf_decode_line_header): Adjust.
15052         (lnp_state_machine::check_line_address): Adjust.
15053         (dwarf_decode_lines_1): Adjust.
15054         (dwarf_decode_lines): Adjust.
15055         (dwarf2_start_symtab): Adjust.
15056         (var_decode_location): Adjust.
15057         (new_symbol_full): Adjust.
15058         (dwarf2_const_value_data): Adjust.
15059         (dwarf2_const_value_attr): Adjust.
15060         (dwarf2_const_value): Adjust.
15061         (die_type): Adjust.
15062         (die_containing_type): Adjust.
15063         (build_error_marker_type): Adjust.
15064         (lookup_die_type): Adjust.
15065         (guess_full_die_structure_name): Adjust.
15066         (anonymous_struct_prefix): Adjust.
15067         (determine_prefix): Adjust.
15068         (dwarf2_name): Adjust.
15069         (follow_die_ref_or_sig): Adjust.
15070         (follow_die_offset): Adjust.
15071         (follow_die_ref): Adjust.
15072         (follow_die_sig_1): Adjust.
15073         (follow_die_sig): Adjust.
15074         (get_signatured_type): Adjust.
15075         (get_DW_AT_signature_type): Adjust.
15076         (decode_locdesc): Adjust.
15077         (dwarf_decode_macros): Adjust.
15078         (cu_debug_loc_section): Adjust.
15079         (fill_in_loclist_baton): Adjust.
15080         (dwarf2_symbol_mark_computed): Adjust.
15081         (init_one_comp_unit): Don't assign
15082         dwarf2_cu::dwarf2_per_objfile.
15083         (set_die_type): Adjust.
15084
15085 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
15086
15087         * dwarf2read.c (struct mapped_debug_names): Add constructor.
15088         <dwarf2_per_objfile>: New field.
15089         (dwarf2_per_objfile): Remove global.
15090         (get_dwarf2_per_objfile): New function.
15091         (set_dwarf2_per_objfile): New function.
15092         (dwarf2_build_psymtabs_hard): Change objfile parameter to
15093         dwarf2_per_objfile.
15094         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
15095         (read_abbrev_offset): Likewise.
15096         (read_indirect_string): Likewise.
15097         (read_indirect_line_string): Likewise.
15098         (read_indirect_string_at_offset): Likewise.
15099         (read_indirect_string_from_dwz): Likewise.
15100         (dwarf2_find_containing_comp_unit): Change objfile parameter to
15101         dwarf2_per_objfile.
15102         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
15103         (create_all_comp_units): Change objfile parameter to
15104         dwarf2_per_objfile.
15105         (create_all_type_units): Likewise.
15106         (process_queue): Add dwarf2_per_objfile parameter.
15107         (read_and_check_comp_unit_head): Likewise.
15108         (lookup_dwo_unit_in_dwp): Likewise.
15109         (get_dwp_file): Likewise.
15110         (process_cu_includes): Likewise.
15111         (struct free_dwo_file_cleanup_data): New struct.
15112         (dwarf2_has_info): Use get_dwarf2_per_objfile and
15113         set_dwarf2_per_objfile.
15114         (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
15115         (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
15116         context, adjust calls.
15117         (dw2_instantiate_symtab): Likewise.
15118         (dw2_get_cutu): Add dwarf2_per_objfile parameter.
15119         (dw2_get_cu): Likewise.
15120         (create_cu_from_index_list): Change objfile parameter to
15121         dwarf2_per_objfile.
15122         (create_cus_from_index_list): Get dwarf2_per_objfile from
15123         context, adjust calls.
15124         (create_cus_from_index): Likewise.
15125         (create_signatured_type_table_from_index): Change objfile
15126         parameter to dwarf2_per_objfile.
15127         (create_signatured_type_table_from_debug_names): Change objfile
15128         parameter to dwarf2_per_objfile.
15129         (create_addrmap_from_index): Likewise.
15130         (create_addrmap_from_aranges): Likewise.
15131         (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
15132         (dw2_setup): Remove.
15133         (dw2_get_file_names_reader): Get dwarf2_per_objfile from
15134         context.
15135         (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
15136         get_dwarf2_per_objfile.
15137         (dw2_forget_cached_source_info): Likewise.
15138         (dw2_map_symtabs_matching_filename): Likewise.
15139         (struct dw2_symtab_iterator) <index>: Remove.
15140         <dwarf2_per_objfile>: New field.
15141         (dw2_symtab_iter_init): Replace index parameter with
15142         dwarf2_per_objfile.
15143         (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
15144         (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
15145         (dw2_print_stats): Likewise.
15146         (dw2_dump): Likewise.
15147         (dw2_expand_symtabs_for_function): Likewise.
15148         (dw2_expand_all_symtabs): Likewise.
15149         (dw2_expand_symtabs_with_fullname): Likewise.
15150         (dw2_expand_marked_cus): Replace index and objfile parameters
15151         with dwarf2_per_objfile.
15152         (dw_expand_symtabs_matching_file_matcher): Add
15153         dwarf2_per_objfile parameter and adjust calls.
15154         (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
15155         adjust calls.
15156         (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
15157         (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
15158         adjust calls.
15159         (create_cus_from_debug_names_list): Replace objfile parameter
15160         with dwarf2_per_objfile and adjust calls.
15161         (create_cus_from_debug_names): Likewise.
15162         (dwarf2_read_debug_names): Likewise.
15163         (mapped_debug_names::namei_to_name): Adjust call.
15164         (dw2_debug_names_iterator::next): Likewise.
15165         (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
15166         (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
15167         (dw2_debug_names_dump): Likewise.
15168         (dw2_debug_names_expand_symtabs_for_function): Likewise.
15169         (dw2_debug_names_expand_symtabs_matching): Likewise.
15170         (dwarf2_initialize_objfile): Likewise.
15171         (dwarf2_build_psymtabs): Likewise.
15172         (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
15173         this_cu.
15174         (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
15175         (read_and_check_comp_unit_head): Likewise.
15176         (read_abbrev_offset): Likewise.
15177         (create_debug_type_hash_table): Likewise.
15178         (create_debug_types_hash_table): Likewise.
15179         (create_all_type_units): Replace objfile parameter with
15180         dwarf2_per_objfile.
15181         (add_type_unit): Add dwarf2_per_objfile parameter.
15182         (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
15183         with dwarf2_per_objfile.
15184         (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
15185         (lookup_dwp_signatured_type): Likewise.
15186         (lookup_signatured_type): Likewise.
15187         (read_cutu_die_from_dwo): Likewise.
15188         (init_tu_and_read_dwo_dies): Likewise.
15189         (init_cutu_and_read_dies): Likewise.
15190         (init_cutu_and_read_dies_no_follow): Likewise.
15191         (allocate_type_unit_groups_table): Add objfile parameter.
15192         (create_type_unit_group): Use dwarf2_per_objfile from cu.
15193         (get_type_unit_group): Likewise.
15194         (process_psymtab_comp_unit): Update call.
15195         (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
15196         (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
15197         (print_tu_stats): Likewise.
15198         (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
15199         in void* parameter.
15200         (build_type_psymtabs): Change objfile parameter to
15201         dwarf2_per_objfile.
15202         (process_skeletonless_type_unit): Use dwarf2_per_objfile
15203         passed in void* parameter.
15204         (process_skeletonless_type_units): Change objfile parameter to
15205         dwarf2_per_objfile.
15206         (set_partial_user): Likewise.
15207         (dwarf2_build_psymtabs_hard): Likewise.
15208         (read_comp_units_from_section): Likewise.
15209         (create_all_comp_units): Likewise.
15210         (scan_partial_symbols): Update calls.
15211         (add_partial_symbol): Likewise.
15212         (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
15213         (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
15214         (process_queue): Add dwarf2_per_objfile parameter.
15215         (get_compunit_symtab): Use dwarf2_per_objfile from cu.
15216         (compute_compunit_symtab_includes): Likewise.
15217         (process_cu_includes): Add dwarf2_per_objfile parameter.
15218         (process_full_comp_unit): Use dwarf2_per_objfile from cu.
15219         (process_full_type_unit): Likewise.
15220         (process_imported_unit_die): Update call.
15221         (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
15222         (read_file_scope): Likewise.
15223         (allocate_dwo_file_hash_table): Add objfile parameter.
15224         (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
15225         (create_cus_hash_table): Likewise.
15226         (create_dwp_hash_table): Likewise.
15227         (create_dwo_unit_in_dwp_v1): Likewise.
15228         (create_dwp_v2_section): Likewise.
15229         (create_dwo_unit_in_dwp_v2): Likewise.
15230         (lookup_dwo_unit_in_dwp): Likewise.
15231         (try_open_dwop_file): Likewise.
15232         (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
15233         (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
15234         cleanup to include a reference to dwarf2_per_objfile.
15235         (open_dwp_file): Add dwarf2_per_objfile parameter.
15236         (open_and_init_dwp_file): Likewise.
15237         (get_dwp_file): Likewise.
15238         (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
15239         (queue_and_load_all_dwo_tus): Update call.
15240         (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
15241         data.
15242         (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
15243         (dwarf2_ranges_process): Likewise.
15244         (dwarf2_get_pc_bounds): Likewise.
15245         (mark_common_block_symbol_computed): Likewise.
15246         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
15247         (dwarf2_read_abbrevs): Update call.
15248         (read_partial_die): Use dwarf2_per_objfile from cu.
15249         (find_partial_die): Likewise.
15250         (fixup_partial_die): Likewise.
15251         (read_attribute_value): Likewise.
15252         (read_indirect_string_at_offset_from): Add objfile parameter.
15253         (read_indirect_string_at_offset): Add dwarf2_per_objfile
15254         parameter.
15255         (read_indirect_string_from_dwz): Add objfile parameter.
15256         (read_indirect_string): Add objfile parameter.
15257         (read_addr_index_1): Add dwarf2_per_objfile parameter.
15258         (read_addr_index): Use dwarf2_per_objfile from cu.
15259         (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
15260         call dw2_setup.
15261         (read_str_index): Use dwarf2_per_objfile from cu.
15262         (get_debug_line_section): Likewise.
15263         (read_formatted_entries): Add dwarf2_per_objfile parameter.
15264         (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
15265         (new_symbol_full): Use dwarf2_per_objfile from cu.
15266         (build_error_marker_type): Likewise.
15267         (lookup_die_type): Likewise.
15268         (determine_prefix): Likewise.
15269         (follow_die_offset): Likewise.
15270         (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
15271         (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
15272         (dwarf2_fetch_die_type_sect_off): Likewise.
15273         (dwarf2_get_die_type): Likewise.
15274         (follow_die_sig_1): Use dwarf2_per_objfile from cu.
15275         (get_signatured_type): Likewise.
15276         (get_DW_AT_signature_type): Likewise.
15277         (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
15278         (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
15279         (cu_debug_loc_section): Likewise.
15280         (fill_in_loclist_baton): Likewise.
15281         (dwarf2_symbol_mark_computed): Likewise.
15282         (dwarf2_find_containing_comp_unit): Change objfile parameter to
15283         dwarf2_per_objfile.
15284         (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
15285         parameter.
15286         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
15287         (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
15288         (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
15289         (set_die_type): Use dwarf2_free_objfile from cu.
15290         (get_die_type_at_offset): Likewise.
15291         (dwarf2_per_objfile_free): Don't assign global variable.
15292         (debug_names) <constructor>: Add dwarf2_per_objfile
15293         parameter, update m_debugstrlookup construction.
15294         (debug_names::debug_str_lookup): Add dwarf2_per_objfile
15295         parameter.
15296         <m_dwarf2_per_objfile>: New field.
15297         <lookup>: Use m_dwarf2_per_objfile.
15298         (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
15299         (psyms_seen_size): Likewise.
15300         (write_gdbindex): Replace objfile parameter with
15301         dwarf2_per_objfile.
15302         (write_debug_names): Likewise.
15303         (write_psymtabs_to_index): Likewise.
15304         (save_gdb_index_command): Use get_dwarf2_per_objfile, update
15305         calls.
15306
15307 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
15308
15309         * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
15310         <dwarf2_per_objfile>: New field.
15311         (struct dwarf2_per_cu_data) <objfile>: Remove.
15312         <dwarf2_per_objfile>: New field.
15313         (create_cu_from_index_list): Assign dwarf2_per_objfile instead
15314         of objfile.
15315         (create_signatured_type_table_from_index): Likewise.
15316         (create_debug_type_hash_table): Likewise.
15317         (fill_in_sig_entry_from_dwo_entry): Likewise.
15318         (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
15319         (create_type_unit_group): Assign dwarf2_per_objfile instead of
15320         objfile.
15321         (create_partial_symtab): Access objfile through
15322         dwarf2_per_objfile.
15323         (process_psymtab_comp_unit_reader): Likewise.
15324         (read_comp_units_from_section): Likewise.
15325         (scan_partial_symbols): Likewise.
15326         (add_partial_symbol): Likewise.
15327         (add_partial_subprogram): Likewise.
15328         (peek_die_abbrev): Likewise.
15329         (fixup_go_packaging): Likewise.
15330         (process_full_comp_unit): Likewise.
15331         (process_full_type_unit): Likewise.
15332         (process_imported_unit_die): Likewise.
15333         (dwarf2_compute_name): Likewise.
15334         (dwarf2_physname): Likewise.
15335         (read_import_statement): Likewise.
15336         (create_cus_hash_table): Assign dwarf2_physname instead of
15337         objfile.
15338         (read_func_scope): Access objfile through dwarf2_per_objfile.
15339         (read_lexical_block_scope): Likewise.
15340         (read_call_site_scope): Likewise.
15341         (read_variable): Likewise.
15342         (dwarf2_rnglists_process): Likewise.
15343         (dwarf2_ranges_process): Likewise.
15344         (dwarf2_ranges_read): Likewise.
15345         (dwarf2_record_block_ranges): Likewise.
15346         (dwarf2_add_field): Likewise.
15347         (dwarf2_add_member_fn): Likewise.
15348         (read_structure_type): Likewise.
15349         (process_structure_scope): Likewise.
15350         (read_enumeration_type): Likewise.
15351         (read_array_type): Likewise.
15352         (read_common_block): Likewise.
15353         (read_namespace_type): Likewise.
15354         (read_namespace): Likewise.
15355         (read_module_type): Likewise.
15356         (read_tag_pointer_type): Likewise.
15357         (read_tag_ptr_to_member_type): Likewise.
15358         (read_tag_string_type): Likewise.
15359         (read_subroutine_type): Likewise.
15360         (read_typedef): Likewise.
15361         (read_base_type): Likewise.
15362         (attr_to_dynamic_prop): Likewise.
15363         (read_subrange_type): Likewise.
15364         (read_unspecified_type): Likewise.
15365         (load_partial_dies): Likewise.
15366         (read_partial_die): Likewise.
15367         (find_partial_die): Likewise.
15368         (guess_partial_die_structure_name): Likewise.
15369         (fixup_partial_die): Likewise.
15370         (read_attribute_value): Likewise.
15371         (read_addr_index_from_leb128): Likewise.
15372         (dwarf2_read_addr_index): Likewise.
15373         (dwarf2_string_attr): Likewise.
15374         (lnp_state_machine::check_line_address): Likewise.
15375         (dwarf_decode_lines_1): Likewise.
15376         (dwarf_decode_lines): Likewise.
15377         (dwarf2_start_symtab): Likewise.
15378         (var_decode_location): Likewise.
15379         (new_symbol_full): Likewise.
15380         (dwarf2_const_value_data): Likewise.
15381         (dwarf2_const_value_attr): Likewise.
15382         (dwarf2_const_value): Likewise.
15383         (die_type): Likewise.
15384         (die_containing_type): Likewise.
15385         (lookup_die_type): Likewise.
15386         (guess_full_die_structure_name): Likewise.
15387         (anonymous_struct_prefix): Likewise.
15388         (dwarf2_name): Likewise.
15389         (follow_die_ref_or_sig): Likewise.
15390         (follow_die_offset): Likewise.
15391         (follow_die_ref): Likewise.
15392         (dwarf2_fetch_die_loc_sect_off): Likewise.
15393         (dwarf2_fetch_constant_bytes): Likewise.
15394         (dwarf2_fetch_die_type_sect_off): Likewise.
15395         (dwarf2_get_die_type): Likewise.
15396         (follow_die_sig): Likewise.
15397         (decode_locdesc): Likewise.
15398         (dwarf2_per_cu_objfile): Likewise.
15399         (dwarf2_per_cu_text_offset): Likewise.
15400         (init_one_comp_unit): Assign dwarf2_per_objfile instead of
15401         objfile.
15402         (set_die_type): Access objfile through
15403         dwarf2_per_objfile.
15404
15405 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
15406
15407         * valprint.c (converted_character_d): Remove typedef.
15408         (DEF_VEC_O (converted_character_d)): Remove.
15409         (count_next_character): Use std::vector.
15410         (print_converted_chars_to_obstack): Likewise.
15411         (generic_printstr): Likewise.
15412
15413 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
15414
15415         * xml-support.h (struct gdb_xml_value): Add constructor.
15416         <value>: Change type to unique_xmalloc_ptr.
15417         (gdb_xml_value_s): Remove typedef.
15418         (DEF_VEC_O (gdb_xml_value_s)): Remove.
15419         (gdb_xml_element_start_handler): Change parameter type to
15420         std::vector.
15421         (xml_find_attribute): Likewise.
15422         * xml-support.c (xml_find_attribute): Change parameter type to
15423         std::vector and adjust.
15424         (gdb_xml_values_cleanup): Remove.
15425         (gdb_xml_parser::start_element): Adjust to std::vector.
15426         (xinclude_start_include): Change paraeter type to std::vector
15427         and adjust.
15428         * btrace.c (check_xml_btrace_version): Likewise.
15429         (parse_xml_btrace_block): Likewise.
15430         (parse_xml_btrace_pt_config_cpu): Likewise.
15431         (parse_xml_btrace_pt): Likewise.
15432         (parse_xml_btrace_conf_bts): Likewise.
15433         (parse_xml_btrace_conf_pt): Likewise.
15434         * memory-map.c (memory_map_start_memory): Likewise.
15435         (memory_map_start_property): Likewise.
15436         * osdata.c (osdata_start_osdata): Likewise.
15437         (osdata_start_item): Likewise.
15438         (osdata_start_column): Likewise.
15439         * remote.c (start_thread): Likewise.
15440         * solib-aix.c (library_list_start_library): Likewise.
15441         (library_list_start_list): Likewise.
15442         * solib-svr4.c (library_list_start_library): Likewise.
15443         (svr4_library_list_start_list): Likewise.
15444         * solib-target.c (library_list_start_segment): Likewise.
15445         (library_list_start_section): Likewise.
15446         (library_list_start_library): Likewise.
15447         (library_list_start_list): Likewise.
15448         * tracepoint.c (traceframe_info_start_memory): Likewise.
15449         (traceframe_info_start_tvar): Likewise.
15450         * xml-syscall.c (syscall_start_syscall): Likewise.
15451         * xml-tdesc.c (tdesc_start_target): Likewise.
15452         (tdesc_start_feature): Likewise.
15453         (tdesc_start_reg): Likewise.
15454         (tdesc_start_union): Likewise.
15455         (tdesc_start_struct): Likewise.
15456         (tdesc_start_flags): Likewise.
15457         (tdesc_start_enum): Likewise.
15458         (tdesc_start_field): Likewise.
15459         (tdesc_start_enum_value): Likewise.
15460         (tdesc_start_vector): Likewise.
15461
15462 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
15463
15464         * extension.h (struct xmethod_worker) <clone>: Remove.
15465         * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
15466         Remove.
15467         (python_xmethod_worker::clone): Remove.
15468         * valops.c (find_overload_match): Use std::move instead of
15469         clone.
15470
15471 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
15472
15473         * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
15474         (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
15475         <free_xmethod_worker_data>: Remove.
15476         <get_matching_xmethod_workers>: Chance VEC to std::vector.
15477         <get_xmethod_arg_types>: Remove.
15478         <get_xmethod_result_type>: Remove.
15479         <invoke_xmethod>: Remove.
15480         * extension.c (new_xmethod_worker): Remove.
15481         (clone_xmethod_worker): Remove.
15482         (get_matching_xmethod_workers): Return void, pass std::vector by
15483         pointer.
15484         (get_xmethod_arg_types): Rename to...
15485         (xmethod_worker::get_arg_types): ... this, and adjust.
15486         (get_xmethod_result_type): Rename to...
15487         (xmethod_worker::get_result_type): ... this, and adjust.
15488         (invoke_xmethod): Remove.
15489         (free_xmethod_worker): Remove.
15490         (free_xmethod_worker_vec): Remove.
15491         * extension.h (enum ext_lang_rc): Move here from
15492         extension-priv.h.
15493         (struct xmethod_worker): Add constructor and destructor.
15494         <data>: Remove.
15495         <value>: Remove.
15496         <invoke, clone, do_get_result_type, do_get_arg_types>: New
15497         virtual pure methods.
15498         <get_arg_types, get_result_type>: New methods.
15499         (xmethod_worker_ptr): Remove typedef.
15500         (DEF_VEC_P (xmethod_worker_ptr)): Remove.
15501         (xmethod_worker_vec): Remove typedef.
15502         (xmethod_worker_up): New typedef.
15503         (invoke_xmethod): Remove.
15504         (clone_xmethod_worker): Remove.
15505         (free_xmethod_worker): Remove.
15506         (free_xmethod_worker_vec): Remove.
15507         (get_xmethod_arg_types): Remove.
15508         (get_xmethod_result_type): Remove.
15509         * valops.c (find_method_list): Use std::vector, don't use
15510         intermediate vector.
15511         (value_find_oload_method_list): Use std::vector.
15512         (find_overload_match): Use std::vector.
15513         (find_oload_champ): Use std::vector.
15514         * value.c (value_free): Use operator delete.
15515         (value_of_xmethod): Rename to...
15516         (value_from_xmethod): ... this.  Don't assign
15517         xmethod_worker::value, take rvalue-reference.
15518         (result_type_of_xmethod): Adjust.
15519         (call_xmethod): Adjust.
15520         * value.h: Include extension.h.
15521         (struct xmethod_worker): Don't forward-declare.
15522         (value_of_xmethod): Rename to...
15523         (value_from_xmethod): ... this, take rvalue-reference.
15524         * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
15525         (struct python_xmethod_worker): ... this, add constructor and
15526         destructor.
15527         <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
15528         (gdbpy_free_xmethod_worker_data): Rename to...
15529         (python_xmethod_worker::~python_xmethod_worker): ... this and
15530         adjust.
15531         (gdbpy_clone_xmethod_worker_data): Rename to...
15532         (python_xmethod_worker::clone): ... this and adjust.
15533         (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
15534         temporary vector.
15535         (gdbpy_get_xmethod_arg_types): Rename to...
15536         (python_xmethod_worker::do_get_arg_types): ... this and adjust.
15537         (gdbpy_get_xmethod_result_type): Rename to...
15538         (python_xmethod_worker::do_get_result_type): ... this and
15539         adjust.
15540         (gdbpy_invoke_xmethod): Rename to...
15541         (python_xmethod_worker::invoke): ... this and adjust.
15542         (new_python_xmethod_worker): Rename to...
15543         (python_xmethod_worker::python_xmethod_worker): ... this and
15544         adjust.
15545         * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
15546         Remove.
15547         (gdbpy_free_xmethod_worker_data): Remove.
15548         (gdbpy_get_matching_xmethod_workers): Use std::vector.
15549         (gdbpy_get_xmethod_arg_types): Remove.
15550         (gdbpy_get_xmethod_result_type): Remove.
15551         (gdbpy_invoke_xmethod): Remove.
15552         * python/python.c (python_extension_ops): Remove obsolete
15553         callbacks.
15554
15555 2018-01-05  Pedro Alves  <palves@redhat.com>
15556
15557         PR gdb/18653
15558         * common/signals-state-save-restore.c
15559         (save_original_signals_state): New parameter 'quiet'.  Warn if we
15560         find a custom handler preinstalled, instead of internal erroring.
15561         But only warn if !quiet.
15562         * common/signals-state-save-restore.h
15563         (save_original_signals_state): New parameter 'quiet'.
15564         * main.c (captured_main_1): Move save_original_signals_state call
15565         after option handling, and pass QUIET.
15566
15567 2018-01-05  Pedro Alves  <palves@redhat.com>
15568
15569         * spu-tdep.c (spu_catch_start): Pass
15570         symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
15571
15572 2018-01-05  Pedro Alves  <palves@redhat.com>
15573
15574         PR gdb/22670
15575         * ada-lang.c (literal_symbol_name_matcher): New function.
15576         (ada_get_symbol_name_matcher): Use it for
15577         symbol_name_match_type::SEARCH_NAME.
15578         * block.c (block_lookup_symbol): New parameter 'match_type'.  Pass
15579         it down instead of assuming symbol_name_match_type::FULL.
15580         * block.h (block_lookup_symbol): New parameter 'match_type'.
15581         * c-valprint.c (print_unpacked_pointer): Use
15582         lookup_symbol_search_name instead of lookup_symbol.
15583         * compile/compile-object-load.c (get_out_value_type): Pass down
15584         symbol_name_match_type::SEARCH_NAME.
15585         * cp-namespace.c (cp_basic_lookup_symbol): Pass down
15586         symbol_name_match_type::FULL.
15587         * cp-support.c (cp_get_symbol_name_matcher): Handle
15588         symbol_name_match_type::SEARCH_NAME.
15589         * infrun.c (insert_exception_resume_breakpoint): Use
15590         lookup_symbol_search_name.
15591         * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
15592         * psymtab.c (maintenance_check_psymtabs): Use
15593         symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
15594         * stack.c (print_frame_args): Use lookup_symbol_search_name and
15595         SYMBOL_SEARCH_NAME.
15596         * symtab.c (lookup_local_symbol): Don't demangle the lookup name
15597         if symbol_name_match_type::SEARCH_NAME.
15598         (lookup_symbol_in_language): Pass down
15599         symbol_name_match_type::FULL.
15600         (lookup_symbol_search_name): New.
15601         (lookup_language_this): Pass down
15602         symbol_name_match_type::SEARCH_NAME.
15603         (lookup_symbol_aux, lookup_local_symbol): New parameter
15604         'match_type'.  Pass it down.
15605         * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
15606         (lookup_symbol_search_name): New declaration.
15607         (lookup_symbol_in_block): New 'match_type' parameter.
15608
15609 2018-01-05  Pedro Alves  <palves@redhat.com>
15610
15611         PR gdb/22670
15612         * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
15613         ada_lookup_symbol.
15614         (ada_lookup_symbol): Reimplement in terms of
15615         ada_lookup_symbol_list, bits factored out from
15616         ada_lookup_encoded_symbol.
15617
15618 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
15619
15620         * ada-exp.y (write_object_renaming): When subscripting an array
15621         using a symbol as the index, pass the block in call to
15622         ada_lookup_encoded_symbol when looking that symbol up.
15623
15624 2018-01-05  Jerome Guitton  <guitton@adacore.com>
15625
15626         * ada-lang.c (ada_array_length): Use ada_index_type instead of
15627         TYPE_INDEX_TYPE.
15628
15629 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
15630
15631         * ada-lang.c (ada_to_fixed_value_create): Add handling of
15632         the case where VALUE_LVAL (val0) is not lval_memory.
15633
15634 2018-01-05  Xavier Roirand  <roirand@adacore.com>
15635
15636         * ada-valprint.c (print_optional_low_bound): Handle
15637         character-indexed array printing like boolean-indexed array
15638         printing.
15639
15640 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
15641
15642         * NEWS: Create a new section for the next release branch.
15643         Rename the section of the current branch, now that it has
15644         been cut.
15645
15646 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
15647
15648         GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
15649         * version.in: Bump version to 8.1.50.DATE-git.
15650
15651 2018-01-03  Xavier Roirand  <roirand@adacore.com>
15652
15653         * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
15654         Add field.
15655         * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
15656         Add field.
15657         (default_exception_support_info) <catch_handlers_sym>: Add field.
15658         (exception_support_info_fallback) <catch_handlers_sym>: Add field.
15659         (ada_exception_name_addr_1): Add "catch handlers" handling.
15660         (ada_exception_catchpoint_cond_string) <ex>: New parameter.
15661         Update all callers.
15662         (create_excep_cond_exprs) <ex>: Add parameter.
15663         (re_set_exception): Update create_excep_cond_exprs call.
15664         (print_it_exception, print_one_exception, print_mention_exception)
15665         (print_recreate_exception): Add "catch handler" handling.
15666         (allocate_location_catch_handlers, re_set_catch_handlers)
15667         (check_status_catch_handlers, print_it_catch_handlers)
15668         (print_one_catch_handlers, print_mention_catch_handlers)
15669         (print_recreate_catch_handlers): New function.
15670         (catch_handlers_breakpoint_ops): New variable.
15671         (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
15672         Add parameter.  Add "catch handler" handling.
15673         (ada_exception_sym_name, ada_exception_breakpoint_ops):
15674         Add "catch handler" handling.
15675         (ada_exception_catchpoint_cond_string): Add "catch handler"
15676         handling.
15677         (create_ada_exception_catchpoint): Update create_excep_cond_exprs
15678         call.
15679         (catch_ada_handlers_command): New function.
15680         (initialize_ada_catchpoint_ops): Initialize "catch handlers"
15681         operations structure.
15682         (_initialize_ada_language): Add "catch handlers" command entry.
15683         * NEWS: Document "catch handlers" feature.
15684
15685 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
15686
15687         * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
15688         account when creating the array type of the slice.
15689         (ada_value_slice): Likewise.
15690
15691 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
15692
15693         * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
15694         New enum value.
15695         (create_array_type_with_stride): Add byte_stride_prop parameter.
15696         * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
15697         New parameter.  Update all callers in this file.
15698         (array_type_has_dynamic_stride): New function.
15699         (is_dynamic_type_internal, resolve_dynamic_array): Add handling
15700         of arrays with dynamic byte strides.
15701         * dwarf2read.c (read_array_type): Add support for dynamic
15702         DW_AT_byte_stride attributes.
15703
15704 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
15705
15706         * dwarf2read.c (read_unspecified_type): Treat
15707         DW_TAG_enumeration_type DIEs from Ada units as stubs.
15708
15709 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
15710
15711         Update copyright year range in all GDB files.
15712
15713 2018-01-01, 18  Joel Brobecker  <brobecker@adacore.com>
15714
15715         * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
15716         and gdb/testsuite/gdb.base/step-line.c.
15717
15718 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
15719
15720         * copyright.py (main): Dump the contents of
15721         MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
15722         even if BY_HAND is empty.
15723
15724 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
15725
15726         * top.c (print_gdb_version): Update Copyright year in version
15727         message.
15728
15729 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
15730
15731         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
15732
15733 For older changes see ChangeLog-2017.
15734 \f
15735 Local Variables:
15736 mode: change-log
15737 left-margin: 8
15738 fill-column: 74
15739 version-control: never
15740 coding: utf-8
15741 End: