Return gdbpy_ref from some Python string functions
[external/binutils.git] / gdb / ChangeLog
1 2018-11-04  Tom Tromey  <tom@tromey.com>
2
3         * python/python.c (gdbpy_parameter_value): Update.
4         * python/python-internal.h (python_string_to_unicode)
5         (python_string_to_target_python_string)
6         (host_string_to_python_string): Return gdbpy_ref.
7         * python/py-utils.c (python_string_to_unicode)
8         (unicode_to_encoded_python_string)
9         (unicode_to_target_python_string)
10         (python_string_to_target_string)
11         (python_string_to_target_python_string): Return gdbpy_ref.
12         (python_string_to_host_string): Update.
13         (host_string_to_python_string): Return gdbpy_ref.
14         * python/py-symtab.c (stpy_get_filename, stpy_get_producer)
15         (stpy_fullname): Update.
16         * python/py-progspace.c (pspy_get_filename, pspy_solib_name):
17         Update.
18         * python/py-prettyprint.c (print_string_repr): Update.
19         * python/py-objfile.c (objfpy_get_filename, objfpy_get_username)
20         (objfpy_get_build_id): Update.
21         * python/py-breakpoint.c (bppy_get_location)
22         (bppy_get_expression, bppy_get_condition, bppy_get_commands):
23         Update.
24
25 2018-11-04  Tom Tromey  <tom@tromey.com>
26
27         * python/python-internal.h (gdb_py_object_from_longest)
28         (gdb_py_object_from_ulongest): Return gdbpy_ref.
29         * python/py-value.c (valpy_int): Update.
30         * python/py-utils.c (gdb_py_object_from_longest): Return
31         gdbpy_ref.
32         (gdb_py_object_from_ulongest): Likewise.
33         * python/py-type.c (typy_get_alignof): Update.
34         * python/py-linetable.c (ltpy_get_all_source_lines)
35         (ltpy_entry_get_line, ltpy_entry_get_pc): Update.
36         * python/py-block.c (blpy_get_start, blpy_get_end): Update.
37
38 2018-11-03  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
39
40         * ada-lang.c (_initialize_ada_language): Fix typo.
41
42 2018-11-03  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
43
44         * language.c (type): Remove.
45         (_initialize_language): Remove assignment to type.
46
47 2018-11-02  Joel Brobecker  <brobecker@adacore.com>
48
49         * aarch64-ravenscar-thread.h, aarch64-ravenscar-thread.c: New files.
50         * aarch64-tdep.c: #include "aarch64-ravenscar-thread.h".
51         (aarch64_gdbarch_init): Add call to register_aarch64_ravenscar_ops.
52         * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-ravenscar-thread.o.
53         (HFILES_NO_SRCDIR): Add aarch64-ravenscar-thread.h.
54         (ALLDEPFILES): Add aarch64-ravenscar-thread.c.
55         * configure.tgt (cpu_obs) [aarch64*-*-*]: Add ravenscar-thread.o
56         and aarch64-ravenscar-thread.o.
57         * NEWS: Add entry documenting Ravenscar tasking support
58         on AArch64 ELF.
59
60 2018-11-02  Matthew Malcomson  <matthew.malcomson@arm.com>
61
62         * symtab.c (info_functions_command): Initialize quiet flag.
63         * stack.c (info_args_command): Likewise.
64
65 2018-11-01  Jim Wilson  <jimw@sifive.com>
66
67         * riscv-tdep.c (riscv_breakpoint_kind_from_pc): New local unaligned_p.
68         Set if pcptr if unaligned.  Return 2 if unaligned_p true.  Update
69         debugging messages.
70
71 2018-11-01  Joel Brobecker  <brobecker@adacore.com>
72
73         * ada-lang.c (ada_watch_location_expression): New function.
74         (ada_language_defn): Set la_watch_location_expression to
75         ada_watch_location_expression.
76
77 2018-11-01  Joel Brobecker  <brobecker@adacore.com>
78
79         * print-utils.c (int_string): Remove unnecessary trailing spaces.
80
81 2018-11-01  Joel Brobecker  <brobecker@adacore.com>
82
83         * rs6000-tdep.c (skip_prologue): Fix potential negative left
84         shifting.
85
86 2018-11-01  Jerome Guitton  <guitton@adacore.com>
87             Joel Brobecker  <brobecker@adacore.com>
88
89         * defs.h (enum gdb_osabi): Add GDB_OSABI_PIKEOS.
90         * osabi.c (gdb_osabi_names): Add name for GDB_OSABI_PIKEOS.
91         * arm-pikeos-tdep.c: New file.
92         * configure.tgt: Add arm-pikeos-tdep.o to the case of ARM
93         embedded system.
94         * Makefile.in (ALL_TARGET_OBS): Add arm-pikeos-tdep.o.
95
96 2018-11-01  Simon Marchi  <simon.marchi@ericsson.com>
97
98         * common/pathstuff.c (get_standard_temp_dir): New.
99         * common/pathstuff.h (get_standard_temp_dir): New.
100         * config.in: Re-generate.
101         * configure: Re-generate.
102         * configure.ac: Don't check for mkdtemp.
103         * gnulib/aclocal-m4-deps.mk: Re-generate.
104         * gnulib/aclocal.m4: Re-generate.
105         * gnulib/config.in: Re-generate.
106         * gnulib/configure: Re-generate.
107         * gnulib/import/Makefile.am: Re-generate.
108         * gnulib/import/Makefile.in: Re-generate.
109         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
110         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
111         * gnulib/import/m4/mkdtemp.m4: New file.
112         * gnulib/import/mkdtemp.c: New file.
113         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES):
114         Add mkdtemp module.
115         * unittests/mkdir-recursive-selftests.c (test): Use
116         get_standard_temp_dir.
117         (_initialize_mkdir_recursive_selftests): Remove HAVE_MKDTEMP
118         ifdef.
119         * compile/compile.c (get_compile_file_tempdir): Likewise.
120
121 2018-11-01  Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
122
123         * rs6000-aix-tdep.c: Include "trad-frame.h" and "frame-unwind.h".
124         (SIG_FRAME_LR_OFFSET64): New define.
125         (SIG_FRAME_FP_OFFSET64): New define.
126         (aix_sighandle_frame_cache): New Function.
127         (aix_sighandle_frame_this_id): New Function.
128         (aix_sighandle_frame_prev_register): New Function.
129         (aix_sighandle_frame_sniffer): New Function.
130         (aix_sighandle_frame_unwind): New global variable.
131         (rs6000_aix_init_osabi): Install new frame unwinder.
132
133 2018-10-31  Sergio Durigan Junior  <sergiodj@redhat.com>
134
135         PR gdb/23835
136         * common/common-defs.h: Don't redefine _FORTIFY_SOURCE if it's
137         already defined.
138
139 2018-10-31  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
140
141         * ppc-linux-nat.c: Include nat/linux-ptrace.h.
142
143 2018-10-31  Andrew Burgess  <andrew.burgess@embecosm.com>
144
145         * dwarf2read.c (struct dwarf2_cu): Add producer_is_icc field.
146         (producer_is_icc): New function.
147         (check_producer): Set producer_is_icc field on dwarf2_cu.
148         (dwarf2_init_integer_type): New function.
149         (read_base_type): Call dwarf2_init_integer_type instead of
150         init_integer_type in all cases.
151         (dwarf2_cu::dwarf2_cu): Initialise producer_is_icc field.
152         * valprint.c (maybe_negate_by_bytes): Add an assertion that the
153         LEN is greater than 0.
154
155 2018-10-30  Tom Tromey  <tom@tromey.com>
156
157         * main.c (captured_main_1): Check return value of bfd_init.
158
159 2018-10-29  Sergio Durigan Junior  <sergiodj@redhat.com>
160
161         * common/offset-type.h (DEFINE_OFFSET_REL_OP): Delete.
162         Adjust comments.
163
164 2018-10-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
165
166         * procfs.c: Include common/pathstuff.h.
167
168 2018-10-28  Andrew Burgess  <andrew.burgess@embecosm.com>
169
170         * riscv-linux-nat.c (riscv_linux_nat_target::fetch_registers):
171         Add missing braces.  No functional change.
172
173 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
174
175         * macrocmd.c (info_macro_command): Use report_unrecognized_option_error
176         to report a bad option and fix indentation.
177         * demangle.c (demangle_command): Use report_unrecognized_option_error
178         to report a bad option and correctly report the bad option.
179
180 2018-10-27  Tom Tromey  <tom@tromey.com>
181
182         PR cli/23364:
183         * darwin-nat.c (copied_shell): New global.
184         (may_have_sip): Rename from should_disable_startup_with_shell.
185         (copy_shell_to_cache, maybe_cache_shell): New functions.
186         (darwin_nat_target::create_inferior): Update.  Use
187         copied_shell.
188
189 2018-10-27  Tom Tromey  <tom@tromey.com>
190
191         * unittests/scoped_fd-selftests.c (test_to_file): New function.
192         (run_tests): Call test_to_file.
193         * dwarf-index-write.c (write_psymtabs_to_index): Do not reopen
194         temporary files.
195         * common/scoped_fd.h (scoped_fd::to_file): New method.
196
197 2018-10-27  Tom Tromey  <tom@tromey.com>
198
199         * unittests/scoped_mmap-selftests.c (test_normal): Use
200         gdb_mkostemp_cloexec.
201         * unittests/scoped_fd-selftests.c (test_destroy, test_release):
202         Use gdb_mkostemp_cloexec.
203         * gnulib/aclocal-m4-deps.mk, gnulib/aclocal.m4,
204         gnulib/config.in, gnulib/configure,
205         gnulib/import/Makefile.am, gnulib/import/Makefile.in,
206         gnulib/import/m4/gnulib-cache.m4,
207         gnulib/import/m4/gnulib-comp.m4: Update.
208         * gnulib/import/m4/mkostemp.m4: New file.
209         * gnulib/import/m4/mkstemp.m4: Remove.
210         * gnulib/import/mkostemp.c: New file.
211         * gnulib/import/mkstemp.m4: Remove.
212         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Remove
213         mkstemp, add mkostemp.  Apply new patch.
214         * gnulib/import/stdlib.in.h: Apply patch.
215         * gnulib/patches/0002-mkostemp-mkostemps-Fix-compilation-error-in-C-mode-o.patch:
216         New file.
217         * dwarf-index-write.c (write_psymtabs_to_index): Use
218         gdb_mkostemp_cloexec.
219         * common/filestuff.h (gdb_mkostemp_cloexec): New function.
220
221 2018-10-27  Tom Tromey  <tom@tromey.com>
222
223         * unittests/mkdir-recursive-selftests.c: New file.
224         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
225         unittests/mkdir-recursive-selftests.c.
226         * dwarf-index-cache.c (mkdir_recursive): Move to
227         common/filestuff.c.
228         (index_cache::store): Check return value of mkdir_recursive.
229         (create_dir_and_check, test_mkdir_recursive): Move to new file.
230         (_initialize_index_cache): Don't register test.
231         * common/filestuff.h (mkdir_recursive): Declare.
232         * common/filestuff.c (mkdir_recursive): Move from
233         dwarf-index-cache.c.  Return bool.
234
235 2018-10-27  Tom Tromey  <tom@tromey.com>
236
237         * dwarf-index-write.c (write_psymtabs_to_index): Move
238         make_temp_filename to common/pathstuff.c.
239         * common/pathstuff.h (make_temp_filename): Declare.
240         * common/pathstuff.c (make_temp_filename): New function, moved
241         from dwarf-index-write.c.
242
243 2018-10-27  Tom Tromey  <tom@tromey.com>
244
245         * procfs.c (procfs_target::create_inferior): Use get_shell.
246         * cli/cli-cmds.c (shell_escape): Use get_shell.
247         * windows-nat.c (windows_nat_target::create_inferior): Use
248         get_shell.
249         * common/pathstuff.c (get_shell): New function.
250         * nat/fork-inferior.c (SHELL_FILE, get_startup_shell): Remove.
251         (fork_inferior): Use get_shell.
252         * common/pathstuff.h (get_shell): Declare.
253
254 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
255
256         * NEWS: Mention changes to 'info [args|functions|locals|variables]'
257
258 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
259
260         * stack.c (print_variable_and_value_data): Add preg and treg.
261         (print_frame_local_vars): Add quiet, regexp and t_regexp arguments,
262         and update callers.
263         (print_frame_arg_vars): Likewise.
264         (prepare_reg): New function.
265         (info_locals_command): Extract info print args and use them.
266         (info_args_command): Likewise.
267         (_initialize_stack): Modify on-line help.
268         * symtab.c (treg_matches_sym_type_name): New function.
269         (search_symbols): New arg t_regexp.
270         (symtab_symbol_info): New args quiet, regexp, t_regexp.
271         (info_variables_command): Extract info print args and use them.
272         (info_functions_command): Likewise.
273         (info_types_command): Update call to symtab_symbol_info.
274         (_initialize_symtab): Modify on-line help.
275         * symtab.h (treg_matches_sym_type_name): New function.
276         (search_symbols): New t_regexp arg.
277
278 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
279
280         * cli-utils.c (extract_arg_maybe_quoted): New function.
281         (extract_info_print_args): New function.
282         (info_print_args_help): New function.
283         (report_unrecognized_option_error): New function.
284         * cli-utils.h (extract_arg_maybe_quoted): New function.
285         (extract_info_print_args): New function.
286         (info_print_args_help): New function.
287         (report_unrecognized_option_error): New function.
288
289 2018-10-26  Tom Tromey  <tom@tromey.com>
290
291         * dwarf2read.c (recursively_compute_inclusions): Use std::vector.
292         (compute_compunit_symtab_includes): Update.
293         * symtab.h: (symtab_ptr): Remove typedef.  Don't define a VEC.
294         (compunit_symtab_ptr): Likewise.
295
296 2018-10-26  John Baldwin  <jhb@FreeBSD.org>
297
298         * fbsd-tdep.c (fbsd_print_auxv_entry): Only use
299         default_print_auxv_entry for specific tag values.
300
301 2018-10-26  John Baldwin  <jhb@FreeBSD.org>
302
303         * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_FREEBSD_HWCAP2.
304
305 2018-10-26  Jim Wilson  <jimw@sifive.com>
306
307         * riscv-linux-tdep.c: Include tramp-frame.h and trad-frame.h.
308         (riscv_linux_sigframe_init): Declare.
309         (RISCV_INST_LI_A7_SIGRETURN, RISCV_INT_ECALL): New.
310         (riscv_linux_sigframe): New.
311         (SIGFRAME_SIGINFO_SIZE, UCONTEXT_MCONTEXT_OFFSET): New.
312         (riscv_linux_sigframe_init): Define.
313         (riscv_linux_init_abi): Call tramp_frame_prepend_unwinder.
314
315         * riscv-tdep.c (riscv_isa_xlen): Refer to riscv-tdep.h comment.
316         (riscv_isa_flen): Likewise.  Drop static.
317         * riscv-tdep.h (riscv_isa_xlen): Move riscv-tdep.c comment to here.
318         (riscv_isa_flen): Likewise.  Declare.
319
320 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
321             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
322
323         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa207_htm_vsx32l)
324         (tdesc_powerpc_isa207_htm_vsx64l): Declare.
325         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_TM_SPRREGSET)
326         (PPC32_LINUX_SIZEOF_CGPRREGSET, PPC64_LINUX_SIZEOF_CGPRREGSET)
327         (PPC_LINUX_SIZEOF_CFPRREGSET, PPC_LINUX_SIZEOF_CVMXREGSET)
328         (PPC_LINUX_SIZEOF_CVSXREGSET, PPC_LINUX_SIZEOF_CPPRREGSET)
329         (PPC_LINUX_SIZEOF_CDSCRREGSET, PPC_LINUX_SIZEOF_CTARREGSET):
330         Define.
331         (struct ppc_linux_features) <htm>: New field.
332         (ppc_linux_no_features): Add initializer for htm field.
333         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
334         new tdescs.
335         * nat/ppc-linux.h (PPC_FEATURE2_HTM, NT_PPC_TM_CGPR)
336         (NT_PPC_TM_CFPR, NT_PPC_TM_CVMX, NT_PPC_TM_CVSX)
337         (NT_PPC_TM_SPR, NT_PPC_TM_CTAR, NT_PPC_TM_CPPR, NT_PPC_TM_CDSCR):
338         Define if not already defined.
339         * features/Makefile (WHICH): Add rs6000/powerpc-isa207-htm-vsx32l
340         and rs6000/powerpc-isa207-htm-vsx64l.
341         (XMLTOC): Add rs6000/powerpc-isa207-htm-vsx32l.xml and
342         rs6000/powerpc-isa207-htm-vsx64l.xml.
343         * features/rs6000/power-htm-spr.xml: New file.
344         * features/rs6000/power-htm-core.xml: New file.
345         * features/rs6000/power64-htm-core.xml: New file.
346         * features/rs6000/power-htm-fpu.xml: New file.
347         * features/rs6000/power-htm-altivec.xml: New file.
348         * features/rs6000/power-htm-vsx.xml: New file.
349         * features/rs6000/power-htm-ppr.xml: New file.
350         * features/rs6000/power-htm-dscr.xml: New file.
351         * features/rs6000/power-htm-tar.xml: New file.
352         * features/rs6000/powerpc-isa207-htm-vsx32l.xml: New file.
353         * features/rs6000/powerpc-isa207-htm-vsx64l.xml: New file.
354         * features/rs6000/powerpc-isa207-htm-vsx32l.c: Generate.
355         * features/rs6000/powerpc-isa207-htm-vsx64l.c: Generate.
356         * regformats/rs6000/powerpc-isa207-htm-vsx32l.dat: Generate.
357         * regformats/rs6000/powerpc-isa207-htm-vsx64l.dat: Generate.
358         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
359         fetch_regset with HTM regsets.
360         (store_register, store_ppc_registers): Call store_regset with HTM
361         regsets.
362         (ppc_linux_nat_target::read_description): Set htm field in the
363         features struct if needed.
364         * ppc-linux-tdep.c: Include
365         features/rs6000/powerpc-isa207-htm-vsx32l.c and
366         features/rs6000/powerpc-isa207-htm-vsx64l.c.
367         (ppc32_regmap_tm_spr, ppc32_regmap_cgpr, ppc64_le_regmap_cgpr)
368         (ppc64_be_regmap_cgpr, ppc32_regmap_cfpr, ppc32_le_regmap_cvmx)
369         (ppc32_be_regmap_cvmx, ppc32_regmap_cvsx, ppc32_regmap_cppr)
370         (ppc32_regmap_cdscr, ppc32_regmap_ctar): New globals.
371         (ppc32_linux_tm_sprregset, ppc32_linux_cgprregset)
372         (ppc64_be_linux_cgprregset, ppc64_le_linux_cgprregset)
373         (ppc32_linux_cfprregset, ppc32_le_linux_cvmxregset)
374         (ppc32_be_linux_cvmxregset, ppc32_linux_cvsxregset)
375         (ppc32_linux_cpprregset, ppc32_linux_cdscrregset)
376         (ppc32_linux_ctarregset): New globals.
377         (ppc_linux_cgprregset, ppc_linux_cvmxregset): New functions.
378         (ppc_linux_collect_core_cpgrregset): New function.
379         (ppc_linux_iterate_over_regset_sections): Call back with the htm
380         regsets.
381         (ppc_linux_core_read_description): Check if the tm spr section is
382         present and set htm in the features struct.
383         (_initialize_ppc_linux_tdep): Call
384         initialize_tdesc_powerpc_isa207_htm_vsx32l and
385         initialize_tdesc_powerpc_isa207_htm_vsx64l.
386         * ppc-linux-tdep.h (ppc_linux_cgprregset, ppc_linux_cvmxregset):
387         Declare.
388         (ppc32_linux_tm_sprregset, ppc32_linux_cfprregset)
389         (ppc32_linux_cvsxregset, ppc32_linux_cpprregset)
390         (ppc32_linux_cdscrregset, ppc32_linux_ctarregset): Declare.
391         * ppc-tdep.h (struct gdbarch_tdep) <have_htm_spr, have_htm_core>:
392         New fields.
393         <have_htm_fpu, have_htm_altivec, have_htm_vsx>:
394         Likewise.
395         <ppc_cppr_regnum, ppc_cdscr_regnum, ppc_ctar_regnum>: Likewise.
396         <ppc_cdl0_regnum, ppc_cvsr0_regnum, ppc_cefpr0_regnum>: Likewise.
397         (enum) <PPC_TFHAR_REGNUM, PPC_TEXASR_REGNUM, PPC_TFIAR_REGNUM>:
398         New enum fields.
399         <PPC_CR0_REGNUM, PPC_CCR_REGNUM, PPC_CXER_REGNUM>: Likewise.
400         <PPC_CLR_REGNUM, PPC_CCTR_REGNUM, PPC_CF0_REGNUM>: Likewise.
401         <PPC_CFPSCR_REGNUM, PPC_CVR0_REGNUM, PPC_CVSCR_REGNUM>: Likewise.
402         <PPC_CVRSAVE_REGNUM, PPC_CVSR0_UPPER_REGNUM>: Likewise.
403         <PPC_CPPR_REGNUM, PPC_CDSCR_REGNUM>: Likewise.
404         <PPC_CTAR_REGNUM>: Likewise.
405         (PPC_IS_TMSPR_REGNUM, PPC_IS_CKPTGP_REGNUM, PPC_IS_CKPTFP_REGNUM)
406         (PPC_IS_CKPTVMX_REGNUM, PPC_IS_CKPTVSX_REGNUM): Define.
407         * rs6000-tdep.c (IS_CDFP_PSEUDOREG, IS_CVSX_PSEUDOREG)
408         (IS_CEFP_PSEUDOREG): Define.
409         (rs6000_register_name): Hide the upper halves of checkpointed VSX
410         registers.  Return names for the checkpointed DFP, VSX, and EFP
411         pseudo registers.
412         (rs6000_pseudo_register_type): Remove initial assert and raise an
413         internal error in the else clause instead.  Return types for the
414         checkpointed DFP, VSX, and EFP pseudo registers.
415         (dfp_pseudo_register_read, dfp_pseudo_register_write): Handle
416         checkpointed DFP pseudo registers.
417         (vsx_pseudo_register_read, vsx_pseudo_register_write): Handle
418         checkpointed VSX pseudo registers.
419         (efp_pseudo_register_read, efp_pseudo_register_write): Rename
420         from efpr_pseudo_register_read and
421         efpr_pseudo_register_write.  Handle checkpointed EFP pseudo
422         registers.
423         (rs6000_pseudo_register_read, rs6000_pseudo_register_write):
424         Handle checkpointed DFP, VSX, and EFP registers.
425         (dfp_ax_pseudo_register_collect, vsx_ax_pseudo_register_collect)
426         (efp_ax_pseudo_register_collect): New functions.
427         (rs6000_ax_pseudo_register_collect): Move DFP, VSX and EFP pseudo
428         register logic to new functions.  Handle checkpointed DFP, VSX,
429         and EFP pseudo registers.
430         (rs6000_gdbarch_init): Look for and validate the htm features.
431         Include checkpointed DFP, VSX and EFP pseudo-registers.
432         * NEWS: Mention access to PPR, DSCR, TAR, EBB/PMU registers and
433         HTM registers.
434
435 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
436
437         * rs6000-tdep.c (rs6000_gdbarch_init): Reject tdescs with vsx but
438         without altivec or fpu.
439
440 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
441             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
442
443         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_EBBREGSET)
444         (PPC_LINUX_SIZEOF_PMUREGSET): Declare.
445         * nat/ppc-linux.h (PPC_FEATURE2_EBB, NT_PPC_EBB, NT_PPC_PMU):
446         Define if not already defined.
447         * features/rs6000/power-ebb.xml: New file.
448         * features/rs6000/power-linux-pmu.xml: New file.
449         * features/rs6000/powerpc-isa207-vsx32l.xml: Include ebb and pmu
450         features.
451         * features/rs6000/powerpc-isa207-vsx64l.xml: Likewise.
452         * features/rs6000/powerpc-isa207-vsx32l.c: Re-generate.
453         * features/rs6000/powerpc-isa207-vsx64l.c: Re-generate.
454         * regformats/rs6000/powerpc-isa207-vsx32l.dat: Re-generate.
455         * regformats/rs6000/powerpc-isa207-vsx64l.dat: Re-generate.
456         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
457         fetch_regset with ebb and pmu regsets.
458         (store_register, store_ppc_registers): Call store_regset with ebb
459         and pmu regsets.
460         (ppc_linux_nat_target::read_description): Set isa207 field in the
461         features struct if ebb and pmu are avaiable.
462         * ppc-linux-tdep.c (ppc32_regmap_ebb, ppc32_regmap_pmu)
463         (ppc32_linux_ebbregset, ppc32_linux_pmuregset): New globals.
464         (ppc_linux_iterate_over_regset_sections): Call back with the ebb
465         and pmu regsets.
466         (ppc_linux_core_read_description): Check if the pmu section is
467         present and set isa207 in the features struct.
468         * ppc-linux-tdep.h (ppc32_linux_ebbregset)
469         (ppc32_linux_pmuregset): Declare.
470         * ppc-tdep.h (struct gdbarch_tdep) <ppc_mmcr0_regnum>: New field.
471         <ppc_mmcr2_regnum, ppc_siar_regnum, ppc_sdar_regnum>: New fields.
472         <ppc_sier_regnum>: New field.
473         (enum): <PPC_BESCR_REGNUM, PPC_EBBHR_REGNUM, PPC_EBBRR_REGNUM>:
474         New enum values.
475         <PPC_MMCR0_REGNUM, PPC_MMCR2_REGNUM, PPC_SIAR_REGNUM>: New enum
476         values.
477         <PPC_SDAR_REGNUM, PPC_SIER_REGNUM>: New enum values.
478         (PPC_IS_EBB_REGNUM, PPC_IS_PMU_REGNUM): Define.
479         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate the
480         ebb and pmu features.
481
482 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
483             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
484
485         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa207_vsx32l)
486         (tdesc_powerpc_isa207_vsx64l): Declare.
487         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_TARREGSET): Define.
488         (struct ppc_linux_features) <isa207>: New field.
489         (ppc_linux_no_features): Add initializer for isa207 field.
490         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
491         new tdescs.
492         * nat/ppc-linux.h (PPC_FEATURE2_ARCH_2_07, PPC_FEATURE2_TAR)
493         (NT_PPC_TAR): Define if not already defined.
494         * features/Makefile (WHICH): Add rs6000/powerpc-isa207-vsx32l and
495         rs6000/powerpc-isa207-vsx64l.
496         (XMLTOC): Add rs6000/powerpc-isa207-vsx32l.xml and
497         rs6000/powerpc-isa207-vsx64l.xml.
498         * features/rs6000/power-tar.xml: New file.
499         * features/rs6000/powerpc-isa207-vsx32l.xml: New file.
500         * features/rs6000/powerpc-isa207-vsx64l.xml: New file.
501         * features/rs6000/powerpc-isa207-vsx32l.c: Generate.
502         * features/rs6000/powerpc-isa207-vsx64l.c: Generate.
503         * regformats/rs6000/powerpc-isa207-vsx32l.dat: Generate.
504         * regformats/rs6000/powerpc-isa207-vsx64l.dat: Generate.
505         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
506         fetch_regset with the TAR regset.
507         (store_register, store_ppc_registers): Call store_regset with the
508         TAR regset.
509         (ppc_linux_nat_target::read_description): Set isa207 field in the
510         features struct if needed.
511         * ppc-linux-tdep.c: Include
512         features/rs6000/powerpc-isa207-vsx32l.c and
513         features/rs6000/powerpc-isa207-vsx64l.c.
514         (ppc32_regmap_tar, ppc32_linux_tarregset): New globals.
515         (ppc_linux_iterate_over_regset_sections): Call back with the tar
516         regset.
517         (ppc_linux_core_read_description): Check if the tar section is
518         present and set isa207 in the features struct.
519         (_initialize_ppc_linux_tdep): Call
520         initialize_tdesc_powerpc_isa207_vsx32l and
521         initialize_tdesc_powerpc_isa207_vsx64l.
522         * ppc-linux-tdep.h (ppc32_linux_tarregset): Declare.
523         * ppc-tdep.h (gdbarch_tdep) <ppc_tar_regnum>: New field.
524         (enum) <PPC_TAR_REGNUM>: New enum value.
525         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate tar
526         feature.
527         (ppc_process_record_op31): Record changes to TAR.
528
529 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
530             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
531
532         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa205_ppr_dscr_vsx32l)
533         (tdesc_powerpc_isa205_ppr_dscr_vsx64l): Declare.
534         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_PPRREGSET)
535         (PPC_LINUX_SIZEOF_DSCRREGSET): Define.
536         (struct ppc_linux_features) <ppr_dscr>: New field.
537         (ppc_linux_no_features): Add initializer for ppr_dscr field.
538         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
539         new tdescs.
540         * nat/ppc-linux.h (PPC_FEATURE2_DSCR, NT_PPC_PPR, NT_PPC_DSCR):
541         Define if not already defined.
542         * features/Makefile (WHICH): Add
543         rs6000/powerpc-isa205-ppr-dscr-vsx32l and
544         rs6000/powerpc-isa205-ppr-dscr-vsx64l.
545         (XMLTOC): Add rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
546         rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml.
547         * features/rs6000/power-dscr.xml: New file.
548         * features/rs6000/power-ppr.xml: New file.
549         * features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml: New file.
550         * features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml: New file.
551         * features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c: Generate.
552         * features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c: Generate.
553         * regformats/rs6000/powerpc-isa205-ppr-dscr-vsx32l.dat: Generate.
554         * regformats/rs6000/powerpc-isa205-ppr-dscr-vsx64l.dat: Generate.
555         * ppc-linux-nat.c: Include <sys/uio.h>.
556         (fetch_regset, store_regset, check_regset): New functions.
557         (fetch_register, fetch_ppc_registers): Call fetch_regset with
558         DSCR and PPR regsets.
559         (store_register, store_ppc_registers): Call store_regset with
560         DSCR and PPR regsets.
561         (ppc_linux_get_hwcap2): New function.
562         (ppc_linux_nat_target::read_description): Call
563         ppc_linux_get_hwcap2 and check_regset, set ppr_dscr field in the
564         features struct if needed.
565         * ppc-linux-tdep.c: Include
566         features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c and
567         features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c.
568         (ppc32_regmap_ppr, ppc32_regmap_dscr, ppc32_linux_pprregset)
569         (ppc32_linux_dscrregset): New globals.
570         (ppc_linux_iterate_over_regset_sections): Call back with the ppr
571         and dscr regsets.
572         (ppc_linux_core_read_description): Check if the ppr and dscr
573         sections are present and set ppr_dscr in the features struct.
574         (_initialize_ppc_linux_tdep): Call
575         initialize_tdesc_powerpc_isa205_ppr_dscr_vsx32l and
576         initialize_tdesc_powerpc_isa205_ppr_dscr_vsx64l.
577         * ppc-linux-tdep.h (ppc32_linux_pprregset)
578         (ppc32_linux_dscrregset): Declare.
579         * ppc-tdep.h (struct gdbarch_tdep) <ppc_ppr_regnum>: New field.
580         <ppc_dscr_regnum>: New field.
581         (enum) <PPC_PPR_REGNUM, PPC_DSCR_REGNUM>: New enum values.
582         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate ppr
583         and dscr features.
584         (ppc_process_record_op31): Record changes to PPR and DSCR.
585
586 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
587
588         * rs6000-tdep.c (rs6000_gdbarch_init): Replace line wrapping by a
589         second initializer line for the have_* variables.  Initialize
590         have_fpu to 0 instead of 1.
591
592 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
593
594         * arch/ppc-linux-common.c (ppc_linux_match_description):
595         Parenthesize tdesc assignements and indent them properly.
596
597 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
598
599         * ppc-linux-nat.c (fetch_register): Change if statement to else
600         if.
601         (store_register): Likewise.
602
603 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
604
605         * rs6000-tdep.c: Remove reggroups.h include.
606         (rs6000_pseudo_register_reggroup_p): Remove.
607         (rs6000_gdbarch_init): Remove call to
608         set_tdesc_pseudo_register_reggroup_p.
609
610 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
611
612         * reggroups.c (default_register_reggroup_p): Return true for
613         decfloat registers and float_reggroup.
614
615 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
616
617         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): Remove.
618         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): Replace
619         ppc_linux_collect_vrregset by regcache_collect_regset.
620
621 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
622
623         * linux-tdep.c (linux_collect_regset_section_cb): Use
624         std::vector<gdb_byte> instead of char * and malloc for buf.
625         Remove xfree.
626
627 2018-10-26  Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
628
629         * xcoffread.c (read_xcoff_symtab): Pass deduced language to
630         symtab_start instead of always using language_unknown.
631
632 2018-10-26  Andrew Burgess  <andrew.burgess@embecosm.com>
633
634         * riscv-tdep.c (riscv_read_misa_reg): Update comment, remove
635         READ_P parameter, catch and ignore register access errors from
636         either the old or new MISA location.
637         (riscv_has_feature): Update call to riscv_read_misa_reg.
638
639 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
640
641         * python/py-function.c (convert_values_to_python): Return
642         gdbpy_ref<>.  Add header comment.
643         (fnpy_call): Adjust.
644
645 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
646
647         * python/py-cmd.c (cmdpy_completer_helper): Return gdbpy_ref<>.
648         (cmdpy_completer_handle_brkchars): Adjust.
649         (cmdpy_completer): Adjust.
650
651 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
652
653         * riscv-linux-nat.c (riscv_linux_nat_target::fetch_registers):
654         Pass correct regnum to raw_supply_zeroed.
655
656 2018-10-23  Hafiz Abid Qadeer  <abidh@codesourcery.com>
657
658         * regcache.c (cooked_read_test): Add CSKY to the list of
659         architectures with a save_reggroup
660
661 2018-10-23  Simon Marchi  <simon.marchi@polymtl.ca>
662
663         PR gdb/23368
664         * infrun.c (follow_exec): In the follow_exec_mode_new case,
665         transfer terminal state from old new new inferior.
666         * terminal.h (swap_terminal_info): New function.
667         * inflow.c (swap_terminal_info): New function.
668
669 2018-10-23  Tom Tromey  <tom@tromey.com>
670
671         * record-btrace.c (get_thread_current_frame_id): Rename from
672         get_thread_current_frame.  Return a frame_id.
673         (record_btrace_start_replaying): Update.
674
675 2018-10-23  Andrew Burgess  <andrew.burgess@embecosm.com>
676
677         * riscv-tdep.c (riscv_register_name): Use the user-friendly names
678         for CSRs.
679
680 2018-10-23  Joel Brobecker  <brobecker@adacore.com>
681
682         * riscv-tdep.c (riscv_gdbarch_init): Set the gdbarch's
683         have_nonsteppable_watchpoint attribute to 1.
684
685 2018-10-23  Andrew Burgess  <andrew.burgess@embecosm.com>
686
687         * riscv-tdep.c (riscv_gdb_reg_names): Update comment, and all
688         register names.
689         (struct register_alias): Rename to...
690         (struct riscv_register_alias): ...this, and update comment.
691         (riscv_register_aliases): Update type, and alias names.  Remove
692         CSR names from this list.
693         (riscv_register_name): Use riscv_gdb_reg_names for int and float
694         register names.  Add an extra assertion.
695         (riscv_is_regnum_a_named_csr): New function.
696         (riscv_register_reggroup_p): Use riscv_is_regnum_a_named_csr.
697
698 2018-10-22  Jim Wilson  <jimw@sifive.com>
699
700         * riscv-tdep.c (riscv_push_dummy_call) <in_reg>: Check for value in
701         FP reg smaller than FP reg size, and fill with -1 instead of 0.
702
703         * riscv-tdep.c (riscv_fpreg_d_type, riscv_fpreg_q_type): New.
704         (riscv_register_type): Use them.
705         (riscv_print_one_register_info): Handle union of floats same as float.
706         * riscv-tdep.h (struct gdbarch_tdep): Add riscv_fpreg_d_type and
707         riscv_fpreg_q_type fields.
708
709 2018-10-21  Simon Marchi  <simon.marchi@ericsson.com>
710
711         * gdbarch.sh (gdbarch_num_cooked_regs): New.
712         * gdbarch.h: Re-generate.
713         * ax-gdb.c (gen_expr): Use gdbarch_num_cooked_regs.
714         * dwarf2-frame.c (dwarf2_frame_cache): Likewise.
715         * eval.c (evaluate_subexp_standard): Likewise.
716         * findvar.c (value_of_register): Likewise.
717         (value_of_register_lazy): Likewise.
718         (address_from_register): Likewise.
719         * frame.c (get_frame_register_bytes): Likewise.
720         * gdbarch-selftests.c (register_to_value_test): Likewise.
721         * h8300-tdep.c (h8300_register_type): Likewise.
722         * i386-tdep.c (i386_dbx_reg_to_regnum): Likewise.
723         (i386_svr4_reg_to_regnum): Likewise.
724         * infcmd.c (default_print_registers_info): Likewise.
725         (registers_info): Likewise.
726         (print_vector_info): Likewise.
727         (default_print_float_info): Likewise.
728         * m68hc11-tdep.c (m68hc11_frame_unwind_cache): Likewise.
729         * mdebugread.c (mdebug_reg_to_regnum): Likewise.
730         * mi/mi-main.c (mi_cmd_data_list_register_names): Likewise.
731         (mi_cmd_data_list_changed_registers): Likewise.
732         (mi_cmd_data_list_register_values): Likewise.
733         (mi_cmd_data_write_register_values): Likewise.
734         (mi_cmd_trace_frame_collected): Likewise.
735         * mips-tdep.c (print_gp_register_row): Likewise.
736         (mips_print_registers_info): Likewise.
737         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
738         * regcache.c (init_regcache_descr): Likewise.
739         (register_size): Likewise.
740         (register_dump::dump): Likewise.
741         (cooked_read_test): Likewise.
742         (cooked_write_test): Likewise.
743         * rs6000-tdep.c (rs6000_register_sim_regno): Likewise.
744         (rs6000_gdbarch_init): Likewise.
745         * stabsread.c (stab_reg_to_regnum): Likewise.
746         * stack.c (info_frame_command): Likewise.
747         * target-descriptions.c (tdesc_register_name): Likewise.
748         * trad-frame.c (trad_frame_alloc_saved_regs): Likewise.
749         * tui/tui-regs.c (tui_show_register_group): Likewise.
750         * user-regs.c (user_reg_map_name_to_regnum): Likewise.
751         (user_reg_map_regnum_to_name): Likewise.
752         (value_of_user_reg): Likewise.
753         (maintenance_print_user_registers): Likewise.
754         * xtensa-tdep.c (xtensa_find_register_by_name): Likewise.
755         (xtensa_register_name): Likewise.
756         (xtensa_register_type): Likewise.
757         (xtensa_reg_to_regnum): Likewise.
758         (xtensa_pseudo_register_read): Likewise.
759         (xtensa_pseudo_register_write): Likewise.
760
761 2018-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
762
763         * amd64-tdep.c (amd64_pseudo_register_read_value): Use
764         correctly-sized buffer with raw_read.
765         (amd64_pseudo_register_write): Use correctly-sized buffer for
766         raw_read/raw_write.
767
768 2018-10-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
769
770         * typeprint.c (_initialize_typeprint): Fix wrong prefixname arg
771         in add_prefix_cmd of set print type.
772
773 2018-10-19  Tom Tromey  <tom@tromey.com>
774
775         PR tui/18388:
776         * NEWS: Mention tabset deprecation.
777         * tui/tui-win.c (tui_tab_width, internal_tab_width): New globals.
778         (update_tab_width): New function.
779         (tui_set_tab_width, tui_show_tab_width): New functions.
780         (tui_set_tab_width_command): Use update_tab_width.
781         (_initialize_tui_win): Move to end of file.  Deprecate "tabset".
782         Add new "set tui tab-width" command.
783         * tui/tui-source.c (tui_set_source_content): Update.
784         * tui/tui-disasm.c (tui_set_disassem_content): Update.
785         * tui/tui-data.h (tui_default_tab_len, tui_set_default_tab_len):
786         Don't declare.
787         (tui_tab_width): Declare.
788         * tui/tui-data.c (default_tab_len, tui_default_tab_len)
789         (tui_set_default_tab_len): Remove.
790
791 2018-10-19  Tom Tromey  <tom@tromey.com>
792
793         * tui/tui-io.h (key_is_start_sequence, key_is_end_sequence)
794         (key_is_backspace, tui_getc): Don't declare.
795         * tui/tui-io.c (key_is_start_sequence): Now static.
796         (key_is_end_sequence, key_is_backspace): Remove.
797         (tui_getc): Now static.
798
799 2018-10-19  Tom Tromey  <tom@tromey.com>
800
801         * symfile.c (reread_symbols): Clear "static_links".
802
803 2018-10-19  Alan Hayward  <alan.hayward@arm.com>
804
805         * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_SIZE): New
806         define.
807         (aarch64_linux_sigframe_init): Extra boundary checks.
808
809 2018-10-19  Andreas Arnez  <arnez@linux.ibm.com>
810
811         * s390-tdep.c (s390_pseudo_register_type): For v0-v15 don't yield
812         the possibly non-existent tdesc type 'vec128', but the type of raw
813         register v16 instead.
814
815 2018-10-19  Gary Benson <gbenson@redhat.com>
816
817         * cli/cli-interp.c (cli_interp::~cli_interp): New function.
818
819 2018-10-18  Sergio Durigan Junior  <sergiodj@redhat.com>
820
821         PR cli/23785
822         * cli/cli-dump.c (restore_binary_file): Check if "file" is
823         NULL.
824
825 2018-10-17  Paul Koning  <paul_koning@dell.com>
826
827         * charset.c (convert_between_encodings): Fix unsigned overflow.
828
829 2018-10-17  John Baldwin  <jhb@FreeBSD.org>
830
831         * fbsd-nat.c (fbsd_nat_target::info_proc) Use
832         fbsd_info_proc_mappings_header and fbsd_info_proc_mappings_entry.
833         * fbsd-tdep.c (fbsd_vm_map_entry_flags): Mark static.
834         (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
835         New functions.
836         (fbsd_core_info_proc_mappings): Use fbsd_info_proc_mappings_header
837         and fbsd_info_proc_mappings_header.
838         * fbsd-tdep.h (fbsd_vm_map_entry_flags): Remove.
839         (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
840         New.
841
842 2018-10-17  Joel Brobecker  <brobecker@adacore.com>
843
844         * MAINTAINERS (Responsible Maintainers): Add Rainer Orth as
845         Solaris Maintainer.
846
847 2018-10-15  Tom Tromey  <tom@tromey.com>
848
849         * tui/tui.c (strcat_to_buf): Remove casts.
850         * tui/tui-winsource.c (tui_show_source_line)
851         (tui_set_is_exec_point_at, tui_line_is_displayed): Remove casts.
852         * tui/tui-wingeneral.c (tui_refresh_win, box_win): Remove casts.
853         * tui/tui-windata.c (tui_first_data_item_displayed)
854         (tui_delete_data_content_windows, tui_erase_data_content)
855         (tui_display_all_data, tui_display_data_from)
856         (tui_refresh_data_win, tui_vertical_data_scroll): Remove casts.
857         * tui/tui-win.c (tui_set_win_height)
858         (make_invisible_and_set_new_height, parse_scrolling_args): Remove
859         casts.
860         * tui/tui-win.c (tui_resize_all): Remove casts.
861         (tui_scroll_backward_command, tui_set_focus)
862         (tui_set_tab_width_command): Likewise.
863         * tui/tui-source.c (tui_vertical_source_scroll): Remove cast.
864         * tui/tui-regs.c (tui_show_register_group): Remove cast.
865         * tui/tui-layout.c (tui_set_layout_by_name): Remove cast.
866         * tui/tui-disasm.c (tui_vertical_disassem_scroll): Remove cast.
867         * tui/tui-data.c (tui_partial_win_by_name, tui_free_win_content):
868         Remove casts.
869
870 2018-10-15  Simon Marchi  <simon.marchi@ericsson.com>
871
872         * MAINTAINERS (Responsible Maintainers): Add Alan Hayward as
873         AArch64/ARM maintainer.
874
875 2018-10-11  Gary Benson <gbenson@redhat.com>
876
877         * interps.h (interp::m_name): Make private and mutable.
878         * interps.c (interp::~interp): Free m_name.
879
880 2018-10-10  Sergio Durigan Junior  <sergiodj@redhat.com>
881             Simon Marchi <simark@simark.ca>
882
883         * README (`configure' options): Add documentation for new
884         "--enable-unit-tests" option.
885         * acinclude.m4: Include "selftest.m4".
886         * configure: Regenerate.
887         * configure.ac: Use "GDB_AC_SELFTEST".
888         * maint.c (maintenance_selftest): Update message informing
889         that selftests have been disabled.
890         (maintenance_info_selftests): Likewise.
891         * selftest.m4: New file.
892
893 2018-10-10  Gary Benson <gbenson@redhat.com>
894
895         * remote.c (remote_target::remote_send_printf): Add
896         missing va_end found by Coverity.
897
898 2018-10-10  Markus Metzger  <markus.t.metzger@intel.com>
899
900         * btrace.c (ftrace_update_function): Add indirect jump heuristic.
901
902 2018-10-09  Tom Tromey  <tom@tromey.com>
903
904         * configure: Rebuild.
905         * sanitize.m4 (AM_GDB_UBSAN): Default to no.
906         * NEWS: Update --enable-ubsan documentation.
907
908 2018-10-09  Gary Benson <gbenson@redhat.com>
909
910         * dwarf2read.c (create_dwp_hash_table): Fix buffer overrun
911         found by Coverity.
912
913 2018-10-08  Tom Tromey  <tom@tromey.com>
914
915         * riscv-fbsd-tdep.c (riscv_fbsd_sigframe_init): Remove unused
916         variable.
917         (riscv_fbsd_init_abi): Likewise.
918
919 2018-10-08  Weimin Pan  <weimin.pan@oracle.com>
920         * valops.c (value_struct_elt_for_reference): Rename local variable
921         to work around the shadowing a previous local warning.
922
923 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
924
925         * Makefile.in (ALLDEPFILES): Add riscv-fbsd-nat.c.
926         * NEWS: Mention new FreeBSD/riscv native configuration.
927         * configure.host: Add riscv*-*-freebsd*.
928         * configure.nat: Likewise.
929         * riscv-fbsd-nat.c: New file.
930
931 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
932
933         * Makefile.in (ALL_TARGET_OBS): Add riscv-fbsd-tdep.o.
934         (HFILES_NO_SRCDIR): Add riscv-fbsd-tdep.h.
935         (ALLDEPFILES): Add riscv-fbsd-tdep.c.
936         * NEWS: Mention new FreeBSD/riscv target.
937         * configure.tgt: Add riscv*-*-freebsd*.
938         * riscv-fbsd-tdep.c: New file.
939         * riscv-fbsd-tdep.h: New file.
940
941 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
942
943         * regcache.h (struct regcache_map_entry): Note that this type can
944         be used with traditional frame caches.
945         * trad-frame.c (trad_frame_set_reg_regmap): New.
946         * trad-frame.h (trad_frame_set_reg_regmap): New.
947
948 2018-10-08  Weimin Pan  <weimin.pan@oracle.com>
949
950         PR c++/16841
951         * valops.c (get_virtual_base_offset): New function.
952         (value_struct_elt_for_reference): Use it to get virtual base offset
953         and add it in calculating class member address.
954
955 2018-10-08   John Darrington <john@darrington.wattle.id.au>
956
957     * dwarf2read.c (dwarf2_cu) <producer_is_codewarrior>: New field.
958       (check_producer): Check if the producer is codewarrior.
959       (producer_is_codewarrior): New function.
960       (lnp_state_machine::record_line): Ignore is_stmt flag for records
961        produced by codewarrior.
962       (dwarf2_cu::dwarf2_cu): Initialize producer_is_codewarrior.
963
964 2018-10-06  Tom Tromey  <tom@tromey.com>
965
966         PR python/19399:
967         * python/py-inferior.c: Add "architecture" entry.
968         (infpy_architecture): New function.
969
970 2018-10-06  Tom Tromey  <tom@tromey.com>
971
972         PR python/21765:
973         * python/py-symbol.c (gdbpy_initialize_symbols): Redefine
974         SYMBOL_VARIABLES_DOMAIN, SYMBOL_FUNCTIONS_DOMAIN,
975         SYMBOL_TYPES_DOMAIN.  Define SYMBOL_MODULE_DOMAIN,
976         SYMBOL_COMMON_BLOCK_DOMAIN, SYMBOL_LOC_COMMON_BLOCK.
977
978 2018-10-06  Tom Tromey  <tom@tromey.com>
979
980         PR build/17077:
981         * Makefile.in (OPCODES_CFLAGS): Remove "-I$(OPCODES_SRC)/..".
982         * arc-tdep.c, frv-tdep.c, lm32-tdep.c, mep-tdep.c,
983         microblaze-tdep.c, or1k-tdep.h: Use ../opcodes, not opcodes, in
984         #include.
985
986 2018-10-06  Tom Tromey  <tom@tromey.com>
987
988         * python/py-breakpoint.c (bppy_get_location): Handle a
989         bp_breakpoint without a location.
990
991 2018-10-06  Tom Tromey  <tom@tromey.com>
992
993         * python/lib/gdb/function/strfns.py (_MemEq, _StrLen, _StrEq)
994         (_RegEx): Reformat help text.
995         * python/lib/gdb/function/caller_is.py (CallerIs, CallerMatches)
996         (AnyCallerIs, AnyCallerMatches): Reformat help text.
997         * python/lib/gdb/function/as_string.py (_AsString): Reformat help
998         text.
999         * python/lib/gdb/command/xmethods.py (InfoXMethod)
1000         (EnableXMethod, DisableXMethod): Remove help indentation.
1001         Capitalize meta-syntactic variables.
1002         * python/lib/gdb/command/unwinders.py (InfoUnwinder)
1003         (EnableUnwinder, DisableUnwinder): Remove help indentation.
1004         Capitalize meta-syntactic variables.
1005         * python/lib/gdb/command/explore.py (ExploreCommand)
1006         (ExploreValueCommand, ExploreTypeCommand): Reformat help text.
1007         * python/lib/gdb/command/type_printers.py (InfoTypePrinter)
1008         (EnableTypePrinter, DisableTypePrinter): Remove help indentation.
1009         * python/lib/gdb/command/pretty_printers.py (InfoPrettyPrinter):
1010         Remove help indentation.
1011         (EnablePrettyPrinter, DisablePrettyPrinter): Likewise.
1012         * python/lib/gdb/command/frame_filters.py (EnableFrameFilter)
1013         (DisableFrameFilter, SetFrameFilterPriority)
1014         (ShowFrameFilterPriority, InfoFrameFilter): Reword help text.
1015
1016 2018-10-06  Tom Tromey  <tom@tromey.com>
1017
1018         PR tui/28819:
1019         * tui/tui-io.c (gdb_wgetch): New function.
1020         (tui_mld_getc, tui_getc): Use it.
1021
1022 2018-10-05  Tom Tromey  <tom@tromey.com>
1023
1024         * sol-thread.c (sol_thread_target::wait): Rename inner
1025         "save_ptid".
1026
1027 2018-10-04  Tom Tromey  <tom@tromey.com>
1028
1029         * configure: Rebuild.
1030         * warning.m4 (AM_GDB_WARNINGS): Add -Wshadow=local.
1031
1032 2018-10-04  Tom Tromey  <tom@tromey.com>
1033
1034         * guile/scm-frame.c (gdbscm_frame_read_var): Remove inner
1035         declaration of "block".
1036
1037 2018-10-04  Tom Tromey  <tom@tromey.com>
1038
1039         * common/filestuff.c (fdwalk): Remove inner declaration of
1040         "result".
1041
1042 2018-10-04  Tom Tromey  <tom@tromey.com>
1043
1044         * msp430-tdep.c (msp430_push_dummy_call): Rename inner
1045         "structs_addr" and hoist declaration.
1046
1047 2018-10-04  Tom Tromey  <tom@tromey.com>
1048
1049         * linux-tdep.c (linux_make_mappings_corefile_notes): Introduce new
1050         variable "size".
1051
1052 2018-10-04  Tom Tromey  <tom@tromey.com>
1053
1054         * mdebugread.c (parse_partial_symbols): Use std::string.
1055
1056 2018-10-04  Tom Tromey  <tom@tromey.com>
1057
1058         * ctf.c (SET_ARRAY_FIELD): Rename "u32".
1059         * p-valprint.c (pascal_val_print): Split inner "i" variable.
1060         * xtensa-tdep.c (xtensa_push_dummy_call): Declare "i" in loop
1061         header.
1062         * xstormy16-tdep.c (xstormy16_push_dummy_call): Declare "val" in
1063         more inner scope.
1064         * xcoffread.c (read_xcoff_symtab): Rename inner "symbol".
1065         * varobj.c (varobj_update): Rename inner "newobj",
1066         "type_changed".
1067         * valprint.c (generic_emit_char): Rename inner "buf".
1068         * valops.c (find_overload_match): Rename inner "temp".
1069         (value_struct_elt_for_reference): Declare "v" in more inner
1070         scope.
1071         * v850-tdep.c (v850_push_dummy_call): Rename "len".
1072         * unittests/array-view-selftests.c (run_tests): Rename inner
1073         "vec".
1074         * tui/tui-stack.c (tui_show_frame_info): Declare "i" in loop
1075         header.
1076         * tracepoint.c (merge_uploaded_trace_state_variables): Declare
1077         "tsv" in more inner scope.
1078         (print_one_static_tracepoint_marker): Rename inner
1079         "tuple_emitter".
1080         * tic6x-tdep.c (tic6x_analyze_prologue): Declare "inst" lower.
1081         (tic6x_push_dummy_call): Don't redeclare "addr".
1082         * target-float.c: Declare "dto" lower.
1083         * symtab.c (lookup_local_symbol): Rename inner "sym".
1084         (find_pc_sect_line): Rename inner "pc".
1085         * stack.c (print_frame): Don't redeclare "gdbarch".
1086         (return_command): Rename inner "gdbarch".
1087         * s390-tdep.c (s390_prologue_frame_unwind_cache): Renam inner
1088         "sp".
1089         * rust-lang.c (rust_internal_print_type): Declare "i" in loop
1090         header.
1091         * rs6000-tdep.c (ppc_process_record): Rename inner "addr".
1092         * riscv-tdep.c (riscv_push_dummy_call): Declare "info" in inner
1093         scope.
1094         * remote.c (remote_target::update_thread_list): Don't redeclare
1095         "tp".
1096         (remote_target::process_initial_stop_replies): Rename inner
1097         "thread".
1098         (remote_target::remote_parse_stop_reply): Don't redeclare "p".
1099         (remote_target::wait_as): Don't redeclare "stop_reply".
1100         (remote_target::get_thread_local_address): Rename inner
1101         "result".
1102         (remote_target::get_tib_address): Likewise.
1103
1104         * regcache.c (cooked_read_test): Rename "regnum".
1105         * record-btrace.c (cmd_record_btrace_start): Rename inner
1106         "exception".
1107         * ppc-sysv-tdep.c (ppc64_sysv_abi_return_value): Declare "i" in
1108         loop header.
1109         * ppc-linux-tdep.c (ppc_linux_syscall_record): Declare "i" in loop
1110         header.
1111         (ppu2spu_sniffer): Rename inner "buf".
1112         * parse.c (operator_check_standard): Rename inner "type",
1113         "objfile".
1114         * p-valprint.c (pascal_val_print): Introduce new scope for
1115         "low_bound", "high_bound".
1116         * p-exp.y (yylex): Declare "i" in loop header.
1117         * objfiles.c (objfile_relocate1): Declare "i" in loop header.
1118         Lower declaration of "s".
1119         * nios2-tdep.c (nios2_analyze_prologue): Declare "i" in loop
1120         header.
1121         (nios2_push_dummy_call): Rename "len".
1122         * nat/linux-osdata.c (linux_xfer_osdata_cpus): Rename static
1123         "buf".
1124         (linux_xfer_osdata_fds, linux_xfer_osdata_shm)
1125         (linux_xfer_osdata_sem, linux_xfer_osdata_msg)
1126         (linux_xfer_osdata_modules): Likewise.
1127         * mips-tdep.c (mips_eabi_push_dummy_call): Rename outer "len".
1128         (mips_n32n64_push_dummy_call, mips_o32_push_dummy_call)
1129         (mips_o64_push_dummy_call): Likewise.
1130         * microblaze-tdep.c (microblaze_analyze_prologue): Rename inner
1131         "op".
1132         * mi/mi-main.c (list_available_thread_groups): Rename inner
1133         "tuple_emitter".
1134         (mi_cmd_data_read_memory): Rename inner "opts".
1135         * mi/mi-cmd-var.c (varobj_update_one): Rename inner
1136         "tuple_emitter".
1137         * mep-tdep.c (mep_analyze_prologue): Declare "rn" in loop header.
1138         * mdebugread.c (parse_symbol): Rename inner "b".  Declare "f" in
1139         more inner scope.
1140         (parse_partial_symbols): Rename inner "pst", "p", "name"
1141         * main.c (captured_main_1): Rename inner "i"s.
1142         * machoread.c (macho_symfile_read_all_oso): Don't redeclare
1143         "oso2".
1144         * linux-tdep.c (linux_info_proc): Rename inner "filename".
1145         * linespec.c (linespec_lexer_lex_string): Rename inner "p".
1146         * infrun.c (handle_no_resumed): Don't redeclare "thread".
1147         (handle_signal_stop): Rename inner "gdbarch".
1148         (handle_command): Declare "signum" in loop header.
1149         * ia64-tdep.c (ia64_pseudo_register_read): Don't redeclare
1150         "status".
1151         (examine_prologue): Rename inner "sol" and "sof".
1152         (ia64_extract_return_value): Rename inner "val".  Declare another
1153         "val" in a more inner scope.
1154         * hppa-bsd-tdep.c (hppabsd_find_global_pointer): Declare "buf" in
1155         inner scope.
1156         * guile/scm-symbol.c (gdbscm_lookup_symbol): Rename inner
1157         "except".
1158         * findvar.c (default_read_var_value): Don't redeclare "addr".
1159         * f-exp.y (yylex): Declare "i" in loop header.
1160         * eval.c (evaluate_subexp_standard): Don't redeclare "type".
1161         Rename inner "type", "expect_type".
1162         (evaluate_subexp_for_sizeof): Rename inner "pc".
1163         * elfread.c (elf_symfile_read): Rename inner "abfd".
1164         * dwarf2read.c (read_debug_names_from_section): Don't redeclare
1165         "bytes_read".
1166         (process_psymtab_comp_unit_reader): Don't redeclare "gdbarch".
1167         (add_partial_subprogram): Rename inner "lowpc" and "highpc".
1168         (dwarf_decode_line_header): Rename inner "lh".
1169         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Don't redeclare
1170         "offset".  Declare "i" in loop header.
1171         (disassemble_dwarf_expression): Rename inner "addr_size".
1172         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Rename
1173         inner "result".
1174         (dwarf_expr_context::execute_stack_op): Rename inner "offset".
1175         * dwarf2-frame.c (decode_frame_entry_1): Rename inner "length"s.
1176         * disasm.c (do_mixed_source_and_assembly_deprecated): Rename inner
1177         "inner_list_emitter".
1178         (do_mixed_source_and_assembly): Rename inner "tuple_emitter".
1179         * disasm-selftests.c (print_one_insn_test): Wrap "bplen"
1180         declaration in a block.
1181         * csky-tdep.c (csky_analyze_prologue): Declare "offset" lower.
1182         * cp-valprint.c (cp_print_value_fields): Don't redeclare
1183         "obstack_final_size".
1184         * cp-support.c (inspect_type): Declare "i" in loop header.
1185         * compile/compile.c (compile_instance::insert_symbol_error):
1186         Rename inner "e".
1187         * common/agent.c (agent_run_command): Remove inner "ret"
1188         declaration.
1189         * coffread.c (coff_symfile_read): Rename inner "name".
1190         (coff_symfile_read): Rename inner "abfd".
1191         * cli/cli-utils.c (get_number_trailer): Rename inner "val".
1192         * cli/cli-cmds.c (print_disassembly): Rename inner "low" and
1193         "high".
1194         * c-exp.y (lex_one_token): Move "len" declaration lower.
1195         * breakpoint.c (create_longjmp_master_breakpoint): Don't redeclare
1196         "gdbarch".
1197         (create_exception_master_breakpoint): Likewise.  Don't redeclare
1198         "b".
1199         (watch_command_1): Declare "mark" later.
1200         (clear_command): Don't shadow "a" or "b".
1201         (delete_command): Rename inner "b".
1202         (delete_trace_command): Likewise.
1203         * arm-tdep.c (thumb_process_displaced_32bit_insn): Rename inner
1204         "op".
1205         (arm_gdbarch_init): Remove inner "e_flags".
1206         * arch/arm-get-next-pcs.c (thumb_get_next_pcs_raw): Declare
1207         "offset" in inner blocks.
1208
1209 2018-10-04  Simon Marchi  <simon.marchi@ericsson.com>
1210
1211         * dwarf-index-write.c (file_write): Don't write if the vector is
1212         empty.
1213
1214 2018-10-05  Tom de Vries  <tdevries@suse.de>
1215
1216         * python/py-progspace.c (pspy_solib_name): Fix type mismatch in
1217         PyArg_ParseTuple call.
1218
1219 2018-10-05  Tom de Vries  <tdevries@suse.de>
1220
1221         * python/py-record-btrace.c (recpy_bt_goto): Fix type mismatch in
1222         PyArg_ParseTuple call.
1223
1224 2018-10-04  Joel Brobecker  <brobecker@adacore.com>
1225
1226         * psymtab.c (recursively_search_psymtabs): Reformat parameters
1227         to avoid exceeding 80 characters per line limit.
1228
1229 2018-10-04  Tom Tromey  <tom@tromey.com>
1230
1231         * symfile.c (syms_from_objfile_1, finish_new_objfile)
1232         (reread_symbols): Update.
1233         * complaints.h (clear_complaints): Remove argument.
1234         * complaints.c (enum complaint_series): Remove.
1235         (series): Remove global.
1236         (complaint_internal): Update.
1237         (clear_complaints): Remove argument.
1238
1239 2018-10-04  Tom Tromey  <tom@tromey.com>
1240
1241         * symfile.c (symbol_file_add_with_addrs): Do not print "no
1242         debugging symbols" message if there is a separate debug objfile.
1243
1244 2018-10-04  Tom Tromey  <tom@tromey.com>
1245
1246         PR cli/19551:
1247         * symfile.c (symbol_file_add_with_addrs): Update output.
1248         * psymtab.c (require_partial_symbols): Update output.
1249
1250 2018-10-04  Tom Tromey  <tom@tromey.com>
1251
1252         PR cli/22234:
1253         * complaints.c: Emit \n.
1254
1255 2018-10-04  Tom Tromey  <tom@tromey.com>
1256
1257         * symfile.c (symbol_file_add_with_addrs, symbol_file_clear)
1258         (separate_debug_file_exists, find_separate_debug_file)
1259         (add_symbol_file_command, reread_symbols, allocate_symtab)
1260         (allocate_compunit_symtab): Use filtered printing, not
1261         unfiltered.
1262         * psymtab.c (require_partial_symbols, dump_psymtab)
1263         (allocate_psymtab): Use filtered printing, not unfiltered.
1264
1265 2018-10-04  Tom Tromey  <tom@tromey.com>
1266
1267         * complaints.c (complaint_internal): Correctly check complaint
1268         count.
1269
1270 2018-10-04  Tom Tromey  <tom@tromey.com>
1271
1272         * complaints.h (struct complaints): Remove declaration.
1273         * complaints.c (clear_complaints): Remove an unused variable.
1274
1275 2018-10-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1276
1277         * MAINTAINERS (Write After Approval): Add self.
1278
1279 2018-10-03  Tom Tromey  <tom@tromey.com>
1280
1281         * guile/scm-value.c (gdbscm_value_to_string): Initialize
1282         "buffer_contents".
1283         * coffread.c (coff_symtab_read): Initialize "newobj".
1284
1285 2018-10-03  Simon Marchi  <simon.marchi@polymtl.ca>
1286
1287         * dwarf2read.c (read_func_scope): Remove struct keyword in
1288         range-based for.
1289
1290 2018-10-03  Tom Tromey  <tom@tromey.com>
1291
1292         * README: Mention --enable-ubsan.
1293         * NEWS: Mention --enable-ubsan.
1294         * acinclude.m4: Include sanitize.m4.
1295         * configure: Rebuild.
1296         * configure.ac: Call AM_GDB_UBSAN.
1297         * sanitize.m4: New file.
1298
1299 2018-10-03  Tom Tromey  <tom@tromey.com>
1300
1301         * expression.h (enum exp_opcode): Use uint8_t as base type.
1302         * expprint.c (op_name): Handle invalid opcodes.
1303
1304 2018-10-03  Tom Tromey  <tom@tromey.com>
1305
1306         * parse.c (prefixify_expression): Add assert.
1307         (parse_exp_in_context_1): Throw exception if the expression is
1308         empty.
1309
1310 2018-10-03  Tom Tromey  <tom@tromey.com>
1311
1312         * dwarf2read.c (read_signed_leb128): Work in ULONGEST.
1313
1314 2018-10-03  Tom Tromey  <tom@tromey.com>
1315
1316         * c-exp.y (parse_number): Work in unsigned.  Remove casts.
1317
1318 2018-10-03  Tom Tromey  <tom@tromey.com>
1319
1320         * dwarf2read.c (read_subrange_type): Make "negative_mask"
1321         unsigned.
1322
1323 2018-10-03  Tom Tromey  <tom@tromey.com>
1324
1325         * findvar.c (extract_integer): Do work in an unsigned type.
1326
1327 2018-10-03  Tom Tromey  <tom@tromey.com>
1328
1329         * common/enum-flags.h (enum_flags::operator~): Add static assert.
1330         * symfile-add-flags.h (enum symfile_add_flag): Use unsigned as
1331         base type.
1332         * objfile-flags.h (enum objfile_flag): Use unsigned as base type.
1333         * gdbtypes.h (enum type_instance_flag_value): Use unsigned as base
1334         type.
1335         * c-lang.h (enum c_string_type_values): Use unsigned as base
1336         type.
1337         * btrace.h (enum btrace_thread_flag): Use unsigned as base type.
1338
1339 2018-10-03  Tom Tromey  <tom@tromey.com>
1340
1341         * dwarf2-frame.h (dwarf2_frame_state_reg_info)
1342         <~dwarf2_frame_state_reg_info>: Update.
1343         <dwarf2_frame_state_reg_info>: Update.
1344         <alloc_regs>: Add assertion.  Update.
1345         <reg>: Now a std::vector.
1346         <num_regs>: Remove.
1347         <swap>: Update.
1348         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
1349         (execute_cfa_program_test, dwarf2_frame_cache): Update.
1350
1351 2018-10-03  Tom Tromey  <tom@tromey.com>
1352
1353         * namespace.c (add_using_directive): Don't pass NULL to memcpy.
1354
1355 2018-10-03  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1356
1357         * tid-parse.c (tid_is_in_list): Fix wrong 'See' comment.
1358
1359 2018-10-02  Tom Tromey  <tom@tromey.com>
1360
1361         * aarch64-linux-tdep.c (aarch64_linux_sigframe_init): Use pulongest.
1362
1363 2018-10-02  John Darrington <john@darrington.wattle.id.au>
1364
1365         * NEWS: Mention changed commands.
1366         * ser-uds.c: New file.
1367         * configure.ac (SER_HARDWIRE): Add ser-uds.o.
1368         * configure: Regenerate.
1369         * Makefile.in: Add new file.
1370         * serial.c (serial_open): Check if filename is a socket
1371           and lookup the appropriate interface accordingly.
1372
1373 2018-10-01  Alan Hayward  <alan.hayward@arm.com>
1374
1375         * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_OFFSET): Add
1376         define.
1377         (AARCH64_EXTRA_MAGIC): Likewise.
1378         (AARCH64_FPSIMD_MAGIC): Likewise.
1379         (AARCH64_SVE_MAGIC): Likewise.
1380         (AARCH64_EXTRA_DATAP_OFFSET): Likewise.
1381         (AARCH64_FPSIMD_FPSR_OFFSET): Likewise.
1382         (AARCH64_FPSIMD_FPCR_OFFSET): Likewise.
1383         (AARCH64_FPSIMD_V0_OFFSET): Likewise.
1384         (AARCH64_FPSIMD_VREG_SIZE): Likewise.
1385         (AARCH64_SVE_CONTEXT_VL_OFFSET): Likewise.
1386         (AARCH64_SVE_CONTEXT_REGS_OFFSET): Likewise.
1387         (AARCH64_SVE_CONTEXT_P_REGS_OFFSET): Likewise.
1388         (AARCH64_SVE_CONTEXT_FFR_OFFSET): Likewise.
1389         (AARCH64_SVE_CONTEXT_SIZE): Likewise.
1390         (read_aarch64_ctx): Add function.
1391         (aarch64_linux_sigframe_init): Detect FP registers.
1392
1393 2018-10-01  Alan Hayward  <alan.hayward@arm.com>
1394
1395         * aarch64-tdep.c (AARCH64_Q0_REGNUM): Move to here.
1396         (AARCH64_D0_REGNUM): Likewise.
1397         (AARCH64_S0_REGNUM): Likewise.
1398         (AARCH64_H0_REGNUM): Likewise.
1399         (AARCH64_B0_REGNUM): Likewise.
1400         (AARCH64_SVE_V0_REGNUM): Likewise.
1401         * arch/aarch64.h (AARCH64_Q0_REGNUM): Move from here.
1402         (AARCH64_D0_REGNUM): Likewise.
1403         (AARCH64_S0_REGNUM): Likewise.
1404         (AARCH64_H0_REGNUM): Likewise.
1405         (AARCH64_B0_REGNUM): Likewise.
1406         (AARCH64_SVE_V0_REGNUM): Likewise.
1407
1408 2018-10-01  Gary Benson <gbenson@redhat.com>
1409
1410         * gdb_proc_service.h (gdb_prfpregset_t): Remove typedef.
1411         * proc-service.c (ps_lgetfpregs, ps_lsetfpregs): Use
1412         prfpregset_t instead of gdb_prfpregset_t.
1413         * configure.ac (PRFPREGSET_T_BROKEN): Remove check.
1414         * configure, config.in: Rebuild.
1415
1416 2018-10-01  Gary Benson <gbenson@redhat.com>
1417
1418         * common/gdb_proc_service.h: New file, factored out from...
1419         * gdb_proc_service.h: Moved common code to the above file.
1420         * Makefile.in (HFILES_NO_SRCDIR): Add the above new file.
1421
1422 2018-10-01  Gary Benson <gbenson@redhat.com>
1423
1424         * gdb_proc_service.h: Use elf_gregset_t if prgregset_t is
1425         undefined.  Use elf_fpregset_t if prfpregset_t is undefined.
1426
1427 2018-10-01  Gary Benson <gbenson@redhat.com>
1428
1429         * configure.ac: Check if sys/procfs.h defines elf_fpregset_t.
1430         (AC_CHECK_HEADERS): Check for linux/elf.h.
1431         * configure, config.in: Rebuild.
1432         * gdb_proc_service.h: Include linux/elf.h if sys/procfs.h
1433         doesn't define elf_fpregset_t.
1434
1435 2018-10-01  Gary Benson <gbenson@redhat.com>
1436
1437         * gdb_proc_service.h: Whitespace change.
1438
1439 2018-10-01  Tom Tromey  <tom@tromey.com>
1440
1441         * unittests/scoped_mmap-selftests.c: Don't check HAVE_UNISTD_H.
1442         * unittests/scoped_fd-selftests.c: Don't check HAVE_UNISTD_H.
1443         * common/scoped_fd.h: Don't check HAVE_UNISTD_H.
1444
1445 2018-10-01  Tom Tromey  <tom@tromey.com>
1446
1447         * README: Minor change.
1448
1449 2018-09-30  Pedro Alves  <palves@redhat.com>
1450
1451         * darwin-nat-info.c (darwin_debug_regions_recurse)
1452         (info_mach_exceptions_command): Remove unused local variables.
1453         * darwin-nat.c (darwin_decode_notify_message)
1454         (darwin_nat_target::resume, darwin_nat_target::mourn_inferior)
1455         (darwin_stop_inferior, darwin_setup_exceptions)
1456         (darwin_nat_target::kill, darwin_attach_pid, darwin_ptrace_him)
1457         (darwin_nat_target::attach, darwin_nat_target::detach)
1458         (darwin_read_write_inferior, darwin_read_dyld_info): Remove unused
1459         local variables.
1460         * i386-darwin-nat.c (i386_darwin_dr_set): Remove unused local
1461         variables.
1462
1463 2018-09-29  Tom Tromey  <tom@tromey.com>
1464
1465         * README: Remove some leftover text.
1466
1467 2018-09-29  Tom Tromey  <tom@tromey.com>
1468
1469         * PROBLEMS: Rewrite.
1470         * README: Update.
1471
1472 2018-09-28  John Baldwin  <jhb@FreeBSD.org>
1473
1474         * disasm-selftests.c (print_one_insn_test): Add bfd_arch_riscv to
1475         case with explicit breakpoint kind.
1476         * riscv-tdep.c (show_use_compressed_breakpoints): Remove
1477         'additional_info' and related logic.
1478         (riscv_debug_breakpoints): New variable.
1479         (riscv_breakpoint_kind_from_pc): Use the length of the existing
1480         instruction to determine the breakpoint kind.
1481         (_initialize_riscv_tdep): Add 'set/show debug riscv breakpoints'
1482         flag.  Update description of 'set/show riscv
1483         use-compressed-breakpoints' flag.
1484
1485 2018-09-28  Andrew Burgess  <andrew.burgess@embecosm.com>
1486
1487         (NEWS): Mention changes to frame related commands.
1488         * cli/cli-decode.c (add_cmd_suppress_notification): New function.
1489         (add_prefix_cmd_suppress_notification): New function.
1490         (add_com_suppress_notification): Call
1491         add_cmd_suppress_notification.
1492         * command.h (add_cmd_suppress_notification): Declare.
1493         (add_prefix_cmd_suppress_notification): Declare.
1494         * mi/mi-cmd-stack.c: Add 'safe-ctype.h' include.
1495         (parse_frame_specification): Moved from stack.c, with
1496         simplification to handle a single argument.
1497         (mi_cmd_stack_select_frame): Use parse_frame_specification, the
1498         switch to the selected frame.  Add a header comment.
1499         * stack.c: Remove 'safe-ctype.h' include.
1500         (find_frame_for_function): Add declaration.
1501         (find_frame_for_address): New function.
1502         (parse_frame_specification): Moved into mi/mi-cmd-stack.c.
1503         (frame_selection_by_function_completer): New function.
1504         (info_frame_command): Rename to...
1505         (info_frame_command_core): ...this, and update parameter types.
1506         (select_frame_command): Rename to...
1507         (select_frame_command_core): ...this, and update parameter types.
1508         (frame_command): Rename to...
1509         (frame_command_core): ...this, and update parameter types.
1510         (class frame_command_helper): New class to wrap implementations of
1511         frame related sub-commands.
1512         (frame_apply_cmd_list): New static global.
1513         (frame_cmd_list): Make static.
1514         (select_frame_cmd_list): New global for sub-commands.
1515         (info_frame_cmd_list): New global for sub-commands.
1516         (_initialize_stack): Register sub-commands for 'frame',
1517         'select-frame', and 'info frame'.  Update 'frame apply' commands
1518         to use frame_apply_cmd_list.  Move function local static
1519         frame_apply_list to file static frame_apply_cmd_list for
1520         consistency.
1521         * stack.h (select_frame_command): Delete declarationn.
1522         (select_frame_for_mi): Declare new function.
1523
1524 2018-09-26  Andrew Burgess  <andrew.burgess@embecosm.com>
1525
1526         * riscv-tdep.c (riscv_insn::decode): Decode c.lui.
1527         (riscv_scan_prologue): Split handling of AUIPC, LUI, ADD, ADDI,
1528         and NOP.
1529
1530 2018-09-26  Simon Marchi  <simon.marchi@ericsson.com>
1531
1532         * elf32-nds32.c (elf32_nds32_allocate_dynrelocs): Remove.
1533
1534 2018-09-26  Tom Tromey  <tom@tromey.com>
1535
1536         * valops.c (auto_abandon): Remove dead code.
1537
1538 2018-09-26  Tom Tromey  <tom@tromey.com>
1539
1540         * tui/tui-win.c (WIN_HEIGHT_USAGE): Remove extra ">"s.
1541
1542 2018-09-24  Tom Tromey  <tom@tromey.com>
1543
1544         * common/pathstuff.c (get_standard_cache_dir): Make
1545         "xdg_cache_home" and "home" const.
1546         * top.c (init_history): Make "tmpenv" const.
1547         * main.c (get_init_files): Make "homedir" const.
1548
1549 2018-09-23  Tom Tromey  <tom@tromey.com>
1550
1551         PR python/18852:
1552         * python/py-param.c (get_set_value): Use gdbpy_handle_exception.
1553
1554 2018-09-23  Tom Tromey  <tom@tromey.com>
1555
1556         * python/py-function.c (fnpy_call): Use gdbpy_handle_exception.
1557         * python/py-cmd.c (cmdpy_function): Use gdbpy_handle_exception.
1558         * python/python-internal.h (gdbpy_handle_exception): Declare.
1559         * python/py-utils.c (gdbpy_handle_exception): New function.
1560
1561 2018-09-23  Tom Tromey  <tom@tromey.com>
1562
1563         PR python/17284:
1564         * python/py-type.c (typy_template_argument): Check for negative
1565         argument number.
1566
1567 2018-09-23  Tom Tromey  <tom@tromey.com>
1568
1569         PR python/14062:
1570         * python/python.c (gdbpy_run_events): Do not ignore exceptions.
1571
1572 2018-09-23  Tom Tromey  <tom@tromey.com>
1573
1574         PR python/18170:
1575         * python/py-value.c (valpy_int): Allow conversion from pointer
1576         type.
1577
1578 2018-09-23  Tom Tromey  <tom@tromey.com>
1579
1580         PR python/20126:
1581         * python/py-value.c (valpy_int): Respect type sign.
1582
1583 2018-09-23  Tom Tromey  <tom@tromey.com>
1584
1585         PR python/18352;
1586         * python/py-value.c (valpy_float): Allow conversions from int or
1587         char.
1588         (valpy_int, valpy_long): Allow conversions from float.
1589
1590 2018-09-23  Tom Tromey  <tom@tromey.com>
1591
1592         * ctf.c (ctf_start): Use gdb_fopen_cloexec.
1593         * common/scoped_mmap.c (mmap_file): Use gdb_open_cloexec.
1594
1595 2018-09-23  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1596
1597         * amd64-sol2-tdep.c (amd64_sol2_sigtramp_p): Also recognize
1598         __sighndlr.
1599         * i386-sol2-tdep.c (i386_sol2_sigtramp_p): Likewise.
1600
1601 2018-08-02  Jon Turney  <jon.turney@dronecode.org.uk>
1602
1603         * windows-nat.c (windows_nat_target::wait): Remove a spurious
1604         target_terminal::ours().
1605
1606 2018-09-23  Simon Marchi  <simon.marchi@ericsson.com>
1607
1608         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): Change type
1609         of vl to ULONGEST.
1610
1611 2018-09-21  Yacov Simhony  <ysimhony@gmail.com>
1612
1613         * breakpoint.c (update_inserted_breakpoint_locations): Remove
1614         redundant condition.
1615
1616 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1617
1618         * proc-utils.h (PROC_CTL_WORD_TYPE): Remove.
1619
1620         * procfs.c: Don't check for PR_MODEL_NATIVE definition.
1621         * sparc-sol2-nat.c: Likewise.  Remove Linux, __arch64__ references.
1622         * sol-thread.c (ps_pdmodel): Don't guard definition.
1623
1624         * procfs.c: Fix formatting.
1625
1626         * procfs.c (sysset_t_alloc): Remove.
1627         (create_procinfo): Use XNEW instead of sysset_t_alloc.
1628         (procfs_debug_inferior): Likewise.
1629         (procfs_set_exec_trap): Likewise.
1630         (proc_set_traced_sysentry): Don't allocate argp dynamically.
1631         (proc_set_traced_sysexit): Likewise.
1632
1633         * procfs.c (create_procinfo): Use xsnprintf to fix ARI warning.
1634         (dead_procinfo): Likewise.
1635         (proc_warn): Likewise.
1636         (proc_error): Likewise.
1637         (proc_get_LDT_entry): Likewise.
1638         (do_attach): Likewise.
1639         (procfs_target::pid_to_str): Likewise.
1640         (iterate_over_mappings): Likewise.
1641
1642         * procfs.c (create_procinfo): Fix ARI warning.
1643         (proc_get_status): Likewise.
1644         (proc_stop_process): Likewise.
1645         (proc_run_process): Likewise.
1646         (proc_kill): Likewise.
1647         (proc_get_LDT_entry): Likewise.
1648         (procfs_find_LDT_entry): Likewise.
1649         (proc_update_threads): Likewise.
1650         (proc_iterate_over_threads): Likewise.
1651         (do_attach): Likewise.
1652         (procfs_xfer_memory): Likewise.
1653         (invalidate_cache): Likewise.
1654         (procfs_target::resume): Likewise.
1655         (procfs_init_inferior): Likewise.
1656         (procfs_set_exec_trap): Likewise.
1657         (procfs_target::thread_alive): Likewise.
1658         (procfs_target::pid_to_exec_file): Likewise.
1659         (iterate_over_mappings): Likewise.
1660         (procfs_target::make_corefile_notes): Likewise.
1661         * sol-thread.c (sol_thread_target::thread_alive): Likewise.
1662
1663         * procfs.c (procfs_find_LDT_entry): Silence ARI warning.
1664         (procfs_find_LDT_entry): Likewise.
1665         * sol-thread.c (ps_lgetLDT): Likewise.
1666
1667 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1668
1669         PR tdep/17903
1670         * procfs.c (procfs_target): Declare pid_to_exec_file.
1671         (procfs_target::pid_to_exec_file): New.
1672
1673 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1674
1675         * auxv.c (default_print_auxv_entry): Reflect AT_SUN_CAP_HW1
1676         renaming.
1677         Handle AT_SUN_EMULATOR, AT_SUN_BRANDNAME, AT_SUN_BRAND_AUX1,
1678         AT_SUN_BRAND_AUX2, AT_SUN_BRAND_AUX3, AT_SUN_CAP_HW2.
1679
1680 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1681
1682         * i386-v4-nat.c (regmap, supply_gregset, fill_gregset)
1683         (supply_fpregset, fill_fpregset): Move ...
1684         * i386-sol2-nat.c [PR_MODEL_NATIVE != PR_MODEL_LP64]: ... here.
1685         Remove HAVE_GREGSET_T, HAVE_FPREGET_T guards.
1686         Remove references to ioctl-based procfs.
1687         Include <sys/reg.h>.
1688         Remove PR_MODEL_NATIVE guards.
1689         * configure.nat <sol2, i386> (NATDEPFILES): Remove i386-v4-nat.o.
1690         * Makefile.in (ALLDEPFILES): Remove i386-v4-nat.c.
1691
1692 2018-09-19  Xavier Roirand  <roirand@adacore.com>
1693
1694         PR gdb/20981:
1695         * solib-darwin.c (darwin_get_dyld_bfd): New function.
1696         (darwin_solib_get_all_image_info_addr_at_init): Update call.
1697         (darwin_solib_create_inferior_hook): Handle unrelocated dyld.
1698
1699 2018-09-19  John Baldwin  <jhb@FreeBSD.org>
1700
1701         * fbsd-tdep.c (fbsd_print_sockaddr_in): Style fix.
1702         (fbsd_print_sockaddr_in6): Likewise.
1703
1704 2018-09-19  Richard Bunt  <richard.bunt@arm.com>
1705             Chris January  <chris.january@arm.com>
1706
1707         * eval.c (skip_undetermined_arglist): Skip argument list helper.
1708         (evaluate_subexp_standard): Return a dummy type when
1709         honoring EVAL_SKIP in OP_VAR_VALUE and handle skipping in the
1710         OP_F77_UNDETERMINED_ARGLIST case.
1711         * expression.h (enum noside): Update comment.
1712
1713 2018-09-19  George Vasick <george.vasick@oracle.com>
1714
1715         * solib-svr4.c (svr4_same_1): Also handle amd64 ld.so.1.
1716
1717 2018-09-19  Stefan Teleman <stefan.teleman@oracle.com>
1718             April Chin <april.chin@oracle.com>
1719             Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1720
1721         * procfs.c (MAX_PROC_NAME_SIZE): Allow for 6-digit PID_MAX and
1722         uint_t lwpid_t.
1723         (create_procinfo): Print pids in /proc without leading zeros.
1724
1725 2018-09-18  Sandra Loosemore  <sandra@codesourcery.com>
1726
1727         * nios2-tdep.c (nios2_gcc_target_options): New.
1728         (nios2_gdb_arch_init): Install new hook.
1729
1730 2018-09-18  Simon Marchi  <simon.marchi@ericsson.com>
1731
1732         * patches/0001-Fix-PR-gdb-23558-Use-system-s-getcwd-when-cross-comp.patch:
1733         New file.
1734         * update-gnulib.sh: Apply patch.
1735         * configure: Re-generate.
1736
1737 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1738
1739         * infcmd.c (_initialize_infcmd): Remove "running" from "info proc"
1740         description.  Make "info proc" command descriptions more
1741         consistent.
1742
1743 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1744
1745         * NEWS: Mention 'info proc files' command.
1746
1747 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1748
1749         * fbsd-nat.c (fbsd_nat_target::info_proc): List open file
1750         descriptors for IP_FILES and IP_ALL.
1751
1752 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1753
1754         * fbsd-tdep.c (KF_FLAGS, KF_OFFSET, KF_VNODE_TYPE, KF_SOCK_DOMAIN)
1755         (KF_SOCK_TYPE, KF_SOCK_PROTOCOL, KF_SA_LOCAL, KF_SA_PEER)
1756         (KINFO_FILE_TYPE_SOCKET, KINFO_FILE_TYPE_PIPE)
1757         (KINFO_FILE_TYPE_FIFO, KINFO_FILE_TYPE_KQUEUE)
1758         (KINFO_FILE_TYPE_CRYPTO, KINFO_FILE_TYPE_MQUEUE)
1759         (KINFO_FILE_TYPE_SHM, KINFO_FILE_TYPE_SEM, KINFO_FILE_TYPE_PTS)
1760         (KINFO_FILE_TYPE_PROCDESC, KINFO_FILE_FD_TYPE_ROOT)
1761         (KINFO_FILE_FD_TYPE_JAIL, KINFO_FILE_FD_TYPE_TRACE)
1762         (KINFO_FILE_FD_TYPE_CTTY, KINFO_FILE_FLAG_READ)
1763         (KINFO_FILE_FLAG_WRITE, KINFO_FILE_FLAG_APPEND)
1764         (KINFO_FILE_FLAG_ASYNC, KINFO_FILE_FLAG_FSYNC)
1765         (KINFO_FILE_FLAG_NONBLOCK, KINFO_FILE_FLAG_DIRECT)
1766         (KINFO_FILE_FLAG_HASLOCK, KINFO_FILE_FLAG_EXEC)
1767         (KINFO_FILE_VTYPE_VREG, KINFO_FILE_VTYPE_VDIR)
1768         (KINFO_FILE_VTYPE_VCHR, KINFO_FILE_VTYPE_VLNK)
1769         (KINFO_FILE_VTYPE_VSOCK, KINFO_FILE_VTYPE_VFIFO, FBSD_AF_UNIX)
1770         (FBSD_AF_INET, FBSD_AF_INET6, FBSD_SOCK_STREAM, FBSD_SOCK_DGRAM)
1771         (FBSD_SOCK_SEQPACKET, FBSD_IPPROTO_ICMP, FBSD_IPPROTO_TCP)
1772         (FBSD_IPPROTO_UDP, FBSD_IPPROTO_SCTP): New defines.
1773         (struct fbsd_sockaddr_in, struct fbsd_sockaddr_in6)
1774         (struct fbsd_sockaddr_un): New types.
1775         (fbsd_file_fd, fbsd_file_type, fbsd_file_flags, fbsd_ipproto)
1776         (fbsd_print_sockaddr_in, fbsd_print_sockaddr_in6)
1777         (fbsd_info_proc_files_header, fbsd_info_proc_files_entry)
1778         (fbsd_core_info_proc_files): New functions.
1779         (fbsd_core_info_proc): List open file descriptors for IP_FILES and
1780         IP_ALL.
1781         * fbsd-tdep.h (fbsd_info_proc_files_header)
1782         (fbsd_info_proc_files_entry): New.
1783
1784 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1785
1786         * defs.h (enum info_proc_what) [IP_FILES]: New value.
1787         * infcmd.c (info_proc_cmd_files): New function.
1788         (_initialize_infcmd): Register 'info proc files' command.
1789
1790 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1791
1792         * gnulib/aclocal-m4-deps.mk: Re-generate.
1793         * gnulib/aclocal.m4: Re-generate.
1794         * gnulib/config.in: Re-generate.
1795         * gnulib/configure: Re-generate.
1796         * gnulib/import/Makefile.am: Re-generate.
1797         * gnulib/import/Makefile.in: Re-generate.
1798         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
1799         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1800         * gnulib/import/arpa_inet.in.h: New file.
1801         * gnulib/import/inet_ntop.c: New file.
1802         * gnulib/import/m4/arpa_inet_h.m4: New file.
1803         * gnulib/import/m4/inet_ntop.m4: New file.
1804         * gnulib/import/m4/netinet_in_h.m4: New file.
1805         * gnulib/import/m4/socklen.m4: New file.
1806         * gnulib/import/m4/sockpfaf.m4: New file.
1807         * gnulib/import/m4/stdalign.m4: New file.
1808         * gnulib/import/m4/sys_uio_h.m4: New file.
1809         * gnulib/import/netinet_in.in.h: New file.
1810         * gnulib/import/stdalign.in.h: New file.
1811         * gnulib/import/sys_socket.c: New file.
1812         * gnulib/import/sys_socket.in.h: New file.
1813         * gnulib/import/sys_uio.in.h: New file.
1814         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add inet_ntop
1815         module.
1816
1817 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1818
1819         * gnulib/aclocal-m4-deps.mk: New file.
1820         * gnulib/update-gnulib.sh: Generate "aclocal-m4-deps.mk"
1821         deterministically.
1822
1823 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1824
1825         * fbsd-tdep.c (fbsd_core_vnode_path): Use KF_PATH instead of
1826         KVE_PATH.
1827
1828 2018-09-18  Tom Tromey  <tom@tromey.com>
1829
1830         * compile/compile-object-load.c (struct
1831         link_hash_table_cleanup_data): Add constructor and destructor.
1832         Use DISABLE_COPY_AND_ASSIGN.
1833         (~link_hash_table_cleanup_data): Rename from
1834         link_hash_table_free.  Now a destructor.
1835         (copy_sections): Use gdb::unique_xmalloc_ptr.  Remove cleanups.
1836
1837 2018-09-18  Tom Tromey  <tom@tromey.com>
1838
1839         * compile/compile-object-run.c (do_module_cleanup): Use delete.
1840         * compile/compile-object-load.c (struct munmap_list): Move to
1841         header file.
1842         (munmap_list::add): Rename from munmap_list_add; rewrite.
1843         (munmap_list::~munmap_list): Rename from munmap_list_free.
1844         (munmap_listp_free_cleanup): Remove.
1845         (compile_object_load): Update.
1846         * compile/compile-object-load.h (struct munmap_list): Move from
1847         compile-object-load.c.  Rewrite.
1848
1849 2018-09-18  Alan Hayward  <alan.hayward@arm.com>
1850
1851         * aarch64-tdep.c (pass_in_v): Use register size.
1852         (aarch64_extract_return_value): Likewise.
1853         (aarch64_store_return_value): Likewise.
1854
1855 2018-09-18  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1856
1857         * utils.c (dump_core) [HAVE_SETRLIMIT]: Cast RLIM_INFINITY to
1858         rlim_t.
1859
1860 2018-09-17  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1861
1862         * python/lib/gdb/command/frame_filters.py (EnableFrameFilter):
1863         Fix short help line.
1864
1865 2018-09-17  Tom Tromey  <tom@tromey.com>
1866
1867         PR python/20445:
1868         * configure: Rebuild.
1869         * configure.ac: Conditionally use -DNDEBUG for Python.
1870
1871 2018-09-17  Tom Tromey  <tom@tromey.com>
1872
1873         * configure: Rebuild.
1874         * configure.ac: Use gmp as a library dependency when checking for
1875         mpfr.
1876
1877 2018-09-17  Pedro Alves  <palves@redhat.com>
1878
1879         * python/py-inferior.c (find_inferior_object): Delete.
1880
1881 2018-09-17  Simon Marchi  <simon.marchi@ericsson.com>
1882
1883         * compile/compile-cplus-types.c
1884         (compile_cplus_instance::enter_scope): Don't use new_scope after
1885         std::move.
1886
1887 2018-09-17  Tom Tromey  <tom@tromey.com>
1888
1889         * common/pathstuff.c (get_standard_cache_dir): Use
1890         ~/Library/Caches on macOS.
1891         * common/pathstuff.h (get_standard_cache_dir): Update comment.
1892
1893 2018-09-17  Simon Marchi  <simon.marchi@polymtl.ca>
1894
1895         PR python/23669
1896         * breakpoint.c (commands_cmd_element): New.
1897         (_initialize_breakpoint): Assign commands_cmd_element.
1898         * breakpoint.h (commands_cmd_element): New.
1899         * cli/cli-script.c (while_cmd_element, if_command,
1900         define_cmd_element): New.
1901         (command_name_equals): Remove.
1902         (process_next_line): Compare commands by pointer, not by name.
1903         (_initialize_cli_script): Assign the various cmd_list_element
1904         variables.
1905         * compile/compile.c (compile_cmd_element): New.
1906         (_initialize_compile): Assign compile_cmd_element.
1907         * compile/compile.h (compile_cmd_element): New.
1908         * guile/guile.c (guile_cmd_element): New.
1909         (install_gdb_commands): Assign guile_cmd_element.
1910         * guile/guile.h (guile_cmd_element): New.
1911         * python/python.c (python_cmd_element): New.
1912         (_initialize_python): Assign python_cmd_element.
1913         * python/python.h (python_cmd_element): New.
1914         * tracepoint.c (while_stepping_cmd_element): New.
1915         (_initialize_tracepoint): Assign while_stepping_cmd_element.
1916         * tracepoint.h (while_stepping_cmd_element): New.
1917
1918 2018-09-17  Tom Tromey  <tom@tromey.com>
1919
1920         * infrun.c (save_infcall_suspend_state): Return
1921         infcall_suspend_state_up.
1922         (save_infcall_control_state): Return infcall_control_state_up.
1923         * inferior.h (save_infcall_suspend_state)
1924         (save_infcall_control_state): Declare later.  Return unique
1925         pointers.
1926
1927 2018-09-17  Tom Tromey  <tom@tromey.com>
1928
1929         * infrun.c (struct stop_context): Declare constructor,
1930         destructor, "changed" method.
1931         (stop_context::stop_context): Rename from save_stop_context.
1932         (stop_context::~stop_context): Rename from
1933         release_stop_context_cleanup.
1934         (normal_stop): Update.
1935         (stop_context::changed): Rename from stop_context_changed.  Return
1936         bool.
1937
1938 2018-09-17  Tom Tromey  <tom@tromey.com>
1939
1940         * inferior.h (struct infcall_suspend_state_deleter): New.
1941         (infcall_suspend_state_up): New typedef.
1942         (struct infcall_control_state_deleter): New.
1943         (infcall_control_state_up): New typedef.
1944         (make_cleanup_restore_infcall_suspend_state)
1945         (make_cleanup_restore_infcall_control_state): Don't declare.
1946         * infcall.c (call_function_by_hand_dummy): Update.
1947         * infrun.c (do_restore_infcall_suspend_state_cleanup)
1948         (make_cleanup_restore_infcall_suspend_state): Remove.
1949         (do_restore_infcall_control_state_cleanup)
1950         (make_cleanup_restore_infcall_control_state): Remove.
1951
1952 2018-09-17  Tom Tromey  <tom@tromey.com>
1953
1954         * gdbthread.h (struct thread_control_state): Add initializer.
1955         (class thread_info) <control>: Remove initializer.
1956         * inferior.h (struct inferior_control_state): Add initializer.
1957         (class inferior) <control>: Remove initializer.
1958         (exit_inferior_1): Update.
1959         * infrun.c (struct infcall_control_state): Add constructors.
1960         (save_infcall_control_state): Use new.
1961         (restore_infcall_control_state, discard_infcall_control_state):
1962         Use delete.
1963
1964 2018-09-17  Tom Tromey  <tom@tromey.com>
1965
1966         * infrun.c (struct infcall_suspend_state) <registers>: Now a
1967         unique_ptr.
1968         <siginfo_data>: Now a unique_xmalloc_ptr.
1969         (save_infcall_suspend_state, restore_infcall_suspend_state)
1970         (discard_infcall_suspend_state)
1971         (get_infcall_suspend_state_regcache): Update.
1972
1973 2018-09-17  Tom Tromey  <tom@tromey.com>
1974
1975         * gdbthread.h (struct thread_suspend_state): Add initializers.
1976         (class thread_info) <suspend>: Remove initializer.
1977         * infrun.c (struct infcall_suspend_state): Add initializers.
1978         (save_infcall_suspend_state): Use new.
1979         (discard_infcall_suspend_state): Use delete.
1980
1981 2018-09-16  Tom Tromey  <tom@tromey.com>
1982
1983         * python/python-internal.h (CPYCHECKER_STEALS_REFERENCE_TO_ARG):
1984         Remove.
1985         * python/py-varobj.c (py_varobj_iter_ctor): Change pyiter to
1986         rvalue reference.  Remove CPYCHECKER_STEALS_REFERENCE_TO_ARG.
1987         (py_varobj_iter_new): Likewise.
1988         (py_varobj_get_iterator): Use gdbpy_ref.
1989
1990 2018-09-16  Tom Tromey  <tom@tromey.com>
1991
1992         * python/py-threadevent.c (py_get_event_thread): Simplify.
1993         * python/py-inferior.c (infpy_thread_from_thread_handle):
1994         Return immediately after calling thread_to_thread_object.  Use
1995         Py_RETURN_NONE.
1996         (thread_to_thread_object): Set the exception on a NULL return.
1997
1998 2018-09-16  Simon Marchi  <simon.marchi@polymtl.ca>
1999
2000         * Makefile.in (LIBGDB_OBS): Sort COMMON_OBS.
2001
2002 2018-09-16  Tom Tromey  <tom@tromey.com>
2003
2004         * python/python-internal.h (CPYCHECKER_RETURNS_BORROWED_REF):
2005         Remove.
2006
2007 2018-09-16  Tom Tromey  <tom@tromey.com>
2008
2009         * python/python-internal.h (thread_to_thread_object): Change
2010         return type.
2011         * python/py-inferior.c (thread_to_thread_object): Return a new
2012         reference.
2013         (infpy_thread_from_thread_handle): Update.
2014         * python/py-infthread.c (gdbpy_selected_thread): Update.
2015         * python/py-stopevent.c (create_stop_event_object): Update.
2016         * python/py-threadevent.c (py_get_event_thread): Return a new
2017         reference.
2018         (py_get_event_thread): Update.
2019         * python/py-event.h (py_get_event_thread): Change return type.
2020         * python/py-continueevent.c (create_continue_event_object):
2021         Update.
2022
2023 2018-09-16  Tom Tromey  <tom@tromey.com>
2024
2025         * python/py-progspace.c (pspy_get_objfiles): Update.
2026         * python/python-internal.h (objfile_to_objfile_object): Change
2027         return type.
2028         * python/py-newobjfileevent.c (create_new_objfile_event_object):
2029         Update.
2030         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
2031         Update.
2032         * python/python.c (gdbpy_get_current_objfile): Update.
2033         (gdbpy_objfiles): Update.
2034         * python/py-objfile.c (objfpy_get_owner, gdbpy_lookup_objfile):
2035         Update.
2036         (objfile_to_objfile_object): Return a new reference.
2037         * python/py-symtab.c (stpy_get_objfile): Update.
2038         * python/py-prettyprint.c (find_pretty_printer_from_objfiles):
2039         Update.
2040
2041 2018-09-16  Tom Tromey  <tom@tromey.com>
2042
2043         * python/py-inferior.c (infpy_get_progspace): Update.
2044         * python/python-internal.h (pspace_to_pspace_object): Change
2045         return type.
2046         * python/py-newobjfileevent.c
2047         (create_clear_objfiles_event_object): Update.
2048         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
2049         Update.
2050         * python/python.c (gdbpy_get_current_progspace): Update.
2051         (gdbpy_progspaces): Update.
2052         * python/py-progspace.c (pspace_to_pspace_object): Return a new
2053         reference.
2054         * python/py-objfile.c (objfpy_get_progspace): Update.
2055         * python/py-prettyprint.c (find_pretty_printer_from_progspace):
2056         Update.
2057
2058 2018-09-16  Tom Tromey  <tom@tromey.com>
2059
2060         * python/lib/gdb/__init__.py (current_progspace, objfiles)
2061         (solib_name, block_for_pc, find_pc_line): New functions.
2062         (execute_unwinders): Update.
2063         * python/py-block.c (gdbpy_block_for_pc): Remove.
2064         * python/py-inferior.c (infpy_get_progspace): New function.
2065         (inferior_object_getset) <progspace>: Add.
2066         * python/py-progspace.c (pspy_objfiles): Rewrite.
2067         (pspy_solib_name, pspy_block_for_pc)
2068         (pspy_find_pc_line, pspy_is_valid): New functions.
2069         (progspace_object_methods): Add entries for solib_name,
2070         block_for_pc, find_pc_line, is_valid.
2071         * python/python-internal.h (gdbpy_block_for_pc)
2072         (build_objfiles_list): Don't declare.
2073         * python/python.c: Don't include solib.h.
2074         (gdbpy_solib_name, gdbpy_find_pc_line)
2075         (gdbpy_get_current_progspace, build_objfiles_list)
2076         (gdbpy_objfiles): Remove.
2077         (GdbMethods) <current_progspace, objfiles, block_for_pc,
2078         solib_name, find_pc_line>: Remove entries.
2079
2080 2018-09-16  Tom Tromey  <tom@tromey.com>
2081
2082         * top.c (new_ui_command): Use GNU style for metasyntactic
2083         variables.
2084         * breakpoint.c (stopat_command): Use GNU style for metasyntactic
2085         variables.
2086         * maint.c (maintenance_translate_address): Remove "<>" around
2087         text.
2088         * interps.c (interpreter_exec_cmd): Use GNU style for
2089         metasyntactic variables.
2090         * nto-procfs.c (nto_procfs_target_info): Use GNU style for
2091         metasyntactic variables.
2092         * tracepoint.c (tfind_range_command): Use GNU style for
2093         metasyntactic variables.
2094         (tfind_outside_command): Likewise.
2095         (_initialize_tracepoint): Likewise.
2096         * remote.c (extended_remote_target::create_inferior): Use GNU
2097         style for metasyntactic variables.
2098         * sparc64-tdep.c (adi_examine_command): Use GNU style for
2099         metasyntactic variables.
2100         (adi_assign_command): Likewise.
2101
2102 2018-09-16  Tom Tromey  <tom@tromey.com>
2103
2104         * disasm.c (show_disassembler_options_sfunc): Use GNU style for
2105         metasyntactic variables.  Print message if no disassembler options
2106         are available.
2107
2108 2018-09-15  Tom Tromey  <tom@tromey.com>
2109
2110         * infcmd.c (get_inferior_args): Return const char *.
2111         * inferior.h (get_inferior_args): Return type now const.
2112         * linux-tdep.c (linux_fill_prpsinfo): Update.
2113         * procfs.c (procfs_target::make_corefile_notes): Update.
2114
2115 2018-09-07  Tom Tromey  <tom@tromey.com>
2116
2117         * python/python.c (execute_gdb_command): Call bpstat_do_actions
2118         inside the TRY.
2119
2120 2018-09-14  Sandra Loosemore  <sandra@codesourcery.com>
2121
2122         * nios2-tdep.c (nios2_type_align): New.
2123         (nios2_gdb_arch_init): Install type_align hook.
2124
2125 2018-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
2126
2127         * eval.c (fake_method::fake_method): Call xzalloc directly for a
2128         type that is neither object file owned, nor gdbarch owned.
2129         * gdbtypes.c (get_type_gdbarch): Add an assert that returned
2130         gdbarch is non-NULL.
2131         (alloc_type_instance): Allocate non-objfile owned types on the
2132         gdbarch obstack.
2133         (copy_type_recursive): Allocate TYPE_FIELDS and TYPE_RANGE_DATA
2134         using TYPE_ALLOC to ensure memory is allocated on the correct
2135         obstack.
2136         * gdbtypes.h (TYPE_ALLOC): Allocate space on either the objfile
2137         obstack, or the gdbarch obstack.
2138         (TYPE_ZALLOC): Rewrite using TYPE_ALLOC.
2139
2140 2018-09-14  Tom Tromey  <tom@tromey.com>
2141
2142         * infcall.c (call_function_by_hand_dummy): Remove unnecessary
2143         block.
2144
2145 2018-09-14  Tom Tromey  <tom@tromey.com>
2146
2147         * nat/fork-inferior.c (get_startup_shell): Remove "static".
2148
2149 2018-09-13  Tom Tromey  <tom@tromey.com>
2150
2151         * python/py-inferior.c (infpy_thread_from_thread_handle): Now
2152         static.
2153
2154 2018-09-13  Tom Tromey  <tom@tromey.com>
2155
2156         * exec.c (try_open_exec_file): Use std::string.
2157
2158 2018-09-13  Tom Tromey  <tom@tromey.com>
2159
2160         * utils.h (gdb_bfd_errmsg): Return std::string.
2161         * exec.c (exec_file_attach): Update.
2162         * compile/compile-object-load.c (compile_object_load): Update.
2163         * utils.c (gdb_bfd_errmsg): Return std::string.
2164
2165 2018-09-13  Tom Tromey  <tom@tromey.com>
2166
2167         * procfs.c (struct procinfo_deleter): New.
2168         (procinfo_up): New typedef.
2169         (do_destroy_procinfo_cleanup): Remove.
2170         (procfs_target::info_proc): Use procinfo_up.  Remove cleanups.
2171
2172 2018-09-13  Tom Tromey  <tom@tromey.com>
2173
2174         * source.c (add_path): Use gdb::unique_xmalloc_ptr.
2175
2176 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
2177 2018-09-13  Tom Tromey  <tom@tromey.com>
2178
2179         * python/py-progspace.c (PSPY_REQUIRE_VALID): New macro.
2180         (pspy_get_objfiles): New function.
2181         (progspace_object_methods): New.
2182         (pspace_object_type): Add tp_methods callback.
2183         * python/python-internal.h (build_objfiles_list): New
2184         declaration.
2185         * python/python.c (build_objfiles_list): New function.
2186         (gdbpy_objfiles): Implement using build_objfiles_list.
2187         * NEWS: Mention the Progspace.objfiles method.
2188
2189 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
2190
2191         * python/py-inferior.c (infpy_get_progspace): New function.
2192         (inferior_object_getset): Add progspace property.
2193         * NEWS: Mention the new property.
2194
2195 2018-09-13  Tom Tromey  <tom@tromey.com>
2196
2197         PR rust/23650:
2198         * rust-lang.c (rust_evaluate_subexp): Use field name, not "foo".
2199
2200 2018-09-13  Tom Tromey  <tom@tromey.com>
2201
2202         PR rust/23626:
2203         * rust-lang.c (rust_enum_variant): Now static.
2204         (rust_empty_enum_p): New function.
2205         (rust_print_enum, rust_evaluate_subexp, rust_print_struct_def):
2206         Handle empty enum.
2207
2208 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
2209
2210         * python/py-inferior.c (infpy_repr): New.
2211         (inferior_object_type): Register infpy_repr.
2212         * python/py-objfile.c (objfpy_repr): New.
2213         (objfile_object_type): Register objfpy_repr.
2214
2215 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
2216
2217         * fbsd-nat.c (fbsd_nat_target::info_proc): Remove unused variable.
2218
2219 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
2220
2221         * aarch64-fbsd-tdep.h (AARCH64_FBSD_SIZEOF_GREGSET): Fix comment
2222         typo.
2223
2224 2018-09-12  Sergio Durigan Junior  <sergiodj@redhat.com>
2225
2226         * common/common-utils.c: Don't include '<sys/stat.h>'.
2227         (is_regular_file): Move to...
2228         * common/filestuff.c (is_regular_file): ... here.
2229         * common/common-utils.h (is_regular_file): Move to...
2230         * common/filestuff.h (is_regular_file): ... here.
2231
2232 2018-09-12  Simon Marchi  <simon.marchi@ericsson.com>
2233
2234         * skip.c (debug_skip): New variable.
2235         (skiplist_entry::do_skip_file_p): Add debug output.
2236         (skiplist_entry::do_skip_gfile_p): Likewise.
2237         (skiplist_entry::skip_function_p): Likewise.
2238         (_initialize_step_skip): Create debug command.
2239         * NEWS: Mention set/show debug skip.
2240
2241 2018-09-11  Xavier Roirand  <roirand@adacore.com>
2242
2243         * darwin-nat.c (should_disable_startup_with_shell):
2244         New function.
2245         (darwin_nat_target::create_inferior): Add call.
2246
2247 2018-09-11  Xavier Roirand  <roirand@adacore.com>
2248
2249         * darwin-nat.h (struct darwin_thread_info) <gdb_port,
2250         inf_port, msg_state>: Initialize.
2251         (struct darwin_thread_info) <signaled, single_step>: Change
2252         type and initialize.
2253         (struct darwin_thread_info) <event>: Initialize.
2254
2255 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
2256
2257         PR gdb/23555
2258         PR gdb/23558
2259         * gnulib/import/m4/getcwd-path-max.m4: Add cross-compilation
2260         guesses.
2261
2262 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
2263
2264         Revert:
2265         2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
2266
2267         PR gdb/23555
2268         PR gdb/23558
2269         * gnulib/aclocal.m4: Regenerate.
2270         * gnulib/config.in: Regenerate.
2271         * gnulib/configure: Regenerate.
2272         * gnulib/import/Makefile.am: Update.
2273         * gnulib/import/Makefile.in: Update.
2274         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
2275         * gnulib/import/_Noreturn.h: ... this.
2276         * gnulib/import/alloca.in.h: Update.
2277         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
2278         * gnulib/import/arg-nonnull.h: ... this.
2279         * gnulib/import/assure.h: Update.
2280         * gnulib/import/at-func.c: Update.
2281         * gnulib/import/basename-lgpl.c: Update.
2282         * gnulib/import/extra/snippet/c++defs.h: Rename to...
2283         * gnulib/import/c++defs.h: ... this.
2284         * gnulib/import/canonicalize-lgpl.c: Update.
2285         * gnulib/import/cdefs.h: Update.
2286         * gnulib/import/chdir-long.c: Update.
2287         * gnulib/import/chdir-long.h: Update.
2288         * gnulib/import/cloexec.c: Update.
2289         * gnulib/import/cloexec.h: Update.
2290         * gnulib/import/close.c: Update.
2291         * gnulib/import/closedir.c: Update.
2292         * gnulib/import/config.charset: Update.
2293         * gnulib/import/dirent-private.h: Update.
2294         * gnulib/import/dirent.in.h: Update.
2295         * gnulib/import/dirfd.c: Update.
2296         * gnulib/import/dirname-lgpl.c: Update.
2297         * gnulib/import/dirname.h: Update.
2298         * gnulib/import/dosname.h: Update.
2299         * gnulib/import/dup-safer-flag.c: Update.
2300         * gnulib/import/dup-safer.c: Update.
2301         * gnulib/import/dup.c: Update.
2302         * gnulib/import/dup2.c: Update.
2303         * gnulib/import/errno.in.h: Update.
2304         * gnulib/import/error.c: Update.
2305         * gnulib/import/error.h: Update.
2306         * gnulib/import/exitfail.c: Update.
2307         * gnulib/import/exitfail.h: Update.
2308         * gnulib/import/extra/update-copyright: Update.
2309         * gnulib/import/fchdir.c: Update.
2310         * gnulib/import/fcntl.c: Update.
2311         * gnulib/import/fcntl.in.h: Update.
2312         * gnulib/import/fd-hook.c: Update.
2313         * gnulib/import/fd-hook.h: Update.
2314         * gnulib/import/fd-safer-flag.c: Update.
2315         * gnulib/import/fd-safer.c: Update.
2316         * gnulib/import/fdopendir.c: Update.
2317         * gnulib/import/filename.h: Update.
2318         * gnulib/import/filenamecat-lgpl.c: Update.
2319         * gnulib/import/filenamecat.h: Update.
2320         * gnulib/import/flexmember.h: Update.
2321         * gnulib/import/float+.h: Update.
2322         * gnulib/import/float.c: Update.
2323         * gnulib/import/float.in.h: Update.
2324         * gnulib/import/fnmatch.c: Update.
2325         * gnulib/import/fnmatch.in.h: Update.
2326         * gnulib/import/fnmatch_loop.c: Update.
2327         * gnulib/import/fpucw.h: Update.
2328         * gnulib/import/frexp.c: Update.
2329         * gnulib/import/frexpl.c: Update.
2330         * gnulib/import/fstat.c: Update.
2331         * gnulib/import/fstatat.c: Update.
2332         * gnulib/import/getcwd-lgpl.c: Update.
2333         * gnulib/import/getcwd.c: Update.
2334         * gnulib/import/getdtablesize.c: Update.
2335         * gnulib/import/getlogin_r.c: Update.
2336         * gnulib/import/getprogname.c: Update.
2337         * gnulib/import/getprogname.h: Update.
2338         * gnulib/import/gettext.h: Update.
2339         * gnulib/import/gettimeofday.c: Update.
2340         * gnulib/import/glob-libc.h: Update.
2341         * gnulib/import/glob.c: Update.
2342         * gnulib/import/glob.in.h: Update.
2343         * gnulib/import/glob_internal.h: Update.
2344         * gnulib/import/glob_pattern_p.c: Update.
2345         * gnulib/import/globfree.c: Update.
2346         * gnulib/import/hard-locale.c: Update.
2347         * gnulib/import/hard-locale.h: Update.
2348         * gnulib/import/intprops.h: Update.
2349         * gnulib/import/inttypes.in.h: Update.
2350         * gnulib/import/isnan.c: Update.
2351         * gnulib/import/isnand-nolibm.h: Update.
2352         * gnulib/import/isnand.c: Update.
2353         * gnulib/import/isnanl-nolibm.h: Update.
2354         * gnulib/import/isnanl.c: Update.
2355         * gnulib/import/itold.c: Update.
2356         * gnulib/import/libc-config.h: Update.
2357         * gnulib/import/limits.in.h: Update.
2358         * gnulib/import/localcharset.c: Update.
2359         * gnulib/import/localcharset.h: Update.
2360         * gnulib/import/localtime-buffer.c: Update.
2361         * gnulib/import/localtime-buffer.h: Update.
2362         * gnulib/import/lstat.c: Update.
2363         * gnulib/import/m4/00gnulib.m4: Update.
2364         * gnulib/import/m4/__inline.m4: Update.
2365         * gnulib/import/m4/absolute-header.m4: Update.
2366         * gnulib/import/m4/alloca.m4: Update.
2367         * gnulib/import/m4/builtin-expect.m4: Update.
2368         * gnulib/import/m4/canonicalize.m4: Update.
2369         * gnulib/import/m4/chdir-long.m4: Update.
2370         * gnulib/import/m4/close.m4: Update.
2371         * gnulib/import/m4/closedir.m4: Update.
2372         * gnulib/import/m4/configmake.m4: Update.
2373         * gnulib/import/m4/d-ino.m4: Update.
2374         * gnulib/import/m4/d-type.m4: Update.
2375         * gnulib/import/m4/dirent_h.m4: Update.
2376         * gnulib/import/m4/dirfd.m4: Update.
2377         * gnulib/import/m4/dirname.m4: Update.
2378         * gnulib/import/m4/double-slash-root.m4: Update.
2379         * gnulib/import/m4/dup.m4: Update.
2380         * gnulib/import/m4/dup2.m4: Update.
2381         * gnulib/import/m4/eealloc.m4: Update.
2382         * gnulib/import/m4/environ.m4: Update.
2383         * gnulib/import/m4/errno_h.m4: Update.
2384         * gnulib/import/m4/error.m4: Update.
2385         * gnulib/import/m4/exponentd.m4: Update.
2386         * gnulib/import/m4/exponentl.m4: Update.
2387         * gnulib/import/m4/extensions.m4: Update.
2388         * gnulib/import/m4/extern-inline.m4: Update.
2389         * gnulib/import/m4/fchdir.m4: Update.
2390         * gnulib/import/m4/fcntl-o.m4: Update.
2391         * gnulib/import/m4/fcntl.m4: Update.
2392         * gnulib/import/m4/fcntl_h.m4: Update.
2393         * gnulib/import/m4/fdopendir.m4: Update.
2394         * gnulib/import/m4/filenamecat.m4: Update.
2395         * gnulib/import/m4/flexmember.m4: Update.
2396         * gnulib/import/m4/float_h.m4: Update.
2397         * gnulib/import/m4/fnmatch.m4: Update.
2398         * gnulib/import/m4/fnmatch_h.m4: Update.
2399         * gnulib/import/m4/fpieee.m4: Update.
2400         * gnulib/import/m4/frexp.m4: Update.
2401         * gnulib/import/m4/frexpl.m4: Update.
2402         * gnulib/import/m4/fstat.m4: Update.
2403         * gnulib/import/m4/fstatat.m4: Update.
2404         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
2405         * gnulib/import/m4/getcwd-path-max.m4: Update.
2406         * gnulib/import/m4/getcwd.m4: Update.
2407         * gnulib/import/m4/getdtablesize.m4: Update.
2408         * gnulib/import/m4/getlogin.m4: Update.
2409         * gnulib/import/m4/getlogin_r.m4: Update.
2410         * gnulib/import/m4/getpagesize.m4: Update.
2411         * gnulib/import/m4/getprogname.m4: Update.
2412         * gnulib/import/m4/gettimeofday.m4: Update.
2413         * gnulib/import/m4/glibc21.m4: Update.
2414         * gnulib/import/m4/glob.m4: Update.
2415         * gnulib/import/m4/glob_h.m4: Update.
2416         * gnulib/import/m4/gnulib-cache.m4: Update.
2417         * gnulib/import/m4/gnulib-common.m4: Update.
2418         * gnulib/import/m4/gnulib-comp.m4: Update.
2419         * gnulib/import/m4/gnulib-tool.m4: Update.
2420         * gnulib/import/m4/hard-locale.m4: Update.
2421         * gnulib/import/m4/include_next.m4: Update.
2422         * gnulib/import/m4/inttypes-pri.m4: Update.
2423         * gnulib/import/m4/inttypes.m4: Update.
2424         * gnulib/import/m4/isnand.m4: Update.
2425         * gnulib/import/m4/isnanl.m4: Update.
2426         * gnulib/import/m4/largefile.m4: Update.
2427         * gnulib/import/m4/limits-h.m4: Update.
2428         * gnulib/import/m4/localcharset.m4: Update.
2429         * gnulib/import/m4/locale-fr.m4: Update.
2430         * gnulib/import/m4/locale-ja.m4: Update.
2431         * gnulib/import/m4/locale-zh.m4: Update.
2432         * gnulib/import/m4/localtime-buffer.m4: Update.
2433         * gnulib/import/m4/longlong.m4: Update.
2434         * gnulib/import/m4/lstat.m4: Update.
2435         * gnulib/import/m4/malloc.m4: Update.
2436         * gnulib/import/m4/malloca.m4: Update.
2437         * gnulib/import/m4/math_h.m4: Update.
2438         * gnulib/import/m4/mbrtowc.m4: Update.
2439         * gnulib/import/m4/mbsinit.m4: Update.
2440         * gnulib/import/m4/mbsrtowcs.m4: Update.
2441         * gnulib/import/m4/mbstate_t.m4: Update.
2442         * gnulib/import/m4/memchr.m4: Update.
2443         * gnulib/import/m4/memmem.m4: Update.
2444         * gnulib/import/m4/mempcpy.m4: Update.
2445         * gnulib/import/m4/memrchr.m4: Update.
2446         * gnulib/import/m4/mkdir.m4: Update.
2447         * gnulib/import/m4/mkstemp.m4: Update.
2448         * gnulib/import/m4/mmap-anon.m4: Update.
2449         * gnulib/import/m4/mode_t.m4: Update.
2450         * gnulib/import/m4/msvc-inval.m4: Update.
2451         * gnulib/import/m4/msvc-nothrow.m4: Update.
2452         * gnulib/import/m4/multiarch.m4: Update.
2453         * gnulib/import/m4/nocrash.m4: Update.
2454         * gnulib/import/m4/off_t.m4: Update.
2455         * gnulib/import/m4/onceonly.m4: Update.
2456         * gnulib/import/m4/open-cloexec.m4: Update.
2457         * gnulib/import/m4/open.m4: Update.
2458         * gnulib/import/m4/openat.m4: Update.
2459         * gnulib/import/m4/opendir.m4: Update.
2460         * gnulib/import/m4/pathmax.m4: Update.
2461         * gnulib/import/m4/rawmemchr.m4: Update.
2462         * gnulib/import/m4/readdir.m4: Update.
2463         * gnulib/import/m4/readlink.m4: Update.
2464         * gnulib/import/m4/realloc.m4: Update.
2465         * gnulib/import/m4/rename.m4: Update.
2466         * gnulib/import/m4/rewinddir.m4: Update.
2467         * gnulib/import/m4/rmdir.m4: Update.
2468         * gnulib/import/m4/save-cwd.m4: Update.
2469         * gnulib/import/m4/secure_getenv.m4: Update.
2470         * gnulib/import/m4/setenv.m4: Update.
2471         * gnulib/import/m4/signal_h.m4: Update.
2472         * gnulib/import/m4/ssize_t.m4: Update.
2473         * gnulib/import/m4/stat-time.m4: Update.
2474         * gnulib/import/m4/stat.m4: Update.
2475         * gnulib/import/m4/std-gnu11.m4: Update.
2476         * gnulib/import/m4/stdbool.m4: Update.
2477         * gnulib/import/m4/stddef_h.m4: Update.
2478         * gnulib/import/m4/stdint.m4: Update.
2479         * gnulib/import/m4/stdio_h.m4: Update.
2480         * gnulib/import/m4/stdlib_h.m4: Update.
2481         * gnulib/import/m4/strchrnul.m4: Update.
2482         * gnulib/import/m4/strdup.m4: Update.
2483         * gnulib/import/m4/strerror.m4: Update.
2484         * gnulib/import/m4/string_h.m4: Update.
2485         * gnulib/import/m4/strstr.m4: Update.
2486         * gnulib/import/m4/strtok_r.m4: Update.
2487         * gnulib/import/m4/sys_socket_h.m4: Update.
2488         * gnulib/import/m4/sys_stat_h.m4: Update.
2489         * gnulib/import/m4/sys_time_h.m4: Update.
2490         * gnulib/import/m4/sys_types_h.m4: Update.
2491         * gnulib/import/m4/tempname.m4: Update.
2492         * gnulib/import/m4/time_h.m4: Update.
2493         * gnulib/import/m4/unistd-safer.m4: Update.
2494         * gnulib/import/m4/unistd_h.m4: Update.
2495         * gnulib/import/m4/warn-on-use.m4: Update.
2496         * gnulib/import/m4/wchar_h.m4: Update.
2497         * gnulib/import/m4/wchar_t.m4: Update.
2498         * gnulib/import/m4/wctype_h.m4: Update.
2499         * gnulib/import/m4/wint_t.m4: Update.
2500         * gnulib/import/malloc.c: Update.
2501         * gnulib/import/malloc/scratch_buffer.h: Update.
2502         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
2503         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
2504         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
2505         * gnulib/import/malloca.c: Update.
2506         * gnulib/import/malloca.h: Update.
2507         * gnulib/import/malloca.valgrind: Update.
2508         * gnulib/import/math.in.h: Update.
2509         * gnulib/import/mbrtowc.c: Update.
2510         * gnulib/import/mbsinit.c: Update.
2511         * gnulib/import/mbsrtowcs-impl.h: Update.
2512         * gnulib/import/mbsrtowcs-state.c: Update.
2513         * gnulib/import/mbsrtowcs.c: Update.
2514         * gnulib/import/memchr.c: Update.
2515         * gnulib/import/memmem.c: Update.
2516         * gnulib/import/mempcpy.c: Update.
2517         * gnulib/import/memrchr.c: Update.
2518         * gnulib/import/mkdir.c: Update.
2519         * gnulib/import/mkstemp.c: Update.
2520         * gnulib/import/msvc-inval.c: Update.
2521         * gnulib/import/msvc-inval.h: Update.
2522         * gnulib/import/msvc-nothrow.c: Update.
2523         * gnulib/import/msvc-nothrow.h: Update.
2524         * gnulib/import/open.c: Update.
2525         * gnulib/import/openat-die.c: Update.
2526         * gnulib/import/openat-priv.h: Update.
2527         * gnulib/import/openat-proc.c: Update.
2528         * gnulib/import/openat.c: Update.
2529         * gnulib/import/openat.h: Update.
2530         * gnulib/import/opendir.c: Update.
2531         * gnulib/import/pathmax.h: Update.
2532         * gnulib/import/pipe-safer.c: Update.
2533         * gnulib/import/rawmemchr.c: Update.
2534         * gnulib/import/readdir.c: Update.
2535         * gnulib/import/readlink.c: Update.
2536         * gnulib/import/realloc.c: Update.
2537         * gnulib/import/ref-add.sin: Update.
2538         * gnulib/import/ref-del.sin: Update.
2539         * gnulib/import/rename.c: Update.
2540         * gnulib/import/rewinddir.c: Update.
2541         * gnulib/import/rmdir.c: Update.
2542         * gnulib/import/same-inode.h: Update.
2543         * gnulib/import/save-cwd.c: Update.
2544         * gnulib/import/save-cwd.h: Update.
2545         * gnulib/import/scratch_buffer.h: Update.
2546         * gnulib/import/secure_getenv.c: Update.
2547         * gnulib/import/setenv.c: Update.
2548         * gnulib/import/signal.in.h: Update.
2549         * gnulib/import/stat-time.c: Update.
2550         * gnulib/import/stat-time.h: Update.
2551         * gnulib/import/stat-w32.c: Update.
2552         * gnulib/import/stat-w32.h: Update.
2553         * gnulib/import/stat.c: Update.
2554         * gnulib/import/stdbool.in.h: Update.
2555         * gnulib/import/stddef.in.h: Update.
2556         * gnulib/import/stdint.in.h: Update.
2557         * gnulib/import/stdio.in.h: Update.
2558         * gnulib/import/stdlib.in.h: Update.
2559         * gnulib/import/str-two-way.h: Update.
2560         * gnulib/import/strchrnul.c: Update.
2561         * gnulib/import/strdup.c: Update.
2562         * gnulib/import/streq.h: Update.
2563         * gnulib/import/strerror-override.c: Update.
2564         * gnulib/import/strerror-override.h: Update.
2565         * gnulib/import/strerror.c: Update.
2566         * gnulib/import/string.in.h: Update.
2567         * gnulib/import/stripslash.c: Update.
2568         * gnulib/import/strnlen1.c: Update.
2569         * gnulib/import/strnlen1.h: Update.
2570         * gnulib/import/strstr.c: Update.
2571         * gnulib/import/strtok_r.c: Update.
2572         * gnulib/import/sys_stat.in.h: Update.
2573         * gnulib/import/sys_time.in.h: Update.
2574         * gnulib/import/sys_types.in.h: Update.
2575         * gnulib/import/tempname.c: Update.
2576         * gnulib/import/tempname.h: Update.
2577         * gnulib/import/time.in.h: Update.
2578         * gnulib/import/unistd--.h: Update.
2579         * gnulib/import/unistd-safer.h: Update.
2580         * gnulib/import/unistd.in.h: Update.
2581         * gnulib/import/unsetenv.c: Update.
2582         * gnulib/import/verify.h: Update.
2583         * gnulib/import/extra/snippet/warn-on-use.h: Update.
2584         * gnulib/import/wchar.in.h: Update.
2585         * gnulib/import/wctype.in.h: Update.
2586         * gnulib/import/xalloc-oversized.h: Update.
2587         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
2588         "53e2c179f26a890fa6685af4b6c1397ee370433b".
2589
2590 2018-09-10  Simon Marchi  <simon.marchi@ericsson.com>
2591
2592         * record-btrace.c (get_thread_current_frame): Remove
2593         old_inferior_ptid.
2594
2595 2018-09-10  Jerome Guitton  <guitton@adacore.com>
2596
2597         * ada-lang.c (ada_value_struct_elt): Call ada_to_fixed_type
2598         with check_tag to 1 if and only if the type is tagged and the
2599         component being searched cannot been found in the current
2600         view. Otherwise, always call ada_to_fixed_type with
2601         check_tag to 0.
2602
2603 2018-09-10  Xavier Roirand  <roirand@adacore.com>
2604
2605         * ada-lang.c (ada_is_access_to_unconstrained_array): Remove static
2606         declaration.
2607         * ada-lang.h: add ada_is_access_to_unconstrained_array prototype.
2608         * ada-varobj.c (ada_varobj_get_number_of_children,
2609         ada_varobj_describe_child, ada_value_is_changeable_p): Cleanup code.
2610
2611 2018-09-10  Xavier Roirand  <roirand@adacore.com>
2612
2613         * ada-valprint.c (ada_value_print): Use type instead of
2614         enclosing type.
2615
2616 2018-09-10  Xavier Roirand  <roirand@adacore.com>
2617
2618         * ada-lang.c (ada_value_subscript): Handle case when parameter is
2619         an array of access to unconstrained array.
2620
2621 2018-09-10  Xavier Roirand  <roirand@adacore.com>
2622
2623         * ada-lang.c (ada_is_access_to_unconstrained_array): New function.
2624         (ada_check_typedef): Use it.
2625
2626 2018-09-10  Xavier Roirand  <roirand@adacore.com>
2627
2628         * ada-varobj.c (ada_varobj_describe_struct_child)
2629         (ada_varobj_describe_child): Handle union case like struct one.
2630
2631 2018-09-10  Tom Tromey  <tom@tromey.com>
2632
2633         PR python/18380:
2634         * python/python.c (_initialize_python): Make example in "python"
2635         help work in Python 3.
2636
2637 2018-09-10  Eli Zaretskii  <eliz@gnu.org>
2638
2639         * Makefile.in (transformed_name): Use INSTALL_SCRIPT instead of
2640         INSTALL_PROGRAM to install gdb-add-index.sh.  Don't append
2641         $(EXEEXT) to the script, as it is not a program.
2642
2643 2018-09-09  Simon Marchi  <simon.marchi@ericsson.com>
2644
2645         * python/py-prettyprint.c (pretty_print_one_value): Return
2646         gdbpy_ref<>.
2647         (print_string_repr): Adjust.
2648         (apply_varobj_pretty_printer): Return gdbpy_ref<>.
2649         * python/python-internal.h (apply_varobj_pretty_printer): Return
2650         gdbpy_ref<>.
2651         * varobj.c (varobj_value_get_print_value): Adjust.
2652
2653 2018-09-08  Tom Tromey  <tom@tromey.com>
2654
2655         PR python/16047:
2656         * python/py-prettyprint.c (pretty_print_one_value): Check for
2657         to_string method.
2658
2659 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2660
2661         * ada-lang.c (resolve_subexp): Pass correct OPLEN in call to
2662         replace_operator_with_call.
2663
2664 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2665
2666         * ada-lang.c (ada_value_cast): Remove unnecessary parentheses.
2667
2668 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2669
2670         * ada-typeprint.c (print_range): Print the bounds using TYPE
2671         rather than its TYPE_TARGET_TYPE.
2672
2673 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2674
2675         * ada-lang.c (ada_to_fixed_value): Minor reformatting in
2676         call to ada_to_fixed_value_create.
2677
2678 2018-09-08  Jerome Guitton  <guitton@adacore.com>
2679
2680         * ada-lang.c (ada_decode): strip dot prefix in symbol name.
2681
2682 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2683
2684         * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
2685         by calls to error.
2686
2687 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2688
2689         * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
2690         Move update of loop variable "fi".
2691
2692 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2693
2694         * ada-lang.c (value_assign_to_component): In the case of
2695         big-endian targets, extract the bits of the given VAL
2696         using an src_offset of zero if container is not a scalar.
2697
2698 2018-09-06  Simon Ser  <contact@emersion.fr>
2699
2700         PR gdb/23105
2701         * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
2702         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
2703         * fbsd-tdep.c (fbsd_make_note_desc): New.
2704         (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
2705         NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
2706         * target.h (enum target_object) Add FreeBSD-specific
2707         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
2708
2709 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
2710
2711         * compile/compile-c.h (generate_c_for_variable_locations):
2712         Change reference to pointer.
2713         * compile/compile-c-support.c (compile_program) <compute>:
2714         Likewise.
2715         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
2716         (generate_c_for_for_one_variable): Likewise
2717         (generate_c_for_variable_locations): Likewise
2718         * compile/compile-c-types.c (compile_c_instance::convert_type):
2719         Likewise
2720         * compile/compile-cplus-symbols.c (convert_one_symbol):
2721         std::move the scope passed to enter_scope.
2722         * compile/compile-cplus-types.c
2723         (compile_cplus_instance::enter_scope): Make parameter
2724         rvalue-reference.
2725         (compile_cplus_instance::new_scope): Change reference to
2726         pointer.
2727         (compile_cplus_instance::convert_type): Likewise
2728         (compile_cplus_convert_typedef): std::move the scope passed to
2729         enter_scope.
2730         (compile_cplus_convert_struct_or_union): Likewise.
2731         (compile_cplus_convert_enum): Likewise.
2732         (compile_cplus_convert_namespace): Likewise.
2733         * compile/compile-cplus.h (compile_cplus_instance)
2734         <enter_scope>: Make parameter rvalue-reference.
2735         * compile/compile-internal.h (compile_instance)
2736         <get_cached_type>: Likewise
2737         * compile/compile-loc2c.c (push): Likewise
2738         (pushf): Likewise
2739         (unary): Likewise
2740         (binary): Likewise
2741         (print_label): Likewise
2742         (pushf_register_address): Likewise
2743         (pushf_register): Likewise
2744         (do_compile_dwarf_expr_to_c): Likewise
2745         (compile_dwarf_expr_to_c): Likewise
2746         (compile_dwarf_bounds_to_c): Likewise
2747         * compile/compile.c (compile_instance::get_cached_type):
2748         Likewise
2749         * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
2750         (compile_dwarf_bounds_to_c): Likewise
2751         * dwarf2loc.c (locexpr_generate_c_location): Likewise.
2752         (dwarf2_compile_property_to_c): Likewise
2753         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
2754         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
2755         Likewise
2756
2757 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
2758
2759         * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
2760         * tui/tui-data.c (init_content_element): Don't initialize it.
2761
2762 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
2763
2764         * tui/tui-data.h (struct tui_win_info)
2765         <detail::opaque>: Remove.
2766         * tui/tui-data.c (init_win_info): Remove assignment.
2767
2768 2018-09-05  Tom Tromey  <tom@tromey.com>
2769
2770         * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
2771         -Wformat-nonliteral.
2772         * target-float.c (host_float_ops<T>::to_string)
2773         (host_float_ops<T>::from_string): Use
2774         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
2775         * configure: Rebuild.
2776
2777 2018-09-05  Simon Marchi  <simon.marchi@ericsson.com>
2778
2779         * printcmd.c (printf_c_string): Use
2780         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
2781         (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
2782
2783 2018-09-05  Tom Tromey  <tom@tromey.com>
2784
2785         * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
2786
2787 2018-09-05  Tom de Vries  <tdevries@suse.de>
2788
2789         * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
2790         with resolve_abstract_p == true.
2791         (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
2792         defaulting to false. Propagate resolve_abstract_p to
2793         dwarf2_fetch_die_loc_sect_off.
2794         * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
2795         parameter, defaulting to false.
2796         * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
2797         (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
2798         parameter.
2799         * dwarf2read.h (struct die_info): Forward-declare.
2800         (die_info_ptr): New typedef.
2801         (struct dwarf2_per_objfile): Add abstract_to_concrete field.
2802
2803 2018-09-05  Joel Brobecker  <brobecker@adacore.com>
2804
2805         GDB 8.2 released.
2806
2807 2018-09-04  Sergio Durigan Junior  <sergiodj@redhat.com>
2808             Pedro Alves  <palves@redhat.com>
2809
2810         * gnulib/Makefile.in (aclocal_m4_deps): Move to
2811         "aclocal-m4-deps.mk".  Include file here.
2812         $(srcdir)/aclocal.m4: Add "configure.ac".
2813         * gnulib/aclocal-m4-deps.mk: New file.
2814         * gnulib/update-gnulib.sh: Automatically update
2815         "aclocal-m4-deps.mk".
2816
2817 2018-09-04  Tom Tromey  <tom@tromey.com>
2818
2819         * configure: Rebuild.
2820         * configure.ac: Remove multi-ice code.
2821
2822 2018-09-04  Tom Tromey  <tom@tromey.com>
2823
2824         * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
2825         (ada-exp.o): Update.
2826
2827 2018-09-04  Tom Tromey  <tom@tromey.com>
2828
2829         * Makefile.in (printcmd.o, target-float.o): Remove.
2830         (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
2831
2832 2018-09-04  Tom Tromey  <tom@tromey.com>
2833
2834         * gnulib/Makefile.in: Remove obsolete comment.
2835         * Makefile.in: Remove obsolete comment.
2836
2837 2018-09-04  Andrew Burgess  <andrew.burgess@embecosm.com>
2838
2839         * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
2840         line with '+'.
2841
2842 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
2843
2844         * riscv-tdep.c: Add 'prologue-value.h' include.
2845         (struct riscv_unwind_cache): New struct.
2846         (riscv_debug_unwinder): New global.
2847         (riscv_scan_prologue): Update arguments, capture register details
2848         from prologue scan.
2849         (riscv_skip_prologue): Reformat arguments line, move end of
2850         prologue calculation into riscv_scan_prologue.
2851         (riscv_frame_cache): Update return type, create
2852         riscv_unwind_cache, scan the prologue, and fill in remaining cache
2853         details.
2854         (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
2855         (riscv_frame_prev_register): Use the trad_frame within the
2856         riscv_unwind_cache.
2857         (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
2858         flag.
2859
2860 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
2861
2862         * trad-frame.h (trad_frame_set_realreg): Declare.
2863         (trad_frame_set_addr): Declare.
2864         * trad-frame.c (trad_frame_set_realreg): Define new function.
2865         (trad_frame_set_addr): Define new function.
2866         (trad_frame_set_reg_realreg): Use new function.
2867         (trad_frame_set_reg_addr): Use new function.
2868
2869 2018-09-01  Keith Seitz  <keiths@redhat.com>
2870
2871         * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
2872         pulongest instead of "%lld".
2873         * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
2874         ATTRIBUTE_UNUSED.
2875
2876 2018-08-31  Tom Tromey  <tom@tromey.com>
2877
2878         * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
2879         variant part type.
2880
2881 2018-08-31  Pedro Alves  <palves@redhat.com>
2882
2883         * gdbarch.h: Regenerate.
2884
2885 2018-08-31  Pedro Alves  <palves@redhat.com>
2886
2887         * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
2888         * target.h (Hardware watchpoint interfaces): Describe
2889         continuable/steppable/non-steppable watchpoints.
2890         * gdbarch.h, gdbarch.c: Regenerate.
2891
2892 2018-08-31  Pedro Alves  <palves@redhat.com>
2893
2894         * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
2895         Delete.
2896         * s390-linux-nat.c
2897         (s390_linux_nat_target::have_continuable_watchpoint): Delete.
2898         * target.h (target_ops::have_continuable_watchpoint): Delete.
2899         (target_have_continuable_watchpoint): Delete.
2900         * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
2901         * target-delegates.c: Regenerate.
2902
2903 2018-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
2904
2905         * gnulib/Makefile.in (aclocal_m4_deps): Update according to
2906         the files present in "gnulib/import/m4/".
2907
2908 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
2909
2910         * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
2911         c.sw, c.swsp, and c.sdsp.
2912
2913 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
2914
2915         * riscv-tdep.c (struct riscv_inferior_data): Delete.
2916         (riscv_read_misa_reg): Don't cache value read into inferior data.
2917         (riscv_new_inferior_data): Delete.
2918         (riscv_inferior_data_cleanup): Delete.
2919         (riscv_inferior_data): Delete.
2920         (riscv_invalidate_inferior_data): Delete.
2921         (_initialize_riscv_tdep): Remove initialisation of inferior data.
2922
2923 2018-08-30  Simon Marchi  <simon.marchi@ericsson.com>
2924
2925         * compile/compile-cplus-types.c
2926         (compile_cplus_instance::leave_scope): Take the address of scope
2927         object.
2928         (compile_cplus_instance::convert_qualified_base): Compare quals
2929         to 0.
2930
2931 2018-08-30  Keith Seitz  <keiths@redhat.com>
2932
2933         * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
2934         Use "%s" and host_address_to_string instead of "%p" in printf.
2935
2936 2018-08-29  Keith Seitz  <keiths@redhat.com>
2937
2938         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
2939         and compile-cplus-types.c.
2940         (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
2941         * c-lang.c (cplus_language_defn): Set C++ compile functions.
2942         * c-lang.h (cplus_get_compile_context, cplus_compute_program):
2943         Declare.
2944         * compile/compile-c-support.c: Include compile-cplus.h.
2945         (load_libcompile): Templatize.
2946         (get_compile_context): "New" function.
2947         (c_get_compile_context): Use get_compile_context.
2948         (cplus_get_compile_context): New function.
2949         (cplus_push_user_expression, cplus_pop_user_expression)
2950         (cplus_add_code_header, cplus_add_input, cplus_compile_program)
2951         (cplus_compute_program): Define new structs/functions.
2952         * compile/compile-cplus-symmbols.c: New file.
2953         * compile/compile-cplus-types.c: New file.
2954         * compile/compile-cplus.h: New file.
2955         * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
2956         Declare.
2957         * compile/compile-object-load.c (get_out_value_type): Use
2958         strncmp_iw when comparing symbol names.
2959         (compile_object_load): Add mst_bss and mst_data.
2960         * compile/compile.c (_initialize_compile): Remove
2961         -Wno-implicit-function-declaration from `compile_args'.
2962         * compile/gcc-cp-plugin.h: New file.
2963         * NEWS: Mention C++ compile support and new debug options.
2964
2965 2018-08-29  Keith Seitz  <keiths@redhat.com>
2966
2967         * linespec.c (collect_info::add_symbol): Make virtual.
2968         (struct symbol_searcher_collect_info): New struct.
2969         (symbol_searcher::find_all_symbols): New method.
2970         * symtab.h (class symbol_searcher): New class.
2971
2972 2018-08-29  Keith Seitz  <keiths@redhat.com>
2973
2974         * linespec.c (struct linespec) <function_symbols, label_symbols>:
2975         Change to vector of block_symbol.  Update all users.
2976         (struct collect_info) <symbols>: Likewise.
2977         (collect_info::add_symbol): Take block_symbol as argument.
2978         Update all callers.
2979         (decode_compound_collector) <m_symbols>: Change type to vector
2980         of block_symbol.  Update all users.
2981         (decode_compound_collector::operator ()): Change parameter type
2982         to block_symbol.
2983         (find_method, find_function_symbols, find_linespec_symbols)
2984         (find_label_symbols_in_block, find_label_symbols): Change symbol
2985         vectors to block_symbol vectors.
2986         * symtab.h (symbol_found_callback_ftype): Change parameter type to
2987         block_symbol.
2988
2989 2018-08-29  Keith Seitz  <keiths@redhat.com>
2990
2991         * linespec.c (symbolp): Remove typedef and VEC definitions.
2992         (bound_minimal_symbol_d): Likewise.
2993
2994 2018-08-29  Keith Seitz  <keiths@redhat.com>
2995
2996         * linespec.c (decode_compound_collector::decode_compound_collector):
2997         Remove initialization for `m_symtabs'.
2998         (decode_compound_collector::release_symbols): Change return type
2999         to std::vector.  Update all callers.
3000         (class decode_compound_collector) <m_symbols>: Change type to
3001         std::vector.
3002         (lookup_prefix_sym): Change return type to std::vector.  Update all
3003         callers.
3004         (compare_symbols): Remove.
3005         (std_compare_symbols): Rename to `compare_symbols'.
3006         (find_method): Change `sym_classes' parameter to std::vector.
3007         Update all callers.  Use std::sort to sort sym_classes.
3008         (find_linespec_symbols): Remove cleanup.
3009
3010 2018-08-29  Keith Seitz  <keiths@redhat.com>
3011
3012         * linespec.c (struct linespec) <minimal_symbols>: Change type to
3013         std::vector.  Update all users.
3014         (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
3015         (struct collect_info) <minimal_symbols>: Likewise.
3016         (compare_msymbols): Return bool.  Change parameters to const
3017         bound_minimal_symbol references.
3018         (find_method, find_function_symbols, find_linespec_symbols): Change
3019         `minsyms' parameter to std::vector.  Update all callers.
3020
3021 2018-08-29  Keith Seitz  <keiths@redhat.com>
3022
3023         * linespec.c (struct linespec) <label_symbols>: Change type to
3024         std::vector.  Update all users.
3025         (find_label_symbols_in_block): Change `result' parameter to
3026         std::vector.  Update all callers.
3027         (find_label_symbols): Return std::vector.  Update all callers.
3028
3029 2018-08-29  Keith Seitz  <keiths@redhat.com>
3030
3031         * linespec.c (struct linespec) <function_symbols>: Change type to
3032         std::vector.  Update all users.
3033         (struct collect_info) <function_symbols>: Likewise.
3034         (convert_linespec_to_sals): Use std::sort to sort function_symbols.
3035         (std_compare_symbols): New function.
3036         (find_method, find_function_symbols, find_linespec_symbols)
3037         (find_label_symbols_in_block): Change `symbols' parameter to
3038         std::vector.  Update all callers.
3039         (find_label_symbols): Likewise for `function_symbols' and
3040         `label_funcs_ret'.
3041
3042 2018-08-29  Keith Seitz  <keiths@redhat.com>
3043
3044         * linespec.c (symtab_vector_up): Define.
3045         (struct linespec) <file_symtabs>: Change type to std::vector *.
3046         Update all uses.
3047         (struct collect_info) <file_symtabs>: Likewise.
3048         (collect_symtabs_from_filename): Return symtab_vector_up.
3049         Update all callers.
3050         (decode_objc): Remove cleanup.
3051         (symtab_collector::symtab_collector): Initialize `m_symtabs'.
3052         (symtab_collector::release_symtabs): Return symtab_vector_up.
3053         Update all callers.
3054         (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
3055         Update all users.
3056         (collect_symtabs_from_filename, symtabs_from_filename): Return
3057         symtab_vector_up.  Update all callers.
3058
3059 2018-08-29  Tom Tromey  <tom@tromey.com>
3060
3061         * csky-tdep.c (csky_analyze_prologue): Use
3062         core_addr_to_string_nz.
3063
3064 2018-08-29  Tom Tromey  <tom@tromey.com>
3065
3066         * windows-nat.c (struct xlate_exception) <them>: Change type to
3067         DWORD.
3068         (xlate): Fix formatting.  Remove last entry.
3069         (struct xlate_exception, xlate): Comment out.
3070         (windows_nat_target::resume): Use ranged for.
3071
3072 2018-08-29  Jim Wilson  <jimw@sifive.com>
3073
3074         * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
3075         (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
3076         of NT_PRFPREG.
3077         (riscv_linux_nat_target::store_registers): Likewise.
3078
3079 2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
3080
3081         PR gdb/23555
3082         PR gdb/23558
3083         * gnulib/aclocal.m4: Regenerate.
3084         * gnulib/config.in: Regenerate.
3085         * gnulib/configure: Regenerate.
3086         * gnulib/import/Makefile.am: Update.
3087         * gnulib/import/Makefile.in: Update.
3088         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
3089         * gnulib/import/_Noreturn.h: ... this.
3090         * gnulib/import/alloca.in.h: Update.
3091         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
3092         * gnulib/import/arg-nonnull.h: ... this.
3093         * gnulib/import/assure.h: Update.
3094         * gnulib/import/at-func.c: Update.
3095         * gnulib/import/basename-lgpl.c: Update.
3096         * gnulib/import/extra/snippet/c++defs.h: Rename to...
3097         * gnulib/import/c++defs.h: ... this.
3098         * gnulib/import/canonicalize-lgpl.c: Update.
3099         * gnulib/import/cdefs.h: Update.
3100         * gnulib/import/chdir-long.c: Update.
3101         * gnulib/import/chdir-long.h: Update.
3102         * gnulib/import/cloexec.c: Update.
3103         * gnulib/import/cloexec.h: Update.
3104         * gnulib/import/close.c: Update.
3105         * gnulib/import/closedir.c: Update.
3106         * gnulib/import/config.charset: Update.
3107         * gnulib/import/dirent-private.h: Update.
3108         * gnulib/import/dirent.in.h: Update.
3109         * gnulib/import/dirfd.c: Update.
3110         * gnulib/import/dirname-lgpl.c: Update.
3111         * gnulib/import/dirname.h: Update.
3112         * gnulib/import/dosname.h: Update.
3113         * gnulib/import/dup-safer-flag.c: Update.
3114         * gnulib/import/dup-safer.c: Update.
3115         * gnulib/import/dup.c: Update.
3116         * gnulib/import/dup2.c: Update.
3117         * gnulib/import/errno.in.h: Update.
3118         * gnulib/import/error.c: Update.
3119         * gnulib/import/error.h: Update.
3120         * gnulib/import/exitfail.c: Update.
3121         * gnulib/import/exitfail.h: Update.
3122         * gnulib/import/extra/update-copyright: Update.
3123         * gnulib/import/fchdir.c: Update.
3124         * gnulib/import/fcntl.c: Update.
3125         * gnulib/import/fcntl.in.h: Update.
3126         * gnulib/import/fd-hook.c: Update.
3127         * gnulib/import/fd-hook.h: Update.
3128         * gnulib/import/fd-safer-flag.c: Update.
3129         * gnulib/import/fd-safer.c: Update.
3130         * gnulib/import/fdopendir.c: Update.
3131         * gnulib/import/filename.h: Update.
3132         * gnulib/import/filenamecat-lgpl.c: Update.
3133         * gnulib/import/filenamecat.h: Update.
3134         * gnulib/import/flexmember.h: Update.
3135         * gnulib/import/float+.h: Update.
3136         * gnulib/import/float.c: Update.
3137         * gnulib/import/float.in.h: Update.
3138         * gnulib/import/fnmatch.c: Update.
3139         * gnulib/import/fnmatch.in.h: Update.
3140         * gnulib/import/fnmatch_loop.c: Update.
3141         * gnulib/import/fpucw.h: Update.
3142         * gnulib/import/frexp.c: Update.
3143         * gnulib/import/frexpl.c: Update.
3144         * gnulib/import/fstat.c: Update.
3145         * gnulib/import/fstatat.c: Update.
3146         * gnulib/import/getcwd-lgpl.c: Update.
3147         * gnulib/import/getcwd.c: Update.
3148         * gnulib/import/getdtablesize.c: Update.
3149         * gnulib/import/getlogin_r.c: Update.
3150         * gnulib/import/getprogname.c: Update.
3151         * gnulib/import/getprogname.h: Update.
3152         * gnulib/import/gettext.h: Update.
3153         * gnulib/import/gettimeofday.c: Update.
3154         * gnulib/import/glob-libc.h: Update.
3155         * gnulib/import/glob.c: Update.
3156         * gnulib/import/glob.in.h: Update.
3157         * gnulib/import/glob_internal.h: Update.
3158         * gnulib/import/glob_pattern_p.c: Update.
3159         * gnulib/import/globfree.c: Update.
3160         * gnulib/import/hard-locale.c: Update.
3161         * gnulib/import/hard-locale.h: Update.
3162         * gnulib/import/intprops.h: Update.
3163         * gnulib/import/inttypes.in.h: Update.
3164         * gnulib/import/isnan.c: Update.
3165         * gnulib/import/isnand-nolibm.h: Update.
3166         * gnulib/import/isnand.c: Update.
3167         * gnulib/import/isnanl-nolibm.h: Update.
3168         * gnulib/import/isnanl.c: Update.
3169         * gnulib/import/itold.c: Update.
3170         * gnulib/import/libc-config.h: Update.
3171         * gnulib/import/limits.in.h: Update.
3172         * gnulib/import/localcharset.c: Update.
3173         * gnulib/import/localcharset.h: Update.
3174         * gnulib/import/localtime-buffer.c: Update.
3175         * gnulib/import/localtime-buffer.h: Update.
3176         * gnulib/import/lstat.c: Update.
3177         * gnulib/import/m4/00gnulib.m4: Update.
3178         * gnulib/import/m4/__inline.m4: Update.
3179         * gnulib/import/m4/absolute-header.m4: Update.
3180         * gnulib/import/m4/alloca.m4: Update.
3181         * gnulib/import/m4/builtin-expect.m4: Update.
3182         * gnulib/import/m4/canonicalize.m4: Update.
3183         * gnulib/import/m4/chdir-long.m4: Update.
3184         * gnulib/import/m4/close.m4: Update.
3185         * gnulib/import/m4/closedir.m4: Update.
3186         * gnulib/import/m4/configmake.m4: Update.
3187         * gnulib/import/m4/d-ino.m4: Update.
3188         * gnulib/import/m4/d-type.m4: Update.
3189         * gnulib/import/m4/dirent_h.m4: Update.
3190         * gnulib/import/m4/dirfd.m4: Update.
3191         * gnulib/import/m4/dirname.m4: Update.
3192         * gnulib/import/m4/double-slash-root.m4: Update.
3193         * gnulib/import/m4/dup.m4: Update.
3194         * gnulib/import/m4/dup2.m4: Update.
3195         * gnulib/import/m4/eealloc.m4: Update.
3196         * gnulib/import/m4/environ.m4: Update.
3197         * gnulib/import/m4/errno_h.m4: Update.
3198         * gnulib/import/m4/error.m4: Update.
3199         * gnulib/import/m4/exponentd.m4: Update.
3200         * gnulib/import/m4/exponentl.m4: Update.
3201         * gnulib/import/m4/extensions.m4: Update.
3202         * gnulib/import/m4/extern-inline.m4: Update.
3203         * gnulib/import/m4/fchdir.m4: Update.
3204         * gnulib/import/m4/fcntl-o.m4: Update.
3205         * gnulib/import/m4/fcntl.m4: Update.
3206         * gnulib/import/m4/fcntl_h.m4: Update.
3207         * gnulib/import/m4/fdopendir.m4: Update.
3208         * gnulib/import/m4/filenamecat.m4: Update.
3209         * gnulib/import/m4/flexmember.m4: Update.
3210         * gnulib/import/m4/float_h.m4: Update.
3211         * gnulib/import/m4/fnmatch.m4: Update.
3212         * gnulib/import/m4/fnmatch_h.m4: Update.
3213         * gnulib/import/m4/fpieee.m4: Update.
3214         * gnulib/import/m4/frexp.m4: Update.
3215         * gnulib/import/m4/frexpl.m4: Update.
3216         * gnulib/import/m4/fstat.m4: Update.
3217         * gnulib/import/m4/fstatat.m4: Update.
3218         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
3219         * gnulib/import/m4/getcwd-path-max.m4: Update.
3220         * gnulib/import/m4/getcwd.m4: Update.
3221         * gnulib/import/m4/getdtablesize.m4: Update.
3222         * gnulib/import/m4/getlogin.m4: Update.
3223         * gnulib/import/m4/getlogin_r.m4: Update.
3224         * gnulib/import/m4/getpagesize.m4: Update.
3225         * gnulib/import/m4/getprogname.m4: Update.
3226         * gnulib/import/m4/gettimeofday.m4: Update.
3227         * gnulib/import/m4/glibc21.m4: Update.
3228         * gnulib/import/m4/glob.m4: Update.
3229         * gnulib/import/m4/glob_h.m4: Update.
3230         * gnulib/import/m4/gnulib-cache.m4: Update.
3231         * gnulib/import/m4/gnulib-common.m4: Update.
3232         * gnulib/import/m4/gnulib-comp.m4: Update.
3233         * gnulib/import/m4/gnulib-tool.m4: Update.
3234         * gnulib/import/m4/hard-locale.m4: Update.
3235         * gnulib/import/m4/include_next.m4: Update.
3236         * gnulib/import/m4/inttypes-pri.m4: Update.
3237         * gnulib/import/m4/inttypes.m4: Update.
3238         * gnulib/import/m4/isnand.m4: Update.
3239         * gnulib/import/m4/isnanl.m4: Update.
3240         * gnulib/import/m4/largefile.m4: Update.
3241         * gnulib/import/m4/limits-h.m4: Update.
3242         * gnulib/import/m4/localcharset.m4: Update.
3243         * gnulib/import/m4/locale-fr.m4: Update.
3244         * gnulib/import/m4/locale-ja.m4: Update.
3245         * gnulib/import/m4/locale-zh.m4: Update.
3246         * gnulib/import/m4/localtime-buffer.m4: Update.
3247         * gnulib/import/m4/longlong.m4: Update.
3248         * gnulib/import/m4/lstat.m4: Update.
3249         * gnulib/import/m4/malloc.m4: Update.
3250         * gnulib/import/m4/malloca.m4: Update.
3251         * gnulib/import/m4/math_h.m4: Update.
3252         * gnulib/import/m4/mbrtowc.m4: Update.
3253         * gnulib/import/m4/mbsinit.m4: Update.
3254         * gnulib/import/m4/mbsrtowcs.m4: Update.
3255         * gnulib/import/m4/mbstate_t.m4: Update.
3256         * gnulib/import/m4/memchr.m4: Update.
3257         * gnulib/import/m4/memmem.m4: Update.
3258         * gnulib/import/m4/mempcpy.m4: Update.
3259         * gnulib/import/m4/memrchr.m4: Update.
3260         * gnulib/import/m4/mkdir.m4: Update.
3261         * gnulib/import/m4/mkstemp.m4: Update.
3262         * gnulib/import/m4/mmap-anon.m4: Update.
3263         * gnulib/import/m4/mode_t.m4: Update.
3264         * gnulib/import/m4/msvc-inval.m4: Update.
3265         * gnulib/import/m4/msvc-nothrow.m4: Update.
3266         * gnulib/import/m4/multiarch.m4: Update.
3267         * gnulib/import/m4/nocrash.m4: Update.
3268         * gnulib/import/m4/off_t.m4: Update.
3269         * gnulib/import/m4/onceonly.m4: Update.
3270         * gnulib/import/m4/open-cloexec.m4: Update.
3271         * gnulib/import/m4/open.m4: Update.
3272         * gnulib/import/m4/openat.m4: Update.
3273         * gnulib/import/m4/opendir.m4: Update.
3274         * gnulib/import/m4/pathmax.m4: Update.
3275         * gnulib/import/m4/rawmemchr.m4: Update.
3276         * gnulib/import/m4/readdir.m4: Update.
3277         * gnulib/import/m4/readlink.m4: Update.
3278         * gnulib/import/m4/realloc.m4: Update.
3279         * gnulib/import/m4/rename.m4: Update.
3280         * gnulib/import/m4/rewinddir.m4: Update.
3281         * gnulib/import/m4/rmdir.m4: Update.
3282         * gnulib/import/m4/save-cwd.m4: Update.
3283         * gnulib/import/m4/secure_getenv.m4: Update.
3284         * gnulib/import/m4/setenv.m4: Update.
3285         * gnulib/import/m4/signal_h.m4: Update.
3286         * gnulib/import/m4/ssize_t.m4: Update.
3287         * gnulib/import/m4/stat-time.m4: Update.
3288         * gnulib/import/m4/stat.m4: Update.
3289         * gnulib/import/m4/std-gnu11.m4: Update.
3290         * gnulib/import/m4/stdbool.m4: Update.
3291         * gnulib/import/m4/stddef_h.m4: Update.
3292         * gnulib/import/m4/stdint.m4: Update.
3293         * gnulib/import/m4/stdio_h.m4: Update.
3294         * gnulib/import/m4/stdlib_h.m4: Update.
3295         * gnulib/import/m4/strchrnul.m4: Update.
3296         * gnulib/import/m4/strdup.m4: Update.
3297         * gnulib/import/m4/strerror.m4: Update.
3298         * gnulib/import/m4/string_h.m4: Update.
3299         * gnulib/import/m4/strstr.m4: Update.
3300         * gnulib/import/m4/strtok_r.m4: Update.
3301         * gnulib/import/m4/sys_socket_h.m4: Update.
3302         * gnulib/import/m4/sys_stat_h.m4: Update.
3303         * gnulib/import/m4/sys_time_h.m4: Update.
3304         * gnulib/import/m4/sys_types_h.m4: Update.
3305         * gnulib/import/m4/tempname.m4: Update.
3306         * gnulib/import/m4/time_h.m4: Update.
3307         * gnulib/import/m4/unistd-safer.m4: Update.
3308         * gnulib/import/m4/unistd_h.m4: Update.
3309         * gnulib/import/m4/warn-on-use.m4: Update.
3310         * gnulib/import/m4/wchar_h.m4: Update.
3311         * gnulib/import/m4/wchar_t.m4: Update.
3312         * gnulib/import/m4/wctype_h.m4: Update.
3313         * gnulib/import/m4/wint_t.m4: Update.
3314         * gnulib/import/malloc.c: Update.
3315         * gnulib/import/malloc/scratch_buffer.h: Update.
3316         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
3317         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
3318         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
3319         * gnulib/import/malloca.c: Update.
3320         * gnulib/import/malloca.h: Update.
3321         * gnulib/import/malloca.valgrind: Update.
3322         * gnulib/import/math.in.h: Update.
3323         * gnulib/import/mbrtowc.c: Update.
3324         * gnulib/import/mbsinit.c: Update.
3325         * gnulib/import/mbsrtowcs-impl.h: Update.
3326         * gnulib/import/mbsrtowcs-state.c: Update.
3327         * gnulib/import/mbsrtowcs.c: Update.
3328         * gnulib/import/memchr.c: Update.
3329         * gnulib/import/memmem.c: Update.
3330         * gnulib/import/mempcpy.c: Update.
3331         * gnulib/import/memrchr.c: Update.
3332         * gnulib/import/mkdir.c: Update.
3333         * gnulib/import/mkstemp.c: Update.
3334         * gnulib/import/msvc-inval.c: Update.
3335         * gnulib/import/msvc-inval.h: Update.
3336         * gnulib/import/msvc-nothrow.c: Update.
3337         * gnulib/import/msvc-nothrow.h: Update.
3338         * gnulib/import/open.c: Update.
3339         * gnulib/import/openat-die.c: Update.
3340         * gnulib/import/openat-priv.h: Update.
3341         * gnulib/import/openat-proc.c: Update.
3342         * gnulib/import/openat.c: Update.
3343         * gnulib/import/openat.h: Update.
3344         * gnulib/import/opendir.c: Update.
3345         * gnulib/import/pathmax.h: Update.
3346         * gnulib/import/pipe-safer.c: Update.
3347         * gnulib/import/rawmemchr.c: Update.
3348         * gnulib/import/readdir.c: Update.
3349         * gnulib/import/readlink.c: Update.
3350         * gnulib/import/realloc.c: Update.
3351         * gnulib/import/ref-add.sin: Update.
3352         * gnulib/import/ref-del.sin: Update.
3353         * gnulib/import/rename.c: Update.
3354         * gnulib/import/rewinddir.c: Update.
3355         * gnulib/import/rmdir.c: Update.
3356         * gnulib/import/same-inode.h: Update.
3357         * gnulib/import/save-cwd.c: Update.
3358         * gnulib/import/save-cwd.h: Update.
3359         * gnulib/import/scratch_buffer.h: Update.
3360         * gnulib/import/secure_getenv.c: Update.
3361         * gnulib/import/setenv.c: Update.
3362         * gnulib/import/signal.in.h: Update.
3363         * gnulib/import/stat-time.c: Update.
3364         * gnulib/import/stat-time.h: Update.
3365         * gnulib/import/stat-w32.c: Update.
3366         * gnulib/import/stat-w32.h: Update.
3367         * gnulib/import/stat.c: Update.
3368         * gnulib/import/stdbool.in.h: Update.
3369         * gnulib/import/stddef.in.h: Update.
3370         * gnulib/import/stdint.in.h: Update.
3371         * gnulib/import/stdio.in.h: Update.
3372         * gnulib/import/stdlib.in.h: Update.
3373         * gnulib/import/str-two-way.h: Update.
3374         * gnulib/import/strchrnul.c: Update.
3375         * gnulib/import/strdup.c: Update.
3376         * gnulib/import/streq.h: Update.
3377         * gnulib/import/strerror-override.c: Update.
3378         * gnulib/import/strerror-override.h: Update.
3379         * gnulib/import/strerror.c: Update.
3380         * gnulib/import/string.in.h: Update.
3381         * gnulib/import/stripslash.c: Update.
3382         * gnulib/import/strnlen1.c: Update.
3383         * gnulib/import/strnlen1.h: Update.
3384         * gnulib/import/strstr.c: Update.
3385         * gnulib/import/strtok_r.c: Update.
3386         * gnulib/import/sys_stat.in.h: Update.
3387         * gnulib/import/sys_time.in.h: Update.
3388         * gnulib/import/sys_types.in.h: Update.
3389         * gnulib/import/tempname.c: Update.
3390         * gnulib/import/tempname.h: Update.
3391         * gnulib/import/time.in.h: Update.
3392         * gnulib/import/unistd--.h: Update.
3393         * gnulib/import/unistd-safer.h: Update.
3394         * gnulib/import/unistd.in.h: Update.
3395         * gnulib/import/unsetenv.c: Update.
3396         * gnulib/import/verify.h: Update.
3397         * gnulib/import/extra/snippet/warn-on-use.h: Update.
3398         * gnulib/import/wchar.in.h: Update.
3399         * gnulib/import/wctype.in.h: Update.
3400         * gnulib/import/xalloc-oversized.h: Update.
3401         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
3402         "53e2c179f26a890fa6685af4b6c1397ee370433b".
3403
3404 2018-08-16  Gary Benson <gbenson@redhat.com>
3405
3406         PR gdb/13000:
3407         * gdb/main.c (captured_main_1): Exit with nonzero status
3408         in batch mode if the last command to be executed failed.
3409         * NEWS: Mention the above.
3410
3411 2018-08-29  Simon Marchi  <simon.marchi@ericsson.com>
3412
3413         * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
3414         end of warning message.
3415
3416 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
3417
3418         PR gdb/22943:
3419         * aarch64-tdep.c (is_hfa_or_hva): Remove function.
3420         (aarch64_extract_return_value): Use
3421         aapcs_is_vfp_call_or_return_candidate.
3422         (aarch64_return_in_memory): Likewise.
3423         (aarch64_store_return_value): Likewise.
3424
3425 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
3426
3427         * aarch64-tdep.c
3428         (aapcs_is_vfp_call_or_return_candidate): Make static
3429         (pass_in_v_or_stack): Remove function.
3430         (pass_in_v_vfp_candidate): New function.
3431         (aarch64_push_dummy_call): Check for float register candidates.
3432
3433 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
3434
3435         * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
3436         (aapcs_is_vfp_call_or_return_candidate_1): New function.
3437         (aapcs_is_vfp_call_or_return_candidate): Likewise.
3438
3439 2018-08-28  Simon Marchi  <simon.marchi@polymtl.ca>
3440
3441         PR build/23399
3442         * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
3443         (struct ipa_sym_addresses): Rename to...
3444         (struct ipa_sym_addresses_common): ... this.
3445         * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
3446
3447 2018-08-28  Tom Tromey  <tom@tromey.com>
3448
3449         * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
3450         (token_fifo): Now a std::vector.
3451         (yylex, c_parse): Update.
3452         * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
3453         (token_fifo): Now a std::vector.
3454         (yylex, d_parse): Update.
3455         * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
3456         (token_fifo): Now a std::vector.
3457         (yylex, go_parse): Update.
3458
3459 2018-08-28  Simon Marchi  <simon.marchi@ericsson.com>
3460
3461         * parser-defs.h (struct type_stack) <elements>: Change type to
3462         std::vector<union type_stack_elt>.
3463         <depth, size>: Remove.
3464         * parse.c (parse_exp_in_context_1): Adjust.
3465         (type_stack_reserve): Remove.
3466         (check_type_stack_depth): Remove.
3467         (insert_into_type_stack): Adjust to std::vector.
3468         (insert_type): Likewise.
3469         (push_type): Likewise.
3470         (push_type_int): Likewise.
3471         (insert_type_address_space): Likewise.
3472         (pop_type): Likewise.
3473         (pop_type_int): Likewise.
3474         (pop_typelist): Likewise.
3475         (pop_type_stack): Likewise.
3476         (append_type_stack): Likewise.
3477         (push_type_stack): Likewise.
3478         (get_type_stack): Likewise.
3479         (type_stack_cleanup): Likewise.
3480         (push_typelist): Likewise.
3481         (follow_types): Likewise.
3482         (_initialize_parse): Likewise.
3483
3484 2018-08-28  Hafiz Abid Qadeer  <abidh@codesourcery.com>
3485
3486         * NEWS: Mention csky target.
3487
3488 2018-08-28  Jiangshuai Li  <jiangshuai_li@c-sky.com>
3489             Hafiz Abid Qadeer  <abidh@codesourcery.com>
3490             Don Breazeal  <donb@codesourcery.com>
3491
3492         * csky-linux-tdep.c: New file.
3493         * csky-tdep.c: Likewise.
3494         * csky-tdep.h: Likewise.
3495         * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
3496         csky-tdep.o.
3497         (HFILES_NO_SRCDIR): Add csky-tdep.h.
3498         (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
3499         * configure.tgt: Add csky support.
3500
3501 2018-08-27  Jan Vrany  <jan.vrany@fit.cvut.cz>
3502
3503         * python/py-framefilter.c (py_print_frame): Print frame architecture
3504         when printing on an MI output.
3505
3506 2018-08-27  Tom Tromey  <tom@tromey.com>
3507
3508         PR build/23087:
3509         * configure: Rebuild.
3510         * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
3511
3512 2018-08-27  Tom Tromey  <tom@tromey.com>
3513
3514         * aarch64-linux-tdep.c
3515         (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
3516         casts to int.
3517
3518 2018-08-27  Tom Tromey  <tom@tromey.com>
3519
3520         * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
3521         unsigned.
3522         (ppc64_standard_linkage1, ppc64_standard_linkage2)
3523         (ppc64_standard_linkage3, ppc64_standard_linkage4)
3524         (ppc64_standard_linkage5, ppc64_standard_linkage6)
3525         (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
3526         unsigned.
3527
3528 2018-08-27  Tom Tromey  <tom@tromey.com>
3529
3530         * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
3531         (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
3532
3533 2018-08-27  Tom Tromey  <tom@tromey.com>
3534
3535         * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
3536         * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
3537         ULONGEST_MAX.
3538         * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
3539         ULONGEST_MAX.
3540         * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
3541         ULONGEST_MAX.
3542         * sparc-linux-tdep.c (sparc32_linux_sigframe)
3543         (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
3544         * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
3545         ULONGEST_MAX.
3546         * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
3547         (ppc64_linux_sigaction_tramp_frame)
3548         (ppc32_linux_sighandler_tramp_frame)
3549         (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
3550         * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
3551         (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
3552         * mn10300-linux-tdep.c (am33_linux_sigframe)
3553         (am33_linux_rt_sigframe): Use ULONGEST_MAX.
3554         * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
3555         * mips-linux-tdep.c (mips_linux_o32_sigframe)
3556         (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
3557         (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
3558         (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
3559         (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
3560         * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
3561         (mips64_fbsd_sigframe): Use ULONGEST_MAX.
3562         * microblaze-linux-tdep.c
3563         (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
3564         * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
3565         (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
3566         (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
3567         * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
3568         * common/common-types.h (ULONGEST_MAX): New define.
3569         (CORE_ADDR_MAX): Fix formatting.
3570         * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
3571         * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
3572         * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
3573         (arm_linux_rt_sigreturn_tramp_frame)
3574         (arm_eabi_linux_sigreturn_tramp_frame)
3575         (arm_eabi_linux_rt_sigreturn_tramp_frame)
3576         (thumb2_eabi_linux_sigreturn_tramp_frame)
3577         (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
3578         (arm_linux_restart_syscall_tramp_frame)
3579         (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
3580         * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
3581         * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
3582         ULONGEST_MAX.
3583         * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
3584
3585 2018-08-27  Tom Tromey  <tom@tromey.com>
3586
3587         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
3588         CORE_ADDR_MAX.
3589         * mips-tdep.c (mips_deal_with_atomic_sequence)
3590         (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
3591         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
3592         (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
3593         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
3594         CORE_ADDR_MAX.
3595         * aarch64-tdep.c (aarch64_software_single_step): Use
3596         CORE_ADDR_MAX.
3597
3598 2018-08-27  Tom Tromey  <tom@tromey.com>
3599
3600         * linespec.c (complete_linespec_component): Add cast to "char".
3601         * completer.c (completion_tracker::build_completion_result): Add
3602         cast to "char".
3603
3604 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
3605
3606         * solist.h (struct solist, struct target_so_ops): Fix
3607         indentation.
3608
3609 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
3610
3611         * ada-tasks.c (ada_task_info_s): Remove typedef.
3612         (DEF_VEC_O(ada_task_info_s)): Remove.
3613         (struct ada_tasks_inferior_data): Initialize fields.
3614         <task_list>: Make an std::vector.
3615         (get_ada_tasks_inferior_data): Allocate with new.
3616         (ada_get_task_number): Adjust.
3617         (get_task_number_from_id): Likewise.
3618         (valid_task_id): Likewise.
3619         (ada_get_task_info_from_ptid): Likewise.
3620         (iterate_over_live_ada_tasks): Likewise.
3621         (add_ada_task): Likewise.
3622         (read_known_tasks): Likewise.
3623         (ada_build_task_list): Likewise.
3624         (print_ada_task_info): Likewise.
3625         (info_task): Likewise.
3626         (task_command_1): Likewise.
3627
3628 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
3629
3630         * ada-lang.c (add_angle_brackets): Return std::string.
3631
3632 2018-08-25  Simon Marchi  <simon.marchi@polymtl.ca>
3633
3634         * python/py-threadevent.c (py_get_event_thread): Initialize
3635         pythread.
3636
3637 2018-08-24  Pedro Alves  <palves@redhat.com>
3638
3639         * python/py-bpevent.c (create_breakpoint_event_object): Use
3640         copy-initialization.
3641         * python/py-continueevent.c (emit_continue_event): Use
3642         copy-initialization.
3643         * python/py-exitedevent.c (create_exited_event_object): Return a
3644         gdbpy_ref<>.
3645         (emit_exited_event): Use copy-initialization.
3646         * python/py-inferior.c (python_new_inferior)
3647         (python_inferior_deleted, add_thread_object): Use
3648         copy-initialization.
3649         * python/py-infevents.c (create_inferior_call_event_object)
3650         (create_register_changed_event_object)
3651         (create_memory_changed_event_object): Return a gdbpy_ref<>.
3652         (emit_inferior_call_event, emit_memory_changed_event)
3653         (emit_register_changed_event): Use copy-initialization.
3654         * python/py-newobjfileevent.c (create_new_objfile_event_object):
3655         Return a gdbpy_ref<>.
3656         (emit_new_objfile_event): Use copy-initialization.
3657         (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
3658         (emit_clear_objfiles_event): Use copy-initialization.
3659         * python/py-signalevent.c (create_signal_event_object): Use
3660         copy-initialization.
3661         * python/py-threadevent.c (create_thread_event_object): Use
3662         copy-initialization.
3663
3664 2018-08-24  Pedro Alves  <palves@redhat.com>
3665             Simon Marchi  <simon.marchi@ericsson.com>
3666
3667         PR gdb/23379
3668         * python/py-continueevent.c: Include "gdbthread.h".
3669         (create_continue_event_object): Add intro comment.  Add 'ptid'
3670         parameter.  Use it to find thread to pass to
3671         create_thread_event_object.
3672         (emit_continue_event): Pass PTID down to
3673         create_continue_event_object.
3674         * python/py-event.h (py_get_event_thread): Declare.
3675         (create_thread_event_object): Remove default from 'thread'
3676         parameter.
3677         * python/py-stopevent.c (create_stop_event_object): Use
3678         py_get_event_thread.
3679         * python/py-threadevent.c (get_event_thread): Rename to ...
3680         (py_get_event_thread): ... this, make extern, add 'ptid' parameter
3681         and use it to find the thread.
3682         (create_thread_event_object): Assert that THREAD isn't null.
3683         Don't find the event thread here.
3684
3685 2018-08-23  Kevin Buettner  <kevinb@redhat.com>
3686
3687         * block.h (blockrange, blockranges): New struct declarations.
3688         (struct block): Add new field named `ranges'.
3689         (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
3690         (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
3691         macros for accessing ranges in struct block.
3692         (make_blockranges): New declaration.
3693         block.c (make_blockranges): New function.
3694         * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
3695         for block.
3696         * symtab.h (find_pc_partial_function): Add new parameter `block'.
3697         * blockframe.c (cache_pc_function_block): New static global.
3698         (clear_pc_function_cache): Clear cache_pc_function_block.
3699         (find_pc_partial_function): Move comment to symtab.h.  Add
3700         support for non-contiguous blocks.
3701         * cli/cli-cmds.c (block.h): Include.
3702         (print_disassembly): Handle printing of non-contiguous blocks.
3703         (disassemble_current_function): Likewise.
3704         (disassemble_command): Likewise.
3705
3706         * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
3707         BLOCK_START.
3708         * blockframe.c (get_pc_function_start): Likewise.
3709         * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
3710         (gcc_symbol_address): Likewise.
3711         * compile/compile-object-run.c (compile_object_run): Likewise.
3712         * compile/compile.c (get_expr_block_and_pc): Likewise.
3713         * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
3714         (func_addr_to_tail_call_list): Likewise.
3715         * findvar.c (default_read_var_value): Likewise.
3716         * inline-frame.c (inline_frame_this_id): Likewise.
3717         (skip-inline_frames): Likewise.
3718         * infcmd.c (until_next_command): Likewise.
3719         * linespec.c (convert_linespec_to_sals): Likewise.
3720         * parse.c (parse_exp_in_context_1): Likewise.
3721         * printcmd.c (build_address_symbolic): likewise.
3722         (info_address_command): Likewise.
3723         symtab.c (find_function_start_sal): Likewise.
3724         (skip_prologue_sal): Likewise.
3725         (find_function_alias_target): Likewise.
3726         (find_gnu_ifunc): Likewise.
3727         * stack.c (find_frame_funname): Likewise.
3728         * symtab.c (fixup_symbol_section): Likewise.
3729         (find_function_start_sal): Likewise.
3730         (skip_prologue_sal): Likewsie.
3731         (find_function_alias_target): Likewise.
3732         (find_gnu_ifunc): Likewise.
3733         * tracepoint.c (info_scope_command): Likewise.
3734         * value.c (value_fn_field): Likewise.
3735
3736         * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
3737         in place of find_pc_partial_function.
3738         * blockframe.c (find_function_entry_range_from_pc): New function.
3739         * symtab.h (find_function_entry_range_from_pc): Declare and document.
3740         * objfiles.c (objfile_relocate1): Relocate start and end addresses
3741         for each range in a block.
3742
3743
3744 2018-08-23  Xavier Roirand  <roirand@adacore.com>
3745
3746         * machoread.c (macho_symfile_read_all_oso): Remove uneeded
3747         incrementation.
3748
3749 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
3750
3751         * solib-svr4.c (read_program_headers_from_bfd): Return
3752         gdb::optional<gdb::byte_vector>.
3753         (svr4_exec_displacement): Adjust.
3754
3755 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
3756
3757         * solib-svr4.c (read_program_header): Return
3758         gdb::optional<gdb::byte_vector>, remove p_sect_size param.
3759         (find_program_interpreter): Return
3760         gdb::optional<gdb::byte_vector>.
3761         (scan_dyntag_auxv): Adjust.
3762         (enable_break): Adjust.
3763         (svr4_exec_displacement): Adjust.
3764
3765 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
3766
3767         * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
3768         * inf-child.c (inf_child_target::terminal_save_inferior): New.
3769
3770 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
3771
3772         * guile/scm-string.c (gdbscm_scm_from_printf): Use
3773         string_vprintf.
3774         * guile/scm-utils.c (gdbscm_printf): Likewise.
3775         * serial.c (serial_printf): Likewise.
3776         * xml-support.c (gdb_xml_parser::vdebug): Likewise.
3777
3778 2018-08-22  Jan Vrany  <jan.vrany@fit.cvut.cz>
3779
3780         * stack.c (print_frame): Print frame architecture when printing on
3781         an MI output.
3782         * NEWS: Mention new "arch" attribute in frame output.
3783
3784 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
3785
3786         * arch/aarch64.h (aarch64_regnum): Update comment.
3787
3788 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
3789
3790         * NEWS: Add SVE to 8.2 section.
3791
3792 2018-08-21  Pedro Alves  <palves@redhat.com>
3793
3794         * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
3795         out from gdbscm_parse_function_args.
3796         (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
3797         gdbscm_parse_function_args_1.
3798
3799 2018-08-21  Simon Marchi  <simon.marchi@ericsson.com>
3800
3801         PR gdb/17816
3802         * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
3803         operator.
3804
3805 2018-08-19  Simon Marchi  <simon.marchi@polymtl.ca>
3806
3807         * solib-svr4.c (svr4_exec_displacement): Fix formatting.
3808
3809 2018-08-19  Michael Spang  <spang@google.com>
3810
3811         PR gdb/11786
3812         * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
3813         for PT_TLS segments.
3814
3815 2018-08-18  Kevin Buettner  <kevinb@redhat.com>
3816
3817         * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
3818         dwarf_variable_value.
3819         * dwarf2-frame.c (class dwarf_expr_executor):
3820         Add override for dwarf_variable_value.
3821         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
3822         (class symbol_needs_eval_context): Likewise.
3823         (indirect_synthetic_pointer): Add forward declaration.
3824         (sect_variable_value): New function.
3825         (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
3826         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
3827         for DW_OP_GNU_variable_value.
3828
3829 2018-08-16  Tom Tromey  <tom@tromey.com>
3830
3831         * top.c (read_command_file): Update.
3832         (command_line_input): Remove "repeat" argument.
3833         * ada-lang.c (get_selections): Update.
3834         * linespec.c (decode_line_2): Update.
3835         * defs.h (command_line_input): Remove argument.
3836         * cli/cli-script.c (read_next_line): Update.
3837         * python/py-gdb-readline.c: Update.
3838
3839 2018-08-17  Tom Tromey  <tom@tromey.com>
3840
3841         * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
3842         command_line_input.
3843
3844 2018-08-15  Tom Tromey  <tom@tromey.com>
3845
3846         * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
3847
3848 2018-08-14  Jan Vrany  <jan.vrany@fit.cvut.cz>
3849
3850         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
3851         If used, use find_pc_partial_function to find address range
3852         to disassemble.
3853         * mi/mi-main.c (mi_cmd_list_features): Report
3854         "data-disassemble-a-option" feature.
3855         * NEWS: Mention new -data-disassemble option -a.
3856
3857 2018-08-13  Tom Tromey  <tom@tromey.com>
3858
3859         * common/common-defs.h (_FORTIFY_SOURCE): Define.
3860
3861 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
3862
3863         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
3864         (aarch64_linux_collect_sve_regset): Likewise.
3865         (aarch64_linux_iterate_over_regset_sections): Check for SVE.
3866         * regcache.h (regcache_map_entry_size): New function.
3867
3868 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
3869
3870         * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
3871         (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
3872         (SVE_HEADER_VL_LENGTH): Likewise.
3873         (SVE_HEADER_MAX_VL_LENGTH): Likewise.
3874         (SVE_HEADER_FLAGS_LENGTH): Likewise.
3875         (SVE_HEADER_RESERVED_LENGTH): Likewise.
3876         (SVE_HEADER_SIZE_OFFSET): Likewise.
3877         (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
3878         (SVE_HEADER_VL_OFFSET): Likewise.
3879         (SVE_HEADER_MAX_VL_OFFSET): Likewise.
3880         (SVE_HEADER_FLAGS_OFFSET): Likewise.
3881         (SVE_HEADER_RESERVED_OFFSET): Likewise.
3882         (SVE_HEADER_SIZE): Likewise.
3883         (aarch64_linux_core_read_vq): Add function.
3884         (aarch64_linux_core_read_description): Check for SVE section.
3885
3886 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
3887
3888         * aarch64-fbsd-tdep.c
3889         (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
3890         collect_size.
3891         * aarch64-linux-tdep.c
3892         (aarch64_linux_iterate_over_regset_sections): Likewise.
3893         * alpha-linux-tdep.c
3894         (alpha_linux_iterate_over_regset_sections):
3895         * alpha-nbsd-tdep.c
3896         (alphanbsd_iterate_over_regset_sections): Likewise.
3897         * amd64-fbsd-tdep.c
3898         (amd64fbsd_iterate_over_regset_sections): Likewise.
3899         * amd64-linux-tdep.c
3900         (amd64_linux_iterate_over_regset_sections): Likewise.
3901         * arm-bsd-tdep.c
3902         (armbsd_iterate_over_regset_sections): Likewise.
3903         * arm-fbsd-tdep.c
3904         (arm_fbsd_iterate_over_regset_sections): Likewise.
3905         * arm-linux-tdep.c
3906         (arm_linux_iterate_over_regset_sections): Likewise.
3907         * corelow.c (get_core_registers_cb): Likewise.
3908         (core_target::fetch_registers): Likewise.
3909         * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
3910         * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
3911         * gdbarch.h (void): Regenerate.
3912         * gdbarch.sh: Add supply_size and collect_size.
3913         * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
3914         * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
3915         * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
3916         * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
3917         * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
3918         * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
3919         * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
3920         * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
3921         * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
3922         * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
3923         * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
3924         * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
3925         * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
3926         * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
3927         * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
3928         * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
3929         * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
3930         * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
3931         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
3932         * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
3933         * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
3934         * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
3935         * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
3936         * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
3937         * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
3938         * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
3939         * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
3940         * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
3941         * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
3942         * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
3943
3944 2018-08-10  Simon Marchi  <simon.marchi@ericsson.com>
3945
3946         * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
3947         with string_printf.
3948
3949 2018-08-10  Keith Seitz  <keiths@redhat.com>
3950
3951         * compile/compile-c-support.c (add_code_header, add_code_footer):
3952         Move into policy class.
3953         (c_push_user_expression, pop_user_expression_nop)
3954         (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
3955         (compile_program): New host class.
3956         (c_compile_program): New typedef.
3957         (c_compute_porgram): Use c_compile_program.
3958
3959 2018-08-10  Keith Seitz  <keiths@redhat.com>
3960
3961         * compile/compile-internal.h (compile_instance::~compile_instance):
3962         Remove calls to htab_delete.
3963         <m_type_map, m_symbol_err_map>: Switch type to htab_up.
3964         * compile.c (compile_instance::compile_instance): Initialize
3965         htab unique pointers.
3966         (compile_instance::get_cached_type, compile_instance::insert_type)
3967         (compile_instance::error_symbol_once): Update for unique_ptr.
3968
3969 2018-08-10  Keith Seitz  <keiths@redhat.com>
3970
3971         * compile/compile-c-symbols.c (struct symbol_error)
3972         (hash_symbol_error, eq_symbol_error, del_symbol_error)
3973         (compile_instance::insert_symbol_error)
3974         (compile_instance::error_symbol_once): Move to ...
3975         * compile/compile.c: ... here.
3976
3977 2018-08-10  Keith Seitz  <keiths@redhat.com>
3978
3979         * compile/compile-c-support.c (c_get_compile_context): Use `new'
3980         instead of `new_compile_instance'.
3981         * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
3982         Update description.
3983         If the symbol error map is not initialized, create it.
3984         (generate_c_for_for_one_symbol): Do not check/initialize
3985         the symbol error map.
3986         * compile/compile-c-types.c (compile_c_instance): Make a class.
3987         Update all callers.
3988         (compile_instance::compile_instance): Initialize the type cache.
3989         (get_cached_type): New function.
3990         (insert_type): Update description.
3991         (compile_c_instance::m_default_cflags): Define.
3992         (convert_type): Update description.  Use get_cached_type.
3993         (delete_instance): Moved to destructor.
3994         (new_compile_instance): Moved to constructor.
3995         * compile/compile-c.h (compile_c_instance): Make class inheriting
3996         from compile_instance.
3997         <base>: Remove field.
3998         <type_map, symbol_err_map>: Move to base class.
3999         <c_plugin>: Rename to `m_plugin' and remove pointer type.
4000         * compile/compile-internal.h (compile_instance): Make class.
4001         <type_map_t, symbol_err_map_t>: Define.
4002         <fe>: Rename to `m_gcc_fe'.
4003         <scope, block, gcc_target_options>: Add `m_' prefix.
4004         <m_type_map, m_symbol_err_map>: New fields, moved from
4005         compile_c_instance.
4006         <destroy>: Remove.
4007         (convert_type, new_compile_instance): Remove.
4008         * compile/compile.c (cleanup_compile_instance): Remove.
4009         (compile_to_object): Use unique_ptr to eliminate cleanups.
4010         (compile_instance::set_print_callback, compile_instance::version)
4011         (compile_instance::set_verbose)
4012         (compile_instance::set_driver_filename)
4013         (compile_instance::set_triplet_regexp)
4014         (compile_instance::set_arguments)
4015         (compile_instance::set_source_file)
4016         (compile_instance::compile): Define.
4017
4018 2018-08-10  Keith Seitz  <keiths@redhat.com>
4019
4020         * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
4021         * compile/compile-c-types.c: Define GCC_METHODN macros and include
4022         gcc-c-fe.def to define C plugin.
4023         (delete_instance): Delete `c_plugin'.
4024         (new_compile_instance): Initialize `c_plugin'.
4025         * compile/compile-c.h: Include gcc_c_plugin.h.
4026         (struct compile_c_instance) <c_plugin>: New member.
4027         * gcc-c-plugin.h: New file.
4028         Update all callers with API change.
4029
4030 2018-08-10  Keith Seitz  <keiths@redhat.com>
4031
4032         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
4033         (HFILES_NO_SRCDIR): ... to here.
4034         Add compile-internal.h and compile-c.h.
4035         * compile/compile-c-support.c: Include compile-c.h.
4036         * compile/compile-c-symbols.c: Include compile-c.h.
4037         (generate_c_for_variable_locations): Update comment.
4038         * compile/compile-c-types.c: Include compile-c.h.
4039         * compile/compile-c.h: New file -- moved C language declarations
4040         from other files here.
4041         * compile/compile-internal.h: Do not include hashtab.h or
4042         common/enum-flags.h.
4043         (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
4044         (gcc_convert_symbol, gcc_symbol_address)
4045         (generate_c_for_variable_locations, c_get_mode_for_size)
4046         (c_get_range_decl_name): Definitions moved to compile-c.h.
4047         * compile/compile-loc2c.c: Include compile-c.h.
4048
4049 2018-08-10  Keith Seitz  <keiths@redhat.com>
4050
4051         * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
4052         (c_symbol_substitution_name): ... this.
4053         Update all callers.
4054
4055 2018-08-10  Keith Seitz  <keiths@redhat.com>
4056
4057         * compile/compile-c-support.c (c_compute_program): Use
4058         unique_xmalloc_ptr to eliminate cleanup.
4059         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
4060         Return a unique_xmalloc_ptr and eliminate cleanup.
4061         * compile/compile-internal.h (generate_c_for_variable_locations):
4062         Return unique_xmalloc_ptr and update description.
4063
4064 2018-08-10  Alan Hayward  <alan.hayward@arm.com>
4065
4066         * corelow.c (core_target::get_core_register_section): Rename
4067         min_size to section_min_size.
4068
4069 2018-08-09  Jim Wilson  <jimw@sifive.com>
4070
4071         * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
4072         (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
4073         * NEWS: Mention new GNU/Linux RISC-V target.
4074         * configure.host: Add riscv*-*-linux*.
4075         * configure.nat: Add riscv*.
4076         * configure.tgt: Add riscv*-*-linux*.
4077         * riscv-linux-nat.c: New file.
4078         * riscv-linux-tdep.c: New file.
4079
4080 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
4081
4082         * infrun.c (resume): Make static, add forward declaration.
4083         (proceed): Update header comment.
4084         * infrun.h (resume): Delete declaration.
4085
4086 2018-08-09  Tom Tromey  <tom@tromey.com>
4087
4088         * riscv-tdep.h: Minor formatting fixes.
4089
4090 2018-08-09  Simon Marchi  <simon.marchi@ericsson.com>
4091
4092         * common/scoped_mmap.c (mmap_file): Silence ARI warning.
4093         * dwarf-index-cache.c (create_dir_and_check): Likewise.
4094         (test_mkdir_recursive): Likewise.
4095         * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
4096
4097 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
4098
4099         * valarith.c (value_subscripted_rvalue): If an array is not in
4100         memory, and we don't know the upper bound, then we can't know that
4101         the requested element exists or not.
4102
4103 2018-08-08  Simon Marchi  <simon.marchi@ericsson.com>
4104
4105         * target.c (str_comma_list_concat_elem): Fix typo in comment.
4106         (target_options_to_string): Add comment.
4107
4108 2018-08-08  Tom Tromey  <tom@tromey.com>
4109
4110         * unittests/scoped_mmap-selftests.c: Check result of "write".
4111
4112 2018-08-08  Jim Wilson  <jimw@sifive.com>
4113
4114         * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
4115         (decode_register_index_short): New.
4116         (decode_j_type_insn, decode_cj_type_insn): New.
4117         (decode_b_type_insn, decode_cb_type_insn): New.
4118         (riscv_insn::decode): Add support for jumps, branches, lr, and sc.  New
4119         local xlen.  Check xlen when decoding ambiguous compressed insns.  In
4120         compressed decode, use is_c_lui_insn instead of is_lui_insn, and
4121         is_c_sw_insn instead of is_sw_insn.
4122         (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
4123         (riscv_software_single_step): New.
4124         * riscv-tdep.h (riscv_software_single_step): Declare.
4125
4126         * riscv-tdep.c (riscv_isa_xlen): Drop static.
4127         * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
4128
4129 2018-08-08  Andrew Burgess  <andrew.burgess@embecosm.com>
4130
4131         PR gdb/18050:
4132         * target.c (dispose_inferior): Don't dispose of inferiors that are
4133         already killed.
4134
4135 2018-08-08  Szabolcs Nagy  <szabolcs.nagy@arm.com>
4136
4137         * remote.c (remote_target::download_tracepoint): Change char* to
4138         const char*.
4139
4140 2018-08-07  Simon Marchi  <simon.marchi@polymtl.ca>
4141
4142         * target.h (target_options_to_string): Return an std::string.
4143         * target.c (str_comma_list_concat_elem): Return void, use
4144         std::string.
4145         (do_option): Likewise.
4146         (target_options_to_string): Return an std::string.
4147         * linux-nat.c (linux_nat_target::wait): Adjust.
4148         * target-debug.h (target_debug_print_options): Adjust.
4149
4150 2018-08-07  Tom Tromey  <tom@tromey.com>
4151
4152         * Makefile.in (CPPFLAGS): New variable.
4153         (INTERNAL_CPPFLAGS): Use it.
4154
4155 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4156
4157         * NEWS: Mention the index cache.
4158
4159 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4160
4161         * common/pathstuff.h (get_standard_cache_dir): New.
4162         * common/pathstuff.c (get_standard_cache_dir): New.
4163         * build-id.h (build_id_to_string): New.
4164         * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
4165         DEBUG_STR_SUFFIX): Move to here.
4166         * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
4167         DEBUG_STR_SUFFIX): Move from there.
4168         (write_psymtabs_to_index): Make non-static, add basename
4169         parameter.  Write to temporary files, rename when done.
4170         (save_gdb_index_command): Adjust call to
4171         write_psymtabs_to_index.
4172         * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
4173         field.
4174         * dwarf2read.c (dwz_file) <index_cache_res>: New field.
4175         (get_gdb_index_contents_from_cache): New.
4176         (get_gdb_index_contents_from_cache_dwz): New.
4177         (dwarf2_initialize_objfile): Read index from cache.
4178         (dwarf2_build_psymtabs): Save to index.
4179         * dwarf-index-cache.h: New file.
4180         * dwarf-index-cache.c: New file.
4181         * dwarf-index-write.h: New file.
4182
4183 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4184
4185         * gnulib/aclocal.m4: Re-generate.
4186         * gnulib/config.in: Re-generate.
4187         * gnulib/configure: Re-generate.
4188         * gnulib/import/Makefile.am: Re-generate.
4189         * gnulib/import/Makefile.in: Re-generate.
4190         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
4191         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
4192         * gnulib/import/m4/mkdir.m4: New file.
4193         * gnulib/import/mkdir.c: New file.
4194         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
4195         module.
4196
4197 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4198
4199         * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
4200         * common/scoped_mmap.c: New file.
4201         * common/scoped_mmap.h (destroy): New method.
4202         (~scoped_mmap, reset): Use destroy.
4203         (scoped_mmap): New move constructor.
4204         (mmap_file): New declaration.
4205         * unittests/scoped_mmap-selftests.c (test_normal,
4206         test_invalid_filename, run_tests): New functions.
4207         (_initialize_scoped_mmap_selftests): Register selftest.
4208
4209 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4210
4211         * dwarf2read.c (read_gdb_index_from_section): Rename to...
4212         (read_gdb_index_from_buffer): ... this.  Remove section
4213         parameter, add buffer parameter.
4214         (get_gdb_index_contents_ftype,
4215         get_gdb_index_contents_dwz_ftype): New typedefs.
4216         (dwarf2_read_gdb_index): Add callback parameters to get the
4217         index contents.
4218         (get_gdb_index_contents_from_section): New.
4219         (dwarf2_initialize_objfile): Update call to
4220         dwarf2_read_gdb_index.
4221
4222 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4223
4224         * common/filestuff.h (gdb_fopen_cloexec): New overload.
4225         (gdb_open_cloexec): Likewise.
4226         * nat/linux-osdata.c (command_from_pid): Use string_printf.
4227         (commandline_from_pid): Likewise.
4228         (linux_xfer_osdata_threads): Likewise.
4229         (linux_xfer_osdata_fds): Likewise.
4230         * ada-lang.c (is_package_name): Likewise.
4231         * auxv.c (procfs_xfer_auxv): Likewise.
4232         * breakpoint.c (print_one_breakpoint_location): Use
4233         uiout::field_fmt.
4234         (print_one_catch_solib): Use string_printf.
4235         * coff-pe-read.c (add_pe_exported_sym): Likewise.
4236         (add_pe_forwarded_sym): Likewise.
4237         * dwarf2read.c (create_type_unit_group): Likewise.
4238         (build_error_marker_type): Likewise.
4239         * infcall.c (get_function_name): Likewise.
4240         * valprint.c (print_converted_chars_to_obstack): Likewise.
4241         * xtensa-tdep.c (xtensa_register_type): Likewise.
4242
4243 2018-08-06  Simon Marchi  <simon.marchi@ericsson.com>
4244
4245         * remote.c (remote_target::download_tracepoint): Fix format
4246         string errors.
4247
4248 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
4249
4250         * tracefile.c: Include common/byte-vector.h.
4251         (trace_save): Change type of buf to gdb::byte_vector.  Initialize
4252         with trace_regblock_size if needed.  Update uses of buf.
4253
4254 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
4255
4256         * tracepoint.h (collection_list) <m_regs_mask>: Change type to
4257         std::vector<unsigned char>.
4258         * tracepoint.c (collection_list::collection_list): Remove
4259         m_regs_mask initializer from initializer list.  Resize
4260         m_regs_mask using the largest remote register number.
4261         (collection_list::add_remote_register): Remove size check on
4262         m_regs_mask.  Use at to access element.
4263         (collection_list::stringify): Change type of temp_buf to
4264         gdb::char_vector.  Update uses of temp_buf.  Resize if needed to
4265         stringify the register mask.  Use pack_hex_byte for the register
4266         mask.
4267
4268 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
4269
4270         * tracepoint.h (class collection_list) <add_register>: Remove.
4271         <add_remote_register, add_ax_registers, add_local_register>:
4272         Declare.
4273         <add_memrange>: Add scope parameter.
4274         * tracepoint.c (encode_actions_1): Likewise.
4275         (collection_list::add_register): Rename to ...
4276         (collection_list::add_remote_register): ... this.  Update
4277         comment.
4278         (collection_list::add_ax_registers, add_local_register): New
4279         methods.
4280         (collection_list::add_memrange): Add scope parameter.  Call
4281         add_local_register instead of add_register.
4282         (finalize_tracepoint_aexpr): New function.
4283         (collection_list::collect_symbol): Update calls to add_memrange.
4284         Call add_local_register instead of add_register.  Call
4285         add_ax_registers.  Call finalize_tracepoint_aexpr.
4286         (encode_actions_1): Get remote regnos for $reg action.  Call
4287         add_remote_register, add_ax_registers, and add_local_register.
4288         Update call to add_memrange.  Call finalize_tracepoint_aexpr.
4289         (validate_actionline): Call finalize_tracepoint_aexpr.
4290
4291 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
4292
4293         * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
4294         Replace array buf with gdb::char_vector buf, of size
4295         get_remote_packet_size ().  Replace references to buf and
4296         BUF_SIZE to buf.data () and buf.size ().  Replace strcpy, strcat
4297         and xsnprintf with snprintf.  Raise errors if the buffer is too
4298         small.
4299
4300 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
4301
4302         * remote.c (remote_target::download_tracepoint): Fix the has_more
4303         predicate in the QTDP action list iteration.
4304
4305 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
4306
4307         * remote.c (remote_target::download_tracepoint): Fix indentation
4308         in for block.
4309
4310 2018-08-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4311
4312         * proc-api.c (_initialize_proc_api): Remove c, unused.
4313         * procfs.c (procfs_init_inferior): Remove signals, unused.
4314         (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
4315         unused.
4316
4317 2018-08-06  Sergey Korolev  <s.korolev@ndmsystems.com>
4318             Andrew Burgess  <andrew.burgess@embecosm.com>
4319
4320         * linux-nat.c (linux_nat_target::follow_fork): Avoid using
4321         'W_STOPCODE (0)' as this could be ambiguous.
4322
4323 2018-08-03  Sergio Durigan Junior  <sergiodj@redhat.com>
4324
4325         * ser-tcp.c (net_open): Fix thinko when deciding whether to
4326         disable TCP's Nagle algorithm (use "ai_protocol" instead of
4327         "ai_socktype").
4328
4329 2018-08-02  Tom Tromey  <tom@tromey.com>
4330
4331         PR symtab/16842.
4332         * dwarf2read.c (read_func_scope): Set symtab on template parameter
4333         symbols.
4334         (process_structure_scope): Likewise.
4335
4336 2018-08-02  Xavier Roirand  <roirand@adacore.com>
4337
4338         PR gdb/22629:
4339         * darwin-nat.c (darwin_kill_inferior): Fix handling of
4340         kill inferior.
4341
4342 2018-08-02  Tom Tromey  <tom@tromey.com>
4343
4344         * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
4345         (darwin_suspend_inferior, darwin_resume_inferior)
4346         (darwin_decode_notify_message, darwin_resume_inferior_threads)
4347         (darwin_check_new_threads): Check result of get_darwin_inferior.
4348
4349 2018-07-31  Joel Brobecker  <brobecker@adacore.com>
4350
4351         GDB 8.1.1 released.
4352
4353 2018-07-31  Jan Vrany  <jan.vrany@fit.cvut.cz>
4354
4355         * varobj.c (varobj_get_path_expr_parent): Report an error if
4356         parent is a dynamic varobj.
4357
4358 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
4359
4360         * gnulib/aclocal.m4: Re-generate.
4361         * gnulib/config.in: Re-generate.
4362         * gnulib/configure: Re-generate.
4363         * gnulib/import/Makefile.in: Re-generate.
4364         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
4365         * gnulib/import/m4/onceonly.m4: Re-generate.
4366
4367 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
4368
4369         * target-descriptions.c (struct xml_test_tdesc): New.
4370         (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
4371         (record_xml_tdesc): Update.
4372         (maintenance_check_xml_descriptions): Update.
4373         * target-descriptions.h (record_xml_tdesc): Update comment.
4374
4375 2018-07-30  Andrew Burgess  <andrew.burgess@embecosm.com>
4376
4377         * eval.c (evaluate_subexp_for_sizeof): Check for array type before
4378         checking array bounds are defined.
4379
4380 2018-07-30  Tom Tromey  <tom@tromey.com>
4381
4382         * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
4383         irreflexivity violation.
4384
4385 2018-07-30  Tom Tromey  <tom@tromey.com>
4386
4387         * cli/cli-decode.c (lookup_cmd): Remove lint code.
4388         * value.c (unpack_long): Remove lint code.
4389         * valops.c (value_ind): Remove lint code.
4390         * valarith.c (value_x_binop, value_x_unop, value_equal)
4391         (value_pos): Remove lint code.
4392
4393 2018-07-28  Tom de Vries  <tdevries@suse.de>
4394
4395         * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
4396         with undefined upper bound as <optimized out>.
4397
4398 2018-07-27  Sergio Durigan Junior  <sergiodj@redhat.com>
4399
4400         * gcore.in: Rename variable "name" to "prefix".  Expand
4401         "usage" text.
4402
4403 2018-07-14  Jon Turney  <jon.turney@dronecode.org.uk>
4404
4405         * windows-nat.c (windows_nat_target::create_inferior): Update to
4406         call close() in global namespace.
4407
4408 2018-07-26  Tom Tromey  <tom@tromey.com>
4409
4410         * dwarf-index-write.c (add_address_entry): Don't add objfile
4411         offsets.
4412         * dbxread.c (find_stab_function): Rename from
4413         find_stab_function_addr.  Return a bound_minimal_symbol.
4414         (read_dbx_symtab): Use raw_text_low, raw_text_high.
4415         Don't add objfile offsets.
4416         (end_psymtab): Use raw_text_low, raw_text_high,
4417         MSYMBOL_VALUE_RAW_ADDRESS.
4418         (read_ofile_symtab): Update.
4419         (process_one_symbol): Update.
4420         * dwarf2read.c (create_addrmap_from_index): Don't add objfile
4421         offsets.
4422         (dw2_relocate): Remove.
4423         (dw2_find_pc_sect_symtab): Bias PC by the text offset before
4424         searching addrmap.
4425         (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
4426         Update.
4427         (process_psymtab_comp_unit_reader, add_partial_symbol)
4428         (add_partial_subprogram, dwarf2_ranges_read): Update.
4429         (load_partial_dies): Update.
4430         (add_address_entry): Don't add objfile offsets.
4431         (dwarf2_build_include_psymtabs): Update.
4432         (create_addrmap_from_aranges): Don't add objfile offsets.
4433         (dw2_find_pc_sect_compunit_symtab): Update.
4434         * mdebugread.c (parse_symbol): Don't add objfile offsets.
4435         (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
4436         Update.
4437         (parse_partial_symbols): Don't add objfile offsets.  Use
4438         raw_text_low, raw_text_high.  Update.
4439         (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
4440         * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
4441         or call 'relocate' quick function.  Clear psymbol_map.
4442         * psympriv.h (struct partial_symbol) <address>: Add section
4443         offset.
4444         <set_unrelocated_address>: Rename from set_address.
4445         <raw_text_low, raw_text_high>: New methods.
4446         <text_low, text_high>: Add objfile parameter.
4447         (add_psymbol_to_bcache): Add 'section' parameter.  Call
4448         set_unrelocated_address.
4449         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
4450         (find_pc_psymbol): Update.
4451         (fixup_psymbol_section, relocate_psymtabs): Remove.
4452         (dump_psymtab, psym_functions): Update.
4453         (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
4454         parameter.
4455         (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
4456         (start_psymtab_common): Update.
4457         * symfile-debug.c (debug_qf_relocate): Remove.
4458         (debug_sym_quick_functions): Update.
4459         * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
4460         * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
4461         Update.
4462
4463 2018-07-26  Tom Tromey  <tromey@redhat.com>
4464
4465         * dbxread.c (end_psymtab): Use text_high_valid and
4466         text_low_valid.
4467         * mdebugread.c (parse_partial_symbols): Use text_low_valid.
4468         (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
4469         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
4470         Update comment.
4471         <text_low_valid, text_high_valid>: New fields.
4472         <set_text_low, set_text_high>: Update.
4473         * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
4474
4475 2018-07-26  Tom Tromey  <tom@tromey.com>
4476
4477         * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
4478         Update.
4479         * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
4480         textlow and texthigh fields.
4481         (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
4482         Update.
4483         * mdebugread.c (parse_lines, parse_partial_symbols)
4484         (psymtab_to_symtab_1): Update.
4485         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
4486         Rename fields.  Update comment.  Now private.
4487         <text_low, text_high, set_text_low, set_text_high>: New methods.
4488         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
4489         (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
4490         (start_psymtab_common, maintenance_info_psymtabs)
4491         (maintenance_check_psymtabs): Update.
4492         * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
4493         texthigh fields.
4494         (scan_xcoff_symtab): Update.
4495
4496 2018-07-26  Tom Tromey  <tromey@redhat.com>
4497
4498         * psympriv.h (struct partial_symbol) <unrelocated_address,
4499         address, set_address>: New methods.
4500         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
4501         (fixup_psymbol_section, relocate_psymtabs): Update.
4502         (print_partial_symbols): Add 'objfile' parameter.  Update.
4503         (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
4504         Update.
4505
4506 2018-07-26  Tom Tromey  <tom@tromey.com>
4507
4508         * dwarf-index-write.c (write_psymbols, debug_names::insert)
4509         (debug_names::write_psymbols): Update.
4510         * psympriv.h (struct partial_symbol): Derive from
4511         general_symbol_info.
4512         <obj_section>: New method.
4513         (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
4514         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
4515         (find_pc_sect_psymbol, fixup_psymbol_section)
4516         (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
4517         (print_partial_symbols, recursively_search_psymtabs)
4518         (compare_psymbols, psymbol_hash, psymbol_compare)
4519         (add_psymbol_to_bcache, maintenance_check_psymtabs)
4520         (psymbol_name_matches, psym_fill_psymbol_map): Update.
4521
4522 2018-07-26  Tom Tromey  <tromey@redhat.com>
4523
4524         * dbxread.c (end_psymtab): Remove dead code.
4525
4526 2018-07-26  Andrew Burgess  <andrew.burgess@embecosm.com>
4527
4528         * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
4529         DWARF unwinders are disabled.
4530         * dwarf2-frame.c: Add dwarf2read.h include.
4531         (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
4532         disabled.
4533         (dwarf2_frame_unwinders_enabled_p): Define.
4534         (show_dwarf_unwinders_enabled_p): New function.
4535         (_initialize_dwarf2_frame): Register switch to control DWARF
4536         unwinder use.
4537         * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
4538         * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
4539         (show_dwarf_cmdlist): Remove static keyword.
4540         * dwarf2read.h (set_dwarf_cmdlist): Declare.
4541         (show_dwarf_cmdlist): Declare.
4542         * NEWS: Document new feature.
4543
4544 2018-07-26  Tom de Vries  <tdevries@suse.de>
4545
4546         PR breakpoints/23366
4547         * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
4548
4549 2018-07-26  Tom de Vries  <tdevries@suse.de>
4550
4551         * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
4552         DW_AT_count can't be translated to a dynamic prop.
4553
4554 2018-07-25  Tom de Vries  <tdevries@suse.de>
4555
4556         * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
4557         try/catch.
4558
4559 2018-07-25  Jan Vrany  <jan.vrany@fit.cvut.cz>
4560
4561         * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
4562
4563 2018-07-25  Joel Brobecker  <brobecker@adacore.com>
4564
4565         * MAINTAINERS (Global Maintainers): Add Tom Tromey.
4566
4567 2018-07-24  Keith Seitz  <keiths@redhat.comt
4568
4569         PR symtab/23010
4570         * dwarf2read.c (dw2_add_symbol_to_list): New function.
4571         (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
4572         instead of add_symbol_to_list.
4573         (read_file_scope): Call prepare_one_comp_unit before reading
4574         any other DIEs.
4575
4576 2018-07-24  Simon Marchi  <simon.marchi@ericsson.com>
4577
4578         * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
4579
4580 2018-07-24  Tom Tromey  <tom@tromey.com>
4581
4582         * utils.c (malloc, realloc, free): Don't declare.
4583         * configure, config.in: Rebuild.
4584         * configure.ac: Don't check for declarations of free, malloc, or
4585         realloc.
4586
4587 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
4588
4589         * aarch64-linux-nat.c
4590         (aarch64_linux_nat_target::stopped_data_address): Remove unused
4591         variable.
4592         * arm-linux-nat.c (fetch_regs): Likewise.
4593         (store_regs): Likewise.
4594         (fetch_vfp_regs): Likewise.
4595         (store_vfp_regs): Likewise.
4596         (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
4597         (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
4598         (arm_linux_nat_target::insert_watchpoint): Likewise.
4599         (arm_linux_nat_target::remove_watchpoint): Likewise.
4600         * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
4601         Likewise.
4602         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
4603         Likewise.
4604         * ppc-linux-nat.c (fetch_register): Likewise.
4605         (fetch_all_gp_regs): Likewise.
4606         (fetch_ppc_registers): Likewise.
4607         (store_all_gp_regs): Likewise.
4608         (store_ppc_registers): Likewise.
4609         (hwdebug_insert_point): Likewise.
4610         (can_use_watchpoint_cond_accel): Likewise.
4611         * remote-sim.c (gdb_os_write_stdout): Likewise.
4612
4613 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
4614             Tom Tromey  <tom@tromey.com>
4615
4616         * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
4617         test for it.
4618         * configure: Rebuild.
4619
4620 2018-07-22  Tom Tromey  <tom@tromey.com>
4621
4622         * regformats/regdat.sh: Define xmltarget_${name} inside
4623         #ifndef IN_PROCESS_AGENT.
4624
4625 2018-07-22  Tom Tromey  <tom@tromey.com>
4626
4627         * value.c (value_fetch_lazy_bitfield): Remove unused variable.
4628
4629 2018-07-22  Tom Tromey  <tom@tromey.com>
4630
4631         * symfile.c (reread_symbols): Notify iter, not objfile.
4632
4633 2018-07-22  Tom Tromey  <tom@tromey.com>
4634
4635         * ravenscar-thread.c (ravenscar_thread_target::store_registers):
4636         Use arch_ops.
4637         (ravenscar_thread_target::prepare_to_store): Likewise.
4638
4639 2018-07-22  Tom Tromey  <tom@tromey.com>
4640
4641         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
4642         unused variable.  Call value_fetch_lazy when needed.
4643         * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
4644         Remove unused variable.  Call value_fetch_lazy when needed.
4645
4646 2018-07-22  Tom Tromey  <tom@tromey.com>
4647
4648         * m32c-tdep.c (mark_dma): Return void.
4649         (make_regs): Remove unused declarations.
4650
4651 2018-07-22  Tom Tromey  <tom@tromey.com>
4652
4653         * guile/scm-cmd.c (gdbscm_dont_repeat): Call
4654         cmdscm_get_valid_command_smob_arg_unsafe for effect.
4655         * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
4656         bkscm_get_valid_block_smob_arg_unsafe for effect.
4657
4658 2018-07-22  Tom Tromey  <tom@tromey.com>
4659
4660         * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
4661         value_type.
4662
4663 2018-07-22  Tom Tromey  <tom@tromey.com>
4664
4665         * windows-nat.c (saved_context): Conditionally define.
4666         * remote.c (remote_target::remote_btrace_maybe_reopen):
4667         Conditionally declare "warned".
4668         * inflow.c (sigquit_ours): Conditionally define.
4669         (new_tty): Move "tty" declaration inside #if.
4670         * guile/guile.c (guile_datadir): Conditionally define.
4671         * charset.c (set_be_le_names): Move some declarations inside #if.
4672         * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
4673         #if.
4674         (parse_xml_btrace_conf): Likewise.
4675
4676 2018-07-22  Tom Tromey  <tom@tromey.com>
4677
4678         * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
4679
4680 2018-07-22  Tom Tromey  <tom@tromey.com>
4681
4682         * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
4683         * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
4684         (vlscm_convert_typed_value_from_scheme): Remove unused variable.
4685         * buildsym-legacy.c (get_macro_table): Remove unused variable.
4686         * stack.c (frame_apply_level_command): Remove unused variable.
4687         * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
4688         * sparc64-tdep.c (adi_examine_command): Remove unused variable.
4689         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
4690         unused variable.
4691         * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
4692         * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
4693         * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
4694         variable.
4695         * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
4696         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
4697         variable.
4698         * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
4699         Remove unused variable.
4700         * cli/cli-script.c (recurse_read_control_structure): Remove unused
4701         variable.
4702         * common/tdesc.c (print_xml_feature::visit): Remove unused
4703         variable.
4704         * compile/compile-object-load.c (store_regs): Remove unused
4705         variables.
4706         * complaints.c (clear_complaints): Remove unused variable.
4707         * corelow.c (core_target_open): Remove unused variable.
4708         * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
4709         variable.
4710         * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
4711         variable.
4712         * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
4713         variable.
4714         * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
4715         variable.
4716         * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
4717         variable.
4718         * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
4719         variable.
4720         * ia64-tdep.c (examine_prologue): Remove unused variable.
4721         * infcall.c (run_inferior_call): Remove unused variable.
4722         * inferior.c (exit_inferior): Remove unused variable.
4723         * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
4724         * linespec.c (decode_line_2): Remove unused variable.
4725         * linux-nat.c (super_close): Remove.
4726         * linux-tdep.c (linux_info_proc): Remove unused variable.
4727         * mi/mi-main.c (mi_execute_command): Remove unused variable.
4728         * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
4729         Remove unused variable.
4730         * parse.c (find_minsym_type_and_address): Remove unused variable.
4731         * printcmd.c (info_symbol_command, printf_floating): Remove unused
4732         variable.
4733         * python/py-breakpoint.c (bppy_set_commands): Remove unused
4734         variable.
4735         * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
4736         variables.
4737         * record-btrace.c (record_btrace_target::store_registers): Remove
4738         unused variable.
4739         (cmd_show_record_btrace_cpu): Remove unused variable.
4740         * riscv-tdep.c (riscv_register_reggroup_p)
4741         (riscv_push_dummy_call, riscv_return_value): Remove unused
4742         variable.
4743         * rust-exp.y (literal): Remove unused variable.
4744         * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
4745         unused variable.
4746         <STRUCTOP_ANONYMOUS>: Likewise.
4747         * s390-linux-tdep.c (s390_linux_init_abi_31)
4748         (s390_linux_init_abi_64): Remove unused variable.
4749         * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
4750         (file_select_thread, net_windows_open, _initialize_ser_windows):
4751         Remove unused variables.
4752         * symtab.c (find_pc_sect_line): Remove unused variable.
4753         * target-memory.c (compute_garbled_blocks): Remove unused
4754         variable.
4755         (target_write_memory_blocks): Remove unused variable.
4756         * target.c (target_stack::unpush): Remove unused variables.
4757         * tracepoint.c (start_tracing, all_tracepoint_actions)
4758         (merge_uploaded_trace_state_variables)
4759         (print_one_static_tracepoint_marker): Remove unused variable.
4760         * unittests/basic_string_view/element_access/char/1.cc (test01):
4761         Remove unused variable.
4762         * windows-nat.c (windows_continue, windows_add_all_dlls)
4763         (do_initial_windows_stuff, windows_nat_target::create_inferior):
4764         Remove unused variables.
4765
4766 2018-07-21  Simon Marchi  <simon.marchi@polymtl.ca>
4767
4768         * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
4769         attr_profile in HAVE_ELF.
4770         * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
4771         HAVE_ELF.
4772
4773 2018-07-20  Simon Marchi  <simon.marchi@polymtl.ca>
4774
4775         * frame.c (frame_register_unwind): Change parameter name.
4776         (frame_unwind_register): Likewise.
4777         (frame_unwind_register_value): Likewise.
4778         (frame_unwind_register_signed): Likewise.
4779         (frame_unwind_register_unsigned): Likewise.
4780         * frame.h (frame_register_unwind): Likewise.
4781         (frame_unwind_register): Likewise.
4782         (frame_unwind_register_value): Likewise.
4783         (frame_unwind_register_signed): Likewise.
4784         (frame_unwind_register_unsigned): Likewise.
4785         (frame_unwind_arch): Likewise.
4786
4787 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
4788
4789         * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
4790         ISA maintenance.
4791
4792 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
4793
4794         * mips-linux-nat.c (mips_linux_nat_target::read_description):
4795         Call `get_ptrace_pid' rather than extracting the ptrace PID by
4796         hand.
4797
4798 2018-07-20  Keith Seitz  <keiths@redhat.com>
4799
4800         * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
4801         m_main_subfile, m_comp_dir, m_producer, m_debugformat,
4802         m_compunit_symtab, m_language>: Add "m_" prefix.
4803         Update all uses.
4804         * buildsym.c: Update all uses.
4805
4806 2018-07-20  Tom Tromey  <tom@tromey.com>
4807
4808         * buildsym-legacy.h (record_line): Don't use record_line_ftype.
4809         * buildsym.h (record_line_ftype): Remove typedef.
4810
4811 2018-07-20  Tom Tromey  <tom@tromey.com>
4812
4813         * buildsym-legacy.h (augment_type_symtab): Don't declare.
4814         (end_expandable_symtab): Likewise.
4815         (end_symtab_get_static_block): Likewise.
4816         (end_symtab_from_static_block): Likewise.
4817         * buildsym-legacy.c (augment_type_symtab): Remove.
4818         (end_expandable_symtab): Remove.
4819         (end_symtab_get_static_block): Remove.
4820         (end_symtab_from_static_block): Remove.
4821
4822 2018-07-20  Tom Tromey  <tom@tromey.com>
4823
4824         * dwarf2read.c: Include buildsym.h.
4825         (struct dwarf2_cu) <builder>: New method.
4826         (fixup_go_packaging): Update.
4827         (process_full_comp_unit, process_full_type_unit): Update.  Don't
4828         use scoped_free_pendings.
4829         (using_directives): Add "cu" parameter, remove "language".
4830         (read_import_statement, setup_type_unit_groups, )
4831         (read_func_scope, read_lexical_block_scope)
4832         (dwarf2_record_block_ranges, read_namespace): Update.
4833         (lnp_state_machine::lnp_state_machine): Add cu parameter.
4834         (lnp_state_machine::handle_end_sequence): Update.
4835         (class lnp_state_machine) <m_cu>: New member.
4836         <m_record_line_callback>: Remove.
4837         <m_currently_recording_lines>: New member.
4838         (lnp_state_machine::handle_set_file): Update.
4839         (noop_record_line): Remove.
4840         (dwarf_record_line_p): Add cu parameter.
4841         (dwarf_record_line_1, dwarf_finish_line): Likewise.
4842         (lnp_state_machine::record_line)
4843         (lnp_state_machine::lnp_state_machine)
4844         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
4845         (dwarf_decode_lines): Update.
4846         (dwarf2_start_subfile): Add cu parameter.
4847         (dwarf2_start_symtab, new_symbol): Update.
4848         (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
4849         Remove dwarf2_per_objfile parameter.
4850         (dwarf_decode_macros): Update.
4851
4852 2018-07-20  Tom Tromey  <tom@tromey.com>
4853
4854         * stabsread.c (define_symbol): Update.
4855         * buildsym-legacy.h (get_buildsym_compunit): Declare.
4856         * dwarf2read.c (new_symbol): Update.
4857         * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
4858         * cp-namespace.c: Include buildsym.h.
4859         (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
4860         * buildsym-legacy.c (get_buildsym_compunit): New function.
4861
4862 2018-07-20  Tom Tromey  <tom@tromey.com>
4863
4864         * xcoffread.c: Include buildsym-legacy.h.
4865         * windows-nat.c: Include buildsym-legacy.h.
4866         * stabsread.c: Include buildsym-legacy.h.
4867         * mdebugread.c: Include buildsym-legacy.h.
4868         * buildsym-legacy.h: New file.
4869         * buildsym-legacy.c: New file, from buildsym.c.
4870         * go32-nat.c: Include buildsym-legacy.h.
4871         * dwarf2read.c: Include buildsym-legacy.h.
4872         * dbxread.c: Include buildsym-legacy.h.
4873         * cp-namespace.c: Include buildsym-legacy.h.
4874         * coffread.c: Include buildsym-legacy.h.
4875         * buildsym.h: Move some contents to buildsym-legacy.h.
4876         * buildsym.c: Include buildsym-legacy.h.  Move many functions to
4877         buildsym-legacy.c.
4878         * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
4879
4880 2018-07-20  Tom Tromey  <tom@tromey.com>
4881
4882         * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
4883         * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
4884         (buildsym_compunit::buildsym_compunit)
4885         (buildsym_compunit::~buildsym_compunit)
4886         (buildsym_compunit::get_macro_table): Define.
4887
4888 2018-07-20  Tom Tromey  <tom@tromey.com>
4889
4890         * buildsym.c (reset_symtab_globals): Remove.
4891         (buildsym_compunit::end_symtab_from_static_block): Update.
4892         (buildsym_compunit::augment_type_symtab): Update.
4893         (end_symtab_from_static_block): Call free_buildsym_compunit.
4894         (augment_type_symtab, end_symtab, end_expandable_symtab):
4895         Likewise.
4896
4897 2018-07-20  Tom Tromey  <tom@tromey.com>
4898
4899         * arch-utils.c: Do not include buildsym.h.
4900         * mipsread.c: Do not include buildsym.h.
4901         * machoread.c: Do not include buildsym.h.
4902         * elfread.c: Do not include buildsym.h.
4903
4904 2018-07-20  Tom Tromey  <tom@tromey.com>
4905
4906         * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
4907         initialization.
4908         (buildsym_compunit): Add new constructor.
4909         (struct buildsym_compunit) <get_last_source_file, finish_block,
4910         record_block_range, start_subfile, patch_subfile_names,
4911         push_subfile, pop_subfile, record_line, get_compunit_symtab,
4912         set_last_source_start_addr, get_last_source_start_addr,
4913         get_local_using_directives, set_local_using_directives,
4914         get_global_using_directives, outermost_context_p,
4915         get_current_context_stack, get_context_stack_depth,
4916         get_current_subfile, get_local_symbols, get_file_symbols,
4917         get_global_symbols, record_debugformat, record_producer,
4918         push_context, pop_context, end_symtab_get_static_block,
4919         end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
4920         New public methods.
4921         <record_pending_block, finish_block_internal, make_blockvector,
4922         watch_main_source_file_lossage, end_symtab_with_blockvector>: New
4923         private methods.
4924         Update all users.
4925
4926 2018-05-22  Tom Tromey  <tom@tromey.com>
4927
4928         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
4929         parameter.
4930         (finish_block_internal): Update.
4931
4932 2018-07-20  Tom Tromey  <tom@tromey.com>
4933
4934         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
4935         parameter.
4936         (finish_block_internal): Update.
4937
4938 2018-07-20  Tom Tromey  <tom@tromey.com>
4939
4940         * buildsym.h (EXTERN): Don't define or undef.
4941         * buildsym.c (EXTERN): Don't define.
4942
4943 2018-07-20  Tom Tromey  <tom@tromey.com>
4944
4945         * buildsym.c: Remove TODO comment.
4946
4947 2018-07-20  Tom Tromey  <tom@tromey.com>
4948
4949         * coffread.c (coff_symtab_read): Update.
4950         * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
4951         (xcoff_new_init): Update.
4952         * mipsread.c (mipscoff_new_init): Update.
4953         * mdebugread.c (mdebug_build_psymtabs): Update.
4954         * elfread.c (elf_new_init): Update.
4955         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
4956         Update.
4957         * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
4958         (coffstab_build_psymtabs, elfstab_build_psymtabs)
4959         (stabsect_build_psymtabs): Update.
4960         * buildsym.h (buildsym_init): Don't declare.
4961         * buildsym.c: Update comment.
4962         (prepare_for_building): Remove.
4963         (start_symtab, restart_symtab): Update.
4964         (reset_symtab_globals): Update comment.
4965         (buildsym_init): Remove.
4966
4967 2018-07-20  Tom Tromey  <tom@tromey.com>
4968
4969         * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
4970         * stabsread.c (patch_block_stabs, define_symbol, read_type)
4971         (read_enum_type, common_block_start, common_block_end)
4972         (cleanup_undefined_types_1, finish_global_stabs): Update.
4973         * mdebugread.c (psymtab_to_symtab_1): Update.
4974         * dwarf2read.c (fixup_go_packaging, read_func_scope)
4975         (read_lexical_block_scope, new_symbol): Update.
4976         * dbxread.c (process_one_symbol): Update.
4977         * coffread.c (coff_symtab_read, process_coff_symbol)
4978         (coff_read_enum_type): Update.
4979         * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
4980         declare.
4981         (get_local_symbols, get_file_symbols, get_global_symbols): New
4982         functions.
4983         * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
4984         m_global_symbols.
4985         <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
4986         (~scoped_free_pendings): Update.
4987         (finish_block, prepare_for_building, reset_symtab_globals)
4988         (end_symtab_get_static_block, end_symtab_with_blockvector)
4989         (augment_type_symtab, push_context): Update.
4990         (get_local_symbols, get_file_symbols, get_global_symbols): New
4991         functions.
4992         (buildsym_init): Update.
4993
4994 2018-07-20  Tom Tromey  <tom@tromey.com>
4995
4996         * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
4997         (process_full_type_unit): Likewise.
4998         (dwarf2_start_symtab): Set list_in_scope.
4999
5000 2018-07-20  Tom Tromey  <tom@tromey.com>
5001
5002         * dwarf2read.c (process_psymtab_comp_unit_reader)
5003         (build_type_psymtabs_reader): Do not set list_in_scope.
5004
5005 2018-07-20  Tom Tromey  <tom@tromey.com>
5006
5007         * buildsym.c (free_pendings): Remove.
5008         (add_symbol_to_list, scoped_free_pendings)
5009         (finish_block_internal, buildsym_init): Update.
5010
5011 2018-07-20  Tom Tromey  <tom@tromey.com>
5012
5013         * xcoffread.c (read_xcoff_symtab): Update.
5014         * dwarf2read.c (read_func_scope, read_lexical_block_scope):
5015         Update.
5016         * dbxread.c (process_one_symbol): Update.
5017         * coffread.c (coff_symtab_read): Update.
5018         * buildsym.h (finish_block): Update.
5019         * buildsym.c (finish_block): Remove "listhead" argument.
5020         (end_symtab_get_static_block): Update.
5021
5022 2018-07-20  Tom Tromey  <tom@tromey.com>
5023
5024         * buildsym.h (class scoped_free_pendings): Remove constructor.
5025         * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
5026         method.
5027         <m_pending_block_obstack, m_pending_blocks>: New members.
5028         (pending_block_obstack, pending_blocks): Remove.
5029         (scoped_free_pendings::scoped_free_pendings): Default.
5030         (~scoped_free_pendings): Update.
5031         (free_pending_blocks): Remove.
5032         (finish_block_internal, record_pending_block, make_blockvector)
5033         (end_symtab_get_static_block, augment_type_symtab, push_context)
5034         (buildsym_init): Update.
5035
5036 2018-07-20  Tom Tromey  <tom@tromey.com>
5037
5038         * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
5039         m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
5040         members.
5041         (pending_addrmap, pending_addrmap_obstack)
5042         (pending_addrmap_interesting): Remove.
5043         (scoped_free_pendings, record_block_range, make_blockvector)
5044         (prepare_for_building, reset_symtab_globals, buildsym_init):
5045         Update.
5046
5047 2018-07-20  Tom Tromey  <tom@tromey.com>
5048
5049         * xcoffread.c (process_linenos): Update.
5050         * stabsread.c (define_symbol, read_type, read_enum_type): Update.
5051         * mdebugread.c (psymtab_to_symtab_1): Update.
5052         * dwarf2read.c (setup_type_unit_groups)
5053         (lnp_state_machine::handle_set_file, dwarf_record_line_p)
5054         (lnp_state_machine::record_line, dwarf_decode_lines): Update.
5055         * dbxread.c (process_one_symbol): Update.
5056         * coffread.c (coff_symtab_read, enter_linenos)
5057         (process_coff_symbol): Update.
5058         * buildsym.h (current_subfile): Don't declare.
5059         (get_current_subfile): Declare.
5060         * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
5061         member.
5062         (start_subfile, free_buildsym_compunit, push_subfile)
5063         (prepare_for_building, start_symtab): Update.
5064         (get_current_subfile): New function.
5065
5066 2018-07-20  Tom Tromey  <tom@tromey.com>
5067
5068         * coffread.c (coff_symtab_read): Update.
5069         * xcoffread.c (read_xcoff_symtab): Update.
5070         * dwarf2read.c (new_symbol): Update.
5071         (read_func_scope, read_lexical_block_scope): Update.
5072         * dbxread.c (process_one_symbol): Update.
5073         * buildsym.h (context_stack, context_stack_depth): Don't declare.
5074         (outermost_context_p): Remove macro.
5075         (outermost_context_p, get_current_context_stack)
5076         (get_context_stack_depth): Declare.
5077         (pop_context): Return struct context_stack.
5078         * buildsym.c (struct buildsym_compunit) <m_context_stack: New
5079         member.
5080         (context_stack_size): Remove.
5081         (INITIAL_CONTEXT_STACK_SIZE): Remove.
5082         (prepare_for_building, end_symtab_get_static_block)
5083         (augment_type_symtab, push_context): Update.
5084         (pop_context): Return struct context_stack.
5085         (outermost_context_p, get_current_context_stack)
5086         (get_context_stack_depth): New functions.
5087         (buildsym_init): Update.
5088
5089 2018-07-20  Tom Tromey  <tom@tromey.com>
5090
5091         * rust-exp.y: Now a pure parser.  Update all rules.
5092         (%union): Move earlier.
5093         (current_parser, work_obstack): Remove globals.
5094         (rust_parser, ~rust_parser): Update.
5095         (class rust_parser) <copy_name, concat3, crate_name, super_name,
5096         lex_character, lex_number, lex_string, lex_identifier,
5097         rust_lookup_type, convert_params_to_types, convert_ast_to_type,
5098         convert_name, convert_params_to_expression,
5099         convert_ast_to_expression, ast_basic_type, ast_operation,
5100         ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
5101         ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
5102         ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
5103         ast_array_type, ast_slice_type, ast_reference_type,
5104         ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
5105         (rust_parse): Update.
5106         (rustyyerror, rustyylex): Add parser parameter.
5107         (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
5108         (rust_lex_stringish_test, rust_lex_test_sequence)
5109         (rust_lex_test_trailing_dot, rust_lex_test_completion)
5110         (rust_lex_test_push_back, rust_lex_tests): Update.
5111
5112 2018-07-19  Pedro Alves  <palves@redhat.com>
5113
5114         * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
5115         gdb::unique_xmalloc_ptr.
5116         * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
5117         Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
5118         * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
5119         copy-initialization.
5120         * guile/scm-pretty-print.c (ppscm_print_children): Use
5121         gdb::unique_xmalloc_ptr instead of cleanups.
5122         (gdbscm_apply_val_pretty_printer): Remove cleanups.
5123         * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
5124         gdb::unique_xmalloc_ptr.
5125         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
5126         Adjust to use gdb::unique_xmalloc_ptr.
5127         * guile/scm-utils.c (extract_arg): Adjust.
5128         * guile/scm-value.c (gdbscm_value_field): Adjust to use
5129         gdb::unique_xmalloc_ptr instead of a cleanup.
5130
5131 2018-07-19  Tom Tromey  <tom@tromey.com>
5132
5133         * utils.c (do_value_free_to_mark)
5134         (make_cleanup_value_free_to_mark): Remove.
5135         * utils.h (make_cleanup_value_free_to_mark): Remove.
5136
5137 2018-07-19  Pedro Alves  <palves@redhat.com>
5138
5139         * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
5140         forwarding reference.
5141
5142 2018-07-18  Pedro Alves  <palves@redhat.com>
5143
5144         * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
5145         gdbscm_wrap.  Use gdb::unique_xmalloc_ptr<char> instead of a
5146         cleanup.
5147
5148 2018-07-18  Pedro Alves  <palves@redhat.com>
5149
5150         * guile/guile-internal.h: Add comment about mixing GDB and Scheme
5151         exceptions.
5152         (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
5153         (gdbscm_wrap): New.
5154         * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
5155         directly instead of a cleanup.
5156         * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
5157         (vlscm_unop): ... this.  Reimplement using gdbscm_wrap.
5158         (vlscm_binop_gdbthrow): New, factored out from ...
5159         (vlscm_binop): ... this.  Reimplement using gdbscm_wrap.
5160         (vlscm_rich_compare): Use gdbscm_wrap.
5161         * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
5162         instead of a cleanup.
5163         (gdbscm_lookup_global_symbol): Use xfree directly instead of a
5164         cleanup.
5165         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
5166         Use xfree directly instead of a cleanup.
5167         * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
5168         Adjust to use gdbscm_wrap and scoped_value_mark.
5169         (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
5170         (gdbscm_value_address, gdbscm_value_dereference)
5171         (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
5172         scoped_value_mark.
5173         (gdbscm_value_dynamic_type): Use scoped_value_mark.
5174         (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
5175         scoped_value_mark.
5176         (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
5177         gdbscm_wrap and scoped_value_mark.
5178         (gdbscm_value_to_string): Use xfree directly instead of a
5179         cleanup.  Move 'buffer' unique_ptr to TRY scope.
5180         (gdbscm_value_to_lazy_string): Use xfree directly instead of a
5181         cleanup.  Move 'buffer' unique_ptr to TRY scope.  Use
5182         scoped_value_mark.
5183         (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
5184         (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
5185         scoped_value_mark.
5186         (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
5187         gdbscm_wrap.
5188
5189 2018-07-18  Tom de Vries  <tdevries@suse.de>
5190
5191         * findvar.c (default_read_var_value): Also resolve dynamic type for
5192         LOC_OPTIMIZED_OUT vars.
5193
5194 2018-07-18  Maciej W. Rozycki  <macro@mips.com>
5195
5196         * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
5197         decoding.
5198
5199 2018-07-17  Tom Tromey  <tom@tromey.com>
5200
5201         * guile/scm-param.c (pascm_set_func, pascm_show_func)
5202         (compute_enum_list, pascm_set_param_value_x)
5203         (gdbscm_parameter_value): Update.
5204         * guile/guile-internal.h (gdbscm_scm_to_string): Update.
5205         (gdbscm_scm_to_host_string): Update.
5206         * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
5207         Update.
5208         * guile/scm-cmd.c (cmdscm_add_completion): Update.
5209         * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
5210         * guile/scm-string.c (gdbscm_scm_to_string): Return
5211         unique_xmalloc_ptr.
5212         (gdbscm_scm_to_host_string): Likewise.
5213
5214 2018-07-17  Tom Tromey  <tom@tromey.com>
5215
5216         * guile/guile.c (gdbscm_eval_from_control_command): Update.
5217         * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
5218         * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
5219         * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
5220         unique_xmalloc_ptr.
5221
5222 2018-07-17  Tom Tromey  <tom@tromey.com>
5223
5224         * guile/scm-param.c (pascm_signal_setshow_error): Update.
5225         * guile/guile-internal.h (gdbscm_exception_message_to_string):
5226         Update.
5227         * guile/scm-cmd.c (cmdscm_function): Update.
5228         * guile/scm-pretty-print.c
5229         (ppscm_print_exception_unless_memory_error): Update.
5230         * guile/scm-exception.c (gdbscm_exception_message_to_string):
5231         Return unique_xmalloc_ptr.
5232
5233 2018-07-17  Tom Tromey  <tom@tromey.com>
5234
5235         * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
5236         Use string_printf.
5237
5238 2018-07-17  Jim Wilson  <jimw@sifive.com>
5239
5240         * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
5241         set_gdbarch_decr_pc_after_break.  Call riscv_read_misa_reg always.
5242         (riscv_gdbarch_init): Delete local has_compressed_isa.  Delete now
5243         unecessary braces after EF_RISCV_RVC test.  Delete call to
5244         set_gdbarch_decr_pc_after_break.
5245
5246         * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
5247         RISCV_LAST_FP_REGNUM + 1.
5248         (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
5249
5250 2018-07-17  Tom Tromey  <tom@tromey.com>
5251
5252         * configure.ac: Remove --disable-gdbcli.
5253         * configure: Rebuild.
5254         * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
5255         (SUBDIR_CLI_CFLAGS): Remove.
5256         (SFILES): Use SUBDIR_CLI_SRCS.
5257         (COMMON_OBS): Use SUBDIR_CLI_OBS.
5258
5259 2018-07-17  Tom Tromey  <tom@tromey.com>
5260
5261         PR gdb/18624:
5262         * coffread.c (coff_symtab_read): Use scoped_free_pendings.
5263
5264 2018-07-16  Jim Wilson  <jimw@sifive.com>
5265
5266         * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
5267
5268 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
5269
5270         * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
5271         variable.
5272         (libunwind_frame_sniffer): Likewise.
5273         (libunwind_frame_prev_register): Likewise.
5274         (libunwind_sigtramp_frame_sniffer): Likewise.
5275         * ia64-tdep.c (ia64_access_reg): Likewise.
5276         (ia64_access_rse_reg): Likewise.
5277         (ia64_libunwind_sigtramp_frame_this_id): Likewise.
5278         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
5279
5280 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
5281
5282         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
5283
5284 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
5285
5286         * remote-sim.c (gdbsim_target::close,
5287         gdbsim_target::mourn_inferior): Remove unused variables.
5288
5289 2018-07-16  Simon Marchi  <simon.marchi@polymtl.ca>
5290
5291         * ia64-tdep.c (ktab_buf): New global.
5292         (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
5293         (get_kernel_table): Adjust.
5294
5295 2018-07-16  Tom Tromey  <tom@tromey.com>
5296
5297         * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
5298         * dwarf2read.c (using_directives, new_symbol): Use
5299         outermost_context_p.
5300         * dbxread.c (process_one_symbol): Use outermost_context_p.
5301         * coffread.c (coff_symtab_read): Use outermost_context_p.
5302
5303 2018-07-16  Tom Tromey  <tom@tromey.com>
5304
5305         * dwarf2read.c (using_directives, read_func_scope)
5306         (read_lexical_block_scope): Update.
5307         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
5308         * buildsym.h (local_using_directives, global_using_directives):
5309         Don't declare.
5310         (get_local_using_directives, set_local_using_directives)
5311         (get_global_using_directives): Declare.
5312         * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
5313         m_global_using_directives>: New members.
5314         (finish_block_internal, prepare_for_building)
5315         (reset_symtab_globals, end_symtab_get_static_block)
5316         (push_context): Update.
5317         (get_local_using_directives, set_local_using_directives)
5318         (get_global_using_directives): New functions.
5319         (buildsym_init): Update.
5320
5321 2018-07-16  Tom Tromey  <tom@tromey.com>
5322
5323         * xcoffread.c (xcoff_initial_scan): Don't call
5324         free_pending_blocks.
5325         * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
5326         * buildsym.h (class scoped_free_pendings): Add constructor.
5327         (free_pending_blocks): Don't declare.
5328         * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
5329         (free_pending_blocks): Now static.
5330
5331 2018-07-16  Tom Tromey  <tom@tromey.com>
5332
5333         * buildsym.h (push_subfile, pop_subfile): Update declarations.
5334         * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
5335         member.
5336         (struct subfile_stack): Remove.
5337         (subfile_stack): Remove.
5338         (push_subfile, pop_subfile, buildsym_init): Update.
5339
5340 2018-07-16  Tom Tromey  <tom@tromey.com>
5341
5342         * buildsym.c (push_subfile): Use gdb_assert.
5343         (pop_subfile): Use gdb_assert.
5344
5345 2018-07-16  Tom Tromey  <tom@tromey.com>
5346
5347         * buildsym.h (merge_symbol_lists): Remove.
5348         * buildsym.c (merge_symbol_lists): Remove.
5349
5350 2018-07-16  Tom Tromey  <tom@tromey.com>
5351
5352         * stabsread.c (scan_file_globals): Update comment.
5353         * stabsread.h (scan_file_globals): Move from buildsym.h.
5354         * buildsym.h (scan_file_globals): Move to stabsread.h.
5355
5356 2018-07-16  Tom Tromey  <tom@tromey.com>
5357
5358         * xcoffread.c (xcoff_new_init): Update.
5359         * mipsread.c (mipscoff_new_init): Update.
5360         * mdebugread.c (mdebug_build_psymtabs): Update.
5361         * elfread.c (elf_new_init): Update.
5362         * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
5363         (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
5364         * buildsym.h (buildsym_new_init): Don't declare.
5365         * buildsym.c (buildsym_new_init): Remove.
5366
5367 2018-07-16  Tom Tromey  <tom@tromey.com>
5368
5369         * stabsread.h (within_function): Move from buildsym.h.
5370         * stabsread.c (start_stabs): Clear within_function.
5371         * coffread.c (coff_start_symtab): Clear within_function.
5372         * buildsym.h (within_function): Move to stabsread.h.
5373         * buildsym.c (prepare_for_building): Update.
5374
5375 2018-07-16  Tom Tromey  <tom@tromey.com>
5376
5377         * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
5378         * dwarf2read.c (dwarf2_start_symtab): Don't set
5379         processing_gcc_compilation.
5380         * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
5381
5382 2018-07-16  Tom Tromey  <tom@tromey.com>
5383
5384         * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
5385         (next_symbol_text_func): Move from buildsym.h.
5386         * stabsread.c (hashname): Move from buildsym.c.
5387         * buildsym.h (HASHSIZE, symnum, next_symbol_text)
5388         (next_symbol_text_func, hashname): Move to stabsread.h.
5389         * buildsym.c: Don't include bcache.h
5390         (hashname): Move to stasbread.c.
5391
5392 2018-07-16  Tom Tromey  <tom@tromey.com>
5393
5394         * buildsym.h (context_stack_size): Don't declare.
5395         * buildsym.c (context_stack_size): New global.
5396
5397 2018-07-16  Tom Tromey  <tom@tromey.com>
5398
5399         * dbxread.c (processing_acc_compilation): New global.
5400         * buildsym.h (processing_acc_compilation): Don't declare.
5401
5402 2018-07-16  Tom Tromey  <tom@tromey.com>
5403
5404         * xcoffread.c (aix_process_linenos, complete_symtab): Update.
5405         * dbxread.c (read_ofile_symtab): Update.
5406         * coffread.c (coff_start_symtab, coff_end_symtab): Update.
5407         * buildsym.h (last_source_start_addr): Remove.
5408         (set_last_source_start_addr, get_last_source_start_addr):
5409         Declare.
5410         * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
5411         parameter.
5412         (struct buildsym_compunit) <m_last_source_start_addr>: New
5413         member.
5414         (prepare_for_building): Remove start_addr parameter.
5415         (start_symtab, restart_symtab, end_symtab_get_static_block)
5416         (end_symtab_with_blockvector): Update.
5417         (set_last_source_start_addr, get_last_source_start_addr): New
5418         functions.
5419
5420 2018-07-16  Tom Tromey  <tom@tromey.com>
5421
5422         * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
5423         member.
5424         (have_line_numbers): Remove.
5425         (record_line, prepare_for_building, end_symtab_get_static_block)
5426         (augment_type_symtab): Update.
5427
5428 2018-07-16  Tom Tromey  <tom@tromey.com>
5429
5430         * buildsym.c (~buildsym_compunit): Free the macro table.
5431         (struct buildsym_compunit) <get_macro_table, release_macros>: New
5432         methods.
5433         <m_pending_macros>: New member.
5434         (pending_macros): Remove.
5435         (~scoped_free_pendings, get_macro_table, prepare_for_building)
5436         (reset_symtab_globals, end_symtab_get_static_block)
5437         (end_symtab_with_blockvector, augment_type_symtab)
5438         (buildsym_init): Update.
5439
5440 2018-07-16  Tom Tromey  <tom@tromey.com>
5441
5442         * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
5443         parameter.
5444         (buildsym_compunit::set_last_source_file): New method.
5445         <m_last_source_file>: New member.
5446         (prepare_for_building): Remove "name" parameter.
5447         (start_symtab, restart_symtab, reset_symtab_globals): Update.
5448         (last_source_file): Remove.
5449         (set_last_source_file, get_last_source_file): Update.
5450
5451 2018-07-16  Tom Tromey  <tom@tromey.com>
5452
5453         * buildsym.c (prepare_for_building): Add assert.
5454
5455 2018-07-16  Tom Tromey  <tom@tromey.com>
5456
5457         * buildsym.c (~buildsym_compunit): Update.
5458         (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
5459         (start_subfile, patch_subfile_names)
5460         (end_symtab_with_blockvector): Update.
5461
5462 2018-07-16  Tom Tromey  <tom@tromey.com>
5463
5464         * buildsym.c (struct buildsym_compunit): Add constructor,
5465         destructor, initializers.
5466         (start_buildsym_compunit): Remove.
5467         (free_buildsym_compunit): Use "delete".
5468         (start_symtab, restart_symtab): Use "new".
5469
5470 2018-07-13  Simon Marchi  <simon.marchi@polymtl.ca>
5471
5472         * symfile.c (set_objfile_default_section_offset): Remove struct
5473         keyword.
5474
5475 2018-07-14  Stafford Horne  <shorne@gmail.com>
5476
5477         * (Responsible Maintainers): Add myself as or1k maintainer.
5478
5479 2018-07-13  Tom Tromey  <tom@tromey.com>
5480
5481         * symfile.c (set_objfile_default_section_offset): Use extra braces
5482         around initializer.
5483
5484 2018-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5485
5486         * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
5487         non-branching basr.
5488
5489 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5490
5491         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5492         unittests/cli-utils-selftests.c
5493         * unittests/cli-utils-selftests.c: New file.
5494
5495 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5496
5497         * NEWS: Mention new commands. Mention change to 'thread apply'.
5498
5499 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5500
5501         * thread.c (thr_try_catch_cmd): New function.
5502         (thread_apply_all_command): Handle qcs flags.
5503         (thread_apply_command): Handle qcs flags.
5504         (taas_command): New function.
5505         (tfaas_command): New function.
5506         (_initialize_thread): Update to setup the new commands 'taas
5507         and 'tfaas'. Change doc string for 'thread apply'.
5508
5509 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5510
5511         * stack.c: (trailing_outermost_frame): New function, mostly
5512         extracted from backtrace_command_1.
5513         (leading_innermost_frame): New function.
5514         (backtrace_command_1): Update to call trailing_outermost_frame.
5515         (frame_apply_command_count): New function.
5516         (frame_apply_level_command): New function.
5517         (frame_apply_all_command): New function.
5518         (frame_apply_command): New function.
5519         (faas_command): New function.
5520         (frame_cmd_list): New variable.
5521         (_initialize_stack): Update to setup the new commands 'frame apply'
5522         and 'faas'.
5523
5524 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5525
5526         * cli-utils.c (number_or_range_parser::get_number): Only handle
5527         numbers or convenience var as numbers.
5528         (parse_flags): New function.
5529         (parse_flags_qcs): New function.
5530         (number_or_range_parser::finished): Ensure parsing end is detected
5531         before end of string.
5532         * cli-utils.h (parse_flags): New function.
5533         (parse_flags_qcs): New function.
5534         (number_or_range_parser): Remove m_finished bool.
5535         (number_or_range_parser::skip_range): Set m_in_range to false.
5536
5537 2018-07-12  Sergio Durigan Junior  <sergiodj@redhat.com>
5538
5539         * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
5540         on Windows.
5541
5542 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
5543             Jan Kratochvil  <jan.kratochvil@redhat.com>
5544             Paul Fertser  <fercerpav@gmail.com>
5545             Tsutomu Seki  <sekiriki@gmail.com>
5546             Pedro Alves  <palves@redhat.com>
5547
5548         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5549         'unittests/parse-connection-spec-selftests.c'.
5550         (COMMON_SFILES): Add 'common/netstuff.c'.
5551         (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
5552         * NEWS (Changes since GDB 8.2): Mention IPv6 support.
5553         * common/netstuff.c: New file.
5554         * common/netstuff.h: New file.
5555         * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
5556         (wait_for_connect): Update comment.  New parameter
5557         'gdb::optional<int> sock' instead of 'struct serial *scb'.
5558         Use 'sock' directly instead of 'scb->fd'.
5559         (try_connect): New function, with code from 'net_open'.
5560         (net_open): Rewrite main loop to deal with multiple
5561         sockets/addresses.  Handle IPv6-style hostnames; implement
5562         support for IPv6 connections.
5563         * unittests/parse-connection-spec-selftests.c: New file.
5564
5565 2018-07-11  Pedro Alves  <palves@redhat.com>
5566
5567         PR gdb/23377
5568         * remote.c (remote_target::remote_detach_pid): Call
5569         set_current_process.
5570
5571 2018-07-11  Pedro Alves  <palves@redhat.com>
5572
5573         * h8300-tdep.c (h8300_gdbarch_init): Remove
5574         set_gdbarch_ecoff_reg_to_regnum calls.
5575
5576 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
5577
5578         PR c++/23373
5579         * c-typeprint.c (c_type_print_base_struct_union): Don't print
5580         offsets/sizes for static members of a class/struct.
5581
5582 2018-07-11  Alan Hayward  <alan.hayward@arm.com>
5583
5584         * target-descriptions.c (tdesc_register_bitsize): Rename.
5585         * target-descriptions.h (tdesc_register_bitsize): Likewise.
5586         * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
5587         * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
5588
5589 2018-07-10  Tom Tromey  <tom@tromey.com>
5590
5591         * breakpoint.c (moribund_locations): Now static and a
5592         std::vector.
5593         (breakpoint_init_inferior, moribund_breakpoint_here_p)
5594         (build_bpstat_chain, update_global_location_list)
5595         (breakpoint_retire_moribund): Update.
5596         * breakpoint.h (bp_location_p): Remove typedef.  Don't declare
5597         VEC.
5598
5599 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
5600
5601         * riscv-tdep.c (riscv_is_fp_regno_p): New function.
5602         (riscv_register_reggroup_p): Use new function, remove unneeded
5603         parenthesis.
5604         (riscv_push_dummy_call): Extend assert to compare against xlen or
5605         flen based on register type.
5606
5607 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
5608
5609         * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
5610
5611 2018-07-09  Andrew Burgess  <andrew.burgess@embecosm.com>
5612
5613         * remote.c (show_hardware_watchpoint_limit): New function.
5614         (show_hardware_watchpoint_length_limit): New function.
5615         (show_hardware_breakpoint_limit): New function.
5616         (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
5617         where appropriate, update help text.
5618
5619 2018-07-09  Tom Tromey  <tom@tromey.com>
5620
5621         * Makefile.in (CDEPS): Don't mention XM_CDEPS.
5622         (CLIBS): Don't mention NAT_CLIBS.
5623
5624 2018-07-09  Tom Tromey  <tom@tromey.com>
5625
5626         * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
5627         (LIBGDB_OBS, clean mostlyclean): Update.
5628         (gdb$(EXEEXT), insight$(EXEEXT)): Update.
5629
5630 2018-07-09  Tom Tromey  <tom@tromey.com>
5631
5632         * Makefile.in (%.c: %.y): Use ECHO_YACC.
5633         (%.c: %.l): Use ECHO_LEX.  Just fail if flex not available.
5634         * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
5635
5636 2018-07-09  Tom Tromey  <tom@tromey.com>
5637
5638         * Makefile.in (ALLDEPFILES): Remove exec.c.
5639         (COMMON_OBS): Remove exec.o.
5640         (COMMON_SFILES): Add exec.c.
5641
5642 2018-07-09  Tom Tromey  <tom@tromey.com>
5643
5644         * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
5645
5646 2018-07-09  Tom Tromey  <tom@tromey.com>
5647
5648         * Makefile.in (clean mostlyclean): Remove stamp-version.
5649         (version.c): Depend on stamp-version.
5650         (stamp-version): New rule, from version.c rule.
5651
5652 2018-07-09  Tom Tromey  <tom@tromey.com>
5653
5654         * Makefile.in (init.c): Depend on stamp-init.
5655         (stamp-init): New rule, from init.c rule.
5656         (clean mostlyclean): Remove stamp-init.
5657
5658 2018-07-09  Tom Tromey  <tom@tromey.com>
5659
5660         * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
5661         SUBDIR_GCC_COMPILE_SRCS.
5662
5663 2018-07-09  Tom Tromey  <tom@tromey.com>
5664
5665         * Makefile.in (init.c): Remove some unused sed rules.
5666
5667 2018-07-09  Tom Tromey  <tom@tromey.com>
5668
5669         * Makefile.in (TSOBS): Remove.
5670         (INIT_FILES): Update.
5671         (LIBGDB_OBS): Update.
5672         (COMMON_SFILES): Add inflow.c.
5673         (SFILES): Remove inflow.c.
5674
5675 2018-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
5676
5677         * contrib/gdb-add-index.sh ($dwarf5): New, use it.
5678
5679 2018-07-07  Simon Marchi  <simon.marchi@polymtl.ca>
5680
5681         * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
5682         get_saveloc_name, is_signal_frame_name, step_name,
5683         init_remote_name, create_addr_space_name,
5684         destroy_addr_space_name, search_unwind_table_name,
5685         find_dyn_list_name): Constify.
5686
5687 2018-07-05  Simon Marchi  <simon.marchi@polymtl.ca>
5688
5689         * darwin-nat.c (darwin_pthread_kill): New function.
5690         (darwin_resume_thread): Use darwin_pthread_kill.
5691
5692 2018-07-05  Tom de Vries  <tdevries@suse.de>
5693
5694         * macroexp.c (macro_buffer) <operator=>: New member function.
5695
5696 2018-07-04  Tom Tromey  <tom@tromey.com>
5697
5698         * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
5699
5700 2018-07-04  Simon Marchi  <simon.marchi@polymtl.ca>
5701
5702         * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
5703         * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
5704         * maint.c: Likewise.
5705         * top.c: Likewise.
5706
5707 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
5708
5709         * NEWS: Create a new section for the next release branch.
5710         Rename the section of the current branch, now that it has
5711         been cut.
5712
5713 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
5714
5715         GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
5716         * version.in: Bump version to 8.2.50.DATE-git.
5717
5718 2018-07-04  Vyacheslav Barinov  <v.barinov@samsung.com>
5719             Pedro Alves  <palves@redhat.com>
5720
5721         * linux-nat.c (linux_init_ptrace): Rename to ...
5722         (linux_init_ptrace_procfs): ... this.  Call
5723         linux_proc_init_warnings.
5724         (linux_nat_target::post_attach)
5725         (linux_nat_target::post_startup_inferior): Adjust.
5726         * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
5727         * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
5728
5729 2018-07-04  Tom de Vries  <tdevries@suse.de>
5730
5731         * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
5732         check ...
5733         (read_comp_unit_head): ... here.
5734
5735 2018-07-03  Tom Tromey  <tom@tromey.com>
5736
5737         * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
5738         (stop_tracing, tstatus_command)
5739         (find_matching_tracepoint_location, merge_uploaded_tracepoints)
5740         (print_one_static_tracepoint_marker): Update.
5741         * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
5742         std::vector.
5743         * breakpoint.h (breakpoint_p): Remove typedef.  Don't declare
5744         VEC.
5745         (all_tracepoints, static_tracepoints_here): Return std::vector.
5746
5747 2018-07-03  Tom Tromey  <tom@tromey.com>
5748
5749         * common/ptid.c (ptid_equal): Remove.
5750         * common/ptid.h (ptid_equal): Don't declare.
5751         * ada-tasks.c: Update.
5752         * breakpoint.c: Update.
5753         * common/agent.c: Update.
5754         * corelow.c: Update.
5755         * darwin-nat-info.c: Update.
5756         * darwin-nat.c: Update.
5757         * dcache.c: Update.
5758         * dtrace-probe.c: Update.
5759         * dummy-frame.c: Update.
5760         * fbsd-nat.c: Update.
5761         * frame.c: Update.
5762         * gdbthread.h: Update.
5763         * gnu-nat.c: Update.
5764         * go32-nat.c: Update.
5765         * inf-loop.c: Update.
5766         * inf-ptrace.c: Update.
5767         * infcall.c: Update.
5768         * infcmd.c: Update.
5769         * inflow.c: Update.
5770         * infrun.c: Update.
5771         * linux-fork.c: Update.
5772         * linux-nat.c: Update.
5773         * linux-thread-db.c: Update.
5774         * mi/mi-cmd-var.c: Update.
5775         * mi/mi-interp.c: Update.
5776         * mi/mi-main.c: Update.
5777         * nto-procfs.c: Update.
5778         * ppc-linux-tdep.c: Update.
5779         * procfs.c: Update.
5780         * python/py-inferior.c: Update.
5781         * python/py-record-btrace.c: Update.
5782         * python/py-record.c: Update.
5783         * ravenscar-thread.c: Update.
5784         * regcache.c: Update.
5785         * remote-sim.c: Update.
5786         * remote.c: Update.
5787         * sol-thread.c: Update.
5788         * solib.c: Update.
5789         * target.c: Update.
5790         * tui/tui-stack.c: Update.
5791         * varobj.c: Update.
5792         * windows-nat.c: Update.
5793         * windows-tdep.c: Update.
5794
5795 2018-07-03  Tom Tromey  <tom@tromey.com>
5796
5797         * common/ptid.c (ptid_match): Remove.
5798         * common/ptid.h (ptid_match): Don't declare.
5799         * fbsd-nat.c: Update.
5800         * infcmd.c: Update.
5801         * infrun.c: Update.
5802         * linux-nat.c: Update.
5803         * record-btrace.c: Update.
5804         * regcache.c: Update.
5805         * remote.c: Update.
5806
5807 2018-07-03  Tom Tromey  <tom@tromey.com>
5808
5809         * common/ptid.c (ptid_tid_p): Remove.
5810         * common/ptid.h (ptid_tid_p): Don't declare.
5811         * sol-thread.c: Update.
5812
5813 2018-07-03  Tom Tromey  <tom@tromey.com>
5814
5815         * common/ptid.c (ptid_lwp_p): Remove.
5816         * common/ptid.h (ptid_lwp_p): Don't declare.
5817         * fbsd-nat.c: Update.
5818         * linux-nat.c: Update.
5819         * nat/linux-procfs.c: Update.
5820         * nat/x86-linux-dregs.c: Update.
5821         * sol-thread.c: Update.
5822
5823 2018-07-03  Tom Tromey  <tom@tromey.com>
5824
5825         * common/ptid.c (ptid_is_pid): Remove.
5826         * common/ptid.h (ptid_is_pid): Don't declare.
5827         * infrun.c: Update.
5828         * linux-nat.c: Update.
5829         * mi/mi-interp.c: Update.
5830         * remote.c: Update.
5831         * thread.c: Update.
5832
5833 2018-07-03  Tom Tromey  <tom@tromey.com>
5834
5835         * common/ptid.c (ptid_get_tid): Remove.
5836         * common/ptid.h (ptid_get_tid): Don't declare.
5837         * ada-tasks.c: Update.
5838         * aix-thread.c: Update.
5839         * bsd-uthread.c: Update.
5840         * darwin-nat.c: Update.
5841         * fbsd-nat.c: Update.
5842         * i386-darwin-nat.c: Update.
5843         * infrun.c: Update.
5844         * linux-tdep.c: Update.
5845         * nto-procfs.c: Update.
5846         * ppc-ravenscar-thread.c: Update.
5847         * python/py-infthread.c: Update.
5848         * ravenscar-thread.c: Update.
5849         * sol-thread.c: Update.
5850         * sparc-ravenscar-thread.c: Update.
5851         * windows-nat.c: Update.
5852
5853 2018-07-03  Tom Tromey  <tom@tromey.com>
5854
5855         * common/ptid.c (ptid_get_lwp): Remove.
5856         * common/ptid.h (ptid_get_lwp): Don't declare.
5857         * aarch64-linux-nat.c: Update.
5858         * ada-tasks.c: Update.
5859         * aix-thread.c: Update.
5860         * amd64-linux-nat.c: Update.
5861         * arm-linux-nat.c: Update.
5862         * corelow.c: Update.
5863         * fbsd-nat.c: Update.
5864         * fbsd-tdep.c: Update.
5865         * gnu-nat.c: Update.
5866         * i386-cygwin-tdep.c: Update.
5867         * i386-gnu-nat.c: Update.
5868         * i386-linux-nat.c: Update.
5869         * ia64-linux-nat.c: Update.
5870         * inf-ptrace.c: Update.
5871         * infrun.c: Update.
5872         * linux-fork.c: Update.
5873         * linux-nat.c: Update.
5874         * linux-tdep.c: Update.
5875         * linux-thread-db.c: Update.
5876         * mips-linux-nat.c: Update.
5877         * nat/aarch64-linux-hw-point.c: Update.
5878         * nat/aarch64-linux.c: Update.
5879         * nat/linux-btrace.c: Update.
5880         * nat/linux-osdata.c: Update.
5881         * nat/linux-procfs.c: Update.
5882         * nat/x86-linux-dregs.c: Update.
5883         * obsd-nat.c: Update.
5884         * ppc-fbsd-nat.c: Update.
5885         * ppc-linux-nat.c: Update.
5886         * procfs.c: Update.
5887         * python/py-infthread.c: Update.
5888         * ravenscar-thread.c: Update.
5889         * remote.c: Update.
5890         * s390-linux-nat.c: Update.
5891         * sol-thread.c: Update.
5892         * sol2-tdep.c: Update.
5893         * spu-linux-nat.c: Update.
5894         * x86-linux-nat.c: Update.
5895         * xtensa-linux-nat.c: Update.
5896
5897 2018-07-03  Tom Tromey  <tom@tromey.com>
5898
5899         * common/ptid.c (ptid_get_pid): Remove.
5900         * common/ptid.h (ptid_get_pid): Don't declare.
5901         * aarch64-linux-nat.c: Update.
5902         * ada-lang.c: Update.
5903         * aix-thread.c: Update.
5904         * alpha-bsd-nat.c: Update.
5905         * amd64-fbsd-nat.c: Update.
5906         * amd64-linux-nat.c: Update.
5907         * arm-linux-nat.c: Update.
5908         * arm-nbsd-nat.c: Update.
5909         * auxv.c: Update.
5910         * break-catch-syscall.c: Update.
5911         * breakpoint.c: Update.
5912         * bsd-uthread.c: Update.
5913         * corelow.c: Update.
5914         * ctf.c: Update.
5915         * darwin-nat.c: Update.
5916         * fbsd-nat.c: Update.
5917         * fbsd-tdep.c: Update.
5918         * gcore.c: Update.
5919         * gnu-nat.c: Update.
5920         * hppa-nbsd-nat.c: Update.
5921         * hppa-obsd-nat.c: Update.
5922         * i386-fbsd-nat.c: Update.
5923         * ia64-linux-nat.c: Update.
5924         * inf-ptrace.c: Update.
5925         * infcmd.c: Update.
5926         * inferior.c: Update.
5927         * inferior.h: Update.
5928         * inflow.c: Update.
5929         * infrun.c: Update.
5930         * linux-fork.c: Update.
5931         * linux-nat.c: Update.
5932         * linux-tdep.c: Update.
5933         * linux-thread-db.c: Update.
5934         * m68k-bsd-nat.c: Update.
5935         * mi/mi-interp.c: Update.
5936         * mi/mi-main.c: Update.
5937         * mips-linux-nat.c: Update.
5938         * mips-nbsd-nat.c: Update.
5939         * mips64-obsd-nat.c: Update.
5940         * nat/aarch64-linux-hw-point.c: Update.
5941         * nat/aarch64-linux.c: Update.
5942         * nat/linux-btrace.c: Update.
5943         * nat/linux-osdata.c: Update.
5944         * nat/linux-procfs.c: Update.
5945         * nat/x86-linux-dregs.c: Update.
5946         * nto-procfs.c: Update.
5947         * obsd-nat.c: Update.
5948         * ppc-linux-nat.c: Update.
5949         * ppc-nbsd-nat.c: Update.
5950         * ppc-obsd-nat.c: Update.
5951         * proc-service.c: Update.
5952         * procfs.c: Update.
5953         * python/py-inferior.c: Update.
5954         * python/py-infthread.c: Update.
5955         * ravenscar-thread.c: Update.
5956         * record.c: Update.
5957         * remote-sim.c: Update.
5958         * remote.c: Update.
5959         * rs6000-nat.c: Update.
5960         * s390-linux-nat.c: Update.
5961         * sh-nbsd-nat.c: Update.
5962         * sol-thread.c: Update.
5963         * sparc-nat.c: Update.
5964         * sparc64-tdep.c: Update.
5965         * spu-linux-nat.c: Update.
5966         * spu-tdep.c: Update.
5967         * target-debug.h: Update.
5968         * target.c: Update.
5969         * thread.c: Update.
5970         * tid-parse.c: Update.
5971         * tracefile-tfile.c: Update.
5972         * vax-bsd-nat.c: Update.
5973         * windows-nat.c: Update.
5974         * x86-linux-nat.c: Update.
5975         * x86-nat.c: Update.
5976
5977 2018-07-03  Tom Tromey  <tom@tromey.com>
5978
5979         * common/ptid.c (pid_to_ptid): Remove.
5980         * common/ptid.h (pid_to_ptid): Don't declare.
5981         * aix-thread.c: Update.
5982         * arm-linux-nat.c: Update.
5983         * common/ptid.c: Update.
5984         * common/ptid.h: Update.
5985         * corelow.c: Update.
5986         * ctf.c: Update.
5987         * darwin-nat.c: Update.
5988         * fbsd-nat.c: Update.
5989         * fork-child.c: Update.
5990         * gnu-nat.c: Update.
5991         * go32-nat.c: Update.
5992         * inf-ptrace.c: Update.
5993         * infcmd.c: Update.
5994         * inferior.c: Update.
5995         * infrun.c: Update.
5996         * linux-fork.c: Update.
5997         * linux-nat.c: Update.
5998         * nat/aarch64-linux-hw-point.c: Update.
5999         * nat/fork-inferior.c: Update.
6000         * nat/x86-linux-dregs.c: Update.
6001         * nto-procfs.c: Update.
6002         * obsd-nat.c: Update.
6003         * procfs.c: Update.
6004         * progspace.c: Update.
6005         * remote.c: Update.
6006         * rs6000-nat.c: Update.
6007         * s390-linux-nat.c: Update.
6008         * sol-thread.c: Update.
6009         * spu-linux-nat.c: Update.
6010         * target.c: Update.
6011         * top.c: Update.
6012         * tracefile-tfile.c: Update.
6013         * windows-nat.c: Update.
6014
6015 2018-07-03  Tom Tromey  <tom@tromey.com>
6016
6017         * common/ptid.h (ptid_build): Don't declare.
6018         * common/ptid.c (ptid_build): Remove.
6019         * aix-thread.c: Update.
6020         * bsd-kvm.c: Update.
6021         * bsd-uthread.c: Update.
6022         * common/agent.c: Update.
6023         * common/ptid.c: Update.
6024         * common/ptid.h: Update.
6025         * corelow.c: Update.
6026         * darwin-nat.c: Update.
6027         * fbsd-nat.c: Update.
6028         * gnu-nat.c: Update.
6029         * linux-fork.c: Update.
6030         * linux-nat.c: Update.
6031         * linux-thread-db.c: Update.
6032         * nat/linux-osdata.c: Update.
6033         * nat/linux-procfs.c: Update.
6034         * nto-procfs.c: Update.
6035         * obsd-nat.c: Update.
6036         * proc-service.c: Update.
6037         * procfs.c: Update.
6038         * ravenscar-thread.c: Update.
6039         * remote-sim.c: Update.
6040         * remote.c: Update.
6041         * sol-thread.c: Update.
6042         * target.c: Update.
6043         * windows-nat.c: Update.
6044
6045 2018-07-03  Tom Tromey  <tom@tromey.com>
6046
6047         * infrun.c (follow_exec): Use exit_inferior_silent.
6048         * inferior.c (exit_inferior_num_silent): Remove.
6049         * inferior.h (exit_inferior_num_silent): Don't declare.
6050
6051 2018-07-03  Tom Tromey  <tom@tromey.com>
6052
6053         PR cli/23340:
6054         * darwin-nat.c (darwin_attach_pid): Reset inferior and
6055         inferior_ptid on error.
6056
6057 2018-07-02  Maciej W. Rozycki  <macro@mips.com>
6058             Simon Marchi  <simon.marchi@polymtl.ca>
6059
6060         PR tdep/8282
6061         * disasm.h (gdb_disassembler): Add
6062         `m_disassembler_options_holder'. member
6063         * disasm.c (get_all_disassembler_options): New function.
6064         (gdb_disassembler::gdb_disassembler): Use it.
6065         (gdb_buffered_insn_length_init_dis): Likewise.
6066         (gdb_buffered_insn_length): Adjust accordingly.
6067         (set_disassembler_options): Handle options with arguments.
6068         (show_disassembler_options_sfunc): Likewise.  Add a leading new
6069         line if showing options with descriptions.
6070         (disassembler_options_completer): Adapt to using the
6071         `disasm_options_and_args_t' structure.
6072         * mips-tdep.c (mips_disassembler_options): New variable.
6073         (mips_disassembler_options_o32): Likewise.
6074         (mips_disassembler_options_n32): Likewise.
6075         (mips_disassembler_options_n64): Likewise.
6076         (gdb_print_insn_mips): Don't set `disassembler_options'.
6077         (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
6078         functions.
6079         (mips_gdbarch_init): Always set `gdbarch_print_insn' to
6080         `gdb_print_insn_mips'.  Set `gdbarch_disassembler_options',
6081         `gdbarch_disassembler_options_implicit' and
6082         `gdbarch_valid_disassembler_options'.
6083         * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
6084         `disasm_options_and_args_t' structure.
6085         * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
6086         method.
6087         (valid_disassembler_options): Switch from `disasm_options_t' to
6088         the `disasm_options_and_args_t' structure.
6089         * NEWS: Document `set disassembler-options' support for the MIPS
6090         target.
6091         * gdbarch.h: Regenerate.
6092         * gdbarch.c: Regenerate.
6093
6094 2018-07-02  Sebastian Huber  <sebastian.huber@embedded-brains.de>
6095
6096         * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
6097
6098 2018-06-29  Joel Brobecker  <brobecker@adacore.com>
6099
6100         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
6101         parameter in call to amd64_target_description.
6102         * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
6103         * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
6104         (amd64fbsd_init_abi): Likewise.
6105         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
6106         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
6107         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
6108         * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
6109
6110 2018-06-29  Pedro Alves  <palves@redhat.com>
6111
6112         * gdb/amd64-tdep.h (amd64_create_target_description): Add
6113         "segments" parameter.
6114         * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
6115         (_initialize_amd64_tdep): Update call to
6116         amd64_create_target_description.
6117         (amd64_target_description): Add "segments" parameter.  Adjust
6118         the implementation to use it.
6119         * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
6120         call to amd64_create_target_description.
6121         * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
6122         * gdb/arch/amd64.h (amd64_create_target_description): Add
6123         "segments" register.
6124         * gdb/arch/amd64.c (amd64_create_target_description): Add
6125         "segments" parameter.  Call create_feature_i386_64bit_segments
6126         only if SEGMENTS is true.
6127         * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
6128         call to amd64_create_target_description.
6129
6130 2018-06-29  Pedro Alves  <palves@redhat.com>
6131
6132         * thread.c (thread_target_id_str): New, factored out from ...
6133         (print_thread_info_1): ... here.  Use it to compute the max
6134         "Target Id" column width.
6135
6136 2018-06-29  Pedro Alves  <palves@redhat.com>
6137
6138         * remote.c (remote_target::extra_thread_info): Delete
6139         'display_buf' and 'n' locals.  from the cache, regardless of
6140         packet mechanims is in use.  Use cache for qThreadExtra and qP
6141         methods too.
6142
6143 2018-06-29  Pedro Alves  <palves@redhat.com>
6144
6145         * blockframe.c (find_pc_sect_containing_function): New function.
6146         * breakpoint.c (print_breakpoint_location): Don't call
6147         find_pc_sect_function.
6148         * linespec.c (create_sals_line_offset): Record the location's
6149         symbol in the sal.
6150         * linespec.c (convert_address_location_to_sals): Fill in sal's
6151         symbol with find_pc_sect_containing_function.
6152         * symtab.c (find_function_start_sal): Rename to ...
6153         (find_function_start_sal_1): ... this.
6154         (find_function_start_sal): Reimplement as wrapper around
6155         find_function_start_sal_1, and use
6156         find_pc_sect_containing_function to fill in the sal's symbol.
6157         (find_function_start_sal(symbol*, bool)): Adjust.
6158         * symtab.h (find_pc_function, find_pc_sect_function): Adjust
6159         comments.
6160         (find_pc_sect_containing_function): Declare.
6161
6162 2018-06-29  Pedro Alves  <palves@redhat.com>
6163
6164         * inline-frame.c (stopped_by_user_bp_inline_frame): Return
6165         true if the the location has no symbol.
6166
6167 2018-06-28  Tom Tromey  <tom@tromey.com>
6168
6169         * NEWS: Mention --enable-codesign.
6170         * silent-rules.mk (ECHO_SIGN): New variable.
6171         * configure.ac: Add --enable-codesign.
6172         * configure: Rebuild.
6173         * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
6174         (gdb$(EXEEXT)): Optionally invoke codesign.
6175
6176 2018-06-28  Pedro Alves  <palves@redhat.com>
6177
6178         * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
6179         comments.
6180         (switch_to_thread_no_regs): Adjust comment.
6181         * infcmd.c (stop_pc): Delete.
6182         (post_create_inferior, info_program_command): Replace references
6183         to stop_pc with references to thread_info->suspend.stop_pc.
6184         * inferior.h (stop_pc): Delete declaration.
6185         * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
6186         (handle_inferior_event_1, handle_signal_stop)
6187         (process_event_stop_test, keep_going_stepped_thread)
6188         (handle_step_into_function, handle_step_into_function_backward)
6189         (print_stop_location): Replace references to stop_pc with
6190         references to thread_info->suspend.stop_pc.
6191         (struct infcall_suspend_state) <stop_pc>: Delete field.
6192         (save_infcall_suspend_state, restore_infcall_suspend_state):
6193         Remove references to inf_stat->stop_pc.
6194         * linux-fork.c (fork_load_infrun_state): Likewise.
6195         * record-btrace.c (record_btrace_set_replay): Likewise.
6196         * record-full.c (record_full_goto_entry): Likewise.
6197         * remote.c (print_one_stopped_thread): Likewise.
6198         * target.c (target_resume): Extend comment.
6199         * thread.c (set_executing_thread): New.
6200         (set_executing): Use it.
6201         (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
6202         Remove references to stop_pc.
6203
6204 2018-06-28  Pedro Alves  <palves@redhat.com>
6205
6206         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
6207         Moving fetching stop_pc until after ecs->event_thread is refreshed.
6208
6209 2018-06-28  Tom Tromey  <tom@tromey.com>
6210
6211         * coffread.c (coff_symfile_finish): Update.
6212         * xcoffread.c (xcoff_symfile_finish): Update.
6213         * elfread.c (elf_symfile_finish): Update.
6214         * symfile.h (dwarf2_free_objfile): Don't declare.
6215         * dwarf2read.c (_initialize_dwarf2_read): Use
6216         register_objfile_data_with_cleanup.
6217         (dwarf2_free_objfile): Now static.  Change signature.
6218
6219 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
6220
6221         * symfile.c (add_symbol_file_command, _initialize_symfile): Add
6222         option "-o" to add-symbol-file-load to add an offset to each
6223         section's load address.
6224         * symfile.c (set_objfile_default_section_offset): New function.
6225
6226 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
6227
6228         * symfile.c (add_symbol_file_command): Make sure that sections
6229         with the same name are sorted in the same order.
6230
6231 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
6232
6233         * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
6234         require the second argument.  If omitted, load sections at the
6235         addresses specified in the file.
6236
6237 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
6238
6239         * symfile.c (symbol_file_command, symbol_file_add_main_1)
6240         (_initialize_symfile): Add option "-o" to symbol-file to add an
6241         offset to each section of the symbol file.
6242
6243 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
6244
6245         * MAINTAINERS (Write After Approval): Add Petr Tesarik.
6246
6247 2018-06-27  Tom Tromey  <tom@tromey.com>
6248
6249         * stack.c (_initialize_stack): Update "func" help text.
6250
6251 2018-06-27  Tom Tromey  <tom@tromey.com>
6252
6253         * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
6254         std::vector.
6255         (unwind_infopy_str, pyuw_create_unwind_info)
6256         (unwind_infopy_add_saved_register, pyuw_sniffer)
6257         (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
6258         Update.
6259         (struct saved_reg): Add constructor.
6260         <value>: Now a gdbpy_ref<>.
6261
6262 2018-06-27  Tom Tromey  <tom@tromey.com>
6263
6264         * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
6265
6266 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6267
6268         * gdb-gdb.py.in: Format using autopep8.
6269
6270 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6271
6272         * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
6273         (type_lookup_function): Recognize CORE_ADDR values.
6274
6275 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6276
6277         * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
6278         print tag_name.
6279
6280 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6281
6282         * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
6283         <__lt__>: Add.
6284
6285 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6286
6287         * gdb-gdb.py: Move to...
6288         * gdb-gdb.py.in: ... here.
6289         * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
6290         * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
6291         dependencies.
6292         (distclean): Remove gdb-gdb.py when cleaning.
6293         (gdb-gdb.py, gdb-gdb.gdb): New rules.
6294         * configure: Re-generate.
6295
6296 2018-06-27  Pedro Alves  <palves@redhat.com>
6297
6298         * proc-service.c (get_ps_regcache): New.
6299         (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
6300         (ps_lsetfpregs): Use it.
6301
6302 2018-06-27  Omair Javaid  <omair.javaid@linaro.org>
6303
6304         PR gdb/21695
6305         * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
6306         (dwarf_decode_lines_1): Adjust.
6307
6308 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6309
6310         * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
6311         override.
6312         <info_proc>: Likewise.
6313
6314 2018-06-26  Joel Brobecker  <brobecker@adacore.com>
6315
6316         * windows-nat.c (do_windows_fetch_inferior_registers): Rename
6317         to windows_fetch_one_register, and only handle the case of
6318         fetching one register.  Move the code that reloads the context
6319         and iterates over all registers if R is negative to...
6320         (windows_nat_target::fetch_registers): ... here.
6321         (do_windows_store_inferior_registers): Rename to
6322         windows_store_one_register, and only handle the case of storing
6323         one register.  Move the code that handles the case where r is
6324         negative to...
6325         (windows_nat_target::store_registers) ... here.
6326
6327 2018-06-26  Tom Tromey  <tom@tromey.com>
6328
6329         PR rust/22574:
6330         * typeprint.c (whatis_exp): Allow ptype/o for Rust.
6331         * rust-lang.c (rust_print_struct_def): Add podata parameter.
6332         Update.
6333         (rust_internal_print_type): Add podata parameter.
6334         (rust_print_type): Update.
6335
6336 2018-06-26  Tom Tromey  <tom@tromey.com>
6337
6338         * typeprint.h (struct print_offset_data) <update, finish,
6339         maybe_print_hole>: New methods.
6340         <indentation>: New constant.
6341         * typeprint.c (print_offset_data::indentation): Define.
6342         (print_offset_data::maybe_print_hole, print_offset_data::update)
6343         (print_offset_data::finish): Move from c-typeprint.c and rename.
6344         * c-typeprint.c (OFFSET_SPC_LEN): Remove.
6345         (print_spaces_filtered_with_print_options): Update.
6346         (c_print_type_union_field_offset, maybe_print_hole)
6347         (c_print_type_struct_field_offset): Move to typeprint.c and
6348         rename.
6349         (c_type_print_base_struct_union): Update.
6350
6351 2018-06-25  Pedro Alves  <palves@redhat.com>
6352
6353         * gdbthread.h (thread_info_ref, delete_thread)
6354         (delete_thread_silent, first_thread_of_inferior)
6355         (any_thread_of_inferior, switch_to_thread)
6356         (enable_thread_stack_temporaries)
6357         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
6358         (get_last_thread_stack_temporary)
6359         (value_in_thread_stack_temporaries, can_access_registers_thread):
6360         Spell out "struct thread_info" instead of just "thread_info".
6361         * inferior.h (notice_new_inferior): Likewise.
6362
6363 2018-06-25  Pedro Alves  <palves@redhat.com>
6364
6365         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
6366         pass thread_info pointer to delete_thread.
6367         (windows_nat_target::detach): Pass inferior pointer to
6368         detach_inferior.
6369         * aix-thread.c (sync_threadlists): Pass thread_info pointer to
6370         delete_thread.
6371         * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
6372         * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
6373         and pass a thread_info pointer to delete_thread.
6374         * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
6375         pass thread_info pointer to delete_thread.
6376         * go32-nat.c (go32_nat_target::mourn_inferior): Remove
6377         delete_thread_silent call.
6378         * procfs.c (procfs_target::detach): Pass inferior pointer to
6379         detach_inferior.
6380         (procfs_target::wait): Pass thread_info pointer to delete_thread.
6381         * remote-sim.c (gdbsim_target::mourn_inferior): Remove
6382         delete_thread_silent call.
6383         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
6384         pass thread_info pointer to delete_thread.
6385         (windows_nat_target::detach): Pass inferior pointer to
6386         delete_inferior.
6387
6388 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
6389
6390         * regcache.c (readable_regcache::read_part): Fix asserts.
6391         (reg_buffer::raw_collect_part): New function.
6392         (regcache::write_part): Fix asserts.
6393         (reg_buffer::raw_supply_part): New function.
6394         (regcache::transfer_regset_register): New helper function.
6395         (regcache::transfer_regset): Call new functions.
6396         (regcache_supply_regset): Use gdb_byte*.
6397         (regcache::supply_regset): Likewise.
6398         (regcache_collect_regset): Likewise.
6399         (regcache::collect_regset): Likewise.
6400         * regcache.h (reg_buffer::raw_collect_part): New declaration.
6401         (reg_buffer::raw_supply_part): Likewise.
6402         (regcache::transfer_regset_register): Likewise.
6403         (regcache::transfer_regset): Use gdb_byte*.
6404
6405 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
6406
6407         * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
6408
6409 2018-06-21  Pedro Alves  <palves@redhat.com>
6410
6411         * ada-lang.h (ada_get_task_number): Take a thread_info pointer
6412         instead of a ptid_t.  All callers adjusted.
6413         * ada-tasks.c (ada_get_task_number): Likewise.  All callers
6414         adjusted.
6415         (print_ada_task_info, display_current_task_id, task_command_1):
6416         Adjust.
6417         * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
6418         inferior_thread.
6419         (breakpoint_kind): Adjust.
6420         (remove_breakpoints_pid): Rename to ...
6421         (remove_breakpoints_inf): ... this.  Adjust to take an inferior
6422         pointer.  All callers adjusted.
6423         (bpstat_clear_actions): Use inferior_thread.
6424         (get_bpstat_thread): New.
6425         (bpstat_do_actions): Use it.
6426         (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
6427         to take a thread_info pointer.  All callers adjusted.
6428         (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
6429         (breakpoint_re_set_thread): Use inferior_thread.
6430         * breakpoint.h (struct inferior): Forward declare.
6431         (bpstat_stop_status): Update.
6432         (remove_breakpoints_pid): Delete.
6433         (remove_breakpoints_inf): New.
6434         * bsd-uthread.c (bsd_uthread_target::wait)
6435         (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
6436         * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
6437         (maint_btrace_packet_history_cmd)
6438         (maint_btrace_clear_packet_history_cmd): Adjust.
6439         (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
6440         inferior_thread.
6441         * cli/cli-interp.c: Include "inferior.h".
6442         * common/refcounted-object.h (struct
6443         refcounted_object_ref_policy): New.
6444         * compile/compile-object-load.c: Include gdbthread.h.
6445         (store_regs): Use inferior_thread.
6446         * corelow.c (core_target::close): Use current_inferior.
6447         (core_target_open): Adjust to use first_thread_of_inferior and use
6448         the current inferior.
6449         * ctf.c (ctf_target::close): Adjust to use current_inferior.
6450         * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
6451         <thread>: ... this new field.  All references adjusted.
6452         (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
6453         Take a thread_info pointer instead of a ptid_t.
6454         * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
6455         (dummy_frame_discard, register_dummy_frame_dtor): Take a
6456         thread_info pointer instead of a ptid_t.
6457         * elfread.c: Include "inferior.h".
6458         (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
6459         Use inferior_thread.
6460         * eval.c (evaluate_subexp): Likewise.
6461         * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
6462         inferior_thread.
6463         * gdb_proc_service.h (struct thread_info): Forward declare.
6464         (struct ps_prochandle) <ptid>: Delete, replaced by ...
6465         <thread>: ... this new field.  All references adjusted.
6466         * gdbarch.h, gdbarch.c: Regenerate.
6467         * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
6468         'thread' parameter.  All implementations and callers adjusted.
6469         * gdbthread.h (thread_info) <set_running>: New method.
6470         (delete_thread, delete_thread_silent): Take a thread_info pointer
6471         instead of a ptid.
6472         (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
6473         (first_thread_of_process): Delete, replaced by ...
6474         (first_thread_of_inferior): ... this new function.  All callers
6475         adjusted.
6476         (any_live_thread_of_process): Delete, replaced by ...
6477         (any_live_thread_of_inferior): ... this new function.  All callers
6478         adjusted.
6479         (switch_to_thread, switch_to_no_thread): Declare.
6480         (is_executing): Delete.
6481         (enable_thread_stack_temporaries): Update comment.
6482         <enable_thread_stack_temporaries>: Take a thread_info pointer
6483         instead of a ptid_t.  Incref the thread.
6484         <~enable_thread_stack_temporaries>: Decref the thread.
6485         <m_ptid>: Delete
6486         <m_thr>: New.
6487         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
6488         (get_last_thread_stack_temporary)
6489         (value_in_thread_stack_temporaries, can_access_registers_thread):
6490         Take a thread_info pointer instead of a ptid_t.  All callers
6491         adjusted.
6492         * infcall.c (get_call_return_value): Use inferior_thread.
6493         (run_inferior_call): Work with thread pointers instead of ptid_t.
6494         (call_function_by_hand_dummy): Work with thread pointers instead
6495         of ptid_t.  Use thread_info_ref.
6496         * infcmd.c (proceed_thread_callback): Access thread's state
6497         directly.
6498         (ensure_valid_thread, ensure_not_running): Use inferior_thread,
6499         access thread's state directly.
6500         (continue_command): Use inferior_thread.
6501         (info_program_command): Use find_thread_ptid and access thread
6502         state directly.
6503         (proceed_after_attach_callback): Use thread state directly.
6504         (notice_new_inferior): Take a thread_info pointer instead of a
6505         ptid_t.  All callers adjusted.
6506         (exit_inferior): Take an inferior pointer instead of a pid.  All
6507         callers adjusted.
6508         (exit_inferior_silent): New.
6509         (detach_inferior): Delete.
6510         (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
6511         (gdb_inferior_id_to_pid, in_inferior_list): Delete.
6512         (detach_inferior_command, kill_inferior_command): Use
6513         find_inferior_id instead of valid_gdb_inferior_id and
6514         gdb_inferior_id_to_pid.
6515         (inferior_command): Use inferior and thread pointers.
6516         * inferior.h (struct thread_info): Forward declare.
6517         (notice_new_inferior): Take a thread_info pointer instead of a
6518         ptid_t.  All callers adjusted.
6519         (detach_inferior): Delete declaration.
6520         (exit_inferior, exit_inferior_silent): Take an inferior pointer
6521         instead of a pid.  All callers adjusted.
6522         (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
6523         (valid_gdb_inferior_id): Delete.
6524         * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
6525         (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
6526         (struct displaced_step_inferior_state) <pid>: Delete, replaced by
6527         ...
6528         <inf>: ... this new field.
6529         <step_ptid>: Delete, replaced by ...
6530         <step_thread>: ... this new field.
6531         (get_displaced_stepping_state): Take an inferior pointer instead
6532         of a pid.  All callers adjusted.
6533         (displaced_step_in_progress_any_inferior): Adjust.
6534         (displaced_step_in_progress_thread): Take a thread pointer instead
6535         of a ptid_t.  All callers adjusted.
6536         (displaced_step_in_progress, add_displaced_stepping_state): Take
6537         an inferior pointer instead of a pid.  All callers adjusted.
6538         (get_displaced_step_closure_by_addr): Adjust.
6539         (remove_displaced_stepping_state): Take an inferior pointer
6540         instead of a pid.  All callers adjusted.
6541         (displaced_step_prepare_throw, displaced_step_prepare)
6542         (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
6543         All callers adjusted.
6544         (start_step_over): Adjust.
6545         (infrun_thread_ptid_changed): Remove bit updating ptids in the
6546         displaced step queue.
6547         (do_target_resume): Adjust.
6548         (fetch_inferior_event): Use inferior_thread.
6549         (context_switch, get_inferior_stop_soon): Take an
6550         execution_control_state pointer instead of a ptid_t.  All callers
6551         adjusted.
6552         (switch_to_thread_cleanup): Delete.
6553         (stop_all_threads): Use scoped_restore_current_thread.
6554         * inline-frame.c: Include "gdbthread.h".
6555         (inline_state) <inline_state>: Take a thread pointer instead of a
6556         ptid_t.  All callers adjusted.
6557         <ptid>: Delete, replaced by ...
6558         <thread>: ... this new field.
6559         (find_inline_frame_state): Take a thread pointer instead of a
6560         ptid_t.  All callers adjusted.
6561         (skip_inline_frames, step_into_inline_frame)
6562         (inline_skipped_frames, inline_skipped_symbol): Take a thread
6563         pointer instead of a ptid_t.  All callers adjusted.
6564         * inline-frame.h (skip_inline_frames, step_into_inline_frame)
6565         (inline_skipped_frames, inline_skipped_symbol): Likewise.
6566         * linux-fork.c (delete_checkpoint_command): Adjust to use thread
6567         pointers directly.
6568         * linux-nat.c (get_detach_signal): Likewise.
6569         * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
6570         (thread_db_notice_clone): Adjust.
6571         (thread_db_find_new_threads_silently)
6572         (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
6573         a thread pointer instead of a ptid_t.  All callers adjusted.
6574         * mi/mi-cmd-var.c: Include "inferior.h".
6575         (mi_cmd_var_update_iter): Update to use thread pointers.
6576         * mi/mi-interp.c (mi_new_thread): Update to use the thread's
6577         inferior directly.
6578         (mi_output_running_pid, mi_inferior_count): Delete, bits factored
6579         out to ...
6580         (mi_output_running): ... this new function.
6581         (mi_on_resume_1): Adjust to use it.
6582         (mi_user_selected_context_changed): Adjust to use inferior_thread.
6583         * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
6584         directly.
6585         (interrupt_thread_callback): : Adjust to use thread and inferior
6586         pointers.
6587         * proc-service.c: Include "gdbthread.h".
6588         (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
6589         * progspace-and-thread.c: Include "inferior.h".
6590         * progspace.c: Include "inferior.h".
6591         * python/py-exitedevent.c (create_exited_event_object): Adjust to
6592         hold a reference to an inferior_object.
6593         * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
6594         inferior_thread.
6595         * python/py-inferior.c (struct inferior_object): Give the type a
6596         tag name instead of a typedef.
6597         (python_on_normal_stop): No need to check if the current thread is
6598         listed.
6599         (inferior_to_inferior_object): Change return type to
6600         inferior_object.  All callers adjusted.
6601         (find_thread_object): Delete, bits factored out to ...
6602         (thread_to_thread_object): ... this new function.
6603         * python/py-infthread.c (create_thread_object): Use
6604         inferior_to_inferior_object.
6605         (thpy_is_stopped): Use thread pointer directly.
6606         (gdbpy_selected_thread): Use inferior_thread.
6607         * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
6608         field, replaced with ...
6609         <thread>: ... this new field.  All users adjusted.
6610         (btpy_insn_or_gap_new): Drop const.
6611         (btpy_list_new): Take a thread pointer instead of a ptid_t.  All
6612         callers adjusted.
6613         * python/py-record.c: Include "gdbthread.h".
6614         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
6615         a ptid_t.  All callers adjusted.
6616         (gdbpy_current_recording): Use inferior_thread.
6617         * python/py-record.h (recpy_record_object) <ptid>: Delete
6618         field, replaced with ...
6619         <thread>: ... this new field.  All users adjusted.
6620         (recpy_element_object) <ptid>: Delete
6621         field, replaced with ...
6622         <thread>: ... this new field.  All users adjusted.
6623         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
6624         a ptid_t.  All callers adjusted.
6625         * python/py-threadevent.c: Include "gdbthread.h".
6626         (get_event_thread): Use thread_to_thread_object.
6627         * python/python-internal.h (struct inferior_object): Forward
6628         declare.
6629         (find_thread_object, find_inferior_object): Delete declarations.
6630         (thread_to_thread_object, inferior_to_inferior_object): New
6631         declarations.
6632         * record-btrace.c: Include "inferior.h".
6633         (require_btrace_thread): Use inferior_thread.
6634         (record_btrace_frame_sniffer)
6635         (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
6636         (get_thread_current_frame): Use scoped_restore_current_thread and
6637         switch_to_thread.
6638         (get_thread_current_frame): Use thread pointer directly.
6639         (record_btrace_replay_at_breakpoint): Use thread's inferior
6640         pointer directly.
6641         * record-full.c: Include "inferior.h".
6642         * regcache.c: Include "gdbthread.h".
6643         (get_thread_arch_regcache): Use the inferior's address space
6644         directly.
6645         (get_thread_regcache, registers_changed_thread): New.
6646         * regcache.h (get_thread_regcache(thread_info *thread)): New
6647         overload.
6648         (registers_changed_thread): New.
6649         (remote_target) <remote_detach_1>: Swap order of parameters.
6650         (remote_add_thread): <remote_add_thread>: Return the new thread.
6651         (get_remote_thread_info(ptid_t)): New overload.
6652         (remote_target::remote_notice_new_inferior): Use thread pointers
6653         directly.
6654         (remote_target::process_initial_stop_replies): Use
6655         thread_info::set_running.
6656         (remote_target::remote_detach_1, remote_target::detach)
6657         (extended_remote_target::detach): Adjust.
6658         * stack.c (frame_show_address): Use inferior_thread.
6659         * target-debug.h (target_debug_print_thread_info_pp): New.
6660         * target-delegates.c: Regenerate.
6661         * target.c (default_thread_address_space): Delete.
6662         (memory_xfer_partial_1): Use current_inferior.
6663         (target_detach): Use current_inferior.
6664         (target_thread_address_space): Delete.
6665         (generic_mourn_inferior): Use current_inferior.
6666         * target.h (struct target_ops) <thread_address_space>: Delete.
6667         (target_thread_address_space): Delete.
6668         * thread.c (init_thread_list): Use ALL_THREADS_SAFE.  Use thread
6669         pointers directly.
6670         (delete_thread_1, delete_thread, delete_thread_silent): Take a
6671         thread pointer instead of a ptid_t.  Adjust all callers.
6672         (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
6673         (first_thread_of_process): Delete, replaced by ...
6674         (first_thread_of_inferior): ... this new function.  All callers
6675         adjusted.
6676         (any_thread_of_process): Rename to ...
6677         (any_thread_of_inferior): ... this, and take an inferior pointer.
6678         (any_live_thread_of_process): Rename to ...
6679         (any_live_thread_of_inferior): ... this, and take an inferior
6680         pointer.
6681         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
6682         (value_in_thread_stack_temporaries)
6683         (get_last_thread_stack_temporary): Take a thread pointer instead
6684         of a ptid_t.  Adjust all callers.
6685         (thread_info::set_running): New.
6686         (validate_registers_access): Use inferior_thread.
6687         (can_access_registers_ptid): Rename to ...
6688         (can_access_registers_thread): ... this, and take a thread
6689         pointer.
6690         (print_thread_info_1): Adjust to compare thread pointers instead
6691         of ptids.
6692         (switch_to_no_thread, switch_to_thread): Make extern.
6693         (scoped_restore_current_thread::~scoped_restore_current_thread):
6694         Use m_thread pointer directly.
6695         (scoped_restore_current_thread::scoped_restore_current_thread):
6696         Use inferior_thread.
6697         (thread_command): Use thread pointer directly.
6698         (thread_num_make_value_helper): Use inferior_thread.
6699         * top.c (execute_command): Use inferior_thread.
6700         * tui/tui-interp.c: Include "inferior.h".
6701         * varobj.c (varobj_create): Use inferior_thread.
6702         (value_of_root_1): Use find_thread_global_id instead of
6703         global_thread_id_to_ptid.
6704
6705 2018-06-21  Alan Hayward  <alan.hayward@arm.com>
6706
6707         * regcache.c (readable_regcache::read_part): Avoid memcpy when
6708         possible.
6709         (regcache::write_part): Likewise.
6710         (readable_regcache::cooked_read_part): Update comment.
6711         (readable_regcache::cooked_write_part): Likewise.
6712         * regcache.h: (readable_regcache::read_part): Likewise.
6713         (regcache::write_part): Likewise.
6714
6715 2018-06-21  Richard Bunt  <richard.bunt@arm.com>
6716             Dirk Schubert  <dirk.schubert@arm.com>
6717
6718         * aarch64-linux-nat.c (post_attach): New.
6719         (aarch64_linux_nat_target::post_attach): Override post_attach to
6720         record the number of hardware debug registers.
6721
6722 2018-06-20  Tom Tromey  <tom@tromey.com>
6723
6724         * python/py-param.c (add_setshow_generic): Make parameters const.
6725         (parmpy_init): Update.
6726
6727 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
6728
6729         * regcache.h (regcache_cooked_read_ftype): Rename to...
6730         (register_read_ftype): ...this, change type to function_view.
6731         (class reg_buffer) <save>: Remove src parameter.
6732         (readonly_detached_regcache) <readonly_detached_regcache>: Make
6733         parameter non-const in first overload.  Remove src parameter in
6734         second overload.
6735         * regcache.c (do_cooked_read): Remove.
6736         (readonly_detached_regcache::readonly_detached_regcache): Make
6737         parameter non-const, adjust call to other constructor.
6738         (reg_buffer::save): Remove src parameter.
6739         * frame.c (do_frame_register_read): Remove.
6740         (frame_save_as_regcache): Use lambda function.
6741         * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
6742         parameter to ppu2spu_data *.
6743         (ppu2spu_sniffer): Use lambda function.
6744
6745 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
6746
6747         * record-full.c (record_full_target::insert_breakpoint): Remove
6748         "struct" keyword, add const.
6749
6750 2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>
6751
6752         * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
6753         PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
6754         * configure.ac: Remove AC_PREREQ, add missing quoting.
6755         * gnulib/configure.ac: Modernize usage of
6756         AC_INIT/AM_INIT_AUTOMAKE.  Remove AC_PREREQ.
6757         * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
6758         (AUTOMAKE_VERSION): Bump to 1.15.1.
6759         * configure: Re-generate.
6760         * config.in: Re-generate.
6761         * aclocal.m4: Re-generate.
6762         * gnulib/aclocal.m4: Re-generate.
6763         * gnulib/config.in: Re-generate.
6764         * gnulib/configure: Re-generate.
6765         * gnulib/import/Makefile.in: Re-generate.
6766
6767 2018-06-19  Pedro Alves  <palves@redhat.com>
6768
6769         * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
6770         (lookup_minimal_symbol_by_pc_section): ... here with
6771         gdb_assert_not_reached added.
6772
6773 2018-06-19  Pedro Alves  <palves@redhat.com>
6774
6775         * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
6776         parameter with a block parameter.  Compare location's block symbol
6777         with the frame's block instead of addresses.
6778         (skip_inline_frames): Pass the current block instead of the
6779         frame's address.  Break out as soon as we determine the frame
6780         should not be skipped.
6781
6782 2018-06-18  Tom Tromey  <tom@tromey.com>
6783
6784         * solib-aix.c (solib_aix_get_section_offsets): Return
6785         unique_xmalloc_ptr.
6786         (solib_aix_solib_create_inferior_hook): Update.
6787
6788 2018-06-18  Tom Tromey  <tom@tromey.com>
6789
6790         * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
6791
6792 2018-06-18  Tom Tromey  <tom@tromey.com>
6793
6794         * solib-frv.c (frv_relocate_main_executable): Use
6795         unique_xmalloc_ptr.
6796         * solib-dsbt.c (dsbt_relocate_main_executable): Use
6797         unique_xmalloc_ptr.
6798
6799 2018-06-18  Tom Tromey  <tom@tromey.com>
6800
6801         * objfiles.h (inhibit_section_map_updates): Update.
6802         (resume_section_map_updates, resume_section_map_updates_cleanup):
6803         Remove.
6804         * solib-svr4.c (svr4_handle_solib_event): Update.
6805         * objfiles.c (inhibit_section_map_updates): Return
6806         scoped_restore_tmpl<int>.
6807         (resume_section_map_updates, resume_section_map_updates_cleanup):
6808         Remove.
6809
6810 2018-06-18  Tom Tromey  <tom@tromey.com>
6811
6812         * valprint.h (read_string): Update.
6813         * valprint.c (read_string): Change type of "buffer".
6814         (val_print_string): Update.
6815         * python/py-value.c (valpy_string): Update.
6816         * language.h (struct language_defn) <la_get_string>: Change
6817         type of "buffer".
6818         (default_get_string, c_get_string): Update.
6819         * language.c (default_get_string): Change type of "buffer".
6820         * guile/scm-value.c (gdbscm_value_to_string): Update.
6821         * c-lang.c (c_get_string): Change type of "buffer".
6822
6823 2018-06-18  Tom Tromey  <tom@tromey.com>
6824
6825         * ser-mingw.c (struct pipe_state_destroyer): New.
6826         (pipe_state_up): New typedef.
6827         (cleanup_pipe_state): Remove.
6828         (pipe_windows_open): Use pipe_state_up.  Don't release argv.
6829
6830 2018-06-18  Tom Tromey  <tom@tromey.com>
6831
6832         * rust-lang.h (rust_yyerror): Don't declare.
6833         * rust-lang.c (rust_language_defn): Update.
6834         * rust-exp.y (yyerror): Now static.
6835         * parse.c (parse_exp_in_context_1): Update.
6836         * p-lang.h (p_yyerror): Don't declare.
6837         * p-lang.c (p_language_defn): Update.
6838         * p-exp.y (yyerror): Now static.
6839         * opencl-lang.c (opencl_language_defn): Update.
6840         * objc-lang.c (objc_language_defn): Update.
6841         * m2-lang.h (m2_yyerror): Don't declare.
6842         * m2-lang.c (m2_language_defn): Update.
6843         * m2-exp.y (yyerror): Now static.
6844         * language.h (struct language_defn) <la_error>: Remove.
6845         * language.c (unk_lang_error): Remove.
6846         (unknown_language_defn, auto_language_defn): Remove.
6847         * go-lang.h (go_yyerror): Don't declare.
6848         * go-lang.c (go_language_defn): Update.
6849         * go-exp.y (yyerror): Now static.
6850         * f-lang.h (f_yyerror): Don't declare.
6851         * f-lang.c (f_language_defn): Update.
6852         * f-exp.y (yyerror): Now static.
6853         * d-lang.h (d_yyerror): Don't declare.
6854         * d-lang.c (d_language_defn): Update.
6855         * d-exp.y (yyerror): Now static.
6856         * c-lang.h (c_yyerror): Don't declare.
6857         * c-lang.c (c_language_defn, cplus_language_defn)
6858         (asm_language_defn, minimal_language_defn): Update.
6859         * c-exp.y (yyerror): Now static.
6860         * ada-lang.h (ada_yyerror): Don't declare.
6861         * ada-lang.c (ada_language_defn): Update.
6862         * ada-exp.y (yyerror): Now static.
6863
6864 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
6865
6866         * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
6867         (store_sveregs_to_thread): Likewise.
6868         (aarch64_linux_fetch_inferior_registers): Check for SVE.
6869         (aarch64_linux_store_inferior_registers): Likewise.
6870         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
6871         function.
6872         (aarch64_sve_regs_copy_to_regcache): Likewise.
6873         (aarch64_sve_regs_copy_from_regcache): Likewise.
6874         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
6875         declaration.
6876         (aarch64_sve_regs_copy_to_regcache): Likewise.
6877         (aarch64_sve_regs_copy_from_regcache): Likewise.
6878         (sve_context): Structure from Linux headers.
6879         (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
6880         (SVE_SIG_ZREG_SIZE): Likewise.
6881         (SVE_SIG_PREG_SIZE): Likewise.
6882         (SVE_SIG_FFR_SIZE): Likewise.
6883         (SVE_SIG_REGS_OFFSET): Likewise.
6884         (SVE_SIG_ZREGS_OFFSET): Likewise.
6885         (SVE_SIG_ZREG_OFFSET): Likewise.
6886         (SVE_SIG_ZREGS_SIZE): Likewise.
6887         (SVE_SIG_PREGS_OFFSET): Likewise.
6888         (SVE_SIG_PREG_OFFSET): Likewise.
6889         (SVE_SIG_PREGS_SIZE): Likewise.
6890         (SVE_SIG_FFR_OFFSET): Likewise.
6891         (SVE_SIG_REGS_SIZE): Likewise.
6892         (SVE_SIG_CONTEXT_SIZE): Likewise.
6893         (SVE_PT_REGS_MASK): Likewise.
6894         (SVE_PT_REGS_FPSIMD): Likewise.
6895         (SVE_PT_REGS_SVE): Likewise.
6896         (SVE_PT_VL_INHERIT): Likewise.
6897         (SVE_PT_VL_ONEXEC): Likewise.
6898         (SVE_PT_REGS_OFFSET): Likewise.
6899         (SVE_PT_FPSIMD_OFFSET): Likewise.
6900         (SVE_PT_FPSIMD_SIZE): Likewise.
6901         (SVE_PT_SVE_ZREG_SIZE): Likewise.
6902         (SVE_PT_SVE_PREG_SIZE): Likewise.
6903         (SVE_PT_SVE_FFR_SIZE): Likewise.
6904         (SVE_PT_SVE_FPSR_SIZE): Likewise.
6905         (SVE_PT_SVE_FPCR_SIZE): Likewise.
6906         (__SVE_SIG_TO_PT): Likewise.
6907         (SVE_PT_SVE_OFFSET): Likewise.
6908         (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
6909         (SVE_PT_SVE_ZREG_OFFSET): Likewise.
6910         (SVE_PT_SVE_ZREGS_SIZE): Likewise.
6911         (SVE_PT_SVE_PREGS_OFFSET): Likewise.
6912         (SVE_PT_SVE_PREG_OFFSET): Likewise.
6913         (SVE_PT_SVE_PREGS_SIZE): Likewise.
6914         (SVE_PT_SVE_FFR_OFFSET): Likewise.
6915         (SVE_PT_SVE_FPSR_OFFSET): Likewise.
6916         (SVE_PT_SVE_FPCR_OFFSET): Likewise.
6917         (SVE_PT_SVE_SIZE): Likewise.
6918         (SVE_PT_SIZE): Likewise.
6919         (HAS_SVE_STATE): New define.
6920
6921 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
6922
6923         * nat/aarch64-sve-linux-sigcontext.h: New file.
6924         * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
6925         new files.
6926         (SVE_VQ_MIN): Likewise.
6927         (SVE_VQ_MAX): Likewise.
6928         (SVE_VL_MIN): Likewise.
6929         (SVE_VL_MAX): Likewise.
6930         (SVE_NUM_ZREGS): Likewise.
6931         (SVE_NUM_PREGS): Likewise.
6932         (sve_vl_valid): Likewise.
6933         (struct user_sve_header): Likewise.
6934
6935 2018-06-16  Andrew Burgess  <andrew.burgess@embecosm.com>
6936             Richard Bunt <Richard.Bunt@arm.com>
6937
6938         * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
6939         was requested by GDB.
6940
6941 2018-06-15  Tom de Vries  <tdevries@suse.de>
6942
6943         * MAINTAINERS (Write After Approval): Add Tom de Vries.
6944
6945 2018-06-14  Simon Marchi  <simon.marchi@polymtl.ca>
6946
6947         * gnulib/update-gnulib.sh: Print expected versions of
6948         autoconf/aclocal.
6949
6950 2018-06-14  Simon Marchi  <simon.marchi@ericsson.com>
6951
6952         * arch-utils.c (default_type_align): Use type_length_units.
6953         * gdbtypes.c (type_align): Use type_length_units.
6954
6955 2018-06-14  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6956
6957         * cli/cli-script.c (_initialize_cli_script): Fix online documentation
6958         of 'define' command.
6959
6960 2018-06-14  Tom de Vries  <tdevries@suse.de>
6961
6962         PR cli/22573
6963         * infcmd.c (print_return_value_1): Use get_user_print_options instead of
6964         get_no_prettyformat_print_options.
6965
6966 2018-06-13  Simon Marchi  <simon.marchi@ericsson.com>
6967
6968         * sparc-nat.h: Include target.h.
6969         * sparc64-linux-nat.c (class sparc64_linux_nat_target)
6970         <fetch_registers>: Remove this argument in function call.
6971         <store_registers>: Remove this argument in function call, remove
6972         extra semicolon.
6973         <low_forget_process>: Call sparc64_forget_process instead of
6974         sparc_forget_process.
6975
6976 2018-06-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
6977
6978         * procfs.c (_initialize_procfs): Use add_inf_child_target.
6979         (procfs_target::make_corefile_notes): Adjust to new
6980         target_read_alloc return type.
6981
6982 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
6983             Stephen Roberts  <stephen.roberts@arm.com>
6984
6985         PR gdb/22882
6986         * infrun.c (fetch_inferior_event): If GDB is not proceeding then
6987         run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
6988         Move should_notify_stop local into more inner scope.
6989
6990 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
6991             Stephen Roberts  <stephen.roberts@arm.com>
6992
6993         PR gdb/22882
6994         * infrun.c (resume_1): Add call to mark_async_event_handler.
6995
6996 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
6997
6998         * infrun.c (do_target_wait): Change old version of $pc printed.
6999
7000 2018-06-11  Simon Marchi  <simon.marchi@ericsson.com>
7001
7002         * dwarf2read.c (read_index_from_section): Rename to...
7003         (read_gdb_index_from_section): ... this, update all callers.
7004         (dwarf2_read_index): Rename to...
7005         (dwarf2_read_gdb_index): ... this, update all callers.
7006
7007 2018-06-11  John David Anglin  <danglin@gcc.gnu.org>
7008
7009         * gdb/hppa-linux-nat.c
7010         (hppa_linux_nat_target::fetch_inferior_registers): Rename to
7011         hppa_linux_nat_target::fetch_registers.
7012
7013 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
7014
7015         * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
7016         * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
7017         (AARCH64_DWARF_SVE_FFR): Likewise.
7018         (AARCH64_DWARF_SVE_P0): Likewise.
7019         (AARCH64_DWARF_SVE_Z0): Likewise.
7020
7021 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
7022
7023         * common/common-regcache.h (raw_compare): New function.
7024         * regcache.c (regcache::raw_compare): Likewise.
7025         * regcache.h (regcache::raw_compare): New declaration.
7026
7027 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
7028
7029         * common/common-regcache.h (reg_buffer_common): New structure.
7030         * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
7031         (reg_buffer::raw_supply): Likewise.
7032         (reg_buffer::raw_supply_integer): Likewise.
7033         (reg_buffer::raw_supply_zeroed): Likewise.
7034         (reg_buffer::raw_collect): Likewise.
7035         (reg_buffer::raw_collect_integer): Likewise.
7036         * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
7037         (reg_buffer::raw_supply): Likewise.
7038         (reg_buffer::raw_supply_integer): Likewise.
7039         (reg_buffer::raw_supply_zeroed): Likewise.
7040         (reg_buffer::raw_collect): Likewise.
7041         (reg_buffer::raw_collect_integer): Likewise.
7042
7043 2018-06-10  Tom Tromey  <tom@tromey.com>
7044
7045         * remote.c (stop_reply_p): Remove typedef.  Don't declare queue.
7046         (class remote_state) <stop_reply_queue>: Now std::vector.
7047         (remote_state::~remote_state)
7048         (remote_target::stop_reply_queue_length): Update.
7049         (struct queue_iter_param, remove_child_of_pending_fork)
7050         (struct check_pending_event_prevents_wildcard_vcont_callback_data)
7051         (check_pending_event_prevents_wildcard_vcont_callback)
7052         (remove_stop_reply_for_inferior)
7053         (remove_stop_reply_of_remote_state)
7054         (remote_notif_remove_once_on_match)
7055         (stop_reply_match_ptid_and_ws)
7056         (remote_kill_child_of_pending_fork): Remove.
7057         (remote_target::remove_new_fork_children)
7058         (remote_target::check_pending_events_prevent_wildcard_vcont)
7059         (remote_target::discard_pending_stop_replies)
7060         (remote_target::discard_pending_stop_replies_in_queue)
7061         (remote_target::remote_notif_remove_queued_reply)
7062         (remote_target::queued_stop_reply)
7063         (remote_target::push_stop_reply, remote_target::peek_stop_reply)
7064         (remote_target::wait, remote_target::kill_new_fork_children)
7065         (remote_target::async): Update.
7066
7067 2018-06-10  Tom Tromey  <tom@tromey.com>
7068
7069         * record-full.c (record_full_arch_list_cleanups): Remove.
7070         (record_full_message): Use try/catch.
7071         (record_full_wait_cleanups): Remove.
7072         (record_full_wait_1): Use try/catch.
7073         (record_full_restore): Likewise.
7074
7075 2018-06-10  Tom Tromey  <tom@tromey.com>
7076
7077         * record-full.c (record_full_breakpoint_p): Remove typedef.  Don't
7078         declare VEC.  Add constructor.
7079         <in_target_beneath>: Now bool.
7080         (record_full_breakpoints): Now a std::vector, static.
7081         (record_full_sync_record_breakpoints)
7082         (record_full_init_record_breakpoints)
7083         (record_full_target::insert_breakpoint)
7084         (record_full_target::remove_breakpoint): Update.  Don't use XNEW.
7085
7086 2018-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
7087
7088         * dwarf2read.c (process_cu_includes): Remove struct keyword.
7089         * serial.c (serial_interface_lookup): Remove struct keyword.
7090
7091 2018-06-10  Tom Tromey  <tom@tromey.com>
7092
7093         * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
7094         method.
7095         * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
7096         a method.
7097         * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
7098         method.
7099         * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
7100         "beneath" as a method.
7101         * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
7102         Use "beneath" as a method.
7103
7104 2018-06-10  Tom Tromey  <tom@tromey.com>
7105
7106         * tracefile.c (struct trace_file_writer_deleter): New.
7107         <operator()>: Rename from trace_file_writer_xfree.
7108         (trace_file_writer_up): New typedef.
7109         (tsave_command, trace_save_tfile, trace_save_ctf): Update.
7110
7111 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
7112
7113         * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
7114         <m_registers, m_register_status>: Change type to
7115         std::unique_ptr.
7116         * regcache.c (reg_buffer::reg_buffer): Use new instead of
7117         XCNEWVEC.
7118
7119 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
7120
7121         * common/common-regcache.h (enum register_status): Add
7122         underlying type "signed char".
7123         * regcache.h (reg_buffer) <m_register_status>: Change type to
7124         register_status *.
7125         * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
7126         register_status instead of signed char.
7127         (reg_buffer::save): Use REG_UNKNOWN instead of 0.
7128         (reg_buffer::get_register_status): Remove cast.
7129         (readable_regcache::raw_read): Remove cast.
7130         (readable_regcache::cooked_read): Remove cast.
7131
7132 2018-06-09  Tom Tromey  <tom@tromey.com>
7133
7134         * source.c (reverse_search_command, forward_search_command): Use
7135         scoped_fd.
7136
7137 2018-06-09  Tom Tromey  <tom@tromey.com>
7138
7139         * serial.c (serial_ops_p): Remove typedef.  Don't declare VEC.
7140         (serial_ops_list): Now static, std::vector.
7141         (serial_interface_lookup, serial_add_interface): Update.
7142
7143 2018-06-09  Tom Tromey  <tom@tromey.com>
7144
7145         * dwarf2read.c (process_cu_includes): Update.
7146         (process_full_comp_unit): Update.
7147         * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
7148         std::vector.
7149
7150 2018-06-08  Paul Koning  <paul_koning@dell.com>
7151
7152         PR gdb/23252
7153
7154         * python/python.c (do_start_initialization):
7155         Avoid call to internal Python API.
7156         (init__gdb_module): New function.
7157
7158 2018-06-08  Gary Benson <gbenson@redhat.com>
7159
7160         * linux-thread-db.c (valprint.h): New include.
7161         (struct check_thread_db_info): New structure.
7162         (check_thread_db_on_load, tdb_testinfo): New static globals.
7163         (check_thread_db, check_thread_db_callback): New functions.
7164         (try_thread_db_load_1): Run integrity checks if requested.
7165         (maintenance_check_libthread_db): New function.
7166         (_initialize_thread_db): Register "maint check libthread-db"
7167         and "maint set/show check-libthread-db".
7168         * NEWS: Mention the above new commands.
7169
7170 2018-06-08  Tom Tromey  <tom@tromey.com>
7171
7172         * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
7173         now a method.
7174
7175 2018-06-08  Tom Tromey  <tom@tromey.com>
7176
7177         * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
7178
7179 2018-06-08  Tom Tromey  <tom@tromey.com>
7180
7181         * common/btrace-common.h (struct btrace_data): Add constructor,
7182         destructor, move assignment operator.
7183         <empty, clear, fini>: New methods.
7184         <format>: Initialize.
7185         (btrace_data_init, btrace_data_fini, btrace_data_clear)
7186         (btrace_data_empty): Don't declare.
7187         * common/btrace-common.c (btrace_data_init): Remove.
7188         (btrace_data::fini): Rename from btrace_data_fini.
7189         (btrace_data::empty): Rename from btrace_data_empty.
7190         (btrace_data::clear): Rename from btrace_data_clear.  Return
7191         bool.
7192         * btrace.h (make_cleanup_btrace_data): Don't declare.
7193         * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
7194         (parse_xml_btrace): Update.
7195         (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
7196         (maint_btrace_clear_packet_history_cmd): Update.
7197
7198 2018-06-07  Pedro Alves  <palves@redhat.com>
7199
7200         * target.h (target_ops) <beneath>: Now a method.  All references
7201         updated.
7202         (class target_stack): New.
7203         * target.c (g_target_stack): New.
7204         (g_current_top_target): Delete.
7205         (current_top_target): Get the top target out of g_target_stack.
7206         (target_stack::push, target_stack::unpush): New.
7207         (push_target, unpush_target): Reimplement.
7208         (target_is_pushed): Reimplement in terms of g_target_stack.
7209         (target_ops::beneath, target_stack::find_beneath): New.
7210
7211 2018-06-07  Pedro Alves  <palves@redhat.com>
7212
7213         * target.h (find_target_beneath): Delete declaration.
7214         * target.c (find_target_beneath): Delete definition.
7215         * aix-thread.c: All callers of find_target_beneath adjusted to
7216         call target_ops::beneath instead.
7217         * bsd-uthread.c: Likewise.
7218         * linux-thread-db.c: Likewise.
7219         * ravenscar-thread.c: Likewise.
7220         * sol-thread.c: Likewise.
7221         * spu-multiarch.c: Likewise.
7222
7223 2018-06-07  Pedro Alves  <palves@redhat.com>
7224
7225         * target.h (target_ops) <beneath>: Now a method.  All references
7226         updated.
7227         (target_ops) <m_beneath>: New.
7228         * target.c (target_ops::beneath): New.
7229         * corelow.c: Adjust all references to target_ops::beneath.
7230         * linux-thread-db.c: Likewise.
7231         * make-target-delegates: Likewise.
7232         * record-btrace.c: Likewise.
7233         * record-full.c: Likewise.
7234         * remote.c: Likewise.
7235         * target.c: Likewise.
7236         * target-delegates.c: Regenerate.
7237
7238 2018-06-07  Pedro Alves  <palves@redhat.com>
7239
7240         * target.h (target_stack): Delete.
7241         (current_top_target): Declare function.
7242         * target.c (target_stack): Delete.
7243         (g_current_top_target): New.
7244         (current_top_target): New function.
7245         * auxv.c: Use current_top_target instead of target_stack
7246         throughout.
7247         * avr-tdep.c: Likewise.
7248         * breakpoint.c: Likewise.
7249         * corefile.c: Likewise.
7250         * elfread.c: Likewise.
7251         * eval.c: Likewise.
7252         * exceptions.c: Likewise.
7253         * frame.c: Likewise.
7254         * gdbarch-selftests.c: Likewise.
7255         * gnu-v3-abi.c: Likewise.
7256         * ia64-tdep.c: Likewise.
7257         * ia64-vms-tdep.c: Likewise.
7258         * infcall.c: Likewise.
7259         * infcmd.c: Likewise.
7260         * infrun.c: Likewise.
7261         * linespec.c: Likewise.
7262         * linux-tdep.c: Likewise.
7263         * minsyms.c: Likewise.
7264         * ppc-linux-nat.c: Likewise.
7265         * ppc-linux-tdep.c: Likewise.
7266         * procfs.c: Likewise.
7267         * regcache.c: Likewise.
7268         * remote.c: Likewise.
7269         * rs6000-tdep.c: Likewise.
7270         * s390-linux-nat.c: Likewise.
7271         * s390-tdep.c: Likewise.
7272         * solib-aix.c: Likewise.
7273         * solib-darwin.c: Likewise.
7274         * solib-dsbt.c: Likewise.
7275         * solib-spu.c: Likewise.
7276         * solib-svr4.c: Likewise.
7277         * solib-target.c: Likewise.
7278         * sparc-tdep.c: Likewise.
7279         * sparc64-tdep.c: Likewise.
7280         * spu-tdep.c: Likewise.
7281         * symfile.c: Likewise.
7282         * symtab.c: Likewise.
7283         * target-descriptions.c: Likewise.
7284         * target-memory.c: Likewise.
7285         * target.c: Likewise.
7286         * target.h: Likewise.
7287         * tracefile-tfile.c: Likewise.
7288         * tracepoint.c: Likewise.
7289         * valops.c: Likewise.
7290         * valprint.c: Likewise.
7291         * value.c: Likewise.
7292         * windows-tdep.c: Likewise.
7293         * mi/mi-main.c: Likewise.
7294
7295 2018-06-07  Tom Tromey  <tom@tromey.com>
7296
7297         * valprint.h (build_address_symbolic): Declare.
7298         * printcmd.c (print_address_symbolic): Update.
7299         (build_address_symbolic): Change "name" and "filename" to
7300         std::string.
7301         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
7302         Update.
7303         * defs.h (build_address_symbolic): Remove declaration.
7304
7305 2018-06-07  Alan Hayward  <alan.hayward@arm.com>
7306
7307         * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
7308         (aarch64_vnv_type): Add function.
7309         (aarch64_pseudo_register_name): Add V regs for SVE.
7310         (aarch64_pseudo_register_type): Likewise.
7311         (aarch64_pseudo_register_reggroup_p): Likewise.
7312         (aarch64_pseudo_read_value_2): Use V0 offset for SVE
7313         (aarch64_pseudo_read_value): Add V regs for SVE.
7314         (aarch64_pseudo_write_2): Use V0 offset for SVE
7315         (aarch64_pseudo_write): Add V regs for SVE.
7316         * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
7317
7318 2018-06-06  Sergio Durigan Junior  <sergiodj@redhat.com>
7319
7320         * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
7321         (sve_vl_from_vq): Likewise.
7322
7323 2018-06-05  Tom Tromey  <tom@tromey.com>
7324
7325         * cli/cli-cmds.c (show_version): Update.
7326         * top.c (print_gdb_version): Add "interactive" parameter.
7327         Update.
7328         * main.c (captured_main_1): Update.
7329         * top.h (print_gdb_version): Add "interactive" parameter and a
7330         comment.
7331
7332 2018-06-05  David Malcolm  <dmalcolm@redhat.com>
7333
7334         * common/enum-flags.h: Add trailing semicolon to example in
7335         comment.
7336
7337 2018-06-05  Tom Tromey  <tom@tromey.com>
7338
7339         PR cli/12326:
7340         * NEWS: Add entry about pager.
7341         * utils.c (pagination_disabled_for_command): New global.
7342         (prompt_for_continue): Allow "c" response to prompt.
7343         (reinitialize_more_filter): Clear
7344         pagination_disabled_for_command.
7345         (fputs_maybe_filtered): Check pagination_disabled_for_command.
7346
7347 2018-06-04  Tom Tromey  <tom@tromey.com>
7348
7349         * ada-lang.h (ada_lookup_symbol_list): Update.
7350         * ada-lang.c (resolve_subexp): Update.
7351         (symbols_are_identical_enums): Change type of syms.  Remove nsyms
7352         parameter.
7353         (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
7354         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
7355         results parameter to std::vector.
7356         (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
7357         Update.
7358         * ada-exp.y (block_lookup): Update.
7359         (select_possible_type_sym): Change type of syms.  Remove nsyms
7360         parameter.
7361         (write_var_or_type, write_name_assoc): Update.
7362
7363 2018-06-04  Joel Brobecker  <brobecker@adacore.com>
7364
7365         * windows-nat.c (windows_nat_target::xfer_partial): Return
7366         TARGET_XFER_E_IO if we need to delegate to the target beneath
7367         but BENEATH is NULL.
7368
7369 2018-06-04  Simon Marchi  <simon.marchi@ericsson.com>
7370
7371         * Makefile.in (config.status): Add configure.nat as a
7372         dependency.
7373
7374 2018-06-04  Tom Tromey  <tom@tromey.com>
7375
7376         * cp-name-parser.y (cpname_state): Add method declarations.
7377         (HANDLE_QUAL): Update.
7378         (cpname_state::d_grab, cpname_state::fill_comp)
7379         (cpname_state::make_operator, cpname_state::make_dtor)
7380         (cpname_state::make_builtin_type, cpname_state::make_name)
7381         (cpname_state::d_qualify, cpname_state::d_int_type)
7382         (cpname_state::d_unary, cpname_state::d_binary): Now methods.
7383         (%union): Move earlier.
7384
7385 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
7386
7387         * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
7388
7389 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
7390
7391         * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
7392         (aarch64_pseudo_write_1): Likewise.
7393         (aarch64_pseudo_read_value): Use helper.
7394         (aarch64_pseudo_write): Likewise.
7395
7396 2018-06-04  Pedro Alves  <palves@redhat.com>
7397
7398         * darwin-nat.c (darwin_ops): Delete.
7399         (darwin_attach_pid): Use get_native_target.
7400
7401 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
7402
7403         * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
7404         * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
7405
7406 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
7407
7408         * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
7409         * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
7410         (aarch64_gdbarch_init): Check for SVE.
7411         * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
7412
7413 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
7414
7415         * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
7416         * aarch64-tdep.h (aarch64_read_description): Likewise.
7417         * arch/aarch64.c (aarch64_create_target_description): Likewise.
7418         * arch/aarch64.h (aarch64_create_target_description): Likewise.
7419         * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
7420         * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
7421         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
7422
7423 2018-06-02  Simon Marchi  <simon.marchi@ericsson.com>
7424
7425         * value.c (value_fetch_lazy_bitfield): New.
7426         (value_fetch_lazy_memory): New.
7427         (value_fetch_lazy_register): New.
7428         (value_fetch_lazy): Factor out to smaller functions.
7429
7430 2018-06-01  Tom Tromey  <tom@tromey.com>
7431
7432         * cp-name-parser.y (backslashable, represented): Now const.
7433
7434 2018-06-01  Tom Tromey  <tom@tromey.com>
7435
7436         * cp-name-parser.y: Include parser-defs.h.
7437         (parser_fprintf): Remove declaration.
7438
7439 2018-06-01  Tom Tromey  <tom@tromey.com>
7440
7441         * cp-name-parser.y: Use %pure-parser, %lex-param, and
7442         %parse-param.
7443         (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
7444         (global_result): Remove globals.
7445         (struct cpname_state): New.
7446         (yyparse): Don't declare.
7447         (yylex, yyerror): Move declarations after %union.
7448         (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
7449         (make_name): Add state parameter.
7450         Update all callers.
7451         (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
7452         parameter.
7453         (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
7454         Update.
7455         (yylex): Add lvalp, state parameters.
7456         (yyerror): Add state parameter.
7457         (cp_demangled_name_to_comp): Update.
7458
7459 2018-06-01  Tom Tromey  <tom@tromey.com>
7460
7461         * cp-name-parser.y (parser_fprintf): Declare.
7462         (GDB_YY_REMAP_PREFIX): Define.
7463         Include yy-remap.h.  Don't redefine yy* identifiers.
7464
7465 2018-06-01  Tom Tromey  <tom@tromey.com>
7466
7467         * python/py-type.c (typy_legacy_template_argument): Update.
7468         * cp-support.h (cp_demangled_name_to_comp): Update.
7469         * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
7470         parameter to be a "std::string *".
7471         (main): Update.
7472
7473 2018-06-01  H.J. Lu  <hongjiu.lu@intel.com>
7474
7475         * ada-lex.l: Include "diagnostics.h" instead of
7476         "common/diagnostics.h".
7477         * unittests/environ-selftests.c: Likewise.
7478         * common/diagnostics.h: Moved to ../include.
7479
7480 2018-06-01  Joel Brobecker  <brobecker@adacore.com>
7481
7482         * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
7483         to language_mode_manual while calling breakpoint_re_set_one.
7484
7485 2018-06-01  Tom Tromey  <tom@tromey.com>
7486
7487         * valops.c (value_cast_structs, destructor_name_p): Update.
7488         * symtab.c (gdb_mangle_name): Update.
7489         * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
7490         Update.
7491         * p-valprint.c (pascal_object_is_vtbl_ptr_type)
7492         (pascal_object_print_value_fields, pascal_object_print_value):
7493         Update.
7494         * p-typeprint.c (pascal_type_print_derivation_info): Update.
7495         * linespec.c (find_methods): Update.
7496         * gdbtypes.h (type_name_no_tag): Remove.
7497         (type_name_or_error): Rename from type_name_no_tag_or_error.
7498         * gdbtypes.c (type_name_no_tag): Remove.
7499         (type_name_or_error): Rename from type_name_no_tag_or_error.
7500         (lookup_struct_elt_type, check_typedef): Update.
7501         * expprint.c (print_subexp_standard): Update.
7502         * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
7503         * d-namespace.c (d_lookup_nested_symbol): Update.
7504         * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
7505         (cp_print_class_member): Update.
7506         * cp-namespace.c (cp_lookup_nested_symbol): Update.
7507         * completer.c (add_struct_fields): Update.
7508         * c-typeprint.c (cp_type_print_derivation_info)
7509         (c_type_print_varspec_prefix, c_type_print_base_struct_union):
7510         Update.
7511         * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
7512         (ada_prefer_type, ada_is_exception_sym): Update.
7513
7514 2018-06-01  Tom Tromey  <tom@tromey.com>
7515
7516         * valops.c (enum_constant_from_type, value_namespace_elt)
7517         (value_maybe_namespace_elt): Update.
7518         * valarith.c (find_size_for_pointer_math): Update.
7519         * target-descriptions.c (make_gdb_type): Update.
7520         * symmisc.c (print_symbol): Update.
7521         * stabsread.c (define_symbol, read_type)
7522         (complain_about_struct_wipeout, add_undefined_type)
7523         (cleanup_undefined_types_1): Update.
7524         * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
7525         (rust_range_type_p, val_print_struct, rust_print_struct_def)
7526         (rust_internal_print_type, rust_composite_type)
7527         (rust_evaluate_funcall, rust_evaluate_subexp)
7528         (rust_inclusive_range_type_p): Update.
7529         * python/py-type.c (typy_get_tag): Update.
7530         * p-typeprint.c (pascal_type_print_base): Update.
7531         * mdebugread.c (parse_symbol, parse_type): Update.
7532         * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
7533         Update.
7534         * guile/scm-type.c (gdbscm_type_tag): Update.
7535         * go-lang.c (sixg_string_p): Update.
7536         * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
7537         Update.
7538         * gdbtypes.h (struct main_type) <tag_name>: Remove.
7539         (TYPE_TAG_NAME): Remove.
7540         * gdbtypes.c (type_name_no_tag): Simplify.
7541         (check_typedef, check_types_equal, recursive_dump_type)
7542         (copy_type_recursive, arch_composite_type): Update.
7543         * f-typeprint.c (f_type_print_base): Update.  Print "Type" prefix
7544         in summary mode when needed.
7545         * eval.c (evaluate_funcall): Update.
7546         * dwarf2read.c (fixup_go_packaging, read_structure_type)
7547         (process_structure_scope, read_enumeration_type)
7548         (read_namespace_type, read_module_type, determine_prefix): Update.
7549         * cp-support.c (inspect_type): Update.
7550         * coffread.c (process_coff_symbol, decode_base_type): Update.
7551         * c-varobj.c (c_is_path_expr_parent): Update.
7552         * c-typeprint.c (c_type_print_base_struct_union): Update.
7553         (c_type_print_base_1): Update.  Print struct/class/union/enum in
7554         summary when using C language.
7555         * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
7556         (gen_maybe_namespace_elt): Update.
7557         * ada-lang.c (ada_type_name): Simplify.
7558         (empty_record, ada_template_to_fixed_record_type_1)
7559         (template_to_static_fixed_type)
7560         (to_record_with_fixed_variant_part, ada_check_typedef): Update.
7561
7562 2018-06-01  Tom Tromey  <tom@tromey.com>
7563
7564         * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
7565         c_print_type.
7566         * c-typeprint.c (c_print_type_1): Add "language" parameter.
7567         (c_print_type): Update.
7568         (c_print_type): New overload.
7569         (c_type_print_varspec_prefix, c_type_print_args)
7570         (c_type_print_varspec_suffix, c_print_type_no_offsets)
7571         (c_type_print_base_struct_union, c_type_print_base_1)
7572         (cp_type_print_method_args): Add "language" parameter.
7573         (c_type_print_base): Update.
7574         * c-lang.h (c_print_type): Add new overload.
7575
7576 2018-06-01  Tom Tromey  <tom@tromey.com>
7577
7578         * typeprint.h (c_type_print_varspec_suffix): Don't declare.
7579         * c-typeprint.c (c_type_print_varspec_suffix): Now static.
7580
7581 2018-06-01  Alan Hayward  <alan.hayward@arm.com>
7582
7583         * aarch64-tdep.c (aarch64_sve_register_names): New const
7584         var.
7585         * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
7586         (AARCH64_SVE_Z_REGS_NUM): New define.
7587         (AARCH64_SVE_P_REGS_NUM): Likewise.
7588         (AARCH64_SVE_NUM_REGS): Likewise.
7589
7590 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
7591
7592         * nat/linux-ptrace.h [__alpha__]
7593         (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
7594         definitions.
7595
7596 2018-05-31  Maciej W. Rozycki  <macro@mips.com>
7597
7598         * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
7599         the endianness selected.
7600         * NEWS: Document `set endian auto' mode operation update.
7601
7602 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
7603
7604         * Makefile.in: Add new header.
7605         * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
7606         (sve_vl_from_vg): Likewise.
7607         (sve_vq_from_vl): Likewise.
7608         (sve_vl_from_vq): Likewise.
7609         (sve_vq_from_vg): Likewise.
7610         (sve_vg_from_vq): Likewise.
7611         * configure.nat: Add new c file.
7612         * nat/aarch64-sve-linux-ptrace.c: New file.
7613         * nat/aarch64-sve-linux-ptrace.h: New file.
7614
7615 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
7616
7617         * aarch64-linux-nat.c (aarch64_linux_read_description):
7618         Add parmeter zero.
7619         * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
7620         Likewise.
7621         * aarch64-tdep.c (tdesc_aarch64_list): Add.
7622         (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
7623         (aarch64_gdbarch_init): Add parmeter zero.
7624         * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
7625         * arch/aarch64.c (aarch64_create_target_description): Check VQ.
7626         * arch/aarch64.h (aarch64_create_target_description): Add VQ.
7627         parmeter.
7628         * doc/gdb.texinfo: Describe SVE feature
7629         * features/aarch64-sve.c: New file.
7630
7631 2018-05-31  Omair Javaid  <omair.javaid@linaro.org>
7632
7633         PR gdb/23210
7634         * gdbarch.sh (significant_addr_bit): Default to zero when
7635         not set by target architecture.
7636         * gdbarch.c: Re-generated.
7637         * utils.c (address_significant): Update.
7638
7639 2018-05-30  Joel Brobecker  <brobecker@adacore.com>
7640
7641         * stack.c (func_command): Remove trailing newline in call to error.
7642
7643 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7644
7645         * regcache.h (regcache_raw_collect): Remove, update callers to
7646         use regcache::raw_collect.
7647         * regcache.c (regcache_raw_collect): Remove.
7648
7649 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7650
7651         * regcache.h (regcache_raw_supply): Remove, update callers to
7652         use detached_regcache::raw_supply.
7653         * regcache.c (regcache_raw_supply): Remove.
7654
7655 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7656
7657         * regcache.h (regcache_cooked_write_part): Remove, update
7658         callers to use regcache::cooked_write_part.
7659         * regcache.c (regcache_cooked_write_part): Remove.
7660
7661 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7662
7663         * regcache.h (regcache_cooked_read_part): Remove, update callers
7664         to use readable_regcache::cooked_read_part.
7665         * regcache.c (regcache_cooked_read_part): Remove.
7666
7667 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7668
7669         * regcache.h (regcache_cooked_read_value): Remove, update
7670         callers to use readable_regcache::cooked_read_value.
7671         * regcache.c (regcache_cooked_read_value): Remove.
7672
7673 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7674
7675         * regcache.h (regcache_cooked_write): Remove, update callers to
7676         use regcache::cooked_write.
7677         * regcache.c (regcache_cooked_write): Remove.
7678
7679 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7680
7681         * regcache.h (regcache_invalidate): Remove, update callers to
7682         use detached_regcache::invalidate instead.
7683         * regcache.c (regcache_invalidate): Remove.
7684
7685 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7686
7687         * regcache.h (regcache_raw_write_part): Remove, update callers
7688         to use regcache::raw_write_part instead.
7689         * regcache.c (regcache_raw_write_part): Remove.
7690
7691 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7692
7693         * regcache.h (regcache_raw_read_part): Remove, update callers to
7694         use readable_regcache::raw_read_part instead.
7695         * regcache.c (regcache_raw_read_part): Remove.
7696
7697 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7698
7699         * regcache.h (regcache_cooked_read): Remove, update callers to
7700         use readable_regcache::cooked_read instead.
7701         * regcache.c (regcache_cooked_read): Remove.
7702
7703 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7704
7705         * regcache.h (regcache_raw_write): Remove, update callers to use
7706         regcache::raw_write instead.
7707         * regcache.c (regcache_raw_write): Remove.
7708
7709 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7710
7711         * regcache.h (regcache_raw_read): Remove, update callers to use
7712         readable_regcache::raw_read instead.
7713         * regcache.c (regcache_raw_read): Remove.
7714
7715 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7716
7717         * regcache.h (regcache_raw_update): Remove, update callers to
7718         use readable_regcache::raw_update instead.
7719         * regcache.c (regcache_raw_update): Remove.
7720
7721 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7722
7723         * regcache.h (regcache_register_status): Remove, update callers
7724         to use reg_buffer::get_register_status directly instead.
7725         * regcache.c (regcache_register_status): Remove.
7726
7727 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7728
7729         * regcache.h (regcache_get_ptid): Remove, update all callers to
7730         call regcache::ptid instead.
7731         * regcache.c (regcache_get_ptid): Remove.
7732
7733 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7734
7735         * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
7736
7737 2018-05-30  Pedro Alves  <palves@redhat.com>
7738
7739         * common/common-exceptions.h (exception_rethrow): Use
7740         ATTRIBUTE_NORETURN.
7741
7742 2018-05-29  Simon Marchi  <simon.marchi@polymtl.ca>
7743
7744         * breakpoint.c (print_solib_event, check_status_catch_solib):
7745         Remove struct keyword in range-based for loops.
7746         * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
7747         * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
7748         Likewise.
7749         * linespec.c (find_superclass_methods, search_minsyms_for_name):
7750         Likewise.
7751         * symfile.c (addr_info_make_relative): Likewise.
7752         * thread.c (value_in_thread_stack_temporaries): Likewise.
7753
7754 2018-06-12  Weimin Pan  <weimin.pan@oracle.com>
7755
7756         PR gdb/16841
7757         * valops.c (value_struct_elt_for_reference): Call check_typedef on
7758         aggregate type to get its real type before accessing it.
7759
7760 2018-05-29  Weimin Pan  <weimin.pan@oracle.com>
7761
7762         * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
7763         * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
7764         * coff-pe-read.c (add_pe_forwarded_sym): Replace
7765         lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
7766         * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
7767         * jit.c (jit_breakpoint_re_set_internal): Likewise.
7768         * printcmd.c (info_address_command): Likewise.
7769
7770 2018-05-29  Tom Tromey  <tom@tromey.com>
7771
7772         * windows-nat.c (handle_exception): Update fall-through comment.
7773
7774 2018-05-29  Tom Tromey  <tom@tromey.com>
7775
7776         * progspace.h (so_list_ptr): Remove typedef.  Don't declare VEC.
7777         (struct program_space) <added_solibs>: Now a std::vector.
7778         * breakpoint.c (print_solib_event): Update.
7779         (check_status_catch_solib): Update.
7780         * progspace.c (clear_program_space_solib_cache): Update.
7781         * solib.c (update_solib_list): Update.
7782
7783 2018-05-29  Tom Tromey  <tom@tromey.com>
7784
7785         * python/py-type.c (typy_richcompare): Update.
7786         * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
7787         * gdbtypes.h (types_deeply_equal): Return bool.
7788         (types_equal): Likewise.
7789         * gdbtypes.c (type_equality_entry_d): Remove typedef.  Don't
7790         declare VEC.
7791         (check_types_equal): Change worklist to std::vector.  Return
7792         bool.
7793         (struct type_equality_entry): Add constructor.
7794         (compare_maybe_null_strings): Return bool.
7795         (check_types_worklist): Return bool.  Change worklist to
7796         std::vector.
7797         (types_deeply_equal): Use std::vector.
7798         (types_equal): Return bool.
7799         (compare_maybe_null_strings): Simplify.
7800
7801 2018-05-29  Tom Tromey  <tom@tromey.com>
7802
7803         * record-btrace.c (tp_t): Remove typedef.  Don't declare VEC.
7804
7805 2018-05-29  Tom Tromey  <tom@tromey.com>
7806
7807         * objc-lang.h: Don't include cp-support.h.
7808         * common/gdb_vecs.h (const_char_ptr): Remove typedef.  Don't
7809         declare VEC.
7810
7811 2018-05-27  Tom Tromey  <tom@tromey.com>
7812
7813         * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
7814
7815 2018-05-25  Tom Tromey  <tom@tromey.com>
7816
7817         * value.c (value::location): Initialize.
7818
7819 2018-05-25  Tom Tromey  <tom@tromey.com>
7820
7821         * dbxread.c (init_bincl_list): Remove.
7822         (bincl_list): Now a std::vector.
7823         (bincls_allocated, next_bincl): Remove.
7824         (free_bincl_list, do_free_bincl_list_cleanup)
7825         (make_cleanup_free_bincl_list): Remove.
7826         (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
7827         unique_xmalloc_ptr.
7828         (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
7829         (struct header_file_location): Add constructor.
7830         (add_bincl_to_list): Remove.
7831
7832 2018-05-25  Tom Tromey  <tom@tromey.com>
7833
7834         * tui/tui.c (tui_enable): Update.
7835         * mi/mi-interp.c (mi_interp::init): Update.
7836         * interps.h (class interp) <name>: New method.
7837         <m_name>: Rename from name.
7838         (~scoped_restore_interp): Update.
7839         * interps.c (interp::interp): Update.
7840         (interp_add, interp_set, interp_lookup_existing)
7841         (current_interp_named_p): Update.
7842
7843 2018-05-25  Tom Tromey  <tom@tromey.com>
7844
7845         * interps.c (interp_name): Remove.
7846         * mi/mi-interp.c (mi_interp::init): Update.
7847         * interps.h (interp_name): Remove.
7848         (~scoped_restore_interp): Update.
7849         * tui/tui.c (tui_enable): Update.
7850
7851 2018-05-25  Tom Tromey  <tom@tromey.com>
7852
7853         * utils.c (fputs_maybe_filtered): Update.
7854         * linespec.c (decode_line_full): Update.
7855         * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
7856         (mi_print_breakpoint_for_event, mi_solib_loaded)
7857         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
7858         (mi_user_selected_context_changed): Update.
7859         * mi/mi-main.c (mi_execute_command): Update.
7860         * cli/cli-script.c (execute_control_command): Update.
7861         * python/python.c (execute_gdb_command): Update.
7862         * solib.c (info_sharedlibrary_command): Update.
7863         * interps.c (interp_ui_out): Remove.
7864         * interps.h (interp_ui_out): Remove.
7865
7866 2018-05-25  Tom Tromey  <tom@tromey.com>
7867
7868         * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
7869         * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
7870         * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
7871
7872 2018-05-25  Tom Tromey  <tom@tromey.com>
7873
7874         * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
7875         * interps.c (interp_exec): Use scoped_restore.
7876
7877 2018-05-25  Tom Tromey  <tom@tromey.com>
7878
7879         * remote.c (remote_target::remote_file_get): Use
7880         gdb::byte_vector.
7881         (remote_target::remote_file_put): Likewise.
7882
7883 2018-05-25  Tom Tromey  <tom@tromey.com>
7884
7885         * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
7886         a std::string.
7887         (get_pe_section_index, add_pe_exported_sym): Update.
7888         (read_pe_exported_syms): Use gdb::def_vector.
7889
7890 2018-05-25  Tom Tromey  <tom@tromey.com>
7891
7892         * frame.c (remove_prev_frame): Remove.
7893         (get_prev_frame_if_no_cycle): Use TRY/CATCH.
7894
7895 2018-05-25  Maciej W. Rozycki  <macro@mips.com>
7896
7897         * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
7898         Remove prototypes.
7899         * mips-linux-nat.c (supply_fpregset): Always call
7900         `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
7901         (fill_fpregset): Always call `mips64_fill_fpregset' rather than
7902         `mips_fill_fpregset'.
7903         * mips-linux-tdep.c (mips_supply_fpregset)
7904         (mips_supply_fpregset_wrapper, mips_fill_fpregset)
7905         (mips_fill_fpregset_wrapper): Remove functions.
7906         (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
7907         (mips_linux_fpregset): Remove variable.
7908         (mips_linux_iterate_over_regset_sections): Use
7909         `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
7910         (mips_linux_o32_sigframe_init): Remove comment.
7911
7912 2018-05-25  Pedro Alves  <palves@redhat.com>
7913
7914         * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
7915         (struct readahead_cache, struct packet_reg, struct
7916         remote_arch_state, class remote_state): Move higher up in the
7917         file.
7918         (remote_target::m_remote_state): Now an object instead of a pointer.
7919         (remote_target::get_remote_state): Adjust.
7920
7921 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
7922
7923         * stack.c (select_and_print_frame): Delete.
7924         (struct function_bounds): Move struct within function.
7925         (func_command): Most content moved into new function
7926         find_frame_for_function, use new function, print result, add
7927         function comment.
7928         (find_frame_for_function): New function, now returns a result.
7929
7930 2018-05-24  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
7931
7932         * stack.c (iterate_over_block_arg_vars): Fix comment.
7933         (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
7934
7935 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
7936
7937         PR gdb/23203
7938         * frame.c
7939         (scoped_restore_selected_frame::scoped_restore_selected_frame):
7940         Define.
7941         (scoped_restore_selected_frame::~scoped_restore_selected_frame):
7942         Define.
7943         * frame.h (class scoped_restore_selected_frame): New class.
7944         * stack.c (print_frame_local_vars): Remove catching and rethrowing
7945         of any exception, use scoped_restore_selected_frame to restore the
7946         frame instead.
7947
7948 2018-05-24  Pedro Alves  <palves@redhat.com>
7949
7950         * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
7951         override.
7952
7953 2018-05-23  Tom Tromey  <tom@tromey.com>
7954
7955         * complaints.c (struct complaints): Remove.
7956         (symfile_complaint_book): Remove.
7957         (series): New global.
7958         (complaint_internal): Update.
7959         (clear_complaints): Update.
7960
7961 2018-05-23  Tom Tromey  <tom@tromey.com>
7962
7963         * complaints.c (counters): New global.
7964         (struct complain): Remove.
7965         (struct complaints) <root>: Remove.
7966         (complaint_sentinel): Remove.
7967         (symfile_complaint_book): Update.
7968         (find_complaint) Remove.
7969         (complaint_internal, clear_complaints): Update.
7970
7971 2018-05-23  Tom Tromey  <tom@tromey.com>
7972
7973         * complaints.c (struct complain) <file, line>: Remove.
7974         (find_complaint): Remove file, line parameters.
7975         (complaint_internal): Update.
7976
7977 2018-05-23  Tom Tromey  <tom@tromey.com>
7978
7979         * complaints.c (vcomplaint): Remove.
7980         (complaint_internal) Merge in contents of vcomplaint.
7981
7982 2018-05-23  Tom Tromey  <tom@tromey.com>
7983
7984         * complaints.c (struct complaints) <explanation>: Remove.
7985         (symfile_explanations): Remove.
7986         (symfile_complaint_book): Update.
7987         (vcomplaint): Update.
7988         (struct explanation): Remove.
7989
7990 2018-05-23  Tom Tromey  <tom@tromey.com>
7991
7992         * complaints.c (symfile_complaints): Remove.
7993         (complaint_internal): Remove "complaints" parameter.
7994         (clear_complaints, vcomplaint): Remove "c" parameter.
7995         (get_complaints): Remove.
7996         * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
7997         (dwarf2_debug_line_missing_file_complaint)
7998         (dwarf2_debug_line_missing_end_sequence_complaint)
7999         (dwarf2_complex_location_expr_complaint)
8000         (dwarf2_const_value_length_mismatch_complaint)
8001         (dwarf2_section_buffer_overflow_complaint)
8002         (dwarf2_macro_malformed_definition_complaint)
8003         (dwarf2_invalid_attrib_class_complaint)
8004         (create_addrmap_from_index, dw2_symtab_iter_next)
8005         (dw2_expand_marked_cus)
8006         (dw2_debug_names_iterator::find_vec_in_debug_names)
8007         (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
8008         (create_debug_type_hash_table, init_cutu_and_read_dies)
8009         (partial_die_parent_scope, add_partial_enumeration)
8010         (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
8011         (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
8012         (read_import_statement, read_file_scope, create_dwo_cu_reader)
8013         (create_cus_hash_table, create_dwp_hash_table)
8014         (inherit_abstract_dies, read_func_scope, read_call_site_scope)
8015         (dwarf2_rnglists_process, dwarf2_ranges_process)
8016         (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
8017         (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
8018         (handle_struct_member_die, process_structure_scope)
8019         (read_array_type, read_common_block, read_module_type)
8020         (read_tag_pointer_type, read_typedef, read_base_type)
8021         (read_subrange_type, load_partial_dies, partial_die_info::read)
8022         (partial_die_info::read, partial_die_info::read)
8023         (partial_die_info::read, read_checked_initial_length_and_offset)
8024         (dwarf2_string_attr, read_formatted_entries)
8025         (dwarf_decode_line_header)
8026         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
8027         (new_symbol, dwarf2_const_value_attr, lookup_die_type)
8028         (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
8029         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
8030         (get_signatured_type, get_DW_AT_signature_type)
8031         (decode_locdesc, file_file_name, consume_improper_spaces)
8032         (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
8033         (dwarf_decode_macro_bytes, dwarf_decode_macros)
8034         (dwarf2_symbol_mark_computed, set_die_type)
8035         (read_attribute_value): Update.
8036         * stap-probe.c (handle_stap_probe, get_stap_base_address):
8037         Update.
8038         * dbxread.c (unknown_symtype_complaint)
8039         (lbrac_mismatch_complaint, repeated_header_complaint)
8040         (set_namestring, function_outside_compilation_unit_complaint)
8041         (read_dbx_symtab, process_one_symbol): Update.
8042         * gdbtypes.c (stub_noname_complaint): Update.
8043         * windows-nat.c (handle_unload_dll): Update.
8044         * coffread.c (coff_symtab_read, enter_linenos, decode_type)
8045         (decode_base_type): Update.
8046         * xcoffread.c (bf_notfound_complaint, ef_complaint)
8047         (eb_complaint, record_include_begin, record_include_end)
8048         (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
8049         (process_xcoff_symbol, read_symbol)
8050         (function_outside_compilation_unit_complaint)
8051         (scan_xcoff_symtab): Update.
8052         * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
8053         * buildsym.c (finish_block_internal, make_blockvector)
8054         (end_symtab_get_static_block, augment_type_symtab): Update.
8055         * dtrace-probe.c (dtrace_process_dof)
8056         (dtrace_static_probe_ops::get_probes): Update.
8057         * complaints.h (struct complaint): Don't declare.
8058         (symfile_complaints): Remove.
8059         (complaint_internal): Remove "complaints" parameter.
8060         (complaint): Likewise.
8061         (clear_complaints): Likewise.
8062         * symfile.c (syms_from_objfile_1, finish_new_objfile)
8063         (reread_symbols): Update.
8064         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
8065         (dwarf2_frame_cache, decode_frame_entry): Update.
8066         * dwarf2loc.c (dwarf_reg_to_regnum): Update.
8067         * objc-lang.c (lookup_objc_class, lookup_child_selector)
8068         (info_selectors_command): Update.
8069         * macrotab.c (macro_include, check_for_redefinition)
8070         (macro_undef): Update.
8071         * objfiles.c (filter_overlapping_sections): Update.
8072         * stabsread.c (invalid_cpp_abbrev_complaint)
8073         (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
8074         (define_symbol, error_type, read_type, rs6000_builtin_type)
8075         (stabs_method_name_from_physname, read_member_functions)
8076         (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
8077         (attach_fields_to_type, complain_about_struct_wipeout)
8078         (read_range_type, read_args, common_block_start)
8079         (common_block_end, cleanup_undefined_types_1, scan_file_globals):
8080         Update.
8081         * mdebugread.c (index_complaint, unknown_ext_complaint)
8082         (basic_type_complaint, bad_tag_guess_complaint)
8083         (bad_rfd_entry_complaint, unexpected_type_code_complaint)
8084         (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
8085         (parse_procedure, parse_lines)
8086         (function_outside_compilation_unit_complaint)
8087         (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
8088         (bad_tag_guess_complaint, reg_value_complaint): Update.
8089         * cp-support.c (demangled_name_complaint): Update.
8090         * macroscope.c (sal_macro_scope): Update.
8091         * dwarf-index-write.c (class debug_names): Update.
8092
8093 2018-05-23  Tom Tromey  <tom@tromey.com>
8094
8095         * complaints.c (clear_complaints): Remove "noisy" parameter.
8096         * complaints.h (clear_complaints): Update.
8097         * symfile.c (syms_from_objfile_1, finish_new_objfile)
8098         (reread_symbols): Update.
8099
8100 2018-05-23  Tom Tromey  <tom@tromey.com>
8101
8102         * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
8103         SUBSEQUENT_MESSAGE.
8104         (vcomplaint, clear_complaints): Update.
8105         (symfile_explanations): Remove some messages.
8106
8107 2018-05-23  Tom Tromey  <tom@tromey.com>
8108
8109         * complaints.c (internal_complaint): Remove.
8110         * complaints.h (internal_complaint): Remove.
8111
8112 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
8113
8114         * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
8115
8116 2018-05-22  Pedro Alves  <palves@redhat.com>
8117
8118         * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
8119         (remote_fileio_badfd, remote_fileio_return_errno)
8120         (remote_fileio_return_success, remote_fileio_func_open)
8121         (remote_fileio_func_open, remote_fileio_func_close)
8122         (remote_fileio_func_read, remote_fileio_func_write)
8123         (remote_fileio_func_lseek, remote_fileio_func_rename)
8124         (remote_fileio_func_unlink, remote_fileio_func_stat)
8125         (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
8126         (remote_fileio_func_isatty, remote_fileio_func_system): Add
8127         remote_target parameter.
8128         (remote_fio_func_map) <func>: Add remote_target parameter.
8129         (do_remote_fileio_request, remote_fileio_request):
8130         * remote-fileio.h (remote_fileio_request):
8131         * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
8132         remote_target parameter.
8133         (remote_notif_process, handle_notification): Adjust to pass down
8134         the remote.
8135         (remote_notif_state_allocate): Add remote_target parameter.  Save
8136         it.
8137         * remote-notif.h (struct remote_target): Forward declare.
8138         (struct notif_client) <parse, ack, can_get_pending_events>: Add
8139         remote_target parameter.
8140         (struct remote_notif_state) <remote>: New field.
8141         (remote_notif_ack, remote_notif_parse): Add remote_target
8142         parameter.
8143         (remote_notif_state_allocate, remote_notif_state_allocate): Add
8144         remote_target parameter.
8145         * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
8146         (threads_listing_context, rmt_thread_action, protocol_feature)
8147         (packet_reg, stop_reply, stop_reply_p, enum packet_support)
8148         (packet_result, struct threads_listing_context, remote_state):
8149         Move definitions and declarations higher up.
8150         (remote_target) <~remote_target>: Declare.
8151         (remote_download_command_source, remote_file_put, remote_file_get)
8152         (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
8153         (remote_hostio_pread_vFile, remote_hostio_send_command)
8154         (remote_hostio_set_filesystem, remote_hostio_open)
8155         (remote_hostio_close, remote_hostio_unlink, remote_state)
8156         (get_remote_state, get_remote_packet_size, get_memory_packet_size)
8157         (get_memory_write_packet_size, get_memory_read_packet_size)
8158         (append_pending_thread_resumptions, remote_detach_1)
8159         (append_resumption, remote_resume_with_vcont)
8160         (add_current_inferior_and_thread, wait_ns, wait_as)
8161         (process_stop_reply, remote_notice_new_inferior)
8162         (process_initial_stop_replies, remote_add_thread)
8163         (btrace_sync_conf, remote_btrace_maybe_reopen)
8164         (remove_new_fork_children, kill_new_fork_children)
8165         (discard_pending_stop_replies, stop_reply_queue_length)
8166         (check_pending_events_prevent_wildcard_vcont)
8167         (discard_pending_stop_replies_in_queue, stop_reply)
8168         (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
8169         (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
8170         (remote_interrupt_as, remote_interrupt_ns)
8171         (remote_get_noisy_reply, remote_query_attached)
8172         (remote_add_inferior, remote_current_thread, get_current_thread)
8173         (set_thread, set_general_thread, set_continue_thread)
8174         (set_general_process, write_ptid)
8175         (remote_unpack_thread_info_response, remote_get_threadinfo)
8176         (parse_threadlist_response, remote_get_threadlist)
8177         (remote_threadlist_iterator, remote_get_threads_with_ql)
8178         (remote_get_threads_with_qxfer)
8179         (remote_get_threads_with_qthreadinfo, extended_remote_restart)
8180         (get_offsets, remote_check_symbols, remote_supported_packet)
8181         (remote_query_supported, remote_packet_size)
8182         (remote_serial_quit_handler, remote_detach_pid)
8183         (remote_vcont_probe, remote_resume_with_hc)
8184         (send_interrupt_sequence, interrupt_query)
8185         (remote_notif_get_pending_events, fetch_register_using_p)
8186         (send_g_packet, process_g_packet, fetch_registers_using_g)
8187         (store_register_using_P, store_registers_using_G)
8188         (set_remote_traceframe, check_binary_download)
8189         (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
8190         (remote_xfer_live_readonly_partial, remote_read_bytes)
8191         (remote_send_printf, remote_flash_write, readchar)
8192         (remote_serial_write, putpkt, putpkt_binary, skip_frame)
8193         (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
8194         (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
8195         (extended_remote_disable_randomization, extended_remote_run)
8196         (send_environment_packet, extended_remote_environment_support)
8197         (extended_remote_set_inferior_cwd, remote_write_qxfer)
8198         (remote_read_qxfer, push_stop_reply, vcont_r_supported)
8199         (packet_command): Now methods of ...
8200         (remote_target): ... this class.
8201         (m_remote_state) <remote_target>: New field.
8202         (struct remote_state) <stop_reply_queue,
8203         remote_async_inferior_event_token, wait_forever_enabled_p>: New
8204         fields.
8205         (remote_state::remote_state): Allocate stop_reply_queue.
8206         (remote_state): Delete global.
8207         (get_remote_state_raw): Delete.
8208         (remote_target::get_remote_state): Allocate m_remote_state on
8209         demand.
8210         (get_current_remote_target): New.
8211         (remote_ops, extended_remote_ops): Delete.
8212         (wait_forever_enabled_p, remote_async_inferior_event_token):
8213         Delete, moved to struct remote_state.
8214         (remote_target::close): Delete self.  Destruction bits split to
8215         ...
8216         (remote_target::~remote_target): ... this.
8217         (show_memory_packet_size): Adjust to use
8218         get_current_remote_target.
8219         (struct protocol_feature) <func>: Add remote_target parameter.
8220         All callers adjusted.
8221         (curr_quit_handler_target): New.
8222         (remote_serial_quit_handler): Reimplement.
8223         (remote_target::open_1): Adjust to use get_current_remote_target.
8224         Heap-allocate remote_target/extended_remote_target instances.
8225         (vcont_builder::vcont_builder): Add remote_target parameter, and
8226         save it in m_remote.  All callers adjusted.
8227         (vcont_builder::m_remote): New field.
8228         (vcont_builder::restart, vcont_builder::flush)
8229         (vcont_builder::push_action): Use it.
8230         (remote_target::commit_resume): Use it.
8231         (struct queue_iter_param) <remote>: New field.
8232         (remote_target::remove_new_fork_children): Fill in 'remote' field.
8233         (check_pending_event_prevents_wildcard_vcont_callback_data): New.
8234         (check_pending_event_prevents_wildcard_vcont_callback)
8235         (remote_target::check_pending_events_prevent_wildcard_vcont)
8236         (remote_target::discard_pending_stop_replies)
8237         (remote_target::discard_pending_stop_replies_in_queue)
8238         (remote_target::remote_notif_remove_queued_reply): Fill in
8239         'remote' field.
8240         (remote_notif_get_pending_events): New.
8241         (remote_target::readchar, remote_target::remote_serial_write):
8242         Save/restore curr_quit_handler_target.
8243         (putpkt): New.
8244         (kill_new_fork_children): Fill in 'remote' field.
8245         (packet_command): Use get_current_remote_target, defer to
8246         remote_target method of same name.
8247         (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
8248         parameter, and save it in m_remote.  All callers adjusted.
8249         (scoped_remote_fd::release): Use m_remote.
8250         (scoped_remote_fd::m_remote): New field.
8251         (remote_file_put, remote_file_get, remote_file_delete): Use
8252         get_current_remote_target, defer to remote_target method of same
8253         name.
8254         (remote_btrace_reset): Add remote_state paremeter.  Update all
8255         callers.
8256         (remote_async_inferior_event_handler). Pass down 'data'.
8257         (remote_new_objfile): Use get_current_remote_target.
8258         (remote_target::vcont_r_supported): New.
8259         (set_range_stepping): Use get_current_remote_target and
8260         remote_target::vcont_r_supported.
8261         (_initialize_remote): Don't allocate 'remote_state' and
8262         'stop_reply_queue' globals.
8263         * remote.h (struct remote_target): Forward declare.
8264         (getpkt, putpkt, remote_notif_get_pending_events): Add
8265         'remote_target' parameter.
8266
8267 2018-05-22  Pedro Alves  <palves@redhat.com>
8268
8269         * remote.c (vcont_builder): Now a class.  Make all data members
8270         private.
8271         (vcont_builder) <vcont_builder, restart, flush, push_action>:
8272         Declare methods.
8273         (vcont_builder_restart): Rename to ...
8274         (vcont_builder::restart): ... this.
8275         (vcont_builder_flush): Rename to ...
8276         (vcont_builder::flush): ... this.
8277         (vcont_builder_push_action): Rename to ...
8278         (vcont_builder::push_action): ... this.
8279         (remote_target::commit_resume): Adjust.
8280
8281 2018-05-22  Pedro Alves  <palves@redhat.com>
8282
8283         * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
8284         (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
8285         (get_fixed_memory_packet_size): New.
8286         (get_memory_packet_size): Use it.
8287         (set_memory_packet_size): Don't override the config size with
8288         DEFAULT_MAX_MEMORY_PACKET_SIZE.
8289         (show_memory_packet_size): Use get_fixed_memory_packet_size.
8290         Don't refer to get_memory_packet_size if not connected to a remote
8291         target.  Show "(default)" if configured size is 0.
8292
8293 2018-05-22  Pedro Alves  <palves@redhat.com>
8294
8295         * remote.c (remote_target::mourn_inferior): Move
8296         discard_pending_stop_replies call here from ...
8297         (_initialize_remote): ... here.
8298
8299 2018-05-22  Pedro Alves  <palves@redhat.com>
8300
8301         * remote.c (compare_section_command): Remove set_general_process
8302         call.
8303
8304 2018-05-22  Pedro Alves  <palves@redhat.com>
8305
8306         * remote.c (struct packet_reg, struct remote_arch_state):
8307         Move higher up in the file.
8308         (remote_state) <m_arch_states>: Store remote_arch_state values
8309         instead of remote_arch_state pointers.
8310         (remote_state::get_remote_arch_state): Adjust.
8311
8312 2018-05-22  Pedro Alves  <palves@redhat.com>
8313
8314         * remote.c: Include <unordered_map>.
8315         (remote_state): Now a class.
8316         (remote_state) <get_remote_arch_state>: Declare method.
8317         <get_remote_arch_state>: New field.
8318         (remote_arch_state) <remote_arch_state>: Declare ctor.
8319         <regs>: Now a unique_ptr.
8320         (remote_gdbarch_data_handle): Delete.
8321         (get_remote_arch_state): Delete.
8322         (remote_state::get_remote_arch_state): New.
8323         (get_remote_state): Adjust to call remote_state's
8324         get_remote_arch_state method.
8325         (init_remote_state): Delete, bits factored out to ...
8326         (remote_arch_state::remote_arch_state): ... this new method.
8327         (get_remote_packet_size, get_memory_packet_size)
8328         (process_g_packet, remote_target::fetch_registers)
8329         (remote_target::prepare_to_store, store_registers_using_G)
8330         (remote_target::store_registers, remote_target::get_trace_status):
8331         Adjust to call remote_state's method.
8332         (_initialize_remote): Remove reference to
8333         remote_gdbarch_data_handle.
8334
8335 2018-05-22  Pedro Alves  <palves@redhat.com>
8336
8337         * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
8338         pread>: New method declarations.
8339         (remote_target::open_1): Adjust.
8340         (readahead_cache_invalidate): Rename to ...
8341         (readahead_cache::invalidate): ... this, and adjust to be a class
8342         method.
8343         (readahead_cache_invalidate_fd): Rename to ...
8344         (readahead_cache::invalidate_fd): ... this, and adjust to be a
8345         class method.
8346         (remote_hostio_pwrite): Adjust.
8347         (remote_hostio_pread_from_cache): Rename to ...
8348         (readahead_cache::pread): ... this, and adjust to be a class
8349         method.
8350         (remote_hostio_close): Adjust.
8351
8352 2018-05-22  Pedro Alves  <palves@redhat.com>
8353
8354         * remote.c (remote_hostio_close_cleanup): Delete.
8355         (class scoped_remote_fd): New.
8356         (remote_file_put, remote_file_get): Use it.
8357
8358 2018-05-22  Pedro Alves  <palves@redhat.com>
8359
8360         (struct vCont_action_support): Use bool and initialize all fields.
8361         (struct readahead_cache): Initialize all fields.
8362         (remote_state): Use bool and initialize all fields.
8363         (remote_state::remote_state, remote_state::~remote_state): New.
8364         (new_remote_state): Delete.
8365         (_initialize_remote): Use new to allocate remote_state.
8366
8367 2018-05-22  Pedro Alves  <palves@redhat.com>
8368             張俊芝  <zjz@zjz.name>
8369
8370         PR gdb/22973
8371         * c-exp.y: Include "c-support.h".
8372         (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
8373         of tolower.  Use c_ident_is_alpha to scan names.
8374         * c-lang.c: Include "c-support.h".
8375         (convert_ucn, convert_octal, convert_hex, convert_escape): Use
8376         ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
8377         * c-support.h: New file, with bits factored out from ...
8378         * cp-name-parser.y: ... this file.
8379         Include "c-support.h".
8380         (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
8381         c-support.h and renamed.
8382         (symbol_end, yylex): Adjust.
8383
8384 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8385
8386         * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
8387         parameter type to CORE_ADDR.
8388         * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
8389         parameter type in declaration to CORE_ADDR.
8390         * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
8391         target_auxv_search to get AT_HWCAP and use the result to get the
8392         target description.
8393         * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
8394         to CORE_ADDR. Remove the cast of the return value to unsigned
8395         long. Fix error predicate of target_auxv_search.
8396         (ppc_linux_nat_target::read_description): Change the type of the
8397         hwcap variable to CORE_ADDR.
8398
8399 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8400
8401         * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
8402         if the size of fpscr is larger than 32 bits.
8403
8404 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8405
8406         * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
8407         (ppc32_linux_vsxregmap): New global.
8408         (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
8409         regcache_supply_regset, and regcache_collect_regset.
8410         * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
8411         * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
8412         (fetch_vsx_register, store_vsx_register): Remove.
8413         (fetch_vsx_registers): Add regno parameter. Get regset using
8414         ppc_linux_vsxregset. Use regset to supply registers.
8415         (store_vsx_registers): Add regno parameter. Get regset using
8416         ppc_linux_vsxregset. Use regset to collect registers.
8417         (fetch_register): Call fetch_vsx_registers instead of
8418         fetch_vsx_register.
8419         (store_register): Call store_vsx_registers instead of
8420         store_vsx_register.
8421         (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
8422         new regno parameter.
8423         (store_ppc_registers): Call store_vsx_registers with -1 for the
8424         new regno parameter.
8425         * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
8426         (ppc_collect_vsxregset): Remove.
8427
8428 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8429
8430         * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
8431         offset fields.
8432         * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
8433         for vector register offset fields.
8434         (ppc64_fbsd_reg_offsets): Likewise.
8435         * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
8436         to vector register offset fields.
8437         * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
8438         to vector register offset fields.
8439         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
8440         vector register offset fields.
8441         * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
8442         initializers for vector register offset fields.
8443         (rs6000_aix64_reg_offsets): Likewise.
8444         * rs6000-tdep.c (ppc_vrreg_offset): Remove.
8445         (ppc_supply_vrregset): Remove.
8446         (ppc_collect_vrregset): Remove.
8447         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
8448         (ppc_linux_vrregset) : New function.
8449         (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
8450         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
8451         (ppc32_linux_vrregset): Remove.
8452         (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
8453         and use result instead of ppc32_linux_vrregset.
8454         (ppc32_linux_reg_offsets): Remove initializers for vector register
8455         offset fields.
8456         (ppc64_linux_reg_offsets): Likewise.
8457         * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
8458         * ppc-linux-nat.c: Include regset.h.
8459         (gdb_vrregset_t): Adjust comment to account for little-endian
8460         mode.
8461         (supply_vrregset, fill_vrregset): Remove.
8462         (fetch_altivec_register, store_altivec_register): Remove.
8463         (fetch_altivec_registers): Add regno parameter. Get regset using
8464         ppc_linux_vrregset. Use regset to supply registers.
8465         (store_altivec_registers): Add regno parameter. Get regset using
8466         ppc_linux_vrregset. Use regset to collect registers.
8467         (fetch_register): Call fetch_altivec_registers instead of
8468         fetch_altivec_register.
8469         (store_register): Call store_altivec_registers instead of
8470         store_altivec_register.
8471         (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
8472         the new regno parameter.
8473         (store_ppc_registers): Call store_altivec_registers with -1 for
8474         the new regno parameter.
8475
8476 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8477
8478         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
8479         (PPC_LINUX_SIZEOF_VSXREGSET): Define.
8480         * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
8481         (gdb_vrregset_t): Change array type size to
8482         PPC_LINUX_SIZEOF_VRREGSET.
8483         (gdb_vsxregset_t): Change array type size to
8484         PPC_LINUX_SIZEOF_VSXREGSET.
8485         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
8486         Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
8487         PPC_LINUX_SIZEOF_VSXREGSET.
8488
8489 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8490
8491         * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
8492         * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
8493         nat/ppc-linux.c.
8494         (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
8495         ppc_linux_target_wordsize with tid.
8496         (ppc_linux_nat_target::read_description): Call ppc_linux_target
8497         wordsize with tid.
8498         * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
8499         (ppc64_64bit_inferior_p): Add static and inline specifiers.
8500         (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
8501         tid parameter. Remove static specifier.
8502         * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
8503         (ppc_linux_target_wordsize): New declaration.
8504
8505 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8506
8507         * arch/ppc-linux-common.c: New file.
8508         * arch/ppc-linux-common.h: New file.
8509         * arch/ppc-linux-tdesc.h: New file.
8510         * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
8511         * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
8512         (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
8513         arch/ppc-linux-tdesc.h.
8514         * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
8515         arch/ppc-linux-tdesc.h.
8516         (ppc_linux_nat_target::read_description): Remove target
8517         description matching code. Fill a ppc_linux_features struct and
8518         call ppc_linux_match_description with it. Move comment about ISA
8519         2.05 to ppc-linux-common.c.
8520         * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
8521         arch/ppc-linux-tdesc.h.
8522         (ppc_linux_core_read_description): Remove target description
8523         matching code. Fill a ppc_linux_features struct and call
8524         ppc_linux_match_description with it.
8525         * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
8526         (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
8527         (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
8528         (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
8529         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
8530         (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
8531         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
8532         (tdesc_powerpc_e500l): Remove.
8533
8534 2018-05-22  Joel Brobecker  <brobecker@adacore.com>
8535
8536         * ada-lang.c (catch_assert_command): Pass empty string instead
8537         of NULL for excep_string argument.
8538
8539 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
8540
8541         * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
8542         the width of the requested register exceeds the width of the
8543         `ptrace' data type.
8544
8545 2018-05-21  Tom Tromey  <tom@tromey.com>
8546
8547         * printcmd.c (output_command): Remove.
8548         (output_command_const): Rename to output_command.
8549         * valprint.h (output_command): Rename from output_command_const.
8550         * tracepoint.c (trace_dump_actions): Call output_command.
8551
8552 2018-05-21  Tom Tromey  <tom@tromey.com>
8553
8554         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
8555         (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
8556         * ada-lang.h (create_ada_exception_catchpoint): Update.
8557         * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
8558         std::string.
8559         (create_excep_cond_exprs, ~ada_catchpoint)
8560         (should_stop_exception, print_one_exception)
8561         (print_mention_exception, print_recreate_exception): Update.
8562         (ada_get_next_arg): Remove.
8563         (catch_ada_exception_command_split): Use std::string.  Change type
8564         of "excep_string", "cond_string".
8565         (catch_ada_exception_command): Update.
8566         (create_ada_exception_catchpoint): Change type of excep_string.
8567         (ada_exception_sal): Remove excep_string parameter.
8568         (~ada_catchpoint): Remove.
8569
8570 2018-05-21  Tom Tromey  <tom@tromey.com>
8571
8572         * ada-lang.c (ada_collect_symbol_completion_matches): Remove
8573         cleanup.
8574
8575 2018-05-21  Tom Tromey  <tom@tromey.com>
8576
8577         * ada-lang.c (ada_exception_message_1, ada_exception_message):
8578         Return unique_xmalloc_ptr.
8579         (print_it_exception): Update.
8580
8581 2018-05-21  Tom Tromey  <tom@tromey.com>
8582
8583         * tracepoint.c (trace_dump_actions): Use std::string.
8584
8585 2018-05-21  Tom Tromey  <tom@tromey.com>
8586
8587         * symfile.c (reread_symbols): Use std::string for original_name.
8588
8589 2018-05-21  Tom Tromey  <tom@tromey.com>
8590
8591         * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
8592         (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN.  Default
8593         constructor.
8594
8595 2018-05-20  Simon Marchi  <simon.marchi@polymtl.ca>
8596
8597         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
8598         instance to...
8599         (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
8600         * objfiles.c (get_objfile_bfd_data): Allocate
8601         objfile_per_bfd_storage with obstack_new when allocating on
8602         obstack.
8603
8604 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
8605
8606         * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
8607         OBSTACK_ZALLOC.
8608         * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
8609         * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
8610         * mdebugread.c (mdebug_build_psymtabs): Likewise.
8611         (add_pending): Likewise.
8612         (parse_symbol): Likewise.
8613         (parse_partial_symbols): Likewise.
8614         (psymtab_to_symtab_1): Likewise.
8615         (new_psymtab): Likewise.
8616         (elfmdebug_build_psymtabs): Likewise.
8617         * minsyms.c (terminate_minimal_symbol_table): Likewise.
8618         * objfiles.c (get_objfile_bfd_data): Likewise.
8619         (objfile_register_static_link): Likewise.
8620         * psymtab.c (allocate_psymtab): Likewise.
8621         * stabsread.c (read_member_functions): Likewise.
8622         * xcoffread.c (xcoff_end_psymtab): Likewise.
8623
8624 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
8625
8626         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
8627         compiler supports std::is_trivially_constructible.
8628         * common/poison.h: Include obstack.h.
8629         (IsMallocable): Define to is_trivially_constructible if the
8630         compiler supports it, define to true_type otherwise.
8631         (xobnew): New.
8632         (XOBNEW): Redefine.
8633         (xobnewvec): New.
8634         (XOBNEWVEC): Redefine.
8635         * gdb_obstack.h (obstack_zalloc): New.
8636         (OBSTACK_ZALLOC): Redefine.
8637         (obstack_calloc): New.
8638         (OBSTACK_CALLOC): Redefine.
8639         (obstack_new): New.
8640         * gdbarch.sh: Include gdb_obstack in gdbarch.h.
8641         (gdbarch_obstack): New declaration in gdbarch.h, definition in
8642         gdbarch.c.
8643         (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
8644         obstack_calloc/obstack_zalloc.
8645         (gdbarch_obstack_zalloc): Remove.
8646         * target-descriptions.c (tdesc_data_init): Use obstack_new.
8647
8648 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
8649
8650         * stack.c (backtrace_command_1): Remove useless variable int i.
8651
8652 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
8653
8654         * stack.c (print_frame_info): Fix comment.
8655
8656 2018-05-18  Tom Tromey  <tom@tromey.com>
8657
8658         * dwarf2read.c (struct dwz_file): Add constructor, initializers.
8659         <dwz_bfd>: Now a gdb_bfd_ref_ptr.
8660         (~dwarf2_per_objfile): Update
8661         (dwarf2_get_dwz_file): Use new.
8662         * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
8663         unique_ptr.
8664
8665 2018-05-18  Tom Tromey  <tom@tromey.com>
8666
8667         * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
8668         unique_ptr.
8669         * dwarf2read.c (struct dwp_file): Add constructor and
8670         initializers.
8671         (open_and_init_dwp_file): Return a unique_ptr.
8672         (dwarf2_per_objfile, create_dwp_hash_table)
8673         (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
8674         (lookup_dwo_unit_in_dwp): Update.
8675         (open_and_init_dwp_file, get_dwp_file): Update.
8676
8677 2018-05-18  Tom Tromey  <tom@tromey.com>
8678
8679         * dwarf2read.c (dwarf2_per_objfile): Update.
8680         (struct mapped_index): Add initializers.
8681         (dwarf2_read_index): Use new.
8682         (dw2_symtab_iter_init): Update.
8683         * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
8684         unique_ptr.
8685
8686 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
8687
8688         * dwarf2read.c (mapped_index) <total_size>: Remove.
8689
8690 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
8691
8692         * unittests/format_pieces-selftests.c (test_format_specifier):
8693         Add ARI comments.
8694
8695 2018-05-18  Tom Tromey  <tom@tromey.com>
8696
8697         * c-typeprint.c (maybe_print_hole): New function.
8698         (c_print_type_struct_field_offset): Update.
8699         (c_type_print_base_struct_union): Call maybe_print_hole.
8700
8701 2018-05-17  Keith Seitz  <keiths@redhat.com>
8702
8703         * breakpoint.c (build_bpstat_chain): New function, moved from
8704         bpstat_stop_status.
8705         (bpstat_stop_status): Add optional parameter, `stop_chain'.
8706         If no stop chain is passed, call build_bpstat_chain to build it.
8707         * breakpoint.h (build_bpstat_chain): Declare.
8708         (bpstat_stop_status): Move documentation here from breakpoint.c.
8709         * infrun.c (handle_signal_stop): Before eliding inlined frames,
8710         build the stop chain and pass it to skip_inline_frames.
8711         Pass this stop chain to bpstat_stop_status.
8712         * inline-frame.c: Include breakpoint.h.
8713         (stopped_by_user_bp_inline_frame): New function.
8714         (skip_inline_frames): Add parameter `stop_chain'.
8715         Move documention to inline-frame.h.
8716         If non-NULL, use stopped_by_user_bp_inline_frame to determine
8717         whether the frame should be elided.
8718         * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
8719         Add moved documentation and update for new parameter.
8720
8721 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
8722
8723         PR cli/14975
8724         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8725         unittests/format_pieces-selftests.c.
8726         * common/format.h (format_piece) <operator==>: New.
8727         (format_pieces) <operator[]>: Remove.
8728         * common/format.c (format_pieces::format_pieces): Handle \e.
8729         * unittests/format_pieces-selftests.c: New.
8730
8731 2018-05-17  Tom Tromey  <tom@tromey.com>
8732
8733         PR symtab/23010:
8734         * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
8735         (dw2_instantiate_symtab): Add skip_partial parameter.
8736         (dw2_find_last_source_symtab, dw2_map_expand_apply)
8737         (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
8738         (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
8739         (dw2_expand_symtabs_matching_one)
8740         (dw2_find_pc_sect_compunit_symtab)
8741         (dw2_debug_names_lookup_symbol)
8742         (dw2_debug_names_expand_symtabs_for_function): Update.
8743         (init_cutu_and_read_dies): Add skip_partial parameter.
8744         (process_psymtab_comp_unit, build_type_psymtabs_1)
8745         (process_skeletonless_type_unit, load_partial_comp_unit)
8746         (psymtab_to_symtab_1): Update.
8747         (load_full_comp_unit): Add skip_partial parameter.
8748         (process_imported_unit_die, dwarf2_read_addr_index)
8749         (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
8750         (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
8751         (read_signatured_type): Update.
8752
8753 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
8754
8755         * value.c (release_value): Remove unused variable.
8756         (record_latest_value): Likewise.
8757         (access_value_history): Likewise.
8758         (preserve_values): Likewise.
8759
8760 2018-05-17  Tom Tromey  <tom@tromey.com>
8761
8762         * extension.h (struct ext_lang_type_printers) <py_type_printers>:
8763         Initialize.
8764
8765 2018-05-16  Maciej W. Rozycki  <macro@mips.com>
8766
8767         PR gdb/22286
8768         * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
8769         Also handle registers whose width is not a multiple of
8770         PTRACE_TYPE_RET.
8771         (linux_nat_trad_target::store_register): Likewise.
8772
8773 2018-05-16  Tom Tromey  <tom@tromey.com>
8774
8775         * gdbcore.h (core_bfd): Redefine.
8776         * corelow.c (core_target::close): Update.
8777         (core_target_open): Update.
8778         * progspace.h (struct program_space) <cbfd>: Now a
8779         gdb_bfd_ref_ptr.
8780
8781 2018-05-16  Tom Tromey  <tom@tromey.com>
8782
8783         PR cli/19551:
8784         * symfile-add-flags.h (enum symfile_add_flags)
8785         <SYMFILE_NOT_FILENAME>: New constant.
8786         * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME.  Get
8787         objfile name from BFD.
8788         (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
8789         * minidebug.c (find_separate_debug_file_in_section): Put
8790         ".gnu_debugdata" into BFD's file name.
8791
8792 2018-05-16  Simon Marchi  <simon.marchi@ericsson.com>
8793
8794         * regcache.c (regcache_read_ftype, regcache_write_ftype):
8795         Remove.
8796
8797 2018-05-15  Tamar Christina  <tamar.christina@arm.com>
8798
8799         PR binutils/21446
8800         * aarch64-tdep.c (aarch64_analyze_prologue,
8801         aarch64_software_single_step, aarch64_displaced_step_copy_insn):
8802         Indicate not interested in errors.
8803
8804 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
8805
8806         * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
8807         Supply the MIPS_ZERO_REGNUM register.
8808
8809 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
8810
8811         * mips-tdep.c (mask_address_var): Make variable static.
8812
8813 2018-05-14  Tom Tromey  <tom@tromey.com>
8814
8815         * dwarf2read.c (rust_union_quirks): Clear rust_unions.
8816
8817 2018-05-11  Andrew Burgess  <andrew.burgess@embecosm.com>
8818
8819         * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
8820         FXSAVE_ADDR for the mxcsr register.
8821
8822 2018-05-11  Max Filippov  <jcmvbkbc@gmail.com>
8823
8824         * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
8825
8826 2018-05-11  Pedro Alves  <palves@redhat.com>
8827
8828         * corelow.c (core_target) <core_target>: No longer inline.
8829         Initialize m_core_gdbarch, m_core_vec and build the section table
8830         here.
8831         <~core_target>: New.
8832         <core_gdbarch, get_core_register_section>: New methods.
8833         <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
8834         factored out from ...
8835         <core_data, core_vec, core_gdbarch>: ... these deleted globals.
8836         (core_ops): Delete.
8837         (sniff_core_bfd): Add gdbarch parameter.
8838         (core_close): Delete, merged into ...
8839         (core_target::close): ... here.  Delete self.
8840         (core_close_cleanup): Delete.
8841         (core_target_open): Allocate a core_target on the heap.  Use a
8842         unique_ptr instead of a cleanup.  Bits moved into the core_target
8843         ctor.  Adjust to use core_target methods instead of globals.
8844         (get_core_register_section): Rename to ...
8845         (core_target::get_core_register_section): ... this and adjust.
8846         (struct get_core_registers_cb_data): New.
8847         (get_core_registers_cb): Use it.  Use bool.
8848         (core_target::fetch_registers, core_target::files_info)
8849         (core_target::xfer_partial, core_target::read_description)
8850         (core_target::pid_to, core_target::thread_name): Adjust to
8851         reference class fields instead of globals.
8852         * target.h (struct target_ops_deleter, target_ops_up): New.
8853
8854 2018-05-11  Pedro Alves  <palves@redhat.com>
8855
8856         * corefile.c (core_file_command): Move to corelow.c.
8857         * corelow.c (the_core_target): Delete.
8858         (core_file_command): Moved from corefile.c.  Check exec_bfd
8859         instead of the_core_target.  Use target_detach instead of calling
8860         into the_core_target directly.
8861         (maybe_say_no_core_file_now): New.
8862         (core_target::detach): Use it.
8863         (_initialize_corelow): Remove references to the_core_target.
8864         * gdbcore.h (the_core_target): Delete.
8865
8866 2018-05-11  Tom Tromey  <tromey@redhat.com>
8867             Pedro Alves  <palves@redhat.com>
8868
8869         * corefile.c (core_bfd): Remove.
8870         * gdbcore.h (core_bfd): Now a macro.
8871         * progspace.h (struct program_space) <cbfd>: New field.
8872
8873 2018-05-11  Tom Tromey  <tom@tromey.com>
8874
8875         * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
8876         gdb::def_vector.
8877
8878 2018-05-10  Tom Tromey  <tom@tromey.com>
8879
8880         * configure: Rebuild.
8881         * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
8882
8883 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
8884
8885         PR server/23158:
8886         * regformats/regdat.sh: Adjust script, following the addition
8887         of the new expedite_regs parameter to init_target_desc.
8888
8889 2018-05-10  Omair Javaid  <omair.javaid@linaro.org>
8890     
8891         PR gdb/23127
8892         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
8893         set_gdbarch_significant_addr_bit.
8894         * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
8895         set_gdbarch_significant_addr_bit.
8896         * utils.c (address_significant): Update to sign extend addr.
8897
8898 2018-05-09  Max Filippov  <jcmvbkbc@gmail.com>
8899
8900         * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
8901         (xtensa_linux_init_abi): Limit tdep->num_regs by
8902         tdep->num_nopriv_regs.
8903         * xtensa-tdep.c (xtensa_derive_tdep): Calculate
8904         tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
8905         not initialized.
8906
8907 2018-05-08  Simon Marchi  <simon.marchi@ericsson.com>
8908
8909         * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
8910
8911 2018-05-08  Andrew Burgess  <andrew.burgess@embecosm.com>
8912
8913         * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
8914         (I387_MXCSR_INIT_VAL): New constant.
8915         * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
8916         buffer if it was supplied by the inferior.
8917         * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
8918         (i387_xsave_get_clear_bv): New function.
8919         (i387_supply_xsave): Only read x87 control registers from the
8920         xsave buffer if the feature is enabled, and the state will have
8921         been written, otherwise, provide a suitable default.
8922         (i387_collect_xsave): Pre-clear all registers in xsave buffer,
8923         including x87 control registers.  Update control registers if they
8924         have changed from the default value, and mark features as enabled
8925         as required.
8926         * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
8927
8928 2018-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
8929
8930         * spu-tdep.c (info_spu_event_command): Fix output formatting.
8931
8932 2018-05-07  Tom Tromey  <tom@tromey.com>
8933
8934         * configure: Rebuild.
8935         * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
8936
8937 2018-05-07  Tom Tromey  <tom@tromey.com>
8938
8939         PR tdep/20362:
8940         * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
8941         bit.  Use correct value for VDIV.
8942
8943 2018-05-04  Tom Tromey  <tom@tromey.com>
8944
8945         * configure: Rebuild.
8946         * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
8947
8948 2018-05-04  Tom Tromey  <tom@tromey.com>
8949
8950         * linux-record.c (record_linux_system_call) <case
8951         RECORD_SYS_RECVFROM>: Add "break".
8952
8953 2018-05-04  Tom Tromey  <tom@tromey.com>
8954
8955         * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
8956         Add missing "break".
8957         * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
8958         Add missing "break".
8959
8960 2018-05-04  Tom Tromey  <tom@tromey.com>
8961
8962         * rs6000-tdep.c (ppc_process_record_op4)
8963         (ppc_process_record_op63): Add fall-through comment.
8964
8965 2018-05-04  Tom Tromey  <tom@tromey.com>
8966
8967         * i386-tdep.c (i386_process_record): Add fall-through comment.
8968
8969 2018-05-04  Tom Tromey  <tom@tromey.com>
8970
8971         * stabsread.c (define_symbol) <case 'p'>: Add fall-through
8972         comment.
8973
8974 2018-05-04  Tom Tromey  <tom@tromey.com>
8975
8976         * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
8977         * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
8978         * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
8979         comment.
8980         * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
8981         comment.
8982         * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
8983         comment.
8984
8985 2018-05-04  Tom Tromey  <tom@tromey.com>
8986
8987         * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
8988
8989 2018-05-04  Tom Tromey  <tom@tromey.com>
8990
8991         * s390-tdep.c (s390_process_record): Fix fall-through comments.
8992         * xcoffread.c (scan_xcoff_symtab): Move comment later.
8993         * symfile.c (section_is_mapped): Fix fall-through comment.
8994         * stabsread.c (define_symbol, read_member_functions): Fix
8995         fall-through comment.
8996         * s390-linux-tdep.c (s390_process_record): Fix fall-through
8997         comment.
8998         * remote.c (remote_wait_as): Fix fall-through comment.
8999         * p-exp.y (yylex): Fix fall-through comment.
9000         * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
9001         comment.
9002         * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
9003         * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
9004         * jv-exp.y (yylex): Fix fall-through comment.
9005         * go-exp.y (lex_one_token): Fix fall-through comment.
9006         * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
9007         fall-through comment.
9008         * f-exp.y (yylex): Fix fall-through comment.
9009         * dwarf2read.c (process_die): Fix fall-through comments.
9010         * dbxread.c (process_one_symbol): Fix fall-through comment.
9011         * d-exp.y (lex_one_token): Fix fall-through comment.
9012         * cp-name-parser.y (yylex): Fix fall-through comment.
9013         * coffread.c (coff_symtab_read): Fix fall-through comment.
9014         * c-exp.y (lex_one_token): Fix fall-through comment.
9015         * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
9016         comment.
9017         * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
9018         comment.
9019
9020 2018-05-04  Tom Tromey  <tom@tromey.com>
9021
9022         PR python/22730:
9023         * NEWS: Mention gdb.execute change.
9024         * gdbcmd.h (execute_control_command): Don't declare.
9025         * python/python.c (execute_gdb_command): Use read_command_lines_1,
9026         execute_control_commands, execute_control_commands_to_string.
9027         * cli/cli-script.h (execute_control_commands)
9028         (execute_control_commands_to_string): Declare.
9029         (execute_control_command): Add from_tty parameter.
9030         * cli/cli-script.c (execute_control_commands)
9031         (execute_control_commands_to_string): New functions.
9032         (execute_user_command): Use execute_control_commands.
9033         (execute_control_command_1): Add "from_tty" parameter.  Update.
9034         (execute_control_command): Likewise.
9035
9036 2018-05-04  Tom Tromey  <tom@tromey.com>
9037
9038         PR python/22731:
9039         * NEWS: Mention that breakpoint commands are writable.
9040         * python/py-breakpoint.c (bppy_set_commands): New function.
9041         (breakpoint_object_getset) <"commands">: Use it.
9042
9043 2018-05-04  Tom Tromey  <tom@tromey.com>
9044
9045         * tracepoint.c (actions_command): Update.
9046         * mi/mi-cmd-break.c (mi_command_line_array)
9047         (mi_command_line_array_cnt, mi_command_line_array_ptr)
9048         (mi_read_next_line): Remove.
9049         (mi_cmd_break_commands): Update.
9050         * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
9051         function_view.
9052         * cli/cli-script.c (get_command_line): Update.
9053         (process_next_line): Use function_view.  Constify.
9054         (recurse_read_control_structure, read_command_lines)
9055         (read_command_lines_1): Change argument types to function_view.
9056         (do_define_command, document_command): Update.
9057         * breakpoint.h (check_tracepoint_command): Don't declare.
9058         * breakpoint.c (check_tracepoint_command): Remove.
9059         (commands_command_1, create_tracepoint_from_upload): Update.
9060
9061 2018-05-04  Tom Tromey  <tom@tromey.com>
9062
9063         PR gdb/11750:
9064         * cli/cli-script.h (enum command_control_type) <define_control>:
9065         New constant.
9066         * cli/cli-script.c (multi_line_command_p): Handle define_control.
9067         (build_command_line, execute_control_command_1)
9068         (process_next_line): Likewise.
9069         (do_define_command): New function, extracted from define_command.
9070         (define_command): Use it.
9071
9072 2018-05-04  Tom Tromey  <tom@tromey.com>
9073
9074         * tracepoint.c (actions_command): Update.
9075         * cli/cli-script.h (read_command_lines): Update.
9076         * cli/cli-script.c (read_command_lines): Constify prompt_arg.
9077         (MAX_TMPBUF): Remove define.
9078         (define_command): Use string_printf.
9079         (document_command): Likewise.
9080         * breakpoint.c (commands_command_1): Update.
9081
9082 2018-05-04  Tom Tromey  <tom@tromey.com>
9083
9084         * top.c (execute_command): Update.
9085         * cli/cli-script.h (print_command_lines): Now varargs.
9086         * cli/cli-script.c (print_command_lines): Now varargs.
9087         (execute_control_command_1) <case while_control, case if_control>:
9088         Update.
9089
9090 2018-05-04  Tom Tromey  <tom@tromey.com>
9091
9092         * tracepoint.c (all_tracepoint_actions): Rename from
9093         all_tracepoint_actions_and_cleanup.  Change return type.
9094         (actions_command, encode_actions_1, encode_actions)
9095         (trace_dump_actions, tdump_command): Update.
9096         * remote.c (remote_download_command_source): Update.
9097         * python/python.c (gdbpy_eval_from_control_command)
9098         (python_command, python_interactive_command): Update.
9099         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
9100         * guile/guile.c (guile_command)
9101         (gdbscm_eval_from_control_command, guile_command): Update.
9102         * compile/compile.c (compile_code_command)
9103         (compile_print_command, compile_to_object): Update.
9104         * cli/cli-script.h (struct command_lines_deleter): New.
9105         (counted_command_line): New typedef.
9106         (struct command_line): Add constructor, destructor.
9107         <body_list>: Remove.
9108         <body_list_0, body_list_1>: New members.
9109         (command_line_up): Remove typedef.
9110         (read_command_lines, read_command_lines_1, get_command_line):
9111         Update.
9112         (copy_command_lines): Don't declare.
9113         * cli/cli-script.c (build_command_line): Use "new".
9114         (get_command_line): Return counted_command_line.
9115         (print_command_lines, execute_user_command)
9116         (execute_control_command_1, while_command, if_command): Update.
9117         (realloc_body_list): Remove.
9118         (process_next_line, recurse_read_control_structure): Update.
9119         (read_command_lines, read_command_lines_1): Return counted_command_line.
9120         (free_command_lines): Use "delete".
9121         (copy_command_lines): Remove.
9122         (define_command, document_command, show_user_1): Update.
9123         * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
9124         a counted_command_line.
9125         * breakpoint.h (counted_command_line): Remove typedef.
9126         (breakpoint_set_commands): Update.
9127         * breakpoint.c (check_no_tracepoint_commands)
9128         (validate_commands_for_breakpoint): Update.
9129         (breakpoint_set_commands): Change commands to be a
9130         counted_command_line.
9131         (commands_command_1, update_dprintf_command_list)
9132         (create_tracepoint_from_upload): Update.
9133
9134 2018-05-04  Tom Tromey  <tom@tromey.com>
9135
9136         * cli/cli-decode.h (cmd_list_element): New constructor.
9137         (~cmd_list_element): New destructor.
9138         (struct cmd_list_element): Add initializers.
9139         * cli/cli-decode.c (do_add_cmd): Use "new".
9140         (delete_cmd): Use "delete".
9141
9142 2018-05-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
9143             Pedro Alves <palves@redhat.com>
9144
9145         PR breakpoints/19806 and support for PR external/20207.
9146         * NEWS: Mention Aarch64 watchpoint improvements.
9147         * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
9148         watchpoints and PR external/20207 watchpoints.
9149         * nat/aarch64-linux-hw-point.c
9150         (kernel_supports_any_contiguous_range): New.
9151         (aarch64_watchpoint_offset): New.
9152         (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
9153         (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
9154         (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
9155         (aarch64_align_watchpoint): New parameters aligned_offset_p and
9156         next_addr_orig_p.  Support PR external/20207 watchpoints.
9157         (aarch64_downgrade_regs): New.
9158         (aarch64_dr_state_insert_one_point): New parameters offset and
9159         addr_orig.
9160         (aarch64_dr_state_remove_one_point): Likewise.
9161         (aarch64_handle_breakpoint): Update caller.
9162         (aarch64_handle_aligned_watchpoint): Likewise.
9163         (aarch64_handle_unaligned_watchpoint): Support addr_orig and
9164         aligned_offset.
9165         (aarch64_linux_set_debug_regs): Remove const from state.  Call
9166         aarch64_downgrade_regs.
9167         (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
9168         * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
9169         (DR_CONTROL_MASK): ... this.
9170         (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
9171         (unsigned int aarch64_watchpoint_offset): New prototype.
9172         (aarch64_linux_set_debug_regs): Remove const from state.
9173         * utils.c (align_up, align_down): Move to ...
9174         * common/common-utils.c (align_up, align_down): ... here.
9175         * utils.h (align_up, align_down): Move to ...
9176         * common/common-utils.h (align_up, align_down): ... here.
9177
9178 2018-05-04  Joel Brobecker  <brobecker@adacore.com>
9179
9180         * sparc-tdep.c (sparc_structure_return_p): Re-implement to
9181         match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
9182         (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
9183         Re-implement to match the ABI as summarized in GCC's
9184         gcc/config/sparc/sparc.c.  All callers updated.
9185         (sparc32_store_arguments): Remove assertion.
9186
9187 2018-05-04  Tom Tromey  <tom@tromey.com>
9188
9189         * printcmd.c: Don't include tui.h.
9190         (decode_format): Use skip_spaces.
9191
9192 2018-05-04  Tom Tromey  <tom@tromey.com>
9193
9194         PR gdb/22619:
9195         * printcmd.c (last_count): New global.
9196         (x_command): Use saved count when repeating.
9197
9198 2018-05-04  Tom Tromey  <tom@tromey.com>
9199
9200         * nto-procfs.c (do_closedir_cleanup): Remove.
9201         (procfs_pidlist): Use gdb_dir_up.
9202         * procfs.c (do_closedir_cleanup): Remove.
9203         (proc_update_threads): Use gdb_dir_up.
9204         * common/filestuff.h (struct gdb_dir_deleter): New.
9205         (gdb_dir_up): New typedef.
9206
9207 2018-05-04  Tom Tromey  <tom@tromey.com>
9208
9209         * ada-lang.c (print_mention_exception): Use std::string.
9210
9211 2018-05-04  Tom Tromey  <tom@tromey.com>
9212
9213         * ada-lang.c (create_excep_cond_exprs): Update.
9214         (ada_exception_catchpoint_cond_string): Use std::string.
9215
9216 2018-05-04  Tom Tromey  <tom@tromey.com>
9217
9218         * ada-lang.c (xget_renaming_scope): Return std::string.
9219         (old_renaming_is_invisible): Update.
9220
9221 2018-05-04  Tom Tromey  <tom@tromey.com>
9222
9223         * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
9224         (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
9225
9226 2018-05-04  Ulrich Weigand  <uweigand@de.ibm.com>
9227
9228         * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
9229
9230 2018-05-04  Tom Tromey  <tom@tromey.com>
9231
9232         * remote.c (remote_query_supported_append): Change type.
9233         (remote_check_symbols): Update.
9234
9235 2018-05-04  Paul Pluzhnikov  <ppluzhnikov@google.com>
9236
9237         PR gdb/11420
9238         * configure.ac: Prepend libpython.
9239         * python/python-config.py: Likewise.
9240         * configure: Regenerate.
9241
9242 2018-05-03  Simon Marchi  <simon.marchi@ericsson.com>
9243
9244         * Makefile.in (%.c: %.l): Use -t instead of --stdout.
9245
9246 2018-05-03  Pedro Alves  <palves@redhat.com>
9247
9248         * s390-linux-nat.c
9249         (s390_linux_nat_target::have_continuable_watchpoint): Mark with
9250         override.  Write 'true' instead of '1'.
9251         (s390_linux_nat_target::watchpoint_addr_within_range): Remove
9252         declaration.
9253
9254 2018-05-02  Pedro Alves  <palves@redhat.com>
9255
9256         * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
9257         add_inf_child_target.
9258         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
9259         add_inf_child_target.
9260         * aix-thread.c (aix_thread_target_info): New.
9261         (aix_thread_target) <shortname, longname, doc>: Delete.
9262         <info>: New.
9263         * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
9264         add_inf_child_target.
9265         * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
9266         add_inf_child_target.
9267         * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
9268         add_inf_child_target.
9269         * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
9270         add_inf_child_target.
9271         * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
9272         add_inf_child_target.
9273         * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
9274         add_inf_child_target.
9275         * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
9276         add_inf_child_target.
9277         * arm-linux-nat.c (_initialize_arm_linux_nat): Use
9278         add_inf_child_target.
9279         * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
9280         add_inf_child_target.
9281         * bfd-target.c (target_bfd_target_info): New.
9282         (target_bfd) <shortname, longname, doc>: Delete.
9283         <info>: New.
9284         * bsd-kvm.c (bsd_kvm_target_info): New.
9285         (bsd_kvm_target) <shortname, longname, doc>: Delete.
9286         <info>: New.
9287         (bsd_kvm_target::open): Rename to ...
9288         (bsd_kvm_target_open): ... this.  Adjust.
9289         * bsd-uthread.c (bsd_uthread_target_info): New.
9290         (bsd_uthread_target) <shortname, longname, doc>: Delete.
9291         <info>: New.
9292         * corefile.c (core_file_command): Adjust.
9293         * corelow.c (core_target_info): New.
9294         (core_target) <shortname, longname, doc>: Delete.
9295         <info>: New.
9296         (core_target::open): Rename to ...
9297         (core_target_open): ... this.  Adjust.
9298         * ctf.c (ctf_target_info): New.
9299         (ctf_target) <shortname, longname, doc>: Delete.
9300         <info>: New.
9301         (ctf_target::open): Rename to ...
9302         (ctf_target_open): ... this.
9303         (_initialize_ctf): Adjust.
9304         * exec.c (exec_target_info): New.
9305         (exec_target) <shortname, longname, doc>: Delete.
9306         <info>: New.
9307         (exec_target::open): Rename to ...
9308         (exec_target_open): ... this.
9309         * gdbcore.h (core_target_open): Declare.
9310         * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
9311         * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
9312         add_inf_child_target.
9313         * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
9314         add_inf_child_target.
9315         * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
9316         add_inf_child_target.
9317         * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
9318         add_inf_child_target.
9319         * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
9320         add_inf_child_target.
9321         * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
9322         add_inf_child_target.
9323         * i386-linux-nat.c (_initialize_i386_linux_nat): Use
9324         add_inf_child_target.
9325         * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
9326         add_inf_child_target.
9327         * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
9328         add_inf_child_target.
9329         * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
9330         add_inf_child_target.
9331         * inf-child.c (inf_child_target_info): New.
9332         (inf_child_target::info): New.
9333         (inf_child_open_target): Remove 'target' parameter.  Use
9334         get_native_target instead.
9335         (inf_child_target::open): Delete.
9336         (add_inf_child_target): New.
9337         * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
9338         Delete.
9339         <info>: New.
9340         (add_inf_child_target): Declare.
9341         (inf_child_open_target): Declare.
9342         * linux-thread-db.c (thread_db_target_info): New.
9343         (thread_db_target) <shortname, longname, doc>: Delete.
9344         <info>: New.
9345         * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
9346         add_inf_child_target.
9347         * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
9348         add_inf_child_target.
9349         * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
9350         add_inf_child_target.
9351         * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
9352         add_inf_child_target.
9353         * make-target-delegates (print_class): Adjust.
9354         * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
9355         add_inf_child_target.
9356         * mips-linux-nat.c (_initialize_mips_linux_nat): Use
9357         add_inf_child_target.
9358         * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
9359         add_inf_child_target.
9360         * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
9361         add_inf_child_target.
9362         * nto-procfs.c (nto_native_target_info): New.
9363         (nto_procfs_target_native) <shortname, longname, doc>:
9364         Delete.
9365         <info>: New.
9366         (nto_procfs_target_info): New.
9367         (nto_procfs_target_procfs) <shortname, longname, doc>:
9368         Delete.
9369         <info>: New.
9370         (init_procfs_targets): Adjust.
9371         * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
9372         add_inf_child_target.
9373         * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
9374         add_inf_child_target.
9375         * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
9376         add_inf_child_target.
9377         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
9378         add_inf_child_target.
9379         * ravenscar-thread.c (ravenscar_target_info): New.
9380         (ravenscar_thread_target) <shortname, longname, doc>:
9381         Delete.
9382         <info>: New.
9383         * record-btrace.c (record_btrace_target_info):
9384         (record_btrace_target) <shortname, longname, doc>: Delete.
9385         <info>: New.
9386         (record_btrace_target::open): Rename to ...
9387         (record_btrace_target_open): ... this.  Adjust.
9388         * record-full.c (record_longname, record_doc): New.
9389         (record_full_base_target) <shortname, longname, doc>: Delete.
9390         <info>: New.
9391         (record_full_target_info): New.
9392         (record_full_target): <shortname>: Delete.
9393         <info>: New.
9394         (record_full_core_open_1, record_full_open_1): Update comments.
9395         (record_full_base_target::open): Rename to ...
9396         (record_full_open): ... this.
9397         (cmd_record_full_restore): Update.
9398         (_initialize_record_full): Update.
9399         * remote-sim.c (remote_sim_target_info): New.
9400         (gdbsim_target) <shortname, longname, doc>: Delete.
9401         <info>: New.
9402         (gdbsim_target::open): Rename to ...
9403         (gdbsim_target_open): ... this.
9404         (_initialize_remote_sim): Adjust.
9405         * remote.c (remote_doc): New.
9406         (remote_target_info): New.
9407         (remote_target) <shortname, longname, doc>: Delete.
9408         <info>: New.
9409         (extended_remote_target_info): New.
9410         (extended_remote_target) <shortname, longname, doc>: Delete.
9411         <info>: New.
9412         (remote_target::open_1): Make static.  Adjust.
9413         * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
9414         * s390-linux-nat.c (_initialize_s390_nat): Use
9415         add_inf_child_target.
9416         * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
9417         add_inf_child_target.
9418         * sol-thread.c (thread_db_target_info): New.
9419         (sol_thread_target) <shortname, longname, doc>: Delete.
9420         <info>: New.
9421         * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
9422         add_inf_child_target.
9423         * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
9424         add_inf_child_target.
9425         * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
9426         add_inf_child_target.
9427         * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
9428         add_inf_child_target.
9429         * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
9430         add_inf_child_target.
9431         * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
9432         add_inf_child_target.
9433         * spu-linux-nat.c (_initialize_spu_nat): Use
9434         add_inf_child_target.
9435         * spu-multiarch.c (spu_multiarch_target_info): New.
9436         (spu_multiarch_target) <shortname, longname, doc>: Delete.
9437         <info>: New.
9438         * target-delegates.c: Regenerate.
9439         * target.c: Include <unordered_map>.
9440         (target_ops_p): Delete.
9441         (DEF_VEC_P(target_ops_p)): Delete.
9442         (target_factories): New.
9443         (test_target_info): New.
9444         (test_target_ops::info): New.
9445         (open_target): Adjust to use target_factories.
9446         (add_target_with_completer): Rename to ...
9447         (add_target): ... this.  Change prototype.  Register target_info
9448         and open callback in target_factories.  Register target_info in
9449         command context instead of target_ops.
9450         (add_target): Delete old implementation.
9451         (add_deprecated_target_alias): Change prototype.  Adjust.
9452         (the_native_target): New.
9453         (set_native_target, get_native_target): New.
9454         (find_default_run_target): Use the_native_target.
9455         (find_attach_target, find_run_target): Simplify.
9456         (target_ops::open): Delete.
9457         (dummy_target_info): New.
9458         (dummy_target::shortname, dummy_target::longname)
9459         (dummy_target::doc): Delete.
9460         (dummy_target::info): New.
9461         (debug_target::shortname, debug_target::longname)
9462         (debug_target::doc): Delete.
9463         (debug_target::info): New.
9464         * target.h (struct target_info): New.
9465         (target_ops::~target_ops): Add comment.
9466         (target_ops::info): New.
9467         (target_ops::shortname, target_ops::longname, target_ops::doc): No
9468         longer virtual.  Implement in terms of target_info.
9469         (set_native_target, get_native_target): Declare.
9470         (target_open_ftype): New.
9471         (add_target, add_target_with_completer)
9472         (add_deprecated_target_alias): Change prototype.
9473         (test_target) <shortname, longname, doc>: Delete.
9474         <info>: New.
9475         * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
9476         add_inf_child_target.
9477         * tracefile-tfile.c (tfile_target_info): New.
9478         (tfile_target) <shortname, longname, doc>: Delete.
9479         <info>: New.
9480         (tfile_target::open): Rename to ...
9481         (tfile_target_open): ... this.
9482         (_initialize_tracefile_tfile): Adjust.
9483         * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
9484         add_inf_child_target.
9485         * windows-nat.c (_initialize_windows_nat): Use
9486         add_inf_child_target.
9487         * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
9488         add_inf_child_target.
9489
9490 2018-05-02  Pedro Alves  <palves@redhat.com>
9491
9492         * linux-nat.h (linux_nat_target) <low_new_thread,
9493         low_delete_thread, low_new_fork, low_forget_process,
9494         low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
9495         New virtual methods.
9496         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
9497         (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
9498         (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
9499         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
9500         (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
9501         Delete.
9502         * linux-fork.c (delete_fork): Adjust to call low method.
9503         * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
9504         (linux_nat_new_fork, linux_nat_forget_process_hook)
9505         (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
9506         (linux_nat_status_is_event):
9507         (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
9508         (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
9509         to call low method.
9510         (sigtrap_is_event): Rename to ...
9511         (linux_nat_target::low_status_is_event): ... this.
9512         (linux_nat_set_status_is_event): Delete.
9513         (save_stop_reason, linux_nat_wait_1)
9514         (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
9515         low methods.
9516         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
9517         (linux_nat_set_new_fork, linux_nat_set_forget_process)
9518         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
9519         (linux_nat_set_prepare_to_resume): Delete.
9520         * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
9521         low virtual methods.
9522         * amd64-linux-nat.c: Likewise.
9523         * arm-linux-nat.c: Likewise.
9524         * i386-linux-nat.c: Likewise.
9525         * ia64-linux-nat.c: Likewise.
9526         * mips-linux-nat.c: Likewise.
9527         * ppc-linux-nat.c: Likewise.
9528         * s390-linux-nat.c: Likewise.
9529         * sparc64-linux-nat.c: Likewise.
9530         * x86-linux-nat.c: Likewise.
9531         * x86-linux-nat.h: Include "nat/x86-linux.h".
9532         (x86_linux_nat_target) <low_new_fork, low_forget_process,
9533         low_prepare_to_resume, low_new_thread, low_delete_thread>:
9534         Override methods.
9535
9536 2018-05-02  Pedro Alves  <palves@redhat.com>
9537
9538         * target.h (target_ops)
9539         <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
9540         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
9541         stopped_by_watchpoint, have_continuable_watchpoint,
9542         stopped_data_address, watchpoint_addr_within_range,
9543         can_accel_watchpoint_condition, can_run, thread_alive,
9544         has_all_memory, has_memory, has_stack, has_registers,
9545         has_execution, can_async_p, is_async_p, supports_non_stop,
9546         always_non_stop_p, can_execute_reverse, supports_multi_process,
9547         supports_enable_disable_tracepoint,
9548         supports_disable_randomization, supports_string_tracing,
9549         supports_evaluation_of_breakpoint_conditions,
9550         can_run_breakpoint_commands, filesystem_is_local,
9551         can_download_tracepoint, get_trace_state_variable_value,
9552         set_trace_notes, get_tib_address, use_agent, can_use_agent,
9553         record_is_replaying, record_will_replay,
9554         augmented_libraries_svr4_read>: Adjust to return bool.
9555         * aarch64-linux-nat.c: All implementations adjusted.
9556         * aix-thread.c: All implementations adjusted.
9557         * arm-linux-nat.c: All implementations adjusted.
9558         * breakpoint.c: All implementations adjusted.
9559         * bsd-kvm.c: All implementations adjusted.
9560         * bsd-uthread.c: All implementations adjusted.
9561         * corelow.c: All implementations adjusted.
9562         * ctf.c: All implementations adjusted.
9563         * darwin-nat.c: All implementations adjusted.
9564         * darwin-nat.h: All implementations adjusted.
9565         * exec.c: All implementations adjusted.
9566         * fbsd-nat.c: All implementations adjusted.
9567         * fbsd-nat.h: All implementations adjusted.
9568         * gnu-nat.c: All implementations adjusted.
9569         * gnu-nat.h: All implementations adjusted.
9570         * go32-nat.c: All implementations adjusted.
9571         * ia64-linux-nat.c: All implementations adjusted.
9572         * inf-child.c: All implementations adjusted.
9573         * inf-child.h: All implementations adjusted.
9574         * inf-ptrace.c: All implementations adjusted.
9575         * inf-ptrace.h: All implementations adjusted.
9576         * linux-nat.c: All implementations adjusted.
9577         * linux-nat.h: All implementations adjusted.
9578         * mips-linux-nat.c: All implementations adjusted.
9579         * nto-procfs.c: All implementations adjusted.
9580         * ppc-linux-nat.c: All implementations adjusted.
9581         * procfs.c: All implementations adjusted.
9582         * ravenscar-thread.c: All implementations adjusted.
9583         * record-btrace.c: All implementations adjusted.
9584         * record-full.c: All implementations adjusted.
9585         * remote-sim.c: All implementations adjusted.
9586         * remote.c: All implementations adjusted.
9587         * s390-linux-nat.c: All implementations adjusted.
9588         * sol-thread.c: All implementations adjusted.
9589         * spu-multiarch.c: All implementations adjusted.
9590         * target-delegates.c: All implementations adjusted.
9591         * target.c: All implementations adjusted.
9592         * target.h: All implementations adjusted.
9593         * tracefile-tfile.c: All implementations adjusted.
9594         * tracefile.c: All implementations adjusted.
9595         * tracefile.h: All implementations adjusted.
9596         * windows-nat.c: All implementations adjusted.
9597         * x86-linux-nat.h: All implementations adjusted.
9598         * x86-nat.h: All implementations adjusted.
9599
9600 2018-05-02  Pedro Alves  <palves@redhat.com>
9601
9602         * make-target-delegates (scan_target_h): Don't trim lines here.
9603         Replace sequences of tabs and/or whitespace with a single
9604         whitespace.
9605         (top level, parsing methods): Trim each line before processing it
9606         here.
9607
9608 2018-05-02  Pedro Alves  <palves@redhat.com>
9609             John Baldwin  <jhb@freebsd.org>
9610
9611         * target.h (enum strata) <debug_stratum>: New.
9612         (struct target_ops) <all delegation methods>: Replace by C++
9613         virtual methods, and drop "to_" prefix.  All references updated
9614         throughout.
9615         <to_shortname, to_longname, to_doc, to_data,
9616         to_have_steppable_watchpoint, to_have_continuable_watchpoint,
9617         to_has_thread_control, to_attach_no_wait>: Delete, replaced by
9618         virtual methods.  All references updated throughout.
9619         <can_attach, supports_terminal_ours, can_create_inferior,
9620         get_thread_control_capabilities, attach_no_wait>: New
9621         virtual methods.
9622         <insert_breakpoint, remove_breakpoint>: Now
9623         TARGET_DEFAULT_NORETURN methods.
9624         <info_proc>: Now returns bool.
9625         <to_magic>: Delete.
9626         (OPS_MAGIC): Delete.
9627         (current_target): Delete.  All references replaced by references
9628         to ...
9629         (target_stack): ... this.  New.
9630         (target_shortname, target_longname): Adjust.
9631         (target_can_run): Now a function declaration.
9632         (default_child_has_all_memory, default_child_has_memory)
9633         (default_child_has_stack, default_child_has_registers)
9634         (default_child_has_execution): Remove target_ops parameter.
9635         (complete_target_initialization): Delete.
9636         (memory_breakpoint_target): New template class.
9637         (test_target_ops): Refactor as a C++ class with virtual methods.
9638         * make-target-delegates (NAME_PART): Tighten.
9639         (POINTER_PART, CP_SYMBOL): New.
9640         (SIMPLE_RETURN_PART): Reimplement.
9641         (VEC_RETURN_PART): Expect less.
9642         (RETURN_PART, VIRTUAL_PART): New.
9643         (METHOD): Adjust to C++ virtual methods.
9644         (scan_target_h): Remove reference to C99.
9645         (dname): Output "target_ops::" prefix.
9646         (write_function_header): Adjust to output a C++ class method.
9647         (write_declaration): New.
9648         (write_delegator): Adjust to output a C++ class method.
9649         (tdname): Output "dummy_target::" prefix.
9650         (write_tdefault, write_debugmethod): Adjust to output a C++ class
9651         method.
9652         (tdefault_names, debug_names): Delete.
9653         (return_types, tdefaults, styles, argtypes_array): New.
9654         (top level): All methods are delegators.
9655         (print_class): New.
9656         (top level): Print dummy_target and debug_target classes.
9657         * target-delegates.c: Regenerate.
9658         * target-debug.h (target_debug_print_enum_info_proc_what)
9659         (target_debug_print_thread_control_capabilities)
9660         (target_debug_print_thread_info_p): New.
9661         * target.c (dummy_target): Delete.
9662         (the_dummy_target, the_debug_target): New.
9663         (target_stack): Now extern.
9664         (set_targetdebug): Push/unpush debug target.
9665         (default_child_has_all_memory, default_child_has_memory)
9666         (default_child_has_stack, default_child_has_registers)
9667         (default_child_has_execution): Remove target_ops parameter.
9668         (complete_target_initialization): Delete.
9669         (add_target_with_completer): No longer call
9670         complete_target_initialization.
9671         (target_supports_terminal_ours): Use regular delegation.
9672         (update_current_target): Delete.
9673         (push_target): No longer check magic number.  Don't call
9674         update_current_target.
9675         (unpush_target): Don't call update_current_target.
9676         (target_is_pushed): No longer check magic number.
9677         (target_require_runnable): Skip for all stratums over
9678         process_stratum.
9679         (target_ops::info_proc): New.
9680         (target_info_proc): Use find_target_at and
9681         find_default_run_target.
9682         (target_supports_disable_randomization): Use regular delegation.
9683         (target_get_osdata): Use find_target_at.
9684         (target_ops::open, target_ops::close, target_ops::can_attach)
9685         (target_ops::attach, target_ops::can_create_inferior)
9686         (target_ops::create_inferior, target_ops::can_run)
9687         (target_can_run): New.
9688         (default_fileio_target): Use regular delegation.
9689         (target_ops::fileio_open, target_ops::fileio_pwrite)
9690         (target_ops::fileio_pread, target_ops::fileio_fstat)
9691         (target_ops::fileio_close, target_ops::fileio_unlink)
9692         (target_ops::fileio_readlink): New.
9693         (target_fileio_open_1, target_fileio_unlink)
9694         (target_fileio_readlink): Always call the target method.  Handle
9695         FILEIO_ENOSYS.
9696         (return_zero, return_zero_has_execution): Delete.
9697         (init_dummy_target): Delete.
9698         (dummy_target::dummy_target, dummy_target::shortname)
9699         (dummy_target::longname, dummy_target::doc)
9700         (debug_target::debug_target, debug_target::shortname)
9701         (debug_target::longname, debug_target::doc): New.
9702         (target_supports_delete_record): Use regular delegation.
9703         (setup_target_debug): Delete.
9704         (maintenance_print_target_stack): Skip debug_stratum.
9705         (initialize_targets): Instantiate the_dummy_target and
9706         the_debug_target.
9707         * auxv.c (target_auxv_parse): Remove 'ops' parameter.  Adjust to
9708         use target_stack.
9709         (target_auxv_search, fprint_target_auxv): Adjust.
9710         (info_auxv_command): Adjust to use target_stack.
9711         * auxv.h (target_auxv_parse): Remove 'ops' parameter.
9712         * exceptions.c (print_flush): Handle a NULL target_stack.
9713         * regcache.c (target_ops_no_register): Refactor as class with
9714         virtual methods.
9715
9716         * exec.c (exec_target): New class.
9717         (exec_ops): Now an exec_target.
9718         (exec_open, exec_close_1, exec_get_section_table)
9719         (exec_xfer_partial, exec_files_info, exec_has_memory)
9720         (exec_make_note_section): Refactor as exec_target methods.
9721         (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
9722         Delete.
9723         (exec_target::find_memory_regions): New.
9724         (_initialize_exec): Don't call init_exec_ops.
9725         * gdbcore.h (exec_file_clear): Delete.
9726
9727         * corefile.c (core_target): Delete.
9728         (core_file_command): Adjust.
9729         * corelow.c (core_target): New class.
9730         (the_core_target): New.
9731         (core_close): Remove target_ops parameter.
9732         (core_close_cleanup): Adjust.
9733         (core_target::close): New.
9734         (core_open, core_detach, get_core_registers, core_files_info)
9735         (core_xfer_partial, core_thread_alive, core_read_description)
9736         (core_pid_to_str, core_thread_name, core_has_memory)
9737         (core_has_stack, core_has_registers, core_info_proc): Rework as
9738         core_target methods.
9739         (ignore, core_remove_breakpoint, init_core_ops): Delete.
9740         (_initialize_corelow): Initialize the_core_target.
9741         * gdbcore.h (core_target): Delete.
9742         (the_core_target): New.
9743
9744         * ctf.c: (ctf_target): New class.
9745         (ctf_ops): Now a ctf_target.
9746         (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
9747         (ctf_xfer_partial, ctf_get_trace_state_variable_value)
9748         (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
9749         methods.
9750         (init_ctf_ops): Delete.
9751         (_initialize_ctf): Don't call it.
9752         * tracefile-tfile.c (tfile_target): New class.
9753         (tfile_ops): Now a tfile_target.
9754         (tfile_open, tfile_close, tfile_files_info)
9755         (tfile_get_tracepoint_status, tfile_trace_find)
9756         (tfile_fetch_registers, tfile_xfer_partial)
9757         (tfile_get_trace_state_variable_value, tfile_traceframe_info):
9758         Refactor as tfile_target methods.
9759         (tfile_xfer_partial_features): Remove target_ops parameter.
9760         (init_tfile_ops): Delete.
9761         (_initialize_tracefile_tfile): Don't call it.
9762         * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
9763         (tracefile_has_stack, tracefile_has_registers)
9764         (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
9765         tracefile_target methods.
9766         (init_tracefile_ops): Delete.
9767         (tracefile_target::tracefile_target): New.
9768         * tracefile.h: Include "target.h".
9769         (tracefile_target): New class.
9770         (init_tracefile_ops): Delete.
9771
9772         * spu-multiarch.c (spu_multiarch_target): New class.
9773         (spu_ops): Now a spu_multiarch_target.
9774         (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
9775         (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
9776         (spu_search_memory, spu_mourn_inferior): Refactor as
9777         spu_multiarch_target methods.
9778         (init_spu_ops): Delete.
9779         (_initialize_spu_multiarch): Remove references to init_spu_ops,
9780         complete_target_initialization.
9781
9782         * ravenscar-thread.c (ravenscar_thread_target): New class.
9783         (ravenscar_ops): Now a ravenscar_thread_target.
9784         (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
9785         (ravenscar_thread_alive, ravenscar_pid_to_str)
9786         (ravenscar_fetch_registers, ravenscar_store_registers)
9787         (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
9788         (ravenscar_stopped_by_hw_breakpoint)
9789         (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
9790         (ravenscar_mourn_inferior, ravenscar_core_of_thread)
9791         (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
9792         methods.
9793         (init_ravenscar_thread_ops): Delete.
9794         (_initialize_ravenscar): Remove references to
9795         init_ravenscar_thread_ops and complete_target_initialization.
9796
9797         * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
9798         (bsd_uthread_target): New class.
9799         (bsd_uthread_ops): Now a bsd_uthread_target.
9800         (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
9801         (bsd_uthread_close, bsd_uthread_mourn_inferior)
9802         (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
9803         (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
9804         (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
9805         (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
9806         (bsd_uthread_target): Delete function.
9807         (_initialize_bsd_uthread): Remove reference to
9808         complete_target_initialization.
9809
9810         * bfd-target.c (target_bfd_data): Delete.  Fields folded into ...
9811         (target_bfd): ... this new class.
9812         (target_bfd_xfer_partial, target_bfd_get_section_table)
9813         (target_bfd_close): Refactor as target_bfd methods.
9814         (target_bfd::~target_bfd): New.
9815         (target_bfd_reopen): Adjust.
9816         (target_bfd::close): New.
9817
9818         * record-btrace.c (record_btrace_target): New class.
9819         (record_btrace_ops): Now a record_btrace_target.
9820         (record_btrace_open, record_btrace_stop_recording)
9821         (record_btrace_disconnect, record_btrace_close)
9822         (record_btrace_async, record_btrace_info)
9823         (record_btrace_insn_history, record_btrace_insn_history_range)
9824         (record_btrace_insn_history_from, record_btrace_call_history)
9825         (record_btrace_call_history_range)
9826         (record_btrace_call_history_from, record_btrace_record_method)
9827         (record_btrace_is_replaying, record_btrace_will_replay)
9828         (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
9829         (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
9830         (record_btrace_store_registers, record_btrace_prepare_to_store)
9831         (record_btrace_to_get_unwinder)
9832         (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
9833         (record_btrace_commit_resume, record_btrace_wait)
9834         (record_btrace_stop, record_btrace_can_execute_reverse)
9835         (record_btrace_stopped_by_sw_breakpoint)
9836         (record_btrace_supports_stopped_by_sw_breakpoint)
9837         (record_btrace_stopped_by_hw_breakpoint)
9838         (record_btrace_supports_stopped_by_hw_breakpoint)
9839         (record_btrace_update_thread_list, record_btrace_thread_alive)
9840         (record_btrace_goto_begin, record_btrace_goto_end)
9841         (record_btrace_goto, record_btrace_stop_replaying_all)
9842         (record_btrace_execution_direction)
9843         (record_btrace_prepare_to_generate_core)
9844         (record_btrace_done_generating_core): Refactor as
9845         record_btrace_target methods.
9846         (init_record_btrace_ops): Delete.
9847         (_initialize_record_btrace): Remove reference to
9848         init_record_btrace_ops.
9849         * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
9850         the execution_direction global.
9851         (record_full_base_target, record_full_target)
9852         (record_full_core_target): New classes.
9853         (record_full_ops): Now a record_full_target.
9854         (record_full_core_ops): Now a record_full_core_target.
9855         (record_full_target::detach, record_full_target::disconnect)
9856         (record_full_core_target::disconnect)
9857         (record_full_target::mourn_inferior, record_full_target::kill):
9858         New.
9859         (record_full_open, record_full_close, record_full_async): Refactor
9860         as methods of the record_full_base_target class.
9861         (record_full_resume, record_full_commit_resume): Refactor
9862         as methods of the record_full_target class.
9863         (record_full_wait, record_full_stopped_by_watchpoint)
9864         (record_full_stopped_data_address)
9865         (record_full_stopped_by_sw_breakpoint)
9866         (record_full_supports_stopped_by_sw_breakpoint)
9867         (record_full_stopped_by_hw_breakpoint)
9868         (record_full_supports_stopped_by_hw_breakpoint): Refactor as
9869         methods of the record_full_base_target class.
9870         (record_full_store_registers, record_full_xfer_partial)
9871         (record_full_insert_breakpoint, record_full_remove_breakpoint):
9872         Refactor as methods of the record_full_target class.
9873         (record_full_can_execute_reverse, record_full_get_bookmark)
9874         (record_full_goto_bookmark, record_full_execution_direction)
9875         (record_full_record_method, record_full_info, record_full_delete)
9876         (record_full_is_replaying, record_full_will_replay)
9877         (record_full_goto_begin, record_full_goto_end, record_full_goto)
9878         (record_full_stop_replaying): Refactor as methods of the
9879         record_full_base_target class.
9880         (record_full_core_resume, record_full_core_kill)
9881         (record_full_core_fetch_registers)
9882         (record_full_core_prepare_to_store)
9883         (record_full_core_store_registers, record_full_core_xfer_partial)
9884         (record_full_core_insert_breakpoint)
9885         (record_full_core_remove_breakpoint)
9886         (record_full_core_has_execution): Refactor
9887         as methods of the record_full_core_target class.
9888         (record_full_base_target::supports_delete_record): New.
9889         (init_record_full_ops): Delete.
9890         (init_record_full_core_ops): Delete.
9891         (record_full_save): Refactor as method of the
9892         record_full_base_target class.
9893         (_initialize_record_full): Remove references to
9894         init_record_full_ops and init_record_full_core_ops.
9895
9896         * remote.c (remote_target, extended_remote_target): New classes.
9897         (remote_ops): Now a remote_target.
9898         (extended_remote_ops): Now an extended_remote_target.
9899         (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
9900         (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
9901         (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
9902         (remote_pass_signals, remote_set_syscall_catchpoint)
9903         (remote_program_signals, )
9904         (remote_thread_always_alive): Remove target_ops parameter.
9905         (remote_thread_alive, remote_thread_name)
9906         (remote_update_thread_list, remote_threads_extra_info)
9907         (remote_static_tracepoint_marker_at)
9908         (remote_static_tracepoint_markers_by_strid)
9909         (remote_get_ada_task_ptid, remote_close, remote_start_remote)
9910         (remote_open): Refactor as methods of remote_target.
9911         (extended_remote_open, extended_remote_detach)
9912         (extended_remote_attach, extended_remote_post_attach):
9913         (extended_remote_supports_disable_randomization)
9914         (extended_remote_create_inferior): : Refactor as method of
9915         extended_remote_target.
9916         (remote_set_permissions, remote_open_1, remote_detach)
9917         (remote_follow_fork, remote_follow_exec, remote_disconnect)
9918         (remote_resume, remote_commit_resume, remote_stop)
9919         (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
9920         (remote_terminal_ours, remote_wait, remote_fetch_registers)
9921         (remote_prepare_to_store, remote_store_registers)
9922         (remote_flash_erase, remote_flash_done, remote_files_info)
9923         (remote_kill, remote_mourn, remote_insert_breakpoint)
9924         (remote_remove_breakpoint, remote_insert_watchpoint)
9925         (remote_watchpoint_addr_within_range)
9926         (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
9927         (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
9928         (remote_supports_stopped_by_sw_breakpoint)
9929         (remote_stopped_by_hw_breakpoint)
9930         (remote_supports_stopped_by_hw_breakpoint)
9931         (remote_stopped_by_watchpoint, remote_stopped_data_address)
9932         (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
9933         (remote_verify_memory): Refactor as methods of remote_target.
9934         (remote_write_qxfer, remote_read_qxfer): Remove target_ops
9935         parameter.
9936         (remote_xfer_partial, remote_get_memory_xfer_limit)
9937         (remote_search_memory, remote_rcmd, remote_memory_map)
9938         (remote_pid_to_str, remote_get_thread_local_address)
9939         (remote_get_tib_address, remote_read_description): Refactor as
9940         methods of remote_target.
9941         (remote_target::fileio_open, remote_target::fileio_pwrite)
9942         (remote_target::fileio_pread, remote_target::fileio_close): New.
9943         (remote_hostio_readlink, remote_hostio_fstat)
9944         (remote_filesystem_is_local, remote_can_execute_reverse)
9945         (remote_supports_non_stop, remote_supports_disable_randomization)
9946         (remote_supports_multi_process, remote_supports_cond_breakpoints)
9947         (remote_supports_enable_disable_tracepoint)
9948         (remote_supports_string_tracing)
9949         (remote_can_run_breakpoint_commands, remote_trace_init)
9950         (remote_download_tracepoint, remote_can_download_tracepoint)
9951         (remote_download_trace_state_variable, remote_enable_tracepoint)
9952         (remote_disable_tracepoint, remote_trace_set_readonly_regions)
9953         (remote_trace_start, remote_get_trace_status)
9954         (remote_get_tracepoint_status, remote_trace_stop)
9955         (remote_trace_find, remote_get_trace_state_variable_value)
9956         (remote_save_trace_data, remote_get_raw_trace_data)
9957         (remote_set_disconnected_tracing, remote_core_of_thread)
9958         (remote_set_circular_trace_buffer, remote_traceframe_info)
9959         (remote_get_min_fast_tracepoint_insn_len)
9960         (remote_set_trace_buffer_size, remote_set_trace_notes)
9961         (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
9962         (remote_disable_btrace, remote_teardown_btrace)
9963         (remote_read_btrace, remote_btrace_conf)
9964         (remote_augmented_libraries_svr4_read, remote_load)
9965         (remote_pid_to_exec_file, remote_can_do_single_step)
9966         (remote_execution_direction, remote_thread_handle_to_thread_info):
9967         Refactor as methods of remote_target.
9968         (init_remote_ops, init_extended_remote_ops): Delete.
9969         (remote_can_async_p, remote_is_async_p, remote_async)
9970         (remote_thread_events, remote_upload_tracepoints)
9971         (remote_upload_trace_state_variables): Refactor as methods of
9972         remote_target.
9973         (_initialize_remote): Remove references to init_remote_ops and
9974         init_extended_remote_ops.
9975
9976         * remote-sim.c (gdbsim_target): New class.
9977         (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
9978         (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
9979         (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
9980         (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
9981         (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
9982         (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
9983         Refactor as methods of gdbsim_target.
9984         (gdbsim_ops): Now a gdbsim_target.
9985         (init_gdbsim_ops): Delete.
9986         (gdbsim_cntrl_c): Adjust.
9987         (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
9988
9989         * amd64-linux-nat.c (amd64_linux_nat_target): New class.
9990         (the_amd64_linux_nat_target): New.
9991         (amd64_linux_fetch_inferior_registers)
9992         (amd64_linux_store_inferior_registers): Refactor as methods of
9993         amd64_linux_nat_target.
9994         (_initialize_amd64_linux_nat): Adjust.  Set linux_target.
9995         * i386-linux-nat.c: Don't include "linux-nat.h".
9996         (i386_linux_nat_target): New class.
9997         (the_i386_linux_nat_target): New.
9998         (i386_linux_fetch_inferior_registers)
9999         (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
10000         as methods of i386_linux_nat_target.
10001         (_initialize_i386_linux_nat): Adjust.  Set linux_target.
10002         * inf-child.c (inf_child_ops): Delete.
10003         (inf_child_fetch_inferior_registers)
10004         (inf_child_store_inferior_registers): Delete.
10005         (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
10006         methods of inf_child_target.
10007         (inf_child_target::supports_terminal_ours)
10008         (inf_child_target::terminal_init)
10009         (inf_child_target::terminal_inferior)
10010         (inf_child_target::terminal_ours_for_output)
10011         (inf_child_target::terminal_ours, inf_child_target::interrupt)
10012         (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
10013         New.
10014         (inf_child_open, inf_child_disconnect, inf_child_close)
10015         (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
10016         (inf_child_post_startup_inferior, inf_child_can_run)
10017         (inf_child_pid_to_exec_file): Refactor as methods of
10018         inf_child_target.
10019         (inf_child_follow_fork): Delete.
10020         (inf_child_target::can_create_inferior)
10021         (inf_child_target::can_attach): New.
10022         (inf_child_target::has_all_memory, inf_child_target::has_memory)
10023         (inf_child_target::has_stack, inf_child_target::has_registers)
10024         (inf_child_target::has_execution): New.
10025         (inf_child_fileio_open, inf_child_fileio_pwrite)
10026         (inf_child_fileio_pread, inf_child_fileio_fstat)
10027         (inf_child_fileio_close, inf_child_fileio_unlink)
10028         (inf_child_fileio_readlink, inf_child_use_agent)
10029         (inf_child_can_use_agent): Refactor as methods of
10030         inf_child_target.
10031         (return_zero, inf_child_target): Delete.
10032         (inf_child_target::inf_child_target): New.
10033         * inf-child.h: Include "target.h".
10034         (inf_child_target): Delete function prototype.
10035         (inf_child_target): New class.
10036         (inf_child_open_target, inf_child_mourn_inferior)
10037         (inf_child_maybe_unpush_target): Delete.
10038         * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
10039         (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
10040         (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
10041         (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
10042         (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
10043         (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
10044         (inf_ptrace_wait, inf_ptrace_xfer_partial)
10045         (inf_ptrace_thread_alive, inf_ptrace_files_info)
10046         (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
10047         methods of inf_ptrace_target.
10048         (inf_ptrace_target): Delete function.
10049         * inf-ptrace.h: Include "inf-child.h".
10050         (inf_ptrace_target): Delete function declaration.
10051         (inf_ptrace_target): New class.
10052         (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
10053         * linux-nat.c (linux_target): New.
10054         (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
10055         (linux_nat_target::~linux_nat_target): New.
10056         (linux_child_post_attach, linux_child_post_startup_inferior)
10057         (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
10058         (linux_child_remove_fork_catchpoint)
10059         (linux_child_insert_vfork_catchpoint)
10060         (linux_child_remove_vfork_catchpoint)
10061         (linux_child_insert_exec_catchpoint)
10062         (linux_child_remove_exec_catchpoint)
10063         (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
10064         (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
10065         (linux_nat_resume, linux_nat_stopped_by_watchpoint)
10066         (linux_nat_stopped_data_address)
10067         (linux_nat_stopped_by_sw_breakpoint)
10068         (linux_nat_supports_stopped_by_sw_breakpoint)
10069         (linux_nat_stopped_by_hw_breakpoint)
10070         (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
10071         (linux_nat_kill, linux_nat_mourn_inferior)
10072         (linux_nat_xfer_partial, linux_nat_thread_alive)
10073         (linux_nat_update_thread_list, linux_nat_pid_to_str)
10074         (linux_nat_thread_name, linux_child_pid_to_exec_file)
10075         (linux_child_static_tracepoint_markers_by_strid)
10076         (linux_nat_is_async_p, linux_nat_can_async_p)
10077         (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
10078         (linux_nat_supports_multi_process)
10079         (linux_nat_supports_disable_randomization, linux_nat_async)
10080         (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
10081         (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
10082         (linux_nat_fileio_open, linux_nat_fileio_readlink)
10083         (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
10084         methods of linux_nat_target.
10085         (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
10086         (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
10087         parameter.
10088         (check_stopped_by_watchpoint): Adjust.
10089         (linux_xfer_partial): Delete.
10090         (linux_target_install_ops, linux_target, linux_nat_add_target):
10091         Delete.
10092         (linux_nat_target::linux_nat_target): New.
10093         * linux-nat.h: Include "inf-ptrace.h".
10094         (linux_nat_target): New.
10095         (linux_target, linux_target_install_ops, linux_nat_add_target):
10096         Delete function declarations.
10097         (linux_target): Declare global.
10098         * linux-thread-db.c (thread_db_target): New.
10099         (thread_db_target::thread_db_target): New.
10100         (thread_db_ops): Delete.
10101         (the_thread_db_target): New.
10102         (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
10103         (thread_db_update_thread_list, thread_db_pid_to_str)
10104         (thread_db_extra_thread_info)
10105         (thread_db_thread_handle_to_thread_info)
10106         (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
10107         (thread_db_resume): Refactor as methods of thread_db_target.
10108         (init_thread_db_ops): Delete.
10109         (_initialize_thread_db): Remove reference to init_thread_db_ops.
10110         * x86-linux-nat.c: Don't include "linux-nat.h".
10111         (super_post_startup_inferior): Delete.
10112         (x86_linux_nat_target::~x86_linux_nat_target): New.
10113         (x86_linux_child_post_startup_inferior)
10114         (x86_linux_read_description, x86_linux_enable_btrace)
10115         (x86_linux_disable_btrace, x86_linux_teardown_btrace)
10116         (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
10117         methods of x86_linux_nat_target.
10118         (x86_linux_create_target): Delete.  Bits folded ...
10119         (x86_linux_add_target): ... here.  Now takes a linux_nat_target
10120         pointer.
10121         * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
10122         (x86_linux_nat_target): New class.
10123         (x86_linux_create_target): Delete.
10124         (x86_linux_add_target): Now takes a linux_nat_target pointer.
10125         * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
10126         (x86_region_ok_for_watchpoint, x86_stopped_data_address)
10127         (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
10128         (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
10129         (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
10130         make extern.
10131         (x86_use_watchpoints): Delete.
10132         * x86-nat.h: Include "breakpoint.h" and "target.h".
10133         (x86_use_watchpoints): Delete.
10134         (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
10135         (x86_stopped_by_watchpoint, x86_stopped_data_address)
10136         (x86_insert_watchpoint, x86_remove_watchpoint)
10137         (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
10138         (x86_stopped_by_hw_breakpoint): New declarations.
10139         (x86_nat_target): New template class.
10140
10141         * ppc-linux-nat.c (ppc_linux_nat_target): New class.
10142         (the_ppc_linux_nat_target): New.
10143         (ppc_linux_fetch_inferior_registers)
10144         (ppc_linux_can_use_hw_breakpoint)
10145         (ppc_linux_region_ok_for_hw_watchpoint)
10146         (ppc_linux_ranged_break_num_registers)
10147         (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
10148         (ppc_linux_insert_mask_watchpoint)
10149         (ppc_linux_remove_mask_watchpoint)
10150         (ppc_linux_can_accel_watchpoint_condition)
10151         (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
10152         (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
10153         (ppc_linux_watchpoint_addr_within_range)
10154         (ppc_linux_masked_watch_num_registers)
10155         (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
10156         (ppc_linux_read_description): Refactor as methods of
10157         ppc_linux_nat_target.
10158         (_initialize_ppc_linux_nat): Adjust.  Set linux_target.
10159
10160         * procfs.c (procfs_xfer_partial): Delete forward declaration.
10161         (procfs_target): New class.
10162         (the_procfs_target): New.
10163         (procfs_target): Delete function.
10164         (procfs_auxv_parse, procfs_attach, procfs_detach)
10165         (procfs_fetch_registers, procfs_store_registers, procfs_wait)
10166         (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
10167         (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
10168         (procfs_create_inferior, procfs_update_thread_list)
10169         (procfs_thread_alive, procfs_pid_to_str)
10170         (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
10171         (procfs_stopped_data_address, procfs_insert_watchpoint)
10172         (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
10173         (proc_find_memory_regions, procfs_info_proc)
10174         (procfs_make_note_section): Refactor as methods of procfs_target.
10175         (_initialize_procfs): Adjust.
10176         * sol-thread.c (sol_thread_target): New class.
10177         (sol_thread_ops): Now a sol_thread_target.
10178         (sol_thread_detach, sol_thread_resume, sol_thread_wait)
10179         (sol_thread_fetch_registers, sol_thread_store_registers)
10180         (sol_thread_xfer_partial, sol_thread_mourn_inferior)
10181         (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
10182         (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
10183         (init_sol_thread_ops): Delete.
10184         (_initialize_sol_thread): Adjust.  Remove references to
10185         init_sol_thread_ops and complete_target_initialization.
10186
10187         * windows-nat.c (windows_nat_target): New class.
10188         (windows_fetch_inferior_registers)
10189         (windows_store_inferior_registers, windows_resume, windows_wait)
10190         (windows_attach, windows_detach, windows_pid_to_exec_file)
10191         (windows_files_info, windows_create_inferior)
10192         (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
10193         (windows_close, windows_pid_to_str, windows_xfer_partial)
10194         (windows_get_tib_address, windows_get_ada_task_ptid)
10195         (windows_thread_name, windows_thread_alive): Refactor as
10196         windows_nat_target methods.
10197         (do_initial_windows_stuff): Adjust.
10198         (windows_target): Delete function.
10199         (_initialize_windows_nat): Adjust.
10200
10201         * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
10202         (darwin_mourn_inferior, darwin_kill_inferior)
10203         (darwin_create_inferior, darwin_attach, darwin_detach)
10204         (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
10205         (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
10206         (darwin_supports_multi_process): Refactor as darwin_nat_target
10207         methods.
10208         (darwin_resume_to, darwin_files_info): Delete.
10209         (_initialize_darwin_inferior): Rename to ...
10210         (_initialize_darwin_nat): ... this.  Adjust to C++ification.
10211         * darwin-nat.h: Include "inf-child.h".
10212         (darwin_nat_target): New class.
10213         (darwin_complete_target): Delete.
10214         * i386-darwin-nat.c (i386_darwin_nat_target): New class.
10215         (darwin_target): New.
10216         (i386_darwin_fetch_inferior_registers)
10217         (i386_darwin_store_inferior_registers): Refactor as methods of
10218         darwin_nat_target.
10219         (darwin_complete_target): Delete, with ...
10220         (_initialize_i386_darwin_nat): ... bits factored out here.
10221
10222         * alpha-linux-nat.c (alpha_linux_nat_target): New class.
10223         (the_alpha_linux_nat_target): New.
10224         (alpha_linux_register_u_offset): Refactor as
10225         alpha_linux_nat_target method.
10226         (_initialize_alpha_linux_nat): Adjust.
10227         * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
10228         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
10229         (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
10230         methods of linux_nat_trad_target.
10231         (linux_trad_target): Delete.
10232         * linux-nat-trad.h (linux_trad_target): Delete function.
10233         (linux_nat_trad_target): New class.
10234         * mips-linux-nat.c (mips_linux_nat_target): New class.
10235         (super_fetch_registers, super_store_registers, super_close):
10236         Delete.
10237         (the_mips_linux_nat_target): New.
10238         (mips64_linux_regsets_fetch_registers)
10239         (mips64_linux_regsets_store_registers)
10240         (mips64_linux_fetch_registers, mips64_linux_store_registers)
10241         (mips_linux_register_u_offset, mips_linux_read_description)
10242         (mips_linux_can_use_hw_breakpoint)
10243         (mips_linux_stopped_by_watchpoint)
10244         (mips_linux_stopped_data_address)
10245         (mips_linux_region_ok_for_hw_watchpoint)
10246         (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
10247         (mips_linux_close): Refactor as methods of mips_linux_nat.
10248         (_initialize_mips_linux_nat): Adjust to C++ification.
10249
10250         * aix-thread.c (aix_thread_target): New class.
10251         (aix_thread_ops): Now an aix_thread_target.
10252         (aix_thread_detach, aix_thread_resume, aix_thread_wait)
10253         (aix_thread_fetch_registers, aix_thread_store_registers)
10254         (aix_thread_xfer_partial, aix_thread_mourn_inferior)
10255         (aix_thread_thread_alive, aix_thread_pid_to_str)
10256         (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
10257         Refactor as methods of aix_thread_target.
10258         (init_aix_thread_ops): Delete.
10259         (_initialize_aix_thread): Remove references to init_aix_thread_ops
10260         and complete_target_initialization.
10261         * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
10262         (rs6000_nat_target): New class.
10263         (the_rs6000_nat_target): New.
10264         (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
10265         (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
10266         (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
10267         (super_create_inferior): Delete.
10268         (_initialize_rs6000_nat): Adjust to C++ification.
10269
10270         * arm-linux-nat.c (arm_linux_nat_target): New class.
10271         (the_arm_linux_nat_target): New.
10272         (arm_linux_fetch_inferior_registers)
10273         (arm_linux_store_inferior_registers, arm_linux_read_description)
10274         (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
10275         (arm_linux_remove_hw_breakpoint)
10276         (arm_linux_region_ok_for_hw_watchpoint)
10277         (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
10278         (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
10279         (arm_linux_watchpoint_addr_within_range): Refactor as methods of
10280         arm_linux_nat_target.
10281         (_initialize_arm_linux_nat): Adjust to C++ification.
10282
10283         * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
10284         (the_aarch64_linux_nat_target): New.
10285         (aarch64_linux_fetch_inferior_registers)
10286         (aarch64_linux_store_inferior_registers)
10287         (aarch64_linux_child_post_startup_inferior)
10288         (aarch64_linux_read_description)
10289         (aarch64_linux_can_use_hw_breakpoint)
10290         (aarch64_linux_insert_hw_breakpoint)
10291         (aarch64_linux_remove_hw_breakpoint)
10292         (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
10293         (aarch64_linux_region_ok_for_hw_watchpoint)
10294         (aarch64_linux_stopped_data_address)
10295         (aarch64_linux_stopped_by_watchpoint)
10296         (aarch64_linux_watchpoint_addr_within_range)
10297         (aarch64_linux_can_do_single_step): Refactor as methods of
10298         aarch64_linux_nat_target.
10299         (super_post_startup_inferior): Delete.
10300         (_initialize_aarch64_linux_nat): Adjust to C++ification.
10301
10302         * hppa-linux-nat.c (hppa_linux_nat_target): New class.
10303         (the_hppa_linux_nat_target): New.
10304         (hppa_linux_fetch_inferior_registers)
10305         (hppa_linux_store_inferior_registers): Refactor as methods of
10306         hppa_linux_nat_target.
10307         (_initialize_hppa_linux_nat): Adjust to C++ification.
10308
10309         * ia64-linux-nat.c (ia64_linux_nat_target): New class.
10310         (the_ia64_linux_nat_target): New.
10311         (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
10312         (ia64_linux_stopped_data_address)
10313         (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
10314         (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
10315         ia64_linux_nat_target methods.
10316         (super_xfer_partial): Delete.
10317         (_initialize_ia64_linux_nat): Adjust to C++ification.
10318
10319         * m32r-linux-nat.c (m32r_linux_nat_target): New class.
10320         (the_m32r_linux_nat_target): New.
10321         (m32r_linux_fetch_inferior_registers)
10322         (m32r_linux_store_inferior_registers): Refactor as
10323         m32r_linux_nat_target methods.
10324         (_initialize_m32r_linux_nat): Adjust to C++ification.
10325
10326         * m68k-linux-nat.c (m68k_linux_nat_target): New class.
10327         (the_m68k_linux_nat_target): New.
10328         (m68k_linux_fetch_inferior_registers)
10329         (m68k_linux_store_inferior_registers): Refactor as
10330         m68k_linux_nat_target methods.
10331         (_initialize_m68k_linux_nat): Adjust to C++ification.
10332
10333         * s390-linux-nat.c (s390_linux_nat_target): New class.
10334         (the_s390_linux_nat_target): New.
10335         (s390_linux_fetch_inferior_registers)
10336         (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
10337         (s390_insert_watchpoint, s390_remove_watchpoint)
10338         (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
10339         (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
10340         (s390_auxv_parse, s390_read_description): Refactor as methods of
10341         s390_linux_nat_target.
10342         (_initialize_s390_nat): Adjust to C++ification.
10343
10344         * sparc-linux-nat.c (sparc_linux_nat_target): New class.
10345         (the_sparc_linux_nat_target): New.
10346         (_initialize_sparc_linux_nat): Adjust to C++ification.
10347         * sparc-nat.c (sparc_fetch_inferior_registers)
10348         (sparc_store_inferior_registers): Remove target_ops parameter.
10349         * sparc-nat.h (sparc_fetch_inferior_registers)
10350         (sparc_store_inferior_registers): Remove target_ops parameter.
10351         * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
10352         (the_sparc64_linux_nat_target): New.
10353         (_initialize_sparc64_linux_nat): Adjust to C++ification.
10354
10355         * spu-linux-nat.c (spu_linux_nat_target): New class.
10356         (the_spu_linux_nat_target): New.
10357         (spu_child_post_startup_inferior, spu_child_post_attach)
10358         (spu_child_wait, spu_fetch_inferior_registers)
10359         (spu_store_inferior_registers, spu_xfer_partial)
10360         (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
10361         methods.
10362         (_initialize_spu_nat): Adjust to C++ification.
10363
10364         * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
10365         (the_tilegx_linux_nat_target): New.
10366         (fetch_inferior_registers, store_inferior_registers):
10367         Refactor as methods.
10368         (_initialize_tile_linux_nat): Adjust to C++ification.
10369
10370         * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
10371         (the_xtensa_linux_nat_target): New.
10372         (xtensa_linux_fetch_inferior_registers)
10373         (xtensa_linux_store_inferior_registers): Refactor as
10374         xtensa_linux_nat_target methods.
10375         (_initialize_xtensa_linux_nat): Adjust to C++ification.
10376
10377         * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
10378         (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
10379         (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
10380         (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
10381         (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
10382         (fbsd_stopped_by_sw_breakpoint)
10383         (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
10384         (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
10385         (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
10386         (fbsd_post_startup_inferior, fbsd_post_attach)
10387         (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
10388         (fbsd_set_syscall_catchpoint)
10389         (super_xfer_partial, super_resume, super_wait)
10390         (fbsd_supports_stopped_by_hw_breakpoint): Delete.
10391         (fbsd_handle_debug_trap): Remove target_ops parameter.
10392         (fbsd_nat_add_target): Delete.
10393         * fbsd-nat.h: Include "inf-ptrace.h".
10394         (fbsd_nat_add_target): Delete.
10395         (USE_SIGTRAP_SIGINFO): Define.
10396         (fbsd_nat_target): New class.
10397
10398         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
10399         (amd64bsd_store_inferior_registers): Remove target_ops parameter.
10400         (amd64bsd_target): Delete.
10401         * amd64-bsd-nat.h: New file.
10402         * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
10403         "x86-bsd-nat.h".
10404         (amd64_fbsd_nat_target): New class.
10405         (the_amd64_fbsd_nat_target): New.
10406         (amd64fbsd_read_description): Refactor as method of
10407         amd64_fbsd_nat_target.
10408         (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
10409         (_initialize_amd64fbsd_nat): Adjust to C++ification.
10410         * amd64-nat.h (amd64bsd_target): Delete function declaration.
10411         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
10412         (i386bsd_store_inferior_registers): Remove target_ops parameter.
10413         (i386bsd_target): Delete.
10414         * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
10415         (i386bsd_fetch_inferior_registers)
10416         (i386bsd_store_inferior_registers): Declare.
10417         (i386_bsd_nat_target): New class.
10418         * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
10419         (the_i386_fbsd_nat_target): New.
10420         (i386fbsd_resume, i386fbsd_read_description): Refactor as
10421         i386_fbsd_nat_target methods.
10422         (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
10423         (_initialize_i386fbsd_nat): Adjust to C++ification.
10424         * x86-bsd-nat.c (super_mourn_inferior): Delete.
10425         (x86bsd_mourn_inferior, x86bsd_target): Delete.
10426         (_initialize_x86_bsd_nat): Adjust to C++ification.
10427         * x86-bsd-nat.h: Include "x86-nat.h".
10428         (x86bsd_target): Delete declaration.
10429         (x86bsd_nat_target): New class.
10430
10431         * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
10432         (the_aarch64_fbsd_nat_target): New.
10433         (aarch64_fbsd_fetch_inferior_registers)
10434         (aarch64_fbsd_store_inferior_registers): Refactor as methods of
10435         aarch64_fbsd_nat_target.
10436         (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
10437         * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
10438         (the_alpha_bsd_nat_target): New.
10439         (alphabsd_fetch_inferior_registers)
10440         (alphabsd_store_inferior_registers): Refactor as
10441         alpha_bsd_nat_target methods.
10442         (_initialize_alphabsd_nat): Refactor as methods of
10443         alpha_bsd_nat_target.
10444         * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
10445         (the_amd64_nbsd_nat_target): New.
10446         (_initialize_amd64nbsd_nat): Adjust to C++ification.
10447         * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
10448         (the_amd64_obsd_nat_target): New.
10449         (_initialize_amd64obsd_nat): Adjust to C++ification.
10450         * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
10451         (the_arm_fbsd_nat_target): New.
10452         (arm_fbsd_fetch_inferior_registers)
10453         (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
10454         (_initialize_arm_fbsd_nat): Refactor as methods of
10455         arm_fbsd_nat_target.
10456         (_initialize_arm_fbsd_nat): Adjust to C++ification.
10457         * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
10458         (the_arm_netbsd_nat_target): New.
10459         (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
10460         arm_netbsd_nat_target.
10461         (_initialize_arm_netbsd_nat): Adjust to C++ification.
10462         * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
10463         (the_hppa_nbsd_nat_target): New.
10464         (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
10465         hppa_nbsd_nat_target methods.
10466         (_initialize_hppanbsd_nat): Adjust to C++ification.
10467         * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
10468         (the_hppa_obsd_nat_target): New.
10469         (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
10470         methods of hppa_obsd_nat_target.
10471         (_initialize_hppaobsd_nat): Adjust to C++ification.  Use
10472         add_target.
10473         * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
10474         (_initialize_i386nbsd_nat): Adjust to C++ification.  Use
10475         add_target.
10476         * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
10477         (_initialize_i386obsd_nat): Use add_target.
10478         * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
10479         (the_m68k_bsd_nat_target): New.
10480         (m68kbsd_fetch_inferior_registers)
10481         (m68kbsd_store_inferior_registers): Refactor as methods of
10482         m68k_bsd_nat_target.
10483         (_initialize_m68kbsd_nat): Adjust to C++ification.
10484         * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
10485         (the_mips_fbsd_nat_target): New.
10486         (mips_fbsd_fetch_inferior_registers)
10487         (mips_fbsd_store_inferior_registers): Refactor as methods of
10488         mips_fbsd_nat_target.
10489         (_initialize_mips_fbsd_nat): Adjust to C++ification.  Use
10490         add_target.
10491         * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
10492         (the_mips_nbsd_nat_target): New.
10493         (mipsnbsd_fetch_inferior_registers)
10494         (mipsnbsd_store_inferior_registers): Refactor as methods of
10495         mips_nbsd_nat_target.
10496         (_initialize_mipsnbsd_nat): Adjust to C++ification.
10497         * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
10498         (the_mips64_obsd_nat_target): New.
10499         (mips64obsd_fetch_inferior_registers)
10500         (mips64obsd_store_inferior_registers): Refactor as methods of
10501         mips64_obsd_nat_target.
10502         (_initialize_mips64obsd_nat): Adjust to C++ification.  Use
10503         add_target.
10504         * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
10505         nbsd_nat_target.
10506         * nbsd-nat.h: Include "inf-ptrace.h".
10507         (nbsd_nat_target): New class.
10508         * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
10509         (obsd_wait): Refactor as methods of obsd_nat_target.
10510         (obsd_add_target): Delete.
10511         * obsd-nat.h: Include "inf-ptrace.h".
10512         (obsd_nat_target): New class.
10513         * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
10514         (the_ppc_fbsd_nat_target): New.
10515         (ppcfbsd_fetch_inferior_registers)
10516         (ppcfbsd_store_inferior_registers): Refactor as methods of
10517         ppc_fbsd_nat_target.
10518         (_initialize_ppcfbsd_nat): Adjust to C++ification.  Use
10519         add_target.
10520         * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
10521         (the_ppc_nbsd_nat_target): New.
10522         (ppcnbsd_fetch_inferior_registers)
10523         (ppcnbsd_store_inferior_registers): Refactor as methods of
10524         ppc_nbsd_nat_target.
10525         (_initialize_ppcnbsd_nat): Adjust to C++ification.
10526         * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
10527         (the_ppc_obsd_nat_target): New.
10528         (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
10529         methods of ppc_obsd_nat_target.
10530         (_initialize_ppcobsd_nat): Adjust to C++ification.  Use
10531         add_target.
10532         * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
10533         (the_sh_nbsd_nat_target): New.
10534         (shnbsd_fetch_inferior_registers)
10535         (shnbsd_store_inferior_registers): Refactor as methods of
10536         sh_nbsd_nat_target.
10537         (_initialize_shnbsd_nat): Adjust to C++ification.
10538         * sparc-nat.c (sparc_xfer_wcookie): Make extern.
10539         (inf_ptrace_xfer_partial): Delete.
10540         (sparc_xfer_partial, sparc_target): Delete.
10541         * sparc-nat.h (sparc_fetch_inferior_registers)
10542         (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
10543         (sparc_target): Delete function declaration.
10544         (sparc_target): New template class.
10545         * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
10546         (_initialize_sparcnbsd_nat): Adjust to C++ification.
10547         * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
10548         (_initialize_sparc64fbsd_nat): Adjust to C++ification.  Use
10549         add_target.
10550         * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
10551         (_initialize_sparc64nbsd_nat): Adjust to C++ification.
10552         * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
10553         (_initialize_sparc64obsd_nat): Adjust to C++ification.  Use
10554         add_target.
10555         * vax-bsd-nat.c (vax_bsd_nat_target): New class.
10556         (the_vax_bsd_nat_target): New.
10557         (vaxbsd_fetch_inferior_registers)
10558         (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
10559         methods.
10560         (_initialize_vaxbsd_nat): Adjust to C++ification.
10561
10562         * bsd-kvm.c (bsd_kvm_target): New class.
10563         (bsd_kvm_ops): Now a bsd_kvm_target.
10564         (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
10565         (bsd_kvm_files_info, bsd_kvm_fetch_registers)
10566         (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
10567         bsd_kvm_target.
10568         (bsd_kvm_return_one): Delete.
10569         (bsd_kvm_add_target): Adjust to C++ification.
10570
10571         * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
10572         (nto_procfs_target_procfs): New classes.
10573         (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
10574         (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
10575         (procfs_post_attach, procfs_wait, procfs_fetch_registers)
10576         (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
10577         (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
10578         (procfs_remove_hw_breakpoint, procfs_resume)
10579         (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
10580         (procfs_kill_inferior, procfs_store_registers)
10581         (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
10582         as methods of nto_procfs_target.
10583         (nto_procfs_ops): Now an nto_procfs_target_procfs.
10584         (nto_native_ops): Delete.
10585         (procfs_open, procfs_native_open): Delete.
10586         (nto_native_ops): Now an nto_procfs_target_native.
10587         (init_procfs_targets): Adjust to C++ification.
10588         (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
10589         (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
10590         Refactor as methods of nto_procfs_target.
10591
10592         * go32-nat.c (go32_nat_target): New class.
10593         (the_go32_nat_target): New.
10594         (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
10595         (go32_store_registers, go32_xfer_partial, go32_files_info)
10596         (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
10597         (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
10598         (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
10599         (go32_pid_to_str): Refactor as methods of go32_nat_target.
10600         (go32_target): Delete.
10601         (_initialize_go32_nat): Adjust to C++ification.
10602
10603         * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
10604         (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
10605         (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
10606         (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
10607         gnu_nat_target.
10608         (gnu_target): Delete.
10609         * gnu-nat.h (gnu_target): Delete.
10610         (gnu_nat_target): New class.
10611         * i386-gnu-nat.c (gnu_base_target): New.
10612         (i386_gnu_nat_target): New class.
10613         (the_i386_gnu_nat_target): New.
10614         (_initialize_i386gnu_nat): Adjust to C++ification.
10615
10616 2018-05-02  Pedro Alves  <palves@redhat.com>
10617
10618         * bfd-target.c (target_bfd_xclose): Rename to ...
10619         (target_bfd_close): ... this.
10620         (target_bfd_reopen): Adjust.
10621         * target.c (target_close): Remove references to to_xclose.
10622         * target.h (target_ops::to_xclose): Delete.
10623         (target_ops::to_close): Update comments.
10624
10625 2018-05-02  Pedro Alves  <palves@redhat.com>
10626
10627         * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
10628         "linux-nat.h".
10629         * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
10630         * inf-ptrace.c (inf_ptrace_register_u_offset)
10631         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
10632         (inf_ptrace_store_register, inf_ptrace_store_registers)
10633         (inf_ptrace_trad_target): Move to ...
10634         * linux-nat-trad.c: ... this new file.
10635         * linux-nat-trad.h: New file.
10636         * linux-nat.c (linux_target_install_ops): Make extern.
10637         (linux_trad_target): Delete.
10638         * linux-nat.h (linux_trad_target): Delete declaration.
10639         (linux_target_install_ops): Declare.
10640         * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
10641         "linux-nat.h".
10642
10643 2018-05-02  Pedro Alves  <palves@redhat.com>
10644
10645         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
10646         procfs_target/add_target here.
10647         * procfs.c (procfs_target): Make static.
10648         (_initialize_procfs): Call add_target here.
10649         * procfs.h (struct target_ops): Remove forward declaration.
10650         (procfs_target): Remove declaration.
10651         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
10652
10653 2018-05-02  Pedro Alves  <palves@redhat.com>
10654
10655         * procfs.c (procfs_stopped_by_watchpoint)
10656         (procfs_insert_watchpoint, procfs_remove_watchpoint)
10657         (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
10658         Forward declare.
10659         (procfs_use_watchpoints): Delete, move contents...
10660         (procfs_target): ... here.
10661         * procfs.h (procfs_use_watchpoints): Delete declaration.
10662         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
10663         procfs_use_watchpoints.
10664         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
10665         procfs_use_watchpoints.
10666
10667 2018-05-02  Tom Tromey  <tom@tromey.com>
10668
10669         PR python/20084:
10670         * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
10671         and var_zuinteger_unlimited.
10672         * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
10673         and PARAM_ZUINTEGER_UNLIMITED.
10674         (set_parameter_value): Handle var_zuinteger and
10675         var_zuinteger_unlimited.
10676         (add_setshow_generic): Likewise.
10677         (parmpy_init): Likewise.
10678
10679 2018-04-28  Dan Robertson  <danlrobertson89@gmail.com>
10680
10681         PR rust/23124
10682         * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
10683         pointer is not null before dereferencing it.
10684
10685 2018-04-30  Tom Tromey  <tom@tromey.com>
10686
10687         * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
10688         is_mi_like_p.
10689
10690 2018-04-30  Tom Tromey  <tom@tromey.com>
10691
10692         * breakpoint.c (mention): Remove use of is_mi_like_p.
10693         (print_mention_ranged_breakpoint): Likewise.
10694         * break-catch-throw.c (print_it_exception_catchpoint): Remove use
10695         of is_mi_like_p.
10696
10697 2018-04-30  Tom Tromey  <tom@tromey.com>
10698
10699         * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
10700
10701 2018-04-30  Tom Tromey  <tom@tromey.com>
10702
10703         * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
10704         (info_spu_event_command): Remove some uses of is_mi_like_p.
10705
10706 2018-04-30  Tom Tromey  <tom@tromey.com>
10707
10708         * python/py-framefilter.c (py_print_single_arg)
10709         (enumerate_locals, py_print_args, py_print_frame): Remove some
10710         uses of is_mi_like_p.
10711
10712 2018-04-30  Tom Tromey  <tom@tromey.com>
10713
10714         * ui-out.c: Update.
10715         * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
10716         * ui-out.h (ui_out::is_mi_like_p): Now const.
10717         (ui_out::do_is_mi_like_p): Now const.
10718         * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
10719
10720 2018-04-30  Tom Tromey  <tom@tromey.com>
10721
10722         * varobj.c (varobj_set_visualizer): Use new_reference.
10723         * python/python.c (gdbpy_decode_line): Use new_reference.
10724         * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
10725         new_reference.
10726
10727 2018-04-30  Tom Tromey  <tom@tromey.com>
10728
10729         * varobj.c (install_new_value): Use new_reference.
10730         * value.h (value_incref): Return void.  Swap intro comment with
10731         value_decref.
10732         * value.c (set_value_parent): Use new_reference.
10733         (value_incref): Return void.  Update intro comment.
10734         (release_value): Use new_reference.
10735         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
10736
10737 2018-04-30  Tom Tromey  <tom@tromey.com>
10738
10739         * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
10740         * gdb_bfd.h (new_bfd_ref): Remove.
10741         (gdb_bfd_open): Update comment.
10742         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
10743         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
10744         (gdb_bfd_fdopenr): Use new_reference.
10745         * exec.c (exec_file_attach): Use new_reference.
10746
10747 2018-04-30  Tom Tromey  <tom@tromey.com>
10748
10749         * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
10750         method.
10751
10752 2018-04-30  Tom Tromey  <tom@tromey.com>
10753
10754         * jit.c (jit_read_code_entry): Use type_align.
10755         * i386-tdep.c (i386_gdbarch_init): Don't call
10756         set_gdbarch_long_long_align_bit.
10757         * gdbarch.sh: Remove long_long_align_bit.
10758         * gdbarch.c, gdbarch.h: Rebuild.
10759         * arc-tdep.c (arc_type_align): New function.
10760         (arc_gdbarch_init): Use arc_type_align.  Don't call
10761         set_gdbarch_long_long_align_bit.
10762
10763 2018-04-30  Tom Tromey  <tom@tromey.com>
10764
10765         * rust-lang.c (rust_type_alignment): Remove.
10766         (rust_composite_type): Use type_align.
10767
10768 2018-04-30  Tom Tromey  <tom@tromey.com>
10769
10770         * NEWS: Mention Type.align.
10771         * python/py-type.c (typy_get_alignof): New function.
10772         (type_object_getset): Add "alignof".
10773
10774 2018-04-30  Tom Tromey  <tom@tromey.com>
10775
10776         PR exp/17095:
10777         * NEWS: Update.
10778         * std-operator.def (UNOP_ALIGNOF): New operator.
10779         * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
10780         New.
10781         * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
10782         * c-lang.c (c_op_print_tab): Add alignof.
10783         * c-exp.y (ALIGNOF): New token.
10784         (exp): Add "ALIGNOF" production.
10785         (ident_tokens): Add _Alignof and alignof.
10786
10787 2018-04-30  Tom Tromey  <tom@tromey.com>
10788
10789         * i386-tdep.c (i386_type_align): New function.
10790         (i386_gdbarch_init): Update.
10791         * gdbarch.sh (type_align): New method.
10792         * gdbarch.c, gdbarch.h: Rebuild.
10793         * arch-utils.h (default_type_align): Declare.
10794         * arch-utils.c (default_type_align): New function.
10795         * gdbtypes.h (TYPE_ALIGN_BITS): New define.
10796         (struct type) <align_log2>: New field.
10797         <instance_flags>: Now a bitfield.
10798         (TYPE_RAW_ALIGN): New macro.
10799         (type_align, type_raw_align, set_type_align): Declare.
10800         * gdbtypes.c (type_align, type_raw_align, set_type_align): New
10801         functions.
10802         * dwarf2read.c (quirk_rust_enum): Set type alignment.
10803         (get_alignment, maybe_set_alignment): New functions.
10804         (read_structure_type, read_enumeration_type, read_array_type)
10805         (read_set_type, read_tag_pointer_type, read_tag_reference_type)
10806         (read_subrange_type, read_base_type): Set type alignment.
10807
10808 2018-04-30  Simon Marchi  <simon.marchi@ericsson.com>
10809
10810         * dwarf2read.c (read_index_from_section): Use bool.
10811
10812 2018-04-29  Fabian Groffen  <grobian@gentoo.org>
10813
10814         PR gdb/22950
10815         * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
10816         with #ifdef.
10817
10818 2018-04-29  John Reiser  <jreiser@BitWagon.com>
10819
10820         PR build/22873
10821         * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
10822         last step, and do it atomically.
10823
10824 2018-04-27  Alexandre Oliva  <aoliva@redhat.com>
10825
10826         * compile/compile-c-types.c (convert_int, convert_float):
10827         Update for C FE v1.
10828
10829 2018-04-27  Tom Tromey  <tom@tromey.com>
10830
10831         PR rust/22545:
10832         * rust-lang.c (rust_inclusive_range_type_p): New function.
10833         (rust_range): Handle inclusive ranges.
10834         (rust_compute_range): Likewise.
10835         * rust-exp.y (struct rust_op) <inclusive>: New field.
10836         (DOTDOTEQ): New constant.
10837         (range_expr): Add "..=" productions.
10838         (operator_tokens): Add "..=" token.
10839         (ast_range): Add "inclusive" parameter.
10840         (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
10841         ranges.
10842         * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
10843         bounds values.
10844         * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
10845         LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
10846         Update comments.
10847         * expprint.c (print_subexp_standard): Handle new bounds values.
10848         (dump_subexp_body_standard): Likewise.
10849
10850 2018-04-27  Tom Tromey  <tom@tromey.com>
10851
10852         * configure: Rebuild.
10853         * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
10854         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
10855         "OVERRIDE".
10856         (class symbol_needs_eval_context): Likewise.
10857         * dwarf2read.c (mock_mapped_index::symbol_name_count)
10858         (mock_mapped_index::symbol_name_at): Use "override".  Remove
10859         "virtual".
10860         * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
10861         "override".
10862         (class dwarf_expr_executor): Use "override", not "OVERRIDE".
10863         * aarch64-tdep.c (instruction_reader::read): Use "override".
10864         (instruction_reader_test::read): Likewise.
10865         * arm-tdep.c (instruction_reader::read): Use "override".
10866         (instruction_reader_thumb::read): Likewise.
10867
10868 2018-04-26  Andrzej Kaczmarek  <andrzej.kaczmarek@codecoup.pl>
10869
10870         PR remote/9665
10871         * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
10872         instead of remote_send.
10873         (remote_send): Remove.
10874
10875 2018-04-26  Pedro Alves  <palves@redhat.com>
10876
10877         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
10878         find_function_start_sal instead of find_pc_line.
10879
10880 2018-04-26  Pedro Alves  <palves@redhat.com>
10881
10882         * breakpoint.c (set_breakpoint_location_function): Handle
10883         mst_data_gnu_ifunc.
10884         * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
10885         * elfread.c (elf_symtab_read): Give data symbols with
10886         BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
10887         (elf_rel_plt_read): Update comment.
10888         * linespec.c (convert_linespec_to_sals): Handle
10889         mst_data_gnu_ifunc.
10890         (minsym_found): Handle mst_data_gnu_ifunc.
10891         * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
10892         (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
10893         * parse.c (find_minsym_type_and_address): Handle
10894         mst_data_gnu_ifunc.
10895         * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
10896         * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
10897         * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
10898         comment.
10899         <mst_data_gnu_ifunc>: New enumerator.
10900
10901 2018-04-26  Pedro Alves  <palves@redhat.com>
10902
10903         * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
10904         (lookup_minimal_symbol_by_pc_section): ... this.  Replace
10905         'want_trampoline' parameter by a lookup_msym_prefer parameter.
10906         Handle it.
10907         (lookup_minimal_symbol_by_pc_section): Delete old implementation.
10908         (lookup_minimal_symbol_by_pc): Adjust.
10909         (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
10910         (lookup_solib_trampoline_symbol_by_pc): Adjust.
10911         * minsyms.h (lookup_msym_prefer): New enum.
10912         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
10913         parameter by a lookup_msym_prefer parameter.
10914
10915 2018-04-26  Pedro Alves  <palves@redhat.com>
10916
10917         * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
10918         ends in "@plt" instead of looking at the symbol's section.
10919
10920 2018-04-26  Pedro Alves  <palves@redhat.com>
10921
10922         * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete.  Remove
10923         all references.
10924         (find_pc_partial_function_gnu_ifunc): Rename to ...
10925         (find_pc_partial_function): ... this, and remove references to
10926         'is_gnu_ifunc_p'.
10927         (find_pc_partial_function): Delete old implementation.
10928         * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
10929
10930 2018-04-26  Pedro Alves  <palves@redhat.com>
10931
10932         * linespec.c (struct bound_minimal_symbol_search_key): New.
10933         (convert_linespec_to_sals): Sort minimal symbols earlier.  Don't
10934         skip first line if we found a GNU ifunc minimal symbol by name.
10935         (compare_msymbols): Change parameters to work with a destructured
10936         lhs minsym.
10937         (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
10938         functions.
10939
10940 2018-04-26  Pedro Alves  <palves@redhat.com>
10941
10942         * breakpoint.c (set_breakpoint_location_function): Don't resolve
10943         ifunc targets here.  Instead, if we have an ifunc minsym, use its
10944         address/name.
10945         (add_location_to_breakpoint): Store the minsym and the objfile in
10946         the breakpoint location.
10947         * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
10948         * linespec.c (minsym_found): Resolve GNU ifunc targets here.
10949         Record the minsym in the sal.
10950         * symtab.h (symtab_and_line) <msymbol>: New field.
10951
10952 2018-04-26  Pedro Alves  <palves@redhat.com>
10953
10954         * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
10955         unless we actually resolved the ifunc.
10956
10957 2018-04-26  Pedro Alves  <palves@redhat.com>
10958
10959         * c-exp.y (variable production): Prefer ifunc minsyms over
10960         regular function symbols.
10961         * symtab.c (find_gnu_ifunc): New function.
10962         * minsyms.h (lookup_msym_prefer): New enum.
10963         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
10964         parameter by a lookup_msym_prefer parameter.
10965         * symtab.h (find_gnu_ifunc): New declaration.
10966
10967 2018-04-26  Pedro Alves  <palves@redhat.com>
10968
10969         * blockframe.c (find_gnu_ifunc_target_type): New function.
10970         (find_function_type): New.
10971         * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
10972         return a value with a memory address.
10973         (eval_call): For calls to GNU ifunc functions, try to find the
10974         type of the target function from the type that the resolver
10975         returns.
10976         * gdbtypes.c (objfile_type): Don't install a return type for ifunc
10977         symbols.
10978         * infcall.c (find_function_return_type): Delete.
10979         (find_function_addr): Add 'function_type' parameter.  For calls to
10980         GNU ifunc functions, try to find the type of the target function
10981         from the type that the resolver returns, and return it via
10982         FUNCTION_TYPE.
10983         (call_function_by_hand_dummy): Adjust to use the function type
10984         returned by find_function_addr.
10985         (find_function_addr): Add 'function_type' parameter and move
10986         description here.
10987         * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
10988         declarations.
10989
10990 2018-04-26  Pedro Alves  <palves@redhat.com>
10991
10992         * c-exp.y (variable production): Skip finding an alias for ifunc
10993         symbols.
10994
10995 2018-04-26  Pedro Alves  <palves@redhat.com>
10996
10997         * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
10998
10999 2018-04-25  Pedro Alves  <palves@redhat.com>
11000
11001         * infcmd.c (kill_command): Print the pid as string, not the whole
11002         thread's ptid.  Add comment.  s/has been killed/killed/ in output
11003         message.
11004         * remote.c (remote_detach_1): Print the pid as string, not the
11005         whole thread's ptid.
11006
11007 2018-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
11008             Sergio Durigan Junior  <sergiodj@redhat.com>
11009             Pedro Alves  <palves@redhat.com>
11010
11011         * infcmd.c (kill_command): Print message when inferior has
11012         been killed.
11013         * inferior.c (print_inferior_events): Remove 'static'.  Set as
11014         '1'.
11015         (add_inferior): Improve message printed when
11016         'print_inferior_events' is on.
11017         (exit_inferior): Remove message printed when
11018         'print_inferior_events' is on.
11019         (detach_inferior): Improve message printed when
11020         'print_inferior_events' is on.
11021         (initialize_inferiors): Use 'add_inferior_silent' to set
11022         'current_inferior_'.
11023         * inferior.h (print_inferior_events): Declare here as
11024         'extern'.
11025         * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
11026         '[Detaching...]' messages when 'print_inferior_events' is on.
11027         Use 'add_thread_silent' instead of 'add_thread'.  Add '[' and ']'
11028         as prefix/suffix for messages.  Remove periods.  Fix erroneous
11029         'Detaching after fork from child...', replace it by '... from
11030         parent...'.
11031         (handle_vfork_child_exec_or_exit): Add '[' and ']' as
11032         prefix/suffix when printing 'Detaching...' messages.  Print
11033         them when 'print_inferior_events' is on.
11034         * remote.c (remote_detach_1): Print message when detaching
11035         from inferior and '!is_fork_parent'.
11036
11037 2018-04-24  Tom Tromey  <tom@tromey.com>
11038
11039         * cli-out.h: Reindent.
11040
11041 2018-04-24  Tom Tromey  <tom@tromey.com>
11042
11043         * cli-out.c (cli_ui_out::out_field_fmt): Remove.
11044         (cli_ui_out::do_field_string): Use fputs_filtered.
11045         * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
11046
11047 2018-04-23  Tom Tromey  <tom@tromey.com>
11048
11049         * guile/scm-frame.c (gdbscm_frame_read_var): Use
11050         gdb::unique_xmalloc_ptr.
11051
11052 2018-04-23  Tom Tromey  <tom@tromey.com>
11053
11054         * configure: Rebuild.
11055
11056 2018-04-22  Rajendra SY  <rajendra.sy@gmail.com>
11057
11058         PR gdb/23095
11059         * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
11060         prepare_for_testing.  Set normal_bp to r_debug_state if target
11061         is bsd.
11062
11063 2018-04-21  Pedro Alves  <palves@redhat.com>
11064             Rajendra SY  <rajendra.sy@gmail.com>
11065
11066         * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
11067         * remote.c (extended_remote_attach): In all-stop mode, mark the
11068         thread as executing.
11069
11070 2018-04-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
11071
11072         * thread.c (thread_apply_all_command): Fix comment.
11073         (thread_command): Fix comment.
11074
11075 2018-04-10  Alan Hayward  <alan.hayward@arm.com>
11076
11077         * common/tdesc.h (tdesc_create_feature): Remove xml filename
11078         parameter.
11079         * features/aarch64-core.c (create_feature_aarch64_core):
11080         Regenerate.
11081         * features/aarch64-fpu.c (create_feature_aarch64_fpu):
11082         Likewise.
11083         * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
11084         Likewise.
11085         * features/i386/32bit-avx512.c
11086         (create_feature_i386_32bit_avx512): Likewise.
11087         * features/i386/32bit-core.c (create_feature_i386_32bit_core):
11088         Likewise.
11089         * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
11090         Likewise.
11091         * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
11092         Likewise.
11093         * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
11094         Likewise.
11095         * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
11096         Likewise.
11097         * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
11098         Likewise.
11099         * features/i386/64bit-avx512.c
11100         (create_feature_i386_64bit_avx512): Likewise.
11101         * features/i386/64bit-core.c (create_feature_i386_64bit_core):
11102         Likewise.
11103         * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
11104         Likewise.
11105         * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
11106         Likewise.
11107         * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
11108         Likewise.
11109         * features/i386/64bit-segments.c
11110         (create_feature_i386_64bit_segments): Likewise.
11111         * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
11112         Likewise.
11113         * features/i386/x32-core.c
11114         (create_feature_i386_x32_core): Likewise.
11115         * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
11116         * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
11117         * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
11118         * target-descriptions.c: In generated code, don't pass xml
11119         filename.
11120
11121 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
11122
11123         * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
11124         (print_xml_feature::visit_post): Likewise.
11125         (print_xml_feature::visit): Likewise.
11126         * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
11127         (print_xml_feature): Add new class.
11128         * regformats/regdat.sh: Null xmltarget on feature targets.
11129         * target-descriptions.c (struct target_desc): Add xmltarget.
11130         (maintenance_check_tdesc_xml_convert): Add unittest function.
11131         (tdesc_get_features_xml): Add function to get xml.
11132         (maintenance_check_xml_descriptions): Test xml generation.
11133         * xml-tdesc.c (string_read_description_xml): Add function.
11134         * xml-tdesc.h (string_read_description_xml): Add declaration.
11135
11136 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
11137
11138         * features/Makefile: Add feature marker to targets with new style
11139         target descriptions.
11140         * regformats/aarch64.dat: Regenerate.
11141         * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
11142         * regformats/i386/amd64-avx-linux.dat: Likewise.
11143         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
11144         * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
11145         * regformats/i386/amd64-linux.dat: Likewise.
11146         * regformats/i386/amd64-mpx-linux.dat: Likewise.
11147         * regformats/i386/amd64.dat: Likewise.
11148         * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
11149         * regformats/i386/i386-avx-linux.dat: Likewise.
11150         * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
11151         * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
11152         * regformats/i386/i386-linux.dat: Likewise.
11153         * regformats/i386/i386-mmx-linux.dat: Likewise.
11154         * regformats/i386/i386-mpx-linux.dat: Likewise.
11155         * regformats/i386/i386.dat: Likewise.
11156         * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
11157         * regformats/i386/x32-avx-linux.dat: Likewise.
11158         * regformats/i386/x32-linux.dat: Likewise.
11159         * regformats/tic6x-c62x-linux.dat: Likewise.
11160         * regformats/tic6x-c64x-linux.dat: Likewise.
11161         * regformats/tic6x-c64xp-linux.dat: Likewise.
11162         * regformats/regdat.sh: Parse feature marker.
11163
11164 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
11165
11166         * common/tdesc.h (tdesc_architecture_name): Add new declaration.
11167         (tdesc_osabi_name): Likewise.
11168         * target-descriptions.c (tdesc_architecture_name): Add new
11169         function.
11170         (tdesc_osabi_name): Likewise.
11171
11172 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
11173
11174         * common/tdesc.c (tdesc_predefined_type): Move to here.
11175         (tdesc_named_type): Likewise.
11176         (tdesc_create_vector): Likewise.
11177         (tdesc_create_struct): Likewise.
11178         (tdesc_set_struct_size): Likewise.
11179         (tdesc_create_union): Likewise.
11180         (tdesc_create_flags): Likewise.
11181         (tdesc_create_enum): Likewise.
11182         (tdesc_add_field): Likewise.
11183         (tdesc_add_typed_bitfield): Likewise.
11184         (tdesc_add_bitfield): Likewise.
11185         (tdesc_add_flag): Likewise.
11186         (tdesc_add_enum_value): Likewise.
11187         * common/tdesc.h (struct tdesc_type_builtin): Likewise.
11188         (struct tdesc_type_vector): Likewise.
11189         (struct tdesc_type_field): Likewise.
11190         (struct tdesc_type_with_fields): Likewise.
11191         (tdesc_create_enum): Add declaration.
11192         (tdesc_add_typed_bitfield): Likewise.
11193         (tdesc_add_enum_value): Likewise.
11194         * target-descriptions.c (tdesc_type_field): Move from here.
11195         (tdesc_type_builtin): Likewise.
11196         (tdesc_type_vector): Likewise.
11197         (tdesc_type_with_fields): Likewise.
11198         (tdesc_predefined_types): Likewise.
11199         (tdesc_named_type): Likewise.
11200         (tdesc_create_vector): Likewise.
11201         (tdesc_create_struct): Likewise.
11202         (tdesc_set_struct_size): Likewise.
11203         (tdesc_create_union): Likewise.
11204         (tdesc_create_flags): Likewise.
11205         (tdesc_create_enum): Likewise.
11206         (tdesc_add_field): Likewise.
11207         (tdesc_add_typed_bitfield): Likewise.
11208         (tdesc_add_bitfield): Likewise.
11209         (tdesc_add_flag): Likewise.
11210         (tdesc_add_enum_value): Likewise.
11211         * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
11212         (tdesc_add_typed_bitfield): Likewise.
11213         (tdesc_add_enum_value): Likewise.
11214
11215 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
11216
11217         * common/tdesc.c (tdesc_feature::accept): Move to here.
11218         (tdesc_feature::operator==): Likewise.
11219         (tdesc_create_reg): Likewise.
11220         * common/tdesc.h (tdesc_type_kind): Likewise.
11221         (struct tdesc_type): Likewise.
11222         (struct tdesc_feature): Likewise.
11223         * regformats/regdat.sh: Create a feature.
11224         * target-descriptions.c (tdesc_type_kind): Move from here.
11225         (tdesc_type): Likewise.
11226         (tdesc_type_up): Likewise.
11227         (tdesc_feature): Likewise.
11228         (tdesc_create_reg): Likewise.
11229
11230 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
11231
11232         * Makefile.in: Add arch/tdesc.c
11233         * common/tdesc.c: New file.
11234         * common/tdesc.h (tdesc_element_visitor): Move to here.
11235         (tdesc_element): Likewise.
11236         (tdesc_reg): Likewise.
11237         (tdesc_reg_up): Likewise.
11238         * regformats/regdef.h (reg): Add offset to constructors.
11239         * target-descriptions.c (tdesc_element_visitor): Move from here.
11240         (tdesc_element): Likewise.
11241         (tdesc_reg): Likewise.
11242         (tdesc_reg_up): Likewise.
11243
11244 2018-04-17  Tom Tromey  <tom@tromey.com>
11245
11246         * dwarf2read.c (quirk_rust_enum): Conditionally drop the
11247         discriminant field.
11248
11249 2018-04-17  Tom Tromey  <tom@tromey.com>
11250
11251         * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
11252
11253 2018-04-17  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11254
11255         * symtab.c (print_symbol_info): Skip printing filename and line
11256         number when `last' is NULL.
11257         (symtab_symbol_info): Use empty string instead of NULL for first
11258         invocation of print_symbol_info.
11259         (rbreak_command): Pass NULL to `last' parameter of
11260         print_symbol_info.
11261
11262 2018-04-16  Simon Marchi  <simon.marchi@ericsson.com>
11263
11264         * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
11265         instead of nullptr.
11266
11267 2018-04-16  Pedro Alves  <palves@redhat.com>
11268
11269         * MAINTAINERS (sh): Remove.
11270         * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
11271         (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
11272         (ALLDEPFILES): Remove sh64-tdep.c.
11273         * NEWS: Mentions that support for SH-5/SH64 is removed.
11274         * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
11275         (sh*-*-openbsd*): Ditto.
11276         (sh64-*-elf*): Remove.
11277         (sh*): Remove.
11278         * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
11279         * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
11280         * sh-tdep.c: No longer include "sh64-tdep.h".
11281         (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
11282         * sh64-tdep.c, sh64-tdep.h: Remove files.
11283
11284 2018-04-16  Pedro Alves  <palves@redhat.com>
11285
11286         * MAINTAINERS: Remove m88k.
11287         * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
11288         (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
11289         (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
11290         * NEWS: Mention that support for m88k was removed.
11291         * configure.host (m88*-*-*): Remove support.
11292         * configure.nat (m88k-*-*): Remove support.
11293         * configure.tgt (m88*-*-openbsd*): Remove.
11294         * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
11295
11296 2018-04-15  Simon Marchi  <simon.marchi@polymtl.ca>
11297
11298         * configure.tgt (x86_tobjs): New variable.
11299         (amd64_tobjs, i386_tobjs): Use it.
11300
11301 2018-04-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11302
11303         * symtab.c (print_symbol_info): Precede the symbol definition by
11304         the line number when available.
11305         * NEWS: Advertise this enhancement.
11306
11307 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
11308
11309         * NEWS (New options): announce set/show record btrace cpu.
11310         * btrace.c: Include record-btrace.h.
11311         (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
11312         the vendor is unknown.
11313         (btrace_compute_ftrace_1): Add cpu parameter.  Update callers.
11314         Maybe overwrite the btrace configuration's cpu.
11315         (btrace_compute_ftrace): Add cpu parameter.  Update callers.
11316         (btrace_fetch): Add cpu parameter.  Update callers.
11317         (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
11318         Maybe overwrite the btrace configuration's cpu.  Skip enabling
11319         errata workarounds if the vendor is unknown.
11320         * python/py-record-btrace.c: Include record-btrace.h.
11321         (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
11322         (recpy_bt_function_call_history): Call record_btrace_get_cpu.
11323         * record-btrace.c (record_btrace_cpu_state_kind): New.
11324         (record_btrace_cpu): New.
11325         (set_record_btrace_cpu_cmdlist): New.
11326         (record_btrace_get_cpu): New.
11327         (require_btrace_thread, record_btrace_info)
11328         (record_btrace_resume_thread): Call record_btrace_get_cpu.
11329         (cmd_set_record_btrace_cpu_none): New.
11330         (cmd_set_record_btrace_cpu_auto): New.
11331         (cmd_set_record_btrace_cpu): New.
11332         (cmd_show_record_btrace_cpu): New.
11333         (_initialize_record_btrace): Initialize set/show record btrace cpu
11334         commands.
11335         * record-btrace.h (record_btrace_get_cpu): New.
11336
11337 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
11338
11339         * record.c (set_record_command): Fix typo in message.
11340
11341 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
11342
11343         * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
11344
11345 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
11346
11347         * infrun.c (process_event_stop_test): Call
11348         gdbarch_in_indirect_branch_thunk.
11349         * gdbarch.sh (in_indirect_branch_thunk): New.
11350         * gdbarch.c: Regenerated.
11351         * gdbarch.h: Regenerated.
11352         * x86-tdep.h: New.
11353         * x86-tdep.c: New.
11354         * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
11355         (HFILES_NO_SRCDIR): Add x86-tdep.h.
11356         (ALLDEPFILES): Add x86-tdep.c.
11357         * arch-utils.h (default_in_indirect_branch_thunk): New.
11358         * arch-utils.c (default_in_indirect_branch_thunk): New.
11359         * i386-tdep: Include x86-tdep.h.
11360         (i386_in_indirect_branch_thunk): New.
11361         (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
11362         function.
11363         * amd64-tdep: Include x86-tdep.h.
11364         (amd64_in_indirect_branch_thunk): New.
11365         (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
11366
11367 2018-04-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
11368
11369         PR gdb/23053
11370         * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
11371         (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
11372         (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
11373         regression.
11374
11375 2018-04-12  Tom Tromey  <tom@tromey.com>
11376
11377         * rust-lang.c (rust_print_struct_def): Remove univariant code.
11378         (rust_evaluate_subexp): Likewise.
11379
11380 2018-04-12  Pedro Alves  <palves@redhat.com>
11381
11382         * procfs.c (procfs_detach): Make forward declaration's prototype
11383         match definition's protototype.
11384         (proc_get_LDT_entry): Remove stale do_cleanups call.
11385
11386 2018-04-12  Pedro Alves  <palves@redhat.com>
11387
11388         * target.h (target_ops::to_has_exited): Delete.
11389         (target_has_exited): Delete.
11390         * target-delegates.c: Regenerate.
11391
11392 2018-04-11  Pedro Alves  <palves@redhat.com>
11393
11394         * target.c (fileio_fh_t::t): Add comment.
11395         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
11396         (target_fileio_close): Handle a NULL target.
11397         (invalidate_fileio_fh): New.
11398         (target_close): Call it.
11399         * remote.c (remote_hostio_send_command): No longer check whether
11400         remote_desc is open.
11401
11402 2018-04-11  Pedro Alves  <palves@redhat.com>
11403
11404         * target.c (fileio_fh_t): Make it a named struct instead of a
11405         typedef.
11406         (fileio_fh_t::is_closed): New method.
11407         (DEF_VEC_O (fileio_fh_t)): Remove.
11408         (fileio_fhandles): Now a std::vector.
11409         (is_closed_fileio_fh): Delete.
11410         (acquire_fileio_fd): Adjust.  Rename parameters.
11411         (release_fileio_fd): Adjust.
11412         (fileio_fd_to_fh): Reimplement as a function instead of a macro.
11413         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
11414         (target_fileio_close): Adjust.
11415
11416 2018-04-10  Simon Marchi  <simon.marchi@ericsson.com>
11417
11418         * auto-load.c (auto_load_safe_path_vec_update): Iterate by
11419         index.
11420
11421 2018-04-10  Pedro Alves  <palves@redhat.com>
11422
11423         * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
11424         (scoped_finish_thread_state): New class.
11425         * infcmd.c (run_command_1): Use it instead of finish_thread_state
11426         cleanup.
11427         * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
11428         (fetch_inferior_event, normal_stop): Likewise.
11429         * thread.c (finish_thread_state_cleanup): Delete.
11430
11431 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11432             Pedro Alves  <palves@redhat.com>
11433
11434         * value.c: Include "selftest.h" and "common/array-view.h".
11435         (struct range) <operator ==>: New.
11436         (test_ranges_contain): New.
11437         (check_ranges_vector): New.
11438         (test_insert_into_bit_range_vector): New.
11439         (_initialize_values): Register selftests.
11440         * common/array-view.h (operator==, operator!=): New.
11441
11442 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11443
11444         * common/gdb_vecs.h (unordered_remove): Add overload that takes
11445         an iterator.
11446         * inline-frame.c: Include <algorithm>.
11447         (struct inline_state): Add constructor.
11448         (inline_state_s): Remove.
11449         (DEF_VEC_O(inline_state_s)): Remove.
11450         (inline_states): Change type to std::vector.
11451         (find_inline_frame_state): Adjust to std::vector.
11452         (allocate_inline_frame_state): Remove.
11453         (clear_inline_frame_state): Adjust to std::vector.
11454         (skip_inline_frames): Adjust to std::vector.
11455
11456 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11457
11458         * tracepoint.h (struct trace_state_variable): Add constructor.
11459         <name>: Change type to std::string.
11460         * tracepoint.c (tsv_s): Remove.
11461         (DEF_VEC_O(tsv_s)): Remove.
11462         (tvariables): Change to std::vector.
11463         (create_trace_state_variable): Adjust to std::vector.
11464         (find_trace_state_variable): Likewise.
11465         (find_trace_state_variable_by_number): Likewise.
11466         (delete_trace_state_variable): Likewise.
11467         (trace_variable_command): Adjust to std::string.
11468         (delete_trace_variable_command): Likewise.
11469         (tvariables_info_1): Adjust to std::vector.
11470         (save_trace_state_variables): Likewise.
11471         (start_tracing): Likewise.
11472         (merge_uploaded_trace_state_variables): Adjust to std::vector
11473         and std::string.
11474         * target.h (struct target_ops)
11475         <to_download_trace_state_variable>: Pass reference to
11476         trace_state_variable.
11477         * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
11478         * target-delegates.c: Re-generate.
11479         * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
11480         (mi_tsv_deleted): Likewise.
11481         * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
11482         * remote.c (remote_download_trace_state_variable): Change
11483         pointer to reference and adjust.
11484         * make-target-delegates (parse_argtypes): Handle references.
11485         (write_function_header): Likewise.
11486         (munge_type): Likewise.
11487
11488 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11489
11490         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11491         string_view-selftests.c.
11492         * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
11493         testsuite.
11494         * unittests/basic_string_view/cons/char/1.cc: Likewise.
11495         * unittests/basic_string_view/cons/char/2.cc: Likewise.
11496         * unittests/basic_string_view/cons/char/3.cc: Likewise.
11497         * unittests/basic_string_view/element_access/char/1.cc:
11498         Likewise.
11499         * unittests/basic_string_view/element_access/char/empty.cc:
11500         Likewise.
11501         * unittests/basic_string_view/element_access/char/front_back.cc:
11502         Likewise.
11503         * unittests/basic_string_view/inserters/char/2.cc: Likewise.
11504         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
11505         Likewise.
11506         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
11507         Likewise.
11508         * unittests/basic_string_view/modifiers/swap/char/1.cc:
11509         Likewise.
11510         * unittests/basic_string_view/operations/compare/char/1.cc:
11511         Likewise.
11512         * unittests/basic_string_view/operations/compare/char/13650.cc:
11513         Likewise.
11514         * unittests/basic_string_view/operations/copy/char/1.cc:
11515         Likewise.
11516         * unittests/basic_string_view/operations/data/char/1.cc:
11517         Likewise.
11518         * unittests/basic_string_view/operations/find/char/1.cc:
11519         Likewise.
11520         * unittests/basic_string_view/operations/find/char/2.cc:
11521         Likewise.
11522         * unittests/basic_string_view/operations/find/char/3.cc:
11523         Likewise.
11524         * unittests/basic_string_view/operations/find/char/4.cc:
11525         Likewise.
11526         * unittests/basic_string_view/operations/rfind/char/1.cc:
11527         Likewise.
11528         * unittests/basic_string_view/operations/rfind/char/2.cc:
11529         Likewise.
11530         * unittests/basic_string_view/operations/rfind/char/3.cc:
11531         Likewise.
11532         * unittests/basic_string_view/operations/substr/char/1.cc:
11533         Likewise.
11534         * unittests/basic_string_view/operators/char/2.cc: Likewise.
11535         * unittests/string_view-selftests.c: New file.
11536
11537 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11538
11539         * unittests/basic_string_view/capacity/1.cc: New file.
11540         * unittests/basic_string_view/capacity/empty_neg.cc: New file.
11541         * unittests/basic_string_view/cons/char/1.cc: New file.
11542         * unittests/basic_string_view/cons/char/2.cc: New file.
11543         * unittests/basic_string_view/cons/char/3.cc: New file.
11544         * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
11545         * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
11546         * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
11547         * unittests/basic_string_view/element_access/char/1.cc: New file.
11548         * unittests/basic_string_view/element_access/char/2.cc: New file.
11549         * unittests/basic_string_view/element_access/char/empty.cc: New file.
11550         * unittests/basic_string_view/element_access/char/front_back.cc: New file.
11551         * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
11552         * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
11553         * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
11554         * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
11555         * unittests/basic_string_view/include.cc: New file.
11556         * unittests/basic_string_view/inserters/char/1.cc: New file.
11557         * unittests/basic_string_view/inserters/char/2.cc: New file.
11558         * unittests/basic_string_view/inserters/char/3.cc: New file.
11559         * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
11560         * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
11561         * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
11562         * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
11563         * unittests/basic_string_view/literals/types.cc: New file.
11564         * unittests/basic_string_view/literals/values.cc: New file.
11565         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
11566         * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
11567         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
11568         * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
11569         * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
11570         * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
11571         * unittests/basic_string_view/operations/compare/char/1.cc: New file.
11572         * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
11573         * unittests/basic_string_view/operations/compare/char/2.cc: New file.
11574         * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
11575         * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
11576         * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
11577         * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
11578         * unittests/basic_string_view/operations/copy/char/1.cc: New file.
11579         * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
11580         * unittests/basic_string_view/operations/data/char/1.cc: New file.
11581         * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
11582         * unittests/basic_string_view/operations/find/char/1.cc: New file.
11583         * unittests/basic_string_view/operations/find/char/2.cc: New file.
11584         * unittests/basic_string_view/operations/find/char/3.cc: New file.
11585         * unittests/basic_string_view/operations/find/char/4.cc: New file.
11586         * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
11587         * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
11588         * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
11589         * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
11590         * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
11591         * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
11592         * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
11593         * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
11594         * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
11595         * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
11596         * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
11597         * unittests/basic_string_view/operations/substr/char/1.cc: New file.
11598         * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
11599         * unittests/basic_string_view/operators/char/2.cc: New file.
11600         * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
11601         * unittests/basic_string_view/range_access/char/1.cc: New file.
11602         * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
11603         * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
11604         * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
11605         * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
11606         * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
11607         * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
11608         * unittests/basic_string_view/requirements/typedefs.cc: New file.
11609         * unittests/basic_string_view/typedefs.cc: New file.
11610         * unittests/basic_string_view/types/1.cc: New file.
11611
11612 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11613
11614         * common/gdb_string_view.h: Remove libstdc++ implementation
11615         details, adjust to gdb reality.
11616         * common/gdb_string_view.tcc: Likewise.
11617         * cli/cli-script.c (struct string_view): Remove.
11618         (user_args) <m_args>: Change element type to gdb::string_view.
11619         (user_args::insert_args): Adjust.
11620
11621 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11622
11623         * common/gdb_string_view.h: New file.
11624         * common/gdb_string_view.tcc: New file.
11625
11626 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11627
11628         * ax_cxx_compile_stdcxx.m4: Sync with upstream.
11629         * configure: Re-generate.
11630
11631 2018-04-09  Pedro Alves  <palves@redhat.com>
11632
11633         * gdbarch.sh: Include "observable.h" instead of "observer.h".
11634         (set_target_gdbarch): Call
11635         gdb::observers::architecture_changed.notify instead of
11636         observer_notify_architecture_changed.
11637
11638 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11639
11640         * tracepoint.c (struct current_traceframe_cleanup): Remove.
11641         (do_restore_current_traceframe_cleanup): Remove.
11642         (restore_current_traceframe_cleanup_dtor): Remove.
11643         (make_cleanup_restore_current_traceframe): Remove.
11644         (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
11645         New.
11646         * tracepoint.h (struct scoped_restore_current_traceframe): New.
11647         * infrun.c (fetch_inferior_event): Use
11648         scoped_restore_current_traceframe.
11649
11650 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11651
11652         * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
11653         Remove.
11654         <n_allocated_type_units>: Remove.
11655         <all_type_units>: Change to std::vector.
11656         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
11657         to std::vector change.
11658         (dwarf2_per_objfile::get_cutu): Likewise.
11659         (dwarf2_per_objfile::get_tu): Likewise.
11660         (create_signatured_type_table_from_index): Likewise.
11661         (create_signatured_type_table_from_debug_names): Likewise.
11662         (dw2_symtab_iter_next): Likewise.
11663         (dw2_print_stats): Likewise.
11664         (dw2_expand_all_symtabs): Likewise.
11665         (dw2_expand_marked_cus): Likewise.
11666         (dw2_debug_names_iterator::next): Likewise.
11667         (dwarf2_initialize_objfile): Likewise.
11668         (add_signatured_type_cu_to_table): Likewise.
11669         (create_all_type_units): Likewise.
11670         (add_type_unit): Likewise.
11671         (struct tu_abbrev_offset): Add constructor.
11672         (build_type_psymtabs_1): Adjust to std::vector change.
11673         (print_tu_stats): Likewise.
11674         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
11675         (write_debug_names): Likewise.
11676
11677 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11678
11679         * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
11680         Make an std::vector.
11681         <n_comp_units>: Remove.
11682         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
11683         to std::vector change.
11684         (dwarf2_per_objfile::get_cutu): Likewise.
11685         (dwarf2_per_objfile::get_cu): Likewise.
11686         (create_cus_from_index): Likewise.
11687         (create_addrmap_from_index): Likewise.
11688         (create_addrmap_from_aranges): Likewise.
11689         (dwarf2_read_index): Likewise.
11690         (dw2_find_last_source_symtab): Likewise.
11691         (dw2_map_symtabs_matching_filename): Likewise.
11692         (dw2_symtab_iter_next): Likewise.
11693         (dw2_print_stats): Likewise.
11694         (dw2_expand_all_symtabs): Likewise.
11695         (dw2_expand_symtabs_with_fullname): Likewise.
11696         (dw2_expand_marked_cus): Likewise.
11697         (dw2_map_symbol_filenames): Likewise.
11698         (create_cus_from_debug_names): Likewise.
11699         (dwarf2_read_debug_names): Likewise.
11700         (dw2_debug_names_iterator::next): Likewise.
11701         (dwarf2_initialize_objfile): Likewise.
11702         (set_partial_user): Likewise.
11703         (dwarf2_build_psymtabs_hard): Likewise.
11704         (read_comp_units_from_section): Remove arguments, adjust to
11705         std::vector change.
11706         (create_all_comp_units): Adjust to std::vector and
11707         read_comp_units_from_section changes.
11708         (dwarf2_find_containing_comp_unit): Adjust to std::vector
11709         change.
11710         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
11711         (psyms_seen_size): Likewise.
11712         (write_gdbindex): Likewise.
11713         (write_debug_names): Likewise.
11714
11715 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11716
11717         * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
11718         with dwarf2_per_objfile.
11719         (create_cus_from_index): Likewise.
11720         (create_signatured_type_table_from_index): Likewise.
11721         (dwarf2_read_index): Likewise.
11722         (dwarf2_initialize_objfile): Likewise.
11723         (dwarf2_fetch_die_loc_sect_off):  Get dwarf2_per_objfile from
11724         per_cu rather than get_dwarf2_per_objfile.
11725
11726 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11727
11728         * dwarf2read.h (struct signatured_type): Forward declare.
11729         (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
11730         New methods.
11731         * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
11732         (dw2_get_cutu): ...this.
11733         (dwarf2_per_objfile::get_cu): Rename from...
11734         (dw2_get_cu): ...this.
11735         (dwarf2_per_objfile::get_tu): New.
11736         (create_addrmap_from_index): Adjust.
11737         (create_addrmap_from_aranges): Adjust.
11738         (dw2_find_last_source_symtab): Adjust.
11739         (dw2_map_symtabs_matching_filename): Adjust.
11740         (dw2_symtab_iter_next): Adjust.
11741         (dw2_print_stats): Adjust.
11742         (dw2_expand_all_symtabs): Adjust.
11743         (dw2_expand_symtabs_with_fullname): Adjust.
11744         (dw2_expand_marked_cus): Adjust.
11745         (dw_expand_symtabs_matching_file_matcher): Adjust.
11746         (dw2_map_symbol_filenames): Adjust.
11747         (dw2_debug_names_iterator::next): Adjust.
11748         (dwarf2_initialize_objfile): Adjust.
11749         (set_partial_user): Adjust.
11750         (dwarf2_build_psymtabs_hard): Adjust.
11751
11752 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11753
11754         * dwarf2read.c (create_signatured_type_table_from_debug_names):
11755         Remove unused variables.
11756         (dw2_map_symtabs_matching_filename): Likewise.
11757         (dwarf2_record_block_ranges): Likewise.
11758         (dwarf2_read_addr_index): Likewise.
11759         (follow_die_offset): Likewise.
11760
11761 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11762
11763         * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
11764         to symbol_file_add_main.
11765
11766 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11767
11768         PR mi/22299
11769         * mi/mi-console.c (do_fputc_async_safe): New.
11770         (mi_console_file::write_async_safe): New.
11771         (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
11772         * mi/mi-console.h (class mi_console_file) <write_async_safe>:
11773         New.
11774         * ui-file.c (ui_file::putstrn): Adjust call to
11775         fputstrn_unfiltered.
11776         * utils.c (printchar): Replace do_fputs and do_fprintf
11777         parameters by do_fputc.
11778         (fputstr_filtered): Adjust call to printchar.
11779         (fputstr_unfiltered): Likewise.
11780         (fputstrn_filtered): Likewise.
11781         (fputstrn_unfiltered): Add do_fputc parameter, pass to
11782         printchar.
11783         * utils.h (do_fputc_ftype): New typedef.
11784         (fputstrn_unfiltered): Add do_fputc parameter.
11785
11786 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11787
11788         * regformats/i386/i386-avx.dat: Remove.
11789
11790 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
11791
11792         PR gdb/22979
11793         * amd64-tdep.c (amd64_none_init_abi): New function.
11794         (amd64_x32_none_init_abi): New function.
11795         (_initialize_amd64_tdep): Register handlers for x86-64 and
11796         x64_32 with GDB_OSABI_NONE.
11797         * osabi.c (gdbarch_init_osabi): Allow running handlers for the
11798         GDB_OSABI_NONE osabi.
11799
11800 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
11801
11802         PR gdb/22980
11803         * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
11804         GDB_OSABI_NONE.
11805         * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
11806         * osabi.c (gdb_osabi_names): Add "unknown" entry.
11807
11808 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
11809
11810         * common/byte-vector.h (char_vector): New type.
11811         * target.h (target_read_alloc): Return
11812         gdb::optional<byte_vector>.
11813         (target_read_stralloc): Return gdb::optional<char_vector>.
11814         (target_get_osdata): Return gdb::optional<char_vector>.
11815         * target.c (target_read_alloc_1): Templatize.  Replacement
11816         manual memory management with vector.
11817         (target_read_alloc): Change return type, adjust.
11818         (target_read_stralloc): Change return type, adjust.
11819         (target_get_osdata): Change return type, adjust.
11820         * auxv.c (struct auxv_info) <length>: Remove.
11821         <data>: Change type to gdb::optional<byte_vector>.
11822         (auxv_inferior_data_cleanup): Free auxv_info with delete.
11823         (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
11824         (target_auxv_search): Adjust.
11825         (fprint_target_auxv): Adjust.
11826         * avr-tdep.c (avr_io_reg_read_command): Adjust.
11827         * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
11828         (linux_make_corefile_notes): Adjust.
11829         * osdata.c (get_osdata): Adjust.
11830         * remote.c (remote_get_threads_with_qxfer): Adjust.
11831         (remote_memory_map): Adjust.
11832         (remote_traceframe_info): Adjust.
11833         (btrace_read_config): Adjust.
11834         (remote_read_btrace): Adjust.
11835         (remote_pid_to_exec_file): Adjust.
11836         * solib-aix.c (solib_aix_get_library_list): Adjust.
11837         * solib-dsbt.c (decode_loadmap): Don't free buf.
11838         (dsbt_get_initial_loadmaps): Adjust.
11839         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
11840         * solib-target.c (solib_target_current_sos): Adjust.
11841         * tracepoint.c (sdata_make_value): Adjust.
11842         * xml-support.c (xinclude_start_include): Adjust.
11843         (xml_fetch_content_from_file): Adjust.
11844         * xml-support.h (xml_fetch_another): Change return type.
11845         (xml_fetch_content_from_file): Change return type.
11846         * xml-syscall.c (xml_init_syscalls_info): Adjust.
11847         * xml-tdesc.c (file_read_description_xml): Adjust.
11848         (fetch_available_features_from_target): Change return type.
11849         (target_fetch_description_xml): Adjust.
11850         (target_read_description_xml): Adjust.
11851
11852 2018-04-06  Tom Tromey  <tom@tromey.com>
11853
11854         * value.c (~value): Update.
11855         (struct value) <contents>: Now unique_xmalloc_ptr.
11856         (value_contents_bits_eq, allocate_value_contents)
11857         (value_contents_raw, value_contents_all_raw)
11858         (value_contents_for_printing, value_contents_for_printing_const)
11859         (set_value_enclosing_type): Update.
11860
11861 2018-04-06  Tom Tromey  <tom@tromey.com>
11862
11863         * value.c (range_s): Remove typedef, VEC.
11864         (struct range): Add operator<.
11865         (range_lessthan): Remove.
11866         (ranges_contain): Change type.
11867         (~value): Update.
11868         (struct value) <unavailable, optimized_out>: Now std::vector.
11869         (value_entirely_available)
11870         (value_entirely_covered_by_range_vector)
11871         (value_entirely_unavailable, value_entirely_optimized_out):
11872         Update.
11873         (insert_into_bit_range_vector): Change argument type.
11874         (find_first_range_overlap): Likewise.
11875         (struct ranges_and_idx, value_contents_bits_eq)
11876         (require_not_optimized_out, require_available): Update.
11877         (ranges_copy_adjusted): Change argument types.
11878         (value_optimized_out, value_copy, value_fetch_lazy): Update.
11879
11880 2018-04-06  Tom Tromey  <tom@tromey.com>
11881
11882         * value.c (~value): Update.
11883         (struct value) <parent>: Now a value_ref_ptr.
11884         (value_parent, set_value_parent, value_address, value_copy):
11885         Update.
11886
11887 2018-04-06  Tom Tromey  <tom@tromey.com>
11888
11889         * value.c (struct value): Add constructor, destructor, and member
11890         initializers.
11891         (allocate_value_lazy, value_decref): Update.
11892
11893 2018-04-06  Tom Tromey  <tom@tromey.com>
11894
11895         * value.c (struct value) <released, next>: Remove.
11896         (all_values): Now a std::vector.
11897         (allocate_value_lazy): Update.
11898         (value_next): Remove.
11899         (value_mark, value_free_to_mark, release_value)
11900         (value_release_to_mark): Update.
11901
11902 2018-04-06  Tom Tromey  <tom@tromey.com>
11903
11904         * value.h (fetch_subexp_value, value_release_to_mark): Update.
11905         (free_value_chain): Remove.
11906         * value.c (free_value_chain): Remove.
11907         (value_release_to_mark): Return a std::vector.
11908         * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
11909         std::vector.
11910         (check_condition): Update.
11911         * eval.c (fetch_subexp_value): Change "val_chain" to a
11912         std::vector.
11913         * breakpoint.c (update_watchpoint): Update.
11914         (can_use_hardware_watchpoint): Change "vals" to a std::vector.
11915
11916 2018-04-06  Tom Tromey  <tom@tromey.com>
11917
11918         * value.h (free_all_values): Remove.
11919         * value.c (free_all_values): Remove.
11920
11921 2018-04-06  Tom Tromey  <tom@tromey.com>
11922
11923         * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
11924         (value_history_chain, value_history_count): Remove.
11925         (value_history): New global.
11926         (record_latest_value, access_value_history, show_values)
11927         (preserve_values): Update.
11928
11929 2018-04-06  Tom Tromey  <tom@tromey.com>
11930
11931         * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
11932         * varobj.c (varobj_set_display_format, varobj_set_value)
11933         (install_default_visualizer, construct_visualizer)
11934         (install_new_value, ~varobj, varobj_get_value_type)
11935         (my_value_of_variable, varobj_editable_p): Update.
11936         * c-varobj.c (c_describe_child, c_value_of_variable)
11937         (cplus_number_of_children, cplus_describe_child): Update.
11938         * ada-varobj.c (ada_number_of_children, ada_name_of_child)
11939         (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
11940         (ada_value_of_variable, ada_value_is_changeable_p): Update.
11941
11942 2018-04-06  Tom Tromey  <tom@tromey.com>
11943
11944         * printcmd.c (last_examine_address): Change type to
11945         value_ref_ptr.
11946         (do_examine, x_command): Update.
11947
11948 2018-04-06  Tom Tromey  <tom@tromey.com>
11949
11950         * value.c (release_value): Update.
11951         * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
11952         (struct bpstats) <val>: Now a value_ref_ptr.
11953         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
11954         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
11955         (~watchpoint, print_it_watchpoint, watch_command_1)
11956         (invalidate_bp_value_on_memory_change): Update.
11957
11958 2018-04-06  Tom Tromey  <tom@tromey.com>
11959
11960         * varobj.c (varobj_clear_saved_item)
11961         (update_dynamic_varobj_children, install_new_value, ~varobj):
11962         Update.
11963         * value.h (value_incref): Move declaration earlier.
11964         (value_decref): Rename from value_free.
11965         (struct value_ref_policy): New.
11966         (value_ref_ptr): New typedef.
11967         (struct value_deleter): Remove.
11968         (gdb_value_up): Remove typedef.
11969         (release_value): Change return type.
11970         (release_value_or_incref): Remove.
11971         * value.c (set_value_parent): Update.
11972         (value_incref): Change return type.
11973         (value_decref): Rename from value_free.
11974         (value_free_to_mark, free_all_values, free_value_chain): Update.
11975         (release_value): Return value_ref_ptr.
11976         (release_value_or_incref): Remove.
11977         (record_latest_value, set_internalvar, clear_internalvar):
11978         Update.
11979         * stack.c (info_frame_command): Don't call value_free.
11980         * python/py-value.c (valpy_dealloc, valpy_new)
11981         (value_to_value_object): Update.
11982         * printcmd.c (do_examine): Update.
11983         * opencl-lang.c (lval_func_free_closure): Update.
11984         * mi/mi-main.c (register_changed_p): Don't call value_free.
11985         * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
11986         * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
11987         * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
11988         value_free.
11989         * guile/scm-value.c (vlscm_free_value_smob)
11990         (vlscm_scm_from_value): Update.
11991         * frame.c (frame_register_unwind, frame_unwind_register_signed)
11992         (frame_unwind_register_unsigned, get_frame_register_bytes)
11993         (put_frame_register_bytes): Don't call value_free.
11994         * findvar.c (address_from_register): Don't call value_free.
11995         * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
11996         * dwarf2loc.c (entry_data_value_free_closure)
11997         (value_of_dwarf_reg_entry, free_pieced_value_closure)
11998         (dwarf2_evaluate_loc_desc_full): Update.
11999         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
12000         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
12001         (~watchpoint, watch_command_1)
12002         (invalidate_bp_value_on_memory_change): Update.
12003         * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
12004
12005 2018-04-06  Simon Marchi  <simon.marchi@polymtl.ca>
12006
12007         PR gdb/23022
12008         * warning.m4: Add -Wno-error=deprecated-register.
12009         * configure: Re-generate.
12010
12011 2018-04-05  Tom Tromey  <tom@tromey.com>
12012
12013         * linespec.h: Remove include of "vec.h".
12014
12015 2018-04-05  Tom Tromey  <tom@tromey.com>
12016
12017         * linespec.c (typep): Remove typedef.
12018         (find_methods, find_superclass_methods): Take a std::vector.
12019         (find_method): Use std::vector.
12020
12021 2018-04-05  Tom Tromey  <tom@tromey.com>
12022
12023         * utils.c (compare_strings): Remove.
12024         * utils.h (compare_strings): Remove.
12025         * objc-lang.h (find_imps): Update.
12026         * objc-lang.c (find_methods): Take a std::vector.
12027         (uniquify_strings, find_imps): Likewise.
12028         * linespec.c (find_methods): Take a std::vector.
12029         (decode_objc): Use std::vector.
12030         (add_all_symbol_names_from_pspace, find_superclass_methods): Take
12031         a std::vector.
12032         (find_method, find_function_symbols): Use std::vector.
12033
12034 2018-04-05  Tom Tromey  <tom@tromey.com>
12035
12036         * completer.c (completion_tracker::completion_tracker): Remove
12037         cast.
12038         (completion_tracker::discard_completions): Likewise.
12039         * breakpoint.c (ambiguous_names_p): Remove cast.
12040         * ada-lang.c (_initialize_ada_language): Remove cast.
12041         * utils.h (streq): Update.
12042         (streq_hash): Add new declaration.
12043         * utils.c (streq): Return bool.
12044         (streq_hash): New function.
12045
12046 2018-04-05  Tom Tromey  <tom@tromey.com>
12047
12048         * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
12049         Remove a string copy.
12050
12051 2018-04-05  Tom Tromey  <tom@tromey.com>
12052
12053         * linespec.c (filter_results): Use std::vector.
12054         (decode_line_2, decode_line_full): Update.
12055
12056 2018-04-05  Tom Tromey  <tom@tromey.com>
12057
12058         * linespec.c (canonical_to_fullform): Return std::string.
12059         (filter_results): Update.
12060         (struct decode_line_2_item): Add constructor.
12061         <fullform, displayform>: Now std::string.
12062         (decode_line_2_compare_items): Now a std::sort comparator.
12063         (decode_line_2): Update.
12064
12065 2018-04-05  Tom Tromey  <tom@tromey.com>
12066
12067         * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
12068         (unexpected_linespec_error): Update.
12069         (linespec_parse_basic, parse_linespec): Update.
12070
12071 2018-04-05  Tom Tromey  <tom@tromey.com>
12072
12073         * linespec.c (linespec_parse_basic): Reindent.
12074
12075 2018-04-05  Tom Tromey  <tom@tromey.com>
12076
12077         * minsyms.h (iterate_over_minimal_symbols): Update.
12078         * minsyms.c (iterate_over_minimal_symbols): Take a
12079         gdb::function_view.
12080         * linespec.c (struct collect_minsyms): Remove.
12081         (compare_msyms): Now a std::sort comparator.
12082         (add_minsym): Add parameters.
12083         (search_minsyms_for_name): Update.  Use std::vector.
12084
12085 2018-04-03  Tom Tromey  <tom@tromey.com>
12086
12087         * mipsread.c (read_alphacoff_dynamic_symtab): Use
12088         gdb::byte_vector.
12089
12090 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
12091
12092         * MAINTAINERS (Write After Approval): Add Weimin Pan.
12093
12094 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
12095
12096         PR gdb/16959
12097         * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when 
12098         printing static type.
12099
12100 2018-04-01  Tom Tromey  <tom@tromey.com>
12101
12102         * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
12103         (rs6000_xfer_shared_libraries): Update.
12104
12105 2018-04-01  Simon Marchi  <simon.marchi@polymtl.ca>
12106
12107         * common/gdb_vecs.h (char_ptr): Remove.
12108         * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
12109
12110 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
12111
12112         * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
12113         with std::vector.
12114         * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
12115
12116 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
12117
12118         * tracepoint.h (struct uploaded_tp): Initialize fields.
12119         <actions, step_actions, cmd_strings>: Change type to
12120         std::vector<char *>.
12121         * tracepoint.c (get_uploaded_tp): Allocate with new.
12122         (free_uploaded_tps): Free with delete.
12123         (parse_tracepoint_definition): Adjust to std::vector change.
12124         * breakpoint.c (read_uploaded_action): Likewise.
12125         (create_tracepoint_from_upload): Likewise.
12126         * ctf.c (ctf_write_uploaded_tp): Likewise.
12127         (SET_ARRAY_FIELD): Likewise.
12128         * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
12129
12130 2018-03-30  Tom Tromey  <tom@tromey.com>
12131
12132         * solib-svr4.c (lm_info_read): Use gdb::byte_vector.  Return
12133         std::unique_ptr.
12134         (svr4_keep_data_in_core): Update.
12135         (svr4_read_so_list): Update.
12136
12137 2018-03-30  Tom Tromey  <tom@tromey.com>
12138
12139         * windows-nat.c (handle_output_debug_string, handle_exception):
12140         Update.
12141         * target.h (target_read_string): Update.
12142         * target.c (target_read_string): Change "string" to
12143         unique_xmalloc_ptr.
12144         * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
12145         Update.
12146         * solib-frv.c (frv_current_sos): Update.
12147         * solib-dsbt.c (dsbt_current_sos): Update.
12148         * solib-darwin.c (darwin_current_sos): Update.
12149         * linux-thread-db.c (inferior_has_bug): Update.
12150         * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
12151         Update.  Remove alloca.
12152         * ada-lang.c (ada_main_name): Update.
12153
12154 2018-03-30  Tom Tromey  <tom@tromey.com>
12155
12156         * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
12157         (struct dwo_file_deleter): New.
12158         (dwo_file_up): New typedef.
12159         (open_and_init_dwo_file): Use dwo_file_up.
12160         (free_dwo_file_cleanup): Remove.
12161
12162 2018-03-30  Tom Tromey  <tom@tromey.com>
12163
12164         * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
12165         (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
12166
12167 2018-03-30  Tom Tromey  <tom@tromey.com>
12168
12169         * dwarf2read.c (class free_cached_comp_units): New class.
12170         (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
12171         (free_cached_comp_units): Remove function.
12172
12173 2018-03-30  Tom Tromey  <tom@tromey.com>
12174
12175         * utils.h (make_cleanup_unpush_target): Remove.
12176         * inf-ptrace.c (struct target_unpusher): New.
12177         (target_unpush_up) New typedef.
12178         (inf_ptrace_create_inferior, inf_ptrace_attach): Use
12179         target_unpush_up.
12180         * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
12181
12182 2018-03-27  Tom Tromey  <tom@tromey.com>
12183
12184         * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
12185
12186 2018-03-27  Pedro Alves  <palves@redhat.com>
12187             Tom Tromey  <tom@tromey.com>
12188
12189         * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
12190         destructor.  Now a class.
12191         (gdb_readline_wrapper_cleanup): Remove function.
12192         (gdb_readline_wrapper): Remove cleanups.
12193
12194 2018-03-27  Tom Tromey  <tom@tromey.com>
12195
12196         * typeprint.h (struct type_print_options) <local_typedefs,
12197         global_typedefs>: Remove "struct" keyword.
12198         (class typedef_hash_table): New class.
12199         (recursively_update_typedef_hash, add_template_parameters)
12200         (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
12201         (find_typedef_in_hash): Don't declare.
12202         * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
12203         (typedef_hash_table::recursively_update): Rename from
12204         recursively_update_typedef_hash.  Now a member.
12205         (typedef_hash_table::add_template_parameters): Rename from
12206         add_template_parameters.  Now a member.
12207         (typedef_hash_table::typedef_hash_table): Now a constructor;
12208         rename from create_typedef_hash.
12209         (typedef_hash_table::~typedef_hash_table): Now a destructor;
12210         rename from free_typedef_hash.
12211         (do_free_typedef_hash, make_cleanup_free_typedef_hash)
12212         (do_free_global_table): Remove.
12213         (typedef_hash_table::typedef_hash_table): New constructor; renamed
12214         from copy_type_recursive.
12215         (create_global_typedef_table): Remove.
12216         (typedef_hash_table::find_global_typedef): Now a member of
12217         typedef_hash_table.
12218         (typedef_hash_table::find_typedef): Rename from
12219         find_typedef_in_hash; now a member.
12220         (whatis_exp): Update.
12221         * extension.h (struct ext_lang_type_printers): Add constructor and
12222         destructor.
12223         (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
12224         declare.
12225         * extension.c (ext_lang_type_printers::ext_lang_type_printers):
12226         Now a constructor; rename from start_ext_lang_type_printers.
12227         (ext_lang_type_printers): Now a destructor; rename from
12228         free_ext_lang_type_printers.
12229         * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
12230         Update.
12231         (c_type_print_base_struct_union): Update.  Remove cleanups.
12232
12233 2018-03-27  Tom Tromey  <tom@tromey.com>
12234
12235         * dwarf-index-write.c: Include <cmath>.
12236
12237 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
12238
12239         * NEWS: Add entry describing new "set|show varsize-limit" command.
12240         * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
12241         command.
12242         * printcmd.c (_initialize_printcmd): Add "set var" alias of
12243         "set variable".
12244
12245 2018-03-27  Simon Marchi  <simon.marchi@ericsson.com>
12246
12247         * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
12248         dwarf-index-write.c
12249         (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
12250         * dwarf-index-common.c: New file.
12251         * dwarf-index-common.h: New file.
12252         * dwarf-index-write.c: New file.
12253         * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
12254         (struct dwarf2_section_info): Move from here.
12255         (dwarf2_section_info_def): Likewise.
12256         (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
12257         (offset_type): Likewise.
12258         (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
12259         (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
12260         (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
12261         (byte_swap): Likewise.
12262         (MAYBE_SWAP): Likewise.
12263         (dwarf2_per_cu_ptr): Likewise.
12264         (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
12265         (struct tu_stats): Likewise.
12266         (struct dwarf2_per_objfile): Likewise.
12267         (struct dwarf2_per_cu_data): Likewise.
12268         (struct signatured_type): Likewise.
12269         (sig_type_ptr): Likewise.
12270         (DEF_VEC_P (sig_type_ptr)): Likewise.
12271         (INDEX4_SUFFIX): Likewise.
12272         (INDEX5_SUFFIX): Likewise.
12273         (DEBUG_STR_SUFFIX): Likewise.
12274         (dwarf2_read_section): Make non-static.
12275         (mapped_index_string_hash): Move from here.
12276         (dwarf5_djb_hash): Likewise.
12277         (file_write): Likewise.
12278         (class data_buf): Likewise.
12279         (struct symtab_index_entry): Likewise.
12280         (struct mapped_symtab): Likewise.
12281         (find_slot): Likewise.
12282         (hash_expand): Likewise.
12283         (add_index_entry): Likewise.
12284         (uniquify_cu_indices): Likewise.
12285         (class c_str_view): Likewise.
12286         (class c_str_view_hasher): Likewise.
12287         (class vector_hasher): Likewise.
12288         (write_hash_table): Likewise.
12289         (psym_index_map): Likewise.
12290         (struct addrmap_index_data): Likewise.
12291         (add_address_entry): Likewise.
12292         (add_address_entry_worker): Likewise.
12293         (write_address_map): Likewise.
12294         (symbol_kind): Likewise.
12295         (write_psymbols): Likewise.
12296         (struct signatured_type_index_data): Likewise.
12297         (write_one_signatured_type): Likewise.
12298         (recursively_count_psymbols): Likewise.
12299         (recursively_write_psymbols): Likewise.
12300         (class debug_names): Likewise.
12301         (check_dwarf64_offsets): Likewise.
12302         (psyms_seen_size): Likewise.
12303         (write_gdbindex): Likewise.
12304         (write_debug_names): Likewise.
12305         (assert_file_size): Likewise.
12306         (write_psymtabs_to_index): Likewise.
12307         (save_gdb_index_command): Likewise.
12308         (_initialize_dwarf2_read): Don't register the "save gdb-index"
12309         command.
12310         * dwarf2read.h: New file.
12311
12312 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
12313
12314         PR gdb/22670
12315         * dwarf2read.c (dwarf2_physname): Do not return the demangled
12316         symbol name if the CU's language stores symbol names in linkage
12317         format.
12318         * language.h (struct language_defn)
12319         <la_store_sym_names_in_linkage_form_p>: New field.  Adjust
12320         all instances of this struct.
12321
12322 2018-03-26  Tom Tromey  <tom@tromey.com>
12323
12324         * stack.c (backtrace_command_1): Remove verbose code.
12325
12326 2018-03-26  Tom Tromey  <tom@tromey.com>
12327
12328         * python/py-framefilter.c (py_print_type): Don't catch
12329         exceptions.  Return void.
12330         (py_print_value): Likewise.
12331         (py_print_single_arg): Likewise.
12332         (enumerate_args): Don't catch exceptions.
12333         (py_print_args): Likewise.
12334         (py_print_frame): Likewise.
12335         (gdbpy_apply_frame_filter): Catch exceptions here.
12336
12337 2018-03-26  Tom Tromey  <tom@tromey.com>
12338
12339         * stack.c (_initialize_stack): Remove trailing newlines from help
12340         text.  Add "Usage" line to "backtrace" help.
12341
12342 2018-03-26  Tom Tromey  <tom@tromey.com>
12343
12344         PR python/16486:
12345         * python/py-framefilter.c (py_print_args): Call wrap_hint.
12346
12347 2018-03-26  Tom Tromey  <tom@tromey.com>
12348
12349         * python/py-framefilter.c (py_print_single_arg): Return
12350         EXT_LANG_BT_ERROR from catch.
12351
12352 2018-03-26  Tom Tromey  <tom@tromey.com>
12353
12354         PR backtrace/15584:
12355         * stack.c (backtrace_command_1): Move some code into no-filters
12356         "if".
12357
12358 2018-03-26  Tom Tromey  <tom@tromey.com>
12359
12360         * python/py-framefilter.c (throw_quit_or_print_exception): New
12361         function.
12362         (gdbpy_apply_frame_filter): Use it.
12363
12364 2018-03-26  Tom Tromey  <tom@tromey.com>
12365
12366         PR cli/17716:
12367         * python/py-framefilter.c (py_print_type, py_print_value)
12368         (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
12369         RETURN_MASK_ERROR.
12370
12371 2018-03-26  Tom Tromey  <tom@tromey.com>
12372
12373         * python/py-framefilter.c (enumerate_args): Use
12374         gdb::unique_xmalloc_ptr.
12375
12376 2018-03-26  Tom Tromey  <tom@tromey.com>
12377
12378         * python/py-framefilter.c (py_print_frame): Return
12379         EXT_LANG_BT_OK.
12380         (gdbpy_apply_frame_filter): Update comment.
12381         * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
12382         Remove.
12383         <EXT_LANG_BT_NO_FILTERS>: Change value.
12384
12385 2018-03-26  Tom Tromey  <tom@tromey.com>
12386
12387         PR backtrace/15582:
12388         * stack.c (backtrace_command): Parse "hide" argument.
12389         * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
12390         * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
12391         constant.
12392
12393 2018-03-26  Tom Tromey  <tom@tromey.com>
12394
12395         * stack.c (backtrace_command_1): Remove "show_locals" parameter,
12396         add "flags".
12397         (backtrace_command): Remove "fulltrace", add "flags".
12398
12399 2018-03-26  Tom Tromey  <tom@tromey.com>
12400
12401         * stack.c (backtrace_command): Rewrite command line parsing.
12402
12403 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
12404
12405         * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
12406
12407 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
12408
12409         * filename-seen-cache.h: Add include guard.
12410
12411 2018-03-26  Keith Seitz  <keiths@redhat.com>
12412
12413         * symfile.c (place_section): Remove "struct" from section_addr_info
12414         in comment.
12415         * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
12416         "struct" keyword from section_addr_info.
12417
12418 2018-03-26  Alan Hayward  <alan.hayward@arm.com>
12419
12420         * regformats/regdef.h (reg): Add constructors.
12421
12422 2018-03-25  Pedro Alves  <palves@redhat.com>
12423
12424         * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
12425         if then/else bodies in var_func_name extraction.
12426
12427 2018-03-23  Weimin Pan  <weimin.pan@oracle.com>
12428
12429         * minsyms.c (lookup_minimal_symbol_and_objfile): Use
12430         lookup_minimal_symbol() to find symbol entry.
12431         * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
12432
12433 2018-03-23  Keith Seitz  <keiths@redhat.com>
12434
12435         PR c++/22968
12436         * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
12437         nested type definitions for C++, too.
12438
12439 2018-03-23  Tom Tromey  <tom@tromey.com>
12440
12441         * machoread.c (struct oso_el): Add a constructor.  Don't define as
12442         a typedef.
12443         (macho_register_oso): Remove.
12444         (macho_symtab_read): Take a std::vector.
12445         (oso_el_compare_name): Now a std::sort comparator.
12446         (macho_symfile_read_all_oso): Take a std::vector.
12447         (macho_symfile_read): Use std::vector.  Remove cleanups.
12448
12449 2018-03-22  Tom Tromey  <tom@tromey.com>
12450
12451         * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
12452         (record_full_goto_bookmark): Use std::string.
12453
12454 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
12455
12456         PR tdep/18295
12457         * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
12458         a single mask.
12459
12460 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
12461
12462         * rs6000-tdep.c (store_insn_p): New function.
12463         (skip_prologue): New variable alloca_reg_offset. Set lr_reg
12464         and cr_reg to their unshifted values. Use store_insn_p to
12465         match LR saves using either R1 or fdata->alloca_reg. Use
12466         store_insn_p to match CR saves. Set alloca_reg_offset
12467         when alloca_reg and framep are set. Remove lr_reg shift
12468         when assigning to fdata->lr_register.
12469
12470 2018-03-22  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12471
12472         * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
12473         command line args instead of emitting a warning.
12474
12475 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
12476
12477         * tracepoint.h (struct static_tracepoint_marker): Initialize
12478         fields, define default constructor, move constructor and move
12479         assignment, disable the rest.
12480         <str_id, extra>: Make std::string.
12481         (release_static_tracepoint_marker): Remove.
12482         (free_current_marker): Remove.
12483         * tracepoint.c (free_current_marker): Remove.
12484         (parse_static_tracepoint_marker_definition): Adjust to
12485         std::string, use new hex2str overload.
12486         (release_static_tracepoint_marker): Remove.
12487         (print_one_static_tracepoint_marker): Get marker by reference
12488         and adjust to std::string.
12489         (info_static_tracepoint_markers_command): Adjust to std::vector
12490         changes
12491         * target.h (static_tracepoint_marker_p): Remove typedef.
12492         (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
12493         (struct target_ops) <to_static_tracepoint_marker_at>: Return
12494         bool.
12495         <to_static_tracepoint_markers_by_strid>: Return std::vector.
12496         * target-debug.h
12497         (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
12498         (target_debug_print_std_vector_static_tracepoint_marker): New.
12499         (target_debug_print_struct_static_tracepoint_marker_p): Rename
12500         to...
12501         (target_debug_print_static_tracepoint_marker_p): ... this.
12502         * target-delegates.c: Re-generate.
12503         * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
12504         Make std::string.
12505         * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
12506         (decode_static_tracepoint_spec): Adjust to std::vector.
12507         (tracepoint_print_one_detail): Adjust to std::string.
12508         (strace_marker_decode_location): Adjust to std::string.
12509         (update_static_tracepoint): Adjust to std::string, remove call
12510         to release_static_tracepoint_marker.
12511         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
12512         Adjust to std::vector.
12513         * remote.c (remote_static_tracepoint_marker_at): Return bool.
12514         (remote_static_tracepoint_markers_by_strid): Adjust to
12515         std::vector.
12516         * common/rsp-low.h (hex2str): New overload with explicit count
12517         of bytes.
12518         * common/rsp-low.c (hex2str): New overload with explicit count
12519         of bytes.
12520         * unittests/rsp-low-selftests.c (test_hex2str): New function.
12521         (_initialize_rsp_low_selftests): Add test_hex2str test.
12522         * unittests/tracepoint-selftests.c
12523         (test_parse_static_tracepoint_marker_definition): Adjust to
12524         std::string.
12525
12526 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
12527
12528         * tracepoint.c (parse_static_tracepoint_marker_definition):
12529         Consider case where the definition is followed by more
12530         definitions.
12531         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12532         tracepoint-selftests.c.
12533         * unittests/tracepoint-selftests.c: New.
12534
12535 2018-03-21  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
12536
12537         * MAINTAINERS (Write After Approval): Add Pedro Franco de
12538         Carvalho.
12539
12540 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
12541
12542         * symtab.c (find_pc_sect_line): fixed indentation.
12543
12544 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
12545
12546         * symtab.c (find_pc_sect_line): now uses binary search.
12547
12548 2018-03-19  Tom Tromey  <tom@tromey.com>
12549
12550         * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
12551         "IDENT" production.
12552
12553 2018-03-19  Pedro Alves  <palves@redhat.com>
12554             Tom Tromey  <tom@tromey.com>
12555
12556         * unittests/observable-selftests.c: New file.
12557         * common/observable.h: New file.
12558         * observable.h: New file.
12559         * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
12560         arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
12561         breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
12562         corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
12563         extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
12564         infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
12565         linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
12566         mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
12567         ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
12568         python/py-breakpoint.c, python/py-finishbreakpoint.c,
12569         python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
12570         record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
12571         riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
12572         spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
12573         symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
12574         tui/tui-interp.c, valops.c: Update all users.
12575         * tui/tui-hooks.c (tui_bp_created_observer)
12576         (tui_bp_deleted_observer, tui_bp_modified_observer)
12577         (tui_inferior_exit_observer, tui_before_prompt_observer)
12578         (tui_normal_stop_observer, tui_register_changed_observer):
12579         Remove.
12580         (tui_observers_token): New global.
12581         (attach_or_detach, tui_attach_detach_observers): New functions.
12582         (tui_install_hooks, tui_remove_hooks): Use
12583         tui_attach_detach_observers.
12584         * record-btrace.c (record_btrace_thread_observer): Remove.
12585         (record_btrace_thread_observer_token): New global.
12586         * observer.sh: Remove.
12587         * observer.c: Rename to observable.c.
12588         * observable.c (namespace gdb_observers): Define new objects.
12589         (observer_debug): Move into gdb_observers namespace.
12590         (struct observer, struct observer_list, xalloc_observer_list_node)
12591         (xfree_observer_list_node, generic_observer_attach)
12592         (generic_observer_detach, generic_observer_notify): Remove.
12593         (_initialize_observer): Update.
12594         Don't include observer.inc.
12595         * Makefile.in (generated_files): Remove observer.h, observer.inc.
12596         (clean mostlyclean): Likewise.
12597         (observer.h, observer.inc): Remove targets.
12598         (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
12599         (COMMON_SFILES): Use observable.c, not observer.c.
12600         * .gitignore: Remove observer.h.
12601
12602 2018-03-18  Tom Tromey  <tom@tromey.com>
12603
12604         * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
12605         gdb::def_vector.
12606         (bfd_lookup_symbol_from_dyn_symtab): Likewise.
12607
12608 2018-03-17  Tom Tromey  <tom@tromey.com>
12609
12610         * auto-load.c (auto_load_objfile_script_1): Use std::string.
12611
12612 2018-03-17  Tom Tromey  <tom@tromey.com>
12613
12614         * target.c (class scoped_target_fd): New.
12615         (target_fileio_close_cleanup): Remove.
12616         (target_fileio_read_alloc_1): Use scoped_target_fd.
12617
12618 2018-03-16  Simon Marchi  <simon.marchi@polymtl.ca>
12619
12620         * silent-rules.mk: New.
12621         * Makefile.in: Include silent-rules.mk
12622         (srcdir, VPATH, top_srcdir): Move up.
12623         (COMPILE): Add ECHO_CXX.
12624         (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
12625         (init.c): Add ECHO_INIT_C.
12626         (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
12627         (version.c): Add ECHO_GEN.
12628         (printcmd.o): Add ECHO_CXX.
12629         (target-float.o): Add ECHO_CXX.
12630         (ada-exp.o): Add ECHO_CXX.
12631         (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
12632         (insight$(EXEEXT)): Add ECHO_CXXLD.
12633         * gnulib/configure.ac: Add AM_SILENT_RULES.
12634         * gnulib/aclocal.m4: Re-generate.
12635         * gnulib/configure: Re-generate.
12636         * gnulib/import/Makefile.in: Re-generate.
12637
12638 2018-03-16  Tom Tromey  <tom@tromey.com>
12639
12640         * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
12641         * utils.h (make_cleanup_free_section_addr_info): Don't declare.
12642         * utils.c (do_free_section_addr_info)
12643         (make_cleanup_free_section_addr_info): Remove.
12644         * symfile.h (struct other_sections): Add constructor.
12645         (struct section_addr_info): Remove.
12646         (section_addr_info): New typedef.
12647         (struct sym_fns) <sym_offsets>: Change type of parameter.
12648         (build_section_addr_info_from_objfile)
12649         (relative_addr_info_to_section_offsets, addr_info_make_relative)
12650         (default_symfile_offsets, symbol_file_add)
12651         (symbol_file_add_from_bfd)
12652         (build_section_addr_info_from_section_table): Update.
12653         (alloc_section_addr_info, free_section_addr_info): Don't declare.
12654         * symfile.c (alloc_section_addr_info): Remove.
12655         (build_section_addr_info_from_section_table): Change return type.
12656         Update.
12657         (build_section_addr_info_from_bfd)
12658         (build_section_addr_info_from_objfile): Likewise.
12659         (free_section_addr_info): Remove.
12660         (relative_addr_info_to_section_offsets): Change type of "addrs".
12661         (addrs_section_compar): Now a std::sort comparator.
12662         (addrs_section_sort): Change return type.
12663         (addr_info_make_relative): Change type of "addrs".  Update.
12664         (default_symfile_offsets, syms_from_objfile_1)
12665         (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
12666         (symbol_file_add_separate): Update.
12667         (symbol_file_add): Change type of "addrs".  Update.
12668         (add_symbol_file_command): Update.  Remove cleanups.
12669         * symfile-mem.c (symbol_file_add_from_memory): Update.  Remove
12670         cleanups.
12671         * symfile-debug.c (debug_sym_offsets): Change type of "info".
12672         * solib.c (solib_read_symbols): Update.
12673         * objfiles.c (objfile_relocate): Update.  Remove cleanups.
12674         * machoread.c (macho_symfile_offsets): Update.
12675         * jit.c (jit_bfd_try_read_symtab): Update.
12676
12677 2018-03-15  Simon Marchi  <simon.marchi@polymtl.ca>
12678
12679         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12680         unittests/utils-selftests.c.
12681         * unittests/utils-selftests.c: New file.
12682
12683 2018-03-14  Tom Tromey  <tom@tromey.com>
12684
12685         PR cli/14977:
12686         * printcmd.c (printf_c_string, printf_wide_c_string): Special case
12687         for NULL.
12688
12689 2018-03-14  Tom Tromey  <tom@tromey.com>
12690
12691         PR cli/19918:
12692         * printcmd.c (printf_pointer): Allow "-" in format.
12693
12694 2018-03-14  Tom Tromey  <tom@tromey.com>
12695
12696         * printcmd.c (_initialize_printcmd): Add usage to printf.
12697
12698 2018-03-14  Yao Qi  <qiyao@sourceware.org>
12699
12700         * MAINTAINERS: Update my email address.
12701
12702 2018-03-13  Tom Tromey  <tom@tromey.com>
12703
12704         * machoread.c (macho_check_dsym): Change filenamep to a
12705         std::string*.
12706         (macho_symfile_read): Update.
12707         * symfile.c (load_command): Use std::string.
12708
12709 2018-03-12  Andrew Burgess  <andrew.burgess@embecosm.com>
12710
12711         * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
12712         to error message string.
12713         (riscv_register_name): Use xsnprintf instead of sprintf.
12714         (riscv_insn::fetch_instruction): Use gdb_assert instead of
12715         internal_error.
12716         (riscv_print_arg_location): Use gdb_assert_not_reached instead of
12717         error.
12718         (riscv_push_dummy_call): Likewise.
12719
12720 2018-03-12  Tom Tromey  <tom@tromey.com>
12721
12722         * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
12723         Use gdb::byte_vector.
12724         * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
12725
12726 2018-03-12  Yao Qi  <yao.qi@linaro.org>
12727
12728         * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
12729         parameter type to readable_regcache.
12730         * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
12731         the declaration.
12732
12733 2018-03-11  Tom Tromey  <tom@tromey.com>
12734
12735         * dwarf2read.c (struct nextfield): Add initializers.
12736         (struct nextfnfield): Remove.
12737         (struct fnfieldlist): Add initializers.  Remove "length" and
12738         "head", use std::vector.
12739         (struct decl_field_list): Remove.
12740         (struct field_info): Add initializers.
12741         <fields, baseclasses>: Now std::vector.
12742         <nbaseclasses, nfnfields, typedef_field_list_count,
12743         nested_types_list_count>: Remove.
12744         (dwarf2_add_field, dwarf2_add_type_defn)
12745         (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
12746         (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
12747         (process_structure_scope): Update.
12748
12749 2018-03-11  Tom Tromey  <tom@tromey.com>
12750
12751         * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
12752         for use by std::sort.
12753         (build_type_psymtabs_1): Use std::vector.
12754
12755 2018-03-09  Eli Zaretskii  <eliz@gnu.org>
12756
12757         * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
12758         and LIBMPFR in the printed configuration.
12759
12760 2018-03-08  Tom Tromey  <tom@tromey.com>
12761
12762         * source.c (get_filename_and_charpos): Use scoped_fd.
12763         * nto-procfs.c (procfs_open_1): Use scoped_fd.
12764         (procfs_pidlist): Likewise.
12765         * procfs.c (proc_get_LDT_entry): Use scoped_fd.
12766         (iterate_over_mappings): Likewise.
12767
12768 2018-03-08  Tom Tromey  <tom@tromey.com>
12769
12770         * infcall.c (struct call_return_meta_info)
12771         <stack_temporaries_enabled>: Remove.
12772         (get_call_return_value, call_function_by_hand_dummy): Update.
12773         * thread.c (disable_thread_stack_temporaries): Remove.
12774         (enable_thread_stack_temporaries): Remove.
12775         (thread_stack_temporaries_enabled_p): Return bool.
12776         (push_thread_stack_temporary, value_in_thread_stack_temporaries)
12777         (get_last_thread_stack_temporary): Update.
12778         * eval.c (evaluate_subexp): Update.
12779         * gdbthread.h (class enable_thread_stack_temporaries): Now a
12780         class, not a function.
12781         (value_ptr, value_vec): Remove typedefs.
12782         (class thread_info) <stack_temporaries_enabled>: Now bool.
12783         <stack_temporaries>: Now a std::vector.
12784         (thread_stack_temporaries_enabled_p)
12785         (value_in_thread_stack_temporaries): Return bool.
12786
12787 2018-03-08  Simon Marchi  <simon.marchi@ericsson.com>
12788
12789         * remote.c (putpkt_binary): Fix omitted bytes reporting.
12790         (getpkt_or_notif_sane_1): Likewise.
12791
12792 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
12793
12794         * build-id.c (build_id_to_debug_bfd): Use std::string.
12795
12796 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
12797
12798         * build-id.c (find_separate_debug_file_by_buildid): Return
12799         std::string.
12800         * build-id.h (find_separate_debug_file_by_buildid): Return
12801         std::string.
12802         * coffread.c (coff_symfile_read): Adjust to std::string.
12803         * elfread.c (elf_symfile_read): Adjust to std::string.
12804         * symfile.c (separate_debug_file_exists): Change parameter to
12805         std::string.
12806         (find_separate_debug_file): Return std::string.
12807         (find_separate_debug_file_by_debuglink): Return std::string.
12808         * symfile.h (find_separate_debug_file_by_debuglink): Return
12809         std::string.
12810
12811 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
12812
12813         * common/xml-utils.c (xml_escape_text): Move code to...
12814         (xml_escape_text_append): ... this new function.
12815         * common/xml-utils.h (xml_escape_text_append): New declaration.
12816         * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
12817         New function.
12818         (_initialize_xml_utils): register test_xml_escape_text_append as
12819         a selftest.
12820
12821 2018-03-07  Alan Hayward  <alan.hayward@arm.com>
12822
12823         * defs.h: Remove MAX_REGISTER_SIZE.
12824         * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
12825         asserts.
12826         * python/py-unwind.c (pyuw_sniffer): Likewise.
12827
12828 2018-03-07  Tom Tromey  <tom@tromey.com>
12829
12830         * linux-tdep.c (linux_info_proc): Update.
12831         * target.h (struct target_ops) <to_fileio_readlink>: Return
12832         optional<string>.
12833         (target_fileio_readlink): Return optional<string>.
12834         * remote.c (remote_hostio_readlink): Return optional<string>.
12835         * inf-child.c (inf_child_fileio_readlink): Return
12836         optional<string>.
12837         * target.c (target_fileio_readlink): Return optional<string>.
12838
12839 2018-03-07  Andrew Burgess  <andrew.burgess@embecosm.com>
12840
12841         * regcache.c (cooked_read_test): Add riscv to the list of
12842         architectures that have a save_reggroup.
12843
12844 2018-03-07  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12845
12846         * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
12847         value is not a dynamic class object.
12848
12849 2018-03-06  Tom Tromey  <tom@tromey.com>
12850
12851         * rust-exp.y: Formatting fixes.
12852
12853 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12854
12855         * riscv-tdep.c (riscv_register_name): Remove target description
12856         support.
12857         (riscv_gdbarch_init): Remove target description check.
12858
12859 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12860
12861         * riscv-tdep.c: Remove 'Contributed by ...' lines from header
12862         comment.
12863         * riscv-tdep.h: Likewise.
12864
12865 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12866
12867         * riscv-tdep.c (riscv_pseudo_register_read): Delete.
12868         (riscv_pseudo_register_write): Delete.
12869         (riscv_gdbarch_init): Remove all use of pseudo registers.
12870
12871 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
12872
12873         * record-btrace.c (btrace_print_lines): Replace cleanup
12874         parameter with RAII equivalents.
12875         (btrace_insn_history): Replace cleanup with RAII equivalents.
12876         * ui-out.h (make_cleanup_ui_out_list_begin_end,
12877         make_cleanup_ui_out_tuple_begin_end): Remove.
12878         * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
12879         make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
12880         make_cleanup_ui_out_list_begin_end): Remove.
12881
12882 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
12883
12884         * record-btrace.c (record_btrace_maybe_mark_async_event): Change
12885         parameter types to std::vector.  Use bool.
12886         (record_btrace_wait): Replace VEC(tp_t) with
12887         std::vector<thread_info *>.
12888         * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
12889
12890 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
12891
12892         * record-btrace.c (record_btrace_disable_callback): Remove.
12893         (struct scoped_btrace_disable): New.
12894         (record_btrace_open): Use scoped_btrace_disable.
12895
12896 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12897
12898         * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
12899         reading values from registers.
12900
12901 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12902
12903         * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
12904         where appropriate.
12905
12906 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12907
12908         * riscv-tdep.c (riscv_print_arg_location): Add header comment,
12909         change parameter type.  Use GDB's print functions, and use
12910         core_addr_to_string where appropriate.
12911         (riscv_push_dummy_call): Use core_addr_to_string where
12912         appropriate, update call to riscv_print_arg_location, and reindent
12913         a few lines.
12914         (riscv_return_value): Update call to riscv_print_arg_location.
12915
12916 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12917             Tim Newsome <tim@sifive.com>
12918             Albert Ou <a0u@eecs.berkeley.edu>
12919             Darius Rad <darius@bluespec.com>
12920
12921         * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
12922         (HFILES_NO_SRCDIR): Add riscv-tdep.h.
12923         (ALLDEPFILES): Add riscv-tdep.c
12924         * configure.tgt: Add riscv support.
12925         * riscv-tdep.c: New file.
12926         * riscv-tdep.h: New file.
12927         * NEWS: Mention new target.
12928         * MAINTAINERS: Add entry for riscv.
12929
12930 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12931
12932         * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
12933         fields within aggregates.
12934
12935 2018-03-04  Simon Marchi  <simon.marchi@polymtl.ca>
12936
12937         * record-btrace.c (btrace_print_lines): Change type of flags to
12938         gdb_disassembly_flags.
12939
12940 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
12941
12942         * fbsd-nat.c: Include "inf-ptrace.h".
12943         (USE_SIGTRAP_SIGINFO): Conditionally define.
12944         [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
12945         (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
12946         [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
12947         function.
12948         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
12949         Likewise.
12950         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
12951         Likewise.
12952         (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
12953         "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
12954         "supports_stopped_by_hw_breakpoint" target methods.
12955
12956 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
12957
12958         * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
12959         * fbsd-nat.c (debug_fbsd_nat): New variable.
12960         (show_fbsd_nat_debug): New function.
12961         (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
12962         (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
12963
12964 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
12965
12966         * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
12967         * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
12968         prototype.
12969         * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
12970         (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
12971         method.
12972
12973 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
12974
12975         * common/gdb_vecs.c (free_char_ptr_vec): Remove.
12976         * common/gdb_vecs.h (free_char_ptr_vec): Remove.
12977
12978 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
12979
12980         * charset.c (struct charset_vector): New.
12981         (charsets): Change type to charset_vector.
12982         (find_charset_names): Adjust.
12983         (add_one): Adjust.
12984         (_initialize_charset): Adjust.
12985
12986 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
12987
12988         * progspace.h (struct program_space) <deleted_solibs>: Change
12989         type to std::vector<std::string>.
12990         * progspace.c (clear_program_space_solib_cache): Adjust.
12991         * breakpoint.c (print_solib_event): Adjust.
12992         (check_status_catch_solib): Adjust.
12993         * solib.c (update_solib_list): Adjust.
12994         * ui-out.h (class ui_out) <field_string>: New overload.
12995         * ui-out.c (ui_out::field_string): New overload.
12996
12997 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
12998
12999         * progspace.h (struct program_space): Add constructor and
13000         destructor, initialize fields.
13001         (add_program_space): Remove.
13002         * progspace.c (add_program_space): Rename to...
13003         (program_space::program_space): ... this.
13004         (release_program_space): Rename to...
13005         (program_space::~program_space): ... this.
13006         (delete_program_space): Use delete to delete program_space.
13007         (initialize_progspace): Use new to allocate program_space.
13008         * inferior.c (add_inferior_with_spaces): Likewise.
13009         (clone_inferior_command): Likewise.
13010         * infrun.c (follow_fork_inferior): Likewise.
13011         (handle_vfork_child_exec_or_exit): Likewise.
13012
13013 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
13014
13015         * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
13016         (delim_string_to_char_ptr_vec): Return std::vector of
13017         gdb::unique_xmalloc_ptr.
13018         (dirnames_to_char_ptr_vec_append): Take std::vector of
13019         gdb::unique_xmalloc_ptr.
13020         (dirnames_to_char_ptr_vec): Return std::vector of
13021         gdb::unique_xmalloc_ptr.
13022         * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
13023         Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
13024         (delim_string_to_char_ptr_vec): Return an std::vector of
13025         gdb::unique_xmalloc_ptr, adjust the code.
13026         (dirnames_to_char_ptr_vec_append): Take an std::vector of
13027         gdb::unique_xmalloc_ptr, adjust the code.
13028         (dirnames_to_char_ptr_vec): Return an std::vector of
13029         gdb::unique_xmalloc_ptr, adjust the code.
13030         * auto-load.c (auto_load_safe_path_vec): Change type to
13031         std::vector of gdb::unique_xmalloc_ptr.
13032         (auto_load_expand_dir_vars): Return an std::vector of
13033         gdb::unique_xmalloc_ptr, adjust the code.
13034         (auto_load_safe_path_vec_update): Adjust.
13035         (filename_is_in_auto_load_safe_path_vec): Adjust.
13036         (auto_load_objfile_script_1): Adjust.
13037         * build-id.c (build_id_to_debug_bfd): Adjust.
13038         * linux-thread-db.c (thread_db_load_search): Adjust.
13039         * source.c (add_path): Adjust.
13040         (openp): Adjust.
13041         * symfile.c (find_separate_debug_file): Adjust.
13042         * utils.c (do_free_char_ptr_vec): Remove.
13043         (make_cleanup_free_char_ptr_vec): Remove.
13044
13045 2018-03-01  Sergio Durigan Junior  <sergiodj@redhat.com>
13046
13047         PR gdb/22907
13048         * common/pathstuff.c: Conditionally include "<windows.h>".
13049
13050 2018-03-01  Georg Sauthoff  <mail@georg.so>
13051
13052         PR gdb/22888
13053         * gcore.in: Quote variables and switch interpreter to bash.
13054
13055 2018-03-01  Tom Tromey  <tom@tromey.com>
13056
13057         * dwarf2read.c (alloc_discriminant_info): Fix default_index
13058         assertion.  Add assertion for discriminant_index.
13059         (quirk_rust_enum): Use correct base type name in univariant case.
13060
13061 2018-03-01  Simon Marchi  <simon.marchi@ericsson.com>
13062
13063         * record.c (get_call_history_modifiers): Return a
13064         record_print_flags.
13065         (cmd_record_call_history): Adjust.
13066         * record-btrace.c (record_btrace_call_history): Adjust.
13067         (record_btrace_call_history_range): Adjust.
13068         (record_btrace_call_history_from): Adjust.
13069         * target-debug.h (target_debug_print_record_print_flags): New.
13070         * target-delegates.c: Re-generate.
13071         * target.c (target_call_history): Change flags type.
13072         (target_call_history_from): Likewise.
13073         (target_call_history_range): Likewise.
13074         * target.h (struct target_ops) <target_call_history>: Likewise.
13075         (target_call_history_from): Likewise.
13076         (target_call_history_range): Likewise.
13077
13078 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
13079             Simon Marchi  <simon.marchi@polymtl.ca>
13080
13081         * common/common-utils.c: Include "sys/stat.h".
13082         (is_regular_file): Move here from "source.c"; change return
13083         type to "bool".
13084         * common/common-utils.h (is_regular_file): New prototype.
13085         * common/pathstuff.c (contains_dir_separator): New function.
13086         * common/pathstuff.h (contains_dir_separator): New prototype.
13087         * source.c: Don't include "sys/stat.h".
13088         (is_regular_file): Move to "common/common-utils.c".
13089
13090 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
13091
13092         * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
13093         (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
13094         * auto-load.c: Include "common/pathstuff.h".
13095         * common/common-def.h (current_directory): Move here.
13096         * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
13097         function.
13098         * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
13099         prototype.
13100         * common/pathstuff.c: New file.
13101         * common/pathstuff.h: New file.
13102         * compile/compile.c: Include "common/pathstuff.h".
13103         * defs.h (current_directory): Move to "common/common-defs.h".
13104         * dwarf2read.c: Include "common/pathstuff.h".
13105         * exec.c: Likewise.
13106         * guile/scm-safe-call.c: Likewise.
13107         * linux-thread-db.c: Likewise.
13108         * main.c: Likewise.
13109         * nto-tdep.c: Likewise.
13110         * objfiles.c: Likewise.
13111         * source.c: Likewise.
13112         * symtab.c: Likewise.
13113         * utils.c: Include "common/pathstuff.h".
13114         (gdb_realpath): Move to "common/pathstuff.c".
13115         (gdb_realpath_keepfile): Likewise.
13116         (gdb_abspath): Likewise.
13117         * utils.h (gdb_realpath): Move to "common/pathstuff.h".
13118         (gdb_realpath_keepfile): Likewise.
13119         (gdb_abspath): Likewise.
13120
13121 2018-02-28  John Baldwin  <jhb@FreeBSD.org>
13122
13123         * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
13124         wildcard process pid for super_resume for kernels with a
13125         specific bug.
13126
13127 2018-02-27  Phil Muldoon  <pmuldoon@redhat.com>
13128
13129         * compile/compile.c (get_args): Add additional comments
13130         explaining function.
13131
13132 2018-02-27  Simon Marchi  <simon.marchi@polymtl.ca>
13133             Tom Tromey  <tom@tromey.com>
13134
13135         * target.h (memory_write_request_s): Remove typedef.  Don't define
13136         VEC.
13137         (target_write_memory_blocks): Change argument to std::vector.
13138         (struct memory_write_request): Add constructor.
13139         * target-memory.c (compare_block_starting_address): Return bool.
13140         Change argument types.
13141         (claim_memory): Change arguments to use std::vector.
13142         (split_regular_and_flash_blocks, blocks_to_erase)
13143         (compute_garbled_blocks): Likewise.
13144         (cleanup_request_data, cleanup_write_requests_vector): Remove.
13145         (target_write_memory_blocks): Change argument to std::vector.
13146         * symfile.c (struct load_section_data): Add constructor and
13147         destructor.  Use std::vector for "requests".
13148         (struct load_progress_data): Add initializers.
13149         (load_section_callback): Update.  Use "new".
13150         (clear_memory_write_data): Remove.
13151         (generic_load): Update.
13152
13153 2018-02-27  Alan Hayward  <alan.hayward@arm.com>
13154
13155         * arch/aarch64.h: Use common/tdesc.h.
13156
13157 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
13158
13159         * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
13160         architecture with a 64-bit ABI.
13161
13162 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
13163
13164         * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
13165         ahead of target description loading.
13166
13167 2018-02-26  Tom Tromey  <tom@tromey.com>
13168
13169         * stack.c (backtrace_command_1): Update.
13170         * python/python-internal.h (gdbpy_apply_frame_filter): Change type
13171         of "flags".
13172         * python/py-framefilter.c (py_print_frame)
13173         (gdbpy_apply_frame_filter): Change type of "flags".
13174         * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
13175         of "flags".
13176         (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
13177         (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
13178         * extension.h (enum frame_filter_flag): Rename from
13179         frame_filter_flags.
13180         (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
13181         (apply_ext_lang_frame_filter): Change type of "flags".
13182         * extension.c (apply_ext_lang_frame_filter): Change type of
13183         "flags".
13184         * extension-priv.h (struct extension_language_ops)
13185         <apply_frame_filter>: Change type of "flags".
13186
13187 2018-02-26  Tom Tromey  <tom@tromey.com>
13188
13189         PR python/16497:
13190         * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag.  Fix
13191         off-by-one in py_end computation.
13192         * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
13193         PRINT_MORE_FRAMES.
13194         * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
13195         constant.
13196
13197 2018-02-26  Tom Tromey  <tom@tromey.com>
13198
13199         * dwarf2read.c (struct variant_field): New.
13200         (struct nextfield) <variant>: New field.
13201         (dwarf2_add_field): Handle DW_TAG_variant_part.
13202         (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
13203         discriminated union.
13204         (read_structure_type): Handle DW_TAG_variant_part.
13205         (handle_struct_member_die): New function, extracted from
13206         process_structure_scope.  Handle DW_TAG_variant.
13207         (process_structure_scope): Handle discriminated unions.  Call
13208         handle_struct_member_die.
13209
13210 2018-02-26  Tom Tromey  <tom@tromey.com>
13211
13212         * rust-lang.h (rust_last_path_segment): Declare.
13213         * rust-lang.c (rust_last_path_segment): Now public.  Change
13214         contract.
13215         (struct disr_info): Remove.
13216         (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
13217         (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
13218         (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
13219         (rust_enum_p, rust_enum_variant): New function.
13220         (rust_underscore_fields): Remove "offset" parameter.
13221         (rust_print_enum): New function.
13222         (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
13223         <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
13224         (rust_print_struct_def): Add "for_rust_enum" parameter.  Handle
13225         enums.
13226         (rust_internal_print_type): New function, from rust_print_type.
13227         Remove enum code.
13228         (rust_print_type): Call rust_internal_print_type.
13229         (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
13230         Update enum handling.
13231         * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
13232         (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
13233         (rust_union_quirks): New functions.
13234         (process_full_comp_unit, process_full_type_unit): Call
13235         rust_union_quirks.
13236         (process_structure_scope): Update rust_unions if necessary.
13237
13238 2018-02-26  Tom Tromey  <tom@tromey.com>
13239
13240         * value.h (value_union_variant): Declare.
13241         * valops.c (value_union_variant): New function.
13242         * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
13243         (struct discriminant_info): New.
13244         (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
13245         enumerator.
13246         (struct main_type) <flag_discriminated_union>: New field.
13247
13248 2018-02-26  Tom Tromey  <tom@tromey.com>
13249
13250         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13251         unittests/unpack-selftests.c.
13252         * unittests/unpack-selftests.c: New file.
13253         * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
13254
13255 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13256
13257         * dwarf2read.c (struct partial_die_info) <read>: New method.
13258         (read_partial_die): Remove the declaration.
13259         (load_partial_dies): Update.
13260         (partial_die_info::partial_die_info):
13261         (read_partial_die): Change it to partial_die_info::read.
13262
13263 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13264
13265         * dwarf2read.c (struct partial_die_info) <fixup>: New method.
13266         (fixup_partial_die): Remove declaration.
13267         (scan_partial_symbols): Update.
13268         (partial_die_parent_scope): Likewise.
13269         (partial_die_full_name): Likewise.
13270         (fixup_partial_die): Change it to partial_die_info::fixup.
13271
13272 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13273
13274         * dwarf2read.c (read_partial_die): Update the declaration.
13275         (load_partial_dies): Caller update.
13276         (read_partial_die): Remove one argument abbrev_len.
13277
13278 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13279
13280         * dwarf2read.c (struct partial_die_info): Add ctor, delete
13281         assignment operator.
13282         (load_partial_dies): Use ctor and copy ctor.
13283         (read_partial_die): Update.
13284         (dwarf2_cu::find_partial_die): Use ctor.
13285
13286 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13287
13288         * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
13289         (find_partial_die_in_comp_unit): Change it to
13290         dwarf2_cu::find_partial_die.
13291         (find_partial_die): Update.
13292
13293 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13294
13295         * dwarf2read.c (read_partial_die): Remove the code checking abbrev
13296         is NULL.
13297
13298 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13299
13300         * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
13301
13302 2018-02-26  Alan Hayward  <alan.hayward@arm.com>
13303
13304         * arch/amd64.h: Use common/tdesc.h.
13305         * arch/i386.c: Likewise.
13306         * arch/i386.h: Likewise.
13307         * arch/tic6x.c: Likewise.
13308         * arch/tdesc.h: Move file from here...
13309         * common/tdesc.h: ...to here.
13310         * features/aarch64-core.c: Regenerate.
13311         * features/aarch64-fpu.c: Regenerate.
13312         * features/i386/32bit-avx.c: Regenerate.
13313         * features/i386/32bit-avx512.c: Regenerate.
13314         * features/i386/32bit-core.c: Regenerate.
13315         * features/i386/32bit-linux.c: Regenerate.
13316         * features/i386/32bit-mpx.c: Regenerate.
13317         * features/i386/32bit-pkeys.c: Regenerate.
13318         * features/i386/32bit-sse.c: Regenerate.
13319         * features/i386/64bit-avx.c: Regenerate.
13320         * features/i386/64bit-avx512.c: Regenerate.
13321         * features/i386/64bit-core.c: Regenerate.
13322         * features/i386/64bit-linux.c: Regenerate.
13323         * features/i386/64bit-mpx.c: Regenerate.
13324         * features/i386/64bit-pkeys.c: Regenerate.
13325         * features/i386/64bit-segments.c: Regenerate.
13326         * features/i386/64bit-sse.c: Regenerate.
13327         * features/i386/x32-core.c: Regenerate.
13328         * features/tic6x-c6xp.c: Regenerate.
13329         * features/tic6x-core.c: Regenerate.
13330         * features/tic6x-gp.c: Regenerate.
13331         * target-descriptions.c: Use common/tdesc.h.
13332         * target-descriptions.h: Likewise.
13333
13334 2018-02-24  Tom Tromey  <tom@tromey.com>
13335
13336         * linux-thread-db.c (try_thread_db_load_from_pdir_1)
13337         (try_thread_db_load_from_dir, thread_db_load_search): Use
13338         std::string.
13339         (info_auto_load_libthread_db_compare): Return bool.  Change
13340         argument types.
13341         (info_auto_load_libthread_db): Use std::vector, std::string.
13342         Remove cleanups.
13343
13344 2018-02-24  Tom Tromey  <tom@tromey.com>
13345
13346         * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
13347         std::string.
13348         * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
13349         std::string*.
13350         * gdbarch.c: Rebuild.
13351         * gdbarch.h: Rebuild.
13352         * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
13353         * arch-utils.h (default_fast_tracepoint_valid_at): Update.
13354         * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
13355         std::string*.
13356
13357 2018-02-23  Simon Marchi  <simon.marchi@polymtl.ca>
13358
13359         * gdbtypes.h (sect_offset): Change type to uint64_t.
13360         (sect_offset_str): New function.
13361         * dwarf2read.c (create_addrmap_from_aranges): Use
13362         sect_offset_str.
13363         (error_check_comp_unit_head): Likewise.
13364         (create_debug_type_hash_table): Likewise.
13365         (read_cutu_die_from_dwo): Likewise.
13366         (init_cutu_and_read_dies): Likewise.
13367         (init_cutu_and_read_dies_no_follow): Likewise.
13368         (process_psymtab_comp_unit_reader): Likewise.
13369         (partial_die_parent_scope): Likewise.
13370         (peek_die_abbrev): Likewise.
13371         (process_queue): Likewise.
13372         (dwarf2_physname): Likewise.
13373         (read_namespace_alias): Likewise.
13374         (read_import_statement): Likewise.
13375         (create_dwo_cu_reader): Likewise.
13376         (create_cus_hash_table): Likewise.
13377         (lookup_dwo_cutu): Likewise.
13378         (inherit_abstract_dies): Likewise.
13379         (read_func_scope): Likewise.
13380         (read_call_site_scope): Likewise.
13381         (dwarf2_add_member_fn): Likewise.
13382         (read_common_block): Likewise.
13383         (read_module_type): Likewise.
13384         (read_typedef): Likewise.
13385         (read_subrange_type): Likewise.
13386         (load_partial_dies): Likewise.
13387         (read_partial_die): Likewise.
13388         (find_partial_die): Likewise.
13389         (read_str_index): Likewise.
13390         (dwarf2_string_attr): Likewise.
13391         (build_error_marker_type): Likewise.
13392         (lookup_die_type): Likewise.
13393         (dump_die_shallow): Likewise.
13394         (follow_die_ref): Likewise.
13395         (dwarf2_fetch_die_loc_sect_off): Likewise.
13396         (dwarf2_fetch_constant_bytes): Likewise.
13397         (follow_die_sig): Likewise.
13398         (get_signatured_type): Likewise.
13399         (get_DW_AT_signature_type): Likewise.
13400         (dwarf2_find_containing_comp_unit): Likewise.
13401         (set_die_type): Likewise.
13402
13403 2018-02-21  John Baldwin  <jhb@FreeBSD.org>
13404
13405         * arch/aarch64.c: Include "common-defs.h".
13406         * arch/amd64.c: Likewise.
13407         * arch/i386.c: Likewise.
13408
13409 2018-02-21  Tom Tromey  <tom@tromey.com>
13410
13411         * value.h: (extract_field_op): Update.
13412         * eval.c (extract_field_op): Return a const char *.
13413         * expression.h (parse_expression_for_completion): Update.
13414         * completer.c (complete_expression): Update.
13415         (add_struct_fields): Make fieldname const.
13416         * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
13417         (mark_completion_tag, parse_exp_in_context_1): Update.
13418         (parse_expression_for_completion): Change "name" to
13419         unique_xmalloc_ptr*.
13420
13421 2018-02-21  Tom Tromey  <tom@tromey.com>
13422
13423         * infcall.c (call_function_by_hand_dummy): Use std::vector.
13424
13425 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13426
13427         * avr-tdep.c (avr_read_pc): Change parameter type to
13428         readable_regcache.
13429         * gdbarch.sh (read_pc): Likewise.
13430         * gdbarch.c: Re-generated.
13431         * gdbarch.h: Re-generated.
13432         * hppa-tdep.c (hppa_read_pc): Change parameter type to
13433         readable_regcache.
13434         * ia64-tdep.c (ia64_read_pc): Likewise.
13435         * mips-tdep.c (mips_read_pc): Likewise.
13436         * spu-tdep.c (spu_read_pc): Likewise.
13437
13438 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13439
13440         * Makefile.in (COMMON_SFILES): Add regcache-dump.c
13441         * regcache-dump.c: New file.
13442         * regcache.c: Move register_dump to regcache-dump.c.
13443         (maintenance_print_registers): Likewise.
13444         (maintenance_print_raw_registers): Likewise.
13445         (maintenance_print_cooked_registers): Likewise.
13446         (maintenance_print_register_groups): Likewise.
13447         (maintenance_print_remote_registers): Likewise.
13448         (_initialize_regcache): Likewise.
13449         * regcache.h (register_dump): Moved from regcache.c.
13450
13451 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13452
13453         * regcache.c (regcache::regcache): Update.
13454         (regcache::invalidate): Move it to detached_regcache::invalidate.
13455         (get_thread_arch_aspace_regcache): Update.
13456         (regcache::raw_update): Update.
13457         (regcache::cooked_read): Remove some code.
13458         (regcache::cooked_read_value): Likewise.
13459         (regcache::raw_write): Remove assert on m_readonly_p.
13460         (regcache::raw_supply_integer): Move it to
13461         detached_regcache::raw_supply_integer.
13462         (regcache::raw_supply_zeroed): Likewise.
13463         * regcache.h (detached_regcache) <raw_supply_integer>: New
13464         declaration.
13465         <raw_supply_zeroed, invalidate>: Likewise.
13466         (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
13467         <invalidate>: Likewise.
13468         <m_readonly_p>: Removed.
13469
13470 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13471
13472         * infcmd.c (get_return_value): Let stop_regs point to
13473         get_current_regcache.
13474         * regcache.c (regcache::regcache): Remove.
13475         (register_dump_reg_buffer): New class.
13476         (regcache_print): Adjust.
13477         * regcache.h (regcache): Remove constructors.
13478
13479 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13480
13481         * regcache.c (class register_dump): New class.
13482         (register_dump_regcache, register_dump_none): New class.
13483         (register_dump_remote, register_dump_groups): New class.
13484         (regcache_print): Update.
13485         * regcache.h (regcache_dump_what): Move it to regcache.c.
13486         (regcache) <dump>: Remove.
13487
13488 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13489
13490         * jit.c (struct jit_unwind_private) <regcache>: Change its type to
13491          reg_buffer_rw *.
13492         (jit_unwind_reg_set_impl): Call raw_supply.
13493         (jit_frame_sniffer): Use reg_buffer_rw.
13494         * record-full.c (record_full_core_regbuf): Change its type.
13495         (record_full_core_open_1): Use reg_buffer_rw.
13496         (record_full_close): Likewise.
13497         (record_full_core_fetch_registers): Use regcache->raw_supply.
13498         (record_full_core_store_registers): Likewise.
13499         * regcache.c (regcache::get_register_status): Move it to
13500         reg_buffer.
13501         (regcache_raw_set_cached_value): Remove.
13502         (regcache::raw_set_cached_value): Remove.
13503         (regcache::raw_write): Call raw_supply.
13504         (regcache::raw_supply): Move it to reg_buffer_rw.
13505         * regcache.h (regcache_raw_set_cached_value): Remove.
13506         (reg_buffer_rw): New class.
13507
13508 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13509
13510         * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
13511         readonly_detached_regcache.
13512         (dummy_frame_prev_register): Use regcache->cooked_read.
13513         * frame.c (frame_save_as_regcache): Change return type.
13514         (frame_pop): Update.
13515         * frame.h (frame_save_as_regcache): Update declaration.
13516         * inferior.h (get_infcall_suspend_state_regcache): Update
13517         declaration.
13518         * infrun.c (infcall_suspend_state) <registers>: use
13519         readonly_detached_regcache.
13520         (save_infcall_suspend_state): Don't use regcache_dup.
13521         (get_infcall_suspend_state_regcache): Change return type.
13522         * linux-fork.c (struct fork_info) <savedregs>: Change to
13523         readonly_detached_regcache.
13524         <pc>: New field.
13525         (fork_save_infrun_state): Don't use regcache_dup.
13526         (info_checkpoints_command): Adjust.
13527         * mi/mi-main.c (register_changed_p): Update declaration.
13528         (mi_cmd_data_list_changed_registers): Use
13529         readonly_detached_regcache.
13530         (register_changed_p): Change parameter type to
13531         readonly_detached_regcache.
13532         * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
13533         readonly_detached_regcache.
13534         (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
13535         * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
13536         New.
13537         (regcache::save): Move it to reg_buffer.
13538         (regcache::restore): Change parameter type.
13539         (regcache_dup): Remove.
13540         * regcache.h (reg_buffer) <save>: New method.
13541         (readonly_detached_regcache): New class.
13542         * spu-tdep.c (spu2ppu_cache) <regcache>: Use
13543         readonly_detached_regcache.
13544         (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
13545
13546 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13547
13548         * frame.c (frame_save_as_regcache): Use regcache method save.
13549         (frame_pop): Use regcache method restore.
13550         * infrun.c (restore_infcall_suspend_state): Likewise.
13551         * linux-fork.c (fork_load_infrun_state): Likewise.
13552         * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
13553         save.
13554         * regcache.c (regcache_save): Remove.
13555         (regcache::restore): More asserts.
13556         (regcache_cpy): Remove.
13557         * regcache.h (regcache_save): Remove the declaration.
13558         (regcache::restore): Move from private to public.
13559         Remove the friend declaration of regcache_cpy.
13560         (regcache_cpy): Remove declaration.
13561
13562 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13563
13564         * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
13565         parameter type to 'readable_regcache *'.
13566         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
13567         * arm-tdep.c (arm_neon_quad_read): Likewise.
13568         (arm_pseudo_read): Likewise.
13569         * avr-tdep.c (avr_pseudo_register_read): Likewise.
13570         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
13571         * frv-tdep.c (frv_pseudo_register_read): Likewise.
13572         * gdbarch.c: Re-generated.
13573         * gdbarch.h: Re-generated.
13574         * gdbarch.sh (pseudo_register_read): Change parameter type to
13575         'readable_regcache *'.
13576         (pseudo_register_read_value): Likewise.
13577         * h8300-tdep.c (pseudo_from_raw_register): Likewise.
13578         (h8300_pseudo_register_read): Likewise.
13579         * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
13580         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
13581         (i386_pseudo_register_read_into_value): Likewise.
13582         (i386_pseudo_register_read_value): Likewise.
13583         * i386-tdep.h (i386_pseudo_register_read_into_value): Update
13584         declaration.
13585         * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
13586         * m32c-tdep.c (m32c_raw_read): Likewise.
13587         (m32c_read_flg): Likewise.
13588         (m32c_banked_register): Likewise.
13589         (m32c_banked_read): Likewise.
13590         (m32c_sb_read): Likewise.
13591         (m32c_part_read): Likewise.
13592         (m32c_cat_read): Likewise.
13593         (m32c_r3r2r1r0_read): Likewise.
13594         (m32c_pseudo_register_read): Likewise.
13595         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
13596         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
13597         (mep_pseudo_cr64_read): Likewise.
13598         (mep_pseudo_register_read): Likewise.
13599         * mips-tdep.c (mips_pseudo_register_read): Likewise.
13600         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
13601         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
13602         * regcache.c (regcache::raw_read): Move it to readable_regcache.
13603         (regcache::cooked_read): Likewise.
13604         (regcache::cooked_read_value): Likewise.
13605         (regcache_cooked_read_signed):
13606         (regcache::cooked_read): Likewise.
13607         * regcache.h (readable_regcache): New class.
13608         (regcache): Inherit readable_regcache.  Move some methods to
13609         readable_regcache.
13610         * rl78-tdep.c (rl78_pseudo_register_read): Change
13611         parameter type to 'readable_regcache *'.
13612         * rs6000-tdep.c (do_regcache_raw_read): Remove.
13613         (e500_pseudo_register_read): Change parameter type to
13614         'readable_regcache *'.
13615         (dfp_pseudo_register_read): Likewise.
13616         (vsx_pseudo_register_read): Likewise.
13617         (efpr_pseudo_register_read): Likewise.
13618         * s390-tdep.c (s390_pseudo_register_read): Likewise.
13619         * sh-tdep.c (sh_pseudo_register_read): Likewise.
13620         * sh64-tdep.c (pseudo_register_read_portions): Likewise.
13621         (sh64_pseudo_register_read): Likewise.
13622         * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
13623         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
13624         * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
13625         (spu_pseudo_register_read): Likewise.
13626         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
13627         (xtensa_pseudo_register_read): Likewise.
13628
13629 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13630
13631         * regcache.c (regcache::regcache): Call reg_buffer ctor.
13632         (regcache::arch): Move it to reg_buffer::arch.
13633         (regcache::register_buffer): Likewise.
13634         (regcache::assert_regnum): Likewise.
13635         (regcache::num_raw_registers): Likewise.
13636         * regcache.h (reg_buffer): New class.
13637         (regcache): Inherit reg_buffer.
13638
13639 2018-02-20  Simon Marchi  <simon.marchi@ericsson.com>
13640
13641         * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
13642         gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
13643
13644 2018-02-20  Markus Metzger  <markus.t.metzger@intel.com>
13645
13646         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
13647
13648 2018-02-19  Alan Hayward  <alan.hayward@arm.com>
13649
13650         * Makefile.in: (COMMON_SFILES): Add common/*.c files.
13651         (SFILES): Remove common/*.c files.
13652         (COMMON_OBS): Remove some *.o files built from common/*.c files.
13653         * common/common.host: Add common reference.
13654         * configure.ac: Likewise.
13655         * configure: Regenerate.
13656
13657 2018-02-16  Yao Qi  <yao.qi@linaro.org>
13658
13659         * block.c (block_namespace_info): Inherit allocate_on_obstack.
13660         (block_initialize_namespace): Use new.
13661         * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
13662         (dwarf2_free_objfile): Use delete.
13663         * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
13664         (copy_type_recursive): Use new.
13665         * gdb_obstack.h (allocate_on_obstack): New.
13666
13667 2018-02-15  Yao Qi  <yao.qi@linaro.org>
13668
13669         PR gdb/22849
13670         * inferior.c (exit_inferior_1): Reset inf->control.
13671
13672 2018-02-15  Joel Brobecker  <brobecker@adacore.com>
13673
13674         * ada-lang.c (ada_to_fixed_value_create): Delete advance
13675         declaration.
13676
13677 2018-02-14  Pedro Alves  <palves@redhat.com>
13678
13679         * frame-unwind.c (frame_unwind_try_unwinder): Always call
13680         frame_cleanup_after_sniffer on exception.
13681
13682 2018-02-14  Tom Tromey  <tom@tromey.com>
13683
13684         * solist.h (struct target_so_ops) <bfd_open>: Make pathname
13685         const.
13686         (solib_bfd_open): Make pathname const.
13687         * solib.c (solib_bfd_open): Make pathname const.
13688         * solib-spu.c (spu_bfd_fopen): Make name const.
13689         (spu_bfd_open): Make pathname const.
13690         * solib-darwin.c (darwin_bfd_open): Make pathname const.
13691         * solib-aix.c (solib_aix_bfd_open): Make pathname const.
13692
13693 2018-02-14  Tom Tromey  <tom@tromey.com>
13694
13695         * symfile.c (symfile_bfd_open): Update.
13696         * source.h (openp, source_full_path_of, find_and_open_source):
13697         Change argument type to unique_xmalloc_ptr.
13698         * source.c (openp): Take a unique_xmalloc_ptr.
13699         (source_full_path_of, find_and_open_source): Likewise.
13700         (open_source_file, symtab_to_fullname): Update.
13701         * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
13702         unique_xmalloc_ptr.
13703         * solib.c (solib_find_1): Use unique_xmalloc_ptr.
13704         (exec_file_find): Update.
13705         * psymtab.c (psymtab_to_fullname): Update.
13706         * nto-tdep.h (nto_find_and_open_solib): Update.
13707         * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
13708         unique_xmalloc_ptr.
13709         * exec.c (exec_file_attach): Update.
13710         * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
13711         * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
13712
13713 2018-02-14  Tom Tromey  <tom@tromey.com>
13714
13715         * solib.c: Include source.h.
13716         * nto-tdep.c: Include source.h.
13717         * mi/mi-cmd-env.c: Include source.h.
13718         * infcmd.c: Include source.h.
13719         * exec.c: Include source.h.
13720         * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
13721         (add_path, directory_switch, source_path, init_source_path): Move
13722         declarations...
13723         * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
13724         (add_path, directory_switch, source_path, init_source_path):
13725         ...here.
13726
13727 2018-02-14  Tom Tromey  <tom@tromey.com>
13728
13729         * solist.h (exec_file_find, solib_find): Return
13730         unique_xmalloc_ptr.
13731         (solib_bfd_fopen): Take a const char *.
13732         * solib.c (solib_find_1): Return unique_xmalloc_ptr.
13733         (exec_file_find, solib_find): Likewise.
13734         (solib_bfd_fopen): Do not take ownership of "pathname".
13735         (solib_bfd_open): Use unique_xmalloc_ptr.
13736         * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
13737         * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
13738         * infrun.c (follow_exec): Use unique_xmalloc_ptr.
13739         * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
13740
13741 2018-02-14  Joel Brobecker  <brobecker@adacore.com>
13742
13743         * ada-lang.c (name_match_type_from_name): Remove reference to
13744         ada_name_for_lookup in function's documentation.
13745         * ada-lang.h (ada_name_for_lookup): Delete declaration.
13746
13747 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
13748
13749         * defs.h (enum openp_flags): New enum.
13750         (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
13751         Move to enum openp_flags.
13752         (openp_flags): New enum flags.
13753         (openp): Change parameter type to openp_flags.
13754         * source.c (openp): Change parameter type to openp_flags.
13755         * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
13756         * dwarf2read.c (try_open_dwop_file): Use openp_flags.
13757
13758 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
13759
13760         * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
13761         per-command.
13762
13763 2018-02-12  Andrew Burgess  <andrew.burgess@embecosm.com>
13764
13765         * dwarf2read.c (dwarf2_release_queue): Delete function, move body
13766         into...
13767         (class dwarf2_queue_guard): ...the destructor of this new class.
13768         (dw2_do_instantiate_symtab): Create instance of the new class
13769         dwarf2_queue_guard, remove cleanup.
13770
13771 2018-02-09  Tom Tromey  <tom@tromey.com>
13772
13773         * source.c (find_source_lines): Don't reference past the end of
13774         the vector.
13775
13776 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13777
13778         * remote.c (remote_btrace_maybe_reopen): Change error message.
13779         * btrace.c (btrace_enable): Likewise.
13780         (parse_xml_btrace): Likewise.
13781         (parse_xml_btrace_conf): Likewise.
13782
13783 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13784
13785         * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
13786         (linux_enable_pt, linux_enable_bts): Call
13787         diagnose_perf_event_open_fail.
13788
13789 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13790
13791         * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
13792         Remove parameter and change return type.  Update callers.  Move it.
13793         (linux_enable_bts, linux_enable_pt): Improve error message.
13794         (linux_enable_pt): Remove zero buffer size check.
13795         (linux_enable_btrace): Improve error messages.  Remove NULL return
13796         check.
13797
13798 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13799
13800         * btrace.c (btrace_enable): Remove target_supports_btrace call.
13801         * nat/linux-btrace.c (perf_event_pt_event_type): Move.
13802         (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
13803         (linux_supports_pt, linux_supports_btrace): Remove.
13804         (linux_enable_bts): Call cpu_supports_bts.
13805         * nat/linux-btrace.h (linux_supports_btrace): Remove.
13806         * remote.c (remote_supports_btrace): Remove.
13807         (init_remote_ops): Remove remote_supports_btrace.
13808         * target-delegates.c: Regenerated.
13809         * target.c (target_supports_btrace): Remove.
13810         * target.h (target_ops) <to_supports_btrace>: Remove
13811         (target_supports_btrace): Remove.
13812         * x86-linux-nat.c (x86_linux_create_target): Remove
13813         linux_supports_btrace.
13814
13815 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13816
13817         * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
13818         btrace failed.
13819         * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
13820         exception and use message in own exception.
13821
13822 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13823
13824         * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
13825         (perf_event_pt_event_type): Use gdb_file_up.
13826         (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
13827         scoped_fd, and scoped_mmap.
13828
13829 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13830
13831         * common/scoped_mmap.h: New.
13832         * unittests/scoped_mmap-selftest.c: New.
13833         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13834         unittests/scoped_mmap-selftest.c.
13835
13836 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13837
13838         * common/scoped_fd.h: New.
13839         * unittests/scoped_fd-selftest.c: New.
13840         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13841         unittests/scoped_fd-selftest.c.
13842
13843 2018-02-09  Tom Tromey  <tom@tromey.com>
13844
13845         * auto-load.c (auto_load_section_scripts): Use
13846         gdb::unique_xmalloc_ptr.
13847
13848 2018-02-09  Tom Tromey  <tom@tromey.com>
13849
13850         * auto-load.c (execute_script_contents): Use std::string.
13851
13852 2018-02-09  Joel Brobecker  <brobecker@adacore.com>
13853
13854         * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
13855         Python function, rather than a new command.
13856
13857 2018-02-08  Tom Tromey  <tom@tromey.com>
13858
13859         * solib.c (solib_find_1): Use std::string.
13860         (solib_bfd_fopen): Use unique_xmalloc_ptr.
13861
13862 2018-02-08  Tom Tromey  <tom@tromey.com>
13863
13864         * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
13865
13866 2018-02-08  Tom Tromey  <tom@tromey.com>
13867
13868         * source.c (find_source_lines): Use gdb::def_vector.
13869
13870 2018-02-08  Tom Tromey  <tom@tromey.com>
13871
13872         * macrocmd.c (struct temporary_macro_definition): New.
13873         (macro_define_command): Use temporary_macro_definition.  Remove
13874         cleanups.
13875         (free_macro_definition_ptr): Remove.
13876
13877 2018-02-08  Tom Tromey  <tom@tromey.com>
13878
13879         * macroexp.c (maybe_expand): Use std::string.
13880
13881 2018-02-08  Tom Tromey  <tom@tromey.com>
13882
13883         * macroexp.c (struct macro_buffer): Add initializers for some
13884         members.
13885         (init_buffer, init_shared_buffer, free_buffer)
13886         (free_buffer_return_text): Remove.
13887         (macro_buffer): New constructors.
13888         (~macro_buffer): New destructor.
13889         (macro_buffer::set_shared): New method.
13890         (macro_buffer::resize_buffer, macro_buffer::appendc)
13891         (macro_buffer::appendmem): Now methods, not free functions.
13892         (set_token, append_tokens_without_splicing, stringify)
13893         (macro_stringify): Update.
13894         (gather_arguments): Change return type.  Remove argc_p argument,
13895         add args_ptr argument.  Use std::vector.
13896         (substitute_args): Remove argc argument.  Accept std::vector.
13897         (expand): Update.  Use std::vector.
13898         (scan, macro_expand, macro_expand_next): Update.
13899
13900 2018-02-08  Tom Tromey  <tom@tromey.com>
13901
13902         * symtab.c (default_collect_symbol_completion_matches_break_on):
13903         Use unique_xmalloc_ptr.
13904         * macroscope.h: (sal_macro_scope, user_macro_scope)
13905         (default_macro_scope): Return unique_xmalloc_ptr.
13906         * macroscope.c (sal_macro_scope, user_macro_scope)
13907         (default_macro_scope): Return unique_xmalloc_ptr.
13908         * macroexp.h (macro_expand, macro_expand_once): Return
13909         unique_xmalloc_ptr.
13910         * macroexp.c (macro_expand, macro_expand_once): Return
13911         unique_xmalloc_ptr.
13912         * macrocmd.c (macro_expand_command, macro_expand_once_command)
13913         (info_macro_command, info_macros_command): Use
13914         unique_xmalloc_ptr.
13915         * compile/compile-c-support.c (write_macro_definitions): Use
13916         unique_xmalloc_ptr.
13917         * c-exp.y (c_parse): Use unique_xmalloc_ptr.
13918
13919 2018-02-07  Simon Marchi  <simon.marchi@ericsson.com>
13920
13921         * value.c (value_static_field): Assign field type instead of
13922         containing type when returning an optimized out value.
13923
13924 2018-02-06  Yao Qi  <yao.qi@linaro.org>
13925
13926         * ft32-tdep.c (ft32_read_pc): Remove.
13927         (ft32_write_pc): Remove.
13928         (ft32_gdbarch_init): Update.
13929         * m32r-tdep.c (m32r_read_pc): Remove.
13930         (m32r_gdbarch_init): Update.
13931         * mep-tdep.c (mep_read_pc): Remove.
13932         (mep_gdbarch_init): Update.
13933         * microblaze-tdep.c (microblaze_write_pc): Remove.
13934         (microblaze_gdbarch_init): Update.
13935         * mn10300-tdep.c (mn10300_read_pc): Remove.
13936         (mn10300_write_pc): Remove.
13937         (mn10300_gdbarch_init): Update.
13938         * moxie-tdep.c (moxie_read_pc): Remove.
13939         (moxie_write_pc): Remove.
13940         (moxie_gdbarch_init): Update.
13941
13942 2018-02-06  Yao Qi  <yao.qi@linaro.org>
13943
13944         * expprint.c (print_subexp_standard): Handle
13945         OP_F77_UNDETERMINED_ARGLIST.
13946         (dump_subexp_body_standard): Likewise.
13947
13948 2018-02-05  Alan Hayward  <alan.hayward@arm.com>
13949
13950         * target-descriptions.c (tdesc_element_visitor) Add empty
13951         implementations.
13952         (tdesc_type): Move make_gdb_type from here.
13953         (tdesc_type_builtin): Likewise.
13954         (tdesc_type_vector): Likewise.
13955         (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
13956         (make_gdb_type_struct): Move from tdesc_type_with_fields.
13957         (make_gdb_type_union): Likewise.
13958         (make_gdb_type_flags): Likewise.
13959         (make_gdb_type_enum): Likewise.
13960         (make_gdb_type): New function.
13961         (tdesc_register_type): Use static make_gdb_type.
13962
13963 2018-02-05  Ruslan Kabatsayev <b7.10110111@gmail.com>
13964
13965         * infcmd.c (default_print_one_register_info): Align natural-format
13966         column values consistently one under another.
13967         (pad_to_column): New function.
13968
13969 2018-02-05  Joel Brobecker  <brobecker@adacore.com>
13970
13971         * dwarf2read.c (dwarf2_physname): Move commment.
13972
13973 2018-02-01  Leszek Swirski  <leszeks@google.com>
13974
13975         * varobj.c (varobj_formatted_print_options): Allow recursive
13976         pretty printing if pretty printing is enabled.
13977
13978 2018-02-01  Leszek Swirski  <leszeks@google.com>
13979
13980         * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
13981         names after a structop as a filename.
13982
13983 2018-02-01  Yao Qi  <yao.qi@linaro.org>
13984
13985         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
13986         (arm_record_coproc_data_proc): Likewise.
13987
13988 2018-02-01  Yao Qi  <yao.qi@linaro.org>
13989
13990         * arm-tdep.c (arm_record_extension_space): Change ret to signed.
13991
13992 2018-01-31  Nikola Prica  <nikola.prica@rt-rk.com>
13993
13994         * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
13995         assign shifted lr_reg to fdata->lr_register when lr_reg is set.
13996
13997 2018-01-31  Pedro Alves  <palves@redhat.com>
13998
13999         * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
14000         * inflow.c (child_terminal_save_inferior): Wrap reference to
14001         tcgetpgrp in HAVE_TERMIOS_H.
14002         (child_interrupt, child_pass_ctrlc): Wrap references to signal in
14003         _WIN32.
14004         * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
14005         always iterate over all inferiors.
14006         (gdbsim_cntrl_c): Adjust.
14007         * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
14008
14009 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
14010
14011         * gdbtypes.c (lookup_array_range_type): Make sure the array's
14012         index type is objfile-owned if the element type is as well.
14013
14014 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
14015
14016         GDB 8.1 released.
14017
14018 2018-01-30  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14019
14020         * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
14021         "features/s390x-linux64.c".
14022         (_initialize_s390_linux_tdep): Remove initialization of tdescs
14023         s390_linux32 and s390x_linux64.
14024         (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
14025         default tdesc.
14026         * s390-tdep.c: Include "features/s390-linux32.c" and
14027         "features/s390x-linux64.c".
14028         (s390_tdesc_valid): Add check for tdesc_has_registers.
14029         (s390_gdbarch_init): Make sure there is always a valid tdesc.
14030         (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
14031         tdesc_s390x_linux64.
14032         * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
14033         tdesc_s390x_linux64 to...
14034         * s390-tdep.h: ...here.
14035
14036 2018-01-30  Pedro Alves  <palves@redhat.com>
14037
14038         PR gdb/13211
14039         * config.in, configure: Regenerate.
14040         * configure.ac: Check for getpgid.
14041         * go32-nat.c (go32_pass_ctrlc): New.
14042         (go32_target): Install it.
14043         * inf-child.c (inf_child_target): Install
14044         child_terminal_save_inferior, child_pass_ctrlc and
14045         child_interrupt.
14046         * inf-ptrace.c (inf_ptrace_interrupt): Delete.
14047         (inf_ptrace_target): No longer install it.
14048         * infcmd.c (interrupt_target_1): Adjust.
14049         * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
14050         (child_interrupt): Declare.
14051         (inferior::terminal_state): New.
14052         * inflow.c (struct terminal_info): Update comments.
14053         (inferior_process_group): Delete.
14054         (terminal_is_ours): Delete.
14055         (gdb_tty_state): New.
14056         (child_terminal_init): Adjust.
14057         (is_gdb_terminal, sharing_input_terminal_1)
14058         (sharing_input_terminal): New functions.
14059         (child_terminal_inferior): Adjust.  Use sharing_input_terminal.
14060         Set the process's actual process group in the foreground if
14061         possible.  Handle is_ours_for_output/is_ours distinction.  Don't
14062         mark terminal as the inferior's if not sharing GDB's terminal.
14063         Don't check attach_flag.
14064         (child_terminal_ours_for_output, child_terminal_ours): Adjust to
14065         pass down a target_terminal_state.
14066         (child_terminal_save_inferior): New, factored out from ...
14067         (child_terminal_ours_1): ... this.  Handle
14068         target_terminal_state::is_ours_for_output.
14069         (child_interrupt, child_pass_ctrlc): New.
14070         (inflow_inferior_exit): Clear the inferior's terminal_state.
14071         (copy_terminal_info): Copy the inferior's terminal state.
14072         (_initialize_inflow): Remove reference to terminal_is_ours.
14073         * inflow.h (inferior_process_group): Delete.
14074         * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
14075         * procfs.c (procfs_target): Don't install procfs_interrupt.
14076         (procfs_interrupt): Delete.
14077         * remote.c (remote_serial_quit_handler): Adjust.
14078         (remote_interrupt): Remove ptid parameter.  Adjust.
14079         * target-delegates.c: Regenerate.
14080         * target.c: Include "terminal.h".
14081         (target_terminal::terminal_state): Rename to ...
14082         (target_terminal::m_terminal_state): ... this.
14083         (target_terminal::init): Adjust.
14084         (target_terminal::inferior): Adjust to per-inferior
14085         terminal_state.
14086         (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
14087         (target_terminal::ours, target_terminal::ours_for_output): Use
14088         target_terminal_is_ours_kind.
14089         (target_interrupt): Remove ptid parameter.  Adjust.
14090         (default_target_pass_ctrlc): Adjust.
14091         * target.h (target_ops::to_terminal_save_inferior): New field.
14092         (target_ops::to_interrupt): Remove ptid_t parameter.
14093         (target_interrupt): Remove ptid_t parameter.  Update comment.
14094         (target_pass_ctrlc): Update comment.
14095         * target/target.h (target_terminal_state): New scoped enum,
14096         factored out of ...
14097         (target_terminal::terminal_state): ... here.
14098         (target_terminal::inferior): Update comments.
14099         (target_terminal::restore_inferior): New.
14100         (target_terminal::is_inferior, target_terminal::is_ours)
14101         (target_terminal::is_ours_for_output): Adjust.
14102         (target_terminal::scoped_restore_terminal_state): Adjust to
14103         rename, and call restore_inferior() instead of inferior().
14104         (target_terminal::scoped_restore_terminal_state::m_state): Change
14105         type.
14106         (target_terminal::terminal_state): Rename to ...
14107         (target_terminal::m_terminal_state): ... this and change type.
14108
14109 2018-01-30  Pedro Alves  <palves@redhat.com>
14110
14111         * linux-nat.c (wait_for_signal): New function.
14112         (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
14113         directly.
14114         (async_terminal_is_ours)
14115         (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
14116         (linux_nat_add_target): Don't override
14117         to_terminal_inferior/to_terminal_ours.
14118
14119 2018-01-29  Sergio Durigan Junior  <sergiodj@redhat.com>
14120
14121         * remote.c (remote_follow_fork): Don't call "detach_inferior".
14122
14123 2018-01-28  Simon Marchi  <simon.marchi@ericsson.com>
14124
14125         * dwarf2read.c (free_dwo_files): Add forward-declaration.
14126         (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
14127         dwarf2_per_objfile_free here.
14128         (dwarf2_per_objfile_free): Remove.
14129         (_initialize_dwarf2_read): Don't register
14130         dwarf2_per_objfile_free as a registry cleanup.
14131
14132 2018-01-27  Eli Zaretskii  <eliz@gnu.org>
14133
14134         Avoid compilation errors in MinGW native builds
14135
14136         The error is triggered by including python-internal.h, and the
14137         error message is:
14138
14139              In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
14140                       from build-gnulib/import/math.h:27,
14141                       from d:/usr/Python26/include/pyport.h:235,
14142                       from d:/usr/Python26/include/Python.h:58,
14143                       from python/python-internal.h:94,
14144                       from python/py-arch.c:24:
14145              d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
14146         using ::hypot;
14147                 ^~~~~
14148
14149         This happens because Python headers define 'hypot' to expand t
14150         '_hypot' in the Windows builds.
14151         * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
14152         'hypoth'.  This avoids a compilation error.
14153
14154 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
14155
14156         * MAINTAINERS (Write After Approval): Fix ordering.
14157
14158 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
14159
14160         * MAINTAINERS (Write After Approval): Add Alan Hayward.
14161
14162 2018-01-26  Alan Modra  <amodra@gmail.com>
14163
14164         * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
14165         (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
14166         Remove nop.  Make const.  Comment.
14167         (powerpc32_plt_stub_so_2): New.
14168         (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
14169         Correct count.  Update uses.
14170         (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
14171         Move common code reading PLT entry word.  Correct
14172         powerpc32_plt_stub PLT address calculation.
14173         * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
14174         (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
14175         (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
14176         (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
14177         (ppc64_standard_linkage8): Likewise.
14178         * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
14179         Correct insns description.
14180         * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
14181
14182 2018-01-24  Pedro Alves  <palves@redhat.com>
14183
14184         GCC PR libstdc++/83906
14185         * gdbtypes.c (operator==(const dynamic_prop &,
14186         const dynamic_prop &)): New.
14187         (operator==(const range_bounds &, const range_bounds &)): New.
14188         (check_types_equal): Use them instead of memcmp.
14189         * gdbtypes.h (operator==(const dynamic_prop &,
14190         const dynamic_prop &)): Declare.
14191         (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
14192         (operator==(const range_bounds &, const range_bounds &)): Declare.
14193         (operator!=(const range_bounds &, const range_bounds &)): Declare.
14194
14195 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14196
14197         * s390-linux-tdep.c (s390_record_address_mask)
14198         (s390_record_calc_disp_common, s390_record_calc_disp)
14199         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
14200         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
14201         (s390_process_record): Move to s390-tdep.c.
14202         (s390_linux_init_abi_any): Adjust.
14203         * s390-tdep.c (s390_record_address_mask)
14204         (s390_record_calc_disp_common, s390_record_calc_disp)
14205         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
14206         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
14207         (s390_process_record): Moved from s390-linux-tdep.c
14208         (s390_gdbarch_init): Adjust.
14209
14210 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14211
14212         * s390-linux-nat.c (s390-tdep.h): New include.
14213         * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
14214         (HFILES_NO_SRCDIR): Add s390-tdep.h.
14215         (ALLDEPFILES): Add s390-tdep.c.
14216         * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
14217         * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
14218         * s390-tdep.h: ...this.  New file.
14219         * s390-linux-tdep.c (s390-tdep.h): New include.
14220         (_initialize_s390_tdep): Rename to...
14221         (_initialize_s390_linux_tdep): ...this and adjust.
14222         (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
14223         (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
14224         s390-tdep.h.
14225         (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
14226         (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
14227         (s390_is_partial_instruction, s390_software_single_step)
14228         (is_non_branch_ril, s390_displaced_step_copy_insn)
14229         (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
14230         (s390_prologue_data, s390_addr, s390_store, s390_load)
14231         (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
14232         (s390_register_call_saved, s390_guess_tracepoint_registers)
14233         (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
14234         (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
14235         (s390_pseudo_register_name, s390_pseudo_register_type)
14236         (s390_pseudo_register_read, s390_pseudo_register_write)
14237         (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
14238         (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
14239         (s390_addr_bits_remove, s390_address_class_type_flags)
14240         (s390_address_class_type_flags_to_name)
14241         (s390_address_class_name_to_type_flags, s390_effective_inner_type)
14242         (s390_function_arg_float, s390_function_arg_vector)
14243         (is_power_of_two, s390_function_arg_integer, s390_arg_state)
14244         (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
14245         (s390_frame_align, s390_register_return_value, s390_return_value)
14246         (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
14247         (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
14248         (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
14249         (s390_trad_frame_prev_register, s390_unwind_cache)
14250         (s390_prologue_frame_unwind_cache)
14251         (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
14252         (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
14253         (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
14254         (s390_stub_frame_this_id, s390_stub_frame_prev_register)
14255         (s390_stub_frame_sniffer, s390_stub_frame_unwind)
14256         (s390_frame_base_address, s390_local_base_address)
14257         (s390_frame_base, s390_gcc_target_options)
14258         (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
14259         (s390_validate_reg_range, s390_tdesc_valid)
14260         (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
14261         * s390-tdep.c: ...this.  New file.
14262
14263 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14264
14265         * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
14266         (s390_process_record, s390_gdbarch_tdep_alloc)
14267         (s390_linux_init_abi_any): Use/set new hook.
14268
14269 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14270
14271         * s390-linux-tdep.c (osabi.h): New include.
14272         (s390_linux_init_abi_31, s390_linux_init_abi_64)
14273         (s390_linux_init_abi_any): New functions.
14274         (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
14275
14276 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14277
14278         * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
14279         tdesc_has_registers check
14280
14281 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14282
14283         * s390-linux-tdep.c (s390_tdesc_valid): New function.
14284         (s390_validate_reg_range): New macro.
14285         (s390_gdbarch_init): Adjust.
14286
14287 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14288
14289         * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
14290         (s390_gdbarch_tdep_alloc): Adjust.
14291         (s390_gdbarch_init): Adjust.
14292
14293 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14294
14295         * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
14296         <have_tdb>: Change type to bool.
14297         (s390_gdbarch_tdep_alloc): Adjust.
14298         (s390_gdbarch_init): Adjust.
14299
14300 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14301
14302         * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
14303         (gdbarch_tdep) <have_upper, have_vx>: New fields.
14304         (s390_gdbarch_tdep_alloc): New function.
14305         (s390_gdbarch_init): Allocate tdep at start and use its fields
14306         instead of separate variables.
14307
14308 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14309
14310         * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
14311         when looking for cached gdbarch and add comment for remaining.
14312
14313 2018-01-22  Pedro Alves  <palves@redhat.com>
14314             Sergio Durigan Junior  <sergiodj@redhat.com>
14315
14316         * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
14317         case.
14318
14319 2018-01-22  Maciej W. Rozycki  <macro@mips.com>
14320
14321         * MAINTAINERS: Update my company e-mail address.
14322
14323 2018-01-22  Yao Qi  <yao.qi@linaro.org>
14324
14325         * regcache.c (cooked_write_test): New function.
14326         (_initialize_regcache): Register the test.
14327
14328 2018-01-22  Yao Qi  <yao.qi@linaro.org>
14329
14330         * ia64-tdep.c (ia64_pseudo_register_read): Call
14331         regcache->cooked_read instead of regcache_cooked_read_unsigned.
14332         * m32c-tdep.c (m32c_cat_read): Likewise.
14333         (m32c_r3r2r1r0_read): Likewise.
14334         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
14335         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
14336
14337 2018-01-22  Yao Qi  <yao.qi@linaro.org>
14338
14339         * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
14340         method raw_read instead of regcache_raw_read.
14341         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
14342         * arm-tdep.c (arm_neon_quad_read): Likewise.
14343         * avr-tdep.c (avr_pseudo_register_read): Likewise.
14344         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
14345         * frv-tdep.c (frv_pseudo_register_read): Likewise.
14346         * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
14347         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
14348         (i386_pseudo_register_read_into_value): Likewise.
14349         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
14350         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
14351         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
14352         * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
14353         * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
14354         * sparc-tdep.c (sparc32_pseudo_register_read):  Likewise.
14355         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
14356         * spu-tdep.c (spu_pseudo_register_read_spu):  Likewise.
14357         * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
14358
14359 2018-01-22  Yao Qi  <yao.qi@linaro.org>
14360
14361         * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
14362         * configure.tgt: Remove target mt.
14363         * mt-tdep.c: Remove.
14364         * regcache.c (cooked_read_test): Remove the check for mt.
14365
14366 2018-01-22  Yao Qi  <yao.qi@linaro.org>
14367
14368         * jit.c (jit_frame_prev_register): Call regcache::cooked_read
14369         instead of gdbarch_pseudo_register_read_value.
14370
14371 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
14372
14373         * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
14374         language is Ada.
14375
14376 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
14377
14378         * linespec.c (create_sals_line_offset): Remove code that preserved
14379         the symtab_and_line's line number.
14380
14381 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
14382
14383         * varobj.c (varobj_create): Don't set valid_block when creating a
14384         floating varobj.
14385
14386 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
14387
14388         * varobj.c (varobj_create): Remove out of date comment.
14389
14390 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
14391
14392         PR mi/20395
14393         * ada-exp.y (write_var_from_sym): Pass extra parameter when
14394         updating innermost block.
14395         * parse.c (innermost_block_tracker::update): Take extra type
14396         parameter, and check types match before updating innermost block.
14397         (write_dollar_variable): Update innermost block for registers.
14398         * parser-defs.h (enum innermost_block_tracker_type): New enum.
14399         (innermost_block_tracker::innermost_block_tracker): Initialise
14400         m_types member.
14401         (innermost_block_tracker::reset): Take type parameter.
14402         (innermost_block_tracker::update): Take type parameter, and pass
14403         type through as needed.
14404         (innermost_block_tracker::m_types): New member.
14405         * varobj.c (varobj_create): Pass type when reseting innermost
14406         block.
14407
14408 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
14409
14410         * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
14411         * ada-lang.c (resolve_subexp): Likewise.
14412         * breakpoint.c (set_breakpoint_condition) Likewise.
14413         (watch_command_1) Likewise.
14414         * c-exp.y (variable): Likewise.
14415         * d-exp.y (PrimaryExpression): Likewise.
14416         * f-exp.y (variable): Likewise.
14417         * go-exp.y (variable): Likewise.
14418         * m2-exp.y (variable): Likewise.
14419         * objfiles.c (objfile::~objfile): Likewise.
14420         * p-exp.y (variable): Likewise.
14421         * parse.c (innermost_block): Change type.
14422         * parser-defs.h (class innermost_block_tracker): New.
14423         (innermost_block): Change to innermost_block_tracker.
14424         * printcmd.c (display_command): Switch to innermost_block API.
14425         (do_one_display): Likewise.
14426         * rust-exp.y (do_one_display): Likewise.
14427         * symfile.c (clear_symtab_users): Likewise.
14428         * varobj.c (varobj_create): Switch to innermost_block API, replace
14429         use of innermost_block with block stored on varobj object.
14430
14431 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
14432
14433         * expression.h (innermost_block): Remove declaration.
14434         * varobj.c: Add 'parser-defs.h' include.
14435
14436 2018-01-19  Tom Tromey  <tom@tromey.com>
14437
14438         * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
14439         symbols in the static and global blocks.
14440
14441 2018-01-19  James Clarke  <jrtc27@jrtc27.com>
14442
14443         * nat/linux-ptrace.c: Remove unnecessary reinclusion of
14444         gdb_ptrace.h, and move including gdb_wait.h ...
14445         * nat/linux-ptrace.h: ... to here.
14446
14447 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
14448
14449         * inf-ptrace.c (inf_ptrace_detach): Adjust call to
14450         inf_ptrace_detach_success.
14451         (inf_ptrace_detach_success): Add inferior parameter, use it
14452         instead of inferior_ptid, pass it to detach_inferior.
14453         * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
14454         parameter.
14455         * inferior.c (detach_inferior): Add overload that takes an
14456         inferior object.
14457         * inferior.h (detach_inferior): Likewise.
14458         * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
14459         use inferior_ptid, adjust call to inf_ptrace_detach_success.
14460         * linux-thread-db.c (thread_db_detach): Use inf parameter.
14461
14462 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
14463
14464         * target.h (struct target_ops) <to_detach>: Add inferior
14465         parameter.
14466         (target_detach): Likewise.
14467         * target.c (dispose_inferior): Pass inferior down.
14468         (target_detach): Pass inferior down.  Assert that it is equal to
14469         the current inferior.
14470         * aix-thread.c (aix_thread_detach): Pass inferior down.
14471         * corefile.c (core_file_command): Pass current_inferior() down.
14472         * corelow.c (core_detach): Add inferior parameter.
14473         * darwin-nat.c (darwin_detach): Likewise.
14474         * gnu-nat.c (gnu_detach): Likewise.
14475         * inf-ptrace.c (inf_ptrace_detach): Likewise.
14476         * infcmd.c (detach_command): Pass current_inferior() down to
14477         target_detach.
14478         * infrun.c (follow_fork_inferior): Pass parent_inf to
14479         target_detach.
14480         (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
14481         target_detach.
14482         * linux-nat.c (linux_nat_detach): Add inferior parameter.
14483         * linux-thread-db.c (thread_db_detach): Likewise.
14484         * nto-procfs.c (procfs_detach): Likewise.
14485         * procfs.c (procfs_detach): Likewise.
14486         * record.c (record_detach): Likewise.
14487         * record.h (struct inferior): Forward-declare.
14488         (record_detach): Add inferior parameter.
14489         * remote-sim.c (gdbsim_detach): Likewise.
14490         * remote.c (remote_detach_1): Likewise.
14491         (remote_detach): Likewise.
14492         (extended_remote_detach): Likewise.
14493         * sol-thread.c (sol_thread_detach): Likewise.
14494         * target-debug.h (target_debug_print_inferior_p): New macro.
14495         * target-delegates.c: Re-generate.
14496         * top.c (kill_or_detach): Pass inferior down to target_detach.
14497         * windows-nat.c (windows_detach): Add inferior parameter.
14498
14499 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
14500
14501         * target.h (struct target_ops) <to_detach>: Remove args
14502         parameter.
14503         (target_detach): Likewise.
14504         * target.c (dispose_inferior): Adjust.
14505         (target_detach): Remove args parameter, adjust.
14506         * aix-thread.c (aix_thread_detach): Adjust.
14507         * corefile.c (core_file_command): Adjust.
14508         * corelow.c (core_detach): Adjust.
14509         * darwin-nat.c (darwin_detach): Adjust.
14510         * gnu-nat.c (gnu_detach): Adjust.
14511         * inf-ptrace.c (inf_ptrace_detach): Adjust.
14512         * infcmd.c (detach_command): Adjust
14513         * infrun.c (follow_fork_inferior): Adjust.
14514         (handle_vfork_child_exec_or_exit): Adjust.
14515         * linux-fork.c (linux_fork_detach): Remove args parameter.
14516         * linux-fork.h (linux_fork_detach): Likewise.
14517         * linux-nat.c (linux_nat_detach): Likewise, and adjust.
14518         * linux-thread-db.c (thread_db_detach): Likewise.
14519         * nto-procfs.c (procfs_detach): Likewise.
14520         * procfs.c (procfs_detach): Likewise.
14521         (do_detach): Remove signo parameter.
14522         * record.c (record_detach): Remove args parameter.
14523         * record.h (record_detach): Likewise.
14524         * remote-sim.c (gdbsim_detach): Likewise.
14525         * remote.c (remote_detach_1): Likewise.
14526         (remote_detach): Likewise.
14527         (extended_remote_detach): Likewise.
14528         * sol-thread.c (sol_thread_detach): Likewise.
14529         * target-delegates.c: Re-generate.
14530         * top.c (struct qt_args) <args>: Remove field.
14531         (kill_or_detach): Don't pass args.
14532         (quit_force): Don't set args.
14533         * windows-nat.c (windows_detach): Remove args parameter.
14534
14535 2018-01-19  Yao Qi  <yao.qi@linaro.org>
14536
14537         * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
14538         (arm_linux_init_abi): Install it.
14539
14540 2018-01-19  Yao Qi  <yao.qi@linaro.org>
14541
14542         * osabi.c (gdb_osabi_names): Extend the regexp for
14543         arm-linux-gnueabihf.
14544
14545 2018-01-18  Yao Qi  <yao.qi@linaro.org>
14546
14547         * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
14548         m_abbrevs.
14549         (abbrev_table::add_abbrev): Update.
14550         (abbrev_table::lookup_abbrev): Update.
14551
14552 2018-01-18  Yao Qi  <yao.qi@linaro.org>
14553
14554         * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
14555
14556 2018-01-17  Sergio Durigan Junior  <sergiodj@redhat.com>
14557
14558         * compile/compile.c (compile_to_object): Convert "triplet_rx"
14559         to "std::string".
14560
14561 2018-01-17  Tom Tromey  <tom@tromey.com>
14562
14563         * dwarf2read.c (symbolp): Remove typedef.  Don't instantiate VEC.
14564
14565 2018-01-17  Tom Tromey  <tom@tromey.com>
14566
14567         * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
14568         * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
14569         (create_array_type_with_stride): Update.
14570         * dwarf2read.c (set_die_type): Update.
14571
14572 2018-01-17  Tom Tromey  <tom@tromey.com>
14573
14574         * dwarf2read.c (delayed_method_info): Remove typedef.
14575         (dwarf2_cu::method_info): Now a std::vector.
14576         (add_to_method_list): Update.
14577         (free_delayed_list): Remove.
14578         (compute_delayed_physnames): Update.
14579         (process_full_comp_unit, process_full_type_unit): Clear the method
14580         list.  Remove cleanups.
14581         (psymtab_include_file_name): Add name_holder parameter.  Use
14582         unique_xmalloc_ptr.
14583         (dwarf_decode_lines): Update.
14584
14585 2018-01-17  Tom Tromey  <tom@tromey.com>
14586             Simon Marchi  <simon.marchi@ericsson.com>
14587
14588         * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
14589         (dwarf2_per_objfile::free_cached_comp_units)
14590         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
14591         (init_cutu_and_read_dies_no_follow): Update.
14592         (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
14593         (dwarf2_cu::~dwarf2_cu): New.
14594         (free_heap_comp_unit, free_stack_comp_unit): Remove.
14595         (age_cached_comp_units, free_one_cached_comp_unit): Update.
14596
14597 2018-01-17  Tom Tromey  <tom@tromey.com>
14598             Simon Marchi  <simon.marchi@ericsson.com>
14599
14600         * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
14601         (struct die_reader_specs) <abbrev_table>: New member.
14602         (struct abbrev_table): Add constructor.
14603         <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
14604         <abbrev_obstack>: Now an auto_obstack.
14605         (abbrev_table_up): New typedef.
14606         (init_cu_die_reader): Add abbrev_table parameter.
14607         (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
14608         Add result_dwo_abbrev_table.
14609         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
14610         (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
14611         Update.
14612         (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
14613         parameter.
14614         (skip_children): Update.
14615         (abbrev_table::alloc_abbrev): Rename from
14616         abbrev_table_alloc_abbrev.
14617         (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
14618         (abbrev_table::lookup_abbrev): Rename from
14619         abbrev_table_lookup_abbrev.
14620         (abbrev_table_read_table): Return abbrev_table_up.
14621         (abbrev_table_free, abbrev_table_free_cleanup)
14622         (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
14623         (load_partial_dies): Update.
14624
14625 2018-01-17  Tom Tromey  <tom@tromey.com>
14626
14627         * dwarf2read.c (dwarf2_compute_name): Update comment.
14628         (read_func_scope, read_variable): Update.
14629         (new_symbol): Remove.
14630         (new_symbol_full): Rename to new_symbol.
14631
14632 2018-01-17  Mike Gulick  <mgulick@mathworks.com>
14633
14634         PR gdb/16577
14635         * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
14636         a warning instead of throwing an error, set section size to 0 and return
14637         NULL.
14638         * gdb_bfd.h (gdb_bfd_map_section): Update description.
14639
14640 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
14641
14642         * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
14643         std::string.
14644         (linux_ptrace_attach_fail_reason_string): Likewise.
14645         * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
14646         Likewise.
14647         (linux_ptrace_attach_fail_reason_string): Likewise.
14648         * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
14649
14650 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
14651
14652         * linux-nat.c (linux_nat_attach): Remove xstrdup.
14653
14654 2018-01-17  Eldar Abusalimov  <eldar.abusalimov@jetbrains.com>
14655
14656         PR gdb/21559
14657         * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
14658         checking for fs_base/gs_base fields in struct user_regs_struct.
14659         * configure: Regenerate.
14660
14661 2018-01-17  Yao Qi  <yao.qi@linaro.org>
14662
14663         * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
14664         function.
14665         (aarch64_linux_init_abi): Install it to gdbarch hook
14666         gcc_target_options.
14667
14668 2018-01-15  Pedro Alves  <palves@redhat.com>
14669
14670         * common/signals-state-save-restore.c
14671         (save_original_signals_state): Fix typos.
14672
14673 2017-01-12  Tom Tromey  <tom@tromey.com>
14674             Sergio Durigan Junior  <sergiodj@redhat.com>
14675
14676         * Makefile.in (install-only): Install gdb-add-index.
14677
14678 2018-01-12  John Baldwin  <jhb@FreeBSD.org>
14679
14680         * fbsd-tdep.c (KVE_PROTECTION): Correct value.
14681
14682 2018-01-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
14683
14684         * infrun.c (keep_going_pass_signal): Clear step-over info when
14685         insert_breakpoints fails.
14686
14687 2018-01-11  Pedro Alves  <palves@redhat.com>
14688
14689         PR gdb/22583
14690         * infrun.c (resume): Rename to ...
14691         (resume_1): ... this.
14692         (resume): Reimplement as wrapper around resume_1.
14693
14694 2018-01-11  Pedro Alves  <palves@redhat.com>
14695
14696         PR remote/22597
14697         * remote.c (remote_parse_stop_reply): Default to the last-set
14698         general thread instead of to 'magic_null_ptid'.
14699
14700 2018-01-10  Pedro Alves  <palves@redhat.com>
14701
14702         * language.h (language_get_symbol_name_matcher): Rename ...
14703         (get_symbol_name_matcher): ... this.
14704         * language.c (language_get_symbol_name_matcher): Ditto.
14705         * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
14706         callers adjusted.
14707
14708 2018-01-10  Pedro Alves  <palves@redhat.com>
14709
14710         PR gdb/22670
14711         * dwarf2read.c
14712         (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
14713         Adjust to use language_get_symbol_name_matcher instead of
14714         language_defn::la_get_symbol_name_matcher.
14715         * language.c (language_get_symbol_name_matcher): If in Ada mode
14716         and the lookup name is a verbatim match, return Ada's matcher.
14717         * language.h (language_get_symbol_name_matcher): Adjust comment.
14718         (ada_lookup_name_info::verbatim_p):: New method.
14719
14720 2018-01-10  Pedro Alves  <palves@redhat.com>
14721
14722         PR gdb/22670
14723         * ada-lang.c (ada_collect_symbol_completion_matches): If the
14724         minsym's language is language_auto or language_cplus, pass down
14725         language_ada instead.
14726         * symtab.c (compare_symbol_name): Don't frob symbol language here.
14727
14728 2018-01-10  Pedro Alves  <palves@redhat.com>
14729
14730         PR gdb/22670
14731         * minsyms.c (linkage_name_str): New function.
14732         (iterate_over_minimal_symbols): Use it.
14733
14734 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
14735
14736         * NEWS: Document that 'info proc' now works on FreeBSD.
14737
14738 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
14739
14740         * configure.ac: Check for kinfo_getfile in libutil.
14741         * configure: Regenerate.
14742         * config.in: Regenerate.
14743         * fbsd-nat.c: Include "fbsd-tdep.h".
14744         (fbsd_fetch_cmdline): New.
14745         (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
14746         rather than calling error.
14747         (fbsd_info_proc): New.
14748         (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
14749         (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
14750         (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
14751
14752 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
14753
14754         * fbsd-nat.c (struct free_deleter): Remove.
14755         (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
14756
14757 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
14758
14759         * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
14760         NULL for an empty pathname.
14761
14762 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
14763
14764         * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
14765         (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
14766         (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
14767         (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
14768         (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
14769         (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
14770         (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
14771         (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
14772         (kinfo_proc_layout_32, kinfo_proc_layout_i386)
14773         (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
14774         (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
14775         (fbsd_core_fetch_timeval, fbsd_print_sigset)
14776         (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
14777         (fbsd_init_abi):  Install gdbarch "core_info_proc" method.
14778         * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
14779
14780 2018-01-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>
14781
14782         * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
14783         (gnu_xfer_auxv): New function.
14784         (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
14785         TARGET_OBJECT_AUXV.
14786
14787 2018-01-08  Yao Qi  <yao.qi@linaro.org>
14788             Simon Marchi  <simon.marchi@ericsson.com>
14789
14790         * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
14791         common/selftest.c.
14792         (COMMON_OBS): Remove selftest.o.
14793         * configure.ac: Append selftest-arch.c and common/selftest.c to
14794         CONFIG_SRCS.  Append selftest-arch.o and selftest.o to COMMON_OBS.
14795         * configure: Re-generated.
14796         * maint.c (maintenance_selftest): Wrap selftests::run_tests with
14797         GDB_SELF_TEST.
14798         (maintenance_info_selftests): Likewise.
14799
14800 2018-01-08  Xavier Roirand  <roirand@adacore.com>
14801
14802         * ada-valprint.c (val_print_packed_array_elements): Use
14803         proper number of elements when printing an array indexed
14804         by an enumeration type.
14805
14806 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
14807
14808         * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
14809         (dw2_get_file_names_reader): Adjust.
14810         (lookup_dwo_signatured_type): Adjust.
14811         (lookup_dwp_signatured_type): Adjust.
14812         (lookup_signatured_type): Adjust.
14813         (create_type_unit_group): Adjust.
14814         (get_type_unit_group): Adjust.
14815         (process_psymtab_comp_unit_reader): Adjust.
14816         (build_type_psymtabs_reader): Adjust.
14817         (scan_partial_symbols): Adjust.
14818         (add_partial_symbol): Adjust.
14819         (add_partial_subprogram): Adjust.
14820         (peek_die_abbrev): Adjust.
14821         (fixup_go_packaging): Adjust.
14822         (process_imported_unit_die): Adjust.
14823         (dwarf2_compute_name): Adjust.
14824         (dwarf2_physname): Adjust.
14825         (read_import_statement): Adjust.
14826         (handle_DW_AT_stmt_list): Adjust.
14827         (read_file_scope): Adjust.
14828         (read_func_scope): Adjust.
14829         (read_lexical_block_scope): Adjust.
14830         (read_call_site_scope): Adjust.
14831         (read_variable): Adjust.
14832         (dwarf2_rnglists_process): Adjust.
14833         (dwarf2_ranges_process): Adjust.
14834         (dwarf2_ranges_read): Adjust.
14835         (dwarf2_get_pc_bounds): Adjust.
14836         (dwarf2_record_block_ranges): Adjust.
14837         (dwarf2_add_field): Adjust.
14838         (dwarf2_add_member_fn): Adjust.
14839         (read_structure_type): Adjust.
14840         (process_structure_scope): Adjust.
14841         (read_enumeration_type): Adjust.
14842         (read_array_type): Adjust.
14843         (mark_common_block_symbol_computed): Adjust.
14844         (read_common_block): Adjust.
14845         (read_namespace_type): Adjust.
14846         (read_namespace): Adjust.
14847         (read_module_type): Adjust.
14848         (read_tag_pointer_type): Adjust.
14849         (read_tag_ptr_to_member_type): Adjust.
14850         (read_tag_string_type): Adjust.
14851         (read_subroutine_type): Adjust.
14852         (read_typedef): Adjust.
14853         (read_base_type): Adjust.
14854         (attr_to_dynamic_prop): Adjust.
14855         (read_subrange_type): Adjust.
14856         (read_unspecified_type): Adjust.
14857         (dwarf2_read_abbrevs): Adjust.
14858         (load_partial_dies): Adjust.
14859         (read_partial_die): Adjust.
14860         (find_partial_die): Adjust.
14861         (guess_partial_die_structure_name): Adjust.
14862         (fixup_partial_die): Adjust.
14863         (read_attribute_value): Adjust.
14864         (read_addr_index): Adjust.
14865         (read_addr_index_from_leb128): Adjust.
14866         (read_str_index): Adjust.
14867         (dwarf2_string_attr): Adjust.
14868         (get_debug_line_section): Adjust.
14869         (dwarf_decode_line_header): Adjust.
14870         (lnp_state_machine::check_line_address): Adjust.
14871         (dwarf_decode_lines_1): Adjust.
14872         (dwarf_decode_lines): Adjust.
14873         (dwarf2_start_symtab): Adjust.
14874         (var_decode_location): Adjust.
14875         (new_symbol_full): Adjust.
14876         (dwarf2_const_value_data): Adjust.
14877         (dwarf2_const_value_attr): Adjust.
14878         (dwarf2_const_value): Adjust.
14879         (die_type): Adjust.
14880         (die_containing_type): Adjust.
14881         (build_error_marker_type): Adjust.
14882         (lookup_die_type): Adjust.
14883         (guess_full_die_structure_name): Adjust.
14884         (anonymous_struct_prefix): Adjust.
14885         (determine_prefix): Adjust.
14886         (dwarf2_name): Adjust.
14887         (follow_die_ref_or_sig): Adjust.
14888         (follow_die_offset): Adjust.
14889         (follow_die_ref): Adjust.
14890         (follow_die_sig_1): Adjust.
14891         (follow_die_sig): Adjust.
14892         (get_signatured_type): Adjust.
14893         (get_DW_AT_signature_type): Adjust.
14894         (decode_locdesc): Adjust.
14895         (dwarf_decode_macros): Adjust.
14896         (cu_debug_loc_section): Adjust.
14897         (fill_in_loclist_baton): Adjust.
14898         (dwarf2_symbol_mark_computed): Adjust.
14899         (init_one_comp_unit): Don't assign
14900         dwarf2_cu::dwarf2_per_objfile.
14901         (set_die_type): Adjust.
14902
14903 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
14904
14905         * dwarf2read.c (struct mapped_debug_names): Add constructor.
14906         <dwarf2_per_objfile>: New field.
14907         (dwarf2_per_objfile): Remove global.
14908         (get_dwarf2_per_objfile): New function.
14909         (set_dwarf2_per_objfile): New function.
14910         (dwarf2_build_psymtabs_hard): Change objfile parameter to
14911         dwarf2_per_objfile.
14912         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
14913         (read_abbrev_offset): Likewise.
14914         (read_indirect_string): Likewise.
14915         (read_indirect_line_string): Likewise.
14916         (read_indirect_string_at_offset): Likewise.
14917         (read_indirect_string_from_dwz): Likewise.
14918         (dwarf2_find_containing_comp_unit): Change objfile parameter to
14919         dwarf2_per_objfile.
14920         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
14921         (create_all_comp_units): Change objfile parameter to
14922         dwarf2_per_objfile.
14923         (create_all_type_units): Likewise.
14924         (process_queue): Add dwarf2_per_objfile parameter.
14925         (read_and_check_comp_unit_head): Likewise.
14926         (lookup_dwo_unit_in_dwp): Likewise.
14927         (get_dwp_file): Likewise.
14928         (process_cu_includes): Likewise.
14929         (struct free_dwo_file_cleanup_data): New struct.
14930         (dwarf2_has_info): Use get_dwarf2_per_objfile and
14931         set_dwarf2_per_objfile.
14932         (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
14933         (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
14934         context, adjust calls.
14935         (dw2_instantiate_symtab): Likewise.
14936         (dw2_get_cutu): Add dwarf2_per_objfile parameter.
14937         (dw2_get_cu): Likewise.
14938         (create_cu_from_index_list): Change objfile parameter to
14939         dwarf2_per_objfile.
14940         (create_cus_from_index_list): Get dwarf2_per_objfile from
14941         context, adjust calls.
14942         (create_cus_from_index): Likewise.
14943         (create_signatured_type_table_from_index): Change objfile
14944         parameter to dwarf2_per_objfile.
14945         (create_signatured_type_table_from_debug_names): Change objfile
14946         parameter to dwarf2_per_objfile.
14947         (create_addrmap_from_index): Likewise.
14948         (create_addrmap_from_aranges): Likewise.
14949         (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
14950         (dw2_setup): Remove.
14951         (dw2_get_file_names_reader): Get dwarf2_per_objfile from
14952         context.
14953         (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
14954         get_dwarf2_per_objfile.
14955         (dw2_forget_cached_source_info): Likewise.
14956         (dw2_map_symtabs_matching_filename): Likewise.
14957         (struct dw2_symtab_iterator) <index>: Remove.
14958         <dwarf2_per_objfile>: New field.
14959         (dw2_symtab_iter_init): Replace index parameter with
14960         dwarf2_per_objfile.
14961         (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
14962         (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
14963         (dw2_print_stats): Likewise.
14964         (dw2_dump): Likewise.
14965         (dw2_expand_symtabs_for_function): Likewise.
14966         (dw2_expand_all_symtabs): Likewise.
14967         (dw2_expand_symtabs_with_fullname): Likewise.
14968         (dw2_expand_marked_cus): Replace index and objfile parameters
14969         with dwarf2_per_objfile.
14970         (dw_expand_symtabs_matching_file_matcher): Add
14971         dwarf2_per_objfile parameter and adjust calls.
14972         (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
14973         adjust calls.
14974         (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
14975         (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
14976         adjust calls.
14977         (create_cus_from_debug_names_list): Replace objfile parameter
14978         with dwarf2_per_objfile and adjust calls.
14979         (create_cus_from_debug_names): Likewise.
14980         (dwarf2_read_debug_names): Likewise.
14981         (mapped_debug_names::namei_to_name): Adjust call.
14982         (dw2_debug_names_iterator::next): Likewise.
14983         (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
14984         (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
14985         (dw2_debug_names_dump): Likewise.
14986         (dw2_debug_names_expand_symtabs_for_function): Likewise.
14987         (dw2_debug_names_expand_symtabs_matching): Likewise.
14988         (dwarf2_initialize_objfile): Likewise.
14989         (dwarf2_build_psymtabs): Likewise.
14990         (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
14991         this_cu.
14992         (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
14993         (read_and_check_comp_unit_head): Likewise.
14994         (read_abbrev_offset): Likewise.
14995         (create_debug_type_hash_table): Likewise.
14996         (create_debug_types_hash_table): Likewise.
14997         (create_all_type_units): Replace objfile parameter with
14998         dwarf2_per_objfile.
14999         (add_type_unit): Add dwarf2_per_objfile parameter.
15000         (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
15001         with dwarf2_per_objfile.
15002         (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
15003         (lookup_dwp_signatured_type): Likewise.
15004         (lookup_signatured_type): Likewise.
15005         (read_cutu_die_from_dwo): Likewise.
15006         (init_tu_and_read_dwo_dies): Likewise.
15007         (init_cutu_and_read_dies): Likewise.
15008         (init_cutu_and_read_dies_no_follow): Likewise.
15009         (allocate_type_unit_groups_table): Add objfile parameter.
15010         (create_type_unit_group): Use dwarf2_per_objfile from cu.
15011         (get_type_unit_group): Likewise.
15012         (process_psymtab_comp_unit): Update call.
15013         (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
15014         (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
15015         (print_tu_stats): Likewise.
15016         (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
15017         in void* parameter.
15018         (build_type_psymtabs): Change objfile parameter to
15019         dwarf2_per_objfile.
15020         (process_skeletonless_type_unit): Use dwarf2_per_objfile
15021         passed in void* parameter.
15022         (process_skeletonless_type_units): Change objfile parameter to
15023         dwarf2_per_objfile.
15024         (set_partial_user): Likewise.
15025         (dwarf2_build_psymtabs_hard): Likewise.
15026         (read_comp_units_from_section): Likewise.
15027         (create_all_comp_units): Likewise.
15028         (scan_partial_symbols): Update calls.
15029         (add_partial_symbol): Likewise.
15030         (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
15031         (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
15032         (process_queue): Add dwarf2_per_objfile parameter.
15033         (get_compunit_symtab): Use dwarf2_per_objfile from cu.
15034         (compute_compunit_symtab_includes): Likewise.
15035         (process_cu_includes): Add dwarf2_per_objfile parameter.
15036         (process_full_comp_unit): Use dwarf2_per_objfile from cu.
15037         (process_full_type_unit): Likewise.
15038         (process_imported_unit_die): Update call.
15039         (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
15040         (read_file_scope): Likewise.
15041         (allocate_dwo_file_hash_table): Add objfile parameter.
15042         (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
15043         (create_cus_hash_table): Likewise.
15044         (create_dwp_hash_table): Likewise.
15045         (create_dwo_unit_in_dwp_v1): Likewise.
15046         (create_dwp_v2_section): Likewise.
15047         (create_dwo_unit_in_dwp_v2): Likewise.
15048         (lookup_dwo_unit_in_dwp): Likewise.
15049         (try_open_dwop_file): Likewise.
15050         (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
15051         (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
15052         cleanup to include a reference to dwarf2_per_objfile.
15053         (open_dwp_file): Add dwarf2_per_objfile parameter.
15054         (open_and_init_dwp_file): Likewise.
15055         (get_dwp_file): Likewise.
15056         (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
15057         (queue_and_load_all_dwo_tus): Update call.
15058         (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
15059         data.
15060         (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
15061         (dwarf2_ranges_process): Likewise.
15062         (dwarf2_get_pc_bounds): Likewise.
15063         (mark_common_block_symbol_computed): Likewise.
15064         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
15065         (dwarf2_read_abbrevs): Update call.
15066         (read_partial_die): Use dwarf2_per_objfile from cu.
15067         (find_partial_die): Likewise.
15068         (fixup_partial_die): Likewise.
15069         (read_attribute_value): Likewise.
15070         (read_indirect_string_at_offset_from): Add objfile parameter.
15071         (read_indirect_string_at_offset): Add dwarf2_per_objfile
15072         parameter.
15073         (read_indirect_string_from_dwz): Add objfile parameter.
15074         (read_indirect_string): Add objfile parameter.
15075         (read_addr_index_1): Add dwarf2_per_objfile parameter.
15076         (read_addr_index): Use dwarf2_per_objfile from cu.
15077         (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
15078         call dw2_setup.
15079         (read_str_index): Use dwarf2_per_objfile from cu.
15080         (get_debug_line_section): Likewise.
15081         (read_formatted_entries): Add dwarf2_per_objfile parameter.
15082         (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
15083         (new_symbol_full): Use dwarf2_per_objfile from cu.
15084         (build_error_marker_type): Likewise.
15085         (lookup_die_type): Likewise.
15086         (determine_prefix): Likewise.
15087         (follow_die_offset): Likewise.
15088         (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
15089         (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
15090         (dwarf2_fetch_die_type_sect_off): Likewise.
15091         (dwarf2_get_die_type): Likewise.
15092         (follow_die_sig_1): Use dwarf2_per_objfile from cu.
15093         (get_signatured_type): Likewise.
15094         (get_DW_AT_signature_type): Likewise.
15095         (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
15096         (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
15097         (cu_debug_loc_section): Likewise.
15098         (fill_in_loclist_baton): Likewise.
15099         (dwarf2_symbol_mark_computed): Likewise.
15100         (dwarf2_find_containing_comp_unit): Change objfile parameter to
15101         dwarf2_per_objfile.
15102         (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
15103         parameter.
15104         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
15105         (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
15106         (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
15107         (set_die_type): Use dwarf2_free_objfile from cu.
15108         (get_die_type_at_offset): Likewise.
15109         (dwarf2_per_objfile_free): Don't assign global variable.
15110         (debug_names) <constructor>: Add dwarf2_per_objfile
15111         parameter, update m_debugstrlookup construction.
15112         (debug_names::debug_str_lookup): Add dwarf2_per_objfile
15113         parameter.
15114         <m_dwarf2_per_objfile>: New field.
15115         <lookup>: Use m_dwarf2_per_objfile.
15116         (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
15117         (psyms_seen_size): Likewise.
15118         (write_gdbindex): Replace objfile parameter with
15119         dwarf2_per_objfile.
15120         (write_debug_names): Likewise.
15121         (write_psymtabs_to_index): Likewise.
15122         (save_gdb_index_command): Use get_dwarf2_per_objfile, update
15123         calls.
15124
15125 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
15126
15127         * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
15128         <dwarf2_per_objfile>: New field.
15129         (struct dwarf2_per_cu_data) <objfile>: Remove.
15130         <dwarf2_per_objfile>: New field.
15131         (create_cu_from_index_list): Assign dwarf2_per_objfile instead
15132         of objfile.
15133         (create_signatured_type_table_from_index): Likewise.
15134         (create_debug_type_hash_table): Likewise.
15135         (fill_in_sig_entry_from_dwo_entry): Likewise.
15136         (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
15137         (create_type_unit_group): Assign dwarf2_per_objfile instead of
15138         objfile.
15139         (create_partial_symtab): Access objfile through
15140         dwarf2_per_objfile.
15141         (process_psymtab_comp_unit_reader): Likewise.
15142         (read_comp_units_from_section): Likewise.
15143         (scan_partial_symbols): Likewise.
15144         (add_partial_symbol): Likewise.
15145         (add_partial_subprogram): Likewise.
15146         (peek_die_abbrev): Likewise.
15147         (fixup_go_packaging): Likewise.
15148         (process_full_comp_unit): Likewise.
15149         (process_full_type_unit): Likewise.
15150         (process_imported_unit_die): Likewise.
15151         (dwarf2_compute_name): Likewise.
15152         (dwarf2_physname): Likewise.
15153         (read_import_statement): Likewise.
15154         (create_cus_hash_table): Assign dwarf2_physname instead of
15155         objfile.
15156         (read_func_scope): Access objfile through dwarf2_per_objfile.
15157         (read_lexical_block_scope): Likewise.
15158         (read_call_site_scope): Likewise.
15159         (read_variable): Likewise.
15160         (dwarf2_rnglists_process): Likewise.
15161         (dwarf2_ranges_process): Likewise.
15162         (dwarf2_ranges_read): Likewise.
15163         (dwarf2_record_block_ranges): Likewise.
15164         (dwarf2_add_field): Likewise.
15165         (dwarf2_add_member_fn): Likewise.
15166         (read_structure_type): Likewise.
15167         (process_structure_scope): Likewise.
15168         (read_enumeration_type): Likewise.
15169         (read_array_type): Likewise.
15170         (read_common_block): Likewise.
15171         (read_namespace_type): Likewise.
15172         (read_namespace): Likewise.
15173         (read_module_type): Likewise.
15174         (read_tag_pointer_type): Likewise.
15175         (read_tag_ptr_to_member_type): Likewise.
15176         (read_tag_string_type): Likewise.
15177         (read_subroutine_type): Likewise.
15178         (read_typedef): Likewise.
15179         (read_base_type): Likewise.
15180         (attr_to_dynamic_prop): Likewise.
15181         (read_subrange_type): Likewise.
15182         (read_unspecified_type): Likewise.
15183         (load_partial_dies): Likewise.
15184         (read_partial_die): Likewise.
15185         (find_partial_die): Likewise.
15186         (guess_partial_die_structure_name): Likewise.
15187         (fixup_partial_die): Likewise.
15188         (read_attribute_value): Likewise.
15189         (read_addr_index_from_leb128): Likewise.
15190         (dwarf2_read_addr_index): Likewise.
15191         (dwarf2_string_attr): Likewise.
15192         (lnp_state_machine::check_line_address): Likewise.
15193         (dwarf_decode_lines_1): Likewise.
15194         (dwarf_decode_lines): Likewise.
15195         (dwarf2_start_symtab): Likewise.
15196         (var_decode_location): Likewise.
15197         (new_symbol_full): Likewise.
15198         (dwarf2_const_value_data): Likewise.
15199         (dwarf2_const_value_attr): Likewise.
15200         (dwarf2_const_value): Likewise.
15201         (die_type): Likewise.
15202         (die_containing_type): Likewise.
15203         (lookup_die_type): Likewise.
15204         (guess_full_die_structure_name): Likewise.
15205         (anonymous_struct_prefix): Likewise.
15206         (dwarf2_name): Likewise.
15207         (follow_die_ref_or_sig): Likewise.
15208         (follow_die_offset): Likewise.
15209         (follow_die_ref): Likewise.
15210         (dwarf2_fetch_die_loc_sect_off): Likewise.
15211         (dwarf2_fetch_constant_bytes): Likewise.
15212         (dwarf2_fetch_die_type_sect_off): Likewise.
15213         (dwarf2_get_die_type): Likewise.
15214         (follow_die_sig): Likewise.
15215         (decode_locdesc): Likewise.
15216         (dwarf2_per_cu_objfile): Likewise.
15217         (dwarf2_per_cu_text_offset): Likewise.
15218         (init_one_comp_unit): Assign dwarf2_per_objfile instead of
15219         objfile.
15220         (set_die_type): Access objfile through
15221         dwarf2_per_objfile.
15222
15223 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
15224
15225         * valprint.c (converted_character_d): Remove typedef.
15226         (DEF_VEC_O (converted_character_d)): Remove.
15227         (count_next_character): Use std::vector.
15228         (print_converted_chars_to_obstack): Likewise.
15229         (generic_printstr): Likewise.
15230
15231 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
15232
15233         * xml-support.h (struct gdb_xml_value): Add constructor.
15234         <value>: Change type to unique_xmalloc_ptr.
15235         (gdb_xml_value_s): Remove typedef.
15236         (DEF_VEC_O (gdb_xml_value_s)): Remove.
15237         (gdb_xml_element_start_handler): Change parameter type to
15238         std::vector.
15239         (xml_find_attribute): Likewise.
15240         * xml-support.c (xml_find_attribute): Change parameter type to
15241         std::vector and adjust.
15242         (gdb_xml_values_cleanup): Remove.
15243         (gdb_xml_parser::start_element): Adjust to std::vector.
15244         (xinclude_start_include): Change paraeter type to std::vector
15245         and adjust.
15246         * btrace.c (check_xml_btrace_version): Likewise.
15247         (parse_xml_btrace_block): Likewise.
15248         (parse_xml_btrace_pt_config_cpu): Likewise.
15249         (parse_xml_btrace_pt): Likewise.
15250         (parse_xml_btrace_conf_bts): Likewise.
15251         (parse_xml_btrace_conf_pt): Likewise.
15252         * memory-map.c (memory_map_start_memory): Likewise.
15253         (memory_map_start_property): Likewise.
15254         * osdata.c (osdata_start_osdata): Likewise.
15255         (osdata_start_item): Likewise.
15256         (osdata_start_column): Likewise.
15257         * remote.c (start_thread): Likewise.
15258         * solib-aix.c (library_list_start_library): Likewise.
15259         (library_list_start_list): Likewise.
15260         * solib-svr4.c (library_list_start_library): Likewise.
15261         (svr4_library_list_start_list): Likewise.
15262         * solib-target.c (library_list_start_segment): Likewise.
15263         (library_list_start_section): Likewise.
15264         (library_list_start_library): Likewise.
15265         (library_list_start_list): Likewise.
15266         * tracepoint.c (traceframe_info_start_memory): Likewise.
15267         (traceframe_info_start_tvar): Likewise.
15268         * xml-syscall.c (syscall_start_syscall): Likewise.
15269         * xml-tdesc.c (tdesc_start_target): Likewise.
15270         (tdesc_start_feature): Likewise.
15271         (tdesc_start_reg): Likewise.
15272         (tdesc_start_union): Likewise.
15273         (tdesc_start_struct): Likewise.
15274         (tdesc_start_flags): Likewise.
15275         (tdesc_start_enum): Likewise.
15276         (tdesc_start_field): Likewise.
15277         (tdesc_start_enum_value): Likewise.
15278         (tdesc_start_vector): Likewise.
15279
15280 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
15281
15282         * extension.h (struct xmethod_worker) <clone>: Remove.
15283         * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
15284         Remove.
15285         (python_xmethod_worker::clone): Remove.
15286         * valops.c (find_overload_match): Use std::move instead of
15287         clone.
15288
15289 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
15290
15291         * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
15292         (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
15293         <free_xmethod_worker_data>: Remove.
15294         <get_matching_xmethod_workers>: Chance VEC to std::vector.
15295         <get_xmethod_arg_types>: Remove.
15296         <get_xmethod_result_type>: Remove.
15297         <invoke_xmethod>: Remove.
15298         * extension.c (new_xmethod_worker): Remove.
15299         (clone_xmethod_worker): Remove.
15300         (get_matching_xmethod_workers): Return void, pass std::vector by
15301         pointer.
15302         (get_xmethod_arg_types): Rename to...
15303         (xmethod_worker::get_arg_types): ... this, and adjust.
15304         (get_xmethod_result_type): Rename to...
15305         (xmethod_worker::get_result_type): ... this, and adjust.
15306         (invoke_xmethod): Remove.
15307         (free_xmethod_worker): Remove.
15308         (free_xmethod_worker_vec): Remove.
15309         * extension.h (enum ext_lang_rc): Move here from
15310         extension-priv.h.
15311         (struct xmethod_worker): Add constructor and destructor.
15312         <data>: Remove.
15313         <value>: Remove.
15314         <invoke, clone, do_get_result_type, do_get_arg_types>: New
15315         virtual pure methods.
15316         <get_arg_types, get_result_type>: New methods.
15317         (xmethod_worker_ptr): Remove typedef.
15318         (DEF_VEC_P (xmethod_worker_ptr)): Remove.
15319         (xmethod_worker_vec): Remove typedef.
15320         (xmethod_worker_up): New typedef.
15321         (invoke_xmethod): Remove.
15322         (clone_xmethod_worker): Remove.
15323         (free_xmethod_worker): Remove.
15324         (free_xmethod_worker_vec): Remove.
15325         (get_xmethod_arg_types): Remove.
15326         (get_xmethod_result_type): Remove.
15327         * valops.c (find_method_list): Use std::vector, don't use
15328         intermediate vector.
15329         (value_find_oload_method_list): Use std::vector.
15330         (find_overload_match): Use std::vector.
15331         (find_oload_champ): Use std::vector.
15332         * value.c (value_free): Use operator delete.
15333         (value_of_xmethod): Rename to...
15334         (value_from_xmethod): ... this.  Don't assign
15335         xmethod_worker::value, take rvalue-reference.
15336         (result_type_of_xmethod): Adjust.
15337         (call_xmethod): Adjust.
15338         * value.h: Include extension.h.
15339         (struct xmethod_worker): Don't forward-declare.
15340         (value_of_xmethod): Rename to...
15341         (value_from_xmethod): ... this, take rvalue-reference.
15342         * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
15343         (struct python_xmethod_worker): ... this, add constructor and
15344         destructor.
15345         <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
15346         (gdbpy_free_xmethod_worker_data): Rename to...
15347         (python_xmethod_worker::~python_xmethod_worker): ... this and
15348         adjust.
15349         (gdbpy_clone_xmethod_worker_data): Rename to...
15350         (python_xmethod_worker::clone): ... this and adjust.
15351         (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
15352         temporary vector.
15353         (gdbpy_get_xmethod_arg_types): Rename to...
15354         (python_xmethod_worker::do_get_arg_types): ... this and adjust.
15355         (gdbpy_get_xmethod_result_type): Rename to...
15356         (python_xmethod_worker::do_get_result_type): ... this and
15357         adjust.
15358         (gdbpy_invoke_xmethod): Rename to...
15359         (python_xmethod_worker::invoke): ... this and adjust.
15360         (new_python_xmethod_worker): Rename to...
15361         (python_xmethod_worker::python_xmethod_worker): ... this and
15362         adjust.
15363         * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
15364         Remove.
15365         (gdbpy_free_xmethod_worker_data): Remove.
15366         (gdbpy_get_matching_xmethod_workers): Use std::vector.
15367         (gdbpy_get_xmethod_arg_types): Remove.
15368         (gdbpy_get_xmethod_result_type): Remove.
15369         (gdbpy_invoke_xmethod): Remove.
15370         * python/python.c (python_extension_ops): Remove obsolete
15371         callbacks.
15372
15373 2018-01-05  Pedro Alves  <palves@redhat.com>
15374
15375         PR gdb/18653
15376         * common/signals-state-save-restore.c
15377         (save_original_signals_state): New parameter 'quiet'.  Warn if we
15378         find a custom handler preinstalled, instead of internal erroring.
15379         But only warn if !quiet.
15380         * common/signals-state-save-restore.h
15381         (save_original_signals_state): New parameter 'quiet'.
15382         * main.c (captured_main_1): Move save_original_signals_state call
15383         after option handling, and pass QUIET.
15384
15385 2018-01-05  Pedro Alves  <palves@redhat.com>
15386
15387         * spu-tdep.c (spu_catch_start): Pass
15388         symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
15389
15390 2018-01-05  Pedro Alves  <palves@redhat.com>
15391
15392         PR gdb/22670
15393         * ada-lang.c (literal_symbol_name_matcher): New function.
15394         (ada_get_symbol_name_matcher): Use it for
15395         symbol_name_match_type::SEARCH_NAME.
15396         * block.c (block_lookup_symbol): New parameter 'match_type'.  Pass
15397         it down instead of assuming symbol_name_match_type::FULL.
15398         * block.h (block_lookup_symbol): New parameter 'match_type'.
15399         * c-valprint.c (print_unpacked_pointer): Use
15400         lookup_symbol_search_name instead of lookup_symbol.
15401         * compile/compile-object-load.c (get_out_value_type): Pass down
15402         symbol_name_match_type::SEARCH_NAME.
15403         * cp-namespace.c (cp_basic_lookup_symbol): Pass down
15404         symbol_name_match_type::FULL.
15405         * cp-support.c (cp_get_symbol_name_matcher): Handle
15406         symbol_name_match_type::SEARCH_NAME.
15407         * infrun.c (insert_exception_resume_breakpoint): Use
15408         lookup_symbol_search_name.
15409         * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
15410         * psymtab.c (maintenance_check_psymtabs): Use
15411         symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
15412         * stack.c (print_frame_args): Use lookup_symbol_search_name and
15413         SYMBOL_SEARCH_NAME.
15414         * symtab.c (lookup_local_symbol): Don't demangle the lookup name
15415         if symbol_name_match_type::SEARCH_NAME.
15416         (lookup_symbol_in_language): Pass down
15417         symbol_name_match_type::FULL.
15418         (lookup_symbol_search_name): New.
15419         (lookup_language_this): Pass down
15420         symbol_name_match_type::SEARCH_NAME.
15421         (lookup_symbol_aux, lookup_local_symbol): New parameter
15422         'match_type'.  Pass it down.
15423         * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
15424         (lookup_symbol_search_name): New declaration.
15425         (lookup_symbol_in_block): New 'match_type' parameter.
15426
15427 2018-01-05  Pedro Alves  <palves@redhat.com>
15428
15429         PR gdb/22670
15430         * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
15431         ada_lookup_symbol.
15432         (ada_lookup_symbol): Reimplement in terms of
15433         ada_lookup_symbol_list, bits factored out from
15434         ada_lookup_encoded_symbol.
15435
15436 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
15437
15438         * ada-exp.y (write_object_renaming): When subscripting an array
15439         using a symbol as the index, pass the block in call to
15440         ada_lookup_encoded_symbol when looking that symbol up.
15441
15442 2018-01-05  Jerome Guitton  <guitton@adacore.com>
15443
15444         * ada-lang.c (ada_array_length): Use ada_index_type instead of
15445         TYPE_INDEX_TYPE.
15446
15447 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
15448
15449         * ada-lang.c (ada_to_fixed_value_create): Add handling of
15450         the case where VALUE_LVAL (val0) is not lval_memory.
15451
15452 2018-01-05  Xavier Roirand  <roirand@adacore.com>
15453
15454         * ada-valprint.c (print_optional_low_bound): Handle
15455         character-indexed array printing like boolean-indexed array
15456         printing.
15457
15458 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
15459
15460         * NEWS: Create a new section for the next release branch.
15461         Rename the section of the current branch, now that it has
15462         been cut.
15463
15464 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
15465
15466         GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
15467         * version.in: Bump version to 8.1.50.DATE-git.
15468
15469 2018-01-03  Xavier Roirand  <roirand@adacore.com>
15470
15471         * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
15472         Add field.
15473         * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
15474         Add field.
15475         (default_exception_support_info) <catch_handlers_sym>: Add field.
15476         (exception_support_info_fallback) <catch_handlers_sym>: Add field.
15477         (ada_exception_name_addr_1): Add "catch handlers" handling.
15478         (ada_exception_catchpoint_cond_string) <ex>: New parameter.
15479         Update all callers.
15480         (create_excep_cond_exprs) <ex>: Add parameter.
15481         (re_set_exception): Update create_excep_cond_exprs call.
15482         (print_it_exception, print_one_exception, print_mention_exception)
15483         (print_recreate_exception): Add "catch handler" handling.
15484         (allocate_location_catch_handlers, re_set_catch_handlers)
15485         (check_status_catch_handlers, print_it_catch_handlers)
15486         (print_one_catch_handlers, print_mention_catch_handlers)
15487         (print_recreate_catch_handlers): New function.
15488         (catch_handlers_breakpoint_ops): New variable.
15489         (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
15490         Add parameter.  Add "catch handler" handling.
15491         (ada_exception_sym_name, ada_exception_breakpoint_ops):
15492         Add "catch handler" handling.
15493         (ada_exception_catchpoint_cond_string): Add "catch handler"
15494         handling.
15495         (create_ada_exception_catchpoint): Update create_excep_cond_exprs
15496         call.
15497         (catch_ada_handlers_command): New function.
15498         (initialize_ada_catchpoint_ops): Initialize "catch handlers"
15499         operations structure.
15500         (_initialize_ada_language): Add "catch handlers" command entry.
15501         * NEWS: Document "catch handlers" feature.
15502
15503 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
15504
15505         * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
15506         account when creating the array type of the slice.
15507         (ada_value_slice): Likewise.
15508
15509 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
15510
15511         * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
15512         New enum value.
15513         (create_array_type_with_stride): Add byte_stride_prop parameter.
15514         * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
15515         New parameter.  Update all callers in this file.
15516         (array_type_has_dynamic_stride): New function.
15517         (is_dynamic_type_internal, resolve_dynamic_array): Add handling
15518         of arrays with dynamic byte strides.
15519         * dwarf2read.c (read_array_type): Add support for dynamic
15520         DW_AT_byte_stride attributes.
15521
15522 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
15523
15524         * dwarf2read.c (read_unspecified_type): Treat
15525         DW_TAG_enumeration_type DIEs from Ada units as stubs.
15526
15527 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
15528
15529         Update copyright year range in all GDB files.
15530
15531 2018-01-01, 18  Joel Brobecker  <brobecker@adacore.com>
15532
15533         * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
15534         and gdb/testsuite/gdb.base/step-line.c.
15535
15536 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
15537
15538         * copyright.py (main): Dump the contents of
15539         MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
15540         even if BY_HAND is empty.
15541
15542 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
15543
15544         * top.c (print_gdb_version): Update Copyright year in version
15545         message.
15546
15547 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
15548
15549         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
15550
15551 For older changes see ChangeLog-2017.
15552 \f
15553 Local Variables:
15554 mode: change-log
15555 left-margin: 8
15556 fill-column: 74
15557 version-control: never
15558 coding: utf-8
15559 End: