Fix a typo in iconv.m4.
[external/binutils.git] / gdb / ChangeLog
1 2018-11-09  Hafiz Abid Qadeer  <abidh@codesourcery.com>
2
3         * configure: Regenerate.
4
5 2018-11-09  Tom de Vries  <tdevries@suse.de>
6
7         * symtab.c (symbol_set_names): Call symbol_find_demangled_name
8         unconditionally, to set the language of the symbol.  Manage freeing
9         returned pointer using gdb::unique_xmalloc_ptr.
10
11 2018-11-08  Tom Tromey  <tom@tromey.com>
12
13         * record.c (require_record_target): Upper-case "<TAB>".
14
15 2018-11-08  Tom Tromey  <tom@tromey.com>
16
17         * python/lib/gdb/command/pretty_printers.py
18         (InfoPrettyPrinter.invoke): Don't indent "objfile" heading.
19
20 2018-11-08  Tom Tromey  <tom@tromey.com>
21
22         PR gdb/23555:
23         PR gdb/23838:
24         * target.h (target_supports_terminal_ours): Return bool.
25         * target.c (target_supports_terminal_ours): Handle case where
26         current_top_target returns nullptr.  Return bool.
27
28 2018-11-08  Joel Brobecker  <brobecker@adacore.com>
29
30         * aarch64-tdep.c (aapcs_is_vfp_call_or_return_candidate_1):
31         return the correct count for potential HFAs.
32
33 2018-11-08  Jan Beulich  <jbeulich@suse.com>
34
35         * i387-tdep.c (i387_supply_xsave): Split handling of
36         X86_XSTATE_ZMM_H and X86_XSTATE_ZMM.
37         (i387_collect_xsave): Likewise.
38
39 2018-11-08  Andrew Burgess  <andrew.burgess@embecosm.com>
40
41         * riscv-tdep.c (riscv_insn::decode): Update header comment.
42         (riscv_frame_this_id): Catch errors thrown while building the
43         frame cache, leave the frame id as the default, which is the outer
44         frame id.
45
46 2018-11-07  Joel Brobecker  <brobecker@adacore.com>
47
48         * ada-lang.c (read_atcb): Only set task_info->called_task if
49         task_info->state == Entry_Caller_Sleep.
50         (print_ada_task_info): Do not check task_info->state before
51         checking task_info->called_task.
52         (info_task): Likewise.
53
54 2018-11-07  Joel Brobecker  <brobecker@adacore.com>
55
56         * ada-tasks.c (read_atcb): Clear task_info before computing
57         the value of each of its fields.
58
59 2018-11-07  Andrew Burgess  <andrew.burgess@embecosm.com>
60
61         * dwarf2read.c (dwarf2_init_integer_type): Check for name being
62         NULL before dereferencing it.
63
64 2018-11-06  Tom de Vries  <tdevries@suse.de>
65
66         * linux-tdep.c (linux_vsyscall_range_raw): Use xmalloc to allocate
67         program headers.
68
69 2018-11-06  Max Filippov  <jcmvbkbc@gmail.com>
70
71         * configure.tgt (xtensa*-*-linux*): Change to xtensa*-*-*linux*
72         so that it applies to uclinux as well.
73
74 2018-11-06  Marius Muench  <marius.muench@eurecom.fr>
75
76         * arm-tdep.c (arm_scan_prologue): Don't dereference FP reg
77         when on AAPCS.
78
79 2018-11-06  John Baldwin  <jhb@FreeBSD.org>
80
81         * riscv-fbsd-nat.c (getregs_supplies): Return true for
82         RISCV_CSR_SSTATUS_REGNUM.
83
84 2018-11-04  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
85
86         * source.c (open_source_file): Fix leak by transferring the
87         current s->fullname to the unique_xmalloc_ptr fullname given
88         to find_and_open_source.
89
90 2018-11-04  Tom Tromey  <tom@tromey.com>
91
92         * varobj.c (install_default_visualizer): Update.
93         * python/python-internal.h (gdbpy_get_varobj_pretty_printer):
94         Return gdbpy_ref.
95         * python/py-prettyprint.c (search_pp_list): Return gdbpy_ref.
96         (find_pretty_printer_from_progspace)
97         (find_pretty_printer_from_gdb, find_pretty_printer)
98         (gdbpy_get_varobj_pretty_printer): Return gdbpy_ref.
99         (gdbpy_get_varobj_pretty_printer, gdbpy_default_visualizer):
100         Update.
101
102 2018-11-04  Tom Tromey  <tom@tromey.com>
103
104         * python/python.c (gdbpy_parameter_value): Update.
105         * python/python-internal.h (python_string_to_unicode)
106         (python_string_to_target_python_string)
107         (host_string_to_python_string): Return gdbpy_ref.
108         * python/py-utils.c (python_string_to_unicode)
109         (unicode_to_encoded_python_string)
110         (unicode_to_target_python_string)
111         (python_string_to_target_string)
112         (python_string_to_target_python_string): Return gdbpy_ref.
113         (python_string_to_host_string): Update.
114         (host_string_to_python_string): Return gdbpy_ref.
115         * python/py-symtab.c (stpy_get_filename, stpy_get_producer)
116         (stpy_fullname): Update.
117         * python/py-progspace.c (pspy_get_filename, pspy_solib_name):
118         Update.
119         * python/py-prettyprint.c (print_string_repr): Update.
120         * python/py-objfile.c (objfpy_get_filename, objfpy_get_username)
121         (objfpy_get_build_id): Update.
122         * python/py-breakpoint.c (bppy_get_location)
123         (bppy_get_expression, bppy_get_condition, bppy_get_commands):
124         Update.
125
126 2018-11-04  Tom Tromey  <tom@tromey.com>
127
128         * python/python-internal.h (gdb_py_object_from_longest)
129         (gdb_py_object_from_ulongest): Return gdbpy_ref.
130         * python/py-value.c (valpy_int): Update.
131         * python/py-utils.c (gdb_py_object_from_longest): Return
132         gdbpy_ref.
133         (gdb_py_object_from_ulongest): Likewise.
134         * python/py-type.c (typy_get_alignof): Update.
135         * python/py-linetable.c (ltpy_get_all_source_lines)
136         (ltpy_entry_get_line, ltpy_entry_get_pc): Update.
137         * python/py-block.c (blpy_get_start, blpy_get_end): Update.
138
139 2018-11-03  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
140
141         * ada-lang.c (_initialize_ada_language): Fix typo.
142
143 2018-11-03  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
144
145         * language.c (type): Remove.
146         (_initialize_language): Remove assignment to type.
147
148 2018-11-02  Joel Brobecker  <brobecker@adacore.com>
149
150         * aarch64-ravenscar-thread.h, aarch64-ravenscar-thread.c: New files.
151         * aarch64-tdep.c: #include "aarch64-ravenscar-thread.h".
152         (aarch64_gdbarch_init): Add call to register_aarch64_ravenscar_ops.
153         * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-ravenscar-thread.o.
154         (HFILES_NO_SRCDIR): Add aarch64-ravenscar-thread.h.
155         (ALLDEPFILES): Add aarch64-ravenscar-thread.c.
156         * configure.tgt (cpu_obs) [aarch64*-*-*]: Add ravenscar-thread.o
157         and aarch64-ravenscar-thread.o.
158         * NEWS: Add entry documenting Ravenscar tasking support
159         on AArch64 ELF.
160
161 2018-11-02  Matthew Malcomson  <matthew.malcomson@arm.com>
162
163         * symtab.c (info_functions_command): Initialize quiet flag.
164         * stack.c (info_args_command): Likewise.
165
166 2018-11-01  Jim Wilson  <jimw@sifive.com>
167
168         * riscv-tdep.c (riscv_breakpoint_kind_from_pc): New local unaligned_p.
169         Set if pcptr if unaligned.  Return 2 if unaligned_p true.  Update
170         debugging messages.
171
172 2018-11-01  Joel Brobecker  <brobecker@adacore.com>
173
174         * ada-lang.c (ada_watch_location_expression): New function.
175         (ada_language_defn): Set la_watch_location_expression to
176         ada_watch_location_expression.
177
178 2018-11-01  Joel Brobecker  <brobecker@adacore.com>
179
180         * print-utils.c (int_string): Remove unnecessary trailing spaces.
181
182 2018-11-01  Joel Brobecker  <brobecker@adacore.com>
183
184         * rs6000-tdep.c (skip_prologue): Fix potential negative left
185         shifting.
186
187 2018-11-01  Jerome Guitton  <guitton@adacore.com>
188             Joel Brobecker  <brobecker@adacore.com>
189
190         * defs.h (enum gdb_osabi): Add GDB_OSABI_PIKEOS.
191         * osabi.c (gdb_osabi_names): Add name for GDB_OSABI_PIKEOS.
192         * arm-pikeos-tdep.c: New file.
193         * configure.tgt: Add arm-pikeos-tdep.o to the case of ARM
194         embedded system.
195         * Makefile.in (ALL_TARGET_OBS): Add arm-pikeos-tdep.o.
196
197 2018-11-01  Simon Marchi  <simon.marchi@ericsson.com>
198
199         * common/pathstuff.c (get_standard_temp_dir): New.
200         * common/pathstuff.h (get_standard_temp_dir): New.
201         * config.in: Re-generate.
202         * configure: Re-generate.
203         * configure.ac: Don't check for mkdtemp.
204         * gnulib/aclocal-m4-deps.mk: Re-generate.
205         * gnulib/aclocal.m4: Re-generate.
206         * gnulib/config.in: Re-generate.
207         * gnulib/configure: Re-generate.
208         * gnulib/import/Makefile.am: Re-generate.
209         * gnulib/import/Makefile.in: Re-generate.
210         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
211         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
212         * gnulib/import/m4/mkdtemp.m4: New file.
213         * gnulib/import/mkdtemp.c: New file.
214         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES):
215         Add mkdtemp module.
216         * unittests/mkdir-recursive-selftests.c (test): Use
217         get_standard_temp_dir.
218         (_initialize_mkdir_recursive_selftests): Remove HAVE_MKDTEMP
219         ifdef.
220         * compile/compile.c (get_compile_file_tempdir): Likewise.
221
222 2018-11-01  Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
223
224         * rs6000-aix-tdep.c: Include "trad-frame.h" and "frame-unwind.h".
225         (SIG_FRAME_LR_OFFSET64): New define.
226         (SIG_FRAME_FP_OFFSET64): New define.
227         (aix_sighandle_frame_cache): New Function.
228         (aix_sighandle_frame_this_id): New Function.
229         (aix_sighandle_frame_prev_register): New Function.
230         (aix_sighandle_frame_sniffer): New Function.
231         (aix_sighandle_frame_unwind): New global variable.
232         (rs6000_aix_init_osabi): Install new frame unwinder.
233
234 2018-10-31  Sergio Durigan Junior  <sergiodj@redhat.com>
235
236         PR gdb/23835
237         * common/common-defs.h: Don't redefine _FORTIFY_SOURCE if it's
238         already defined.
239
240 2018-10-31  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
241
242         * ppc-linux-nat.c: Include nat/linux-ptrace.h.
243
244 2018-10-31  Andrew Burgess  <andrew.burgess@embecosm.com>
245
246         * dwarf2read.c (struct dwarf2_cu): Add producer_is_icc field.
247         (producer_is_icc): New function.
248         (check_producer): Set producer_is_icc field on dwarf2_cu.
249         (dwarf2_init_integer_type): New function.
250         (read_base_type): Call dwarf2_init_integer_type instead of
251         init_integer_type in all cases.
252         (dwarf2_cu::dwarf2_cu): Initialise producer_is_icc field.
253         * valprint.c (maybe_negate_by_bytes): Add an assertion that the
254         LEN is greater than 0.
255
256 2018-10-30  Tom Tromey  <tom@tromey.com>
257
258         * main.c (captured_main_1): Check return value of bfd_init.
259
260 2018-10-29  Sergio Durigan Junior  <sergiodj@redhat.com>
261
262         * common/offset-type.h (DEFINE_OFFSET_REL_OP): Delete.
263         Adjust comments.
264
265 2018-10-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
266
267         * procfs.c: Include common/pathstuff.h.
268
269 2018-10-28  Andrew Burgess  <andrew.burgess@embecosm.com>
270
271         * riscv-linux-nat.c (riscv_linux_nat_target::fetch_registers):
272         Add missing braces.  No functional change.
273
274 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
275
276         * macrocmd.c (info_macro_command): Use report_unrecognized_option_error
277         to report a bad option and fix indentation.
278         * demangle.c (demangle_command): Use report_unrecognized_option_error
279         to report a bad option and correctly report the bad option.
280
281 2018-10-27  Tom Tromey  <tom@tromey.com>
282
283         PR cli/23364:
284         * darwin-nat.c (copied_shell): New global.
285         (may_have_sip): Rename from should_disable_startup_with_shell.
286         (copy_shell_to_cache, maybe_cache_shell): New functions.
287         (darwin_nat_target::create_inferior): Update.  Use
288         copied_shell.
289
290 2018-10-27  Tom Tromey  <tom@tromey.com>
291
292         * unittests/scoped_fd-selftests.c (test_to_file): New function.
293         (run_tests): Call test_to_file.
294         * dwarf-index-write.c (write_psymtabs_to_index): Do not reopen
295         temporary files.
296         * common/scoped_fd.h (scoped_fd::to_file): New method.
297
298 2018-10-27  Tom Tromey  <tom@tromey.com>
299
300         * unittests/scoped_mmap-selftests.c (test_normal): Use
301         gdb_mkostemp_cloexec.
302         * unittests/scoped_fd-selftests.c (test_destroy, test_release):
303         Use gdb_mkostemp_cloexec.
304         * gnulib/aclocal-m4-deps.mk, gnulib/aclocal.m4,
305         gnulib/config.in, gnulib/configure,
306         gnulib/import/Makefile.am, gnulib/import/Makefile.in,
307         gnulib/import/m4/gnulib-cache.m4,
308         gnulib/import/m4/gnulib-comp.m4: Update.
309         * gnulib/import/m4/mkostemp.m4: New file.
310         * gnulib/import/m4/mkstemp.m4: Remove.
311         * gnulib/import/mkostemp.c: New file.
312         * gnulib/import/mkstemp.m4: Remove.
313         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Remove
314         mkstemp, add mkostemp.  Apply new patch.
315         * gnulib/import/stdlib.in.h: Apply patch.
316         * gnulib/patches/0002-mkostemp-mkostemps-Fix-compilation-error-in-C-mode-o.patch:
317         New file.
318         * dwarf-index-write.c (write_psymtabs_to_index): Use
319         gdb_mkostemp_cloexec.
320         * common/filestuff.h (gdb_mkostemp_cloexec): New function.
321
322 2018-10-27  Tom Tromey  <tom@tromey.com>
323
324         * unittests/mkdir-recursive-selftests.c: New file.
325         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
326         unittests/mkdir-recursive-selftests.c.
327         * dwarf-index-cache.c (mkdir_recursive): Move to
328         common/filestuff.c.
329         (index_cache::store): Check return value of mkdir_recursive.
330         (create_dir_and_check, test_mkdir_recursive): Move to new file.
331         (_initialize_index_cache): Don't register test.
332         * common/filestuff.h (mkdir_recursive): Declare.
333         * common/filestuff.c (mkdir_recursive): Move from
334         dwarf-index-cache.c.  Return bool.
335
336 2018-10-27  Tom Tromey  <tom@tromey.com>
337
338         * dwarf-index-write.c (write_psymtabs_to_index): Move
339         make_temp_filename to common/pathstuff.c.
340         * common/pathstuff.h (make_temp_filename): Declare.
341         * common/pathstuff.c (make_temp_filename): New function, moved
342         from dwarf-index-write.c.
343
344 2018-10-27  Tom Tromey  <tom@tromey.com>
345
346         * procfs.c (procfs_target::create_inferior): Use get_shell.
347         * cli/cli-cmds.c (shell_escape): Use get_shell.
348         * windows-nat.c (windows_nat_target::create_inferior): Use
349         get_shell.
350         * common/pathstuff.c (get_shell): New function.
351         * nat/fork-inferior.c (SHELL_FILE, get_startup_shell): Remove.
352         (fork_inferior): Use get_shell.
353         * common/pathstuff.h (get_shell): Declare.
354
355 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
356
357         * NEWS: Mention changes to 'info [args|functions|locals|variables]'
358
359 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
360
361         * stack.c (print_variable_and_value_data): Add preg and treg.
362         (print_frame_local_vars): Add quiet, regexp and t_regexp arguments,
363         and update callers.
364         (print_frame_arg_vars): Likewise.
365         (prepare_reg): New function.
366         (info_locals_command): Extract info print args and use them.
367         (info_args_command): Likewise.
368         (_initialize_stack): Modify on-line help.
369         * symtab.c (treg_matches_sym_type_name): New function.
370         (search_symbols): New arg t_regexp.
371         (symtab_symbol_info): New args quiet, regexp, t_regexp.
372         (info_variables_command): Extract info print args and use them.
373         (info_functions_command): Likewise.
374         (info_types_command): Update call to symtab_symbol_info.
375         (_initialize_symtab): Modify on-line help.
376         * symtab.h (treg_matches_sym_type_name): New function.
377         (search_symbols): New t_regexp arg.
378
379 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
380
381         * cli-utils.c (extract_arg_maybe_quoted): New function.
382         (extract_info_print_args): New function.
383         (info_print_args_help): New function.
384         (report_unrecognized_option_error): New function.
385         * cli-utils.h (extract_arg_maybe_quoted): New function.
386         (extract_info_print_args): New function.
387         (info_print_args_help): New function.
388         (report_unrecognized_option_error): New function.
389
390 2018-10-26  Tom Tromey  <tom@tromey.com>
391
392         * dwarf2read.c (recursively_compute_inclusions): Use std::vector.
393         (compute_compunit_symtab_includes): Update.
394         * symtab.h: (symtab_ptr): Remove typedef.  Don't define a VEC.
395         (compunit_symtab_ptr): Likewise.
396
397 2018-10-26  John Baldwin  <jhb@FreeBSD.org>
398
399         * fbsd-tdep.c (fbsd_print_auxv_entry): Only use
400         default_print_auxv_entry for specific tag values.
401
402 2018-10-26  John Baldwin  <jhb@FreeBSD.org>
403
404         * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_FREEBSD_HWCAP2.
405
406 2018-10-26  Jim Wilson  <jimw@sifive.com>
407
408         * riscv-linux-tdep.c: Include tramp-frame.h and trad-frame.h.
409         (riscv_linux_sigframe_init): Declare.
410         (RISCV_INST_LI_A7_SIGRETURN, RISCV_INT_ECALL): New.
411         (riscv_linux_sigframe): New.
412         (SIGFRAME_SIGINFO_SIZE, UCONTEXT_MCONTEXT_OFFSET): New.
413         (riscv_linux_sigframe_init): Define.
414         (riscv_linux_init_abi): Call tramp_frame_prepend_unwinder.
415
416         * riscv-tdep.c (riscv_isa_xlen): Refer to riscv-tdep.h comment.
417         (riscv_isa_flen): Likewise.  Drop static.
418         * riscv-tdep.h (riscv_isa_xlen): Move riscv-tdep.c comment to here.
419         (riscv_isa_flen): Likewise.  Declare.
420
421 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
422             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
423
424         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa207_htm_vsx32l)
425         (tdesc_powerpc_isa207_htm_vsx64l): Declare.
426         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_TM_SPRREGSET)
427         (PPC32_LINUX_SIZEOF_CGPRREGSET, PPC64_LINUX_SIZEOF_CGPRREGSET)
428         (PPC_LINUX_SIZEOF_CFPRREGSET, PPC_LINUX_SIZEOF_CVMXREGSET)
429         (PPC_LINUX_SIZEOF_CVSXREGSET, PPC_LINUX_SIZEOF_CPPRREGSET)
430         (PPC_LINUX_SIZEOF_CDSCRREGSET, PPC_LINUX_SIZEOF_CTARREGSET):
431         Define.
432         (struct ppc_linux_features) <htm>: New field.
433         (ppc_linux_no_features): Add initializer for htm field.
434         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
435         new tdescs.
436         * nat/ppc-linux.h (PPC_FEATURE2_HTM, NT_PPC_TM_CGPR)
437         (NT_PPC_TM_CFPR, NT_PPC_TM_CVMX, NT_PPC_TM_CVSX)
438         (NT_PPC_TM_SPR, NT_PPC_TM_CTAR, NT_PPC_TM_CPPR, NT_PPC_TM_CDSCR):
439         Define if not already defined.
440         * features/Makefile (WHICH): Add rs6000/powerpc-isa207-htm-vsx32l
441         and rs6000/powerpc-isa207-htm-vsx64l.
442         (XMLTOC): Add rs6000/powerpc-isa207-htm-vsx32l.xml and
443         rs6000/powerpc-isa207-htm-vsx64l.xml.
444         * features/rs6000/power-htm-spr.xml: New file.
445         * features/rs6000/power-htm-core.xml: New file.
446         * features/rs6000/power64-htm-core.xml: New file.
447         * features/rs6000/power-htm-fpu.xml: New file.
448         * features/rs6000/power-htm-altivec.xml: New file.
449         * features/rs6000/power-htm-vsx.xml: New file.
450         * features/rs6000/power-htm-ppr.xml: New file.
451         * features/rs6000/power-htm-dscr.xml: New file.
452         * features/rs6000/power-htm-tar.xml: New file.
453         * features/rs6000/powerpc-isa207-htm-vsx32l.xml: New file.
454         * features/rs6000/powerpc-isa207-htm-vsx64l.xml: New file.
455         * features/rs6000/powerpc-isa207-htm-vsx32l.c: Generate.
456         * features/rs6000/powerpc-isa207-htm-vsx64l.c: Generate.
457         * regformats/rs6000/powerpc-isa207-htm-vsx32l.dat: Generate.
458         * regformats/rs6000/powerpc-isa207-htm-vsx64l.dat: Generate.
459         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
460         fetch_regset with HTM regsets.
461         (store_register, store_ppc_registers): Call store_regset with HTM
462         regsets.
463         (ppc_linux_nat_target::read_description): Set htm field in the
464         features struct if needed.
465         * ppc-linux-tdep.c: Include
466         features/rs6000/powerpc-isa207-htm-vsx32l.c and
467         features/rs6000/powerpc-isa207-htm-vsx64l.c.
468         (ppc32_regmap_tm_spr, ppc32_regmap_cgpr, ppc64_le_regmap_cgpr)
469         (ppc64_be_regmap_cgpr, ppc32_regmap_cfpr, ppc32_le_regmap_cvmx)
470         (ppc32_be_regmap_cvmx, ppc32_regmap_cvsx, ppc32_regmap_cppr)
471         (ppc32_regmap_cdscr, ppc32_regmap_ctar): New globals.
472         (ppc32_linux_tm_sprregset, ppc32_linux_cgprregset)
473         (ppc64_be_linux_cgprregset, ppc64_le_linux_cgprregset)
474         (ppc32_linux_cfprregset, ppc32_le_linux_cvmxregset)
475         (ppc32_be_linux_cvmxregset, ppc32_linux_cvsxregset)
476         (ppc32_linux_cpprregset, ppc32_linux_cdscrregset)
477         (ppc32_linux_ctarregset): New globals.
478         (ppc_linux_cgprregset, ppc_linux_cvmxregset): New functions.
479         (ppc_linux_collect_core_cpgrregset): New function.
480         (ppc_linux_iterate_over_regset_sections): Call back with the htm
481         regsets.
482         (ppc_linux_core_read_description): Check if the tm spr section is
483         present and set htm in the features struct.
484         (_initialize_ppc_linux_tdep): Call
485         initialize_tdesc_powerpc_isa207_htm_vsx32l and
486         initialize_tdesc_powerpc_isa207_htm_vsx64l.
487         * ppc-linux-tdep.h (ppc_linux_cgprregset, ppc_linux_cvmxregset):
488         Declare.
489         (ppc32_linux_tm_sprregset, ppc32_linux_cfprregset)
490         (ppc32_linux_cvsxregset, ppc32_linux_cpprregset)
491         (ppc32_linux_cdscrregset, ppc32_linux_ctarregset): Declare.
492         * ppc-tdep.h (struct gdbarch_tdep) <have_htm_spr, have_htm_core>:
493         New fields.
494         <have_htm_fpu, have_htm_altivec, have_htm_vsx>:
495         Likewise.
496         <ppc_cppr_regnum, ppc_cdscr_regnum, ppc_ctar_regnum>: Likewise.
497         <ppc_cdl0_regnum, ppc_cvsr0_regnum, ppc_cefpr0_regnum>: Likewise.
498         (enum) <PPC_TFHAR_REGNUM, PPC_TEXASR_REGNUM, PPC_TFIAR_REGNUM>:
499         New enum fields.
500         <PPC_CR0_REGNUM, PPC_CCR_REGNUM, PPC_CXER_REGNUM>: Likewise.
501         <PPC_CLR_REGNUM, PPC_CCTR_REGNUM, PPC_CF0_REGNUM>: Likewise.
502         <PPC_CFPSCR_REGNUM, PPC_CVR0_REGNUM, PPC_CVSCR_REGNUM>: Likewise.
503         <PPC_CVRSAVE_REGNUM, PPC_CVSR0_UPPER_REGNUM>: Likewise.
504         <PPC_CPPR_REGNUM, PPC_CDSCR_REGNUM>: Likewise.
505         <PPC_CTAR_REGNUM>: Likewise.
506         (PPC_IS_TMSPR_REGNUM, PPC_IS_CKPTGP_REGNUM, PPC_IS_CKPTFP_REGNUM)
507         (PPC_IS_CKPTVMX_REGNUM, PPC_IS_CKPTVSX_REGNUM): Define.
508         * rs6000-tdep.c (IS_CDFP_PSEUDOREG, IS_CVSX_PSEUDOREG)
509         (IS_CEFP_PSEUDOREG): Define.
510         (rs6000_register_name): Hide the upper halves of checkpointed VSX
511         registers.  Return names for the checkpointed DFP, VSX, and EFP
512         pseudo registers.
513         (rs6000_pseudo_register_type): Remove initial assert and raise an
514         internal error in the else clause instead.  Return types for the
515         checkpointed DFP, VSX, and EFP pseudo registers.
516         (dfp_pseudo_register_read, dfp_pseudo_register_write): Handle
517         checkpointed DFP pseudo registers.
518         (vsx_pseudo_register_read, vsx_pseudo_register_write): Handle
519         checkpointed VSX pseudo registers.
520         (efp_pseudo_register_read, efp_pseudo_register_write): Rename
521         from efpr_pseudo_register_read and
522         efpr_pseudo_register_write.  Handle checkpointed EFP pseudo
523         registers.
524         (rs6000_pseudo_register_read, rs6000_pseudo_register_write):
525         Handle checkpointed DFP, VSX, and EFP registers.
526         (dfp_ax_pseudo_register_collect, vsx_ax_pseudo_register_collect)
527         (efp_ax_pseudo_register_collect): New functions.
528         (rs6000_ax_pseudo_register_collect): Move DFP, VSX and EFP pseudo
529         register logic to new functions.  Handle checkpointed DFP, VSX,
530         and EFP pseudo registers.
531         (rs6000_gdbarch_init): Look for and validate the htm features.
532         Include checkpointed DFP, VSX and EFP pseudo-registers.
533         * NEWS: Mention access to PPR, DSCR, TAR, EBB/PMU registers and
534         HTM registers.
535
536 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
537
538         * rs6000-tdep.c (rs6000_gdbarch_init): Reject tdescs with vsx but
539         without altivec or fpu.
540
541 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
542             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
543
544         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_EBBREGSET)
545         (PPC_LINUX_SIZEOF_PMUREGSET): Declare.
546         * nat/ppc-linux.h (PPC_FEATURE2_EBB, NT_PPC_EBB, NT_PPC_PMU):
547         Define if not already defined.
548         * features/rs6000/power-ebb.xml: New file.
549         * features/rs6000/power-linux-pmu.xml: New file.
550         * features/rs6000/powerpc-isa207-vsx32l.xml: Include ebb and pmu
551         features.
552         * features/rs6000/powerpc-isa207-vsx64l.xml: Likewise.
553         * features/rs6000/powerpc-isa207-vsx32l.c: Re-generate.
554         * features/rs6000/powerpc-isa207-vsx64l.c: Re-generate.
555         * regformats/rs6000/powerpc-isa207-vsx32l.dat: Re-generate.
556         * regformats/rs6000/powerpc-isa207-vsx64l.dat: Re-generate.
557         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
558         fetch_regset with ebb and pmu regsets.
559         (store_register, store_ppc_registers): Call store_regset with ebb
560         and pmu regsets.
561         (ppc_linux_nat_target::read_description): Set isa207 field in the
562         features struct if ebb and pmu are avaiable.
563         * ppc-linux-tdep.c (ppc32_regmap_ebb, ppc32_regmap_pmu)
564         (ppc32_linux_ebbregset, ppc32_linux_pmuregset): New globals.
565         (ppc_linux_iterate_over_regset_sections): Call back with the ebb
566         and pmu regsets.
567         (ppc_linux_core_read_description): Check if the pmu section is
568         present and set isa207 in the features struct.
569         * ppc-linux-tdep.h (ppc32_linux_ebbregset)
570         (ppc32_linux_pmuregset): Declare.
571         * ppc-tdep.h (struct gdbarch_tdep) <ppc_mmcr0_regnum>: New field.
572         <ppc_mmcr2_regnum, ppc_siar_regnum, ppc_sdar_regnum>: New fields.
573         <ppc_sier_regnum>: New field.
574         (enum): <PPC_BESCR_REGNUM, PPC_EBBHR_REGNUM, PPC_EBBRR_REGNUM>:
575         New enum values.
576         <PPC_MMCR0_REGNUM, PPC_MMCR2_REGNUM, PPC_SIAR_REGNUM>: New enum
577         values.
578         <PPC_SDAR_REGNUM, PPC_SIER_REGNUM>: New enum values.
579         (PPC_IS_EBB_REGNUM, PPC_IS_PMU_REGNUM): Define.
580         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate the
581         ebb and pmu features.
582
583 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
584             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
585
586         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa207_vsx32l)
587         (tdesc_powerpc_isa207_vsx64l): Declare.
588         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_TARREGSET): Define.
589         (struct ppc_linux_features) <isa207>: New field.
590         (ppc_linux_no_features): Add initializer for isa207 field.
591         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
592         new tdescs.
593         * nat/ppc-linux.h (PPC_FEATURE2_ARCH_2_07, PPC_FEATURE2_TAR)
594         (NT_PPC_TAR): Define if not already defined.
595         * features/Makefile (WHICH): Add rs6000/powerpc-isa207-vsx32l and
596         rs6000/powerpc-isa207-vsx64l.
597         (XMLTOC): Add rs6000/powerpc-isa207-vsx32l.xml and
598         rs6000/powerpc-isa207-vsx64l.xml.
599         * features/rs6000/power-tar.xml: New file.
600         * features/rs6000/powerpc-isa207-vsx32l.xml: New file.
601         * features/rs6000/powerpc-isa207-vsx64l.xml: New file.
602         * features/rs6000/powerpc-isa207-vsx32l.c: Generate.
603         * features/rs6000/powerpc-isa207-vsx64l.c: Generate.
604         * regformats/rs6000/powerpc-isa207-vsx32l.dat: Generate.
605         * regformats/rs6000/powerpc-isa207-vsx64l.dat: Generate.
606         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
607         fetch_regset with the TAR regset.
608         (store_register, store_ppc_registers): Call store_regset with the
609         TAR regset.
610         (ppc_linux_nat_target::read_description): Set isa207 field in the
611         features struct if needed.
612         * ppc-linux-tdep.c: Include
613         features/rs6000/powerpc-isa207-vsx32l.c and
614         features/rs6000/powerpc-isa207-vsx64l.c.
615         (ppc32_regmap_tar, ppc32_linux_tarregset): New globals.
616         (ppc_linux_iterate_over_regset_sections): Call back with the tar
617         regset.
618         (ppc_linux_core_read_description): Check if the tar section is
619         present and set isa207 in the features struct.
620         (_initialize_ppc_linux_tdep): Call
621         initialize_tdesc_powerpc_isa207_vsx32l and
622         initialize_tdesc_powerpc_isa207_vsx64l.
623         * ppc-linux-tdep.h (ppc32_linux_tarregset): Declare.
624         * ppc-tdep.h (gdbarch_tdep) <ppc_tar_regnum>: New field.
625         (enum) <PPC_TAR_REGNUM>: New enum value.
626         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate tar
627         feature.
628         (ppc_process_record_op31): Record changes to TAR.
629
630 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
631             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
632
633         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa205_ppr_dscr_vsx32l)
634         (tdesc_powerpc_isa205_ppr_dscr_vsx64l): Declare.
635         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_PPRREGSET)
636         (PPC_LINUX_SIZEOF_DSCRREGSET): Define.
637         (struct ppc_linux_features) <ppr_dscr>: New field.
638         (ppc_linux_no_features): Add initializer for ppr_dscr field.
639         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
640         new tdescs.
641         * nat/ppc-linux.h (PPC_FEATURE2_DSCR, NT_PPC_PPR, NT_PPC_DSCR):
642         Define if not already defined.
643         * features/Makefile (WHICH): Add
644         rs6000/powerpc-isa205-ppr-dscr-vsx32l and
645         rs6000/powerpc-isa205-ppr-dscr-vsx64l.
646         (XMLTOC): Add rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
647         rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml.
648         * features/rs6000/power-dscr.xml: New file.
649         * features/rs6000/power-ppr.xml: New file.
650         * features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml: New file.
651         * features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml: New file.
652         * features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c: Generate.
653         * features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c: Generate.
654         * regformats/rs6000/powerpc-isa205-ppr-dscr-vsx32l.dat: Generate.
655         * regformats/rs6000/powerpc-isa205-ppr-dscr-vsx64l.dat: Generate.
656         * ppc-linux-nat.c: Include <sys/uio.h>.
657         (fetch_regset, store_regset, check_regset): New functions.
658         (fetch_register, fetch_ppc_registers): Call fetch_regset with
659         DSCR and PPR regsets.
660         (store_register, store_ppc_registers): Call store_regset with
661         DSCR and PPR regsets.
662         (ppc_linux_get_hwcap2): New function.
663         (ppc_linux_nat_target::read_description): Call
664         ppc_linux_get_hwcap2 and check_regset, set ppr_dscr field in the
665         features struct if needed.
666         * ppc-linux-tdep.c: Include
667         features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c and
668         features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c.
669         (ppc32_regmap_ppr, ppc32_regmap_dscr, ppc32_linux_pprregset)
670         (ppc32_linux_dscrregset): New globals.
671         (ppc_linux_iterate_over_regset_sections): Call back with the ppr
672         and dscr regsets.
673         (ppc_linux_core_read_description): Check if the ppr and dscr
674         sections are present and set ppr_dscr in the features struct.
675         (_initialize_ppc_linux_tdep): Call
676         initialize_tdesc_powerpc_isa205_ppr_dscr_vsx32l and
677         initialize_tdesc_powerpc_isa205_ppr_dscr_vsx64l.
678         * ppc-linux-tdep.h (ppc32_linux_pprregset)
679         (ppc32_linux_dscrregset): Declare.
680         * ppc-tdep.h (struct gdbarch_tdep) <ppc_ppr_regnum>: New field.
681         <ppc_dscr_regnum>: New field.
682         (enum) <PPC_PPR_REGNUM, PPC_DSCR_REGNUM>: New enum values.
683         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate ppr
684         and dscr features.
685         (ppc_process_record_op31): Record changes to PPR and DSCR.
686
687 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
688
689         * rs6000-tdep.c (rs6000_gdbarch_init): Replace line wrapping by a
690         second initializer line for the have_* variables.  Initialize
691         have_fpu to 0 instead of 1.
692
693 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
694
695         * arch/ppc-linux-common.c (ppc_linux_match_description):
696         Parenthesize tdesc assignements and indent them properly.
697
698 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
699
700         * ppc-linux-nat.c (fetch_register): Change if statement to else
701         if.
702         (store_register): Likewise.
703
704 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
705
706         * rs6000-tdep.c: Remove reggroups.h include.
707         (rs6000_pseudo_register_reggroup_p): Remove.
708         (rs6000_gdbarch_init): Remove call to
709         set_tdesc_pseudo_register_reggroup_p.
710
711 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
712
713         * reggroups.c (default_register_reggroup_p): Return true for
714         decfloat registers and float_reggroup.
715
716 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
717
718         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): Remove.
719         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): Replace
720         ppc_linux_collect_vrregset by regcache_collect_regset.
721
722 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
723
724         * linux-tdep.c (linux_collect_regset_section_cb): Use
725         std::vector<gdb_byte> instead of char * and malloc for buf.
726         Remove xfree.
727
728 2018-10-26  Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
729
730         * xcoffread.c (read_xcoff_symtab): Pass deduced language to
731         symtab_start instead of always using language_unknown.
732
733 2018-10-26  Andrew Burgess  <andrew.burgess@embecosm.com>
734
735         * riscv-tdep.c (riscv_read_misa_reg): Update comment, remove
736         READ_P parameter, catch and ignore register access errors from
737         either the old or new MISA location.
738         (riscv_has_feature): Update call to riscv_read_misa_reg.
739
740 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
741
742         * python/py-function.c (convert_values_to_python): Return
743         gdbpy_ref<>.  Add header comment.
744         (fnpy_call): Adjust.
745
746 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
747
748         * python/py-cmd.c (cmdpy_completer_helper): Return gdbpy_ref<>.
749         (cmdpy_completer_handle_brkchars): Adjust.
750         (cmdpy_completer): Adjust.
751
752 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
753
754         * riscv-linux-nat.c (riscv_linux_nat_target::fetch_registers):
755         Pass correct regnum to raw_supply_zeroed.
756
757 2018-10-23  Hafiz Abid Qadeer  <abidh@codesourcery.com>
758
759         * regcache.c (cooked_read_test): Add CSKY to the list of
760         architectures with a save_reggroup
761
762 2018-10-23  Simon Marchi  <simon.marchi@polymtl.ca>
763
764         PR gdb/23368
765         * infrun.c (follow_exec): In the follow_exec_mode_new case,
766         transfer terminal state from old new new inferior.
767         * terminal.h (swap_terminal_info): New function.
768         * inflow.c (swap_terminal_info): New function.
769
770 2018-10-23  Tom Tromey  <tom@tromey.com>
771
772         * record-btrace.c (get_thread_current_frame_id): Rename from
773         get_thread_current_frame.  Return a frame_id.
774         (record_btrace_start_replaying): Update.
775
776 2018-10-23  Andrew Burgess  <andrew.burgess@embecosm.com>
777
778         * riscv-tdep.c (riscv_register_name): Use the user-friendly names
779         for CSRs.
780
781 2018-10-23  Joel Brobecker  <brobecker@adacore.com>
782
783         * riscv-tdep.c (riscv_gdbarch_init): Set the gdbarch's
784         have_nonsteppable_watchpoint attribute to 1.
785
786 2018-10-23  Andrew Burgess  <andrew.burgess@embecosm.com>
787
788         * riscv-tdep.c (riscv_gdb_reg_names): Update comment, and all
789         register names.
790         (struct register_alias): Rename to...
791         (struct riscv_register_alias): ...this, and update comment.
792         (riscv_register_aliases): Update type, and alias names.  Remove
793         CSR names from this list.
794         (riscv_register_name): Use riscv_gdb_reg_names for int and float
795         register names.  Add an extra assertion.
796         (riscv_is_regnum_a_named_csr): New function.
797         (riscv_register_reggroup_p): Use riscv_is_regnum_a_named_csr.
798
799 2018-10-22  Jim Wilson  <jimw@sifive.com>
800
801         * riscv-tdep.c (riscv_push_dummy_call) <in_reg>: Check for value in
802         FP reg smaller than FP reg size, and fill with -1 instead of 0.
803
804         * riscv-tdep.c (riscv_fpreg_d_type, riscv_fpreg_q_type): New.
805         (riscv_register_type): Use them.
806         (riscv_print_one_register_info): Handle union of floats same as float.
807         * riscv-tdep.h (struct gdbarch_tdep): Add riscv_fpreg_d_type and
808         riscv_fpreg_q_type fields.
809
810 2018-10-21  Simon Marchi  <simon.marchi@ericsson.com>
811
812         * gdbarch.sh (gdbarch_num_cooked_regs): New.
813         * gdbarch.h: Re-generate.
814         * ax-gdb.c (gen_expr): Use gdbarch_num_cooked_regs.
815         * dwarf2-frame.c (dwarf2_frame_cache): Likewise.
816         * eval.c (evaluate_subexp_standard): Likewise.
817         * findvar.c (value_of_register): Likewise.
818         (value_of_register_lazy): Likewise.
819         (address_from_register): Likewise.
820         * frame.c (get_frame_register_bytes): Likewise.
821         * gdbarch-selftests.c (register_to_value_test): Likewise.
822         * h8300-tdep.c (h8300_register_type): Likewise.
823         * i386-tdep.c (i386_dbx_reg_to_regnum): Likewise.
824         (i386_svr4_reg_to_regnum): Likewise.
825         * infcmd.c (default_print_registers_info): Likewise.
826         (registers_info): Likewise.
827         (print_vector_info): Likewise.
828         (default_print_float_info): Likewise.
829         * m68hc11-tdep.c (m68hc11_frame_unwind_cache): Likewise.
830         * mdebugread.c (mdebug_reg_to_regnum): Likewise.
831         * mi/mi-main.c (mi_cmd_data_list_register_names): Likewise.
832         (mi_cmd_data_list_changed_registers): Likewise.
833         (mi_cmd_data_list_register_values): Likewise.
834         (mi_cmd_data_write_register_values): Likewise.
835         (mi_cmd_trace_frame_collected): Likewise.
836         * mips-tdep.c (print_gp_register_row): Likewise.
837         (mips_print_registers_info): Likewise.
838         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
839         * regcache.c (init_regcache_descr): Likewise.
840         (register_size): Likewise.
841         (register_dump::dump): Likewise.
842         (cooked_read_test): Likewise.
843         (cooked_write_test): Likewise.
844         * rs6000-tdep.c (rs6000_register_sim_regno): Likewise.
845         (rs6000_gdbarch_init): Likewise.
846         * stabsread.c (stab_reg_to_regnum): Likewise.
847         * stack.c (info_frame_command): Likewise.
848         * target-descriptions.c (tdesc_register_name): Likewise.
849         * trad-frame.c (trad_frame_alloc_saved_regs): Likewise.
850         * tui/tui-regs.c (tui_show_register_group): Likewise.
851         * user-regs.c (user_reg_map_name_to_regnum): Likewise.
852         (user_reg_map_regnum_to_name): Likewise.
853         (value_of_user_reg): Likewise.
854         (maintenance_print_user_registers): Likewise.
855         * xtensa-tdep.c (xtensa_find_register_by_name): Likewise.
856         (xtensa_register_name): Likewise.
857         (xtensa_register_type): Likewise.
858         (xtensa_reg_to_regnum): Likewise.
859         (xtensa_pseudo_register_read): Likewise.
860         (xtensa_pseudo_register_write): Likewise.
861
862 2018-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
863
864         * amd64-tdep.c (amd64_pseudo_register_read_value): Use
865         correctly-sized buffer with raw_read.
866         (amd64_pseudo_register_write): Use correctly-sized buffer for
867         raw_read/raw_write.
868
869 2018-10-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
870
871         * typeprint.c (_initialize_typeprint): Fix wrong prefixname arg
872         in add_prefix_cmd of set print type.
873
874 2018-10-19  Tom Tromey  <tom@tromey.com>
875
876         PR tui/18388:
877         * NEWS: Mention tabset deprecation.
878         * tui/tui-win.c (tui_tab_width, internal_tab_width): New globals.
879         (update_tab_width): New function.
880         (tui_set_tab_width, tui_show_tab_width): New functions.
881         (tui_set_tab_width_command): Use update_tab_width.
882         (_initialize_tui_win): Move to end of file.  Deprecate "tabset".
883         Add new "set tui tab-width" command.
884         * tui/tui-source.c (tui_set_source_content): Update.
885         * tui/tui-disasm.c (tui_set_disassem_content): Update.
886         * tui/tui-data.h (tui_default_tab_len, tui_set_default_tab_len):
887         Don't declare.
888         (tui_tab_width): Declare.
889         * tui/tui-data.c (default_tab_len, tui_default_tab_len)
890         (tui_set_default_tab_len): Remove.
891
892 2018-10-19  Tom Tromey  <tom@tromey.com>
893
894         * tui/tui-io.h (key_is_start_sequence, key_is_end_sequence)
895         (key_is_backspace, tui_getc): Don't declare.
896         * tui/tui-io.c (key_is_start_sequence): Now static.
897         (key_is_end_sequence, key_is_backspace): Remove.
898         (tui_getc): Now static.
899
900 2018-10-19  Tom Tromey  <tom@tromey.com>
901
902         * symfile.c (reread_symbols): Clear "static_links".
903
904 2018-10-19  Alan Hayward  <alan.hayward@arm.com>
905
906         * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_SIZE): New
907         define.
908         (aarch64_linux_sigframe_init): Extra boundary checks.
909
910 2018-10-19  Andreas Arnez  <arnez@linux.ibm.com>
911
912         * s390-tdep.c (s390_pseudo_register_type): For v0-v15 don't yield
913         the possibly non-existent tdesc type 'vec128', but the type of raw
914         register v16 instead.
915
916 2018-10-19  Gary Benson <gbenson@redhat.com>
917
918         * cli/cli-interp.c (cli_interp::~cli_interp): New function.
919
920 2018-10-18  Sergio Durigan Junior  <sergiodj@redhat.com>
921
922         PR cli/23785
923         * cli/cli-dump.c (restore_binary_file): Check if "file" is
924         NULL.
925
926 2018-10-17  Paul Koning  <paul_koning@dell.com>
927
928         * charset.c (convert_between_encodings): Fix unsigned overflow.
929
930 2018-10-17  John Baldwin  <jhb@FreeBSD.org>
931
932         * fbsd-nat.c (fbsd_nat_target::info_proc) Use
933         fbsd_info_proc_mappings_header and fbsd_info_proc_mappings_entry.
934         * fbsd-tdep.c (fbsd_vm_map_entry_flags): Mark static.
935         (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
936         New functions.
937         (fbsd_core_info_proc_mappings): Use fbsd_info_proc_mappings_header
938         and fbsd_info_proc_mappings_header.
939         * fbsd-tdep.h (fbsd_vm_map_entry_flags): Remove.
940         (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
941         New.
942
943 2018-10-17  Joel Brobecker  <brobecker@adacore.com>
944
945         * MAINTAINERS (Responsible Maintainers): Add Rainer Orth as
946         Solaris Maintainer.
947
948 2018-10-15  Tom Tromey  <tom@tromey.com>
949
950         * tui/tui.c (strcat_to_buf): Remove casts.
951         * tui/tui-winsource.c (tui_show_source_line)
952         (tui_set_is_exec_point_at, tui_line_is_displayed): Remove casts.
953         * tui/tui-wingeneral.c (tui_refresh_win, box_win): Remove casts.
954         * tui/tui-windata.c (tui_first_data_item_displayed)
955         (tui_delete_data_content_windows, tui_erase_data_content)
956         (tui_display_all_data, tui_display_data_from)
957         (tui_refresh_data_win, tui_vertical_data_scroll): Remove casts.
958         * tui/tui-win.c (tui_set_win_height)
959         (make_invisible_and_set_new_height, parse_scrolling_args): Remove
960         casts.
961         * tui/tui-win.c (tui_resize_all): Remove casts.
962         (tui_scroll_backward_command, tui_set_focus)
963         (tui_set_tab_width_command): Likewise.
964         * tui/tui-source.c (tui_vertical_source_scroll): Remove cast.
965         * tui/tui-regs.c (tui_show_register_group): Remove cast.
966         * tui/tui-layout.c (tui_set_layout_by_name): Remove cast.
967         * tui/tui-disasm.c (tui_vertical_disassem_scroll): Remove cast.
968         * tui/tui-data.c (tui_partial_win_by_name, tui_free_win_content):
969         Remove casts.
970
971 2018-10-15  Simon Marchi  <simon.marchi@ericsson.com>
972
973         * MAINTAINERS (Responsible Maintainers): Add Alan Hayward as
974         AArch64/ARM maintainer.
975
976 2018-10-11  Gary Benson <gbenson@redhat.com>
977
978         * interps.h (interp::m_name): Make private and mutable.
979         * interps.c (interp::~interp): Free m_name.
980
981 2018-10-10  Sergio Durigan Junior  <sergiodj@redhat.com>
982             Simon Marchi <simark@simark.ca>
983
984         * README (`configure' options): Add documentation for new
985         "--enable-unit-tests" option.
986         * acinclude.m4: Include "selftest.m4".
987         * configure: Regenerate.
988         * configure.ac: Use "GDB_AC_SELFTEST".
989         * maint.c (maintenance_selftest): Update message informing
990         that selftests have been disabled.
991         (maintenance_info_selftests): Likewise.
992         * selftest.m4: New file.
993
994 2018-10-10  Gary Benson <gbenson@redhat.com>
995
996         * remote.c (remote_target::remote_send_printf): Add
997         missing va_end found by Coverity.
998
999 2018-10-10  Markus Metzger  <markus.t.metzger@intel.com>
1000
1001         * btrace.c (ftrace_update_function): Add indirect jump heuristic.
1002
1003 2018-10-09  Tom Tromey  <tom@tromey.com>
1004
1005         * configure: Rebuild.
1006         * sanitize.m4 (AM_GDB_UBSAN): Default to no.
1007         * NEWS: Update --enable-ubsan documentation.
1008
1009 2018-10-09  Gary Benson <gbenson@redhat.com>
1010
1011         * dwarf2read.c (create_dwp_hash_table): Fix buffer overrun
1012         found by Coverity.
1013
1014 2018-10-08  Tom Tromey  <tom@tromey.com>
1015
1016         * riscv-fbsd-tdep.c (riscv_fbsd_sigframe_init): Remove unused
1017         variable.
1018         (riscv_fbsd_init_abi): Likewise.
1019
1020 2018-10-08  Weimin Pan  <weimin.pan@oracle.com>
1021         * valops.c (value_struct_elt_for_reference): Rename local variable
1022         to work around the shadowing a previous local warning.
1023
1024 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
1025
1026         * Makefile.in (ALLDEPFILES): Add riscv-fbsd-nat.c.
1027         * NEWS: Mention new FreeBSD/riscv native configuration.
1028         * configure.host: Add riscv*-*-freebsd*.
1029         * configure.nat: Likewise.
1030         * riscv-fbsd-nat.c: New file.
1031
1032 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
1033
1034         * Makefile.in (ALL_TARGET_OBS): Add riscv-fbsd-tdep.o.
1035         (HFILES_NO_SRCDIR): Add riscv-fbsd-tdep.h.
1036         (ALLDEPFILES): Add riscv-fbsd-tdep.c.
1037         * NEWS: Mention new FreeBSD/riscv target.
1038         * configure.tgt: Add riscv*-*-freebsd*.
1039         * riscv-fbsd-tdep.c: New file.
1040         * riscv-fbsd-tdep.h: New file.
1041
1042 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
1043
1044         * regcache.h (struct regcache_map_entry): Note that this type can
1045         be used with traditional frame caches.
1046         * trad-frame.c (trad_frame_set_reg_regmap): New.
1047         * trad-frame.h (trad_frame_set_reg_regmap): New.
1048
1049 2018-10-08  Weimin Pan  <weimin.pan@oracle.com>
1050
1051         PR c++/16841
1052         * valops.c (get_virtual_base_offset): New function.
1053         (value_struct_elt_for_reference): Use it to get virtual base offset
1054         and add it in calculating class member address.
1055
1056 2018-10-08   John Darrington <john@darrington.wattle.id.au>
1057
1058     * dwarf2read.c (dwarf2_cu) <producer_is_codewarrior>: New field.
1059       (check_producer): Check if the producer is codewarrior.
1060       (producer_is_codewarrior): New function.
1061       (lnp_state_machine::record_line): Ignore is_stmt flag for records
1062        produced by codewarrior.
1063       (dwarf2_cu::dwarf2_cu): Initialize producer_is_codewarrior.
1064
1065 2018-10-06  Tom Tromey  <tom@tromey.com>
1066
1067         PR python/19399:
1068         * python/py-inferior.c: Add "architecture" entry.
1069         (infpy_architecture): New function.
1070
1071 2018-10-06  Tom Tromey  <tom@tromey.com>
1072
1073         PR python/21765:
1074         * python/py-symbol.c (gdbpy_initialize_symbols): Redefine
1075         SYMBOL_VARIABLES_DOMAIN, SYMBOL_FUNCTIONS_DOMAIN,
1076         SYMBOL_TYPES_DOMAIN.  Define SYMBOL_MODULE_DOMAIN,
1077         SYMBOL_COMMON_BLOCK_DOMAIN, SYMBOL_LOC_COMMON_BLOCK.
1078
1079 2018-10-06  Tom Tromey  <tom@tromey.com>
1080
1081         PR build/17077:
1082         * Makefile.in (OPCODES_CFLAGS): Remove "-I$(OPCODES_SRC)/..".
1083         * arc-tdep.c, frv-tdep.c, lm32-tdep.c, mep-tdep.c,
1084         microblaze-tdep.c, or1k-tdep.h: Use ../opcodes, not opcodes, in
1085         #include.
1086
1087 2018-10-06  Tom Tromey  <tom@tromey.com>
1088
1089         * python/py-breakpoint.c (bppy_get_location): Handle a
1090         bp_breakpoint without a location.
1091
1092 2018-10-06  Tom Tromey  <tom@tromey.com>
1093
1094         * python/lib/gdb/function/strfns.py (_MemEq, _StrLen, _StrEq)
1095         (_RegEx): Reformat help text.
1096         * python/lib/gdb/function/caller_is.py (CallerIs, CallerMatches)
1097         (AnyCallerIs, AnyCallerMatches): Reformat help text.
1098         * python/lib/gdb/function/as_string.py (_AsString): Reformat help
1099         text.
1100         * python/lib/gdb/command/xmethods.py (InfoXMethod)
1101         (EnableXMethod, DisableXMethod): Remove help indentation.
1102         Capitalize meta-syntactic variables.
1103         * python/lib/gdb/command/unwinders.py (InfoUnwinder)
1104         (EnableUnwinder, DisableUnwinder): Remove help indentation.
1105         Capitalize meta-syntactic variables.
1106         * python/lib/gdb/command/explore.py (ExploreCommand)
1107         (ExploreValueCommand, ExploreTypeCommand): Reformat help text.
1108         * python/lib/gdb/command/type_printers.py (InfoTypePrinter)
1109         (EnableTypePrinter, DisableTypePrinter): Remove help indentation.
1110         * python/lib/gdb/command/pretty_printers.py (InfoPrettyPrinter):
1111         Remove help indentation.
1112         (EnablePrettyPrinter, DisablePrettyPrinter): Likewise.
1113         * python/lib/gdb/command/frame_filters.py (EnableFrameFilter)
1114         (DisableFrameFilter, SetFrameFilterPriority)
1115         (ShowFrameFilterPriority, InfoFrameFilter): Reword help text.
1116
1117 2018-10-06  Tom Tromey  <tom@tromey.com>
1118
1119         PR tui/28819:
1120         * tui/tui-io.c (gdb_wgetch): New function.
1121         (tui_mld_getc, tui_getc): Use it.
1122
1123 2018-10-05  Tom Tromey  <tom@tromey.com>
1124
1125         * sol-thread.c (sol_thread_target::wait): Rename inner
1126         "save_ptid".
1127
1128 2018-10-04  Tom Tromey  <tom@tromey.com>
1129
1130         * configure: Rebuild.
1131         * warning.m4 (AM_GDB_WARNINGS): Add -Wshadow=local.
1132
1133 2018-10-04  Tom Tromey  <tom@tromey.com>
1134
1135         * guile/scm-frame.c (gdbscm_frame_read_var): Remove inner
1136         declaration of "block".
1137
1138 2018-10-04  Tom Tromey  <tom@tromey.com>
1139
1140         * common/filestuff.c (fdwalk): Remove inner declaration of
1141         "result".
1142
1143 2018-10-04  Tom Tromey  <tom@tromey.com>
1144
1145         * msp430-tdep.c (msp430_push_dummy_call): Rename inner
1146         "structs_addr" and hoist declaration.
1147
1148 2018-10-04  Tom Tromey  <tom@tromey.com>
1149
1150         * linux-tdep.c (linux_make_mappings_corefile_notes): Introduce new
1151         variable "size".
1152
1153 2018-10-04  Tom Tromey  <tom@tromey.com>
1154
1155         * mdebugread.c (parse_partial_symbols): Use std::string.
1156
1157 2018-10-04  Tom Tromey  <tom@tromey.com>
1158
1159         * ctf.c (SET_ARRAY_FIELD): Rename "u32".
1160         * p-valprint.c (pascal_val_print): Split inner "i" variable.
1161         * xtensa-tdep.c (xtensa_push_dummy_call): Declare "i" in loop
1162         header.
1163         * xstormy16-tdep.c (xstormy16_push_dummy_call): Declare "val" in
1164         more inner scope.
1165         * xcoffread.c (read_xcoff_symtab): Rename inner "symbol".
1166         * varobj.c (varobj_update): Rename inner "newobj",
1167         "type_changed".
1168         * valprint.c (generic_emit_char): Rename inner "buf".
1169         * valops.c (find_overload_match): Rename inner "temp".
1170         (value_struct_elt_for_reference): Declare "v" in more inner
1171         scope.
1172         * v850-tdep.c (v850_push_dummy_call): Rename "len".
1173         * unittests/array-view-selftests.c (run_tests): Rename inner
1174         "vec".
1175         * tui/tui-stack.c (tui_show_frame_info): Declare "i" in loop
1176         header.
1177         * tracepoint.c (merge_uploaded_trace_state_variables): Declare
1178         "tsv" in more inner scope.
1179         (print_one_static_tracepoint_marker): Rename inner
1180         "tuple_emitter".
1181         * tic6x-tdep.c (tic6x_analyze_prologue): Declare "inst" lower.
1182         (tic6x_push_dummy_call): Don't redeclare "addr".
1183         * target-float.c: Declare "dto" lower.
1184         * symtab.c (lookup_local_symbol): Rename inner "sym".
1185         (find_pc_sect_line): Rename inner "pc".
1186         * stack.c (print_frame): Don't redeclare "gdbarch".
1187         (return_command): Rename inner "gdbarch".
1188         * s390-tdep.c (s390_prologue_frame_unwind_cache): Renam inner
1189         "sp".
1190         * rust-lang.c (rust_internal_print_type): Declare "i" in loop
1191         header.
1192         * rs6000-tdep.c (ppc_process_record): Rename inner "addr".
1193         * riscv-tdep.c (riscv_push_dummy_call): Declare "info" in inner
1194         scope.
1195         * remote.c (remote_target::update_thread_list): Don't redeclare
1196         "tp".
1197         (remote_target::process_initial_stop_replies): Rename inner
1198         "thread".
1199         (remote_target::remote_parse_stop_reply): Don't redeclare "p".
1200         (remote_target::wait_as): Don't redeclare "stop_reply".
1201         (remote_target::get_thread_local_address): Rename inner
1202         "result".
1203         (remote_target::get_tib_address): Likewise.
1204
1205         * regcache.c (cooked_read_test): Rename "regnum".
1206         * record-btrace.c (cmd_record_btrace_start): Rename inner
1207         "exception".
1208         * ppc-sysv-tdep.c (ppc64_sysv_abi_return_value): Declare "i" in
1209         loop header.
1210         * ppc-linux-tdep.c (ppc_linux_syscall_record): Declare "i" in loop
1211         header.
1212         (ppu2spu_sniffer): Rename inner "buf".
1213         * parse.c (operator_check_standard): Rename inner "type",
1214         "objfile".
1215         * p-valprint.c (pascal_val_print): Introduce new scope for
1216         "low_bound", "high_bound".
1217         * p-exp.y (yylex): Declare "i" in loop header.
1218         * objfiles.c (objfile_relocate1): Declare "i" in loop header.
1219         Lower declaration of "s".
1220         * nios2-tdep.c (nios2_analyze_prologue): Declare "i" in loop
1221         header.
1222         (nios2_push_dummy_call): Rename "len".
1223         * nat/linux-osdata.c (linux_xfer_osdata_cpus): Rename static
1224         "buf".
1225         (linux_xfer_osdata_fds, linux_xfer_osdata_shm)
1226         (linux_xfer_osdata_sem, linux_xfer_osdata_msg)
1227         (linux_xfer_osdata_modules): Likewise.
1228         * mips-tdep.c (mips_eabi_push_dummy_call): Rename outer "len".
1229         (mips_n32n64_push_dummy_call, mips_o32_push_dummy_call)
1230         (mips_o64_push_dummy_call): Likewise.
1231         * microblaze-tdep.c (microblaze_analyze_prologue): Rename inner
1232         "op".
1233         * mi/mi-main.c (list_available_thread_groups): Rename inner
1234         "tuple_emitter".
1235         (mi_cmd_data_read_memory): Rename inner "opts".
1236         * mi/mi-cmd-var.c (varobj_update_one): Rename inner
1237         "tuple_emitter".
1238         * mep-tdep.c (mep_analyze_prologue): Declare "rn" in loop header.
1239         * mdebugread.c (parse_symbol): Rename inner "b".  Declare "f" in
1240         more inner scope.
1241         (parse_partial_symbols): Rename inner "pst", "p", "name"
1242         * main.c (captured_main_1): Rename inner "i"s.
1243         * machoread.c (macho_symfile_read_all_oso): Don't redeclare
1244         "oso2".
1245         * linux-tdep.c (linux_info_proc): Rename inner "filename".
1246         * linespec.c (linespec_lexer_lex_string): Rename inner "p".
1247         * infrun.c (handle_no_resumed): Don't redeclare "thread".
1248         (handle_signal_stop): Rename inner "gdbarch".
1249         (handle_command): Declare "signum" in loop header.
1250         * ia64-tdep.c (ia64_pseudo_register_read): Don't redeclare
1251         "status".
1252         (examine_prologue): Rename inner "sol" and "sof".
1253         (ia64_extract_return_value): Rename inner "val".  Declare another
1254         "val" in a more inner scope.
1255         * hppa-bsd-tdep.c (hppabsd_find_global_pointer): Declare "buf" in
1256         inner scope.
1257         * guile/scm-symbol.c (gdbscm_lookup_symbol): Rename inner
1258         "except".
1259         * findvar.c (default_read_var_value): Don't redeclare "addr".
1260         * f-exp.y (yylex): Declare "i" in loop header.
1261         * eval.c (evaluate_subexp_standard): Don't redeclare "type".
1262         Rename inner "type", "expect_type".
1263         (evaluate_subexp_for_sizeof): Rename inner "pc".
1264         * elfread.c (elf_symfile_read): Rename inner "abfd".
1265         * dwarf2read.c (read_debug_names_from_section): Don't redeclare
1266         "bytes_read".
1267         (process_psymtab_comp_unit_reader): Don't redeclare "gdbarch".
1268         (add_partial_subprogram): Rename inner "lowpc" and "highpc".
1269         (dwarf_decode_line_header): Rename inner "lh".
1270         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Don't redeclare
1271         "offset".  Declare "i" in loop header.
1272         (disassemble_dwarf_expression): Rename inner "addr_size".
1273         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Rename
1274         inner "result".
1275         (dwarf_expr_context::execute_stack_op): Rename inner "offset".
1276         * dwarf2-frame.c (decode_frame_entry_1): Rename inner "length"s.
1277         * disasm.c (do_mixed_source_and_assembly_deprecated): Rename inner
1278         "inner_list_emitter".
1279         (do_mixed_source_and_assembly): Rename inner "tuple_emitter".
1280         * disasm-selftests.c (print_one_insn_test): Wrap "bplen"
1281         declaration in a block.
1282         * csky-tdep.c (csky_analyze_prologue): Declare "offset" lower.
1283         * cp-valprint.c (cp_print_value_fields): Don't redeclare
1284         "obstack_final_size".
1285         * cp-support.c (inspect_type): Declare "i" in loop header.
1286         * compile/compile.c (compile_instance::insert_symbol_error):
1287         Rename inner "e".
1288         * common/agent.c (agent_run_command): Remove inner "ret"
1289         declaration.
1290         * coffread.c (coff_symfile_read): Rename inner "name".
1291         (coff_symfile_read): Rename inner "abfd".
1292         * cli/cli-utils.c (get_number_trailer): Rename inner "val".
1293         * cli/cli-cmds.c (print_disassembly): Rename inner "low" and
1294         "high".
1295         * c-exp.y (lex_one_token): Move "len" declaration lower.
1296         * breakpoint.c (create_longjmp_master_breakpoint): Don't redeclare
1297         "gdbarch".
1298         (create_exception_master_breakpoint): Likewise.  Don't redeclare
1299         "b".
1300         (watch_command_1): Declare "mark" later.
1301         (clear_command): Don't shadow "a" or "b".
1302         (delete_command): Rename inner "b".
1303         (delete_trace_command): Likewise.
1304         * arm-tdep.c (thumb_process_displaced_32bit_insn): Rename inner
1305         "op".
1306         (arm_gdbarch_init): Remove inner "e_flags".
1307         * arch/arm-get-next-pcs.c (thumb_get_next_pcs_raw): Declare
1308         "offset" in inner blocks.
1309
1310 2018-10-04  Simon Marchi  <simon.marchi@ericsson.com>
1311
1312         * dwarf-index-write.c (file_write): Don't write if the vector is
1313         empty.
1314
1315 2018-10-05  Tom de Vries  <tdevries@suse.de>
1316
1317         * python/py-progspace.c (pspy_solib_name): Fix type mismatch in
1318         PyArg_ParseTuple call.
1319
1320 2018-10-05  Tom de Vries  <tdevries@suse.de>
1321
1322         * python/py-record-btrace.c (recpy_bt_goto): Fix type mismatch in
1323         PyArg_ParseTuple call.
1324
1325 2018-10-04  Joel Brobecker  <brobecker@adacore.com>
1326
1327         * psymtab.c (recursively_search_psymtabs): Reformat parameters
1328         to avoid exceeding 80 characters per line limit.
1329
1330 2018-10-04  Tom Tromey  <tom@tromey.com>
1331
1332         * symfile.c (syms_from_objfile_1, finish_new_objfile)
1333         (reread_symbols): Update.
1334         * complaints.h (clear_complaints): Remove argument.
1335         * complaints.c (enum complaint_series): Remove.
1336         (series): Remove global.
1337         (complaint_internal): Update.
1338         (clear_complaints): Remove argument.
1339
1340 2018-10-04  Tom Tromey  <tom@tromey.com>
1341
1342         * symfile.c (symbol_file_add_with_addrs): Do not print "no
1343         debugging symbols" message if there is a separate debug objfile.
1344
1345 2018-10-04  Tom Tromey  <tom@tromey.com>
1346
1347         PR cli/19551:
1348         * symfile.c (symbol_file_add_with_addrs): Update output.
1349         * psymtab.c (require_partial_symbols): Update output.
1350
1351 2018-10-04  Tom Tromey  <tom@tromey.com>
1352
1353         PR cli/22234:
1354         * complaints.c: Emit \n.
1355
1356 2018-10-04  Tom Tromey  <tom@tromey.com>
1357
1358         * symfile.c (symbol_file_add_with_addrs, symbol_file_clear)
1359         (separate_debug_file_exists, find_separate_debug_file)
1360         (add_symbol_file_command, reread_symbols, allocate_symtab)
1361         (allocate_compunit_symtab): Use filtered printing, not
1362         unfiltered.
1363         * psymtab.c (require_partial_symbols, dump_psymtab)
1364         (allocate_psymtab): Use filtered printing, not unfiltered.
1365
1366 2018-10-04  Tom Tromey  <tom@tromey.com>
1367
1368         * complaints.c (complaint_internal): Correctly check complaint
1369         count.
1370
1371 2018-10-04  Tom Tromey  <tom@tromey.com>
1372
1373         * complaints.h (struct complaints): Remove declaration.
1374         * complaints.c (clear_complaints): Remove an unused variable.
1375
1376 2018-10-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1377
1378         * MAINTAINERS (Write After Approval): Add self.
1379
1380 2018-10-03  Tom Tromey  <tom@tromey.com>
1381
1382         * guile/scm-value.c (gdbscm_value_to_string): Initialize
1383         "buffer_contents".
1384         * coffread.c (coff_symtab_read): Initialize "newobj".
1385
1386 2018-10-03  Simon Marchi  <simon.marchi@polymtl.ca>
1387
1388         * dwarf2read.c (read_func_scope): Remove struct keyword in
1389         range-based for.
1390
1391 2018-10-03  Tom Tromey  <tom@tromey.com>
1392
1393         * README: Mention --enable-ubsan.
1394         * NEWS: Mention --enable-ubsan.
1395         * acinclude.m4: Include sanitize.m4.
1396         * configure: Rebuild.
1397         * configure.ac: Call AM_GDB_UBSAN.
1398         * sanitize.m4: New file.
1399
1400 2018-10-03  Tom Tromey  <tom@tromey.com>
1401
1402         * expression.h (enum exp_opcode): Use uint8_t as base type.
1403         * expprint.c (op_name): Handle invalid opcodes.
1404
1405 2018-10-03  Tom Tromey  <tom@tromey.com>
1406
1407         * parse.c (prefixify_expression): Add assert.
1408         (parse_exp_in_context_1): Throw exception if the expression is
1409         empty.
1410
1411 2018-10-03  Tom Tromey  <tom@tromey.com>
1412
1413         * dwarf2read.c (read_signed_leb128): Work in ULONGEST.
1414
1415 2018-10-03  Tom Tromey  <tom@tromey.com>
1416
1417         * c-exp.y (parse_number): Work in unsigned.  Remove casts.
1418
1419 2018-10-03  Tom Tromey  <tom@tromey.com>
1420
1421         * dwarf2read.c (read_subrange_type): Make "negative_mask"
1422         unsigned.
1423
1424 2018-10-03  Tom Tromey  <tom@tromey.com>
1425
1426         * findvar.c (extract_integer): Do work in an unsigned type.
1427
1428 2018-10-03  Tom Tromey  <tom@tromey.com>
1429
1430         * common/enum-flags.h (enum_flags::operator~): Add static assert.
1431         * symfile-add-flags.h (enum symfile_add_flag): Use unsigned as
1432         base type.
1433         * objfile-flags.h (enum objfile_flag): Use unsigned as base type.
1434         * gdbtypes.h (enum type_instance_flag_value): Use unsigned as base
1435         type.
1436         * c-lang.h (enum c_string_type_values): Use unsigned as base
1437         type.
1438         * btrace.h (enum btrace_thread_flag): Use unsigned as base type.
1439
1440 2018-10-03  Tom Tromey  <tom@tromey.com>
1441
1442         * dwarf2-frame.h (dwarf2_frame_state_reg_info)
1443         <~dwarf2_frame_state_reg_info>: Update.
1444         <dwarf2_frame_state_reg_info>: Update.
1445         <alloc_regs>: Add assertion.  Update.
1446         <reg>: Now a std::vector.
1447         <num_regs>: Remove.
1448         <swap>: Update.
1449         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
1450         (execute_cfa_program_test, dwarf2_frame_cache): Update.
1451
1452 2018-10-03  Tom Tromey  <tom@tromey.com>
1453
1454         * namespace.c (add_using_directive): Don't pass NULL to memcpy.
1455
1456 2018-10-03  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1457
1458         * tid-parse.c (tid_is_in_list): Fix wrong 'See' comment.
1459
1460 2018-10-02  Tom Tromey  <tom@tromey.com>
1461
1462         * aarch64-linux-tdep.c (aarch64_linux_sigframe_init): Use pulongest.
1463
1464 2018-10-02  John Darrington <john@darrington.wattle.id.au>
1465
1466         * NEWS: Mention changed commands.
1467         * ser-uds.c: New file.
1468         * configure.ac (SER_HARDWIRE): Add ser-uds.o.
1469         * configure: Regenerate.
1470         * Makefile.in: Add new file.
1471         * serial.c (serial_open): Check if filename is a socket
1472           and lookup the appropriate interface accordingly.
1473
1474 2018-10-01  Alan Hayward  <alan.hayward@arm.com>
1475
1476         * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_OFFSET): Add
1477         define.
1478         (AARCH64_EXTRA_MAGIC): Likewise.
1479         (AARCH64_FPSIMD_MAGIC): Likewise.
1480         (AARCH64_SVE_MAGIC): Likewise.
1481         (AARCH64_EXTRA_DATAP_OFFSET): Likewise.
1482         (AARCH64_FPSIMD_FPSR_OFFSET): Likewise.
1483         (AARCH64_FPSIMD_FPCR_OFFSET): Likewise.
1484         (AARCH64_FPSIMD_V0_OFFSET): Likewise.
1485         (AARCH64_FPSIMD_VREG_SIZE): Likewise.
1486         (AARCH64_SVE_CONTEXT_VL_OFFSET): Likewise.
1487         (AARCH64_SVE_CONTEXT_REGS_OFFSET): Likewise.
1488         (AARCH64_SVE_CONTEXT_P_REGS_OFFSET): Likewise.
1489         (AARCH64_SVE_CONTEXT_FFR_OFFSET): Likewise.
1490         (AARCH64_SVE_CONTEXT_SIZE): Likewise.
1491         (read_aarch64_ctx): Add function.
1492         (aarch64_linux_sigframe_init): Detect FP registers.
1493
1494 2018-10-01  Alan Hayward  <alan.hayward@arm.com>
1495
1496         * aarch64-tdep.c (AARCH64_Q0_REGNUM): Move to here.
1497         (AARCH64_D0_REGNUM): Likewise.
1498         (AARCH64_S0_REGNUM): Likewise.
1499         (AARCH64_H0_REGNUM): Likewise.
1500         (AARCH64_B0_REGNUM): Likewise.
1501         (AARCH64_SVE_V0_REGNUM): Likewise.
1502         * arch/aarch64.h (AARCH64_Q0_REGNUM): Move from here.
1503         (AARCH64_D0_REGNUM): Likewise.
1504         (AARCH64_S0_REGNUM): Likewise.
1505         (AARCH64_H0_REGNUM): Likewise.
1506         (AARCH64_B0_REGNUM): Likewise.
1507         (AARCH64_SVE_V0_REGNUM): Likewise.
1508
1509 2018-10-01  Gary Benson <gbenson@redhat.com>
1510
1511         * gdb_proc_service.h (gdb_prfpregset_t): Remove typedef.
1512         * proc-service.c (ps_lgetfpregs, ps_lsetfpregs): Use
1513         prfpregset_t instead of gdb_prfpregset_t.
1514         * configure.ac (PRFPREGSET_T_BROKEN): Remove check.
1515         * configure, config.in: Rebuild.
1516
1517 2018-10-01  Gary Benson <gbenson@redhat.com>
1518
1519         * common/gdb_proc_service.h: New file, factored out from...
1520         * gdb_proc_service.h: Moved common code to the above file.
1521         * Makefile.in (HFILES_NO_SRCDIR): Add the above new file.
1522
1523 2018-10-01  Gary Benson <gbenson@redhat.com>
1524
1525         * gdb_proc_service.h: Use elf_gregset_t if prgregset_t is
1526         undefined.  Use elf_fpregset_t if prfpregset_t is undefined.
1527
1528 2018-10-01  Gary Benson <gbenson@redhat.com>
1529
1530         * configure.ac: Check if sys/procfs.h defines elf_fpregset_t.
1531         (AC_CHECK_HEADERS): Check for linux/elf.h.
1532         * configure, config.in: Rebuild.
1533         * gdb_proc_service.h: Include linux/elf.h if sys/procfs.h
1534         doesn't define elf_fpregset_t.
1535
1536 2018-10-01  Gary Benson <gbenson@redhat.com>
1537
1538         * gdb_proc_service.h: Whitespace change.
1539
1540 2018-10-01  Tom Tromey  <tom@tromey.com>
1541
1542         * unittests/scoped_mmap-selftests.c: Don't check HAVE_UNISTD_H.
1543         * unittests/scoped_fd-selftests.c: Don't check HAVE_UNISTD_H.
1544         * common/scoped_fd.h: Don't check HAVE_UNISTD_H.
1545
1546 2018-10-01  Tom Tromey  <tom@tromey.com>
1547
1548         * README: Minor change.
1549
1550 2018-09-30  Pedro Alves  <palves@redhat.com>
1551
1552         * darwin-nat-info.c (darwin_debug_regions_recurse)
1553         (info_mach_exceptions_command): Remove unused local variables.
1554         * darwin-nat.c (darwin_decode_notify_message)
1555         (darwin_nat_target::resume, darwin_nat_target::mourn_inferior)
1556         (darwin_stop_inferior, darwin_setup_exceptions)
1557         (darwin_nat_target::kill, darwin_attach_pid, darwin_ptrace_him)
1558         (darwin_nat_target::attach, darwin_nat_target::detach)
1559         (darwin_read_write_inferior, darwin_read_dyld_info): Remove unused
1560         local variables.
1561         * i386-darwin-nat.c (i386_darwin_dr_set): Remove unused local
1562         variables.
1563
1564 2018-09-29  Tom Tromey  <tom@tromey.com>
1565
1566         * README: Remove some leftover text.
1567
1568 2018-09-29  Tom Tromey  <tom@tromey.com>
1569
1570         * PROBLEMS: Rewrite.
1571         * README: Update.
1572
1573 2018-09-28  John Baldwin  <jhb@FreeBSD.org>
1574
1575         * disasm-selftests.c (print_one_insn_test): Add bfd_arch_riscv to
1576         case with explicit breakpoint kind.
1577         * riscv-tdep.c (show_use_compressed_breakpoints): Remove
1578         'additional_info' and related logic.
1579         (riscv_debug_breakpoints): New variable.
1580         (riscv_breakpoint_kind_from_pc): Use the length of the existing
1581         instruction to determine the breakpoint kind.
1582         (_initialize_riscv_tdep): Add 'set/show debug riscv breakpoints'
1583         flag.  Update description of 'set/show riscv
1584         use-compressed-breakpoints' flag.
1585
1586 2018-09-28  Andrew Burgess  <andrew.burgess@embecosm.com>
1587
1588         (NEWS): Mention changes to frame related commands.
1589         * cli/cli-decode.c (add_cmd_suppress_notification): New function.
1590         (add_prefix_cmd_suppress_notification): New function.
1591         (add_com_suppress_notification): Call
1592         add_cmd_suppress_notification.
1593         * command.h (add_cmd_suppress_notification): Declare.
1594         (add_prefix_cmd_suppress_notification): Declare.
1595         * mi/mi-cmd-stack.c: Add 'safe-ctype.h' include.
1596         (parse_frame_specification): Moved from stack.c, with
1597         simplification to handle a single argument.
1598         (mi_cmd_stack_select_frame): Use parse_frame_specification, the
1599         switch to the selected frame.  Add a header comment.
1600         * stack.c: Remove 'safe-ctype.h' include.
1601         (find_frame_for_function): Add declaration.
1602         (find_frame_for_address): New function.
1603         (parse_frame_specification): Moved into mi/mi-cmd-stack.c.
1604         (frame_selection_by_function_completer): New function.
1605         (info_frame_command): Rename to...
1606         (info_frame_command_core): ...this, and update parameter types.
1607         (select_frame_command): Rename to...
1608         (select_frame_command_core): ...this, and update parameter types.
1609         (frame_command): Rename to...
1610         (frame_command_core): ...this, and update parameter types.
1611         (class frame_command_helper): New class to wrap implementations of
1612         frame related sub-commands.
1613         (frame_apply_cmd_list): New static global.
1614         (frame_cmd_list): Make static.
1615         (select_frame_cmd_list): New global for sub-commands.
1616         (info_frame_cmd_list): New global for sub-commands.
1617         (_initialize_stack): Register sub-commands for 'frame',
1618         'select-frame', and 'info frame'.  Update 'frame apply' commands
1619         to use frame_apply_cmd_list.  Move function local static
1620         frame_apply_list to file static frame_apply_cmd_list for
1621         consistency.
1622         * stack.h (select_frame_command): Delete declarationn.
1623         (select_frame_for_mi): Declare new function.
1624
1625 2018-09-26  Andrew Burgess  <andrew.burgess@embecosm.com>
1626
1627         * riscv-tdep.c (riscv_insn::decode): Decode c.lui.
1628         (riscv_scan_prologue): Split handling of AUIPC, LUI, ADD, ADDI,
1629         and NOP.
1630
1631 2018-09-26  Simon Marchi  <simon.marchi@ericsson.com>
1632
1633         * elf32-nds32.c (elf32_nds32_allocate_dynrelocs): Remove.
1634
1635 2018-09-26  Tom Tromey  <tom@tromey.com>
1636
1637         * valops.c (auto_abandon): Remove dead code.
1638
1639 2018-09-26  Tom Tromey  <tom@tromey.com>
1640
1641         * tui/tui-win.c (WIN_HEIGHT_USAGE): Remove extra ">"s.
1642
1643 2018-09-24  Tom Tromey  <tom@tromey.com>
1644
1645         * common/pathstuff.c (get_standard_cache_dir): Make
1646         "xdg_cache_home" and "home" const.
1647         * top.c (init_history): Make "tmpenv" const.
1648         * main.c (get_init_files): Make "homedir" const.
1649
1650 2018-09-23  Tom Tromey  <tom@tromey.com>
1651
1652         PR python/18852:
1653         * python/py-param.c (get_set_value): Use gdbpy_handle_exception.
1654
1655 2018-09-23  Tom Tromey  <tom@tromey.com>
1656
1657         * python/py-function.c (fnpy_call): Use gdbpy_handle_exception.
1658         * python/py-cmd.c (cmdpy_function): Use gdbpy_handle_exception.
1659         * python/python-internal.h (gdbpy_handle_exception): Declare.
1660         * python/py-utils.c (gdbpy_handle_exception): New function.
1661
1662 2018-09-23  Tom Tromey  <tom@tromey.com>
1663
1664         PR python/17284:
1665         * python/py-type.c (typy_template_argument): Check for negative
1666         argument number.
1667
1668 2018-09-23  Tom Tromey  <tom@tromey.com>
1669
1670         PR python/14062:
1671         * python/python.c (gdbpy_run_events): Do not ignore exceptions.
1672
1673 2018-09-23  Tom Tromey  <tom@tromey.com>
1674
1675         PR python/18170:
1676         * python/py-value.c (valpy_int): Allow conversion from pointer
1677         type.
1678
1679 2018-09-23  Tom Tromey  <tom@tromey.com>
1680
1681         PR python/20126:
1682         * python/py-value.c (valpy_int): Respect type sign.
1683
1684 2018-09-23  Tom Tromey  <tom@tromey.com>
1685
1686         PR python/18352;
1687         * python/py-value.c (valpy_float): Allow conversions from int or
1688         char.
1689         (valpy_int, valpy_long): Allow conversions from float.
1690
1691 2018-09-23  Tom Tromey  <tom@tromey.com>
1692
1693         * ctf.c (ctf_start): Use gdb_fopen_cloexec.
1694         * common/scoped_mmap.c (mmap_file): Use gdb_open_cloexec.
1695
1696 2018-09-23  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1697
1698         * amd64-sol2-tdep.c (amd64_sol2_sigtramp_p): Also recognize
1699         __sighndlr.
1700         * i386-sol2-tdep.c (i386_sol2_sigtramp_p): Likewise.
1701
1702 2018-08-02  Jon Turney  <jon.turney@dronecode.org.uk>
1703
1704         * windows-nat.c (windows_nat_target::wait): Remove a spurious
1705         target_terminal::ours().
1706
1707 2018-09-23  Simon Marchi  <simon.marchi@ericsson.com>
1708
1709         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): Change type
1710         of vl to ULONGEST.
1711
1712 2018-09-21  Yacov Simhony  <ysimhony@gmail.com>
1713
1714         * breakpoint.c (update_inserted_breakpoint_locations): Remove
1715         redundant condition.
1716
1717 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1718
1719         * proc-utils.h (PROC_CTL_WORD_TYPE): Remove.
1720
1721         * procfs.c: Don't check for PR_MODEL_NATIVE definition.
1722         * sparc-sol2-nat.c: Likewise.  Remove Linux, __arch64__ references.
1723         * sol-thread.c (ps_pdmodel): Don't guard definition.
1724
1725         * procfs.c: Fix formatting.
1726
1727         * procfs.c (sysset_t_alloc): Remove.
1728         (create_procinfo): Use XNEW instead of sysset_t_alloc.
1729         (procfs_debug_inferior): Likewise.
1730         (procfs_set_exec_trap): Likewise.
1731         (proc_set_traced_sysentry): Don't allocate argp dynamically.
1732         (proc_set_traced_sysexit): Likewise.
1733
1734         * procfs.c (create_procinfo): Use xsnprintf to fix ARI warning.
1735         (dead_procinfo): Likewise.
1736         (proc_warn): Likewise.
1737         (proc_error): Likewise.
1738         (proc_get_LDT_entry): Likewise.
1739         (do_attach): Likewise.
1740         (procfs_target::pid_to_str): Likewise.
1741         (iterate_over_mappings): Likewise.
1742
1743         * procfs.c (create_procinfo): Fix ARI warning.
1744         (proc_get_status): Likewise.
1745         (proc_stop_process): Likewise.
1746         (proc_run_process): Likewise.
1747         (proc_kill): Likewise.
1748         (proc_get_LDT_entry): Likewise.
1749         (procfs_find_LDT_entry): Likewise.
1750         (proc_update_threads): Likewise.
1751         (proc_iterate_over_threads): Likewise.
1752         (do_attach): Likewise.
1753         (procfs_xfer_memory): Likewise.
1754         (invalidate_cache): Likewise.
1755         (procfs_target::resume): Likewise.
1756         (procfs_init_inferior): Likewise.
1757         (procfs_set_exec_trap): Likewise.
1758         (procfs_target::thread_alive): Likewise.
1759         (procfs_target::pid_to_exec_file): Likewise.
1760         (iterate_over_mappings): Likewise.
1761         (procfs_target::make_corefile_notes): Likewise.
1762         * sol-thread.c (sol_thread_target::thread_alive): Likewise.
1763
1764         * procfs.c (procfs_find_LDT_entry): Silence ARI warning.
1765         (procfs_find_LDT_entry): Likewise.
1766         * sol-thread.c (ps_lgetLDT): Likewise.
1767
1768 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1769
1770         PR tdep/17903
1771         * procfs.c (procfs_target): Declare pid_to_exec_file.
1772         (procfs_target::pid_to_exec_file): New.
1773
1774 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1775
1776         * auxv.c (default_print_auxv_entry): Reflect AT_SUN_CAP_HW1
1777         renaming.
1778         Handle AT_SUN_EMULATOR, AT_SUN_BRANDNAME, AT_SUN_BRAND_AUX1,
1779         AT_SUN_BRAND_AUX2, AT_SUN_BRAND_AUX3, AT_SUN_CAP_HW2.
1780
1781 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1782
1783         * i386-v4-nat.c (regmap, supply_gregset, fill_gregset)
1784         (supply_fpregset, fill_fpregset): Move ...
1785         * i386-sol2-nat.c [PR_MODEL_NATIVE != PR_MODEL_LP64]: ... here.
1786         Remove HAVE_GREGSET_T, HAVE_FPREGET_T guards.
1787         Remove references to ioctl-based procfs.
1788         Include <sys/reg.h>.
1789         Remove PR_MODEL_NATIVE guards.
1790         * configure.nat <sol2, i386> (NATDEPFILES): Remove i386-v4-nat.o.
1791         * Makefile.in (ALLDEPFILES): Remove i386-v4-nat.c.
1792
1793 2018-09-19  Xavier Roirand  <roirand@adacore.com>
1794
1795         PR gdb/20981:
1796         * solib-darwin.c (darwin_get_dyld_bfd): New function.
1797         (darwin_solib_get_all_image_info_addr_at_init): Update call.
1798         (darwin_solib_create_inferior_hook): Handle unrelocated dyld.
1799
1800 2018-09-19  John Baldwin  <jhb@FreeBSD.org>
1801
1802         * fbsd-tdep.c (fbsd_print_sockaddr_in): Style fix.
1803         (fbsd_print_sockaddr_in6): Likewise.
1804
1805 2018-09-19  Richard Bunt  <richard.bunt@arm.com>
1806             Chris January  <chris.january@arm.com>
1807
1808         * eval.c (skip_undetermined_arglist): Skip argument list helper.
1809         (evaluate_subexp_standard): Return a dummy type when
1810         honoring EVAL_SKIP in OP_VAR_VALUE and handle skipping in the
1811         OP_F77_UNDETERMINED_ARGLIST case.
1812         * expression.h (enum noside): Update comment.
1813
1814 2018-09-19  George Vasick <george.vasick@oracle.com>
1815
1816         * solib-svr4.c (svr4_same_1): Also handle amd64 ld.so.1.
1817
1818 2018-09-19  Stefan Teleman <stefan.teleman@oracle.com>
1819             April Chin <april.chin@oracle.com>
1820             Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1821
1822         * procfs.c (MAX_PROC_NAME_SIZE): Allow for 6-digit PID_MAX and
1823         uint_t lwpid_t.
1824         (create_procinfo): Print pids in /proc without leading zeros.
1825
1826 2018-09-18  Sandra Loosemore  <sandra@codesourcery.com>
1827
1828         * nios2-tdep.c (nios2_gcc_target_options): New.
1829         (nios2_gdb_arch_init): Install new hook.
1830
1831 2018-09-18  Simon Marchi  <simon.marchi@ericsson.com>
1832
1833         * patches/0001-Fix-PR-gdb-23558-Use-system-s-getcwd-when-cross-comp.patch:
1834         New file.
1835         * update-gnulib.sh: Apply patch.
1836         * configure: Re-generate.
1837
1838 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1839
1840         * infcmd.c (_initialize_infcmd): Remove "running" from "info proc"
1841         description.  Make "info proc" command descriptions more
1842         consistent.
1843
1844 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1845
1846         * NEWS: Mention 'info proc files' command.
1847
1848 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1849
1850         * fbsd-nat.c (fbsd_nat_target::info_proc): List open file
1851         descriptors for IP_FILES and IP_ALL.
1852
1853 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1854
1855         * fbsd-tdep.c (KF_FLAGS, KF_OFFSET, KF_VNODE_TYPE, KF_SOCK_DOMAIN)
1856         (KF_SOCK_TYPE, KF_SOCK_PROTOCOL, KF_SA_LOCAL, KF_SA_PEER)
1857         (KINFO_FILE_TYPE_SOCKET, KINFO_FILE_TYPE_PIPE)
1858         (KINFO_FILE_TYPE_FIFO, KINFO_FILE_TYPE_KQUEUE)
1859         (KINFO_FILE_TYPE_CRYPTO, KINFO_FILE_TYPE_MQUEUE)
1860         (KINFO_FILE_TYPE_SHM, KINFO_FILE_TYPE_SEM, KINFO_FILE_TYPE_PTS)
1861         (KINFO_FILE_TYPE_PROCDESC, KINFO_FILE_FD_TYPE_ROOT)
1862         (KINFO_FILE_FD_TYPE_JAIL, KINFO_FILE_FD_TYPE_TRACE)
1863         (KINFO_FILE_FD_TYPE_CTTY, KINFO_FILE_FLAG_READ)
1864         (KINFO_FILE_FLAG_WRITE, KINFO_FILE_FLAG_APPEND)
1865         (KINFO_FILE_FLAG_ASYNC, KINFO_FILE_FLAG_FSYNC)
1866         (KINFO_FILE_FLAG_NONBLOCK, KINFO_FILE_FLAG_DIRECT)
1867         (KINFO_FILE_FLAG_HASLOCK, KINFO_FILE_FLAG_EXEC)
1868         (KINFO_FILE_VTYPE_VREG, KINFO_FILE_VTYPE_VDIR)
1869         (KINFO_FILE_VTYPE_VCHR, KINFO_FILE_VTYPE_VLNK)
1870         (KINFO_FILE_VTYPE_VSOCK, KINFO_FILE_VTYPE_VFIFO, FBSD_AF_UNIX)
1871         (FBSD_AF_INET, FBSD_AF_INET6, FBSD_SOCK_STREAM, FBSD_SOCK_DGRAM)
1872         (FBSD_SOCK_SEQPACKET, FBSD_IPPROTO_ICMP, FBSD_IPPROTO_TCP)
1873         (FBSD_IPPROTO_UDP, FBSD_IPPROTO_SCTP): New defines.
1874         (struct fbsd_sockaddr_in, struct fbsd_sockaddr_in6)
1875         (struct fbsd_sockaddr_un): New types.
1876         (fbsd_file_fd, fbsd_file_type, fbsd_file_flags, fbsd_ipproto)
1877         (fbsd_print_sockaddr_in, fbsd_print_sockaddr_in6)
1878         (fbsd_info_proc_files_header, fbsd_info_proc_files_entry)
1879         (fbsd_core_info_proc_files): New functions.
1880         (fbsd_core_info_proc): List open file descriptors for IP_FILES and
1881         IP_ALL.
1882         * fbsd-tdep.h (fbsd_info_proc_files_header)
1883         (fbsd_info_proc_files_entry): New.
1884
1885 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1886
1887         * defs.h (enum info_proc_what) [IP_FILES]: New value.
1888         * infcmd.c (info_proc_cmd_files): New function.
1889         (_initialize_infcmd): Register 'info proc files' command.
1890
1891 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1892
1893         * gnulib/aclocal-m4-deps.mk: Re-generate.
1894         * gnulib/aclocal.m4: Re-generate.
1895         * gnulib/config.in: Re-generate.
1896         * gnulib/configure: Re-generate.
1897         * gnulib/import/Makefile.am: Re-generate.
1898         * gnulib/import/Makefile.in: Re-generate.
1899         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
1900         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1901         * gnulib/import/arpa_inet.in.h: New file.
1902         * gnulib/import/inet_ntop.c: New file.
1903         * gnulib/import/m4/arpa_inet_h.m4: New file.
1904         * gnulib/import/m4/inet_ntop.m4: New file.
1905         * gnulib/import/m4/netinet_in_h.m4: New file.
1906         * gnulib/import/m4/socklen.m4: New file.
1907         * gnulib/import/m4/sockpfaf.m4: New file.
1908         * gnulib/import/m4/stdalign.m4: New file.
1909         * gnulib/import/m4/sys_uio_h.m4: New file.
1910         * gnulib/import/netinet_in.in.h: New file.
1911         * gnulib/import/stdalign.in.h: New file.
1912         * gnulib/import/sys_socket.c: New file.
1913         * gnulib/import/sys_socket.in.h: New file.
1914         * gnulib/import/sys_uio.in.h: New file.
1915         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add inet_ntop
1916         module.
1917
1918 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1919
1920         * gnulib/aclocal-m4-deps.mk: New file.
1921         * gnulib/update-gnulib.sh: Generate "aclocal-m4-deps.mk"
1922         deterministically.
1923
1924 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1925
1926         * fbsd-tdep.c (fbsd_core_vnode_path): Use KF_PATH instead of
1927         KVE_PATH.
1928
1929 2018-09-18  Tom Tromey  <tom@tromey.com>
1930
1931         * compile/compile-object-load.c (struct
1932         link_hash_table_cleanup_data): Add constructor and destructor.
1933         Use DISABLE_COPY_AND_ASSIGN.
1934         (~link_hash_table_cleanup_data): Rename from
1935         link_hash_table_free.  Now a destructor.
1936         (copy_sections): Use gdb::unique_xmalloc_ptr.  Remove cleanups.
1937
1938 2018-09-18  Tom Tromey  <tom@tromey.com>
1939
1940         * compile/compile-object-run.c (do_module_cleanup): Use delete.
1941         * compile/compile-object-load.c (struct munmap_list): Move to
1942         header file.
1943         (munmap_list::add): Rename from munmap_list_add; rewrite.
1944         (munmap_list::~munmap_list): Rename from munmap_list_free.
1945         (munmap_listp_free_cleanup): Remove.
1946         (compile_object_load): Update.
1947         * compile/compile-object-load.h (struct munmap_list): Move from
1948         compile-object-load.c.  Rewrite.
1949
1950 2018-09-18  Alan Hayward  <alan.hayward@arm.com>
1951
1952         * aarch64-tdep.c (pass_in_v): Use register size.
1953         (aarch64_extract_return_value): Likewise.
1954         (aarch64_store_return_value): Likewise.
1955
1956 2018-09-18  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1957
1958         * utils.c (dump_core) [HAVE_SETRLIMIT]: Cast RLIM_INFINITY to
1959         rlim_t.
1960
1961 2018-09-17  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1962
1963         * python/lib/gdb/command/frame_filters.py (EnableFrameFilter):
1964         Fix short help line.
1965
1966 2018-09-17  Tom Tromey  <tom@tromey.com>
1967
1968         PR python/20445:
1969         * configure: Rebuild.
1970         * configure.ac: Conditionally use -DNDEBUG for Python.
1971
1972 2018-09-17  Tom Tromey  <tom@tromey.com>
1973
1974         * configure: Rebuild.
1975         * configure.ac: Use gmp as a library dependency when checking for
1976         mpfr.
1977
1978 2018-09-17  Pedro Alves  <palves@redhat.com>
1979
1980         * python/py-inferior.c (find_inferior_object): Delete.
1981
1982 2018-09-17  Simon Marchi  <simon.marchi@ericsson.com>
1983
1984         * compile/compile-cplus-types.c
1985         (compile_cplus_instance::enter_scope): Don't use new_scope after
1986         std::move.
1987
1988 2018-09-17  Tom Tromey  <tom@tromey.com>
1989
1990         * common/pathstuff.c (get_standard_cache_dir): Use
1991         ~/Library/Caches on macOS.
1992         * common/pathstuff.h (get_standard_cache_dir): Update comment.
1993
1994 2018-09-17  Simon Marchi  <simon.marchi@polymtl.ca>
1995
1996         PR python/23669
1997         * breakpoint.c (commands_cmd_element): New.
1998         (_initialize_breakpoint): Assign commands_cmd_element.
1999         * breakpoint.h (commands_cmd_element): New.
2000         * cli/cli-script.c (while_cmd_element, if_command,
2001         define_cmd_element): New.
2002         (command_name_equals): Remove.
2003         (process_next_line): Compare commands by pointer, not by name.
2004         (_initialize_cli_script): Assign the various cmd_list_element
2005         variables.
2006         * compile/compile.c (compile_cmd_element): New.
2007         (_initialize_compile): Assign compile_cmd_element.
2008         * compile/compile.h (compile_cmd_element): New.
2009         * guile/guile.c (guile_cmd_element): New.
2010         (install_gdb_commands): Assign guile_cmd_element.
2011         * guile/guile.h (guile_cmd_element): New.
2012         * python/python.c (python_cmd_element): New.
2013         (_initialize_python): Assign python_cmd_element.
2014         * python/python.h (python_cmd_element): New.
2015         * tracepoint.c (while_stepping_cmd_element): New.
2016         (_initialize_tracepoint): Assign while_stepping_cmd_element.
2017         * tracepoint.h (while_stepping_cmd_element): New.
2018
2019 2018-09-17  Tom Tromey  <tom@tromey.com>
2020
2021         * infrun.c (save_infcall_suspend_state): Return
2022         infcall_suspend_state_up.
2023         (save_infcall_control_state): Return infcall_control_state_up.
2024         * inferior.h (save_infcall_suspend_state)
2025         (save_infcall_control_state): Declare later.  Return unique
2026         pointers.
2027
2028 2018-09-17  Tom Tromey  <tom@tromey.com>
2029
2030         * infrun.c (struct stop_context): Declare constructor,
2031         destructor, "changed" method.
2032         (stop_context::stop_context): Rename from save_stop_context.
2033         (stop_context::~stop_context): Rename from
2034         release_stop_context_cleanup.
2035         (normal_stop): Update.
2036         (stop_context::changed): Rename from stop_context_changed.  Return
2037         bool.
2038
2039 2018-09-17  Tom Tromey  <tom@tromey.com>
2040
2041         * inferior.h (struct infcall_suspend_state_deleter): New.
2042         (infcall_suspend_state_up): New typedef.
2043         (struct infcall_control_state_deleter): New.
2044         (infcall_control_state_up): New typedef.
2045         (make_cleanup_restore_infcall_suspend_state)
2046         (make_cleanup_restore_infcall_control_state): Don't declare.
2047         * infcall.c (call_function_by_hand_dummy): Update.
2048         * infrun.c (do_restore_infcall_suspend_state_cleanup)
2049         (make_cleanup_restore_infcall_suspend_state): Remove.
2050         (do_restore_infcall_control_state_cleanup)
2051         (make_cleanup_restore_infcall_control_state): Remove.
2052
2053 2018-09-17  Tom Tromey  <tom@tromey.com>
2054
2055         * gdbthread.h (struct thread_control_state): Add initializer.
2056         (class thread_info) <control>: Remove initializer.
2057         * inferior.h (struct inferior_control_state): Add initializer.
2058         (class inferior) <control>: Remove initializer.
2059         (exit_inferior_1): Update.
2060         * infrun.c (struct infcall_control_state): Add constructors.
2061         (save_infcall_control_state): Use new.
2062         (restore_infcall_control_state, discard_infcall_control_state):
2063         Use delete.
2064
2065 2018-09-17  Tom Tromey  <tom@tromey.com>
2066
2067         * infrun.c (struct infcall_suspend_state) <registers>: Now a
2068         unique_ptr.
2069         <siginfo_data>: Now a unique_xmalloc_ptr.
2070         (save_infcall_suspend_state, restore_infcall_suspend_state)
2071         (discard_infcall_suspend_state)
2072         (get_infcall_suspend_state_regcache): Update.
2073
2074 2018-09-17  Tom Tromey  <tom@tromey.com>
2075
2076         * gdbthread.h (struct thread_suspend_state): Add initializers.
2077         (class thread_info) <suspend>: Remove initializer.
2078         * infrun.c (struct infcall_suspend_state): Add initializers.
2079         (save_infcall_suspend_state): Use new.
2080         (discard_infcall_suspend_state): Use delete.
2081
2082 2018-09-16  Tom Tromey  <tom@tromey.com>
2083
2084         * python/python-internal.h (CPYCHECKER_STEALS_REFERENCE_TO_ARG):
2085         Remove.
2086         * python/py-varobj.c (py_varobj_iter_ctor): Change pyiter to
2087         rvalue reference.  Remove CPYCHECKER_STEALS_REFERENCE_TO_ARG.
2088         (py_varobj_iter_new): Likewise.
2089         (py_varobj_get_iterator): Use gdbpy_ref.
2090
2091 2018-09-16  Tom Tromey  <tom@tromey.com>
2092
2093         * python/py-threadevent.c (py_get_event_thread): Simplify.
2094         * python/py-inferior.c (infpy_thread_from_thread_handle):
2095         Return immediately after calling thread_to_thread_object.  Use
2096         Py_RETURN_NONE.
2097         (thread_to_thread_object): Set the exception on a NULL return.
2098
2099 2018-09-16  Simon Marchi  <simon.marchi@polymtl.ca>
2100
2101         * Makefile.in (LIBGDB_OBS): Sort COMMON_OBS.
2102
2103 2018-09-16  Tom Tromey  <tom@tromey.com>
2104
2105         * python/python-internal.h (CPYCHECKER_RETURNS_BORROWED_REF):
2106         Remove.
2107
2108 2018-09-16  Tom Tromey  <tom@tromey.com>
2109
2110         * python/python-internal.h (thread_to_thread_object): Change
2111         return type.
2112         * python/py-inferior.c (thread_to_thread_object): Return a new
2113         reference.
2114         (infpy_thread_from_thread_handle): Update.
2115         * python/py-infthread.c (gdbpy_selected_thread): Update.
2116         * python/py-stopevent.c (create_stop_event_object): Update.
2117         * python/py-threadevent.c (py_get_event_thread): Return a new
2118         reference.
2119         (py_get_event_thread): Update.
2120         * python/py-event.h (py_get_event_thread): Change return type.
2121         * python/py-continueevent.c (create_continue_event_object):
2122         Update.
2123
2124 2018-09-16  Tom Tromey  <tom@tromey.com>
2125
2126         * python/py-progspace.c (pspy_get_objfiles): Update.
2127         * python/python-internal.h (objfile_to_objfile_object): Change
2128         return type.
2129         * python/py-newobjfileevent.c (create_new_objfile_event_object):
2130         Update.
2131         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
2132         Update.
2133         * python/python.c (gdbpy_get_current_objfile): Update.
2134         (gdbpy_objfiles): Update.
2135         * python/py-objfile.c (objfpy_get_owner, gdbpy_lookup_objfile):
2136         Update.
2137         (objfile_to_objfile_object): Return a new reference.
2138         * python/py-symtab.c (stpy_get_objfile): Update.
2139         * python/py-prettyprint.c (find_pretty_printer_from_objfiles):
2140         Update.
2141
2142 2018-09-16  Tom Tromey  <tom@tromey.com>
2143
2144         * python/py-inferior.c (infpy_get_progspace): Update.
2145         * python/python-internal.h (pspace_to_pspace_object): Change
2146         return type.
2147         * python/py-newobjfileevent.c
2148         (create_clear_objfiles_event_object): Update.
2149         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
2150         Update.
2151         * python/python.c (gdbpy_get_current_progspace): Update.
2152         (gdbpy_progspaces): Update.
2153         * python/py-progspace.c (pspace_to_pspace_object): Return a new
2154         reference.
2155         * python/py-objfile.c (objfpy_get_progspace): Update.
2156         * python/py-prettyprint.c (find_pretty_printer_from_progspace):
2157         Update.
2158
2159 2018-09-16  Tom Tromey  <tom@tromey.com>
2160
2161         * python/lib/gdb/__init__.py (current_progspace, objfiles)
2162         (solib_name, block_for_pc, find_pc_line): New functions.
2163         (execute_unwinders): Update.
2164         * python/py-block.c (gdbpy_block_for_pc): Remove.
2165         * python/py-inferior.c (infpy_get_progspace): New function.
2166         (inferior_object_getset) <progspace>: Add.
2167         * python/py-progspace.c (pspy_objfiles): Rewrite.
2168         (pspy_solib_name, pspy_block_for_pc)
2169         (pspy_find_pc_line, pspy_is_valid): New functions.
2170         (progspace_object_methods): Add entries for solib_name,
2171         block_for_pc, find_pc_line, is_valid.
2172         * python/python-internal.h (gdbpy_block_for_pc)
2173         (build_objfiles_list): Don't declare.
2174         * python/python.c: Don't include solib.h.
2175         (gdbpy_solib_name, gdbpy_find_pc_line)
2176         (gdbpy_get_current_progspace, build_objfiles_list)
2177         (gdbpy_objfiles): Remove.
2178         (GdbMethods) <current_progspace, objfiles, block_for_pc,
2179         solib_name, find_pc_line>: Remove entries.
2180
2181 2018-09-16  Tom Tromey  <tom@tromey.com>
2182
2183         * top.c (new_ui_command): Use GNU style for metasyntactic
2184         variables.
2185         * breakpoint.c (stopat_command): Use GNU style for metasyntactic
2186         variables.
2187         * maint.c (maintenance_translate_address): Remove "<>" around
2188         text.
2189         * interps.c (interpreter_exec_cmd): Use GNU style for
2190         metasyntactic variables.
2191         * nto-procfs.c (nto_procfs_target_info): Use GNU style for
2192         metasyntactic variables.
2193         * tracepoint.c (tfind_range_command): Use GNU style for
2194         metasyntactic variables.
2195         (tfind_outside_command): Likewise.
2196         (_initialize_tracepoint): Likewise.
2197         * remote.c (extended_remote_target::create_inferior): Use GNU
2198         style for metasyntactic variables.
2199         * sparc64-tdep.c (adi_examine_command): Use GNU style for
2200         metasyntactic variables.
2201         (adi_assign_command): Likewise.
2202
2203 2018-09-16  Tom Tromey  <tom@tromey.com>
2204
2205         * disasm.c (show_disassembler_options_sfunc): Use GNU style for
2206         metasyntactic variables.  Print message if no disassembler options
2207         are available.
2208
2209 2018-09-15  Tom Tromey  <tom@tromey.com>
2210
2211         * infcmd.c (get_inferior_args): Return const char *.
2212         * inferior.h (get_inferior_args): Return type now const.
2213         * linux-tdep.c (linux_fill_prpsinfo): Update.
2214         * procfs.c (procfs_target::make_corefile_notes): Update.
2215
2216 2018-09-07  Tom Tromey  <tom@tromey.com>
2217
2218         * python/python.c (execute_gdb_command): Call bpstat_do_actions
2219         inside the TRY.
2220
2221 2018-09-14  Sandra Loosemore  <sandra@codesourcery.com>
2222
2223         * nios2-tdep.c (nios2_type_align): New.
2224         (nios2_gdb_arch_init): Install type_align hook.
2225
2226 2018-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
2227
2228         * eval.c (fake_method::fake_method): Call xzalloc directly for a
2229         type that is neither object file owned, nor gdbarch owned.
2230         * gdbtypes.c (get_type_gdbarch): Add an assert that returned
2231         gdbarch is non-NULL.
2232         (alloc_type_instance): Allocate non-objfile owned types on the
2233         gdbarch obstack.
2234         (copy_type_recursive): Allocate TYPE_FIELDS and TYPE_RANGE_DATA
2235         using TYPE_ALLOC to ensure memory is allocated on the correct
2236         obstack.
2237         * gdbtypes.h (TYPE_ALLOC): Allocate space on either the objfile
2238         obstack, or the gdbarch obstack.
2239         (TYPE_ZALLOC): Rewrite using TYPE_ALLOC.
2240
2241 2018-09-14  Tom Tromey  <tom@tromey.com>
2242
2243         * infcall.c (call_function_by_hand_dummy): Remove unnecessary
2244         block.
2245
2246 2018-09-14  Tom Tromey  <tom@tromey.com>
2247
2248         * nat/fork-inferior.c (get_startup_shell): Remove "static".
2249
2250 2018-09-13  Tom Tromey  <tom@tromey.com>
2251
2252         * python/py-inferior.c (infpy_thread_from_thread_handle): Now
2253         static.
2254
2255 2018-09-13  Tom Tromey  <tom@tromey.com>
2256
2257         * exec.c (try_open_exec_file): Use std::string.
2258
2259 2018-09-13  Tom Tromey  <tom@tromey.com>
2260
2261         * utils.h (gdb_bfd_errmsg): Return std::string.
2262         * exec.c (exec_file_attach): Update.
2263         * compile/compile-object-load.c (compile_object_load): Update.
2264         * utils.c (gdb_bfd_errmsg): Return std::string.
2265
2266 2018-09-13  Tom Tromey  <tom@tromey.com>
2267
2268         * procfs.c (struct procinfo_deleter): New.
2269         (procinfo_up): New typedef.
2270         (do_destroy_procinfo_cleanup): Remove.
2271         (procfs_target::info_proc): Use procinfo_up.  Remove cleanups.
2272
2273 2018-09-13  Tom Tromey  <tom@tromey.com>
2274
2275         * source.c (add_path): Use gdb::unique_xmalloc_ptr.
2276
2277 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
2278 2018-09-13  Tom Tromey  <tom@tromey.com>
2279
2280         * python/py-progspace.c (PSPY_REQUIRE_VALID): New macro.
2281         (pspy_get_objfiles): New function.
2282         (progspace_object_methods): New.
2283         (pspace_object_type): Add tp_methods callback.
2284         * python/python-internal.h (build_objfiles_list): New
2285         declaration.
2286         * python/python.c (build_objfiles_list): New function.
2287         (gdbpy_objfiles): Implement using build_objfiles_list.
2288         * NEWS: Mention the Progspace.objfiles method.
2289
2290 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
2291
2292         * python/py-inferior.c (infpy_get_progspace): New function.
2293         (inferior_object_getset): Add progspace property.
2294         * NEWS: Mention the new property.
2295
2296 2018-09-13  Tom Tromey  <tom@tromey.com>
2297
2298         PR rust/23650:
2299         * rust-lang.c (rust_evaluate_subexp): Use field name, not "foo".
2300
2301 2018-09-13  Tom Tromey  <tom@tromey.com>
2302
2303         PR rust/23626:
2304         * rust-lang.c (rust_enum_variant): Now static.
2305         (rust_empty_enum_p): New function.
2306         (rust_print_enum, rust_evaluate_subexp, rust_print_struct_def):
2307         Handle empty enum.
2308
2309 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
2310
2311         * python/py-inferior.c (infpy_repr): New.
2312         (inferior_object_type): Register infpy_repr.
2313         * python/py-objfile.c (objfpy_repr): New.
2314         (objfile_object_type): Register objfpy_repr.
2315
2316 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
2317
2318         * fbsd-nat.c (fbsd_nat_target::info_proc): Remove unused variable.
2319
2320 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
2321
2322         * aarch64-fbsd-tdep.h (AARCH64_FBSD_SIZEOF_GREGSET): Fix comment
2323         typo.
2324
2325 2018-09-12  Sergio Durigan Junior  <sergiodj@redhat.com>
2326
2327         * common/common-utils.c: Don't include '<sys/stat.h>'.
2328         (is_regular_file): Move to...
2329         * common/filestuff.c (is_regular_file): ... here.
2330         * common/common-utils.h (is_regular_file): Move to...
2331         * common/filestuff.h (is_regular_file): ... here.
2332
2333 2018-09-12  Simon Marchi  <simon.marchi@ericsson.com>
2334
2335         * skip.c (debug_skip): New variable.
2336         (skiplist_entry::do_skip_file_p): Add debug output.
2337         (skiplist_entry::do_skip_gfile_p): Likewise.
2338         (skiplist_entry::skip_function_p): Likewise.
2339         (_initialize_step_skip): Create debug command.
2340         * NEWS: Mention set/show debug skip.
2341
2342 2018-09-11  Xavier Roirand  <roirand@adacore.com>
2343
2344         * darwin-nat.c (should_disable_startup_with_shell):
2345         New function.
2346         (darwin_nat_target::create_inferior): Add call.
2347
2348 2018-09-11  Xavier Roirand  <roirand@adacore.com>
2349
2350         * darwin-nat.h (struct darwin_thread_info) <gdb_port,
2351         inf_port, msg_state>: Initialize.
2352         (struct darwin_thread_info) <signaled, single_step>: Change
2353         type and initialize.
2354         (struct darwin_thread_info) <event>: Initialize.
2355
2356 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
2357
2358         PR gdb/23555
2359         PR gdb/23558
2360         * gnulib/import/m4/getcwd-path-max.m4: Add cross-compilation
2361         guesses.
2362
2363 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
2364
2365         Revert:
2366         2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
2367
2368         PR gdb/23555
2369         PR gdb/23558
2370         * gnulib/aclocal.m4: Regenerate.
2371         * gnulib/config.in: Regenerate.
2372         * gnulib/configure: Regenerate.
2373         * gnulib/import/Makefile.am: Update.
2374         * gnulib/import/Makefile.in: Update.
2375         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
2376         * gnulib/import/_Noreturn.h: ... this.
2377         * gnulib/import/alloca.in.h: Update.
2378         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
2379         * gnulib/import/arg-nonnull.h: ... this.
2380         * gnulib/import/assure.h: Update.
2381         * gnulib/import/at-func.c: Update.
2382         * gnulib/import/basename-lgpl.c: Update.
2383         * gnulib/import/extra/snippet/c++defs.h: Rename to...
2384         * gnulib/import/c++defs.h: ... this.
2385         * gnulib/import/canonicalize-lgpl.c: Update.
2386         * gnulib/import/cdefs.h: Update.
2387         * gnulib/import/chdir-long.c: Update.
2388         * gnulib/import/chdir-long.h: Update.
2389         * gnulib/import/cloexec.c: Update.
2390         * gnulib/import/cloexec.h: Update.
2391         * gnulib/import/close.c: Update.
2392         * gnulib/import/closedir.c: Update.
2393         * gnulib/import/config.charset: Update.
2394         * gnulib/import/dirent-private.h: Update.
2395         * gnulib/import/dirent.in.h: Update.
2396         * gnulib/import/dirfd.c: Update.
2397         * gnulib/import/dirname-lgpl.c: Update.
2398         * gnulib/import/dirname.h: Update.
2399         * gnulib/import/dosname.h: Update.
2400         * gnulib/import/dup-safer-flag.c: Update.
2401         * gnulib/import/dup-safer.c: Update.
2402         * gnulib/import/dup.c: Update.
2403         * gnulib/import/dup2.c: Update.
2404         * gnulib/import/errno.in.h: Update.
2405         * gnulib/import/error.c: Update.
2406         * gnulib/import/error.h: Update.
2407         * gnulib/import/exitfail.c: Update.
2408         * gnulib/import/exitfail.h: Update.
2409         * gnulib/import/extra/update-copyright: Update.
2410         * gnulib/import/fchdir.c: Update.
2411         * gnulib/import/fcntl.c: Update.
2412         * gnulib/import/fcntl.in.h: Update.
2413         * gnulib/import/fd-hook.c: Update.
2414         * gnulib/import/fd-hook.h: Update.
2415         * gnulib/import/fd-safer-flag.c: Update.
2416         * gnulib/import/fd-safer.c: Update.
2417         * gnulib/import/fdopendir.c: Update.
2418         * gnulib/import/filename.h: Update.
2419         * gnulib/import/filenamecat-lgpl.c: Update.
2420         * gnulib/import/filenamecat.h: Update.
2421         * gnulib/import/flexmember.h: Update.
2422         * gnulib/import/float+.h: Update.
2423         * gnulib/import/float.c: Update.
2424         * gnulib/import/float.in.h: Update.
2425         * gnulib/import/fnmatch.c: Update.
2426         * gnulib/import/fnmatch.in.h: Update.
2427         * gnulib/import/fnmatch_loop.c: Update.
2428         * gnulib/import/fpucw.h: Update.
2429         * gnulib/import/frexp.c: Update.
2430         * gnulib/import/frexpl.c: Update.
2431         * gnulib/import/fstat.c: Update.
2432         * gnulib/import/fstatat.c: Update.
2433         * gnulib/import/getcwd-lgpl.c: Update.
2434         * gnulib/import/getcwd.c: Update.
2435         * gnulib/import/getdtablesize.c: Update.
2436         * gnulib/import/getlogin_r.c: Update.
2437         * gnulib/import/getprogname.c: Update.
2438         * gnulib/import/getprogname.h: Update.
2439         * gnulib/import/gettext.h: Update.
2440         * gnulib/import/gettimeofday.c: Update.
2441         * gnulib/import/glob-libc.h: Update.
2442         * gnulib/import/glob.c: Update.
2443         * gnulib/import/glob.in.h: Update.
2444         * gnulib/import/glob_internal.h: Update.
2445         * gnulib/import/glob_pattern_p.c: Update.
2446         * gnulib/import/globfree.c: Update.
2447         * gnulib/import/hard-locale.c: Update.
2448         * gnulib/import/hard-locale.h: Update.
2449         * gnulib/import/intprops.h: Update.
2450         * gnulib/import/inttypes.in.h: Update.
2451         * gnulib/import/isnan.c: Update.
2452         * gnulib/import/isnand-nolibm.h: Update.
2453         * gnulib/import/isnand.c: Update.
2454         * gnulib/import/isnanl-nolibm.h: Update.
2455         * gnulib/import/isnanl.c: Update.
2456         * gnulib/import/itold.c: Update.
2457         * gnulib/import/libc-config.h: Update.
2458         * gnulib/import/limits.in.h: Update.
2459         * gnulib/import/localcharset.c: Update.
2460         * gnulib/import/localcharset.h: Update.
2461         * gnulib/import/localtime-buffer.c: Update.
2462         * gnulib/import/localtime-buffer.h: Update.
2463         * gnulib/import/lstat.c: Update.
2464         * gnulib/import/m4/00gnulib.m4: Update.
2465         * gnulib/import/m4/__inline.m4: Update.
2466         * gnulib/import/m4/absolute-header.m4: Update.
2467         * gnulib/import/m4/alloca.m4: Update.
2468         * gnulib/import/m4/builtin-expect.m4: Update.
2469         * gnulib/import/m4/canonicalize.m4: Update.
2470         * gnulib/import/m4/chdir-long.m4: Update.
2471         * gnulib/import/m4/close.m4: Update.
2472         * gnulib/import/m4/closedir.m4: Update.
2473         * gnulib/import/m4/configmake.m4: Update.
2474         * gnulib/import/m4/d-ino.m4: Update.
2475         * gnulib/import/m4/d-type.m4: Update.
2476         * gnulib/import/m4/dirent_h.m4: Update.
2477         * gnulib/import/m4/dirfd.m4: Update.
2478         * gnulib/import/m4/dirname.m4: Update.
2479         * gnulib/import/m4/double-slash-root.m4: Update.
2480         * gnulib/import/m4/dup.m4: Update.
2481         * gnulib/import/m4/dup2.m4: Update.
2482         * gnulib/import/m4/eealloc.m4: Update.
2483         * gnulib/import/m4/environ.m4: Update.
2484         * gnulib/import/m4/errno_h.m4: Update.
2485         * gnulib/import/m4/error.m4: Update.
2486         * gnulib/import/m4/exponentd.m4: Update.
2487         * gnulib/import/m4/exponentl.m4: Update.
2488         * gnulib/import/m4/extensions.m4: Update.
2489         * gnulib/import/m4/extern-inline.m4: Update.
2490         * gnulib/import/m4/fchdir.m4: Update.
2491         * gnulib/import/m4/fcntl-o.m4: Update.
2492         * gnulib/import/m4/fcntl.m4: Update.
2493         * gnulib/import/m4/fcntl_h.m4: Update.
2494         * gnulib/import/m4/fdopendir.m4: Update.
2495         * gnulib/import/m4/filenamecat.m4: Update.
2496         * gnulib/import/m4/flexmember.m4: Update.
2497         * gnulib/import/m4/float_h.m4: Update.
2498         * gnulib/import/m4/fnmatch.m4: Update.
2499         * gnulib/import/m4/fnmatch_h.m4: Update.
2500         * gnulib/import/m4/fpieee.m4: Update.
2501         * gnulib/import/m4/frexp.m4: Update.
2502         * gnulib/import/m4/frexpl.m4: Update.
2503         * gnulib/import/m4/fstat.m4: Update.
2504         * gnulib/import/m4/fstatat.m4: Update.
2505         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
2506         * gnulib/import/m4/getcwd-path-max.m4: Update.
2507         * gnulib/import/m4/getcwd.m4: Update.
2508         * gnulib/import/m4/getdtablesize.m4: Update.
2509         * gnulib/import/m4/getlogin.m4: Update.
2510         * gnulib/import/m4/getlogin_r.m4: Update.
2511         * gnulib/import/m4/getpagesize.m4: Update.
2512         * gnulib/import/m4/getprogname.m4: Update.
2513         * gnulib/import/m4/gettimeofday.m4: Update.
2514         * gnulib/import/m4/glibc21.m4: Update.
2515         * gnulib/import/m4/glob.m4: Update.
2516         * gnulib/import/m4/glob_h.m4: Update.
2517         * gnulib/import/m4/gnulib-cache.m4: Update.
2518         * gnulib/import/m4/gnulib-common.m4: Update.
2519         * gnulib/import/m4/gnulib-comp.m4: Update.
2520         * gnulib/import/m4/gnulib-tool.m4: Update.
2521         * gnulib/import/m4/hard-locale.m4: Update.
2522         * gnulib/import/m4/include_next.m4: Update.
2523         * gnulib/import/m4/inttypes-pri.m4: Update.
2524         * gnulib/import/m4/inttypes.m4: Update.
2525         * gnulib/import/m4/isnand.m4: Update.
2526         * gnulib/import/m4/isnanl.m4: Update.
2527         * gnulib/import/m4/largefile.m4: Update.
2528         * gnulib/import/m4/limits-h.m4: Update.
2529         * gnulib/import/m4/localcharset.m4: Update.
2530         * gnulib/import/m4/locale-fr.m4: Update.
2531         * gnulib/import/m4/locale-ja.m4: Update.
2532         * gnulib/import/m4/locale-zh.m4: Update.
2533         * gnulib/import/m4/localtime-buffer.m4: Update.
2534         * gnulib/import/m4/longlong.m4: Update.
2535         * gnulib/import/m4/lstat.m4: Update.
2536         * gnulib/import/m4/malloc.m4: Update.
2537         * gnulib/import/m4/malloca.m4: Update.
2538         * gnulib/import/m4/math_h.m4: Update.
2539         * gnulib/import/m4/mbrtowc.m4: Update.
2540         * gnulib/import/m4/mbsinit.m4: Update.
2541         * gnulib/import/m4/mbsrtowcs.m4: Update.
2542         * gnulib/import/m4/mbstate_t.m4: Update.
2543         * gnulib/import/m4/memchr.m4: Update.
2544         * gnulib/import/m4/memmem.m4: Update.
2545         * gnulib/import/m4/mempcpy.m4: Update.
2546         * gnulib/import/m4/memrchr.m4: Update.
2547         * gnulib/import/m4/mkdir.m4: Update.
2548         * gnulib/import/m4/mkstemp.m4: Update.
2549         * gnulib/import/m4/mmap-anon.m4: Update.
2550         * gnulib/import/m4/mode_t.m4: Update.
2551         * gnulib/import/m4/msvc-inval.m4: Update.
2552         * gnulib/import/m4/msvc-nothrow.m4: Update.
2553         * gnulib/import/m4/multiarch.m4: Update.
2554         * gnulib/import/m4/nocrash.m4: Update.
2555         * gnulib/import/m4/off_t.m4: Update.
2556         * gnulib/import/m4/onceonly.m4: Update.
2557         * gnulib/import/m4/open-cloexec.m4: Update.
2558         * gnulib/import/m4/open.m4: Update.
2559         * gnulib/import/m4/openat.m4: Update.
2560         * gnulib/import/m4/opendir.m4: Update.
2561         * gnulib/import/m4/pathmax.m4: Update.
2562         * gnulib/import/m4/rawmemchr.m4: Update.
2563         * gnulib/import/m4/readdir.m4: Update.
2564         * gnulib/import/m4/readlink.m4: Update.
2565         * gnulib/import/m4/realloc.m4: Update.
2566         * gnulib/import/m4/rename.m4: Update.
2567         * gnulib/import/m4/rewinddir.m4: Update.
2568         * gnulib/import/m4/rmdir.m4: Update.
2569         * gnulib/import/m4/save-cwd.m4: Update.
2570         * gnulib/import/m4/secure_getenv.m4: Update.
2571         * gnulib/import/m4/setenv.m4: Update.
2572         * gnulib/import/m4/signal_h.m4: Update.
2573         * gnulib/import/m4/ssize_t.m4: Update.
2574         * gnulib/import/m4/stat-time.m4: Update.
2575         * gnulib/import/m4/stat.m4: Update.
2576         * gnulib/import/m4/std-gnu11.m4: Update.
2577         * gnulib/import/m4/stdbool.m4: Update.
2578         * gnulib/import/m4/stddef_h.m4: Update.
2579         * gnulib/import/m4/stdint.m4: Update.
2580         * gnulib/import/m4/stdio_h.m4: Update.
2581         * gnulib/import/m4/stdlib_h.m4: Update.
2582         * gnulib/import/m4/strchrnul.m4: Update.
2583         * gnulib/import/m4/strdup.m4: Update.
2584         * gnulib/import/m4/strerror.m4: Update.
2585         * gnulib/import/m4/string_h.m4: Update.
2586         * gnulib/import/m4/strstr.m4: Update.
2587         * gnulib/import/m4/strtok_r.m4: Update.
2588         * gnulib/import/m4/sys_socket_h.m4: Update.
2589         * gnulib/import/m4/sys_stat_h.m4: Update.
2590         * gnulib/import/m4/sys_time_h.m4: Update.
2591         * gnulib/import/m4/sys_types_h.m4: Update.
2592         * gnulib/import/m4/tempname.m4: Update.
2593         * gnulib/import/m4/time_h.m4: Update.
2594         * gnulib/import/m4/unistd-safer.m4: Update.
2595         * gnulib/import/m4/unistd_h.m4: Update.
2596         * gnulib/import/m4/warn-on-use.m4: Update.
2597         * gnulib/import/m4/wchar_h.m4: Update.
2598         * gnulib/import/m4/wchar_t.m4: Update.
2599         * gnulib/import/m4/wctype_h.m4: Update.
2600         * gnulib/import/m4/wint_t.m4: Update.
2601         * gnulib/import/malloc.c: Update.
2602         * gnulib/import/malloc/scratch_buffer.h: Update.
2603         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
2604         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
2605         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
2606         * gnulib/import/malloca.c: Update.
2607         * gnulib/import/malloca.h: Update.
2608         * gnulib/import/malloca.valgrind: Update.
2609         * gnulib/import/math.in.h: Update.
2610         * gnulib/import/mbrtowc.c: Update.
2611         * gnulib/import/mbsinit.c: Update.
2612         * gnulib/import/mbsrtowcs-impl.h: Update.
2613         * gnulib/import/mbsrtowcs-state.c: Update.
2614         * gnulib/import/mbsrtowcs.c: Update.
2615         * gnulib/import/memchr.c: Update.
2616         * gnulib/import/memmem.c: Update.
2617         * gnulib/import/mempcpy.c: Update.
2618         * gnulib/import/memrchr.c: Update.
2619         * gnulib/import/mkdir.c: Update.
2620         * gnulib/import/mkstemp.c: Update.
2621         * gnulib/import/msvc-inval.c: Update.
2622         * gnulib/import/msvc-inval.h: Update.
2623         * gnulib/import/msvc-nothrow.c: Update.
2624         * gnulib/import/msvc-nothrow.h: Update.
2625         * gnulib/import/open.c: Update.
2626         * gnulib/import/openat-die.c: Update.
2627         * gnulib/import/openat-priv.h: Update.
2628         * gnulib/import/openat-proc.c: Update.
2629         * gnulib/import/openat.c: Update.
2630         * gnulib/import/openat.h: Update.
2631         * gnulib/import/opendir.c: Update.
2632         * gnulib/import/pathmax.h: Update.
2633         * gnulib/import/pipe-safer.c: Update.
2634         * gnulib/import/rawmemchr.c: Update.
2635         * gnulib/import/readdir.c: Update.
2636         * gnulib/import/readlink.c: Update.
2637         * gnulib/import/realloc.c: Update.
2638         * gnulib/import/ref-add.sin: Update.
2639         * gnulib/import/ref-del.sin: Update.
2640         * gnulib/import/rename.c: Update.
2641         * gnulib/import/rewinddir.c: Update.
2642         * gnulib/import/rmdir.c: Update.
2643         * gnulib/import/same-inode.h: Update.
2644         * gnulib/import/save-cwd.c: Update.
2645         * gnulib/import/save-cwd.h: Update.
2646         * gnulib/import/scratch_buffer.h: Update.
2647         * gnulib/import/secure_getenv.c: Update.
2648         * gnulib/import/setenv.c: Update.
2649         * gnulib/import/signal.in.h: Update.
2650         * gnulib/import/stat-time.c: Update.
2651         * gnulib/import/stat-time.h: Update.
2652         * gnulib/import/stat-w32.c: Update.
2653         * gnulib/import/stat-w32.h: Update.
2654         * gnulib/import/stat.c: Update.
2655         * gnulib/import/stdbool.in.h: Update.
2656         * gnulib/import/stddef.in.h: Update.
2657         * gnulib/import/stdint.in.h: Update.
2658         * gnulib/import/stdio.in.h: Update.
2659         * gnulib/import/stdlib.in.h: Update.
2660         * gnulib/import/str-two-way.h: Update.
2661         * gnulib/import/strchrnul.c: Update.
2662         * gnulib/import/strdup.c: Update.
2663         * gnulib/import/streq.h: Update.
2664         * gnulib/import/strerror-override.c: Update.
2665         * gnulib/import/strerror-override.h: Update.
2666         * gnulib/import/strerror.c: Update.
2667         * gnulib/import/string.in.h: Update.
2668         * gnulib/import/stripslash.c: Update.
2669         * gnulib/import/strnlen1.c: Update.
2670         * gnulib/import/strnlen1.h: Update.
2671         * gnulib/import/strstr.c: Update.
2672         * gnulib/import/strtok_r.c: Update.
2673         * gnulib/import/sys_stat.in.h: Update.
2674         * gnulib/import/sys_time.in.h: Update.
2675         * gnulib/import/sys_types.in.h: Update.
2676         * gnulib/import/tempname.c: Update.
2677         * gnulib/import/tempname.h: Update.
2678         * gnulib/import/time.in.h: Update.
2679         * gnulib/import/unistd--.h: Update.
2680         * gnulib/import/unistd-safer.h: Update.
2681         * gnulib/import/unistd.in.h: Update.
2682         * gnulib/import/unsetenv.c: Update.
2683         * gnulib/import/verify.h: Update.
2684         * gnulib/import/extra/snippet/warn-on-use.h: Update.
2685         * gnulib/import/wchar.in.h: Update.
2686         * gnulib/import/wctype.in.h: Update.
2687         * gnulib/import/xalloc-oversized.h: Update.
2688         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
2689         "53e2c179f26a890fa6685af4b6c1397ee370433b".
2690
2691 2018-09-10  Simon Marchi  <simon.marchi@ericsson.com>
2692
2693         * record-btrace.c (get_thread_current_frame): Remove
2694         old_inferior_ptid.
2695
2696 2018-09-10  Jerome Guitton  <guitton@adacore.com>
2697
2698         * ada-lang.c (ada_value_struct_elt): Call ada_to_fixed_type
2699         with check_tag to 1 if and only if the type is tagged and the
2700         component being searched cannot been found in the current
2701         view. Otherwise, always call ada_to_fixed_type with
2702         check_tag to 0.
2703
2704 2018-09-10  Xavier Roirand  <roirand@adacore.com>
2705
2706         * ada-lang.c (ada_is_access_to_unconstrained_array): Remove static
2707         declaration.
2708         * ada-lang.h: add ada_is_access_to_unconstrained_array prototype.
2709         * ada-varobj.c (ada_varobj_get_number_of_children,
2710         ada_varobj_describe_child, ada_value_is_changeable_p): Cleanup code.
2711
2712 2018-09-10  Xavier Roirand  <roirand@adacore.com>
2713
2714         * ada-valprint.c (ada_value_print): Use type instead of
2715         enclosing type.
2716
2717 2018-09-10  Xavier Roirand  <roirand@adacore.com>
2718
2719         * ada-lang.c (ada_value_subscript): Handle case when parameter is
2720         an array of access to unconstrained array.
2721
2722 2018-09-10  Xavier Roirand  <roirand@adacore.com>
2723
2724         * ada-lang.c (ada_is_access_to_unconstrained_array): New function.
2725         (ada_check_typedef): Use it.
2726
2727 2018-09-10  Xavier Roirand  <roirand@adacore.com>
2728
2729         * ada-varobj.c (ada_varobj_describe_struct_child)
2730         (ada_varobj_describe_child): Handle union case like struct one.
2731
2732 2018-09-10  Tom Tromey  <tom@tromey.com>
2733
2734         PR python/18380:
2735         * python/python.c (_initialize_python): Make example in "python"
2736         help work in Python 3.
2737
2738 2018-09-10  Eli Zaretskii  <eliz@gnu.org>
2739
2740         * Makefile.in (transformed_name): Use INSTALL_SCRIPT instead of
2741         INSTALL_PROGRAM to install gdb-add-index.sh.  Don't append
2742         $(EXEEXT) to the script, as it is not a program.
2743
2744 2018-09-09  Simon Marchi  <simon.marchi@ericsson.com>
2745
2746         * python/py-prettyprint.c (pretty_print_one_value): Return
2747         gdbpy_ref<>.
2748         (print_string_repr): Adjust.
2749         (apply_varobj_pretty_printer): Return gdbpy_ref<>.
2750         * python/python-internal.h (apply_varobj_pretty_printer): Return
2751         gdbpy_ref<>.
2752         * varobj.c (varobj_value_get_print_value): Adjust.
2753
2754 2018-09-08  Tom Tromey  <tom@tromey.com>
2755
2756         PR python/16047:
2757         * python/py-prettyprint.c (pretty_print_one_value): Check for
2758         to_string method.
2759
2760 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2761
2762         * ada-lang.c (resolve_subexp): Pass correct OPLEN in call to
2763         replace_operator_with_call.
2764
2765 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2766
2767         * ada-lang.c (ada_value_cast): Remove unnecessary parentheses.
2768
2769 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2770
2771         * ada-typeprint.c (print_range): Print the bounds using TYPE
2772         rather than its TYPE_TARGET_TYPE.
2773
2774 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2775
2776         * ada-lang.c (ada_to_fixed_value): Minor reformatting in
2777         call to ada_to_fixed_value_create.
2778
2779 2018-09-08  Jerome Guitton  <guitton@adacore.com>
2780
2781         * ada-lang.c (ada_decode): strip dot prefix in symbol name.
2782
2783 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2784
2785         * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
2786         by calls to error.
2787
2788 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2789
2790         * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
2791         Move update of loop variable "fi".
2792
2793 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2794
2795         * ada-lang.c (value_assign_to_component): In the case of
2796         big-endian targets, extract the bits of the given VAL
2797         using an src_offset of zero if container is not a scalar.
2798
2799 2018-09-06  Simon Ser  <contact@emersion.fr>
2800
2801         PR gdb/23105
2802         * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
2803         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
2804         * fbsd-tdep.c (fbsd_make_note_desc): New.
2805         (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
2806         NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
2807         * target.h (enum target_object) Add FreeBSD-specific
2808         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
2809
2810 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
2811
2812         * compile/compile-c.h (generate_c_for_variable_locations):
2813         Change reference to pointer.
2814         * compile/compile-c-support.c (compile_program) <compute>:
2815         Likewise.
2816         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
2817         (generate_c_for_for_one_variable): Likewise
2818         (generate_c_for_variable_locations): Likewise
2819         * compile/compile-c-types.c (compile_c_instance::convert_type):
2820         Likewise
2821         * compile/compile-cplus-symbols.c (convert_one_symbol):
2822         std::move the scope passed to enter_scope.
2823         * compile/compile-cplus-types.c
2824         (compile_cplus_instance::enter_scope): Make parameter
2825         rvalue-reference.
2826         (compile_cplus_instance::new_scope): Change reference to
2827         pointer.
2828         (compile_cplus_instance::convert_type): Likewise
2829         (compile_cplus_convert_typedef): std::move the scope passed to
2830         enter_scope.
2831         (compile_cplus_convert_struct_or_union): Likewise.
2832         (compile_cplus_convert_enum): Likewise.
2833         (compile_cplus_convert_namespace): Likewise.
2834         * compile/compile-cplus.h (compile_cplus_instance)
2835         <enter_scope>: Make parameter rvalue-reference.
2836         * compile/compile-internal.h (compile_instance)
2837         <get_cached_type>: Likewise
2838         * compile/compile-loc2c.c (push): Likewise
2839         (pushf): Likewise
2840         (unary): Likewise
2841         (binary): Likewise
2842         (print_label): Likewise
2843         (pushf_register_address): Likewise
2844         (pushf_register): Likewise
2845         (do_compile_dwarf_expr_to_c): Likewise
2846         (compile_dwarf_expr_to_c): Likewise
2847         (compile_dwarf_bounds_to_c): Likewise
2848         * compile/compile.c (compile_instance::get_cached_type):
2849         Likewise
2850         * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
2851         (compile_dwarf_bounds_to_c): Likewise
2852         * dwarf2loc.c (locexpr_generate_c_location): Likewise.
2853         (dwarf2_compile_property_to_c): Likewise
2854         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
2855         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
2856         Likewise
2857
2858 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
2859
2860         * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
2861         * tui/tui-data.c (init_content_element): Don't initialize it.
2862
2863 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
2864
2865         * tui/tui-data.h (struct tui_win_info)
2866         <detail::opaque>: Remove.
2867         * tui/tui-data.c (init_win_info): Remove assignment.
2868
2869 2018-09-05  Tom Tromey  <tom@tromey.com>
2870
2871         * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
2872         -Wformat-nonliteral.
2873         * target-float.c (host_float_ops<T>::to_string)
2874         (host_float_ops<T>::from_string): Use
2875         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
2876         * configure: Rebuild.
2877
2878 2018-09-05  Simon Marchi  <simon.marchi@ericsson.com>
2879
2880         * printcmd.c (printf_c_string): Use
2881         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
2882         (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
2883
2884 2018-09-05  Tom Tromey  <tom@tromey.com>
2885
2886         * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
2887
2888 2018-09-05  Tom de Vries  <tdevries@suse.de>
2889
2890         * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
2891         with resolve_abstract_p == true.
2892         (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
2893         defaulting to false. Propagate resolve_abstract_p to
2894         dwarf2_fetch_die_loc_sect_off.
2895         * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
2896         parameter, defaulting to false.
2897         * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
2898         (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
2899         parameter.
2900         * dwarf2read.h (struct die_info): Forward-declare.
2901         (die_info_ptr): New typedef.
2902         (struct dwarf2_per_objfile): Add abstract_to_concrete field.
2903
2904 2018-09-05  Joel Brobecker  <brobecker@adacore.com>
2905
2906         GDB 8.2 released.
2907
2908 2018-09-04  Sergio Durigan Junior  <sergiodj@redhat.com>
2909             Pedro Alves  <palves@redhat.com>
2910
2911         * gnulib/Makefile.in (aclocal_m4_deps): Move to
2912         "aclocal-m4-deps.mk".  Include file here.
2913         $(srcdir)/aclocal.m4: Add "configure.ac".
2914         * gnulib/aclocal-m4-deps.mk: New file.
2915         * gnulib/update-gnulib.sh: Automatically update
2916         "aclocal-m4-deps.mk".
2917
2918 2018-09-04  Tom Tromey  <tom@tromey.com>
2919
2920         * configure: Rebuild.
2921         * configure.ac: Remove multi-ice code.
2922
2923 2018-09-04  Tom Tromey  <tom@tromey.com>
2924
2925         * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
2926         (ada-exp.o): Update.
2927
2928 2018-09-04  Tom Tromey  <tom@tromey.com>
2929
2930         * Makefile.in (printcmd.o, target-float.o): Remove.
2931         (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
2932
2933 2018-09-04  Tom Tromey  <tom@tromey.com>
2934
2935         * gnulib/Makefile.in: Remove obsolete comment.
2936         * Makefile.in: Remove obsolete comment.
2937
2938 2018-09-04  Andrew Burgess  <andrew.burgess@embecosm.com>
2939
2940         * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
2941         line with '+'.
2942
2943 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
2944
2945         * riscv-tdep.c: Add 'prologue-value.h' include.
2946         (struct riscv_unwind_cache): New struct.
2947         (riscv_debug_unwinder): New global.
2948         (riscv_scan_prologue): Update arguments, capture register details
2949         from prologue scan.
2950         (riscv_skip_prologue): Reformat arguments line, move end of
2951         prologue calculation into riscv_scan_prologue.
2952         (riscv_frame_cache): Update return type, create
2953         riscv_unwind_cache, scan the prologue, and fill in remaining cache
2954         details.
2955         (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
2956         (riscv_frame_prev_register): Use the trad_frame within the
2957         riscv_unwind_cache.
2958         (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
2959         flag.
2960
2961 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
2962
2963         * trad-frame.h (trad_frame_set_realreg): Declare.
2964         (trad_frame_set_addr): Declare.
2965         * trad-frame.c (trad_frame_set_realreg): Define new function.
2966         (trad_frame_set_addr): Define new function.
2967         (trad_frame_set_reg_realreg): Use new function.
2968         (trad_frame_set_reg_addr): Use new function.
2969
2970 2018-09-01  Keith Seitz  <keiths@redhat.com>
2971
2972         * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
2973         pulongest instead of "%lld".
2974         * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
2975         ATTRIBUTE_UNUSED.
2976
2977 2018-08-31  Tom Tromey  <tom@tromey.com>
2978
2979         * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
2980         variant part type.
2981
2982 2018-08-31  Pedro Alves  <palves@redhat.com>
2983
2984         * gdbarch.h: Regenerate.
2985
2986 2018-08-31  Pedro Alves  <palves@redhat.com>
2987
2988         * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
2989         * target.h (Hardware watchpoint interfaces): Describe
2990         continuable/steppable/non-steppable watchpoints.
2991         * gdbarch.h, gdbarch.c: Regenerate.
2992
2993 2018-08-31  Pedro Alves  <palves@redhat.com>
2994
2995         * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
2996         Delete.
2997         * s390-linux-nat.c
2998         (s390_linux_nat_target::have_continuable_watchpoint): Delete.
2999         * target.h (target_ops::have_continuable_watchpoint): Delete.
3000         (target_have_continuable_watchpoint): Delete.
3001         * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
3002         * target-delegates.c: Regenerate.
3003
3004 2018-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
3005
3006         * gnulib/Makefile.in (aclocal_m4_deps): Update according to
3007         the files present in "gnulib/import/m4/".
3008
3009 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
3010
3011         * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
3012         c.sw, c.swsp, and c.sdsp.
3013
3014 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
3015
3016         * riscv-tdep.c (struct riscv_inferior_data): Delete.
3017         (riscv_read_misa_reg): Don't cache value read into inferior data.
3018         (riscv_new_inferior_data): Delete.
3019         (riscv_inferior_data_cleanup): Delete.
3020         (riscv_inferior_data): Delete.
3021         (riscv_invalidate_inferior_data): Delete.
3022         (_initialize_riscv_tdep): Remove initialisation of inferior data.
3023
3024 2018-08-30  Simon Marchi  <simon.marchi@ericsson.com>
3025
3026         * compile/compile-cplus-types.c
3027         (compile_cplus_instance::leave_scope): Take the address of scope
3028         object.
3029         (compile_cplus_instance::convert_qualified_base): Compare quals
3030         to 0.
3031
3032 2018-08-30  Keith Seitz  <keiths@redhat.com>
3033
3034         * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
3035         Use "%s" and host_address_to_string instead of "%p" in printf.
3036
3037 2018-08-29  Keith Seitz  <keiths@redhat.com>
3038
3039         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
3040         and compile-cplus-types.c.
3041         (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
3042         * c-lang.c (cplus_language_defn): Set C++ compile functions.
3043         * c-lang.h (cplus_get_compile_context, cplus_compute_program):
3044         Declare.
3045         * compile/compile-c-support.c: Include compile-cplus.h.
3046         (load_libcompile): Templatize.
3047         (get_compile_context): "New" function.
3048         (c_get_compile_context): Use get_compile_context.
3049         (cplus_get_compile_context): New function.
3050         (cplus_push_user_expression, cplus_pop_user_expression)
3051         (cplus_add_code_header, cplus_add_input, cplus_compile_program)
3052         (cplus_compute_program): Define new structs/functions.
3053         * compile/compile-cplus-symmbols.c: New file.
3054         * compile/compile-cplus-types.c: New file.
3055         * compile/compile-cplus.h: New file.
3056         * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
3057         Declare.
3058         * compile/compile-object-load.c (get_out_value_type): Use
3059         strncmp_iw when comparing symbol names.
3060         (compile_object_load): Add mst_bss and mst_data.
3061         * compile/compile.c (_initialize_compile): Remove
3062         -Wno-implicit-function-declaration from `compile_args'.
3063         * compile/gcc-cp-plugin.h: New file.
3064         * NEWS: Mention C++ compile support and new debug options.
3065
3066 2018-08-29  Keith Seitz  <keiths@redhat.com>
3067
3068         * linespec.c (collect_info::add_symbol): Make virtual.
3069         (struct symbol_searcher_collect_info): New struct.
3070         (symbol_searcher::find_all_symbols): New method.
3071         * symtab.h (class symbol_searcher): New class.
3072
3073 2018-08-29  Keith Seitz  <keiths@redhat.com>
3074
3075         * linespec.c (struct linespec) <function_symbols, label_symbols>:
3076         Change to vector of block_symbol.  Update all users.
3077         (struct collect_info) <symbols>: Likewise.
3078         (collect_info::add_symbol): Take block_symbol as argument.
3079         Update all callers.
3080         (decode_compound_collector) <m_symbols>: Change type to vector
3081         of block_symbol.  Update all users.
3082         (decode_compound_collector::operator ()): Change parameter type
3083         to block_symbol.
3084         (find_method, find_function_symbols, find_linespec_symbols)
3085         (find_label_symbols_in_block, find_label_symbols): Change symbol
3086         vectors to block_symbol vectors.
3087         * symtab.h (symbol_found_callback_ftype): Change parameter type to
3088         block_symbol.
3089
3090 2018-08-29  Keith Seitz  <keiths@redhat.com>
3091
3092         * linespec.c (symbolp): Remove typedef and VEC definitions.
3093         (bound_minimal_symbol_d): Likewise.
3094
3095 2018-08-29  Keith Seitz  <keiths@redhat.com>
3096
3097         * linespec.c (decode_compound_collector::decode_compound_collector):
3098         Remove initialization for `m_symtabs'.
3099         (decode_compound_collector::release_symbols): Change return type
3100         to std::vector.  Update all callers.
3101         (class decode_compound_collector) <m_symbols>: Change type to
3102         std::vector.
3103         (lookup_prefix_sym): Change return type to std::vector.  Update all
3104         callers.
3105         (compare_symbols): Remove.
3106         (std_compare_symbols): Rename to `compare_symbols'.
3107         (find_method): Change `sym_classes' parameter to std::vector.
3108         Update all callers.  Use std::sort to sort sym_classes.
3109         (find_linespec_symbols): Remove cleanup.
3110
3111 2018-08-29  Keith Seitz  <keiths@redhat.com>
3112
3113         * linespec.c (struct linespec) <minimal_symbols>: Change type to
3114         std::vector.  Update all users.
3115         (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
3116         (struct collect_info) <minimal_symbols>: Likewise.
3117         (compare_msymbols): Return bool.  Change parameters to const
3118         bound_minimal_symbol references.
3119         (find_method, find_function_symbols, find_linespec_symbols): Change
3120         `minsyms' parameter to std::vector.  Update all callers.
3121
3122 2018-08-29  Keith Seitz  <keiths@redhat.com>
3123
3124         * linespec.c (struct linespec) <label_symbols>: Change type to
3125         std::vector.  Update all users.
3126         (find_label_symbols_in_block): Change `result' parameter to
3127         std::vector.  Update all callers.
3128         (find_label_symbols): Return std::vector.  Update all callers.
3129
3130 2018-08-29  Keith Seitz  <keiths@redhat.com>
3131
3132         * linespec.c (struct linespec) <function_symbols>: Change type to
3133         std::vector.  Update all users.
3134         (struct collect_info) <function_symbols>: Likewise.
3135         (convert_linespec_to_sals): Use std::sort to sort function_symbols.
3136         (std_compare_symbols): New function.
3137         (find_method, find_function_symbols, find_linespec_symbols)
3138         (find_label_symbols_in_block): Change `symbols' parameter to
3139         std::vector.  Update all callers.
3140         (find_label_symbols): Likewise for `function_symbols' and
3141         `label_funcs_ret'.
3142
3143 2018-08-29  Keith Seitz  <keiths@redhat.com>
3144
3145         * linespec.c (symtab_vector_up): Define.
3146         (struct linespec) <file_symtabs>: Change type to std::vector *.
3147         Update all uses.
3148         (struct collect_info) <file_symtabs>: Likewise.
3149         (collect_symtabs_from_filename): Return symtab_vector_up.
3150         Update all callers.
3151         (decode_objc): Remove cleanup.
3152         (symtab_collector::symtab_collector): Initialize `m_symtabs'.
3153         (symtab_collector::release_symtabs): Return symtab_vector_up.
3154         Update all callers.
3155         (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
3156         Update all users.
3157         (collect_symtabs_from_filename, symtabs_from_filename): Return
3158         symtab_vector_up.  Update all callers.
3159
3160 2018-08-29  Tom Tromey  <tom@tromey.com>
3161
3162         * csky-tdep.c (csky_analyze_prologue): Use
3163         core_addr_to_string_nz.
3164
3165 2018-08-29  Tom Tromey  <tom@tromey.com>
3166
3167         * windows-nat.c (struct xlate_exception) <them>: Change type to
3168         DWORD.
3169         (xlate): Fix formatting.  Remove last entry.
3170         (struct xlate_exception, xlate): Comment out.
3171         (windows_nat_target::resume): Use ranged for.
3172
3173 2018-08-29  Jim Wilson  <jimw@sifive.com>
3174
3175         * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
3176         (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
3177         of NT_PRFPREG.
3178         (riscv_linux_nat_target::store_registers): Likewise.
3179
3180 2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
3181
3182         PR gdb/23555
3183         PR gdb/23558
3184         * gnulib/aclocal.m4: Regenerate.
3185         * gnulib/config.in: Regenerate.
3186         * gnulib/configure: Regenerate.
3187         * gnulib/import/Makefile.am: Update.
3188         * gnulib/import/Makefile.in: Update.
3189         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
3190         * gnulib/import/_Noreturn.h: ... this.
3191         * gnulib/import/alloca.in.h: Update.
3192         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
3193         * gnulib/import/arg-nonnull.h: ... this.
3194         * gnulib/import/assure.h: Update.
3195         * gnulib/import/at-func.c: Update.
3196         * gnulib/import/basename-lgpl.c: Update.
3197         * gnulib/import/extra/snippet/c++defs.h: Rename to...
3198         * gnulib/import/c++defs.h: ... this.
3199         * gnulib/import/canonicalize-lgpl.c: Update.
3200         * gnulib/import/cdefs.h: Update.
3201         * gnulib/import/chdir-long.c: Update.
3202         * gnulib/import/chdir-long.h: Update.
3203         * gnulib/import/cloexec.c: Update.
3204         * gnulib/import/cloexec.h: Update.
3205         * gnulib/import/close.c: Update.
3206         * gnulib/import/closedir.c: Update.
3207         * gnulib/import/config.charset: Update.
3208         * gnulib/import/dirent-private.h: Update.
3209         * gnulib/import/dirent.in.h: Update.
3210         * gnulib/import/dirfd.c: Update.
3211         * gnulib/import/dirname-lgpl.c: Update.
3212         * gnulib/import/dirname.h: Update.
3213         * gnulib/import/dosname.h: Update.
3214         * gnulib/import/dup-safer-flag.c: Update.
3215         * gnulib/import/dup-safer.c: Update.
3216         * gnulib/import/dup.c: Update.
3217         * gnulib/import/dup2.c: Update.
3218         * gnulib/import/errno.in.h: Update.
3219         * gnulib/import/error.c: Update.
3220         * gnulib/import/error.h: Update.
3221         * gnulib/import/exitfail.c: Update.
3222         * gnulib/import/exitfail.h: Update.
3223         * gnulib/import/extra/update-copyright: Update.
3224         * gnulib/import/fchdir.c: Update.
3225         * gnulib/import/fcntl.c: Update.
3226         * gnulib/import/fcntl.in.h: Update.
3227         * gnulib/import/fd-hook.c: Update.
3228         * gnulib/import/fd-hook.h: Update.
3229         * gnulib/import/fd-safer-flag.c: Update.
3230         * gnulib/import/fd-safer.c: Update.
3231         * gnulib/import/fdopendir.c: Update.
3232         * gnulib/import/filename.h: Update.
3233         * gnulib/import/filenamecat-lgpl.c: Update.
3234         * gnulib/import/filenamecat.h: Update.
3235         * gnulib/import/flexmember.h: Update.
3236         * gnulib/import/float+.h: Update.
3237         * gnulib/import/float.c: Update.
3238         * gnulib/import/float.in.h: Update.
3239         * gnulib/import/fnmatch.c: Update.
3240         * gnulib/import/fnmatch.in.h: Update.
3241         * gnulib/import/fnmatch_loop.c: Update.
3242         * gnulib/import/fpucw.h: Update.
3243         * gnulib/import/frexp.c: Update.
3244         * gnulib/import/frexpl.c: Update.
3245         * gnulib/import/fstat.c: Update.
3246         * gnulib/import/fstatat.c: Update.
3247         * gnulib/import/getcwd-lgpl.c: Update.
3248         * gnulib/import/getcwd.c: Update.
3249         * gnulib/import/getdtablesize.c: Update.
3250         * gnulib/import/getlogin_r.c: Update.
3251         * gnulib/import/getprogname.c: Update.
3252         * gnulib/import/getprogname.h: Update.
3253         * gnulib/import/gettext.h: Update.
3254         * gnulib/import/gettimeofday.c: Update.
3255         * gnulib/import/glob-libc.h: Update.
3256         * gnulib/import/glob.c: Update.
3257         * gnulib/import/glob.in.h: Update.
3258         * gnulib/import/glob_internal.h: Update.
3259         * gnulib/import/glob_pattern_p.c: Update.
3260         * gnulib/import/globfree.c: Update.
3261         * gnulib/import/hard-locale.c: Update.
3262         * gnulib/import/hard-locale.h: Update.
3263         * gnulib/import/intprops.h: Update.
3264         * gnulib/import/inttypes.in.h: Update.
3265         * gnulib/import/isnan.c: Update.
3266         * gnulib/import/isnand-nolibm.h: Update.
3267         * gnulib/import/isnand.c: Update.
3268         * gnulib/import/isnanl-nolibm.h: Update.
3269         * gnulib/import/isnanl.c: Update.
3270         * gnulib/import/itold.c: Update.
3271         * gnulib/import/libc-config.h: Update.
3272         * gnulib/import/limits.in.h: Update.
3273         * gnulib/import/localcharset.c: Update.
3274         * gnulib/import/localcharset.h: Update.
3275         * gnulib/import/localtime-buffer.c: Update.
3276         * gnulib/import/localtime-buffer.h: Update.
3277         * gnulib/import/lstat.c: Update.
3278         * gnulib/import/m4/00gnulib.m4: Update.
3279         * gnulib/import/m4/__inline.m4: Update.
3280         * gnulib/import/m4/absolute-header.m4: Update.
3281         * gnulib/import/m4/alloca.m4: Update.
3282         * gnulib/import/m4/builtin-expect.m4: Update.
3283         * gnulib/import/m4/canonicalize.m4: Update.
3284         * gnulib/import/m4/chdir-long.m4: Update.
3285         * gnulib/import/m4/close.m4: Update.
3286         * gnulib/import/m4/closedir.m4: Update.
3287         * gnulib/import/m4/configmake.m4: Update.
3288         * gnulib/import/m4/d-ino.m4: Update.
3289         * gnulib/import/m4/d-type.m4: Update.
3290         * gnulib/import/m4/dirent_h.m4: Update.
3291         * gnulib/import/m4/dirfd.m4: Update.
3292         * gnulib/import/m4/dirname.m4: Update.
3293         * gnulib/import/m4/double-slash-root.m4: Update.
3294         * gnulib/import/m4/dup.m4: Update.
3295         * gnulib/import/m4/dup2.m4: Update.
3296         * gnulib/import/m4/eealloc.m4: Update.
3297         * gnulib/import/m4/environ.m4: Update.
3298         * gnulib/import/m4/errno_h.m4: Update.
3299         * gnulib/import/m4/error.m4: Update.
3300         * gnulib/import/m4/exponentd.m4: Update.
3301         * gnulib/import/m4/exponentl.m4: Update.
3302         * gnulib/import/m4/extensions.m4: Update.
3303         * gnulib/import/m4/extern-inline.m4: Update.
3304         * gnulib/import/m4/fchdir.m4: Update.
3305         * gnulib/import/m4/fcntl-o.m4: Update.
3306         * gnulib/import/m4/fcntl.m4: Update.
3307         * gnulib/import/m4/fcntl_h.m4: Update.
3308         * gnulib/import/m4/fdopendir.m4: Update.
3309         * gnulib/import/m4/filenamecat.m4: Update.
3310         * gnulib/import/m4/flexmember.m4: Update.
3311         * gnulib/import/m4/float_h.m4: Update.
3312         * gnulib/import/m4/fnmatch.m4: Update.
3313         * gnulib/import/m4/fnmatch_h.m4: Update.
3314         * gnulib/import/m4/fpieee.m4: Update.
3315         * gnulib/import/m4/frexp.m4: Update.
3316         * gnulib/import/m4/frexpl.m4: Update.
3317         * gnulib/import/m4/fstat.m4: Update.
3318         * gnulib/import/m4/fstatat.m4: Update.
3319         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
3320         * gnulib/import/m4/getcwd-path-max.m4: Update.
3321         * gnulib/import/m4/getcwd.m4: Update.
3322         * gnulib/import/m4/getdtablesize.m4: Update.
3323         * gnulib/import/m4/getlogin.m4: Update.
3324         * gnulib/import/m4/getlogin_r.m4: Update.
3325         * gnulib/import/m4/getpagesize.m4: Update.
3326         * gnulib/import/m4/getprogname.m4: Update.
3327         * gnulib/import/m4/gettimeofday.m4: Update.
3328         * gnulib/import/m4/glibc21.m4: Update.
3329         * gnulib/import/m4/glob.m4: Update.
3330         * gnulib/import/m4/glob_h.m4: Update.
3331         * gnulib/import/m4/gnulib-cache.m4: Update.
3332         * gnulib/import/m4/gnulib-common.m4: Update.
3333         * gnulib/import/m4/gnulib-comp.m4: Update.
3334         * gnulib/import/m4/gnulib-tool.m4: Update.
3335         * gnulib/import/m4/hard-locale.m4: Update.
3336         * gnulib/import/m4/include_next.m4: Update.
3337         * gnulib/import/m4/inttypes-pri.m4: Update.
3338         * gnulib/import/m4/inttypes.m4: Update.
3339         * gnulib/import/m4/isnand.m4: Update.
3340         * gnulib/import/m4/isnanl.m4: Update.
3341         * gnulib/import/m4/largefile.m4: Update.
3342         * gnulib/import/m4/limits-h.m4: Update.
3343         * gnulib/import/m4/localcharset.m4: Update.
3344         * gnulib/import/m4/locale-fr.m4: Update.
3345         * gnulib/import/m4/locale-ja.m4: Update.
3346         * gnulib/import/m4/locale-zh.m4: Update.
3347         * gnulib/import/m4/localtime-buffer.m4: Update.
3348         * gnulib/import/m4/longlong.m4: Update.
3349         * gnulib/import/m4/lstat.m4: Update.
3350         * gnulib/import/m4/malloc.m4: Update.
3351         * gnulib/import/m4/malloca.m4: Update.
3352         * gnulib/import/m4/math_h.m4: Update.
3353         * gnulib/import/m4/mbrtowc.m4: Update.
3354         * gnulib/import/m4/mbsinit.m4: Update.
3355         * gnulib/import/m4/mbsrtowcs.m4: Update.
3356         * gnulib/import/m4/mbstate_t.m4: Update.
3357         * gnulib/import/m4/memchr.m4: Update.
3358         * gnulib/import/m4/memmem.m4: Update.
3359         * gnulib/import/m4/mempcpy.m4: Update.
3360         * gnulib/import/m4/memrchr.m4: Update.
3361         * gnulib/import/m4/mkdir.m4: Update.
3362         * gnulib/import/m4/mkstemp.m4: Update.
3363         * gnulib/import/m4/mmap-anon.m4: Update.
3364         * gnulib/import/m4/mode_t.m4: Update.
3365         * gnulib/import/m4/msvc-inval.m4: Update.
3366         * gnulib/import/m4/msvc-nothrow.m4: Update.
3367         * gnulib/import/m4/multiarch.m4: Update.
3368         * gnulib/import/m4/nocrash.m4: Update.
3369         * gnulib/import/m4/off_t.m4: Update.
3370         * gnulib/import/m4/onceonly.m4: Update.
3371         * gnulib/import/m4/open-cloexec.m4: Update.
3372         * gnulib/import/m4/open.m4: Update.
3373         * gnulib/import/m4/openat.m4: Update.
3374         * gnulib/import/m4/opendir.m4: Update.
3375         * gnulib/import/m4/pathmax.m4: Update.
3376         * gnulib/import/m4/rawmemchr.m4: Update.
3377         * gnulib/import/m4/readdir.m4: Update.
3378         * gnulib/import/m4/readlink.m4: Update.
3379         * gnulib/import/m4/realloc.m4: Update.
3380         * gnulib/import/m4/rename.m4: Update.
3381         * gnulib/import/m4/rewinddir.m4: Update.
3382         * gnulib/import/m4/rmdir.m4: Update.
3383         * gnulib/import/m4/save-cwd.m4: Update.
3384         * gnulib/import/m4/secure_getenv.m4: Update.
3385         * gnulib/import/m4/setenv.m4: Update.
3386         * gnulib/import/m4/signal_h.m4: Update.
3387         * gnulib/import/m4/ssize_t.m4: Update.
3388         * gnulib/import/m4/stat-time.m4: Update.
3389         * gnulib/import/m4/stat.m4: Update.
3390         * gnulib/import/m4/std-gnu11.m4: Update.
3391         * gnulib/import/m4/stdbool.m4: Update.
3392         * gnulib/import/m4/stddef_h.m4: Update.
3393         * gnulib/import/m4/stdint.m4: Update.
3394         * gnulib/import/m4/stdio_h.m4: Update.
3395         * gnulib/import/m4/stdlib_h.m4: Update.
3396         * gnulib/import/m4/strchrnul.m4: Update.
3397         * gnulib/import/m4/strdup.m4: Update.
3398         * gnulib/import/m4/strerror.m4: Update.
3399         * gnulib/import/m4/string_h.m4: Update.
3400         * gnulib/import/m4/strstr.m4: Update.
3401         * gnulib/import/m4/strtok_r.m4: Update.
3402         * gnulib/import/m4/sys_socket_h.m4: Update.
3403         * gnulib/import/m4/sys_stat_h.m4: Update.
3404         * gnulib/import/m4/sys_time_h.m4: Update.
3405         * gnulib/import/m4/sys_types_h.m4: Update.
3406         * gnulib/import/m4/tempname.m4: Update.
3407         * gnulib/import/m4/time_h.m4: Update.
3408         * gnulib/import/m4/unistd-safer.m4: Update.
3409         * gnulib/import/m4/unistd_h.m4: Update.
3410         * gnulib/import/m4/warn-on-use.m4: Update.
3411         * gnulib/import/m4/wchar_h.m4: Update.
3412         * gnulib/import/m4/wchar_t.m4: Update.
3413         * gnulib/import/m4/wctype_h.m4: Update.
3414         * gnulib/import/m4/wint_t.m4: Update.
3415         * gnulib/import/malloc.c: Update.
3416         * gnulib/import/malloc/scratch_buffer.h: Update.
3417         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
3418         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
3419         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
3420         * gnulib/import/malloca.c: Update.
3421         * gnulib/import/malloca.h: Update.
3422         * gnulib/import/malloca.valgrind: Update.
3423         * gnulib/import/math.in.h: Update.
3424         * gnulib/import/mbrtowc.c: Update.
3425         * gnulib/import/mbsinit.c: Update.
3426         * gnulib/import/mbsrtowcs-impl.h: Update.
3427         * gnulib/import/mbsrtowcs-state.c: Update.
3428         * gnulib/import/mbsrtowcs.c: Update.
3429         * gnulib/import/memchr.c: Update.
3430         * gnulib/import/memmem.c: Update.
3431         * gnulib/import/mempcpy.c: Update.
3432         * gnulib/import/memrchr.c: Update.
3433         * gnulib/import/mkdir.c: Update.
3434         * gnulib/import/mkstemp.c: Update.
3435         * gnulib/import/msvc-inval.c: Update.
3436         * gnulib/import/msvc-inval.h: Update.
3437         * gnulib/import/msvc-nothrow.c: Update.
3438         * gnulib/import/msvc-nothrow.h: Update.
3439         * gnulib/import/open.c: Update.
3440         * gnulib/import/openat-die.c: Update.
3441         * gnulib/import/openat-priv.h: Update.
3442         * gnulib/import/openat-proc.c: Update.
3443         * gnulib/import/openat.c: Update.
3444         * gnulib/import/openat.h: Update.
3445         * gnulib/import/opendir.c: Update.
3446         * gnulib/import/pathmax.h: Update.
3447         * gnulib/import/pipe-safer.c: Update.
3448         * gnulib/import/rawmemchr.c: Update.
3449         * gnulib/import/readdir.c: Update.
3450         * gnulib/import/readlink.c: Update.
3451         * gnulib/import/realloc.c: Update.
3452         * gnulib/import/ref-add.sin: Update.
3453         * gnulib/import/ref-del.sin: Update.
3454         * gnulib/import/rename.c: Update.
3455         * gnulib/import/rewinddir.c: Update.
3456         * gnulib/import/rmdir.c: Update.
3457         * gnulib/import/same-inode.h: Update.
3458         * gnulib/import/save-cwd.c: Update.
3459         * gnulib/import/save-cwd.h: Update.
3460         * gnulib/import/scratch_buffer.h: Update.
3461         * gnulib/import/secure_getenv.c: Update.
3462         * gnulib/import/setenv.c: Update.
3463         * gnulib/import/signal.in.h: Update.
3464         * gnulib/import/stat-time.c: Update.
3465         * gnulib/import/stat-time.h: Update.
3466         * gnulib/import/stat-w32.c: Update.
3467         * gnulib/import/stat-w32.h: Update.
3468         * gnulib/import/stat.c: Update.
3469         * gnulib/import/stdbool.in.h: Update.
3470         * gnulib/import/stddef.in.h: Update.
3471         * gnulib/import/stdint.in.h: Update.
3472         * gnulib/import/stdio.in.h: Update.
3473         * gnulib/import/stdlib.in.h: Update.
3474         * gnulib/import/str-two-way.h: Update.
3475         * gnulib/import/strchrnul.c: Update.
3476         * gnulib/import/strdup.c: Update.
3477         * gnulib/import/streq.h: Update.
3478         * gnulib/import/strerror-override.c: Update.
3479         * gnulib/import/strerror-override.h: Update.
3480         * gnulib/import/strerror.c: Update.
3481         * gnulib/import/string.in.h: Update.
3482         * gnulib/import/stripslash.c: Update.
3483         * gnulib/import/strnlen1.c: Update.
3484         * gnulib/import/strnlen1.h: Update.
3485         * gnulib/import/strstr.c: Update.
3486         * gnulib/import/strtok_r.c: Update.
3487         * gnulib/import/sys_stat.in.h: Update.
3488         * gnulib/import/sys_time.in.h: Update.
3489         * gnulib/import/sys_types.in.h: Update.
3490         * gnulib/import/tempname.c: Update.
3491         * gnulib/import/tempname.h: Update.
3492         * gnulib/import/time.in.h: Update.
3493         * gnulib/import/unistd--.h: Update.
3494         * gnulib/import/unistd-safer.h: Update.
3495         * gnulib/import/unistd.in.h: Update.
3496         * gnulib/import/unsetenv.c: Update.
3497         * gnulib/import/verify.h: Update.
3498         * gnulib/import/extra/snippet/warn-on-use.h: Update.
3499         * gnulib/import/wchar.in.h: Update.
3500         * gnulib/import/wctype.in.h: Update.
3501         * gnulib/import/xalloc-oversized.h: Update.
3502         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
3503         "53e2c179f26a890fa6685af4b6c1397ee370433b".
3504
3505 2018-08-16  Gary Benson <gbenson@redhat.com>
3506
3507         PR gdb/13000:
3508         * gdb/main.c (captured_main_1): Exit with nonzero status
3509         in batch mode if the last command to be executed failed.
3510         * NEWS: Mention the above.
3511
3512 2018-08-29  Simon Marchi  <simon.marchi@ericsson.com>
3513
3514         * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
3515         end of warning message.
3516
3517 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
3518
3519         PR gdb/22943:
3520         * aarch64-tdep.c (is_hfa_or_hva): Remove function.
3521         (aarch64_extract_return_value): Use
3522         aapcs_is_vfp_call_or_return_candidate.
3523         (aarch64_return_in_memory): Likewise.
3524         (aarch64_store_return_value): Likewise.
3525
3526 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
3527
3528         * aarch64-tdep.c
3529         (aapcs_is_vfp_call_or_return_candidate): Make static
3530         (pass_in_v_or_stack): Remove function.
3531         (pass_in_v_vfp_candidate): New function.
3532         (aarch64_push_dummy_call): Check for float register candidates.
3533
3534 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
3535
3536         * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
3537         (aapcs_is_vfp_call_or_return_candidate_1): New function.
3538         (aapcs_is_vfp_call_or_return_candidate): Likewise.
3539
3540 2018-08-28  Simon Marchi  <simon.marchi@polymtl.ca>
3541
3542         PR build/23399
3543         * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
3544         (struct ipa_sym_addresses): Rename to...
3545         (struct ipa_sym_addresses_common): ... this.
3546         * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
3547
3548 2018-08-28  Tom Tromey  <tom@tromey.com>
3549
3550         * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
3551         (token_fifo): Now a std::vector.
3552         (yylex, c_parse): Update.
3553         * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
3554         (token_fifo): Now a std::vector.
3555         (yylex, d_parse): Update.
3556         * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
3557         (token_fifo): Now a std::vector.
3558         (yylex, go_parse): Update.
3559
3560 2018-08-28  Simon Marchi  <simon.marchi@ericsson.com>
3561
3562         * parser-defs.h (struct type_stack) <elements>: Change type to
3563         std::vector<union type_stack_elt>.
3564         <depth, size>: Remove.
3565         * parse.c (parse_exp_in_context_1): Adjust.
3566         (type_stack_reserve): Remove.
3567         (check_type_stack_depth): Remove.
3568         (insert_into_type_stack): Adjust to std::vector.
3569         (insert_type): Likewise.
3570         (push_type): Likewise.
3571         (push_type_int): Likewise.
3572         (insert_type_address_space): Likewise.
3573         (pop_type): Likewise.
3574         (pop_type_int): Likewise.
3575         (pop_typelist): Likewise.
3576         (pop_type_stack): Likewise.
3577         (append_type_stack): Likewise.
3578         (push_type_stack): Likewise.
3579         (get_type_stack): Likewise.
3580         (type_stack_cleanup): Likewise.
3581         (push_typelist): Likewise.
3582         (follow_types): Likewise.
3583         (_initialize_parse): Likewise.
3584
3585 2018-08-28  Hafiz Abid Qadeer  <abidh@codesourcery.com>
3586
3587         * NEWS: Mention csky target.
3588
3589 2018-08-28  Jiangshuai Li  <jiangshuai_li@c-sky.com>
3590             Hafiz Abid Qadeer  <abidh@codesourcery.com>
3591             Don Breazeal  <donb@codesourcery.com>
3592
3593         * csky-linux-tdep.c: New file.
3594         * csky-tdep.c: Likewise.
3595         * csky-tdep.h: Likewise.
3596         * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
3597         csky-tdep.o.
3598         (HFILES_NO_SRCDIR): Add csky-tdep.h.
3599         (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
3600         * configure.tgt: Add csky support.
3601
3602 2018-08-27  Jan Vrany  <jan.vrany@fit.cvut.cz>
3603
3604         * python/py-framefilter.c (py_print_frame): Print frame architecture
3605         when printing on an MI output.
3606
3607 2018-08-27  Tom Tromey  <tom@tromey.com>
3608
3609         PR build/23087:
3610         * configure: Rebuild.
3611         * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
3612
3613 2018-08-27  Tom Tromey  <tom@tromey.com>
3614
3615         * aarch64-linux-tdep.c
3616         (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
3617         casts to int.
3618
3619 2018-08-27  Tom Tromey  <tom@tromey.com>
3620
3621         * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
3622         unsigned.
3623         (ppc64_standard_linkage1, ppc64_standard_linkage2)
3624         (ppc64_standard_linkage3, ppc64_standard_linkage4)
3625         (ppc64_standard_linkage5, ppc64_standard_linkage6)
3626         (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
3627         unsigned.
3628
3629 2018-08-27  Tom Tromey  <tom@tromey.com>
3630
3631         * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
3632         (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
3633
3634 2018-08-27  Tom Tromey  <tom@tromey.com>
3635
3636         * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
3637         * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
3638         ULONGEST_MAX.
3639         * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
3640         ULONGEST_MAX.
3641         * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
3642         ULONGEST_MAX.
3643         * sparc-linux-tdep.c (sparc32_linux_sigframe)
3644         (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
3645         * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
3646         ULONGEST_MAX.
3647         * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
3648         (ppc64_linux_sigaction_tramp_frame)
3649         (ppc32_linux_sighandler_tramp_frame)
3650         (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
3651         * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
3652         (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
3653         * mn10300-linux-tdep.c (am33_linux_sigframe)
3654         (am33_linux_rt_sigframe): Use ULONGEST_MAX.
3655         * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
3656         * mips-linux-tdep.c (mips_linux_o32_sigframe)
3657         (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
3658         (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
3659         (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
3660         (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
3661         * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
3662         (mips64_fbsd_sigframe): Use ULONGEST_MAX.
3663         * microblaze-linux-tdep.c
3664         (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
3665         * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
3666         (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
3667         (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
3668         * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
3669         * common/common-types.h (ULONGEST_MAX): New define.
3670         (CORE_ADDR_MAX): Fix formatting.
3671         * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
3672         * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
3673         * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
3674         (arm_linux_rt_sigreturn_tramp_frame)
3675         (arm_eabi_linux_sigreturn_tramp_frame)
3676         (arm_eabi_linux_rt_sigreturn_tramp_frame)
3677         (thumb2_eabi_linux_sigreturn_tramp_frame)
3678         (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
3679         (arm_linux_restart_syscall_tramp_frame)
3680         (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
3681         * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
3682         * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
3683         ULONGEST_MAX.
3684         * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
3685
3686 2018-08-27  Tom Tromey  <tom@tromey.com>
3687
3688         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
3689         CORE_ADDR_MAX.
3690         * mips-tdep.c (mips_deal_with_atomic_sequence)
3691         (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
3692         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
3693         (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
3694         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
3695         CORE_ADDR_MAX.
3696         * aarch64-tdep.c (aarch64_software_single_step): Use
3697         CORE_ADDR_MAX.
3698
3699 2018-08-27  Tom Tromey  <tom@tromey.com>
3700
3701         * linespec.c (complete_linespec_component): Add cast to "char".
3702         * completer.c (completion_tracker::build_completion_result): Add
3703         cast to "char".
3704
3705 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
3706
3707         * solist.h (struct solist, struct target_so_ops): Fix
3708         indentation.
3709
3710 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
3711
3712         * ada-tasks.c (ada_task_info_s): Remove typedef.
3713         (DEF_VEC_O(ada_task_info_s)): Remove.
3714         (struct ada_tasks_inferior_data): Initialize fields.
3715         <task_list>: Make an std::vector.
3716         (get_ada_tasks_inferior_data): Allocate with new.
3717         (ada_get_task_number): Adjust.
3718         (get_task_number_from_id): Likewise.
3719         (valid_task_id): Likewise.
3720         (ada_get_task_info_from_ptid): Likewise.
3721         (iterate_over_live_ada_tasks): Likewise.
3722         (add_ada_task): Likewise.
3723         (read_known_tasks): Likewise.
3724         (ada_build_task_list): Likewise.
3725         (print_ada_task_info): Likewise.
3726         (info_task): Likewise.
3727         (task_command_1): Likewise.
3728
3729 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
3730
3731         * ada-lang.c (add_angle_brackets): Return std::string.
3732
3733 2018-08-25  Simon Marchi  <simon.marchi@polymtl.ca>
3734
3735         * python/py-threadevent.c (py_get_event_thread): Initialize
3736         pythread.
3737
3738 2018-08-24  Pedro Alves  <palves@redhat.com>
3739
3740         * python/py-bpevent.c (create_breakpoint_event_object): Use
3741         copy-initialization.
3742         * python/py-continueevent.c (emit_continue_event): Use
3743         copy-initialization.
3744         * python/py-exitedevent.c (create_exited_event_object): Return a
3745         gdbpy_ref<>.
3746         (emit_exited_event): Use copy-initialization.
3747         * python/py-inferior.c (python_new_inferior)
3748         (python_inferior_deleted, add_thread_object): Use
3749         copy-initialization.
3750         * python/py-infevents.c (create_inferior_call_event_object)
3751         (create_register_changed_event_object)
3752         (create_memory_changed_event_object): Return a gdbpy_ref<>.
3753         (emit_inferior_call_event, emit_memory_changed_event)
3754         (emit_register_changed_event): Use copy-initialization.
3755         * python/py-newobjfileevent.c (create_new_objfile_event_object):
3756         Return a gdbpy_ref<>.
3757         (emit_new_objfile_event): Use copy-initialization.
3758         (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
3759         (emit_clear_objfiles_event): Use copy-initialization.
3760         * python/py-signalevent.c (create_signal_event_object): Use
3761         copy-initialization.
3762         * python/py-threadevent.c (create_thread_event_object): Use
3763         copy-initialization.
3764
3765 2018-08-24  Pedro Alves  <palves@redhat.com>
3766             Simon Marchi  <simon.marchi@ericsson.com>
3767
3768         PR gdb/23379
3769         * python/py-continueevent.c: Include "gdbthread.h".
3770         (create_continue_event_object): Add intro comment.  Add 'ptid'
3771         parameter.  Use it to find thread to pass to
3772         create_thread_event_object.
3773         (emit_continue_event): Pass PTID down to
3774         create_continue_event_object.
3775         * python/py-event.h (py_get_event_thread): Declare.
3776         (create_thread_event_object): Remove default from 'thread'
3777         parameter.
3778         * python/py-stopevent.c (create_stop_event_object): Use
3779         py_get_event_thread.
3780         * python/py-threadevent.c (get_event_thread): Rename to ...
3781         (py_get_event_thread): ... this, make extern, add 'ptid' parameter
3782         and use it to find the thread.
3783         (create_thread_event_object): Assert that THREAD isn't null.
3784         Don't find the event thread here.
3785
3786 2018-08-23  Kevin Buettner  <kevinb@redhat.com>
3787
3788         * block.h (blockrange, blockranges): New struct declarations.
3789         (struct block): Add new field named `ranges'.
3790         (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
3791         (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
3792         macros for accessing ranges in struct block.
3793         (make_blockranges): New declaration.
3794         block.c (make_blockranges): New function.
3795         * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
3796         for block.
3797         * symtab.h (find_pc_partial_function): Add new parameter `block'.
3798         * blockframe.c (cache_pc_function_block): New static global.
3799         (clear_pc_function_cache): Clear cache_pc_function_block.
3800         (find_pc_partial_function): Move comment to symtab.h.  Add
3801         support for non-contiguous blocks.
3802         * cli/cli-cmds.c (block.h): Include.
3803         (print_disassembly): Handle printing of non-contiguous blocks.
3804         (disassemble_current_function): Likewise.
3805         (disassemble_command): Likewise.
3806
3807         * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
3808         BLOCK_START.
3809         * blockframe.c (get_pc_function_start): Likewise.
3810         * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
3811         (gcc_symbol_address): Likewise.
3812         * compile/compile-object-run.c (compile_object_run): Likewise.
3813         * compile/compile.c (get_expr_block_and_pc): Likewise.
3814         * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
3815         (func_addr_to_tail_call_list): Likewise.
3816         * findvar.c (default_read_var_value): Likewise.
3817         * inline-frame.c (inline_frame_this_id): Likewise.
3818         (skip-inline_frames): Likewise.
3819         * infcmd.c (until_next_command): Likewise.
3820         * linespec.c (convert_linespec_to_sals): Likewise.
3821         * parse.c (parse_exp_in_context_1): Likewise.
3822         * printcmd.c (build_address_symbolic): likewise.
3823         (info_address_command): Likewise.
3824         symtab.c (find_function_start_sal): Likewise.
3825         (skip_prologue_sal): Likewise.
3826         (find_function_alias_target): Likewise.
3827         (find_gnu_ifunc): Likewise.
3828         * stack.c (find_frame_funname): Likewise.
3829         * symtab.c (fixup_symbol_section): Likewise.
3830         (find_function_start_sal): Likewise.
3831         (skip_prologue_sal): Likewsie.
3832         (find_function_alias_target): Likewise.
3833         (find_gnu_ifunc): Likewise.
3834         * tracepoint.c (info_scope_command): Likewise.
3835         * value.c (value_fn_field): Likewise.
3836
3837         * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
3838         in place of find_pc_partial_function.
3839         * blockframe.c (find_function_entry_range_from_pc): New function.
3840         * symtab.h (find_function_entry_range_from_pc): Declare and document.
3841         * objfiles.c (objfile_relocate1): Relocate start and end addresses
3842         for each range in a block.
3843
3844
3845 2018-08-23  Xavier Roirand  <roirand@adacore.com>
3846
3847         * machoread.c (macho_symfile_read_all_oso): Remove uneeded
3848         incrementation.
3849
3850 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
3851
3852         * solib-svr4.c (read_program_headers_from_bfd): Return
3853         gdb::optional<gdb::byte_vector>.
3854         (svr4_exec_displacement): Adjust.
3855
3856 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
3857
3858         * solib-svr4.c (read_program_header): Return
3859         gdb::optional<gdb::byte_vector>, remove p_sect_size param.
3860         (find_program_interpreter): Return
3861         gdb::optional<gdb::byte_vector>.
3862         (scan_dyntag_auxv): Adjust.
3863         (enable_break): Adjust.
3864         (svr4_exec_displacement): Adjust.
3865
3866 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
3867
3868         * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
3869         * inf-child.c (inf_child_target::terminal_save_inferior): New.
3870
3871 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
3872
3873         * guile/scm-string.c (gdbscm_scm_from_printf): Use
3874         string_vprintf.
3875         * guile/scm-utils.c (gdbscm_printf): Likewise.
3876         * serial.c (serial_printf): Likewise.
3877         * xml-support.c (gdb_xml_parser::vdebug): Likewise.
3878
3879 2018-08-22  Jan Vrany  <jan.vrany@fit.cvut.cz>
3880
3881         * stack.c (print_frame): Print frame architecture when printing on
3882         an MI output.
3883         * NEWS: Mention new "arch" attribute in frame output.
3884
3885 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
3886
3887         * arch/aarch64.h (aarch64_regnum): Update comment.
3888
3889 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
3890
3891         * NEWS: Add SVE to 8.2 section.
3892
3893 2018-08-21  Pedro Alves  <palves@redhat.com>
3894
3895         * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
3896         out from gdbscm_parse_function_args.
3897         (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
3898         gdbscm_parse_function_args_1.
3899
3900 2018-08-21  Simon Marchi  <simon.marchi@ericsson.com>
3901
3902         PR gdb/17816
3903         * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
3904         operator.
3905
3906 2018-08-19  Simon Marchi  <simon.marchi@polymtl.ca>
3907
3908         * solib-svr4.c (svr4_exec_displacement): Fix formatting.
3909
3910 2018-08-19  Michael Spang  <spang@google.com>
3911
3912         PR gdb/11786
3913         * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
3914         for PT_TLS segments.
3915
3916 2018-08-18  Kevin Buettner  <kevinb@redhat.com>
3917
3918         * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
3919         dwarf_variable_value.
3920         * dwarf2-frame.c (class dwarf_expr_executor):
3921         Add override for dwarf_variable_value.
3922         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
3923         (class symbol_needs_eval_context): Likewise.
3924         (indirect_synthetic_pointer): Add forward declaration.
3925         (sect_variable_value): New function.
3926         (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
3927         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
3928         for DW_OP_GNU_variable_value.
3929
3930 2018-08-16  Tom Tromey  <tom@tromey.com>
3931
3932         * top.c (read_command_file): Update.
3933         (command_line_input): Remove "repeat" argument.
3934         * ada-lang.c (get_selections): Update.
3935         * linespec.c (decode_line_2): Update.
3936         * defs.h (command_line_input): Remove argument.
3937         * cli/cli-script.c (read_next_line): Update.
3938         * python/py-gdb-readline.c: Update.
3939
3940 2018-08-17  Tom Tromey  <tom@tromey.com>
3941
3942         * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
3943         command_line_input.
3944
3945 2018-08-15  Tom Tromey  <tom@tromey.com>
3946
3947         * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
3948
3949 2018-08-14  Jan Vrany  <jan.vrany@fit.cvut.cz>
3950
3951         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
3952         If used, use find_pc_partial_function to find address range
3953         to disassemble.
3954         * mi/mi-main.c (mi_cmd_list_features): Report
3955         "data-disassemble-a-option" feature.
3956         * NEWS: Mention new -data-disassemble option -a.
3957
3958 2018-08-13  Tom Tromey  <tom@tromey.com>
3959
3960         * common/common-defs.h (_FORTIFY_SOURCE): Define.
3961
3962 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
3963
3964         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
3965         (aarch64_linux_collect_sve_regset): Likewise.
3966         (aarch64_linux_iterate_over_regset_sections): Check for SVE.
3967         * regcache.h (regcache_map_entry_size): New function.
3968
3969 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
3970
3971         * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
3972         (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
3973         (SVE_HEADER_VL_LENGTH): Likewise.
3974         (SVE_HEADER_MAX_VL_LENGTH): Likewise.
3975         (SVE_HEADER_FLAGS_LENGTH): Likewise.
3976         (SVE_HEADER_RESERVED_LENGTH): Likewise.
3977         (SVE_HEADER_SIZE_OFFSET): Likewise.
3978         (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
3979         (SVE_HEADER_VL_OFFSET): Likewise.
3980         (SVE_HEADER_MAX_VL_OFFSET): Likewise.
3981         (SVE_HEADER_FLAGS_OFFSET): Likewise.
3982         (SVE_HEADER_RESERVED_OFFSET): Likewise.
3983         (SVE_HEADER_SIZE): Likewise.
3984         (aarch64_linux_core_read_vq): Add function.
3985         (aarch64_linux_core_read_description): Check for SVE section.
3986
3987 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
3988
3989         * aarch64-fbsd-tdep.c
3990         (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
3991         collect_size.
3992         * aarch64-linux-tdep.c
3993         (aarch64_linux_iterate_over_regset_sections): Likewise.
3994         * alpha-linux-tdep.c
3995         (alpha_linux_iterate_over_regset_sections):
3996         * alpha-nbsd-tdep.c
3997         (alphanbsd_iterate_over_regset_sections): Likewise.
3998         * amd64-fbsd-tdep.c
3999         (amd64fbsd_iterate_over_regset_sections): Likewise.
4000         * amd64-linux-tdep.c
4001         (amd64_linux_iterate_over_regset_sections): Likewise.
4002         * arm-bsd-tdep.c
4003         (armbsd_iterate_over_regset_sections): Likewise.
4004         * arm-fbsd-tdep.c
4005         (arm_fbsd_iterate_over_regset_sections): Likewise.
4006         * arm-linux-tdep.c
4007         (arm_linux_iterate_over_regset_sections): Likewise.
4008         * corelow.c (get_core_registers_cb): Likewise.
4009         (core_target::fetch_registers): Likewise.
4010         * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
4011         * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
4012         * gdbarch.h (void): Regenerate.
4013         * gdbarch.sh: Add supply_size and collect_size.
4014         * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
4015         * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
4016         * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
4017         * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
4018         * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
4019         * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
4020         * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
4021         * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
4022         * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
4023         * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
4024         * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
4025         * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
4026         * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
4027         * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
4028         * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
4029         * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
4030         * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
4031         * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
4032         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
4033         * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
4034         * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
4035         * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
4036         * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
4037         * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
4038         * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
4039         * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
4040         * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
4041         * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
4042         * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
4043         * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
4044
4045 2018-08-10  Simon Marchi  <simon.marchi@ericsson.com>
4046
4047         * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
4048         with string_printf.
4049
4050 2018-08-10  Keith Seitz  <keiths@redhat.com>
4051
4052         * compile/compile-c-support.c (add_code_header, add_code_footer):
4053         Move into policy class.
4054         (c_push_user_expression, pop_user_expression_nop)
4055         (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
4056         (compile_program): New host class.
4057         (c_compile_program): New typedef.
4058         (c_compute_porgram): Use c_compile_program.
4059
4060 2018-08-10  Keith Seitz  <keiths@redhat.com>
4061
4062         * compile/compile-internal.h (compile_instance::~compile_instance):
4063         Remove calls to htab_delete.
4064         <m_type_map, m_symbol_err_map>: Switch type to htab_up.
4065         * compile.c (compile_instance::compile_instance): Initialize
4066         htab unique pointers.
4067         (compile_instance::get_cached_type, compile_instance::insert_type)
4068         (compile_instance::error_symbol_once): Update for unique_ptr.
4069
4070 2018-08-10  Keith Seitz  <keiths@redhat.com>
4071
4072         * compile/compile-c-symbols.c (struct symbol_error)
4073         (hash_symbol_error, eq_symbol_error, del_symbol_error)
4074         (compile_instance::insert_symbol_error)
4075         (compile_instance::error_symbol_once): Move to ...
4076         * compile/compile.c: ... here.
4077
4078 2018-08-10  Keith Seitz  <keiths@redhat.com>
4079
4080         * compile/compile-c-support.c (c_get_compile_context): Use `new'
4081         instead of `new_compile_instance'.
4082         * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
4083         Update description.
4084         If the symbol error map is not initialized, create it.
4085         (generate_c_for_for_one_symbol): Do not check/initialize
4086         the symbol error map.
4087         * compile/compile-c-types.c (compile_c_instance): Make a class.
4088         Update all callers.
4089         (compile_instance::compile_instance): Initialize the type cache.
4090         (get_cached_type): New function.
4091         (insert_type): Update description.
4092         (compile_c_instance::m_default_cflags): Define.
4093         (convert_type): Update description.  Use get_cached_type.
4094         (delete_instance): Moved to destructor.
4095         (new_compile_instance): Moved to constructor.
4096         * compile/compile-c.h (compile_c_instance): Make class inheriting
4097         from compile_instance.
4098         <base>: Remove field.
4099         <type_map, symbol_err_map>: Move to base class.
4100         <c_plugin>: Rename to `m_plugin' and remove pointer type.
4101         * compile/compile-internal.h (compile_instance): Make class.
4102         <type_map_t, symbol_err_map_t>: Define.
4103         <fe>: Rename to `m_gcc_fe'.
4104         <scope, block, gcc_target_options>: Add `m_' prefix.
4105         <m_type_map, m_symbol_err_map>: New fields, moved from
4106         compile_c_instance.
4107         <destroy>: Remove.
4108         (convert_type, new_compile_instance): Remove.
4109         * compile/compile.c (cleanup_compile_instance): Remove.
4110         (compile_to_object): Use unique_ptr to eliminate cleanups.
4111         (compile_instance::set_print_callback, compile_instance::version)
4112         (compile_instance::set_verbose)
4113         (compile_instance::set_driver_filename)
4114         (compile_instance::set_triplet_regexp)
4115         (compile_instance::set_arguments)
4116         (compile_instance::set_source_file)
4117         (compile_instance::compile): Define.
4118
4119 2018-08-10  Keith Seitz  <keiths@redhat.com>
4120
4121         * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
4122         * compile/compile-c-types.c: Define GCC_METHODN macros and include
4123         gcc-c-fe.def to define C plugin.
4124         (delete_instance): Delete `c_plugin'.
4125         (new_compile_instance): Initialize `c_plugin'.
4126         * compile/compile-c.h: Include gcc_c_plugin.h.
4127         (struct compile_c_instance) <c_plugin>: New member.
4128         * gcc-c-plugin.h: New file.
4129         Update all callers with API change.
4130
4131 2018-08-10  Keith Seitz  <keiths@redhat.com>
4132
4133         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
4134         (HFILES_NO_SRCDIR): ... to here.
4135         Add compile-internal.h and compile-c.h.
4136         * compile/compile-c-support.c: Include compile-c.h.
4137         * compile/compile-c-symbols.c: Include compile-c.h.
4138         (generate_c_for_variable_locations): Update comment.
4139         * compile/compile-c-types.c: Include compile-c.h.
4140         * compile/compile-c.h: New file -- moved C language declarations
4141         from other files here.
4142         * compile/compile-internal.h: Do not include hashtab.h or
4143         common/enum-flags.h.
4144         (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
4145         (gcc_convert_symbol, gcc_symbol_address)
4146         (generate_c_for_variable_locations, c_get_mode_for_size)
4147         (c_get_range_decl_name): Definitions moved to compile-c.h.
4148         * compile/compile-loc2c.c: Include compile-c.h.
4149
4150 2018-08-10  Keith Seitz  <keiths@redhat.com>
4151
4152         * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
4153         (c_symbol_substitution_name): ... this.
4154         Update all callers.
4155
4156 2018-08-10  Keith Seitz  <keiths@redhat.com>
4157
4158         * compile/compile-c-support.c (c_compute_program): Use
4159         unique_xmalloc_ptr to eliminate cleanup.
4160         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
4161         Return a unique_xmalloc_ptr and eliminate cleanup.
4162         * compile/compile-internal.h (generate_c_for_variable_locations):
4163         Return unique_xmalloc_ptr and update description.
4164
4165 2018-08-10  Alan Hayward  <alan.hayward@arm.com>
4166
4167         * corelow.c (core_target::get_core_register_section): Rename
4168         min_size to section_min_size.
4169
4170 2018-08-09  Jim Wilson  <jimw@sifive.com>
4171
4172         * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
4173         (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
4174         * NEWS: Mention new GNU/Linux RISC-V target.
4175         * configure.host: Add riscv*-*-linux*.
4176         * configure.nat: Add riscv*.
4177         * configure.tgt: Add riscv*-*-linux*.
4178         * riscv-linux-nat.c: New file.
4179         * riscv-linux-tdep.c: New file.
4180
4181 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
4182
4183         * infrun.c (resume): Make static, add forward declaration.
4184         (proceed): Update header comment.
4185         * infrun.h (resume): Delete declaration.
4186
4187 2018-08-09  Tom Tromey  <tom@tromey.com>
4188
4189         * riscv-tdep.h: Minor formatting fixes.
4190
4191 2018-08-09  Simon Marchi  <simon.marchi@ericsson.com>
4192
4193         * common/scoped_mmap.c (mmap_file): Silence ARI warning.
4194         * dwarf-index-cache.c (create_dir_and_check): Likewise.
4195         (test_mkdir_recursive): Likewise.
4196         * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
4197
4198 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
4199
4200         * valarith.c (value_subscripted_rvalue): If an array is not in
4201         memory, and we don't know the upper bound, then we can't know that
4202         the requested element exists or not.
4203
4204 2018-08-08  Simon Marchi  <simon.marchi@ericsson.com>
4205
4206         * target.c (str_comma_list_concat_elem): Fix typo in comment.
4207         (target_options_to_string): Add comment.
4208
4209 2018-08-08  Tom Tromey  <tom@tromey.com>
4210
4211         * unittests/scoped_mmap-selftests.c: Check result of "write".
4212
4213 2018-08-08  Jim Wilson  <jimw@sifive.com>
4214
4215         * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
4216         (decode_register_index_short): New.
4217         (decode_j_type_insn, decode_cj_type_insn): New.
4218         (decode_b_type_insn, decode_cb_type_insn): New.
4219         (riscv_insn::decode): Add support for jumps, branches, lr, and sc.  New
4220         local xlen.  Check xlen when decoding ambiguous compressed insns.  In
4221         compressed decode, use is_c_lui_insn instead of is_lui_insn, and
4222         is_c_sw_insn instead of is_sw_insn.
4223         (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
4224         (riscv_software_single_step): New.
4225         * riscv-tdep.h (riscv_software_single_step): Declare.
4226
4227         * riscv-tdep.c (riscv_isa_xlen): Drop static.
4228         * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
4229
4230 2018-08-08  Andrew Burgess  <andrew.burgess@embecosm.com>
4231
4232         PR gdb/18050:
4233         * target.c (dispose_inferior): Don't dispose of inferiors that are
4234         already killed.
4235
4236 2018-08-08  Szabolcs Nagy  <szabolcs.nagy@arm.com>
4237
4238         * remote.c (remote_target::download_tracepoint): Change char* to
4239         const char*.
4240
4241 2018-08-07  Simon Marchi  <simon.marchi@polymtl.ca>
4242
4243         * target.h (target_options_to_string): Return an std::string.
4244         * target.c (str_comma_list_concat_elem): Return void, use
4245         std::string.
4246         (do_option): Likewise.
4247         (target_options_to_string): Return an std::string.
4248         * linux-nat.c (linux_nat_target::wait): Adjust.
4249         * target-debug.h (target_debug_print_options): Adjust.
4250
4251 2018-08-07  Tom Tromey  <tom@tromey.com>
4252
4253         * Makefile.in (CPPFLAGS): New variable.
4254         (INTERNAL_CPPFLAGS): Use it.
4255
4256 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4257
4258         * NEWS: Mention the index cache.
4259
4260 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4261
4262         * common/pathstuff.h (get_standard_cache_dir): New.
4263         * common/pathstuff.c (get_standard_cache_dir): New.
4264         * build-id.h (build_id_to_string): New.
4265         * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
4266         DEBUG_STR_SUFFIX): Move to here.
4267         * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
4268         DEBUG_STR_SUFFIX): Move from there.
4269         (write_psymtabs_to_index): Make non-static, add basename
4270         parameter.  Write to temporary files, rename when done.
4271         (save_gdb_index_command): Adjust call to
4272         write_psymtabs_to_index.
4273         * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
4274         field.
4275         * dwarf2read.c (dwz_file) <index_cache_res>: New field.
4276         (get_gdb_index_contents_from_cache): New.
4277         (get_gdb_index_contents_from_cache_dwz): New.
4278         (dwarf2_initialize_objfile): Read index from cache.
4279         (dwarf2_build_psymtabs): Save to index.
4280         * dwarf-index-cache.h: New file.
4281         * dwarf-index-cache.c: New file.
4282         * dwarf-index-write.h: New file.
4283
4284 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4285
4286         * gnulib/aclocal.m4: Re-generate.
4287         * gnulib/config.in: Re-generate.
4288         * gnulib/configure: Re-generate.
4289         * gnulib/import/Makefile.am: Re-generate.
4290         * gnulib/import/Makefile.in: Re-generate.
4291         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
4292         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
4293         * gnulib/import/m4/mkdir.m4: New file.
4294         * gnulib/import/mkdir.c: New file.
4295         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
4296         module.
4297
4298 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4299
4300         * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
4301         * common/scoped_mmap.c: New file.
4302         * common/scoped_mmap.h (destroy): New method.
4303         (~scoped_mmap, reset): Use destroy.
4304         (scoped_mmap): New move constructor.
4305         (mmap_file): New declaration.
4306         * unittests/scoped_mmap-selftests.c (test_normal,
4307         test_invalid_filename, run_tests): New functions.
4308         (_initialize_scoped_mmap_selftests): Register selftest.
4309
4310 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4311
4312         * dwarf2read.c (read_gdb_index_from_section): Rename to...
4313         (read_gdb_index_from_buffer): ... this.  Remove section
4314         parameter, add buffer parameter.
4315         (get_gdb_index_contents_ftype,
4316         get_gdb_index_contents_dwz_ftype): New typedefs.
4317         (dwarf2_read_gdb_index): Add callback parameters to get the
4318         index contents.
4319         (get_gdb_index_contents_from_section): New.
4320         (dwarf2_initialize_objfile): Update call to
4321         dwarf2_read_gdb_index.
4322
4323 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4324
4325         * common/filestuff.h (gdb_fopen_cloexec): New overload.
4326         (gdb_open_cloexec): Likewise.
4327         * nat/linux-osdata.c (command_from_pid): Use string_printf.
4328         (commandline_from_pid): Likewise.
4329         (linux_xfer_osdata_threads): Likewise.
4330         (linux_xfer_osdata_fds): Likewise.
4331         * ada-lang.c (is_package_name): Likewise.
4332         * auxv.c (procfs_xfer_auxv): Likewise.
4333         * breakpoint.c (print_one_breakpoint_location): Use
4334         uiout::field_fmt.
4335         (print_one_catch_solib): Use string_printf.
4336         * coff-pe-read.c (add_pe_exported_sym): Likewise.
4337         (add_pe_forwarded_sym): Likewise.
4338         * dwarf2read.c (create_type_unit_group): Likewise.
4339         (build_error_marker_type): Likewise.
4340         * infcall.c (get_function_name): Likewise.
4341         * valprint.c (print_converted_chars_to_obstack): Likewise.
4342         * xtensa-tdep.c (xtensa_register_type): Likewise.
4343
4344 2018-08-06  Simon Marchi  <simon.marchi@ericsson.com>
4345
4346         * remote.c (remote_target::download_tracepoint): Fix format
4347         string errors.
4348
4349 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
4350
4351         * tracefile.c: Include common/byte-vector.h.
4352         (trace_save): Change type of buf to gdb::byte_vector.  Initialize
4353         with trace_regblock_size if needed.  Update uses of buf.
4354
4355 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
4356
4357         * tracepoint.h (collection_list) <m_regs_mask>: Change type to
4358         std::vector<unsigned char>.
4359         * tracepoint.c (collection_list::collection_list): Remove
4360         m_regs_mask initializer from initializer list.  Resize
4361         m_regs_mask using the largest remote register number.
4362         (collection_list::add_remote_register): Remove size check on
4363         m_regs_mask.  Use at to access element.
4364         (collection_list::stringify): Change type of temp_buf to
4365         gdb::char_vector.  Update uses of temp_buf.  Resize if needed to
4366         stringify the register mask.  Use pack_hex_byte for the register
4367         mask.
4368
4369 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
4370
4371         * tracepoint.h (class collection_list) <add_register>: Remove.
4372         <add_remote_register, add_ax_registers, add_local_register>:
4373         Declare.
4374         <add_memrange>: Add scope parameter.
4375         * tracepoint.c (encode_actions_1): Likewise.
4376         (collection_list::add_register): Rename to ...
4377         (collection_list::add_remote_register): ... this.  Update
4378         comment.
4379         (collection_list::add_ax_registers, add_local_register): New
4380         methods.
4381         (collection_list::add_memrange): Add scope parameter.  Call
4382         add_local_register instead of add_register.
4383         (finalize_tracepoint_aexpr): New function.
4384         (collection_list::collect_symbol): Update calls to add_memrange.
4385         Call add_local_register instead of add_register.  Call
4386         add_ax_registers.  Call finalize_tracepoint_aexpr.
4387         (encode_actions_1): Get remote regnos for $reg action.  Call
4388         add_remote_register, add_ax_registers, and add_local_register.
4389         Update call to add_memrange.  Call finalize_tracepoint_aexpr.
4390         (validate_actionline): Call finalize_tracepoint_aexpr.
4391
4392 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
4393
4394         * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
4395         Replace array buf with gdb::char_vector buf, of size
4396         get_remote_packet_size ().  Replace references to buf and
4397         BUF_SIZE to buf.data () and buf.size ().  Replace strcpy, strcat
4398         and xsnprintf with snprintf.  Raise errors if the buffer is too
4399         small.
4400
4401 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
4402
4403         * remote.c (remote_target::download_tracepoint): Fix the has_more
4404         predicate in the QTDP action list iteration.
4405
4406 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
4407
4408         * remote.c (remote_target::download_tracepoint): Fix indentation
4409         in for block.
4410
4411 2018-08-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4412
4413         * proc-api.c (_initialize_proc_api): Remove c, unused.
4414         * procfs.c (procfs_init_inferior): Remove signals, unused.
4415         (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
4416         unused.
4417
4418 2018-08-06  Sergey Korolev  <s.korolev@ndmsystems.com>
4419             Andrew Burgess  <andrew.burgess@embecosm.com>
4420
4421         * linux-nat.c (linux_nat_target::follow_fork): Avoid using
4422         'W_STOPCODE (0)' as this could be ambiguous.
4423
4424 2018-08-03  Sergio Durigan Junior  <sergiodj@redhat.com>
4425
4426         * ser-tcp.c (net_open): Fix thinko when deciding whether to
4427         disable TCP's Nagle algorithm (use "ai_protocol" instead of
4428         "ai_socktype").
4429
4430 2018-08-02  Tom Tromey  <tom@tromey.com>
4431
4432         PR symtab/16842.
4433         * dwarf2read.c (read_func_scope): Set symtab on template parameter
4434         symbols.
4435         (process_structure_scope): Likewise.
4436
4437 2018-08-02  Xavier Roirand  <roirand@adacore.com>
4438
4439         PR gdb/22629:
4440         * darwin-nat.c (darwin_kill_inferior): Fix handling of
4441         kill inferior.
4442
4443 2018-08-02  Tom Tromey  <tom@tromey.com>
4444
4445         * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
4446         (darwin_suspend_inferior, darwin_resume_inferior)
4447         (darwin_decode_notify_message, darwin_resume_inferior_threads)
4448         (darwin_check_new_threads): Check result of get_darwin_inferior.
4449
4450 2018-07-31  Joel Brobecker  <brobecker@adacore.com>
4451
4452         GDB 8.1.1 released.
4453
4454 2018-07-31  Jan Vrany  <jan.vrany@fit.cvut.cz>
4455
4456         * varobj.c (varobj_get_path_expr_parent): Report an error if
4457         parent is a dynamic varobj.
4458
4459 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
4460
4461         * gnulib/aclocal.m4: Re-generate.
4462         * gnulib/config.in: Re-generate.
4463         * gnulib/configure: Re-generate.
4464         * gnulib/import/Makefile.in: Re-generate.
4465         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
4466         * gnulib/import/m4/onceonly.m4: Re-generate.
4467
4468 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
4469
4470         * target-descriptions.c (struct xml_test_tdesc): New.
4471         (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
4472         (record_xml_tdesc): Update.
4473         (maintenance_check_xml_descriptions): Update.
4474         * target-descriptions.h (record_xml_tdesc): Update comment.
4475
4476 2018-07-30  Andrew Burgess  <andrew.burgess@embecosm.com>
4477
4478         * eval.c (evaluate_subexp_for_sizeof): Check for array type before
4479         checking array bounds are defined.
4480
4481 2018-07-30  Tom Tromey  <tom@tromey.com>
4482
4483         * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
4484         irreflexivity violation.
4485
4486 2018-07-30  Tom Tromey  <tom@tromey.com>
4487
4488         * cli/cli-decode.c (lookup_cmd): Remove lint code.
4489         * value.c (unpack_long): Remove lint code.
4490         * valops.c (value_ind): Remove lint code.
4491         * valarith.c (value_x_binop, value_x_unop, value_equal)
4492         (value_pos): Remove lint code.
4493
4494 2018-07-28  Tom de Vries  <tdevries@suse.de>
4495
4496         * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
4497         with undefined upper bound as <optimized out>.
4498
4499 2018-07-27  Sergio Durigan Junior  <sergiodj@redhat.com>
4500
4501         * gcore.in: Rename variable "name" to "prefix".  Expand
4502         "usage" text.
4503
4504 2018-07-14  Jon Turney  <jon.turney@dronecode.org.uk>
4505
4506         * windows-nat.c (windows_nat_target::create_inferior): Update to
4507         call close() in global namespace.
4508
4509 2018-07-26  Tom Tromey  <tom@tromey.com>
4510
4511         * dwarf-index-write.c (add_address_entry): Don't add objfile
4512         offsets.
4513         * dbxread.c (find_stab_function): Rename from
4514         find_stab_function_addr.  Return a bound_minimal_symbol.
4515         (read_dbx_symtab): Use raw_text_low, raw_text_high.
4516         Don't add objfile offsets.
4517         (end_psymtab): Use raw_text_low, raw_text_high,
4518         MSYMBOL_VALUE_RAW_ADDRESS.
4519         (read_ofile_symtab): Update.
4520         (process_one_symbol): Update.
4521         * dwarf2read.c (create_addrmap_from_index): Don't add objfile
4522         offsets.
4523         (dw2_relocate): Remove.
4524         (dw2_find_pc_sect_symtab): Bias PC by the text offset before
4525         searching addrmap.
4526         (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
4527         Update.
4528         (process_psymtab_comp_unit_reader, add_partial_symbol)
4529         (add_partial_subprogram, dwarf2_ranges_read): Update.
4530         (load_partial_dies): Update.
4531         (add_address_entry): Don't add objfile offsets.
4532         (dwarf2_build_include_psymtabs): Update.
4533         (create_addrmap_from_aranges): Don't add objfile offsets.
4534         (dw2_find_pc_sect_compunit_symtab): Update.
4535         * mdebugread.c (parse_symbol): Don't add objfile offsets.
4536         (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
4537         Update.
4538         (parse_partial_symbols): Don't add objfile offsets.  Use
4539         raw_text_low, raw_text_high.  Update.
4540         (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
4541         * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
4542         or call 'relocate' quick function.  Clear psymbol_map.
4543         * psympriv.h (struct partial_symbol) <address>: Add section
4544         offset.
4545         <set_unrelocated_address>: Rename from set_address.
4546         <raw_text_low, raw_text_high>: New methods.
4547         <text_low, text_high>: Add objfile parameter.
4548         (add_psymbol_to_bcache): Add 'section' parameter.  Call
4549         set_unrelocated_address.
4550         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
4551         (find_pc_psymbol): Update.
4552         (fixup_psymbol_section, relocate_psymtabs): Remove.
4553         (dump_psymtab, psym_functions): Update.
4554         (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
4555         parameter.
4556         (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
4557         (start_psymtab_common): Update.
4558         * symfile-debug.c (debug_qf_relocate): Remove.
4559         (debug_sym_quick_functions): Update.
4560         * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
4561         * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
4562         Update.
4563
4564 2018-07-26  Tom Tromey  <tromey@redhat.com>
4565
4566         * dbxread.c (end_psymtab): Use text_high_valid and
4567         text_low_valid.
4568         * mdebugread.c (parse_partial_symbols): Use text_low_valid.
4569         (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
4570         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
4571         Update comment.
4572         <text_low_valid, text_high_valid>: New fields.
4573         <set_text_low, set_text_high>: Update.
4574         * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
4575
4576 2018-07-26  Tom Tromey  <tom@tromey.com>
4577
4578         * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
4579         Update.
4580         * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
4581         textlow and texthigh fields.
4582         (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
4583         Update.
4584         * mdebugread.c (parse_lines, parse_partial_symbols)
4585         (psymtab_to_symtab_1): Update.
4586         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
4587         Rename fields.  Update comment.  Now private.
4588         <text_low, text_high, set_text_low, set_text_high>: New methods.
4589         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
4590         (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
4591         (start_psymtab_common, maintenance_info_psymtabs)
4592         (maintenance_check_psymtabs): Update.
4593         * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
4594         texthigh fields.
4595         (scan_xcoff_symtab): Update.
4596
4597 2018-07-26  Tom Tromey  <tromey@redhat.com>
4598
4599         * psympriv.h (struct partial_symbol) <unrelocated_address,
4600         address, set_address>: New methods.
4601         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
4602         (fixup_psymbol_section, relocate_psymtabs): Update.
4603         (print_partial_symbols): Add 'objfile' parameter.  Update.
4604         (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
4605         Update.
4606
4607 2018-07-26  Tom Tromey  <tom@tromey.com>
4608
4609         * dwarf-index-write.c (write_psymbols, debug_names::insert)
4610         (debug_names::write_psymbols): Update.
4611         * psympriv.h (struct partial_symbol): Derive from
4612         general_symbol_info.
4613         <obj_section>: New method.
4614         (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
4615         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
4616         (find_pc_sect_psymbol, fixup_psymbol_section)
4617         (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
4618         (print_partial_symbols, recursively_search_psymtabs)
4619         (compare_psymbols, psymbol_hash, psymbol_compare)
4620         (add_psymbol_to_bcache, maintenance_check_psymtabs)
4621         (psymbol_name_matches, psym_fill_psymbol_map): Update.
4622
4623 2018-07-26  Tom Tromey  <tromey@redhat.com>
4624
4625         * dbxread.c (end_psymtab): Remove dead code.
4626
4627 2018-07-26  Andrew Burgess  <andrew.burgess@embecosm.com>
4628
4629         * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
4630         DWARF unwinders are disabled.
4631         * dwarf2-frame.c: Add dwarf2read.h include.
4632         (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
4633         disabled.
4634         (dwarf2_frame_unwinders_enabled_p): Define.
4635         (show_dwarf_unwinders_enabled_p): New function.
4636         (_initialize_dwarf2_frame): Register switch to control DWARF
4637         unwinder use.
4638         * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
4639         * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
4640         (show_dwarf_cmdlist): Remove static keyword.
4641         * dwarf2read.h (set_dwarf_cmdlist): Declare.
4642         (show_dwarf_cmdlist): Declare.
4643         * NEWS: Document new feature.
4644
4645 2018-07-26  Tom de Vries  <tdevries@suse.de>
4646
4647         PR breakpoints/23366
4648         * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
4649
4650 2018-07-26  Tom de Vries  <tdevries@suse.de>
4651
4652         * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
4653         DW_AT_count can't be translated to a dynamic prop.
4654
4655 2018-07-25  Tom de Vries  <tdevries@suse.de>
4656
4657         * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
4658         try/catch.
4659
4660 2018-07-25  Jan Vrany  <jan.vrany@fit.cvut.cz>
4661
4662         * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
4663
4664 2018-07-25  Joel Brobecker  <brobecker@adacore.com>
4665
4666         * MAINTAINERS (Global Maintainers): Add Tom Tromey.
4667
4668 2018-07-24  Keith Seitz  <keiths@redhat.comt
4669
4670         PR symtab/23010
4671         * dwarf2read.c (dw2_add_symbol_to_list): New function.
4672         (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
4673         instead of add_symbol_to_list.
4674         (read_file_scope): Call prepare_one_comp_unit before reading
4675         any other DIEs.
4676
4677 2018-07-24  Simon Marchi  <simon.marchi@ericsson.com>
4678
4679         * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
4680
4681 2018-07-24  Tom Tromey  <tom@tromey.com>
4682
4683         * utils.c (malloc, realloc, free): Don't declare.
4684         * configure, config.in: Rebuild.
4685         * configure.ac: Don't check for declarations of free, malloc, or
4686         realloc.
4687
4688 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
4689
4690         * aarch64-linux-nat.c
4691         (aarch64_linux_nat_target::stopped_data_address): Remove unused
4692         variable.
4693         * arm-linux-nat.c (fetch_regs): Likewise.
4694         (store_regs): Likewise.
4695         (fetch_vfp_regs): Likewise.
4696         (store_vfp_regs): Likewise.
4697         (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
4698         (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
4699         (arm_linux_nat_target::insert_watchpoint): Likewise.
4700         (arm_linux_nat_target::remove_watchpoint): Likewise.
4701         * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
4702         Likewise.
4703         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
4704         Likewise.
4705         * ppc-linux-nat.c (fetch_register): Likewise.
4706         (fetch_all_gp_regs): Likewise.
4707         (fetch_ppc_registers): Likewise.
4708         (store_all_gp_regs): Likewise.
4709         (store_ppc_registers): Likewise.
4710         (hwdebug_insert_point): Likewise.
4711         (can_use_watchpoint_cond_accel): Likewise.
4712         * remote-sim.c (gdb_os_write_stdout): Likewise.
4713
4714 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
4715             Tom Tromey  <tom@tromey.com>
4716
4717         * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
4718         test for it.
4719         * configure: Rebuild.
4720
4721 2018-07-22  Tom Tromey  <tom@tromey.com>
4722
4723         * regformats/regdat.sh: Define xmltarget_${name} inside
4724         #ifndef IN_PROCESS_AGENT.
4725
4726 2018-07-22  Tom Tromey  <tom@tromey.com>
4727
4728         * value.c (value_fetch_lazy_bitfield): Remove unused variable.
4729
4730 2018-07-22  Tom Tromey  <tom@tromey.com>
4731
4732         * symfile.c (reread_symbols): Notify iter, not objfile.
4733
4734 2018-07-22  Tom Tromey  <tom@tromey.com>
4735
4736         * ravenscar-thread.c (ravenscar_thread_target::store_registers):
4737         Use arch_ops.
4738         (ravenscar_thread_target::prepare_to_store): Likewise.
4739
4740 2018-07-22  Tom Tromey  <tom@tromey.com>
4741
4742         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
4743         unused variable.  Call value_fetch_lazy when needed.
4744         * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
4745         Remove unused variable.  Call value_fetch_lazy when needed.
4746
4747 2018-07-22  Tom Tromey  <tom@tromey.com>
4748
4749         * m32c-tdep.c (mark_dma): Return void.
4750         (make_regs): Remove unused declarations.
4751
4752 2018-07-22  Tom Tromey  <tom@tromey.com>
4753
4754         * guile/scm-cmd.c (gdbscm_dont_repeat): Call
4755         cmdscm_get_valid_command_smob_arg_unsafe for effect.
4756         * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
4757         bkscm_get_valid_block_smob_arg_unsafe for effect.
4758
4759 2018-07-22  Tom Tromey  <tom@tromey.com>
4760
4761         * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
4762         value_type.
4763
4764 2018-07-22  Tom Tromey  <tom@tromey.com>
4765
4766         * windows-nat.c (saved_context): Conditionally define.
4767         * remote.c (remote_target::remote_btrace_maybe_reopen):
4768         Conditionally declare "warned".
4769         * inflow.c (sigquit_ours): Conditionally define.
4770         (new_tty): Move "tty" declaration inside #if.
4771         * guile/guile.c (guile_datadir): Conditionally define.
4772         * charset.c (set_be_le_names): Move some declarations inside #if.
4773         * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
4774         #if.
4775         (parse_xml_btrace_conf): Likewise.
4776
4777 2018-07-22  Tom Tromey  <tom@tromey.com>
4778
4779         * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
4780
4781 2018-07-22  Tom Tromey  <tom@tromey.com>
4782
4783         * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
4784         * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
4785         (vlscm_convert_typed_value_from_scheme): Remove unused variable.
4786         * buildsym-legacy.c (get_macro_table): Remove unused variable.
4787         * stack.c (frame_apply_level_command): Remove unused variable.
4788         * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
4789         * sparc64-tdep.c (adi_examine_command): Remove unused variable.
4790         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
4791         unused variable.
4792         * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
4793         * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
4794         * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
4795         variable.
4796         * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
4797         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
4798         variable.
4799         * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
4800         Remove unused variable.
4801         * cli/cli-script.c (recurse_read_control_structure): Remove unused
4802         variable.
4803         * common/tdesc.c (print_xml_feature::visit): Remove unused
4804         variable.
4805         * compile/compile-object-load.c (store_regs): Remove unused
4806         variables.
4807         * complaints.c (clear_complaints): Remove unused variable.
4808         * corelow.c (core_target_open): Remove unused variable.
4809         * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
4810         variable.
4811         * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
4812         variable.
4813         * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
4814         variable.
4815         * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
4816         variable.
4817         * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
4818         variable.
4819         * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
4820         variable.
4821         * ia64-tdep.c (examine_prologue): Remove unused variable.
4822         * infcall.c (run_inferior_call): Remove unused variable.
4823         * inferior.c (exit_inferior): Remove unused variable.
4824         * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
4825         * linespec.c (decode_line_2): Remove unused variable.
4826         * linux-nat.c (super_close): Remove.
4827         * linux-tdep.c (linux_info_proc): Remove unused variable.
4828         * mi/mi-main.c (mi_execute_command): Remove unused variable.
4829         * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
4830         Remove unused variable.
4831         * parse.c (find_minsym_type_and_address): Remove unused variable.
4832         * printcmd.c (info_symbol_command, printf_floating): Remove unused
4833         variable.
4834         * python/py-breakpoint.c (bppy_set_commands): Remove unused
4835         variable.
4836         * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
4837         variables.
4838         * record-btrace.c (record_btrace_target::store_registers): Remove
4839         unused variable.
4840         (cmd_show_record_btrace_cpu): Remove unused variable.
4841         * riscv-tdep.c (riscv_register_reggroup_p)
4842         (riscv_push_dummy_call, riscv_return_value): Remove unused
4843         variable.
4844         * rust-exp.y (literal): Remove unused variable.
4845         * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
4846         unused variable.
4847         <STRUCTOP_ANONYMOUS>: Likewise.
4848         * s390-linux-tdep.c (s390_linux_init_abi_31)
4849         (s390_linux_init_abi_64): Remove unused variable.
4850         * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
4851         (file_select_thread, net_windows_open, _initialize_ser_windows):
4852         Remove unused variables.
4853         * symtab.c (find_pc_sect_line): Remove unused variable.
4854         * target-memory.c (compute_garbled_blocks): Remove unused
4855         variable.
4856         (target_write_memory_blocks): Remove unused variable.
4857         * target.c (target_stack::unpush): Remove unused variables.
4858         * tracepoint.c (start_tracing, all_tracepoint_actions)
4859         (merge_uploaded_trace_state_variables)
4860         (print_one_static_tracepoint_marker): Remove unused variable.
4861         * unittests/basic_string_view/element_access/char/1.cc (test01):
4862         Remove unused variable.
4863         * windows-nat.c (windows_continue, windows_add_all_dlls)
4864         (do_initial_windows_stuff, windows_nat_target::create_inferior):
4865         Remove unused variables.
4866
4867 2018-07-21  Simon Marchi  <simon.marchi@polymtl.ca>
4868
4869         * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
4870         attr_profile in HAVE_ELF.
4871         * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
4872         HAVE_ELF.
4873
4874 2018-07-20  Simon Marchi  <simon.marchi@polymtl.ca>
4875
4876         * frame.c (frame_register_unwind): Change parameter name.
4877         (frame_unwind_register): Likewise.
4878         (frame_unwind_register_value): Likewise.
4879         (frame_unwind_register_signed): Likewise.
4880         (frame_unwind_register_unsigned): Likewise.
4881         * frame.h (frame_register_unwind): Likewise.
4882         (frame_unwind_register): Likewise.
4883         (frame_unwind_register_value): Likewise.
4884         (frame_unwind_register_signed): Likewise.
4885         (frame_unwind_register_unsigned): Likewise.
4886         (frame_unwind_arch): Likewise.
4887
4888 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
4889
4890         * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
4891         ISA maintenance.
4892
4893 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
4894
4895         * mips-linux-nat.c (mips_linux_nat_target::read_description):
4896         Call `get_ptrace_pid' rather than extracting the ptrace PID by
4897         hand.
4898
4899 2018-07-20  Keith Seitz  <keiths@redhat.com>
4900
4901         * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
4902         m_main_subfile, m_comp_dir, m_producer, m_debugformat,
4903         m_compunit_symtab, m_language>: Add "m_" prefix.
4904         Update all uses.
4905         * buildsym.c: Update all uses.
4906
4907 2018-07-20  Tom Tromey  <tom@tromey.com>
4908
4909         * buildsym-legacy.h (record_line): Don't use record_line_ftype.
4910         * buildsym.h (record_line_ftype): Remove typedef.
4911
4912 2018-07-20  Tom Tromey  <tom@tromey.com>
4913
4914         * buildsym-legacy.h (augment_type_symtab): Don't declare.
4915         (end_expandable_symtab): Likewise.
4916         (end_symtab_get_static_block): Likewise.
4917         (end_symtab_from_static_block): Likewise.
4918         * buildsym-legacy.c (augment_type_symtab): Remove.
4919         (end_expandable_symtab): Remove.
4920         (end_symtab_get_static_block): Remove.
4921         (end_symtab_from_static_block): Remove.
4922
4923 2018-07-20  Tom Tromey  <tom@tromey.com>
4924
4925         * dwarf2read.c: Include buildsym.h.
4926         (struct dwarf2_cu) <builder>: New method.
4927         (fixup_go_packaging): Update.
4928         (process_full_comp_unit, process_full_type_unit): Update.  Don't
4929         use scoped_free_pendings.
4930         (using_directives): Add "cu" parameter, remove "language".
4931         (read_import_statement, setup_type_unit_groups, )
4932         (read_func_scope, read_lexical_block_scope)
4933         (dwarf2_record_block_ranges, read_namespace): Update.
4934         (lnp_state_machine::lnp_state_machine): Add cu parameter.
4935         (lnp_state_machine::handle_end_sequence): Update.
4936         (class lnp_state_machine) <m_cu>: New member.
4937         <m_record_line_callback>: Remove.
4938         <m_currently_recording_lines>: New member.
4939         (lnp_state_machine::handle_set_file): Update.
4940         (noop_record_line): Remove.
4941         (dwarf_record_line_p): Add cu parameter.
4942         (dwarf_record_line_1, dwarf_finish_line): Likewise.
4943         (lnp_state_machine::record_line)
4944         (lnp_state_machine::lnp_state_machine)
4945         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
4946         (dwarf_decode_lines): Update.
4947         (dwarf2_start_subfile): Add cu parameter.
4948         (dwarf2_start_symtab, new_symbol): Update.
4949         (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
4950         Remove dwarf2_per_objfile parameter.
4951         (dwarf_decode_macros): Update.
4952
4953 2018-07-20  Tom Tromey  <tom@tromey.com>
4954
4955         * stabsread.c (define_symbol): Update.
4956         * buildsym-legacy.h (get_buildsym_compunit): Declare.
4957         * dwarf2read.c (new_symbol): Update.
4958         * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
4959         * cp-namespace.c: Include buildsym.h.
4960         (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
4961         * buildsym-legacy.c (get_buildsym_compunit): New function.
4962
4963 2018-07-20  Tom Tromey  <tom@tromey.com>
4964
4965         * xcoffread.c: Include buildsym-legacy.h.
4966         * windows-nat.c: Include buildsym-legacy.h.
4967         * stabsread.c: Include buildsym-legacy.h.
4968         * mdebugread.c: Include buildsym-legacy.h.
4969         * buildsym-legacy.h: New file.
4970         * buildsym-legacy.c: New file, from buildsym.c.
4971         * go32-nat.c: Include buildsym-legacy.h.
4972         * dwarf2read.c: Include buildsym-legacy.h.
4973         * dbxread.c: Include buildsym-legacy.h.
4974         * cp-namespace.c: Include buildsym-legacy.h.
4975         * coffread.c: Include buildsym-legacy.h.
4976         * buildsym.h: Move some contents to buildsym-legacy.h.
4977         * buildsym.c: Include buildsym-legacy.h.  Move many functions to
4978         buildsym-legacy.c.
4979         * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
4980
4981 2018-07-20  Tom Tromey  <tom@tromey.com>
4982
4983         * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
4984         * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
4985         (buildsym_compunit::buildsym_compunit)
4986         (buildsym_compunit::~buildsym_compunit)
4987         (buildsym_compunit::get_macro_table): Define.
4988
4989 2018-07-20  Tom Tromey  <tom@tromey.com>
4990
4991         * buildsym.c (reset_symtab_globals): Remove.
4992         (buildsym_compunit::end_symtab_from_static_block): Update.
4993         (buildsym_compunit::augment_type_symtab): Update.
4994         (end_symtab_from_static_block): Call free_buildsym_compunit.
4995         (augment_type_symtab, end_symtab, end_expandable_symtab):
4996         Likewise.
4997
4998 2018-07-20  Tom Tromey  <tom@tromey.com>
4999
5000         * arch-utils.c: Do not include buildsym.h.
5001         * mipsread.c: Do not include buildsym.h.
5002         * machoread.c: Do not include buildsym.h.
5003         * elfread.c: Do not include buildsym.h.
5004
5005 2018-07-20  Tom Tromey  <tom@tromey.com>
5006
5007         * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
5008         initialization.
5009         (buildsym_compunit): Add new constructor.
5010         (struct buildsym_compunit) <get_last_source_file, finish_block,
5011         record_block_range, start_subfile, patch_subfile_names,
5012         push_subfile, pop_subfile, record_line, get_compunit_symtab,
5013         set_last_source_start_addr, get_last_source_start_addr,
5014         get_local_using_directives, set_local_using_directives,
5015         get_global_using_directives, outermost_context_p,
5016         get_current_context_stack, get_context_stack_depth,
5017         get_current_subfile, get_local_symbols, get_file_symbols,
5018         get_global_symbols, record_debugformat, record_producer,
5019         push_context, pop_context, end_symtab_get_static_block,
5020         end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
5021         New public methods.
5022         <record_pending_block, finish_block_internal, make_blockvector,
5023         watch_main_source_file_lossage, end_symtab_with_blockvector>: New
5024         private methods.
5025         Update all users.
5026
5027 2018-05-22  Tom Tromey  <tom@tromey.com>
5028
5029         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
5030         parameter.
5031         (finish_block_internal): Update.
5032
5033 2018-07-20  Tom Tromey  <tom@tromey.com>
5034
5035         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
5036         parameter.
5037         (finish_block_internal): Update.
5038
5039 2018-07-20  Tom Tromey  <tom@tromey.com>
5040
5041         * buildsym.h (EXTERN): Don't define or undef.
5042         * buildsym.c (EXTERN): Don't define.
5043
5044 2018-07-20  Tom Tromey  <tom@tromey.com>
5045
5046         * buildsym.c: Remove TODO comment.
5047
5048 2018-07-20  Tom Tromey  <tom@tromey.com>
5049
5050         * coffread.c (coff_symtab_read): Update.
5051         * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
5052         (xcoff_new_init): Update.
5053         * mipsread.c (mipscoff_new_init): Update.
5054         * mdebugread.c (mdebug_build_psymtabs): Update.
5055         * elfread.c (elf_new_init): Update.
5056         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
5057         Update.
5058         * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
5059         (coffstab_build_psymtabs, elfstab_build_psymtabs)
5060         (stabsect_build_psymtabs): Update.
5061         * buildsym.h (buildsym_init): Don't declare.
5062         * buildsym.c: Update comment.
5063         (prepare_for_building): Remove.
5064         (start_symtab, restart_symtab): Update.
5065         (reset_symtab_globals): Update comment.
5066         (buildsym_init): Remove.
5067
5068 2018-07-20  Tom Tromey  <tom@tromey.com>
5069
5070         * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
5071         * stabsread.c (patch_block_stabs, define_symbol, read_type)
5072         (read_enum_type, common_block_start, common_block_end)
5073         (cleanup_undefined_types_1, finish_global_stabs): Update.
5074         * mdebugread.c (psymtab_to_symtab_1): Update.
5075         * dwarf2read.c (fixup_go_packaging, read_func_scope)
5076         (read_lexical_block_scope, new_symbol): Update.
5077         * dbxread.c (process_one_symbol): Update.
5078         * coffread.c (coff_symtab_read, process_coff_symbol)
5079         (coff_read_enum_type): Update.
5080         * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
5081         declare.
5082         (get_local_symbols, get_file_symbols, get_global_symbols): New
5083         functions.
5084         * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
5085         m_global_symbols.
5086         <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
5087         (~scoped_free_pendings): Update.
5088         (finish_block, prepare_for_building, reset_symtab_globals)
5089         (end_symtab_get_static_block, end_symtab_with_blockvector)
5090         (augment_type_symtab, push_context): Update.
5091         (get_local_symbols, get_file_symbols, get_global_symbols): New
5092         functions.
5093         (buildsym_init): Update.
5094
5095 2018-07-20  Tom Tromey  <tom@tromey.com>
5096
5097         * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
5098         (process_full_type_unit): Likewise.
5099         (dwarf2_start_symtab): Set list_in_scope.
5100
5101 2018-07-20  Tom Tromey  <tom@tromey.com>
5102
5103         * dwarf2read.c (process_psymtab_comp_unit_reader)
5104         (build_type_psymtabs_reader): Do not set list_in_scope.
5105
5106 2018-07-20  Tom Tromey  <tom@tromey.com>
5107
5108         * buildsym.c (free_pendings): Remove.
5109         (add_symbol_to_list, scoped_free_pendings)
5110         (finish_block_internal, buildsym_init): Update.
5111
5112 2018-07-20  Tom Tromey  <tom@tromey.com>
5113
5114         * xcoffread.c (read_xcoff_symtab): Update.
5115         * dwarf2read.c (read_func_scope, read_lexical_block_scope):
5116         Update.
5117         * dbxread.c (process_one_symbol): Update.
5118         * coffread.c (coff_symtab_read): Update.
5119         * buildsym.h (finish_block): Update.
5120         * buildsym.c (finish_block): Remove "listhead" argument.
5121         (end_symtab_get_static_block): Update.
5122
5123 2018-07-20  Tom Tromey  <tom@tromey.com>
5124
5125         * buildsym.h (class scoped_free_pendings): Remove constructor.
5126         * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
5127         method.
5128         <m_pending_block_obstack, m_pending_blocks>: New members.
5129         (pending_block_obstack, pending_blocks): Remove.
5130         (scoped_free_pendings::scoped_free_pendings): Default.
5131         (~scoped_free_pendings): Update.
5132         (free_pending_blocks): Remove.
5133         (finish_block_internal, record_pending_block, make_blockvector)
5134         (end_symtab_get_static_block, augment_type_symtab, push_context)
5135         (buildsym_init): Update.
5136
5137 2018-07-20  Tom Tromey  <tom@tromey.com>
5138
5139         * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
5140         m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
5141         members.
5142         (pending_addrmap, pending_addrmap_obstack)
5143         (pending_addrmap_interesting): Remove.
5144         (scoped_free_pendings, record_block_range, make_blockvector)
5145         (prepare_for_building, reset_symtab_globals, buildsym_init):
5146         Update.
5147
5148 2018-07-20  Tom Tromey  <tom@tromey.com>
5149
5150         * xcoffread.c (process_linenos): Update.
5151         * stabsread.c (define_symbol, read_type, read_enum_type): Update.
5152         * mdebugread.c (psymtab_to_symtab_1): Update.
5153         * dwarf2read.c (setup_type_unit_groups)
5154         (lnp_state_machine::handle_set_file, dwarf_record_line_p)
5155         (lnp_state_machine::record_line, dwarf_decode_lines): Update.
5156         * dbxread.c (process_one_symbol): Update.
5157         * coffread.c (coff_symtab_read, enter_linenos)
5158         (process_coff_symbol): Update.
5159         * buildsym.h (current_subfile): Don't declare.
5160         (get_current_subfile): Declare.
5161         * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
5162         member.
5163         (start_subfile, free_buildsym_compunit, push_subfile)
5164         (prepare_for_building, start_symtab): Update.
5165         (get_current_subfile): New function.
5166
5167 2018-07-20  Tom Tromey  <tom@tromey.com>
5168
5169         * coffread.c (coff_symtab_read): Update.
5170         * xcoffread.c (read_xcoff_symtab): Update.
5171         * dwarf2read.c (new_symbol): Update.
5172         (read_func_scope, read_lexical_block_scope): Update.
5173         * dbxread.c (process_one_symbol): Update.
5174         * buildsym.h (context_stack, context_stack_depth): Don't declare.
5175         (outermost_context_p): Remove macro.
5176         (outermost_context_p, get_current_context_stack)
5177         (get_context_stack_depth): Declare.
5178         (pop_context): Return struct context_stack.
5179         * buildsym.c (struct buildsym_compunit) <m_context_stack: New
5180         member.
5181         (context_stack_size): Remove.
5182         (INITIAL_CONTEXT_STACK_SIZE): Remove.
5183         (prepare_for_building, end_symtab_get_static_block)
5184         (augment_type_symtab, push_context): Update.
5185         (pop_context): Return struct context_stack.
5186         (outermost_context_p, get_current_context_stack)
5187         (get_context_stack_depth): New functions.
5188         (buildsym_init): Update.
5189
5190 2018-07-20  Tom Tromey  <tom@tromey.com>
5191
5192         * rust-exp.y: Now a pure parser.  Update all rules.
5193         (%union): Move earlier.
5194         (current_parser, work_obstack): Remove globals.
5195         (rust_parser, ~rust_parser): Update.
5196         (class rust_parser) <copy_name, concat3, crate_name, super_name,
5197         lex_character, lex_number, lex_string, lex_identifier,
5198         rust_lookup_type, convert_params_to_types, convert_ast_to_type,
5199         convert_name, convert_params_to_expression,
5200         convert_ast_to_expression, ast_basic_type, ast_operation,
5201         ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
5202         ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
5203         ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
5204         ast_array_type, ast_slice_type, ast_reference_type,
5205         ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
5206         (rust_parse): Update.
5207         (rustyyerror, rustyylex): Add parser parameter.
5208         (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
5209         (rust_lex_stringish_test, rust_lex_test_sequence)
5210         (rust_lex_test_trailing_dot, rust_lex_test_completion)
5211         (rust_lex_test_push_back, rust_lex_tests): Update.
5212
5213 2018-07-19  Pedro Alves  <palves@redhat.com>
5214
5215         * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
5216         gdb::unique_xmalloc_ptr.
5217         * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
5218         Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
5219         * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
5220         copy-initialization.
5221         * guile/scm-pretty-print.c (ppscm_print_children): Use
5222         gdb::unique_xmalloc_ptr instead of cleanups.
5223         (gdbscm_apply_val_pretty_printer): Remove cleanups.
5224         * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
5225         gdb::unique_xmalloc_ptr.
5226         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
5227         Adjust to use gdb::unique_xmalloc_ptr.
5228         * guile/scm-utils.c (extract_arg): Adjust.
5229         * guile/scm-value.c (gdbscm_value_field): Adjust to use
5230         gdb::unique_xmalloc_ptr instead of a cleanup.
5231
5232 2018-07-19  Tom Tromey  <tom@tromey.com>
5233
5234         * utils.c (do_value_free_to_mark)
5235         (make_cleanup_value_free_to_mark): Remove.
5236         * utils.h (make_cleanup_value_free_to_mark): Remove.
5237
5238 2018-07-19  Pedro Alves  <palves@redhat.com>
5239
5240         * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
5241         forwarding reference.
5242
5243 2018-07-18  Pedro Alves  <palves@redhat.com>
5244
5245         * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
5246         gdbscm_wrap.  Use gdb::unique_xmalloc_ptr<char> instead of a
5247         cleanup.
5248
5249 2018-07-18  Pedro Alves  <palves@redhat.com>
5250
5251         * guile/guile-internal.h: Add comment about mixing GDB and Scheme
5252         exceptions.
5253         (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
5254         (gdbscm_wrap): New.
5255         * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
5256         directly instead of a cleanup.
5257         * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
5258         (vlscm_unop): ... this.  Reimplement using gdbscm_wrap.
5259         (vlscm_binop_gdbthrow): New, factored out from ...
5260         (vlscm_binop): ... this.  Reimplement using gdbscm_wrap.
5261         (vlscm_rich_compare): Use gdbscm_wrap.
5262         * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
5263         instead of a cleanup.
5264         (gdbscm_lookup_global_symbol): Use xfree directly instead of a
5265         cleanup.
5266         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
5267         Use xfree directly instead of a cleanup.
5268         * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
5269         Adjust to use gdbscm_wrap and scoped_value_mark.
5270         (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
5271         (gdbscm_value_address, gdbscm_value_dereference)
5272         (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
5273         scoped_value_mark.
5274         (gdbscm_value_dynamic_type): Use scoped_value_mark.
5275         (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
5276         scoped_value_mark.
5277         (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
5278         gdbscm_wrap and scoped_value_mark.
5279         (gdbscm_value_to_string): Use xfree directly instead of a
5280         cleanup.  Move 'buffer' unique_ptr to TRY scope.
5281         (gdbscm_value_to_lazy_string): Use xfree directly instead of a
5282         cleanup.  Move 'buffer' unique_ptr to TRY scope.  Use
5283         scoped_value_mark.
5284         (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
5285         (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
5286         scoped_value_mark.
5287         (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
5288         gdbscm_wrap.
5289
5290 2018-07-18  Tom de Vries  <tdevries@suse.de>
5291
5292         * findvar.c (default_read_var_value): Also resolve dynamic type for
5293         LOC_OPTIMIZED_OUT vars.
5294
5295 2018-07-18  Maciej W. Rozycki  <macro@mips.com>
5296
5297         * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
5298         decoding.
5299
5300 2018-07-17  Tom Tromey  <tom@tromey.com>
5301
5302         * guile/scm-param.c (pascm_set_func, pascm_show_func)
5303         (compute_enum_list, pascm_set_param_value_x)
5304         (gdbscm_parameter_value): Update.
5305         * guile/guile-internal.h (gdbscm_scm_to_string): Update.
5306         (gdbscm_scm_to_host_string): Update.
5307         * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
5308         Update.
5309         * guile/scm-cmd.c (cmdscm_add_completion): Update.
5310         * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
5311         * guile/scm-string.c (gdbscm_scm_to_string): Return
5312         unique_xmalloc_ptr.
5313         (gdbscm_scm_to_host_string): Likewise.
5314
5315 2018-07-17  Tom Tromey  <tom@tromey.com>
5316
5317         * guile/guile.c (gdbscm_eval_from_control_command): Update.
5318         * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
5319         * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
5320         * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
5321         unique_xmalloc_ptr.
5322
5323 2018-07-17  Tom Tromey  <tom@tromey.com>
5324
5325         * guile/scm-param.c (pascm_signal_setshow_error): Update.
5326         * guile/guile-internal.h (gdbscm_exception_message_to_string):
5327         Update.
5328         * guile/scm-cmd.c (cmdscm_function): Update.
5329         * guile/scm-pretty-print.c
5330         (ppscm_print_exception_unless_memory_error): Update.
5331         * guile/scm-exception.c (gdbscm_exception_message_to_string):
5332         Return unique_xmalloc_ptr.
5333
5334 2018-07-17  Tom Tromey  <tom@tromey.com>
5335
5336         * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
5337         Use string_printf.
5338
5339 2018-07-17  Jim Wilson  <jimw@sifive.com>
5340
5341         * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
5342         set_gdbarch_decr_pc_after_break.  Call riscv_read_misa_reg always.
5343         (riscv_gdbarch_init): Delete local has_compressed_isa.  Delete now
5344         unecessary braces after EF_RISCV_RVC test.  Delete call to
5345         set_gdbarch_decr_pc_after_break.
5346
5347         * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
5348         RISCV_LAST_FP_REGNUM + 1.
5349         (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
5350
5351 2018-07-17  Tom Tromey  <tom@tromey.com>
5352
5353         * configure.ac: Remove --disable-gdbcli.
5354         * configure: Rebuild.
5355         * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
5356         (SUBDIR_CLI_CFLAGS): Remove.
5357         (SFILES): Use SUBDIR_CLI_SRCS.
5358         (COMMON_OBS): Use SUBDIR_CLI_OBS.
5359
5360 2018-07-17  Tom Tromey  <tom@tromey.com>
5361
5362         PR gdb/18624:
5363         * coffread.c (coff_symtab_read): Use scoped_free_pendings.
5364
5365 2018-07-16  Jim Wilson  <jimw@sifive.com>
5366
5367         * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
5368
5369 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
5370
5371         * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
5372         variable.
5373         (libunwind_frame_sniffer): Likewise.
5374         (libunwind_frame_prev_register): Likewise.
5375         (libunwind_sigtramp_frame_sniffer): Likewise.
5376         * ia64-tdep.c (ia64_access_reg): Likewise.
5377         (ia64_access_rse_reg): Likewise.
5378         (ia64_libunwind_sigtramp_frame_this_id): Likewise.
5379         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
5380
5381 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
5382
5383         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
5384
5385 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
5386
5387         * remote-sim.c (gdbsim_target::close,
5388         gdbsim_target::mourn_inferior): Remove unused variables.
5389
5390 2018-07-16  Simon Marchi  <simon.marchi@polymtl.ca>
5391
5392         * ia64-tdep.c (ktab_buf): New global.
5393         (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
5394         (get_kernel_table): Adjust.
5395
5396 2018-07-16  Tom Tromey  <tom@tromey.com>
5397
5398         * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
5399         * dwarf2read.c (using_directives, new_symbol): Use
5400         outermost_context_p.
5401         * dbxread.c (process_one_symbol): Use outermost_context_p.
5402         * coffread.c (coff_symtab_read): Use outermost_context_p.
5403
5404 2018-07-16  Tom Tromey  <tom@tromey.com>
5405
5406         * dwarf2read.c (using_directives, read_func_scope)
5407         (read_lexical_block_scope): Update.
5408         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
5409         * buildsym.h (local_using_directives, global_using_directives):
5410         Don't declare.
5411         (get_local_using_directives, set_local_using_directives)
5412         (get_global_using_directives): Declare.
5413         * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
5414         m_global_using_directives>: New members.
5415         (finish_block_internal, prepare_for_building)
5416         (reset_symtab_globals, end_symtab_get_static_block)
5417         (push_context): Update.
5418         (get_local_using_directives, set_local_using_directives)
5419         (get_global_using_directives): New functions.
5420         (buildsym_init): Update.
5421
5422 2018-07-16  Tom Tromey  <tom@tromey.com>
5423
5424         * xcoffread.c (xcoff_initial_scan): Don't call
5425         free_pending_blocks.
5426         * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
5427         * buildsym.h (class scoped_free_pendings): Add constructor.
5428         (free_pending_blocks): Don't declare.
5429         * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
5430         (free_pending_blocks): Now static.
5431
5432 2018-07-16  Tom Tromey  <tom@tromey.com>
5433
5434         * buildsym.h (push_subfile, pop_subfile): Update declarations.
5435         * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
5436         member.
5437         (struct subfile_stack): Remove.
5438         (subfile_stack): Remove.
5439         (push_subfile, pop_subfile, buildsym_init): Update.
5440
5441 2018-07-16  Tom Tromey  <tom@tromey.com>
5442
5443         * buildsym.c (push_subfile): Use gdb_assert.
5444         (pop_subfile): Use gdb_assert.
5445
5446 2018-07-16  Tom Tromey  <tom@tromey.com>
5447
5448         * buildsym.h (merge_symbol_lists): Remove.
5449         * buildsym.c (merge_symbol_lists): Remove.
5450
5451 2018-07-16  Tom Tromey  <tom@tromey.com>
5452
5453         * stabsread.c (scan_file_globals): Update comment.
5454         * stabsread.h (scan_file_globals): Move from buildsym.h.
5455         * buildsym.h (scan_file_globals): Move to stabsread.h.
5456
5457 2018-07-16  Tom Tromey  <tom@tromey.com>
5458
5459         * xcoffread.c (xcoff_new_init): Update.
5460         * mipsread.c (mipscoff_new_init): Update.
5461         * mdebugread.c (mdebug_build_psymtabs): Update.
5462         * elfread.c (elf_new_init): Update.
5463         * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
5464         (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
5465         * buildsym.h (buildsym_new_init): Don't declare.
5466         * buildsym.c (buildsym_new_init): Remove.
5467
5468 2018-07-16  Tom Tromey  <tom@tromey.com>
5469
5470         * stabsread.h (within_function): Move from buildsym.h.
5471         * stabsread.c (start_stabs): Clear within_function.
5472         * coffread.c (coff_start_symtab): Clear within_function.
5473         * buildsym.h (within_function): Move to stabsread.h.
5474         * buildsym.c (prepare_for_building): Update.
5475
5476 2018-07-16  Tom Tromey  <tom@tromey.com>
5477
5478         * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
5479         * dwarf2read.c (dwarf2_start_symtab): Don't set
5480         processing_gcc_compilation.
5481         * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
5482
5483 2018-07-16  Tom Tromey  <tom@tromey.com>
5484
5485         * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
5486         (next_symbol_text_func): Move from buildsym.h.
5487         * stabsread.c (hashname): Move from buildsym.c.
5488         * buildsym.h (HASHSIZE, symnum, next_symbol_text)
5489         (next_symbol_text_func, hashname): Move to stabsread.h.
5490         * buildsym.c: Don't include bcache.h
5491         (hashname): Move to stasbread.c.
5492
5493 2018-07-16  Tom Tromey  <tom@tromey.com>
5494
5495         * buildsym.h (context_stack_size): Don't declare.
5496         * buildsym.c (context_stack_size): New global.
5497
5498 2018-07-16  Tom Tromey  <tom@tromey.com>
5499
5500         * dbxread.c (processing_acc_compilation): New global.
5501         * buildsym.h (processing_acc_compilation): Don't declare.
5502
5503 2018-07-16  Tom Tromey  <tom@tromey.com>
5504
5505         * xcoffread.c (aix_process_linenos, complete_symtab): Update.
5506         * dbxread.c (read_ofile_symtab): Update.
5507         * coffread.c (coff_start_symtab, coff_end_symtab): Update.
5508         * buildsym.h (last_source_start_addr): Remove.
5509         (set_last_source_start_addr, get_last_source_start_addr):
5510         Declare.
5511         * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
5512         parameter.
5513         (struct buildsym_compunit) <m_last_source_start_addr>: New
5514         member.
5515         (prepare_for_building): Remove start_addr parameter.
5516         (start_symtab, restart_symtab, end_symtab_get_static_block)
5517         (end_symtab_with_blockvector): Update.
5518         (set_last_source_start_addr, get_last_source_start_addr): New
5519         functions.
5520
5521 2018-07-16  Tom Tromey  <tom@tromey.com>
5522
5523         * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
5524         member.
5525         (have_line_numbers): Remove.
5526         (record_line, prepare_for_building, end_symtab_get_static_block)
5527         (augment_type_symtab): Update.
5528
5529 2018-07-16  Tom Tromey  <tom@tromey.com>
5530
5531         * buildsym.c (~buildsym_compunit): Free the macro table.
5532         (struct buildsym_compunit) <get_macro_table, release_macros>: New
5533         methods.
5534         <m_pending_macros>: New member.
5535         (pending_macros): Remove.
5536         (~scoped_free_pendings, get_macro_table, prepare_for_building)
5537         (reset_symtab_globals, end_symtab_get_static_block)
5538         (end_symtab_with_blockvector, augment_type_symtab)
5539         (buildsym_init): Update.
5540
5541 2018-07-16  Tom Tromey  <tom@tromey.com>
5542
5543         * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
5544         parameter.
5545         (buildsym_compunit::set_last_source_file): New method.
5546         <m_last_source_file>: New member.
5547         (prepare_for_building): Remove "name" parameter.
5548         (start_symtab, restart_symtab, reset_symtab_globals): Update.
5549         (last_source_file): Remove.
5550         (set_last_source_file, get_last_source_file): Update.
5551
5552 2018-07-16  Tom Tromey  <tom@tromey.com>
5553
5554         * buildsym.c (prepare_for_building): Add assert.
5555
5556 2018-07-16  Tom Tromey  <tom@tromey.com>
5557
5558         * buildsym.c (~buildsym_compunit): Update.
5559         (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
5560         (start_subfile, patch_subfile_names)
5561         (end_symtab_with_blockvector): Update.
5562
5563 2018-07-16  Tom Tromey  <tom@tromey.com>
5564
5565         * buildsym.c (struct buildsym_compunit): Add constructor,
5566         destructor, initializers.
5567         (start_buildsym_compunit): Remove.
5568         (free_buildsym_compunit): Use "delete".
5569         (start_symtab, restart_symtab): Use "new".
5570
5571 2018-07-13  Simon Marchi  <simon.marchi@polymtl.ca>
5572
5573         * symfile.c (set_objfile_default_section_offset): Remove struct
5574         keyword.
5575
5576 2018-07-14  Stafford Horne  <shorne@gmail.com>
5577
5578         * (Responsible Maintainers): Add myself as or1k maintainer.
5579
5580 2018-07-13  Tom Tromey  <tom@tromey.com>
5581
5582         * symfile.c (set_objfile_default_section_offset): Use extra braces
5583         around initializer.
5584
5585 2018-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5586
5587         * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
5588         non-branching basr.
5589
5590 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5591
5592         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5593         unittests/cli-utils-selftests.c
5594         * unittests/cli-utils-selftests.c: New file.
5595
5596 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5597
5598         * NEWS: Mention new commands. Mention change to 'thread apply'.
5599
5600 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5601
5602         * thread.c (thr_try_catch_cmd): New function.
5603         (thread_apply_all_command): Handle qcs flags.
5604         (thread_apply_command): Handle qcs flags.
5605         (taas_command): New function.
5606         (tfaas_command): New function.
5607         (_initialize_thread): Update to setup the new commands 'taas
5608         and 'tfaas'. Change doc string for 'thread apply'.
5609
5610 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5611
5612         * stack.c: (trailing_outermost_frame): New function, mostly
5613         extracted from backtrace_command_1.
5614         (leading_innermost_frame): New function.
5615         (backtrace_command_1): Update to call trailing_outermost_frame.
5616         (frame_apply_command_count): New function.
5617         (frame_apply_level_command): New function.
5618         (frame_apply_all_command): New function.
5619         (frame_apply_command): New function.
5620         (faas_command): New function.
5621         (frame_cmd_list): New variable.
5622         (_initialize_stack): Update to setup the new commands 'frame apply'
5623         and 'faas'.
5624
5625 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5626
5627         * cli-utils.c (number_or_range_parser::get_number): Only handle
5628         numbers or convenience var as numbers.
5629         (parse_flags): New function.
5630         (parse_flags_qcs): New function.
5631         (number_or_range_parser::finished): Ensure parsing end is detected
5632         before end of string.
5633         * cli-utils.h (parse_flags): New function.
5634         (parse_flags_qcs): New function.
5635         (number_or_range_parser): Remove m_finished bool.
5636         (number_or_range_parser::skip_range): Set m_in_range to false.
5637
5638 2018-07-12  Sergio Durigan Junior  <sergiodj@redhat.com>
5639
5640         * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
5641         on Windows.
5642
5643 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
5644             Jan Kratochvil  <jan.kratochvil@redhat.com>
5645             Paul Fertser  <fercerpav@gmail.com>
5646             Tsutomu Seki  <sekiriki@gmail.com>
5647             Pedro Alves  <palves@redhat.com>
5648
5649         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5650         'unittests/parse-connection-spec-selftests.c'.
5651         (COMMON_SFILES): Add 'common/netstuff.c'.
5652         (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
5653         * NEWS (Changes since GDB 8.2): Mention IPv6 support.
5654         * common/netstuff.c: New file.
5655         * common/netstuff.h: New file.
5656         * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
5657         (wait_for_connect): Update comment.  New parameter
5658         'gdb::optional<int> sock' instead of 'struct serial *scb'.
5659         Use 'sock' directly instead of 'scb->fd'.
5660         (try_connect): New function, with code from 'net_open'.
5661         (net_open): Rewrite main loop to deal with multiple
5662         sockets/addresses.  Handle IPv6-style hostnames; implement
5663         support for IPv6 connections.
5664         * unittests/parse-connection-spec-selftests.c: New file.
5665
5666 2018-07-11  Pedro Alves  <palves@redhat.com>
5667
5668         PR gdb/23377
5669         * remote.c (remote_target::remote_detach_pid): Call
5670         set_current_process.
5671
5672 2018-07-11  Pedro Alves  <palves@redhat.com>
5673
5674         * h8300-tdep.c (h8300_gdbarch_init): Remove
5675         set_gdbarch_ecoff_reg_to_regnum calls.
5676
5677 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
5678
5679         PR c++/23373
5680         * c-typeprint.c (c_type_print_base_struct_union): Don't print
5681         offsets/sizes for static members of a class/struct.
5682
5683 2018-07-11  Alan Hayward  <alan.hayward@arm.com>
5684
5685         * target-descriptions.c (tdesc_register_bitsize): Rename.
5686         * target-descriptions.h (tdesc_register_bitsize): Likewise.
5687         * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
5688         * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
5689
5690 2018-07-10  Tom Tromey  <tom@tromey.com>
5691
5692         * breakpoint.c (moribund_locations): Now static and a
5693         std::vector.
5694         (breakpoint_init_inferior, moribund_breakpoint_here_p)
5695         (build_bpstat_chain, update_global_location_list)
5696         (breakpoint_retire_moribund): Update.
5697         * breakpoint.h (bp_location_p): Remove typedef.  Don't declare
5698         VEC.
5699
5700 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
5701
5702         * riscv-tdep.c (riscv_is_fp_regno_p): New function.
5703         (riscv_register_reggroup_p): Use new function, remove unneeded
5704         parenthesis.
5705         (riscv_push_dummy_call): Extend assert to compare against xlen or
5706         flen based on register type.
5707
5708 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
5709
5710         * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
5711
5712 2018-07-09  Andrew Burgess  <andrew.burgess@embecosm.com>
5713
5714         * remote.c (show_hardware_watchpoint_limit): New function.
5715         (show_hardware_watchpoint_length_limit): New function.
5716         (show_hardware_breakpoint_limit): New function.
5717         (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
5718         where appropriate, update help text.
5719
5720 2018-07-09  Tom Tromey  <tom@tromey.com>
5721
5722         * Makefile.in (CDEPS): Don't mention XM_CDEPS.
5723         (CLIBS): Don't mention NAT_CLIBS.
5724
5725 2018-07-09  Tom Tromey  <tom@tromey.com>
5726
5727         * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
5728         (LIBGDB_OBS, clean mostlyclean): Update.
5729         (gdb$(EXEEXT), insight$(EXEEXT)): Update.
5730
5731 2018-07-09  Tom Tromey  <tom@tromey.com>
5732
5733         * Makefile.in (%.c: %.y): Use ECHO_YACC.
5734         (%.c: %.l): Use ECHO_LEX.  Just fail if flex not available.
5735         * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
5736
5737 2018-07-09  Tom Tromey  <tom@tromey.com>
5738
5739         * Makefile.in (ALLDEPFILES): Remove exec.c.
5740         (COMMON_OBS): Remove exec.o.
5741         (COMMON_SFILES): Add exec.c.
5742
5743 2018-07-09  Tom Tromey  <tom@tromey.com>
5744
5745         * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
5746
5747 2018-07-09  Tom Tromey  <tom@tromey.com>
5748
5749         * Makefile.in (clean mostlyclean): Remove stamp-version.
5750         (version.c): Depend on stamp-version.
5751         (stamp-version): New rule, from version.c rule.
5752
5753 2018-07-09  Tom Tromey  <tom@tromey.com>
5754
5755         * Makefile.in (init.c): Depend on stamp-init.
5756         (stamp-init): New rule, from init.c rule.
5757         (clean mostlyclean): Remove stamp-init.
5758
5759 2018-07-09  Tom Tromey  <tom@tromey.com>
5760
5761         * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
5762         SUBDIR_GCC_COMPILE_SRCS.
5763
5764 2018-07-09  Tom Tromey  <tom@tromey.com>
5765
5766         * Makefile.in (init.c): Remove some unused sed rules.
5767
5768 2018-07-09  Tom Tromey  <tom@tromey.com>
5769
5770         * Makefile.in (TSOBS): Remove.
5771         (INIT_FILES): Update.
5772         (LIBGDB_OBS): Update.
5773         (COMMON_SFILES): Add inflow.c.
5774         (SFILES): Remove inflow.c.
5775
5776 2018-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
5777
5778         * contrib/gdb-add-index.sh ($dwarf5): New, use it.
5779
5780 2018-07-07  Simon Marchi  <simon.marchi@polymtl.ca>
5781
5782         * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
5783         get_saveloc_name, is_signal_frame_name, step_name,
5784         init_remote_name, create_addr_space_name,
5785         destroy_addr_space_name, search_unwind_table_name,
5786         find_dyn_list_name): Constify.
5787
5788 2018-07-05  Simon Marchi  <simon.marchi@polymtl.ca>
5789
5790         * darwin-nat.c (darwin_pthread_kill): New function.
5791         (darwin_resume_thread): Use darwin_pthread_kill.
5792
5793 2018-07-05  Tom de Vries  <tdevries@suse.de>
5794
5795         * macroexp.c (macro_buffer) <operator=>: New member function.
5796
5797 2018-07-04  Tom Tromey  <tom@tromey.com>
5798
5799         * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
5800
5801 2018-07-04  Simon Marchi  <simon.marchi@polymtl.ca>
5802
5803         * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
5804         * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
5805         * maint.c: Likewise.
5806         * top.c: Likewise.
5807
5808 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
5809
5810         * NEWS: Create a new section for the next release branch.
5811         Rename the section of the current branch, now that it has
5812         been cut.
5813
5814 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
5815
5816         GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
5817         * version.in: Bump version to 8.2.50.DATE-git.
5818
5819 2018-07-04  Vyacheslav Barinov  <v.barinov@samsung.com>
5820             Pedro Alves  <palves@redhat.com>
5821
5822         * linux-nat.c (linux_init_ptrace): Rename to ...
5823         (linux_init_ptrace_procfs): ... this.  Call
5824         linux_proc_init_warnings.
5825         (linux_nat_target::post_attach)
5826         (linux_nat_target::post_startup_inferior): Adjust.
5827         * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
5828         * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
5829
5830 2018-07-04  Tom de Vries  <tdevries@suse.de>
5831
5832         * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
5833         check ...
5834         (read_comp_unit_head): ... here.
5835
5836 2018-07-03  Tom Tromey  <tom@tromey.com>
5837
5838         * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
5839         (stop_tracing, tstatus_command)
5840         (find_matching_tracepoint_location, merge_uploaded_tracepoints)
5841         (print_one_static_tracepoint_marker): Update.
5842         * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
5843         std::vector.
5844         * breakpoint.h (breakpoint_p): Remove typedef.  Don't declare
5845         VEC.
5846         (all_tracepoints, static_tracepoints_here): Return std::vector.
5847
5848 2018-07-03  Tom Tromey  <tom@tromey.com>
5849
5850         * common/ptid.c (ptid_equal): Remove.
5851         * common/ptid.h (ptid_equal): Don't declare.
5852         * ada-tasks.c: Update.
5853         * breakpoint.c: Update.
5854         * common/agent.c: Update.
5855         * corelow.c: Update.
5856         * darwin-nat-info.c: Update.
5857         * darwin-nat.c: Update.
5858         * dcache.c: Update.
5859         * dtrace-probe.c: Update.
5860         * dummy-frame.c: Update.
5861         * fbsd-nat.c: Update.
5862         * frame.c: Update.
5863         * gdbthread.h: Update.
5864         * gnu-nat.c: Update.
5865         * go32-nat.c: Update.
5866         * inf-loop.c: Update.
5867         * inf-ptrace.c: Update.
5868         * infcall.c: Update.
5869         * infcmd.c: Update.
5870         * inflow.c: Update.
5871         * infrun.c: Update.
5872         * linux-fork.c: Update.
5873         * linux-nat.c: Update.
5874         * linux-thread-db.c: Update.
5875         * mi/mi-cmd-var.c: Update.
5876         * mi/mi-interp.c: Update.
5877         * mi/mi-main.c: Update.
5878         * nto-procfs.c: Update.
5879         * ppc-linux-tdep.c: Update.
5880         * procfs.c: Update.
5881         * python/py-inferior.c: Update.
5882         * python/py-record-btrace.c: Update.
5883         * python/py-record.c: Update.
5884         * ravenscar-thread.c: Update.
5885         * regcache.c: Update.
5886         * remote-sim.c: Update.
5887         * remote.c: Update.
5888         * sol-thread.c: Update.
5889         * solib.c: Update.
5890         * target.c: Update.
5891         * tui/tui-stack.c: Update.
5892         * varobj.c: Update.
5893         * windows-nat.c: Update.
5894         * windows-tdep.c: Update.
5895
5896 2018-07-03  Tom Tromey  <tom@tromey.com>
5897
5898         * common/ptid.c (ptid_match): Remove.
5899         * common/ptid.h (ptid_match): Don't declare.
5900         * fbsd-nat.c: Update.
5901         * infcmd.c: Update.
5902         * infrun.c: Update.
5903         * linux-nat.c: Update.
5904         * record-btrace.c: Update.
5905         * regcache.c: Update.
5906         * remote.c: Update.
5907
5908 2018-07-03  Tom Tromey  <tom@tromey.com>
5909
5910         * common/ptid.c (ptid_tid_p): Remove.
5911         * common/ptid.h (ptid_tid_p): Don't declare.
5912         * sol-thread.c: Update.
5913
5914 2018-07-03  Tom Tromey  <tom@tromey.com>
5915
5916         * common/ptid.c (ptid_lwp_p): Remove.
5917         * common/ptid.h (ptid_lwp_p): Don't declare.
5918         * fbsd-nat.c: Update.
5919         * linux-nat.c: Update.
5920         * nat/linux-procfs.c: Update.
5921         * nat/x86-linux-dregs.c: Update.
5922         * sol-thread.c: Update.
5923
5924 2018-07-03  Tom Tromey  <tom@tromey.com>
5925
5926         * common/ptid.c (ptid_is_pid): Remove.
5927         * common/ptid.h (ptid_is_pid): Don't declare.
5928         * infrun.c: Update.
5929         * linux-nat.c: Update.
5930         * mi/mi-interp.c: Update.
5931         * remote.c: Update.
5932         * thread.c: Update.
5933
5934 2018-07-03  Tom Tromey  <tom@tromey.com>
5935
5936         * common/ptid.c (ptid_get_tid): Remove.
5937         * common/ptid.h (ptid_get_tid): Don't declare.
5938         * ada-tasks.c: Update.
5939         * aix-thread.c: Update.
5940         * bsd-uthread.c: Update.
5941         * darwin-nat.c: Update.
5942         * fbsd-nat.c: Update.
5943         * i386-darwin-nat.c: Update.
5944         * infrun.c: Update.
5945         * linux-tdep.c: Update.
5946         * nto-procfs.c: Update.
5947         * ppc-ravenscar-thread.c: Update.
5948         * python/py-infthread.c: Update.
5949         * ravenscar-thread.c: Update.
5950         * sol-thread.c: Update.
5951         * sparc-ravenscar-thread.c: Update.
5952         * windows-nat.c: Update.
5953
5954 2018-07-03  Tom Tromey  <tom@tromey.com>
5955
5956         * common/ptid.c (ptid_get_lwp): Remove.
5957         * common/ptid.h (ptid_get_lwp): Don't declare.
5958         * aarch64-linux-nat.c: Update.
5959         * ada-tasks.c: Update.
5960         * aix-thread.c: Update.
5961         * amd64-linux-nat.c: Update.
5962         * arm-linux-nat.c: Update.
5963         * corelow.c: Update.
5964         * fbsd-nat.c: Update.
5965         * fbsd-tdep.c: Update.
5966         * gnu-nat.c: Update.
5967         * i386-cygwin-tdep.c: Update.
5968         * i386-gnu-nat.c: Update.
5969         * i386-linux-nat.c: Update.
5970         * ia64-linux-nat.c: Update.
5971         * inf-ptrace.c: Update.
5972         * infrun.c: Update.
5973         * linux-fork.c: Update.
5974         * linux-nat.c: Update.
5975         * linux-tdep.c: Update.
5976         * linux-thread-db.c: Update.
5977         * mips-linux-nat.c: Update.
5978         * nat/aarch64-linux-hw-point.c: Update.
5979         * nat/aarch64-linux.c: Update.
5980         * nat/linux-btrace.c: Update.
5981         * nat/linux-osdata.c: Update.
5982         * nat/linux-procfs.c: Update.
5983         * nat/x86-linux-dregs.c: Update.
5984         * obsd-nat.c: Update.
5985         * ppc-fbsd-nat.c: Update.
5986         * ppc-linux-nat.c: Update.
5987         * procfs.c: Update.
5988         * python/py-infthread.c: Update.
5989         * ravenscar-thread.c: Update.
5990         * remote.c: Update.
5991         * s390-linux-nat.c: Update.
5992         * sol-thread.c: Update.
5993         * sol2-tdep.c: Update.
5994         * spu-linux-nat.c: Update.
5995         * x86-linux-nat.c: Update.
5996         * xtensa-linux-nat.c: Update.
5997
5998 2018-07-03  Tom Tromey  <tom@tromey.com>
5999
6000         * common/ptid.c (ptid_get_pid): Remove.
6001         * common/ptid.h (ptid_get_pid): Don't declare.
6002         * aarch64-linux-nat.c: Update.
6003         * ada-lang.c: Update.
6004         * aix-thread.c: Update.
6005         * alpha-bsd-nat.c: Update.
6006         * amd64-fbsd-nat.c: Update.
6007         * amd64-linux-nat.c: Update.
6008         * arm-linux-nat.c: Update.
6009         * arm-nbsd-nat.c: Update.
6010         * auxv.c: Update.
6011         * break-catch-syscall.c: Update.
6012         * breakpoint.c: Update.
6013         * bsd-uthread.c: Update.
6014         * corelow.c: Update.
6015         * ctf.c: Update.
6016         * darwin-nat.c: Update.
6017         * fbsd-nat.c: Update.
6018         * fbsd-tdep.c: Update.
6019         * gcore.c: Update.
6020         * gnu-nat.c: Update.
6021         * hppa-nbsd-nat.c: Update.
6022         * hppa-obsd-nat.c: Update.
6023         * i386-fbsd-nat.c: Update.
6024         * ia64-linux-nat.c: Update.
6025         * inf-ptrace.c: Update.
6026         * infcmd.c: Update.
6027         * inferior.c: Update.
6028         * inferior.h: Update.
6029         * inflow.c: Update.
6030         * infrun.c: Update.
6031         * linux-fork.c: Update.
6032         * linux-nat.c: Update.
6033         * linux-tdep.c: Update.
6034         * linux-thread-db.c: Update.
6035         * m68k-bsd-nat.c: Update.
6036         * mi/mi-interp.c: Update.
6037         * mi/mi-main.c: Update.
6038         * mips-linux-nat.c: Update.
6039         * mips-nbsd-nat.c: Update.
6040         * mips64-obsd-nat.c: Update.
6041         * nat/aarch64-linux-hw-point.c: Update.
6042         * nat/aarch64-linux.c: Update.
6043         * nat/linux-btrace.c: Update.
6044         * nat/linux-osdata.c: Update.
6045         * nat/linux-procfs.c: Update.
6046         * nat/x86-linux-dregs.c: Update.
6047         * nto-procfs.c: Update.
6048         * obsd-nat.c: Update.
6049         * ppc-linux-nat.c: Update.
6050         * ppc-nbsd-nat.c: Update.
6051         * ppc-obsd-nat.c: Update.
6052         * proc-service.c: Update.
6053         * procfs.c: Update.
6054         * python/py-inferior.c: Update.
6055         * python/py-infthread.c: Update.
6056         * ravenscar-thread.c: Update.
6057         * record.c: Update.
6058         * remote-sim.c: Update.
6059         * remote.c: Update.
6060         * rs6000-nat.c: Update.
6061         * s390-linux-nat.c: Update.
6062         * sh-nbsd-nat.c: Update.
6063         * sol-thread.c: Update.
6064         * sparc-nat.c: Update.
6065         * sparc64-tdep.c: Update.
6066         * spu-linux-nat.c: Update.
6067         * spu-tdep.c: Update.
6068         * target-debug.h: Update.
6069         * target.c: Update.
6070         * thread.c: Update.
6071         * tid-parse.c: Update.
6072         * tracefile-tfile.c: Update.
6073         * vax-bsd-nat.c: Update.
6074         * windows-nat.c: Update.
6075         * x86-linux-nat.c: Update.
6076         * x86-nat.c: Update.
6077
6078 2018-07-03  Tom Tromey  <tom@tromey.com>
6079
6080         * common/ptid.c (pid_to_ptid): Remove.
6081         * common/ptid.h (pid_to_ptid): Don't declare.
6082         * aix-thread.c: Update.
6083         * arm-linux-nat.c: Update.
6084         * common/ptid.c: Update.
6085         * common/ptid.h: Update.
6086         * corelow.c: Update.
6087         * ctf.c: Update.
6088         * darwin-nat.c: Update.
6089         * fbsd-nat.c: Update.
6090         * fork-child.c: Update.
6091         * gnu-nat.c: Update.
6092         * go32-nat.c: Update.
6093         * inf-ptrace.c: Update.
6094         * infcmd.c: Update.
6095         * inferior.c: Update.
6096         * infrun.c: Update.
6097         * linux-fork.c: Update.
6098         * linux-nat.c: Update.
6099         * nat/aarch64-linux-hw-point.c: Update.
6100         * nat/fork-inferior.c: Update.
6101         * nat/x86-linux-dregs.c: Update.
6102         * nto-procfs.c: Update.
6103         * obsd-nat.c: Update.
6104         * procfs.c: Update.
6105         * progspace.c: Update.
6106         * remote.c: Update.
6107         * rs6000-nat.c: Update.
6108         * s390-linux-nat.c: Update.
6109         * sol-thread.c: Update.
6110         * spu-linux-nat.c: Update.
6111         * target.c: Update.
6112         * top.c: Update.
6113         * tracefile-tfile.c: Update.
6114         * windows-nat.c: Update.
6115
6116 2018-07-03  Tom Tromey  <tom@tromey.com>
6117
6118         * common/ptid.h (ptid_build): Don't declare.
6119         * common/ptid.c (ptid_build): Remove.
6120         * aix-thread.c: Update.
6121         * bsd-kvm.c: Update.
6122         * bsd-uthread.c: Update.
6123         * common/agent.c: Update.
6124         * common/ptid.c: Update.
6125         * common/ptid.h: Update.
6126         * corelow.c: Update.
6127         * darwin-nat.c: Update.
6128         * fbsd-nat.c: Update.
6129         * gnu-nat.c: Update.
6130         * linux-fork.c: Update.
6131         * linux-nat.c: Update.
6132         * linux-thread-db.c: Update.
6133         * nat/linux-osdata.c: Update.
6134         * nat/linux-procfs.c: Update.
6135         * nto-procfs.c: Update.
6136         * obsd-nat.c: Update.
6137         * proc-service.c: Update.
6138         * procfs.c: Update.
6139         * ravenscar-thread.c: Update.
6140         * remote-sim.c: Update.
6141         * remote.c: Update.
6142         * sol-thread.c: Update.
6143         * target.c: Update.
6144         * windows-nat.c: Update.
6145
6146 2018-07-03  Tom Tromey  <tom@tromey.com>
6147
6148         * infrun.c (follow_exec): Use exit_inferior_silent.
6149         * inferior.c (exit_inferior_num_silent): Remove.
6150         * inferior.h (exit_inferior_num_silent): Don't declare.
6151
6152 2018-07-03  Tom Tromey  <tom@tromey.com>
6153
6154         PR cli/23340:
6155         * darwin-nat.c (darwin_attach_pid): Reset inferior and
6156         inferior_ptid on error.
6157
6158 2018-07-02  Maciej W. Rozycki  <macro@mips.com>
6159             Simon Marchi  <simon.marchi@polymtl.ca>
6160
6161         PR tdep/8282
6162         * disasm.h (gdb_disassembler): Add
6163         `m_disassembler_options_holder'. member
6164         * disasm.c (get_all_disassembler_options): New function.
6165         (gdb_disassembler::gdb_disassembler): Use it.
6166         (gdb_buffered_insn_length_init_dis): Likewise.
6167         (gdb_buffered_insn_length): Adjust accordingly.
6168         (set_disassembler_options): Handle options with arguments.
6169         (show_disassembler_options_sfunc): Likewise.  Add a leading new
6170         line if showing options with descriptions.
6171         (disassembler_options_completer): Adapt to using the
6172         `disasm_options_and_args_t' structure.
6173         * mips-tdep.c (mips_disassembler_options): New variable.
6174         (mips_disassembler_options_o32): Likewise.
6175         (mips_disassembler_options_n32): Likewise.
6176         (mips_disassembler_options_n64): Likewise.
6177         (gdb_print_insn_mips): Don't set `disassembler_options'.
6178         (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
6179         functions.
6180         (mips_gdbarch_init): Always set `gdbarch_print_insn' to
6181         `gdb_print_insn_mips'.  Set `gdbarch_disassembler_options',
6182         `gdbarch_disassembler_options_implicit' and
6183         `gdbarch_valid_disassembler_options'.
6184         * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
6185         `disasm_options_and_args_t' structure.
6186         * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
6187         method.
6188         (valid_disassembler_options): Switch from `disasm_options_t' to
6189         the `disasm_options_and_args_t' structure.
6190         * NEWS: Document `set disassembler-options' support for the MIPS
6191         target.
6192         * gdbarch.h: Regenerate.
6193         * gdbarch.c: Regenerate.
6194
6195 2018-07-02  Sebastian Huber  <sebastian.huber@embedded-brains.de>
6196
6197         * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
6198
6199 2018-06-29  Joel Brobecker  <brobecker@adacore.com>
6200
6201         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
6202         parameter in call to amd64_target_description.
6203         * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
6204         * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
6205         (amd64fbsd_init_abi): Likewise.
6206         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
6207         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
6208         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
6209         * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
6210
6211 2018-06-29  Pedro Alves  <palves@redhat.com>
6212
6213         * gdb/amd64-tdep.h (amd64_create_target_description): Add
6214         "segments" parameter.
6215         * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
6216         (_initialize_amd64_tdep): Update call to
6217         amd64_create_target_description.
6218         (amd64_target_description): Add "segments" parameter.  Adjust
6219         the implementation to use it.
6220         * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
6221         call to amd64_create_target_description.
6222         * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
6223         * gdb/arch/amd64.h (amd64_create_target_description): Add
6224         "segments" register.
6225         * gdb/arch/amd64.c (amd64_create_target_description): Add
6226         "segments" parameter.  Call create_feature_i386_64bit_segments
6227         only if SEGMENTS is true.
6228         * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
6229         call to amd64_create_target_description.
6230
6231 2018-06-29  Pedro Alves  <palves@redhat.com>
6232
6233         * thread.c (thread_target_id_str): New, factored out from ...
6234         (print_thread_info_1): ... here.  Use it to compute the max
6235         "Target Id" column width.
6236
6237 2018-06-29  Pedro Alves  <palves@redhat.com>
6238
6239         * remote.c (remote_target::extra_thread_info): Delete
6240         'display_buf' and 'n' locals.  from the cache, regardless of
6241         packet mechanims is in use.  Use cache for qThreadExtra and qP
6242         methods too.
6243
6244 2018-06-29  Pedro Alves  <palves@redhat.com>
6245
6246         * blockframe.c (find_pc_sect_containing_function): New function.
6247         * breakpoint.c (print_breakpoint_location): Don't call
6248         find_pc_sect_function.
6249         * linespec.c (create_sals_line_offset): Record the location's
6250         symbol in the sal.
6251         * linespec.c (convert_address_location_to_sals): Fill in sal's
6252         symbol with find_pc_sect_containing_function.
6253         * symtab.c (find_function_start_sal): Rename to ...
6254         (find_function_start_sal_1): ... this.
6255         (find_function_start_sal): Reimplement as wrapper around
6256         find_function_start_sal_1, and use
6257         find_pc_sect_containing_function to fill in the sal's symbol.
6258         (find_function_start_sal(symbol*, bool)): Adjust.
6259         * symtab.h (find_pc_function, find_pc_sect_function): Adjust
6260         comments.
6261         (find_pc_sect_containing_function): Declare.
6262
6263 2018-06-29  Pedro Alves  <palves@redhat.com>
6264
6265         * inline-frame.c (stopped_by_user_bp_inline_frame): Return
6266         true if the the location has no symbol.
6267
6268 2018-06-28  Tom Tromey  <tom@tromey.com>
6269
6270         * NEWS: Mention --enable-codesign.
6271         * silent-rules.mk (ECHO_SIGN): New variable.
6272         * configure.ac: Add --enable-codesign.
6273         * configure: Rebuild.
6274         * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
6275         (gdb$(EXEEXT)): Optionally invoke codesign.
6276
6277 2018-06-28  Pedro Alves  <palves@redhat.com>
6278
6279         * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
6280         comments.
6281         (switch_to_thread_no_regs): Adjust comment.
6282         * infcmd.c (stop_pc): Delete.
6283         (post_create_inferior, info_program_command): Replace references
6284         to stop_pc with references to thread_info->suspend.stop_pc.
6285         * inferior.h (stop_pc): Delete declaration.
6286         * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
6287         (handle_inferior_event_1, handle_signal_stop)
6288         (process_event_stop_test, keep_going_stepped_thread)
6289         (handle_step_into_function, handle_step_into_function_backward)
6290         (print_stop_location): Replace references to stop_pc with
6291         references to thread_info->suspend.stop_pc.
6292         (struct infcall_suspend_state) <stop_pc>: Delete field.
6293         (save_infcall_suspend_state, restore_infcall_suspend_state):
6294         Remove references to inf_stat->stop_pc.
6295         * linux-fork.c (fork_load_infrun_state): Likewise.
6296         * record-btrace.c (record_btrace_set_replay): Likewise.
6297         * record-full.c (record_full_goto_entry): Likewise.
6298         * remote.c (print_one_stopped_thread): Likewise.
6299         * target.c (target_resume): Extend comment.
6300         * thread.c (set_executing_thread): New.
6301         (set_executing): Use it.
6302         (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
6303         Remove references to stop_pc.
6304
6305 2018-06-28  Pedro Alves  <palves@redhat.com>
6306
6307         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
6308         Moving fetching stop_pc until after ecs->event_thread is refreshed.
6309
6310 2018-06-28  Tom Tromey  <tom@tromey.com>
6311
6312         * coffread.c (coff_symfile_finish): Update.
6313         * xcoffread.c (xcoff_symfile_finish): Update.
6314         * elfread.c (elf_symfile_finish): Update.
6315         * symfile.h (dwarf2_free_objfile): Don't declare.
6316         * dwarf2read.c (_initialize_dwarf2_read): Use
6317         register_objfile_data_with_cleanup.
6318         (dwarf2_free_objfile): Now static.  Change signature.
6319
6320 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
6321
6322         * symfile.c (add_symbol_file_command, _initialize_symfile): Add
6323         option "-o" to add-symbol-file-load to add an offset to each
6324         section's load address.
6325         * symfile.c (set_objfile_default_section_offset): New function.
6326
6327 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
6328
6329         * symfile.c (add_symbol_file_command): Make sure that sections
6330         with the same name are sorted in the same order.
6331
6332 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
6333
6334         * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
6335         require the second argument.  If omitted, load sections at the
6336         addresses specified in the file.
6337
6338 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
6339
6340         * symfile.c (symbol_file_command, symbol_file_add_main_1)
6341         (_initialize_symfile): Add option "-o" to symbol-file to add an
6342         offset to each section of the symbol file.
6343
6344 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
6345
6346         * MAINTAINERS (Write After Approval): Add Petr Tesarik.
6347
6348 2018-06-27  Tom Tromey  <tom@tromey.com>
6349
6350         * stack.c (_initialize_stack): Update "func" help text.
6351
6352 2018-06-27  Tom Tromey  <tom@tromey.com>
6353
6354         * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
6355         std::vector.
6356         (unwind_infopy_str, pyuw_create_unwind_info)
6357         (unwind_infopy_add_saved_register, pyuw_sniffer)
6358         (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
6359         Update.
6360         (struct saved_reg): Add constructor.
6361         <value>: Now a gdbpy_ref<>.
6362
6363 2018-06-27  Tom Tromey  <tom@tromey.com>
6364
6365         * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
6366
6367 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6368
6369         * gdb-gdb.py.in: Format using autopep8.
6370
6371 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6372
6373         * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
6374         (type_lookup_function): Recognize CORE_ADDR values.
6375
6376 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6377
6378         * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
6379         print tag_name.
6380
6381 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6382
6383         * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
6384         <__lt__>: Add.
6385
6386 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6387
6388         * gdb-gdb.py: Move to...
6389         * gdb-gdb.py.in: ... here.
6390         * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
6391         * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
6392         dependencies.
6393         (distclean): Remove gdb-gdb.py when cleaning.
6394         (gdb-gdb.py, gdb-gdb.gdb): New rules.
6395         * configure: Re-generate.
6396
6397 2018-06-27  Pedro Alves  <palves@redhat.com>
6398
6399         * proc-service.c (get_ps_regcache): New.
6400         (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
6401         (ps_lsetfpregs): Use it.
6402
6403 2018-06-27  Omair Javaid  <omair.javaid@linaro.org>
6404
6405         PR gdb/21695
6406         * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
6407         (dwarf_decode_lines_1): Adjust.
6408
6409 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6410
6411         * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
6412         override.
6413         <info_proc>: Likewise.
6414
6415 2018-06-26  Joel Brobecker  <brobecker@adacore.com>
6416
6417         * windows-nat.c (do_windows_fetch_inferior_registers): Rename
6418         to windows_fetch_one_register, and only handle the case of
6419         fetching one register.  Move the code that reloads the context
6420         and iterates over all registers if R is negative to...
6421         (windows_nat_target::fetch_registers): ... here.
6422         (do_windows_store_inferior_registers): Rename to
6423         windows_store_one_register, and only handle the case of storing
6424         one register.  Move the code that handles the case where r is
6425         negative to...
6426         (windows_nat_target::store_registers) ... here.
6427
6428 2018-06-26  Tom Tromey  <tom@tromey.com>
6429
6430         PR rust/22574:
6431         * typeprint.c (whatis_exp): Allow ptype/o for Rust.
6432         * rust-lang.c (rust_print_struct_def): Add podata parameter.
6433         Update.
6434         (rust_internal_print_type): Add podata parameter.
6435         (rust_print_type): Update.
6436
6437 2018-06-26  Tom Tromey  <tom@tromey.com>
6438
6439         * typeprint.h (struct print_offset_data) <update, finish,
6440         maybe_print_hole>: New methods.
6441         <indentation>: New constant.
6442         * typeprint.c (print_offset_data::indentation): Define.
6443         (print_offset_data::maybe_print_hole, print_offset_data::update)
6444         (print_offset_data::finish): Move from c-typeprint.c and rename.
6445         * c-typeprint.c (OFFSET_SPC_LEN): Remove.
6446         (print_spaces_filtered_with_print_options): Update.
6447         (c_print_type_union_field_offset, maybe_print_hole)
6448         (c_print_type_struct_field_offset): Move to typeprint.c and
6449         rename.
6450         (c_type_print_base_struct_union): Update.
6451
6452 2018-06-25  Pedro Alves  <palves@redhat.com>
6453
6454         * gdbthread.h (thread_info_ref, delete_thread)
6455         (delete_thread_silent, first_thread_of_inferior)
6456         (any_thread_of_inferior, switch_to_thread)
6457         (enable_thread_stack_temporaries)
6458         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
6459         (get_last_thread_stack_temporary)
6460         (value_in_thread_stack_temporaries, can_access_registers_thread):
6461         Spell out "struct thread_info" instead of just "thread_info".
6462         * inferior.h (notice_new_inferior): Likewise.
6463
6464 2018-06-25  Pedro Alves  <palves@redhat.com>
6465
6466         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
6467         pass thread_info pointer to delete_thread.
6468         (windows_nat_target::detach): Pass inferior pointer to
6469         detach_inferior.
6470         * aix-thread.c (sync_threadlists): Pass thread_info pointer to
6471         delete_thread.
6472         * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
6473         * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
6474         and pass a thread_info pointer to delete_thread.
6475         * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
6476         pass thread_info pointer to delete_thread.
6477         * go32-nat.c (go32_nat_target::mourn_inferior): Remove
6478         delete_thread_silent call.
6479         * procfs.c (procfs_target::detach): Pass inferior pointer to
6480         detach_inferior.
6481         (procfs_target::wait): Pass thread_info pointer to delete_thread.
6482         * remote-sim.c (gdbsim_target::mourn_inferior): Remove
6483         delete_thread_silent call.
6484         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
6485         pass thread_info pointer to delete_thread.
6486         (windows_nat_target::detach): Pass inferior pointer to
6487         delete_inferior.
6488
6489 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
6490
6491         * regcache.c (readable_regcache::read_part): Fix asserts.
6492         (reg_buffer::raw_collect_part): New function.
6493         (regcache::write_part): Fix asserts.
6494         (reg_buffer::raw_supply_part): New function.
6495         (regcache::transfer_regset_register): New helper function.
6496         (regcache::transfer_regset): Call new functions.
6497         (regcache_supply_regset): Use gdb_byte*.
6498         (regcache::supply_regset): Likewise.
6499         (regcache_collect_regset): Likewise.
6500         (regcache::collect_regset): Likewise.
6501         * regcache.h (reg_buffer::raw_collect_part): New declaration.
6502         (reg_buffer::raw_supply_part): Likewise.
6503         (regcache::transfer_regset_register): Likewise.
6504         (regcache::transfer_regset): Use gdb_byte*.
6505
6506 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
6507
6508         * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
6509
6510 2018-06-21  Pedro Alves  <palves@redhat.com>
6511
6512         * ada-lang.h (ada_get_task_number): Take a thread_info pointer
6513         instead of a ptid_t.  All callers adjusted.
6514         * ada-tasks.c (ada_get_task_number): Likewise.  All callers
6515         adjusted.
6516         (print_ada_task_info, display_current_task_id, task_command_1):
6517         Adjust.
6518         * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
6519         inferior_thread.
6520         (breakpoint_kind): Adjust.
6521         (remove_breakpoints_pid): Rename to ...
6522         (remove_breakpoints_inf): ... this.  Adjust to take an inferior
6523         pointer.  All callers adjusted.
6524         (bpstat_clear_actions): Use inferior_thread.
6525         (get_bpstat_thread): New.
6526         (bpstat_do_actions): Use it.
6527         (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
6528         to take a thread_info pointer.  All callers adjusted.
6529         (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
6530         (breakpoint_re_set_thread): Use inferior_thread.
6531         * breakpoint.h (struct inferior): Forward declare.
6532         (bpstat_stop_status): Update.
6533         (remove_breakpoints_pid): Delete.
6534         (remove_breakpoints_inf): New.
6535         * bsd-uthread.c (bsd_uthread_target::wait)
6536         (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
6537         * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
6538         (maint_btrace_packet_history_cmd)
6539         (maint_btrace_clear_packet_history_cmd): Adjust.
6540         (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
6541         inferior_thread.
6542         * cli/cli-interp.c: Include "inferior.h".
6543         * common/refcounted-object.h (struct
6544         refcounted_object_ref_policy): New.
6545         * compile/compile-object-load.c: Include gdbthread.h.
6546         (store_regs): Use inferior_thread.
6547         * corelow.c (core_target::close): Use current_inferior.
6548         (core_target_open): Adjust to use first_thread_of_inferior and use
6549         the current inferior.
6550         * ctf.c (ctf_target::close): Adjust to use current_inferior.
6551         * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
6552         <thread>: ... this new field.  All references adjusted.
6553         (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
6554         Take a thread_info pointer instead of a ptid_t.
6555         * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
6556         (dummy_frame_discard, register_dummy_frame_dtor): Take a
6557         thread_info pointer instead of a ptid_t.
6558         * elfread.c: Include "inferior.h".
6559         (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
6560         Use inferior_thread.
6561         * eval.c (evaluate_subexp): Likewise.
6562         * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
6563         inferior_thread.
6564         * gdb_proc_service.h (struct thread_info): Forward declare.
6565         (struct ps_prochandle) <ptid>: Delete, replaced by ...
6566         <thread>: ... this new field.  All references adjusted.
6567         * gdbarch.h, gdbarch.c: Regenerate.
6568         * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
6569         'thread' parameter.  All implementations and callers adjusted.
6570         * gdbthread.h (thread_info) <set_running>: New method.
6571         (delete_thread, delete_thread_silent): Take a thread_info pointer
6572         instead of a ptid.
6573         (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
6574         (first_thread_of_process): Delete, replaced by ...
6575         (first_thread_of_inferior): ... this new function.  All callers
6576         adjusted.
6577         (any_live_thread_of_process): Delete, replaced by ...
6578         (any_live_thread_of_inferior): ... this new function.  All callers
6579         adjusted.
6580         (switch_to_thread, switch_to_no_thread): Declare.
6581         (is_executing): Delete.
6582         (enable_thread_stack_temporaries): Update comment.
6583         <enable_thread_stack_temporaries>: Take a thread_info pointer
6584         instead of a ptid_t.  Incref the thread.
6585         <~enable_thread_stack_temporaries>: Decref the thread.
6586         <m_ptid>: Delete
6587         <m_thr>: New.
6588         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
6589         (get_last_thread_stack_temporary)
6590         (value_in_thread_stack_temporaries, can_access_registers_thread):
6591         Take a thread_info pointer instead of a ptid_t.  All callers
6592         adjusted.
6593         * infcall.c (get_call_return_value): Use inferior_thread.
6594         (run_inferior_call): Work with thread pointers instead of ptid_t.
6595         (call_function_by_hand_dummy): Work with thread pointers instead
6596         of ptid_t.  Use thread_info_ref.
6597         * infcmd.c (proceed_thread_callback): Access thread's state
6598         directly.
6599         (ensure_valid_thread, ensure_not_running): Use inferior_thread,
6600         access thread's state directly.
6601         (continue_command): Use inferior_thread.
6602         (info_program_command): Use find_thread_ptid and access thread
6603         state directly.
6604         (proceed_after_attach_callback): Use thread state directly.
6605         (notice_new_inferior): Take a thread_info pointer instead of a
6606         ptid_t.  All callers adjusted.
6607         (exit_inferior): Take an inferior pointer instead of a pid.  All
6608         callers adjusted.
6609         (exit_inferior_silent): New.
6610         (detach_inferior): Delete.
6611         (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
6612         (gdb_inferior_id_to_pid, in_inferior_list): Delete.
6613         (detach_inferior_command, kill_inferior_command): Use
6614         find_inferior_id instead of valid_gdb_inferior_id and
6615         gdb_inferior_id_to_pid.
6616         (inferior_command): Use inferior and thread pointers.
6617         * inferior.h (struct thread_info): Forward declare.
6618         (notice_new_inferior): Take a thread_info pointer instead of a
6619         ptid_t.  All callers adjusted.
6620         (detach_inferior): Delete declaration.
6621         (exit_inferior, exit_inferior_silent): Take an inferior pointer
6622         instead of a pid.  All callers adjusted.
6623         (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
6624         (valid_gdb_inferior_id): Delete.
6625         * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
6626         (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
6627         (struct displaced_step_inferior_state) <pid>: Delete, replaced by
6628         ...
6629         <inf>: ... this new field.
6630         <step_ptid>: Delete, replaced by ...
6631         <step_thread>: ... this new field.
6632         (get_displaced_stepping_state): Take an inferior pointer instead
6633         of a pid.  All callers adjusted.
6634         (displaced_step_in_progress_any_inferior): Adjust.
6635         (displaced_step_in_progress_thread): Take a thread pointer instead
6636         of a ptid_t.  All callers adjusted.
6637         (displaced_step_in_progress, add_displaced_stepping_state): Take
6638         an inferior pointer instead of a pid.  All callers adjusted.
6639         (get_displaced_step_closure_by_addr): Adjust.
6640         (remove_displaced_stepping_state): Take an inferior pointer
6641         instead of a pid.  All callers adjusted.
6642         (displaced_step_prepare_throw, displaced_step_prepare)
6643         (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
6644         All callers adjusted.
6645         (start_step_over): Adjust.
6646         (infrun_thread_ptid_changed): Remove bit updating ptids in the
6647         displaced step queue.
6648         (do_target_resume): Adjust.
6649         (fetch_inferior_event): Use inferior_thread.
6650         (context_switch, get_inferior_stop_soon): Take an
6651         execution_control_state pointer instead of a ptid_t.  All callers
6652         adjusted.
6653         (switch_to_thread_cleanup): Delete.
6654         (stop_all_threads): Use scoped_restore_current_thread.
6655         * inline-frame.c: Include "gdbthread.h".
6656         (inline_state) <inline_state>: Take a thread pointer instead of a
6657         ptid_t.  All callers adjusted.
6658         <ptid>: Delete, replaced by ...
6659         <thread>: ... this new field.
6660         (find_inline_frame_state): Take a thread pointer instead of a
6661         ptid_t.  All callers adjusted.
6662         (skip_inline_frames, step_into_inline_frame)
6663         (inline_skipped_frames, inline_skipped_symbol): Take a thread
6664         pointer instead of a ptid_t.  All callers adjusted.
6665         * inline-frame.h (skip_inline_frames, step_into_inline_frame)
6666         (inline_skipped_frames, inline_skipped_symbol): Likewise.
6667         * linux-fork.c (delete_checkpoint_command): Adjust to use thread
6668         pointers directly.
6669         * linux-nat.c (get_detach_signal): Likewise.
6670         * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
6671         (thread_db_notice_clone): Adjust.
6672         (thread_db_find_new_threads_silently)
6673         (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
6674         a thread pointer instead of a ptid_t.  All callers adjusted.
6675         * mi/mi-cmd-var.c: Include "inferior.h".
6676         (mi_cmd_var_update_iter): Update to use thread pointers.
6677         * mi/mi-interp.c (mi_new_thread): Update to use the thread's
6678         inferior directly.
6679         (mi_output_running_pid, mi_inferior_count): Delete, bits factored
6680         out to ...
6681         (mi_output_running): ... this new function.
6682         (mi_on_resume_1): Adjust to use it.
6683         (mi_user_selected_context_changed): Adjust to use inferior_thread.
6684         * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
6685         directly.
6686         (interrupt_thread_callback): : Adjust to use thread and inferior
6687         pointers.
6688         * proc-service.c: Include "gdbthread.h".
6689         (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
6690         * progspace-and-thread.c: Include "inferior.h".
6691         * progspace.c: Include "inferior.h".
6692         * python/py-exitedevent.c (create_exited_event_object): Adjust to
6693         hold a reference to an inferior_object.
6694         * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
6695         inferior_thread.
6696         * python/py-inferior.c (struct inferior_object): Give the type a
6697         tag name instead of a typedef.
6698         (python_on_normal_stop): No need to check if the current thread is
6699         listed.
6700         (inferior_to_inferior_object): Change return type to
6701         inferior_object.  All callers adjusted.
6702         (find_thread_object): Delete, bits factored out to ...
6703         (thread_to_thread_object): ... this new function.
6704         * python/py-infthread.c (create_thread_object): Use
6705         inferior_to_inferior_object.
6706         (thpy_is_stopped): Use thread pointer directly.
6707         (gdbpy_selected_thread): Use inferior_thread.
6708         * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
6709         field, replaced with ...
6710         <thread>: ... this new field.  All users adjusted.
6711         (btpy_insn_or_gap_new): Drop const.
6712         (btpy_list_new): Take a thread pointer instead of a ptid_t.  All
6713         callers adjusted.
6714         * python/py-record.c: Include "gdbthread.h".
6715         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
6716         a ptid_t.  All callers adjusted.
6717         (gdbpy_current_recording): Use inferior_thread.
6718         * python/py-record.h (recpy_record_object) <ptid>: Delete
6719         field, replaced with ...
6720         <thread>: ... this new field.  All users adjusted.
6721         (recpy_element_object) <ptid>: Delete
6722         field, replaced with ...
6723         <thread>: ... this new field.  All users adjusted.
6724         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
6725         a ptid_t.  All callers adjusted.
6726         * python/py-threadevent.c: Include "gdbthread.h".
6727         (get_event_thread): Use thread_to_thread_object.
6728         * python/python-internal.h (struct inferior_object): Forward
6729         declare.
6730         (find_thread_object, find_inferior_object): Delete declarations.
6731         (thread_to_thread_object, inferior_to_inferior_object): New
6732         declarations.
6733         * record-btrace.c: Include "inferior.h".
6734         (require_btrace_thread): Use inferior_thread.
6735         (record_btrace_frame_sniffer)
6736         (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
6737         (get_thread_current_frame): Use scoped_restore_current_thread and
6738         switch_to_thread.
6739         (get_thread_current_frame): Use thread pointer directly.
6740         (record_btrace_replay_at_breakpoint): Use thread's inferior
6741         pointer directly.
6742         * record-full.c: Include "inferior.h".
6743         * regcache.c: Include "gdbthread.h".
6744         (get_thread_arch_regcache): Use the inferior's address space
6745         directly.
6746         (get_thread_regcache, registers_changed_thread): New.
6747         * regcache.h (get_thread_regcache(thread_info *thread)): New
6748         overload.
6749         (registers_changed_thread): New.
6750         (remote_target) <remote_detach_1>: Swap order of parameters.
6751         (remote_add_thread): <remote_add_thread>: Return the new thread.
6752         (get_remote_thread_info(ptid_t)): New overload.
6753         (remote_target::remote_notice_new_inferior): Use thread pointers
6754         directly.
6755         (remote_target::process_initial_stop_replies): Use
6756         thread_info::set_running.
6757         (remote_target::remote_detach_1, remote_target::detach)
6758         (extended_remote_target::detach): Adjust.
6759         * stack.c (frame_show_address): Use inferior_thread.
6760         * target-debug.h (target_debug_print_thread_info_pp): New.
6761         * target-delegates.c: Regenerate.
6762         * target.c (default_thread_address_space): Delete.
6763         (memory_xfer_partial_1): Use current_inferior.
6764         (target_detach): Use current_inferior.
6765         (target_thread_address_space): Delete.
6766         (generic_mourn_inferior): Use current_inferior.
6767         * target.h (struct target_ops) <thread_address_space>: Delete.
6768         (target_thread_address_space): Delete.
6769         * thread.c (init_thread_list): Use ALL_THREADS_SAFE.  Use thread
6770         pointers directly.
6771         (delete_thread_1, delete_thread, delete_thread_silent): Take a
6772         thread pointer instead of a ptid_t.  Adjust all callers.
6773         (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
6774         (first_thread_of_process): Delete, replaced by ...
6775         (first_thread_of_inferior): ... this new function.  All callers
6776         adjusted.
6777         (any_thread_of_process): Rename to ...
6778         (any_thread_of_inferior): ... this, and take an inferior pointer.
6779         (any_live_thread_of_process): Rename to ...
6780         (any_live_thread_of_inferior): ... this, and take an inferior
6781         pointer.
6782         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
6783         (value_in_thread_stack_temporaries)
6784         (get_last_thread_stack_temporary): Take a thread pointer instead
6785         of a ptid_t.  Adjust all callers.
6786         (thread_info::set_running): New.
6787         (validate_registers_access): Use inferior_thread.
6788         (can_access_registers_ptid): Rename to ...
6789         (can_access_registers_thread): ... this, and take a thread
6790         pointer.
6791         (print_thread_info_1): Adjust to compare thread pointers instead
6792         of ptids.
6793         (switch_to_no_thread, switch_to_thread): Make extern.
6794         (scoped_restore_current_thread::~scoped_restore_current_thread):
6795         Use m_thread pointer directly.
6796         (scoped_restore_current_thread::scoped_restore_current_thread):
6797         Use inferior_thread.
6798         (thread_command): Use thread pointer directly.
6799         (thread_num_make_value_helper): Use inferior_thread.
6800         * top.c (execute_command): Use inferior_thread.
6801         * tui/tui-interp.c: Include "inferior.h".
6802         * varobj.c (varobj_create): Use inferior_thread.
6803         (value_of_root_1): Use find_thread_global_id instead of
6804         global_thread_id_to_ptid.
6805
6806 2018-06-21  Alan Hayward  <alan.hayward@arm.com>
6807
6808         * regcache.c (readable_regcache::read_part): Avoid memcpy when
6809         possible.
6810         (regcache::write_part): Likewise.
6811         (readable_regcache::cooked_read_part): Update comment.
6812         (readable_regcache::cooked_write_part): Likewise.
6813         * regcache.h: (readable_regcache::read_part): Likewise.
6814         (regcache::write_part): Likewise.
6815
6816 2018-06-21  Richard Bunt  <richard.bunt@arm.com>
6817             Dirk Schubert  <dirk.schubert@arm.com>
6818
6819         * aarch64-linux-nat.c (post_attach): New.
6820         (aarch64_linux_nat_target::post_attach): Override post_attach to
6821         record the number of hardware debug registers.
6822
6823 2018-06-20  Tom Tromey  <tom@tromey.com>
6824
6825         * python/py-param.c (add_setshow_generic): Make parameters const.
6826         (parmpy_init): Update.
6827
6828 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
6829
6830         * regcache.h (regcache_cooked_read_ftype): Rename to...
6831         (register_read_ftype): ...this, change type to function_view.
6832         (class reg_buffer) <save>: Remove src parameter.
6833         (readonly_detached_regcache) <readonly_detached_regcache>: Make
6834         parameter non-const in first overload.  Remove src parameter in
6835         second overload.
6836         * regcache.c (do_cooked_read): Remove.
6837         (readonly_detached_regcache::readonly_detached_regcache): Make
6838         parameter non-const, adjust call to other constructor.
6839         (reg_buffer::save): Remove src parameter.
6840         * frame.c (do_frame_register_read): Remove.
6841         (frame_save_as_regcache): Use lambda function.
6842         * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
6843         parameter to ppu2spu_data *.
6844         (ppu2spu_sniffer): Use lambda function.
6845
6846 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
6847
6848         * record-full.c (record_full_target::insert_breakpoint): Remove
6849         "struct" keyword, add const.
6850
6851 2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>
6852
6853         * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
6854         PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
6855         * configure.ac: Remove AC_PREREQ, add missing quoting.
6856         * gnulib/configure.ac: Modernize usage of
6857         AC_INIT/AM_INIT_AUTOMAKE.  Remove AC_PREREQ.
6858         * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
6859         (AUTOMAKE_VERSION): Bump to 1.15.1.
6860         * configure: Re-generate.
6861         * config.in: Re-generate.
6862         * aclocal.m4: Re-generate.
6863         * gnulib/aclocal.m4: Re-generate.
6864         * gnulib/config.in: Re-generate.
6865         * gnulib/configure: Re-generate.
6866         * gnulib/import/Makefile.in: Re-generate.
6867
6868 2018-06-19  Pedro Alves  <palves@redhat.com>
6869
6870         * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
6871         (lookup_minimal_symbol_by_pc_section): ... here with
6872         gdb_assert_not_reached added.
6873
6874 2018-06-19  Pedro Alves  <palves@redhat.com>
6875
6876         * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
6877         parameter with a block parameter.  Compare location's block symbol
6878         with the frame's block instead of addresses.
6879         (skip_inline_frames): Pass the current block instead of the
6880         frame's address.  Break out as soon as we determine the frame
6881         should not be skipped.
6882
6883 2018-06-18  Tom Tromey  <tom@tromey.com>
6884
6885         * solib-aix.c (solib_aix_get_section_offsets): Return
6886         unique_xmalloc_ptr.
6887         (solib_aix_solib_create_inferior_hook): Update.
6888
6889 2018-06-18  Tom Tromey  <tom@tromey.com>
6890
6891         * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
6892
6893 2018-06-18  Tom Tromey  <tom@tromey.com>
6894
6895         * solib-frv.c (frv_relocate_main_executable): Use
6896         unique_xmalloc_ptr.
6897         * solib-dsbt.c (dsbt_relocate_main_executable): Use
6898         unique_xmalloc_ptr.
6899
6900 2018-06-18  Tom Tromey  <tom@tromey.com>
6901
6902         * objfiles.h (inhibit_section_map_updates): Update.
6903         (resume_section_map_updates, resume_section_map_updates_cleanup):
6904         Remove.
6905         * solib-svr4.c (svr4_handle_solib_event): Update.
6906         * objfiles.c (inhibit_section_map_updates): Return
6907         scoped_restore_tmpl<int>.
6908         (resume_section_map_updates, resume_section_map_updates_cleanup):
6909         Remove.
6910
6911 2018-06-18  Tom Tromey  <tom@tromey.com>
6912
6913         * valprint.h (read_string): Update.
6914         * valprint.c (read_string): Change type of "buffer".
6915         (val_print_string): Update.
6916         * python/py-value.c (valpy_string): Update.
6917         * language.h (struct language_defn) <la_get_string>: Change
6918         type of "buffer".
6919         (default_get_string, c_get_string): Update.
6920         * language.c (default_get_string): Change type of "buffer".
6921         * guile/scm-value.c (gdbscm_value_to_string): Update.
6922         * c-lang.c (c_get_string): Change type of "buffer".
6923
6924 2018-06-18  Tom Tromey  <tom@tromey.com>
6925
6926         * ser-mingw.c (struct pipe_state_destroyer): New.
6927         (pipe_state_up): New typedef.
6928         (cleanup_pipe_state): Remove.
6929         (pipe_windows_open): Use pipe_state_up.  Don't release argv.
6930
6931 2018-06-18  Tom Tromey  <tom@tromey.com>
6932
6933         * rust-lang.h (rust_yyerror): Don't declare.
6934         * rust-lang.c (rust_language_defn): Update.
6935         * rust-exp.y (yyerror): Now static.
6936         * parse.c (parse_exp_in_context_1): Update.
6937         * p-lang.h (p_yyerror): Don't declare.
6938         * p-lang.c (p_language_defn): Update.
6939         * p-exp.y (yyerror): Now static.
6940         * opencl-lang.c (opencl_language_defn): Update.
6941         * objc-lang.c (objc_language_defn): Update.
6942         * m2-lang.h (m2_yyerror): Don't declare.
6943         * m2-lang.c (m2_language_defn): Update.
6944         * m2-exp.y (yyerror): Now static.
6945         * language.h (struct language_defn) <la_error>: Remove.
6946         * language.c (unk_lang_error): Remove.
6947         (unknown_language_defn, auto_language_defn): Remove.
6948         * go-lang.h (go_yyerror): Don't declare.
6949         * go-lang.c (go_language_defn): Update.
6950         * go-exp.y (yyerror): Now static.
6951         * f-lang.h (f_yyerror): Don't declare.
6952         * f-lang.c (f_language_defn): Update.
6953         * f-exp.y (yyerror): Now static.
6954         * d-lang.h (d_yyerror): Don't declare.
6955         * d-lang.c (d_language_defn): Update.
6956         * d-exp.y (yyerror): Now static.
6957         * c-lang.h (c_yyerror): Don't declare.
6958         * c-lang.c (c_language_defn, cplus_language_defn)
6959         (asm_language_defn, minimal_language_defn): Update.
6960         * c-exp.y (yyerror): Now static.
6961         * ada-lang.h (ada_yyerror): Don't declare.
6962         * ada-lang.c (ada_language_defn): Update.
6963         * ada-exp.y (yyerror): Now static.
6964
6965 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
6966
6967         * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
6968         (store_sveregs_to_thread): Likewise.
6969         (aarch64_linux_fetch_inferior_registers): Check for SVE.
6970         (aarch64_linux_store_inferior_registers): Likewise.
6971         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
6972         function.
6973         (aarch64_sve_regs_copy_to_regcache): Likewise.
6974         (aarch64_sve_regs_copy_from_regcache): Likewise.
6975         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
6976         declaration.
6977         (aarch64_sve_regs_copy_to_regcache): Likewise.
6978         (aarch64_sve_regs_copy_from_regcache): Likewise.
6979         (sve_context): Structure from Linux headers.
6980         (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
6981         (SVE_SIG_ZREG_SIZE): Likewise.
6982         (SVE_SIG_PREG_SIZE): Likewise.
6983         (SVE_SIG_FFR_SIZE): Likewise.
6984         (SVE_SIG_REGS_OFFSET): Likewise.
6985         (SVE_SIG_ZREGS_OFFSET): Likewise.
6986         (SVE_SIG_ZREG_OFFSET): Likewise.
6987         (SVE_SIG_ZREGS_SIZE): Likewise.
6988         (SVE_SIG_PREGS_OFFSET): Likewise.
6989         (SVE_SIG_PREG_OFFSET): Likewise.
6990         (SVE_SIG_PREGS_SIZE): Likewise.
6991         (SVE_SIG_FFR_OFFSET): Likewise.
6992         (SVE_SIG_REGS_SIZE): Likewise.
6993         (SVE_SIG_CONTEXT_SIZE): Likewise.
6994         (SVE_PT_REGS_MASK): Likewise.
6995         (SVE_PT_REGS_FPSIMD): Likewise.
6996         (SVE_PT_REGS_SVE): Likewise.
6997         (SVE_PT_VL_INHERIT): Likewise.
6998         (SVE_PT_VL_ONEXEC): Likewise.
6999         (SVE_PT_REGS_OFFSET): Likewise.
7000         (SVE_PT_FPSIMD_OFFSET): Likewise.
7001         (SVE_PT_FPSIMD_SIZE): Likewise.
7002         (SVE_PT_SVE_ZREG_SIZE): Likewise.
7003         (SVE_PT_SVE_PREG_SIZE): Likewise.
7004         (SVE_PT_SVE_FFR_SIZE): Likewise.
7005         (SVE_PT_SVE_FPSR_SIZE): Likewise.
7006         (SVE_PT_SVE_FPCR_SIZE): Likewise.
7007         (__SVE_SIG_TO_PT): Likewise.
7008         (SVE_PT_SVE_OFFSET): Likewise.
7009         (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
7010         (SVE_PT_SVE_ZREG_OFFSET): Likewise.
7011         (SVE_PT_SVE_ZREGS_SIZE): Likewise.
7012         (SVE_PT_SVE_PREGS_OFFSET): Likewise.
7013         (SVE_PT_SVE_PREG_OFFSET): Likewise.
7014         (SVE_PT_SVE_PREGS_SIZE): Likewise.
7015         (SVE_PT_SVE_FFR_OFFSET): Likewise.
7016         (SVE_PT_SVE_FPSR_OFFSET): Likewise.
7017         (SVE_PT_SVE_FPCR_OFFSET): Likewise.
7018         (SVE_PT_SVE_SIZE): Likewise.
7019         (SVE_PT_SIZE): Likewise.
7020         (HAS_SVE_STATE): New define.
7021
7022 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
7023
7024         * nat/aarch64-sve-linux-sigcontext.h: New file.
7025         * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
7026         new files.
7027         (SVE_VQ_MIN): Likewise.
7028         (SVE_VQ_MAX): Likewise.
7029         (SVE_VL_MIN): Likewise.
7030         (SVE_VL_MAX): Likewise.
7031         (SVE_NUM_ZREGS): Likewise.
7032         (SVE_NUM_PREGS): Likewise.
7033         (sve_vl_valid): Likewise.
7034         (struct user_sve_header): Likewise.
7035
7036 2018-06-16  Andrew Burgess  <andrew.burgess@embecosm.com>
7037             Richard Bunt <Richard.Bunt@arm.com>
7038
7039         * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
7040         was requested by GDB.
7041
7042 2018-06-15  Tom de Vries  <tdevries@suse.de>
7043
7044         * MAINTAINERS (Write After Approval): Add Tom de Vries.
7045
7046 2018-06-14  Simon Marchi  <simon.marchi@polymtl.ca>
7047
7048         * gnulib/update-gnulib.sh: Print expected versions of
7049         autoconf/aclocal.
7050
7051 2018-06-14  Simon Marchi  <simon.marchi@ericsson.com>
7052
7053         * arch-utils.c (default_type_align): Use type_length_units.
7054         * gdbtypes.c (type_align): Use type_length_units.
7055
7056 2018-06-14  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
7057
7058         * cli/cli-script.c (_initialize_cli_script): Fix online documentation
7059         of 'define' command.
7060
7061 2018-06-14  Tom de Vries  <tdevries@suse.de>
7062
7063         PR cli/22573
7064         * infcmd.c (print_return_value_1): Use get_user_print_options instead of
7065         get_no_prettyformat_print_options.
7066
7067 2018-06-13  Simon Marchi  <simon.marchi@ericsson.com>
7068
7069         * sparc-nat.h: Include target.h.
7070         * sparc64-linux-nat.c (class sparc64_linux_nat_target)
7071         <fetch_registers>: Remove this argument in function call.
7072         <store_registers>: Remove this argument in function call, remove
7073         extra semicolon.
7074         <low_forget_process>: Call sparc64_forget_process instead of
7075         sparc_forget_process.
7076
7077 2018-06-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7078
7079         * procfs.c (_initialize_procfs): Use add_inf_child_target.
7080         (procfs_target::make_corefile_notes): Adjust to new
7081         target_read_alloc return type.
7082
7083 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
7084             Stephen Roberts  <stephen.roberts@arm.com>
7085
7086         PR gdb/22882
7087         * infrun.c (fetch_inferior_event): If GDB is not proceeding then
7088         run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
7089         Move should_notify_stop local into more inner scope.
7090
7091 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
7092             Stephen Roberts  <stephen.roberts@arm.com>
7093
7094         PR gdb/22882
7095         * infrun.c (resume_1): Add call to mark_async_event_handler.
7096
7097 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
7098
7099         * infrun.c (do_target_wait): Change old version of $pc printed.
7100
7101 2018-06-11  Simon Marchi  <simon.marchi@ericsson.com>
7102
7103         * dwarf2read.c (read_index_from_section): Rename to...
7104         (read_gdb_index_from_section): ... this, update all callers.
7105         (dwarf2_read_index): Rename to...
7106         (dwarf2_read_gdb_index): ... this, update all callers.
7107
7108 2018-06-11  John David Anglin  <danglin@gcc.gnu.org>
7109
7110         * gdb/hppa-linux-nat.c
7111         (hppa_linux_nat_target::fetch_inferior_registers): Rename to
7112         hppa_linux_nat_target::fetch_registers.
7113
7114 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
7115
7116         * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
7117         * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
7118         (AARCH64_DWARF_SVE_FFR): Likewise.
7119         (AARCH64_DWARF_SVE_P0): Likewise.
7120         (AARCH64_DWARF_SVE_Z0): Likewise.
7121
7122 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
7123
7124         * common/common-regcache.h (raw_compare): New function.
7125         * regcache.c (regcache::raw_compare): Likewise.
7126         * regcache.h (regcache::raw_compare): New declaration.
7127
7128 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
7129
7130         * common/common-regcache.h (reg_buffer_common): New structure.
7131         * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
7132         (reg_buffer::raw_supply): Likewise.
7133         (reg_buffer::raw_supply_integer): Likewise.
7134         (reg_buffer::raw_supply_zeroed): Likewise.
7135         (reg_buffer::raw_collect): Likewise.
7136         (reg_buffer::raw_collect_integer): Likewise.
7137         * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
7138         (reg_buffer::raw_supply): Likewise.
7139         (reg_buffer::raw_supply_integer): Likewise.
7140         (reg_buffer::raw_supply_zeroed): Likewise.
7141         (reg_buffer::raw_collect): Likewise.
7142         (reg_buffer::raw_collect_integer): Likewise.
7143
7144 2018-06-10  Tom Tromey  <tom@tromey.com>
7145
7146         * remote.c (stop_reply_p): Remove typedef.  Don't declare queue.
7147         (class remote_state) <stop_reply_queue>: Now std::vector.
7148         (remote_state::~remote_state)
7149         (remote_target::stop_reply_queue_length): Update.
7150         (struct queue_iter_param, remove_child_of_pending_fork)
7151         (struct check_pending_event_prevents_wildcard_vcont_callback_data)
7152         (check_pending_event_prevents_wildcard_vcont_callback)
7153         (remove_stop_reply_for_inferior)
7154         (remove_stop_reply_of_remote_state)
7155         (remote_notif_remove_once_on_match)
7156         (stop_reply_match_ptid_and_ws)
7157         (remote_kill_child_of_pending_fork): Remove.
7158         (remote_target::remove_new_fork_children)
7159         (remote_target::check_pending_events_prevent_wildcard_vcont)
7160         (remote_target::discard_pending_stop_replies)
7161         (remote_target::discard_pending_stop_replies_in_queue)
7162         (remote_target::remote_notif_remove_queued_reply)
7163         (remote_target::queued_stop_reply)
7164         (remote_target::push_stop_reply, remote_target::peek_stop_reply)
7165         (remote_target::wait, remote_target::kill_new_fork_children)
7166         (remote_target::async): Update.
7167
7168 2018-06-10  Tom Tromey  <tom@tromey.com>
7169
7170         * record-full.c (record_full_arch_list_cleanups): Remove.
7171         (record_full_message): Use try/catch.
7172         (record_full_wait_cleanups): Remove.
7173         (record_full_wait_1): Use try/catch.
7174         (record_full_restore): Likewise.
7175
7176 2018-06-10  Tom Tromey  <tom@tromey.com>
7177
7178         * record-full.c (record_full_breakpoint_p): Remove typedef.  Don't
7179         declare VEC.  Add constructor.
7180         <in_target_beneath>: Now bool.
7181         (record_full_breakpoints): Now a std::vector, static.
7182         (record_full_sync_record_breakpoints)
7183         (record_full_init_record_breakpoints)
7184         (record_full_target::insert_breakpoint)
7185         (record_full_target::remove_breakpoint): Update.  Don't use XNEW.
7186
7187 2018-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
7188
7189         * dwarf2read.c (process_cu_includes): Remove struct keyword.
7190         * serial.c (serial_interface_lookup): Remove struct keyword.
7191
7192 2018-06-10  Tom Tromey  <tom@tromey.com>
7193
7194         * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
7195         method.
7196         * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
7197         a method.
7198         * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
7199         method.
7200         * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
7201         "beneath" as a method.
7202         * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
7203         Use "beneath" as a method.
7204
7205 2018-06-10  Tom Tromey  <tom@tromey.com>
7206
7207         * tracefile.c (struct trace_file_writer_deleter): New.
7208         <operator()>: Rename from trace_file_writer_xfree.
7209         (trace_file_writer_up): New typedef.
7210         (tsave_command, trace_save_tfile, trace_save_ctf): Update.
7211
7212 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
7213
7214         * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
7215         <m_registers, m_register_status>: Change type to
7216         std::unique_ptr.
7217         * regcache.c (reg_buffer::reg_buffer): Use new instead of
7218         XCNEWVEC.
7219
7220 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
7221
7222         * common/common-regcache.h (enum register_status): Add
7223         underlying type "signed char".
7224         * regcache.h (reg_buffer) <m_register_status>: Change type to
7225         register_status *.
7226         * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
7227         register_status instead of signed char.
7228         (reg_buffer::save): Use REG_UNKNOWN instead of 0.
7229         (reg_buffer::get_register_status): Remove cast.
7230         (readable_regcache::raw_read): Remove cast.
7231         (readable_regcache::cooked_read): Remove cast.
7232
7233 2018-06-09  Tom Tromey  <tom@tromey.com>
7234
7235         * source.c (reverse_search_command, forward_search_command): Use
7236         scoped_fd.
7237
7238 2018-06-09  Tom Tromey  <tom@tromey.com>
7239
7240         * serial.c (serial_ops_p): Remove typedef.  Don't declare VEC.
7241         (serial_ops_list): Now static, std::vector.
7242         (serial_interface_lookup, serial_add_interface): Update.
7243
7244 2018-06-09  Tom Tromey  <tom@tromey.com>
7245
7246         * dwarf2read.c (process_cu_includes): Update.
7247         (process_full_comp_unit): Update.
7248         * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
7249         std::vector.
7250
7251 2018-06-08  Paul Koning  <paul_koning@dell.com>
7252
7253         PR gdb/23252
7254
7255         * python/python.c (do_start_initialization):
7256         Avoid call to internal Python API.
7257         (init__gdb_module): New function.
7258
7259 2018-06-08  Gary Benson <gbenson@redhat.com>
7260
7261         * linux-thread-db.c (valprint.h): New include.
7262         (struct check_thread_db_info): New structure.
7263         (check_thread_db_on_load, tdb_testinfo): New static globals.
7264         (check_thread_db, check_thread_db_callback): New functions.
7265         (try_thread_db_load_1): Run integrity checks if requested.
7266         (maintenance_check_libthread_db): New function.
7267         (_initialize_thread_db): Register "maint check libthread-db"
7268         and "maint set/show check-libthread-db".
7269         * NEWS: Mention the above new commands.
7270
7271 2018-06-08  Tom Tromey  <tom@tromey.com>
7272
7273         * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
7274         now a method.
7275
7276 2018-06-08  Tom Tromey  <tom@tromey.com>
7277
7278         * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
7279
7280 2018-06-08  Tom Tromey  <tom@tromey.com>
7281
7282         * common/btrace-common.h (struct btrace_data): Add constructor,
7283         destructor, move assignment operator.
7284         <empty, clear, fini>: New methods.
7285         <format>: Initialize.
7286         (btrace_data_init, btrace_data_fini, btrace_data_clear)
7287         (btrace_data_empty): Don't declare.
7288         * common/btrace-common.c (btrace_data_init): Remove.
7289         (btrace_data::fini): Rename from btrace_data_fini.
7290         (btrace_data::empty): Rename from btrace_data_empty.
7291         (btrace_data::clear): Rename from btrace_data_clear.  Return
7292         bool.
7293         * btrace.h (make_cleanup_btrace_data): Don't declare.
7294         * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
7295         (parse_xml_btrace): Update.
7296         (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
7297         (maint_btrace_clear_packet_history_cmd): Update.
7298
7299 2018-06-07  Pedro Alves  <palves@redhat.com>
7300
7301         * target.h (target_ops) <beneath>: Now a method.  All references
7302         updated.
7303         (class target_stack): New.
7304         * target.c (g_target_stack): New.
7305         (g_current_top_target): Delete.
7306         (current_top_target): Get the top target out of g_target_stack.
7307         (target_stack::push, target_stack::unpush): New.
7308         (push_target, unpush_target): Reimplement.
7309         (target_is_pushed): Reimplement in terms of g_target_stack.
7310         (target_ops::beneath, target_stack::find_beneath): New.
7311
7312 2018-06-07  Pedro Alves  <palves@redhat.com>
7313
7314         * target.h (find_target_beneath): Delete declaration.
7315         * target.c (find_target_beneath): Delete definition.
7316         * aix-thread.c: All callers of find_target_beneath adjusted to
7317         call target_ops::beneath instead.
7318         * bsd-uthread.c: Likewise.
7319         * linux-thread-db.c: Likewise.
7320         * ravenscar-thread.c: Likewise.
7321         * sol-thread.c: Likewise.
7322         * spu-multiarch.c: Likewise.
7323
7324 2018-06-07  Pedro Alves  <palves@redhat.com>
7325
7326         * target.h (target_ops) <beneath>: Now a method.  All references
7327         updated.
7328         (target_ops) <m_beneath>: New.
7329         * target.c (target_ops::beneath): New.
7330         * corelow.c: Adjust all references to target_ops::beneath.
7331         * linux-thread-db.c: Likewise.
7332         * make-target-delegates: Likewise.
7333         * record-btrace.c: Likewise.
7334         * record-full.c: Likewise.
7335         * remote.c: Likewise.
7336         * target.c: Likewise.
7337         * target-delegates.c: Regenerate.
7338
7339 2018-06-07  Pedro Alves  <palves@redhat.com>
7340
7341         * target.h (target_stack): Delete.
7342         (current_top_target): Declare function.
7343         * target.c (target_stack): Delete.
7344         (g_current_top_target): New.
7345         (current_top_target): New function.
7346         * auxv.c: Use current_top_target instead of target_stack
7347         throughout.
7348         * avr-tdep.c: Likewise.
7349         * breakpoint.c: Likewise.
7350         * corefile.c: Likewise.
7351         * elfread.c: Likewise.
7352         * eval.c: Likewise.
7353         * exceptions.c: Likewise.
7354         * frame.c: Likewise.
7355         * gdbarch-selftests.c: Likewise.
7356         * gnu-v3-abi.c: Likewise.
7357         * ia64-tdep.c: Likewise.
7358         * ia64-vms-tdep.c: Likewise.
7359         * infcall.c: Likewise.
7360         * infcmd.c: Likewise.
7361         * infrun.c: Likewise.
7362         * linespec.c: Likewise.
7363         * linux-tdep.c: Likewise.
7364         * minsyms.c: Likewise.
7365         * ppc-linux-nat.c: Likewise.
7366         * ppc-linux-tdep.c: Likewise.
7367         * procfs.c: Likewise.
7368         * regcache.c: Likewise.
7369         * remote.c: Likewise.
7370         * rs6000-tdep.c: Likewise.
7371         * s390-linux-nat.c: Likewise.
7372         * s390-tdep.c: Likewise.
7373         * solib-aix.c: Likewise.
7374         * solib-darwin.c: Likewise.
7375         * solib-dsbt.c: Likewise.
7376         * solib-spu.c: Likewise.
7377         * solib-svr4.c: Likewise.
7378         * solib-target.c: Likewise.
7379         * sparc-tdep.c: Likewise.
7380         * sparc64-tdep.c: Likewise.
7381         * spu-tdep.c: Likewise.
7382         * symfile.c: Likewise.
7383         * symtab.c: Likewise.
7384         * target-descriptions.c: Likewise.
7385         * target-memory.c: Likewise.
7386         * target.c: Likewise.
7387         * target.h: Likewise.
7388         * tracefile-tfile.c: Likewise.
7389         * tracepoint.c: Likewise.
7390         * valops.c: Likewise.
7391         * valprint.c: Likewise.
7392         * value.c: Likewise.
7393         * windows-tdep.c: Likewise.
7394         * mi/mi-main.c: Likewise.
7395
7396 2018-06-07  Tom Tromey  <tom@tromey.com>
7397
7398         * valprint.h (build_address_symbolic): Declare.
7399         * printcmd.c (print_address_symbolic): Update.
7400         (build_address_symbolic): Change "name" and "filename" to
7401         std::string.
7402         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
7403         Update.
7404         * defs.h (build_address_symbolic): Remove declaration.
7405
7406 2018-06-07  Alan Hayward  <alan.hayward@arm.com>
7407
7408         * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
7409         (aarch64_vnv_type): Add function.
7410         (aarch64_pseudo_register_name): Add V regs for SVE.
7411         (aarch64_pseudo_register_type): Likewise.
7412         (aarch64_pseudo_register_reggroup_p): Likewise.
7413         (aarch64_pseudo_read_value_2): Use V0 offset for SVE
7414         (aarch64_pseudo_read_value): Add V regs for SVE.
7415         (aarch64_pseudo_write_2): Use V0 offset for SVE
7416         (aarch64_pseudo_write): Add V regs for SVE.
7417         * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
7418
7419 2018-06-06  Sergio Durigan Junior  <sergiodj@redhat.com>
7420
7421         * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
7422         (sve_vl_from_vq): Likewise.
7423
7424 2018-06-05  Tom Tromey  <tom@tromey.com>
7425
7426         * cli/cli-cmds.c (show_version): Update.
7427         * top.c (print_gdb_version): Add "interactive" parameter.
7428         Update.
7429         * main.c (captured_main_1): Update.
7430         * top.h (print_gdb_version): Add "interactive" parameter and a
7431         comment.
7432
7433 2018-06-05  David Malcolm  <dmalcolm@redhat.com>
7434
7435         * common/enum-flags.h: Add trailing semicolon to example in
7436         comment.
7437
7438 2018-06-05  Tom Tromey  <tom@tromey.com>
7439
7440         PR cli/12326:
7441         * NEWS: Add entry about pager.
7442         * utils.c (pagination_disabled_for_command): New global.
7443         (prompt_for_continue): Allow "c" response to prompt.
7444         (reinitialize_more_filter): Clear
7445         pagination_disabled_for_command.
7446         (fputs_maybe_filtered): Check pagination_disabled_for_command.
7447
7448 2018-06-04  Tom Tromey  <tom@tromey.com>
7449
7450         * ada-lang.h (ada_lookup_symbol_list): Update.
7451         * ada-lang.c (resolve_subexp): Update.
7452         (symbols_are_identical_enums): Change type of syms.  Remove nsyms
7453         parameter.
7454         (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
7455         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
7456         results parameter to std::vector.
7457         (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
7458         Update.
7459         * ada-exp.y (block_lookup): Update.
7460         (select_possible_type_sym): Change type of syms.  Remove nsyms
7461         parameter.
7462         (write_var_or_type, write_name_assoc): Update.
7463
7464 2018-06-04  Joel Brobecker  <brobecker@adacore.com>
7465
7466         * windows-nat.c (windows_nat_target::xfer_partial): Return
7467         TARGET_XFER_E_IO if we need to delegate to the target beneath
7468         but BENEATH is NULL.
7469
7470 2018-06-04  Simon Marchi  <simon.marchi@ericsson.com>
7471
7472         * Makefile.in (config.status): Add configure.nat as a
7473         dependency.
7474
7475 2018-06-04  Tom Tromey  <tom@tromey.com>
7476
7477         * cp-name-parser.y (cpname_state): Add method declarations.
7478         (HANDLE_QUAL): Update.
7479         (cpname_state::d_grab, cpname_state::fill_comp)
7480         (cpname_state::make_operator, cpname_state::make_dtor)
7481         (cpname_state::make_builtin_type, cpname_state::make_name)
7482         (cpname_state::d_qualify, cpname_state::d_int_type)
7483         (cpname_state::d_unary, cpname_state::d_binary): Now methods.
7484         (%union): Move earlier.
7485
7486 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
7487
7488         * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
7489
7490 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
7491
7492         * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
7493         (aarch64_pseudo_write_1): Likewise.
7494         (aarch64_pseudo_read_value): Use helper.
7495         (aarch64_pseudo_write): Likewise.
7496
7497 2018-06-04  Pedro Alves  <palves@redhat.com>
7498
7499         * darwin-nat.c (darwin_ops): Delete.
7500         (darwin_attach_pid): Use get_native_target.
7501
7502 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
7503
7504         * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
7505         * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
7506
7507 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
7508
7509         * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
7510         * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
7511         (aarch64_gdbarch_init): Check for SVE.
7512         * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
7513
7514 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
7515
7516         * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
7517         * aarch64-tdep.h (aarch64_read_description): Likewise.
7518         * arch/aarch64.c (aarch64_create_target_description): Likewise.
7519         * arch/aarch64.h (aarch64_create_target_description): Likewise.
7520         * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
7521         * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
7522         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
7523
7524 2018-06-02  Simon Marchi  <simon.marchi@ericsson.com>
7525
7526         * value.c (value_fetch_lazy_bitfield): New.
7527         (value_fetch_lazy_memory): New.
7528         (value_fetch_lazy_register): New.
7529         (value_fetch_lazy): Factor out to smaller functions.
7530
7531 2018-06-01  Tom Tromey  <tom@tromey.com>
7532
7533         * cp-name-parser.y (backslashable, represented): Now const.
7534
7535 2018-06-01  Tom Tromey  <tom@tromey.com>
7536
7537         * cp-name-parser.y: Include parser-defs.h.
7538         (parser_fprintf): Remove declaration.
7539
7540 2018-06-01  Tom Tromey  <tom@tromey.com>
7541
7542         * cp-name-parser.y: Use %pure-parser, %lex-param, and
7543         %parse-param.
7544         (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
7545         (global_result): Remove globals.
7546         (struct cpname_state): New.
7547         (yyparse): Don't declare.
7548         (yylex, yyerror): Move declarations after %union.
7549         (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
7550         (make_name): Add state parameter.
7551         Update all callers.
7552         (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
7553         parameter.
7554         (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
7555         Update.
7556         (yylex): Add lvalp, state parameters.
7557         (yyerror): Add state parameter.
7558         (cp_demangled_name_to_comp): Update.
7559
7560 2018-06-01  Tom Tromey  <tom@tromey.com>
7561
7562         * cp-name-parser.y (parser_fprintf): Declare.
7563         (GDB_YY_REMAP_PREFIX): Define.
7564         Include yy-remap.h.  Don't redefine yy* identifiers.
7565
7566 2018-06-01  Tom Tromey  <tom@tromey.com>
7567
7568         * python/py-type.c (typy_legacy_template_argument): Update.
7569         * cp-support.h (cp_demangled_name_to_comp): Update.
7570         * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
7571         parameter to be a "std::string *".
7572         (main): Update.
7573
7574 2018-06-01  H.J. Lu  <hongjiu.lu@intel.com>
7575
7576         * ada-lex.l: Include "diagnostics.h" instead of
7577         "common/diagnostics.h".
7578         * unittests/environ-selftests.c: Likewise.
7579         * common/diagnostics.h: Moved to ../include.
7580
7581 2018-06-01  Joel Brobecker  <brobecker@adacore.com>
7582
7583         * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
7584         to language_mode_manual while calling breakpoint_re_set_one.
7585
7586 2018-06-01  Tom Tromey  <tom@tromey.com>
7587
7588         * valops.c (value_cast_structs, destructor_name_p): Update.
7589         * symtab.c (gdb_mangle_name): Update.
7590         * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
7591         Update.
7592         * p-valprint.c (pascal_object_is_vtbl_ptr_type)
7593         (pascal_object_print_value_fields, pascal_object_print_value):
7594         Update.
7595         * p-typeprint.c (pascal_type_print_derivation_info): Update.
7596         * linespec.c (find_methods): Update.
7597         * gdbtypes.h (type_name_no_tag): Remove.
7598         (type_name_or_error): Rename from type_name_no_tag_or_error.
7599         * gdbtypes.c (type_name_no_tag): Remove.
7600         (type_name_or_error): Rename from type_name_no_tag_or_error.
7601         (lookup_struct_elt_type, check_typedef): Update.
7602         * expprint.c (print_subexp_standard): Update.
7603         * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
7604         * d-namespace.c (d_lookup_nested_symbol): Update.
7605         * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
7606         (cp_print_class_member): Update.
7607         * cp-namespace.c (cp_lookup_nested_symbol): Update.
7608         * completer.c (add_struct_fields): Update.
7609         * c-typeprint.c (cp_type_print_derivation_info)
7610         (c_type_print_varspec_prefix, c_type_print_base_struct_union):
7611         Update.
7612         * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
7613         (ada_prefer_type, ada_is_exception_sym): Update.
7614
7615 2018-06-01  Tom Tromey  <tom@tromey.com>
7616
7617         * valops.c (enum_constant_from_type, value_namespace_elt)
7618         (value_maybe_namespace_elt): Update.
7619         * valarith.c (find_size_for_pointer_math): Update.
7620         * target-descriptions.c (make_gdb_type): Update.
7621         * symmisc.c (print_symbol): Update.
7622         * stabsread.c (define_symbol, read_type)
7623         (complain_about_struct_wipeout, add_undefined_type)
7624         (cleanup_undefined_types_1): Update.
7625         * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
7626         (rust_range_type_p, val_print_struct, rust_print_struct_def)
7627         (rust_internal_print_type, rust_composite_type)
7628         (rust_evaluate_funcall, rust_evaluate_subexp)
7629         (rust_inclusive_range_type_p): Update.
7630         * python/py-type.c (typy_get_tag): Update.
7631         * p-typeprint.c (pascal_type_print_base): Update.
7632         * mdebugread.c (parse_symbol, parse_type): Update.
7633         * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
7634         Update.
7635         * guile/scm-type.c (gdbscm_type_tag): Update.
7636         * go-lang.c (sixg_string_p): Update.
7637         * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
7638         Update.
7639         * gdbtypes.h (struct main_type) <tag_name>: Remove.
7640         (TYPE_TAG_NAME): Remove.
7641         * gdbtypes.c (type_name_no_tag): Simplify.
7642         (check_typedef, check_types_equal, recursive_dump_type)
7643         (copy_type_recursive, arch_composite_type): Update.
7644         * f-typeprint.c (f_type_print_base): Update.  Print "Type" prefix
7645         in summary mode when needed.
7646         * eval.c (evaluate_funcall): Update.
7647         * dwarf2read.c (fixup_go_packaging, read_structure_type)
7648         (process_structure_scope, read_enumeration_type)
7649         (read_namespace_type, read_module_type, determine_prefix): Update.
7650         * cp-support.c (inspect_type): Update.
7651         * coffread.c (process_coff_symbol, decode_base_type): Update.
7652         * c-varobj.c (c_is_path_expr_parent): Update.
7653         * c-typeprint.c (c_type_print_base_struct_union): Update.
7654         (c_type_print_base_1): Update.  Print struct/class/union/enum in
7655         summary when using C language.
7656         * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
7657         (gen_maybe_namespace_elt): Update.
7658         * ada-lang.c (ada_type_name): Simplify.
7659         (empty_record, ada_template_to_fixed_record_type_1)
7660         (template_to_static_fixed_type)
7661         (to_record_with_fixed_variant_part, ada_check_typedef): Update.
7662
7663 2018-06-01  Tom Tromey  <tom@tromey.com>
7664
7665         * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
7666         c_print_type.
7667         * c-typeprint.c (c_print_type_1): Add "language" parameter.
7668         (c_print_type): Update.
7669         (c_print_type): New overload.
7670         (c_type_print_varspec_prefix, c_type_print_args)
7671         (c_type_print_varspec_suffix, c_print_type_no_offsets)
7672         (c_type_print_base_struct_union, c_type_print_base_1)
7673         (cp_type_print_method_args): Add "language" parameter.
7674         (c_type_print_base): Update.
7675         * c-lang.h (c_print_type): Add new overload.
7676
7677 2018-06-01  Tom Tromey  <tom@tromey.com>
7678
7679         * typeprint.h (c_type_print_varspec_suffix): Don't declare.
7680         * c-typeprint.c (c_type_print_varspec_suffix): Now static.
7681
7682 2018-06-01  Alan Hayward  <alan.hayward@arm.com>
7683
7684         * aarch64-tdep.c (aarch64_sve_register_names): New const
7685         var.
7686         * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
7687         (AARCH64_SVE_Z_REGS_NUM): New define.
7688         (AARCH64_SVE_P_REGS_NUM): Likewise.
7689         (AARCH64_SVE_NUM_REGS): Likewise.
7690
7691 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
7692
7693         * nat/linux-ptrace.h [__alpha__]
7694         (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
7695         definitions.
7696
7697 2018-05-31  Maciej W. Rozycki  <macro@mips.com>
7698
7699         * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
7700         the endianness selected.
7701         * NEWS: Document `set endian auto' mode operation update.
7702
7703 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
7704
7705         * Makefile.in: Add new header.
7706         * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
7707         (sve_vl_from_vg): Likewise.
7708         (sve_vq_from_vl): Likewise.
7709         (sve_vl_from_vq): Likewise.
7710         (sve_vq_from_vg): Likewise.
7711         (sve_vg_from_vq): Likewise.
7712         * configure.nat: Add new c file.
7713         * nat/aarch64-sve-linux-ptrace.c: New file.
7714         * nat/aarch64-sve-linux-ptrace.h: New file.
7715
7716 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
7717
7718         * aarch64-linux-nat.c (aarch64_linux_read_description):
7719         Add parmeter zero.
7720         * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
7721         Likewise.
7722         * aarch64-tdep.c (tdesc_aarch64_list): Add.
7723         (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
7724         (aarch64_gdbarch_init): Add parmeter zero.
7725         * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
7726         * arch/aarch64.c (aarch64_create_target_description): Check VQ.
7727         * arch/aarch64.h (aarch64_create_target_description): Add VQ.
7728         parmeter.
7729         * doc/gdb.texinfo: Describe SVE feature
7730         * features/aarch64-sve.c: New file.
7731
7732 2018-05-31  Omair Javaid  <omair.javaid@linaro.org>
7733
7734         PR gdb/23210
7735         * gdbarch.sh (significant_addr_bit): Default to zero when
7736         not set by target architecture.
7737         * gdbarch.c: Re-generated.
7738         * utils.c (address_significant): Update.
7739
7740 2018-05-30  Joel Brobecker  <brobecker@adacore.com>
7741
7742         * stack.c (func_command): Remove trailing newline in call to error.
7743
7744 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7745
7746         * regcache.h (regcache_raw_collect): Remove, update callers to
7747         use regcache::raw_collect.
7748         * regcache.c (regcache_raw_collect): Remove.
7749
7750 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7751
7752         * regcache.h (regcache_raw_supply): Remove, update callers to
7753         use detached_regcache::raw_supply.
7754         * regcache.c (regcache_raw_supply): Remove.
7755
7756 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7757
7758         * regcache.h (regcache_cooked_write_part): Remove, update
7759         callers to use regcache::cooked_write_part.
7760         * regcache.c (regcache_cooked_write_part): Remove.
7761
7762 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7763
7764         * regcache.h (regcache_cooked_read_part): Remove, update callers
7765         to use readable_regcache::cooked_read_part.
7766         * regcache.c (regcache_cooked_read_part): Remove.
7767
7768 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7769
7770         * regcache.h (regcache_cooked_read_value): Remove, update
7771         callers to use readable_regcache::cooked_read_value.
7772         * regcache.c (regcache_cooked_read_value): Remove.
7773
7774 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7775
7776         * regcache.h (regcache_cooked_write): Remove, update callers to
7777         use regcache::cooked_write.
7778         * regcache.c (regcache_cooked_write): Remove.
7779
7780 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7781
7782         * regcache.h (regcache_invalidate): Remove, update callers to
7783         use detached_regcache::invalidate instead.
7784         * regcache.c (regcache_invalidate): Remove.
7785
7786 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7787
7788         * regcache.h (regcache_raw_write_part): Remove, update callers
7789         to use regcache::raw_write_part instead.
7790         * regcache.c (regcache_raw_write_part): Remove.
7791
7792 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7793
7794         * regcache.h (regcache_raw_read_part): Remove, update callers to
7795         use readable_regcache::raw_read_part instead.
7796         * regcache.c (regcache_raw_read_part): Remove.
7797
7798 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7799
7800         * regcache.h (regcache_cooked_read): Remove, update callers to
7801         use readable_regcache::cooked_read instead.
7802         * regcache.c (regcache_cooked_read): Remove.
7803
7804 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7805
7806         * regcache.h (regcache_raw_write): Remove, update callers to use
7807         regcache::raw_write instead.
7808         * regcache.c (regcache_raw_write): Remove.
7809
7810 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7811
7812         * regcache.h (regcache_raw_read): Remove, update callers to use
7813         readable_regcache::raw_read instead.
7814         * regcache.c (regcache_raw_read): Remove.
7815
7816 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7817
7818         * regcache.h (regcache_raw_update): Remove, update callers to
7819         use readable_regcache::raw_update instead.
7820         * regcache.c (regcache_raw_update): Remove.
7821
7822 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7823
7824         * regcache.h (regcache_register_status): Remove, update callers
7825         to use reg_buffer::get_register_status directly instead.
7826         * regcache.c (regcache_register_status): Remove.
7827
7828 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7829
7830         * regcache.h (regcache_get_ptid): Remove, update all callers to
7831         call regcache::ptid instead.
7832         * regcache.c (regcache_get_ptid): Remove.
7833
7834 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7835
7836         * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
7837
7838 2018-05-30  Pedro Alves  <palves@redhat.com>
7839
7840         * common/common-exceptions.h (exception_rethrow): Use
7841         ATTRIBUTE_NORETURN.
7842
7843 2018-05-29  Simon Marchi  <simon.marchi@polymtl.ca>
7844
7845         * breakpoint.c (print_solib_event, check_status_catch_solib):
7846         Remove struct keyword in range-based for loops.
7847         * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
7848         * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
7849         Likewise.
7850         * linespec.c (find_superclass_methods, search_minsyms_for_name):
7851         Likewise.
7852         * symfile.c (addr_info_make_relative): Likewise.
7853         * thread.c (value_in_thread_stack_temporaries): Likewise.
7854
7855 2018-06-12  Weimin Pan  <weimin.pan@oracle.com>
7856
7857         PR gdb/16841
7858         * valops.c (value_struct_elt_for_reference): Call check_typedef on
7859         aggregate type to get its real type before accessing it.
7860
7861 2018-05-29  Weimin Pan  <weimin.pan@oracle.com>
7862
7863         * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
7864         * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
7865         * coff-pe-read.c (add_pe_forwarded_sym): Replace
7866         lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
7867         * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
7868         * jit.c (jit_breakpoint_re_set_internal): Likewise.
7869         * printcmd.c (info_address_command): Likewise.
7870
7871 2018-05-29  Tom Tromey  <tom@tromey.com>
7872
7873         * windows-nat.c (handle_exception): Update fall-through comment.
7874
7875 2018-05-29  Tom Tromey  <tom@tromey.com>
7876
7877         * progspace.h (so_list_ptr): Remove typedef.  Don't declare VEC.
7878         (struct program_space) <added_solibs>: Now a std::vector.
7879         * breakpoint.c (print_solib_event): Update.
7880         (check_status_catch_solib): Update.
7881         * progspace.c (clear_program_space_solib_cache): Update.
7882         * solib.c (update_solib_list): Update.
7883
7884 2018-05-29  Tom Tromey  <tom@tromey.com>
7885
7886         * python/py-type.c (typy_richcompare): Update.
7887         * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
7888         * gdbtypes.h (types_deeply_equal): Return bool.
7889         (types_equal): Likewise.
7890         * gdbtypes.c (type_equality_entry_d): Remove typedef.  Don't
7891         declare VEC.
7892         (check_types_equal): Change worklist to std::vector.  Return
7893         bool.
7894         (struct type_equality_entry): Add constructor.
7895         (compare_maybe_null_strings): Return bool.
7896         (check_types_worklist): Return bool.  Change worklist to
7897         std::vector.
7898         (types_deeply_equal): Use std::vector.
7899         (types_equal): Return bool.
7900         (compare_maybe_null_strings): Simplify.
7901
7902 2018-05-29  Tom Tromey  <tom@tromey.com>
7903
7904         * record-btrace.c (tp_t): Remove typedef.  Don't declare VEC.
7905
7906 2018-05-29  Tom Tromey  <tom@tromey.com>
7907
7908         * objc-lang.h: Don't include cp-support.h.
7909         * common/gdb_vecs.h (const_char_ptr): Remove typedef.  Don't
7910         declare VEC.
7911
7912 2018-05-27  Tom Tromey  <tom@tromey.com>
7913
7914         * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
7915
7916 2018-05-25  Tom Tromey  <tom@tromey.com>
7917
7918         * value.c (value::location): Initialize.
7919
7920 2018-05-25  Tom Tromey  <tom@tromey.com>
7921
7922         * dbxread.c (init_bincl_list): Remove.
7923         (bincl_list): Now a std::vector.
7924         (bincls_allocated, next_bincl): Remove.
7925         (free_bincl_list, do_free_bincl_list_cleanup)
7926         (make_cleanup_free_bincl_list): Remove.
7927         (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
7928         unique_xmalloc_ptr.
7929         (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
7930         (struct header_file_location): Add constructor.
7931         (add_bincl_to_list): Remove.
7932
7933 2018-05-25  Tom Tromey  <tom@tromey.com>
7934
7935         * tui/tui.c (tui_enable): Update.
7936         * mi/mi-interp.c (mi_interp::init): Update.
7937         * interps.h (class interp) <name>: New method.
7938         <m_name>: Rename from name.
7939         (~scoped_restore_interp): Update.
7940         * interps.c (interp::interp): Update.
7941         (interp_add, interp_set, interp_lookup_existing)
7942         (current_interp_named_p): Update.
7943
7944 2018-05-25  Tom Tromey  <tom@tromey.com>
7945
7946         * interps.c (interp_name): Remove.
7947         * mi/mi-interp.c (mi_interp::init): Update.
7948         * interps.h (interp_name): Remove.
7949         (~scoped_restore_interp): Update.
7950         * tui/tui.c (tui_enable): Update.
7951
7952 2018-05-25  Tom Tromey  <tom@tromey.com>
7953
7954         * utils.c (fputs_maybe_filtered): Update.
7955         * linespec.c (decode_line_full): Update.
7956         * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
7957         (mi_print_breakpoint_for_event, mi_solib_loaded)
7958         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
7959         (mi_user_selected_context_changed): Update.
7960         * mi/mi-main.c (mi_execute_command): Update.
7961         * cli/cli-script.c (execute_control_command): Update.
7962         * python/python.c (execute_gdb_command): Update.
7963         * solib.c (info_sharedlibrary_command): Update.
7964         * interps.c (interp_ui_out): Remove.
7965         * interps.h (interp_ui_out): Remove.
7966
7967 2018-05-25  Tom Tromey  <tom@tromey.com>
7968
7969         * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
7970         * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
7971         * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
7972
7973 2018-05-25  Tom Tromey  <tom@tromey.com>
7974
7975         * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
7976         * interps.c (interp_exec): Use scoped_restore.
7977
7978 2018-05-25  Tom Tromey  <tom@tromey.com>
7979
7980         * remote.c (remote_target::remote_file_get): Use
7981         gdb::byte_vector.
7982         (remote_target::remote_file_put): Likewise.
7983
7984 2018-05-25  Tom Tromey  <tom@tromey.com>
7985
7986         * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
7987         a std::string.
7988         (get_pe_section_index, add_pe_exported_sym): Update.
7989         (read_pe_exported_syms): Use gdb::def_vector.
7990
7991 2018-05-25  Tom Tromey  <tom@tromey.com>
7992
7993         * frame.c (remove_prev_frame): Remove.
7994         (get_prev_frame_if_no_cycle): Use TRY/CATCH.
7995
7996 2018-05-25  Maciej W. Rozycki  <macro@mips.com>
7997
7998         * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
7999         Remove prototypes.
8000         * mips-linux-nat.c (supply_fpregset): Always call
8001         `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
8002         (fill_fpregset): Always call `mips64_fill_fpregset' rather than
8003         `mips_fill_fpregset'.
8004         * mips-linux-tdep.c (mips_supply_fpregset)
8005         (mips_supply_fpregset_wrapper, mips_fill_fpregset)
8006         (mips_fill_fpregset_wrapper): Remove functions.
8007         (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
8008         (mips_linux_fpregset): Remove variable.
8009         (mips_linux_iterate_over_regset_sections): Use
8010         `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
8011         (mips_linux_o32_sigframe_init): Remove comment.
8012
8013 2018-05-25  Pedro Alves  <palves@redhat.com>
8014
8015         * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
8016         (struct readahead_cache, struct packet_reg, struct
8017         remote_arch_state, class remote_state): Move higher up in the
8018         file.
8019         (remote_target::m_remote_state): Now an object instead of a pointer.
8020         (remote_target::get_remote_state): Adjust.
8021
8022 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
8023
8024         * stack.c (select_and_print_frame): Delete.
8025         (struct function_bounds): Move struct within function.
8026         (func_command): Most content moved into new function
8027         find_frame_for_function, use new function, print result, add
8028         function comment.
8029         (find_frame_for_function): New function, now returns a result.
8030
8031 2018-05-24  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
8032
8033         * stack.c (iterate_over_block_arg_vars): Fix comment.
8034         (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
8035
8036 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
8037
8038         PR gdb/23203
8039         * frame.c
8040         (scoped_restore_selected_frame::scoped_restore_selected_frame):
8041         Define.
8042         (scoped_restore_selected_frame::~scoped_restore_selected_frame):
8043         Define.
8044         * frame.h (class scoped_restore_selected_frame): New class.
8045         * stack.c (print_frame_local_vars): Remove catching and rethrowing
8046         of any exception, use scoped_restore_selected_frame to restore the
8047         frame instead.
8048
8049 2018-05-24  Pedro Alves  <palves@redhat.com>
8050
8051         * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
8052         override.
8053
8054 2018-05-23  Tom Tromey  <tom@tromey.com>
8055
8056         * complaints.c (struct complaints): Remove.
8057         (symfile_complaint_book): Remove.
8058         (series): New global.
8059         (complaint_internal): Update.
8060         (clear_complaints): Update.
8061
8062 2018-05-23  Tom Tromey  <tom@tromey.com>
8063
8064         * complaints.c (counters): New global.
8065         (struct complain): Remove.
8066         (struct complaints) <root>: Remove.
8067         (complaint_sentinel): Remove.
8068         (symfile_complaint_book): Update.
8069         (find_complaint) Remove.
8070         (complaint_internal, clear_complaints): Update.
8071
8072 2018-05-23  Tom Tromey  <tom@tromey.com>
8073
8074         * complaints.c (struct complain) <file, line>: Remove.
8075         (find_complaint): Remove file, line parameters.
8076         (complaint_internal): Update.
8077
8078 2018-05-23  Tom Tromey  <tom@tromey.com>
8079
8080         * complaints.c (vcomplaint): Remove.
8081         (complaint_internal) Merge in contents of vcomplaint.
8082
8083 2018-05-23  Tom Tromey  <tom@tromey.com>
8084
8085         * complaints.c (struct complaints) <explanation>: Remove.
8086         (symfile_explanations): Remove.
8087         (symfile_complaint_book): Update.
8088         (vcomplaint): Update.
8089         (struct explanation): Remove.
8090
8091 2018-05-23  Tom Tromey  <tom@tromey.com>
8092
8093         * complaints.c (symfile_complaints): Remove.
8094         (complaint_internal): Remove "complaints" parameter.
8095         (clear_complaints, vcomplaint): Remove "c" parameter.
8096         (get_complaints): Remove.
8097         * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
8098         (dwarf2_debug_line_missing_file_complaint)
8099         (dwarf2_debug_line_missing_end_sequence_complaint)
8100         (dwarf2_complex_location_expr_complaint)
8101         (dwarf2_const_value_length_mismatch_complaint)
8102         (dwarf2_section_buffer_overflow_complaint)
8103         (dwarf2_macro_malformed_definition_complaint)
8104         (dwarf2_invalid_attrib_class_complaint)
8105         (create_addrmap_from_index, dw2_symtab_iter_next)
8106         (dw2_expand_marked_cus)
8107         (dw2_debug_names_iterator::find_vec_in_debug_names)
8108         (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
8109         (create_debug_type_hash_table, init_cutu_and_read_dies)
8110         (partial_die_parent_scope, add_partial_enumeration)
8111         (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
8112         (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
8113         (read_import_statement, read_file_scope, create_dwo_cu_reader)
8114         (create_cus_hash_table, create_dwp_hash_table)
8115         (inherit_abstract_dies, read_func_scope, read_call_site_scope)
8116         (dwarf2_rnglists_process, dwarf2_ranges_process)
8117         (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
8118         (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
8119         (handle_struct_member_die, process_structure_scope)
8120         (read_array_type, read_common_block, read_module_type)
8121         (read_tag_pointer_type, read_typedef, read_base_type)
8122         (read_subrange_type, load_partial_dies, partial_die_info::read)
8123         (partial_die_info::read, partial_die_info::read)
8124         (partial_die_info::read, read_checked_initial_length_and_offset)
8125         (dwarf2_string_attr, read_formatted_entries)
8126         (dwarf_decode_line_header)
8127         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
8128         (new_symbol, dwarf2_const_value_attr, lookup_die_type)
8129         (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
8130         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
8131         (get_signatured_type, get_DW_AT_signature_type)
8132         (decode_locdesc, file_file_name, consume_improper_spaces)
8133         (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
8134         (dwarf_decode_macro_bytes, dwarf_decode_macros)
8135         (dwarf2_symbol_mark_computed, set_die_type)
8136         (read_attribute_value): Update.
8137         * stap-probe.c (handle_stap_probe, get_stap_base_address):
8138         Update.
8139         * dbxread.c (unknown_symtype_complaint)
8140         (lbrac_mismatch_complaint, repeated_header_complaint)
8141         (set_namestring, function_outside_compilation_unit_complaint)
8142         (read_dbx_symtab, process_one_symbol): Update.
8143         * gdbtypes.c (stub_noname_complaint): Update.
8144         * windows-nat.c (handle_unload_dll): Update.
8145         * coffread.c (coff_symtab_read, enter_linenos, decode_type)
8146         (decode_base_type): Update.
8147         * xcoffread.c (bf_notfound_complaint, ef_complaint)
8148         (eb_complaint, record_include_begin, record_include_end)
8149         (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
8150         (process_xcoff_symbol, read_symbol)
8151         (function_outside_compilation_unit_complaint)
8152         (scan_xcoff_symtab): Update.
8153         * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
8154         * buildsym.c (finish_block_internal, make_blockvector)
8155         (end_symtab_get_static_block, augment_type_symtab): Update.
8156         * dtrace-probe.c (dtrace_process_dof)
8157         (dtrace_static_probe_ops::get_probes): Update.
8158         * complaints.h (struct complaint): Don't declare.
8159         (symfile_complaints): Remove.
8160         (complaint_internal): Remove "complaints" parameter.
8161         (complaint): Likewise.
8162         (clear_complaints): Likewise.
8163         * symfile.c (syms_from_objfile_1, finish_new_objfile)
8164         (reread_symbols): Update.
8165         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
8166         (dwarf2_frame_cache, decode_frame_entry): Update.
8167         * dwarf2loc.c (dwarf_reg_to_regnum): Update.
8168         * objc-lang.c (lookup_objc_class, lookup_child_selector)
8169         (info_selectors_command): Update.
8170         * macrotab.c (macro_include, check_for_redefinition)
8171         (macro_undef): Update.
8172         * objfiles.c (filter_overlapping_sections): Update.
8173         * stabsread.c (invalid_cpp_abbrev_complaint)
8174         (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
8175         (define_symbol, error_type, read_type, rs6000_builtin_type)
8176         (stabs_method_name_from_physname, read_member_functions)
8177         (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
8178         (attach_fields_to_type, complain_about_struct_wipeout)
8179         (read_range_type, read_args, common_block_start)
8180         (common_block_end, cleanup_undefined_types_1, scan_file_globals):
8181         Update.
8182         * mdebugread.c (index_complaint, unknown_ext_complaint)
8183         (basic_type_complaint, bad_tag_guess_complaint)
8184         (bad_rfd_entry_complaint, unexpected_type_code_complaint)
8185         (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
8186         (parse_procedure, parse_lines)
8187         (function_outside_compilation_unit_complaint)
8188         (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
8189         (bad_tag_guess_complaint, reg_value_complaint): Update.
8190         * cp-support.c (demangled_name_complaint): Update.
8191         * macroscope.c (sal_macro_scope): Update.
8192         * dwarf-index-write.c (class debug_names): Update.
8193
8194 2018-05-23  Tom Tromey  <tom@tromey.com>
8195
8196         * complaints.c (clear_complaints): Remove "noisy" parameter.
8197         * complaints.h (clear_complaints): Update.
8198         * symfile.c (syms_from_objfile_1, finish_new_objfile)
8199         (reread_symbols): Update.
8200
8201 2018-05-23  Tom Tromey  <tom@tromey.com>
8202
8203         * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
8204         SUBSEQUENT_MESSAGE.
8205         (vcomplaint, clear_complaints): Update.
8206         (symfile_explanations): Remove some messages.
8207
8208 2018-05-23  Tom Tromey  <tom@tromey.com>
8209
8210         * complaints.c (internal_complaint): Remove.
8211         * complaints.h (internal_complaint): Remove.
8212
8213 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
8214
8215         * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
8216
8217 2018-05-22  Pedro Alves  <palves@redhat.com>
8218
8219         * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
8220         (remote_fileio_badfd, remote_fileio_return_errno)
8221         (remote_fileio_return_success, remote_fileio_func_open)
8222         (remote_fileio_func_open, remote_fileio_func_close)
8223         (remote_fileio_func_read, remote_fileio_func_write)
8224         (remote_fileio_func_lseek, remote_fileio_func_rename)
8225         (remote_fileio_func_unlink, remote_fileio_func_stat)
8226         (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
8227         (remote_fileio_func_isatty, remote_fileio_func_system): Add
8228         remote_target parameter.
8229         (remote_fio_func_map) <func>: Add remote_target parameter.
8230         (do_remote_fileio_request, remote_fileio_request):
8231         * remote-fileio.h (remote_fileio_request):
8232         * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
8233         remote_target parameter.
8234         (remote_notif_process, handle_notification): Adjust to pass down
8235         the remote.
8236         (remote_notif_state_allocate): Add remote_target parameter.  Save
8237         it.
8238         * remote-notif.h (struct remote_target): Forward declare.
8239         (struct notif_client) <parse, ack, can_get_pending_events>: Add
8240         remote_target parameter.
8241         (struct remote_notif_state) <remote>: New field.
8242         (remote_notif_ack, remote_notif_parse): Add remote_target
8243         parameter.
8244         (remote_notif_state_allocate, remote_notif_state_allocate): Add
8245         remote_target parameter.
8246         * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
8247         (threads_listing_context, rmt_thread_action, protocol_feature)
8248         (packet_reg, stop_reply, stop_reply_p, enum packet_support)
8249         (packet_result, struct threads_listing_context, remote_state):
8250         Move definitions and declarations higher up.
8251         (remote_target) <~remote_target>: Declare.
8252         (remote_download_command_source, remote_file_put, remote_file_get)
8253         (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
8254         (remote_hostio_pread_vFile, remote_hostio_send_command)
8255         (remote_hostio_set_filesystem, remote_hostio_open)
8256         (remote_hostio_close, remote_hostio_unlink, remote_state)
8257         (get_remote_state, get_remote_packet_size, get_memory_packet_size)
8258         (get_memory_write_packet_size, get_memory_read_packet_size)
8259         (append_pending_thread_resumptions, remote_detach_1)
8260         (append_resumption, remote_resume_with_vcont)
8261         (add_current_inferior_and_thread, wait_ns, wait_as)
8262         (process_stop_reply, remote_notice_new_inferior)
8263         (process_initial_stop_replies, remote_add_thread)
8264         (btrace_sync_conf, remote_btrace_maybe_reopen)
8265         (remove_new_fork_children, kill_new_fork_children)
8266         (discard_pending_stop_replies, stop_reply_queue_length)
8267         (check_pending_events_prevent_wildcard_vcont)
8268         (discard_pending_stop_replies_in_queue, stop_reply)
8269         (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
8270         (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
8271         (remote_interrupt_as, remote_interrupt_ns)
8272         (remote_get_noisy_reply, remote_query_attached)
8273         (remote_add_inferior, remote_current_thread, get_current_thread)
8274         (set_thread, set_general_thread, set_continue_thread)
8275         (set_general_process, write_ptid)
8276         (remote_unpack_thread_info_response, remote_get_threadinfo)
8277         (parse_threadlist_response, remote_get_threadlist)
8278         (remote_threadlist_iterator, remote_get_threads_with_ql)
8279         (remote_get_threads_with_qxfer)
8280         (remote_get_threads_with_qthreadinfo, extended_remote_restart)
8281         (get_offsets, remote_check_symbols, remote_supported_packet)
8282         (remote_query_supported, remote_packet_size)
8283         (remote_serial_quit_handler, remote_detach_pid)
8284         (remote_vcont_probe, remote_resume_with_hc)
8285         (send_interrupt_sequence, interrupt_query)
8286         (remote_notif_get_pending_events, fetch_register_using_p)
8287         (send_g_packet, process_g_packet, fetch_registers_using_g)
8288         (store_register_using_P, store_registers_using_G)
8289         (set_remote_traceframe, check_binary_download)
8290         (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
8291         (remote_xfer_live_readonly_partial, remote_read_bytes)
8292         (remote_send_printf, remote_flash_write, readchar)
8293         (remote_serial_write, putpkt, putpkt_binary, skip_frame)
8294         (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
8295         (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
8296         (extended_remote_disable_randomization, extended_remote_run)
8297         (send_environment_packet, extended_remote_environment_support)
8298         (extended_remote_set_inferior_cwd, remote_write_qxfer)
8299         (remote_read_qxfer, push_stop_reply, vcont_r_supported)
8300         (packet_command): Now methods of ...
8301         (remote_target): ... this class.
8302         (m_remote_state) <remote_target>: New field.
8303         (struct remote_state) <stop_reply_queue,
8304         remote_async_inferior_event_token, wait_forever_enabled_p>: New
8305         fields.
8306         (remote_state::remote_state): Allocate stop_reply_queue.
8307         (remote_state): Delete global.
8308         (get_remote_state_raw): Delete.
8309         (remote_target::get_remote_state): Allocate m_remote_state on
8310         demand.
8311         (get_current_remote_target): New.
8312         (remote_ops, extended_remote_ops): Delete.
8313         (wait_forever_enabled_p, remote_async_inferior_event_token):
8314         Delete, moved to struct remote_state.
8315         (remote_target::close): Delete self.  Destruction bits split to
8316         ...
8317         (remote_target::~remote_target): ... this.
8318         (show_memory_packet_size): Adjust to use
8319         get_current_remote_target.
8320         (struct protocol_feature) <func>: Add remote_target parameter.
8321         All callers adjusted.
8322         (curr_quit_handler_target): New.
8323         (remote_serial_quit_handler): Reimplement.
8324         (remote_target::open_1): Adjust to use get_current_remote_target.
8325         Heap-allocate remote_target/extended_remote_target instances.
8326         (vcont_builder::vcont_builder): Add remote_target parameter, and
8327         save it in m_remote.  All callers adjusted.
8328         (vcont_builder::m_remote): New field.
8329         (vcont_builder::restart, vcont_builder::flush)
8330         (vcont_builder::push_action): Use it.
8331         (remote_target::commit_resume): Use it.
8332         (struct queue_iter_param) <remote>: New field.
8333         (remote_target::remove_new_fork_children): Fill in 'remote' field.
8334         (check_pending_event_prevents_wildcard_vcont_callback_data): New.
8335         (check_pending_event_prevents_wildcard_vcont_callback)
8336         (remote_target::check_pending_events_prevent_wildcard_vcont)
8337         (remote_target::discard_pending_stop_replies)
8338         (remote_target::discard_pending_stop_replies_in_queue)
8339         (remote_target::remote_notif_remove_queued_reply): Fill in
8340         'remote' field.
8341         (remote_notif_get_pending_events): New.
8342         (remote_target::readchar, remote_target::remote_serial_write):
8343         Save/restore curr_quit_handler_target.
8344         (putpkt): New.
8345         (kill_new_fork_children): Fill in 'remote' field.
8346         (packet_command): Use get_current_remote_target, defer to
8347         remote_target method of same name.
8348         (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
8349         parameter, and save it in m_remote.  All callers adjusted.
8350         (scoped_remote_fd::release): Use m_remote.
8351         (scoped_remote_fd::m_remote): New field.
8352         (remote_file_put, remote_file_get, remote_file_delete): Use
8353         get_current_remote_target, defer to remote_target method of same
8354         name.
8355         (remote_btrace_reset): Add remote_state paremeter.  Update all
8356         callers.
8357         (remote_async_inferior_event_handler). Pass down 'data'.
8358         (remote_new_objfile): Use get_current_remote_target.
8359         (remote_target::vcont_r_supported): New.
8360         (set_range_stepping): Use get_current_remote_target and
8361         remote_target::vcont_r_supported.
8362         (_initialize_remote): Don't allocate 'remote_state' and
8363         'stop_reply_queue' globals.
8364         * remote.h (struct remote_target): Forward declare.
8365         (getpkt, putpkt, remote_notif_get_pending_events): Add
8366         'remote_target' parameter.
8367
8368 2018-05-22  Pedro Alves  <palves@redhat.com>
8369
8370         * remote.c (vcont_builder): Now a class.  Make all data members
8371         private.
8372         (vcont_builder) <vcont_builder, restart, flush, push_action>:
8373         Declare methods.
8374         (vcont_builder_restart): Rename to ...
8375         (vcont_builder::restart): ... this.
8376         (vcont_builder_flush): Rename to ...
8377         (vcont_builder::flush): ... this.
8378         (vcont_builder_push_action): Rename to ...
8379         (vcont_builder::push_action): ... this.
8380         (remote_target::commit_resume): Adjust.
8381
8382 2018-05-22  Pedro Alves  <palves@redhat.com>
8383
8384         * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
8385         (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
8386         (get_fixed_memory_packet_size): New.
8387         (get_memory_packet_size): Use it.
8388         (set_memory_packet_size): Don't override the config size with
8389         DEFAULT_MAX_MEMORY_PACKET_SIZE.
8390         (show_memory_packet_size): Use get_fixed_memory_packet_size.
8391         Don't refer to get_memory_packet_size if not connected to a remote
8392         target.  Show "(default)" if configured size is 0.
8393
8394 2018-05-22  Pedro Alves  <palves@redhat.com>
8395
8396         * remote.c (remote_target::mourn_inferior): Move
8397         discard_pending_stop_replies call here from ...
8398         (_initialize_remote): ... here.
8399
8400 2018-05-22  Pedro Alves  <palves@redhat.com>
8401
8402         * remote.c (compare_section_command): Remove set_general_process
8403         call.
8404
8405 2018-05-22  Pedro Alves  <palves@redhat.com>
8406
8407         * remote.c (struct packet_reg, struct remote_arch_state):
8408         Move higher up in the file.
8409         (remote_state) <m_arch_states>: Store remote_arch_state values
8410         instead of remote_arch_state pointers.
8411         (remote_state::get_remote_arch_state): Adjust.
8412
8413 2018-05-22  Pedro Alves  <palves@redhat.com>
8414
8415         * remote.c: Include <unordered_map>.
8416         (remote_state): Now a class.
8417         (remote_state) <get_remote_arch_state>: Declare method.
8418         <get_remote_arch_state>: New field.
8419         (remote_arch_state) <remote_arch_state>: Declare ctor.
8420         <regs>: Now a unique_ptr.
8421         (remote_gdbarch_data_handle): Delete.
8422         (get_remote_arch_state): Delete.
8423         (remote_state::get_remote_arch_state): New.
8424         (get_remote_state): Adjust to call remote_state's
8425         get_remote_arch_state method.
8426         (init_remote_state): Delete, bits factored out to ...
8427         (remote_arch_state::remote_arch_state): ... this new method.
8428         (get_remote_packet_size, get_memory_packet_size)
8429         (process_g_packet, remote_target::fetch_registers)
8430         (remote_target::prepare_to_store, store_registers_using_G)
8431         (remote_target::store_registers, remote_target::get_trace_status):
8432         Adjust to call remote_state's method.
8433         (_initialize_remote): Remove reference to
8434         remote_gdbarch_data_handle.
8435
8436 2018-05-22  Pedro Alves  <palves@redhat.com>
8437
8438         * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
8439         pread>: New method declarations.
8440         (remote_target::open_1): Adjust.
8441         (readahead_cache_invalidate): Rename to ...
8442         (readahead_cache::invalidate): ... this, and adjust to be a class
8443         method.
8444         (readahead_cache_invalidate_fd): Rename to ...
8445         (readahead_cache::invalidate_fd): ... this, and adjust to be a
8446         class method.
8447         (remote_hostio_pwrite): Adjust.
8448         (remote_hostio_pread_from_cache): Rename to ...
8449         (readahead_cache::pread): ... this, and adjust to be a class
8450         method.
8451         (remote_hostio_close): Adjust.
8452
8453 2018-05-22  Pedro Alves  <palves@redhat.com>
8454
8455         * remote.c (remote_hostio_close_cleanup): Delete.
8456         (class scoped_remote_fd): New.
8457         (remote_file_put, remote_file_get): Use it.
8458
8459 2018-05-22  Pedro Alves  <palves@redhat.com>
8460
8461         (struct vCont_action_support): Use bool and initialize all fields.
8462         (struct readahead_cache): Initialize all fields.
8463         (remote_state): Use bool and initialize all fields.
8464         (remote_state::remote_state, remote_state::~remote_state): New.
8465         (new_remote_state): Delete.
8466         (_initialize_remote): Use new to allocate remote_state.
8467
8468 2018-05-22  Pedro Alves  <palves@redhat.com>
8469             張俊芝  <zjz@zjz.name>
8470
8471         PR gdb/22973
8472         * c-exp.y: Include "c-support.h".
8473         (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
8474         of tolower.  Use c_ident_is_alpha to scan names.
8475         * c-lang.c: Include "c-support.h".
8476         (convert_ucn, convert_octal, convert_hex, convert_escape): Use
8477         ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
8478         * c-support.h: New file, with bits factored out from ...
8479         * cp-name-parser.y: ... this file.
8480         Include "c-support.h".
8481         (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
8482         c-support.h and renamed.
8483         (symbol_end, yylex): Adjust.
8484
8485 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8486
8487         * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
8488         parameter type to CORE_ADDR.
8489         * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
8490         parameter type in declaration to CORE_ADDR.
8491         * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
8492         target_auxv_search to get AT_HWCAP and use the result to get the
8493         target description.
8494         * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
8495         to CORE_ADDR. Remove the cast of the return value to unsigned
8496         long. Fix error predicate of target_auxv_search.
8497         (ppc_linux_nat_target::read_description): Change the type of the
8498         hwcap variable to CORE_ADDR.
8499
8500 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8501
8502         * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
8503         if the size of fpscr is larger than 32 bits.
8504
8505 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8506
8507         * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
8508         (ppc32_linux_vsxregmap): New global.
8509         (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
8510         regcache_supply_regset, and regcache_collect_regset.
8511         * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
8512         * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
8513         (fetch_vsx_register, store_vsx_register): Remove.
8514         (fetch_vsx_registers): Add regno parameter. Get regset using
8515         ppc_linux_vsxregset. Use regset to supply registers.
8516         (store_vsx_registers): Add regno parameter. Get regset using
8517         ppc_linux_vsxregset. Use regset to collect registers.
8518         (fetch_register): Call fetch_vsx_registers instead of
8519         fetch_vsx_register.
8520         (store_register): Call store_vsx_registers instead of
8521         store_vsx_register.
8522         (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
8523         new regno parameter.
8524         (store_ppc_registers): Call store_vsx_registers with -1 for the
8525         new regno parameter.
8526         * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
8527         (ppc_collect_vsxregset): Remove.
8528
8529 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8530
8531         * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
8532         offset fields.
8533         * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
8534         for vector register offset fields.
8535         (ppc64_fbsd_reg_offsets): Likewise.
8536         * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
8537         to vector register offset fields.
8538         * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
8539         to vector register offset fields.
8540         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
8541         vector register offset fields.
8542         * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
8543         initializers for vector register offset fields.
8544         (rs6000_aix64_reg_offsets): Likewise.
8545         * rs6000-tdep.c (ppc_vrreg_offset): Remove.
8546         (ppc_supply_vrregset): Remove.
8547         (ppc_collect_vrregset): Remove.
8548         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
8549         (ppc_linux_vrregset) : New function.
8550         (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
8551         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
8552         (ppc32_linux_vrregset): Remove.
8553         (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
8554         and use result instead of ppc32_linux_vrregset.
8555         (ppc32_linux_reg_offsets): Remove initializers for vector register
8556         offset fields.
8557         (ppc64_linux_reg_offsets): Likewise.
8558         * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
8559         * ppc-linux-nat.c: Include regset.h.
8560         (gdb_vrregset_t): Adjust comment to account for little-endian
8561         mode.
8562         (supply_vrregset, fill_vrregset): Remove.
8563         (fetch_altivec_register, store_altivec_register): Remove.
8564         (fetch_altivec_registers): Add regno parameter. Get regset using
8565         ppc_linux_vrregset. Use regset to supply registers.
8566         (store_altivec_registers): Add regno parameter. Get regset using
8567         ppc_linux_vrregset. Use regset to collect registers.
8568         (fetch_register): Call fetch_altivec_registers instead of
8569         fetch_altivec_register.
8570         (store_register): Call store_altivec_registers instead of
8571         store_altivec_register.
8572         (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
8573         the new regno parameter.
8574         (store_ppc_registers): Call store_altivec_registers with -1 for
8575         the new regno parameter.
8576
8577 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8578
8579         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
8580         (PPC_LINUX_SIZEOF_VSXREGSET): Define.
8581         * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
8582         (gdb_vrregset_t): Change array type size to
8583         PPC_LINUX_SIZEOF_VRREGSET.
8584         (gdb_vsxregset_t): Change array type size to
8585         PPC_LINUX_SIZEOF_VSXREGSET.
8586         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
8587         Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
8588         PPC_LINUX_SIZEOF_VSXREGSET.
8589
8590 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8591
8592         * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
8593         * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
8594         nat/ppc-linux.c.
8595         (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
8596         ppc_linux_target_wordsize with tid.
8597         (ppc_linux_nat_target::read_description): Call ppc_linux_target
8598         wordsize with tid.
8599         * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
8600         (ppc64_64bit_inferior_p): Add static and inline specifiers.
8601         (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
8602         tid parameter. Remove static specifier.
8603         * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
8604         (ppc_linux_target_wordsize): New declaration.
8605
8606 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8607
8608         * arch/ppc-linux-common.c: New file.
8609         * arch/ppc-linux-common.h: New file.
8610         * arch/ppc-linux-tdesc.h: New file.
8611         * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
8612         * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
8613         (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
8614         arch/ppc-linux-tdesc.h.
8615         * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
8616         arch/ppc-linux-tdesc.h.
8617         (ppc_linux_nat_target::read_description): Remove target
8618         description matching code. Fill a ppc_linux_features struct and
8619         call ppc_linux_match_description with it. Move comment about ISA
8620         2.05 to ppc-linux-common.c.
8621         * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
8622         arch/ppc-linux-tdesc.h.
8623         (ppc_linux_core_read_description): Remove target description
8624         matching code. Fill a ppc_linux_features struct and call
8625         ppc_linux_match_description with it.
8626         * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
8627         (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
8628         (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
8629         (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
8630         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
8631         (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
8632         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
8633         (tdesc_powerpc_e500l): Remove.
8634
8635 2018-05-22  Joel Brobecker  <brobecker@adacore.com>
8636
8637         * ada-lang.c (catch_assert_command): Pass empty string instead
8638         of NULL for excep_string argument.
8639
8640 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
8641
8642         * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
8643         the width of the requested register exceeds the width of the
8644         `ptrace' data type.
8645
8646 2018-05-21  Tom Tromey  <tom@tromey.com>
8647
8648         * printcmd.c (output_command): Remove.
8649         (output_command_const): Rename to output_command.
8650         * valprint.h (output_command): Rename from output_command_const.
8651         * tracepoint.c (trace_dump_actions): Call output_command.
8652
8653 2018-05-21  Tom Tromey  <tom@tromey.com>
8654
8655         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
8656         (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
8657         * ada-lang.h (create_ada_exception_catchpoint): Update.
8658         * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
8659         std::string.
8660         (create_excep_cond_exprs, ~ada_catchpoint)
8661         (should_stop_exception, print_one_exception)
8662         (print_mention_exception, print_recreate_exception): Update.
8663         (ada_get_next_arg): Remove.
8664         (catch_ada_exception_command_split): Use std::string.  Change type
8665         of "excep_string", "cond_string".
8666         (catch_ada_exception_command): Update.
8667         (create_ada_exception_catchpoint): Change type of excep_string.
8668         (ada_exception_sal): Remove excep_string parameter.
8669         (~ada_catchpoint): Remove.
8670
8671 2018-05-21  Tom Tromey  <tom@tromey.com>
8672
8673         * ada-lang.c (ada_collect_symbol_completion_matches): Remove
8674         cleanup.
8675
8676 2018-05-21  Tom Tromey  <tom@tromey.com>
8677
8678         * ada-lang.c (ada_exception_message_1, ada_exception_message):
8679         Return unique_xmalloc_ptr.
8680         (print_it_exception): Update.
8681
8682 2018-05-21  Tom Tromey  <tom@tromey.com>
8683
8684         * tracepoint.c (trace_dump_actions): Use std::string.
8685
8686 2018-05-21  Tom Tromey  <tom@tromey.com>
8687
8688         * symfile.c (reread_symbols): Use std::string for original_name.
8689
8690 2018-05-21  Tom Tromey  <tom@tromey.com>
8691
8692         * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
8693         (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN.  Default
8694         constructor.
8695
8696 2018-05-20  Simon Marchi  <simon.marchi@polymtl.ca>
8697
8698         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
8699         instance to...
8700         (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
8701         * objfiles.c (get_objfile_bfd_data): Allocate
8702         objfile_per_bfd_storage with obstack_new when allocating on
8703         obstack.
8704
8705 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
8706
8707         * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
8708         OBSTACK_ZALLOC.
8709         * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
8710         * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
8711         * mdebugread.c (mdebug_build_psymtabs): Likewise.
8712         (add_pending): Likewise.
8713         (parse_symbol): Likewise.
8714         (parse_partial_symbols): Likewise.
8715         (psymtab_to_symtab_1): Likewise.
8716         (new_psymtab): Likewise.
8717         (elfmdebug_build_psymtabs): Likewise.
8718         * minsyms.c (terminate_minimal_symbol_table): Likewise.
8719         * objfiles.c (get_objfile_bfd_data): Likewise.
8720         (objfile_register_static_link): Likewise.
8721         * psymtab.c (allocate_psymtab): Likewise.
8722         * stabsread.c (read_member_functions): Likewise.
8723         * xcoffread.c (xcoff_end_psymtab): Likewise.
8724
8725 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
8726
8727         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
8728         compiler supports std::is_trivially_constructible.
8729         * common/poison.h: Include obstack.h.
8730         (IsMallocable): Define to is_trivially_constructible if the
8731         compiler supports it, define to true_type otherwise.
8732         (xobnew): New.
8733         (XOBNEW): Redefine.
8734         (xobnewvec): New.
8735         (XOBNEWVEC): Redefine.
8736         * gdb_obstack.h (obstack_zalloc): New.
8737         (OBSTACK_ZALLOC): Redefine.
8738         (obstack_calloc): New.
8739         (OBSTACK_CALLOC): Redefine.
8740         (obstack_new): New.
8741         * gdbarch.sh: Include gdb_obstack in gdbarch.h.
8742         (gdbarch_obstack): New declaration in gdbarch.h, definition in
8743         gdbarch.c.
8744         (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
8745         obstack_calloc/obstack_zalloc.
8746         (gdbarch_obstack_zalloc): Remove.
8747         * target-descriptions.c (tdesc_data_init): Use obstack_new.
8748
8749 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
8750
8751         * stack.c (backtrace_command_1): Remove useless variable int i.
8752
8753 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
8754
8755         * stack.c (print_frame_info): Fix comment.
8756
8757 2018-05-18  Tom Tromey  <tom@tromey.com>
8758
8759         * dwarf2read.c (struct dwz_file): Add constructor, initializers.
8760         <dwz_bfd>: Now a gdb_bfd_ref_ptr.
8761         (~dwarf2_per_objfile): Update
8762         (dwarf2_get_dwz_file): Use new.
8763         * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
8764         unique_ptr.
8765
8766 2018-05-18  Tom Tromey  <tom@tromey.com>
8767
8768         * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
8769         unique_ptr.
8770         * dwarf2read.c (struct dwp_file): Add constructor and
8771         initializers.
8772         (open_and_init_dwp_file): Return a unique_ptr.
8773         (dwarf2_per_objfile, create_dwp_hash_table)
8774         (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
8775         (lookup_dwo_unit_in_dwp): Update.
8776         (open_and_init_dwp_file, get_dwp_file): Update.
8777
8778 2018-05-18  Tom Tromey  <tom@tromey.com>
8779
8780         * dwarf2read.c (dwarf2_per_objfile): Update.
8781         (struct mapped_index): Add initializers.
8782         (dwarf2_read_index): Use new.
8783         (dw2_symtab_iter_init): Update.
8784         * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
8785         unique_ptr.
8786
8787 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
8788
8789         * dwarf2read.c (mapped_index) <total_size>: Remove.
8790
8791 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
8792
8793         * unittests/format_pieces-selftests.c (test_format_specifier):
8794         Add ARI comments.
8795
8796 2018-05-18  Tom Tromey  <tom@tromey.com>
8797
8798         * c-typeprint.c (maybe_print_hole): New function.
8799         (c_print_type_struct_field_offset): Update.
8800         (c_type_print_base_struct_union): Call maybe_print_hole.
8801
8802 2018-05-17  Keith Seitz  <keiths@redhat.com>
8803
8804         * breakpoint.c (build_bpstat_chain): New function, moved from
8805         bpstat_stop_status.
8806         (bpstat_stop_status): Add optional parameter, `stop_chain'.
8807         If no stop chain is passed, call build_bpstat_chain to build it.
8808         * breakpoint.h (build_bpstat_chain): Declare.
8809         (bpstat_stop_status): Move documentation here from breakpoint.c.
8810         * infrun.c (handle_signal_stop): Before eliding inlined frames,
8811         build the stop chain and pass it to skip_inline_frames.
8812         Pass this stop chain to bpstat_stop_status.
8813         * inline-frame.c: Include breakpoint.h.
8814         (stopped_by_user_bp_inline_frame): New function.
8815         (skip_inline_frames): Add parameter `stop_chain'.
8816         Move documention to inline-frame.h.
8817         If non-NULL, use stopped_by_user_bp_inline_frame to determine
8818         whether the frame should be elided.
8819         * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
8820         Add moved documentation and update for new parameter.
8821
8822 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
8823
8824         PR cli/14975
8825         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8826         unittests/format_pieces-selftests.c.
8827         * common/format.h (format_piece) <operator==>: New.
8828         (format_pieces) <operator[]>: Remove.
8829         * common/format.c (format_pieces::format_pieces): Handle \e.
8830         * unittests/format_pieces-selftests.c: New.
8831
8832 2018-05-17  Tom Tromey  <tom@tromey.com>
8833
8834         PR symtab/23010:
8835         * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
8836         (dw2_instantiate_symtab): Add skip_partial parameter.
8837         (dw2_find_last_source_symtab, dw2_map_expand_apply)
8838         (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
8839         (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
8840         (dw2_expand_symtabs_matching_one)
8841         (dw2_find_pc_sect_compunit_symtab)
8842         (dw2_debug_names_lookup_symbol)
8843         (dw2_debug_names_expand_symtabs_for_function): Update.
8844         (init_cutu_and_read_dies): Add skip_partial parameter.
8845         (process_psymtab_comp_unit, build_type_psymtabs_1)
8846         (process_skeletonless_type_unit, load_partial_comp_unit)
8847         (psymtab_to_symtab_1): Update.
8848         (load_full_comp_unit): Add skip_partial parameter.
8849         (process_imported_unit_die, dwarf2_read_addr_index)
8850         (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
8851         (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
8852         (read_signatured_type): Update.
8853
8854 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
8855
8856         * value.c (release_value): Remove unused variable.
8857         (record_latest_value): Likewise.
8858         (access_value_history): Likewise.
8859         (preserve_values): Likewise.
8860
8861 2018-05-17  Tom Tromey  <tom@tromey.com>
8862
8863         * extension.h (struct ext_lang_type_printers) <py_type_printers>:
8864         Initialize.
8865
8866 2018-05-16  Maciej W. Rozycki  <macro@mips.com>
8867
8868         PR gdb/22286
8869         * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
8870         Also handle registers whose width is not a multiple of
8871         PTRACE_TYPE_RET.
8872         (linux_nat_trad_target::store_register): Likewise.
8873
8874 2018-05-16  Tom Tromey  <tom@tromey.com>
8875
8876         * gdbcore.h (core_bfd): Redefine.
8877         * corelow.c (core_target::close): Update.
8878         (core_target_open): Update.
8879         * progspace.h (struct program_space) <cbfd>: Now a
8880         gdb_bfd_ref_ptr.
8881
8882 2018-05-16  Tom Tromey  <tom@tromey.com>
8883
8884         PR cli/19551:
8885         * symfile-add-flags.h (enum symfile_add_flags)
8886         <SYMFILE_NOT_FILENAME>: New constant.
8887         * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME.  Get
8888         objfile name from BFD.
8889         (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
8890         * minidebug.c (find_separate_debug_file_in_section): Put
8891         ".gnu_debugdata" into BFD's file name.
8892
8893 2018-05-16  Simon Marchi  <simon.marchi@ericsson.com>
8894
8895         * regcache.c (regcache_read_ftype, regcache_write_ftype):
8896         Remove.
8897
8898 2018-05-15  Tamar Christina  <tamar.christina@arm.com>
8899
8900         PR binutils/21446
8901         * aarch64-tdep.c (aarch64_analyze_prologue,
8902         aarch64_software_single_step, aarch64_displaced_step_copy_insn):
8903         Indicate not interested in errors.
8904
8905 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
8906
8907         * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
8908         Supply the MIPS_ZERO_REGNUM register.
8909
8910 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
8911
8912         * mips-tdep.c (mask_address_var): Make variable static.
8913
8914 2018-05-14  Tom Tromey  <tom@tromey.com>
8915
8916         * dwarf2read.c (rust_union_quirks): Clear rust_unions.
8917
8918 2018-05-11  Andrew Burgess  <andrew.burgess@embecosm.com>
8919
8920         * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
8921         FXSAVE_ADDR for the mxcsr register.
8922
8923 2018-05-11  Max Filippov  <jcmvbkbc@gmail.com>
8924
8925         * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
8926
8927 2018-05-11  Pedro Alves  <palves@redhat.com>
8928
8929         * corelow.c (core_target) <core_target>: No longer inline.
8930         Initialize m_core_gdbarch, m_core_vec and build the section table
8931         here.
8932         <~core_target>: New.
8933         <core_gdbarch, get_core_register_section>: New methods.
8934         <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
8935         factored out from ...
8936         <core_data, core_vec, core_gdbarch>: ... these deleted globals.
8937         (core_ops): Delete.
8938         (sniff_core_bfd): Add gdbarch parameter.
8939         (core_close): Delete, merged into ...
8940         (core_target::close): ... here.  Delete self.
8941         (core_close_cleanup): Delete.
8942         (core_target_open): Allocate a core_target on the heap.  Use a
8943         unique_ptr instead of a cleanup.  Bits moved into the core_target
8944         ctor.  Adjust to use core_target methods instead of globals.
8945         (get_core_register_section): Rename to ...
8946         (core_target::get_core_register_section): ... this and adjust.
8947         (struct get_core_registers_cb_data): New.
8948         (get_core_registers_cb): Use it.  Use bool.
8949         (core_target::fetch_registers, core_target::files_info)
8950         (core_target::xfer_partial, core_target::read_description)
8951         (core_target::pid_to, core_target::thread_name): Adjust to
8952         reference class fields instead of globals.
8953         * target.h (struct target_ops_deleter, target_ops_up): New.
8954
8955 2018-05-11  Pedro Alves  <palves@redhat.com>
8956
8957         * corefile.c (core_file_command): Move to corelow.c.
8958         * corelow.c (the_core_target): Delete.
8959         (core_file_command): Moved from corefile.c.  Check exec_bfd
8960         instead of the_core_target.  Use target_detach instead of calling
8961         into the_core_target directly.
8962         (maybe_say_no_core_file_now): New.
8963         (core_target::detach): Use it.
8964         (_initialize_corelow): Remove references to the_core_target.
8965         * gdbcore.h (the_core_target): Delete.
8966
8967 2018-05-11  Tom Tromey  <tromey@redhat.com>
8968             Pedro Alves  <palves@redhat.com>
8969
8970         * corefile.c (core_bfd): Remove.
8971         * gdbcore.h (core_bfd): Now a macro.
8972         * progspace.h (struct program_space) <cbfd>: New field.
8973
8974 2018-05-11  Tom Tromey  <tom@tromey.com>
8975
8976         * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
8977         gdb::def_vector.
8978
8979 2018-05-10  Tom Tromey  <tom@tromey.com>
8980
8981         * configure: Rebuild.
8982         * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
8983
8984 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
8985
8986         PR server/23158:
8987         * regformats/regdat.sh: Adjust script, following the addition
8988         of the new expedite_regs parameter to init_target_desc.
8989
8990 2018-05-10  Omair Javaid  <omair.javaid@linaro.org>
8991     
8992         PR gdb/23127
8993         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
8994         set_gdbarch_significant_addr_bit.
8995         * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
8996         set_gdbarch_significant_addr_bit.
8997         * utils.c (address_significant): Update to sign extend addr.
8998
8999 2018-05-09  Max Filippov  <jcmvbkbc@gmail.com>
9000
9001         * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
9002         (xtensa_linux_init_abi): Limit tdep->num_regs by
9003         tdep->num_nopriv_regs.
9004         * xtensa-tdep.c (xtensa_derive_tdep): Calculate
9005         tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
9006         not initialized.
9007
9008 2018-05-08  Simon Marchi  <simon.marchi@ericsson.com>
9009
9010         * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
9011
9012 2018-05-08  Andrew Burgess  <andrew.burgess@embecosm.com>
9013
9014         * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
9015         (I387_MXCSR_INIT_VAL): New constant.
9016         * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
9017         buffer if it was supplied by the inferior.
9018         * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
9019         (i387_xsave_get_clear_bv): New function.
9020         (i387_supply_xsave): Only read x87 control registers from the
9021         xsave buffer if the feature is enabled, and the state will have
9022         been written, otherwise, provide a suitable default.
9023         (i387_collect_xsave): Pre-clear all registers in xsave buffer,
9024         including x87 control registers.  Update control registers if they
9025         have changed from the default value, and mark features as enabled
9026         as required.
9027         * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
9028
9029 2018-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
9030
9031         * spu-tdep.c (info_spu_event_command): Fix output formatting.
9032
9033 2018-05-07  Tom Tromey  <tom@tromey.com>
9034
9035         * configure: Rebuild.
9036         * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
9037
9038 2018-05-07  Tom Tromey  <tom@tromey.com>
9039
9040         PR tdep/20362:
9041         * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
9042         bit.  Use correct value for VDIV.
9043
9044 2018-05-04  Tom Tromey  <tom@tromey.com>
9045
9046         * configure: Rebuild.
9047         * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
9048
9049 2018-05-04  Tom Tromey  <tom@tromey.com>
9050
9051         * linux-record.c (record_linux_system_call) <case
9052         RECORD_SYS_RECVFROM>: Add "break".
9053
9054 2018-05-04  Tom Tromey  <tom@tromey.com>
9055
9056         * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
9057         Add missing "break".
9058         * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
9059         Add missing "break".
9060
9061 2018-05-04  Tom Tromey  <tom@tromey.com>
9062
9063         * rs6000-tdep.c (ppc_process_record_op4)
9064         (ppc_process_record_op63): Add fall-through comment.
9065
9066 2018-05-04  Tom Tromey  <tom@tromey.com>
9067
9068         * i386-tdep.c (i386_process_record): Add fall-through comment.
9069
9070 2018-05-04  Tom Tromey  <tom@tromey.com>
9071
9072         * stabsread.c (define_symbol) <case 'p'>: Add fall-through
9073         comment.
9074
9075 2018-05-04  Tom Tromey  <tom@tromey.com>
9076
9077         * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
9078         * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
9079         * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
9080         comment.
9081         * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
9082         comment.
9083         * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
9084         comment.
9085
9086 2018-05-04  Tom Tromey  <tom@tromey.com>
9087
9088         * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
9089
9090 2018-05-04  Tom Tromey  <tom@tromey.com>
9091
9092         * s390-tdep.c (s390_process_record): Fix fall-through comments.
9093         * xcoffread.c (scan_xcoff_symtab): Move comment later.
9094         * symfile.c (section_is_mapped): Fix fall-through comment.
9095         * stabsread.c (define_symbol, read_member_functions): Fix
9096         fall-through comment.
9097         * s390-linux-tdep.c (s390_process_record): Fix fall-through
9098         comment.
9099         * remote.c (remote_wait_as): Fix fall-through comment.
9100         * p-exp.y (yylex): Fix fall-through comment.
9101         * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
9102         comment.
9103         * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
9104         * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
9105         * jv-exp.y (yylex): Fix fall-through comment.
9106         * go-exp.y (lex_one_token): Fix fall-through comment.
9107         * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
9108         fall-through comment.
9109         * f-exp.y (yylex): Fix fall-through comment.
9110         * dwarf2read.c (process_die): Fix fall-through comments.
9111         * dbxread.c (process_one_symbol): Fix fall-through comment.
9112         * d-exp.y (lex_one_token): Fix fall-through comment.
9113         * cp-name-parser.y (yylex): Fix fall-through comment.
9114         * coffread.c (coff_symtab_read): Fix fall-through comment.
9115         * c-exp.y (lex_one_token): Fix fall-through comment.
9116         * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
9117         comment.
9118         * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
9119         comment.
9120
9121 2018-05-04  Tom Tromey  <tom@tromey.com>
9122
9123         PR python/22730:
9124         * NEWS: Mention gdb.execute change.
9125         * gdbcmd.h (execute_control_command): Don't declare.
9126         * python/python.c (execute_gdb_command): Use read_command_lines_1,
9127         execute_control_commands, execute_control_commands_to_string.
9128         * cli/cli-script.h (execute_control_commands)
9129         (execute_control_commands_to_string): Declare.
9130         (execute_control_command): Add from_tty parameter.
9131         * cli/cli-script.c (execute_control_commands)
9132         (execute_control_commands_to_string): New functions.
9133         (execute_user_command): Use execute_control_commands.
9134         (execute_control_command_1): Add "from_tty" parameter.  Update.
9135         (execute_control_command): Likewise.
9136
9137 2018-05-04  Tom Tromey  <tom@tromey.com>
9138
9139         PR python/22731:
9140         * NEWS: Mention that breakpoint commands are writable.
9141         * python/py-breakpoint.c (bppy_set_commands): New function.
9142         (breakpoint_object_getset) <"commands">: Use it.
9143
9144 2018-05-04  Tom Tromey  <tom@tromey.com>
9145
9146         * tracepoint.c (actions_command): Update.
9147         * mi/mi-cmd-break.c (mi_command_line_array)
9148         (mi_command_line_array_cnt, mi_command_line_array_ptr)
9149         (mi_read_next_line): Remove.
9150         (mi_cmd_break_commands): Update.
9151         * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
9152         function_view.
9153         * cli/cli-script.c (get_command_line): Update.
9154         (process_next_line): Use function_view.  Constify.
9155         (recurse_read_control_structure, read_command_lines)
9156         (read_command_lines_1): Change argument types to function_view.
9157         (do_define_command, document_command): Update.
9158         * breakpoint.h (check_tracepoint_command): Don't declare.
9159         * breakpoint.c (check_tracepoint_command): Remove.
9160         (commands_command_1, create_tracepoint_from_upload): Update.
9161
9162 2018-05-04  Tom Tromey  <tom@tromey.com>
9163
9164         PR gdb/11750:
9165         * cli/cli-script.h (enum command_control_type) <define_control>:
9166         New constant.
9167         * cli/cli-script.c (multi_line_command_p): Handle define_control.
9168         (build_command_line, execute_control_command_1)
9169         (process_next_line): Likewise.
9170         (do_define_command): New function, extracted from define_command.
9171         (define_command): Use it.
9172
9173 2018-05-04  Tom Tromey  <tom@tromey.com>
9174
9175         * tracepoint.c (actions_command): Update.
9176         * cli/cli-script.h (read_command_lines): Update.
9177         * cli/cli-script.c (read_command_lines): Constify prompt_arg.
9178         (MAX_TMPBUF): Remove define.
9179         (define_command): Use string_printf.
9180         (document_command): Likewise.
9181         * breakpoint.c (commands_command_1): Update.
9182
9183 2018-05-04  Tom Tromey  <tom@tromey.com>
9184
9185         * top.c (execute_command): Update.
9186         * cli/cli-script.h (print_command_lines): Now varargs.
9187         * cli/cli-script.c (print_command_lines): Now varargs.
9188         (execute_control_command_1) <case while_control, case if_control>:
9189         Update.
9190
9191 2018-05-04  Tom Tromey  <tom@tromey.com>
9192
9193         * tracepoint.c (all_tracepoint_actions): Rename from
9194         all_tracepoint_actions_and_cleanup.  Change return type.
9195         (actions_command, encode_actions_1, encode_actions)
9196         (trace_dump_actions, tdump_command): Update.
9197         * remote.c (remote_download_command_source): Update.
9198         * python/python.c (gdbpy_eval_from_control_command)
9199         (python_command, python_interactive_command): Update.
9200         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
9201         * guile/guile.c (guile_command)
9202         (gdbscm_eval_from_control_command, guile_command): Update.
9203         * compile/compile.c (compile_code_command)
9204         (compile_print_command, compile_to_object): Update.
9205         * cli/cli-script.h (struct command_lines_deleter): New.
9206         (counted_command_line): New typedef.
9207         (struct command_line): Add constructor, destructor.
9208         <body_list>: Remove.
9209         <body_list_0, body_list_1>: New members.
9210         (command_line_up): Remove typedef.
9211         (read_command_lines, read_command_lines_1, get_command_line):
9212         Update.
9213         (copy_command_lines): Don't declare.
9214         * cli/cli-script.c (build_command_line): Use "new".
9215         (get_command_line): Return counted_command_line.
9216         (print_command_lines, execute_user_command)
9217         (execute_control_command_1, while_command, if_command): Update.
9218         (realloc_body_list): Remove.
9219         (process_next_line, recurse_read_control_structure): Update.
9220         (read_command_lines, read_command_lines_1): Return counted_command_line.
9221         (free_command_lines): Use "delete".
9222         (copy_command_lines): Remove.
9223         (define_command, document_command, show_user_1): Update.
9224         * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
9225         a counted_command_line.
9226         * breakpoint.h (counted_command_line): Remove typedef.
9227         (breakpoint_set_commands): Update.
9228         * breakpoint.c (check_no_tracepoint_commands)
9229         (validate_commands_for_breakpoint): Update.
9230         (breakpoint_set_commands): Change commands to be a
9231         counted_command_line.
9232         (commands_command_1, update_dprintf_command_list)
9233         (create_tracepoint_from_upload): Update.
9234
9235 2018-05-04  Tom Tromey  <tom@tromey.com>
9236
9237         * cli/cli-decode.h (cmd_list_element): New constructor.
9238         (~cmd_list_element): New destructor.
9239         (struct cmd_list_element): Add initializers.
9240         * cli/cli-decode.c (do_add_cmd): Use "new".
9241         (delete_cmd): Use "delete".
9242
9243 2018-05-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
9244             Pedro Alves <palves@redhat.com>
9245
9246         PR breakpoints/19806 and support for PR external/20207.
9247         * NEWS: Mention Aarch64 watchpoint improvements.
9248         * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
9249         watchpoints and PR external/20207 watchpoints.
9250         * nat/aarch64-linux-hw-point.c
9251         (kernel_supports_any_contiguous_range): New.
9252         (aarch64_watchpoint_offset): New.
9253         (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
9254         (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
9255         (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
9256         (aarch64_align_watchpoint): New parameters aligned_offset_p and
9257         next_addr_orig_p.  Support PR external/20207 watchpoints.
9258         (aarch64_downgrade_regs): New.
9259         (aarch64_dr_state_insert_one_point): New parameters offset and
9260         addr_orig.
9261         (aarch64_dr_state_remove_one_point): Likewise.
9262         (aarch64_handle_breakpoint): Update caller.
9263         (aarch64_handle_aligned_watchpoint): Likewise.
9264         (aarch64_handle_unaligned_watchpoint): Support addr_orig and
9265         aligned_offset.
9266         (aarch64_linux_set_debug_regs): Remove const from state.  Call
9267         aarch64_downgrade_regs.
9268         (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
9269         * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
9270         (DR_CONTROL_MASK): ... this.
9271         (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
9272         (unsigned int aarch64_watchpoint_offset): New prototype.
9273         (aarch64_linux_set_debug_regs): Remove const from state.
9274         * utils.c (align_up, align_down): Move to ...
9275         * common/common-utils.c (align_up, align_down): ... here.
9276         * utils.h (align_up, align_down): Move to ...
9277         * common/common-utils.h (align_up, align_down): ... here.
9278
9279 2018-05-04  Joel Brobecker  <brobecker@adacore.com>
9280
9281         * sparc-tdep.c (sparc_structure_return_p): Re-implement to
9282         match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
9283         (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
9284         Re-implement to match the ABI as summarized in GCC's
9285         gcc/config/sparc/sparc.c.  All callers updated.
9286         (sparc32_store_arguments): Remove assertion.
9287
9288 2018-05-04  Tom Tromey  <tom@tromey.com>
9289
9290         * printcmd.c: Don't include tui.h.
9291         (decode_format): Use skip_spaces.
9292
9293 2018-05-04  Tom Tromey  <tom@tromey.com>
9294
9295         PR gdb/22619:
9296         * printcmd.c (last_count): New global.
9297         (x_command): Use saved count when repeating.
9298
9299 2018-05-04  Tom Tromey  <tom@tromey.com>
9300
9301         * nto-procfs.c (do_closedir_cleanup): Remove.
9302         (procfs_pidlist): Use gdb_dir_up.
9303         * procfs.c (do_closedir_cleanup): Remove.
9304         (proc_update_threads): Use gdb_dir_up.
9305         * common/filestuff.h (struct gdb_dir_deleter): New.
9306         (gdb_dir_up): New typedef.
9307
9308 2018-05-04  Tom Tromey  <tom@tromey.com>
9309
9310         * ada-lang.c (print_mention_exception): Use std::string.
9311
9312 2018-05-04  Tom Tromey  <tom@tromey.com>
9313
9314         * ada-lang.c (create_excep_cond_exprs): Update.
9315         (ada_exception_catchpoint_cond_string): Use std::string.
9316
9317 2018-05-04  Tom Tromey  <tom@tromey.com>
9318
9319         * ada-lang.c (xget_renaming_scope): Return std::string.
9320         (old_renaming_is_invisible): Update.
9321
9322 2018-05-04  Tom Tromey  <tom@tromey.com>
9323
9324         * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
9325         (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
9326
9327 2018-05-04  Ulrich Weigand  <uweigand@de.ibm.com>
9328
9329         * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
9330
9331 2018-05-04  Tom Tromey  <tom@tromey.com>
9332
9333         * remote.c (remote_query_supported_append): Change type.
9334         (remote_check_symbols): Update.
9335
9336 2018-05-04  Paul Pluzhnikov  <ppluzhnikov@google.com>
9337
9338         PR gdb/11420
9339         * configure.ac: Prepend libpython.
9340         * python/python-config.py: Likewise.
9341         * configure: Regenerate.
9342
9343 2018-05-03  Simon Marchi  <simon.marchi@ericsson.com>
9344
9345         * Makefile.in (%.c: %.l): Use -t instead of --stdout.
9346
9347 2018-05-03  Pedro Alves  <palves@redhat.com>
9348
9349         * s390-linux-nat.c
9350         (s390_linux_nat_target::have_continuable_watchpoint): Mark with
9351         override.  Write 'true' instead of '1'.
9352         (s390_linux_nat_target::watchpoint_addr_within_range): Remove
9353         declaration.
9354
9355 2018-05-02  Pedro Alves  <palves@redhat.com>
9356
9357         * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
9358         add_inf_child_target.
9359         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
9360         add_inf_child_target.
9361         * aix-thread.c (aix_thread_target_info): New.
9362         (aix_thread_target) <shortname, longname, doc>: Delete.
9363         <info>: New.
9364         * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
9365         add_inf_child_target.
9366         * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
9367         add_inf_child_target.
9368         * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
9369         add_inf_child_target.
9370         * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
9371         add_inf_child_target.
9372         * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
9373         add_inf_child_target.
9374         * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
9375         add_inf_child_target.
9376         * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
9377         add_inf_child_target.
9378         * arm-linux-nat.c (_initialize_arm_linux_nat): Use
9379         add_inf_child_target.
9380         * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
9381         add_inf_child_target.
9382         * bfd-target.c (target_bfd_target_info): New.
9383         (target_bfd) <shortname, longname, doc>: Delete.
9384         <info>: New.
9385         * bsd-kvm.c (bsd_kvm_target_info): New.
9386         (bsd_kvm_target) <shortname, longname, doc>: Delete.
9387         <info>: New.
9388         (bsd_kvm_target::open): Rename to ...
9389         (bsd_kvm_target_open): ... this.  Adjust.
9390         * bsd-uthread.c (bsd_uthread_target_info): New.
9391         (bsd_uthread_target) <shortname, longname, doc>: Delete.
9392         <info>: New.
9393         * corefile.c (core_file_command): Adjust.
9394         * corelow.c (core_target_info): New.
9395         (core_target) <shortname, longname, doc>: Delete.
9396         <info>: New.
9397         (core_target::open): Rename to ...
9398         (core_target_open): ... this.  Adjust.
9399         * ctf.c (ctf_target_info): New.
9400         (ctf_target) <shortname, longname, doc>: Delete.
9401         <info>: New.
9402         (ctf_target::open): Rename to ...
9403         (ctf_target_open): ... this.
9404         (_initialize_ctf): Adjust.
9405         * exec.c (exec_target_info): New.
9406         (exec_target) <shortname, longname, doc>: Delete.
9407         <info>: New.
9408         (exec_target::open): Rename to ...
9409         (exec_target_open): ... this.
9410         * gdbcore.h (core_target_open): Declare.
9411         * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
9412         * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
9413         add_inf_child_target.
9414         * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
9415         add_inf_child_target.
9416         * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
9417         add_inf_child_target.
9418         * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
9419         add_inf_child_target.
9420         * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
9421         add_inf_child_target.
9422         * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
9423         add_inf_child_target.
9424         * i386-linux-nat.c (_initialize_i386_linux_nat): Use
9425         add_inf_child_target.
9426         * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
9427         add_inf_child_target.
9428         * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
9429         add_inf_child_target.
9430         * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
9431         add_inf_child_target.
9432         * inf-child.c (inf_child_target_info): New.
9433         (inf_child_target::info): New.
9434         (inf_child_open_target): Remove 'target' parameter.  Use
9435         get_native_target instead.
9436         (inf_child_target::open): Delete.
9437         (add_inf_child_target): New.
9438         * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
9439         Delete.
9440         <info>: New.
9441         (add_inf_child_target): Declare.
9442         (inf_child_open_target): Declare.
9443         * linux-thread-db.c (thread_db_target_info): New.
9444         (thread_db_target) <shortname, longname, doc>: Delete.
9445         <info>: New.
9446         * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
9447         add_inf_child_target.
9448         * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
9449         add_inf_child_target.
9450         * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
9451         add_inf_child_target.
9452         * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
9453         add_inf_child_target.
9454         * make-target-delegates (print_class): Adjust.
9455         * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
9456         add_inf_child_target.
9457         * mips-linux-nat.c (_initialize_mips_linux_nat): Use
9458         add_inf_child_target.
9459         * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
9460         add_inf_child_target.
9461         * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
9462         add_inf_child_target.
9463         * nto-procfs.c (nto_native_target_info): New.
9464         (nto_procfs_target_native) <shortname, longname, doc>:
9465         Delete.
9466         <info>: New.
9467         (nto_procfs_target_info): New.
9468         (nto_procfs_target_procfs) <shortname, longname, doc>:
9469         Delete.
9470         <info>: New.
9471         (init_procfs_targets): Adjust.
9472         * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
9473         add_inf_child_target.
9474         * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
9475         add_inf_child_target.
9476         * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
9477         add_inf_child_target.
9478         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
9479         add_inf_child_target.
9480         * ravenscar-thread.c (ravenscar_target_info): New.
9481         (ravenscar_thread_target) <shortname, longname, doc>:
9482         Delete.
9483         <info>: New.
9484         * record-btrace.c (record_btrace_target_info):
9485         (record_btrace_target) <shortname, longname, doc>: Delete.
9486         <info>: New.
9487         (record_btrace_target::open): Rename to ...
9488         (record_btrace_target_open): ... this.  Adjust.
9489         * record-full.c (record_longname, record_doc): New.
9490         (record_full_base_target) <shortname, longname, doc>: Delete.
9491         <info>: New.
9492         (record_full_target_info): New.
9493         (record_full_target): <shortname>: Delete.
9494         <info>: New.
9495         (record_full_core_open_1, record_full_open_1): Update comments.
9496         (record_full_base_target::open): Rename to ...
9497         (record_full_open): ... this.
9498         (cmd_record_full_restore): Update.
9499         (_initialize_record_full): Update.
9500         * remote-sim.c (remote_sim_target_info): New.
9501         (gdbsim_target) <shortname, longname, doc>: Delete.
9502         <info>: New.
9503         (gdbsim_target::open): Rename to ...
9504         (gdbsim_target_open): ... this.
9505         (_initialize_remote_sim): Adjust.
9506         * remote.c (remote_doc): New.
9507         (remote_target_info): New.
9508         (remote_target) <shortname, longname, doc>: Delete.
9509         <info>: New.
9510         (extended_remote_target_info): New.
9511         (extended_remote_target) <shortname, longname, doc>: Delete.
9512         <info>: New.
9513         (remote_target::open_1): Make static.  Adjust.
9514         * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
9515         * s390-linux-nat.c (_initialize_s390_nat): Use
9516         add_inf_child_target.
9517         * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
9518         add_inf_child_target.
9519         * sol-thread.c (thread_db_target_info): New.
9520         (sol_thread_target) <shortname, longname, doc>: Delete.
9521         <info>: New.
9522         * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
9523         add_inf_child_target.
9524         * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
9525         add_inf_child_target.
9526         * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
9527         add_inf_child_target.
9528         * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
9529         add_inf_child_target.
9530         * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
9531         add_inf_child_target.
9532         * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
9533         add_inf_child_target.
9534         * spu-linux-nat.c (_initialize_spu_nat): Use
9535         add_inf_child_target.
9536         * spu-multiarch.c (spu_multiarch_target_info): New.
9537         (spu_multiarch_target) <shortname, longname, doc>: Delete.
9538         <info>: New.
9539         * target-delegates.c: Regenerate.
9540         * target.c: Include <unordered_map>.
9541         (target_ops_p): Delete.
9542         (DEF_VEC_P(target_ops_p)): Delete.
9543         (target_factories): New.
9544         (test_target_info): New.
9545         (test_target_ops::info): New.
9546         (open_target): Adjust to use target_factories.
9547         (add_target_with_completer): Rename to ...
9548         (add_target): ... this.  Change prototype.  Register target_info
9549         and open callback in target_factories.  Register target_info in
9550         command context instead of target_ops.
9551         (add_target): Delete old implementation.
9552         (add_deprecated_target_alias): Change prototype.  Adjust.
9553         (the_native_target): New.
9554         (set_native_target, get_native_target): New.
9555         (find_default_run_target): Use the_native_target.
9556         (find_attach_target, find_run_target): Simplify.
9557         (target_ops::open): Delete.
9558         (dummy_target_info): New.
9559         (dummy_target::shortname, dummy_target::longname)
9560         (dummy_target::doc): Delete.
9561         (dummy_target::info): New.
9562         (debug_target::shortname, debug_target::longname)
9563         (debug_target::doc): Delete.
9564         (debug_target::info): New.
9565         * target.h (struct target_info): New.
9566         (target_ops::~target_ops): Add comment.
9567         (target_ops::info): New.
9568         (target_ops::shortname, target_ops::longname, target_ops::doc): No
9569         longer virtual.  Implement in terms of target_info.
9570         (set_native_target, get_native_target): Declare.
9571         (target_open_ftype): New.
9572         (add_target, add_target_with_completer)
9573         (add_deprecated_target_alias): Change prototype.
9574         (test_target) <shortname, longname, doc>: Delete.
9575         <info>: New.
9576         * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
9577         add_inf_child_target.
9578         * tracefile-tfile.c (tfile_target_info): New.
9579         (tfile_target) <shortname, longname, doc>: Delete.
9580         <info>: New.
9581         (tfile_target::open): Rename to ...
9582         (tfile_target_open): ... this.
9583         (_initialize_tracefile_tfile): Adjust.
9584         * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
9585         add_inf_child_target.
9586         * windows-nat.c (_initialize_windows_nat): Use
9587         add_inf_child_target.
9588         * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
9589         add_inf_child_target.
9590
9591 2018-05-02  Pedro Alves  <palves@redhat.com>
9592
9593         * linux-nat.h (linux_nat_target) <low_new_thread,
9594         low_delete_thread, low_new_fork, low_forget_process,
9595         low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
9596         New virtual methods.
9597         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
9598         (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
9599         (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
9600         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
9601         (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
9602         Delete.
9603         * linux-fork.c (delete_fork): Adjust to call low method.
9604         * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
9605         (linux_nat_new_fork, linux_nat_forget_process_hook)
9606         (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
9607         (linux_nat_status_is_event):
9608         (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
9609         (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
9610         to call low method.
9611         (sigtrap_is_event): Rename to ...
9612         (linux_nat_target::low_status_is_event): ... this.
9613         (linux_nat_set_status_is_event): Delete.
9614         (save_stop_reason, linux_nat_wait_1)
9615         (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
9616         low methods.
9617         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
9618         (linux_nat_set_new_fork, linux_nat_set_forget_process)
9619         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
9620         (linux_nat_set_prepare_to_resume): Delete.
9621         * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
9622         low virtual methods.
9623         * amd64-linux-nat.c: Likewise.
9624         * arm-linux-nat.c: Likewise.
9625         * i386-linux-nat.c: Likewise.
9626         * ia64-linux-nat.c: Likewise.
9627         * mips-linux-nat.c: Likewise.
9628         * ppc-linux-nat.c: Likewise.
9629         * s390-linux-nat.c: Likewise.
9630         * sparc64-linux-nat.c: Likewise.
9631         * x86-linux-nat.c: Likewise.
9632         * x86-linux-nat.h: Include "nat/x86-linux.h".
9633         (x86_linux_nat_target) <low_new_fork, low_forget_process,
9634         low_prepare_to_resume, low_new_thread, low_delete_thread>:
9635         Override methods.
9636
9637 2018-05-02  Pedro Alves  <palves@redhat.com>
9638
9639         * target.h (target_ops)
9640         <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
9641         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
9642         stopped_by_watchpoint, have_continuable_watchpoint,
9643         stopped_data_address, watchpoint_addr_within_range,
9644         can_accel_watchpoint_condition, can_run, thread_alive,
9645         has_all_memory, has_memory, has_stack, has_registers,
9646         has_execution, can_async_p, is_async_p, supports_non_stop,
9647         always_non_stop_p, can_execute_reverse, supports_multi_process,
9648         supports_enable_disable_tracepoint,
9649         supports_disable_randomization, supports_string_tracing,
9650         supports_evaluation_of_breakpoint_conditions,
9651         can_run_breakpoint_commands, filesystem_is_local,
9652         can_download_tracepoint, get_trace_state_variable_value,
9653         set_trace_notes, get_tib_address, use_agent, can_use_agent,
9654         record_is_replaying, record_will_replay,
9655         augmented_libraries_svr4_read>: Adjust to return bool.
9656         * aarch64-linux-nat.c: All implementations adjusted.
9657         * aix-thread.c: All implementations adjusted.
9658         * arm-linux-nat.c: All implementations adjusted.
9659         * breakpoint.c: All implementations adjusted.
9660         * bsd-kvm.c: All implementations adjusted.
9661         * bsd-uthread.c: All implementations adjusted.
9662         * corelow.c: All implementations adjusted.
9663         * ctf.c: All implementations adjusted.
9664         * darwin-nat.c: All implementations adjusted.
9665         * darwin-nat.h: All implementations adjusted.
9666         * exec.c: All implementations adjusted.
9667         * fbsd-nat.c: All implementations adjusted.
9668         * fbsd-nat.h: All implementations adjusted.
9669         * gnu-nat.c: All implementations adjusted.
9670         * gnu-nat.h: All implementations adjusted.
9671         * go32-nat.c: All implementations adjusted.
9672         * ia64-linux-nat.c: All implementations adjusted.
9673         * inf-child.c: All implementations adjusted.
9674         * inf-child.h: All implementations adjusted.
9675         * inf-ptrace.c: All implementations adjusted.
9676         * inf-ptrace.h: All implementations adjusted.
9677         * linux-nat.c: All implementations adjusted.
9678         * linux-nat.h: All implementations adjusted.
9679         * mips-linux-nat.c: All implementations adjusted.
9680         * nto-procfs.c: All implementations adjusted.
9681         * ppc-linux-nat.c: All implementations adjusted.
9682         * procfs.c: All implementations adjusted.
9683         * ravenscar-thread.c: All implementations adjusted.
9684         * record-btrace.c: All implementations adjusted.
9685         * record-full.c: All implementations adjusted.
9686         * remote-sim.c: All implementations adjusted.
9687         * remote.c: All implementations adjusted.
9688         * s390-linux-nat.c: All implementations adjusted.
9689         * sol-thread.c: All implementations adjusted.
9690         * spu-multiarch.c: All implementations adjusted.
9691         * target-delegates.c: All implementations adjusted.
9692         * target.c: All implementations adjusted.
9693         * target.h: All implementations adjusted.
9694         * tracefile-tfile.c: All implementations adjusted.
9695         * tracefile.c: All implementations adjusted.
9696         * tracefile.h: All implementations adjusted.
9697         * windows-nat.c: All implementations adjusted.
9698         * x86-linux-nat.h: All implementations adjusted.
9699         * x86-nat.h: All implementations adjusted.
9700
9701 2018-05-02  Pedro Alves  <palves@redhat.com>
9702
9703         * make-target-delegates (scan_target_h): Don't trim lines here.
9704         Replace sequences of tabs and/or whitespace with a single
9705         whitespace.
9706         (top level, parsing methods): Trim each line before processing it
9707         here.
9708
9709 2018-05-02  Pedro Alves  <palves@redhat.com>
9710             John Baldwin  <jhb@freebsd.org>
9711
9712         * target.h (enum strata) <debug_stratum>: New.
9713         (struct target_ops) <all delegation methods>: Replace by C++
9714         virtual methods, and drop "to_" prefix.  All references updated
9715         throughout.
9716         <to_shortname, to_longname, to_doc, to_data,
9717         to_have_steppable_watchpoint, to_have_continuable_watchpoint,
9718         to_has_thread_control, to_attach_no_wait>: Delete, replaced by
9719         virtual methods.  All references updated throughout.
9720         <can_attach, supports_terminal_ours, can_create_inferior,
9721         get_thread_control_capabilities, attach_no_wait>: New
9722         virtual methods.
9723         <insert_breakpoint, remove_breakpoint>: Now
9724         TARGET_DEFAULT_NORETURN methods.
9725         <info_proc>: Now returns bool.
9726         <to_magic>: Delete.
9727         (OPS_MAGIC): Delete.
9728         (current_target): Delete.  All references replaced by references
9729         to ...
9730         (target_stack): ... this.  New.
9731         (target_shortname, target_longname): Adjust.
9732         (target_can_run): Now a function declaration.
9733         (default_child_has_all_memory, default_child_has_memory)
9734         (default_child_has_stack, default_child_has_registers)
9735         (default_child_has_execution): Remove target_ops parameter.
9736         (complete_target_initialization): Delete.
9737         (memory_breakpoint_target): New template class.
9738         (test_target_ops): Refactor as a C++ class with virtual methods.
9739         * make-target-delegates (NAME_PART): Tighten.
9740         (POINTER_PART, CP_SYMBOL): New.
9741         (SIMPLE_RETURN_PART): Reimplement.
9742         (VEC_RETURN_PART): Expect less.
9743         (RETURN_PART, VIRTUAL_PART): New.
9744         (METHOD): Adjust to C++ virtual methods.
9745         (scan_target_h): Remove reference to C99.
9746         (dname): Output "target_ops::" prefix.
9747         (write_function_header): Adjust to output a C++ class method.
9748         (write_declaration): New.
9749         (write_delegator): Adjust to output a C++ class method.
9750         (tdname): Output "dummy_target::" prefix.
9751         (write_tdefault, write_debugmethod): Adjust to output a C++ class
9752         method.
9753         (tdefault_names, debug_names): Delete.
9754         (return_types, tdefaults, styles, argtypes_array): New.
9755         (top level): All methods are delegators.
9756         (print_class): New.
9757         (top level): Print dummy_target and debug_target classes.
9758         * target-delegates.c: Regenerate.
9759         * target-debug.h (target_debug_print_enum_info_proc_what)
9760         (target_debug_print_thread_control_capabilities)
9761         (target_debug_print_thread_info_p): New.
9762         * target.c (dummy_target): Delete.
9763         (the_dummy_target, the_debug_target): New.
9764         (target_stack): Now extern.
9765         (set_targetdebug): Push/unpush debug target.
9766         (default_child_has_all_memory, default_child_has_memory)
9767         (default_child_has_stack, default_child_has_registers)
9768         (default_child_has_execution): Remove target_ops parameter.
9769         (complete_target_initialization): Delete.
9770         (add_target_with_completer): No longer call
9771         complete_target_initialization.
9772         (target_supports_terminal_ours): Use regular delegation.
9773         (update_current_target): Delete.
9774         (push_target): No longer check magic number.  Don't call
9775         update_current_target.
9776         (unpush_target): Don't call update_current_target.
9777         (target_is_pushed): No longer check magic number.
9778         (target_require_runnable): Skip for all stratums over
9779         process_stratum.
9780         (target_ops::info_proc): New.
9781         (target_info_proc): Use find_target_at and
9782         find_default_run_target.
9783         (target_supports_disable_randomization): Use regular delegation.
9784         (target_get_osdata): Use find_target_at.
9785         (target_ops::open, target_ops::close, target_ops::can_attach)
9786         (target_ops::attach, target_ops::can_create_inferior)
9787         (target_ops::create_inferior, target_ops::can_run)
9788         (target_can_run): New.
9789         (default_fileio_target): Use regular delegation.
9790         (target_ops::fileio_open, target_ops::fileio_pwrite)
9791         (target_ops::fileio_pread, target_ops::fileio_fstat)
9792         (target_ops::fileio_close, target_ops::fileio_unlink)
9793         (target_ops::fileio_readlink): New.
9794         (target_fileio_open_1, target_fileio_unlink)
9795         (target_fileio_readlink): Always call the target method.  Handle
9796         FILEIO_ENOSYS.
9797         (return_zero, return_zero_has_execution): Delete.
9798         (init_dummy_target): Delete.
9799         (dummy_target::dummy_target, dummy_target::shortname)
9800         (dummy_target::longname, dummy_target::doc)
9801         (debug_target::debug_target, debug_target::shortname)
9802         (debug_target::longname, debug_target::doc): New.
9803         (target_supports_delete_record): Use regular delegation.
9804         (setup_target_debug): Delete.
9805         (maintenance_print_target_stack): Skip debug_stratum.
9806         (initialize_targets): Instantiate the_dummy_target and
9807         the_debug_target.
9808         * auxv.c (target_auxv_parse): Remove 'ops' parameter.  Adjust to
9809         use target_stack.
9810         (target_auxv_search, fprint_target_auxv): Adjust.
9811         (info_auxv_command): Adjust to use target_stack.
9812         * auxv.h (target_auxv_parse): Remove 'ops' parameter.
9813         * exceptions.c (print_flush): Handle a NULL target_stack.
9814         * regcache.c (target_ops_no_register): Refactor as class with
9815         virtual methods.
9816
9817         * exec.c (exec_target): New class.
9818         (exec_ops): Now an exec_target.
9819         (exec_open, exec_close_1, exec_get_section_table)
9820         (exec_xfer_partial, exec_files_info, exec_has_memory)
9821         (exec_make_note_section): Refactor as exec_target methods.
9822         (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
9823         Delete.
9824         (exec_target::find_memory_regions): New.
9825         (_initialize_exec): Don't call init_exec_ops.
9826         * gdbcore.h (exec_file_clear): Delete.
9827
9828         * corefile.c (core_target): Delete.
9829         (core_file_command): Adjust.
9830         * corelow.c (core_target): New class.
9831         (the_core_target): New.
9832         (core_close): Remove target_ops parameter.
9833         (core_close_cleanup): Adjust.
9834         (core_target::close): New.
9835         (core_open, core_detach, get_core_registers, core_files_info)
9836         (core_xfer_partial, core_thread_alive, core_read_description)
9837         (core_pid_to_str, core_thread_name, core_has_memory)
9838         (core_has_stack, core_has_registers, core_info_proc): Rework as
9839         core_target methods.
9840         (ignore, core_remove_breakpoint, init_core_ops): Delete.
9841         (_initialize_corelow): Initialize the_core_target.
9842         * gdbcore.h (core_target): Delete.
9843         (the_core_target): New.
9844
9845         * ctf.c: (ctf_target): New class.
9846         (ctf_ops): Now a ctf_target.
9847         (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
9848         (ctf_xfer_partial, ctf_get_trace_state_variable_value)
9849         (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
9850         methods.
9851         (init_ctf_ops): Delete.
9852         (_initialize_ctf): Don't call it.
9853         * tracefile-tfile.c (tfile_target): New class.
9854         (tfile_ops): Now a tfile_target.
9855         (tfile_open, tfile_close, tfile_files_info)
9856         (tfile_get_tracepoint_status, tfile_trace_find)
9857         (tfile_fetch_registers, tfile_xfer_partial)
9858         (tfile_get_trace_state_variable_value, tfile_traceframe_info):
9859         Refactor as tfile_target methods.
9860         (tfile_xfer_partial_features): Remove target_ops parameter.
9861         (init_tfile_ops): Delete.
9862         (_initialize_tracefile_tfile): Don't call it.
9863         * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
9864         (tracefile_has_stack, tracefile_has_registers)
9865         (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
9866         tracefile_target methods.
9867         (init_tracefile_ops): Delete.
9868         (tracefile_target::tracefile_target): New.
9869         * tracefile.h: Include "target.h".
9870         (tracefile_target): New class.
9871         (init_tracefile_ops): Delete.
9872
9873         * spu-multiarch.c (spu_multiarch_target): New class.
9874         (spu_ops): Now a spu_multiarch_target.
9875         (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
9876         (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
9877         (spu_search_memory, spu_mourn_inferior): Refactor as
9878         spu_multiarch_target methods.
9879         (init_spu_ops): Delete.
9880         (_initialize_spu_multiarch): Remove references to init_spu_ops,
9881         complete_target_initialization.
9882
9883         * ravenscar-thread.c (ravenscar_thread_target): New class.
9884         (ravenscar_ops): Now a ravenscar_thread_target.
9885         (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
9886         (ravenscar_thread_alive, ravenscar_pid_to_str)
9887         (ravenscar_fetch_registers, ravenscar_store_registers)
9888         (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
9889         (ravenscar_stopped_by_hw_breakpoint)
9890         (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
9891         (ravenscar_mourn_inferior, ravenscar_core_of_thread)
9892         (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
9893         methods.
9894         (init_ravenscar_thread_ops): Delete.
9895         (_initialize_ravenscar): Remove references to
9896         init_ravenscar_thread_ops and complete_target_initialization.
9897
9898         * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
9899         (bsd_uthread_target): New class.
9900         (bsd_uthread_ops): Now a bsd_uthread_target.
9901         (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
9902         (bsd_uthread_close, bsd_uthread_mourn_inferior)
9903         (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
9904         (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
9905         (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
9906         (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
9907         (bsd_uthread_target): Delete function.
9908         (_initialize_bsd_uthread): Remove reference to
9909         complete_target_initialization.
9910
9911         * bfd-target.c (target_bfd_data): Delete.  Fields folded into ...
9912         (target_bfd): ... this new class.
9913         (target_bfd_xfer_partial, target_bfd_get_section_table)
9914         (target_bfd_close): Refactor as target_bfd methods.
9915         (target_bfd::~target_bfd): New.
9916         (target_bfd_reopen): Adjust.
9917         (target_bfd::close): New.
9918
9919         * record-btrace.c (record_btrace_target): New class.
9920         (record_btrace_ops): Now a record_btrace_target.
9921         (record_btrace_open, record_btrace_stop_recording)
9922         (record_btrace_disconnect, record_btrace_close)
9923         (record_btrace_async, record_btrace_info)
9924         (record_btrace_insn_history, record_btrace_insn_history_range)
9925         (record_btrace_insn_history_from, record_btrace_call_history)
9926         (record_btrace_call_history_range)
9927         (record_btrace_call_history_from, record_btrace_record_method)
9928         (record_btrace_is_replaying, record_btrace_will_replay)
9929         (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
9930         (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
9931         (record_btrace_store_registers, record_btrace_prepare_to_store)
9932         (record_btrace_to_get_unwinder)
9933         (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
9934         (record_btrace_commit_resume, record_btrace_wait)
9935         (record_btrace_stop, record_btrace_can_execute_reverse)
9936         (record_btrace_stopped_by_sw_breakpoint)
9937         (record_btrace_supports_stopped_by_sw_breakpoint)
9938         (record_btrace_stopped_by_hw_breakpoint)
9939         (record_btrace_supports_stopped_by_hw_breakpoint)
9940         (record_btrace_update_thread_list, record_btrace_thread_alive)
9941         (record_btrace_goto_begin, record_btrace_goto_end)
9942         (record_btrace_goto, record_btrace_stop_replaying_all)
9943         (record_btrace_execution_direction)
9944         (record_btrace_prepare_to_generate_core)
9945         (record_btrace_done_generating_core): Refactor as
9946         record_btrace_target methods.
9947         (init_record_btrace_ops): Delete.
9948         (_initialize_record_btrace): Remove reference to
9949         init_record_btrace_ops.
9950         * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
9951         the execution_direction global.
9952         (record_full_base_target, record_full_target)
9953         (record_full_core_target): New classes.
9954         (record_full_ops): Now a record_full_target.
9955         (record_full_core_ops): Now a record_full_core_target.
9956         (record_full_target::detach, record_full_target::disconnect)
9957         (record_full_core_target::disconnect)
9958         (record_full_target::mourn_inferior, record_full_target::kill):
9959         New.
9960         (record_full_open, record_full_close, record_full_async): Refactor
9961         as methods of the record_full_base_target class.
9962         (record_full_resume, record_full_commit_resume): Refactor
9963         as methods of the record_full_target class.
9964         (record_full_wait, record_full_stopped_by_watchpoint)
9965         (record_full_stopped_data_address)
9966         (record_full_stopped_by_sw_breakpoint)
9967         (record_full_supports_stopped_by_sw_breakpoint)
9968         (record_full_stopped_by_hw_breakpoint)
9969         (record_full_supports_stopped_by_hw_breakpoint): Refactor as
9970         methods of the record_full_base_target class.
9971         (record_full_store_registers, record_full_xfer_partial)
9972         (record_full_insert_breakpoint, record_full_remove_breakpoint):
9973         Refactor as methods of the record_full_target class.
9974         (record_full_can_execute_reverse, record_full_get_bookmark)
9975         (record_full_goto_bookmark, record_full_execution_direction)
9976         (record_full_record_method, record_full_info, record_full_delete)
9977         (record_full_is_replaying, record_full_will_replay)
9978         (record_full_goto_begin, record_full_goto_end, record_full_goto)
9979         (record_full_stop_replaying): Refactor as methods of the
9980         record_full_base_target class.
9981         (record_full_core_resume, record_full_core_kill)
9982         (record_full_core_fetch_registers)
9983         (record_full_core_prepare_to_store)
9984         (record_full_core_store_registers, record_full_core_xfer_partial)
9985         (record_full_core_insert_breakpoint)
9986         (record_full_core_remove_breakpoint)
9987         (record_full_core_has_execution): Refactor
9988         as methods of the record_full_core_target class.
9989         (record_full_base_target::supports_delete_record): New.
9990         (init_record_full_ops): Delete.
9991         (init_record_full_core_ops): Delete.
9992         (record_full_save): Refactor as method of the
9993         record_full_base_target class.
9994         (_initialize_record_full): Remove references to
9995         init_record_full_ops and init_record_full_core_ops.
9996
9997         * remote.c (remote_target, extended_remote_target): New classes.
9998         (remote_ops): Now a remote_target.
9999         (extended_remote_ops): Now an extended_remote_target.
10000         (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
10001         (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
10002         (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
10003         (remote_pass_signals, remote_set_syscall_catchpoint)
10004         (remote_program_signals, )
10005         (remote_thread_always_alive): Remove target_ops parameter.
10006         (remote_thread_alive, remote_thread_name)
10007         (remote_update_thread_list, remote_threads_extra_info)
10008         (remote_static_tracepoint_marker_at)
10009         (remote_static_tracepoint_markers_by_strid)
10010         (remote_get_ada_task_ptid, remote_close, remote_start_remote)
10011         (remote_open): Refactor as methods of remote_target.
10012         (extended_remote_open, extended_remote_detach)
10013         (extended_remote_attach, extended_remote_post_attach):
10014         (extended_remote_supports_disable_randomization)
10015         (extended_remote_create_inferior): : Refactor as method of
10016         extended_remote_target.
10017         (remote_set_permissions, remote_open_1, remote_detach)
10018         (remote_follow_fork, remote_follow_exec, remote_disconnect)
10019         (remote_resume, remote_commit_resume, remote_stop)
10020         (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
10021         (remote_terminal_ours, remote_wait, remote_fetch_registers)
10022         (remote_prepare_to_store, remote_store_registers)
10023         (remote_flash_erase, remote_flash_done, remote_files_info)
10024         (remote_kill, remote_mourn, remote_insert_breakpoint)
10025         (remote_remove_breakpoint, remote_insert_watchpoint)
10026         (remote_watchpoint_addr_within_range)
10027         (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
10028         (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
10029         (remote_supports_stopped_by_sw_breakpoint)
10030         (remote_stopped_by_hw_breakpoint)
10031         (remote_supports_stopped_by_hw_breakpoint)
10032         (remote_stopped_by_watchpoint, remote_stopped_data_address)
10033         (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
10034         (remote_verify_memory): Refactor as methods of remote_target.
10035         (remote_write_qxfer, remote_read_qxfer): Remove target_ops
10036         parameter.
10037         (remote_xfer_partial, remote_get_memory_xfer_limit)
10038         (remote_search_memory, remote_rcmd, remote_memory_map)
10039         (remote_pid_to_str, remote_get_thread_local_address)
10040         (remote_get_tib_address, remote_read_description): Refactor as
10041         methods of remote_target.
10042         (remote_target::fileio_open, remote_target::fileio_pwrite)
10043         (remote_target::fileio_pread, remote_target::fileio_close): New.
10044         (remote_hostio_readlink, remote_hostio_fstat)
10045         (remote_filesystem_is_local, remote_can_execute_reverse)
10046         (remote_supports_non_stop, remote_supports_disable_randomization)
10047         (remote_supports_multi_process, remote_supports_cond_breakpoints)
10048         (remote_supports_enable_disable_tracepoint)
10049         (remote_supports_string_tracing)
10050         (remote_can_run_breakpoint_commands, remote_trace_init)
10051         (remote_download_tracepoint, remote_can_download_tracepoint)
10052         (remote_download_trace_state_variable, remote_enable_tracepoint)
10053         (remote_disable_tracepoint, remote_trace_set_readonly_regions)
10054         (remote_trace_start, remote_get_trace_status)
10055         (remote_get_tracepoint_status, remote_trace_stop)
10056         (remote_trace_find, remote_get_trace_state_variable_value)
10057         (remote_save_trace_data, remote_get_raw_trace_data)
10058         (remote_set_disconnected_tracing, remote_core_of_thread)
10059         (remote_set_circular_trace_buffer, remote_traceframe_info)
10060         (remote_get_min_fast_tracepoint_insn_len)
10061         (remote_set_trace_buffer_size, remote_set_trace_notes)
10062         (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
10063         (remote_disable_btrace, remote_teardown_btrace)
10064         (remote_read_btrace, remote_btrace_conf)
10065         (remote_augmented_libraries_svr4_read, remote_load)
10066         (remote_pid_to_exec_file, remote_can_do_single_step)
10067         (remote_execution_direction, remote_thread_handle_to_thread_info):
10068         Refactor as methods of remote_target.
10069         (init_remote_ops, init_extended_remote_ops): Delete.
10070         (remote_can_async_p, remote_is_async_p, remote_async)
10071         (remote_thread_events, remote_upload_tracepoints)
10072         (remote_upload_trace_state_variables): Refactor as methods of
10073         remote_target.
10074         (_initialize_remote): Remove references to init_remote_ops and
10075         init_extended_remote_ops.
10076
10077         * remote-sim.c (gdbsim_target): New class.
10078         (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
10079         (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
10080         (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
10081         (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
10082         (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
10083         (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
10084         Refactor as methods of gdbsim_target.
10085         (gdbsim_ops): Now a gdbsim_target.
10086         (init_gdbsim_ops): Delete.
10087         (gdbsim_cntrl_c): Adjust.
10088         (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
10089
10090         * amd64-linux-nat.c (amd64_linux_nat_target): New class.
10091         (the_amd64_linux_nat_target): New.
10092         (amd64_linux_fetch_inferior_registers)
10093         (amd64_linux_store_inferior_registers): Refactor as methods of
10094         amd64_linux_nat_target.
10095         (_initialize_amd64_linux_nat): Adjust.  Set linux_target.
10096         * i386-linux-nat.c: Don't include "linux-nat.h".
10097         (i386_linux_nat_target): New class.
10098         (the_i386_linux_nat_target): New.
10099         (i386_linux_fetch_inferior_registers)
10100         (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
10101         as methods of i386_linux_nat_target.
10102         (_initialize_i386_linux_nat): Adjust.  Set linux_target.
10103         * inf-child.c (inf_child_ops): Delete.
10104         (inf_child_fetch_inferior_registers)
10105         (inf_child_store_inferior_registers): Delete.
10106         (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
10107         methods of inf_child_target.
10108         (inf_child_target::supports_terminal_ours)
10109         (inf_child_target::terminal_init)
10110         (inf_child_target::terminal_inferior)
10111         (inf_child_target::terminal_ours_for_output)
10112         (inf_child_target::terminal_ours, inf_child_target::interrupt)
10113         (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
10114         New.
10115         (inf_child_open, inf_child_disconnect, inf_child_close)
10116         (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
10117         (inf_child_post_startup_inferior, inf_child_can_run)
10118         (inf_child_pid_to_exec_file): Refactor as methods of
10119         inf_child_target.
10120         (inf_child_follow_fork): Delete.
10121         (inf_child_target::can_create_inferior)
10122         (inf_child_target::can_attach): New.
10123         (inf_child_target::has_all_memory, inf_child_target::has_memory)
10124         (inf_child_target::has_stack, inf_child_target::has_registers)
10125         (inf_child_target::has_execution): New.
10126         (inf_child_fileio_open, inf_child_fileio_pwrite)
10127         (inf_child_fileio_pread, inf_child_fileio_fstat)
10128         (inf_child_fileio_close, inf_child_fileio_unlink)
10129         (inf_child_fileio_readlink, inf_child_use_agent)
10130         (inf_child_can_use_agent): Refactor as methods of
10131         inf_child_target.
10132         (return_zero, inf_child_target): Delete.
10133         (inf_child_target::inf_child_target): New.
10134         * inf-child.h: Include "target.h".
10135         (inf_child_target): Delete function prototype.
10136         (inf_child_target): New class.
10137         (inf_child_open_target, inf_child_mourn_inferior)
10138         (inf_child_maybe_unpush_target): Delete.
10139         * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
10140         (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
10141         (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
10142         (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
10143         (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
10144         (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
10145         (inf_ptrace_wait, inf_ptrace_xfer_partial)
10146         (inf_ptrace_thread_alive, inf_ptrace_files_info)
10147         (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
10148         methods of inf_ptrace_target.
10149         (inf_ptrace_target): Delete function.
10150         * inf-ptrace.h: Include "inf-child.h".
10151         (inf_ptrace_target): Delete function declaration.
10152         (inf_ptrace_target): New class.
10153         (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
10154         * linux-nat.c (linux_target): New.
10155         (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
10156         (linux_nat_target::~linux_nat_target): New.
10157         (linux_child_post_attach, linux_child_post_startup_inferior)
10158         (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
10159         (linux_child_remove_fork_catchpoint)
10160         (linux_child_insert_vfork_catchpoint)
10161         (linux_child_remove_vfork_catchpoint)
10162         (linux_child_insert_exec_catchpoint)
10163         (linux_child_remove_exec_catchpoint)
10164         (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
10165         (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
10166         (linux_nat_resume, linux_nat_stopped_by_watchpoint)
10167         (linux_nat_stopped_data_address)
10168         (linux_nat_stopped_by_sw_breakpoint)
10169         (linux_nat_supports_stopped_by_sw_breakpoint)
10170         (linux_nat_stopped_by_hw_breakpoint)
10171         (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
10172         (linux_nat_kill, linux_nat_mourn_inferior)
10173         (linux_nat_xfer_partial, linux_nat_thread_alive)
10174         (linux_nat_update_thread_list, linux_nat_pid_to_str)
10175         (linux_nat_thread_name, linux_child_pid_to_exec_file)
10176         (linux_child_static_tracepoint_markers_by_strid)
10177         (linux_nat_is_async_p, linux_nat_can_async_p)
10178         (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
10179         (linux_nat_supports_multi_process)
10180         (linux_nat_supports_disable_randomization, linux_nat_async)
10181         (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
10182         (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
10183         (linux_nat_fileio_open, linux_nat_fileio_readlink)
10184         (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
10185         methods of linux_nat_target.
10186         (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
10187         (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
10188         parameter.
10189         (check_stopped_by_watchpoint): Adjust.
10190         (linux_xfer_partial): Delete.
10191         (linux_target_install_ops, linux_target, linux_nat_add_target):
10192         Delete.
10193         (linux_nat_target::linux_nat_target): New.
10194         * linux-nat.h: Include "inf-ptrace.h".
10195         (linux_nat_target): New.
10196         (linux_target, linux_target_install_ops, linux_nat_add_target):
10197         Delete function declarations.
10198         (linux_target): Declare global.
10199         * linux-thread-db.c (thread_db_target): New.
10200         (thread_db_target::thread_db_target): New.
10201         (thread_db_ops): Delete.
10202         (the_thread_db_target): New.
10203         (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
10204         (thread_db_update_thread_list, thread_db_pid_to_str)
10205         (thread_db_extra_thread_info)
10206         (thread_db_thread_handle_to_thread_info)
10207         (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
10208         (thread_db_resume): Refactor as methods of thread_db_target.
10209         (init_thread_db_ops): Delete.
10210         (_initialize_thread_db): Remove reference to init_thread_db_ops.
10211         * x86-linux-nat.c: Don't include "linux-nat.h".
10212         (super_post_startup_inferior): Delete.
10213         (x86_linux_nat_target::~x86_linux_nat_target): New.
10214         (x86_linux_child_post_startup_inferior)
10215         (x86_linux_read_description, x86_linux_enable_btrace)
10216         (x86_linux_disable_btrace, x86_linux_teardown_btrace)
10217         (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
10218         methods of x86_linux_nat_target.
10219         (x86_linux_create_target): Delete.  Bits folded ...
10220         (x86_linux_add_target): ... here.  Now takes a linux_nat_target
10221         pointer.
10222         * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
10223         (x86_linux_nat_target): New class.
10224         (x86_linux_create_target): Delete.
10225         (x86_linux_add_target): Now takes a linux_nat_target pointer.
10226         * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
10227         (x86_region_ok_for_watchpoint, x86_stopped_data_address)
10228         (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
10229         (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
10230         (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
10231         make extern.
10232         (x86_use_watchpoints): Delete.
10233         * x86-nat.h: Include "breakpoint.h" and "target.h".
10234         (x86_use_watchpoints): Delete.
10235         (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
10236         (x86_stopped_by_watchpoint, x86_stopped_data_address)
10237         (x86_insert_watchpoint, x86_remove_watchpoint)
10238         (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
10239         (x86_stopped_by_hw_breakpoint): New declarations.
10240         (x86_nat_target): New template class.
10241
10242         * ppc-linux-nat.c (ppc_linux_nat_target): New class.
10243         (the_ppc_linux_nat_target): New.
10244         (ppc_linux_fetch_inferior_registers)
10245         (ppc_linux_can_use_hw_breakpoint)
10246         (ppc_linux_region_ok_for_hw_watchpoint)
10247         (ppc_linux_ranged_break_num_registers)
10248         (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
10249         (ppc_linux_insert_mask_watchpoint)
10250         (ppc_linux_remove_mask_watchpoint)
10251         (ppc_linux_can_accel_watchpoint_condition)
10252         (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
10253         (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
10254         (ppc_linux_watchpoint_addr_within_range)
10255         (ppc_linux_masked_watch_num_registers)
10256         (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
10257         (ppc_linux_read_description): Refactor as methods of
10258         ppc_linux_nat_target.
10259         (_initialize_ppc_linux_nat): Adjust.  Set linux_target.
10260
10261         * procfs.c (procfs_xfer_partial): Delete forward declaration.
10262         (procfs_target): New class.
10263         (the_procfs_target): New.
10264         (procfs_target): Delete function.
10265         (procfs_auxv_parse, procfs_attach, procfs_detach)
10266         (procfs_fetch_registers, procfs_store_registers, procfs_wait)
10267         (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
10268         (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
10269         (procfs_create_inferior, procfs_update_thread_list)
10270         (procfs_thread_alive, procfs_pid_to_str)
10271         (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
10272         (procfs_stopped_data_address, procfs_insert_watchpoint)
10273         (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
10274         (proc_find_memory_regions, procfs_info_proc)
10275         (procfs_make_note_section): Refactor as methods of procfs_target.
10276         (_initialize_procfs): Adjust.
10277         * sol-thread.c (sol_thread_target): New class.
10278         (sol_thread_ops): Now a sol_thread_target.
10279         (sol_thread_detach, sol_thread_resume, sol_thread_wait)
10280         (sol_thread_fetch_registers, sol_thread_store_registers)
10281         (sol_thread_xfer_partial, sol_thread_mourn_inferior)
10282         (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
10283         (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
10284         (init_sol_thread_ops): Delete.
10285         (_initialize_sol_thread): Adjust.  Remove references to
10286         init_sol_thread_ops and complete_target_initialization.
10287
10288         * windows-nat.c (windows_nat_target): New class.
10289         (windows_fetch_inferior_registers)
10290         (windows_store_inferior_registers, windows_resume, windows_wait)
10291         (windows_attach, windows_detach, windows_pid_to_exec_file)
10292         (windows_files_info, windows_create_inferior)
10293         (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
10294         (windows_close, windows_pid_to_str, windows_xfer_partial)
10295         (windows_get_tib_address, windows_get_ada_task_ptid)
10296         (windows_thread_name, windows_thread_alive): Refactor as
10297         windows_nat_target methods.
10298         (do_initial_windows_stuff): Adjust.
10299         (windows_target): Delete function.
10300         (_initialize_windows_nat): Adjust.
10301
10302         * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
10303         (darwin_mourn_inferior, darwin_kill_inferior)
10304         (darwin_create_inferior, darwin_attach, darwin_detach)
10305         (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
10306         (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
10307         (darwin_supports_multi_process): Refactor as darwin_nat_target
10308         methods.
10309         (darwin_resume_to, darwin_files_info): Delete.
10310         (_initialize_darwin_inferior): Rename to ...
10311         (_initialize_darwin_nat): ... this.  Adjust to C++ification.
10312         * darwin-nat.h: Include "inf-child.h".
10313         (darwin_nat_target): New class.
10314         (darwin_complete_target): Delete.
10315         * i386-darwin-nat.c (i386_darwin_nat_target): New class.
10316         (darwin_target): New.
10317         (i386_darwin_fetch_inferior_registers)
10318         (i386_darwin_store_inferior_registers): Refactor as methods of
10319         darwin_nat_target.
10320         (darwin_complete_target): Delete, with ...
10321         (_initialize_i386_darwin_nat): ... bits factored out here.
10322
10323         * alpha-linux-nat.c (alpha_linux_nat_target): New class.
10324         (the_alpha_linux_nat_target): New.
10325         (alpha_linux_register_u_offset): Refactor as
10326         alpha_linux_nat_target method.
10327         (_initialize_alpha_linux_nat): Adjust.
10328         * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
10329         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
10330         (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
10331         methods of linux_nat_trad_target.
10332         (linux_trad_target): Delete.
10333         * linux-nat-trad.h (linux_trad_target): Delete function.
10334         (linux_nat_trad_target): New class.
10335         * mips-linux-nat.c (mips_linux_nat_target): New class.
10336         (super_fetch_registers, super_store_registers, super_close):
10337         Delete.
10338         (the_mips_linux_nat_target): New.
10339         (mips64_linux_regsets_fetch_registers)
10340         (mips64_linux_regsets_store_registers)
10341         (mips64_linux_fetch_registers, mips64_linux_store_registers)
10342         (mips_linux_register_u_offset, mips_linux_read_description)
10343         (mips_linux_can_use_hw_breakpoint)
10344         (mips_linux_stopped_by_watchpoint)
10345         (mips_linux_stopped_data_address)
10346         (mips_linux_region_ok_for_hw_watchpoint)
10347         (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
10348         (mips_linux_close): Refactor as methods of mips_linux_nat.
10349         (_initialize_mips_linux_nat): Adjust to C++ification.
10350
10351         * aix-thread.c (aix_thread_target): New class.
10352         (aix_thread_ops): Now an aix_thread_target.
10353         (aix_thread_detach, aix_thread_resume, aix_thread_wait)
10354         (aix_thread_fetch_registers, aix_thread_store_registers)
10355         (aix_thread_xfer_partial, aix_thread_mourn_inferior)
10356         (aix_thread_thread_alive, aix_thread_pid_to_str)
10357         (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
10358         Refactor as methods of aix_thread_target.
10359         (init_aix_thread_ops): Delete.
10360         (_initialize_aix_thread): Remove references to init_aix_thread_ops
10361         and complete_target_initialization.
10362         * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
10363         (rs6000_nat_target): New class.
10364         (the_rs6000_nat_target): New.
10365         (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
10366         (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
10367         (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
10368         (super_create_inferior): Delete.
10369         (_initialize_rs6000_nat): Adjust to C++ification.
10370
10371         * arm-linux-nat.c (arm_linux_nat_target): New class.
10372         (the_arm_linux_nat_target): New.
10373         (arm_linux_fetch_inferior_registers)
10374         (arm_linux_store_inferior_registers, arm_linux_read_description)
10375         (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
10376         (arm_linux_remove_hw_breakpoint)
10377         (arm_linux_region_ok_for_hw_watchpoint)
10378         (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
10379         (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
10380         (arm_linux_watchpoint_addr_within_range): Refactor as methods of
10381         arm_linux_nat_target.
10382         (_initialize_arm_linux_nat): Adjust to C++ification.
10383
10384         * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
10385         (the_aarch64_linux_nat_target): New.
10386         (aarch64_linux_fetch_inferior_registers)
10387         (aarch64_linux_store_inferior_registers)
10388         (aarch64_linux_child_post_startup_inferior)
10389         (aarch64_linux_read_description)
10390         (aarch64_linux_can_use_hw_breakpoint)
10391         (aarch64_linux_insert_hw_breakpoint)
10392         (aarch64_linux_remove_hw_breakpoint)
10393         (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
10394         (aarch64_linux_region_ok_for_hw_watchpoint)
10395         (aarch64_linux_stopped_data_address)
10396         (aarch64_linux_stopped_by_watchpoint)
10397         (aarch64_linux_watchpoint_addr_within_range)
10398         (aarch64_linux_can_do_single_step): Refactor as methods of
10399         aarch64_linux_nat_target.
10400         (super_post_startup_inferior): Delete.
10401         (_initialize_aarch64_linux_nat): Adjust to C++ification.
10402
10403         * hppa-linux-nat.c (hppa_linux_nat_target): New class.
10404         (the_hppa_linux_nat_target): New.
10405         (hppa_linux_fetch_inferior_registers)
10406         (hppa_linux_store_inferior_registers): Refactor as methods of
10407         hppa_linux_nat_target.
10408         (_initialize_hppa_linux_nat): Adjust to C++ification.
10409
10410         * ia64-linux-nat.c (ia64_linux_nat_target): New class.
10411         (the_ia64_linux_nat_target): New.
10412         (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
10413         (ia64_linux_stopped_data_address)
10414         (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
10415         (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
10416         ia64_linux_nat_target methods.
10417         (super_xfer_partial): Delete.
10418         (_initialize_ia64_linux_nat): Adjust to C++ification.
10419
10420         * m32r-linux-nat.c (m32r_linux_nat_target): New class.
10421         (the_m32r_linux_nat_target): New.
10422         (m32r_linux_fetch_inferior_registers)
10423         (m32r_linux_store_inferior_registers): Refactor as
10424         m32r_linux_nat_target methods.
10425         (_initialize_m32r_linux_nat): Adjust to C++ification.
10426
10427         * m68k-linux-nat.c (m68k_linux_nat_target): New class.
10428         (the_m68k_linux_nat_target): New.
10429         (m68k_linux_fetch_inferior_registers)
10430         (m68k_linux_store_inferior_registers): Refactor as
10431         m68k_linux_nat_target methods.
10432         (_initialize_m68k_linux_nat): Adjust to C++ification.
10433
10434         * s390-linux-nat.c (s390_linux_nat_target): New class.
10435         (the_s390_linux_nat_target): New.
10436         (s390_linux_fetch_inferior_registers)
10437         (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
10438         (s390_insert_watchpoint, s390_remove_watchpoint)
10439         (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
10440         (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
10441         (s390_auxv_parse, s390_read_description): Refactor as methods of
10442         s390_linux_nat_target.
10443         (_initialize_s390_nat): Adjust to C++ification.
10444
10445         * sparc-linux-nat.c (sparc_linux_nat_target): New class.
10446         (the_sparc_linux_nat_target): New.
10447         (_initialize_sparc_linux_nat): Adjust to C++ification.
10448         * sparc-nat.c (sparc_fetch_inferior_registers)
10449         (sparc_store_inferior_registers): Remove target_ops parameter.
10450         * sparc-nat.h (sparc_fetch_inferior_registers)
10451         (sparc_store_inferior_registers): Remove target_ops parameter.
10452         * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
10453         (the_sparc64_linux_nat_target): New.
10454         (_initialize_sparc64_linux_nat): Adjust to C++ification.
10455
10456         * spu-linux-nat.c (spu_linux_nat_target): New class.
10457         (the_spu_linux_nat_target): New.
10458         (spu_child_post_startup_inferior, spu_child_post_attach)
10459         (spu_child_wait, spu_fetch_inferior_registers)
10460         (spu_store_inferior_registers, spu_xfer_partial)
10461         (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
10462         methods.
10463         (_initialize_spu_nat): Adjust to C++ification.
10464
10465         * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
10466         (the_tilegx_linux_nat_target): New.
10467         (fetch_inferior_registers, store_inferior_registers):
10468         Refactor as methods.
10469         (_initialize_tile_linux_nat): Adjust to C++ification.
10470
10471         * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
10472         (the_xtensa_linux_nat_target): New.
10473         (xtensa_linux_fetch_inferior_registers)
10474         (xtensa_linux_store_inferior_registers): Refactor as
10475         xtensa_linux_nat_target methods.
10476         (_initialize_xtensa_linux_nat): Adjust to C++ification.
10477
10478         * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
10479         (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
10480         (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
10481         (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
10482         (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
10483         (fbsd_stopped_by_sw_breakpoint)
10484         (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
10485         (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
10486         (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
10487         (fbsd_post_startup_inferior, fbsd_post_attach)
10488         (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
10489         (fbsd_set_syscall_catchpoint)
10490         (super_xfer_partial, super_resume, super_wait)
10491         (fbsd_supports_stopped_by_hw_breakpoint): Delete.
10492         (fbsd_handle_debug_trap): Remove target_ops parameter.
10493         (fbsd_nat_add_target): Delete.
10494         * fbsd-nat.h: Include "inf-ptrace.h".
10495         (fbsd_nat_add_target): Delete.
10496         (USE_SIGTRAP_SIGINFO): Define.
10497         (fbsd_nat_target): New class.
10498
10499         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
10500         (amd64bsd_store_inferior_registers): Remove target_ops parameter.
10501         (amd64bsd_target): Delete.
10502         * amd64-bsd-nat.h: New file.
10503         * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
10504         "x86-bsd-nat.h".
10505         (amd64_fbsd_nat_target): New class.
10506         (the_amd64_fbsd_nat_target): New.
10507         (amd64fbsd_read_description): Refactor as method of
10508         amd64_fbsd_nat_target.
10509         (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
10510         (_initialize_amd64fbsd_nat): Adjust to C++ification.
10511         * amd64-nat.h (amd64bsd_target): Delete function declaration.
10512         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
10513         (i386bsd_store_inferior_registers): Remove target_ops parameter.
10514         (i386bsd_target): Delete.
10515         * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
10516         (i386bsd_fetch_inferior_registers)
10517         (i386bsd_store_inferior_registers): Declare.
10518         (i386_bsd_nat_target): New class.
10519         * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
10520         (the_i386_fbsd_nat_target): New.
10521         (i386fbsd_resume, i386fbsd_read_description): Refactor as
10522         i386_fbsd_nat_target methods.
10523         (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
10524         (_initialize_i386fbsd_nat): Adjust to C++ification.
10525         * x86-bsd-nat.c (super_mourn_inferior): Delete.
10526         (x86bsd_mourn_inferior, x86bsd_target): Delete.
10527         (_initialize_x86_bsd_nat): Adjust to C++ification.
10528         * x86-bsd-nat.h: Include "x86-nat.h".
10529         (x86bsd_target): Delete declaration.
10530         (x86bsd_nat_target): New class.
10531
10532         * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
10533         (the_aarch64_fbsd_nat_target): New.
10534         (aarch64_fbsd_fetch_inferior_registers)
10535         (aarch64_fbsd_store_inferior_registers): Refactor as methods of
10536         aarch64_fbsd_nat_target.
10537         (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
10538         * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
10539         (the_alpha_bsd_nat_target): New.
10540         (alphabsd_fetch_inferior_registers)
10541         (alphabsd_store_inferior_registers): Refactor as
10542         alpha_bsd_nat_target methods.
10543         (_initialize_alphabsd_nat): Refactor as methods of
10544         alpha_bsd_nat_target.
10545         * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
10546         (the_amd64_nbsd_nat_target): New.
10547         (_initialize_amd64nbsd_nat): Adjust to C++ification.
10548         * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
10549         (the_amd64_obsd_nat_target): New.
10550         (_initialize_amd64obsd_nat): Adjust to C++ification.
10551         * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
10552         (the_arm_fbsd_nat_target): New.
10553         (arm_fbsd_fetch_inferior_registers)
10554         (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
10555         (_initialize_arm_fbsd_nat): Refactor as methods of
10556         arm_fbsd_nat_target.
10557         (_initialize_arm_fbsd_nat): Adjust to C++ification.
10558         * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
10559         (the_arm_netbsd_nat_target): New.
10560         (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
10561         arm_netbsd_nat_target.
10562         (_initialize_arm_netbsd_nat): Adjust to C++ification.
10563         * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
10564         (the_hppa_nbsd_nat_target): New.
10565         (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
10566         hppa_nbsd_nat_target methods.
10567         (_initialize_hppanbsd_nat): Adjust to C++ification.
10568         * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
10569         (the_hppa_obsd_nat_target): New.
10570         (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
10571         methods of hppa_obsd_nat_target.
10572         (_initialize_hppaobsd_nat): Adjust to C++ification.  Use
10573         add_target.
10574         * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
10575         (_initialize_i386nbsd_nat): Adjust to C++ification.  Use
10576         add_target.
10577         * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
10578         (_initialize_i386obsd_nat): Use add_target.
10579         * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
10580         (the_m68k_bsd_nat_target): New.
10581         (m68kbsd_fetch_inferior_registers)
10582         (m68kbsd_store_inferior_registers): Refactor as methods of
10583         m68k_bsd_nat_target.
10584         (_initialize_m68kbsd_nat): Adjust to C++ification.
10585         * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
10586         (the_mips_fbsd_nat_target): New.
10587         (mips_fbsd_fetch_inferior_registers)
10588         (mips_fbsd_store_inferior_registers): Refactor as methods of
10589         mips_fbsd_nat_target.
10590         (_initialize_mips_fbsd_nat): Adjust to C++ification.  Use
10591         add_target.
10592         * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
10593         (the_mips_nbsd_nat_target): New.
10594         (mipsnbsd_fetch_inferior_registers)
10595         (mipsnbsd_store_inferior_registers): Refactor as methods of
10596         mips_nbsd_nat_target.
10597         (_initialize_mipsnbsd_nat): Adjust to C++ification.
10598         * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
10599         (the_mips64_obsd_nat_target): New.
10600         (mips64obsd_fetch_inferior_registers)
10601         (mips64obsd_store_inferior_registers): Refactor as methods of
10602         mips64_obsd_nat_target.
10603         (_initialize_mips64obsd_nat): Adjust to C++ification.  Use
10604         add_target.
10605         * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
10606         nbsd_nat_target.
10607         * nbsd-nat.h: Include "inf-ptrace.h".
10608         (nbsd_nat_target): New class.
10609         * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
10610         (obsd_wait): Refactor as methods of obsd_nat_target.
10611         (obsd_add_target): Delete.
10612         * obsd-nat.h: Include "inf-ptrace.h".
10613         (obsd_nat_target): New class.
10614         * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
10615         (the_ppc_fbsd_nat_target): New.
10616         (ppcfbsd_fetch_inferior_registers)
10617         (ppcfbsd_store_inferior_registers): Refactor as methods of
10618         ppc_fbsd_nat_target.
10619         (_initialize_ppcfbsd_nat): Adjust to C++ification.  Use
10620         add_target.
10621         * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
10622         (the_ppc_nbsd_nat_target): New.
10623         (ppcnbsd_fetch_inferior_registers)
10624         (ppcnbsd_store_inferior_registers): Refactor as methods of
10625         ppc_nbsd_nat_target.
10626         (_initialize_ppcnbsd_nat): Adjust to C++ification.
10627         * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
10628         (the_ppc_obsd_nat_target): New.
10629         (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
10630         methods of ppc_obsd_nat_target.
10631         (_initialize_ppcobsd_nat): Adjust to C++ification.  Use
10632         add_target.
10633         * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
10634         (the_sh_nbsd_nat_target): New.
10635         (shnbsd_fetch_inferior_registers)
10636         (shnbsd_store_inferior_registers): Refactor as methods of
10637         sh_nbsd_nat_target.
10638         (_initialize_shnbsd_nat): Adjust to C++ification.
10639         * sparc-nat.c (sparc_xfer_wcookie): Make extern.
10640         (inf_ptrace_xfer_partial): Delete.
10641         (sparc_xfer_partial, sparc_target): Delete.
10642         * sparc-nat.h (sparc_fetch_inferior_registers)
10643         (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
10644         (sparc_target): Delete function declaration.
10645         (sparc_target): New template class.
10646         * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
10647         (_initialize_sparcnbsd_nat): Adjust to C++ification.
10648         * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
10649         (_initialize_sparc64fbsd_nat): Adjust to C++ification.  Use
10650         add_target.
10651         * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
10652         (_initialize_sparc64nbsd_nat): Adjust to C++ification.
10653         * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
10654         (_initialize_sparc64obsd_nat): Adjust to C++ification.  Use
10655         add_target.
10656         * vax-bsd-nat.c (vax_bsd_nat_target): New class.
10657         (the_vax_bsd_nat_target): New.
10658         (vaxbsd_fetch_inferior_registers)
10659         (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
10660         methods.
10661         (_initialize_vaxbsd_nat): Adjust to C++ification.
10662
10663         * bsd-kvm.c (bsd_kvm_target): New class.
10664         (bsd_kvm_ops): Now a bsd_kvm_target.
10665         (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
10666         (bsd_kvm_files_info, bsd_kvm_fetch_registers)
10667         (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
10668         bsd_kvm_target.
10669         (bsd_kvm_return_one): Delete.
10670         (bsd_kvm_add_target): Adjust to C++ification.
10671
10672         * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
10673         (nto_procfs_target_procfs): New classes.
10674         (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
10675         (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
10676         (procfs_post_attach, procfs_wait, procfs_fetch_registers)
10677         (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
10678         (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
10679         (procfs_remove_hw_breakpoint, procfs_resume)
10680         (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
10681         (procfs_kill_inferior, procfs_store_registers)
10682         (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
10683         as methods of nto_procfs_target.
10684         (nto_procfs_ops): Now an nto_procfs_target_procfs.
10685         (nto_native_ops): Delete.
10686         (procfs_open, procfs_native_open): Delete.
10687         (nto_native_ops): Now an nto_procfs_target_native.
10688         (init_procfs_targets): Adjust to C++ification.
10689         (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
10690         (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
10691         Refactor as methods of nto_procfs_target.
10692
10693         * go32-nat.c (go32_nat_target): New class.
10694         (the_go32_nat_target): New.
10695         (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
10696         (go32_store_registers, go32_xfer_partial, go32_files_info)
10697         (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
10698         (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
10699         (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
10700         (go32_pid_to_str): Refactor as methods of go32_nat_target.
10701         (go32_target): Delete.
10702         (_initialize_go32_nat): Adjust to C++ification.
10703
10704         * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
10705         (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
10706         (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
10707         (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
10708         gnu_nat_target.
10709         (gnu_target): Delete.
10710         * gnu-nat.h (gnu_target): Delete.
10711         (gnu_nat_target): New class.
10712         * i386-gnu-nat.c (gnu_base_target): New.
10713         (i386_gnu_nat_target): New class.
10714         (the_i386_gnu_nat_target): New.
10715         (_initialize_i386gnu_nat): Adjust to C++ification.
10716
10717 2018-05-02  Pedro Alves  <palves@redhat.com>
10718
10719         * bfd-target.c (target_bfd_xclose): Rename to ...
10720         (target_bfd_close): ... this.
10721         (target_bfd_reopen): Adjust.
10722         * target.c (target_close): Remove references to to_xclose.
10723         * target.h (target_ops::to_xclose): Delete.
10724         (target_ops::to_close): Update comments.
10725
10726 2018-05-02  Pedro Alves  <palves@redhat.com>
10727
10728         * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
10729         "linux-nat.h".
10730         * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
10731         * inf-ptrace.c (inf_ptrace_register_u_offset)
10732         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
10733         (inf_ptrace_store_register, inf_ptrace_store_registers)
10734         (inf_ptrace_trad_target): Move to ...
10735         * linux-nat-trad.c: ... this new file.
10736         * linux-nat-trad.h: New file.
10737         * linux-nat.c (linux_target_install_ops): Make extern.
10738         (linux_trad_target): Delete.
10739         * linux-nat.h (linux_trad_target): Delete declaration.
10740         (linux_target_install_ops): Declare.
10741         * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
10742         "linux-nat.h".
10743
10744 2018-05-02  Pedro Alves  <palves@redhat.com>
10745
10746         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
10747         procfs_target/add_target here.
10748         * procfs.c (procfs_target): Make static.
10749         (_initialize_procfs): Call add_target here.
10750         * procfs.h (struct target_ops): Remove forward declaration.
10751         (procfs_target): Remove declaration.
10752         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
10753
10754 2018-05-02  Pedro Alves  <palves@redhat.com>
10755
10756         * procfs.c (procfs_stopped_by_watchpoint)
10757         (procfs_insert_watchpoint, procfs_remove_watchpoint)
10758         (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
10759         Forward declare.
10760         (procfs_use_watchpoints): Delete, move contents...
10761         (procfs_target): ... here.
10762         * procfs.h (procfs_use_watchpoints): Delete declaration.
10763         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
10764         procfs_use_watchpoints.
10765         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
10766         procfs_use_watchpoints.
10767
10768 2018-05-02  Tom Tromey  <tom@tromey.com>
10769
10770         PR python/20084:
10771         * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
10772         and var_zuinteger_unlimited.
10773         * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
10774         and PARAM_ZUINTEGER_UNLIMITED.
10775         (set_parameter_value): Handle var_zuinteger and
10776         var_zuinteger_unlimited.
10777         (add_setshow_generic): Likewise.
10778         (parmpy_init): Likewise.
10779
10780 2018-04-28  Dan Robertson  <danlrobertson89@gmail.com>
10781
10782         PR rust/23124
10783         * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
10784         pointer is not null before dereferencing it.
10785
10786 2018-04-30  Tom Tromey  <tom@tromey.com>
10787
10788         * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
10789         is_mi_like_p.
10790
10791 2018-04-30  Tom Tromey  <tom@tromey.com>
10792
10793         * breakpoint.c (mention): Remove use of is_mi_like_p.
10794         (print_mention_ranged_breakpoint): Likewise.
10795         * break-catch-throw.c (print_it_exception_catchpoint): Remove use
10796         of is_mi_like_p.
10797
10798 2018-04-30  Tom Tromey  <tom@tromey.com>
10799
10800         * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
10801
10802 2018-04-30  Tom Tromey  <tom@tromey.com>
10803
10804         * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
10805         (info_spu_event_command): Remove some uses of is_mi_like_p.
10806
10807 2018-04-30  Tom Tromey  <tom@tromey.com>
10808
10809         * python/py-framefilter.c (py_print_single_arg)
10810         (enumerate_locals, py_print_args, py_print_frame): Remove some
10811         uses of is_mi_like_p.
10812
10813 2018-04-30  Tom Tromey  <tom@tromey.com>
10814
10815         * ui-out.c: Update.
10816         * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
10817         * ui-out.h (ui_out::is_mi_like_p): Now const.
10818         (ui_out::do_is_mi_like_p): Now const.
10819         * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
10820
10821 2018-04-30  Tom Tromey  <tom@tromey.com>
10822
10823         * varobj.c (varobj_set_visualizer): Use new_reference.
10824         * python/python.c (gdbpy_decode_line): Use new_reference.
10825         * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
10826         new_reference.
10827
10828 2018-04-30  Tom Tromey  <tom@tromey.com>
10829
10830         * varobj.c (install_new_value): Use new_reference.
10831         * value.h (value_incref): Return void.  Swap intro comment with
10832         value_decref.
10833         * value.c (set_value_parent): Use new_reference.
10834         (value_incref): Return void.  Update intro comment.
10835         (release_value): Use new_reference.
10836         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
10837
10838 2018-04-30  Tom Tromey  <tom@tromey.com>
10839
10840         * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
10841         * gdb_bfd.h (new_bfd_ref): Remove.
10842         (gdb_bfd_open): Update comment.
10843         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
10844         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
10845         (gdb_bfd_fdopenr): Use new_reference.
10846         * exec.c (exec_file_attach): Use new_reference.
10847
10848 2018-04-30  Tom Tromey  <tom@tromey.com>
10849
10850         * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
10851         method.
10852
10853 2018-04-30  Tom Tromey  <tom@tromey.com>
10854
10855         * jit.c (jit_read_code_entry): Use type_align.
10856         * i386-tdep.c (i386_gdbarch_init): Don't call
10857         set_gdbarch_long_long_align_bit.
10858         * gdbarch.sh: Remove long_long_align_bit.
10859         * gdbarch.c, gdbarch.h: Rebuild.
10860         * arc-tdep.c (arc_type_align): New function.
10861         (arc_gdbarch_init): Use arc_type_align.  Don't call
10862         set_gdbarch_long_long_align_bit.
10863
10864 2018-04-30  Tom Tromey  <tom@tromey.com>
10865
10866         * rust-lang.c (rust_type_alignment): Remove.
10867         (rust_composite_type): Use type_align.
10868
10869 2018-04-30  Tom Tromey  <tom@tromey.com>
10870
10871         * NEWS: Mention Type.align.
10872         * python/py-type.c (typy_get_alignof): New function.
10873         (type_object_getset): Add "alignof".
10874
10875 2018-04-30  Tom Tromey  <tom@tromey.com>
10876
10877         PR exp/17095:
10878         * NEWS: Update.
10879         * std-operator.def (UNOP_ALIGNOF): New operator.
10880         * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
10881         New.
10882         * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
10883         * c-lang.c (c_op_print_tab): Add alignof.
10884         * c-exp.y (ALIGNOF): New token.
10885         (exp): Add "ALIGNOF" production.
10886         (ident_tokens): Add _Alignof and alignof.
10887
10888 2018-04-30  Tom Tromey  <tom@tromey.com>
10889
10890         * i386-tdep.c (i386_type_align): New function.
10891         (i386_gdbarch_init): Update.
10892         * gdbarch.sh (type_align): New method.
10893         * gdbarch.c, gdbarch.h: Rebuild.
10894         * arch-utils.h (default_type_align): Declare.
10895         * arch-utils.c (default_type_align): New function.
10896         * gdbtypes.h (TYPE_ALIGN_BITS): New define.
10897         (struct type) <align_log2>: New field.
10898         <instance_flags>: Now a bitfield.
10899         (TYPE_RAW_ALIGN): New macro.
10900         (type_align, type_raw_align, set_type_align): Declare.
10901         * gdbtypes.c (type_align, type_raw_align, set_type_align): New
10902         functions.
10903         * dwarf2read.c (quirk_rust_enum): Set type alignment.
10904         (get_alignment, maybe_set_alignment): New functions.
10905         (read_structure_type, read_enumeration_type, read_array_type)
10906         (read_set_type, read_tag_pointer_type, read_tag_reference_type)
10907         (read_subrange_type, read_base_type): Set type alignment.
10908
10909 2018-04-30  Simon Marchi  <simon.marchi@ericsson.com>
10910
10911         * dwarf2read.c (read_index_from_section): Use bool.
10912
10913 2018-04-29  Fabian Groffen  <grobian@gentoo.org>
10914
10915         PR gdb/22950
10916         * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
10917         with #ifdef.
10918
10919 2018-04-29  John Reiser  <jreiser@BitWagon.com>
10920
10921         PR build/22873
10922         * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
10923         last step, and do it atomically.
10924
10925 2018-04-27  Alexandre Oliva  <aoliva@redhat.com>
10926
10927         * compile/compile-c-types.c (convert_int, convert_float):
10928         Update for C FE v1.
10929
10930 2018-04-27  Tom Tromey  <tom@tromey.com>
10931
10932         PR rust/22545:
10933         * rust-lang.c (rust_inclusive_range_type_p): New function.
10934         (rust_range): Handle inclusive ranges.
10935         (rust_compute_range): Likewise.
10936         * rust-exp.y (struct rust_op) <inclusive>: New field.
10937         (DOTDOTEQ): New constant.
10938         (range_expr): Add "..=" productions.
10939         (operator_tokens): Add "..=" token.
10940         (ast_range): Add "inclusive" parameter.
10941         (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
10942         ranges.
10943         * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
10944         bounds values.
10945         * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
10946         LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
10947         Update comments.
10948         * expprint.c (print_subexp_standard): Handle new bounds values.
10949         (dump_subexp_body_standard): Likewise.
10950
10951 2018-04-27  Tom Tromey  <tom@tromey.com>
10952
10953         * configure: Rebuild.
10954         * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
10955         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
10956         "OVERRIDE".
10957         (class symbol_needs_eval_context): Likewise.
10958         * dwarf2read.c (mock_mapped_index::symbol_name_count)
10959         (mock_mapped_index::symbol_name_at): Use "override".  Remove
10960         "virtual".
10961         * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
10962         "override".
10963         (class dwarf_expr_executor): Use "override", not "OVERRIDE".
10964         * aarch64-tdep.c (instruction_reader::read): Use "override".
10965         (instruction_reader_test::read): Likewise.
10966         * arm-tdep.c (instruction_reader::read): Use "override".
10967         (instruction_reader_thumb::read): Likewise.
10968
10969 2018-04-26  Andrzej Kaczmarek  <andrzej.kaczmarek@codecoup.pl>
10970
10971         PR remote/9665
10972         * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
10973         instead of remote_send.
10974         (remote_send): Remove.
10975
10976 2018-04-26  Pedro Alves  <palves@redhat.com>
10977
10978         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
10979         find_function_start_sal instead of find_pc_line.
10980
10981 2018-04-26  Pedro Alves  <palves@redhat.com>
10982
10983         * breakpoint.c (set_breakpoint_location_function): Handle
10984         mst_data_gnu_ifunc.
10985         * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
10986         * elfread.c (elf_symtab_read): Give data symbols with
10987         BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
10988         (elf_rel_plt_read): Update comment.
10989         * linespec.c (convert_linespec_to_sals): Handle
10990         mst_data_gnu_ifunc.
10991         (minsym_found): Handle mst_data_gnu_ifunc.
10992         * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
10993         (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
10994         * parse.c (find_minsym_type_and_address): Handle
10995         mst_data_gnu_ifunc.
10996         * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
10997         * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
10998         * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
10999         comment.
11000         <mst_data_gnu_ifunc>: New enumerator.
11001
11002 2018-04-26  Pedro Alves  <palves@redhat.com>
11003
11004         * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
11005         (lookup_minimal_symbol_by_pc_section): ... this.  Replace
11006         'want_trampoline' parameter by a lookup_msym_prefer parameter.
11007         Handle it.
11008         (lookup_minimal_symbol_by_pc_section): Delete old implementation.
11009         (lookup_minimal_symbol_by_pc): Adjust.
11010         (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
11011         (lookup_solib_trampoline_symbol_by_pc): Adjust.
11012         * minsyms.h (lookup_msym_prefer): New enum.
11013         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
11014         parameter by a lookup_msym_prefer parameter.
11015
11016 2018-04-26  Pedro Alves  <palves@redhat.com>
11017
11018         * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
11019         ends in "@plt" instead of looking at the symbol's section.
11020
11021 2018-04-26  Pedro Alves  <palves@redhat.com>
11022
11023         * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete.  Remove
11024         all references.
11025         (find_pc_partial_function_gnu_ifunc): Rename to ...
11026         (find_pc_partial_function): ... this, and remove references to
11027         'is_gnu_ifunc_p'.
11028         (find_pc_partial_function): Delete old implementation.
11029         * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
11030
11031 2018-04-26  Pedro Alves  <palves@redhat.com>
11032
11033         * linespec.c (struct bound_minimal_symbol_search_key): New.
11034         (convert_linespec_to_sals): Sort minimal symbols earlier.  Don't
11035         skip first line if we found a GNU ifunc minimal symbol by name.
11036         (compare_msymbols): Change parameters to work with a destructured
11037         lhs minsym.
11038         (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
11039         functions.
11040
11041 2018-04-26  Pedro Alves  <palves@redhat.com>
11042
11043         * breakpoint.c (set_breakpoint_location_function): Don't resolve
11044         ifunc targets here.  Instead, if we have an ifunc minsym, use its
11045         address/name.
11046         (add_location_to_breakpoint): Store the minsym and the objfile in
11047         the breakpoint location.
11048         * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
11049         * linespec.c (minsym_found): Resolve GNU ifunc targets here.
11050         Record the minsym in the sal.
11051         * symtab.h (symtab_and_line) <msymbol>: New field.
11052
11053 2018-04-26  Pedro Alves  <palves@redhat.com>
11054
11055         * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
11056         unless we actually resolved the ifunc.
11057
11058 2018-04-26  Pedro Alves  <palves@redhat.com>
11059
11060         * c-exp.y (variable production): Prefer ifunc minsyms over
11061         regular function symbols.
11062         * symtab.c (find_gnu_ifunc): New function.
11063         * minsyms.h (lookup_msym_prefer): New enum.
11064         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
11065         parameter by a lookup_msym_prefer parameter.
11066         * symtab.h (find_gnu_ifunc): New declaration.
11067
11068 2018-04-26  Pedro Alves  <palves@redhat.com>
11069
11070         * blockframe.c (find_gnu_ifunc_target_type): New function.
11071         (find_function_type): New.
11072         * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
11073         return a value with a memory address.
11074         (eval_call): For calls to GNU ifunc functions, try to find the
11075         type of the target function from the type that the resolver
11076         returns.
11077         * gdbtypes.c (objfile_type): Don't install a return type for ifunc
11078         symbols.
11079         * infcall.c (find_function_return_type): Delete.
11080         (find_function_addr): Add 'function_type' parameter.  For calls to
11081         GNU ifunc functions, try to find the type of the target function
11082         from the type that the resolver returns, and return it via
11083         FUNCTION_TYPE.
11084         (call_function_by_hand_dummy): Adjust to use the function type
11085         returned by find_function_addr.
11086         (find_function_addr): Add 'function_type' parameter and move
11087         description here.
11088         * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
11089         declarations.
11090
11091 2018-04-26  Pedro Alves  <palves@redhat.com>
11092
11093         * c-exp.y (variable production): Skip finding an alias for ifunc
11094         symbols.
11095
11096 2018-04-26  Pedro Alves  <palves@redhat.com>
11097
11098         * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
11099
11100 2018-04-25  Pedro Alves  <palves@redhat.com>
11101
11102         * infcmd.c (kill_command): Print the pid as string, not the whole
11103         thread's ptid.  Add comment.  s/has been killed/killed/ in output
11104         message.
11105         * remote.c (remote_detach_1): Print the pid as string, not the
11106         whole thread's ptid.
11107
11108 2018-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
11109             Sergio Durigan Junior  <sergiodj@redhat.com>
11110             Pedro Alves  <palves@redhat.com>
11111
11112         * infcmd.c (kill_command): Print message when inferior has
11113         been killed.
11114         * inferior.c (print_inferior_events): Remove 'static'.  Set as
11115         '1'.
11116         (add_inferior): Improve message printed when
11117         'print_inferior_events' is on.
11118         (exit_inferior): Remove message printed when
11119         'print_inferior_events' is on.
11120         (detach_inferior): Improve message printed when
11121         'print_inferior_events' is on.
11122         (initialize_inferiors): Use 'add_inferior_silent' to set
11123         'current_inferior_'.
11124         * inferior.h (print_inferior_events): Declare here as
11125         'extern'.
11126         * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
11127         '[Detaching...]' messages when 'print_inferior_events' is on.
11128         Use 'add_thread_silent' instead of 'add_thread'.  Add '[' and ']'
11129         as prefix/suffix for messages.  Remove periods.  Fix erroneous
11130         'Detaching after fork from child...', replace it by '... from
11131         parent...'.
11132         (handle_vfork_child_exec_or_exit): Add '[' and ']' as
11133         prefix/suffix when printing 'Detaching...' messages.  Print
11134         them when 'print_inferior_events' is on.
11135         * remote.c (remote_detach_1): Print message when detaching
11136         from inferior and '!is_fork_parent'.
11137
11138 2018-04-24  Tom Tromey  <tom@tromey.com>
11139
11140         * cli-out.h: Reindent.
11141
11142 2018-04-24  Tom Tromey  <tom@tromey.com>
11143
11144         * cli-out.c (cli_ui_out::out_field_fmt): Remove.
11145         (cli_ui_out::do_field_string): Use fputs_filtered.
11146         * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
11147
11148 2018-04-23  Tom Tromey  <tom@tromey.com>
11149
11150         * guile/scm-frame.c (gdbscm_frame_read_var): Use
11151         gdb::unique_xmalloc_ptr.
11152
11153 2018-04-23  Tom Tromey  <tom@tromey.com>
11154
11155         * configure: Rebuild.
11156
11157 2018-04-22  Rajendra SY  <rajendra.sy@gmail.com>
11158
11159         PR gdb/23095
11160         * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
11161         prepare_for_testing.  Set normal_bp to r_debug_state if target
11162         is bsd.
11163
11164 2018-04-21  Pedro Alves  <palves@redhat.com>
11165             Rajendra SY  <rajendra.sy@gmail.com>
11166
11167         * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
11168         * remote.c (extended_remote_attach): In all-stop mode, mark the
11169         thread as executing.
11170
11171 2018-04-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
11172
11173         * thread.c (thread_apply_all_command): Fix comment.
11174         (thread_command): Fix comment.
11175
11176 2018-04-10  Alan Hayward  <alan.hayward@arm.com>
11177
11178         * common/tdesc.h (tdesc_create_feature): Remove xml filename
11179         parameter.
11180         * features/aarch64-core.c (create_feature_aarch64_core):
11181         Regenerate.
11182         * features/aarch64-fpu.c (create_feature_aarch64_fpu):
11183         Likewise.
11184         * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
11185         Likewise.
11186         * features/i386/32bit-avx512.c
11187         (create_feature_i386_32bit_avx512): Likewise.
11188         * features/i386/32bit-core.c (create_feature_i386_32bit_core):
11189         Likewise.
11190         * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
11191         Likewise.
11192         * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
11193         Likewise.
11194         * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
11195         Likewise.
11196         * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
11197         Likewise.
11198         * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
11199         Likewise.
11200         * features/i386/64bit-avx512.c
11201         (create_feature_i386_64bit_avx512): Likewise.
11202         * features/i386/64bit-core.c (create_feature_i386_64bit_core):
11203         Likewise.
11204         * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
11205         Likewise.
11206         * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
11207         Likewise.
11208         * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
11209         Likewise.
11210         * features/i386/64bit-segments.c
11211         (create_feature_i386_64bit_segments): Likewise.
11212         * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
11213         Likewise.
11214         * features/i386/x32-core.c
11215         (create_feature_i386_x32_core): Likewise.
11216         * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
11217         * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
11218         * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
11219         * target-descriptions.c: In generated code, don't pass xml
11220         filename.
11221
11222 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
11223
11224         * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
11225         (print_xml_feature::visit_post): Likewise.
11226         (print_xml_feature::visit): Likewise.
11227         * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
11228         (print_xml_feature): Add new class.
11229         * regformats/regdat.sh: Null xmltarget on feature targets.
11230         * target-descriptions.c (struct target_desc): Add xmltarget.
11231         (maintenance_check_tdesc_xml_convert): Add unittest function.
11232         (tdesc_get_features_xml): Add function to get xml.
11233         (maintenance_check_xml_descriptions): Test xml generation.
11234         * xml-tdesc.c (string_read_description_xml): Add function.
11235         * xml-tdesc.h (string_read_description_xml): Add declaration.
11236
11237 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
11238
11239         * features/Makefile: Add feature marker to targets with new style
11240         target descriptions.
11241         * regformats/aarch64.dat: Regenerate.
11242         * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
11243         * regformats/i386/amd64-avx-linux.dat: Likewise.
11244         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
11245         * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
11246         * regformats/i386/amd64-linux.dat: Likewise.
11247         * regformats/i386/amd64-mpx-linux.dat: Likewise.
11248         * regformats/i386/amd64.dat: Likewise.
11249         * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
11250         * regformats/i386/i386-avx-linux.dat: Likewise.
11251         * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
11252         * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
11253         * regformats/i386/i386-linux.dat: Likewise.
11254         * regformats/i386/i386-mmx-linux.dat: Likewise.
11255         * regformats/i386/i386-mpx-linux.dat: Likewise.
11256         * regformats/i386/i386.dat: Likewise.
11257         * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
11258         * regformats/i386/x32-avx-linux.dat: Likewise.
11259         * regformats/i386/x32-linux.dat: Likewise.
11260         * regformats/tic6x-c62x-linux.dat: Likewise.
11261         * regformats/tic6x-c64x-linux.dat: Likewise.
11262         * regformats/tic6x-c64xp-linux.dat: Likewise.
11263         * regformats/regdat.sh: Parse feature marker.
11264
11265 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
11266
11267         * common/tdesc.h (tdesc_architecture_name): Add new declaration.
11268         (tdesc_osabi_name): Likewise.
11269         * target-descriptions.c (tdesc_architecture_name): Add new
11270         function.
11271         (tdesc_osabi_name): Likewise.
11272
11273 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
11274
11275         * common/tdesc.c (tdesc_predefined_type): Move to here.
11276         (tdesc_named_type): Likewise.
11277         (tdesc_create_vector): Likewise.
11278         (tdesc_create_struct): Likewise.
11279         (tdesc_set_struct_size): Likewise.
11280         (tdesc_create_union): Likewise.
11281         (tdesc_create_flags): Likewise.
11282         (tdesc_create_enum): Likewise.
11283         (tdesc_add_field): Likewise.
11284         (tdesc_add_typed_bitfield): Likewise.
11285         (tdesc_add_bitfield): Likewise.
11286         (tdesc_add_flag): Likewise.
11287         (tdesc_add_enum_value): Likewise.
11288         * common/tdesc.h (struct tdesc_type_builtin): Likewise.
11289         (struct tdesc_type_vector): Likewise.
11290         (struct tdesc_type_field): Likewise.
11291         (struct tdesc_type_with_fields): Likewise.
11292         (tdesc_create_enum): Add declaration.
11293         (tdesc_add_typed_bitfield): Likewise.
11294         (tdesc_add_enum_value): Likewise.
11295         * target-descriptions.c (tdesc_type_field): Move from here.
11296         (tdesc_type_builtin): Likewise.
11297         (tdesc_type_vector): Likewise.
11298         (tdesc_type_with_fields): Likewise.
11299         (tdesc_predefined_types): Likewise.
11300         (tdesc_named_type): Likewise.
11301         (tdesc_create_vector): Likewise.
11302         (tdesc_create_struct): Likewise.
11303         (tdesc_set_struct_size): Likewise.
11304         (tdesc_create_union): Likewise.
11305         (tdesc_create_flags): Likewise.
11306         (tdesc_create_enum): Likewise.
11307         (tdesc_add_field): Likewise.
11308         (tdesc_add_typed_bitfield): Likewise.
11309         (tdesc_add_bitfield): Likewise.
11310         (tdesc_add_flag): Likewise.
11311         (tdesc_add_enum_value): Likewise.
11312         * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
11313         (tdesc_add_typed_bitfield): Likewise.
11314         (tdesc_add_enum_value): Likewise.
11315
11316 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
11317
11318         * common/tdesc.c (tdesc_feature::accept): Move to here.
11319         (tdesc_feature::operator==): Likewise.
11320         (tdesc_create_reg): Likewise.
11321         * common/tdesc.h (tdesc_type_kind): Likewise.
11322         (struct tdesc_type): Likewise.
11323         (struct tdesc_feature): Likewise.
11324         * regformats/regdat.sh: Create a feature.
11325         * target-descriptions.c (tdesc_type_kind): Move from here.
11326         (tdesc_type): Likewise.
11327         (tdesc_type_up): Likewise.
11328         (tdesc_feature): Likewise.
11329         (tdesc_create_reg): Likewise.
11330
11331 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
11332
11333         * Makefile.in: Add arch/tdesc.c
11334         * common/tdesc.c: New file.
11335         * common/tdesc.h (tdesc_element_visitor): Move to here.
11336         (tdesc_element): Likewise.
11337         (tdesc_reg): Likewise.
11338         (tdesc_reg_up): Likewise.
11339         * regformats/regdef.h (reg): Add offset to constructors.
11340         * target-descriptions.c (tdesc_element_visitor): Move from here.
11341         (tdesc_element): Likewise.
11342         (tdesc_reg): Likewise.
11343         (tdesc_reg_up): Likewise.
11344
11345 2018-04-17  Tom Tromey  <tom@tromey.com>
11346
11347         * dwarf2read.c (quirk_rust_enum): Conditionally drop the
11348         discriminant field.
11349
11350 2018-04-17  Tom Tromey  <tom@tromey.com>
11351
11352         * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
11353
11354 2018-04-17  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11355
11356         * symtab.c (print_symbol_info): Skip printing filename and line
11357         number when `last' is NULL.
11358         (symtab_symbol_info): Use empty string instead of NULL for first
11359         invocation of print_symbol_info.
11360         (rbreak_command): Pass NULL to `last' parameter of
11361         print_symbol_info.
11362
11363 2018-04-16  Simon Marchi  <simon.marchi@ericsson.com>
11364
11365         * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
11366         instead of nullptr.
11367
11368 2018-04-16  Pedro Alves  <palves@redhat.com>
11369
11370         * MAINTAINERS (sh): Remove.
11371         * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
11372         (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
11373         (ALLDEPFILES): Remove sh64-tdep.c.
11374         * NEWS: Mentions that support for SH-5/SH64 is removed.
11375         * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
11376         (sh*-*-openbsd*): Ditto.
11377         (sh64-*-elf*): Remove.
11378         (sh*): Remove.
11379         * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
11380         * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
11381         * sh-tdep.c: No longer include "sh64-tdep.h".
11382         (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
11383         * sh64-tdep.c, sh64-tdep.h: Remove files.
11384
11385 2018-04-16  Pedro Alves  <palves@redhat.com>
11386
11387         * MAINTAINERS: Remove m88k.
11388         * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
11389         (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
11390         (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
11391         * NEWS: Mention that support for m88k was removed.
11392         * configure.host (m88*-*-*): Remove support.
11393         * configure.nat (m88k-*-*): Remove support.
11394         * configure.tgt (m88*-*-openbsd*): Remove.
11395         * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
11396
11397 2018-04-15  Simon Marchi  <simon.marchi@polymtl.ca>
11398
11399         * configure.tgt (x86_tobjs): New variable.
11400         (amd64_tobjs, i386_tobjs): Use it.
11401
11402 2018-04-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11403
11404         * symtab.c (print_symbol_info): Precede the symbol definition by
11405         the line number when available.
11406         * NEWS: Advertise this enhancement.
11407
11408 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
11409
11410         * NEWS (New options): announce set/show record btrace cpu.
11411         * btrace.c: Include record-btrace.h.
11412         (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
11413         the vendor is unknown.
11414         (btrace_compute_ftrace_1): Add cpu parameter.  Update callers.
11415         Maybe overwrite the btrace configuration's cpu.
11416         (btrace_compute_ftrace): Add cpu parameter.  Update callers.
11417         (btrace_fetch): Add cpu parameter.  Update callers.
11418         (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
11419         Maybe overwrite the btrace configuration's cpu.  Skip enabling
11420         errata workarounds if the vendor is unknown.
11421         * python/py-record-btrace.c: Include record-btrace.h.
11422         (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
11423         (recpy_bt_function_call_history): Call record_btrace_get_cpu.
11424         * record-btrace.c (record_btrace_cpu_state_kind): New.
11425         (record_btrace_cpu): New.
11426         (set_record_btrace_cpu_cmdlist): New.
11427         (record_btrace_get_cpu): New.
11428         (require_btrace_thread, record_btrace_info)
11429         (record_btrace_resume_thread): Call record_btrace_get_cpu.
11430         (cmd_set_record_btrace_cpu_none): New.
11431         (cmd_set_record_btrace_cpu_auto): New.
11432         (cmd_set_record_btrace_cpu): New.
11433         (cmd_show_record_btrace_cpu): New.
11434         (_initialize_record_btrace): Initialize set/show record btrace cpu
11435         commands.
11436         * record-btrace.h (record_btrace_get_cpu): New.
11437
11438 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
11439
11440         * record.c (set_record_command): Fix typo in message.
11441
11442 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
11443
11444         * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
11445
11446 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
11447
11448         * infrun.c (process_event_stop_test): Call
11449         gdbarch_in_indirect_branch_thunk.
11450         * gdbarch.sh (in_indirect_branch_thunk): New.
11451         * gdbarch.c: Regenerated.
11452         * gdbarch.h: Regenerated.
11453         * x86-tdep.h: New.
11454         * x86-tdep.c: New.
11455         * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
11456         (HFILES_NO_SRCDIR): Add x86-tdep.h.
11457         (ALLDEPFILES): Add x86-tdep.c.
11458         * arch-utils.h (default_in_indirect_branch_thunk): New.
11459         * arch-utils.c (default_in_indirect_branch_thunk): New.
11460         * i386-tdep: Include x86-tdep.h.
11461         (i386_in_indirect_branch_thunk): New.
11462         (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
11463         function.
11464         * amd64-tdep: Include x86-tdep.h.
11465         (amd64_in_indirect_branch_thunk): New.
11466         (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
11467
11468 2018-04-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
11469
11470         PR gdb/23053
11471         * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
11472         (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
11473         (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
11474         regression.
11475
11476 2018-04-12  Tom Tromey  <tom@tromey.com>
11477
11478         * rust-lang.c (rust_print_struct_def): Remove univariant code.
11479         (rust_evaluate_subexp): Likewise.
11480
11481 2018-04-12  Pedro Alves  <palves@redhat.com>
11482
11483         * procfs.c (procfs_detach): Make forward declaration's prototype
11484         match definition's protototype.
11485         (proc_get_LDT_entry): Remove stale do_cleanups call.
11486
11487 2018-04-12  Pedro Alves  <palves@redhat.com>
11488
11489         * target.h (target_ops::to_has_exited): Delete.
11490         (target_has_exited): Delete.
11491         * target-delegates.c: Regenerate.
11492
11493 2018-04-11  Pedro Alves  <palves@redhat.com>
11494
11495         * target.c (fileio_fh_t::t): Add comment.
11496         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
11497         (target_fileio_close): Handle a NULL target.
11498         (invalidate_fileio_fh): New.
11499         (target_close): Call it.
11500         * remote.c (remote_hostio_send_command): No longer check whether
11501         remote_desc is open.
11502
11503 2018-04-11  Pedro Alves  <palves@redhat.com>
11504
11505         * target.c (fileio_fh_t): Make it a named struct instead of a
11506         typedef.
11507         (fileio_fh_t::is_closed): New method.
11508         (DEF_VEC_O (fileio_fh_t)): Remove.
11509         (fileio_fhandles): Now a std::vector.
11510         (is_closed_fileio_fh): Delete.
11511         (acquire_fileio_fd): Adjust.  Rename parameters.
11512         (release_fileio_fd): Adjust.
11513         (fileio_fd_to_fh): Reimplement as a function instead of a macro.
11514         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
11515         (target_fileio_close): Adjust.
11516
11517 2018-04-10  Simon Marchi  <simon.marchi@ericsson.com>
11518
11519         * auto-load.c (auto_load_safe_path_vec_update): Iterate by
11520         index.
11521
11522 2018-04-10  Pedro Alves  <palves@redhat.com>
11523
11524         * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
11525         (scoped_finish_thread_state): New class.
11526         * infcmd.c (run_command_1): Use it instead of finish_thread_state
11527         cleanup.
11528         * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
11529         (fetch_inferior_event, normal_stop): Likewise.
11530         * thread.c (finish_thread_state_cleanup): Delete.
11531
11532 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11533             Pedro Alves  <palves@redhat.com>
11534
11535         * value.c: Include "selftest.h" and "common/array-view.h".
11536         (struct range) <operator ==>: New.
11537         (test_ranges_contain): New.
11538         (check_ranges_vector): New.
11539         (test_insert_into_bit_range_vector): New.
11540         (_initialize_values): Register selftests.
11541         * common/array-view.h (operator==, operator!=): New.
11542
11543 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11544
11545         * common/gdb_vecs.h (unordered_remove): Add overload that takes
11546         an iterator.
11547         * inline-frame.c: Include <algorithm>.
11548         (struct inline_state): Add constructor.
11549         (inline_state_s): Remove.
11550         (DEF_VEC_O(inline_state_s)): Remove.
11551         (inline_states): Change type to std::vector.
11552         (find_inline_frame_state): Adjust to std::vector.
11553         (allocate_inline_frame_state): Remove.
11554         (clear_inline_frame_state): Adjust to std::vector.
11555         (skip_inline_frames): Adjust to std::vector.
11556
11557 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11558
11559         * tracepoint.h (struct trace_state_variable): Add constructor.
11560         <name>: Change type to std::string.
11561         * tracepoint.c (tsv_s): Remove.
11562         (DEF_VEC_O(tsv_s)): Remove.
11563         (tvariables): Change to std::vector.
11564         (create_trace_state_variable): Adjust to std::vector.
11565         (find_trace_state_variable): Likewise.
11566         (find_trace_state_variable_by_number): Likewise.
11567         (delete_trace_state_variable): Likewise.
11568         (trace_variable_command): Adjust to std::string.
11569         (delete_trace_variable_command): Likewise.
11570         (tvariables_info_1): Adjust to std::vector.
11571         (save_trace_state_variables): Likewise.
11572         (start_tracing): Likewise.
11573         (merge_uploaded_trace_state_variables): Adjust to std::vector
11574         and std::string.
11575         * target.h (struct target_ops)
11576         <to_download_trace_state_variable>: Pass reference to
11577         trace_state_variable.
11578         * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
11579         * target-delegates.c: Re-generate.
11580         * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
11581         (mi_tsv_deleted): Likewise.
11582         * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
11583         * remote.c (remote_download_trace_state_variable): Change
11584         pointer to reference and adjust.
11585         * make-target-delegates (parse_argtypes): Handle references.
11586         (write_function_header): Likewise.
11587         (munge_type): Likewise.
11588
11589 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11590
11591         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11592         string_view-selftests.c.
11593         * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
11594         testsuite.
11595         * unittests/basic_string_view/cons/char/1.cc: Likewise.
11596         * unittests/basic_string_view/cons/char/2.cc: Likewise.
11597         * unittests/basic_string_view/cons/char/3.cc: Likewise.
11598         * unittests/basic_string_view/element_access/char/1.cc:
11599         Likewise.
11600         * unittests/basic_string_view/element_access/char/empty.cc:
11601         Likewise.
11602         * unittests/basic_string_view/element_access/char/front_back.cc:
11603         Likewise.
11604         * unittests/basic_string_view/inserters/char/2.cc: Likewise.
11605         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
11606         Likewise.
11607         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
11608         Likewise.
11609         * unittests/basic_string_view/modifiers/swap/char/1.cc:
11610         Likewise.
11611         * unittests/basic_string_view/operations/compare/char/1.cc:
11612         Likewise.
11613         * unittests/basic_string_view/operations/compare/char/13650.cc:
11614         Likewise.
11615         * unittests/basic_string_view/operations/copy/char/1.cc:
11616         Likewise.
11617         * unittests/basic_string_view/operations/data/char/1.cc:
11618         Likewise.
11619         * unittests/basic_string_view/operations/find/char/1.cc:
11620         Likewise.
11621         * unittests/basic_string_view/operations/find/char/2.cc:
11622         Likewise.
11623         * unittests/basic_string_view/operations/find/char/3.cc:
11624         Likewise.
11625         * unittests/basic_string_view/operations/find/char/4.cc:
11626         Likewise.
11627         * unittests/basic_string_view/operations/rfind/char/1.cc:
11628         Likewise.
11629         * unittests/basic_string_view/operations/rfind/char/2.cc:
11630         Likewise.
11631         * unittests/basic_string_view/operations/rfind/char/3.cc:
11632         Likewise.
11633         * unittests/basic_string_view/operations/substr/char/1.cc:
11634         Likewise.
11635         * unittests/basic_string_view/operators/char/2.cc: Likewise.
11636         * unittests/string_view-selftests.c: New file.
11637
11638 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11639
11640         * unittests/basic_string_view/capacity/1.cc: New file.
11641         * unittests/basic_string_view/capacity/empty_neg.cc: New file.
11642         * unittests/basic_string_view/cons/char/1.cc: New file.
11643         * unittests/basic_string_view/cons/char/2.cc: New file.
11644         * unittests/basic_string_view/cons/char/3.cc: New file.
11645         * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
11646         * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
11647         * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
11648         * unittests/basic_string_view/element_access/char/1.cc: New file.
11649         * unittests/basic_string_view/element_access/char/2.cc: New file.
11650         * unittests/basic_string_view/element_access/char/empty.cc: New file.
11651         * unittests/basic_string_view/element_access/char/front_back.cc: New file.
11652         * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
11653         * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
11654         * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
11655         * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
11656         * unittests/basic_string_view/include.cc: New file.
11657         * unittests/basic_string_view/inserters/char/1.cc: New file.
11658         * unittests/basic_string_view/inserters/char/2.cc: New file.
11659         * unittests/basic_string_view/inserters/char/3.cc: New file.
11660         * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
11661         * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
11662         * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
11663         * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
11664         * unittests/basic_string_view/literals/types.cc: New file.
11665         * unittests/basic_string_view/literals/values.cc: New file.
11666         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
11667         * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
11668         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
11669         * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
11670         * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
11671         * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
11672         * unittests/basic_string_view/operations/compare/char/1.cc: New file.
11673         * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
11674         * unittests/basic_string_view/operations/compare/char/2.cc: New file.
11675         * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
11676         * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
11677         * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
11678         * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
11679         * unittests/basic_string_view/operations/copy/char/1.cc: New file.
11680         * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
11681         * unittests/basic_string_view/operations/data/char/1.cc: New file.
11682         * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
11683         * unittests/basic_string_view/operations/find/char/1.cc: New file.
11684         * unittests/basic_string_view/operations/find/char/2.cc: New file.
11685         * unittests/basic_string_view/operations/find/char/3.cc: New file.
11686         * unittests/basic_string_view/operations/find/char/4.cc: New file.
11687         * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
11688         * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
11689         * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
11690         * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
11691         * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
11692         * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
11693         * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
11694         * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
11695         * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
11696         * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
11697         * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
11698         * unittests/basic_string_view/operations/substr/char/1.cc: New file.
11699         * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
11700         * unittests/basic_string_view/operators/char/2.cc: New file.
11701         * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
11702         * unittests/basic_string_view/range_access/char/1.cc: New file.
11703         * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
11704         * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
11705         * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
11706         * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
11707         * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
11708         * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
11709         * unittests/basic_string_view/requirements/typedefs.cc: New file.
11710         * unittests/basic_string_view/typedefs.cc: New file.
11711         * unittests/basic_string_view/types/1.cc: New file.
11712
11713 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11714
11715         * common/gdb_string_view.h: Remove libstdc++ implementation
11716         details, adjust to gdb reality.
11717         * common/gdb_string_view.tcc: Likewise.
11718         * cli/cli-script.c (struct string_view): Remove.
11719         (user_args) <m_args>: Change element type to gdb::string_view.
11720         (user_args::insert_args): Adjust.
11721
11722 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11723
11724         * common/gdb_string_view.h: New file.
11725         * common/gdb_string_view.tcc: New file.
11726
11727 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11728
11729         * ax_cxx_compile_stdcxx.m4: Sync with upstream.
11730         * configure: Re-generate.
11731
11732 2018-04-09  Pedro Alves  <palves@redhat.com>
11733
11734         * gdbarch.sh: Include "observable.h" instead of "observer.h".
11735         (set_target_gdbarch): Call
11736         gdb::observers::architecture_changed.notify instead of
11737         observer_notify_architecture_changed.
11738
11739 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11740
11741         * tracepoint.c (struct current_traceframe_cleanup): Remove.
11742         (do_restore_current_traceframe_cleanup): Remove.
11743         (restore_current_traceframe_cleanup_dtor): Remove.
11744         (make_cleanup_restore_current_traceframe): Remove.
11745         (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
11746         New.
11747         * tracepoint.h (struct scoped_restore_current_traceframe): New.
11748         * infrun.c (fetch_inferior_event): Use
11749         scoped_restore_current_traceframe.
11750
11751 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11752
11753         * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
11754         Remove.
11755         <n_allocated_type_units>: Remove.
11756         <all_type_units>: Change to std::vector.
11757         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
11758         to std::vector change.
11759         (dwarf2_per_objfile::get_cutu): Likewise.
11760         (dwarf2_per_objfile::get_tu): Likewise.
11761         (create_signatured_type_table_from_index): Likewise.
11762         (create_signatured_type_table_from_debug_names): Likewise.
11763         (dw2_symtab_iter_next): Likewise.
11764         (dw2_print_stats): Likewise.
11765         (dw2_expand_all_symtabs): Likewise.
11766         (dw2_expand_marked_cus): Likewise.
11767         (dw2_debug_names_iterator::next): Likewise.
11768         (dwarf2_initialize_objfile): Likewise.
11769         (add_signatured_type_cu_to_table): Likewise.
11770         (create_all_type_units): Likewise.
11771         (add_type_unit): Likewise.
11772         (struct tu_abbrev_offset): Add constructor.
11773         (build_type_psymtabs_1): Adjust to std::vector change.
11774         (print_tu_stats): Likewise.
11775         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
11776         (write_debug_names): Likewise.
11777
11778 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11779
11780         * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
11781         Make an std::vector.
11782         <n_comp_units>: Remove.
11783         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
11784         to std::vector change.
11785         (dwarf2_per_objfile::get_cutu): Likewise.
11786         (dwarf2_per_objfile::get_cu): Likewise.
11787         (create_cus_from_index): Likewise.
11788         (create_addrmap_from_index): Likewise.
11789         (create_addrmap_from_aranges): Likewise.
11790         (dwarf2_read_index): Likewise.
11791         (dw2_find_last_source_symtab): Likewise.
11792         (dw2_map_symtabs_matching_filename): Likewise.
11793         (dw2_symtab_iter_next): Likewise.
11794         (dw2_print_stats): Likewise.
11795         (dw2_expand_all_symtabs): Likewise.
11796         (dw2_expand_symtabs_with_fullname): Likewise.
11797         (dw2_expand_marked_cus): Likewise.
11798         (dw2_map_symbol_filenames): Likewise.
11799         (create_cus_from_debug_names): Likewise.
11800         (dwarf2_read_debug_names): Likewise.
11801         (dw2_debug_names_iterator::next): Likewise.
11802         (dwarf2_initialize_objfile): Likewise.
11803         (set_partial_user): Likewise.
11804         (dwarf2_build_psymtabs_hard): Likewise.
11805         (read_comp_units_from_section): Remove arguments, adjust to
11806         std::vector change.
11807         (create_all_comp_units): Adjust to std::vector and
11808         read_comp_units_from_section changes.
11809         (dwarf2_find_containing_comp_unit): Adjust to std::vector
11810         change.
11811         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
11812         (psyms_seen_size): Likewise.
11813         (write_gdbindex): Likewise.
11814         (write_debug_names): Likewise.
11815
11816 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11817
11818         * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
11819         with dwarf2_per_objfile.
11820         (create_cus_from_index): Likewise.
11821         (create_signatured_type_table_from_index): Likewise.
11822         (dwarf2_read_index): Likewise.
11823         (dwarf2_initialize_objfile): Likewise.
11824         (dwarf2_fetch_die_loc_sect_off):  Get dwarf2_per_objfile from
11825         per_cu rather than get_dwarf2_per_objfile.
11826
11827 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11828
11829         * dwarf2read.h (struct signatured_type): Forward declare.
11830         (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
11831         New methods.
11832         * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
11833         (dw2_get_cutu): ...this.
11834         (dwarf2_per_objfile::get_cu): Rename from...
11835         (dw2_get_cu): ...this.
11836         (dwarf2_per_objfile::get_tu): New.
11837         (create_addrmap_from_index): Adjust.
11838         (create_addrmap_from_aranges): Adjust.
11839         (dw2_find_last_source_symtab): Adjust.
11840         (dw2_map_symtabs_matching_filename): Adjust.
11841         (dw2_symtab_iter_next): Adjust.
11842         (dw2_print_stats): Adjust.
11843         (dw2_expand_all_symtabs): Adjust.
11844         (dw2_expand_symtabs_with_fullname): Adjust.
11845         (dw2_expand_marked_cus): Adjust.
11846         (dw_expand_symtabs_matching_file_matcher): Adjust.
11847         (dw2_map_symbol_filenames): Adjust.
11848         (dw2_debug_names_iterator::next): Adjust.
11849         (dwarf2_initialize_objfile): Adjust.
11850         (set_partial_user): Adjust.
11851         (dwarf2_build_psymtabs_hard): Adjust.
11852
11853 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11854
11855         * dwarf2read.c (create_signatured_type_table_from_debug_names):
11856         Remove unused variables.
11857         (dw2_map_symtabs_matching_filename): Likewise.
11858         (dwarf2_record_block_ranges): Likewise.
11859         (dwarf2_read_addr_index): Likewise.
11860         (follow_die_offset): Likewise.
11861
11862 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11863
11864         * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
11865         to symbol_file_add_main.
11866
11867 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11868
11869         PR mi/22299
11870         * mi/mi-console.c (do_fputc_async_safe): New.
11871         (mi_console_file::write_async_safe): New.
11872         (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
11873         * mi/mi-console.h (class mi_console_file) <write_async_safe>:
11874         New.
11875         * ui-file.c (ui_file::putstrn): Adjust call to
11876         fputstrn_unfiltered.
11877         * utils.c (printchar): Replace do_fputs and do_fprintf
11878         parameters by do_fputc.
11879         (fputstr_filtered): Adjust call to printchar.
11880         (fputstr_unfiltered): Likewise.
11881         (fputstrn_filtered): Likewise.
11882         (fputstrn_unfiltered): Add do_fputc parameter, pass to
11883         printchar.
11884         * utils.h (do_fputc_ftype): New typedef.
11885         (fputstrn_unfiltered): Add do_fputc parameter.
11886
11887 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11888
11889         * regformats/i386/i386-avx.dat: Remove.
11890
11891 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
11892
11893         PR gdb/22979
11894         * amd64-tdep.c (amd64_none_init_abi): New function.
11895         (amd64_x32_none_init_abi): New function.
11896         (_initialize_amd64_tdep): Register handlers for x86-64 and
11897         x64_32 with GDB_OSABI_NONE.
11898         * osabi.c (gdbarch_init_osabi): Allow running handlers for the
11899         GDB_OSABI_NONE osabi.
11900
11901 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
11902
11903         PR gdb/22980
11904         * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
11905         GDB_OSABI_NONE.
11906         * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
11907         * osabi.c (gdb_osabi_names): Add "unknown" entry.
11908
11909 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
11910
11911         * common/byte-vector.h (char_vector): New type.
11912         * target.h (target_read_alloc): Return
11913         gdb::optional<byte_vector>.
11914         (target_read_stralloc): Return gdb::optional<char_vector>.
11915         (target_get_osdata): Return gdb::optional<char_vector>.
11916         * target.c (target_read_alloc_1): Templatize.  Replacement
11917         manual memory management with vector.
11918         (target_read_alloc): Change return type, adjust.
11919         (target_read_stralloc): Change return type, adjust.
11920         (target_get_osdata): Change return type, adjust.
11921         * auxv.c (struct auxv_info) <length>: Remove.
11922         <data>: Change type to gdb::optional<byte_vector>.
11923         (auxv_inferior_data_cleanup): Free auxv_info with delete.
11924         (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
11925         (target_auxv_search): Adjust.
11926         (fprint_target_auxv): Adjust.
11927         * avr-tdep.c (avr_io_reg_read_command): Adjust.
11928         * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
11929         (linux_make_corefile_notes): Adjust.
11930         * osdata.c (get_osdata): Adjust.
11931         * remote.c (remote_get_threads_with_qxfer): Adjust.
11932         (remote_memory_map): Adjust.
11933         (remote_traceframe_info): Adjust.
11934         (btrace_read_config): Adjust.
11935         (remote_read_btrace): Adjust.
11936         (remote_pid_to_exec_file): Adjust.
11937         * solib-aix.c (solib_aix_get_library_list): Adjust.
11938         * solib-dsbt.c (decode_loadmap): Don't free buf.
11939         (dsbt_get_initial_loadmaps): Adjust.
11940         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
11941         * solib-target.c (solib_target_current_sos): Adjust.
11942         * tracepoint.c (sdata_make_value): Adjust.
11943         * xml-support.c (xinclude_start_include): Adjust.
11944         (xml_fetch_content_from_file): Adjust.
11945         * xml-support.h (xml_fetch_another): Change return type.
11946         (xml_fetch_content_from_file): Change return type.
11947         * xml-syscall.c (xml_init_syscalls_info): Adjust.
11948         * xml-tdesc.c (file_read_description_xml): Adjust.
11949         (fetch_available_features_from_target): Change return type.
11950         (target_fetch_description_xml): Adjust.
11951         (target_read_description_xml): Adjust.
11952
11953 2018-04-06  Tom Tromey  <tom@tromey.com>
11954
11955         * value.c (~value): Update.
11956         (struct value) <contents>: Now unique_xmalloc_ptr.
11957         (value_contents_bits_eq, allocate_value_contents)
11958         (value_contents_raw, value_contents_all_raw)
11959         (value_contents_for_printing, value_contents_for_printing_const)
11960         (set_value_enclosing_type): Update.
11961
11962 2018-04-06  Tom Tromey  <tom@tromey.com>
11963
11964         * value.c (range_s): Remove typedef, VEC.
11965         (struct range): Add operator<.
11966         (range_lessthan): Remove.
11967         (ranges_contain): Change type.
11968         (~value): Update.
11969         (struct value) <unavailable, optimized_out>: Now std::vector.
11970         (value_entirely_available)
11971         (value_entirely_covered_by_range_vector)
11972         (value_entirely_unavailable, value_entirely_optimized_out):
11973         Update.
11974         (insert_into_bit_range_vector): Change argument type.
11975         (find_first_range_overlap): Likewise.
11976         (struct ranges_and_idx, value_contents_bits_eq)
11977         (require_not_optimized_out, require_available): Update.
11978         (ranges_copy_adjusted): Change argument types.
11979         (value_optimized_out, value_copy, value_fetch_lazy): Update.
11980
11981 2018-04-06  Tom Tromey  <tom@tromey.com>
11982
11983         * value.c (~value): Update.
11984         (struct value) <parent>: Now a value_ref_ptr.
11985         (value_parent, set_value_parent, value_address, value_copy):
11986         Update.
11987
11988 2018-04-06  Tom Tromey  <tom@tromey.com>
11989
11990         * value.c (struct value): Add constructor, destructor, and member
11991         initializers.
11992         (allocate_value_lazy, value_decref): Update.
11993
11994 2018-04-06  Tom Tromey  <tom@tromey.com>
11995
11996         * value.c (struct value) <released, next>: Remove.
11997         (all_values): Now a std::vector.
11998         (allocate_value_lazy): Update.
11999         (value_next): Remove.
12000         (value_mark, value_free_to_mark, release_value)
12001         (value_release_to_mark): Update.
12002
12003 2018-04-06  Tom Tromey  <tom@tromey.com>
12004
12005         * value.h (fetch_subexp_value, value_release_to_mark): Update.
12006         (free_value_chain): Remove.
12007         * value.c (free_value_chain): Remove.
12008         (value_release_to_mark): Return a std::vector.
12009         * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
12010         std::vector.
12011         (check_condition): Update.
12012         * eval.c (fetch_subexp_value): Change "val_chain" to a
12013         std::vector.
12014         * breakpoint.c (update_watchpoint): Update.
12015         (can_use_hardware_watchpoint): Change "vals" to a std::vector.
12016
12017 2018-04-06  Tom Tromey  <tom@tromey.com>
12018
12019         * value.h (free_all_values): Remove.
12020         * value.c (free_all_values): Remove.
12021
12022 2018-04-06  Tom Tromey  <tom@tromey.com>
12023
12024         * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
12025         (value_history_chain, value_history_count): Remove.
12026         (value_history): New global.
12027         (record_latest_value, access_value_history, show_values)
12028         (preserve_values): Update.
12029
12030 2018-04-06  Tom Tromey  <tom@tromey.com>
12031
12032         * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
12033         * varobj.c (varobj_set_display_format, varobj_set_value)
12034         (install_default_visualizer, construct_visualizer)
12035         (install_new_value, ~varobj, varobj_get_value_type)
12036         (my_value_of_variable, varobj_editable_p): Update.
12037         * c-varobj.c (c_describe_child, c_value_of_variable)
12038         (cplus_number_of_children, cplus_describe_child): Update.
12039         * ada-varobj.c (ada_number_of_children, ada_name_of_child)
12040         (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
12041         (ada_value_of_variable, ada_value_is_changeable_p): Update.
12042
12043 2018-04-06  Tom Tromey  <tom@tromey.com>
12044
12045         * printcmd.c (last_examine_address): Change type to
12046         value_ref_ptr.
12047         (do_examine, x_command): Update.
12048
12049 2018-04-06  Tom Tromey  <tom@tromey.com>
12050
12051         * value.c (release_value): Update.
12052         * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
12053         (struct bpstats) <val>: Now a value_ref_ptr.
12054         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
12055         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
12056         (~watchpoint, print_it_watchpoint, watch_command_1)
12057         (invalidate_bp_value_on_memory_change): Update.
12058
12059 2018-04-06  Tom Tromey  <tom@tromey.com>
12060
12061         * varobj.c (varobj_clear_saved_item)
12062         (update_dynamic_varobj_children, install_new_value, ~varobj):
12063         Update.
12064         * value.h (value_incref): Move declaration earlier.
12065         (value_decref): Rename from value_free.
12066         (struct value_ref_policy): New.
12067         (value_ref_ptr): New typedef.
12068         (struct value_deleter): Remove.
12069         (gdb_value_up): Remove typedef.
12070         (release_value): Change return type.
12071         (release_value_or_incref): Remove.
12072         * value.c (set_value_parent): Update.
12073         (value_incref): Change return type.
12074         (value_decref): Rename from value_free.
12075         (value_free_to_mark, free_all_values, free_value_chain): Update.
12076         (release_value): Return value_ref_ptr.
12077         (release_value_or_incref): Remove.
12078         (record_latest_value, set_internalvar, clear_internalvar):
12079         Update.
12080         * stack.c (info_frame_command): Don't call value_free.
12081         * python/py-value.c (valpy_dealloc, valpy_new)
12082         (value_to_value_object): Update.
12083         * printcmd.c (do_examine): Update.
12084         * opencl-lang.c (lval_func_free_closure): Update.
12085         * mi/mi-main.c (register_changed_p): Don't call value_free.
12086         * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
12087         * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
12088         * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
12089         value_free.
12090         * guile/scm-value.c (vlscm_free_value_smob)
12091         (vlscm_scm_from_value): Update.
12092         * frame.c (frame_register_unwind, frame_unwind_register_signed)
12093         (frame_unwind_register_unsigned, get_frame_register_bytes)
12094         (put_frame_register_bytes): Don't call value_free.
12095         * findvar.c (address_from_register): Don't call value_free.
12096         * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
12097         * dwarf2loc.c (entry_data_value_free_closure)
12098         (value_of_dwarf_reg_entry, free_pieced_value_closure)
12099         (dwarf2_evaluate_loc_desc_full): Update.
12100         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
12101         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
12102         (~watchpoint, watch_command_1)
12103         (invalidate_bp_value_on_memory_change): Update.
12104         * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
12105
12106 2018-04-06  Simon Marchi  <simon.marchi@polymtl.ca>
12107
12108         PR gdb/23022
12109         * warning.m4: Add -Wno-error=deprecated-register.
12110         * configure: Re-generate.
12111
12112 2018-04-05  Tom Tromey  <tom@tromey.com>
12113
12114         * linespec.h: Remove include of "vec.h".
12115
12116 2018-04-05  Tom Tromey  <tom@tromey.com>
12117
12118         * linespec.c (typep): Remove typedef.
12119         (find_methods, find_superclass_methods): Take a std::vector.
12120         (find_method): Use std::vector.
12121
12122 2018-04-05  Tom Tromey  <tom@tromey.com>
12123
12124         * utils.c (compare_strings): Remove.
12125         * utils.h (compare_strings): Remove.
12126         * objc-lang.h (find_imps): Update.
12127         * objc-lang.c (find_methods): Take a std::vector.
12128         (uniquify_strings, find_imps): Likewise.
12129         * linespec.c (find_methods): Take a std::vector.
12130         (decode_objc): Use std::vector.
12131         (add_all_symbol_names_from_pspace, find_superclass_methods): Take
12132         a std::vector.
12133         (find_method, find_function_symbols): Use std::vector.
12134
12135 2018-04-05  Tom Tromey  <tom@tromey.com>
12136
12137         * completer.c (completion_tracker::completion_tracker): Remove
12138         cast.
12139         (completion_tracker::discard_completions): Likewise.
12140         * breakpoint.c (ambiguous_names_p): Remove cast.
12141         * ada-lang.c (_initialize_ada_language): Remove cast.
12142         * utils.h (streq): Update.
12143         (streq_hash): Add new declaration.
12144         * utils.c (streq): Return bool.
12145         (streq_hash): New function.
12146
12147 2018-04-05  Tom Tromey  <tom@tromey.com>
12148
12149         * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
12150         Remove a string copy.
12151
12152 2018-04-05  Tom Tromey  <tom@tromey.com>
12153
12154         * linespec.c (filter_results): Use std::vector.
12155         (decode_line_2, decode_line_full): Update.
12156
12157 2018-04-05  Tom Tromey  <tom@tromey.com>
12158
12159         * linespec.c (canonical_to_fullform): Return std::string.
12160         (filter_results): Update.
12161         (struct decode_line_2_item): Add constructor.
12162         <fullform, displayform>: Now std::string.
12163         (decode_line_2_compare_items): Now a std::sort comparator.
12164         (decode_line_2): Update.
12165
12166 2018-04-05  Tom Tromey  <tom@tromey.com>
12167
12168         * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
12169         (unexpected_linespec_error): Update.
12170         (linespec_parse_basic, parse_linespec): Update.
12171
12172 2018-04-05  Tom Tromey  <tom@tromey.com>
12173
12174         * linespec.c (linespec_parse_basic): Reindent.
12175
12176 2018-04-05  Tom Tromey  <tom@tromey.com>
12177
12178         * minsyms.h (iterate_over_minimal_symbols): Update.
12179         * minsyms.c (iterate_over_minimal_symbols): Take a
12180         gdb::function_view.
12181         * linespec.c (struct collect_minsyms): Remove.
12182         (compare_msyms): Now a std::sort comparator.
12183         (add_minsym): Add parameters.
12184         (search_minsyms_for_name): Update.  Use std::vector.
12185
12186 2018-04-03  Tom Tromey  <tom@tromey.com>
12187
12188         * mipsread.c (read_alphacoff_dynamic_symtab): Use
12189         gdb::byte_vector.
12190
12191 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
12192
12193         * MAINTAINERS (Write After Approval): Add Weimin Pan.
12194
12195 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
12196
12197         PR gdb/16959
12198         * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when 
12199         printing static type.
12200
12201 2018-04-01  Tom Tromey  <tom@tromey.com>
12202
12203         * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
12204         (rs6000_xfer_shared_libraries): Update.
12205
12206 2018-04-01  Simon Marchi  <simon.marchi@polymtl.ca>
12207
12208         * common/gdb_vecs.h (char_ptr): Remove.
12209         * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
12210
12211 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
12212
12213         * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
12214         with std::vector.
12215         * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
12216
12217 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
12218
12219         * tracepoint.h (struct uploaded_tp): Initialize fields.
12220         <actions, step_actions, cmd_strings>: Change type to
12221         std::vector<char *>.
12222         * tracepoint.c (get_uploaded_tp): Allocate with new.
12223         (free_uploaded_tps): Free with delete.
12224         (parse_tracepoint_definition): Adjust to std::vector change.
12225         * breakpoint.c (read_uploaded_action): Likewise.
12226         (create_tracepoint_from_upload): Likewise.
12227         * ctf.c (ctf_write_uploaded_tp): Likewise.
12228         (SET_ARRAY_FIELD): Likewise.
12229         * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
12230
12231 2018-03-30  Tom Tromey  <tom@tromey.com>
12232
12233         * solib-svr4.c (lm_info_read): Use gdb::byte_vector.  Return
12234         std::unique_ptr.
12235         (svr4_keep_data_in_core): Update.
12236         (svr4_read_so_list): Update.
12237
12238 2018-03-30  Tom Tromey  <tom@tromey.com>
12239
12240         * windows-nat.c (handle_output_debug_string, handle_exception):
12241         Update.
12242         * target.h (target_read_string): Update.
12243         * target.c (target_read_string): Change "string" to
12244         unique_xmalloc_ptr.
12245         * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
12246         Update.
12247         * solib-frv.c (frv_current_sos): Update.
12248         * solib-dsbt.c (dsbt_current_sos): Update.
12249         * solib-darwin.c (darwin_current_sos): Update.
12250         * linux-thread-db.c (inferior_has_bug): Update.
12251         * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
12252         Update.  Remove alloca.
12253         * ada-lang.c (ada_main_name): Update.
12254
12255 2018-03-30  Tom Tromey  <tom@tromey.com>
12256
12257         * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
12258         (struct dwo_file_deleter): New.
12259         (dwo_file_up): New typedef.
12260         (open_and_init_dwo_file): Use dwo_file_up.
12261         (free_dwo_file_cleanup): Remove.
12262
12263 2018-03-30  Tom Tromey  <tom@tromey.com>
12264
12265         * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
12266         (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
12267
12268 2018-03-30  Tom Tromey  <tom@tromey.com>
12269
12270         * dwarf2read.c (class free_cached_comp_units): New class.
12271         (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
12272         (free_cached_comp_units): Remove function.
12273
12274 2018-03-30  Tom Tromey  <tom@tromey.com>
12275
12276         * utils.h (make_cleanup_unpush_target): Remove.
12277         * inf-ptrace.c (struct target_unpusher): New.
12278         (target_unpush_up) New typedef.
12279         (inf_ptrace_create_inferior, inf_ptrace_attach): Use
12280         target_unpush_up.
12281         * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
12282
12283 2018-03-27  Tom Tromey  <tom@tromey.com>
12284
12285         * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
12286
12287 2018-03-27  Pedro Alves  <palves@redhat.com>
12288             Tom Tromey  <tom@tromey.com>
12289
12290         * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
12291         destructor.  Now a class.
12292         (gdb_readline_wrapper_cleanup): Remove function.
12293         (gdb_readline_wrapper): Remove cleanups.
12294
12295 2018-03-27  Tom Tromey  <tom@tromey.com>
12296
12297         * typeprint.h (struct type_print_options) <local_typedefs,
12298         global_typedefs>: Remove "struct" keyword.
12299         (class typedef_hash_table): New class.
12300         (recursively_update_typedef_hash, add_template_parameters)
12301         (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
12302         (find_typedef_in_hash): Don't declare.
12303         * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
12304         (typedef_hash_table::recursively_update): Rename from
12305         recursively_update_typedef_hash.  Now a member.
12306         (typedef_hash_table::add_template_parameters): Rename from
12307         add_template_parameters.  Now a member.
12308         (typedef_hash_table::typedef_hash_table): Now a constructor;
12309         rename from create_typedef_hash.
12310         (typedef_hash_table::~typedef_hash_table): Now a destructor;
12311         rename from free_typedef_hash.
12312         (do_free_typedef_hash, make_cleanup_free_typedef_hash)
12313         (do_free_global_table): Remove.
12314         (typedef_hash_table::typedef_hash_table): New constructor; renamed
12315         from copy_type_recursive.
12316         (create_global_typedef_table): Remove.
12317         (typedef_hash_table::find_global_typedef): Now a member of
12318         typedef_hash_table.
12319         (typedef_hash_table::find_typedef): Rename from
12320         find_typedef_in_hash; now a member.
12321         (whatis_exp): Update.
12322         * extension.h (struct ext_lang_type_printers): Add constructor and
12323         destructor.
12324         (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
12325         declare.
12326         * extension.c (ext_lang_type_printers::ext_lang_type_printers):
12327         Now a constructor; rename from start_ext_lang_type_printers.
12328         (ext_lang_type_printers): Now a destructor; rename from
12329         free_ext_lang_type_printers.
12330         * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
12331         Update.
12332         (c_type_print_base_struct_union): Update.  Remove cleanups.
12333
12334 2018-03-27  Tom Tromey  <tom@tromey.com>
12335
12336         * dwarf-index-write.c: Include <cmath>.
12337
12338 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
12339
12340         * NEWS: Add entry describing new "set|show varsize-limit" command.
12341         * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
12342         command.
12343         * printcmd.c (_initialize_printcmd): Add "set var" alias of
12344         "set variable".
12345
12346 2018-03-27  Simon Marchi  <simon.marchi@ericsson.com>
12347
12348         * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
12349         dwarf-index-write.c
12350         (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
12351         * dwarf-index-common.c: New file.
12352         * dwarf-index-common.h: New file.
12353         * dwarf-index-write.c: New file.
12354         * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
12355         (struct dwarf2_section_info): Move from here.
12356         (dwarf2_section_info_def): Likewise.
12357         (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
12358         (offset_type): Likewise.
12359         (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
12360         (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
12361         (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
12362         (byte_swap): Likewise.
12363         (MAYBE_SWAP): Likewise.
12364         (dwarf2_per_cu_ptr): Likewise.
12365         (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
12366         (struct tu_stats): Likewise.
12367         (struct dwarf2_per_objfile): Likewise.
12368         (struct dwarf2_per_cu_data): Likewise.
12369         (struct signatured_type): Likewise.
12370         (sig_type_ptr): Likewise.
12371         (DEF_VEC_P (sig_type_ptr)): Likewise.
12372         (INDEX4_SUFFIX): Likewise.
12373         (INDEX5_SUFFIX): Likewise.
12374         (DEBUG_STR_SUFFIX): Likewise.
12375         (dwarf2_read_section): Make non-static.
12376         (mapped_index_string_hash): Move from here.
12377         (dwarf5_djb_hash): Likewise.
12378         (file_write): Likewise.
12379         (class data_buf): Likewise.
12380         (struct symtab_index_entry): Likewise.
12381         (struct mapped_symtab): Likewise.
12382         (find_slot): Likewise.
12383         (hash_expand): Likewise.
12384         (add_index_entry): Likewise.
12385         (uniquify_cu_indices): Likewise.
12386         (class c_str_view): Likewise.
12387         (class c_str_view_hasher): Likewise.
12388         (class vector_hasher): Likewise.
12389         (write_hash_table): Likewise.
12390         (psym_index_map): Likewise.
12391         (struct addrmap_index_data): Likewise.
12392         (add_address_entry): Likewise.
12393         (add_address_entry_worker): Likewise.
12394         (write_address_map): Likewise.
12395         (symbol_kind): Likewise.
12396         (write_psymbols): Likewise.
12397         (struct signatured_type_index_data): Likewise.
12398         (write_one_signatured_type): Likewise.
12399         (recursively_count_psymbols): Likewise.
12400         (recursively_write_psymbols): Likewise.
12401         (class debug_names): Likewise.
12402         (check_dwarf64_offsets): Likewise.
12403         (psyms_seen_size): Likewise.
12404         (write_gdbindex): Likewise.
12405         (write_debug_names): Likewise.
12406         (assert_file_size): Likewise.
12407         (write_psymtabs_to_index): Likewise.
12408         (save_gdb_index_command): Likewise.
12409         (_initialize_dwarf2_read): Don't register the "save gdb-index"
12410         command.
12411         * dwarf2read.h: New file.
12412
12413 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
12414
12415         PR gdb/22670
12416         * dwarf2read.c (dwarf2_physname): Do not return the demangled
12417         symbol name if the CU's language stores symbol names in linkage
12418         format.
12419         * language.h (struct language_defn)
12420         <la_store_sym_names_in_linkage_form_p>: New field.  Adjust
12421         all instances of this struct.
12422
12423 2018-03-26  Tom Tromey  <tom@tromey.com>
12424
12425         * stack.c (backtrace_command_1): Remove verbose code.
12426
12427 2018-03-26  Tom Tromey  <tom@tromey.com>
12428
12429         * python/py-framefilter.c (py_print_type): Don't catch
12430         exceptions.  Return void.
12431         (py_print_value): Likewise.
12432         (py_print_single_arg): Likewise.
12433         (enumerate_args): Don't catch exceptions.
12434         (py_print_args): Likewise.
12435         (py_print_frame): Likewise.
12436         (gdbpy_apply_frame_filter): Catch exceptions here.
12437
12438 2018-03-26  Tom Tromey  <tom@tromey.com>
12439
12440         * stack.c (_initialize_stack): Remove trailing newlines from help
12441         text.  Add "Usage" line to "backtrace" help.
12442
12443 2018-03-26  Tom Tromey  <tom@tromey.com>
12444
12445         PR python/16486:
12446         * python/py-framefilter.c (py_print_args): Call wrap_hint.
12447
12448 2018-03-26  Tom Tromey  <tom@tromey.com>
12449
12450         * python/py-framefilter.c (py_print_single_arg): Return
12451         EXT_LANG_BT_ERROR from catch.
12452
12453 2018-03-26  Tom Tromey  <tom@tromey.com>
12454
12455         PR backtrace/15584:
12456         * stack.c (backtrace_command_1): Move some code into no-filters
12457         "if".
12458
12459 2018-03-26  Tom Tromey  <tom@tromey.com>
12460
12461         * python/py-framefilter.c (throw_quit_or_print_exception): New
12462         function.
12463         (gdbpy_apply_frame_filter): Use it.
12464
12465 2018-03-26  Tom Tromey  <tom@tromey.com>
12466
12467         PR cli/17716:
12468         * python/py-framefilter.c (py_print_type, py_print_value)
12469         (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
12470         RETURN_MASK_ERROR.
12471
12472 2018-03-26  Tom Tromey  <tom@tromey.com>
12473
12474         * python/py-framefilter.c (enumerate_args): Use
12475         gdb::unique_xmalloc_ptr.
12476
12477 2018-03-26  Tom Tromey  <tom@tromey.com>
12478
12479         * python/py-framefilter.c (py_print_frame): Return
12480         EXT_LANG_BT_OK.
12481         (gdbpy_apply_frame_filter): Update comment.
12482         * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
12483         Remove.
12484         <EXT_LANG_BT_NO_FILTERS>: Change value.
12485
12486 2018-03-26  Tom Tromey  <tom@tromey.com>
12487
12488         PR backtrace/15582:
12489         * stack.c (backtrace_command): Parse "hide" argument.
12490         * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
12491         * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
12492         constant.
12493
12494 2018-03-26  Tom Tromey  <tom@tromey.com>
12495
12496         * stack.c (backtrace_command_1): Remove "show_locals" parameter,
12497         add "flags".
12498         (backtrace_command): Remove "fulltrace", add "flags".
12499
12500 2018-03-26  Tom Tromey  <tom@tromey.com>
12501
12502         * stack.c (backtrace_command): Rewrite command line parsing.
12503
12504 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
12505
12506         * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
12507
12508 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
12509
12510         * filename-seen-cache.h: Add include guard.
12511
12512 2018-03-26  Keith Seitz  <keiths@redhat.com>
12513
12514         * symfile.c (place_section): Remove "struct" from section_addr_info
12515         in comment.
12516         * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
12517         "struct" keyword from section_addr_info.
12518
12519 2018-03-26  Alan Hayward  <alan.hayward@arm.com>
12520
12521         * regformats/regdef.h (reg): Add constructors.
12522
12523 2018-03-25  Pedro Alves  <palves@redhat.com>
12524
12525         * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
12526         if then/else bodies in var_func_name extraction.
12527
12528 2018-03-23  Weimin Pan  <weimin.pan@oracle.com>
12529
12530         * minsyms.c (lookup_minimal_symbol_and_objfile): Use
12531         lookup_minimal_symbol() to find symbol entry.
12532         * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
12533
12534 2018-03-23  Keith Seitz  <keiths@redhat.com>
12535
12536         PR c++/22968
12537         * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
12538         nested type definitions for C++, too.
12539
12540 2018-03-23  Tom Tromey  <tom@tromey.com>
12541
12542         * machoread.c (struct oso_el): Add a constructor.  Don't define as
12543         a typedef.
12544         (macho_register_oso): Remove.
12545         (macho_symtab_read): Take a std::vector.
12546         (oso_el_compare_name): Now a std::sort comparator.
12547         (macho_symfile_read_all_oso): Take a std::vector.
12548         (macho_symfile_read): Use std::vector.  Remove cleanups.
12549
12550 2018-03-22  Tom Tromey  <tom@tromey.com>
12551
12552         * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
12553         (record_full_goto_bookmark): Use std::string.
12554
12555 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
12556
12557         PR tdep/18295
12558         * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
12559         a single mask.
12560
12561 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
12562
12563         * rs6000-tdep.c (store_insn_p): New function.
12564         (skip_prologue): New variable alloca_reg_offset. Set lr_reg
12565         and cr_reg to their unshifted values. Use store_insn_p to
12566         match LR saves using either R1 or fdata->alloca_reg. Use
12567         store_insn_p to match CR saves. Set alloca_reg_offset
12568         when alloca_reg and framep are set. Remove lr_reg shift
12569         when assigning to fdata->lr_register.
12570
12571 2018-03-22  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12572
12573         * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
12574         command line args instead of emitting a warning.
12575
12576 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
12577
12578         * tracepoint.h (struct static_tracepoint_marker): Initialize
12579         fields, define default constructor, move constructor and move
12580         assignment, disable the rest.
12581         <str_id, extra>: Make std::string.
12582         (release_static_tracepoint_marker): Remove.
12583         (free_current_marker): Remove.
12584         * tracepoint.c (free_current_marker): Remove.
12585         (parse_static_tracepoint_marker_definition): Adjust to
12586         std::string, use new hex2str overload.
12587         (release_static_tracepoint_marker): Remove.
12588         (print_one_static_tracepoint_marker): Get marker by reference
12589         and adjust to std::string.
12590         (info_static_tracepoint_markers_command): Adjust to std::vector
12591         changes
12592         * target.h (static_tracepoint_marker_p): Remove typedef.
12593         (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
12594         (struct target_ops) <to_static_tracepoint_marker_at>: Return
12595         bool.
12596         <to_static_tracepoint_markers_by_strid>: Return std::vector.
12597         * target-debug.h
12598         (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
12599         (target_debug_print_std_vector_static_tracepoint_marker): New.
12600         (target_debug_print_struct_static_tracepoint_marker_p): Rename
12601         to...
12602         (target_debug_print_static_tracepoint_marker_p): ... this.
12603         * target-delegates.c: Re-generate.
12604         * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
12605         Make std::string.
12606         * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
12607         (decode_static_tracepoint_spec): Adjust to std::vector.
12608         (tracepoint_print_one_detail): Adjust to std::string.
12609         (strace_marker_decode_location): Adjust to std::string.
12610         (update_static_tracepoint): Adjust to std::string, remove call
12611         to release_static_tracepoint_marker.
12612         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
12613         Adjust to std::vector.
12614         * remote.c (remote_static_tracepoint_marker_at): Return bool.
12615         (remote_static_tracepoint_markers_by_strid): Adjust to
12616         std::vector.
12617         * common/rsp-low.h (hex2str): New overload with explicit count
12618         of bytes.
12619         * common/rsp-low.c (hex2str): New overload with explicit count
12620         of bytes.
12621         * unittests/rsp-low-selftests.c (test_hex2str): New function.
12622         (_initialize_rsp_low_selftests): Add test_hex2str test.
12623         * unittests/tracepoint-selftests.c
12624         (test_parse_static_tracepoint_marker_definition): Adjust to
12625         std::string.
12626
12627 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
12628
12629         * tracepoint.c (parse_static_tracepoint_marker_definition):
12630         Consider case where the definition is followed by more
12631         definitions.
12632         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12633         tracepoint-selftests.c.
12634         * unittests/tracepoint-selftests.c: New.
12635
12636 2018-03-21  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
12637
12638         * MAINTAINERS (Write After Approval): Add Pedro Franco de
12639         Carvalho.
12640
12641 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
12642
12643         * symtab.c (find_pc_sect_line): fixed indentation.
12644
12645 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
12646
12647         * symtab.c (find_pc_sect_line): now uses binary search.
12648
12649 2018-03-19  Tom Tromey  <tom@tromey.com>
12650
12651         * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
12652         "IDENT" production.
12653
12654 2018-03-19  Pedro Alves  <palves@redhat.com>
12655             Tom Tromey  <tom@tromey.com>
12656
12657         * unittests/observable-selftests.c: New file.
12658         * common/observable.h: New file.
12659         * observable.h: New file.
12660         * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
12661         arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
12662         breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
12663         corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
12664         extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
12665         infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
12666         linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
12667         mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
12668         ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
12669         python/py-breakpoint.c, python/py-finishbreakpoint.c,
12670         python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
12671         record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
12672         riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
12673         spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
12674         symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
12675         tui/tui-interp.c, valops.c: Update all users.
12676         * tui/tui-hooks.c (tui_bp_created_observer)
12677         (tui_bp_deleted_observer, tui_bp_modified_observer)
12678         (tui_inferior_exit_observer, tui_before_prompt_observer)
12679         (tui_normal_stop_observer, tui_register_changed_observer):
12680         Remove.
12681         (tui_observers_token): New global.
12682         (attach_or_detach, tui_attach_detach_observers): New functions.
12683         (tui_install_hooks, tui_remove_hooks): Use
12684         tui_attach_detach_observers.
12685         * record-btrace.c (record_btrace_thread_observer): Remove.
12686         (record_btrace_thread_observer_token): New global.
12687         * observer.sh: Remove.
12688         * observer.c: Rename to observable.c.
12689         * observable.c (namespace gdb_observers): Define new objects.
12690         (observer_debug): Move into gdb_observers namespace.
12691         (struct observer, struct observer_list, xalloc_observer_list_node)
12692         (xfree_observer_list_node, generic_observer_attach)
12693         (generic_observer_detach, generic_observer_notify): Remove.
12694         (_initialize_observer): Update.
12695         Don't include observer.inc.
12696         * Makefile.in (generated_files): Remove observer.h, observer.inc.
12697         (clean mostlyclean): Likewise.
12698         (observer.h, observer.inc): Remove targets.
12699         (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
12700         (COMMON_SFILES): Use observable.c, not observer.c.
12701         * .gitignore: Remove observer.h.
12702
12703 2018-03-18  Tom Tromey  <tom@tromey.com>
12704
12705         * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
12706         gdb::def_vector.
12707         (bfd_lookup_symbol_from_dyn_symtab): Likewise.
12708
12709 2018-03-17  Tom Tromey  <tom@tromey.com>
12710
12711         * auto-load.c (auto_load_objfile_script_1): Use std::string.
12712
12713 2018-03-17  Tom Tromey  <tom@tromey.com>
12714
12715         * target.c (class scoped_target_fd): New.
12716         (target_fileio_close_cleanup): Remove.
12717         (target_fileio_read_alloc_1): Use scoped_target_fd.
12718
12719 2018-03-16  Simon Marchi  <simon.marchi@polymtl.ca>
12720
12721         * silent-rules.mk: New.
12722         * Makefile.in: Include silent-rules.mk
12723         (srcdir, VPATH, top_srcdir): Move up.
12724         (COMPILE): Add ECHO_CXX.
12725         (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
12726         (init.c): Add ECHO_INIT_C.
12727         (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
12728         (version.c): Add ECHO_GEN.
12729         (printcmd.o): Add ECHO_CXX.
12730         (target-float.o): Add ECHO_CXX.
12731         (ada-exp.o): Add ECHO_CXX.
12732         (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
12733         (insight$(EXEEXT)): Add ECHO_CXXLD.
12734         * gnulib/configure.ac: Add AM_SILENT_RULES.
12735         * gnulib/aclocal.m4: Re-generate.
12736         * gnulib/configure: Re-generate.
12737         * gnulib/import/Makefile.in: Re-generate.
12738
12739 2018-03-16  Tom Tromey  <tom@tromey.com>
12740
12741         * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
12742         * utils.h (make_cleanup_free_section_addr_info): Don't declare.
12743         * utils.c (do_free_section_addr_info)
12744         (make_cleanup_free_section_addr_info): Remove.
12745         * symfile.h (struct other_sections): Add constructor.
12746         (struct section_addr_info): Remove.
12747         (section_addr_info): New typedef.
12748         (struct sym_fns) <sym_offsets>: Change type of parameter.
12749         (build_section_addr_info_from_objfile)
12750         (relative_addr_info_to_section_offsets, addr_info_make_relative)
12751         (default_symfile_offsets, symbol_file_add)
12752         (symbol_file_add_from_bfd)
12753         (build_section_addr_info_from_section_table): Update.
12754         (alloc_section_addr_info, free_section_addr_info): Don't declare.
12755         * symfile.c (alloc_section_addr_info): Remove.
12756         (build_section_addr_info_from_section_table): Change return type.
12757         Update.
12758         (build_section_addr_info_from_bfd)
12759         (build_section_addr_info_from_objfile): Likewise.
12760         (free_section_addr_info): Remove.
12761         (relative_addr_info_to_section_offsets): Change type of "addrs".
12762         (addrs_section_compar): Now a std::sort comparator.
12763         (addrs_section_sort): Change return type.
12764         (addr_info_make_relative): Change type of "addrs".  Update.
12765         (default_symfile_offsets, syms_from_objfile_1)
12766         (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
12767         (symbol_file_add_separate): Update.
12768         (symbol_file_add): Change type of "addrs".  Update.
12769         (add_symbol_file_command): Update.  Remove cleanups.
12770         * symfile-mem.c (symbol_file_add_from_memory): Update.  Remove
12771         cleanups.
12772         * symfile-debug.c (debug_sym_offsets): Change type of "info".
12773         * solib.c (solib_read_symbols): Update.
12774         * objfiles.c (objfile_relocate): Update.  Remove cleanups.
12775         * machoread.c (macho_symfile_offsets): Update.
12776         * jit.c (jit_bfd_try_read_symtab): Update.
12777
12778 2018-03-15  Simon Marchi  <simon.marchi@polymtl.ca>
12779
12780         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12781         unittests/utils-selftests.c.
12782         * unittests/utils-selftests.c: New file.
12783
12784 2018-03-14  Tom Tromey  <tom@tromey.com>
12785
12786         PR cli/14977:
12787         * printcmd.c (printf_c_string, printf_wide_c_string): Special case
12788         for NULL.
12789
12790 2018-03-14  Tom Tromey  <tom@tromey.com>
12791
12792         PR cli/19918:
12793         * printcmd.c (printf_pointer): Allow "-" in format.
12794
12795 2018-03-14  Tom Tromey  <tom@tromey.com>
12796
12797         * printcmd.c (_initialize_printcmd): Add usage to printf.
12798
12799 2018-03-14  Yao Qi  <qiyao@sourceware.org>
12800
12801         * MAINTAINERS: Update my email address.
12802
12803 2018-03-13  Tom Tromey  <tom@tromey.com>
12804
12805         * machoread.c (macho_check_dsym): Change filenamep to a
12806         std::string*.
12807         (macho_symfile_read): Update.
12808         * symfile.c (load_command): Use std::string.
12809
12810 2018-03-12  Andrew Burgess  <andrew.burgess@embecosm.com>
12811
12812         * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
12813         to error message string.
12814         (riscv_register_name): Use xsnprintf instead of sprintf.
12815         (riscv_insn::fetch_instruction): Use gdb_assert instead of
12816         internal_error.
12817         (riscv_print_arg_location): Use gdb_assert_not_reached instead of
12818         error.
12819         (riscv_push_dummy_call): Likewise.
12820
12821 2018-03-12  Tom Tromey  <tom@tromey.com>
12822
12823         * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
12824         Use gdb::byte_vector.
12825         * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
12826
12827 2018-03-12  Yao Qi  <yao.qi@linaro.org>
12828
12829         * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
12830         parameter type to readable_regcache.
12831         * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
12832         the declaration.
12833
12834 2018-03-11  Tom Tromey  <tom@tromey.com>
12835
12836         * dwarf2read.c (struct nextfield): Add initializers.
12837         (struct nextfnfield): Remove.
12838         (struct fnfieldlist): Add initializers.  Remove "length" and
12839         "head", use std::vector.
12840         (struct decl_field_list): Remove.
12841         (struct field_info): Add initializers.
12842         <fields, baseclasses>: Now std::vector.
12843         <nbaseclasses, nfnfields, typedef_field_list_count,
12844         nested_types_list_count>: Remove.
12845         (dwarf2_add_field, dwarf2_add_type_defn)
12846         (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
12847         (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
12848         (process_structure_scope): Update.
12849
12850 2018-03-11  Tom Tromey  <tom@tromey.com>
12851
12852         * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
12853         for use by std::sort.
12854         (build_type_psymtabs_1): Use std::vector.
12855
12856 2018-03-09  Eli Zaretskii  <eliz@gnu.org>
12857
12858         * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
12859         and LIBMPFR in the printed configuration.
12860
12861 2018-03-08  Tom Tromey  <tom@tromey.com>
12862
12863         * source.c (get_filename_and_charpos): Use scoped_fd.
12864         * nto-procfs.c (procfs_open_1): Use scoped_fd.
12865         (procfs_pidlist): Likewise.
12866         * procfs.c (proc_get_LDT_entry): Use scoped_fd.
12867         (iterate_over_mappings): Likewise.
12868
12869 2018-03-08  Tom Tromey  <tom@tromey.com>
12870
12871         * infcall.c (struct call_return_meta_info)
12872         <stack_temporaries_enabled>: Remove.
12873         (get_call_return_value, call_function_by_hand_dummy): Update.
12874         * thread.c (disable_thread_stack_temporaries): Remove.
12875         (enable_thread_stack_temporaries): Remove.
12876         (thread_stack_temporaries_enabled_p): Return bool.
12877         (push_thread_stack_temporary, value_in_thread_stack_temporaries)
12878         (get_last_thread_stack_temporary): Update.
12879         * eval.c (evaluate_subexp): Update.
12880         * gdbthread.h (class enable_thread_stack_temporaries): Now a
12881         class, not a function.
12882         (value_ptr, value_vec): Remove typedefs.
12883         (class thread_info) <stack_temporaries_enabled>: Now bool.
12884         <stack_temporaries>: Now a std::vector.
12885         (thread_stack_temporaries_enabled_p)
12886         (value_in_thread_stack_temporaries): Return bool.
12887
12888 2018-03-08  Simon Marchi  <simon.marchi@ericsson.com>
12889
12890         * remote.c (putpkt_binary): Fix omitted bytes reporting.
12891         (getpkt_or_notif_sane_1): Likewise.
12892
12893 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
12894
12895         * build-id.c (build_id_to_debug_bfd): Use std::string.
12896
12897 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
12898
12899         * build-id.c (find_separate_debug_file_by_buildid): Return
12900         std::string.
12901         * build-id.h (find_separate_debug_file_by_buildid): Return
12902         std::string.
12903         * coffread.c (coff_symfile_read): Adjust to std::string.
12904         * elfread.c (elf_symfile_read): Adjust to std::string.
12905         * symfile.c (separate_debug_file_exists): Change parameter to
12906         std::string.
12907         (find_separate_debug_file): Return std::string.
12908         (find_separate_debug_file_by_debuglink): Return std::string.
12909         * symfile.h (find_separate_debug_file_by_debuglink): Return
12910         std::string.
12911
12912 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
12913
12914         * common/xml-utils.c (xml_escape_text): Move code to...
12915         (xml_escape_text_append): ... this new function.
12916         * common/xml-utils.h (xml_escape_text_append): New declaration.
12917         * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
12918         New function.
12919         (_initialize_xml_utils): register test_xml_escape_text_append as
12920         a selftest.
12921
12922 2018-03-07  Alan Hayward  <alan.hayward@arm.com>
12923
12924         * defs.h: Remove MAX_REGISTER_SIZE.
12925         * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
12926         asserts.
12927         * python/py-unwind.c (pyuw_sniffer): Likewise.
12928
12929 2018-03-07  Tom Tromey  <tom@tromey.com>
12930
12931         * linux-tdep.c (linux_info_proc): Update.
12932         * target.h (struct target_ops) <to_fileio_readlink>: Return
12933         optional<string>.
12934         (target_fileio_readlink): Return optional<string>.
12935         * remote.c (remote_hostio_readlink): Return optional<string>.
12936         * inf-child.c (inf_child_fileio_readlink): Return
12937         optional<string>.
12938         * target.c (target_fileio_readlink): Return optional<string>.
12939
12940 2018-03-07  Andrew Burgess  <andrew.burgess@embecosm.com>
12941
12942         * regcache.c (cooked_read_test): Add riscv to the list of
12943         architectures that have a save_reggroup.
12944
12945 2018-03-07  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12946
12947         * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
12948         value is not a dynamic class object.
12949
12950 2018-03-06  Tom Tromey  <tom@tromey.com>
12951
12952         * rust-exp.y: Formatting fixes.
12953
12954 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12955
12956         * riscv-tdep.c (riscv_register_name): Remove target description
12957         support.
12958         (riscv_gdbarch_init): Remove target description check.
12959
12960 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12961
12962         * riscv-tdep.c: Remove 'Contributed by ...' lines from header
12963         comment.
12964         * riscv-tdep.h: Likewise.
12965
12966 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12967
12968         * riscv-tdep.c (riscv_pseudo_register_read): Delete.
12969         (riscv_pseudo_register_write): Delete.
12970         (riscv_gdbarch_init): Remove all use of pseudo registers.
12971
12972 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
12973
12974         * record-btrace.c (btrace_print_lines): Replace cleanup
12975         parameter with RAII equivalents.
12976         (btrace_insn_history): Replace cleanup with RAII equivalents.
12977         * ui-out.h (make_cleanup_ui_out_list_begin_end,
12978         make_cleanup_ui_out_tuple_begin_end): Remove.
12979         * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
12980         make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
12981         make_cleanup_ui_out_list_begin_end): Remove.
12982
12983 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
12984
12985         * record-btrace.c (record_btrace_maybe_mark_async_event): Change
12986         parameter types to std::vector.  Use bool.
12987         (record_btrace_wait): Replace VEC(tp_t) with
12988         std::vector<thread_info *>.
12989         * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
12990
12991 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
12992
12993         * record-btrace.c (record_btrace_disable_callback): Remove.
12994         (struct scoped_btrace_disable): New.
12995         (record_btrace_open): Use scoped_btrace_disable.
12996
12997 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12998
12999         * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
13000         reading values from registers.
13001
13002 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
13003
13004         * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
13005         where appropriate.
13006
13007 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
13008
13009         * riscv-tdep.c (riscv_print_arg_location): Add header comment,
13010         change parameter type.  Use GDB's print functions, and use
13011         core_addr_to_string where appropriate.
13012         (riscv_push_dummy_call): Use core_addr_to_string where
13013         appropriate, update call to riscv_print_arg_location, and reindent
13014         a few lines.
13015         (riscv_return_value): Update call to riscv_print_arg_location.
13016
13017 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
13018             Tim Newsome <tim@sifive.com>
13019             Albert Ou <a0u@eecs.berkeley.edu>
13020             Darius Rad <darius@bluespec.com>
13021
13022         * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
13023         (HFILES_NO_SRCDIR): Add riscv-tdep.h.
13024         (ALLDEPFILES): Add riscv-tdep.c
13025         * configure.tgt: Add riscv support.
13026         * riscv-tdep.c: New file.
13027         * riscv-tdep.h: New file.
13028         * NEWS: Mention new target.
13029         * MAINTAINERS: Add entry for riscv.
13030
13031 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
13032
13033         * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
13034         fields within aggregates.
13035
13036 2018-03-04  Simon Marchi  <simon.marchi@polymtl.ca>
13037
13038         * record-btrace.c (btrace_print_lines): Change type of flags to
13039         gdb_disassembly_flags.
13040
13041 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
13042
13043         * fbsd-nat.c: Include "inf-ptrace.h".
13044         (USE_SIGTRAP_SIGINFO): Conditionally define.
13045         [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
13046         (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
13047         [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
13048         function.
13049         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
13050         Likewise.
13051         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
13052         Likewise.
13053         (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
13054         "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
13055         "supports_stopped_by_hw_breakpoint" target methods.
13056
13057 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
13058
13059         * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
13060         * fbsd-nat.c (debug_fbsd_nat): New variable.
13061         (show_fbsd_nat_debug): New function.
13062         (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
13063         (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
13064
13065 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
13066
13067         * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
13068         * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
13069         prototype.
13070         * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
13071         (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
13072         method.
13073
13074 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
13075
13076         * common/gdb_vecs.c (free_char_ptr_vec): Remove.
13077         * common/gdb_vecs.h (free_char_ptr_vec): Remove.
13078
13079 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
13080
13081         * charset.c (struct charset_vector): New.
13082         (charsets): Change type to charset_vector.
13083         (find_charset_names): Adjust.
13084         (add_one): Adjust.
13085         (_initialize_charset): Adjust.
13086
13087 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
13088
13089         * progspace.h (struct program_space) <deleted_solibs>: Change
13090         type to std::vector<std::string>.
13091         * progspace.c (clear_program_space_solib_cache): Adjust.
13092         * breakpoint.c (print_solib_event): Adjust.
13093         (check_status_catch_solib): Adjust.
13094         * solib.c (update_solib_list): Adjust.
13095         * ui-out.h (class ui_out) <field_string>: New overload.
13096         * ui-out.c (ui_out::field_string): New overload.
13097
13098 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
13099
13100         * progspace.h (struct program_space): Add constructor and
13101         destructor, initialize fields.
13102         (add_program_space): Remove.
13103         * progspace.c (add_program_space): Rename to...
13104         (program_space::program_space): ... this.
13105         (release_program_space): Rename to...
13106         (program_space::~program_space): ... this.
13107         (delete_program_space): Use delete to delete program_space.
13108         (initialize_progspace): Use new to allocate program_space.
13109         * inferior.c (add_inferior_with_spaces): Likewise.
13110         (clone_inferior_command): Likewise.
13111         * infrun.c (follow_fork_inferior): Likewise.
13112         (handle_vfork_child_exec_or_exit): Likewise.
13113
13114 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
13115
13116         * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
13117         (delim_string_to_char_ptr_vec): Return std::vector of
13118         gdb::unique_xmalloc_ptr.
13119         (dirnames_to_char_ptr_vec_append): Take std::vector of
13120         gdb::unique_xmalloc_ptr.
13121         (dirnames_to_char_ptr_vec): Return std::vector of
13122         gdb::unique_xmalloc_ptr.
13123         * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
13124         Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
13125         (delim_string_to_char_ptr_vec): Return an std::vector of
13126         gdb::unique_xmalloc_ptr, adjust the code.
13127         (dirnames_to_char_ptr_vec_append): Take an std::vector of
13128         gdb::unique_xmalloc_ptr, adjust the code.
13129         (dirnames_to_char_ptr_vec): Return an std::vector of
13130         gdb::unique_xmalloc_ptr, adjust the code.
13131         * auto-load.c (auto_load_safe_path_vec): Change type to
13132         std::vector of gdb::unique_xmalloc_ptr.
13133         (auto_load_expand_dir_vars): Return an std::vector of
13134         gdb::unique_xmalloc_ptr, adjust the code.
13135         (auto_load_safe_path_vec_update): Adjust.
13136         (filename_is_in_auto_load_safe_path_vec): Adjust.
13137         (auto_load_objfile_script_1): Adjust.
13138         * build-id.c (build_id_to_debug_bfd): Adjust.
13139         * linux-thread-db.c (thread_db_load_search): Adjust.
13140         * source.c (add_path): Adjust.
13141         (openp): Adjust.
13142         * symfile.c (find_separate_debug_file): Adjust.
13143         * utils.c (do_free_char_ptr_vec): Remove.
13144         (make_cleanup_free_char_ptr_vec): Remove.
13145
13146 2018-03-01  Sergio Durigan Junior  <sergiodj@redhat.com>
13147
13148         PR gdb/22907
13149         * common/pathstuff.c: Conditionally include "<windows.h>".
13150
13151 2018-03-01  Georg Sauthoff  <mail@georg.so>
13152
13153         PR gdb/22888
13154         * gcore.in: Quote variables and switch interpreter to bash.
13155
13156 2018-03-01  Tom Tromey  <tom@tromey.com>
13157
13158         * dwarf2read.c (alloc_discriminant_info): Fix default_index
13159         assertion.  Add assertion for discriminant_index.
13160         (quirk_rust_enum): Use correct base type name in univariant case.
13161
13162 2018-03-01  Simon Marchi  <simon.marchi@ericsson.com>
13163
13164         * record.c (get_call_history_modifiers): Return a
13165         record_print_flags.
13166         (cmd_record_call_history): Adjust.
13167         * record-btrace.c (record_btrace_call_history): Adjust.
13168         (record_btrace_call_history_range): Adjust.
13169         (record_btrace_call_history_from): Adjust.
13170         * target-debug.h (target_debug_print_record_print_flags): New.
13171         * target-delegates.c: Re-generate.
13172         * target.c (target_call_history): Change flags type.
13173         (target_call_history_from): Likewise.
13174         (target_call_history_range): Likewise.
13175         * target.h (struct target_ops) <target_call_history>: Likewise.
13176         (target_call_history_from): Likewise.
13177         (target_call_history_range): Likewise.
13178
13179 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
13180             Simon Marchi  <simon.marchi@polymtl.ca>
13181
13182         * common/common-utils.c: Include "sys/stat.h".
13183         (is_regular_file): Move here from "source.c"; change return
13184         type to "bool".
13185         * common/common-utils.h (is_regular_file): New prototype.
13186         * common/pathstuff.c (contains_dir_separator): New function.
13187         * common/pathstuff.h (contains_dir_separator): New prototype.
13188         * source.c: Don't include "sys/stat.h".
13189         (is_regular_file): Move to "common/common-utils.c".
13190
13191 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
13192
13193         * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
13194         (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
13195         * auto-load.c: Include "common/pathstuff.h".
13196         * common/common-def.h (current_directory): Move here.
13197         * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
13198         function.
13199         * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
13200         prototype.
13201         * common/pathstuff.c: New file.
13202         * common/pathstuff.h: New file.
13203         * compile/compile.c: Include "common/pathstuff.h".
13204         * defs.h (current_directory): Move to "common/common-defs.h".
13205         * dwarf2read.c: Include "common/pathstuff.h".
13206         * exec.c: Likewise.
13207         * guile/scm-safe-call.c: Likewise.
13208         * linux-thread-db.c: Likewise.
13209         * main.c: Likewise.
13210         * nto-tdep.c: Likewise.
13211         * objfiles.c: Likewise.
13212         * source.c: Likewise.
13213         * symtab.c: Likewise.
13214         * utils.c: Include "common/pathstuff.h".
13215         (gdb_realpath): Move to "common/pathstuff.c".
13216         (gdb_realpath_keepfile): Likewise.
13217         (gdb_abspath): Likewise.
13218         * utils.h (gdb_realpath): Move to "common/pathstuff.h".
13219         (gdb_realpath_keepfile): Likewise.
13220         (gdb_abspath): Likewise.
13221
13222 2018-02-28  John Baldwin  <jhb@FreeBSD.org>
13223
13224         * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
13225         wildcard process pid for super_resume for kernels with a
13226         specific bug.
13227
13228 2018-02-27  Phil Muldoon  <pmuldoon@redhat.com>
13229
13230         * compile/compile.c (get_args): Add additional comments
13231         explaining function.
13232
13233 2018-02-27  Simon Marchi  <simon.marchi@polymtl.ca>
13234             Tom Tromey  <tom@tromey.com>
13235
13236         * target.h (memory_write_request_s): Remove typedef.  Don't define
13237         VEC.
13238         (target_write_memory_blocks): Change argument to std::vector.
13239         (struct memory_write_request): Add constructor.
13240         * target-memory.c (compare_block_starting_address): Return bool.
13241         Change argument types.
13242         (claim_memory): Change arguments to use std::vector.
13243         (split_regular_and_flash_blocks, blocks_to_erase)
13244         (compute_garbled_blocks): Likewise.
13245         (cleanup_request_data, cleanup_write_requests_vector): Remove.
13246         (target_write_memory_blocks): Change argument to std::vector.
13247         * symfile.c (struct load_section_data): Add constructor and
13248         destructor.  Use std::vector for "requests".
13249         (struct load_progress_data): Add initializers.
13250         (load_section_callback): Update.  Use "new".
13251         (clear_memory_write_data): Remove.
13252         (generic_load): Update.
13253
13254 2018-02-27  Alan Hayward  <alan.hayward@arm.com>
13255
13256         * arch/aarch64.h: Use common/tdesc.h.
13257
13258 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
13259
13260         * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
13261         architecture with a 64-bit ABI.
13262
13263 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
13264
13265         * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
13266         ahead of target description loading.
13267
13268 2018-02-26  Tom Tromey  <tom@tromey.com>
13269
13270         * stack.c (backtrace_command_1): Update.
13271         * python/python-internal.h (gdbpy_apply_frame_filter): Change type
13272         of "flags".
13273         * python/py-framefilter.c (py_print_frame)
13274         (gdbpy_apply_frame_filter): Change type of "flags".
13275         * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
13276         of "flags".
13277         (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
13278         (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
13279         * extension.h (enum frame_filter_flag): Rename from
13280         frame_filter_flags.
13281         (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
13282         (apply_ext_lang_frame_filter): Change type of "flags".
13283         * extension.c (apply_ext_lang_frame_filter): Change type of
13284         "flags".
13285         * extension-priv.h (struct extension_language_ops)
13286         <apply_frame_filter>: Change type of "flags".
13287
13288 2018-02-26  Tom Tromey  <tom@tromey.com>
13289
13290         PR python/16497:
13291         * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag.  Fix
13292         off-by-one in py_end computation.
13293         * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
13294         PRINT_MORE_FRAMES.
13295         * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
13296         constant.
13297
13298 2018-02-26  Tom Tromey  <tom@tromey.com>
13299
13300         * dwarf2read.c (struct variant_field): New.
13301         (struct nextfield) <variant>: New field.
13302         (dwarf2_add_field): Handle DW_TAG_variant_part.
13303         (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
13304         discriminated union.
13305         (read_structure_type): Handle DW_TAG_variant_part.
13306         (handle_struct_member_die): New function, extracted from
13307         process_structure_scope.  Handle DW_TAG_variant.
13308         (process_structure_scope): Handle discriminated unions.  Call
13309         handle_struct_member_die.
13310
13311 2018-02-26  Tom Tromey  <tom@tromey.com>
13312
13313         * rust-lang.h (rust_last_path_segment): Declare.
13314         * rust-lang.c (rust_last_path_segment): Now public.  Change
13315         contract.
13316         (struct disr_info): Remove.
13317         (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
13318         (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
13319         (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
13320         (rust_enum_p, rust_enum_variant): New function.
13321         (rust_underscore_fields): Remove "offset" parameter.
13322         (rust_print_enum): New function.
13323         (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
13324         <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
13325         (rust_print_struct_def): Add "for_rust_enum" parameter.  Handle
13326         enums.
13327         (rust_internal_print_type): New function, from rust_print_type.
13328         Remove enum code.
13329         (rust_print_type): Call rust_internal_print_type.
13330         (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
13331         Update enum handling.
13332         * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
13333         (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
13334         (rust_union_quirks): New functions.
13335         (process_full_comp_unit, process_full_type_unit): Call
13336         rust_union_quirks.
13337         (process_structure_scope): Update rust_unions if necessary.
13338
13339 2018-02-26  Tom Tromey  <tom@tromey.com>
13340
13341         * value.h (value_union_variant): Declare.
13342         * valops.c (value_union_variant): New function.
13343         * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
13344         (struct discriminant_info): New.
13345         (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
13346         enumerator.
13347         (struct main_type) <flag_discriminated_union>: New field.
13348
13349 2018-02-26  Tom Tromey  <tom@tromey.com>
13350
13351         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13352         unittests/unpack-selftests.c.
13353         * unittests/unpack-selftests.c: New file.
13354         * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
13355
13356 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13357
13358         * dwarf2read.c (struct partial_die_info) <read>: New method.
13359         (read_partial_die): Remove the declaration.
13360         (load_partial_dies): Update.
13361         (partial_die_info::partial_die_info):
13362         (read_partial_die): Change it to partial_die_info::read.
13363
13364 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13365
13366         * dwarf2read.c (struct partial_die_info) <fixup>: New method.
13367         (fixup_partial_die): Remove declaration.
13368         (scan_partial_symbols): Update.
13369         (partial_die_parent_scope): Likewise.
13370         (partial_die_full_name): Likewise.
13371         (fixup_partial_die): Change it to partial_die_info::fixup.
13372
13373 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13374
13375         * dwarf2read.c (read_partial_die): Update the declaration.
13376         (load_partial_dies): Caller update.
13377         (read_partial_die): Remove one argument abbrev_len.
13378
13379 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13380
13381         * dwarf2read.c (struct partial_die_info): Add ctor, delete
13382         assignment operator.
13383         (load_partial_dies): Use ctor and copy ctor.
13384         (read_partial_die): Update.
13385         (dwarf2_cu::find_partial_die): Use ctor.
13386
13387 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13388
13389         * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
13390         (find_partial_die_in_comp_unit): Change it to
13391         dwarf2_cu::find_partial_die.
13392         (find_partial_die): Update.
13393
13394 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13395
13396         * dwarf2read.c (read_partial_die): Remove the code checking abbrev
13397         is NULL.
13398
13399 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13400
13401         * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
13402
13403 2018-02-26  Alan Hayward  <alan.hayward@arm.com>
13404
13405         * arch/amd64.h: Use common/tdesc.h.
13406         * arch/i386.c: Likewise.
13407         * arch/i386.h: Likewise.
13408         * arch/tic6x.c: Likewise.
13409         * arch/tdesc.h: Move file from here...
13410         * common/tdesc.h: ...to here.
13411         * features/aarch64-core.c: Regenerate.
13412         * features/aarch64-fpu.c: Regenerate.
13413         * features/i386/32bit-avx.c: Regenerate.
13414         * features/i386/32bit-avx512.c: Regenerate.
13415         * features/i386/32bit-core.c: Regenerate.
13416         * features/i386/32bit-linux.c: Regenerate.
13417         * features/i386/32bit-mpx.c: Regenerate.
13418         * features/i386/32bit-pkeys.c: Regenerate.
13419         * features/i386/32bit-sse.c: Regenerate.
13420         * features/i386/64bit-avx.c: Regenerate.
13421         * features/i386/64bit-avx512.c: Regenerate.
13422         * features/i386/64bit-core.c: Regenerate.
13423         * features/i386/64bit-linux.c: Regenerate.
13424         * features/i386/64bit-mpx.c: Regenerate.
13425         * features/i386/64bit-pkeys.c: Regenerate.
13426         * features/i386/64bit-segments.c: Regenerate.
13427         * features/i386/64bit-sse.c: Regenerate.
13428         * features/i386/x32-core.c: Regenerate.
13429         * features/tic6x-c6xp.c: Regenerate.
13430         * features/tic6x-core.c: Regenerate.
13431         * features/tic6x-gp.c: Regenerate.
13432         * target-descriptions.c: Use common/tdesc.h.
13433         * target-descriptions.h: Likewise.
13434
13435 2018-02-24  Tom Tromey  <tom@tromey.com>
13436
13437         * linux-thread-db.c (try_thread_db_load_from_pdir_1)
13438         (try_thread_db_load_from_dir, thread_db_load_search): Use
13439         std::string.
13440         (info_auto_load_libthread_db_compare): Return bool.  Change
13441         argument types.
13442         (info_auto_load_libthread_db): Use std::vector, std::string.
13443         Remove cleanups.
13444
13445 2018-02-24  Tom Tromey  <tom@tromey.com>
13446
13447         * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
13448         std::string.
13449         * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
13450         std::string*.
13451         * gdbarch.c: Rebuild.
13452         * gdbarch.h: Rebuild.
13453         * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
13454         * arch-utils.h (default_fast_tracepoint_valid_at): Update.
13455         * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
13456         std::string*.
13457
13458 2018-02-23  Simon Marchi  <simon.marchi@polymtl.ca>
13459
13460         * gdbtypes.h (sect_offset): Change type to uint64_t.
13461         (sect_offset_str): New function.
13462         * dwarf2read.c (create_addrmap_from_aranges): Use
13463         sect_offset_str.
13464         (error_check_comp_unit_head): Likewise.
13465         (create_debug_type_hash_table): Likewise.
13466         (read_cutu_die_from_dwo): Likewise.
13467         (init_cutu_and_read_dies): Likewise.
13468         (init_cutu_and_read_dies_no_follow): Likewise.
13469         (process_psymtab_comp_unit_reader): Likewise.
13470         (partial_die_parent_scope): Likewise.
13471         (peek_die_abbrev): Likewise.
13472         (process_queue): Likewise.
13473         (dwarf2_physname): Likewise.
13474         (read_namespace_alias): Likewise.
13475         (read_import_statement): Likewise.
13476         (create_dwo_cu_reader): Likewise.
13477         (create_cus_hash_table): Likewise.
13478         (lookup_dwo_cutu): Likewise.
13479         (inherit_abstract_dies): Likewise.
13480         (read_func_scope): Likewise.
13481         (read_call_site_scope): Likewise.
13482         (dwarf2_add_member_fn): Likewise.
13483         (read_common_block): Likewise.
13484         (read_module_type): Likewise.
13485         (read_typedef): Likewise.
13486         (read_subrange_type): Likewise.
13487         (load_partial_dies): Likewise.
13488         (read_partial_die): Likewise.
13489         (find_partial_die): Likewise.
13490         (read_str_index): Likewise.
13491         (dwarf2_string_attr): Likewise.
13492         (build_error_marker_type): Likewise.
13493         (lookup_die_type): Likewise.
13494         (dump_die_shallow): Likewise.
13495         (follow_die_ref): Likewise.
13496         (dwarf2_fetch_die_loc_sect_off): Likewise.
13497         (dwarf2_fetch_constant_bytes): Likewise.
13498         (follow_die_sig): Likewise.
13499         (get_signatured_type): Likewise.
13500         (get_DW_AT_signature_type): Likewise.
13501         (dwarf2_find_containing_comp_unit): Likewise.
13502         (set_die_type): Likewise.
13503
13504 2018-02-21  John Baldwin  <jhb@FreeBSD.org>
13505
13506         * arch/aarch64.c: Include "common-defs.h".
13507         * arch/amd64.c: Likewise.
13508         * arch/i386.c: Likewise.
13509
13510 2018-02-21  Tom Tromey  <tom@tromey.com>
13511
13512         * value.h: (extract_field_op): Update.
13513         * eval.c (extract_field_op): Return a const char *.
13514         * expression.h (parse_expression_for_completion): Update.
13515         * completer.c (complete_expression): Update.
13516         (add_struct_fields): Make fieldname const.
13517         * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
13518         (mark_completion_tag, parse_exp_in_context_1): Update.
13519         (parse_expression_for_completion): Change "name" to
13520         unique_xmalloc_ptr*.
13521
13522 2018-02-21  Tom Tromey  <tom@tromey.com>
13523
13524         * infcall.c (call_function_by_hand_dummy): Use std::vector.
13525
13526 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13527
13528         * avr-tdep.c (avr_read_pc): Change parameter type to
13529         readable_regcache.
13530         * gdbarch.sh (read_pc): Likewise.
13531         * gdbarch.c: Re-generated.
13532         * gdbarch.h: Re-generated.
13533         * hppa-tdep.c (hppa_read_pc): Change parameter type to
13534         readable_regcache.
13535         * ia64-tdep.c (ia64_read_pc): Likewise.
13536         * mips-tdep.c (mips_read_pc): Likewise.
13537         * spu-tdep.c (spu_read_pc): Likewise.
13538
13539 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13540
13541         * Makefile.in (COMMON_SFILES): Add regcache-dump.c
13542         * regcache-dump.c: New file.
13543         * regcache.c: Move register_dump to regcache-dump.c.
13544         (maintenance_print_registers): Likewise.
13545         (maintenance_print_raw_registers): Likewise.
13546         (maintenance_print_cooked_registers): Likewise.
13547         (maintenance_print_register_groups): Likewise.
13548         (maintenance_print_remote_registers): Likewise.
13549         (_initialize_regcache): Likewise.
13550         * regcache.h (register_dump): Moved from regcache.c.
13551
13552 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13553
13554         * regcache.c (regcache::regcache): Update.
13555         (regcache::invalidate): Move it to detached_regcache::invalidate.
13556         (get_thread_arch_aspace_regcache): Update.
13557         (regcache::raw_update): Update.
13558         (regcache::cooked_read): Remove some code.
13559         (regcache::cooked_read_value): Likewise.
13560         (regcache::raw_write): Remove assert on m_readonly_p.
13561         (regcache::raw_supply_integer): Move it to
13562         detached_regcache::raw_supply_integer.
13563         (regcache::raw_supply_zeroed): Likewise.
13564         * regcache.h (detached_regcache) <raw_supply_integer>: New
13565         declaration.
13566         <raw_supply_zeroed, invalidate>: Likewise.
13567         (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
13568         <invalidate>: Likewise.
13569         <m_readonly_p>: Removed.
13570
13571 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13572
13573         * infcmd.c (get_return_value): Let stop_regs point to
13574         get_current_regcache.
13575         * regcache.c (regcache::regcache): Remove.
13576         (register_dump_reg_buffer): New class.
13577         (regcache_print): Adjust.
13578         * regcache.h (regcache): Remove constructors.
13579
13580 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13581
13582         * regcache.c (class register_dump): New class.
13583         (register_dump_regcache, register_dump_none): New class.
13584         (register_dump_remote, register_dump_groups): New class.
13585         (regcache_print): Update.
13586         * regcache.h (regcache_dump_what): Move it to regcache.c.
13587         (regcache) <dump>: Remove.
13588
13589 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13590
13591         * jit.c (struct jit_unwind_private) <regcache>: Change its type to
13592          reg_buffer_rw *.
13593         (jit_unwind_reg_set_impl): Call raw_supply.
13594         (jit_frame_sniffer): Use reg_buffer_rw.
13595         * record-full.c (record_full_core_regbuf): Change its type.
13596         (record_full_core_open_1): Use reg_buffer_rw.
13597         (record_full_close): Likewise.
13598         (record_full_core_fetch_registers): Use regcache->raw_supply.
13599         (record_full_core_store_registers): Likewise.
13600         * regcache.c (regcache::get_register_status): Move it to
13601         reg_buffer.
13602         (regcache_raw_set_cached_value): Remove.
13603         (regcache::raw_set_cached_value): Remove.
13604         (regcache::raw_write): Call raw_supply.
13605         (regcache::raw_supply): Move it to reg_buffer_rw.
13606         * regcache.h (regcache_raw_set_cached_value): Remove.
13607         (reg_buffer_rw): New class.
13608
13609 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13610
13611         * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
13612         readonly_detached_regcache.
13613         (dummy_frame_prev_register): Use regcache->cooked_read.
13614         * frame.c (frame_save_as_regcache): Change return type.
13615         (frame_pop): Update.
13616         * frame.h (frame_save_as_regcache): Update declaration.
13617         * inferior.h (get_infcall_suspend_state_regcache): Update
13618         declaration.
13619         * infrun.c (infcall_suspend_state) <registers>: use
13620         readonly_detached_regcache.
13621         (save_infcall_suspend_state): Don't use regcache_dup.
13622         (get_infcall_suspend_state_regcache): Change return type.
13623         * linux-fork.c (struct fork_info) <savedregs>: Change to
13624         readonly_detached_regcache.
13625         <pc>: New field.
13626         (fork_save_infrun_state): Don't use regcache_dup.
13627         (info_checkpoints_command): Adjust.
13628         * mi/mi-main.c (register_changed_p): Update declaration.
13629         (mi_cmd_data_list_changed_registers): Use
13630         readonly_detached_regcache.
13631         (register_changed_p): Change parameter type to
13632         readonly_detached_regcache.
13633         * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
13634         readonly_detached_regcache.
13635         (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
13636         * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
13637         New.
13638         (regcache::save): Move it to reg_buffer.
13639         (regcache::restore): Change parameter type.
13640         (regcache_dup): Remove.
13641         * regcache.h (reg_buffer) <save>: New method.
13642         (readonly_detached_regcache): New class.
13643         * spu-tdep.c (spu2ppu_cache) <regcache>: Use
13644         readonly_detached_regcache.
13645         (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
13646
13647 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13648
13649         * frame.c (frame_save_as_regcache): Use regcache method save.
13650         (frame_pop): Use regcache method restore.
13651         * infrun.c (restore_infcall_suspend_state): Likewise.
13652         * linux-fork.c (fork_load_infrun_state): Likewise.
13653         * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
13654         save.
13655         * regcache.c (regcache_save): Remove.
13656         (regcache::restore): More asserts.
13657         (regcache_cpy): Remove.
13658         * regcache.h (regcache_save): Remove the declaration.
13659         (regcache::restore): Move from private to public.
13660         Remove the friend declaration of regcache_cpy.
13661         (regcache_cpy): Remove declaration.
13662
13663 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13664
13665         * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
13666         parameter type to 'readable_regcache *'.
13667         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
13668         * arm-tdep.c (arm_neon_quad_read): Likewise.
13669         (arm_pseudo_read): Likewise.
13670         * avr-tdep.c (avr_pseudo_register_read): Likewise.
13671         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
13672         * frv-tdep.c (frv_pseudo_register_read): Likewise.
13673         * gdbarch.c: Re-generated.
13674         * gdbarch.h: Re-generated.
13675         * gdbarch.sh (pseudo_register_read): Change parameter type to
13676         'readable_regcache *'.
13677         (pseudo_register_read_value): Likewise.
13678         * h8300-tdep.c (pseudo_from_raw_register): Likewise.
13679         (h8300_pseudo_register_read): Likewise.
13680         * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
13681         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
13682         (i386_pseudo_register_read_into_value): Likewise.
13683         (i386_pseudo_register_read_value): Likewise.
13684         * i386-tdep.h (i386_pseudo_register_read_into_value): Update
13685         declaration.
13686         * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
13687         * m32c-tdep.c (m32c_raw_read): Likewise.
13688         (m32c_read_flg): Likewise.
13689         (m32c_banked_register): Likewise.
13690         (m32c_banked_read): Likewise.
13691         (m32c_sb_read): Likewise.
13692         (m32c_part_read): Likewise.
13693         (m32c_cat_read): Likewise.
13694         (m32c_r3r2r1r0_read): Likewise.
13695         (m32c_pseudo_register_read): Likewise.
13696         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
13697         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
13698         (mep_pseudo_cr64_read): Likewise.
13699         (mep_pseudo_register_read): Likewise.
13700         * mips-tdep.c (mips_pseudo_register_read): Likewise.
13701         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
13702         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
13703         * regcache.c (regcache::raw_read): Move it to readable_regcache.
13704         (regcache::cooked_read): Likewise.
13705         (regcache::cooked_read_value): Likewise.
13706         (regcache_cooked_read_signed):
13707         (regcache::cooked_read): Likewise.
13708         * regcache.h (readable_regcache): New class.
13709         (regcache): Inherit readable_regcache.  Move some methods to
13710         readable_regcache.
13711         * rl78-tdep.c (rl78_pseudo_register_read): Change
13712         parameter type to 'readable_regcache *'.
13713         * rs6000-tdep.c (do_regcache_raw_read): Remove.
13714         (e500_pseudo_register_read): Change parameter type to
13715         'readable_regcache *'.
13716         (dfp_pseudo_register_read): Likewise.
13717         (vsx_pseudo_register_read): Likewise.
13718         (efpr_pseudo_register_read): Likewise.
13719         * s390-tdep.c (s390_pseudo_register_read): Likewise.
13720         * sh-tdep.c (sh_pseudo_register_read): Likewise.
13721         * sh64-tdep.c (pseudo_register_read_portions): Likewise.
13722         (sh64_pseudo_register_read): Likewise.
13723         * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
13724         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
13725         * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
13726         (spu_pseudo_register_read): Likewise.
13727         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
13728         (xtensa_pseudo_register_read): Likewise.
13729
13730 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13731
13732         * regcache.c (regcache::regcache): Call reg_buffer ctor.
13733         (regcache::arch): Move it to reg_buffer::arch.
13734         (regcache::register_buffer): Likewise.
13735         (regcache::assert_regnum): Likewise.
13736         (regcache::num_raw_registers): Likewise.
13737         * regcache.h (reg_buffer): New class.
13738         (regcache): Inherit reg_buffer.
13739
13740 2018-02-20  Simon Marchi  <simon.marchi@ericsson.com>
13741
13742         * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
13743         gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
13744
13745 2018-02-20  Markus Metzger  <markus.t.metzger@intel.com>
13746
13747         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
13748
13749 2018-02-19  Alan Hayward  <alan.hayward@arm.com>
13750
13751         * Makefile.in: (COMMON_SFILES): Add common/*.c files.
13752         (SFILES): Remove common/*.c files.
13753         (COMMON_OBS): Remove some *.o files built from common/*.c files.
13754         * common/common.host: Add common reference.
13755         * configure.ac: Likewise.
13756         * configure: Regenerate.
13757
13758 2018-02-16  Yao Qi  <yao.qi@linaro.org>
13759
13760         * block.c (block_namespace_info): Inherit allocate_on_obstack.
13761         (block_initialize_namespace): Use new.
13762         * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
13763         (dwarf2_free_objfile): Use delete.
13764         * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
13765         (copy_type_recursive): Use new.
13766         * gdb_obstack.h (allocate_on_obstack): New.
13767
13768 2018-02-15  Yao Qi  <yao.qi@linaro.org>
13769
13770         PR gdb/22849
13771         * inferior.c (exit_inferior_1): Reset inf->control.
13772
13773 2018-02-15  Joel Brobecker  <brobecker@adacore.com>
13774
13775         * ada-lang.c (ada_to_fixed_value_create): Delete advance
13776         declaration.
13777
13778 2018-02-14  Pedro Alves  <palves@redhat.com>
13779
13780         * frame-unwind.c (frame_unwind_try_unwinder): Always call
13781         frame_cleanup_after_sniffer on exception.
13782
13783 2018-02-14  Tom Tromey  <tom@tromey.com>
13784
13785         * solist.h (struct target_so_ops) <bfd_open>: Make pathname
13786         const.
13787         (solib_bfd_open): Make pathname const.
13788         * solib.c (solib_bfd_open): Make pathname const.
13789         * solib-spu.c (spu_bfd_fopen): Make name const.
13790         (spu_bfd_open): Make pathname const.
13791         * solib-darwin.c (darwin_bfd_open): Make pathname const.
13792         * solib-aix.c (solib_aix_bfd_open): Make pathname const.
13793
13794 2018-02-14  Tom Tromey  <tom@tromey.com>
13795
13796         * symfile.c (symfile_bfd_open): Update.
13797         * source.h (openp, source_full_path_of, find_and_open_source):
13798         Change argument type to unique_xmalloc_ptr.
13799         * source.c (openp): Take a unique_xmalloc_ptr.
13800         (source_full_path_of, find_and_open_source): Likewise.
13801         (open_source_file, symtab_to_fullname): Update.
13802         * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
13803         unique_xmalloc_ptr.
13804         * solib.c (solib_find_1): Use unique_xmalloc_ptr.
13805         (exec_file_find): Update.
13806         * psymtab.c (psymtab_to_fullname): Update.
13807         * nto-tdep.h (nto_find_and_open_solib): Update.
13808         * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
13809         unique_xmalloc_ptr.
13810         * exec.c (exec_file_attach): Update.
13811         * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
13812         * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
13813
13814 2018-02-14  Tom Tromey  <tom@tromey.com>
13815
13816         * solib.c: Include source.h.
13817         * nto-tdep.c: Include source.h.
13818         * mi/mi-cmd-env.c: Include source.h.
13819         * infcmd.c: Include source.h.
13820         * exec.c: Include source.h.
13821         * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
13822         (add_path, directory_switch, source_path, init_source_path): Move
13823         declarations...
13824         * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
13825         (add_path, directory_switch, source_path, init_source_path):
13826         ...here.
13827
13828 2018-02-14  Tom Tromey  <tom@tromey.com>
13829
13830         * solist.h (exec_file_find, solib_find): Return
13831         unique_xmalloc_ptr.
13832         (solib_bfd_fopen): Take a const char *.
13833         * solib.c (solib_find_1): Return unique_xmalloc_ptr.
13834         (exec_file_find, solib_find): Likewise.
13835         (solib_bfd_fopen): Do not take ownership of "pathname".
13836         (solib_bfd_open): Use unique_xmalloc_ptr.
13837         * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
13838         * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
13839         * infrun.c (follow_exec): Use unique_xmalloc_ptr.
13840         * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
13841
13842 2018-02-14  Joel Brobecker  <brobecker@adacore.com>
13843
13844         * ada-lang.c (name_match_type_from_name): Remove reference to
13845         ada_name_for_lookup in function's documentation.
13846         * ada-lang.h (ada_name_for_lookup): Delete declaration.
13847
13848 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
13849
13850         * defs.h (enum openp_flags): New enum.
13851         (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
13852         Move to enum openp_flags.
13853         (openp_flags): New enum flags.
13854         (openp): Change parameter type to openp_flags.
13855         * source.c (openp): Change parameter type to openp_flags.
13856         * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
13857         * dwarf2read.c (try_open_dwop_file): Use openp_flags.
13858
13859 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
13860
13861         * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
13862         per-command.
13863
13864 2018-02-12  Andrew Burgess  <andrew.burgess@embecosm.com>
13865
13866         * dwarf2read.c (dwarf2_release_queue): Delete function, move body
13867         into...
13868         (class dwarf2_queue_guard): ...the destructor of this new class.
13869         (dw2_do_instantiate_symtab): Create instance of the new class
13870         dwarf2_queue_guard, remove cleanup.
13871
13872 2018-02-09  Tom Tromey  <tom@tromey.com>
13873
13874         * source.c (find_source_lines): Don't reference past the end of
13875         the vector.
13876
13877 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13878
13879         * remote.c (remote_btrace_maybe_reopen): Change error message.
13880         * btrace.c (btrace_enable): Likewise.
13881         (parse_xml_btrace): Likewise.
13882         (parse_xml_btrace_conf): Likewise.
13883
13884 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13885
13886         * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
13887         (linux_enable_pt, linux_enable_bts): Call
13888         diagnose_perf_event_open_fail.
13889
13890 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13891
13892         * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
13893         Remove parameter and change return type.  Update callers.  Move it.
13894         (linux_enable_bts, linux_enable_pt): Improve error message.
13895         (linux_enable_pt): Remove zero buffer size check.
13896         (linux_enable_btrace): Improve error messages.  Remove NULL return
13897         check.
13898
13899 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13900
13901         * btrace.c (btrace_enable): Remove target_supports_btrace call.
13902         * nat/linux-btrace.c (perf_event_pt_event_type): Move.
13903         (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
13904         (linux_supports_pt, linux_supports_btrace): Remove.
13905         (linux_enable_bts): Call cpu_supports_bts.
13906         * nat/linux-btrace.h (linux_supports_btrace): Remove.
13907         * remote.c (remote_supports_btrace): Remove.
13908         (init_remote_ops): Remove remote_supports_btrace.
13909         * target-delegates.c: Regenerated.
13910         * target.c (target_supports_btrace): Remove.
13911         * target.h (target_ops) <to_supports_btrace>: Remove
13912         (target_supports_btrace): Remove.
13913         * x86-linux-nat.c (x86_linux_create_target): Remove
13914         linux_supports_btrace.
13915
13916 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13917
13918         * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
13919         btrace failed.
13920         * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
13921         exception and use message in own exception.
13922
13923 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13924
13925         * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
13926         (perf_event_pt_event_type): Use gdb_file_up.
13927         (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
13928         scoped_fd, and scoped_mmap.
13929
13930 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13931
13932         * common/scoped_mmap.h: New.
13933         * unittests/scoped_mmap-selftest.c: New.
13934         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13935         unittests/scoped_mmap-selftest.c.
13936
13937 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13938
13939         * common/scoped_fd.h: New.
13940         * unittests/scoped_fd-selftest.c: New.
13941         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13942         unittests/scoped_fd-selftest.c.
13943
13944 2018-02-09  Tom Tromey  <tom@tromey.com>
13945
13946         * auto-load.c (auto_load_section_scripts): Use
13947         gdb::unique_xmalloc_ptr.
13948
13949 2018-02-09  Tom Tromey  <tom@tromey.com>
13950
13951         * auto-load.c (execute_script_contents): Use std::string.
13952
13953 2018-02-09  Joel Brobecker  <brobecker@adacore.com>
13954
13955         * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
13956         Python function, rather than a new command.
13957
13958 2018-02-08  Tom Tromey  <tom@tromey.com>
13959
13960         * solib.c (solib_find_1): Use std::string.
13961         (solib_bfd_fopen): Use unique_xmalloc_ptr.
13962
13963 2018-02-08  Tom Tromey  <tom@tromey.com>
13964
13965         * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
13966
13967 2018-02-08  Tom Tromey  <tom@tromey.com>
13968
13969         * source.c (find_source_lines): Use gdb::def_vector.
13970
13971 2018-02-08  Tom Tromey  <tom@tromey.com>
13972
13973         * macrocmd.c (struct temporary_macro_definition): New.
13974         (macro_define_command): Use temporary_macro_definition.  Remove
13975         cleanups.
13976         (free_macro_definition_ptr): Remove.
13977
13978 2018-02-08  Tom Tromey  <tom@tromey.com>
13979
13980         * macroexp.c (maybe_expand): Use std::string.
13981
13982 2018-02-08  Tom Tromey  <tom@tromey.com>
13983
13984         * macroexp.c (struct macro_buffer): Add initializers for some
13985         members.
13986         (init_buffer, init_shared_buffer, free_buffer)
13987         (free_buffer_return_text): Remove.
13988         (macro_buffer): New constructors.
13989         (~macro_buffer): New destructor.
13990         (macro_buffer::set_shared): New method.
13991         (macro_buffer::resize_buffer, macro_buffer::appendc)
13992         (macro_buffer::appendmem): Now methods, not free functions.
13993         (set_token, append_tokens_without_splicing, stringify)
13994         (macro_stringify): Update.
13995         (gather_arguments): Change return type.  Remove argc_p argument,
13996         add args_ptr argument.  Use std::vector.
13997         (substitute_args): Remove argc argument.  Accept std::vector.
13998         (expand): Update.  Use std::vector.
13999         (scan, macro_expand, macro_expand_next): Update.
14000
14001 2018-02-08  Tom Tromey  <tom@tromey.com>
14002
14003         * symtab.c (default_collect_symbol_completion_matches_break_on):
14004         Use unique_xmalloc_ptr.
14005         * macroscope.h: (sal_macro_scope, user_macro_scope)
14006         (default_macro_scope): Return unique_xmalloc_ptr.
14007         * macroscope.c (sal_macro_scope, user_macro_scope)
14008         (default_macro_scope): Return unique_xmalloc_ptr.
14009         * macroexp.h (macro_expand, macro_expand_once): Return
14010         unique_xmalloc_ptr.
14011         * macroexp.c (macro_expand, macro_expand_once): Return
14012         unique_xmalloc_ptr.
14013         * macrocmd.c (macro_expand_command, macro_expand_once_command)
14014         (info_macro_command, info_macros_command): Use
14015         unique_xmalloc_ptr.
14016         * compile/compile-c-support.c (write_macro_definitions): Use
14017         unique_xmalloc_ptr.
14018         * c-exp.y (c_parse): Use unique_xmalloc_ptr.
14019
14020 2018-02-07  Simon Marchi  <simon.marchi@ericsson.com>
14021
14022         * value.c (value_static_field): Assign field type instead of
14023         containing type when returning an optimized out value.
14024
14025 2018-02-06  Yao Qi  <yao.qi@linaro.org>
14026
14027         * ft32-tdep.c (ft32_read_pc): Remove.
14028         (ft32_write_pc): Remove.
14029         (ft32_gdbarch_init): Update.
14030         * m32r-tdep.c (m32r_read_pc): Remove.
14031         (m32r_gdbarch_init): Update.
14032         * mep-tdep.c (mep_read_pc): Remove.
14033         (mep_gdbarch_init): Update.
14034         * microblaze-tdep.c (microblaze_write_pc): Remove.
14035         (microblaze_gdbarch_init): Update.
14036         * mn10300-tdep.c (mn10300_read_pc): Remove.
14037         (mn10300_write_pc): Remove.
14038         (mn10300_gdbarch_init): Update.
14039         * moxie-tdep.c (moxie_read_pc): Remove.
14040         (moxie_write_pc): Remove.
14041         (moxie_gdbarch_init): Update.
14042
14043 2018-02-06  Yao Qi  <yao.qi@linaro.org>
14044
14045         * expprint.c (print_subexp_standard): Handle
14046         OP_F77_UNDETERMINED_ARGLIST.
14047         (dump_subexp_body_standard): Likewise.
14048
14049 2018-02-05  Alan Hayward  <alan.hayward@arm.com>
14050
14051         * target-descriptions.c (tdesc_element_visitor) Add empty
14052         implementations.
14053         (tdesc_type): Move make_gdb_type from here.
14054         (tdesc_type_builtin): Likewise.
14055         (tdesc_type_vector): Likewise.
14056         (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
14057         (make_gdb_type_struct): Move from tdesc_type_with_fields.
14058         (make_gdb_type_union): Likewise.
14059         (make_gdb_type_flags): Likewise.
14060         (make_gdb_type_enum): Likewise.
14061         (make_gdb_type): New function.
14062         (tdesc_register_type): Use static make_gdb_type.
14063
14064 2018-02-05  Ruslan Kabatsayev <b7.10110111@gmail.com>
14065
14066         * infcmd.c (default_print_one_register_info): Align natural-format
14067         column values consistently one under another.
14068         (pad_to_column): New function.
14069
14070 2018-02-05  Joel Brobecker  <brobecker@adacore.com>
14071
14072         * dwarf2read.c (dwarf2_physname): Move commment.
14073
14074 2018-02-01  Leszek Swirski  <leszeks@google.com>
14075
14076         * varobj.c (varobj_formatted_print_options): Allow recursive
14077         pretty printing if pretty printing is enabled.
14078
14079 2018-02-01  Leszek Swirski  <leszeks@google.com>
14080
14081         * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
14082         names after a structop as a filename.
14083
14084 2018-02-01  Yao Qi  <yao.qi@linaro.org>
14085
14086         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
14087         (arm_record_coproc_data_proc): Likewise.
14088
14089 2018-02-01  Yao Qi  <yao.qi@linaro.org>
14090
14091         * arm-tdep.c (arm_record_extension_space): Change ret to signed.
14092
14093 2018-01-31  Nikola Prica  <nikola.prica@rt-rk.com>
14094
14095         * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
14096         assign shifted lr_reg to fdata->lr_register when lr_reg is set.
14097
14098 2018-01-31  Pedro Alves  <palves@redhat.com>
14099
14100         * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
14101         * inflow.c (child_terminal_save_inferior): Wrap reference to
14102         tcgetpgrp in HAVE_TERMIOS_H.
14103         (child_interrupt, child_pass_ctrlc): Wrap references to signal in
14104         _WIN32.
14105         * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
14106         always iterate over all inferiors.
14107         (gdbsim_cntrl_c): Adjust.
14108         * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
14109
14110 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
14111
14112         * gdbtypes.c (lookup_array_range_type): Make sure the array's
14113         index type is objfile-owned if the element type is as well.
14114
14115 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
14116
14117         GDB 8.1 released.
14118
14119 2018-01-30  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14120
14121         * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
14122         "features/s390x-linux64.c".
14123         (_initialize_s390_linux_tdep): Remove initialization of tdescs
14124         s390_linux32 and s390x_linux64.
14125         (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
14126         default tdesc.
14127         * s390-tdep.c: Include "features/s390-linux32.c" and
14128         "features/s390x-linux64.c".
14129         (s390_tdesc_valid): Add check for tdesc_has_registers.
14130         (s390_gdbarch_init): Make sure there is always a valid tdesc.
14131         (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
14132         tdesc_s390x_linux64.
14133         * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
14134         tdesc_s390x_linux64 to...
14135         * s390-tdep.h: ...here.
14136
14137 2018-01-30  Pedro Alves  <palves@redhat.com>
14138
14139         PR gdb/13211
14140         * config.in, configure: Regenerate.
14141         * configure.ac: Check for getpgid.
14142         * go32-nat.c (go32_pass_ctrlc): New.
14143         (go32_target): Install it.
14144         * inf-child.c (inf_child_target): Install
14145         child_terminal_save_inferior, child_pass_ctrlc and
14146         child_interrupt.
14147         * inf-ptrace.c (inf_ptrace_interrupt): Delete.
14148         (inf_ptrace_target): No longer install it.
14149         * infcmd.c (interrupt_target_1): Adjust.
14150         * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
14151         (child_interrupt): Declare.
14152         (inferior::terminal_state): New.
14153         * inflow.c (struct terminal_info): Update comments.
14154         (inferior_process_group): Delete.
14155         (terminal_is_ours): Delete.
14156         (gdb_tty_state): New.
14157         (child_terminal_init): Adjust.
14158         (is_gdb_terminal, sharing_input_terminal_1)
14159         (sharing_input_terminal): New functions.
14160         (child_terminal_inferior): Adjust.  Use sharing_input_terminal.
14161         Set the process's actual process group in the foreground if
14162         possible.  Handle is_ours_for_output/is_ours distinction.  Don't
14163         mark terminal as the inferior's if not sharing GDB's terminal.
14164         Don't check attach_flag.
14165         (child_terminal_ours_for_output, child_terminal_ours): Adjust to
14166         pass down a target_terminal_state.
14167         (child_terminal_save_inferior): New, factored out from ...
14168         (child_terminal_ours_1): ... this.  Handle
14169         target_terminal_state::is_ours_for_output.
14170         (child_interrupt, child_pass_ctrlc): New.
14171         (inflow_inferior_exit): Clear the inferior's terminal_state.
14172         (copy_terminal_info): Copy the inferior's terminal state.
14173         (_initialize_inflow): Remove reference to terminal_is_ours.
14174         * inflow.h (inferior_process_group): Delete.
14175         * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
14176         * procfs.c (procfs_target): Don't install procfs_interrupt.
14177         (procfs_interrupt): Delete.
14178         * remote.c (remote_serial_quit_handler): Adjust.
14179         (remote_interrupt): Remove ptid parameter.  Adjust.
14180         * target-delegates.c: Regenerate.
14181         * target.c: Include "terminal.h".
14182         (target_terminal::terminal_state): Rename to ...
14183         (target_terminal::m_terminal_state): ... this.
14184         (target_terminal::init): Adjust.
14185         (target_terminal::inferior): Adjust to per-inferior
14186         terminal_state.
14187         (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
14188         (target_terminal::ours, target_terminal::ours_for_output): Use
14189         target_terminal_is_ours_kind.
14190         (target_interrupt): Remove ptid parameter.  Adjust.
14191         (default_target_pass_ctrlc): Adjust.
14192         * target.h (target_ops::to_terminal_save_inferior): New field.
14193         (target_ops::to_interrupt): Remove ptid_t parameter.
14194         (target_interrupt): Remove ptid_t parameter.  Update comment.
14195         (target_pass_ctrlc): Update comment.
14196         * target/target.h (target_terminal_state): New scoped enum,
14197         factored out of ...
14198         (target_terminal::terminal_state): ... here.
14199         (target_terminal::inferior): Update comments.
14200         (target_terminal::restore_inferior): New.
14201         (target_terminal::is_inferior, target_terminal::is_ours)
14202         (target_terminal::is_ours_for_output): Adjust.
14203         (target_terminal::scoped_restore_terminal_state): Adjust to
14204         rename, and call restore_inferior() instead of inferior().
14205         (target_terminal::scoped_restore_terminal_state::m_state): Change
14206         type.
14207         (target_terminal::terminal_state): Rename to ...
14208         (target_terminal::m_terminal_state): ... this and change type.
14209
14210 2018-01-30  Pedro Alves  <palves@redhat.com>
14211
14212         * linux-nat.c (wait_for_signal): New function.
14213         (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
14214         directly.
14215         (async_terminal_is_ours)
14216         (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
14217         (linux_nat_add_target): Don't override
14218         to_terminal_inferior/to_terminal_ours.
14219
14220 2018-01-29  Sergio Durigan Junior  <sergiodj@redhat.com>
14221
14222         * remote.c (remote_follow_fork): Don't call "detach_inferior".
14223
14224 2018-01-28  Simon Marchi  <simon.marchi@ericsson.com>
14225
14226         * dwarf2read.c (free_dwo_files): Add forward-declaration.
14227         (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
14228         dwarf2_per_objfile_free here.
14229         (dwarf2_per_objfile_free): Remove.
14230         (_initialize_dwarf2_read): Don't register
14231         dwarf2_per_objfile_free as a registry cleanup.
14232
14233 2018-01-27  Eli Zaretskii  <eliz@gnu.org>
14234
14235         Avoid compilation errors in MinGW native builds
14236
14237         The error is triggered by including python-internal.h, and the
14238         error message is:
14239
14240              In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
14241                       from build-gnulib/import/math.h:27,
14242                       from d:/usr/Python26/include/pyport.h:235,
14243                       from d:/usr/Python26/include/Python.h:58,
14244                       from python/python-internal.h:94,
14245                       from python/py-arch.c:24:
14246              d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
14247         using ::hypot;
14248                 ^~~~~
14249
14250         This happens because Python headers define 'hypot' to expand t
14251         '_hypot' in the Windows builds.
14252         * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
14253         'hypoth'.  This avoids a compilation error.
14254
14255 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
14256
14257         * MAINTAINERS (Write After Approval): Fix ordering.
14258
14259 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
14260
14261         * MAINTAINERS (Write After Approval): Add Alan Hayward.
14262
14263 2018-01-26  Alan Modra  <amodra@gmail.com>
14264
14265         * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
14266         (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
14267         Remove nop.  Make const.  Comment.
14268         (powerpc32_plt_stub_so_2): New.
14269         (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
14270         Correct count.  Update uses.
14271         (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
14272         Move common code reading PLT entry word.  Correct
14273         powerpc32_plt_stub PLT address calculation.
14274         * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
14275         (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
14276         (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
14277         (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
14278         (ppc64_standard_linkage8): Likewise.
14279         * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
14280         Correct insns description.
14281         * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
14282
14283 2018-01-24  Pedro Alves  <palves@redhat.com>
14284
14285         GCC PR libstdc++/83906
14286         * gdbtypes.c (operator==(const dynamic_prop &,
14287         const dynamic_prop &)): New.
14288         (operator==(const range_bounds &, const range_bounds &)): New.
14289         (check_types_equal): Use them instead of memcmp.
14290         * gdbtypes.h (operator==(const dynamic_prop &,
14291         const dynamic_prop &)): Declare.
14292         (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
14293         (operator==(const range_bounds &, const range_bounds &)): Declare.
14294         (operator!=(const range_bounds &, const range_bounds &)): Declare.
14295
14296 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14297
14298         * s390-linux-tdep.c (s390_record_address_mask)
14299         (s390_record_calc_disp_common, s390_record_calc_disp)
14300         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
14301         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
14302         (s390_process_record): Move to s390-tdep.c.
14303         (s390_linux_init_abi_any): Adjust.
14304         * s390-tdep.c (s390_record_address_mask)
14305         (s390_record_calc_disp_common, s390_record_calc_disp)
14306         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
14307         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
14308         (s390_process_record): Moved from s390-linux-tdep.c
14309         (s390_gdbarch_init): Adjust.
14310
14311 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14312
14313         * s390-linux-nat.c (s390-tdep.h): New include.
14314         * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
14315         (HFILES_NO_SRCDIR): Add s390-tdep.h.
14316         (ALLDEPFILES): Add s390-tdep.c.
14317         * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
14318         * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
14319         * s390-tdep.h: ...this.  New file.
14320         * s390-linux-tdep.c (s390-tdep.h): New include.
14321         (_initialize_s390_tdep): Rename to...
14322         (_initialize_s390_linux_tdep): ...this and adjust.
14323         (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
14324         (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
14325         s390-tdep.h.
14326         (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
14327         (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
14328         (s390_is_partial_instruction, s390_software_single_step)
14329         (is_non_branch_ril, s390_displaced_step_copy_insn)
14330         (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
14331         (s390_prologue_data, s390_addr, s390_store, s390_load)
14332         (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
14333         (s390_register_call_saved, s390_guess_tracepoint_registers)
14334         (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
14335         (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
14336         (s390_pseudo_register_name, s390_pseudo_register_type)
14337         (s390_pseudo_register_read, s390_pseudo_register_write)
14338         (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
14339         (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
14340         (s390_addr_bits_remove, s390_address_class_type_flags)
14341         (s390_address_class_type_flags_to_name)
14342         (s390_address_class_name_to_type_flags, s390_effective_inner_type)
14343         (s390_function_arg_float, s390_function_arg_vector)
14344         (is_power_of_two, s390_function_arg_integer, s390_arg_state)
14345         (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
14346         (s390_frame_align, s390_register_return_value, s390_return_value)
14347         (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
14348         (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
14349         (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
14350         (s390_trad_frame_prev_register, s390_unwind_cache)
14351         (s390_prologue_frame_unwind_cache)
14352         (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
14353         (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
14354         (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
14355         (s390_stub_frame_this_id, s390_stub_frame_prev_register)
14356         (s390_stub_frame_sniffer, s390_stub_frame_unwind)
14357         (s390_frame_base_address, s390_local_base_address)
14358         (s390_frame_base, s390_gcc_target_options)
14359         (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
14360         (s390_validate_reg_range, s390_tdesc_valid)
14361         (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
14362         * s390-tdep.c: ...this.  New file.
14363
14364 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14365
14366         * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
14367         (s390_process_record, s390_gdbarch_tdep_alloc)
14368         (s390_linux_init_abi_any): Use/set new hook.
14369
14370 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14371
14372         * s390-linux-tdep.c (osabi.h): New include.
14373         (s390_linux_init_abi_31, s390_linux_init_abi_64)
14374         (s390_linux_init_abi_any): New functions.
14375         (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
14376
14377 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14378
14379         * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
14380         tdesc_has_registers check
14381
14382 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14383
14384         * s390-linux-tdep.c (s390_tdesc_valid): New function.
14385         (s390_validate_reg_range): New macro.
14386         (s390_gdbarch_init): Adjust.
14387
14388 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14389
14390         * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
14391         (s390_gdbarch_tdep_alloc): Adjust.
14392         (s390_gdbarch_init): Adjust.
14393
14394 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14395
14396         * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
14397         <have_tdb>: Change type to bool.
14398         (s390_gdbarch_tdep_alloc): Adjust.
14399         (s390_gdbarch_init): Adjust.
14400
14401 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14402
14403         * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
14404         (gdbarch_tdep) <have_upper, have_vx>: New fields.
14405         (s390_gdbarch_tdep_alloc): New function.
14406         (s390_gdbarch_init): Allocate tdep at start and use its fields
14407         instead of separate variables.
14408
14409 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14410
14411         * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
14412         when looking for cached gdbarch and add comment for remaining.
14413
14414 2018-01-22  Pedro Alves  <palves@redhat.com>
14415             Sergio Durigan Junior  <sergiodj@redhat.com>
14416
14417         * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
14418         case.
14419
14420 2018-01-22  Maciej W. Rozycki  <macro@mips.com>
14421
14422         * MAINTAINERS: Update my company e-mail address.
14423
14424 2018-01-22  Yao Qi  <yao.qi@linaro.org>
14425
14426         * regcache.c (cooked_write_test): New function.
14427         (_initialize_regcache): Register the test.
14428
14429 2018-01-22  Yao Qi  <yao.qi@linaro.org>
14430
14431         * ia64-tdep.c (ia64_pseudo_register_read): Call
14432         regcache->cooked_read instead of regcache_cooked_read_unsigned.
14433         * m32c-tdep.c (m32c_cat_read): Likewise.
14434         (m32c_r3r2r1r0_read): Likewise.
14435         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
14436         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
14437
14438 2018-01-22  Yao Qi  <yao.qi@linaro.org>
14439
14440         * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
14441         method raw_read instead of regcache_raw_read.
14442         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
14443         * arm-tdep.c (arm_neon_quad_read): Likewise.
14444         * avr-tdep.c (avr_pseudo_register_read): Likewise.
14445         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
14446         * frv-tdep.c (frv_pseudo_register_read): Likewise.
14447         * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
14448         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
14449         (i386_pseudo_register_read_into_value): Likewise.
14450         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
14451         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
14452         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
14453         * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
14454         * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
14455         * sparc-tdep.c (sparc32_pseudo_register_read):  Likewise.
14456         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
14457         * spu-tdep.c (spu_pseudo_register_read_spu):  Likewise.
14458         * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
14459
14460 2018-01-22  Yao Qi  <yao.qi@linaro.org>
14461
14462         * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
14463         * configure.tgt: Remove target mt.
14464         * mt-tdep.c: Remove.
14465         * regcache.c (cooked_read_test): Remove the check for mt.
14466
14467 2018-01-22  Yao Qi  <yao.qi@linaro.org>
14468
14469         * jit.c (jit_frame_prev_register): Call regcache::cooked_read
14470         instead of gdbarch_pseudo_register_read_value.
14471
14472 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
14473
14474         * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
14475         language is Ada.
14476
14477 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
14478
14479         * linespec.c (create_sals_line_offset): Remove code that preserved
14480         the symtab_and_line's line number.
14481
14482 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
14483
14484         * varobj.c (varobj_create): Don't set valid_block when creating a
14485         floating varobj.
14486
14487 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
14488
14489         * varobj.c (varobj_create): Remove out of date comment.
14490
14491 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
14492
14493         PR mi/20395
14494         * ada-exp.y (write_var_from_sym): Pass extra parameter when
14495         updating innermost block.
14496         * parse.c (innermost_block_tracker::update): Take extra type
14497         parameter, and check types match before updating innermost block.
14498         (write_dollar_variable): Update innermost block for registers.
14499         * parser-defs.h (enum innermost_block_tracker_type): New enum.
14500         (innermost_block_tracker::innermost_block_tracker): Initialise
14501         m_types member.
14502         (innermost_block_tracker::reset): Take type parameter.
14503         (innermost_block_tracker::update): Take type parameter, and pass
14504         type through as needed.
14505         (innermost_block_tracker::m_types): New member.
14506         * varobj.c (varobj_create): Pass type when reseting innermost
14507         block.
14508
14509 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
14510
14511         * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
14512         * ada-lang.c (resolve_subexp): Likewise.
14513         * breakpoint.c (set_breakpoint_condition) Likewise.
14514         (watch_command_1) Likewise.
14515         * c-exp.y (variable): Likewise.
14516         * d-exp.y (PrimaryExpression): Likewise.
14517         * f-exp.y (variable): Likewise.
14518         * go-exp.y (variable): Likewise.
14519         * m2-exp.y (variable): Likewise.
14520         * objfiles.c (objfile::~objfile): Likewise.
14521         * p-exp.y (variable): Likewise.
14522         * parse.c (innermost_block): Change type.
14523         * parser-defs.h (class innermost_block_tracker): New.
14524         (innermost_block): Change to innermost_block_tracker.
14525         * printcmd.c (display_command): Switch to innermost_block API.
14526         (do_one_display): Likewise.
14527         * rust-exp.y (do_one_display): Likewise.
14528         * symfile.c (clear_symtab_users): Likewise.
14529         * varobj.c (varobj_create): Switch to innermost_block API, replace
14530         use of innermost_block with block stored on varobj object.
14531
14532 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
14533
14534         * expression.h (innermost_block): Remove declaration.
14535         * varobj.c: Add 'parser-defs.h' include.
14536
14537 2018-01-19  Tom Tromey  <tom@tromey.com>
14538
14539         * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
14540         symbols in the static and global blocks.
14541
14542 2018-01-19  James Clarke  <jrtc27@jrtc27.com>
14543
14544         * nat/linux-ptrace.c: Remove unnecessary reinclusion of
14545         gdb_ptrace.h, and move including gdb_wait.h ...
14546         * nat/linux-ptrace.h: ... to here.
14547
14548 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
14549
14550         * inf-ptrace.c (inf_ptrace_detach): Adjust call to
14551         inf_ptrace_detach_success.
14552         (inf_ptrace_detach_success): Add inferior parameter, use it
14553         instead of inferior_ptid, pass it to detach_inferior.
14554         * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
14555         parameter.
14556         * inferior.c (detach_inferior): Add overload that takes an
14557         inferior object.
14558         * inferior.h (detach_inferior): Likewise.
14559         * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
14560         use inferior_ptid, adjust call to inf_ptrace_detach_success.
14561         * linux-thread-db.c (thread_db_detach): Use inf parameter.
14562
14563 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
14564
14565         * target.h (struct target_ops) <to_detach>: Add inferior
14566         parameter.
14567         (target_detach): Likewise.
14568         * target.c (dispose_inferior): Pass inferior down.
14569         (target_detach): Pass inferior down.  Assert that it is equal to
14570         the current inferior.
14571         * aix-thread.c (aix_thread_detach): Pass inferior down.
14572         * corefile.c (core_file_command): Pass current_inferior() down.
14573         * corelow.c (core_detach): Add inferior parameter.
14574         * darwin-nat.c (darwin_detach): Likewise.
14575         * gnu-nat.c (gnu_detach): Likewise.
14576         * inf-ptrace.c (inf_ptrace_detach): Likewise.
14577         * infcmd.c (detach_command): Pass current_inferior() down to
14578         target_detach.
14579         * infrun.c (follow_fork_inferior): Pass parent_inf to
14580         target_detach.
14581         (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
14582         target_detach.
14583         * linux-nat.c (linux_nat_detach): Add inferior parameter.
14584         * linux-thread-db.c (thread_db_detach): Likewise.
14585         * nto-procfs.c (procfs_detach): Likewise.
14586         * procfs.c (procfs_detach): Likewise.
14587         * record.c (record_detach): Likewise.
14588         * record.h (struct inferior): Forward-declare.
14589         (record_detach): Add inferior parameter.
14590         * remote-sim.c (gdbsim_detach): Likewise.
14591         * remote.c (remote_detach_1): Likewise.
14592         (remote_detach): Likewise.
14593         (extended_remote_detach): Likewise.
14594         * sol-thread.c (sol_thread_detach): Likewise.
14595         * target-debug.h (target_debug_print_inferior_p): New macro.
14596         * target-delegates.c: Re-generate.
14597         * top.c (kill_or_detach): Pass inferior down to target_detach.
14598         * windows-nat.c (windows_detach): Add inferior parameter.
14599
14600 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
14601
14602         * target.h (struct target_ops) <to_detach>: Remove args
14603         parameter.
14604         (target_detach): Likewise.
14605         * target.c (dispose_inferior): Adjust.
14606         (target_detach): Remove args parameter, adjust.
14607         * aix-thread.c (aix_thread_detach): Adjust.
14608         * corefile.c (core_file_command): Adjust.
14609         * corelow.c (core_detach): Adjust.
14610         * darwin-nat.c (darwin_detach): Adjust.
14611         * gnu-nat.c (gnu_detach): Adjust.
14612         * inf-ptrace.c (inf_ptrace_detach): Adjust.
14613         * infcmd.c (detach_command): Adjust
14614         * infrun.c (follow_fork_inferior): Adjust.
14615         (handle_vfork_child_exec_or_exit): Adjust.
14616         * linux-fork.c (linux_fork_detach): Remove args parameter.
14617         * linux-fork.h (linux_fork_detach): Likewise.
14618         * linux-nat.c (linux_nat_detach): Likewise, and adjust.
14619         * linux-thread-db.c (thread_db_detach): Likewise.
14620         * nto-procfs.c (procfs_detach): Likewise.
14621         * procfs.c (procfs_detach): Likewise.
14622         (do_detach): Remove signo parameter.
14623         * record.c (record_detach): Remove args parameter.
14624         * record.h (record_detach): Likewise.
14625         * remote-sim.c (gdbsim_detach): Likewise.
14626         * remote.c (remote_detach_1): Likewise.
14627         (remote_detach): Likewise.
14628         (extended_remote_detach): Likewise.
14629         * sol-thread.c (sol_thread_detach): Likewise.
14630         * target-delegates.c: Re-generate.
14631         * top.c (struct qt_args) <args>: Remove field.
14632         (kill_or_detach): Don't pass args.
14633         (quit_force): Don't set args.
14634         * windows-nat.c (windows_detach): Remove args parameter.
14635
14636 2018-01-19  Yao Qi  <yao.qi@linaro.org>
14637
14638         * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
14639         (arm_linux_init_abi): Install it.
14640
14641 2018-01-19  Yao Qi  <yao.qi@linaro.org>
14642
14643         * osabi.c (gdb_osabi_names): Extend the regexp for
14644         arm-linux-gnueabihf.
14645
14646 2018-01-18  Yao Qi  <yao.qi@linaro.org>
14647
14648         * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
14649         m_abbrevs.
14650         (abbrev_table::add_abbrev): Update.
14651         (abbrev_table::lookup_abbrev): Update.
14652
14653 2018-01-18  Yao Qi  <yao.qi@linaro.org>
14654
14655         * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
14656
14657 2018-01-17  Sergio Durigan Junior  <sergiodj@redhat.com>
14658
14659         * compile/compile.c (compile_to_object): Convert "triplet_rx"
14660         to "std::string".
14661
14662 2018-01-17  Tom Tromey  <tom@tromey.com>
14663
14664         * dwarf2read.c (symbolp): Remove typedef.  Don't instantiate VEC.
14665
14666 2018-01-17  Tom Tromey  <tom@tromey.com>
14667
14668         * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
14669         * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
14670         (create_array_type_with_stride): Update.
14671         * dwarf2read.c (set_die_type): Update.
14672
14673 2018-01-17  Tom Tromey  <tom@tromey.com>
14674
14675         * dwarf2read.c (delayed_method_info): Remove typedef.
14676         (dwarf2_cu::method_info): Now a std::vector.
14677         (add_to_method_list): Update.
14678         (free_delayed_list): Remove.
14679         (compute_delayed_physnames): Update.
14680         (process_full_comp_unit, process_full_type_unit): Clear the method
14681         list.  Remove cleanups.
14682         (psymtab_include_file_name): Add name_holder parameter.  Use
14683         unique_xmalloc_ptr.
14684         (dwarf_decode_lines): Update.
14685
14686 2018-01-17  Tom Tromey  <tom@tromey.com>
14687             Simon Marchi  <simon.marchi@ericsson.com>
14688
14689         * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
14690         (dwarf2_per_objfile::free_cached_comp_units)
14691         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
14692         (init_cutu_and_read_dies_no_follow): Update.
14693         (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
14694         (dwarf2_cu::~dwarf2_cu): New.
14695         (free_heap_comp_unit, free_stack_comp_unit): Remove.
14696         (age_cached_comp_units, free_one_cached_comp_unit): Update.
14697
14698 2018-01-17  Tom Tromey  <tom@tromey.com>
14699             Simon Marchi  <simon.marchi@ericsson.com>
14700
14701         * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
14702         (struct die_reader_specs) <abbrev_table>: New member.
14703         (struct abbrev_table): Add constructor.
14704         <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
14705         <abbrev_obstack>: Now an auto_obstack.
14706         (abbrev_table_up): New typedef.
14707         (init_cu_die_reader): Add abbrev_table parameter.
14708         (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
14709         Add result_dwo_abbrev_table.
14710         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
14711         (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
14712         Update.
14713         (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
14714         parameter.
14715         (skip_children): Update.
14716         (abbrev_table::alloc_abbrev): Rename from
14717         abbrev_table_alloc_abbrev.
14718         (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
14719         (abbrev_table::lookup_abbrev): Rename from
14720         abbrev_table_lookup_abbrev.
14721         (abbrev_table_read_table): Return abbrev_table_up.
14722         (abbrev_table_free, abbrev_table_free_cleanup)
14723         (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
14724         (load_partial_dies): Update.
14725
14726 2018-01-17  Tom Tromey  <tom@tromey.com>
14727
14728         * dwarf2read.c (dwarf2_compute_name): Update comment.
14729         (read_func_scope, read_variable): Update.
14730         (new_symbol): Remove.
14731         (new_symbol_full): Rename to new_symbol.
14732
14733 2018-01-17  Mike Gulick  <mgulick@mathworks.com>
14734
14735         PR gdb/16577
14736         * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
14737         a warning instead of throwing an error, set section size to 0 and return
14738         NULL.
14739         * gdb_bfd.h (gdb_bfd_map_section): Update description.
14740
14741 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
14742
14743         * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
14744         std::string.
14745         (linux_ptrace_attach_fail_reason_string): Likewise.
14746         * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
14747         Likewise.
14748         (linux_ptrace_attach_fail_reason_string): Likewise.
14749         * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
14750
14751 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
14752
14753         * linux-nat.c (linux_nat_attach): Remove xstrdup.
14754
14755 2018-01-17  Eldar Abusalimov  <eldar.abusalimov@jetbrains.com>
14756
14757         PR gdb/21559
14758         * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
14759         checking for fs_base/gs_base fields in struct user_regs_struct.
14760         * configure: Regenerate.
14761
14762 2018-01-17  Yao Qi  <yao.qi@linaro.org>
14763
14764         * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
14765         function.
14766         (aarch64_linux_init_abi): Install it to gdbarch hook
14767         gcc_target_options.
14768
14769 2018-01-15  Pedro Alves  <palves@redhat.com>
14770
14771         * common/signals-state-save-restore.c
14772         (save_original_signals_state): Fix typos.
14773
14774 2017-01-12  Tom Tromey  <tom@tromey.com>
14775             Sergio Durigan Junior  <sergiodj@redhat.com>
14776
14777         * Makefile.in (install-only): Install gdb-add-index.
14778
14779 2018-01-12  John Baldwin  <jhb@FreeBSD.org>
14780
14781         * fbsd-tdep.c (KVE_PROTECTION): Correct value.
14782
14783 2018-01-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
14784
14785         * infrun.c (keep_going_pass_signal): Clear step-over info when
14786         insert_breakpoints fails.
14787
14788 2018-01-11  Pedro Alves  <palves@redhat.com>
14789
14790         PR gdb/22583
14791         * infrun.c (resume): Rename to ...
14792         (resume_1): ... this.
14793         (resume): Reimplement as wrapper around resume_1.
14794
14795 2018-01-11  Pedro Alves  <palves@redhat.com>
14796
14797         PR remote/22597
14798         * remote.c (remote_parse_stop_reply): Default to the last-set
14799         general thread instead of to 'magic_null_ptid'.
14800
14801 2018-01-10  Pedro Alves  <palves@redhat.com>
14802
14803         * language.h (language_get_symbol_name_matcher): Rename ...
14804         (get_symbol_name_matcher): ... this.
14805         * language.c (language_get_symbol_name_matcher): Ditto.
14806         * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
14807         callers adjusted.
14808
14809 2018-01-10  Pedro Alves  <palves@redhat.com>
14810
14811         PR gdb/22670
14812         * dwarf2read.c
14813         (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
14814         Adjust to use language_get_symbol_name_matcher instead of
14815         language_defn::la_get_symbol_name_matcher.
14816         * language.c (language_get_symbol_name_matcher): If in Ada mode
14817         and the lookup name is a verbatim match, return Ada's matcher.
14818         * language.h (language_get_symbol_name_matcher): Adjust comment.
14819         (ada_lookup_name_info::verbatim_p):: New method.
14820
14821 2018-01-10  Pedro Alves  <palves@redhat.com>
14822
14823         PR gdb/22670
14824         * ada-lang.c (ada_collect_symbol_completion_matches): If the
14825         minsym's language is language_auto or language_cplus, pass down
14826         language_ada instead.
14827         * symtab.c (compare_symbol_name): Don't frob symbol language here.
14828
14829 2018-01-10  Pedro Alves  <palves@redhat.com>
14830
14831         PR gdb/22670
14832         * minsyms.c (linkage_name_str): New function.
14833         (iterate_over_minimal_symbols): Use it.
14834
14835 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
14836
14837         * NEWS: Document that 'info proc' now works on FreeBSD.
14838
14839 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
14840
14841         * configure.ac: Check for kinfo_getfile in libutil.
14842         * configure: Regenerate.
14843         * config.in: Regenerate.
14844         * fbsd-nat.c: Include "fbsd-tdep.h".
14845         (fbsd_fetch_cmdline): New.
14846         (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
14847         rather than calling error.
14848         (fbsd_info_proc): New.
14849         (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
14850         (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
14851         (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
14852
14853 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
14854
14855         * fbsd-nat.c (struct free_deleter): Remove.
14856         (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
14857
14858 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
14859
14860         * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
14861         NULL for an empty pathname.
14862
14863 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
14864
14865         * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
14866         (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
14867         (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
14868         (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
14869         (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
14870         (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
14871         (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
14872         (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
14873         (kinfo_proc_layout_32, kinfo_proc_layout_i386)
14874         (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
14875         (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
14876         (fbsd_core_fetch_timeval, fbsd_print_sigset)
14877         (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
14878         (fbsd_init_abi):  Install gdbarch "core_info_proc" method.
14879         * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
14880
14881 2018-01-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>
14882
14883         * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
14884         (gnu_xfer_auxv): New function.
14885         (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
14886         TARGET_OBJECT_AUXV.
14887
14888 2018-01-08  Yao Qi  <yao.qi@linaro.org>
14889             Simon Marchi  <simon.marchi@ericsson.com>
14890
14891         * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
14892         common/selftest.c.
14893         (COMMON_OBS): Remove selftest.o.
14894         * configure.ac: Append selftest-arch.c and common/selftest.c to
14895         CONFIG_SRCS.  Append selftest-arch.o and selftest.o to COMMON_OBS.
14896         * configure: Re-generated.
14897         * maint.c (maintenance_selftest): Wrap selftests::run_tests with
14898         GDB_SELF_TEST.
14899         (maintenance_info_selftests): Likewise.
14900
14901 2018-01-08  Xavier Roirand  <roirand@adacore.com>
14902
14903         * ada-valprint.c (val_print_packed_array_elements): Use
14904         proper number of elements when printing an array indexed
14905         by an enumeration type.
14906
14907 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
14908
14909         * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
14910         (dw2_get_file_names_reader): Adjust.
14911         (lookup_dwo_signatured_type): Adjust.
14912         (lookup_dwp_signatured_type): Adjust.
14913         (lookup_signatured_type): Adjust.
14914         (create_type_unit_group): Adjust.
14915         (get_type_unit_group): Adjust.
14916         (process_psymtab_comp_unit_reader): Adjust.
14917         (build_type_psymtabs_reader): Adjust.
14918         (scan_partial_symbols): Adjust.
14919         (add_partial_symbol): Adjust.
14920         (add_partial_subprogram): Adjust.
14921         (peek_die_abbrev): Adjust.
14922         (fixup_go_packaging): Adjust.
14923         (process_imported_unit_die): Adjust.
14924         (dwarf2_compute_name): Adjust.
14925         (dwarf2_physname): Adjust.
14926         (read_import_statement): Adjust.
14927         (handle_DW_AT_stmt_list): Adjust.
14928         (read_file_scope): Adjust.
14929         (read_func_scope): Adjust.
14930         (read_lexical_block_scope): Adjust.
14931         (read_call_site_scope): Adjust.
14932         (read_variable): Adjust.
14933         (dwarf2_rnglists_process): Adjust.
14934         (dwarf2_ranges_process): Adjust.
14935         (dwarf2_ranges_read): Adjust.
14936         (dwarf2_get_pc_bounds): Adjust.
14937         (dwarf2_record_block_ranges): Adjust.
14938         (dwarf2_add_field): Adjust.
14939         (dwarf2_add_member_fn): Adjust.
14940         (read_structure_type): Adjust.
14941         (process_structure_scope): Adjust.
14942         (read_enumeration_type): Adjust.
14943         (read_array_type): Adjust.
14944         (mark_common_block_symbol_computed): Adjust.
14945         (read_common_block): Adjust.
14946         (read_namespace_type): Adjust.
14947         (read_namespace): Adjust.
14948         (read_module_type): Adjust.
14949         (read_tag_pointer_type): Adjust.
14950         (read_tag_ptr_to_member_type): Adjust.
14951         (read_tag_string_type): Adjust.
14952         (read_subroutine_type): Adjust.
14953         (read_typedef): Adjust.
14954         (read_base_type): Adjust.
14955         (attr_to_dynamic_prop): Adjust.
14956         (read_subrange_type): Adjust.
14957         (read_unspecified_type): Adjust.
14958         (dwarf2_read_abbrevs): Adjust.
14959         (load_partial_dies): Adjust.
14960         (read_partial_die): Adjust.
14961         (find_partial_die): Adjust.
14962         (guess_partial_die_structure_name): Adjust.
14963         (fixup_partial_die): Adjust.
14964         (read_attribute_value): Adjust.
14965         (read_addr_index): Adjust.
14966         (read_addr_index_from_leb128): Adjust.
14967         (read_str_index): Adjust.
14968         (dwarf2_string_attr): Adjust.
14969         (get_debug_line_section): Adjust.
14970         (dwarf_decode_line_header): Adjust.
14971         (lnp_state_machine::check_line_address): Adjust.
14972         (dwarf_decode_lines_1): Adjust.
14973         (dwarf_decode_lines): Adjust.
14974         (dwarf2_start_symtab): Adjust.
14975         (var_decode_location): Adjust.
14976         (new_symbol_full): Adjust.
14977         (dwarf2_const_value_data): Adjust.
14978         (dwarf2_const_value_attr): Adjust.
14979         (dwarf2_const_value): Adjust.
14980         (die_type): Adjust.
14981         (die_containing_type): Adjust.
14982         (build_error_marker_type): Adjust.
14983         (lookup_die_type): Adjust.
14984         (guess_full_die_structure_name): Adjust.
14985         (anonymous_struct_prefix): Adjust.
14986         (determine_prefix): Adjust.
14987         (dwarf2_name): Adjust.
14988         (follow_die_ref_or_sig): Adjust.
14989         (follow_die_offset): Adjust.
14990         (follow_die_ref): Adjust.
14991         (follow_die_sig_1): Adjust.
14992         (follow_die_sig): Adjust.
14993         (get_signatured_type): Adjust.
14994         (get_DW_AT_signature_type): Adjust.
14995         (decode_locdesc): Adjust.
14996         (dwarf_decode_macros): Adjust.
14997         (cu_debug_loc_section): Adjust.
14998         (fill_in_loclist_baton): Adjust.
14999         (dwarf2_symbol_mark_computed): Adjust.
15000         (init_one_comp_unit): Don't assign
15001         dwarf2_cu::dwarf2_per_objfile.
15002         (set_die_type): Adjust.
15003
15004 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
15005
15006         * dwarf2read.c (struct mapped_debug_names): Add constructor.
15007         <dwarf2_per_objfile>: New field.
15008         (dwarf2_per_objfile): Remove global.
15009         (get_dwarf2_per_objfile): New function.
15010         (set_dwarf2_per_objfile): New function.
15011         (dwarf2_build_psymtabs_hard): Change objfile parameter to
15012         dwarf2_per_objfile.
15013         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
15014         (read_abbrev_offset): Likewise.
15015         (read_indirect_string): Likewise.
15016         (read_indirect_line_string): Likewise.
15017         (read_indirect_string_at_offset): Likewise.
15018         (read_indirect_string_from_dwz): Likewise.
15019         (dwarf2_find_containing_comp_unit): Change objfile parameter to
15020         dwarf2_per_objfile.
15021         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
15022         (create_all_comp_units): Change objfile parameter to
15023         dwarf2_per_objfile.
15024         (create_all_type_units): Likewise.
15025         (process_queue): Add dwarf2_per_objfile parameter.
15026         (read_and_check_comp_unit_head): Likewise.
15027         (lookup_dwo_unit_in_dwp): Likewise.
15028         (get_dwp_file): Likewise.
15029         (process_cu_includes): Likewise.
15030         (struct free_dwo_file_cleanup_data): New struct.
15031         (dwarf2_has_info): Use get_dwarf2_per_objfile and
15032         set_dwarf2_per_objfile.
15033         (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
15034         (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
15035         context, adjust calls.
15036         (dw2_instantiate_symtab): Likewise.
15037         (dw2_get_cutu): Add dwarf2_per_objfile parameter.
15038         (dw2_get_cu): Likewise.
15039         (create_cu_from_index_list): Change objfile parameter to
15040         dwarf2_per_objfile.
15041         (create_cus_from_index_list): Get dwarf2_per_objfile from
15042         context, adjust calls.
15043         (create_cus_from_index): Likewise.
15044         (create_signatured_type_table_from_index): Change objfile
15045         parameter to dwarf2_per_objfile.
15046         (create_signatured_type_table_from_debug_names): Change objfile
15047         parameter to dwarf2_per_objfile.
15048         (create_addrmap_from_index): Likewise.
15049         (create_addrmap_from_aranges): Likewise.
15050         (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
15051         (dw2_setup): Remove.
15052         (dw2_get_file_names_reader): Get dwarf2_per_objfile from
15053         context.
15054         (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
15055         get_dwarf2_per_objfile.
15056         (dw2_forget_cached_source_info): Likewise.
15057         (dw2_map_symtabs_matching_filename): Likewise.
15058         (struct dw2_symtab_iterator) <index>: Remove.
15059         <dwarf2_per_objfile>: New field.
15060         (dw2_symtab_iter_init): Replace index parameter with
15061         dwarf2_per_objfile.
15062         (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
15063         (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
15064         (dw2_print_stats): Likewise.
15065         (dw2_dump): Likewise.
15066         (dw2_expand_symtabs_for_function): Likewise.
15067         (dw2_expand_all_symtabs): Likewise.
15068         (dw2_expand_symtabs_with_fullname): Likewise.
15069         (dw2_expand_marked_cus): Replace index and objfile parameters
15070         with dwarf2_per_objfile.
15071         (dw_expand_symtabs_matching_file_matcher): Add
15072         dwarf2_per_objfile parameter and adjust calls.
15073         (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
15074         adjust calls.
15075         (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
15076         (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
15077         adjust calls.
15078         (create_cus_from_debug_names_list): Replace objfile parameter
15079         with dwarf2_per_objfile and adjust calls.
15080         (create_cus_from_debug_names): Likewise.
15081         (dwarf2_read_debug_names): Likewise.
15082         (mapped_debug_names::namei_to_name): Adjust call.
15083         (dw2_debug_names_iterator::next): Likewise.
15084         (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
15085         (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
15086         (dw2_debug_names_dump): Likewise.
15087         (dw2_debug_names_expand_symtabs_for_function): Likewise.
15088         (dw2_debug_names_expand_symtabs_matching): Likewise.
15089         (dwarf2_initialize_objfile): Likewise.
15090         (dwarf2_build_psymtabs): Likewise.
15091         (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
15092         this_cu.
15093         (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
15094         (read_and_check_comp_unit_head): Likewise.
15095         (read_abbrev_offset): Likewise.
15096         (create_debug_type_hash_table): Likewise.
15097         (create_debug_types_hash_table): Likewise.
15098         (create_all_type_units): Replace objfile parameter with
15099         dwarf2_per_objfile.
15100         (add_type_unit): Add dwarf2_per_objfile parameter.
15101         (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
15102         with dwarf2_per_objfile.
15103         (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
15104         (lookup_dwp_signatured_type): Likewise.
15105         (lookup_signatured_type): Likewise.
15106         (read_cutu_die_from_dwo): Likewise.
15107         (init_tu_and_read_dwo_dies): Likewise.
15108         (init_cutu_and_read_dies): Likewise.
15109         (init_cutu_and_read_dies_no_follow): Likewise.
15110         (allocate_type_unit_groups_table): Add objfile parameter.
15111         (create_type_unit_group): Use dwarf2_per_objfile from cu.
15112         (get_type_unit_group): Likewise.
15113         (process_psymtab_comp_unit): Update call.
15114         (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
15115         (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
15116         (print_tu_stats): Likewise.
15117         (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
15118         in void* parameter.
15119         (build_type_psymtabs): Change objfile parameter to
15120         dwarf2_per_objfile.
15121         (process_skeletonless_type_unit): Use dwarf2_per_objfile
15122         passed in void* parameter.
15123         (process_skeletonless_type_units): Change objfile parameter to
15124         dwarf2_per_objfile.
15125         (set_partial_user): Likewise.
15126         (dwarf2_build_psymtabs_hard): Likewise.
15127         (read_comp_units_from_section): Likewise.
15128         (create_all_comp_units): Likewise.
15129         (scan_partial_symbols): Update calls.
15130         (add_partial_symbol): Likewise.
15131         (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
15132         (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
15133         (process_queue): Add dwarf2_per_objfile parameter.
15134         (get_compunit_symtab): Use dwarf2_per_objfile from cu.
15135         (compute_compunit_symtab_includes): Likewise.
15136         (process_cu_includes): Add dwarf2_per_objfile parameter.
15137         (process_full_comp_unit): Use dwarf2_per_objfile from cu.
15138         (process_full_type_unit): Likewise.
15139         (process_imported_unit_die): Update call.
15140         (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
15141         (read_file_scope): Likewise.
15142         (allocate_dwo_file_hash_table): Add objfile parameter.
15143         (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
15144         (create_cus_hash_table): Likewise.
15145         (create_dwp_hash_table): Likewise.
15146         (create_dwo_unit_in_dwp_v1): Likewise.
15147         (create_dwp_v2_section): Likewise.
15148         (create_dwo_unit_in_dwp_v2): Likewise.
15149         (lookup_dwo_unit_in_dwp): Likewise.
15150         (try_open_dwop_file): Likewise.
15151         (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
15152         (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
15153         cleanup to include a reference to dwarf2_per_objfile.
15154         (open_dwp_file): Add dwarf2_per_objfile parameter.
15155         (open_and_init_dwp_file): Likewise.
15156         (get_dwp_file): Likewise.
15157         (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
15158         (queue_and_load_all_dwo_tus): Update call.
15159         (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
15160         data.
15161         (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
15162         (dwarf2_ranges_process): Likewise.
15163         (dwarf2_get_pc_bounds): Likewise.
15164         (mark_common_block_symbol_computed): Likewise.
15165         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
15166         (dwarf2_read_abbrevs): Update call.
15167         (read_partial_die): Use dwarf2_per_objfile from cu.
15168         (find_partial_die): Likewise.
15169         (fixup_partial_die): Likewise.
15170         (read_attribute_value): Likewise.
15171         (read_indirect_string_at_offset_from): Add objfile parameter.
15172         (read_indirect_string_at_offset): Add dwarf2_per_objfile
15173         parameter.
15174         (read_indirect_string_from_dwz): Add objfile parameter.
15175         (read_indirect_string): Add objfile parameter.
15176         (read_addr_index_1): Add dwarf2_per_objfile parameter.
15177         (read_addr_index): Use dwarf2_per_objfile from cu.
15178         (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
15179         call dw2_setup.
15180         (read_str_index): Use dwarf2_per_objfile from cu.
15181         (get_debug_line_section): Likewise.
15182         (read_formatted_entries): Add dwarf2_per_objfile parameter.
15183         (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
15184         (new_symbol_full): Use dwarf2_per_objfile from cu.
15185         (build_error_marker_type): Likewise.
15186         (lookup_die_type): Likewise.
15187         (determine_prefix): Likewise.
15188         (follow_die_offset): Likewise.
15189         (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
15190         (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
15191         (dwarf2_fetch_die_type_sect_off): Likewise.
15192         (dwarf2_get_die_type): Likewise.
15193         (follow_die_sig_1): Use dwarf2_per_objfile from cu.
15194         (get_signatured_type): Likewise.
15195         (get_DW_AT_signature_type): Likewise.
15196         (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
15197         (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
15198         (cu_debug_loc_section): Likewise.
15199         (fill_in_loclist_baton): Likewise.
15200         (dwarf2_symbol_mark_computed): Likewise.
15201         (dwarf2_find_containing_comp_unit): Change objfile parameter to
15202         dwarf2_per_objfile.
15203         (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
15204         parameter.
15205         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
15206         (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
15207         (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
15208         (set_die_type): Use dwarf2_free_objfile from cu.
15209         (get_die_type_at_offset): Likewise.
15210         (dwarf2_per_objfile_free): Don't assign global variable.
15211         (debug_names) <constructor>: Add dwarf2_per_objfile
15212         parameter, update m_debugstrlookup construction.
15213         (debug_names::debug_str_lookup): Add dwarf2_per_objfile
15214         parameter.
15215         <m_dwarf2_per_objfile>: New field.
15216         <lookup>: Use m_dwarf2_per_objfile.
15217         (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
15218         (psyms_seen_size): Likewise.
15219         (write_gdbindex): Replace objfile parameter with
15220         dwarf2_per_objfile.
15221         (write_debug_names): Likewise.
15222         (write_psymtabs_to_index): Likewise.
15223         (save_gdb_index_command): Use get_dwarf2_per_objfile, update
15224         calls.
15225
15226 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
15227
15228         * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
15229         <dwarf2_per_objfile>: New field.
15230         (struct dwarf2_per_cu_data) <objfile>: Remove.
15231         <dwarf2_per_objfile>: New field.
15232         (create_cu_from_index_list): Assign dwarf2_per_objfile instead
15233         of objfile.
15234         (create_signatured_type_table_from_index): Likewise.
15235         (create_debug_type_hash_table): Likewise.
15236         (fill_in_sig_entry_from_dwo_entry): Likewise.
15237         (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
15238         (create_type_unit_group): Assign dwarf2_per_objfile instead of
15239         objfile.
15240         (create_partial_symtab): Access objfile through
15241         dwarf2_per_objfile.
15242         (process_psymtab_comp_unit_reader): Likewise.
15243         (read_comp_units_from_section): Likewise.
15244         (scan_partial_symbols): Likewise.
15245         (add_partial_symbol): Likewise.
15246         (add_partial_subprogram): Likewise.
15247         (peek_die_abbrev): Likewise.
15248         (fixup_go_packaging): Likewise.
15249         (process_full_comp_unit): Likewise.
15250         (process_full_type_unit): Likewise.
15251         (process_imported_unit_die): Likewise.
15252         (dwarf2_compute_name): Likewise.
15253         (dwarf2_physname): Likewise.
15254         (read_import_statement): Likewise.
15255         (create_cus_hash_table): Assign dwarf2_physname instead of
15256         objfile.
15257         (read_func_scope): Access objfile through dwarf2_per_objfile.
15258         (read_lexical_block_scope): Likewise.
15259         (read_call_site_scope): Likewise.
15260         (read_variable): Likewise.
15261         (dwarf2_rnglists_process): Likewise.
15262         (dwarf2_ranges_process): Likewise.
15263         (dwarf2_ranges_read): Likewise.
15264         (dwarf2_record_block_ranges): Likewise.
15265         (dwarf2_add_field): Likewise.
15266         (dwarf2_add_member_fn): Likewise.
15267         (read_structure_type): Likewise.
15268         (process_structure_scope): Likewise.
15269         (read_enumeration_type): Likewise.
15270         (read_array_type): Likewise.
15271         (read_common_block): Likewise.
15272         (read_namespace_type): Likewise.
15273         (read_namespace): Likewise.
15274         (read_module_type): Likewise.
15275         (read_tag_pointer_type): Likewise.
15276         (read_tag_ptr_to_member_type): Likewise.
15277         (read_tag_string_type): Likewise.
15278         (read_subroutine_type): Likewise.
15279         (read_typedef): Likewise.
15280         (read_base_type): Likewise.
15281         (attr_to_dynamic_prop): Likewise.
15282         (read_subrange_type): Likewise.
15283         (read_unspecified_type): Likewise.
15284         (load_partial_dies): Likewise.
15285         (read_partial_die): Likewise.
15286         (find_partial_die): Likewise.
15287         (guess_partial_die_structure_name): Likewise.
15288         (fixup_partial_die): Likewise.
15289         (read_attribute_value): Likewise.
15290         (read_addr_index_from_leb128): Likewise.
15291         (dwarf2_read_addr_index): Likewise.
15292         (dwarf2_string_attr): Likewise.
15293         (lnp_state_machine::check_line_address): Likewise.
15294         (dwarf_decode_lines_1): Likewise.
15295         (dwarf_decode_lines): Likewise.
15296         (dwarf2_start_symtab): Likewise.
15297         (var_decode_location): Likewise.
15298         (new_symbol_full): Likewise.
15299         (dwarf2_const_value_data): Likewise.
15300         (dwarf2_const_value_attr): Likewise.
15301         (dwarf2_const_value): Likewise.
15302         (die_type): Likewise.
15303         (die_containing_type): Likewise.
15304         (lookup_die_type): Likewise.
15305         (guess_full_die_structure_name): Likewise.
15306         (anonymous_struct_prefix): Likewise.
15307         (dwarf2_name): Likewise.
15308         (follow_die_ref_or_sig): Likewise.
15309         (follow_die_offset): Likewise.
15310         (follow_die_ref): Likewise.
15311         (dwarf2_fetch_die_loc_sect_off): Likewise.
15312         (dwarf2_fetch_constant_bytes): Likewise.
15313         (dwarf2_fetch_die_type_sect_off): Likewise.
15314         (dwarf2_get_die_type): Likewise.
15315         (follow_die_sig): Likewise.
15316         (decode_locdesc): Likewise.
15317         (dwarf2_per_cu_objfile): Likewise.
15318         (dwarf2_per_cu_text_offset): Likewise.
15319         (init_one_comp_unit): Assign dwarf2_per_objfile instead of
15320         objfile.
15321         (set_die_type): Access objfile through
15322         dwarf2_per_objfile.
15323
15324 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
15325
15326         * valprint.c (converted_character_d): Remove typedef.
15327         (DEF_VEC_O (converted_character_d)): Remove.
15328         (count_next_character): Use std::vector.
15329         (print_converted_chars_to_obstack): Likewise.
15330         (generic_printstr): Likewise.
15331
15332 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
15333
15334         * xml-support.h (struct gdb_xml_value): Add constructor.
15335         <value>: Change type to unique_xmalloc_ptr.
15336         (gdb_xml_value_s): Remove typedef.
15337         (DEF_VEC_O (gdb_xml_value_s)): Remove.
15338         (gdb_xml_element_start_handler): Change parameter type to
15339         std::vector.
15340         (xml_find_attribute): Likewise.
15341         * xml-support.c (xml_find_attribute): Change parameter type to
15342         std::vector and adjust.
15343         (gdb_xml_values_cleanup): Remove.
15344         (gdb_xml_parser::start_element): Adjust to std::vector.
15345         (xinclude_start_include): Change paraeter type to std::vector
15346         and adjust.
15347         * btrace.c (check_xml_btrace_version): Likewise.
15348         (parse_xml_btrace_block): Likewise.
15349         (parse_xml_btrace_pt_config_cpu): Likewise.
15350         (parse_xml_btrace_pt): Likewise.
15351         (parse_xml_btrace_conf_bts): Likewise.
15352         (parse_xml_btrace_conf_pt): Likewise.
15353         * memory-map.c (memory_map_start_memory): Likewise.
15354         (memory_map_start_property): Likewise.
15355         * osdata.c (osdata_start_osdata): Likewise.
15356         (osdata_start_item): Likewise.
15357         (osdata_start_column): Likewise.
15358         * remote.c (start_thread): Likewise.
15359         * solib-aix.c (library_list_start_library): Likewise.
15360         (library_list_start_list): Likewise.
15361         * solib-svr4.c (library_list_start_library): Likewise.
15362         (svr4_library_list_start_list): Likewise.
15363         * solib-target.c (library_list_start_segment): Likewise.
15364         (library_list_start_section): Likewise.
15365         (library_list_start_library): Likewise.
15366         (library_list_start_list): Likewise.
15367         * tracepoint.c (traceframe_info_start_memory): Likewise.
15368         (traceframe_info_start_tvar): Likewise.
15369         * xml-syscall.c (syscall_start_syscall): Likewise.
15370         * xml-tdesc.c (tdesc_start_target): Likewise.
15371         (tdesc_start_feature): Likewise.
15372         (tdesc_start_reg): Likewise.
15373         (tdesc_start_union): Likewise.
15374         (tdesc_start_struct): Likewise.
15375         (tdesc_start_flags): Likewise.
15376         (tdesc_start_enum): Likewise.
15377         (tdesc_start_field): Likewise.
15378         (tdesc_start_enum_value): Likewise.
15379         (tdesc_start_vector): Likewise.
15380
15381 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
15382
15383         * extension.h (struct xmethod_worker) <clone>: Remove.
15384         * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
15385         Remove.
15386         (python_xmethod_worker::clone): Remove.
15387         * valops.c (find_overload_match): Use std::move instead of
15388         clone.
15389
15390 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
15391
15392         * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
15393         (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
15394         <free_xmethod_worker_data>: Remove.
15395         <get_matching_xmethod_workers>: Chance VEC to std::vector.
15396         <get_xmethod_arg_types>: Remove.
15397         <get_xmethod_result_type>: Remove.
15398         <invoke_xmethod>: Remove.
15399         * extension.c (new_xmethod_worker): Remove.
15400         (clone_xmethod_worker): Remove.
15401         (get_matching_xmethod_workers): Return void, pass std::vector by
15402         pointer.
15403         (get_xmethod_arg_types): Rename to...
15404         (xmethod_worker::get_arg_types): ... this, and adjust.
15405         (get_xmethod_result_type): Rename to...
15406         (xmethod_worker::get_result_type): ... this, and adjust.
15407         (invoke_xmethod): Remove.
15408         (free_xmethod_worker): Remove.
15409         (free_xmethod_worker_vec): Remove.
15410         * extension.h (enum ext_lang_rc): Move here from
15411         extension-priv.h.
15412         (struct xmethod_worker): Add constructor and destructor.
15413         <data>: Remove.
15414         <value>: Remove.
15415         <invoke, clone, do_get_result_type, do_get_arg_types>: New
15416         virtual pure methods.
15417         <get_arg_types, get_result_type>: New methods.
15418         (xmethod_worker_ptr): Remove typedef.
15419         (DEF_VEC_P (xmethod_worker_ptr)): Remove.
15420         (xmethod_worker_vec): Remove typedef.
15421         (xmethod_worker_up): New typedef.
15422         (invoke_xmethod): Remove.
15423         (clone_xmethod_worker): Remove.
15424         (free_xmethod_worker): Remove.
15425         (free_xmethod_worker_vec): Remove.
15426         (get_xmethod_arg_types): Remove.
15427         (get_xmethod_result_type): Remove.
15428         * valops.c (find_method_list): Use std::vector, don't use
15429         intermediate vector.
15430         (value_find_oload_method_list): Use std::vector.
15431         (find_overload_match): Use std::vector.
15432         (find_oload_champ): Use std::vector.
15433         * value.c (value_free): Use operator delete.
15434         (value_of_xmethod): Rename to...
15435         (value_from_xmethod): ... this.  Don't assign
15436         xmethod_worker::value, take rvalue-reference.
15437         (result_type_of_xmethod): Adjust.
15438         (call_xmethod): Adjust.
15439         * value.h: Include extension.h.
15440         (struct xmethod_worker): Don't forward-declare.
15441         (value_of_xmethod): Rename to...
15442         (value_from_xmethod): ... this, take rvalue-reference.
15443         * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
15444         (struct python_xmethod_worker): ... this, add constructor and
15445         destructor.
15446         <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
15447         (gdbpy_free_xmethod_worker_data): Rename to...
15448         (python_xmethod_worker::~python_xmethod_worker): ... this and
15449         adjust.
15450         (gdbpy_clone_xmethod_worker_data): Rename to...
15451         (python_xmethod_worker::clone): ... this and adjust.
15452         (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
15453         temporary vector.
15454         (gdbpy_get_xmethod_arg_types): Rename to...
15455         (python_xmethod_worker::do_get_arg_types): ... this and adjust.
15456         (gdbpy_get_xmethod_result_type): Rename to...
15457         (python_xmethod_worker::do_get_result_type): ... this and
15458         adjust.
15459         (gdbpy_invoke_xmethod): Rename to...
15460         (python_xmethod_worker::invoke): ... this and adjust.
15461         (new_python_xmethod_worker): Rename to...
15462         (python_xmethod_worker::python_xmethod_worker): ... this and
15463         adjust.
15464         * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
15465         Remove.
15466         (gdbpy_free_xmethod_worker_data): Remove.
15467         (gdbpy_get_matching_xmethod_workers): Use std::vector.
15468         (gdbpy_get_xmethod_arg_types): Remove.
15469         (gdbpy_get_xmethod_result_type): Remove.
15470         (gdbpy_invoke_xmethod): Remove.
15471         * python/python.c (python_extension_ops): Remove obsolete
15472         callbacks.
15473
15474 2018-01-05  Pedro Alves  <palves@redhat.com>
15475
15476         PR gdb/18653
15477         * common/signals-state-save-restore.c
15478         (save_original_signals_state): New parameter 'quiet'.  Warn if we
15479         find a custom handler preinstalled, instead of internal erroring.
15480         But only warn if !quiet.
15481         * common/signals-state-save-restore.h
15482         (save_original_signals_state): New parameter 'quiet'.
15483         * main.c (captured_main_1): Move save_original_signals_state call
15484         after option handling, and pass QUIET.
15485
15486 2018-01-05  Pedro Alves  <palves@redhat.com>
15487
15488         * spu-tdep.c (spu_catch_start): Pass
15489         symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
15490
15491 2018-01-05  Pedro Alves  <palves@redhat.com>
15492
15493         PR gdb/22670
15494         * ada-lang.c (literal_symbol_name_matcher): New function.
15495         (ada_get_symbol_name_matcher): Use it for
15496         symbol_name_match_type::SEARCH_NAME.
15497         * block.c (block_lookup_symbol): New parameter 'match_type'.  Pass
15498         it down instead of assuming symbol_name_match_type::FULL.
15499         * block.h (block_lookup_symbol): New parameter 'match_type'.
15500         * c-valprint.c (print_unpacked_pointer): Use
15501         lookup_symbol_search_name instead of lookup_symbol.
15502         * compile/compile-object-load.c (get_out_value_type): Pass down
15503         symbol_name_match_type::SEARCH_NAME.
15504         * cp-namespace.c (cp_basic_lookup_symbol): Pass down
15505         symbol_name_match_type::FULL.
15506         * cp-support.c (cp_get_symbol_name_matcher): Handle
15507         symbol_name_match_type::SEARCH_NAME.
15508         * infrun.c (insert_exception_resume_breakpoint): Use
15509         lookup_symbol_search_name.
15510         * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
15511         * psymtab.c (maintenance_check_psymtabs): Use
15512         symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
15513         * stack.c (print_frame_args): Use lookup_symbol_search_name and
15514         SYMBOL_SEARCH_NAME.
15515         * symtab.c (lookup_local_symbol): Don't demangle the lookup name
15516         if symbol_name_match_type::SEARCH_NAME.
15517         (lookup_symbol_in_language): Pass down
15518         symbol_name_match_type::FULL.
15519         (lookup_symbol_search_name): New.
15520         (lookup_language_this): Pass down
15521         symbol_name_match_type::SEARCH_NAME.
15522         (lookup_symbol_aux, lookup_local_symbol): New parameter
15523         'match_type'.  Pass it down.
15524         * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
15525         (lookup_symbol_search_name): New declaration.
15526         (lookup_symbol_in_block): New 'match_type' parameter.
15527
15528 2018-01-05  Pedro Alves  <palves@redhat.com>
15529
15530         PR gdb/22670
15531         * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
15532         ada_lookup_symbol.
15533         (ada_lookup_symbol): Reimplement in terms of
15534         ada_lookup_symbol_list, bits factored out from
15535         ada_lookup_encoded_symbol.
15536
15537 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
15538
15539         * ada-exp.y (write_object_renaming): When subscripting an array
15540         using a symbol as the index, pass the block in call to
15541         ada_lookup_encoded_symbol when looking that symbol up.
15542
15543 2018-01-05  Jerome Guitton  <guitton@adacore.com>
15544
15545         * ada-lang.c (ada_array_length): Use ada_index_type instead of
15546         TYPE_INDEX_TYPE.
15547
15548 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
15549
15550         * ada-lang.c (ada_to_fixed_value_create): Add handling of
15551         the case where VALUE_LVAL (val0) is not lval_memory.
15552
15553 2018-01-05  Xavier Roirand  <roirand@adacore.com>
15554
15555         * ada-valprint.c (print_optional_low_bound): Handle
15556         character-indexed array printing like boolean-indexed array
15557         printing.
15558
15559 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
15560
15561         * NEWS: Create a new section for the next release branch.
15562         Rename the section of the current branch, now that it has
15563         been cut.
15564
15565 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
15566
15567         GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
15568         * version.in: Bump version to 8.1.50.DATE-git.
15569
15570 2018-01-03  Xavier Roirand  <roirand@adacore.com>
15571
15572         * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
15573         Add field.
15574         * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
15575         Add field.
15576         (default_exception_support_info) <catch_handlers_sym>: Add field.
15577         (exception_support_info_fallback) <catch_handlers_sym>: Add field.
15578         (ada_exception_name_addr_1): Add "catch handlers" handling.
15579         (ada_exception_catchpoint_cond_string) <ex>: New parameter.
15580         Update all callers.
15581         (create_excep_cond_exprs) <ex>: Add parameter.
15582         (re_set_exception): Update create_excep_cond_exprs call.
15583         (print_it_exception, print_one_exception, print_mention_exception)
15584         (print_recreate_exception): Add "catch handler" handling.
15585         (allocate_location_catch_handlers, re_set_catch_handlers)
15586         (check_status_catch_handlers, print_it_catch_handlers)
15587         (print_one_catch_handlers, print_mention_catch_handlers)
15588         (print_recreate_catch_handlers): New function.
15589         (catch_handlers_breakpoint_ops): New variable.
15590         (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
15591         Add parameter.  Add "catch handler" handling.
15592         (ada_exception_sym_name, ada_exception_breakpoint_ops):
15593         Add "catch handler" handling.
15594         (ada_exception_catchpoint_cond_string): Add "catch handler"
15595         handling.
15596         (create_ada_exception_catchpoint): Update create_excep_cond_exprs
15597         call.
15598         (catch_ada_handlers_command): New function.
15599         (initialize_ada_catchpoint_ops): Initialize "catch handlers"
15600         operations structure.
15601         (_initialize_ada_language): Add "catch handlers" command entry.
15602         * NEWS: Document "catch handlers" feature.
15603
15604 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
15605
15606         * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
15607         account when creating the array type of the slice.
15608         (ada_value_slice): Likewise.
15609
15610 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
15611
15612         * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
15613         New enum value.
15614         (create_array_type_with_stride): Add byte_stride_prop parameter.
15615         * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
15616         New parameter.  Update all callers in this file.
15617         (array_type_has_dynamic_stride): New function.
15618         (is_dynamic_type_internal, resolve_dynamic_array): Add handling
15619         of arrays with dynamic byte strides.
15620         * dwarf2read.c (read_array_type): Add support for dynamic
15621         DW_AT_byte_stride attributes.
15622
15623 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
15624
15625         * dwarf2read.c (read_unspecified_type): Treat
15626         DW_TAG_enumeration_type DIEs from Ada units as stubs.
15627
15628 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
15629
15630         Update copyright year range in all GDB files.
15631
15632 2018-01-01, 18  Joel Brobecker  <brobecker@adacore.com>
15633
15634         * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
15635         and gdb/testsuite/gdb.base/step-line.c.
15636
15637 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
15638
15639         * copyright.py (main): Dump the contents of
15640         MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
15641         even if BY_HAND is empty.
15642
15643 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
15644
15645         * top.c (print_gdb_version): Update Copyright year in version
15646         message.
15647
15648 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
15649
15650         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
15651
15652 For older changes see ChangeLog-2017.
15653 \f
15654 Local Variables:
15655 mode: change-log
15656 left-margin: 8
15657 fill-column: 74
15658 version-control: never
15659 coding: utf-8
15660 End: