Return gdbpy_ref from gdb_py_object_from_*longest
[external/binutils.git] / gdb / ChangeLog
1 2018-11-04  Tom Tromey  <tom@tromey.com>
2
3         * python/python-internal.h (gdb_py_object_from_longest)
4         (gdb_py_object_from_ulongest): Return gdbpy_ref.
5         * python/py-value.c (valpy_int): Update.
6         * python/py-utils.c (gdb_py_object_from_longest): Return
7         gdbpy_ref.
8         (gdb_py_object_from_ulongest): Likewise.
9         * python/py-type.c (typy_get_alignof): Update.
10         * python/py-linetable.c (ltpy_get_all_source_lines)
11         (ltpy_entry_get_line, ltpy_entry_get_pc): Update.
12         * python/py-block.c (blpy_get_start, blpy_get_end): Update.
13
14 2018-11-03  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
15
16         * ada-lang.c (_initialize_ada_language): Fix typo.
17
18 2018-11-03  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
19
20         * language.c (type): Remove.
21         (_initialize_language): Remove assignment to type.
22
23 2018-11-02  Joel Brobecker  <brobecker@adacore.com>
24
25         * aarch64-ravenscar-thread.h, aarch64-ravenscar-thread.c: New files.
26         * aarch64-tdep.c: #include "aarch64-ravenscar-thread.h".
27         (aarch64_gdbarch_init): Add call to register_aarch64_ravenscar_ops.
28         * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-ravenscar-thread.o.
29         (HFILES_NO_SRCDIR): Add aarch64-ravenscar-thread.h.
30         (ALLDEPFILES): Add aarch64-ravenscar-thread.c.
31         * configure.tgt (cpu_obs) [aarch64*-*-*]: Add ravenscar-thread.o
32         and aarch64-ravenscar-thread.o.
33         * NEWS: Add entry documenting Ravenscar tasking support
34         on AArch64 ELF.
35
36 2018-11-02  Matthew Malcomson  <matthew.malcomson@arm.com>
37
38         * symtab.c (info_functions_command): Initialize quiet flag.
39         * stack.c (info_args_command): Likewise.
40
41 2018-11-01  Jim Wilson  <jimw@sifive.com>
42
43         * riscv-tdep.c (riscv_breakpoint_kind_from_pc): New local unaligned_p.
44         Set if pcptr if unaligned.  Return 2 if unaligned_p true.  Update
45         debugging messages.
46
47 2018-11-01  Joel Brobecker  <brobecker@adacore.com>
48
49         * ada-lang.c (ada_watch_location_expression): New function.
50         (ada_language_defn): Set la_watch_location_expression to
51         ada_watch_location_expression.
52
53 2018-11-01  Joel Brobecker  <brobecker@adacore.com>
54
55         * print-utils.c (int_string): Remove unnecessary trailing spaces.
56
57 2018-11-01  Joel Brobecker  <brobecker@adacore.com>
58
59         * rs6000-tdep.c (skip_prologue): Fix potential negative left
60         shifting.
61
62 2018-11-01  Jerome Guitton  <guitton@adacore.com>
63             Joel Brobecker  <brobecker@adacore.com>
64
65         * defs.h (enum gdb_osabi): Add GDB_OSABI_PIKEOS.
66         * osabi.c (gdb_osabi_names): Add name for GDB_OSABI_PIKEOS.
67         * arm-pikeos-tdep.c: New file.
68         * configure.tgt: Add arm-pikeos-tdep.o to the case of ARM
69         embedded system.
70         * Makefile.in (ALL_TARGET_OBS): Add arm-pikeos-tdep.o.
71
72 2018-11-01  Simon Marchi  <simon.marchi@ericsson.com>
73
74         * common/pathstuff.c (get_standard_temp_dir): New.
75         * common/pathstuff.h (get_standard_temp_dir): New.
76         * config.in: Re-generate.
77         * configure: Re-generate.
78         * configure.ac: Don't check for mkdtemp.
79         * gnulib/aclocal-m4-deps.mk: Re-generate.
80         * gnulib/aclocal.m4: Re-generate.
81         * gnulib/config.in: Re-generate.
82         * gnulib/configure: Re-generate.
83         * gnulib/import/Makefile.am: Re-generate.
84         * gnulib/import/Makefile.in: Re-generate.
85         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
86         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
87         * gnulib/import/m4/mkdtemp.m4: New file.
88         * gnulib/import/mkdtemp.c: New file.
89         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES):
90         Add mkdtemp module.
91         * unittests/mkdir-recursive-selftests.c (test): Use
92         get_standard_temp_dir.
93         (_initialize_mkdir_recursive_selftests): Remove HAVE_MKDTEMP
94         ifdef.
95         * compile/compile.c (get_compile_file_tempdir): Likewise.
96
97 2018-11-01  Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
98
99         * rs6000-aix-tdep.c: Include "trad-frame.h" and "frame-unwind.h".
100         (SIG_FRAME_LR_OFFSET64): New define.
101         (SIG_FRAME_FP_OFFSET64): New define.
102         (aix_sighandle_frame_cache): New Function.
103         (aix_sighandle_frame_this_id): New Function.
104         (aix_sighandle_frame_prev_register): New Function.
105         (aix_sighandle_frame_sniffer): New Function.
106         (aix_sighandle_frame_unwind): New global variable.
107         (rs6000_aix_init_osabi): Install new frame unwinder.
108
109 2018-10-31  Sergio Durigan Junior  <sergiodj@redhat.com>
110
111         PR gdb/23835
112         * common/common-defs.h: Don't redefine _FORTIFY_SOURCE if it's
113         already defined.
114
115 2018-10-31  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
116
117         * ppc-linux-nat.c: Include nat/linux-ptrace.h.
118
119 2018-10-31  Andrew Burgess  <andrew.burgess@embecosm.com>
120
121         * dwarf2read.c (struct dwarf2_cu): Add producer_is_icc field.
122         (producer_is_icc): New function.
123         (check_producer): Set producer_is_icc field on dwarf2_cu.
124         (dwarf2_init_integer_type): New function.
125         (read_base_type): Call dwarf2_init_integer_type instead of
126         init_integer_type in all cases.
127         (dwarf2_cu::dwarf2_cu): Initialise producer_is_icc field.
128         * valprint.c (maybe_negate_by_bytes): Add an assertion that the
129         LEN is greater than 0.
130
131 2018-10-30  Tom Tromey  <tom@tromey.com>
132
133         * main.c (captured_main_1): Check return value of bfd_init.
134
135 2018-10-29  Sergio Durigan Junior  <sergiodj@redhat.com>
136
137         * common/offset-type.h (DEFINE_OFFSET_REL_OP): Delete.
138         Adjust comments.
139
140 2018-10-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
141
142         * procfs.c: Include common/pathstuff.h.
143
144 2018-10-28  Andrew Burgess  <andrew.burgess@embecosm.com>
145
146         * riscv-linux-nat.c (riscv_linux_nat_target::fetch_registers):
147         Add missing braces.  No functional change.
148
149 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
150
151         * macrocmd.c (info_macro_command): Use report_unrecognized_option_error
152         to report a bad option and fix indentation.
153         * demangle.c (demangle_command): Use report_unrecognized_option_error
154         to report a bad option and correctly report the bad option.
155
156 2018-10-27  Tom Tromey  <tom@tromey.com>
157
158         PR cli/23364:
159         * darwin-nat.c (copied_shell): New global.
160         (may_have_sip): Rename from should_disable_startup_with_shell.
161         (copy_shell_to_cache, maybe_cache_shell): New functions.
162         (darwin_nat_target::create_inferior): Update.  Use
163         copied_shell.
164
165 2018-10-27  Tom Tromey  <tom@tromey.com>
166
167         * unittests/scoped_fd-selftests.c (test_to_file): New function.
168         (run_tests): Call test_to_file.
169         * dwarf-index-write.c (write_psymtabs_to_index): Do not reopen
170         temporary files.
171         * common/scoped_fd.h (scoped_fd::to_file): New method.
172
173 2018-10-27  Tom Tromey  <tom@tromey.com>
174
175         * unittests/scoped_mmap-selftests.c (test_normal): Use
176         gdb_mkostemp_cloexec.
177         * unittests/scoped_fd-selftests.c (test_destroy, test_release):
178         Use gdb_mkostemp_cloexec.
179         * gnulib/aclocal-m4-deps.mk, gnulib/aclocal.m4,
180         gnulib/config.in, gnulib/configure,
181         gnulib/import/Makefile.am, gnulib/import/Makefile.in,
182         gnulib/import/m4/gnulib-cache.m4,
183         gnulib/import/m4/gnulib-comp.m4: Update.
184         * gnulib/import/m4/mkostemp.m4: New file.
185         * gnulib/import/m4/mkstemp.m4: Remove.
186         * gnulib/import/mkostemp.c: New file.
187         * gnulib/import/mkstemp.m4: Remove.
188         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Remove
189         mkstemp, add mkostemp.  Apply new patch.
190         * gnulib/import/stdlib.in.h: Apply patch.
191         * gnulib/patches/0002-mkostemp-mkostemps-Fix-compilation-error-in-C-mode-o.patch:
192         New file.
193         * dwarf-index-write.c (write_psymtabs_to_index): Use
194         gdb_mkostemp_cloexec.
195         * common/filestuff.h (gdb_mkostemp_cloexec): New function.
196
197 2018-10-27  Tom Tromey  <tom@tromey.com>
198
199         * unittests/mkdir-recursive-selftests.c: New file.
200         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
201         unittests/mkdir-recursive-selftests.c.
202         * dwarf-index-cache.c (mkdir_recursive): Move to
203         common/filestuff.c.
204         (index_cache::store): Check return value of mkdir_recursive.
205         (create_dir_and_check, test_mkdir_recursive): Move to new file.
206         (_initialize_index_cache): Don't register test.
207         * common/filestuff.h (mkdir_recursive): Declare.
208         * common/filestuff.c (mkdir_recursive): Move from
209         dwarf-index-cache.c.  Return bool.
210
211 2018-10-27  Tom Tromey  <tom@tromey.com>
212
213         * dwarf-index-write.c (write_psymtabs_to_index): Move
214         make_temp_filename to common/pathstuff.c.
215         * common/pathstuff.h (make_temp_filename): Declare.
216         * common/pathstuff.c (make_temp_filename): New function, moved
217         from dwarf-index-write.c.
218
219 2018-10-27  Tom Tromey  <tom@tromey.com>
220
221         * procfs.c (procfs_target::create_inferior): Use get_shell.
222         * cli/cli-cmds.c (shell_escape): Use get_shell.
223         * windows-nat.c (windows_nat_target::create_inferior): Use
224         get_shell.
225         * common/pathstuff.c (get_shell): New function.
226         * nat/fork-inferior.c (SHELL_FILE, get_startup_shell): Remove.
227         (fork_inferior): Use get_shell.
228         * common/pathstuff.h (get_shell): Declare.
229
230 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
231
232         * NEWS: Mention changes to 'info [args|functions|locals|variables]'
233
234 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
235
236         * stack.c (print_variable_and_value_data): Add preg and treg.
237         (print_frame_local_vars): Add quiet, regexp and t_regexp arguments,
238         and update callers.
239         (print_frame_arg_vars): Likewise.
240         (prepare_reg): New function.
241         (info_locals_command): Extract info print args and use them.
242         (info_args_command): Likewise.
243         (_initialize_stack): Modify on-line help.
244         * symtab.c (treg_matches_sym_type_name): New function.
245         (search_symbols): New arg t_regexp.
246         (symtab_symbol_info): New args quiet, regexp, t_regexp.
247         (info_variables_command): Extract info print args and use them.
248         (info_functions_command): Likewise.
249         (info_types_command): Update call to symtab_symbol_info.
250         (_initialize_symtab): Modify on-line help.
251         * symtab.h (treg_matches_sym_type_name): New function.
252         (search_symbols): New t_regexp arg.
253
254 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
255
256         * cli-utils.c (extract_arg_maybe_quoted): New function.
257         (extract_info_print_args): New function.
258         (info_print_args_help): New function.
259         (report_unrecognized_option_error): New function.
260         * cli-utils.h (extract_arg_maybe_quoted): New function.
261         (extract_info_print_args): New function.
262         (info_print_args_help): New function.
263         (report_unrecognized_option_error): New function.
264
265 2018-10-26  Tom Tromey  <tom@tromey.com>
266
267         * dwarf2read.c (recursively_compute_inclusions): Use std::vector.
268         (compute_compunit_symtab_includes): Update.
269         * symtab.h: (symtab_ptr): Remove typedef.  Don't define a VEC.
270         (compunit_symtab_ptr): Likewise.
271
272 2018-10-26  John Baldwin  <jhb@FreeBSD.org>
273
274         * fbsd-tdep.c (fbsd_print_auxv_entry): Only use
275         default_print_auxv_entry for specific tag values.
276
277 2018-10-26  John Baldwin  <jhb@FreeBSD.org>
278
279         * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_FREEBSD_HWCAP2.
280
281 2018-10-26  Jim Wilson  <jimw@sifive.com>
282
283         * riscv-linux-tdep.c: Include tramp-frame.h and trad-frame.h.
284         (riscv_linux_sigframe_init): Declare.
285         (RISCV_INST_LI_A7_SIGRETURN, RISCV_INT_ECALL): New.
286         (riscv_linux_sigframe): New.
287         (SIGFRAME_SIGINFO_SIZE, UCONTEXT_MCONTEXT_OFFSET): New.
288         (riscv_linux_sigframe_init): Define.
289         (riscv_linux_init_abi): Call tramp_frame_prepend_unwinder.
290
291         * riscv-tdep.c (riscv_isa_xlen): Refer to riscv-tdep.h comment.
292         (riscv_isa_flen): Likewise.  Drop static.
293         * riscv-tdep.h (riscv_isa_xlen): Move riscv-tdep.c comment to here.
294         (riscv_isa_flen): Likewise.  Declare.
295
296 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
297             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
298
299         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa207_htm_vsx32l)
300         (tdesc_powerpc_isa207_htm_vsx64l): Declare.
301         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_TM_SPRREGSET)
302         (PPC32_LINUX_SIZEOF_CGPRREGSET, PPC64_LINUX_SIZEOF_CGPRREGSET)
303         (PPC_LINUX_SIZEOF_CFPRREGSET, PPC_LINUX_SIZEOF_CVMXREGSET)
304         (PPC_LINUX_SIZEOF_CVSXREGSET, PPC_LINUX_SIZEOF_CPPRREGSET)
305         (PPC_LINUX_SIZEOF_CDSCRREGSET, PPC_LINUX_SIZEOF_CTARREGSET):
306         Define.
307         (struct ppc_linux_features) <htm>: New field.
308         (ppc_linux_no_features): Add initializer for htm field.
309         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
310         new tdescs.
311         * nat/ppc-linux.h (PPC_FEATURE2_HTM, NT_PPC_TM_CGPR)
312         (NT_PPC_TM_CFPR, NT_PPC_TM_CVMX, NT_PPC_TM_CVSX)
313         (NT_PPC_TM_SPR, NT_PPC_TM_CTAR, NT_PPC_TM_CPPR, NT_PPC_TM_CDSCR):
314         Define if not already defined.
315         * features/Makefile (WHICH): Add rs6000/powerpc-isa207-htm-vsx32l
316         and rs6000/powerpc-isa207-htm-vsx64l.
317         (XMLTOC): Add rs6000/powerpc-isa207-htm-vsx32l.xml and
318         rs6000/powerpc-isa207-htm-vsx64l.xml.
319         * features/rs6000/power-htm-spr.xml: New file.
320         * features/rs6000/power-htm-core.xml: New file.
321         * features/rs6000/power64-htm-core.xml: New file.
322         * features/rs6000/power-htm-fpu.xml: New file.
323         * features/rs6000/power-htm-altivec.xml: New file.
324         * features/rs6000/power-htm-vsx.xml: New file.
325         * features/rs6000/power-htm-ppr.xml: New file.
326         * features/rs6000/power-htm-dscr.xml: New file.
327         * features/rs6000/power-htm-tar.xml: New file.
328         * features/rs6000/powerpc-isa207-htm-vsx32l.xml: New file.
329         * features/rs6000/powerpc-isa207-htm-vsx64l.xml: New file.
330         * features/rs6000/powerpc-isa207-htm-vsx32l.c: Generate.
331         * features/rs6000/powerpc-isa207-htm-vsx64l.c: Generate.
332         * regformats/rs6000/powerpc-isa207-htm-vsx32l.dat: Generate.
333         * regformats/rs6000/powerpc-isa207-htm-vsx64l.dat: Generate.
334         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
335         fetch_regset with HTM regsets.
336         (store_register, store_ppc_registers): Call store_regset with HTM
337         regsets.
338         (ppc_linux_nat_target::read_description): Set htm field in the
339         features struct if needed.
340         * ppc-linux-tdep.c: Include
341         features/rs6000/powerpc-isa207-htm-vsx32l.c and
342         features/rs6000/powerpc-isa207-htm-vsx64l.c.
343         (ppc32_regmap_tm_spr, ppc32_regmap_cgpr, ppc64_le_regmap_cgpr)
344         (ppc64_be_regmap_cgpr, ppc32_regmap_cfpr, ppc32_le_regmap_cvmx)
345         (ppc32_be_regmap_cvmx, ppc32_regmap_cvsx, ppc32_regmap_cppr)
346         (ppc32_regmap_cdscr, ppc32_regmap_ctar): New globals.
347         (ppc32_linux_tm_sprregset, ppc32_linux_cgprregset)
348         (ppc64_be_linux_cgprregset, ppc64_le_linux_cgprregset)
349         (ppc32_linux_cfprregset, ppc32_le_linux_cvmxregset)
350         (ppc32_be_linux_cvmxregset, ppc32_linux_cvsxregset)
351         (ppc32_linux_cpprregset, ppc32_linux_cdscrregset)
352         (ppc32_linux_ctarregset): New globals.
353         (ppc_linux_cgprregset, ppc_linux_cvmxregset): New functions.
354         (ppc_linux_collect_core_cpgrregset): New function.
355         (ppc_linux_iterate_over_regset_sections): Call back with the htm
356         regsets.
357         (ppc_linux_core_read_description): Check if the tm spr section is
358         present and set htm in the features struct.
359         (_initialize_ppc_linux_tdep): Call
360         initialize_tdesc_powerpc_isa207_htm_vsx32l and
361         initialize_tdesc_powerpc_isa207_htm_vsx64l.
362         * ppc-linux-tdep.h (ppc_linux_cgprregset, ppc_linux_cvmxregset):
363         Declare.
364         (ppc32_linux_tm_sprregset, ppc32_linux_cfprregset)
365         (ppc32_linux_cvsxregset, ppc32_linux_cpprregset)
366         (ppc32_linux_cdscrregset, ppc32_linux_ctarregset): Declare.
367         * ppc-tdep.h (struct gdbarch_tdep) <have_htm_spr, have_htm_core>:
368         New fields.
369         <have_htm_fpu, have_htm_altivec, have_htm_vsx>:
370         Likewise.
371         <ppc_cppr_regnum, ppc_cdscr_regnum, ppc_ctar_regnum>: Likewise.
372         <ppc_cdl0_regnum, ppc_cvsr0_regnum, ppc_cefpr0_regnum>: Likewise.
373         (enum) <PPC_TFHAR_REGNUM, PPC_TEXASR_REGNUM, PPC_TFIAR_REGNUM>:
374         New enum fields.
375         <PPC_CR0_REGNUM, PPC_CCR_REGNUM, PPC_CXER_REGNUM>: Likewise.
376         <PPC_CLR_REGNUM, PPC_CCTR_REGNUM, PPC_CF0_REGNUM>: Likewise.
377         <PPC_CFPSCR_REGNUM, PPC_CVR0_REGNUM, PPC_CVSCR_REGNUM>: Likewise.
378         <PPC_CVRSAVE_REGNUM, PPC_CVSR0_UPPER_REGNUM>: Likewise.
379         <PPC_CPPR_REGNUM, PPC_CDSCR_REGNUM>: Likewise.
380         <PPC_CTAR_REGNUM>: Likewise.
381         (PPC_IS_TMSPR_REGNUM, PPC_IS_CKPTGP_REGNUM, PPC_IS_CKPTFP_REGNUM)
382         (PPC_IS_CKPTVMX_REGNUM, PPC_IS_CKPTVSX_REGNUM): Define.
383         * rs6000-tdep.c (IS_CDFP_PSEUDOREG, IS_CVSX_PSEUDOREG)
384         (IS_CEFP_PSEUDOREG): Define.
385         (rs6000_register_name): Hide the upper halves of checkpointed VSX
386         registers.  Return names for the checkpointed DFP, VSX, and EFP
387         pseudo registers.
388         (rs6000_pseudo_register_type): Remove initial assert and raise an
389         internal error in the else clause instead.  Return types for the
390         checkpointed DFP, VSX, and EFP pseudo registers.
391         (dfp_pseudo_register_read, dfp_pseudo_register_write): Handle
392         checkpointed DFP pseudo registers.
393         (vsx_pseudo_register_read, vsx_pseudo_register_write): Handle
394         checkpointed VSX pseudo registers.
395         (efp_pseudo_register_read, efp_pseudo_register_write): Rename
396         from efpr_pseudo_register_read and
397         efpr_pseudo_register_write.  Handle checkpointed EFP pseudo
398         registers.
399         (rs6000_pseudo_register_read, rs6000_pseudo_register_write):
400         Handle checkpointed DFP, VSX, and EFP registers.
401         (dfp_ax_pseudo_register_collect, vsx_ax_pseudo_register_collect)
402         (efp_ax_pseudo_register_collect): New functions.
403         (rs6000_ax_pseudo_register_collect): Move DFP, VSX and EFP pseudo
404         register logic to new functions.  Handle checkpointed DFP, VSX,
405         and EFP pseudo registers.
406         (rs6000_gdbarch_init): Look for and validate the htm features.
407         Include checkpointed DFP, VSX and EFP pseudo-registers.
408         * NEWS: Mention access to PPR, DSCR, TAR, EBB/PMU registers and
409         HTM registers.
410
411 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
412
413         * rs6000-tdep.c (rs6000_gdbarch_init): Reject tdescs with vsx but
414         without altivec or fpu.
415
416 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
417             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
418
419         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_EBBREGSET)
420         (PPC_LINUX_SIZEOF_PMUREGSET): Declare.
421         * nat/ppc-linux.h (PPC_FEATURE2_EBB, NT_PPC_EBB, NT_PPC_PMU):
422         Define if not already defined.
423         * features/rs6000/power-ebb.xml: New file.
424         * features/rs6000/power-linux-pmu.xml: New file.
425         * features/rs6000/powerpc-isa207-vsx32l.xml: Include ebb and pmu
426         features.
427         * features/rs6000/powerpc-isa207-vsx64l.xml: Likewise.
428         * features/rs6000/powerpc-isa207-vsx32l.c: Re-generate.
429         * features/rs6000/powerpc-isa207-vsx64l.c: Re-generate.
430         * regformats/rs6000/powerpc-isa207-vsx32l.dat: Re-generate.
431         * regformats/rs6000/powerpc-isa207-vsx64l.dat: Re-generate.
432         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
433         fetch_regset with ebb and pmu regsets.
434         (store_register, store_ppc_registers): Call store_regset with ebb
435         and pmu regsets.
436         (ppc_linux_nat_target::read_description): Set isa207 field in the
437         features struct if ebb and pmu are avaiable.
438         * ppc-linux-tdep.c (ppc32_regmap_ebb, ppc32_regmap_pmu)
439         (ppc32_linux_ebbregset, ppc32_linux_pmuregset): New globals.
440         (ppc_linux_iterate_over_regset_sections): Call back with the ebb
441         and pmu regsets.
442         (ppc_linux_core_read_description): Check if the pmu section is
443         present and set isa207 in the features struct.
444         * ppc-linux-tdep.h (ppc32_linux_ebbregset)
445         (ppc32_linux_pmuregset): Declare.
446         * ppc-tdep.h (struct gdbarch_tdep) <ppc_mmcr0_regnum>: New field.
447         <ppc_mmcr2_regnum, ppc_siar_regnum, ppc_sdar_regnum>: New fields.
448         <ppc_sier_regnum>: New field.
449         (enum): <PPC_BESCR_REGNUM, PPC_EBBHR_REGNUM, PPC_EBBRR_REGNUM>:
450         New enum values.
451         <PPC_MMCR0_REGNUM, PPC_MMCR2_REGNUM, PPC_SIAR_REGNUM>: New enum
452         values.
453         <PPC_SDAR_REGNUM, PPC_SIER_REGNUM>: New enum values.
454         (PPC_IS_EBB_REGNUM, PPC_IS_PMU_REGNUM): Define.
455         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate the
456         ebb and pmu features.
457
458 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
459             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
460
461         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa207_vsx32l)
462         (tdesc_powerpc_isa207_vsx64l): Declare.
463         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_TARREGSET): Define.
464         (struct ppc_linux_features) <isa207>: New field.
465         (ppc_linux_no_features): Add initializer for isa207 field.
466         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
467         new tdescs.
468         * nat/ppc-linux.h (PPC_FEATURE2_ARCH_2_07, PPC_FEATURE2_TAR)
469         (NT_PPC_TAR): Define if not already defined.
470         * features/Makefile (WHICH): Add rs6000/powerpc-isa207-vsx32l and
471         rs6000/powerpc-isa207-vsx64l.
472         (XMLTOC): Add rs6000/powerpc-isa207-vsx32l.xml and
473         rs6000/powerpc-isa207-vsx64l.xml.
474         * features/rs6000/power-tar.xml: New file.
475         * features/rs6000/powerpc-isa207-vsx32l.xml: New file.
476         * features/rs6000/powerpc-isa207-vsx64l.xml: New file.
477         * features/rs6000/powerpc-isa207-vsx32l.c: Generate.
478         * features/rs6000/powerpc-isa207-vsx64l.c: Generate.
479         * regformats/rs6000/powerpc-isa207-vsx32l.dat: Generate.
480         * regformats/rs6000/powerpc-isa207-vsx64l.dat: Generate.
481         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
482         fetch_regset with the TAR regset.
483         (store_register, store_ppc_registers): Call store_regset with the
484         TAR regset.
485         (ppc_linux_nat_target::read_description): Set isa207 field in the
486         features struct if needed.
487         * ppc-linux-tdep.c: Include
488         features/rs6000/powerpc-isa207-vsx32l.c and
489         features/rs6000/powerpc-isa207-vsx64l.c.
490         (ppc32_regmap_tar, ppc32_linux_tarregset): New globals.
491         (ppc_linux_iterate_over_regset_sections): Call back with the tar
492         regset.
493         (ppc_linux_core_read_description): Check if the tar section is
494         present and set isa207 in the features struct.
495         (_initialize_ppc_linux_tdep): Call
496         initialize_tdesc_powerpc_isa207_vsx32l and
497         initialize_tdesc_powerpc_isa207_vsx64l.
498         * ppc-linux-tdep.h (ppc32_linux_tarregset): Declare.
499         * ppc-tdep.h (gdbarch_tdep) <ppc_tar_regnum>: New field.
500         (enum) <PPC_TAR_REGNUM>: New enum value.
501         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate tar
502         feature.
503         (ppc_process_record_op31): Record changes to TAR.
504
505 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
506             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
507
508         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa205_ppr_dscr_vsx32l)
509         (tdesc_powerpc_isa205_ppr_dscr_vsx64l): Declare.
510         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_PPRREGSET)
511         (PPC_LINUX_SIZEOF_DSCRREGSET): Define.
512         (struct ppc_linux_features) <ppr_dscr>: New field.
513         (ppc_linux_no_features): Add initializer for ppr_dscr field.
514         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
515         new tdescs.
516         * nat/ppc-linux.h (PPC_FEATURE2_DSCR, NT_PPC_PPR, NT_PPC_DSCR):
517         Define if not already defined.
518         * features/Makefile (WHICH): Add
519         rs6000/powerpc-isa205-ppr-dscr-vsx32l and
520         rs6000/powerpc-isa205-ppr-dscr-vsx64l.
521         (XMLTOC): Add rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
522         rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml.
523         * features/rs6000/power-dscr.xml: New file.
524         * features/rs6000/power-ppr.xml: New file.
525         * features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml: New file.
526         * features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml: New file.
527         * features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c: Generate.
528         * features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c: Generate.
529         * regformats/rs6000/powerpc-isa205-ppr-dscr-vsx32l.dat: Generate.
530         * regformats/rs6000/powerpc-isa205-ppr-dscr-vsx64l.dat: Generate.
531         * ppc-linux-nat.c: Include <sys/uio.h>.
532         (fetch_regset, store_regset, check_regset): New functions.
533         (fetch_register, fetch_ppc_registers): Call fetch_regset with
534         DSCR and PPR regsets.
535         (store_register, store_ppc_registers): Call store_regset with
536         DSCR and PPR regsets.
537         (ppc_linux_get_hwcap2): New function.
538         (ppc_linux_nat_target::read_description): Call
539         ppc_linux_get_hwcap2 and check_regset, set ppr_dscr field in the
540         features struct if needed.
541         * ppc-linux-tdep.c: Include
542         features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c and
543         features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c.
544         (ppc32_regmap_ppr, ppc32_regmap_dscr, ppc32_linux_pprregset)
545         (ppc32_linux_dscrregset): New globals.
546         (ppc_linux_iterate_over_regset_sections): Call back with the ppr
547         and dscr regsets.
548         (ppc_linux_core_read_description): Check if the ppr and dscr
549         sections are present and set ppr_dscr in the features struct.
550         (_initialize_ppc_linux_tdep): Call
551         initialize_tdesc_powerpc_isa205_ppr_dscr_vsx32l and
552         initialize_tdesc_powerpc_isa205_ppr_dscr_vsx64l.
553         * ppc-linux-tdep.h (ppc32_linux_pprregset)
554         (ppc32_linux_dscrregset): Declare.
555         * ppc-tdep.h (struct gdbarch_tdep) <ppc_ppr_regnum>: New field.
556         <ppc_dscr_regnum>: New field.
557         (enum) <PPC_PPR_REGNUM, PPC_DSCR_REGNUM>: New enum values.
558         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate ppr
559         and dscr features.
560         (ppc_process_record_op31): Record changes to PPR and DSCR.
561
562 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
563
564         * rs6000-tdep.c (rs6000_gdbarch_init): Replace line wrapping by a
565         second initializer line for the have_* variables.  Initialize
566         have_fpu to 0 instead of 1.
567
568 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
569
570         * arch/ppc-linux-common.c (ppc_linux_match_description):
571         Parenthesize tdesc assignements and indent them properly.
572
573 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
574
575         * ppc-linux-nat.c (fetch_register): Change if statement to else
576         if.
577         (store_register): Likewise.
578
579 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
580
581         * rs6000-tdep.c: Remove reggroups.h include.
582         (rs6000_pseudo_register_reggroup_p): Remove.
583         (rs6000_gdbarch_init): Remove call to
584         set_tdesc_pseudo_register_reggroup_p.
585
586 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
587
588         * reggroups.c (default_register_reggroup_p): Return true for
589         decfloat registers and float_reggroup.
590
591 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
592
593         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): Remove.
594         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): Replace
595         ppc_linux_collect_vrregset by regcache_collect_regset.
596
597 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
598
599         * linux-tdep.c (linux_collect_regset_section_cb): Use
600         std::vector<gdb_byte> instead of char * and malloc for buf.
601         Remove xfree.
602
603 2018-10-26  Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
604
605         * xcoffread.c (read_xcoff_symtab): Pass deduced language to
606         symtab_start instead of always using language_unknown.
607
608 2018-10-26  Andrew Burgess  <andrew.burgess@embecosm.com>
609
610         * riscv-tdep.c (riscv_read_misa_reg): Update comment, remove
611         READ_P parameter, catch and ignore register access errors from
612         either the old or new MISA location.
613         (riscv_has_feature): Update call to riscv_read_misa_reg.
614
615 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
616
617         * python/py-function.c (convert_values_to_python): Return
618         gdbpy_ref<>.  Add header comment.
619         (fnpy_call): Adjust.
620
621 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
622
623         * python/py-cmd.c (cmdpy_completer_helper): Return gdbpy_ref<>.
624         (cmdpy_completer_handle_brkchars): Adjust.
625         (cmdpy_completer): Adjust.
626
627 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
628
629         * riscv-linux-nat.c (riscv_linux_nat_target::fetch_registers):
630         Pass correct regnum to raw_supply_zeroed.
631
632 2018-10-23  Hafiz Abid Qadeer  <abidh@codesourcery.com>
633
634         * regcache.c (cooked_read_test): Add CSKY to the list of
635         architectures with a save_reggroup
636
637 2018-10-23  Simon Marchi  <simon.marchi@polymtl.ca>
638
639         PR gdb/23368
640         * infrun.c (follow_exec): In the follow_exec_mode_new case,
641         transfer terminal state from old new new inferior.
642         * terminal.h (swap_terminal_info): New function.
643         * inflow.c (swap_terminal_info): New function.
644
645 2018-10-23  Tom Tromey  <tom@tromey.com>
646
647         * record-btrace.c (get_thread_current_frame_id): Rename from
648         get_thread_current_frame.  Return a frame_id.
649         (record_btrace_start_replaying): Update.
650
651 2018-10-23  Andrew Burgess  <andrew.burgess@embecosm.com>
652
653         * riscv-tdep.c (riscv_register_name): Use the user-friendly names
654         for CSRs.
655
656 2018-10-23  Joel Brobecker  <brobecker@adacore.com>
657
658         * riscv-tdep.c (riscv_gdbarch_init): Set the gdbarch's
659         have_nonsteppable_watchpoint attribute to 1.
660
661 2018-10-23  Andrew Burgess  <andrew.burgess@embecosm.com>
662
663         * riscv-tdep.c (riscv_gdb_reg_names): Update comment, and all
664         register names.
665         (struct register_alias): Rename to...
666         (struct riscv_register_alias): ...this, and update comment.
667         (riscv_register_aliases): Update type, and alias names.  Remove
668         CSR names from this list.
669         (riscv_register_name): Use riscv_gdb_reg_names for int and float
670         register names.  Add an extra assertion.
671         (riscv_is_regnum_a_named_csr): New function.
672         (riscv_register_reggroup_p): Use riscv_is_regnum_a_named_csr.
673
674 2018-10-22  Jim Wilson  <jimw@sifive.com>
675
676         * riscv-tdep.c (riscv_push_dummy_call) <in_reg>: Check for value in
677         FP reg smaller than FP reg size, and fill with -1 instead of 0.
678
679         * riscv-tdep.c (riscv_fpreg_d_type, riscv_fpreg_q_type): New.
680         (riscv_register_type): Use them.
681         (riscv_print_one_register_info): Handle union of floats same as float.
682         * riscv-tdep.h (struct gdbarch_tdep): Add riscv_fpreg_d_type and
683         riscv_fpreg_q_type fields.
684
685 2018-10-21  Simon Marchi  <simon.marchi@ericsson.com>
686
687         * gdbarch.sh (gdbarch_num_cooked_regs): New.
688         * gdbarch.h: Re-generate.
689         * ax-gdb.c (gen_expr): Use gdbarch_num_cooked_regs.
690         * dwarf2-frame.c (dwarf2_frame_cache): Likewise.
691         * eval.c (evaluate_subexp_standard): Likewise.
692         * findvar.c (value_of_register): Likewise.
693         (value_of_register_lazy): Likewise.
694         (address_from_register): Likewise.
695         * frame.c (get_frame_register_bytes): Likewise.
696         * gdbarch-selftests.c (register_to_value_test): Likewise.
697         * h8300-tdep.c (h8300_register_type): Likewise.
698         * i386-tdep.c (i386_dbx_reg_to_regnum): Likewise.
699         (i386_svr4_reg_to_regnum): Likewise.
700         * infcmd.c (default_print_registers_info): Likewise.
701         (registers_info): Likewise.
702         (print_vector_info): Likewise.
703         (default_print_float_info): Likewise.
704         * m68hc11-tdep.c (m68hc11_frame_unwind_cache): Likewise.
705         * mdebugread.c (mdebug_reg_to_regnum): Likewise.
706         * mi/mi-main.c (mi_cmd_data_list_register_names): Likewise.
707         (mi_cmd_data_list_changed_registers): Likewise.
708         (mi_cmd_data_list_register_values): Likewise.
709         (mi_cmd_data_write_register_values): Likewise.
710         (mi_cmd_trace_frame_collected): Likewise.
711         * mips-tdep.c (print_gp_register_row): Likewise.
712         (mips_print_registers_info): Likewise.
713         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
714         * regcache.c (init_regcache_descr): Likewise.
715         (register_size): Likewise.
716         (register_dump::dump): Likewise.
717         (cooked_read_test): Likewise.
718         (cooked_write_test): Likewise.
719         * rs6000-tdep.c (rs6000_register_sim_regno): Likewise.
720         (rs6000_gdbarch_init): Likewise.
721         * stabsread.c (stab_reg_to_regnum): Likewise.
722         * stack.c (info_frame_command): Likewise.
723         * target-descriptions.c (tdesc_register_name): Likewise.
724         * trad-frame.c (trad_frame_alloc_saved_regs): Likewise.
725         * tui/tui-regs.c (tui_show_register_group): Likewise.
726         * user-regs.c (user_reg_map_name_to_regnum): Likewise.
727         (user_reg_map_regnum_to_name): Likewise.
728         (value_of_user_reg): Likewise.
729         (maintenance_print_user_registers): Likewise.
730         * xtensa-tdep.c (xtensa_find_register_by_name): Likewise.
731         (xtensa_register_name): Likewise.
732         (xtensa_register_type): Likewise.
733         (xtensa_reg_to_regnum): Likewise.
734         (xtensa_pseudo_register_read): Likewise.
735         (xtensa_pseudo_register_write): Likewise.
736
737 2018-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
738
739         * amd64-tdep.c (amd64_pseudo_register_read_value): Use
740         correctly-sized buffer with raw_read.
741         (amd64_pseudo_register_write): Use correctly-sized buffer for
742         raw_read/raw_write.
743
744 2018-10-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
745
746         * typeprint.c (_initialize_typeprint): Fix wrong prefixname arg
747         in add_prefix_cmd of set print type.
748
749 2018-10-19  Tom Tromey  <tom@tromey.com>
750
751         PR tui/18388:
752         * NEWS: Mention tabset deprecation.
753         * tui/tui-win.c (tui_tab_width, internal_tab_width): New globals.
754         (update_tab_width): New function.
755         (tui_set_tab_width, tui_show_tab_width): New functions.
756         (tui_set_tab_width_command): Use update_tab_width.
757         (_initialize_tui_win): Move to end of file.  Deprecate "tabset".
758         Add new "set tui tab-width" command.
759         * tui/tui-source.c (tui_set_source_content): Update.
760         * tui/tui-disasm.c (tui_set_disassem_content): Update.
761         * tui/tui-data.h (tui_default_tab_len, tui_set_default_tab_len):
762         Don't declare.
763         (tui_tab_width): Declare.
764         * tui/tui-data.c (default_tab_len, tui_default_tab_len)
765         (tui_set_default_tab_len): Remove.
766
767 2018-10-19  Tom Tromey  <tom@tromey.com>
768
769         * tui/tui-io.h (key_is_start_sequence, key_is_end_sequence)
770         (key_is_backspace, tui_getc): Don't declare.
771         * tui/tui-io.c (key_is_start_sequence): Now static.
772         (key_is_end_sequence, key_is_backspace): Remove.
773         (tui_getc): Now static.
774
775 2018-10-19  Tom Tromey  <tom@tromey.com>
776
777         * symfile.c (reread_symbols): Clear "static_links".
778
779 2018-10-19  Alan Hayward  <alan.hayward@arm.com>
780
781         * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_SIZE): New
782         define.
783         (aarch64_linux_sigframe_init): Extra boundary checks.
784
785 2018-10-19  Andreas Arnez  <arnez@linux.ibm.com>
786
787         * s390-tdep.c (s390_pseudo_register_type): For v0-v15 don't yield
788         the possibly non-existent tdesc type 'vec128', but the type of raw
789         register v16 instead.
790
791 2018-10-19  Gary Benson <gbenson@redhat.com>
792
793         * cli/cli-interp.c (cli_interp::~cli_interp): New function.
794
795 2018-10-18  Sergio Durigan Junior  <sergiodj@redhat.com>
796
797         PR cli/23785
798         * cli/cli-dump.c (restore_binary_file): Check if "file" is
799         NULL.
800
801 2018-10-17  Paul Koning  <paul_koning@dell.com>
802
803         * charset.c (convert_between_encodings): Fix unsigned overflow.
804
805 2018-10-17  John Baldwin  <jhb@FreeBSD.org>
806
807         * fbsd-nat.c (fbsd_nat_target::info_proc) Use
808         fbsd_info_proc_mappings_header and fbsd_info_proc_mappings_entry.
809         * fbsd-tdep.c (fbsd_vm_map_entry_flags): Mark static.
810         (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
811         New functions.
812         (fbsd_core_info_proc_mappings): Use fbsd_info_proc_mappings_header
813         and fbsd_info_proc_mappings_header.
814         * fbsd-tdep.h (fbsd_vm_map_entry_flags): Remove.
815         (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
816         New.
817
818 2018-10-17  Joel Brobecker  <brobecker@adacore.com>
819
820         * MAINTAINERS (Responsible Maintainers): Add Rainer Orth as
821         Solaris Maintainer.
822
823 2018-10-15  Tom Tromey  <tom@tromey.com>
824
825         * tui/tui.c (strcat_to_buf): Remove casts.
826         * tui/tui-winsource.c (tui_show_source_line)
827         (tui_set_is_exec_point_at, tui_line_is_displayed): Remove casts.
828         * tui/tui-wingeneral.c (tui_refresh_win, box_win): Remove casts.
829         * tui/tui-windata.c (tui_first_data_item_displayed)
830         (tui_delete_data_content_windows, tui_erase_data_content)
831         (tui_display_all_data, tui_display_data_from)
832         (tui_refresh_data_win, tui_vertical_data_scroll): Remove casts.
833         * tui/tui-win.c (tui_set_win_height)
834         (make_invisible_and_set_new_height, parse_scrolling_args): Remove
835         casts.
836         * tui/tui-win.c (tui_resize_all): Remove casts.
837         (tui_scroll_backward_command, tui_set_focus)
838         (tui_set_tab_width_command): Likewise.
839         * tui/tui-source.c (tui_vertical_source_scroll): Remove cast.
840         * tui/tui-regs.c (tui_show_register_group): Remove cast.
841         * tui/tui-layout.c (tui_set_layout_by_name): Remove cast.
842         * tui/tui-disasm.c (tui_vertical_disassem_scroll): Remove cast.
843         * tui/tui-data.c (tui_partial_win_by_name, tui_free_win_content):
844         Remove casts.
845
846 2018-10-15  Simon Marchi  <simon.marchi@ericsson.com>
847
848         * MAINTAINERS (Responsible Maintainers): Add Alan Hayward as
849         AArch64/ARM maintainer.
850
851 2018-10-11  Gary Benson <gbenson@redhat.com>
852
853         * interps.h (interp::m_name): Make private and mutable.
854         * interps.c (interp::~interp): Free m_name.
855
856 2018-10-10  Sergio Durigan Junior  <sergiodj@redhat.com>
857             Simon Marchi <simark@simark.ca>
858
859         * README (`configure' options): Add documentation for new
860         "--enable-unit-tests" option.
861         * acinclude.m4: Include "selftest.m4".
862         * configure: Regenerate.
863         * configure.ac: Use "GDB_AC_SELFTEST".
864         * maint.c (maintenance_selftest): Update message informing
865         that selftests have been disabled.
866         (maintenance_info_selftests): Likewise.
867         * selftest.m4: New file.
868
869 2018-10-10  Gary Benson <gbenson@redhat.com>
870
871         * remote.c (remote_target::remote_send_printf): Add
872         missing va_end found by Coverity.
873
874 2018-10-10  Markus Metzger  <markus.t.metzger@intel.com>
875
876         * btrace.c (ftrace_update_function): Add indirect jump heuristic.
877
878 2018-10-09  Tom Tromey  <tom@tromey.com>
879
880         * configure: Rebuild.
881         * sanitize.m4 (AM_GDB_UBSAN): Default to no.
882         * NEWS: Update --enable-ubsan documentation.
883
884 2018-10-09  Gary Benson <gbenson@redhat.com>
885
886         * dwarf2read.c (create_dwp_hash_table): Fix buffer overrun
887         found by Coverity.
888
889 2018-10-08  Tom Tromey  <tom@tromey.com>
890
891         * riscv-fbsd-tdep.c (riscv_fbsd_sigframe_init): Remove unused
892         variable.
893         (riscv_fbsd_init_abi): Likewise.
894
895 2018-10-08  Weimin Pan  <weimin.pan@oracle.com>
896         * valops.c (value_struct_elt_for_reference): Rename local variable
897         to work around the shadowing a previous local warning.
898
899 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
900
901         * Makefile.in (ALLDEPFILES): Add riscv-fbsd-nat.c.
902         * NEWS: Mention new FreeBSD/riscv native configuration.
903         * configure.host: Add riscv*-*-freebsd*.
904         * configure.nat: Likewise.
905         * riscv-fbsd-nat.c: New file.
906
907 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
908
909         * Makefile.in (ALL_TARGET_OBS): Add riscv-fbsd-tdep.o.
910         (HFILES_NO_SRCDIR): Add riscv-fbsd-tdep.h.
911         (ALLDEPFILES): Add riscv-fbsd-tdep.c.
912         * NEWS: Mention new FreeBSD/riscv target.
913         * configure.tgt: Add riscv*-*-freebsd*.
914         * riscv-fbsd-tdep.c: New file.
915         * riscv-fbsd-tdep.h: New file.
916
917 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
918
919         * regcache.h (struct regcache_map_entry): Note that this type can
920         be used with traditional frame caches.
921         * trad-frame.c (trad_frame_set_reg_regmap): New.
922         * trad-frame.h (trad_frame_set_reg_regmap): New.
923
924 2018-10-08  Weimin Pan  <weimin.pan@oracle.com>
925
926         PR c++/16841
927         * valops.c (get_virtual_base_offset): New function.
928         (value_struct_elt_for_reference): Use it to get virtual base offset
929         and add it in calculating class member address.
930
931 2018-10-08   John Darrington <john@darrington.wattle.id.au>
932
933     * dwarf2read.c (dwarf2_cu) <producer_is_codewarrior>: New field.
934       (check_producer): Check if the producer is codewarrior.
935       (producer_is_codewarrior): New function.
936       (lnp_state_machine::record_line): Ignore is_stmt flag for records
937        produced by codewarrior.
938       (dwarf2_cu::dwarf2_cu): Initialize producer_is_codewarrior.
939
940 2018-10-06  Tom Tromey  <tom@tromey.com>
941
942         PR python/19399:
943         * python/py-inferior.c: Add "architecture" entry.
944         (infpy_architecture): New function.
945
946 2018-10-06  Tom Tromey  <tom@tromey.com>
947
948         PR python/21765:
949         * python/py-symbol.c (gdbpy_initialize_symbols): Redefine
950         SYMBOL_VARIABLES_DOMAIN, SYMBOL_FUNCTIONS_DOMAIN,
951         SYMBOL_TYPES_DOMAIN.  Define SYMBOL_MODULE_DOMAIN,
952         SYMBOL_COMMON_BLOCK_DOMAIN, SYMBOL_LOC_COMMON_BLOCK.
953
954 2018-10-06  Tom Tromey  <tom@tromey.com>
955
956         PR build/17077:
957         * Makefile.in (OPCODES_CFLAGS): Remove "-I$(OPCODES_SRC)/..".
958         * arc-tdep.c, frv-tdep.c, lm32-tdep.c, mep-tdep.c,
959         microblaze-tdep.c, or1k-tdep.h: Use ../opcodes, not opcodes, in
960         #include.
961
962 2018-10-06  Tom Tromey  <tom@tromey.com>
963
964         * python/py-breakpoint.c (bppy_get_location): Handle a
965         bp_breakpoint without a location.
966
967 2018-10-06  Tom Tromey  <tom@tromey.com>
968
969         * python/lib/gdb/function/strfns.py (_MemEq, _StrLen, _StrEq)
970         (_RegEx): Reformat help text.
971         * python/lib/gdb/function/caller_is.py (CallerIs, CallerMatches)
972         (AnyCallerIs, AnyCallerMatches): Reformat help text.
973         * python/lib/gdb/function/as_string.py (_AsString): Reformat help
974         text.
975         * python/lib/gdb/command/xmethods.py (InfoXMethod)
976         (EnableXMethod, DisableXMethod): Remove help indentation.
977         Capitalize meta-syntactic variables.
978         * python/lib/gdb/command/unwinders.py (InfoUnwinder)
979         (EnableUnwinder, DisableUnwinder): Remove help indentation.
980         Capitalize meta-syntactic variables.
981         * python/lib/gdb/command/explore.py (ExploreCommand)
982         (ExploreValueCommand, ExploreTypeCommand): Reformat help text.
983         * python/lib/gdb/command/type_printers.py (InfoTypePrinter)
984         (EnableTypePrinter, DisableTypePrinter): Remove help indentation.
985         * python/lib/gdb/command/pretty_printers.py (InfoPrettyPrinter):
986         Remove help indentation.
987         (EnablePrettyPrinter, DisablePrettyPrinter): Likewise.
988         * python/lib/gdb/command/frame_filters.py (EnableFrameFilter)
989         (DisableFrameFilter, SetFrameFilterPriority)
990         (ShowFrameFilterPriority, InfoFrameFilter): Reword help text.
991
992 2018-10-06  Tom Tromey  <tom@tromey.com>
993
994         PR tui/28819:
995         * tui/tui-io.c (gdb_wgetch): New function.
996         (tui_mld_getc, tui_getc): Use it.
997
998 2018-10-05  Tom Tromey  <tom@tromey.com>
999
1000         * sol-thread.c (sol_thread_target::wait): Rename inner
1001         "save_ptid".
1002
1003 2018-10-04  Tom Tromey  <tom@tromey.com>
1004
1005         * configure: Rebuild.
1006         * warning.m4 (AM_GDB_WARNINGS): Add -Wshadow=local.
1007
1008 2018-10-04  Tom Tromey  <tom@tromey.com>
1009
1010         * guile/scm-frame.c (gdbscm_frame_read_var): Remove inner
1011         declaration of "block".
1012
1013 2018-10-04  Tom Tromey  <tom@tromey.com>
1014
1015         * common/filestuff.c (fdwalk): Remove inner declaration of
1016         "result".
1017
1018 2018-10-04  Tom Tromey  <tom@tromey.com>
1019
1020         * msp430-tdep.c (msp430_push_dummy_call): Rename inner
1021         "structs_addr" and hoist declaration.
1022
1023 2018-10-04  Tom Tromey  <tom@tromey.com>
1024
1025         * linux-tdep.c (linux_make_mappings_corefile_notes): Introduce new
1026         variable "size".
1027
1028 2018-10-04  Tom Tromey  <tom@tromey.com>
1029
1030         * mdebugread.c (parse_partial_symbols): Use std::string.
1031
1032 2018-10-04  Tom Tromey  <tom@tromey.com>
1033
1034         * ctf.c (SET_ARRAY_FIELD): Rename "u32".
1035         * p-valprint.c (pascal_val_print): Split inner "i" variable.
1036         * xtensa-tdep.c (xtensa_push_dummy_call): Declare "i" in loop
1037         header.
1038         * xstormy16-tdep.c (xstormy16_push_dummy_call): Declare "val" in
1039         more inner scope.
1040         * xcoffread.c (read_xcoff_symtab): Rename inner "symbol".
1041         * varobj.c (varobj_update): Rename inner "newobj",
1042         "type_changed".
1043         * valprint.c (generic_emit_char): Rename inner "buf".
1044         * valops.c (find_overload_match): Rename inner "temp".
1045         (value_struct_elt_for_reference): Declare "v" in more inner
1046         scope.
1047         * v850-tdep.c (v850_push_dummy_call): Rename "len".
1048         * unittests/array-view-selftests.c (run_tests): Rename inner
1049         "vec".
1050         * tui/tui-stack.c (tui_show_frame_info): Declare "i" in loop
1051         header.
1052         * tracepoint.c (merge_uploaded_trace_state_variables): Declare
1053         "tsv" in more inner scope.
1054         (print_one_static_tracepoint_marker): Rename inner
1055         "tuple_emitter".
1056         * tic6x-tdep.c (tic6x_analyze_prologue): Declare "inst" lower.
1057         (tic6x_push_dummy_call): Don't redeclare "addr".
1058         * target-float.c: Declare "dto" lower.
1059         * symtab.c (lookup_local_symbol): Rename inner "sym".
1060         (find_pc_sect_line): Rename inner "pc".
1061         * stack.c (print_frame): Don't redeclare "gdbarch".
1062         (return_command): Rename inner "gdbarch".
1063         * s390-tdep.c (s390_prologue_frame_unwind_cache): Renam inner
1064         "sp".
1065         * rust-lang.c (rust_internal_print_type): Declare "i" in loop
1066         header.
1067         * rs6000-tdep.c (ppc_process_record): Rename inner "addr".
1068         * riscv-tdep.c (riscv_push_dummy_call): Declare "info" in inner
1069         scope.
1070         * remote.c (remote_target::update_thread_list): Don't redeclare
1071         "tp".
1072         (remote_target::process_initial_stop_replies): Rename inner
1073         "thread".
1074         (remote_target::remote_parse_stop_reply): Don't redeclare "p".
1075         (remote_target::wait_as): Don't redeclare "stop_reply".
1076         (remote_target::get_thread_local_address): Rename inner
1077         "result".
1078         (remote_target::get_tib_address): Likewise.
1079
1080         * regcache.c (cooked_read_test): Rename "regnum".
1081         * record-btrace.c (cmd_record_btrace_start): Rename inner
1082         "exception".
1083         * ppc-sysv-tdep.c (ppc64_sysv_abi_return_value): Declare "i" in
1084         loop header.
1085         * ppc-linux-tdep.c (ppc_linux_syscall_record): Declare "i" in loop
1086         header.
1087         (ppu2spu_sniffer): Rename inner "buf".
1088         * parse.c (operator_check_standard): Rename inner "type",
1089         "objfile".
1090         * p-valprint.c (pascal_val_print): Introduce new scope for
1091         "low_bound", "high_bound".
1092         * p-exp.y (yylex): Declare "i" in loop header.
1093         * objfiles.c (objfile_relocate1): Declare "i" in loop header.
1094         Lower declaration of "s".
1095         * nios2-tdep.c (nios2_analyze_prologue): Declare "i" in loop
1096         header.
1097         (nios2_push_dummy_call): Rename "len".
1098         * nat/linux-osdata.c (linux_xfer_osdata_cpus): Rename static
1099         "buf".
1100         (linux_xfer_osdata_fds, linux_xfer_osdata_shm)
1101         (linux_xfer_osdata_sem, linux_xfer_osdata_msg)
1102         (linux_xfer_osdata_modules): Likewise.
1103         * mips-tdep.c (mips_eabi_push_dummy_call): Rename outer "len".
1104         (mips_n32n64_push_dummy_call, mips_o32_push_dummy_call)
1105         (mips_o64_push_dummy_call): Likewise.
1106         * microblaze-tdep.c (microblaze_analyze_prologue): Rename inner
1107         "op".
1108         * mi/mi-main.c (list_available_thread_groups): Rename inner
1109         "tuple_emitter".
1110         (mi_cmd_data_read_memory): Rename inner "opts".
1111         * mi/mi-cmd-var.c (varobj_update_one): Rename inner
1112         "tuple_emitter".
1113         * mep-tdep.c (mep_analyze_prologue): Declare "rn" in loop header.
1114         * mdebugread.c (parse_symbol): Rename inner "b".  Declare "f" in
1115         more inner scope.
1116         (parse_partial_symbols): Rename inner "pst", "p", "name"
1117         * main.c (captured_main_1): Rename inner "i"s.
1118         * machoread.c (macho_symfile_read_all_oso): Don't redeclare
1119         "oso2".
1120         * linux-tdep.c (linux_info_proc): Rename inner "filename".
1121         * linespec.c (linespec_lexer_lex_string): Rename inner "p".
1122         * infrun.c (handle_no_resumed): Don't redeclare "thread".
1123         (handle_signal_stop): Rename inner "gdbarch".
1124         (handle_command): Declare "signum" in loop header.
1125         * ia64-tdep.c (ia64_pseudo_register_read): Don't redeclare
1126         "status".
1127         (examine_prologue): Rename inner "sol" and "sof".
1128         (ia64_extract_return_value): Rename inner "val".  Declare another
1129         "val" in a more inner scope.
1130         * hppa-bsd-tdep.c (hppabsd_find_global_pointer): Declare "buf" in
1131         inner scope.
1132         * guile/scm-symbol.c (gdbscm_lookup_symbol): Rename inner
1133         "except".
1134         * findvar.c (default_read_var_value): Don't redeclare "addr".
1135         * f-exp.y (yylex): Declare "i" in loop header.
1136         * eval.c (evaluate_subexp_standard): Don't redeclare "type".
1137         Rename inner "type", "expect_type".
1138         (evaluate_subexp_for_sizeof): Rename inner "pc".
1139         * elfread.c (elf_symfile_read): Rename inner "abfd".
1140         * dwarf2read.c (read_debug_names_from_section): Don't redeclare
1141         "bytes_read".
1142         (process_psymtab_comp_unit_reader): Don't redeclare "gdbarch".
1143         (add_partial_subprogram): Rename inner "lowpc" and "highpc".
1144         (dwarf_decode_line_header): Rename inner "lh".
1145         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Don't redeclare
1146         "offset".  Declare "i" in loop header.
1147         (disassemble_dwarf_expression): Rename inner "addr_size".
1148         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Rename
1149         inner "result".
1150         (dwarf_expr_context::execute_stack_op): Rename inner "offset".
1151         * dwarf2-frame.c (decode_frame_entry_1): Rename inner "length"s.
1152         * disasm.c (do_mixed_source_and_assembly_deprecated): Rename inner
1153         "inner_list_emitter".
1154         (do_mixed_source_and_assembly): Rename inner "tuple_emitter".
1155         * disasm-selftests.c (print_one_insn_test): Wrap "bplen"
1156         declaration in a block.
1157         * csky-tdep.c (csky_analyze_prologue): Declare "offset" lower.
1158         * cp-valprint.c (cp_print_value_fields): Don't redeclare
1159         "obstack_final_size".
1160         * cp-support.c (inspect_type): Declare "i" in loop header.
1161         * compile/compile.c (compile_instance::insert_symbol_error):
1162         Rename inner "e".
1163         * common/agent.c (agent_run_command): Remove inner "ret"
1164         declaration.
1165         * coffread.c (coff_symfile_read): Rename inner "name".
1166         (coff_symfile_read): Rename inner "abfd".
1167         * cli/cli-utils.c (get_number_trailer): Rename inner "val".
1168         * cli/cli-cmds.c (print_disassembly): Rename inner "low" and
1169         "high".
1170         * c-exp.y (lex_one_token): Move "len" declaration lower.
1171         * breakpoint.c (create_longjmp_master_breakpoint): Don't redeclare
1172         "gdbarch".
1173         (create_exception_master_breakpoint): Likewise.  Don't redeclare
1174         "b".
1175         (watch_command_1): Declare "mark" later.
1176         (clear_command): Don't shadow "a" or "b".
1177         (delete_command): Rename inner "b".
1178         (delete_trace_command): Likewise.
1179         * arm-tdep.c (thumb_process_displaced_32bit_insn): Rename inner
1180         "op".
1181         (arm_gdbarch_init): Remove inner "e_flags".
1182         * arch/arm-get-next-pcs.c (thumb_get_next_pcs_raw): Declare
1183         "offset" in inner blocks.
1184
1185 2018-10-04  Simon Marchi  <simon.marchi@ericsson.com>
1186
1187         * dwarf-index-write.c (file_write): Don't write if the vector is
1188         empty.
1189
1190 2018-10-05  Tom de Vries  <tdevries@suse.de>
1191
1192         * python/py-progspace.c (pspy_solib_name): Fix type mismatch in
1193         PyArg_ParseTuple call.
1194
1195 2018-10-05  Tom de Vries  <tdevries@suse.de>
1196
1197         * python/py-record-btrace.c (recpy_bt_goto): Fix type mismatch in
1198         PyArg_ParseTuple call.
1199
1200 2018-10-04  Joel Brobecker  <brobecker@adacore.com>
1201
1202         * psymtab.c (recursively_search_psymtabs): Reformat parameters
1203         to avoid exceeding 80 characters per line limit.
1204
1205 2018-10-04  Tom Tromey  <tom@tromey.com>
1206
1207         * symfile.c (syms_from_objfile_1, finish_new_objfile)
1208         (reread_symbols): Update.
1209         * complaints.h (clear_complaints): Remove argument.
1210         * complaints.c (enum complaint_series): Remove.
1211         (series): Remove global.
1212         (complaint_internal): Update.
1213         (clear_complaints): Remove argument.
1214
1215 2018-10-04  Tom Tromey  <tom@tromey.com>
1216
1217         * symfile.c (symbol_file_add_with_addrs): Do not print "no
1218         debugging symbols" message if there is a separate debug objfile.
1219
1220 2018-10-04  Tom Tromey  <tom@tromey.com>
1221
1222         PR cli/19551:
1223         * symfile.c (symbol_file_add_with_addrs): Update output.
1224         * psymtab.c (require_partial_symbols): Update output.
1225
1226 2018-10-04  Tom Tromey  <tom@tromey.com>
1227
1228         PR cli/22234:
1229         * complaints.c: Emit \n.
1230
1231 2018-10-04  Tom Tromey  <tom@tromey.com>
1232
1233         * symfile.c (symbol_file_add_with_addrs, symbol_file_clear)
1234         (separate_debug_file_exists, find_separate_debug_file)
1235         (add_symbol_file_command, reread_symbols, allocate_symtab)
1236         (allocate_compunit_symtab): Use filtered printing, not
1237         unfiltered.
1238         * psymtab.c (require_partial_symbols, dump_psymtab)
1239         (allocate_psymtab): Use filtered printing, not unfiltered.
1240
1241 2018-10-04  Tom Tromey  <tom@tromey.com>
1242
1243         * complaints.c (complaint_internal): Correctly check complaint
1244         count.
1245
1246 2018-10-04  Tom Tromey  <tom@tromey.com>
1247
1248         * complaints.h (struct complaints): Remove declaration.
1249         * complaints.c (clear_complaints): Remove an unused variable.
1250
1251 2018-10-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1252
1253         * MAINTAINERS (Write After Approval): Add self.
1254
1255 2018-10-03  Tom Tromey  <tom@tromey.com>
1256
1257         * guile/scm-value.c (gdbscm_value_to_string): Initialize
1258         "buffer_contents".
1259         * coffread.c (coff_symtab_read): Initialize "newobj".
1260
1261 2018-10-03  Simon Marchi  <simon.marchi@polymtl.ca>
1262
1263         * dwarf2read.c (read_func_scope): Remove struct keyword in
1264         range-based for.
1265
1266 2018-10-03  Tom Tromey  <tom@tromey.com>
1267
1268         * README: Mention --enable-ubsan.
1269         * NEWS: Mention --enable-ubsan.
1270         * acinclude.m4: Include sanitize.m4.
1271         * configure: Rebuild.
1272         * configure.ac: Call AM_GDB_UBSAN.
1273         * sanitize.m4: New file.
1274
1275 2018-10-03  Tom Tromey  <tom@tromey.com>
1276
1277         * expression.h (enum exp_opcode): Use uint8_t as base type.
1278         * expprint.c (op_name): Handle invalid opcodes.
1279
1280 2018-10-03  Tom Tromey  <tom@tromey.com>
1281
1282         * parse.c (prefixify_expression): Add assert.
1283         (parse_exp_in_context_1): Throw exception if the expression is
1284         empty.
1285
1286 2018-10-03  Tom Tromey  <tom@tromey.com>
1287
1288         * dwarf2read.c (read_signed_leb128): Work in ULONGEST.
1289
1290 2018-10-03  Tom Tromey  <tom@tromey.com>
1291
1292         * c-exp.y (parse_number): Work in unsigned.  Remove casts.
1293
1294 2018-10-03  Tom Tromey  <tom@tromey.com>
1295
1296         * dwarf2read.c (read_subrange_type): Make "negative_mask"
1297         unsigned.
1298
1299 2018-10-03  Tom Tromey  <tom@tromey.com>
1300
1301         * findvar.c (extract_integer): Do work in an unsigned type.
1302
1303 2018-10-03  Tom Tromey  <tom@tromey.com>
1304
1305         * common/enum-flags.h (enum_flags::operator~): Add static assert.
1306         * symfile-add-flags.h (enum symfile_add_flag): Use unsigned as
1307         base type.
1308         * objfile-flags.h (enum objfile_flag): Use unsigned as base type.
1309         * gdbtypes.h (enum type_instance_flag_value): Use unsigned as base
1310         type.
1311         * c-lang.h (enum c_string_type_values): Use unsigned as base
1312         type.
1313         * btrace.h (enum btrace_thread_flag): Use unsigned as base type.
1314
1315 2018-10-03  Tom Tromey  <tom@tromey.com>
1316
1317         * dwarf2-frame.h (dwarf2_frame_state_reg_info)
1318         <~dwarf2_frame_state_reg_info>: Update.
1319         <dwarf2_frame_state_reg_info>: Update.
1320         <alloc_regs>: Add assertion.  Update.
1321         <reg>: Now a std::vector.
1322         <num_regs>: Remove.
1323         <swap>: Update.
1324         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
1325         (execute_cfa_program_test, dwarf2_frame_cache): Update.
1326
1327 2018-10-03  Tom Tromey  <tom@tromey.com>
1328
1329         * namespace.c (add_using_directive): Don't pass NULL to memcpy.
1330
1331 2018-10-03  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1332
1333         * tid-parse.c (tid_is_in_list): Fix wrong 'See' comment.
1334
1335 2018-10-02  Tom Tromey  <tom@tromey.com>
1336
1337         * aarch64-linux-tdep.c (aarch64_linux_sigframe_init): Use pulongest.
1338
1339 2018-10-02  John Darrington <john@darrington.wattle.id.au>
1340
1341         * NEWS: Mention changed commands.
1342         * ser-uds.c: New file.
1343         * configure.ac (SER_HARDWIRE): Add ser-uds.o.
1344         * configure: Regenerate.
1345         * Makefile.in: Add new file.
1346         * serial.c (serial_open): Check if filename is a socket
1347           and lookup the appropriate interface accordingly.
1348
1349 2018-10-01  Alan Hayward  <alan.hayward@arm.com>
1350
1351         * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_OFFSET): Add
1352         define.
1353         (AARCH64_EXTRA_MAGIC): Likewise.
1354         (AARCH64_FPSIMD_MAGIC): Likewise.
1355         (AARCH64_SVE_MAGIC): Likewise.
1356         (AARCH64_EXTRA_DATAP_OFFSET): Likewise.
1357         (AARCH64_FPSIMD_FPSR_OFFSET): Likewise.
1358         (AARCH64_FPSIMD_FPCR_OFFSET): Likewise.
1359         (AARCH64_FPSIMD_V0_OFFSET): Likewise.
1360         (AARCH64_FPSIMD_VREG_SIZE): Likewise.
1361         (AARCH64_SVE_CONTEXT_VL_OFFSET): Likewise.
1362         (AARCH64_SVE_CONTEXT_REGS_OFFSET): Likewise.
1363         (AARCH64_SVE_CONTEXT_P_REGS_OFFSET): Likewise.
1364         (AARCH64_SVE_CONTEXT_FFR_OFFSET): Likewise.
1365         (AARCH64_SVE_CONTEXT_SIZE): Likewise.
1366         (read_aarch64_ctx): Add function.
1367         (aarch64_linux_sigframe_init): Detect FP registers.
1368
1369 2018-10-01  Alan Hayward  <alan.hayward@arm.com>
1370
1371         * aarch64-tdep.c (AARCH64_Q0_REGNUM): Move to here.
1372         (AARCH64_D0_REGNUM): Likewise.
1373         (AARCH64_S0_REGNUM): Likewise.
1374         (AARCH64_H0_REGNUM): Likewise.
1375         (AARCH64_B0_REGNUM): Likewise.
1376         (AARCH64_SVE_V0_REGNUM): Likewise.
1377         * arch/aarch64.h (AARCH64_Q0_REGNUM): Move from here.
1378         (AARCH64_D0_REGNUM): Likewise.
1379         (AARCH64_S0_REGNUM): Likewise.
1380         (AARCH64_H0_REGNUM): Likewise.
1381         (AARCH64_B0_REGNUM): Likewise.
1382         (AARCH64_SVE_V0_REGNUM): Likewise.
1383
1384 2018-10-01  Gary Benson <gbenson@redhat.com>
1385
1386         * gdb_proc_service.h (gdb_prfpregset_t): Remove typedef.
1387         * proc-service.c (ps_lgetfpregs, ps_lsetfpregs): Use
1388         prfpregset_t instead of gdb_prfpregset_t.
1389         * configure.ac (PRFPREGSET_T_BROKEN): Remove check.
1390         * configure, config.in: Rebuild.
1391
1392 2018-10-01  Gary Benson <gbenson@redhat.com>
1393
1394         * common/gdb_proc_service.h: New file, factored out from...
1395         * gdb_proc_service.h: Moved common code to the above file.
1396         * Makefile.in (HFILES_NO_SRCDIR): Add the above new file.
1397
1398 2018-10-01  Gary Benson <gbenson@redhat.com>
1399
1400         * gdb_proc_service.h: Use elf_gregset_t if prgregset_t is
1401         undefined.  Use elf_fpregset_t if prfpregset_t is undefined.
1402
1403 2018-10-01  Gary Benson <gbenson@redhat.com>
1404
1405         * configure.ac: Check if sys/procfs.h defines elf_fpregset_t.
1406         (AC_CHECK_HEADERS): Check for linux/elf.h.
1407         * configure, config.in: Rebuild.
1408         * gdb_proc_service.h: Include linux/elf.h if sys/procfs.h
1409         doesn't define elf_fpregset_t.
1410
1411 2018-10-01  Gary Benson <gbenson@redhat.com>
1412
1413         * gdb_proc_service.h: Whitespace change.
1414
1415 2018-10-01  Tom Tromey  <tom@tromey.com>
1416
1417         * unittests/scoped_mmap-selftests.c: Don't check HAVE_UNISTD_H.
1418         * unittests/scoped_fd-selftests.c: Don't check HAVE_UNISTD_H.
1419         * common/scoped_fd.h: Don't check HAVE_UNISTD_H.
1420
1421 2018-10-01  Tom Tromey  <tom@tromey.com>
1422
1423         * README: Minor change.
1424
1425 2018-09-30  Pedro Alves  <palves@redhat.com>
1426
1427         * darwin-nat-info.c (darwin_debug_regions_recurse)
1428         (info_mach_exceptions_command): Remove unused local variables.
1429         * darwin-nat.c (darwin_decode_notify_message)
1430         (darwin_nat_target::resume, darwin_nat_target::mourn_inferior)
1431         (darwin_stop_inferior, darwin_setup_exceptions)
1432         (darwin_nat_target::kill, darwin_attach_pid, darwin_ptrace_him)
1433         (darwin_nat_target::attach, darwin_nat_target::detach)
1434         (darwin_read_write_inferior, darwin_read_dyld_info): Remove unused
1435         local variables.
1436         * i386-darwin-nat.c (i386_darwin_dr_set): Remove unused local
1437         variables.
1438
1439 2018-09-29  Tom Tromey  <tom@tromey.com>
1440
1441         * README: Remove some leftover text.
1442
1443 2018-09-29  Tom Tromey  <tom@tromey.com>
1444
1445         * PROBLEMS: Rewrite.
1446         * README: Update.
1447
1448 2018-09-28  John Baldwin  <jhb@FreeBSD.org>
1449
1450         * disasm-selftests.c (print_one_insn_test): Add bfd_arch_riscv to
1451         case with explicit breakpoint kind.
1452         * riscv-tdep.c (show_use_compressed_breakpoints): Remove
1453         'additional_info' and related logic.
1454         (riscv_debug_breakpoints): New variable.
1455         (riscv_breakpoint_kind_from_pc): Use the length of the existing
1456         instruction to determine the breakpoint kind.
1457         (_initialize_riscv_tdep): Add 'set/show debug riscv breakpoints'
1458         flag.  Update description of 'set/show riscv
1459         use-compressed-breakpoints' flag.
1460
1461 2018-09-28  Andrew Burgess  <andrew.burgess@embecosm.com>
1462
1463         (NEWS): Mention changes to frame related commands.
1464         * cli/cli-decode.c (add_cmd_suppress_notification): New function.
1465         (add_prefix_cmd_suppress_notification): New function.
1466         (add_com_suppress_notification): Call
1467         add_cmd_suppress_notification.
1468         * command.h (add_cmd_suppress_notification): Declare.
1469         (add_prefix_cmd_suppress_notification): Declare.
1470         * mi/mi-cmd-stack.c: Add 'safe-ctype.h' include.
1471         (parse_frame_specification): Moved from stack.c, with
1472         simplification to handle a single argument.
1473         (mi_cmd_stack_select_frame): Use parse_frame_specification, the
1474         switch to the selected frame.  Add a header comment.
1475         * stack.c: Remove 'safe-ctype.h' include.
1476         (find_frame_for_function): Add declaration.
1477         (find_frame_for_address): New function.
1478         (parse_frame_specification): Moved into mi/mi-cmd-stack.c.
1479         (frame_selection_by_function_completer): New function.
1480         (info_frame_command): Rename to...
1481         (info_frame_command_core): ...this, and update parameter types.
1482         (select_frame_command): Rename to...
1483         (select_frame_command_core): ...this, and update parameter types.
1484         (frame_command): Rename to...
1485         (frame_command_core): ...this, and update parameter types.
1486         (class frame_command_helper): New class to wrap implementations of
1487         frame related sub-commands.
1488         (frame_apply_cmd_list): New static global.
1489         (frame_cmd_list): Make static.
1490         (select_frame_cmd_list): New global for sub-commands.
1491         (info_frame_cmd_list): New global for sub-commands.
1492         (_initialize_stack): Register sub-commands for 'frame',
1493         'select-frame', and 'info frame'.  Update 'frame apply' commands
1494         to use frame_apply_cmd_list.  Move function local static
1495         frame_apply_list to file static frame_apply_cmd_list for
1496         consistency.
1497         * stack.h (select_frame_command): Delete declarationn.
1498         (select_frame_for_mi): Declare new function.
1499
1500 2018-09-26  Andrew Burgess  <andrew.burgess@embecosm.com>
1501
1502         * riscv-tdep.c (riscv_insn::decode): Decode c.lui.
1503         (riscv_scan_prologue): Split handling of AUIPC, LUI, ADD, ADDI,
1504         and NOP.
1505
1506 2018-09-26  Simon Marchi  <simon.marchi@ericsson.com>
1507
1508         * elf32-nds32.c (elf32_nds32_allocate_dynrelocs): Remove.
1509
1510 2018-09-26  Tom Tromey  <tom@tromey.com>
1511
1512         * valops.c (auto_abandon): Remove dead code.
1513
1514 2018-09-26  Tom Tromey  <tom@tromey.com>
1515
1516         * tui/tui-win.c (WIN_HEIGHT_USAGE): Remove extra ">"s.
1517
1518 2018-09-24  Tom Tromey  <tom@tromey.com>
1519
1520         * common/pathstuff.c (get_standard_cache_dir): Make
1521         "xdg_cache_home" and "home" const.
1522         * top.c (init_history): Make "tmpenv" const.
1523         * main.c (get_init_files): Make "homedir" const.
1524
1525 2018-09-23  Tom Tromey  <tom@tromey.com>
1526
1527         PR python/18852:
1528         * python/py-param.c (get_set_value): Use gdbpy_handle_exception.
1529
1530 2018-09-23  Tom Tromey  <tom@tromey.com>
1531
1532         * python/py-function.c (fnpy_call): Use gdbpy_handle_exception.
1533         * python/py-cmd.c (cmdpy_function): Use gdbpy_handle_exception.
1534         * python/python-internal.h (gdbpy_handle_exception): Declare.
1535         * python/py-utils.c (gdbpy_handle_exception): New function.
1536
1537 2018-09-23  Tom Tromey  <tom@tromey.com>
1538
1539         PR python/17284:
1540         * python/py-type.c (typy_template_argument): Check for negative
1541         argument number.
1542
1543 2018-09-23  Tom Tromey  <tom@tromey.com>
1544
1545         PR python/14062:
1546         * python/python.c (gdbpy_run_events): Do not ignore exceptions.
1547
1548 2018-09-23  Tom Tromey  <tom@tromey.com>
1549
1550         PR python/18170:
1551         * python/py-value.c (valpy_int): Allow conversion from pointer
1552         type.
1553
1554 2018-09-23  Tom Tromey  <tom@tromey.com>
1555
1556         PR python/20126:
1557         * python/py-value.c (valpy_int): Respect type sign.
1558
1559 2018-09-23  Tom Tromey  <tom@tromey.com>
1560
1561         PR python/18352;
1562         * python/py-value.c (valpy_float): Allow conversions from int or
1563         char.
1564         (valpy_int, valpy_long): Allow conversions from float.
1565
1566 2018-09-23  Tom Tromey  <tom@tromey.com>
1567
1568         * ctf.c (ctf_start): Use gdb_fopen_cloexec.
1569         * common/scoped_mmap.c (mmap_file): Use gdb_open_cloexec.
1570
1571 2018-09-23  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1572
1573         * amd64-sol2-tdep.c (amd64_sol2_sigtramp_p): Also recognize
1574         __sighndlr.
1575         * i386-sol2-tdep.c (i386_sol2_sigtramp_p): Likewise.
1576
1577 2018-08-02  Jon Turney  <jon.turney@dronecode.org.uk>
1578
1579         * windows-nat.c (windows_nat_target::wait): Remove a spurious
1580         target_terminal::ours().
1581
1582 2018-09-23  Simon Marchi  <simon.marchi@ericsson.com>
1583
1584         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): Change type
1585         of vl to ULONGEST.
1586
1587 2018-09-21  Yacov Simhony  <ysimhony@gmail.com>
1588
1589         * breakpoint.c (update_inserted_breakpoint_locations): Remove
1590         redundant condition.
1591
1592 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1593
1594         * proc-utils.h (PROC_CTL_WORD_TYPE): Remove.
1595
1596         * procfs.c: Don't check for PR_MODEL_NATIVE definition.
1597         * sparc-sol2-nat.c: Likewise.  Remove Linux, __arch64__ references.
1598         * sol-thread.c (ps_pdmodel): Don't guard definition.
1599
1600         * procfs.c: Fix formatting.
1601
1602         * procfs.c (sysset_t_alloc): Remove.
1603         (create_procinfo): Use XNEW instead of sysset_t_alloc.
1604         (procfs_debug_inferior): Likewise.
1605         (procfs_set_exec_trap): Likewise.
1606         (proc_set_traced_sysentry): Don't allocate argp dynamically.
1607         (proc_set_traced_sysexit): Likewise.
1608
1609         * procfs.c (create_procinfo): Use xsnprintf to fix ARI warning.
1610         (dead_procinfo): Likewise.
1611         (proc_warn): Likewise.
1612         (proc_error): Likewise.
1613         (proc_get_LDT_entry): Likewise.
1614         (do_attach): Likewise.
1615         (procfs_target::pid_to_str): Likewise.
1616         (iterate_over_mappings): Likewise.
1617
1618         * procfs.c (create_procinfo): Fix ARI warning.
1619         (proc_get_status): Likewise.
1620         (proc_stop_process): Likewise.
1621         (proc_run_process): Likewise.
1622         (proc_kill): Likewise.
1623         (proc_get_LDT_entry): Likewise.
1624         (procfs_find_LDT_entry): Likewise.
1625         (proc_update_threads): Likewise.
1626         (proc_iterate_over_threads): Likewise.
1627         (do_attach): Likewise.
1628         (procfs_xfer_memory): Likewise.
1629         (invalidate_cache): Likewise.
1630         (procfs_target::resume): Likewise.
1631         (procfs_init_inferior): Likewise.
1632         (procfs_set_exec_trap): Likewise.
1633         (procfs_target::thread_alive): Likewise.
1634         (procfs_target::pid_to_exec_file): Likewise.
1635         (iterate_over_mappings): Likewise.
1636         (procfs_target::make_corefile_notes): Likewise.
1637         * sol-thread.c (sol_thread_target::thread_alive): Likewise.
1638
1639         * procfs.c (procfs_find_LDT_entry): Silence ARI warning.
1640         (procfs_find_LDT_entry): Likewise.
1641         * sol-thread.c (ps_lgetLDT): Likewise.
1642
1643 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1644
1645         PR tdep/17903
1646         * procfs.c (procfs_target): Declare pid_to_exec_file.
1647         (procfs_target::pid_to_exec_file): New.
1648
1649 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1650
1651         * auxv.c (default_print_auxv_entry): Reflect AT_SUN_CAP_HW1
1652         renaming.
1653         Handle AT_SUN_EMULATOR, AT_SUN_BRANDNAME, AT_SUN_BRAND_AUX1,
1654         AT_SUN_BRAND_AUX2, AT_SUN_BRAND_AUX3, AT_SUN_CAP_HW2.
1655
1656 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1657
1658         * i386-v4-nat.c (regmap, supply_gregset, fill_gregset)
1659         (supply_fpregset, fill_fpregset): Move ...
1660         * i386-sol2-nat.c [PR_MODEL_NATIVE != PR_MODEL_LP64]: ... here.
1661         Remove HAVE_GREGSET_T, HAVE_FPREGET_T guards.
1662         Remove references to ioctl-based procfs.
1663         Include <sys/reg.h>.
1664         Remove PR_MODEL_NATIVE guards.
1665         * configure.nat <sol2, i386> (NATDEPFILES): Remove i386-v4-nat.o.
1666         * Makefile.in (ALLDEPFILES): Remove i386-v4-nat.c.
1667
1668 2018-09-19  Xavier Roirand  <roirand@adacore.com>
1669
1670         PR gdb/20981:
1671         * solib-darwin.c (darwin_get_dyld_bfd): New function.
1672         (darwin_solib_get_all_image_info_addr_at_init): Update call.
1673         (darwin_solib_create_inferior_hook): Handle unrelocated dyld.
1674
1675 2018-09-19  John Baldwin  <jhb@FreeBSD.org>
1676
1677         * fbsd-tdep.c (fbsd_print_sockaddr_in): Style fix.
1678         (fbsd_print_sockaddr_in6): Likewise.
1679
1680 2018-09-19  Richard Bunt  <richard.bunt@arm.com>
1681             Chris January  <chris.january@arm.com>
1682
1683         * eval.c (skip_undetermined_arglist): Skip argument list helper.
1684         (evaluate_subexp_standard): Return a dummy type when
1685         honoring EVAL_SKIP in OP_VAR_VALUE and handle skipping in the
1686         OP_F77_UNDETERMINED_ARGLIST case.
1687         * expression.h (enum noside): Update comment.
1688
1689 2018-09-19  George Vasick <george.vasick@oracle.com>
1690
1691         * solib-svr4.c (svr4_same_1): Also handle amd64 ld.so.1.
1692
1693 2018-09-19  Stefan Teleman <stefan.teleman@oracle.com>
1694             April Chin <april.chin@oracle.com>
1695             Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1696
1697         * procfs.c (MAX_PROC_NAME_SIZE): Allow for 6-digit PID_MAX and
1698         uint_t lwpid_t.
1699         (create_procinfo): Print pids in /proc without leading zeros.
1700
1701 2018-09-18  Sandra Loosemore  <sandra@codesourcery.com>
1702
1703         * nios2-tdep.c (nios2_gcc_target_options): New.
1704         (nios2_gdb_arch_init): Install new hook.
1705
1706 2018-09-18  Simon Marchi  <simon.marchi@ericsson.com>
1707
1708         * patches/0001-Fix-PR-gdb-23558-Use-system-s-getcwd-when-cross-comp.patch:
1709         New file.
1710         * update-gnulib.sh: Apply patch.
1711         * configure: Re-generate.
1712
1713 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1714
1715         * infcmd.c (_initialize_infcmd): Remove "running" from "info proc"
1716         description.  Make "info proc" command descriptions more
1717         consistent.
1718
1719 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1720
1721         * NEWS: Mention 'info proc files' command.
1722
1723 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1724
1725         * fbsd-nat.c (fbsd_nat_target::info_proc): List open file
1726         descriptors for IP_FILES and IP_ALL.
1727
1728 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1729
1730         * fbsd-tdep.c (KF_FLAGS, KF_OFFSET, KF_VNODE_TYPE, KF_SOCK_DOMAIN)
1731         (KF_SOCK_TYPE, KF_SOCK_PROTOCOL, KF_SA_LOCAL, KF_SA_PEER)
1732         (KINFO_FILE_TYPE_SOCKET, KINFO_FILE_TYPE_PIPE)
1733         (KINFO_FILE_TYPE_FIFO, KINFO_FILE_TYPE_KQUEUE)
1734         (KINFO_FILE_TYPE_CRYPTO, KINFO_FILE_TYPE_MQUEUE)
1735         (KINFO_FILE_TYPE_SHM, KINFO_FILE_TYPE_SEM, KINFO_FILE_TYPE_PTS)
1736         (KINFO_FILE_TYPE_PROCDESC, KINFO_FILE_FD_TYPE_ROOT)
1737         (KINFO_FILE_FD_TYPE_JAIL, KINFO_FILE_FD_TYPE_TRACE)
1738         (KINFO_FILE_FD_TYPE_CTTY, KINFO_FILE_FLAG_READ)
1739         (KINFO_FILE_FLAG_WRITE, KINFO_FILE_FLAG_APPEND)
1740         (KINFO_FILE_FLAG_ASYNC, KINFO_FILE_FLAG_FSYNC)
1741         (KINFO_FILE_FLAG_NONBLOCK, KINFO_FILE_FLAG_DIRECT)
1742         (KINFO_FILE_FLAG_HASLOCK, KINFO_FILE_FLAG_EXEC)
1743         (KINFO_FILE_VTYPE_VREG, KINFO_FILE_VTYPE_VDIR)
1744         (KINFO_FILE_VTYPE_VCHR, KINFO_FILE_VTYPE_VLNK)
1745         (KINFO_FILE_VTYPE_VSOCK, KINFO_FILE_VTYPE_VFIFO, FBSD_AF_UNIX)
1746         (FBSD_AF_INET, FBSD_AF_INET6, FBSD_SOCK_STREAM, FBSD_SOCK_DGRAM)
1747         (FBSD_SOCK_SEQPACKET, FBSD_IPPROTO_ICMP, FBSD_IPPROTO_TCP)
1748         (FBSD_IPPROTO_UDP, FBSD_IPPROTO_SCTP): New defines.
1749         (struct fbsd_sockaddr_in, struct fbsd_sockaddr_in6)
1750         (struct fbsd_sockaddr_un): New types.
1751         (fbsd_file_fd, fbsd_file_type, fbsd_file_flags, fbsd_ipproto)
1752         (fbsd_print_sockaddr_in, fbsd_print_sockaddr_in6)
1753         (fbsd_info_proc_files_header, fbsd_info_proc_files_entry)
1754         (fbsd_core_info_proc_files): New functions.
1755         (fbsd_core_info_proc): List open file descriptors for IP_FILES and
1756         IP_ALL.
1757         * fbsd-tdep.h (fbsd_info_proc_files_header)
1758         (fbsd_info_proc_files_entry): New.
1759
1760 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1761
1762         * defs.h (enum info_proc_what) [IP_FILES]: New value.
1763         * infcmd.c (info_proc_cmd_files): New function.
1764         (_initialize_infcmd): Register 'info proc files' command.
1765
1766 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1767
1768         * gnulib/aclocal-m4-deps.mk: Re-generate.
1769         * gnulib/aclocal.m4: Re-generate.
1770         * gnulib/config.in: Re-generate.
1771         * gnulib/configure: Re-generate.
1772         * gnulib/import/Makefile.am: Re-generate.
1773         * gnulib/import/Makefile.in: Re-generate.
1774         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
1775         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1776         * gnulib/import/arpa_inet.in.h: New file.
1777         * gnulib/import/inet_ntop.c: New file.
1778         * gnulib/import/m4/arpa_inet_h.m4: New file.
1779         * gnulib/import/m4/inet_ntop.m4: New file.
1780         * gnulib/import/m4/netinet_in_h.m4: New file.
1781         * gnulib/import/m4/socklen.m4: New file.
1782         * gnulib/import/m4/sockpfaf.m4: New file.
1783         * gnulib/import/m4/stdalign.m4: New file.
1784         * gnulib/import/m4/sys_uio_h.m4: New file.
1785         * gnulib/import/netinet_in.in.h: New file.
1786         * gnulib/import/stdalign.in.h: New file.
1787         * gnulib/import/sys_socket.c: New file.
1788         * gnulib/import/sys_socket.in.h: New file.
1789         * gnulib/import/sys_uio.in.h: New file.
1790         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add inet_ntop
1791         module.
1792
1793 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1794
1795         * gnulib/aclocal-m4-deps.mk: New file.
1796         * gnulib/update-gnulib.sh: Generate "aclocal-m4-deps.mk"
1797         deterministically.
1798
1799 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1800
1801         * fbsd-tdep.c (fbsd_core_vnode_path): Use KF_PATH instead of
1802         KVE_PATH.
1803
1804 2018-09-18  Tom Tromey  <tom@tromey.com>
1805
1806         * compile/compile-object-load.c (struct
1807         link_hash_table_cleanup_data): Add constructor and destructor.
1808         Use DISABLE_COPY_AND_ASSIGN.
1809         (~link_hash_table_cleanup_data): Rename from
1810         link_hash_table_free.  Now a destructor.
1811         (copy_sections): Use gdb::unique_xmalloc_ptr.  Remove cleanups.
1812
1813 2018-09-18  Tom Tromey  <tom@tromey.com>
1814
1815         * compile/compile-object-run.c (do_module_cleanup): Use delete.
1816         * compile/compile-object-load.c (struct munmap_list): Move to
1817         header file.
1818         (munmap_list::add): Rename from munmap_list_add; rewrite.
1819         (munmap_list::~munmap_list): Rename from munmap_list_free.
1820         (munmap_listp_free_cleanup): Remove.
1821         (compile_object_load): Update.
1822         * compile/compile-object-load.h (struct munmap_list): Move from
1823         compile-object-load.c.  Rewrite.
1824
1825 2018-09-18  Alan Hayward  <alan.hayward@arm.com>
1826
1827         * aarch64-tdep.c (pass_in_v): Use register size.
1828         (aarch64_extract_return_value): Likewise.
1829         (aarch64_store_return_value): Likewise.
1830
1831 2018-09-18  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1832
1833         * utils.c (dump_core) [HAVE_SETRLIMIT]: Cast RLIM_INFINITY to
1834         rlim_t.
1835
1836 2018-09-17  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1837
1838         * python/lib/gdb/command/frame_filters.py (EnableFrameFilter):
1839         Fix short help line.
1840
1841 2018-09-17  Tom Tromey  <tom@tromey.com>
1842
1843         PR python/20445:
1844         * configure: Rebuild.
1845         * configure.ac: Conditionally use -DNDEBUG for Python.
1846
1847 2018-09-17  Tom Tromey  <tom@tromey.com>
1848
1849         * configure: Rebuild.
1850         * configure.ac: Use gmp as a library dependency when checking for
1851         mpfr.
1852
1853 2018-09-17  Pedro Alves  <palves@redhat.com>
1854
1855         * python/py-inferior.c (find_inferior_object): Delete.
1856
1857 2018-09-17  Simon Marchi  <simon.marchi@ericsson.com>
1858
1859         * compile/compile-cplus-types.c
1860         (compile_cplus_instance::enter_scope): Don't use new_scope after
1861         std::move.
1862
1863 2018-09-17  Tom Tromey  <tom@tromey.com>
1864
1865         * common/pathstuff.c (get_standard_cache_dir): Use
1866         ~/Library/Caches on macOS.
1867         * common/pathstuff.h (get_standard_cache_dir): Update comment.
1868
1869 2018-09-17  Simon Marchi  <simon.marchi@polymtl.ca>
1870
1871         PR python/23669
1872         * breakpoint.c (commands_cmd_element): New.
1873         (_initialize_breakpoint): Assign commands_cmd_element.
1874         * breakpoint.h (commands_cmd_element): New.
1875         * cli/cli-script.c (while_cmd_element, if_command,
1876         define_cmd_element): New.
1877         (command_name_equals): Remove.
1878         (process_next_line): Compare commands by pointer, not by name.
1879         (_initialize_cli_script): Assign the various cmd_list_element
1880         variables.
1881         * compile/compile.c (compile_cmd_element): New.
1882         (_initialize_compile): Assign compile_cmd_element.
1883         * compile/compile.h (compile_cmd_element): New.
1884         * guile/guile.c (guile_cmd_element): New.
1885         (install_gdb_commands): Assign guile_cmd_element.
1886         * guile/guile.h (guile_cmd_element): New.
1887         * python/python.c (python_cmd_element): New.
1888         (_initialize_python): Assign python_cmd_element.
1889         * python/python.h (python_cmd_element): New.
1890         * tracepoint.c (while_stepping_cmd_element): New.
1891         (_initialize_tracepoint): Assign while_stepping_cmd_element.
1892         * tracepoint.h (while_stepping_cmd_element): New.
1893
1894 2018-09-17  Tom Tromey  <tom@tromey.com>
1895
1896         * infrun.c (save_infcall_suspend_state): Return
1897         infcall_suspend_state_up.
1898         (save_infcall_control_state): Return infcall_control_state_up.
1899         * inferior.h (save_infcall_suspend_state)
1900         (save_infcall_control_state): Declare later.  Return unique
1901         pointers.
1902
1903 2018-09-17  Tom Tromey  <tom@tromey.com>
1904
1905         * infrun.c (struct stop_context): Declare constructor,
1906         destructor, "changed" method.
1907         (stop_context::stop_context): Rename from save_stop_context.
1908         (stop_context::~stop_context): Rename from
1909         release_stop_context_cleanup.
1910         (normal_stop): Update.
1911         (stop_context::changed): Rename from stop_context_changed.  Return
1912         bool.
1913
1914 2018-09-17  Tom Tromey  <tom@tromey.com>
1915
1916         * inferior.h (struct infcall_suspend_state_deleter): New.
1917         (infcall_suspend_state_up): New typedef.
1918         (struct infcall_control_state_deleter): New.
1919         (infcall_control_state_up): New typedef.
1920         (make_cleanup_restore_infcall_suspend_state)
1921         (make_cleanup_restore_infcall_control_state): Don't declare.
1922         * infcall.c (call_function_by_hand_dummy): Update.
1923         * infrun.c (do_restore_infcall_suspend_state_cleanup)
1924         (make_cleanup_restore_infcall_suspend_state): Remove.
1925         (do_restore_infcall_control_state_cleanup)
1926         (make_cleanup_restore_infcall_control_state): Remove.
1927
1928 2018-09-17  Tom Tromey  <tom@tromey.com>
1929
1930         * gdbthread.h (struct thread_control_state): Add initializer.
1931         (class thread_info) <control>: Remove initializer.
1932         * inferior.h (struct inferior_control_state): Add initializer.
1933         (class inferior) <control>: Remove initializer.
1934         (exit_inferior_1): Update.
1935         * infrun.c (struct infcall_control_state): Add constructors.
1936         (save_infcall_control_state): Use new.
1937         (restore_infcall_control_state, discard_infcall_control_state):
1938         Use delete.
1939
1940 2018-09-17  Tom Tromey  <tom@tromey.com>
1941
1942         * infrun.c (struct infcall_suspend_state) <registers>: Now a
1943         unique_ptr.
1944         <siginfo_data>: Now a unique_xmalloc_ptr.
1945         (save_infcall_suspend_state, restore_infcall_suspend_state)
1946         (discard_infcall_suspend_state)
1947         (get_infcall_suspend_state_regcache): Update.
1948
1949 2018-09-17  Tom Tromey  <tom@tromey.com>
1950
1951         * gdbthread.h (struct thread_suspend_state): Add initializers.
1952         (class thread_info) <suspend>: Remove initializer.
1953         * infrun.c (struct infcall_suspend_state): Add initializers.
1954         (save_infcall_suspend_state): Use new.
1955         (discard_infcall_suspend_state): Use delete.
1956
1957 2018-09-16  Tom Tromey  <tom@tromey.com>
1958
1959         * python/python-internal.h (CPYCHECKER_STEALS_REFERENCE_TO_ARG):
1960         Remove.
1961         * python/py-varobj.c (py_varobj_iter_ctor): Change pyiter to
1962         rvalue reference.  Remove CPYCHECKER_STEALS_REFERENCE_TO_ARG.
1963         (py_varobj_iter_new): Likewise.
1964         (py_varobj_get_iterator): Use gdbpy_ref.
1965
1966 2018-09-16  Tom Tromey  <tom@tromey.com>
1967
1968         * python/py-threadevent.c (py_get_event_thread): Simplify.
1969         * python/py-inferior.c (infpy_thread_from_thread_handle):
1970         Return immediately after calling thread_to_thread_object.  Use
1971         Py_RETURN_NONE.
1972         (thread_to_thread_object): Set the exception on a NULL return.
1973
1974 2018-09-16  Simon Marchi  <simon.marchi@polymtl.ca>
1975
1976         * Makefile.in (LIBGDB_OBS): Sort COMMON_OBS.
1977
1978 2018-09-16  Tom Tromey  <tom@tromey.com>
1979
1980         * python/python-internal.h (CPYCHECKER_RETURNS_BORROWED_REF):
1981         Remove.
1982
1983 2018-09-16  Tom Tromey  <tom@tromey.com>
1984
1985         * python/python-internal.h (thread_to_thread_object): Change
1986         return type.
1987         * python/py-inferior.c (thread_to_thread_object): Return a new
1988         reference.
1989         (infpy_thread_from_thread_handle): Update.
1990         * python/py-infthread.c (gdbpy_selected_thread): Update.
1991         * python/py-stopevent.c (create_stop_event_object): Update.
1992         * python/py-threadevent.c (py_get_event_thread): Return a new
1993         reference.
1994         (py_get_event_thread): Update.
1995         * python/py-event.h (py_get_event_thread): Change return type.
1996         * python/py-continueevent.c (create_continue_event_object):
1997         Update.
1998
1999 2018-09-16  Tom Tromey  <tom@tromey.com>
2000
2001         * python/py-progspace.c (pspy_get_objfiles): Update.
2002         * python/python-internal.h (objfile_to_objfile_object): Change
2003         return type.
2004         * python/py-newobjfileevent.c (create_new_objfile_event_object):
2005         Update.
2006         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
2007         Update.
2008         * python/python.c (gdbpy_get_current_objfile): Update.
2009         (gdbpy_objfiles): Update.
2010         * python/py-objfile.c (objfpy_get_owner, gdbpy_lookup_objfile):
2011         Update.
2012         (objfile_to_objfile_object): Return a new reference.
2013         * python/py-symtab.c (stpy_get_objfile): Update.
2014         * python/py-prettyprint.c (find_pretty_printer_from_objfiles):
2015         Update.
2016
2017 2018-09-16  Tom Tromey  <tom@tromey.com>
2018
2019         * python/py-inferior.c (infpy_get_progspace): Update.
2020         * python/python-internal.h (pspace_to_pspace_object): Change
2021         return type.
2022         * python/py-newobjfileevent.c
2023         (create_clear_objfiles_event_object): Update.
2024         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
2025         Update.
2026         * python/python.c (gdbpy_get_current_progspace): Update.
2027         (gdbpy_progspaces): Update.
2028         * python/py-progspace.c (pspace_to_pspace_object): Return a new
2029         reference.
2030         * python/py-objfile.c (objfpy_get_progspace): Update.
2031         * python/py-prettyprint.c (find_pretty_printer_from_progspace):
2032         Update.
2033
2034 2018-09-16  Tom Tromey  <tom@tromey.com>
2035
2036         * python/lib/gdb/__init__.py (current_progspace, objfiles)
2037         (solib_name, block_for_pc, find_pc_line): New functions.
2038         (execute_unwinders): Update.
2039         * python/py-block.c (gdbpy_block_for_pc): Remove.
2040         * python/py-inferior.c (infpy_get_progspace): New function.
2041         (inferior_object_getset) <progspace>: Add.
2042         * python/py-progspace.c (pspy_objfiles): Rewrite.
2043         (pspy_solib_name, pspy_block_for_pc)
2044         (pspy_find_pc_line, pspy_is_valid): New functions.
2045         (progspace_object_methods): Add entries for solib_name,
2046         block_for_pc, find_pc_line, is_valid.
2047         * python/python-internal.h (gdbpy_block_for_pc)
2048         (build_objfiles_list): Don't declare.
2049         * python/python.c: Don't include solib.h.
2050         (gdbpy_solib_name, gdbpy_find_pc_line)
2051         (gdbpy_get_current_progspace, build_objfiles_list)
2052         (gdbpy_objfiles): Remove.
2053         (GdbMethods) <current_progspace, objfiles, block_for_pc,
2054         solib_name, find_pc_line>: Remove entries.
2055
2056 2018-09-16  Tom Tromey  <tom@tromey.com>
2057
2058         * top.c (new_ui_command): Use GNU style for metasyntactic
2059         variables.
2060         * breakpoint.c (stopat_command): Use GNU style for metasyntactic
2061         variables.
2062         * maint.c (maintenance_translate_address): Remove "<>" around
2063         text.
2064         * interps.c (interpreter_exec_cmd): Use GNU style for
2065         metasyntactic variables.
2066         * nto-procfs.c (nto_procfs_target_info): Use GNU style for
2067         metasyntactic variables.
2068         * tracepoint.c (tfind_range_command): Use GNU style for
2069         metasyntactic variables.
2070         (tfind_outside_command): Likewise.
2071         (_initialize_tracepoint): Likewise.
2072         * remote.c (extended_remote_target::create_inferior): Use GNU
2073         style for metasyntactic variables.
2074         * sparc64-tdep.c (adi_examine_command): Use GNU style for
2075         metasyntactic variables.
2076         (adi_assign_command): Likewise.
2077
2078 2018-09-16  Tom Tromey  <tom@tromey.com>
2079
2080         * disasm.c (show_disassembler_options_sfunc): Use GNU style for
2081         metasyntactic variables.  Print message if no disassembler options
2082         are available.
2083
2084 2018-09-15  Tom Tromey  <tom@tromey.com>
2085
2086         * infcmd.c (get_inferior_args): Return const char *.
2087         * inferior.h (get_inferior_args): Return type now const.
2088         * linux-tdep.c (linux_fill_prpsinfo): Update.
2089         * procfs.c (procfs_target::make_corefile_notes): Update.
2090
2091 2018-09-07  Tom Tromey  <tom@tromey.com>
2092
2093         * python/python.c (execute_gdb_command): Call bpstat_do_actions
2094         inside the TRY.
2095
2096 2018-09-14  Sandra Loosemore  <sandra@codesourcery.com>
2097
2098         * nios2-tdep.c (nios2_type_align): New.
2099         (nios2_gdb_arch_init): Install type_align hook.
2100
2101 2018-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
2102
2103         * eval.c (fake_method::fake_method): Call xzalloc directly for a
2104         type that is neither object file owned, nor gdbarch owned.
2105         * gdbtypes.c (get_type_gdbarch): Add an assert that returned
2106         gdbarch is non-NULL.
2107         (alloc_type_instance): Allocate non-objfile owned types on the
2108         gdbarch obstack.
2109         (copy_type_recursive): Allocate TYPE_FIELDS and TYPE_RANGE_DATA
2110         using TYPE_ALLOC to ensure memory is allocated on the correct
2111         obstack.
2112         * gdbtypes.h (TYPE_ALLOC): Allocate space on either the objfile
2113         obstack, or the gdbarch obstack.
2114         (TYPE_ZALLOC): Rewrite using TYPE_ALLOC.
2115
2116 2018-09-14  Tom Tromey  <tom@tromey.com>
2117
2118         * infcall.c (call_function_by_hand_dummy): Remove unnecessary
2119         block.
2120
2121 2018-09-14  Tom Tromey  <tom@tromey.com>
2122
2123         * nat/fork-inferior.c (get_startup_shell): Remove "static".
2124
2125 2018-09-13  Tom Tromey  <tom@tromey.com>
2126
2127         * python/py-inferior.c (infpy_thread_from_thread_handle): Now
2128         static.
2129
2130 2018-09-13  Tom Tromey  <tom@tromey.com>
2131
2132         * exec.c (try_open_exec_file): Use std::string.
2133
2134 2018-09-13  Tom Tromey  <tom@tromey.com>
2135
2136         * utils.h (gdb_bfd_errmsg): Return std::string.
2137         * exec.c (exec_file_attach): Update.
2138         * compile/compile-object-load.c (compile_object_load): Update.
2139         * utils.c (gdb_bfd_errmsg): Return std::string.
2140
2141 2018-09-13  Tom Tromey  <tom@tromey.com>
2142
2143         * procfs.c (struct procinfo_deleter): New.
2144         (procinfo_up): New typedef.
2145         (do_destroy_procinfo_cleanup): Remove.
2146         (procfs_target::info_proc): Use procinfo_up.  Remove cleanups.
2147
2148 2018-09-13  Tom Tromey  <tom@tromey.com>
2149
2150         * source.c (add_path): Use gdb::unique_xmalloc_ptr.
2151
2152 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
2153 2018-09-13  Tom Tromey  <tom@tromey.com>
2154
2155         * python/py-progspace.c (PSPY_REQUIRE_VALID): New macro.
2156         (pspy_get_objfiles): New function.
2157         (progspace_object_methods): New.
2158         (pspace_object_type): Add tp_methods callback.
2159         * python/python-internal.h (build_objfiles_list): New
2160         declaration.
2161         * python/python.c (build_objfiles_list): New function.
2162         (gdbpy_objfiles): Implement using build_objfiles_list.
2163         * NEWS: Mention the Progspace.objfiles method.
2164
2165 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
2166
2167         * python/py-inferior.c (infpy_get_progspace): New function.
2168         (inferior_object_getset): Add progspace property.
2169         * NEWS: Mention the new property.
2170
2171 2018-09-13  Tom Tromey  <tom@tromey.com>
2172
2173         PR rust/23650:
2174         * rust-lang.c (rust_evaluate_subexp): Use field name, not "foo".
2175
2176 2018-09-13  Tom Tromey  <tom@tromey.com>
2177
2178         PR rust/23626:
2179         * rust-lang.c (rust_enum_variant): Now static.
2180         (rust_empty_enum_p): New function.
2181         (rust_print_enum, rust_evaluate_subexp, rust_print_struct_def):
2182         Handle empty enum.
2183
2184 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
2185
2186         * python/py-inferior.c (infpy_repr): New.
2187         (inferior_object_type): Register infpy_repr.
2188         * python/py-objfile.c (objfpy_repr): New.
2189         (objfile_object_type): Register objfpy_repr.
2190
2191 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
2192
2193         * fbsd-nat.c (fbsd_nat_target::info_proc): Remove unused variable.
2194
2195 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
2196
2197         * aarch64-fbsd-tdep.h (AARCH64_FBSD_SIZEOF_GREGSET): Fix comment
2198         typo.
2199
2200 2018-09-12  Sergio Durigan Junior  <sergiodj@redhat.com>
2201
2202         * common/common-utils.c: Don't include '<sys/stat.h>'.
2203         (is_regular_file): Move to...
2204         * common/filestuff.c (is_regular_file): ... here.
2205         * common/common-utils.h (is_regular_file): Move to...
2206         * common/filestuff.h (is_regular_file): ... here.
2207
2208 2018-09-12  Simon Marchi  <simon.marchi@ericsson.com>
2209
2210         * skip.c (debug_skip): New variable.
2211         (skiplist_entry::do_skip_file_p): Add debug output.
2212         (skiplist_entry::do_skip_gfile_p): Likewise.
2213         (skiplist_entry::skip_function_p): Likewise.
2214         (_initialize_step_skip): Create debug command.
2215         * NEWS: Mention set/show debug skip.
2216
2217 2018-09-11  Xavier Roirand  <roirand@adacore.com>
2218
2219         * darwin-nat.c (should_disable_startup_with_shell):
2220         New function.
2221         (darwin_nat_target::create_inferior): Add call.
2222
2223 2018-09-11  Xavier Roirand  <roirand@adacore.com>
2224
2225         * darwin-nat.h (struct darwin_thread_info) <gdb_port,
2226         inf_port, msg_state>: Initialize.
2227         (struct darwin_thread_info) <signaled, single_step>: Change
2228         type and initialize.
2229         (struct darwin_thread_info) <event>: Initialize.
2230
2231 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
2232
2233         PR gdb/23555
2234         PR gdb/23558
2235         * gnulib/import/m4/getcwd-path-max.m4: Add cross-compilation
2236         guesses.
2237
2238 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
2239
2240         Revert:
2241         2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
2242
2243         PR gdb/23555
2244         PR gdb/23558
2245         * gnulib/aclocal.m4: Regenerate.
2246         * gnulib/config.in: Regenerate.
2247         * gnulib/configure: Regenerate.
2248         * gnulib/import/Makefile.am: Update.
2249         * gnulib/import/Makefile.in: Update.
2250         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
2251         * gnulib/import/_Noreturn.h: ... this.
2252         * gnulib/import/alloca.in.h: Update.
2253         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
2254         * gnulib/import/arg-nonnull.h: ... this.
2255         * gnulib/import/assure.h: Update.
2256         * gnulib/import/at-func.c: Update.
2257         * gnulib/import/basename-lgpl.c: Update.
2258         * gnulib/import/extra/snippet/c++defs.h: Rename to...
2259         * gnulib/import/c++defs.h: ... this.
2260         * gnulib/import/canonicalize-lgpl.c: Update.
2261         * gnulib/import/cdefs.h: Update.
2262         * gnulib/import/chdir-long.c: Update.
2263         * gnulib/import/chdir-long.h: Update.
2264         * gnulib/import/cloexec.c: Update.
2265         * gnulib/import/cloexec.h: Update.
2266         * gnulib/import/close.c: Update.
2267         * gnulib/import/closedir.c: Update.
2268         * gnulib/import/config.charset: Update.
2269         * gnulib/import/dirent-private.h: Update.
2270         * gnulib/import/dirent.in.h: Update.
2271         * gnulib/import/dirfd.c: Update.
2272         * gnulib/import/dirname-lgpl.c: Update.
2273         * gnulib/import/dirname.h: Update.
2274         * gnulib/import/dosname.h: Update.
2275         * gnulib/import/dup-safer-flag.c: Update.
2276         * gnulib/import/dup-safer.c: Update.
2277         * gnulib/import/dup.c: Update.
2278         * gnulib/import/dup2.c: Update.
2279         * gnulib/import/errno.in.h: Update.
2280         * gnulib/import/error.c: Update.
2281         * gnulib/import/error.h: Update.
2282         * gnulib/import/exitfail.c: Update.
2283         * gnulib/import/exitfail.h: Update.
2284         * gnulib/import/extra/update-copyright: Update.
2285         * gnulib/import/fchdir.c: Update.
2286         * gnulib/import/fcntl.c: Update.
2287         * gnulib/import/fcntl.in.h: Update.
2288         * gnulib/import/fd-hook.c: Update.
2289         * gnulib/import/fd-hook.h: Update.
2290         * gnulib/import/fd-safer-flag.c: Update.
2291         * gnulib/import/fd-safer.c: Update.
2292         * gnulib/import/fdopendir.c: Update.
2293         * gnulib/import/filename.h: Update.
2294         * gnulib/import/filenamecat-lgpl.c: Update.
2295         * gnulib/import/filenamecat.h: Update.
2296         * gnulib/import/flexmember.h: Update.
2297         * gnulib/import/float+.h: Update.
2298         * gnulib/import/float.c: Update.
2299         * gnulib/import/float.in.h: Update.
2300         * gnulib/import/fnmatch.c: Update.
2301         * gnulib/import/fnmatch.in.h: Update.
2302         * gnulib/import/fnmatch_loop.c: Update.
2303         * gnulib/import/fpucw.h: Update.
2304         * gnulib/import/frexp.c: Update.
2305         * gnulib/import/frexpl.c: Update.
2306         * gnulib/import/fstat.c: Update.
2307         * gnulib/import/fstatat.c: Update.
2308         * gnulib/import/getcwd-lgpl.c: Update.
2309         * gnulib/import/getcwd.c: Update.
2310         * gnulib/import/getdtablesize.c: Update.
2311         * gnulib/import/getlogin_r.c: Update.
2312         * gnulib/import/getprogname.c: Update.
2313         * gnulib/import/getprogname.h: Update.
2314         * gnulib/import/gettext.h: Update.
2315         * gnulib/import/gettimeofday.c: Update.
2316         * gnulib/import/glob-libc.h: Update.
2317         * gnulib/import/glob.c: Update.
2318         * gnulib/import/glob.in.h: Update.
2319         * gnulib/import/glob_internal.h: Update.
2320         * gnulib/import/glob_pattern_p.c: Update.
2321         * gnulib/import/globfree.c: Update.
2322         * gnulib/import/hard-locale.c: Update.
2323         * gnulib/import/hard-locale.h: Update.
2324         * gnulib/import/intprops.h: Update.
2325         * gnulib/import/inttypes.in.h: Update.
2326         * gnulib/import/isnan.c: Update.
2327         * gnulib/import/isnand-nolibm.h: Update.
2328         * gnulib/import/isnand.c: Update.
2329         * gnulib/import/isnanl-nolibm.h: Update.
2330         * gnulib/import/isnanl.c: Update.
2331         * gnulib/import/itold.c: Update.
2332         * gnulib/import/libc-config.h: Update.
2333         * gnulib/import/limits.in.h: Update.
2334         * gnulib/import/localcharset.c: Update.
2335         * gnulib/import/localcharset.h: Update.
2336         * gnulib/import/localtime-buffer.c: Update.
2337         * gnulib/import/localtime-buffer.h: Update.
2338         * gnulib/import/lstat.c: Update.
2339         * gnulib/import/m4/00gnulib.m4: Update.
2340         * gnulib/import/m4/__inline.m4: Update.
2341         * gnulib/import/m4/absolute-header.m4: Update.
2342         * gnulib/import/m4/alloca.m4: Update.
2343         * gnulib/import/m4/builtin-expect.m4: Update.
2344         * gnulib/import/m4/canonicalize.m4: Update.
2345         * gnulib/import/m4/chdir-long.m4: Update.
2346         * gnulib/import/m4/close.m4: Update.
2347         * gnulib/import/m4/closedir.m4: Update.
2348         * gnulib/import/m4/configmake.m4: Update.
2349         * gnulib/import/m4/d-ino.m4: Update.
2350         * gnulib/import/m4/d-type.m4: Update.
2351         * gnulib/import/m4/dirent_h.m4: Update.
2352         * gnulib/import/m4/dirfd.m4: Update.
2353         * gnulib/import/m4/dirname.m4: Update.
2354         * gnulib/import/m4/double-slash-root.m4: Update.
2355         * gnulib/import/m4/dup.m4: Update.
2356         * gnulib/import/m4/dup2.m4: Update.
2357         * gnulib/import/m4/eealloc.m4: Update.
2358         * gnulib/import/m4/environ.m4: Update.
2359         * gnulib/import/m4/errno_h.m4: Update.
2360         * gnulib/import/m4/error.m4: Update.
2361         * gnulib/import/m4/exponentd.m4: Update.
2362         * gnulib/import/m4/exponentl.m4: Update.
2363         * gnulib/import/m4/extensions.m4: Update.
2364         * gnulib/import/m4/extern-inline.m4: Update.
2365         * gnulib/import/m4/fchdir.m4: Update.
2366         * gnulib/import/m4/fcntl-o.m4: Update.
2367         * gnulib/import/m4/fcntl.m4: Update.
2368         * gnulib/import/m4/fcntl_h.m4: Update.
2369         * gnulib/import/m4/fdopendir.m4: Update.
2370         * gnulib/import/m4/filenamecat.m4: Update.
2371         * gnulib/import/m4/flexmember.m4: Update.
2372         * gnulib/import/m4/float_h.m4: Update.
2373         * gnulib/import/m4/fnmatch.m4: Update.
2374         * gnulib/import/m4/fnmatch_h.m4: Update.
2375         * gnulib/import/m4/fpieee.m4: Update.
2376         * gnulib/import/m4/frexp.m4: Update.
2377         * gnulib/import/m4/frexpl.m4: Update.
2378         * gnulib/import/m4/fstat.m4: Update.
2379         * gnulib/import/m4/fstatat.m4: Update.
2380         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
2381         * gnulib/import/m4/getcwd-path-max.m4: Update.
2382         * gnulib/import/m4/getcwd.m4: Update.
2383         * gnulib/import/m4/getdtablesize.m4: Update.
2384         * gnulib/import/m4/getlogin.m4: Update.
2385         * gnulib/import/m4/getlogin_r.m4: Update.
2386         * gnulib/import/m4/getpagesize.m4: Update.
2387         * gnulib/import/m4/getprogname.m4: Update.
2388         * gnulib/import/m4/gettimeofday.m4: Update.
2389         * gnulib/import/m4/glibc21.m4: Update.
2390         * gnulib/import/m4/glob.m4: Update.
2391         * gnulib/import/m4/glob_h.m4: Update.
2392         * gnulib/import/m4/gnulib-cache.m4: Update.
2393         * gnulib/import/m4/gnulib-common.m4: Update.
2394         * gnulib/import/m4/gnulib-comp.m4: Update.
2395         * gnulib/import/m4/gnulib-tool.m4: Update.
2396         * gnulib/import/m4/hard-locale.m4: Update.
2397         * gnulib/import/m4/include_next.m4: Update.
2398         * gnulib/import/m4/inttypes-pri.m4: Update.
2399         * gnulib/import/m4/inttypes.m4: Update.
2400         * gnulib/import/m4/isnand.m4: Update.
2401         * gnulib/import/m4/isnanl.m4: Update.
2402         * gnulib/import/m4/largefile.m4: Update.
2403         * gnulib/import/m4/limits-h.m4: Update.
2404         * gnulib/import/m4/localcharset.m4: Update.
2405         * gnulib/import/m4/locale-fr.m4: Update.
2406         * gnulib/import/m4/locale-ja.m4: Update.
2407         * gnulib/import/m4/locale-zh.m4: Update.
2408         * gnulib/import/m4/localtime-buffer.m4: Update.
2409         * gnulib/import/m4/longlong.m4: Update.
2410         * gnulib/import/m4/lstat.m4: Update.
2411         * gnulib/import/m4/malloc.m4: Update.
2412         * gnulib/import/m4/malloca.m4: Update.
2413         * gnulib/import/m4/math_h.m4: Update.
2414         * gnulib/import/m4/mbrtowc.m4: Update.
2415         * gnulib/import/m4/mbsinit.m4: Update.
2416         * gnulib/import/m4/mbsrtowcs.m4: Update.
2417         * gnulib/import/m4/mbstate_t.m4: Update.
2418         * gnulib/import/m4/memchr.m4: Update.
2419         * gnulib/import/m4/memmem.m4: Update.
2420         * gnulib/import/m4/mempcpy.m4: Update.
2421         * gnulib/import/m4/memrchr.m4: Update.
2422         * gnulib/import/m4/mkdir.m4: Update.
2423         * gnulib/import/m4/mkstemp.m4: Update.
2424         * gnulib/import/m4/mmap-anon.m4: Update.
2425         * gnulib/import/m4/mode_t.m4: Update.
2426         * gnulib/import/m4/msvc-inval.m4: Update.
2427         * gnulib/import/m4/msvc-nothrow.m4: Update.
2428         * gnulib/import/m4/multiarch.m4: Update.
2429         * gnulib/import/m4/nocrash.m4: Update.
2430         * gnulib/import/m4/off_t.m4: Update.
2431         * gnulib/import/m4/onceonly.m4: Update.
2432         * gnulib/import/m4/open-cloexec.m4: Update.
2433         * gnulib/import/m4/open.m4: Update.
2434         * gnulib/import/m4/openat.m4: Update.
2435         * gnulib/import/m4/opendir.m4: Update.
2436         * gnulib/import/m4/pathmax.m4: Update.
2437         * gnulib/import/m4/rawmemchr.m4: Update.
2438         * gnulib/import/m4/readdir.m4: Update.
2439         * gnulib/import/m4/readlink.m4: Update.
2440         * gnulib/import/m4/realloc.m4: Update.
2441         * gnulib/import/m4/rename.m4: Update.
2442         * gnulib/import/m4/rewinddir.m4: Update.
2443         * gnulib/import/m4/rmdir.m4: Update.
2444         * gnulib/import/m4/save-cwd.m4: Update.
2445         * gnulib/import/m4/secure_getenv.m4: Update.
2446         * gnulib/import/m4/setenv.m4: Update.
2447         * gnulib/import/m4/signal_h.m4: Update.
2448         * gnulib/import/m4/ssize_t.m4: Update.
2449         * gnulib/import/m4/stat-time.m4: Update.
2450         * gnulib/import/m4/stat.m4: Update.
2451         * gnulib/import/m4/std-gnu11.m4: Update.
2452         * gnulib/import/m4/stdbool.m4: Update.
2453         * gnulib/import/m4/stddef_h.m4: Update.
2454         * gnulib/import/m4/stdint.m4: Update.
2455         * gnulib/import/m4/stdio_h.m4: Update.
2456         * gnulib/import/m4/stdlib_h.m4: Update.
2457         * gnulib/import/m4/strchrnul.m4: Update.
2458         * gnulib/import/m4/strdup.m4: Update.
2459         * gnulib/import/m4/strerror.m4: Update.
2460         * gnulib/import/m4/string_h.m4: Update.
2461         * gnulib/import/m4/strstr.m4: Update.
2462         * gnulib/import/m4/strtok_r.m4: Update.
2463         * gnulib/import/m4/sys_socket_h.m4: Update.
2464         * gnulib/import/m4/sys_stat_h.m4: Update.
2465         * gnulib/import/m4/sys_time_h.m4: Update.
2466         * gnulib/import/m4/sys_types_h.m4: Update.
2467         * gnulib/import/m4/tempname.m4: Update.
2468         * gnulib/import/m4/time_h.m4: Update.
2469         * gnulib/import/m4/unistd-safer.m4: Update.
2470         * gnulib/import/m4/unistd_h.m4: Update.
2471         * gnulib/import/m4/warn-on-use.m4: Update.
2472         * gnulib/import/m4/wchar_h.m4: Update.
2473         * gnulib/import/m4/wchar_t.m4: Update.
2474         * gnulib/import/m4/wctype_h.m4: Update.
2475         * gnulib/import/m4/wint_t.m4: Update.
2476         * gnulib/import/malloc.c: Update.
2477         * gnulib/import/malloc/scratch_buffer.h: Update.
2478         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
2479         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
2480         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
2481         * gnulib/import/malloca.c: Update.
2482         * gnulib/import/malloca.h: Update.
2483         * gnulib/import/malloca.valgrind: Update.
2484         * gnulib/import/math.in.h: Update.
2485         * gnulib/import/mbrtowc.c: Update.
2486         * gnulib/import/mbsinit.c: Update.
2487         * gnulib/import/mbsrtowcs-impl.h: Update.
2488         * gnulib/import/mbsrtowcs-state.c: Update.
2489         * gnulib/import/mbsrtowcs.c: Update.
2490         * gnulib/import/memchr.c: Update.
2491         * gnulib/import/memmem.c: Update.
2492         * gnulib/import/mempcpy.c: Update.
2493         * gnulib/import/memrchr.c: Update.
2494         * gnulib/import/mkdir.c: Update.
2495         * gnulib/import/mkstemp.c: Update.
2496         * gnulib/import/msvc-inval.c: Update.
2497         * gnulib/import/msvc-inval.h: Update.
2498         * gnulib/import/msvc-nothrow.c: Update.
2499         * gnulib/import/msvc-nothrow.h: Update.
2500         * gnulib/import/open.c: Update.
2501         * gnulib/import/openat-die.c: Update.
2502         * gnulib/import/openat-priv.h: Update.
2503         * gnulib/import/openat-proc.c: Update.
2504         * gnulib/import/openat.c: Update.
2505         * gnulib/import/openat.h: Update.
2506         * gnulib/import/opendir.c: Update.
2507         * gnulib/import/pathmax.h: Update.
2508         * gnulib/import/pipe-safer.c: Update.
2509         * gnulib/import/rawmemchr.c: Update.
2510         * gnulib/import/readdir.c: Update.
2511         * gnulib/import/readlink.c: Update.
2512         * gnulib/import/realloc.c: Update.
2513         * gnulib/import/ref-add.sin: Update.
2514         * gnulib/import/ref-del.sin: Update.
2515         * gnulib/import/rename.c: Update.
2516         * gnulib/import/rewinddir.c: Update.
2517         * gnulib/import/rmdir.c: Update.
2518         * gnulib/import/same-inode.h: Update.
2519         * gnulib/import/save-cwd.c: Update.
2520         * gnulib/import/save-cwd.h: Update.
2521         * gnulib/import/scratch_buffer.h: Update.
2522         * gnulib/import/secure_getenv.c: Update.
2523         * gnulib/import/setenv.c: Update.
2524         * gnulib/import/signal.in.h: Update.
2525         * gnulib/import/stat-time.c: Update.
2526         * gnulib/import/stat-time.h: Update.
2527         * gnulib/import/stat-w32.c: Update.
2528         * gnulib/import/stat-w32.h: Update.
2529         * gnulib/import/stat.c: Update.
2530         * gnulib/import/stdbool.in.h: Update.
2531         * gnulib/import/stddef.in.h: Update.
2532         * gnulib/import/stdint.in.h: Update.
2533         * gnulib/import/stdio.in.h: Update.
2534         * gnulib/import/stdlib.in.h: Update.
2535         * gnulib/import/str-two-way.h: Update.
2536         * gnulib/import/strchrnul.c: Update.
2537         * gnulib/import/strdup.c: Update.
2538         * gnulib/import/streq.h: Update.
2539         * gnulib/import/strerror-override.c: Update.
2540         * gnulib/import/strerror-override.h: Update.
2541         * gnulib/import/strerror.c: Update.
2542         * gnulib/import/string.in.h: Update.
2543         * gnulib/import/stripslash.c: Update.
2544         * gnulib/import/strnlen1.c: Update.
2545         * gnulib/import/strnlen1.h: Update.
2546         * gnulib/import/strstr.c: Update.
2547         * gnulib/import/strtok_r.c: Update.
2548         * gnulib/import/sys_stat.in.h: Update.
2549         * gnulib/import/sys_time.in.h: Update.
2550         * gnulib/import/sys_types.in.h: Update.
2551         * gnulib/import/tempname.c: Update.
2552         * gnulib/import/tempname.h: Update.
2553         * gnulib/import/time.in.h: Update.
2554         * gnulib/import/unistd--.h: Update.
2555         * gnulib/import/unistd-safer.h: Update.
2556         * gnulib/import/unistd.in.h: Update.
2557         * gnulib/import/unsetenv.c: Update.
2558         * gnulib/import/verify.h: Update.
2559         * gnulib/import/extra/snippet/warn-on-use.h: Update.
2560         * gnulib/import/wchar.in.h: Update.
2561         * gnulib/import/wctype.in.h: Update.
2562         * gnulib/import/xalloc-oversized.h: Update.
2563         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
2564         "53e2c179f26a890fa6685af4b6c1397ee370433b".
2565
2566 2018-09-10  Simon Marchi  <simon.marchi@ericsson.com>
2567
2568         * record-btrace.c (get_thread_current_frame): Remove
2569         old_inferior_ptid.
2570
2571 2018-09-10  Jerome Guitton  <guitton@adacore.com>
2572
2573         * ada-lang.c (ada_value_struct_elt): Call ada_to_fixed_type
2574         with check_tag to 1 if and only if the type is tagged and the
2575         component being searched cannot been found in the current
2576         view. Otherwise, always call ada_to_fixed_type with
2577         check_tag to 0.
2578
2579 2018-09-10  Xavier Roirand  <roirand@adacore.com>
2580
2581         * ada-lang.c (ada_is_access_to_unconstrained_array): Remove static
2582         declaration.
2583         * ada-lang.h: add ada_is_access_to_unconstrained_array prototype.
2584         * ada-varobj.c (ada_varobj_get_number_of_children,
2585         ada_varobj_describe_child, ada_value_is_changeable_p): Cleanup code.
2586
2587 2018-09-10  Xavier Roirand  <roirand@adacore.com>
2588
2589         * ada-valprint.c (ada_value_print): Use type instead of
2590         enclosing type.
2591
2592 2018-09-10  Xavier Roirand  <roirand@adacore.com>
2593
2594         * ada-lang.c (ada_value_subscript): Handle case when parameter is
2595         an array of access to unconstrained array.
2596
2597 2018-09-10  Xavier Roirand  <roirand@adacore.com>
2598
2599         * ada-lang.c (ada_is_access_to_unconstrained_array): New function.
2600         (ada_check_typedef): Use it.
2601
2602 2018-09-10  Xavier Roirand  <roirand@adacore.com>
2603
2604         * ada-varobj.c (ada_varobj_describe_struct_child)
2605         (ada_varobj_describe_child): Handle union case like struct one.
2606
2607 2018-09-10  Tom Tromey  <tom@tromey.com>
2608
2609         PR python/18380:
2610         * python/python.c (_initialize_python): Make example in "python"
2611         help work in Python 3.
2612
2613 2018-09-10  Eli Zaretskii  <eliz@gnu.org>
2614
2615         * Makefile.in (transformed_name): Use INSTALL_SCRIPT instead of
2616         INSTALL_PROGRAM to install gdb-add-index.sh.  Don't append
2617         $(EXEEXT) to the script, as it is not a program.
2618
2619 2018-09-09  Simon Marchi  <simon.marchi@ericsson.com>
2620
2621         * python/py-prettyprint.c (pretty_print_one_value): Return
2622         gdbpy_ref<>.
2623         (print_string_repr): Adjust.
2624         (apply_varobj_pretty_printer): Return gdbpy_ref<>.
2625         * python/python-internal.h (apply_varobj_pretty_printer): Return
2626         gdbpy_ref<>.
2627         * varobj.c (varobj_value_get_print_value): Adjust.
2628
2629 2018-09-08  Tom Tromey  <tom@tromey.com>
2630
2631         PR python/16047:
2632         * python/py-prettyprint.c (pretty_print_one_value): Check for
2633         to_string method.
2634
2635 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2636
2637         * ada-lang.c (resolve_subexp): Pass correct OPLEN in call to
2638         replace_operator_with_call.
2639
2640 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2641
2642         * ada-lang.c (ada_value_cast): Remove unnecessary parentheses.
2643
2644 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2645
2646         * ada-typeprint.c (print_range): Print the bounds using TYPE
2647         rather than its TYPE_TARGET_TYPE.
2648
2649 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2650
2651         * ada-lang.c (ada_to_fixed_value): Minor reformatting in
2652         call to ada_to_fixed_value_create.
2653
2654 2018-09-08  Jerome Guitton  <guitton@adacore.com>
2655
2656         * ada-lang.c (ada_decode): strip dot prefix in symbol name.
2657
2658 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2659
2660         * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
2661         by calls to error.
2662
2663 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2664
2665         * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
2666         Move update of loop variable "fi".
2667
2668 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2669
2670         * ada-lang.c (value_assign_to_component): In the case of
2671         big-endian targets, extract the bits of the given VAL
2672         using an src_offset of zero if container is not a scalar.
2673
2674 2018-09-06  Simon Ser  <contact@emersion.fr>
2675
2676         PR gdb/23105
2677         * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
2678         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
2679         * fbsd-tdep.c (fbsd_make_note_desc): New.
2680         (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
2681         NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
2682         * target.h (enum target_object) Add FreeBSD-specific
2683         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
2684
2685 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
2686
2687         * compile/compile-c.h (generate_c_for_variable_locations):
2688         Change reference to pointer.
2689         * compile/compile-c-support.c (compile_program) <compute>:
2690         Likewise.
2691         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
2692         (generate_c_for_for_one_variable): Likewise
2693         (generate_c_for_variable_locations): Likewise
2694         * compile/compile-c-types.c (compile_c_instance::convert_type):
2695         Likewise
2696         * compile/compile-cplus-symbols.c (convert_one_symbol):
2697         std::move the scope passed to enter_scope.
2698         * compile/compile-cplus-types.c
2699         (compile_cplus_instance::enter_scope): Make parameter
2700         rvalue-reference.
2701         (compile_cplus_instance::new_scope): Change reference to
2702         pointer.
2703         (compile_cplus_instance::convert_type): Likewise
2704         (compile_cplus_convert_typedef): std::move the scope passed to
2705         enter_scope.
2706         (compile_cplus_convert_struct_or_union): Likewise.
2707         (compile_cplus_convert_enum): Likewise.
2708         (compile_cplus_convert_namespace): Likewise.
2709         * compile/compile-cplus.h (compile_cplus_instance)
2710         <enter_scope>: Make parameter rvalue-reference.
2711         * compile/compile-internal.h (compile_instance)
2712         <get_cached_type>: Likewise
2713         * compile/compile-loc2c.c (push): Likewise
2714         (pushf): Likewise
2715         (unary): Likewise
2716         (binary): Likewise
2717         (print_label): Likewise
2718         (pushf_register_address): Likewise
2719         (pushf_register): Likewise
2720         (do_compile_dwarf_expr_to_c): Likewise
2721         (compile_dwarf_expr_to_c): Likewise
2722         (compile_dwarf_bounds_to_c): Likewise
2723         * compile/compile.c (compile_instance::get_cached_type):
2724         Likewise
2725         * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
2726         (compile_dwarf_bounds_to_c): Likewise
2727         * dwarf2loc.c (locexpr_generate_c_location): Likewise.
2728         (dwarf2_compile_property_to_c): Likewise
2729         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
2730         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
2731         Likewise
2732
2733 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
2734
2735         * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
2736         * tui/tui-data.c (init_content_element): Don't initialize it.
2737
2738 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
2739
2740         * tui/tui-data.h (struct tui_win_info)
2741         <detail::opaque>: Remove.
2742         * tui/tui-data.c (init_win_info): Remove assignment.
2743
2744 2018-09-05  Tom Tromey  <tom@tromey.com>
2745
2746         * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
2747         -Wformat-nonliteral.
2748         * target-float.c (host_float_ops<T>::to_string)
2749         (host_float_ops<T>::from_string): Use
2750         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
2751         * configure: Rebuild.
2752
2753 2018-09-05  Simon Marchi  <simon.marchi@ericsson.com>
2754
2755         * printcmd.c (printf_c_string): Use
2756         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
2757         (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
2758
2759 2018-09-05  Tom Tromey  <tom@tromey.com>
2760
2761         * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
2762
2763 2018-09-05  Tom de Vries  <tdevries@suse.de>
2764
2765         * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
2766         with resolve_abstract_p == true.
2767         (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
2768         defaulting to false. Propagate resolve_abstract_p to
2769         dwarf2_fetch_die_loc_sect_off.
2770         * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
2771         parameter, defaulting to false.
2772         * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
2773         (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
2774         parameter.
2775         * dwarf2read.h (struct die_info): Forward-declare.
2776         (die_info_ptr): New typedef.
2777         (struct dwarf2_per_objfile): Add abstract_to_concrete field.
2778
2779 2018-09-05  Joel Brobecker  <brobecker@adacore.com>
2780
2781         GDB 8.2 released.
2782
2783 2018-09-04  Sergio Durigan Junior  <sergiodj@redhat.com>
2784             Pedro Alves  <palves@redhat.com>
2785
2786         * gnulib/Makefile.in (aclocal_m4_deps): Move to
2787         "aclocal-m4-deps.mk".  Include file here.
2788         $(srcdir)/aclocal.m4: Add "configure.ac".
2789         * gnulib/aclocal-m4-deps.mk: New file.
2790         * gnulib/update-gnulib.sh: Automatically update
2791         "aclocal-m4-deps.mk".
2792
2793 2018-09-04  Tom Tromey  <tom@tromey.com>
2794
2795         * configure: Rebuild.
2796         * configure.ac: Remove multi-ice code.
2797
2798 2018-09-04  Tom Tromey  <tom@tromey.com>
2799
2800         * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
2801         (ada-exp.o): Update.
2802
2803 2018-09-04  Tom Tromey  <tom@tromey.com>
2804
2805         * Makefile.in (printcmd.o, target-float.o): Remove.
2806         (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
2807
2808 2018-09-04  Tom Tromey  <tom@tromey.com>
2809
2810         * gnulib/Makefile.in: Remove obsolete comment.
2811         * Makefile.in: Remove obsolete comment.
2812
2813 2018-09-04  Andrew Burgess  <andrew.burgess@embecosm.com>
2814
2815         * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
2816         line with '+'.
2817
2818 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
2819
2820         * riscv-tdep.c: Add 'prologue-value.h' include.
2821         (struct riscv_unwind_cache): New struct.
2822         (riscv_debug_unwinder): New global.
2823         (riscv_scan_prologue): Update arguments, capture register details
2824         from prologue scan.
2825         (riscv_skip_prologue): Reformat arguments line, move end of
2826         prologue calculation into riscv_scan_prologue.
2827         (riscv_frame_cache): Update return type, create
2828         riscv_unwind_cache, scan the prologue, and fill in remaining cache
2829         details.
2830         (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
2831         (riscv_frame_prev_register): Use the trad_frame within the
2832         riscv_unwind_cache.
2833         (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
2834         flag.
2835
2836 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
2837
2838         * trad-frame.h (trad_frame_set_realreg): Declare.
2839         (trad_frame_set_addr): Declare.
2840         * trad-frame.c (trad_frame_set_realreg): Define new function.
2841         (trad_frame_set_addr): Define new function.
2842         (trad_frame_set_reg_realreg): Use new function.
2843         (trad_frame_set_reg_addr): Use new function.
2844
2845 2018-09-01  Keith Seitz  <keiths@redhat.com>
2846
2847         * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
2848         pulongest instead of "%lld".
2849         * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
2850         ATTRIBUTE_UNUSED.
2851
2852 2018-08-31  Tom Tromey  <tom@tromey.com>
2853
2854         * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
2855         variant part type.
2856
2857 2018-08-31  Pedro Alves  <palves@redhat.com>
2858
2859         * gdbarch.h: Regenerate.
2860
2861 2018-08-31  Pedro Alves  <palves@redhat.com>
2862
2863         * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
2864         * target.h (Hardware watchpoint interfaces): Describe
2865         continuable/steppable/non-steppable watchpoints.
2866         * gdbarch.h, gdbarch.c: Regenerate.
2867
2868 2018-08-31  Pedro Alves  <palves@redhat.com>
2869
2870         * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
2871         Delete.
2872         * s390-linux-nat.c
2873         (s390_linux_nat_target::have_continuable_watchpoint): Delete.
2874         * target.h (target_ops::have_continuable_watchpoint): Delete.
2875         (target_have_continuable_watchpoint): Delete.
2876         * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
2877         * target-delegates.c: Regenerate.
2878
2879 2018-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
2880
2881         * gnulib/Makefile.in (aclocal_m4_deps): Update according to
2882         the files present in "gnulib/import/m4/".
2883
2884 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
2885
2886         * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
2887         c.sw, c.swsp, and c.sdsp.
2888
2889 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
2890
2891         * riscv-tdep.c (struct riscv_inferior_data): Delete.
2892         (riscv_read_misa_reg): Don't cache value read into inferior data.
2893         (riscv_new_inferior_data): Delete.
2894         (riscv_inferior_data_cleanup): Delete.
2895         (riscv_inferior_data): Delete.
2896         (riscv_invalidate_inferior_data): Delete.
2897         (_initialize_riscv_tdep): Remove initialisation of inferior data.
2898
2899 2018-08-30  Simon Marchi  <simon.marchi@ericsson.com>
2900
2901         * compile/compile-cplus-types.c
2902         (compile_cplus_instance::leave_scope): Take the address of scope
2903         object.
2904         (compile_cplus_instance::convert_qualified_base): Compare quals
2905         to 0.
2906
2907 2018-08-30  Keith Seitz  <keiths@redhat.com>
2908
2909         * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
2910         Use "%s" and host_address_to_string instead of "%p" in printf.
2911
2912 2018-08-29  Keith Seitz  <keiths@redhat.com>
2913
2914         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
2915         and compile-cplus-types.c.
2916         (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
2917         * c-lang.c (cplus_language_defn): Set C++ compile functions.
2918         * c-lang.h (cplus_get_compile_context, cplus_compute_program):
2919         Declare.
2920         * compile/compile-c-support.c: Include compile-cplus.h.
2921         (load_libcompile): Templatize.
2922         (get_compile_context): "New" function.
2923         (c_get_compile_context): Use get_compile_context.
2924         (cplus_get_compile_context): New function.
2925         (cplus_push_user_expression, cplus_pop_user_expression)
2926         (cplus_add_code_header, cplus_add_input, cplus_compile_program)
2927         (cplus_compute_program): Define new structs/functions.
2928         * compile/compile-cplus-symmbols.c: New file.
2929         * compile/compile-cplus-types.c: New file.
2930         * compile/compile-cplus.h: New file.
2931         * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
2932         Declare.
2933         * compile/compile-object-load.c (get_out_value_type): Use
2934         strncmp_iw when comparing symbol names.
2935         (compile_object_load): Add mst_bss and mst_data.
2936         * compile/compile.c (_initialize_compile): Remove
2937         -Wno-implicit-function-declaration from `compile_args'.
2938         * compile/gcc-cp-plugin.h: New file.
2939         * NEWS: Mention C++ compile support and new debug options.
2940
2941 2018-08-29  Keith Seitz  <keiths@redhat.com>
2942
2943         * linespec.c (collect_info::add_symbol): Make virtual.
2944         (struct symbol_searcher_collect_info): New struct.
2945         (symbol_searcher::find_all_symbols): New method.
2946         * symtab.h (class symbol_searcher): New class.
2947
2948 2018-08-29  Keith Seitz  <keiths@redhat.com>
2949
2950         * linespec.c (struct linespec) <function_symbols, label_symbols>:
2951         Change to vector of block_symbol.  Update all users.
2952         (struct collect_info) <symbols>: Likewise.
2953         (collect_info::add_symbol): Take block_symbol as argument.
2954         Update all callers.
2955         (decode_compound_collector) <m_symbols>: Change type to vector
2956         of block_symbol.  Update all users.
2957         (decode_compound_collector::operator ()): Change parameter type
2958         to block_symbol.
2959         (find_method, find_function_symbols, find_linespec_symbols)
2960         (find_label_symbols_in_block, find_label_symbols): Change symbol
2961         vectors to block_symbol vectors.
2962         * symtab.h (symbol_found_callback_ftype): Change parameter type to
2963         block_symbol.
2964
2965 2018-08-29  Keith Seitz  <keiths@redhat.com>
2966
2967         * linespec.c (symbolp): Remove typedef and VEC definitions.
2968         (bound_minimal_symbol_d): Likewise.
2969
2970 2018-08-29  Keith Seitz  <keiths@redhat.com>
2971
2972         * linespec.c (decode_compound_collector::decode_compound_collector):
2973         Remove initialization for `m_symtabs'.
2974         (decode_compound_collector::release_symbols): Change return type
2975         to std::vector.  Update all callers.
2976         (class decode_compound_collector) <m_symbols>: Change type to
2977         std::vector.
2978         (lookup_prefix_sym): Change return type to std::vector.  Update all
2979         callers.
2980         (compare_symbols): Remove.
2981         (std_compare_symbols): Rename to `compare_symbols'.
2982         (find_method): Change `sym_classes' parameter to std::vector.
2983         Update all callers.  Use std::sort to sort sym_classes.
2984         (find_linespec_symbols): Remove cleanup.
2985
2986 2018-08-29  Keith Seitz  <keiths@redhat.com>
2987
2988         * linespec.c (struct linespec) <minimal_symbols>: Change type to
2989         std::vector.  Update all users.
2990         (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
2991         (struct collect_info) <minimal_symbols>: Likewise.
2992         (compare_msymbols): Return bool.  Change parameters to const
2993         bound_minimal_symbol references.
2994         (find_method, find_function_symbols, find_linespec_symbols): Change
2995         `minsyms' parameter to std::vector.  Update all callers.
2996
2997 2018-08-29  Keith Seitz  <keiths@redhat.com>
2998
2999         * linespec.c (struct linespec) <label_symbols>: Change type to
3000         std::vector.  Update all users.
3001         (find_label_symbols_in_block): Change `result' parameter to
3002         std::vector.  Update all callers.
3003         (find_label_symbols): Return std::vector.  Update all callers.
3004
3005 2018-08-29  Keith Seitz  <keiths@redhat.com>
3006
3007         * linespec.c (struct linespec) <function_symbols>: Change type to
3008         std::vector.  Update all users.
3009         (struct collect_info) <function_symbols>: Likewise.
3010         (convert_linespec_to_sals): Use std::sort to sort function_symbols.
3011         (std_compare_symbols): New function.
3012         (find_method, find_function_symbols, find_linespec_symbols)
3013         (find_label_symbols_in_block): Change `symbols' parameter to
3014         std::vector.  Update all callers.
3015         (find_label_symbols): Likewise for `function_symbols' and
3016         `label_funcs_ret'.
3017
3018 2018-08-29  Keith Seitz  <keiths@redhat.com>
3019
3020         * linespec.c (symtab_vector_up): Define.
3021         (struct linespec) <file_symtabs>: Change type to std::vector *.
3022         Update all uses.
3023         (struct collect_info) <file_symtabs>: Likewise.
3024         (collect_symtabs_from_filename): Return symtab_vector_up.
3025         Update all callers.
3026         (decode_objc): Remove cleanup.
3027         (symtab_collector::symtab_collector): Initialize `m_symtabs'.
3028         (symtab_collector::release_symtabs): Return symtab_vector_up.
3029         Update all callers.
3030         (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
3031         Update all users.
3032         (collect_symtabs_from_filename, symtabs_from_filename): Return
3033         symtab_vector_up.  Update all callers.
3034
3035 2018-08-29  Tom Tromey  <tom@tromey.com>
3036
3037         * csky-tdep.c (csky_analyze_prologue): Use
3038         core_addr_to_string_nz.
3039
3040 2018-08-29  Tom Tromey  <tom@tromey.com>
3041
3042         * windows-nat.c (struct xlate_exception) <them>: Change type to
3043         DWORD.
3044         (xlate): Fix formatting.  Remove last entry.
3045         (struct xlate_exception, xlate): Comment out.
3046         (windows_nat_target::resume): Use ranged for.
3047
3048 2018-08-29  Jim Wilson  <jimw@sifive.com>
3049
3050         * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
3051         (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
3052         of NT_PRFPREG.
3053         (riscv_linux_nat_target::store_registers): Likewise.
3054
3055 2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
3056
3057         PR gdb/23555
3058         PR gdb/23558
3059         * gnulib/aclocal.m4: Regenerate.
3060         * gnulib/config.in: Regenerate.
3061         * gnulib/configure: Regenerate.
3062         * gnulib/import/Makefile.am: Update.
3063         * gnulib/import/Makefile.in: Update.
3064         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
3065         * gnulib/import/_Noreturn.h: ... this.
3066         * gnulib/import/alloca.in.h: Update.
3067         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
3068         * gnulib/import/arg-nonnull.h: ... this.
3069         * gnulib/import/assure.h: Update.
3070         * gnulib/import/at-func.c: Update.
3071         * gnulib/import/basename-lgpl.c: Update.
3072         * gnulib/import/extra/snippet/c++defs.h: Rename to...
3073         * gnulib/import/c++defs.h: ... this.
3074         * gnulib/import/canonicalize-lgpl.c: Update.
3075         * gnulib/import/cdefs.h: Update.
3076         * gnulib/import/chdir-long.c: Update.
3077         * gnulib/import/chdir-long.h: Update.
3078         * gnulib/import/cloexec.c: Update.
3079         * gnulib/import/cloexec.h: Update.
3080         * gnulib/import/close.c: Update.
3081         * gnulib/import/closedir.c: Update.
3082         * gnulib/import/config.charset: Update.
3083         * gnulib/import/dirent-private.h: Update.
3084         * gnulib/import/dirent.in.h: Update.
3085         * gnulib/import/dirfd.c: Update.
3086         * gnulib/import/dirname-lgpl.c: Update.
3087         * gnulib/import/dirname.h: Update.
3088         * gnulib/import/dosname.h: Update.
3089         * gnulib/import/dup-safer-flag.c: Update.
3090         * gnulib/import/dup-safer.c: Update.
3091         * gnulib/import/dup.c: Update.
3092         * gnulib/import/dup2.c: Update.
3093         * gnulib/import/errno.in.h: Update.
3094         * gnulib/import/error.c: Update.
3095         * gnulib/import/error.h: Update.
3096         * gnulib/import/exitfail.c: Update.
3097         * gnulib/import/exitfail.h: Update.
3098         * gnulib/import/extra/update-copyright: Update.
3099         * gnulib/import/fchdir.c: Update.
3100         * gnulib/import/fcntl.c: Update.
3101         * gnulib/import/fcntl.in.h: Update.
3102         * gnulib/import/fd-hook.c: Update.
3103         * gnulib/import/fd-hook.h: Update.
3104         * gnulib/import/fd-safer-flag.c: Update.
3105         * gnulib/import/fd-safer.c: Update.
3106         * gnulib/import/fdopendir.c: Update.
3107         * gnulib/import/filename.h: Update.
3108         * gnulib/import/filenamecat-lgpl.c: Update.
3109         * gnulib/import/filenamecat.h: Update.
3110         * gnulib/import/flexmember.h: Update.
3111         * gnulib/import/float+.h: Update.
3112         * gnulib/import/float.c: Update.
3113         * gnulib/import/float.in.h: Update.
3114         * gnulib/import/fnmatch.c: Update.
3115         * gnulib/import/fnmatch.in.h: Update.
3116         * gnulib/import/fnmatch_loop.c: Update.
3117         * gnulib/import/fpucw.h: Update.
3118         * gnulib/import/frexp.c: Update.
3119         * gnulib/import/frexpl.c: Update.
3120         * gnulib/import/fstat.c: Update.
3121         * gnulib/import/fstatat.c: Update.
3122         * gnulib/import/getcwd-lgpl.c: Update.
3123         * gnulib/import/getcwd.c: Update.
3124         * gnulib/import/getdtablesize.c: Update.
3125         * gnulib/import/getlogin_r.c: Update.
3126         * gnulib/import/getprogname.c: Update.
3127         * gnulib/import/getprogname.h: Update.
3128         * gnulib/import/gettext.h: Update.
3129         * gnulib/import/gettimeofday.c: Update.
3130         * gnulib/import/glob-libc.h: Update.
3131         * gnulib/import/glob.c: Update.
3132         * gnulib/import/glob.in.h: Update.
3133         * gnulib/import/glob_internal.h: Update.
3134         * gnulib/import/glob_pattern_p.c: Update.
3135         * gnulib/import/globfree.c: Update.
3136         * gnulib/import/hard-locale.c: Update.
3137         * gnulib/import/hard-locale.h: Update.
3138         * gnulib/import/intprops.h: Update.
3139         * gnulib/import/inttypes.in.h: Update.
3140         * gnulib/import/isnan.c: Update.
3141         * gnulib/import/isnand-nolibm.h: Update.
3142         * gnulib/import/isnand.c: Update.
3143         * gnulib/import/isnanl-nolibm.h: Update.
3144         * gnulib/import/isnanl.c: Update.
3145         * gnulib/import/itold.c: Update.
3146         * gnulib/import/libc-config.h: Update.
3147         * gnulib/import/limits.in.h: Update.
3148         * gnulib/import/localcharset.c: Update.
3149         * gnulib/import/localcharset.h: Update.
3150         * gnulib/import/localtime-buffer.c: Update.
3151         * gnulib/import/localtime-buffer.h: Update.
3152         * gnulib/import/lstat.c: Update.
3153         * gnulib/import/m4/00gnulib.m4: Update.
3154         * gnulib/import/m4/__inline.m4: Update.
3155         * gnulib/import/m4/absolute-header.m4: Update.
3156         * gnulib/import/m4/alloca.m4: Update.
3157         * gnulib/import/m4/builtin-expect.m4: Update.
3158         * gnulib/import/m4/canonicalize.m4: Update.
3159         * gnulib/import/m4/chdir-long.m4: Update.
3160         * gnulib/import/m4/close.m4: Update.
3161         * gnulib/import/m4/closedir.m4: Update.
3162         * gnulib/import/m4/configmake.m4: Update.
3163         * gnulib/import/m4/d-ino.m4: Update.
3164         * gnulib/import/m4/d-type.m4: Update.
3165         * gnulib/import/m4/dirent_h.m4: Update.
3166         * gnulib/import/m4/dirfd.m4: Update.
3167         * gnulib/import/m4/dirname.m4: Update.
3168         * gnulib/import/m4/double-slash-root.m4: Update.
3169         * gnulib/import/m4/dup.m4: Update.
3170         * gnulib/import/m4/dup2.m4: Update.
3171         * gnulib/import/m4/eealloc.m4: Update.
3172         * gnulib/import/m4/environ.m4: Update.
3173         * gnulib/import/m4/errno_h.m4: Update.
3174         * gnulib/import/m4/error.m4: Update.
3175         * gnulib/import/m4/exponentd.m4: Update.
3176         * gnulib/import/m4/exponentl.m4: Update.
3177         * gnulib/import/m4/extensions.m4: Update.
3178         * gnulib/import/m4/extern-inline.m4: Update.
3179         * gnulib/import/m4/fchdir.m4: Update.
3180         * gnulib/import/m4/fcntl-o.m4: Update.
3181         * gnulib/import/m4/fcntl.m4: Update.
3182         * gnulib/import/m4/fcntl_h.m4: Update.
3183         * gnulib/import/m4/fdopendir.m4: Update.
3184         * gnulib/import/m4/filenamecat.m4: Update.
3185         * gnulib/import/m4/flexmember.m4: Update.
3186         * gnulib/import/m4/float_h.m4: Update.
3187         * gnulib/import/m4/fnmatch.m4: Update.
3188         * gnulib/import/m4/fnmatch_h.m4: Update.
3189         * gnulib/import/m4/fpieee.m4: Update.
3190         * gnulib/import/m4/frexp.m4: Update.
3191         * gnulib/import/m4/frexpl.m4: Update.
3192         * gnulib/import/m4/fstat.m4: Update.
3193         * gnulib/import/m4/fstatat.m4: Update.
3194         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
3195         * gnulib/import/m4/getcwd-path-max.m4: Update.
3196         * gnulib/import/m4/getcwd.m4: Update.
3197         * gnulib/import/m4/getdtablesize.m4: Update.
3198         * gnulib/import/m4/getlogin.m4: Update.
3199         * gnulib/import/m4/getlogin_r.m4: Update.
3200         * gnulib/import/m4/getpagesize.m4: Update.
3201         * gnulib/import/m4/getprogname.m4: Update.
3202         * gnulib/import/m4/gettimeofday.m4: Update.
3203         * gnulib/import/m4/glibc21.m4: Update.
3204         * gnulib/import/m4/glob.m4: Update.
3205         * gnulib/import/m4/glob_h.m4: Update.
3206         * gnulib/import/m4/gnulib-cache.m4: Update.
3207         * gnulib/import/m4/gnulib-common.m4: Update.
3208         * gnulib/import/m4/gnulib-comp.m4: Update.
3209         * gnulib/import/m4/gnulib-tool.m4: Update.
3210         * gnulib/import/m4/hard-locale.m4: Update.
3211         * gnulib/import/m4/include_next.m4: Update.
3212         * gnulib/import/m4/inttypes-pri.m4: Update.
3213         * gnulib/import/m4/inttypes.m4: Update.
3214         * gnulib/import/m4/isnand.m4: Update.
3215         * gnulib/import/m4/isnanl.m4: Update.
3216         * gnulib/import/m4/largefile.m4: Update.
3217         * gnulib/import/m4/limits-h.m4: Update.
3218         * gnulib/import/m4/localcharset.m4: Update.
3219         * gnulib/import/m4/locale-fr.m4: Update.
3220         * gnulib/import/m4/locale-ja.m4: Update.
3221         * gnulib/import/m4/locale-zh.m4: Update.
3222         * gnulib/import/m4/localtime-buffer.m4: Update.
3223         * gnulib/import/m4/longlong.m4: Update.
3224         * gnulib/import/m4/lstat.m4: Update.
3225         * gnulib/import/m4/malloc.m4: Update.
3226         * gnulib/import/m4/malloca.m4: Update.
3227         * gnulib/import/m4/math_h.m4: Update.
3228         * gnulib/import/m4/mbrtowc.m4: Update.
3229         * gnulib/import/m4/mbsinit.m4: Update.
3230         * gnulib/import/m4/mbsrtowcs.m4: Update.
3231         * gnulib/import/m4/mbstate_t.m4: Update.
3232         * gnulib/import/m4/memchr.m4: Update.
3233         * gnulib/import/m4/memmem.m4: Update.
3234         * gnulib/import/m4/mempcpy.m4: Update.
3235         * gnulib/import/m4/memrchr.m4: Update.
3236         * gnulib/import/m4/mkdir.m4: Update.
3237         * gnulib/import/m4/mkstemp.m4: Update.
3238         * gnulib/import/m4/mmap-anon.m4: Update.
3239         * gnulib/import/m4/mode_t.m4: Update.
3240         * gnulib/import/m4/msvc-inval.m4: Update.
3241         * gnulib/import/m4/msvc-nothrow.m4: Update.
3242         * gnulib/import/m4/multiarch.m4: Update.
3243         * gnulib/import/m4/nocrash.m4: Update.
3244         * gnulib/import/m4/off_t.m4: Update.
3245         * gnulib/import/m4/onceonly.m4: Update.
3246         * gnulib/import/m4/open-cloexec.m4: Update.
3247         * gnulib/import/m4/open.m4: Update.
3248         * gnulib/import/m4/openat.m4: Update.
3249         * gnulib/import/m4/opendir.m4: Update.
3250         * gnulib/import/m4/pathmax.m4: Update.
3251         * gnulib/import/m4/rawmemchr.m4: Update.
3252         * gnulib/import/m4/readdir.m4: Update.
3253         * gnulib/import/m4/readlink.m4: Update.
3254         * gnulib/import/m4/realloc.m4: Update.
3255         * gnulib/import/m4/rename.m4: Update.
3256         * gnulib/import/m4/rewinddir.m4: Update.
3257         * gnulib/import/m4/rmdir.m4: Update.
3258         * gnulib/import/m4/save-cwd.m4: Update.
3259         * gnulib/import/m4/secure_getenv.m4: Update.
3260         * gnulib/import/m4/setenv.m4: Update.
3261         * gnulib/import/m4/signal_h.m4: Update.
3262         * gnulib/import/m4/ssize_t.m4: Update.
3263         * gnulib/import/m4/stat-time.m4: Update.
3264         * gnulib/import/m4/stat.m4: Update.
3265         * gnulib/import/m4/std-gnu11.m4: Update.
3266         * gnulib/import/m4/stdbool.m4: Update.
3267         * gnulib/import/m4/stddef_h.m4: Update.
3268         * gnulib/import/m4/stdint.m4: Update.
3269         * gnulib/import/m4/stdio_h.m4: Update.
3270         * gnulib/import/m4/stdlib_h.m4: Update.
3271         * gnulib/import/m4/strchrnul.m4: Update.
3272         * gnulib/import/m4/strdup.m4: Update.
3273         * gnulib/import/m4/strerror.m4: Update.
3274         * gnulib/import/m4/string_h.m4: Update.
3275         * gnulib/import/m4/strstr.m4: Update.
3276         * gnulib/import/m4/strtok_r.m4: Update.
3277         * gnulib/import/m4/sys_socket_h.m4: Update.
3278         * gnulib/import/m4/sys_stat_h.m4: Update.
3279         * gnulib/import/m4/sys_time_h.m4: Update.
3280         * gnulib/import/m4/sys_types_h.m4: Update.
3281         * gnulib/import/m4/tempname.m4: Update.
3282         * gnulib/import/m4/time_h.m4: Update.
3283         * gnulib/import/m4/unistd-safer.m4: Update.
3284         * gnulib/import/m4/unistd_h.m4: Update.
3285         * gnulib/import/m4/warn-on-use.m4: Update.
3286         * gnulib/import/m4/wchar_h.m4: Update.
3287         * gnulib/import/m4/wchar_t.m4: Update.
3288         * gnulib/import/m4/wctype_h.m4: Update.
3289         * gnulib/import/m4/wint_t.m4: Update.
3290         * gnulib/import/malloc.c: Update.
3291         * gnulib/import/malloc/scratch_buffer.h: Update.
3292         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
3293         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
3294         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
3295         * gnulib/import/malloca.c: Update.
3296         * gnulib/import/malloca.h: Update.
3297         * gnulib/import/malloca.valgrind: Update.
3298         * gnulib/import/math.in.h: Update.
3299         * gnulib/import/mbrtowc.c: Update.
3300         * gnulib/import/mbsinit.c: Update.
3301         * gnulib/import/mbsrtowcs-impl.h: Update.
3302         * gnulib/import/mbsrtowcs-state.c: Update.
3303         * gnulib/import/mbsrtowcs.c: Update.
3304         * gnulib/import/memchr.c: Update.
3305         * gnulib/import/memmem.c: Update.
3306         * gnulib/import/mempcpy.c: Update.
3307         * gnulib/import/memrchr.c: Update.
3308         * gnulib/import/mkdir.c: Update.
3309         * gnulib/import/mkstemp.c: Update.
3310         * gnulib/import/msvc-inval.c: Update.
3311         * gnulib/import/msvc-inval.h: Update.
3312         * gnulib/import/msvc-nothrow.c: Update.
3313         * gnulib/import/msvc-nothrow.h: Update.
3314         * gnulib/import/open.c: Update.
3315         * gnulib/import/openat-die.c: Update.
3316         * gnulib/import/openat-priv.h: Update.
3317         * gnulib/import/openat-proc.c: Update.
3318         * gnulib/import/openat.c: Update.
3319         * gnulib/import/openat.h: Update.
3320         * gnulib/import/opendir.c: Update.
3321         * gnulib/import/pathmax.h: Update.
3322         * gnulib/import/pipe-safer.c: Update.
3323         * gnulib/import/rawmemchr.c: Update.
3324         * gnulib/import/readdir.c: Update.
3325         * gnulib/import/readlink.c: Update.
3326         * gnulib/import/realloc.c: Update.
3327         * gnulib/import/ref-add.sin: Update.
3328         * gnulib/import/ref-del.sin: Update.
3329         * gnulib/import/rename.c: Update.
3330         * gnulib/import/rewinddir.c: Update.
3331         * gnulib/import/rmdir.c: Update.
3332         * gnulib/import/same-inode.h: Update.
3333         * gnulib/import/save-cwd.c: Update.
3334         * gnulib/import/save-cwd.h: Update.
3335         * gnulib/import/scratch_buffer.h: Update.
3336         * gnulib/import/secure_getenv.c: Update.
3337         * gnulib/import/setenv.c: Update.
3338         * gnulib/import/signal.in.h: Update.
3339         * gnulib/import/stat-time.c: Update.
3340         * gnulib/import/stat-time.h: Update.
3341         * gnulib/import/stat-w32.c: Update.
3342         * gnulib/import/stat-w32.h: Update.
3343         * gnulib/import/stat.c: Update.
3344         * gnulib/import/stdbool.in.h: Update.
3345         * gnulib/import/stddef.in.h: Update.
3346         * gnulib/import/stdint.in.h: Update.
3347         * gnulib/import/stdio.in.h: Update.
3348         * gnulib/import/stdlib.in.h: Update.
3349         * gnulib/import/str-two-way.h: Update.
3350         * gnulib/import/strchrnul.c: Update.
3351         * gnulib/import/strdup.c: Update.
3352         * gnulib/import/streq.h: Update.
3353         * gnulib/import/strerror-override.c: Update.
3354         * gnulib/import/strerror-override.h: Update.
3355         * gnulib/import/strerror.c: Update.
3356         * gnulib/import/string.in.h: Update.
3357         * gnulib/import/stripslash.c: Update.
3358         * gnulib/import/strnlen1.c: Update.
3359         * gnulib/import/strnlen1.h: Update.
3360         * gnulib/import/strstr.c: Update.
3361         * gnulib/import/strtok_r.c: Update.
3362         * gnulib/import/sys_stat.in.h: Update.
3363         * gnulib/import/sys_time.in.h: Update.
3364         * gnulib/import/sys_types.in.h: Update.
3365         * gnulib/import/tempname.c: Update.
3366         * gnulib/import/tempname.h: Update.
3367         * gnulib/import/time.in.h: Update.
3368         * gnulib/import/unistd--.h: Update.
3369         * gnulib/import/unistd-safer.h: Update.
3370         * gnulib/import/unistd.in.h: Update.
3371         * gnulib/import/unsetenv.c: Update.
3372         * gnulib/import/verify.h: Update.
3373         * gnulib/import/extra/snippet/warn-on-use.h: Update.
3374         * gnulib/import/wchar.in.h: Update.
3375         * gnulib/import/wctype.in.h: Update.
3376         * gnulib/import/xalloc-oversized.h: Update.
3377         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
3378         "53e2c179f26a890fa6685af4b6c1397ee370433b".
3379
3380 2018-08-16  Gary Benson <gbenson@redhat.com>
3381
3382         PR gdb/13000:
3383         * gdb/main.c (captured_main_1): Exit with nonzero status
3384         in batch mode if the last command to be executed failed.
3385         * NEWS: Mention the above.
3386
3387 2018-08-29  Simon Marchi  <simon.marchi@ericsson.com>
3388
3389         * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
3390         end of warning message.
3391
3392 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
3393
3394         PR gdb/22943:
3395         * aarch64-tdep.c (is_hfa_or_hva): Remove function.
3396         (aarch64_extract_return_value): Use
3397         aapcs_is_vfp_call_or_return_candidate.
3398         (aarch64_return_in_memory): Likewise.
3399         (aarch64_store_return_value): Likewise.
3400
3401 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
3402
3403         * aarch64-tdep.c
3404         (aapcs_is_vfp_call_or_return_candidate): Make static
3405         (pass_in_v_or_stack): Remove function.
3406         (pass_in_v_vfp_candidate): New function.
3407         (aarch64_push_dummy_call): Check for float register candidates.
3408
3409 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
3410
3411         * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
3412         (aapcs_is_vfp_call_or_return_candidate_1): New function.
3413         (aapcs_is_vfp_call_or_return_candidate): Likewise.
3414
3415 2018-08-28  Simon Marchi  <simon.marchi@polymtl.ca>
3416
3417         PR build/23399
3418         * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
3419         (struct ipa_sym_addresses): Rename to...
3420         (struct ipa_sym_addresses_common): ... this.
3421         * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
3422
3423 2018-08-28  Tom Tromey  <tom@tromey.com>
3424
3425         * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
3426         (token_fifo): Now a std::vector.
3427         (yylex, c_parse): Update.
3428         * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
3429         (token_fifo): Now a std::vector.
3430         (yylex, d_parse): Update.
3431         * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
3432         (token_fifo): Now a std::vector.
3433         (yylex, go_parse): Update.
3434
3435 2018-08-28  Simon Marchi  <simon.marchi@ericsson.com>
3436
3437         * parser-defs.h (struct type_stack) <elements>: Change type to
3438         std::vector<union type_stack_elt>.
3439         <depth, size>: Remove.
3440         * parse.c (parse_exp_in_context_1): Adjust.
3441         (type_stack_reserve): Remove.
3442         (check_type_stack_depth): Remove.
3443         (insert_into_type_stack): Adjust to std::vector.
3444         (insert_type): Likewise.
3445         (push_type): Likewise.
3446         (push_type_int): Likewise.
3447         (insert_type_address_space): Likewise.
3448         (pop_type): Likewise.
3449         (pop_type_int): Likewise.
3450         (pop_typelist): Likewise.
3451         (pop_type_stack): Likewise.
3452         (append_type_stack): Likewise.
3453         (push_type_stack): Likewise.
3454         (get_type_stack): Likewise.
3455         (type_stack_cleanup): Likewise.
3456         (push_typelist): Likewise.
3457         (follow_types): Likewise.
3458         (_initialize_parse): Likewise.
3459
3460 2018-08-28  Hafiz Abid Qadeer  <abidh@codesourcery.com>
3461
3462         * NEWS: Mention csky target.
3463
3464 2018-08-28  Jiangshuai Li  <jiangshuai_li@c-sky.com>
3465             Hafiz Abid Qadeer  <abidh@codesourcery.com>
3466             Don Breazeal  <donb@codesourcery.com>
3467
3468         * csky-linux-tdep.c: New file.
3469         * csky-tdep.c: Likewise.
3470         * csky-tdep.h: Likewise.
3471         * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
3472         csky-tdep.o.
3473         (HFILES_NO_SRCDIR): Add csky-tdep.h.
3474         (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
3475         * configure.tgt: Add csky support.
3476
3477 2018-08-27  Jan Vrany  <jan.vrany@fit.cvut.cz>
3478
3479         * python/py-framefilter.c (py_print_frame): Print frame architecture
3480         when printing on an MI output.
3481
3482 2018-08-27  Tom Tromey  <tom@tromey.com>
3483
3484         PR build/23087:
3485         * configure: Rebuild.
3486         * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
3487
3488 2018-08-27  Tom Tromey  <tom@tromey.com>
3489
3490         * aarch64-linux-tdep.c
3491         (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
3492         casts to int.
3493
3494 2018-08-27  Tom Tromey  <tom@tromey.com>
3495
3496         * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
3497         unsigned.
3498         (ppc64_standard_linkage1, ppc64_standard_linkage2)
3499         (ppc64_standard_linkage3, ppc64_standard_linkage4)
3500         (ppc64_standard_linkage5, ppc64_standard_linkage6)
3501         (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
3502         unsigned.
3503
3504 2018-08-27  Tom Tromey  <tom@tromey.com>
3505
3506         * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
3507         (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
3508
3509 2018-08-27  Tom Tromey  <tom@tromey.com>
3510
3511         * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
3512         * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
3513         ULONGEST_MAX.
3514         * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
3515         ULONGEST_MAX.
3516         * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
3517         ULONGEST_MAX.
3518         * sparc-linux-tdep.c (sparc32_linux_sigframe)
3519         (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
3520         * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
3521         ULONGEST_MAX.
3522         * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
3523         (ppc64_linux_sigaction_tramp_frame)
3524         (ppc32_linux_sighandler_tramp_frame)
3525         (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
3526         * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
3527         (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
3528         * mn10300-linux-tdep.c (am33_linux_sigframe)
3529         (am33_linux_rt_sigframe): Use ULONGEST_MAX.
3530         * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
3531         * mips-linux-tdep.c (mips_linux_o32_sigframe)
3532         (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
3533         (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
3534         (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
3535         (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
3536         * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
3537         (mips64_fbsd_sigframe): Use ULONGEST_MAX.
3538         * microblaze-linux-tdep.c
3539         (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
3540         * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
3541         (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
3542         (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
3543         * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
3544         * common/common-types.h (ULONGEST_MAX): New define.
3545         (CORE_ADDR_MAX): Fix formatting.
3546         * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
3547         * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
3548         * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
3549         (arm_linux_rt_sigreturn_tramp_frame)
3550         (arm_eabi_linux_sigreturn_tramp_frame)
3551         (arm_eabi_linux_rt_sigreturn_tramp_frame)
3552         (thumb2_eabi_linux_sigreturn_tramp_frame)
3553         (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
3554         (arm_linux_restart_syscall_tramp_frame)
3555         (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
3556         * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
3557         * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
3558         ULONGEST_MAX.
3559         * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
3560
3561 2018-08-27  Tom Tromey  <tom@tromey.com>
3562
3563         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
3564         CORE_ADDR_MAX.
3565         * mips-tdep.c (mips_deal_with_atomic_sequence)
3566         (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
3567         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
3568         (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
3569         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
3570         CORE_ADDR_MAX.
3571         * aarch64-tdep.c (aarch64_software_single_step): Use
3572         CORE_ADDR_MAX.
3573
3574 2018-08-27  Tom Tromey  <tom@tromey.com>
3575
3576         * linespec.c (complete_linespec_component): Add cast to "char".
3577         * completer.c (completion_tracker::build_completion_result): Add
3578         cast to "char".
3579
3580 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
3581
3582         * solist.h (struct solist, struct target_so_ops): Fix
3583         indentation.
3584
3585 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
3586
3587         * ada-tasks.c (ada_task_info_s): Remove typedef.
3588         (DEF_VEC_O(ada_task_info_s)): Remove.
3589         (struct ada_tasks_inferior_data): Initialize fields.
3590         <task_list>: Make an std::vector.
3591         (get_ada_tasks_inferior_data): Allocate with new.
3592         (ada_get_task_number): Adjust.
3593         (get_task_number_from_id): Likewise.
3594         (valid_task_id): Likewise.
3595         (ada_get_task_info_from_ptid): Likewise.
3596         (iterate_over_live_ada_tasks): Likewise.
3597         (add_ada_task): Likewise.
3598         (read_known_tasks): Likewise.
3599         (ada_build_task_list): Likewise.
3600         (print_ada_task_info): Likewise.
3601         (info_task): Likewise.
3602         (task_command_1): Likewise.
3603
3604 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
3605
3606         * ada-lang.c (add_angle_brackets): Return std::string.
3607
3608 2018-08-25  Simon Marchi  <simon.marchi@polymtl.ca>
3609
3610         * python/py-threadevent.c (py_get_event_thread): Initialize
3611         pythread.
3612
3613 2018-08-24  Pedro Alves  <palves@redhat.com>
3614
3615         * python/py-bpevent.c (create_breakpoint_event_object): Use
3616         copy-initialization.
3617         * python/py-continueevent.c (emit_continue_event): Use
3618         copy-initialization.
3619         * python/py-exitedevent.c (create_exited_event_object): Return a
3620         gdbpy_ref<>.
3621         (emit_exited_event): Use copy-initialization.
3622         * python/py-inferior.c (python_new_inferior)
3623         (python_inferior_deleted, add_thread_object): Use
3624         copy-initialization.
3625         * python/py-infevents.c (create_inferior_call_event_object)
3626         (create_register_changed_event_object)
3627         (create_memory_changed_event_object): Return a gdbpy_ref<>.
3628         (emit_inferior_call_event, emit_memory_changed_event)
3629         (emit_register_changed_event): Use copy-initialization.
3630         * python/py-newobjfileevent.c (create_new_objfile_event_object):
3631         Return a gdbpy_ref<>.
3632         (emit_new_objfile_event): Use copy-initialization.
3633         (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
3634         (emit_clear_objfiles_event): Use copy-initialization.
3635         * python/py-signalevent.c (create_signal_event_object): Use
3636         copy-initialization.
3637         * python/py-threadevent.c (create_thread_event_object): Use
3638         copy-initialization.
3639
3640 2018-08-24  Pedro Alves  <palves@redhat.com>
3641             Simon Marchi  <simon.marchi@ericsson.com>
3642
3643         PR gdb/23379
3644         * python/py-continueevent.c: Include "gdbthread.h".
3645         (create_continue_event_object): Add intro comment.  Add 'ptid'
3646         parameter.  Use it to find thread to pass to
3647         create_thread_event_object.
3648         (emit_continue_event): Pass PTID down to
3649         create_continue_event_object.
3650         * python/py-event.h (py_get_event_thread): Declare.
3651         (create_thread_event_object): Remove default from 'thread'
3652         parameter.
3653         * python/py-stopevent.c (create_stop_event_object): Use
3654         py_get_event_thread.
3655         * python/py-threadevent.c (get_event_thread): Rename to ...
3656         (py_get_event_thread): ... this, make extern, add 'ptid' parameter
3657         and use it to find the thread.
3658         (create_thread_event_object): Assert that THREAD isn't null.
3659         Don't find the event thread here.
3660
3661 2018-08-23  Kevin Buettner  <kevinb@redhat.com>
3662
3663         * block.h (blockrange, blockranges): New struct declarations.
3664         (struct block): Add new field named `ranges'.
3665         (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
3666         (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
3667         macros for accessing ranges in struct block.
3668         (make_blockranges): New declaration.
3669         block.c (make_blockranges): New function.
3670         * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
3671         for block.
3672         * symtab.h (find_pc_partial_function): Add new parameter `block'.
3673         * blockframe.c (cache_pc_function_block): New static global.
3674         (clear_pc_function_cache): Clear cache_pc_function_block.
3675         (find_pc_partial_function): Move comment to symtab.h.  Add
3676         support for non-contiguous blocks.
3677         * cli/cli-cmds.c (block.h): Include.
3678         (print_disassembly): Handle printing of non-contiguous blocks.
3679         (disassemble_current_function): Likewise.
3680         (disassemble_command): Likewise.
3681
3682         * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
3683         BLOCK_START.
3684         * blockframe.c (get_pc_function_start): Likewise.
3685         * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
3686         (gcc_symbol_address): Likewise.
3687         * compile/compile-object-run.c (compile_object_run): Likewise.
3688         * compile/compile.c (get_expr_block_and_pc): Likewise.
3689         * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
3690         (func_addr_to_tail_call_list): Likewise.
3691         * findvar.c (default_read_var_value): Likewise.
3692         * inline-frame.c (inline_frame_this_id): Likewise.
3693         (skip-inline_frames): Likewise.
3694         * infcmd.c (until_next_command): Likewise.
3695         * linespec.c (convert_linespec_to_sals): Likewise.
3696         * parse.c (parse_exp_in_context_1): Likewise.
3697         * printcmd.c (build_address_symbolic): likewise.
3698         (info_address_command): Likewise.
3699         symtab.c (find_function_start_sal): Likewise.
3700         (skip_prologue_sal): Likewise.
3701         (find_function_alias_target): Likewise.
3702         (find_gnu_ifunc): Likewise.
3703         * stack.c (find_frame_funname): Likewise.
3704         * symtab.c (fixup_symbol_section): Likewise.
3705         (find_function_start_sal): Likewise.
3706         (skip_prologue_sal): Likewsie.
3707         (find_function_alias_target): Likewise.
3708         (find_gnu_ifunc): Likewise.
3709         * tracepoint.c (info_scope_command): Likewise.
3710         * value.c (value_fn_field): Likewise.
3711
3712         * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
3713         in place of find_pc_partial_function.
3714         * blockframe.c (find_function_entry_range_from_pc): New function.
3715         * symtab.h (find_function_entry_range_from_pc): Declare and document.
3716         * objfiles.c (objfile_relocate1): Relocate start and end addresses
3717         for each range in a block.
3718
3719
3720 2018-08-23  Xavier Roirand  <roirand@adacore.com>
3721
3722         * machoread.c (macho_symfile_read_all_oso): Remove uneeded
3723         incrementation.
3724
3725 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
3726
3727         * solib-svr4.c (read_program_headers_from_bfd): Return
3728         gdb::optional<gdb::byte_vector>.
3729         (svr4_exec_displacement): Adjust.
3730
3731 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
3732
3733         * solib-svr4.c (read_program_header): Return
3734         gdb::optional<gdb::byte_vector>, remove p_sect_size param.
3735         (find_program_interpreter): Return
3736         gdb::optional<gdb::byte_vector>.
3737         (scan_dyntag_auxv): Adjust.
3738         (enable_break): Adjust.
3739         (svr4_exec_displacement): Adjust.
3740
3741 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
3742
3743         * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
3744         * inf-child.c (inf_child_target::terminal_save_inferior): New.
3745
3746 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
3747
3748         * guile/scm-string.c (gdbscm_scm_from_printf): Use
3749         string_vprintf.
3750         * guile/scm-utils.c (gdbscm_printf): Likewise.
3751         * serial.c (serial_printf): Likewise.
3752         * xml-support.c (gdb_xml_parser::vdebug): Likewise.
3753
3754 2018-08-22  Jan Vrany  <jan.vrany@fit.cvut.cz>
3755
3756         * stack.c (print_frame): Print frame architecture when printing on
3757         an MI output.
3758         * NEWS: Mention new "arch" attribute in frame output.
3759
3760 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
3761
3762         * arch/aarch64.h (aarch64_regnum): Update comment.
3763
3764 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
3765
3766         * NEWS: Add SVE to 8.2 section.
3767
3768 2018-08-21  Pedro Alves  <palves@redhat.com>
3769
3770         * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
3771         out from gdbscm_parse_function_args.
3772         (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
3773         gdbscm_parse_function_args_1.
3774
3775 2018-08-21  Simon Marchi  <simon.marchi@ericsson.com>
3776
3777         PR gdb/17816
3778         * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
3779         operator.
3780
3781 2018-08-19  Simon Marchi  <simon.marchi@polymtl.ca>
3782
3783         * solib-svr4.c (svr4_exec_displacement): Fix formatting.
3784
3785 2018-08-19  Michael Spang  <spang@google.com>
3786
3787         PR gdb/11786
3788         * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
3789         for PT_TLS segments.
3790
3791 2018-08-18  Kevin Buettner  <kevinb@redhat.com>
3792
3793         * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
3794         dwarf_variable_value.
3795         * dwarf2-frame.c (class dwarf_expr_executor):
3796         Add override for dwarf_variable_value.
3797         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
3798         (class symbol_needs_eval_context): Likewise.
3799         (indirect_synthetic_pointer): Add forward declaration.
3800         (sect_variable_value): New function.
3801         (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
3802         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
3803         for DW_OP_GNU_variable_value.
3804
3805 2018-08-16  Tom Tromey  <tom@tromey.com>
3806
3807         * top.c (read_command_file): Update.
3808         (command_line_input): Remove "repeat" argument.
3809         * ada-lang.c (get_selections): Update.
3810         * linespec.c (decode_line_2): Update.
3811         * defs.h (command_line_input): Remove argument.
3812         * cli/cli-script.c (read_next_line): Update.
3813         * python/py-gdb-readline.c: Update.
3814
3815 2018-08-17  Tom Tromey  <tom@tromey.com>
3816
3817         * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
3818         command_line_input.
3819
3820 2018-08-15  Tom Tromey  <tom@tromey.com>
3821
3822         * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
3823
3824 2018-08-14  Jan Vrany  <jan.vrany@fit.cvut.cz>
3825
3826         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
3827         If used, use find_pc_partial_function to find address range
3828         to disassemble.
3829         * mi/mi-main.c (mi_cmd_list_features): Report
3830         "data-disassemble-a-option" feature.
3831         * NEWS: Mention new -data-disassemble option -a.
3832
3833 2018-08-13  Tom Tromey  <tom@tromey.com>
3834
3835         * common/common-defs.h (_FORTIFY_SOURCE): Define.
3836
3837 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
3838
3839         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
3840         (aarch64_linux_collect_sve_regset): Likewise.
3841         (aarch64_linux_iterate_over_regset_sections): Check for SVE.
3842         * regcache.h (regcache_map_entry_size): New function.
3843
3844 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
3845
3846         * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
3847         (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
3848         (SVE_HEADER_VL_LENGTH): Likewise.
3849         (SVE_HEADER_MAX_VL_LENGTH): Likewise.
3850         (SVE_HEADER_FLAGS_LENGTH): Likewise.
3851         (SVE_HEADER_RESERVED_LENGTH): Likewise.
3852         (SVE_HEADER_SIZE_OFFSET): Likewise.
3853         (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
3854         (SVE_HEADER_VL_OFFSET): Likewise.
3855         (SVE_HEADER_MAX_VL_OFFSET): Likewise.
3856         (SVE_HEADER_FLAGS_OFFSET): Likewise.
3857         (SVE_HEADER_RESERVED_OFFSET): Likewise.
3858         (SVE_HEADER_SIZE): Likewise.
3859         (aarch64_linux_core_read_vq): Add function.
3860         (aarch64_linux_core_read_description): Check for SVE section.
3861
3862 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
3863
3864         * aarch64-fbsd-tdep.c
3865         (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
3866         collect_size.
3867         * aarch64-linux-tdep.c
3868         (aarch64_linux_iterate_over_regset_sections): Likewise.
3869         * alpha-linux-tdep.c
3870         (alpha_linux_iterate_over_regset_sections):
3871         * alpha-nbsd-tdep.c
3872         (alphanbsd_iterate_over_regset_sections): Likewise.
3873         * amd64-fbsd-tdep.c
3874         (amd64fbsd_iterate_over_regset_sections): Likewise.
3875         * amd64-linux-tdep.c
3876         (amd64_linux_iterate_over_regset_sections): Likewise.
3877         * arm-bsd-tdep.c
3878         (armbsd_iterate_over_regset_sections): Likewise.
3879         * arm-fbsd-tdep.c
3880         (arm_fbsd_iterate_over_regset_sections): Likewise.
3881         * arm-linux-tdep.c
3882         (arm_linux_iterate_over_regset_sections): Likewise.
3883         * corelow.c (get_core_registers_cb): Likewise.
3884         (core_target::fetch_registers): Likewise.
3885         * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
3886         * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
3887         * gdbarch.h (void): Regenerate.
3888         * gdbarch.sh: Add supply_size and collect_size.
3889         * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
3890         * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
3891         * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
3892         * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
3893         * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
3894         * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
3895         * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
3896         * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
3897         * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
3898         * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
3899         * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
3900         * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
3901         * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
3902         * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
3903         * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
3904         * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
3905         * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
3906         * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
3907         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
3908         * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
3909         * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
3910         * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
3911         * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
3912         * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
3913         * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
3914         * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
3915         * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
3916         * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
3917         * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
3918         * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
3919
3920 2018-08-10  Simon Marchi  <simon.marchi@ericsson.com>
3921
3922         * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
3923         with string_printf.
3924
3925 2018-08-10  Keith Seitz  <keiths@redhat.com>
3926
3927         * compile/compile-c-support.c (add_code_header, add_code_footer):
3928         Move into policy class.
3929         (c_push_user_expression, pop_user_expression_nop)
3930         (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
3931         (compile_program): New host class.
3932         (c_compile_program): New typedef.
3933         (c_compute_porgram): Use c_compile_program.
3934
3935 2018-08-10  Keith Seitz  <keiths@redhat.com>
3936
3937         * compile/compile-internal.h (compile_instance::~compile_instance):
3938         Remove calls to htab_delete.
3939         <m_type_map, m_symbol_err_map>: Switch type to htab_up.
3940         * compile.c (compile_instance::compile_instance): Initialize
3941         htab unique pointers.
3942         (compile_instance::get_cached_type, compile_instance::insert_type)
3943         (compile_instance::error_symbol_once): Update for unique_ptr.
3944
3945 2018-08-10  Keith Seitz  <keiths@redhat.com>
3946
3947         * compile/compile-c-symbols.c (struct symbol_error)
3948         (hash_symbol_error, eq_symbol_error, del_symbol_error)
3949         (compile_instance::insert_symbol_error)
3950         (compile_instance::error_symbol_once): Move to ...
3951         * compile/compile.c: ... here.
3952
3953 2018-08-10  Keith Seitz  <keiths@redhat.com>
3954
3955         * compile/compile-c-support.c (c_get_compile_context): Use `new'
3956         instead of `new_compile_instance'.
3957         * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
3958         Update description.
3959         If the symbol error map is not initialized, create it.
3960         (generate_c_for_for_one_symbol): Do not check/initialize
3961         the symbol error map.
3962         * compile/compile-c-types.c (compile_c_instance): Make a class.
3963         Update all callers.
3964         (compile_instance::compile_instance): Initialize the type cache.
3965         (get_cached_type): New function.
3966         (insert_type): Update description.
3967         (compile_c_instance::m_default_cflags): Define.
3968         (convert_type): Update description.  Use get_cached_type.
3969         (delete_instance): Moved to destructor.
3970         (new_compile_instance): Moved to constructor.
3971         * compile/compile-c.h (compile_c_instance): Make class inheriting
3972         from compile_instance.
3973         <base>: Remove field.
3974         <type_map, symbol_err_map>: Move to base class.
3975         <c_plugin>: Rename to `m_plugin' and remove pointer type.
3976         * compile/compile-internal.h (compile_instance): Make class.
3977         <type_map_t, symbol_err_map_t>: Define.
3978         <fe>: Rename to `m_gcc_fe'.
3979         <scope, block, gcc_target_options>: Add `m_' prefix.
3980         <m_type_map, m_symbol_err_map>: New fields, moved from
3981         compile_c_instance.
3982         <destroy>: Remove.
3983         (convert_type, new_compile_instance): Remove.
3984         * compile/compile.c (cleanup_compile_instance): Remove.
3985         (compile_to_object): Use unique_ptr to eliminate cleanups.
3986         (compile_instance::set_print_callback, compile_instance::version)
3987         (compile_instance::set_verbose)
3988         (compile_instance::set_driver_filename)
3989         (compile_instance::set_triplet_regexp)
3990         (compile_instance::set_arguments)
3991         (compile_instance::set_source_file)
3992         (compile_instance::compile): Define.
3993
3994 2018-08-10  Keith Seitz  <keiths@redhat.com>
3995
3996         * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
3997         * compile/compile-c-types.c: Define GCC_METHODN macros and include
3998         gcc-c-fe.def to define C plugin.
3999         (delete_instance): Delete `c_plugin'.
4000         (new_compile_instance): Initialize `c_plugin'.
4001         * compile/compile-c.h: Include gcc_c_plugin.h.
4002         (struct compile_c_instance) <c_plugin>: New member.
4003         * gcc-c-plugin.h: New file.
4004         Update all callers with API change.
4005
4006 2018-08-10  Keith Seitz  <keiths@redhat.com>
4007
4008         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
4009         (HFILES_NO_SRCDIR): ... to here.
4010         Add compile-internal.h and compile-c.h.
4011         * compile/compile-c-support.c: Include compile-c.h.
4012         * compile/compile-c-symbols.c: Include compile-c.h.
4013         (generate_c_for_variable_locations): Update comment.
4014         * compile/compile-c-types.c: Include compile-c.h.
4015         * compile/compile-c.h: New file -- moved C language declarations
4016         from other files here.
4017         * compile/compile-internal.h: Do not include hashtab.h or
4018         common/enum-flags.h.
4019         (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
4020         (gcc_convert_symbol, gcc_symbol_address)
4021         (generate_c_for_variable_locations, c_get_mode_for_size)
4022         (c_get_range_decl_name): Definitions moved to compile-c.h.
4023         * compile/compile-loc2c.c: Include compile-c.h.
4024
4025 2018-08-10  Keith Seitz  <keiths@redhat.com>
4026
4027         * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
4028         (c_symbol_substitution_name): ... this.
4029         Update all callers.
4030
4031 2018-08-10  Keith Seitz  <keiths@redhat.com>
4032
4033         * compile/compile-c-support.c (c_compute_program): Use
4034         unique_xmalloc_ptr to eliminate cleanup.
4035         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
4036         Return a unique_xmalloc_ptr and eliminate cleanup.
4037         * compile/compile-internal.h (generate_c_for_variable_locations):
4038         Return unique_xmalloc_ptr and update description.
4039
4040 2018-08-10  Alan Hayward  <alan.hayward@arm.com>
4041
4042         * corelow.c (core_target::get_core_register_section): Rename
4043         min_size to section_min_size.
4044
4045 2018-08-09  Jim Wilson  <jimw@sifive.com>
4046
4047         * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
4048         (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
4049         * NEWS: Mention new GNU/Linux RISC-V target.
4050         * configure.host: Add riscv*-*-linux*.
4051         * configure.nat: Add riscv*.
4052         * configure.tgt: Add riscv*-*-linux*.
4053         * riscv-linux-nat.c: New file.
4054         * riscv-linux-tdep.c: New file.
4055
4056 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
4057
4058         * infrun.c (resume): Make static, add forward declaration.
4059         (proceed): Update header comment.
4060         * infrun.h (resume): Delete declaration.
4061
4062 2018-08-09  Tom Tromey  <tom@tromey.com>
4063
4064         * riscv-tdep.h: Minor formatting fixes.
4065
4066 2018-08-09  Simon Marchi  <simon.marchi@ericsson.com>
4067
4068         * common/scoped_mmap.c (mmap_file): Silence ARI warning.
4069         * dwarf-index-cache.c (create_dir_and_check): Likewise.
4070         (test_mkdir_recursive): Likewise.
4071         * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
4072
4073 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
4074
4075         * valarith.c (value_subscripted_rvalue): If an array is not in
4076         memory, and we don't know the upper bound, then we can't know that
4077         the requested element exists or not.
4078
4079 2018-08-08  Simon Marchi  <simon.marchi@ericsson.com>
4080
4081         * target.c (str_comma_list_concat_elem): Fix typo in comment.
4082         (target_options_to_string): Add comment.
4083
4084 2018-08-08  Tom Tromey  <tom@tromey.com>
4085
4086         * unittests/scoped_mmap-selftests.c: Check result of "write".
4087
4088 2018-08-08  Jim Wilson  <jimw@sifive.com>
4089
4090         * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
4091         (decode_register_index_short): New.
4092         (decode_j_type_insn, decode_cj_type_insn): New.
4093         (decode_b_type_insn, decode_cb_type_insn): New.
4094         (riscv_insn::decode): Add support for jumps, branches, lr, and sc.  New
4095         local xlen.  Check xlen when decoding ambiguous compressed insns.  In
4096         compressed decode, use is_c_lui_insn instead of is_lui_insn, and
4097         is_c_sw_insn instead of is_sw_insn.
4098         (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
4099         (riscv_software_single_step): New.
4100         * riscv-tdep.h (riscv_software_single_step): Declare.
4101
4102         * riscv-tdep.c (riscv_isa_xlen): Drop static.
4103         * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
4104
4105 2018-08-08  Andrew Burgess  <andrew.burgess@embecosm.com>
4106
4107         PR gdb/18050:
4108         * target.c (dispose_inferior): Don't dispose of inferiors that are
4109         already killed.
4110
4111 2018-08-08  Szabolcs Nagy  <szabolcs.nagy@arm.com>
4112
4113         * remote.c (remote_target::download_tracepoint): Change char* to
4114         const char*.
4115
4116 2018-08-07  Simon Marchi  <simon.marchi@polymtl.ca>
4117
4118         * target.h (target_options_to_string): Return an std::string.
4119         * target.c (str_comma_list_concat_elem): Return void, use
4120         std::string.
4121         (do_option): Likewise.
4122         (target_options_to_string): Return an std::string.
4123         * linux-nat.c (linux_nat_target::wait): Adjust.
4124         * target-debug.h (target_debug_print_options): Adjust.
4125
4126 2018-08-07  Tom Tromey  <tom@tromey.com>
4127
4128         * Makefile.in (CPPFLAGS): New variable.
4129         (INTERNAL_CPPFLAGS): Use it.
4130
4131 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4132
4133         * NEWS: Mention the index cache.
4134
4135 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4136
4137         * common/pathstuff.h (get_standard_cache_dir): New.
4138         * common/pathstuff.c (get_standard_cache_dir): New.
4139         * build-id.h (build_id_to_string): New.
4140         * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
4141         DEBUG_STR_SUFFIX): Move to here.
4142         * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
4143         DEBUG_STR_SUFFIX): Move from there.
4144         (write_psymtabs_to_index): Make non-static, add basename
4145         parameter.  Write to temporary files, rename when done.
4146         (save_gdb_index_command): Adjust call to
4147         write_psymtabs_to_index.
4148         * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
4149         field.
4150         * dwarf2read.c (dwz_file) <index_cache_res>: New field.
4151         (get_gdb_index_contents_from_cache): New.
4152         (get_gdb_index_contents_from_cache_dwz): New.
4153         (dwarf2_initialize_objfile): Read index from cache.
4154         (dwarf2_build_psymtabs): Save to index.
4155         * dwarf-index-cache.h: New file.
4156         * dwarf-index-cache.c: New file.
4157         * dwarf-index-write.h: New file.
4158
4159 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4160
4161         * gnulib/aclocal.m4: Re-generate.
4162         * gnulib/config.in: Re-generate.
4163         * gnulib/configure: Re-generate.
4164         * gnulib/import/Makefile.am: Re-generate.
4165         * gnulib/import/Makefile.in: Re-generate.
4166         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
4167         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
4168         * gnulib/import/m4/mkdir.m4: New file.
4169         * gnulib/import/mkdir.c: New file.
4170         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
4171         module.
4172
4173 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4174
4175         * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
4176         * common/scoped_mmap.c: New file.
4177         * common/scoped_mmap.h (destroy): New method.
4178         (~scoped_mmap, reset): Use destroy.
4179         (scoped_mmap): New move constructor.
4180         (mmap_file): New declaration.
4181         * unittests/scoped_mmap-selftests.c (test_normal,
4182         test_invalid_filename, run_tests): New functions.
4183         (_initialize_scoped_mmap_selftests): Register selftest.
4184
4185 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4186
4187         * dwarf2read.c (read_gdb_index_from_section): Rename to...
4188         (read_gdb_index_from_buffer): ... this.  Remove section
4189         parameter, add buffer parameter.
4190         (get_gdb_index_contents_ftype,
4191         get_gdb_index_contents_dwz_ftype): New typedefs.
4192         (dwarf2_read_gdb_index): Add callback parameters to get the
4193         index contents.
4194         (get_gdb_index_contents_from_section): New.
4195         (dwarf2_initialize_objfile): Update call to
4196         dwarf2_read_gdb_index.
4197
4198 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4199
4200         * common/filestuff.h (gdb_fopen_cloexec): New overload.
4201         (gdb_open_cloexec): Likewise.
4202         * nat/linux-osdata.c (command_from_pid): Use string_printf.
4203         (commandline_from_pid): Likewise.
4204         (linux_xfer_osdata_threads): Likewise.
4205         (linux_xfer_osdata_fds): Likewise.
4206         * ada-lang.c (is_package_name): Likewise.
4207         * auxv.c (procfs_xfer_auxv): Likewise.
4208         * breakpoint.c (print_one_breakpoint_location): Use
4209         uiout::field_fmt.
4210         (print_one_catch_solib): Use string_printf.
4211         * coff-pe-read.c (add_pe_exported_sym): Likewise.
4212         (add_pe_forwarded_sym): Likewise.
4213         * dwarf2read.c (create_type_unit_group): Likewise.
4214         (build_error_marker_type): Likewise.
4215         * infcall.c (get_function_name): Likewise.
4216         * valprint.c (print_converted_chars_to_obstack): Likewise.
4217         * xtensa-tdep.c (xtensa_register_type): Likewise.
4218
4219 2018-08-06  Simon Marchi  <simon.marchi@ericsson.com>
4220
4221         * remote.c (remote_target::download_tracepoint): Fix format
4222         string errors.
4223
4224 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
4225
4226         * tracefile.c: Include common/byte-vector.h.
4227         (trace_save): Change type of buf to gdb::byte_vector.  Initialize
4228         with trace_regblock_size if needed.  Update uses of buf.
4229
4230 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
4231
4232         * tracepoint.h (collection_list) <m_regs_mask>: Change type to
4233         std::vector<unsigned char>.
4234         * tracepoint.c (collection_list::collection_list): Remove
4235         m_regs_mask initializer from initializer list.  Resize
4236         m_regs_mask using the largest remote register number.
4237         (collection_list::add_remote_register): Remove size check on
4238         m_regs_mask.  Use at to access element.
4239         (collection_list::stringify): Change type of temp_buf to
4240         gdb::char_vector.  Update uses of temp_buf.  Resize if needed to
4241         stringify the register mask.  Use pack_hex_byte for the register
4242         mask.
4243
4244 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
4245
4246         * tracepoint.h (class collection_list) <add_register>: Remove.
4247         <add_remote_register, add_ax_registers, add_local_register>:
4248         Declare.
4249         <add_memrange>: Add scope parameter.
4250         * tracepoint.c (encode_actions_1): Likewise.
4251         (collection_list::add_register): Rename to ...
4252         (collection_list::add_remote_register): ... this.  Update
4253         comment.
4254         (collection_list::add_ax_registers, add_local_register): New
4255         methods.
4256         (collection_list::add_memrange): Add scope parameter.  Call
4257         add_local_register instead of add_register.
4258         (finalize_tracepoint_aexpr): New function.
4259         (collection_list::collect_symbol): Update calls to add_memrange.
4260         Call add_local_register instead of add_register.  Call
4261         add_ax_registers.  Call finalize_tracepoint_aexpr.
4262         (encode_actions_1): Get remote regnos for $reg action.  Call
4263         add_remote_register, add_ax_registers, and add_local_register.
4264         Update call to add_memrange.  Call finalize_tracepoint_aexpr.
4265         (validate_actionline): Call finalize_tracepoint_aexpr.
4266
4267 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
4268
4269         * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
4270         Replace array buf with gdb::char_vector buf, of size
4271         get_remote_packet_size ().  Replace references to buf and
4272         BUF_SIZE to buf.data () and buf.size ().  Replace strcpy, strcat
4273         and xsnprintf with snprintf.  Raise errors if the buffer is too
4274         small.
4275
4276 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
4277
4278         * remote.c (remote_target::download_tracepoint): Fix the has_more
4279         predicate in the QTDP action list iteration.
4280
4281 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
4282
4283         * remote.c (remote_target::download_tracepoint): Fix indentation
4284         in for block.
4285
4286 2018-08-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4287
4288         * proc-api.c (_initialize_proc_api): Remove c, unused.
4289         * procfs.c (procfs_init_inferior): Remove signals, unused.
4290         (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
4291         unused.
4292
4293 2018-08-06  Sergey Korolev  <s.korolev@ndmsystems.com>
4294             Andrew Burgess  <andrew.burgess@embecosm.com>
4295
4296         * linux-nat.c (linux_nat_target::follow_fork): Avoid using
4297         'W_STOPCODE (0)' as this could be ambiguous.
4298
4299 2018-08-03  Sergio Durigan Junior  <sergiodj@redhat.com>
4300
4301         * ser-tcp.c (net_open): Fix thinko when deciding whether to
4302         disable TCP's Nagle algorithm (use "ai_protocol" instead of
4303         "ai_socktype").
4304
4305 2018-08-02  Tom Tromey  <tom@tromey.com>
4306
4307         PR symtab/16842.
4308         * dwarf2read.c (read_func_scope): Set symtab on template parameter
4309         symbols.
4310         (process_structure_scope): Likewise.
4311
4312 2018-08-02  Xavier Roirand  <roirand@adacore.com>
4313
4314         PR gdb/22629:
4315         * darwin-nat.c (darwin_kill_inferior): Fix handling of
4316         kill inferior.
4317
4318 2018-08-02  Tom Tromey  <tom@tromey.com>
4319
4320         * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
4321         (darwin_suspend_inferior, darwin_resume_inferior)
4322         (darwin_decode_notify_message, darwin_resume_inferior_threads)
4323         (darwin_check_new_threads): Check result of get_darwin_inferior.
4324
4325 2018-07-31  Joel Brobecker  <brobecker@adacore.com>
4326
4327         GDB 8.1.1 released.
4328
4329 2018-07-31  Jan Vrany  <jan.vrany@fit.cvut.cz>
4330
4331         * varobj.c (varobj_get_path_expr_parent): Report an error if
4332         parent is a dynamic varobj.
4333
4334 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
4335
4336         * gnulib/aclocal.m4: Re-generate.
4337         * gnulib/config.in: Re-generate.
4338         * gnulib/configure: Re-generate.
4339         * gnulib/import/Makefile.in: Re-generate.
4340         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
4341         * gnulib/import/m4/onceonly.m4: Re-generate.
4342
4343 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
4344
4345         * target-descriptions.c (struct xml_test_tdesc): New.
4346         (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
4347         (record_xml_tdesc): Update.
4348         (maintenance_check_xml_descriptions): Update.
4349         * target-descriptions.h (record_xml_tdesc): Update comment.
4350
4351 2018-07-30  Andrew Burgess  <andrew.burgess@embecosm.com>
4352
4353         * eval.c (evaluate_subexp_for_sizeof): Check for array type before
4354         checking array bounds are defined.
4355
4356 2018-07-30  Tom Tromey  <tom@tromey.com>
4357
4358         * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
4359         irreflexivity violation.
4360
4361 2018-07-30  Tom Tromey  <tom@tromey.com>
4362
4363         * cli/cli-decode.c (lookup_cmd): Remove lint code.
4364         * value.c (unpack_long): Remove lint code.
4365         * valops.c (value_ind): Remove lint code.
4366         * valarith.c (value_x_binop, value_x_unop, value_equal)
4367         (value_pos): Remove lint code.
4368
4369 2018-07-28  Tom de Vries  <tdevries@suse.de>
4370
4371         * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
4372         with undefined upper bound as <optimized out>.
4373
4374 2018-07-27  Sergio Durigan Junior  <sergiodj@redhat.com>
4375
4376         * gcore.in: Rename variable "name" to "prefix".  Expand
4377         "usage" text.
4378
4379 2018-07-14  Jon Turney  <jon.turney@dronecode.org.uk>
4380
4381         * windows-nat.c (windows_nat_target::create_inferior): Update to
4382         call close() in global namespace.
4383
4384 2018-07-26  Tom Tromey  <tom@tromey.com>
4385
4386         * dwarf-index-write.c (add_address_entry): Don't add objfile
4387         offsets.
4388         * dbxread.c (find_stab_function): Rename from
4389         find_stab_function_addr.  Return a bound_minimal_symbol.
4390         (read_dbx_symtab): Use raw_text_low, raw_text_high.
4391         Don't add objfile offsets.
4392         (end_psymtab): Use raw_text_low, raw_text_high,
4393         MSYMBOL_VALUE_RAW_ADDRESS.
4394         (read_ofile_symtab): Update.
4395         (process_one_symbol): Update.
4396         * dwarf2read.c (create_addrmap_from_index): Don't add objfile
4397         offsets.
4398         (dw2_relocate): Remove.
4399         (dw2_find_pc_sect_symtab): Bias PC by the text offset before
4400         searching addrmap.
4401         (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
4402         Update.
4403         (process_psymtab_comp_unit_reader, add_partial_symbol)
4404         (add_partial_subprogram, dwarf2_ranges_read): Update.
4405         (load_partial_dies): Update.
4406         (add_address_entry): Don't add objfile offsets.
4407         (dwarf2_build_include_psymtabs): Update.
4408         (create_addrmap_from_aranges): Don't add objfile offsets.
4409         (dw2_find_pc_sect_compunit_symtab): Update.
4410         * mdebugread.c (parse_symbol): Don't add objfile offsets.
4411         (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
4412         Update.
4413         (parse_partial_symbols): Don't add objfile offsets.  Use
4414         raw_text_low, raw_text_high.  Update.
4415         (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
4416         * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
4417         or call 'relocate' quick function.  Clear psymbol_map.
4418         * psympriv.h (struct partial_symbol) <address>: Add section
4419         offset.
4420         <set_unrelocated_address>: Rename from set_address.
4421         <raw_text_low, raw_text_high>: New methods.
4422         <text_low, text_high>: Add objfile parameter.
4423         (add_psymbol_to_bcache): Add 'section' parameter.  Call
4424         set_unrelocated_address.
4425         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
4426         (find_pc_psymbol): Update.
4427         (fixup_psymbol_section, relocate_psymtabs): Remove.
4428         (dump_psymtab, psym_functions): Update.
4429         (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
4430         parameter.
4431         (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
4432         (start_psymtab_common): Update.
4433         * symfile-debug.c (debug_qf_relocate): Remove.
4434         (debug_sym_quick_functions): Update.
4435         * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
4436         * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
4437         Update.
4438
4439 2018-07-26  Tom Tromey  <tromey@redhat.com>
4440
4441         * dbxread.c (end_psymtab): Use text_high_valid and
4442         text_low_valid.
4443         * mdebugread.c (parse_partial_symbols): Use text_low_valid.
4444         (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
4445         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
4446         Update comment.
4447         <text_low_valid, text_high_valid>: New fields.
4448         <set_text_low, set_text_high>: Update.
4449         * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
4450
4451 2018-07-26  Tom Tromey  <tom@tromey.com>
4452
4453         * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
4454         Update.
4455         * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
4456         textlow and texthigh fields.
4457         (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
4458         Update.
4459         * mdebugread.c (parse_lines, parse_partial_symbols)
4460         (psymtab_to_symtab_1): Update.
4461         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
4462         Rename fields.  Update comment.  Now private.
4463         <text_low, text_high, set_text_low, set_text_high>: New methods.
4464         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
4465         (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
4466         (start_psymtab_common, maintenance_info_psymtabs)
4467         (maintenance_check_psymtabs): Update.
4468         * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
4469         texthigh fields.
4470         (scan_xcoff_symtab): Update.
4471
4472 2018-07-26  Tom Tromey  <tromey@redhat.com>
4473
4474         * psympriv.h (struct partial_symbol) <unrelocated_address,
4475         address, set_address>: New methods.
4476         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
4477         (fixup_psymbol_section, relocate_psymtabs): Update.
4478         (print_partial_symbols): Add 'objfile' parameter.  Update.
4479         (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
4480         Update.
4481
4482 2018-07-26  Tom Tromey  <tom@tromey.com>
4483
4484         * dwarf-index-write.c (write_psymbols, debug_names::insert)
4485         (debug_names::write_psymbols): Update.
4486         * psympriv.h (struct partial_symbol): Derive from
4487         general_symbol_info.
4488         <obj_section>: New method.
4489         (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
4490         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
4491         (find_pc_sect_psymbol, fixup_psymbol_section)
4492         (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
4493         (print_partial_symbols, recursively_search_psymtabs)
4494         (compare_psymbols, psymbol_hash, psymbol_compare)
4495         (add_psymbol_to_bcache, maintenance_check_psymtabs)
4496         (psymbol_name_matches, psym_fill_psymbol_map): Update.
4497
4498 2018-07-26  Tom Tromey  <tromey@redhat.com>
4499
4500         * dbxread.c (end_psymtab): Remove dead code.
4501
4502 2018-07-26  Andrew Burgess  <andrew.burgess@embecosm.com>
4503
4504         * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
4505         DWARF unwinders are disabled.
4506         * dwarf2-frame.c: Add dwarf2read.h include.
4507         (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
4508         disabled.
4509         (dwarf2_frame_unwinders_enabled_p): Define.
4510         (show_dwarf_unwinders_enabled_p): New function.
4511         (_initialize_dwarf2_frame): Register switch to control DWARF
4512         unwinder use.
4513         * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
4514         * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
4515         (show_dwarf_cmdlist): Remove static keyword.
4516         * dwarf2read.h (set_dwarf_cmdlist): Declare.
4517         (show_dwarf_cmdlist): Declare.
4518         * NEWS: Document new feature.
4519
4520 2018-07-26  Tom de Vries  <tdevries@suse.de>
4521
4522         PR breakpoints/23366
4523         * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
4524
4525 2018-07-26  Tom de Vries  <tdevries@suse.de>
4526
4527         * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
4528         DW_AT_count can't be translated to a dynamic prop.
4529
4530 2018-07-25  Tom de Vries  <tdevries@suse.de>
4531
4532         * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
4533         try/catch.
4534
4535 2018-07-25  Jan Vrany  <jan.vrany@fit.cvut.cz>
4536
4537         * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
4538
4539 2018-07-25  Joel Brobecker  <brobecker@adacore.com>
4540
4541         * MAINTAINERS (Global Maintainers): Add Tom Tromey.
4542
4543 2018-07-24  Keith Seitz  <keiths@redhat.comt
4544
4545         PR symtab/23010
4546         * dwarf2read.c (dw2_add_symbol_to_list): New function.
4547         (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
4548         instead of add_symbol_to_list.
4549         (read_file_scope): Call prepare_one_comp_unit before reading
4550         any other DIEs.
4551
4552 2018-07-24  Simon Marchi  <simon.marchi@ericsson.com>
4553
4554         * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
4555
4556 2018-07-24  Tom Tromey  <tom@tromey.com>
4557
4558         * utils.c (malloc, realloc, free): Don't declare.
4559         * configure, config.in: Rebuild.
4560         * configure.ac: Don't check for declarations of free, malloc, or
4561         realloc.
4562
4563 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
4564
4565         * aarch64-linux-nat.c
4566         (aarch64_linux_nat_target::stopped_data_address): Remove unused
4567         variable.
4568         * arm-linux-nat.c (fetch_regs): Likewise.
4569         (store_regs): Likewise.
4570         (fetch_vfp_regs): Likewise.
4571         (store_vfp_regs): Likewise.
4572         (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
4573         (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
4574         (arm_linux_nat_target::insert_watchpoint): Likewise.
4575         (arm_linux_nat_target::remove_watchpoint): Likewise.
4576         * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
4577         Likewise.
4578         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
4579         Likewise.
4580         * ppc-linux-nat.c (fetch_register): Likewise.
4581         (fetch_all_gp_regs): Likewise.
4582         (fetch_ppc_registers): Likewise.
4583         (store_all_gp_regs): Likewise.
4584         (store_ppc_registers): Likewise.
4585         (hwdebug_insert_point): Likewise.
4586         (can_use_watchpoint_cond_accel): Likewise.
4587         * remote-sim.c (gdb_os_write_stdout): Likewise.
4588
4589 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
4590             Tom Tromey  <tom@tromey.com>
4591
4592         * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
4593         test for it.
4594         * configure: Rebuild.
4595
4596 2018-07-22  Tom Tromey  <tom@tromey.com>
4597
4598         * regformats/regdat.sh: Define xmltarget_${name} inside
4599         #ifndef IN_PROCESS_AGENT.
4600
4601 2018-07-22  Tom Tromey  <tom@tromey.com>
4602
4603         * value.c (value_fetch_lazy_bitfield): Remove unused variable.
4604
4605 2018-07-22  Tom Tromey  <tom@tromey.com>
4606
4607         * symfile.c (reread_symbols): Notify iter, not objfile.
4608
4609 2018-07-22  Tom Tromey  <tom@tromey.com>
4610
4611         * ravenscar-thread.c (ravenscar_thread_target::store_registers):
4612         Use arch_ops.
4613         (ravenscar_thread_target::prepare_to_store): Likewise.
4614
4615 2018-07-22  Tom Tromey  <tom@tromey.com>
4616
4617         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
4618         unused variable.  Call value_fetch_lazy when needed.
4619         * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
4620         Remove unused variable.  Call value_fetch_lazy when needed.
4621
4622 2018-07-22  Tom Tromey  <tom@tromey.com>
4623
4624         * m32c-tdep.c (mark_dma): Return void.
4625         (make_regs): Remove unused declarations.
4626
4627 2018-07-22  Tom Tromey  <tom@tromey.com>
4628
4629         * guile/scm-cmd.c (gdbscm_dont_repeat): Call
4630         cmdscm_get_valid_command_smob_arg_unsafe for effect.
4631         * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
4632         bkscm_get_valid_block_smob_arg_unsafe for effect.
4633
4634 2018-07-22  Tom Tromey  <tom@tromey.com>
4635
4636         * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
4637         value_type.
4638
4639 2018-07-22  Tom Tromey  <tom@tromey.com>
4640
4641         * windows-nat.c (saved_context): Conditionally define.
4642         * remote.c (remote_target::remote_btrace_maybe_reopen):
4643         Conditionally declare "warned".
4644         * inflow.c (sigquit_ours): Conditionally define.
4645         (new_tty): Move "tty" declaration inside #if.
4646         * guile/guile.c (guile_datadir): Conditionally define.
4647         * charset.c (set_be_le_names): Move some declarations inside #if.
4648         * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
4649         #if.
4650         (parse_xml_btrace_conf): Likewise.
4651
4652 2018-07-22  Tom Tromey  <tom@tromey.com>
4653
4654         * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
4655
4656 2018-07-22  Tom Tromey  <tom@tromey.com>
4657
4658         * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
4659         * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
4660         (vlscm_convert_typed_value_from_scheme): Remove unused variable.
4661         * buildsym-legacy.c (get_macro_table): Remove unused variable.
4662         * stack.c (frame_apply_level_command): Remove unused variable.
4663         * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
4664         * sparc64-tdep.c (adi_examine_command): Remove unused variable.
4665         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
4666         unused variable.
4667         * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
4668         * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
4669         * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
4670         variable.
4671         * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
4672         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
4673         variable.
4674         * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
4675         Remove unused variable.
4676         * cli/cli-script.c (recurse_read_control_structure): Remove unused
4677         variable.
4678         * common/tdesc.c (print_xml_feature::visit): Remove unused
4679         variable.
4680         * compile/compile-object-load.c (store_regs): Remove unused
4681         variables.
4682         * complaints.c (clear_complaints): Remove unused variable.
4683         * corelow.c (core_target_open): Remove unused variable.
4684         * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
4685         variable.
4686         * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
4687         variable.
4688         * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
4689         variable.
4690         * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
4691         variable.
4692         * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
4693         variable.
4694         * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
4695         variable.
4696         * ia64-tdep.c (examine_prologue): Remove unused variable.
4697         * infcall.c (run_inferior_call): Remove unused variable.
4698         * inferior.c (exit_inferior): Remove unused variable.
4699         * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
4700         * linespec.c (decode_line_2): Remove unused variable.
4701         * linux-nat.c (super_close): Remove.
4702         * linux-tdep.c (linux_info_proc): Remove unused variable.
4703         * mi/mi-main.c (mi_execute_command): Remove unused variable.
4704         * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
4705         Remove unused variable.
4706         * parse.c (find_minsym_type_and_address): Remove unused variable.
4707         * printcmd.c (info_symbol_command, printf_floating): Remove unused
4708         variable.
4709         * python/py-breakpoint.c (bppy_set_commands): Remove unused
4710         variable.
4711         * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
4712         variables.
4713         * record-btrace.c (record_btrace_target::store_registers): Remove
4714         unused variable.
4715         (cmd_show_record_btrace_cpu): Remove unused variable.
4716         * riscv-tdep.c (riscv_register_reggroup_p)
4717         (riscv_push_dummy_call, riscv_return_value): Remove unused
4718         variable.
4719         * rust-exp.y (literal): Remove unused variable.
4720         * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
4721         unused variable.
4722         <STRUCTOP_ANONYMOUS>: Likewise.
4723         * s390-linux-tdep.c (s390_linux_init_abi_31)
4724         (s390_linux_init_abi_64): Remove unused variable.
4725         * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
4726         (file_select_thread, net_windows_open, _initialize_ser_windows):
4727         Remove unused variables.
4728         * symtab.c (find_pc_sect_line): Remove unused variable.
4729         * target-memory.c (compute_garbled_blocks): Remove unused
4730         variable.
4731         (target_write_memory_blocks): Remove unused variable.
4732         * target.c (target_stack::unpush): Remove unused variables.
4733         * tracepoint.c (start_tracing, all_tracepoint_actions)
4734         (merge_uploaded_trace_state_variables)
4735         (print_one_static_tracepoint_marker): Remove unused variable.
4736         * unittests/basic_string_view/element_access/char/1.cc (test01):
4737         Remove unused variable.
4738         * windows-nat.c (windows_continue, windows_add_all_dlls)
4739         (do_initial_windows_stuff, windows_nat_target::create_inferior):
4740         Remove unused variables.
4741
4742 2018-07-21  Simon Marchi  <simon.marchi@polymtl.ca>
4743
4744         * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
4745         attr_profile in HAVE_ELF.
4746         * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
4747         HAVE_ELF.
4748
4749 2018-07-20  Simon Marchi  <simon.marchi@polymtl.ca>
4750
4751         * frame.c (frame_register_unwind): Change parameter name.
4752         (frame_unwind_register): Likewise.
4753         (frame_unwind_register_value): Likewise.
4754         (frame_unwind_register_signed): Likewise.
4755         (frame_unwind_register_unsigned): Likewise.
4756         * frame.h (frame_register_unwind): Likewise.
4757         (frame_unwind_register): Likewise.
4758         (frame_unwind_register_value): Likewise.
4759         (frame_unwind_register_signed): Likewise.
4760         (frame_unwind_register_unsigned): Likewise.
4761         (frame_unwind_arch): Likewise.
4762
4763 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
4764
4765         * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
4766         ISA maintenance.
4767
4768 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
4769
4770         * mips-linux-nat.c (mips_linux_nat_target::read_description):
4771         Call `get_ptrace_pid' rather than extracting the ptrace PID by
4772         hand.
4773
4774 2018-07-20  Keith Seitz  <keiths@redhat.com>
4775
4776         * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
4777         m_main_subfile, m_comp_dir, m_producer, m_debugformat,
4778         m_compunit_symtab, m_language>: Add "m_" prefix.
4779         Update all uses.
4780         * buildsym.c: Update all uses.
4781
4782 2018-07-20  Tom Tromey  <tom@tromey.com>
4783
4784         * buildsym-legacy.h (record_line): Don't use record_line_ftype.
4785         * buildsym.h (record_line_ftype): Remove typedef.
4786
4787 2018-07-20  Tom Tromey  <tom@tromey.com>
4788
4789         * buildsym-legacy.h (augment_type_symtab): Don't declare.
4790         (end_expandable_symtab): Likewise.
4791         (end_symtab_get_static_block): Likewise.
4792         (end_symtab_from_static_block): Likewise.
4793         * buildsym-legacy.c (augment_type_symtab): Remove.
4794         (end_expandable_symtab): Remove.
4795         (end_symtab_get_static_block): Remove.
4796         (end_symtab_from_static_block): Remove.
4797
4798 2018-07-20  Tom Tromey  <tom@tromey.com>
4799
4800         * dwarf2read.c: Include buildsym.h.
4801         (struct dwarf2_cu) <builder>: New method.
4802         (fixup_go_packaging): Update.
4803         (process_full_comp_unit, process_full_type_unit): Update.  Don't
4804         use scoped_free_pendings.
4805         (using_directives): Add "cu" parameter, remove "language".
4806         (read_import_statement, setup_type_unit_groups, )
4807         (read_func_scope, read_lexical_block_scope)
4808         (dwarf2_record_block_ranges, read_namespace): Update.
4809         (lnp_state_machine::lnp_state_machine): Add cu parameter.
4810         (lnp_state_machine::handle_end_sequence): Update.
4811         (class lnp_state_machine) <m_cu>: New member.
4812         <m_record_line_callback>: Remove.
4813         <m_currently_recording_lines>: New member.
4814         (lnp_state_machine::handle_set_file): Update.
4815         (noop_record_line): Remove.
4816         (dwarf_record_line_p): Add cu parameter.
4817         (dwarf_record_line_1, dwarf_finish_line): Likewise.
4818         (lnp_state_machine::record_line)
4819         (lnp_state_machine::lnp_state_machine)
4820         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
4821         (dwarf_decode_lines): Update.
4822         (dwarf2_start_subfile): Add cu parameter.
4823         (dwarf2_start_symtab, new_symbol): Update.
4824         (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
4825         Remove dwarf2_per_objfile parameter.
4826         (dwarf_decode_macros): Update.
4827
4828 2018-07-20  Tom Tromey  <tom@tromey.com>
4829
4830         * stabsread.c (define_symbol): Update.
4831         * buildsym-legacy.h (get_buildsym_compunit): Declare.
4832         * dwarf2read.c (new_symbol): Update.
4833         * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
4834         * cp-namespace.c: Include buildsym.h.
4835         (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
4836         * buildsym-legacy.c (get_buildsym_compunit): New function.
4837
4838 2018-07-20  Tom Tromey  <tom@tromey.com>
4839
4840         * xcoffread.c: Include buildsym-legacy.h.
4841         * windows-nat.c: Include buildsym-legacy.h.
4842         * stabsread.c: Include buildsym-legacy.h.
4843         * mdebugread.c: Include buildsym-legacy.h.
4844         * buildsym-legacy.h: New file.
4845         * buildsym-legacy.c: New file, from buildsym.c.
4846         * go32-nat.c: Include buildsym-legacy.h.
4847         * dwarf2read.c: Include buildsym-legacy.h.
4848         * dbxread.c: Include buildsym-legacy.h.
4849         * cp-namespace.c: Include buildsym-legacy.h.
4850         * coffread.c: Include buildsym-legacy.h.
4851         * buildsym.h: Move some contents to buildsym-legacy.h.
4852         * buildsym.c: Include buildsym-legacy.h.  Move many functions to
4853         buildsym-legacy.c.
4854         * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
4855
4856 2018-07-20  Tom Tromey  <tom@tromey.com>
4857
4858         * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
4859         * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
4860         (buildsym_compunit::buildsym_compunit)
4861         (buildsym_compunit::~buildsym_compunit)
4862         (buildsym_compunit::get_macro_table): Define.
4863
4864 2018-07-20  Tom Tromey  <tom@tromey.com>
4865
4866         * buildsym.c (reset_symtab_globals): Remove.
4867         (buildsym_compunit::end_symtab_from_static_block): Update.
4868         (buildsym_compunit::augment_type_symtab): Update.
4869         (end_symtab_from_static_block): Call free_buildsym_compunit.
4870         (augment_type_symtab, end_symtab, end_expandable_symtab):
4871         Likewise.
4872
4873 2018-07-20  Tom Tromey  <tom@tromey.com>
4874
4875         * arch-utils.c: Do not include buildsym.h.
4876         * mipsread.c: Do not include buildsym.h.
4877         * machoread.c: Do not include buildsym.h.
4878         * elfread.c: Do not include buildsym.h.
4879
4880 2018-07-20  Tom Tromey  <tom@tromey.com>
4881
4882         * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
4883         initialization.
4884         (buildsym_compunit): Add new constructor.
4885         (struct buildsym_compunit) <get_last_source_file, finish_block,
4886         record_block_range, start_subfile, patch_subfile_names,
4887         push_subfile, pop_subfile, record_line, get_compunit_symtab,
4888         set_last_source_start_addr, get_last_source_start_addr,
4889         get_local_using_directives, set_local_using_directives,
4890         get_global_using_directives, outermost_context_p,
4891         get_current_context_stack, get_context_stack_depth,
4892         get_current_subfile, get_local_symbols, get_file_symbols,
4893         get_global_symbols, record_debugformat, record_producer,
4894         push_context, pop_context, end_symtab_get_static_block,
4895         end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
4896         New public methods.
4897         <record_pending_block, finish_block_internal, make_blockvector,
4898         watch_main_source_file_lossage, end_symtab_with_blockvector>: New
4899         private methods.
4900         Update all users.
4901
4902 2018-05-22  Tom Tromey  <tom@tromey.com>
4903
4904         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
4905         parameter.
4906         (finish_block_internal): Update.
4907
4908 2018-07-20  Tom Tromey  <tom@tromey.com>
4909
4910         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
4911         parameter.
4912         (finish_block_internal): Update.
4913
4914 2018-07-20  Tom Tromey  <tom@tromey.com>
4915
4916         * buildsym.h (EXTERN): Don't define or undef.
4917         * buildsym.c (EXTERN): Don't define.
4918
4919 2018-07-20  Tom Tromey  <tom@tromey.com>
4920
4921         * buildsym.c: Remove TODO comment.
4922
4923 2018-07-20  Tom Tromey  <tom@tromey.com>
4924
4925         * coffread.c (coff_symtab_read): Update.
4926         * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
4927         (xcoff_new_init): Update.
4928         * mipsread.c (mipscoff_new_init): Update.
4929         * mdebugread.c (mdebug_build_psymtabs): Update.
4930         * elfread.c (elf_new_init): Update.
4931         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
4932         Update.
4933         * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
4934         (coffstab_build_psymtabs, elfstab_build_psymtabs)
4935         (stabsect_build_psymtabs): Update.
4936         * buildsym.h (buildsym_init): Don't declare.
4937         * buildsym.c: Update comment.
4938         (prepare_for_building): Remove.
4939         (start_symtab, restart_symtab): Update.
4940         (reset_symtab_globals): Update comment.
4941         (buildsym_init): Remove.
4942
4943 2018-07-20  Tom Tromey  <tom@tromey.com>
4944
4945         * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
4946         * stabsread.c (patch_block_stabs, define_symbol, read_type)
4947         (read_enum_type, common_block_start, common_block_end)
4948         (cleanup_undefined_types_1, finish_global_stabs): Update.
4949         * mdebugread.c (psymtab_to_symtab_1): Update.
4950         * dwarf2read.c (fixup_go_packaging, read_func_scope)
4951         (read_lexical_block_scope, new_symbol): Update.
4952         * dbxread.c (process_one_symbol): Update.
4953         * coffread.c (coff_symtab_read, process_coff_symbol)
4954         (coff_read_enum_type): Update.
4955         * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
4956         declare.
4957         (get_local_symbols, get_file_symbols, get_global_symbols): New
4958         functions.
4959         * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
4960         m_global_symbols.
4961         <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
4962         (~scoped_free_pendings): Update.
4963         (finish_block, prepare_for_building, reset_symtab_globals)
4964         (end_symtab_get_static_block, end_symtab_with_blockvector)
4965         (augment_type_symtab, push_context): Update.
4966         (get_local_symbols, get_file_symbols, get_global_symbols): New
4967         functions.
4968         (buildsym_init): Update.
4969
4970 2018-07-20  Tom Tromey  <tom@tromey.com>
4971
4972         * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
4973         (process_full_type_unit): Likewise.
4974         (dwarf2_start_symtab): Set list_in_scope.
4975
4976 2018-07-20  Tom Tromey  <tom@tromey.com>
4977
4978         * dwarf2read.c (process_psymtab_comp_unit_reader)
4979         (build_type_psymtabs_reader): Do not set list_in_scope.
4980
4981 2018-07-20  Tom Tromey  <tom@tromey.com>
4982
4983         * buildsym.c (free_pendings): Remove.
4984         (add_symbol_to_list, scoped_free_pendings)
4985         (finish_block_internal, buildsym_init): Update.
4986
4987 2018-07-20  Tom Tromey  <tom@tromey.com>
4988
4989         * xcoffread.c (read_xcoff_symtab): Update.
4990         * dwarf2read.c (read_func_scope, read_lexical_block_scope):
4991         Update.
4992         * dbxread.c (process_one_symbol): Update.
4993         * coffread.c (coff_symtab_read): Update.
4994         * buildsym.h (finish_block): Update.
4995         * buildsym.c (finish_block): Remove "listhead" argument.
4996         (end_symtab_get_static_block): Update.
4997
4998 2018-07-20  Tom Tromey  <tom@tromey.com>
4999
5000         * buildsym.h (class scoped_free_pendings): Remove constructor.
5001         * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
5002         method.
5003         <m_pending_block_obstack, m_pending_blocks>: New members.
5004         (pending_block_obstack, pending_blocks): Remove.
5005         (scoped_free_pendings::scoped_free_pendings): Default.
5006         (~scoped_free_pendings): Update.
5007         (free_pending_blocks): Remove.
5008         (finish_block_internal, record_pending_block, make_blockvector)
5009         (end_symtab_get_static_block, augment_type_symtab, push_context)
5010         (buildsym_init): Update.
5011
5012 2018-07-20  Tom Tromey  <tom@tromey.com>
5013
5014         * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
5015         m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
5016         members.
5017         (pending_addrmap, pending_addrmap_obstack)
5018         (pending_addrmap_interesting): Remove.
5019         (scoped_free_pendings, record_block_range, make_blockvector)
5020         (prepare_for_building, reset_symtab_globals, buildsym_init):
5021         Update.
5022
5023 2018-07-20  Tom Tromey  <tom@tromey.com>
5024
5025         * xcoffread.c (process_linenos): Update.
5026         * stabsread.c (define_symbol, read_type, read_enum_type): Update.
5027         * mdebugread.c (psymtab_to_symtab_1): Update.
5028         * dwarf2read.c (setup_type_unit_groups)
5029         (lnp_state_machine::handle_set_file, dwarf_record_line_p)
5030         (lnp_state_machine::record_line, dwarf_decode_lines): Update.
5031         * dbxread.c (process_one_symbol): Update.
5032         * coffread.c (coff_symtab_read, enter_linenos)
5033         (process_coff_symbol): Update.
5034         * buildsym.h (current_subfile): Don't declare.
5035         (get_current_subfile): Declare.
5036         * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
5037         member.
5038         (start_subfile, free_buildsym_compunit, push_subfile)
5039         (prepare_for_building, start_symtab): Update.
5040         (get_current_subfile): New function.
5041
5042 2018-07-20  Tom Tromey  <tom@tromey.com>
5043
5044         * coffread.c (coff_symtab_read): Update.
5045         * xcoffread.c (read_xcoff_symtab): Update.
5046         * dwarf2read.c (new_symbol): Update.
5047         (read_func_scope, read_lexical_block_scope): Update.
5048         * dbxread.c (process_one_symbol): Update.
5049         * buildsym.h (context_stack, context_stack_depth): Don't declare.
5050         (outermost_context_p): Remove macro.
5051         (outermost_context_p, get_current_context_stack)
5052         (get_context_stack_depth): Declare.
5053         (pop_context): Return struct context_stack.
5054         * buildsym.c (struct buildsym_compunit) <m_context_stack: New
5055         member.
5056         (context_stack_size): Remove.
5057         (INITIAL_CONTEXT_STACK_SIZE): Remove.
5058         (prepare_for_building, end_symtab_get_static_block)
5059         (augment_type_symtab, push_context): Update.
5060         (pop_context): Return struct context_stack.
5061         (outermost_context_p, get_current_context_stack)
5062         (get_context_stack_depth): New functions.
5063         (buildsym_init): Update.
5064
5065 2018-07-20  Tom Tromey  <tom@tromey.com>
5066
5067         * rust-exp.y: Now a pure parser.  Update all rules.
5068         (%union): Move earlier.
5069         (current_parser, work_obstack): Remove globals.
5070         (rust_parser, ~rust_parser): Update.
5071         (class rust_parser) <copy_name, concat3, crate_name, super_name,
5072         lex_character, lex_number, lex_string, lex_identifier,
5073         rust_lookup_type, convert_params_to_types, convert_ast_to_type,
5074         convert_name, convert_params_to_expression,
5075         convert_ast_to_expression, ast_basic_type, ast_operation,
5076         ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
5077         ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
5078         ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
5079         ast_array_type, ast_slice_type, ast_reference_type,
5080         ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
5081         (rust_parse): Update.
5082         (rustyyerror, rustyylex): Add parser parameter.
5083         (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
5084         (rust_lex_stringish_test, rust_lex_test_sequence)
5085         (rust_lex_test_trailing_dot, rust_lex_test_completion)
5086         (rust_lex_test_push_back, rust_lex_tests): Update.
5087
5088 2018-07-19  Pedro Alves  <palves@redhat.com>
5089
5090         * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
5091         gdb::unique_xmalloc_ptr.
5092         * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
5093         Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
5094         * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
5095         copy-initialization.
5096         * guile/scm-pretty-print.c (ppscm_print_children): Use
5097         gdb::unique_xmalloc_ptr instead of cleanups.
5098         (gdbscm_apply_val_pretty_printer): Remove cleanups.
5099         * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
5100         gdb::unique_xmalloc_ptr.
5101         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
5102         Adjust to use gdb::unique_xmalloc_ptr.
5103         * guile/scm-utils.c (extract_arg): Adjust.
5104         * guile/scm-value.c (gdbscm_value_field): Adjust to use
5105         gdb::unique_xmalloc_ptr instead of a cleanup.
5106
5107 2018-07-19  Tom Tromey  <tom@tromey.com>
5108
5109         * utils.c (do_value_free_to_mark)
5110         (make_cleanup_value_free_to_mark): Remove.
5111         * utils.h (make_cleanup_value_free_to_mark): Remove.
5112
5113 2018-07-19  Pedro Alves  <palves@redhat.com>
5114
5115         * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
5116         forwarding reference.
5117
5118 2018-07-18  Pedro Alves  <palves@redhat.com>
5119
5120         * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
5121         gdbscm_wrap.  Use gdb::unique_xmalloc_ptr<char> instead of a
5122         cleanup.
5123
5124 2018-07-18  Pedro Alves  <palves@redhat.com>
5125
5126         * guile/guile-internal.h: Add comment about mixing GDB and Scheme
5127         exceptions.
5128         (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
5129         (gdbscm_wrap): New.
5130         * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
5131         directly instead of a cleanup.
5132         * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
5133         (vlscm_unop): ... this.  Reimplement using gdbscm_wrap.
5134         (vlscm_binop_gdbthrow): New, factored out from ...
5135         (vlscm_binop): ... this.  Reimplement using gdbscm_wrap.
5136         (vlscm_rich_compare): Use gdbscm_wrap.
5137         * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
5138         instead of a cleanup.
5139         (gdbscm_lookup_global_symbol): Use xfree directly instead of a
5140         cleanup.
5141         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
5142         Use xfree directly instead of a cleanup.
5143         * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
5144         Adjust to use gdbscm_wrap and scoped_value_mark.
5145         (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
5146         (gdbscm_value_address, gdbscm_value_dereference)
5147         (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
5148         scoped_value_mark.
5149         (gdbscm_value_dynamic_type): Use scoped_value_mark.
5150         (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
5151         scoped_value_mark.
5152         (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
5153         gdbscm_wrap and scoped_value_mark.
5154         (gdbscm_value_to_string): Use xfree directly instead of a
5155         cleanup.  Move 'buffer' unique_ptr to TRY scope.
5156         (gdbscm_value_to_lazy_string): Use xfree directly instead of a
5157         cleanup.  Move 'buffer' unique_ptr to TRY scope.  Use
5158         scoped_value_mark.
5159         (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
5160         (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
5161         scoped_value_mark.
5162         (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
5163         gdbscm_wrap.
5164
5165 2018-07-18  Tom de Vries  <tdevries@suse.de>
5166
5167         * findvar.c (default_read_var_value): Also resolve dynamic type for
5168         LOC_OPTIMIZED_OUT vars.
5169
5170 2018-07-18  Maciej W. Rozycki  <macro@mips.com>
5171
5172         * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
5173         decoding.
5174
5175 2018-07-17  Tom Tromey  <tom@tromey.com>
5176
5177         * guile/scm-param.c (pascm_set_func, pascm_show_func)
5178         (compute_enum_list, pascm_set_param_value_x)
5179         (gdbscm_parameter_value): Update.
5180         * guile/guile-internal.h (gdbscm_scm_to_string): Update.
5181         (gdbscm_scm_to_host_string): Update.
5182         * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
5183         Update.
5184         * guile/scm-cmd.c (cmdscm_add_completion): Update.
5185         * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
5186         * guile/scm-string.c (gdbscm_scm_to_string): Return
5187         unique_xmalloc_ptr.
5188         (gdbscm_scm_to_host_string): Likewise.
5189
5190 2018-07-17  Tom Tromey  <tom@tromey.com>
5191
5192         * guile/guile.c (gdbscm_eval_from_control_command): Update.
5193         * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
5194         * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
5195         * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
5196         unique_xmalloc_ptr.
5197
5198 2018-07-17  Tom Tromey  <tom@tromey.com>
5199
5200         * guile/scm-param.c (pascm_signal_setshow_error): Update.
5201         * guile/guile-internal.h (gdbscm_exception_message_to_string):
5202         Update.
5203         * guile/scm-cmd.c (cmdscm_function): Update.
5204         * guile/scm-pretty-print.c
5205         (ppscm_print_exception_unless_memory_error): Update.
5206         * guile/scm-exception.c (gdbscm_exception_message_to_string):
5207         Return unique_xmalloc_ptr.
5208
5209 2018-07-17  Tom Tromey  <tom@tromey.com>
5210
5211         * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
5212         Use string_printf.
5213
5214 2018-07-17  Jim Wilson  <jimw@sifive.com>
5215
5216         * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
5217         set_gdbarch_decr_pc_after_break.  Call riscv_read_misa_reg always.
5218         (riscv_gdbarch_init): Delete local has_compressed_isa.  Delete now
5219         unecessary braces after EF_RISCV_RVC test.  Delete call to
5220         set_gdbarch_decr_pc_after_break.
5221
5222         * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
5223         RISCV_LAST_FP_REGNUM + 1.
5224         (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
5225
5226 2018-07-17  Tom Tromey  <tom@tromey.com>
5227
5228         * configure.ac: Remove --disable-gdbcli.
5229         * configure: Rebuild.
5230         * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
5231         (SUBDIR_CLI_CFLAGS): Remove.
5232         (SFILES): Use SUBDIR_CLI_SRCS.
5233         (COMMON_OBS): Use SUBDIR_CLI_OBS.
5234
5235 2018-07-17  Tom Tromey  <tom@tromey.com>
5236
5237         PR gdb/18624:
5238         * coffread.c (coff_symtab_read): Use scoped_free_pendings.
5239
5240 2018-07-16  Jim Wilson  <jimw@sifive.com>
5241
5242         * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
5243
5244 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
5245
5246         * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
5247         variable.
5248         (libunwind_frame_sniffer): Likewise.
5249         (libunwind_frame_prev_register): Likewise.
5250         (libunwind_sigtramp_frame_sniffer): Likewise.
5251         * ia64-tdep.c (ia64_access_reg): Likewise.
5252         (ia64_access_rse_reg): Likewise.
5253         (ia64_libunwind_sigtramp_frame_this_id): Likewise.
5254         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
5255
5256 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
5257
5258         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
5259
5260 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
5261
5262         * remote-sim.c (gdbsim_target::close,
5263         gdbsim_target::mourn_inferior): Remove unused variables.
5264
5265 2018-07-16  Simon Marchi  <simon.marchi@polymtl.ca>
5266
5267         * ia64-tdep.c (ktab_buf): New global.
5268         (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
5269         (get_kernel_table): Adjust.
5270
5271 2018-07-16  Tom Tromey  <tom@tromey.com>
5272
5273         * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
5274         * dwarf2read.c (using_directives, new_symbol): Use
5275         outermost_context_p.
5276         * dbxread.c (process_one_symbol): Use outermost_context_p.
5277         * coffread.c (coff_symtab_read): Use outermost_context_p.
5278
5279 2018-07-16  Tom Tromey  <tom@tromey.com>
5280
5281         * dwarf2read.c (using_directives, read_func_scope)
5282         (read_lexical_block_scope): Update.
5283         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
5284         * buildsym.h (local_using_directives, global_using_directives):
5285         Don't declare.
5286         (get_local_using_directives, set_local_using_directives)
5287         (get_global_using_directives): Declare.
5288         * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
5289         m_global_using_directives>: New members.
5290         (finish_block_internal, prepare_for_building)
5291         (reset_symtab_globals, end_symtab_get_static_block)
5292         (push_context): Update.
5293         (get_local_using_directives, set_local_using_directives)
5294         (get_global_using_directives): New functions.
5295         (buildsym_init): Update.
5296
5297 2018-07-16  Tom Tromey  <tom@tromey.com>
5298
5299         * xcoffread.c (xcoff_initial_scan): Don't call
5300         free_pending_blocks.
5301         * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
5302         * buildsym.h (class scoped_free_pendings): Add constructor.
5303         (free_pending_blocks): Don't declare.
5304         * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
5305         (free_pending_blocks): Now static.
5306
5307 2018-07-16  Tom Tromey  <tom@tromey.com>
5308
5309         * buildsym.h (push_subfile, pop_subfile): Update declarations.
5310         * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
5311         member.
5312         (struct subfile_stack): Remove.
5313         (subfile_stack): Remove.
5314         (push_subfile, pop_subfile, buildsym_init): Update.
5315
5316 2018-07-16  Tom Tromey  <tom@tromey.com>
5317
5318         * buildsym.c (push_subfile): Use gdb_assert.
5319         (pop_subfile): Use gdb_assert.
5320
5321 2018-07-16  Tom Tromey  <tom@tromey.com>
5322
5323         * buildsym.h (merge_symbol_lists): Remove.
5324         * buildsym.c (merge_symbol_lists): Remove.
5325
5326 2018-07-16  Tom Tromey  <tom@tromey.com>
5327
5328         * stabsread.c (scan_file_globals): Update comment.
5329         * stabsread.h (scan_file_globals): Move from buildsym.h.
5330         * buildsym.h (scan_file_globals): Move to stabsread.h.
5331
5332 2018-07-16  Tom Tromey  <tom@tromey.com>
5333
5334         * xcoffread.c (xcoff_new_init): Update.
5335         * mipsread.c (mipscoff_new_init): Update.
5336         * mdebugread.c (mdebug_build_psymtabs): Update.
5337         * elfread.c (elf_new_init): Update.
5338         * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
5339         (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
5340         * buildsym.h (buildsym_new_init): Don't declare.
5341         * buildsym.c (buildsym_new_init): Remove.
5342
5343 2018-07-16  Tom Tromey  <tom@tromey.com>
5344
5345         * stabsread.h (within_function): Move from buildsym.h.
5346         * stabsread.c (start_stabs): Clear within_function.
5347         * coffread.c (coff_start_symtab): Clear within_function.
5348         * buildsym.h (within_function): Move to stabsread.h.
5349         * buildsym.c (prepare_for_building): Update.
5350
5351 2018-07-16  Tom Tromey  <tom@tromey.com>
5352
5353         * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
5354         * dwarf2read.c (dwarf2_start_symtab): Don't set
5355         processing_gcc_compilation.
5356         * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
5357
5358 2018-07-16  Tom Tromey  <tom@tromey.com>
5359
5360         * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
5361         (next_symbol_text_func): Move from buildsym.h.
5362         * stabsread.c (hashname): Move from buildsym.c.
5363         * buildsym.h (HASHSIZE, symnum, next_symbol_text)
5364         (next_symbol_text_func, hashname): Move to stabsread.h.
5365         * buildsym.c: Don't include bcache.h
5366         (hashname): Move to stasbread.c.
5367
5368 2018-07-16  Tom Tromey  <tom@tromey.com>
5369
5370         * buildsym.h (context_stack_size): Don't declare.
5371         * buildsym.c (context_stack_size): New global.
5372
5373 2018-07-16  Tom Tromey  <tom@tromey.com>
5374
5375         * dbxread.c (processing_acc_compilation): New global.
5376         * buildsym.h (processing_acc_compilation): Don't declare.
5377
5378 2018-07-16  Tom Tromey  <tom@tromey.com>
5379
5380         * xcoffread.c (aix_process_linenos, complete_symtab): Update.
5381         * dbxread.c (read_ofile_symtab): Update.
5382         * coffread.c (coff_start_symtab, coff_end_symtab): Update.
5383         * buildsym.h (last_source_start_addr): Remove.
5384         (set_last_source_start_addr, get_last_source_start_addr):
5385         Declare.
5386         * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
5387         parameter.
5388         (struct buildsym_compunit) <m_last_source_start_addr>: New
5389         member.
5390         (prepare_for_building): Remove start_addr parameter.
5391         (start_symtab, restart_symtab, end_symtab_get_static_block)
5392         (end_symtab_with_blockvector): Update.
5393         (set_last_source_start_addr, get_last_source_start_addr): New
5394         functions.
5395
5396 2018-07-16  Tom Tromey  <tom@tromey.com>
5397
5398         * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
5399         member.
5400         (have_line_numbers): Remove.
5401         (record_line, prepare_for_building, end_symtab_get_static_block)
5402         (augment_type_symtab): Update.
5403
5404 2018-07-16  Tom Tromey  <tom@tromey.com>
5405
5406         * buildsym.c (~buildsym_compunit): Free the macro table.
5407         (struct buildsym_compunit) <get_macro_table, release_macros>: New
5408         methods.
5409         <m_pending_macros>: New member.
5410         (pending_macros): Remove.
5411         (~scoped_free_pendings, get_macro_table, prepare_for_building)
5412         (reset_symtab_globals, end_symtab_get_static_block)
5413         (end_symtab_with_blockvector, augment_type_symtab)
5414         (buildsym_init): Update.
5415
5416 2018-07-16  Tom Tromey  <tom@tromey.com>
5417
5418         * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
5419         parameter.
5420         (buildsym_compunit::set_last_source_file): New method.
5421         <m_last_source_file>: New member.
5422         (prepare_for_building): Remove "name" parameter.
5423         (start_symtab, restart_symtab, reset_symtab_globals): Update.
5424         (last_source_file): Remove.
5425         (set_last_source_file, get_last_source_file): Update.
5426
5427 2018-07-16  Tom Tromey  <tom@tromey.com>
5428
5429         * buildsym.c (prepare_for_building): Add assert.
5430
5431 2018-07-16  Tom Tromey  <tom@tromey.com>
5432
5433         * buildsym.c (~buildsym_compunit): Update.
5434         (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
5435         (start_subfile, patch_subfile_names)
5436         (end_symtab_with_blockvector): Update.
5437
5438 2018-07-16  Tom Tromey  <tom@tromey.com>
5439
5440         * buildsym.c (struct buildsym_compunit): Add constructor,
5441         destructor, initializers.
5442         (start_buildsym_compunit): Remove.
5443         (free_buildsym_compunit): Use "delete".
5444         (start_symtab, restart_symtab): Use "new".
5445
5446 2018-07-13  Simon Marchi  <simon.marchi@polymtl.ca>
5447
5448         * symfile.c (set_objfile_default_section_offset): Remove struct
5449         keyword.
5450
5451 2018-07-14  Stafford Horne  <shorne@gmail.com>
5452
5453         * (Responsible Maintainers): Add myself as or1k maintainer.
5454
5455 2018-07-13  Tom Tromey  <tom@tromey.com>
5456
5457         * symfile.c (set_objfile_default_section_offset): Use extra braces
5458         around initializer.
5459
5460 2018-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5461
5462         * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
5463         non-branching basr.
5464
5465 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5466
5467         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5468         unittests/cli-utils-selftests.c
5469         * unittests/cli-utils-selftests.c: New file.
5470
5471 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5472
5473         * NEWS: Mention new commands. Mention change to 'thread apply'.
5474
5475 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5476
5477         * thread.c (thr_try_catch_cmd): New function.
5478         (thread_apply_all_command): Handle qcs flags.
5479         (thread_apply_command): Handle qcs flags.
5480         (taas_command): New function.
5481         (tfaas_command): New function.
5482         (_initialize_thread): Update to setup the new commands 'taas
5483         and 'tfaas'. Change doc string for 'thread apply'.
5484
5485 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5486
5487         * stack.c: (trailing_outermost_frame): New function, mostly
5488         extracted from backtrace_command_1.
5489         (leading_innermost_frame): New function.
5490         (backtrace_command_1): Update to call trailing_outermost_frame.
5491         (frame_apply_command_count): New function.
5492         (frame_apply_level_command): New function.
5493         (frame_apply_all_command): New function.
5494         (frame_apply_command): New function.
5495         (faas_command): New function.
5496         (frame_cmd_list): New variable.
5497         (_initialize_stack): Update to setup the new commands 'frame apply'
5498         and 'faas'.
5499
5500 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5501
5502         * cli-utils.c (number_or_range_parser::get_number): Only handle
5503         numbers or convenience var as numbers.
5504         (parse_flags): New function.
5505         (parse_flags_qcs): New function.
5506         (number_or_range_parser::finished): Ensure parsing end is detected
5507         before end of string.
5508         * cli-utils.h (parse_flags): New function.
5509         (parse_flags_qcs): New function.
5510         (number_or_range_parser): Remove m_finished bool.
5511         (number_or_range_parser::skip_range): Set m_in_range to false.
5512
5513 2018-07-12  Sergio Durigan Junior  <sergiodj@redhat.com>
5514
5515         * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
5516         on Windows.
5517
5518 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
5519             Jan Kratochvil  <jan.kratochvil@redhat.com>
5520             Paul Fertser  <fercerpav@gmail.com>
5521             Tsutomu Seki  <sekiriki@gmail.com>
5522             Pedro Alves  <palves@redhat.com>
5523
5524         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5525         'unittests/parse-connection-spec-selftests.c'.
5526         (COMMON_SFILES): Add 'common/netstuff.c'.
5527         (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
5528         * NEWS (Changes since GDB 8.2): Mention IPv6 support.
5529         * common/netstuff.c: New file.
5530         * common/netstuff.h: New file.
5531         * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
5532         (wait_for_connect): Update comment.  New parameter
5533         'gdb::optional<int> sock' instead of 'struct serial *scb'.
5534         Use 'sock' directly instead of 'scb->fd'.
5535         (try_connect): New function, with code from 'net_open'.
5536         (net_open): Rewrite main loop to deal with multiple
5537         sockets/addresses.  Handle IPv6-style hostnames; implement
5538         support for IPv6 connections.
5539         * unittests/parse-connection-spec-selftests.c: New file.
5540
5541 2018-07-11  Pedro Alves  <palves@redhat.com>
5542
5543         PR gdb/23377
5544         * remote.c (remote_target::remote_detach_pid): Call
5545         set_current_process.
5546
5547 2018-07-11  Pedro Alves  <palves@redhat.com>
5548
5549         * h8300-tdep.c (h8300_gdbarch_init): Remove
5550         set_gdbarch_ecoff_reg_to_regnum calls.
5551
5552 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
5553
5554         PR c++/23373
5555         * c-typeprint.c (c_type_print_base_struct_union): Don't print
5556         offsets/sizes for static members of a class/struct.
5557
5558 2018-07-11  Alan Hayward  <alan.hayward@arm.com>
5559
5560         * target-descriptions.c (tdesc_register_bitsize): Rename.
5561         * target-descriptions.h (tdesc_register_bitsize): Likewise.
5562         * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
5563         * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
5564
5565 2018-07-10  Tom Tromey  <tom@tromey.com>
5566
5567         * breakpoint.c (moribund_locations): Now static and a
5568         std::vector.
5569         (breakpoint_init_inferior, moribund_breakpoint_here_p)
5570         (build_bpstat_chain, update_global_location_list)
5571         (breakpoint_retire_moribund): Update.
5572         * breakpoint.h (bp_location_p): Remove typedef.  Don't declare
5573         VEC.
5574
5575 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
5576
5577         * riscv-tdep.c (riscv_is_fp_regno_p): New function.
5578         (riscv_register_reggroup_p): Use new function, remove unneeded
5579         parenthesis.
5580         (riscv_push_dummy_call): Extend assert to compare against xlen or
5581         flen based on register type.
5582
5583 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
5584
5585         * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
5586
5587 2018-07-09  Andrew Burgess  <andrew.burgess@embecosm.com>
5588
5589         * remote.c (show_hardware_watchpoint_limit): New function.
5590         (show_hardware_watchpoint_length_limit): New function.
5591         (show_hardware_breakpoint_limit): New function.
5592         (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
5593         where appropriate, update help text.
5594
5595 2018-07-09  Tom Tromey  <tom@tromey.com>
5596
5597         * Makefile.in (CDEPS): Don't mention XM_CDEPS.
5598         (CLIBS): Don't mention NAT_CLIBS.
5599
5600 2018-07-09  Tom Tromey  <tom@tromey.com>
5601
5602         * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
5603         (LIBGDB_OBS, clean mostlyclean): Update.
5604         (gdb$(EXEEXT), insight$(EXEEXT)): Update.
5605
5606 2018-07-09  Tom Tromey  <tom@tromey.com>
5607
5608         * Makefile.in (%.c: %.y): Use ECHO_YACC.
5609         (%.c: %.l): Use ECHO_LEX.  Just fail if flex not available.
5610         * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
5611
5612 2018-07-09  Tom Tromey  <tom@tromey.com>
5613
5614         * Makefile.in (ALLDEPFILES): Remove exec.c.
5615         (COMMON_OBS): Remove exec.o.
5616         (COMMON_SFILES): Add exec.c.
5617
5618 2018-07-09  Tom Tromey  <tom@tromey.com>
5619
5620         * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
5621
5622 2018-07-09  Tom Tromey  <tom@tromey.com>
5623
5624         * Makefile.in (clean mostlyclean): Remove stamp-version.
5625         (version.c): Depend on stamp-version.
5626         (stamp-version): New rule, from version.c rule.
5627
5628 2018-07-09  Tom Tromey  <tom@tromey.com>
5629
5630         * Makefile.in (init.c): Depend on stamp-init.
5631         (stamp-init): New rule, from init.c rule.
5632         (clean mostlyclean): Remove stamp-init.
5633
5634 2018-07-09  Tom Tromey  <tom@tromey.com>
5635
5636         * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
5637         SUBDIR_GCC_COMPILE_SRCS.
5638
5639 2018-07-09  Tom Tromey  <tom@tromey.com>
5640
5641         * Makefile.in (init.c): Remove some unused sed rules.
5642
5643 2018-07-09  Tom Tromey  <tom@tromey.com>
5644
5645         * Makefile.in (TSOBS): Remove.
5646         (INIT_FILES): Update.
5647         (LIBGDB_OBS): Update.
5648         (COMMON_SFILES): Add inflow.c.
5649         (SFILES): Remove inflow.c.
5650
5651 2018-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
5652
5653         * contrib/gdb-add-index.sh ($dwarf5): New, use it.
5654
5655 2018-07-07  Simon Marchi  <simon.marchi@polymtl.ca>
5656
5657         * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
5658         get_saveloc_name, is_signal_frame_name, step_name,
5659         init_remote_name, create_addr_space_name,
5660         destroy_addr_space_name, search_unwind_table_name,
5661         find_dyn_list_name): Constify.
5662
5663 2018-07-05  Simon Marchi  <simon.marchi@polymtl.ca>
5664
5665         * darwin-nat.c (darwin_pthread_kill): New function.
5666         (darwin_resume_thread): Use darwin_pthread_kill.
5667
5668 2018-07-05  Tom de Vries  <tdevries@suse.de>
5669
5670         * macroexp.c (macro_buffer) <operator=>: New member function.
5671
5672 2018-07-04  Tom Tromey  <tom@tromey.com>
5673
5674         * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
5675
5676 2018-07-04  Simon Marchi  <simon.marchi@polymtl.ca>
5677
5678         * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
5679         * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
5680         * maint.c: Likewise.
5681         * top.c: Likewise.
5682
5683 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
5684
5685         * NEWS: Create a new section for the next release branch.
5686         Rename the section of the current branch, now that it has
5687         been cut.
5688
5689 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
5690
5691         GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
5692         * version.in: Bump version to 8.2.50.DATE-git.
5693
5694 2018-07-04  Vyacheslav Barinov  <v.barinov@samsung.com>
5695             Pedro Alves  <palves@redhat.com>
5696
5697         * linux-nat.c (linux_init_ptrace): Rename to ...
5698         (linux_init_ptrace_procfs): ... this.  Call
5699         linux_proc_init_warnings.
5700         (linux_nat_target::post_attach)
5701         (linux_nat_target::post_startup_inferior): Adjust.
5702         * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
5703         * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
5704
5705 2018-07-04  Tom de Vries  <tdevries@suse.de>
5706
5707         * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
5708         check ...
5709         (read_comp_unit_head): ... here.
5710
5711 2018-07-03  Tom Tromey  <tom@tromey.com>
5712
5713         * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
5714         (stop_tracing, tstatus_command)
5715         (find_matching_tracepoint_location, merge_uploaded_tracepoints)
5716         (print_one_static_tracepoint_marker): Update.
5717         * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
5718         std::vector.
5719         * breakpoint.h (breakpoint_p): Remove typedef.  Don't declare
5720         VEC.
5721         (all_tracepoints, static_tracepoints_here): Return std::vector.
5722
5723 2018-07-03  Tom Tromey  <tom@tromey.com>
5724
5725         * common/ptid.c (ptid_equal): Remove.
5726         * common/ptid.h (ptid_equal): Don't declare.
5727         * ada-tasks.c: Update.
5728         * breakpoint.c: Update.
5729         * common/agent.c: Update.
5730         * corelow.c: Update.
5731         * darwin-nat-info.c: Update.
5732         * darwin-nat.c: Update.
5733         * dcache.c: Update.
5734         * dtrace-probe.c: Update.
5735         * dummy-frame.c: Update.
5736         * fbsd-nat.c: Update.
5737         * frame.c: Update.
5738         * gdbthread.h: Update.
5739         * gnu-nat.c: Update.
5740         * go32-nat.c: Update.
5741         * inf-loop.c: Update.
5742         * inf-ptrace.c: Update.
5743         * infcall.c: Update.
5744         * infcmd.c: Update.
5745         * inflow.c: Update.
5746         * infrun.c: Update.
5747         * linux-fork.c: Update.
5748         * linux-nat.c: Update.
5749         * linux-thread-db.c: Update.
5750         * mi/mi-cmd-var.c: Update.
5751         * mi/mi-interp.c: Update.
5752         * mi/mi-main.c: Update.
5753         * nto-procfs.c: Update.
5754         * ppc-linux-tdep.c: Update.
5755         * procfs.c: Update.
5756         * python/py-inferior.c: Update.
5757         * python/py-record-btrace.c: Update.
5758         * python/py-record.c: Update.
5759         * ravenscar-thread.c: Update.
5760         * regcache.c: Update.
5761         * remote-sim.c: Update.
5762         * remote.c: Update.
5763         * sol-thread.c: Update.
5764         * solib.c: Update.
5765         * target.c: Update.
5766         * tui/tui-stack.c: Update.
5767         * varobj.c: Update.
5768         * windows-nat.c: Update.
5769         * windows-tdep.c: Update.
5770
5771 2018-07-03  Tom Tromey  <tom@tromey.com>
5772
5773         * common/ptid.c (ptid_match): Remove.
5774         * common/ptid.h (ptid_match): Don't declare.
5775         * fbsd-nat.c: Update.
5776         * infcmd.c: Update.
5777         * infrun.c: Update.
5778         * linux-nat.c: Update.
5779         * record-btrace.c: Update.
5780         * regcache.c: Update.
5781         * remote.c: Update.
5782
5783 2018-07-03  Tom Tromey  <tom@tromey.com>
5784
5785         * common/ptid.c (ptid_tid_p): Remove.
5786         * common/ptid.h (ptid_tid_p): Don't declare.
5787         * sol-thread.c: Update.
5788
5789 2018-07-03  Tom Tromey  <tom@tromey.com>
5790
5791         * common/ptid.c (ptid_lwp_p): Remove.
5792         * common/ptid.h (ptid_lwp_p): Don't declare.
5793         * fbsd-nat.c: Update.
5794         * linux-nat.c: Update.
5795         * nat/linux-procfs.c: Update.
5796         * nat/x86-linux-dregs.c: Update.
5797         * sol-thread.c: Update.
5798
5799 2018-07-03  Tom Tromey  <tom@tromey.com>
5800
5801         * common/ptid.c (ptid_is_pid): Remove.
5802         * common/ptid.h (ptid_is_pid): Don't declare.
5803         * infrun.c: Update.
5804         * linux-nat.c: Update.
5805         * mi/mi-interp.c: Update.
5806         * remote.c: Update.
5807         * thread.c: Update.
5808
5809 2018-07-03  Tom Tromey  <tom@tromey.com>
5810
5811         * common/ptid.c (ptid_get_tid): Remove.
5812         * common/ptid.h (ptid_get_tid): Don't declare.
5813         * ada-tasks.c: Update.
5814         * aix-thread.c: Update.
5815         * bsd-uthread.c: Update.
5816         * darwin-nat.c: Update.
5817         * fbsd-nat.c: Update.
5818         * i386-darwin-nat.c: Update.
5819         * infrun.c: Update.
5820         * linux-tdep.c: Update.
5821         * nto-procfs.c: Update.
5822         * ppc-ravenscar-thread.c: Update.
5823         * python/py-infthread.c: Update.
5824         * ravenscar-thread.c: Update.
5825         * sol-thread.c: Update.
5826         * sparc-ravenscar-thread.c: Update.
5827         * windows-nat.c: Update.
5828
5829 2018-07-03  Tom Tromey  <tom@tromey.com>
5830
5831         * common/ptid.c (ptid_get_lwp): Remove.
5832         * common/ptid.h (ptid_get_lwp): Don't declare.
5833         * aarch64-linux-nat.c: Update.
5834         * ada-tasks.c: Update.
5835         * aix-thread.c: Update.
5836         * amd64-linux-nat.c: Update.
5837         * arm-linux-nat.c: Update.
5838         * corelow.c: Update.
5839         * fbsd-nat.c: Update.
5840         * fbsd-tdep.c: Update.
5841         * gnu-nat.c: Update.
5842         * i386-cygwin-tdep.c: Update.
5843         * i386-gnu-nat.c: Update.
5844         * i386-linux-nat.c: Update.
5845         * ia64-linux-nat.c: Update.
5846         * inf-ptrace.c: Update.
5847         * infrun.c: Update.
5848         * linux-fork.c: Update.
5849         * linux-nat.c: Update.
5850         * linux-tdep.c: Update.
5851         * linux-thread-db.c: Update.
5852         * mips-linux-nat.c: Update.
5853         * nat/aarch64-linux-hw-point.c: Update.
5854         * nat/aarch64-linux.c: Update.
5855         * nat/linux-btrace.c: Update.
5856         * nat/linux-osdata.c: Update.
5857         * nat/linux-procfs.c: Update.
5858         * nat/x86-linux-dregs.c: Update.
5859         * obsd-nat.c: Update.
5860         * ppc-fbsd-nat.c: Update.
5861         * ppc-linux-nat.c: Update.
5862         * procfs.c: Update.
5863         * python/py-infthread.c: Update.
5864         * ravenscar-thread.c: Update.
5865         * remote.c: Update.
5866         * s390-linux-nat.c: Update.
5867         * sol-thread.c: Update.
5868         * sol2-tdep.c: Update.
5869         * spu-linux-nat.c: Update.
5870         * x86-linux-nat.c: Update.
5871         * xtensa-linux-nat.c: Update.
5872
5873 2018-07-03  Tom Tromey  <tom@tromey.com>
5874
5875         * common/ptid.c (ptid_get_pid): Remove.
5876         * common/ptid.h (ptid_get_pid): Don't declare.
5877         * aarch64-linux-nat.c: Update.
5878         * ada-lang.c: Update.
5879         * aix-thread.c: Update.
5880         * alpha-bsd-nat.c: Update.
5881         * amd64-fbsd-nat.c: Update.
5882         * amd64-linux-nat.c: Update.
5883         * arm-linux-nat.c: Update.
5884         * arm-nbsd-nat.c: Update.
5885         * auxv.c: Update.
5886         * break-catch-syscall.c: Update.
5887         * breakpoint.c: Update.
5888         * bsd-uthread.c: Update.
5889         * corelow.c: Update.
5890         * ctf.c: Update.
5891         * darwin-nat.c: Update.
5892         * fbsd-nat.c: Update.
5893         * fbsd-tdep.c: Update.
5894         * gcore.c: Update.
5895         * gnu-nat.c: Update.
5896         * hppa-nbsd-nat.c: Update.
5897         * hppa-obsd-nat.c: Update.
5898         * i386-fbsd-nat.c: Update.
5899         * ia64-linux-nat.c: Update.
5900         * inf-ptrace.c: Update.
5901         * infcmd.c: Update.
5902         * inferior.c: Update.
5903         * inferior.h: Update.
5904         * inflow.c: Update.
5905         * infrun.c: Update.
5906         * linux-fork.c: Update.
5907         * linux-nat.c: Update.
5908         * linux-tdep.c: Update.
5909         * linux-thread-db.c: Update.
5910         * m68k-bsd-nat.c: Update.
5911         * mi/mi-interp.c: Update.
5912         * mi/mi-main.c: Update.
5913         * mips-linux-nat.c: Update.
5914         * mips-nbsd-nat.c: Update.
5915         * mips64-obsd-nat.c: Update.
5916         * nat/aarch64-linux-hw-point.c: Update.
5917         * nat/aarch64-linux.c: Update.
5918         * nat/linux-btrace.c: Update.
5919         * nat/linux-osdata.c: Update.
5920         * nat/linux-procfs.c: Update.
5921         * nat/x86-linux-dregs.c: Update.
5922         * nto-procfs.c: Update.
5923         * obsd-nat.c: Update.
5924         * ppc-linux-nat.c: Update.
5925         * ppc-nbsd-nat.c: Update.
5926         * ppc-obsd-nat.c: Update.
5927         * proc-service.c: Update.
5928         * procfs.c: Update.
5929         * python/py-inferior.c: Update.
5930         * python/py-infthread.c: Update.
5931         * ravenscar-thread.c: Update.
5932         * record.c: Update.
5933         * remote-sim.c: Update.
5934         * remote.c: Update.
5935         * rs6000-nat.c: Update.
5936         * s390-linux-nat.c: Update.
5937         * sh-nbsd-nat.c: Update.
5938         * sol-thread.c: Update.
5939         * sparc-nat.c: Update.
5940         * sparc64-tdep.c: Update.
5941         * spu-linux-nat.c: Update.
5942         * spu-tdep.c: Update.
5943         * target-debug.h: Update.
5944         * target.c: Update.
5945         * thread.c: Update.
5946         * tid-parse.c: Update.
5947         * tracefile-tfile.c: Update.
5948         * vax-bsd-nat.c: Update.
5949         * windows-nat.c: Update.
5950         * x86-linux-nat.c: Update.
5951         * x86-nat.c: Update.
5952
5953 2018-07-03  Tom Tromey  <tom@tromey.com>
5954
5955         * common/ptid.c (pid_to_ptid): Remove.
5956         * common/ptid.h (pid_to_ptid): Don't declare.
5957         * aix-thread.c: Update.
5958         * arm-linux-nat.c: Update.
5959         * common/ptid.c: Update.
5960         * common/ptid.h: Update.
5961         * corelow.c: Update.
5962         * ctf.c: Update.
5963         * darwin-nat.c: Update.
5964         * fbsd-nat.c: Update.
5965         * fork-child.c: Update.
5966         * gnu-nat.c: Update.
5967         * go32-nat.c: Update.
5968         * inf-ptrace.c: Update.
5969         * infcmd.c: Update.
5970         * inferior.c: Update.
5971         * infrun.c: Update.
5972         * linux-fork.c: Update.
5973         * linux-nat.c: Update.
5974         * nat/aarch64-linux-hw-point.c: Update.
5975         * nat/fork-inferior.c: Update.
5976         * nat/x86-linux-dregs.c: Update.
5977         * nto-procfs.c: Update.
5978         * obsd-nat.c: Update.
5979         * procfs.c: Update.
5980         * progspace.c: Update.
5981         * remote.c: Update.
5982         * rs6000-nat.c: Update.
5983         * s390-linux-nat.c: Update.
5984         * sol-thread.c: Update.
5985         * spu-linux-nat.c: Update.
5986         * target.c: Update.
5987         * top.c: Update.
5988         * tracefile-tfile.c: Update.
5989         * windows-nat.c: Update.
5990
5991 2018-07-03  Tom Tromey  <tom@tromey.com>
5992
5993         * common/ptid.h (ptid_build): Don't declare.
5994         * common/ptid.c (ptid_build): Remove.
5995         * aix-thread.c: Update.
5996         * bsd-kvm.c: Update.
5997         * bsd-uthread.c: Update.
5998         * common/agent.c: Update.
5999         * common/ptid.c: Update.
6000         * common/ptid.h: Update.
6001         * corelow.c: Update.
6002         * darwin-nat.c: Update.
6003         * fbsd-nat.c: Update.
6004         * gnu-nat.c: Update.
6005         * linux-fork.c: Update.
6006         * linux-nat.c: Update.
6007         * linux-thread-db.c: Update.
6008         * nat/linux-osdata.c: Update.
6009         * nat/linux-procfs.c: Update.
6010         * nto-procfs.c: Update.
6011         * obsd-nat.c: Update.
6012         * proc-service.c: Update.
6013         * procfs.c: Update.
6014         * ravenscar-thread.c: Update.
6015         * remote-sim.c: Update.
6016         * remote.c: Update.
6017         * sol-thread.c: Update.
6018         * target.c: Update.
6019         * windows-nat.c: Update.
6020
6021 2018-07-03  Tom Tromey  <tom@tromey.com>
6022
6023         * infrun.c (follow_exec): Use exit_inferior_silent.
6024         * inferior.c (exit_inferior_num_silent): Remove.
6025         * inferior.h (exit_inferior_num_silent): Don't declare.
6026
6027 2018-07-03  Tom Tromey  <tom@tromey.com>
6028
6029         PR cli/23340:
6030         * darwin-nat.c (darwin_attach_pid): Reset inferior and
6031         inferior_ptid on error.
6032
6033 2018-07-02  Maciej W. Rozycki  <macro@mips.com>
6034             Simon Marchi  <simon.marchi@polymtl.ca>
6035
6036         PR tdep/8282
6037         * disasm.h (gdb_disassembler): Add
6038         `m_disassembler_options_holder'. member
6039         * disasm.c (get_all_disassembler_options): New function.
6040         (gdb_disassembler::gdb_disassembler): Use it.
6041         (gdb_buffered_insn_length_init_dis): Likewise.
6042         (gdb_buffered_insn_length): Adjust accordingly.
6043         (set_disassembler_options): Handle options with arguments.
6044         (show_disassembler_options_sfunc): Likewise.  Add a leading new
6045         line if showing options with descriptions.
6046         (disassembler_options_completer): Adapt to using the
6047         `disasm_options_and_args_t' structure.
6048         * mips-tdep.c (mips_disassembler_options): New variable.
6049         (mips_disassembler_options_o32): Likewise.
6050         (mips_disassembler_options_n32): Likewise.
6051         (mips_disassembler_options_n64): Likewise.
6052         (gdb_print_insn_mips): Don't set `disassembler_options'.
6053         (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
6054         functions.
6055         (mips_gdbarch_init): Always set `gdbarch_print_insn' to
6056         `gdb_print_insn_mips'.  Set `gdbarch_disassembler_options',
6057         `gdbarch_disassembler_options_implicit' and
6058         `gdbarch_valid_disassembler_options'.
6059         * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
6060         `disasm_options_and_args_t' structure.
6061         * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
6062         method.
6063         (valid_disassembler_options): Switch from `disasm_options_t' to
6064         the `disasm_options_and_args_t' structure.
6065         * NEWS: Document `set disassembler-options' support for the MIPS
6066         target.
6067         * gdbarch.h: Regenerate.
6068         * gdbarch.c: Regenerate.
6069
6070 2018-07-02  Sebastian Huber  <sebastian.huber@embedded-brains.de>
6071
6072         * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
6073
6074 2018-06-29  Joel Brobecker  <brobecker@adacore.com>
6075
6076         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
6077         parameter in call to amd64_target_description.
6078         * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
6079         * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
6080         (amd64fbsd_init_abi): Likewise.
6081         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
6082         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
6083         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
6084         * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
6085
6086 2018-06-29  Pedro Alves  <palves@redhat.com>
6087
6088         * gdb/amd64-tdep.h (amd64_create_target_description): Add
6089         "segments" parameter.
6090         * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
6091         (_initialize_amd64_tdep): Update call to
6092         amd64_create_target_description.
6093         (amd64_target_description): Add "segments" parameter.  Adjust
6094         the implementation to use it.
6095         * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
6096         call to amd64_create_target_description.
6097         * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
6098         * gdb/arch/amd64.h (amd64_create_target_description): Add
6099         "segments" register.
6100         * gdb/arch/amd64.c (amd64_create_target_description): Add
6101         "segments" parameter.  Call create_feature_i386_64bit_segments
6102         only if SEGMENTS is true.
6103         * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
6104         call to amd64_create_target_description.
6105
6106 2018-06-29  Pedro Alves  <palves@redhat.com>
6107
6108         * thread.c (thread_target_id_str): New, factored out from ...
6109         (print_thread_info_1): ... here.  Use it to compute the max
6110         "Target Id" column width.
6111
6112 2018-06-29  Pedro Alves  <palves@redhat.com>
6113
6114         * remote.c (remote_target::extra_thread_info): Delete
6115         'display_buf' and 'n' locals.  from the cache, regardless of
6116         packet mechanims is in use.  Use cache for qThreadExtra and qP
6117         methods too.
6118
6119 2018-06-29  Pedro Alves  <palves@redhat.com>
6120
6121         * blockframe.c (find_pc_sect_containing_function): New function.
6122         * breakpoint.c (print_breakpoint_location): Don't call
6123         find_pc_sect_function.
6124         * linespec.c (create_sals_line_offset): Record the location's
6125         symbol in the sal.
6126         * linespec.c (convert_address_location_to_sals): Fill in sal's
6127         symbol with find_pc_sect_containing_function.
6128         * symtab.c (find_function_start_sal): Rename to ...
6129         (find_function_start_sal_1): ... this.
6130         (find_function_start_sal): Reimplement as wrapper around
6131         find_function_start_sal_1, and use
6132         find_pc_sect_containing_function to fill in the sal's symbol.
6133         (find_function_start_sal(symbol*, bool)): Adjust.
6134         * symtab.h (find_pc_function, find_pc_sect_function): Adjust
6135         comments.
6136         (find_pc_sect_containing_function): Declare.
6137
6138 2018-06-29  Pedro Alves  <palves@redhat.com>
6139
6140         * inline-frame.c (stopped_by_user_bp_inline_frame): Return
6141         true if the the location has no symbol.
6142
6143 2018-06-28  Tom Tromey  <tom@tromey.com>
6144
6145         * NEWS: Mention --enable-codesign.
6146         * silent-rules.mk (ECHO_SIGN): New variable.
6147         * configure.ac: Add --enable-codesign.
6148         * configure: Rebuild.
6149         * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
6150         (gdb$(EXEEXT)): Optionally invoke codesign.
6151
6152 2018-06-28  Pedro Alves  <palves@redhat.com>
6153
6154         * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
6155         comments.
6156         (switch_to_thread_no_regs): Adjust comment.
6157         * infcmd.c (stop_pc): Delete.
6158         (post_create_inferior, info_program_command): Replace references
6159         to stop_pc with references to thread_info->suspend.stop_pc.
6160         * inferior.h (stop_pc): Delete declaration.
6161         * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
6162         (handle_inferior_event_1, handle_signal_stop)
6163         (process_event_stop_test, keep_going_stepped_thread)
6164         (handle_step_into_function, handle_step_into_function_backward)
6165         (print_stop_location): Replace references to stop_pc with
6166         references to thread_info->suspend.stop_pc.
6167         (struct infcall_suspend_state) <stop_pc>: Delete field.
6168         (save_infcall_suspend_state, restore_infcall_suspend_state):
6169         Remove references to inf_stat->stop_pc.
6170         * linux-fork.c (fork_load_infrun_state): Likewise.
6171         * record-btrace.c (record_btrace_set_replay): Likewise.
6172         * record-full.c (record_full_goto_entry): Likewise.
6173         * remote.c (print_one_stopped_thread): Likewise.
6174         * target.c (target_resume): Extend comment.
6175         * thread.c (set_executing_thread): New.
6176         (set_executing): Use it.
6177         (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
6178         Remove references to stop_pc.
6179
6180 2018-06-28  Pedro Alves  <palves@redhat.com>
6181
6182         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
6183         Moving fetching stop_pc until after ecs->event_thread is refreshed.
6184
6185 2018-06-28  Tom Tromey  <tom@tromey.com>
6186
6187         * coffread.c (coff_symfile_finish): Update.
6188         * xcoffread.c (xcoff_symfile_finish): Update.
6189         * elfread.c (elf_symfile_finish): Update.
6190         * symfile.h (dwarf2_free_objfile): Don't declare.
6191         * dwarf2read.c (_initialize_dwarf2_read): Use
6192         register_objfile_data_with_cleanup.
6193         (dwarf2_free_objfile): Now static.  Change signature.
6194
6195 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
6196
6197         * symfile.c (add_symbol_file_command, _initialize_symfile): Add
6198         option "-o" to add-symbol-file-load to add an offset to each
6199         section's load address.
6200         * symfile.c (set_objfile_default_section_offset): New function.
6201
6202 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
6203
6204         * symfile.c (add_symbol_file_command): Make sure that sections
6205         with the same name are sorted in the same order.
6206
6207 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
6208
6209         * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
6210         require the second argument.  If omitted, load sections at the
6211         addresses specified in the file.
6212
6213 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
6214
6215         * symfile.c (symbol_file_command, symbol_file_add_main_1)
6216         (_initialize_symfile): Add option "-o" to symbol-file to add an
6217         offset to each section of the symbol file.
6218
6219 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
6220
6221         * MAINTAINERS (Write After Approval): Add Petr Tesarik.
6222
6223 2018-06-27  Tom Tromey  <tom@tromey.com>
6224
6225         * stack.c (_initialize_stack): Update "func" help text.
6226
6227 2018-06-27  Tom Tromey  <tom@tromey.com>
6228
6229         * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
6230         std::vector.
6231         (unwind_infopy_str, pyuw_create_unwind_info)
6232         (unwind_infopy_add_saved_register, pyuw_sniffer)
6233         (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
6234         Update.
6235         (struct saved_reg): Add constructor.
6236         <value>: Now a gdbpy_ref<>.
6237
6238 2018-06-27  Tom Tromey  <tom@tromey.com>
6239
6240         * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
6241
6242 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6243
6244         * gdb-gdb.py.in: Format using autopep8.
6245
6246 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6247
6248         * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
6249         (type_lookup_function): Recognize CORE_ADDR values.
6250
6251 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6252
6253         * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
6254         print tag_name.
6255
6256 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6257
6258         * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
6259         <__lt__>: Add.
6260
6261 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6262
6263         * gdb-gdb.py: Move to...
6264         * gdb-gdb.py.in: ... here.
6265         * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
6266         * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
6267         dependencies.
6268         (distclean): Remove gdb-gdb.py when cleaning.
6269         (gdb-gdb.py, gdb-gdb.gdb): New rules.
6270         * configure: Re-generate.
6271
6272 2018-06-27  Pedro Alves  <palves@redhat.com>
6273
6274         * proc-service.c (get_ps_regcache): New.
6275         (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
6276         (ps_lsetfpregs): Use it.
6277
6278 2018-06-27  Omair Javaid  <omair.javaid@linaro.org>
6279
6280         PR gdb/21695
6281         * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
6282         (dwarf_decode_lines_1): Adjust.
6283
6284 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6285
6286         * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
6287         override.
6288         <info_proc>: Likewise.
6289
6290 2018-06-26  Joel Brobecker  <brobecker@adacore.com>
6291
6292         * windows-nat.c (do_windows_fetch_inferior_registers): Rename
6293         to windows_fetch_one_register, and only handle the case of
6294         fetching one register.  Move the code that reloads the context
6295         and iterates over all registers if R is negative to...
6296         (windows_nat_target::fetch_registers): ... here.
6297         (do_windows_store_inferior_registers): Rename to
6298         windows_store_one_register, and only handle the case of storing
6299         one register.  Move the code that handles the case where r is
6300         negative to...
6301         (windows_nat_target::store_registers) ... here.
6302
6303 2018-06-26  Tom Tromey  <tom@tromey.com>
6304
6305         PR rust/22574:
6306         * typeprint.c (whatis_exp): Allow ptype/o for Rust.
6307         * rust-lang.c (rust_print_struct_def): Add podata parameter.
6308         Update.
6309         (rust_internal_print_type): Add podata parameter.
6310         (rust_print_type): Update.
6311
6312 2018-06-26  Tom Tromey  <tom@tromey.com>
6313
6314         * typeprint.h (struct print_offset_data) <update, finish,
6315         maybe_print_hole>: New methods.
6316         <indentation>: New constant.
6317         * typeprint.c (print_offset_data::indentation): Define.
6318         (print_offset_data::maybe_print_hole, print_offset_data::update)
6319         (print_offset_data::finish): Move from c-typeprint.c and rename.
6320         * c-typeprint.c (OFFSET_SPC_LEN): Remove.
6321         (print_spaces_filtered_with_print_options): Update.
6322         (c_print_type_union_field_offset, maybe_print_hole)
6323         (c_print_type_struct_field_offset): Move to typeprint.c and
6324         rename.
6325         (c_type_print_base_struct_union): Update.
6326
6327 2018-06-25  Pedro Alves  <palves@redhat.com>
6328
6329         * gdbthread.h (thread_info_ref, delete_thread)
6330         (delete_thread_silent, first_thread_of_inferior)
6331         (any_thread_of_inferior, switch_to_thread)
6332         (enable_thread_stack_temporaries)
6333         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
6334         (get_last_thread_stack_temporary)
6335         (value_in_thread_stack_temporaries, can_access_registers_thread):
6336         Spell out "struct thread_info" instead of just "thread_info".
6337         * inferior.h (notice_new_inferior): Likewise.
6338
6339 2018-06-25  Pedro Alves  <palves@redhat.com>
6340
6341         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
6342         pass thread_info pointer to delete_thread.
6343         (windows_nat_target::detach): Pass inferior pointer to
6344         detach_inferior.
6345         * aix-thread.c (sync_threadlists): Pass thread_info pointer to
6346         delete_thread.
6347         * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
6348         * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
6349         and pass a thread_info pointer to delete_thread.
6350         * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
6351         pass thread_info pointer to delete_thread.
6352         * go32-nat.c (go32_nat_target::mourn_inferior): Remove
6353         delete_thread_silent call.
6354         * procfs.c (procfs_target::detach): Pass inferior pointer to
6355         detach_inferior.
6356         (procfs_target::wait): Pass thread_info pointer to delete_thread.
6357         * remote-sim.c (gdbsim_target::mourn_inferior): Remove
6358         delete_thread_silent call.
6359         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
6360         pass thread_info pointer to delete_thread.
6361         (windows_nat_target::detach): Pass inferior pointer to
6362         delete_inferior.
6363
6364 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
6365
6366         * regcache.c (readable_regcache::read_part): Fix asserts.
6367         (reg_buffer::raw_collect_part): New function.
6368         (regcache::write_part): Fix asserts.
6369         (reg_buffer::raw_supply_part): New function.
6370         (regcache::transfer_regset_register): New helper function.
6371         (regcache::transfer_regset): Call new functions.
6372         (regcache_supply_regset): Use gdb_byte*.
6373         (regcache::supply_regset): Likewise.
6374         (regcache_collect_regset): Likewise.
6375         (regcache::collect_regset): Likewise.
6376         * regcache.h (reg_buffer::raw_collect_part): New declaration.
6377         (reg_buffer::raw_supply_part): Likewise.
6378         (regcache::transfer_regset_register): Likewise.
6379         (regcache::transfer_regset): Use gdb_byte*.
6380
6381 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
6382
6383         * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
6384
6385 2018-06-21  Pedro Alves  <palves@redhat.com>
6386
6387         * ada-lang.h (ada_get_task_number): Take a thread_info pointer
6388         instead of a ptid_t.  All callers adjusted.
6389         * ada-tasks.c (ada_get_task_number): Likewise.  All callers
6390         adjusted.
6391         (print_ada_task_info, display_current_task_id, task_command_1):
6392         Adjust.
6393         * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
6394         inferior_thread.
6395         (breakpoint_kind): Adjust.
6396         (remove_breakpoints_pid): Rename to ...
6397         (remove_breakpoints_inf): ... this.  Adjust to take an inferior
6398         pointer.  All callers adjusted.
6399         (bpstat_clear_actions): Use inferior_thread.
6400         (get_bpstat_thread): New.
6401         (bpstat_do_actions): Use it.
6402         (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
6403         to take a thread_info pointer.  All callers adjusted.
6404         (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
6405         (breakpoint_re_set_thread): Use inferior_thread.
6406         * breakpoint.h (struct inferior): Forward declare.
6407         (bpstat_stop_status): Update.
6408         (remove_breakpoints_pid): Delete.
6409         (remove_breakpoints_inf): New.
6410         * bsd-uthread.c (bsd_uthread_target::wait)
6411         (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
6412         * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
6413         (maint_btrace_packet_history_cmd)
6414         (maint_btrace_clear_packet_history_cmd): Adjust.
6415         (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
6416         inferior_thread.
6417         * cli/cli-interp.c: Include "inferior.h".
6418         * common/refcounted-object.h (struct
6419         refcounted_object_ref_policy): New.
6420         * compile/compile-object-load.c: Include gdbthread.h.
6421         (store_regs): Use inferior_thread.
6422         * corelow.c (core_target::close): Use current_inferior.
6423         (core_target_open): Adjust to use first_thread_of_inferior and use
6424         the current inferior.
6425         * ctf.c (ctf_target::close): Adjust to use current_inferior.
6426         * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
6427         <thread>: ... this new field.  All references adjusted.
6428         (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
6429         Take a thread_info pointer instead of a ptid_t.
6430         * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
6431         (dummy_frame_discard, register_dummy_frame_dtor): Take a
6432         thread_info pointer instead of a ptid_t.
6433         * elfread.c: Include "inferior.h".
6434         (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
6435         Use inferior_thread.
6436         * eval.c (evaluate_subexp): Likewise.
6437         * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
6438         inferior_thread.
6439         * gdb_proc_service.h (struct thread_info): Forward declare.
6440         (struct ps_prochandle) <ptid>: Delete, replaced by ...
6441         <thread>: ... this new field.  All references adjusted.
6442         * gdbarch.h, gdbarch.c: Regenerate.
6443         * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
6444         'thread' parameter.  All implementations and callers adjusted.
6445         * gdbthread.h (thread_info) <set_running>: New method.
6446         (delete_thread, delete_thread_silent): Take a thread_info pointer
6447         instead of a ptid.
6448         (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
6449         (first_thread_of_process): Delete, replaced by ...
6450         (first_thread_of_inferior): ... this new function.  All callers
6451         adjusted.
6452         (any_live_thread_of_process): Delete, replaced by ...
6453         (any_live_thread_of_inferior): ... this new function.  All callers
6454         adjusted.
6455         (switch_to_thread, switch_to_no_thread): Declare.
6456         (is_executing): Delete.
6457         (enable_thread_stack_temporaries): Update comment.
6458         <enable_thread_stack_temporaries>: Take a thread_info pointer
6459         instead of a ptid_t.  Incref the thread.
6460         <~enable_thread_stack_temporaries>: Decref the thread.
6461         <m_ptid>: Delete
6462         <m_thr>: New.
6463         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
6464         (get_last_thread_stack_temporary)
6465         (value_in_thread_stack_temporaries, can_access_registers_thread):
6466         Take a thread_info pointer instead of a ptid_t.  All callers
6467         adjusted.
6468         * infcall.c (get_call_return_value): Use inferior_thread.
6469         (run_inferior_call): Work with thread pointers instead of ptid_t.
6470         (call_function_by_hand_dummy): Work with thread pointers instead
6471         of ptid_t.  Use thread_info_ref.
6472         * infcmd.c (proceed_thread_callback): Access thread's state
6473         directly.
6474         (ensure_valid_thread, ensure_not_running): Use inferior_thread,
6475         access thread's state directly.
6476         (continue_command): Use inferior_thread.
6477         (info_program_command): Use find_thread_ptid and access thread
6478         state directly.
6479         (proceed_after_attach_callback): Use thread state directly.
6480         (notice_new_inferior): Take a thread_info pointer instead of a
6481         ptid_t.  All callers adjusted.
6482         (exit_inferior): Take an inferior pointer instead of a pid.  All
6483         callers adjusted.
6484         (exit_inferior_silent): New.
6485         (detach_inferior): Delete.
6486         (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
6487         (gdb_inferior_id_to_pid, in_inferior_list): Delete.
6488         (detach_inferior_command, kill_inferior_command): Use
6489         find_inferior_id instead of valid_gdb_inferior_id and
6490         gdb_inferior_id_to_pid.
6491         (inferior_command): Use inferior and thread pointers.
6492         * inferior.h (struct thread_info): Forward declare.
6493         (notice_new_inferior): Take a thread_info pointer instead of a
6494         ptid_t.  All callers adjusted.
6495         (detach_inferior): Delete declaration.
6496         (exit_inferior, exit_inferior_silent): Take an inferior pointer
6497         instead of a pid.  All callers adjusted.
6498         (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
6499         (valid_gdb_inferior_id): Delete.
6500         * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
6501         (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
6502         (struct displaced_step_inferior_state) <pid>: Delete, replaced by
6503         ...
6504         <inf>: ... this new field.
6505         <step_ptid>: Delete, replaced by ...
6506         <step_thread>: ... this new field.
6507         (get_displaced_stepping_state): Take an inferior pointer instead
6508         of a pid.  All callers adjusted.
6509         (displaced_step_in_progress_any_inferior): Adjust.
6510         (displaced_step_in_progress_thread): Take a thread pointer instead
6511         of a ptid_t.  All callers adjusted.
6512         (displaced_step_in_progress, add_displaced_stepping_state): Take
6513         an inferior pointer instead of a pid.  All callers adjusted.
6514         (get_displaced_step_closure_by_addr): Adjust.
6515         (remove_displaced_stepping_state): Take an inferior pointer
6516         instead of a pid.  All callers adjusted.
6517         (displaced_step_prepare_throw, displaced_step_prepare)
6518         (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
6519         All callers adjusted.
6520         (start_step_over): Adjust.
6521         (infrun_thread_ptid_changed): Remove bit updating ptids in the
6522         displaced step queue.
6523         (do_target_resume): Adjust.
6524         (fetch_inferior_event): Use inferior_thread.
6525         (context_switch, get_inferior_stop_soon): Take an
6526         execution_control_state pointer instead of a ptid_t.  All callers
6527         adjusted.
6528         (switch_to_thread_cleanup): Delete.
6529         (stop_all_threads): Use scoped_restore_current_thread.
6530         * inline-frame.c: Include "gdbthread.h".
6531         (inline_state) <inline_state>: Take a thread pointer instead of a
6532         ptid_t.  All callers adjusted.
6533         <ptid>: Delete, replaced by ...
6534         <thread>: ... this new field.
6535         (find_inline_frame_state): Take a thread pointer instead of a
6536         ptid_t.  All callers adjusted.
6537         (skip_inline_frames, step_into_inline_frame)
6538         (inline_skipped_frames, inline_skipped_symbol): Take a thread
6539         pointer instead of a ptid_t.  All callers adjusted.
6540         * inline-frame.h (skip_inline_frames, step_into_inline_frame)
6541         (inline_skipped_frames, inline_skipped_symbol): Likewise.
6542         * linux-fork.c (delete_checkpoint_command): Adjust to use thread
6543         pointers directly.
6544         * linux-nat.c (get_detach_signal): Likewise.
6545         * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
6546         (thread_db_notice_clone): Adjust.
6547         (thread_db_find_new_threads_silently)
6548         (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
6549         a thread pointer instead of a ptid_t.  All callers adjusted.
6550         * mi/mi-cmd-var.c: Include "inferior.h".
6551         (mi_cmd_var_update_iter): Update to use thread pointers.
6552         * mi/mi-interp.c (mi_new_thread): Update to use the thread's
6553         inferior directly.
6554         (mi_output_running_pid, mi_inferior_count): Delete, bits factored
6555         out to ...
6556         (mi_output_running): ... this new function.
6557         (mi_on_resume_1): Adjust to use it.
6558         (mi_user_selected_context_changed): Adjust to use inferior_thread.
6559         * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
6560         directly.
6561         (interrupt_thread_callback): : Adjust to use thread and inferior
6562         pointers.
6563         * proc-service.c: Include "gdbthread.h".
6564         (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
6565         * progspace-and-thread.c: Include "inferior.h".
6566         * progspace.c: Include "inferior.h".
6567         * python/py-exitedevent.c (create_exited_event_object): Adjust to
6568         hold a reference to an inferior_object.
6569         * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
6570         inferior_thread.
6571         * python/py-inferior.c (struct inferior_object): Give the type a
6572         tag name instead of a typedef.
6573         (python_on_normal_stop): No need to check if the current thread is
6574         listed.
6575         (inferior_to_inferior_object): Change return type to
6576         inferior_object.  All callers adjusted.
6577         (find_thread_object): Delete, bits factored out to ...
6578         (thread_to_thread_object): ... this new function.
6579         * python/py-infthread.c (create_thread_object): Use
6580         inferior_to_inferior_object.
6581         (thpy_is_stopped): Use thread pointer directly.
6582         (gdbpy_selected_thread): Use inferior_thread.
6583         * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
6584         field, replaced with ...
6585         <thread>: ... this new field.  All users adjusted.
6586         (btpy_insn_or_gap_new): Drop const.
6587         (btpy_list_new): Take a thread pointer instead of a ptid_t.  All
6588         callers adjusted.
6589         * python/py-record.c: Include "gdbthread.h".
6590         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
6591         a ptid_t.  All callers adjusted.
6592         (gdbpy_current_recording): Use inferior_thread.
6593         * python/py-record.h (recpy_record_object) <ptid>: Delete
6594         field, replaced with ...
6595         <thread>: ... this new field.  All users adjusted.
6596         (recpy_element_object) <ptid>: Delete
6597         field, replaced with ...
6598         <thread>: ... this new field.  All users adjusted.
6599         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
6600         a ptid_t.  All callers adjusted.
6601         * python/py-threadevent.c: Include "gdbthread.h".
6602         (get_event_thread): Use thread_to_thread_object.
6603         * python/python-internal.h (struct inferior_object): Forward
6604         declare.
6605         (find_thread_object, find_inferior_object): Delete declarations.
6606         (thread_to_thread_object, inferior_to_inferior_object): New
6607         declarations.
6608         * record-btrace.c: Include "inferior.h".
6609         (require_btrace_thread): Use inferior_thread.
6610         (record_btrace_frame_sniffer)
6611         (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
6612         (get_thread_current_frame): Use scoped_restore_current_thread and
6613         switch_to_thread.
6614         (get_thread_current_frame): Use thread pointer directly.
6615         (record_btrace_replay_at_breakpoint): Use thread's inferior
6616         pointer directly.
6617         * record-full.c: Include "inferior.h".
6618         * regcache.c: Include "gdbthread.h".
6619         (get_thread_arch_regcache): Use the inferior's address space
6620         directly.
6621         (get_thread_regcache, registers_changed_thread): New.
6622         * regcache.h (get_thread_regcache(thread_info *thread)): New
6623         overload.
6624         (registers_changed_thread): New.
6625         (remote_target) <remote_detach_1>: Swap order of parameters.
6626         (remote_add_thread): <remote_add_thread>: Return the new thread.
6627         (get_remote_thread_info(ptid_t)): New overload.
6628         (remote_target::remote_notice_new_inferior): Use thread pointers
6629         directly.
6630         (remote_target::process_initial_stop_replies): Use
6631         thread_info::set_running.
6632         (remote_target::remote_detach_1, remote_target::detach)
6633         (extended_remote_target::detach): Adjust.
6634         * stack.c (frame_show_address): Use inferior_thread.
6635         * target-debug.h (target_debug_print_thread_info_pp): New.
6636         * target-delegates.c: Regenerate.
6637         * target.c (default_thread_address_space): Delete.
6638         (memory_xfer_partial_1): Use current_inferior.
6639         (target_detach): Use current_inferior.
6640         (target_thread_address_space): Delete.
6641         (generic_mourn_inferior): Use current_inferior.
6642         * target.h (struct target_ops) <thread_address_space>: Delete.
6643         (target_thread_address_space): Delete.
6644         * thread.c (init_thread_list): Use ALL_THREADS_SAFE.  Use thread
6645         pointers directly.
6646         (delete_thread_1, delete_thread, delete_thread_silent): Take a
6647         thread pointer instead of a ptid_t.  Adjust all callers.
6648         (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
6649         (first_thread_of_process): Delete, replaced by ...
6650         (first_thread_of_inferior): ... this new function.  All callers
6651         adjusted.
6652         (any_thread_of_process): Rename to ...
6653         (any_thread_of_inferior): ... this, and take an inferior pointer.
6654         (any_live_thread_of_process): Rename to ...
6655         (any_live_thread_of_inferior): ... this, and take an inferior
6656         pointer.
6657         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
6658         (value_in_thread_stack_temporaries)
6659         (get_last_thread_stack_temporary): Take a thread pointer instead
6660         of a ptid_t.  Adjust all callers.
6661         (thread_info::set_running): New.
6662         (validate_registers_access): Use inferior_thread.
6663         (can_access_registers_ptid): Rename to ...
6664         (can_access_registers_thread): ... this, and take a thread
6665         pointer.
6666         (print_thread_info_1): Adjust to compare thread pointers instead
6667         of ptids.
6668         (switch_to_no_thread, switch_to_thread): Make extern.
6669         (scoped_restore_current_thread::~scoped_restore_current_thread):
6670         Use m_thread pointer directly.
6671         (scoped_restore_current_thread::scoped_restore_current_thread):
6672         Use inferior_thread.
6673         (thread_command): Use thread pointer directly.
6674         (thread_num_make_value_helper): Use inferior_thread.
6675         * top.c (execute_command): Use inferior_thread.
6676         * tui/tui-interp.c: Include "inferior.h".
6677         * varobj.c (varobj_create): Use inferior_thread.
6678         (value_of_root_1): Use find_thread_global_id instead of
6679         global_thread_id_to_ptid.
6680
6681 2018-06-21  Alan Hayward  <alan.hayward@arm.com>
6682
6683         * regcache.c (readable_regcache::read_part): Avoid memcpy when
6684         possible.
6685         (regcache::write_part): Likewise.
6686         (readable_regcache::cooked_read_part): Update comment.
6687         (readable_regcache::cooked_write_part): Likewise.
6688         * regcache.h: (readable_regcache::read_part): Likewise.
6689         (regcache::write_part): Likewise.
6690
6691 2018-06-21  Richard Bunt  <richard.bunt@arm.com>
6692             Dirk Schubert  <dirk.schubert@arm.com>
6693
6694         * aarch64-linux-nat.c (post_attach): New.
6695         (aarch64_linux_nat_target::post_attach): Override post_attach to
6696         record the number of hardware debug registers.
6697
6698 2018-06-20  Tom Tromey  <tom@tromey.com>
6699
6700         * python/py-param.c (add_setshow_generic): Make parameters const.
6701         (parmpy_init): Update.
6702
6703 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
6704
6705         * regcache.h (regcache_cooked_read_ftype): Rename to...
6706         (register_read_ftype): ...this, change type to function_view.
6707         (class reg_buffer) <save>: Remove src parameter.
6708         (readonly_detached_regcache) <readonly_detached_regcache>: Make
6709         parameter non-const in first overload.  Remove src parameter in
6710         second overload.
6711         * regcache.c (do_cooked_read): Remove.
6712         (readonly_detached_regcache::readonly_detached_regcache): Make
6713         parameter non-const, adjust call to other constructor.
6714         (reg_buffer::save): Remove src parameter.
6715         * frame.c (do_frame_register_read): Remove.
6716         (frame_save_as_regcache): Use lambda function.
6717         * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
6718         parameter to ppu2spu_data *.
6719         (ppu2spu_sniffer): Use lambda function.
6720
6721 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
6722
6723         * record-full.c (record_full_target::insert_breakpoint): Remove
6724         "struct" keyword, add const.
6725
6726 2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>
6727
6728         * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
6729         PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
6730         * configure.ac: Remove AC_PREREQ, add missing quoting.
6731         * gnulib/configure.ac: Modernize usage of
6732         AC_INIT/AM_INIT_AUTOMAKE.  Remove AC_PREREQ.
6733         * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
6734         (AUTOMAKE_VERSION): Bump to 1.15.1.
6735         * configure: Re-generate.
6736         * config.in: Re-generate.
6737         * aclocal.m4: Re-generate.
6738         * gnulib/aclocal.m4: Re-generate.
6739         * gnulib/config.in: Re-generate.
6740         * gnulib/configure: Re-generate.
6741         * gnulib/import/Makefile.in: Re-generate.
6742
6743 2018-06-19  Pedro Alves  <palves@redhat.com>
6744
6745         * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
6746         (lookup_minimal_symbol_by_pc_section): ... here with
6747         gdb_assert_not_reached added.
6748
6749 2018-06-19  Pedro Alves  <palves@redhat.com>
6750
6751         * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
6752         parameter with a block parameter.  Compare location's block symbol
6753         with the frame's block instead of addresses.
6754         (skip_inline_frames): Pass the current block instead of the
6755         frame's address.  Break out as soon as we determine the frame
6756         should not be skipped.
6757
6758 2018-06-18  Tom Tromey  <tom@tromey.com>
6759
6760         * solib-aix.c (solib_aix_get_section_offsets): Return
6761         unique_xmalloc_ptr.
6762         (solib_aix_solib_create_inferior_hook): Update.
6763
6764 2018-06-18  Tom Tromey  <tom@tromey.com>
6765
6766         * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
6767
6768 2018-06-18  Tom Tromey  <tom@tromey.com>
6769
6770         * solib-frv.c (frv_relocate_main_executable): Use
6771         unique_xmalloc_ptr.
6772         * solib-dsbt.c (dsbt_relocate_main_executable): Use
6773         unique_xmalloc_ptr.
6774
6775 2018-06-18  Tom Tromey  <tom@tromey.com>
6776
6777         * objfiles.h (inhibit_section_map_updates): Update.
6778         (resume_section_map_updates, resume_section_map_updates_cleanup):
6779         Remove.
6780         * solib-svr4.c (svr4_handle_solib_event): Update.
6781         * objfiles.c (inhibit_section_map_updates): Return
6782         scoped_restore_tmpl<int>.
6783         (resume_section_map_updates, resume_section_map_updates_cleanup):
6784         Remove.
6785
6786 2018-06-18  Tom Tromey  <tom@tromey.com>
6787
6788         * valprint.h (read_string): Update.
6789         * valprint.c (read_string): Change type of "buffer".
6790         (val_print_string): Update.
6791         * python/py-value.c (valpy_string): Update.
6792         * language.h (struct language_defn) <la_get_string>: Change
6793         type of "buffer".
6794         (default_get_string, c_get_string): Update.
6795         * language.c (default_get_string): Change type of "buffer".
6796         * guile/scm-value.c (gdbscm_value_to_string): Update.
6797         * c-lang.c (c_get_string): Change type of "buffer".
6798
6799 2018-06-18  Tom Tromey  <tom@tromey.com>
6800
6801         * ser-mingw.c (struct pipe_state_destroyer): New.
6802         (pipe_state_up): New typedef.
6803         (cleanup_pipe_state): Remove.
6804         (pipe_windows_open): Use pipe_state_up.  Don't release argv.
6805
6806 2018-06-18  Tom Tromey  <tom@tromey.com>
6807
6808         * rust-lang.h (rust_yyerror): Don't declare.
6809         * rust-lang.c (rust_language_defn): Update.
6810         * rust-exp.y (yyerror): Now static.
6811         * parse.c (parse_exp_in_context_1): Update.
6812         * p-lang.h (p_yyerror): Don't declare.
6813         * p-lang.c (p_language_defn): Update.
6814         * p-exp.y (yyerror): Now static.
6815         * opencl-lang.c (opencl_language_defn): Update.
6816         * objc-lang.c (objc_language_defn): Update.
6817         * m2-lang.h (m2_yyerror): Don't declare.
6818         * m2-lang.c (m2_language_defn): Update.
6819         * m2-exp.y (yyerror): Now static.
6820         * language.h (struct language_defn) <la_error>: Remove.
6821         * language.c (unk_lang_error): Remove.
6822         (unknown_language_defn, auto_language_defn): Remove.
6823         * go-lang.h (go_yyerror): Don't declare.
6824         * go-lang.c (go_language_defn): Update.
6825         * go-exp.y (yyerror): Now static.
6826         * f-lang.h (f_yyerror): Don't declare.
6827         * f-lang.c (f_language_defn): Update.
6828         * f-exp.y (yyerror): Now static.
6829         * d-lang.h (d_yyerror): Don't declare.
6830         * d-lang.c (d_language_defn): Update.
6831         * d-exp.y (yyerror): Now static.
6832         * c-lang.h (c_yyerror): Don't declare.
6833         * c-lang.c (c_language_defn, cplus_language_defn)
6834         (asm_language_defn, minimal_language_defn): Update.
6835         * c-exp.y (yyerror): Now static.
6836         * ada-lang.h (ada_yyerror): Don't declare.
6837         * ada-lang.c (ada_language_defn): Update.
6838         * ada-exp.y (yyerror): Now static.
6839
6840 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
6841
6842         * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
6843         (store_sveregs_to_thread): Likewise.
6844         (aarch64_linux_fetch_inferior_registers): Check for SVE.
6845         (aarch64_linux_store_inferior_registers): Likewise.
6846         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
6847         function.
6848         (aarch64_sve_regs_copy_to_regcache): Likewise.
6849         (aarch64_sve_regs_copy_from_regcache): Likewise.
6850         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
6851         declaration.
6852         (aarch64_sve_regs_copy_to_regcache): Likewise.
6853         (aarch64_sve_regs_copy_from_regcache): Likewise.
6854         (sve_context): Structure from Linux headers.
6855         (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
6856         (SVE_SIG_ZREG_SIZE): Likewise.
6857         (SVE_SIG_PREG_SIZE): Likewise.
6858         (SVE_SIG_FFR_SIZE): Likewise.
6859         (SVE_SIG_REGS_OFFSET): Likewise.
6860         (SVE_SIG_ZREGS_OFFSET): Likewise.
6861         (SVE_SIG_ZREG_OFFSET): Likewise.
6862         (SVE_SIG_ZREGS_SIZE): Likewise.
6863         (SVE_SIG_PREGS_OFFSET): Likewise.
6864         (SVE_SIG_PREG_OFFSET): Likewise.
6865         (SVE_SIG_PREGS_SIZE): Likewise.
6866         (SVE_SIG_FFR_OFFSET): Likewise.
6867         (SVE_SIG_REGS_SIZE): Likewise.
6868         (SVE_SIG_CONTEXT_SIZE): Likewise.
6869         (SVE_PT_REGS_MASK): Likewise.
6870         (SVE_PT_REGS_FPSIMD): Likewise.
6871         (SVE_PT_REGS_SVE): Likewise.
6872         (SVE_PT_VL_INHERIT): Likewise.
6873         (SVE_PT_VL_ONEXEC): Likewise.
6874         (SVE_PT_REGS_OFFSET): Likewise.
6875         (SVE_PT_FPSIMD_OFFSET): Likewise.
6876         (SVE_PT_FPSIMD_SIZE): Likewise.
6877         (SVE_PT_SVE_ZREG_SIZE): Likewise.
6878         (SVE_PT_SVE_PREG_SIZE): Likewise.
6879         (SVE_PT_SVE_FFR_SIZE): Likewise.
6880         (SVE_PT_SVE_FPSR_SIZE): Likewise.
6881         (SVE_PT_SVE_FPCR_SIZE): Likewise.
6882         (__SVE_SIG_TO_PT): Likewise.
6883         (SVE_PT_SVE_OFFSET): Likewise.
6884         (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
6885         (SVE_PT_SVE_ZREG_OFFSET): Likewise.
6886         (SVE_PT_SVE_ZREGS_SIZE): Likewise.
6887         (SVE_PT_SVE_PREGS_OFFSET): Likewise.
6888         (SVE_PT_SVE_PREG_OFFSET): Likewise.
6889         (SVE_PT_SVE_PREGS_SIZE): Likewise.
6890         (SVE_PT_SVE_FFR_OFFSET): Likewise.
6891         (SVE_PT_SVE_FPSR_OFFSET): Likewise.
6892         (SVE_PT_SVE_FPCR_OFFSET): Likewise.
6893         (SVE_PT_SVE_SIZE): Likewise.
6894         (SVE_PT_SIZE): Likewise.
6895         (HAS_SVE_STATE): New define.
6896
6897 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
6898
6899         * nat/aarch64-sve-linux-sigcontext.h: New file.
6900         * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
6901         new files.
6902         (SVE_VQ_MIN): Likewise.
6903         (SVE_VQ_MAX): Likewise.
6904         (SVE_VL_MIN): Likewise.
6905         (SVE_VL_MAX): Likewise.
6906         (SVE_NUM_ZREGS): Likewise.
6907         (SVE_NUM_PREGS): Likewise.
6908         (sve_vl_valid): Likewise.
6909         (struct user_sve_header): Likewise.
6910
6911 2018-06-16  Andrew Burgess  <andrew.burgess@embecosm.com>
6912             Richard Bunt <Richard.Bunt@arm.com>
6913
6914         * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
6915         was requested by GDB.
6916
6917 2018-06-15  Tom de Vries  <tdevries@suse.de>
6918
6919         * MAINTAINERS (Write After Approval): Add Tom de Vries.
6920
6921 2018-06-14  Simon Marchi  <simon.marchi@polymtl.ca>
6922
6923         * gnulib/update-gnulib.sh: Print expected versions of
6924         autoconf/aclocal.
6925
6926 2018-06-14  Simon Marchi  <simon.marchi@ericsson.com>
6927
6928         * arch-utils.c (default_type_align): Use type_length_units.
6929         * gdbtypes.c (type_align): Use type_length_units.
6930
6931 2018-06-14  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6932
6933         * cli/cli-script.c (_initialize_cli_script): Fix online documentation
6934         of 'define' command.
6935
6936 2018-06-14  Tom de Vries  <tdevries@suse.de>
6937
6938         PR cli/22573
6939         * infcmd.c (print_return_value_1): Use get_user_print_options instead of
6940         get_no_prettyformat_print_options.
6941
6942 2018-06-13  Simon Marchi  <simon.marchi@ericsson.com>
6943
6944         * sparc-nat.h: Include target.h.
6945         * sparc64-linux-nat.c (class sparc64_linux_nat_target)
6946         <fetch_registers>: Remove this argument in function call.
6947         <store_registers>: Remove this argument in function call, remove
6948         extra semicolon.
6949         <low_forget_process>: Call sparc64_forget_process instead of
6950         sparc_forget_process.
6951
6952 2018-06-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
6953
6954         * procfs.c (_initialize_procfs): Use add_inf_child_target.
6955         (procfs_target::make_corefile_notes): Adjust to new
6956         target_read_alloc return type.
6957
6958 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
6959             Stephen Roberts  <stephen.roberts@arm.com>
6960
6961         PR gdb/22882
6962         * infrun.c (fetch_inferior_event): If GDB is not proceeding then
6963         run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
6964         Move should_notify_stop local into more inner scope.
6965
6966 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
6967             Stephen Roberts  <stephen.roberts@arm.com>
6968
6969         PR gdb/22882
6970         * infrun.c (resume_1): Add call to mark_async_event_handler.
6971
6972 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
6973
6974         * infrun.c (do_target_wait): Change old version of $pc printed.
6975
6976 2018-06-11  Simon Marchi  <simon.marchi@ericsson.com>
6977
6978         * dwarf2read.c (read_index_from_section): Rename to...
6979         (read_gdb_index_from_section): ... this, update all callers.
6980         (dwarf2_read_index): Rename to...
6981         (dwarf2_read_gdb_index): ... this, update all callers.
6982
6983 2018-06-11  John David Anglin  <danglin@gcc.gnu.org>
6984
6985         * gdb/hppa-linux-nat.c
6986         (hppa_linux_nat_target::fetch_inferior_registers): Rename to
6987         hppa_linux_nat_target::fetch_registers.
6988
6989 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
6990
6991         * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
6992         * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
6993         (AARCH64_DWARF_SVE_FFR): Likewise.
6994         (AARCH64_DWARF_SVE_P0): Likewise.
6995         (AARCH64_DWARF_SVE_Z0): Likewise.
6996
6997 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
6998
6999         * common/common-regcache.h (raw_compare): New function.
7000         * regcache.c (regcache::raw_compare): Likewise.
7001         * regcache.h (regcache::raw_compare): New declaration.
7002
7003 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
7004
7005         * common/common-regcache.h (reg_buffer_common): New structure.
7006         * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
7007         (reg_buffer::raw_supply): Likewise.
7008         (reg_buffer::raw_supply_integer): Likewise.
7009         (reg_buffer::raw_supply_zeroed): Likewise.
7010         (reg_buffer::raw_collect): Likewise.
7011         (reg_buffer::raw_collect_integer): Likewise.
7012         * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
7013         (reg_buffer::raw_supply): Likewise.
7014         (reg_buffer::raw_supply_integer): Likewise.
7015         (reg_buffer::raw_supply_zeroed): Likewise.
7016         (reg_buffer::raw_collect): Likewise.
7017         (reg_buffer::raw_collect_integer): Likewise.
7018
7019 2018-06-10  Tom Tromey  <tom@tromey.com>
7020
7021         * remote.c (stop_reply_p): Remove typedef.  Don't declare queue.
7022         (class remote_state) <stop_reply_queue>: Now std::vector.
7023         (remote_state::~remote_state)
7024         (remote_target::stop_reply_queue_length): Update.
7025         (struct queue_iter_param, remove_child_of_pending_fork)
7026         (struct check_pending_event_prevents_wildcard_vcont_callback_data)
7027         (check_pending_event_prevents_wildcard_vcont_callback)
7028         (remove_stop_reply_for_inferior)
7029         (remove_stop_reply_of_remote_state)
7030         (remote_notif_remove_once_on_match)
7031         (stop_reply_match_ptid_and_ws)
7032         (remote_kill_child_of_pending_fork): Remove.
7033         (remote_target::remove_new_fork_children)
7034         (remote_target::check_pending_events_prevent_wildcard_vcont)
7035         (remote_target::discard_pending_stop_replies)
7036         (remote_target::discard_pending_stop_replies_in_queue)
7037         (remote_target::remote_notif_remove_queued_reply)
7038         (remote_target::queued_stop_reply)
7039         (remote_target::push_stop_reply, remote_target::peek_stop_reply)
7040         (remote_target::wait, remote_target::kill_new_fork_children)
7041         (remote_target::async): Update.
7042
7043 2018-06-10  Tom Tromey  <tom@tromey.com>
7044
7045         * record-full.c (record_full_arch_list_cleanups): Remove.
7046         (record_full_message): Use try/catch.
7047         (record_full_wait_cleanups): Remove.
7048         (record_full_wait_1): Use try/catch.
7049         (record_full_restore): Likewise.
7050
7051 2018-06-10  Tom Tromey  <tom@tromey.com>
7052
7053         * record-full.c (record_full_breakpoint_p): Remove typedef.  Don't
7054         declare VEC.  Add constructor.
7055         <in_target_beneath>: Now bool.
7056         (record_full_breakpoints): Now a std::vector, static.
7057         (record_full_sync_record_breakpoints)
7058         (record_full_init_record_breakpoints)
7059         (record_full_target::insert_breakpoint)
7060         (record_full_target::remove_breakpoint): Update.  Don't use XNEW.
7061
7062 2018-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
7063
7064         * dwarf2read.c (process_cu_includes): Remove struct keyword.
7065         * serial.c (serial_interface_lookup): Remove struct keyword.
7066
7067 2018-06-10  Tom Tromey  <tom@tromey.com>
7068
7069         * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
7070         method.
7071         * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
7072         a method.
7073         * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
7074         method.
7075         * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
7076         "beneath" as a method.
7077         * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
7078         Use "beneath" as a method.
7079
7080 2018-06-10  Tom Tromey  <tom@tromey.com>
7081
7082         * tracefile.c (struct trace_file_writer_deleter): New.
7083         <operator()>: Rename from trace_file_writer_xfree.
7084         (trace_file_writer_up): New typedef.
7085         (tsave_command, trace_save_tfile, trace_save_ctf): Update.
7086
7087 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
7088
7089         * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
7090         <m_registers, m_register_status>: Change type to
7091         std::unique_ptr.
7092         * regcache.c (reg_buffer::reg_buffer): Use new instead of
7093         XCNEWVEC.
7094
7095 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
7096
7097         * common/common-regcache.h (enum register_status): Add
7098         underlying type "signed char".
7099         * regcache.h (reg_buffer) <m_register_status>: Change type to
7100         register_status *.
7101         * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
7102         register_status instead of signed char.
7103         (reg_buffer::save): Use REG_UNKNOWN instead of 0.
7104         (reg_buffer::get_register_status): Remove cast.
7105         (readable_regcache::raw_read): Remove cast.
7106         (readable_regcache::cooked_read): Remove cast.
7107
7108 2018-06-09  Tom Tromey  <tom@tromey.com>
7109
7110         * source.c (reverse_search_command, forward_search_command): Use
7111         scoped_fd.
7112
7113 2018-06-09  Tom Tromey  <tom@tromey.com>
7114
7115         * serial.c (serial_ops_p): Remove typedef.  Don't declare VEC.
7116         (serial_ops_list): Now static, std::vector.
7117         (serial_interface_lookup, serial_add_interface): Update.
7118
7119 2018-06-09  Tom Tromey  <tom@tromey.com>
7120
7121         * dwarf2read.c (process_cu_includes): Update.
7122         (process_full_comp_unit): Update.
7123         * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
7124         std::vector.
7125
7126 2018-06-08  Paul Koning  <paul_koning@dell.com>
7127
7128         PR gdb/23252
7129
7130         * python/python.c (do_start_initialization):
7131         Avoid call to internal Python API.
7132         (init__gdb_module): New function.
7133
7134 2018-06-08  Gary Benson <gbenson@redhat.com>
7135
7136         * linux-thread-db.c (valprint.h): New include.
7137         (struct check_thread_db_info): New structure.
7138         (check_thread_db_on_load, tdb_testinfo): New static globals.
7139         (check_thread_db, check_thread_db_callback): New functions.
7140         (try_thread_db_load_1): Run integrity checks if requested.
7141         (maintenance_check_libthread_db): New function.
7142         (_initialize_thread_db): Register "maint check libthread-db"
7143         and "maint set/show check-libthread-db".
7144         * NEWS: Mention the above new commands.
7145
7146 2018-06-08  Tom Tromey  <tom@tromey.com>
7147
7148         * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
7149         now a method.
7150
7151 2018-06-08  Tom Tromey  <tom@tromey.com>
7152
7153         * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
7154
7155 2018-06-08  Tom Tromey  <tom@tromey.com>
7156
7157         * common/btrace-common.h (struct btrace_data): Add constructor,
7158         destructor, move assignment operator.
7159         <empty, clear, fini>: New methods.
7160         <format>: Initialize.
7161         (btrace_data_init, btrace_data_fini, btrace_data_clear)
7162         (btrace_data_empty): Don't declare.
7163         * common/btrace-common.c (btrace_data_init): Remove.
7164         (btrace_data::fini): Rename from btrace_data_fini.
7165         (btrace_data::empty): Rename from btrace_data_empty.
7166         (btrace_data::clear): Rename from btrace_data_clear.  Return
7167         bool.
7168         * btrace.h (make_cleanup_btrace_data): Don't declare.
7169         * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
7170         (parse_xml_btrace): Update.
7171         (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
7172         (maint_btrace_clear_packet_history_cmd): Update.
7173
7174 2018-06-07  Pedro Alves  <palves@redhat.com>
7175
7176         * target.h (target_ops) <beneath>: Now a method.  All references
7177         updated.
7178         (class target_stack): New.
7179         * target.c (g_target_stack): New.
7180         (g_current_top_target): Delete.
7181         (current_top_target): Get the top target out of g_target_stack.
7182         (target_stack::push, target_stack::unpush): New.
7183         (push_target, unpush_target): Reimplement.
7184         (target_is_pushed): Reimplement in terms of g_target_stack.
7185         (target_ops::beneath, target_stack::find_beneath): New.
7186
7187 2018-06-07  Pedro Alves  <palves@redhat.com>
7188
7189         * target.h (find_target_beneath): Delete declaration.
7190         * target.c (find_target_beneath): Delete definition.
7191         * aix-thread.c: All callers of find_target_beneath adjusted to
7192         call target_ops::beneath instead.
7193         * bsd-uthread.c: Likewise.
7194         * linux-thread-db.c: Likewise.
7195         * ravenscar-thread.c: Likewise.
7196         * sol-thread.c: Likewise.
7197         * spu-multiarch.c: Likewise.
7198
7199 2018-06-07  Pedro Alves  <palves@redhat.com>
7200
7201         * target.h (target_ops) <beneath>: Now a method.  All references
7202         updated.
7203         (target_ops) <m_beneath>: New.
7204         * target.c (target_ops::beneath): New.
7205         * corelow.c: Adjust all references to target_ops::beneath.
7206         * linux-thread-db.c: Likewise.
7207         * make-target-delegates: Likewise.
7208         * record-btrace.c: Likewise.
7209         * record-full.c: Likewise.
7210         * remote.c: Likewise.
7211         * target.c: Likewise.
7212         * target-delegates.c: Regenerate.
7213
7214 2018-06-07  Pedro Alves  <palves@redhat.com>
7215
7216         * target.h (target_stack): Delete.
7217         (current_top_target): Declare function.
7218         * target.c (target_stack): Delete.
7219         (g_current_top_target): New.
7220         (current_top_target): New function.
7221         * auxv.c: Use current_top_target instead of target_stack
7222         throughout.
7223         * avr-tdep.c: Likewise.
7224         * breakpoint.c: Likewise.
7225         * corefile.c: Likewise.
7226         * elfread.c: Likewise.
7227         * eval.c: Likewise.
7228         * exceptions.c: Likewise.
7229         * frame.c: Likewise.
7230         * gdbarch-selftests.c: Likewise.
7231         * gnu-v3-abi.c: Likewise.
7232         * ia64-tdep.c: Likewise.
7233         * ia64-vms-tdep.c: Likewise.
7234         * infcall.c: Likewise.
7235         * infcmd.c: Likewise.
7236         * infrun.c: Likewise.
7237         * linespec.c: Likewise.
7238         * linux-tdep.c: Likewise.
7239         * minsyms.c: Likewise.
7240         * ppc-linux-nat.c: Likewise.
7241         * ppc-linux-tdep.c: Likewise.
7242         * procfs.c: Likewise.
7243         * regcache.c: Likewise.
7244         * remote.c: Likewise.
7245         * rs6000-tdep.c: Likewise.
7246         * s390-linux-nat.c: Likewise.
7247         * s390-tdep.c: Likewise.
7248         * solib-aix.c: Likewise.
7249         * solib-darwin.c: Likewise.
7250         * solib-dsbt.c: Likewise.
7251         * solib-spu.c: Likewise.
7252         * solib-svr4.c: Likewise.
7253         * solib-target.c: Likewise.
7254         * sparc-tdep.c: Likewise.
7255         * sparc64-tdep.c: Likewise.
7256         * spu-tdep.c: Likewise.
7257         * symfile.c: Likewise.
7258         * symtab.c: Likewise.
7259         * target-descriptions.c: Likewise.
7260         * target-memory.c: Likewise.
7261         * target.c: Likewise.
7262         * target.h: Likewise.
7263         * tracefile-tfile.c: Likewise.
7264         * tracepoint.c: Likewise.
7265         * valops.c: Likewise.
7266         * valprint.c: Likewise.
7267         * value.c: Likewise.
7268         * windows-tdep.c: Likewise.
7269         * mi/mi-main.c: Likewise.
7270
7271 2018-06-07  Tom Tromey  <tom@tromey.com>
7272
7273         * valprint.h (build_address_symbolic): Declare.
7274         * printcmd.c (print_address_symbolic): Update.
7275         (build_address_symbolic): Change "name" and "filename" to
7276         std::string.
7277         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
7278         Update.
7279         * defs.h (build_address_symbolic): Remove declaration.
7280
7281 2018-06-07  Alan Hayward  <alan.hayward@arm.com>
7282
7283         * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
7284         (aarch64_vnv_type): Add function.
7285         (aarch64_pseudo_register_name): Add V regs for SVE.
7286         (aarch64_pseudo_register_type): Likewise.
7287         (aarch64_pseudo_register_reggroup_p): Likewise.
7288         (aarch64_pseudo_read_value_2): Use V0 offset for SVE
7289         (aarch64_pseudo_read_value): Add V regs for SVE.
7290         (aarch64_pseudo_write_2): Use V0 offset for SVE
7291         (aarch64_pseudo_write): Add V regs for SVE.
7292         * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
7293
7294 2018-06-06  Sergio Durigan Junior  <sergiodj@redhat.com>
7295
7296         * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
7297         (sve_vl_from_vq): Likewise.
7298
7299 2018-06-05  Tom Tromey  <tom@tromey.com>
7300
7301         * cli/cli-cmds.c (show_version): Update.
7302         * top.c (print_gdb_version): Add "interactive" parameter.
7303         Update.
7304         * main.c (captured_main_1): Update.
7305         * top.h (print_gdb_version): Add "interactive" parameter and a
7306         comment.
7307
7308 2018-06-05  David Malcolm  <dmalcolm@redhat.com>
7309
7310         * common/enum-flags.h: Add trailing semicolon to example in
7311         comment.
7312
7313 2018-06-05  Tom Tromey  <tom@tromey.com>
7314
7315         PR cli/12326:
7316         * NEWS: Add entry about pager.
7317         * utils.c (pagination_disabled_for_command): New global.
7318         (prompt_for_continue): Allow "c" response to prompt.
7319         (reinitialize_more_filter): Clear
7320         pagination_disabled_for_command.
7321         (fputs_maybe_filtered): Check pagination_disabled_for_command.
7322
7323 2018-06-04  Tom Tromey  <tom@tromey.com>
7324
7325         * ada-lang.h (ada_lookup_symbol_list): Update.
7326         * ada-lang.c (resolve_subexp): Update.
7327         (symbols_are_identical_enums): Change type of syms.  Remove nsyms
7328         parameter.
7329         (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
7330         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
7331         results parameter to std::vector.
7332         (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
7333         Update.
7334         * ada-exp.y (block_lookup): Update.
7335         (select_possible_type_sym): Change type of syms.  Remove nsyms
7336         parameter.
7337         (write_var_or_type, write_name_assoc): Update.
7338
7339 2018-06-04  Joel Brobecker  <brobecker@adacore.com>
7340
7341         * windows-nat.c (windows_nat_target::xfer_partial): Return
7342         TARGET_XFER_E_IO if we need to delegate to the target beneath
7343         but BENEATH is NULL.
7344
7345 2018-06-04  Simon Marchi  <simon.marchi@ericsson.com>
7346
7347         * Makefile.in (config.status): Add configure.nat as a
7348         dependency.
7349
7350 2018-06-04  Tom Tromey  <tom@tromey.com>
7351
7352         * cp-name-parser.y (cpname_state): Add method declarations.
7353         (HANDLE_QUAL): Update.
7354         (cpname_state::d_grab, cpname_state::fill_comp)
7355         (cpname_state::make_operator, cpname_state::make_dtor)
7356         (cpname_state::make_builtin_type, cpname_state::make_name)
7357         (cpname_state::d_qualify, cpname_state::d_int_type)
7358         (cpname_state::d_unary, cpname_state::d_binary): Now methods.
7359         (%union): Move earlier.
7360
7361 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
7362
7363         * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
7364
7365 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
7366
7367         * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
7368         (aarch64_pseudo_write_1): Likewise.
7369         (aarch64_pseudo_read_value): Use helper.
7370         (aarch64_pseudo_write): Likewise.
7371
7372 2018-06-04  Pedro Alves  <palves@redhat.com>
7373
7374         * darwin-nat.c (darwin_ops): Delete.
7375         (darwin_attach_pid): Use get_native_target.
7376
7377 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
7378
7379         * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
7380         * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
7381
7382 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
7383
7384         * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
7385         * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
7386         (aarch64_gdbarch_init): Check for SVE.
7387         * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
7388
7389 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
7390
7391         * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
7392         * aarch64-tdep.h (aarch64_read_description): Likewise.
7393         * arch/aarch64.c (aarch64_create_target_description): Likewise.
7394         * arch/aarch64.h (aarch64_create_target_description): Likewise.
7395         * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
7396         * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
7397         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
7398
7399 2018-06-02  Simon Marchi  <simon.marchi@ericsson.com>
7400
7401         * value.c (value_fetch_lazy_bitfield): New.
7402         (value_fetch_lazy_memory): New.
7403         (value_fetch_lazy_register): New.
7404         (value_fetch_lazy): Factor out to smaller functions.
7405
7406 2018-06-01  Tom Tromey  <tom@tromey.com>
7407
7408         * cp-name-parser.y (backslashable, represented): Now const.
7409
7410 2018-06-01  Tom Tromey  <tom@tromey.com>
7411
7412         * cp-name-parser.y: Include parser-defs.h.
7413         (parser_fprintf): Remove declaration.
7414
7415 2018-06-01  Tom Tromey  <tom@tromey.com>
7416
7417         * cp-name-parser.y: Use %pure-parser, %lex-param, and
7418         %parse-param.
7419         (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
7420         (global_result): Remove globals.
7421         (struct cpname_state): New.
7422         (yyparse): Don't declare.
7423         (yylex, yyerror): Move declarations after %union.
7424         (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
7425         (make_name): Add state parameter.
7426         Update all callers.
7427         (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
7428         parameter.
7429         (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
7430         Update.
7431         (yylex): Add lvalp, state parameters.
7432         (yyerror): Add state parameter.
7433         (cp_demangled_name_to_comp): Update.
7434
7435 2018-06-01  Tom Tromey  <tom@tromey.com>
7436
7437         * cp-name-parser.y (parser_fprintf): Declare.
7438         (GDB_YY_REMAP_PREFIX): Define.
7439         Include yy-remap.h.  Don't redefine yy* identifiers.
7440
7441 2018-06-01  Tom Tromey  <tom@tromey.com>
7442
7443         * python/py-type.c (typy_legacy_template_argument): Update.
7444         * cp-support.h (cp_demangled_name_to_comp): Update.
7445         * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
7446         parameter to be a "std::string *".
7447         (main): Update.
7448
7449 2018-06-01  H.J. Lu  <hongjiu.lu@intel.com>
7450
7451         * ada-lex.l: Include "diagnostics.h" instead of
7452         "common/diagnostics.h".
7453         * unittests/environ-selftests.c: Likewise.
7454         * common/diagnostics.h: Moved to ../include.
7455
7456 2018-06-01  Joel Brobecker  <brobecker@adacore.com>
7457
7458         * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
7459         to language_mode_manual while calling breakpoint_re_set_one.
7460
7461 2018-06-01  Tom Tromey  <tom@tromey.com>
7462
7463         * valops.c (value_cast_structs, destructor_name_p): Update.
7464         * symtab.c (gdb_mangle_name): Update.
7465         * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
7466         Update.
7467         * p-valprint.c (pascal_object_is_vtbl_ptr_type)
7468         (pascal_object_print_value_fields, pascal_object_print_value):
7469         Update.
7470         * p-typeprint.c (pascal_type_print_derivation_info): Update.
7471         * linespec.c (find_methods): Update.
7472         * gdbtypes.h (type_name_no_tag): Remove.
7473         (type_name_or_error): Rename from type_name_no_tag_or_error.
7474         * gdbtypes.c (type_name_no_tag): Remove.
7475         (type_name_or_error): Rename from type_name_no_tag_or_error.
7476         (lookup_struct_elt_type, check_typedef): Update.
7477         * expprint.c (print_subexp_standard): Update.
7478         * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
7479         * d-namespace.c (d_lookup_nested_symbol): Update.
7480         * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
7481         (cp_print_class_member): Update.
7482         * cp-namespace.c (cp_lookup_nested_symbol): Update.
7483         * completer.c (add_struct_fields): Update.
7484         * c-typeprint.c (cp_type_print_derivation_info)
7485         (c_type_print_varspec_prefix, c_type_print_base_struct_union):
7486         Update.
7487         * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
7488         (ada_prefer_type, ada_is_exception_sym): Update.
7489
7490 2018-06-01  Tom Tromey  <tom@tromey.com>
7491
7492         * valops.c (enum_constant_from_type, value_namespace_elt)
7493         (value_maybe_namespace_elt): Update.
7494         * valarith.c (find_size_for_pointer_math): Update.
7495         * target-descriptions.c (make_gdb_type): Update.
7496         * symmisc.c (print_symbol): Update.
7497         * stabsread.c (define_symbol, read_type)
7498         (complain_about_struct_wipeout, add_undefined_type)
7499         (cleanup_undefined_types_1): Update.
7500         * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
7501         (rust_range_type_p, val_print_struct, rust_print_struct_def)
7502         (rust_internal_print_type, rust_composite_type)
7503         (rust_evaluate_funcall, rust_evaluate_subexp)
7504         (rust_inclusive_range_type_p): Update.
7505         * python/py-type.c (typy_get_tag): Update.
7506         * p-typeprint.c (pascal_type_print_base): Update.
7507         * mdebugread.c (parse_symbol, parse_type): Update.
7508         * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
7509         Update.
7510         * guile/scm-type.c (gdbscm_type_tag): Update.
7511         * go-lang.c (sixg_string_p): Update.
7512         * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
7513         Update.
7514         * gdbtypes.h (struct main_type) <tag_name>: Remove.
7515         (TYPE_TAG_NAME): Remove.
7516         * gdbtypes.c (type_name_no_tag): Simplify.
7517         (check_typedef, check_types_equal, recursive_dump_type)
7518         (copy_type_recursive, arch_composite_type): Update.
7519         * f-typeprint.c (f_type_print_base): Update.  Print "Type" prefix
7520         in summary mode when needed.
7521         * eval.c (evaluate_funcall): Update.
7522         * dwarf2read.c (fixup_go_packaging, read_structure_type)
7523         (process_structure_scope, read_enumeration_type)
7524         (read_namespace_type, read_module_type, determine_prefix): Update.
7525         * cp-support.c (inspect_type): Update.
7526         * coffread.c (process_coff_symbol, decode_base_type): Update.
7527         * c-varobj.c (c_is_path_expr_parent): Update.
7528         * c-typeprint.c (c_type_print_base_struct_union): Update.
7529         (c_type_print_base_1): Update.  Print struct/class/union/enum in
7530         summary when using C language.
7531         * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
7532         (gen_maybe_namespace_elt): Update.
7533         * ada-lang.c (ada_type_name): Simplify.
7534         (empty_record, ada_template_to_fixed_record_type_1)
7535         (template_to_static_fixed_type)
7536         (to_record_with_fixed_variant_part, ada_check_typedef): Update.
7537
7538 2018-06-01  Tom Tromey  <tom@tromey.com>
7539
7540         * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
7541         c_print_type.
7542         * c-typeprint.c (c_print_type_1): Add "language" parameter.
7543         (c_print_type): Update.
7544         (c_print_type): New overload.
7545         (c_type_print_varspec_prefix, c_type_print_args)
7546         (c_type_print_varspec_suffix, c_print_type_no_offsets)
7547         (c_type_print_base_struct_union, c_type_print_base_1)
7548         (cp_type_print_method_args): Add "language" parameter.
7549         (c_type_print_base): Update.
7550         * c-lang.h (c_print_type): Add new overload.
7551
7552 2018-06-01  Tom Tromey  <tom@tromey.com>
7553
7554         * typeprint.h (c_type_print_varspec_suffix): Don't declare.
7555         * c-typeprint.c (c_type_print_varspec_suffix): Now static.
7556
7557 2018-06-01  Alan Hayward  <alan.hayward@arm.com>
7558
7559         * aarch64-tdep.c (aarch64_sve_register_names): New const
7560         var.
7561         * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
7562         (AARCH64_SVE_Z_REGS_NUM): New define.
7563         (AARCH64_SVE_P_REGS_NUM): Likewise.
7564         (AARCH64_SVE_NUM_REGS): Likewise.
7565
7566 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
7567
7568         * nat/linux-ptrace.h [__alpha__]
7569         (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
7570         definitions.
7571
7572 2018-05-31  Maciej W. Rozycki  <macro@mips.com>
7573
7574         * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
7575         the endianness selected.
7576         * NEWS: Document `set endian auto' mode operation update.
7577
7578 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
7579
7580         * Makefile.in: Add new header.
7581         * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
7582         (sve_vl_from_vg): Likewise.
7583         (sve_vq_from_vl): Likewise.
7584         (sve_vl_from_vq): Likewise.
7585         (sve_vq_from_vg): Likewise.
7586         (sve_vg_from_vq): Likewise.
7587         * configure.nat: Add new c file.
7588         * nat/aarch64-sve-linux-ptrace.c: New file.
7589         * nat/aarch64-sve-linux-ptrace.h: New file.
7590
7591 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
7592
7593         * aarch64-linux-nat.c (aarch64_linux_read_description):
7594         Add parmeter zero.
7595         * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
7596         Likewise.
7597         * aarch64-tdep.c (tdesc_aarch64_list): Add.
7598         (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
7599         (aarch64_gdbarch_init): Add parmeter zero.
7600         * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
7601         * arch/aarch64.c (aarch64_create_target_description): Check VQ.
7602         * arch/aarch64.h (aarch64_create_target_description): Add VQ.
7603         parmeter.
7604         * doc/gdb.texinfo: Describe SVE feature
7605         * features/aarch64-sve.c: New file.
7606
7607 2018-05-31  Omair Javaid  <omair.javaid@linaro.org>
7608
7609         PR gdb/23210
7610         * gdbarch.sh (significant_addr_bit): Default to zero when
7611         not set by target architecture.
7612         * gdbarch.c: Re-generated.
7613         * utils.c (address_significant): Update.
7614
7615 2018-05-30  Joel Brobecker  <brobecker@adacore.com>
7616
7617         * stack.c (func_command): Remove trailing newline in call to error.
7618
7619 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7620
7621         * regcache.h (regcache_raw_collect): Remove, update callers to
7622         use regcache::raw_collect.
7623         * regcache.c (regcache_raw_collect): Remove.
7624
7625 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7626
7627         * regcache.h (regcache_raw_supply): Remove, update callers to
7628         use detached_regcache::raw_supply.
7629         * regcache.c (regcache_raw_supply): Remove.
7630
7631 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7632
7633         * regcache.h (regcache_cooked_write_part): Remove, update
7634         callers to use regcache::cooked_write_part.
7635         * regcache.c (regcache_cooked_write_part): Remove.
7636
7637 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7638
7639         * regcache.h (regcache_cooked_read_part): Remove, update callers
7640         to use readable_regcache::cooked_read_part.
7641         * regcache.c (regcache_cooked_read_part): Remove.
7642
7643 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7644
7645         * regcache.h (regcache_cooked_read_value): Remove, update
7646         callers to use readable_regcache::cooked_read_value.
7647         * regcache.c (regcache_cooked_read_value): Remove.
7648
7649 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7650
7651         * regcache.h (regcache_cooked_write): Remove, update callers to
7652         use regcache::cooked_write.
7653         * regcache.c (regcache_cooked_write): Remove.
7654
7655 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7656
7657         * regcache.h (regcache_invalidate): Remove, update callers to
7658         use detached_regcache::invalidate instead.
7659         * regcache.c (regcache_invalidate): Remove.
7660
7661 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7662
7663         * regcache.h (regcache_raw_write_part): Remove, update callers
7664         to use regcache::raw_write_part instead.
7665         * regcache.c (regcache_raw_write_part): Remove.
7666
7667 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7668
7669         * regcache.h (regcache_raw_read_part): Remove, update callers to
7670         use readable_regcache::raw_read_part instead.
7671         * regcache.c (regcache_raw_read_part): Remove.
7672
7673 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7674
7675         * regcache.h (regcache_cooked_read): Remove, update callers to
7676         use readable_regcache::cooked_read instead.
7677         * regcache.c (regcache_cooked_read): Remove.
7678
7679 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7680
7681         * regcache.h (regcache_raw_write): Remove, update callers to use
7682         regcache::raw_write instead.
7683         * regcache.c (regcache_raw_write): Remove.
7684
7685 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7686
7687         * regcache.h (regcache_raw_read): Remove, update callers to use
7688         readable_regcache::raw_read instead.
7689         * regcache.c (regcache_raw_read): Remove.
7690
7691 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7692
7693         * regcache.h (regcache_raw_update): Remove, update callers to
7694         use readable_regcache::raw_update instead.
7695         * regcache.c (regcache_raw_update): Remove.
7696
7697 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7698
7699         * regcache.h (regcache_register_status): Remove, update callers
7700         to use reg_buffer::get_register_status directly instead.
7701         * regcache.c (regcache_register_status): Remove.
7702
7703 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7704
7705         * regcache.h (regcache_get_ptid): Remove, update all callers to
7706         call regcache::ptid instead.
7707         * regcache.c (regcache_get_ptid): Remove.
7708
7709 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7710
7711         * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
7712
7713 2018-05-30  Pedro Alves  <palves@redhat.com>
7714
7715         * common/common-exceptions.h (exception_rethrow): Use
7716         ATTRIBUTE_NORETURN.
7717
7718 2018-05-29  Simon Marchi  <simon.marchi@polymtl.ca>
7719
7720         * breakpoint.c (print_solib_event, check_status_catch_solib):
7721         Remove struct keyword in range-based for loops.
7722         * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
7723         * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
7724         Likewise.
7725         * linespec.c (find_superclass_methods, search_minsyms_for_name):
7726         Likewise.
7727         * symfile.c (addr_info_make_relative): Likewise.
7728         * thread.c (value_in_thread_stack_temporaries): Likewise.
7729
7730 2018-06-12  Weimin Pan  <weimin.pan@oracle.com>
7731
7732         PR gdb/16841
7733         * valops.c (value_struct_elt_for_reference): Call check_typedef on
7734         aggregate type to get its real type before accessing it.
7735
7736 2018-05-29  Weimin Pan  <weimin.pan@oracle.com>
7737
7738         * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
7739         * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
7740         * coff-pe-read.c (add_pe_forwarded_sym): Replace
7741         lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
7742         * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
7743         * jit.c (jit_breakpoint_re_set_internal): Likewise.
7744         * printcmd.c (info_address_command): Likewise.
7745
7746 2018-05-29  Tom Tromey  <tom@tromey.com>
7747
7748         * windows-nat.c (handle_exception): Update fall-through comment.
7749
7750 2018-05-29  Tom Tromey  <tom@tromey.com>
7751
7752         * progspace.h (so_list_ptr): Remove typedef.  Don't declare VEC.
7753         (struct program_space) <added_solibs>: Now a std::vector.
7754         * breakpoint.c (print_solib_event): Update.
7755         (check_status_catch_solib): Update.
7756         * progspace.c (clear_program_space_solib_cache): Update.
7757         * solib.c (update_solib_list): Update.
7758
7759 2018-05-29  Tom Tromey  <tom@tromey.com>
7760
7761         * python/py-type.c (typy_richcompare): Update.
7762         * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
7763         * gdbtypes.h (types_deeply_equal): Return bool.
7764         (types_equal): Likewise.
7765         * gdbtypes.c (type_equality_entry_d): Remove typedef.  Don't
7766         declare VEC.
7767         (check_types_equal): Change worklist to std::vector.  Return
7768         bool.
7769         (struct type_equality_entry): Add constructor.
7770         (compare_maybe_null_strings): Return bool.
7771         (check_types_worklist): Return bool.  Change worklist to
7772         std::vector.
7773         (types_deeply_equal): Use std::vector.
7774         (types_equal): Return bool.
7775         (compare_maybe_null_strings): Simplify.
7776
7777 2018-05-29  Tom Tromey  <tom@tromey.com>
7778
7779         * record-btrace.c (tp_t): Remove typedef.  Don't declare VEC.
7780
7781 2018-05-29  Tom Tromey  <tom@tromey.com>
7782
7783         * objc-lang.h: Don't include cp-support.h.
7784         * common/gdb_vecs.h (const_char_ptr): Remove typedef.  Don't
7785         declare VEC.
7786
7787 2018-05-27  Tom Tromey  <tom@tromey.com>
7788
7789         * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
7790
7791 2018-05-25  Tom Tromey  <tom@tromey.com>
7792
7793         * value.c (value::location): Initialize.
7794
7795 2018-05-25  Tom Tromey  <tom@tromey.com>
7796
7797         * dbxread.c (init_bincl_list): Remove.
7798         (bincl_list): Now a std::vector.
7799         (bincls_allocated, next_bincl): Remove.
7800         (free_bincl_list, do_free_bincl_list_cleanup)
7801         (make_cleanup_free_bincl_list): Remove.
7802         (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
7803         unique_xmalloc_ptr.
7804         (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
7805         (struct header_file_location): Add constructor.
7806         (add_bincl_to_list): Remove.
7807
7808 2018-05-25  Tom Tromey  <tom@tromey.com>
7809
7810         * tui/tui.c (tui_enable): Update.
7811         * mi/mi-interp.c (mi_interp::init): Update.
7812         * interps.h (class interp) <name>: New method.
7813         <m_name>: Rename from name.
7814         (~scoped_restore_interp): Update.
7815         * interps.c (interp::interp): Update.
7816         (interp_add, interp_set, interp_lookup_existing)
7817         (current_interp_named_p): Update.
7818
7819 2018-05-25  Tom Tromey  <tom@tromey.com>
7820
7821         * interps.c (interp_name): Remove.
7822         * mi/mi-interp.c (mi_interp::init): Update.
7823         * interps.h (interp_name): Remove.
7824         (~scoped_restore_interp): Update.
7825         * tui/tui.c (tui_enable): Update.
7826
7827 2018-05-25  Tom Tromey  <tom@tromey.com>
7828
7829         * utils.c (fputs_maybe_filtered): Update.
7830         * linespec.c (decode_line_full): Update.
7831         * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
7832         (mi_print_breakpoint_for_event, mi_solib_loaded)
7833         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
7834         (mi_user_selected_context_changed): Update.
7835         * mi/mi-main.c (mi_execute_command): Update.
7836         * cli/cli-script.c (execute_control_command): Update.
7837         * python/python.c (execute_gdb_command): Update.
7838         * solib.c (info_sharedlibrary_command): Update.
7839         * interps.c (interp_ui_out): Remove.
7840         * interps.h (interp_ui_out): Remove.
7841
7842 2018-05-25  Tom Tromey  <tom@tromey.com>
7843
7844         * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
7845         * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
7846         * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
7847
7848 2018-05-25  Tom Tromey  <tom@tromey.com>
7849
7850         * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
7851         * interps.c (interp_exec): Use scoped_restore.
7852
7853 2018-05-25  Tom Tromey  <tom@tromey.com>
7854
7855         * remote.c (remote_target::remote_file_get): Use
7856         gdb::byte_vector.
7857         (remote_target::remote_file_put): Likewise.
7858
7859 2018-05-25  Tom Tromey  <tom@tromey.com>
7860
7861         * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
7862         a std::string.
7863         (get_pe_section_index, add_pe_exported_sym): Update.
7864         (read_pe_exported_syms): Use gdb::def_vector.
7865
7866 2018-05-25  Tom Tromey  <tom@tromey.com>
7867
7868         * frame.c (remove_prev_frame): Remove.
7869         (get_prev_frame_if_no_cycle): Use TRY/CATCH.
7870
7871 2018-05-25  Maciej W. Rozycki  <macro@mips.com>
7872
7873         * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
7874         Remove prototypes.
7875         * mips-linux-nat.c (supply_fpregset): Always call
7876         `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
7877         (fill_fpregset): Always call `mips64_fill_fpregset' rather than
7878         `mips_fill_fpregset'.
7879         * mips-linux-tdep.c (mips_supply_fpregset)
7880         (mips_supply_fpregset_wrapper, mips_fill_fpregset)
7881         (mips_fill_fpregset_wrapper): Remove functions.
7882         (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
7883         (mips_linux_fpregset): Remove variable.
7884         (mips_linux_iterate_over_regset_sections): Use
7885         `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
7886         (mips_linux_o32_sigframe_init): Remove comment.
7887
7888 2018-05-25  Pedro Alves  <palves@redhat.com>
7889
7890         * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
7891         (struct readahead_cache, struct packet_reg, struct
7892         remote_arch_state, class remote_state): Move higher up in the
7893         file.
7894         (remote_target::m_remote_state): Now an object instead of a pointer.
7895         (remote_target::get_remote_state): Adjust.
7896
7897 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
7898
7899         * stack.c (select_and_print_frame): Delete.
7900         (struct function_bounds): Move struct within function.
7901         (func_command): Most content moved into new function
7902         find_frame_for_function, use new function, print result, add
7903         function comment.
7904         (find_frame_for_function): New function, now returns a result.
7905
7906 2018-05-24  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
7907
7908         * stack.c (iterate_over_block_arg_vars): Fix comment.
7909         (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
7910
7911 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
7912
7913         PR gdb/23203
7914         * frame.c
7915         (scoped_restore_selected_frame::scoped_restore_selected_frame):
7916         Define.
7917         (scoped_restore_selected_frame::~scoped_restore_selected_frame):
7918         Define.
7919         * frame.h (class scoped_restore_selected_frame): New class.
7920         * stack.c (print_frame_local_vars): Remove catching and rethrowing
7921         of any exception, use scoped_restore_selected_frame to restore the
7922         frame instead.
7923
7924 2018-05-24  Pedro Alves  <palves@redhat.com>
7925
7926         * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
7927         override.
7928
7929 2018-05-23  Tom Tromey  <tom@tromey.com>
7930
7931         * complaints.c (struct complaints): Remove.
7932         (symfile_complaint_book): Remove.
7933         (series): New global.
7934         (complaint_internal): Update.
7935         (clear_complaints): Update.
7936
7937 2018-05-23  Tom Tromey  <tom@tromey.com>
7938
7939         * complaints.c (counters): New global.
7940         (struct complain): Remove.
7941         (struct complaints) <root>: Remove.
7942         (complaint_sentinel): Remove.
7943         (symfile_complaint_book): Update.
7944         (find_complaint) Remove.
7945         (complaint_internal, clear_complaints): Update.
7946
7947 2018-05-23  Tom Tromey  <tom@tromey.com>
7948
7949         * complaints.c (struct complain) <file, line>: Remove.
7950         (find_complaint): Remove file, line parameters.
7951         (complaint_internal): Update.
7952
7953 2018-05-23  Tom Tromey  <tom@tromey.com>
7954
7955         * complaints.c (vcomplaint): Remove.
7956         (complaint_internal) Merge in contents of vcomplaint.
7957
7958 2018-05-23  Tom Tromey  <tom@tromey.com>
7959
7960         * complaints.c (struct complaints) <explanation>: Remove.
7961         (symfile_explanations): Remove.
7962         (symfile_complaint_book): Update.
7963         (vcomplaint): Update.
7964         (struct explanation): Remove.
7965
7966 2018-05-23  Tom Tromey  <tom@tromey.com>
7967
7968         * complaints.c (symfile_complaints): Remove.
7969         (complaint_internal): Remove "complaints" parameter.
7970         (clear_complaints, vcomplaint): Remove "c" parameter.
7971         (get_complaints): Remove.
7972         * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
7973         (dwarf2_debug_line_missing_file_complaint)
7974         (dwarf2_debug_line_missing_end_sequence_complaint)
7975         (dwarf2_complex_location_expr_complaint)
7976         (dwarf2_const_value_length_mismatch_complaint)
7977         (dwarf2_section_buffer_overflow_complaint)
7978         (dwarf2_macro_malformed_definition_complaint)
7979         (dwarf2_invalid_attrib_class_complaint)
7980         (create_addrmap_from_index, dw2_symtab_iter_next)
7981         (dw2_expand_marked_cus)
7982         (dw2_debug_names_iterator::find_vec_in_debug_names)
7983         (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
7984         (create_debug_type_hash_table, init_cutu_and_read_dies)
7985         (partial_die_parent_scope, add_partial_enumeration)
7986         (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
7987         (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
7988         (read_import_statement, read_file_scope, create_dwo_cu_reader)
7989         (create_cus_hash_table, create_dwp_hash_table)
7990         (inherit_abstract_dies, read_func_scope, read_call_site_scope)
7991         (dwarf2_rnglists_process, dwarf2_ranges_process)
7992         (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
7993         (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
7994         (handle_struct_member_die, process_structure_scope)
7995         (read_array_type, read_common_block, read_module_type)
7996         (read_tag_pointer_type, read_typedef, read_base_type)
7997         (read_subrange_type, load_partial_dies, partial_die_info::read)
7998         (partial_die_info::read, partial_die_info::read)
7999         (partial_die_info::read, read_checked_initial_length_and_offset)
8000         (dwarf2_string_attr, read_formatted_entries)
8001         (dwarf_decode_line_header)
8002         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
8003         (new_symbol, dwarf2_const_value_attr, lookup_die_type)
8004         (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
8005         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
8006         (get_signatured_type, get_DW_AT_signature_type)
8007         (decode_locdesc, file_file_name, consume_improper_spaces)
8008         (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
8009         (dwarf_decode_macro_bytes, dwarf_decode_macros)
8010         (dwarf2_symbol_mark_computed, set_die_type)
8011         (read_attribute_value): Update.
8012         * stap-probe.c (handle_stap_probe, get_stap_base_address):
8013         Update.
8014         * dbxread.c (unknown_symtype_complaint)
8015         (lbrac_mismatch_complaint, repeated_header_complaint)
8016         (set_namestring, function_outside_compilation_unit_complaint)
8017         (read_dbx_symtab, process_one_symbol): Update.
8018         * gdbtypes.c (stub_noname_complaint): Update.
8019         * windows-nat.c (handle_unload_dll): Update.
8020         * coffread.c (coff_symtab_read, enter_linenos, decode_type)
8021         (decode_base_type): Update.
8022         * xcoffread.c (bf_notfound_complaint, ef_complaint)
8023         (eb_complaint, record_include_begin, record_include_end)
8024         (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
8025         (process_xcoff_symbol, read_symbol)
8026         (function_outside_compilation_unit_complaint)
8027         (scan_xcoff_symtab): Update.
8028         * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
8029         * buildsym.c (finish_block_internal, make_blockvector)
8030         (end_symtab_get_static_block, augment_type_symtab): Update.
8031         * dtrace-probe.c (dtrace_process_dof)
8032         (dtrace_static_probe_ops::get_probes): Update.
8033         * complaints.h (struct complaint): Don't declare.
8034         (symfile_complaints): Remove.
8035         (complaint_internal): Remove "complaints" parameter.
8036         (complaint): Likewise.
8037         (clear_complaints): Likewise.
8038         * symfile.c (syms_from_objfile_1, finish_new_objfile)
8039         (reread_symbols): Update.
8040         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
8041         (dwarf2_frame_cache, decode_frame_entry): Update.
8042         * dwarf2loc.c (dwarf_reg_to_regnum): Update.
8043         * objc-lang.c (lookup_objc_class, lookup_child_selector)
8044         (info_selectors_command): Update.
8045         * macrotab.c (macro_include, check_for_redefinition)
8046         (macro_undef): Update.
8047         * objfiles.c (filter_overlapping_sections): Update.
8048         * stabsread.c (invalid_cpp_abbrev_complaint)
8049         (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
8050         (define_symbol, error_type, read_type, rs6000_builtin_type)
8051         (stabs_method_name_from_physname, read_member_functions)
8052         (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
8053         (attach_fields_to_type, complain_about_struct_wipeout)
8054         (read_range_type, read_args, common_block_start)
8055         (common_block_end, cleanup_undefined_types_1, scan_file_globals):
8056         Update.
8057         * mdebugread.c (index_complaint, unknown_ext_complaint)
8058         (basic_type_complaint, bad_tag_guess_complaint)
8059         (bad_rfd_entry_complaint, unexpected_type_code_complaint)
8060         (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
8061         (parse_procedure, parse_lines)
8062         (function_outside_compilation_unit_complaint)
8063         (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
8064         (bad_tag_guess_complaint, reg_value_complaint): Update.
8065         * cp-support.c (demangled_name_complaint): Update.
8066         * macroscope.c (sal_macro_scope): Update.
8067         * dwarf-index-write.c (class debug_names): Update.
8068
8069 2018-05-23  Tom Tromey  <tom@tromey.com>
8070
8071         * complaints.c (clear_complaints): Remove "noisy" parameter.
8072         * complaints.h (clear_complaints): Update.
8073         * symfile.c (syms_from_objfile_1, finish_new_objfile)
8074         (reread_symbols): Update.
8075
8076 2018-05-23  Tom Tromey  <tom@tromey.com>
8077
8078         * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
8079         SUBSEQUENT_MESSAGE.
8080         (vcomplaint, clear_complaints): Update.
8081         (symfile_explanations): Remove some messages.
8082
8083 2018-05-23  Tom Tromey  <tom@tromey.com>
8084
8085         * complaints.c (internal_complaint): Remove.
8086         * complaints.h (internal_complaint): Remove.
8087
8088 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
8089
8090         * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
8091
8092 2018-05-22  Pedro Alves  <palves@redhat.com>
8093
8094         * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
8095         (remote_fileio_badfd, remote_fileio_return_errno)
8096         (remote_fileio_return_success, remote_fileio_func_open)
8097         (remote_fileio_func_open, remote_fileio_func_close)
8098         (remote_fileio_func_read, remote_fileio_func_write)
8099         (remote_fileio_func_lseek, remote_fileio_func_rename)
8100         (remote_fileio_func_unlink, remote_fileio_func_stat)
8101         (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
8102         (remote_fileio_func_isatty, remote_fileio_func_system): Add
8103         remote_target parameter.
8104         (remote_fio_func_map) <func>: Add remote_target parameter.
8105         (do_remote_fileio_request, remote_fileio_request):
8106         * remote-fileio.h (remote_fileio_request):
8107         * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
8108         remote_target parameter.
8109         (remote_notif_process, handle_notification): Adjust to pass down
8110         the remote.
8111         (remote_notif_state_allocate): Add remote_target parameter.  Save
8112         it.
8113         * remote-notif.h (struct remote_target): Forward declare.
8114         (struct notif_client) <parse, ack, can_get_pending_events>: Add
8115         remote_target parameter.
8116         (struct remote_notif_state) <remote>: New field.
8117         (remote_notif_ack, remote_notif_parse): Add remote_target
8118         parameter.
8119         (remote_notif_state_allocate, remote_notif_state_allocate): Add
8120         remote_target parameter.
8121         * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
8122         (threads_listing_context, rmt_thread_action, protocol_feature)
8123         (packet_reg, stop_reply, stop_reply_p, enum packet_support)
8124         (packet_result, struct threads_listing_context, remote_state):
8125         Move definitions and declarations higher up.
8126         (remote_target) <~remote_target>: Declare.
8127         (remote_download_command_source, remote_file_put, remote_file_get)
8128         (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
8129         (remote_hostio_pread_vFile, remote_hostio_send_command)
8130         (remote_hostio_set_filesystem, remote_hostio_open)
8131         (remote_hostio_close, remote_hostio_unlink, remote_state)
8132         (get_remote_state, get_remote_packet_size, get_memory_packet_size)
8133         (get_memory_write_packet_size, get_memory_read_packet_size)
8134         (append_pending_thread_resumptions, remote_detach_1)
8135         (append_resumption, remote_resume_with_vcont)
8136         (add_current_inferior_and_thread, wait_ns, wait_as)
8137         (process_stop_reply, remote_notice_new_inferior)
8138         (process_initial_stop_replies, remote_add_thread)
8139         (btrace_sync_conf, remote_btrace_maybe_reopen)
8140         (remove_new_fork_children, kill_new_fork_children)
8141         (discard_pending_stop_replies, stop_reply_queue_length)
8142         (check_pending_events_prevent_wildcard_vcont)
8143         (discard_pending_stop_replies_in_queue, stop_reply)
8144         (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
8145         (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
8146         (remote_interrupt_as, remote_interrupt_ns)
8147         (remote_get_noisy_reply, remote_query_attached)
8148         (remote_add_inferior, remote_current_thread, get_current_thread)
8149         (set_thread, set_general_thread, set_continue_thread)
8150         (set_general_process, write_ptid)
8151         (remote_unpack_thread_info_response, remote_get_threadinfo)
8152         (parse_threadlist_response, remote_get_threadlist)
8153         (remote_threadlist_iterator, remote_get_threads_with_ql)
8154         (remote_get_threads_with_qxfer)
8155         (remote_get_threads_with_qthreadinfo, extended_remote_restart)
8156         (get_offsets, remote_check_symbols, remote_supported_packet)
8157         (remote_query_supported, remote_packet_size)
8158         (remote_serial_quit_handler, remote_detach_pid)
8159         (remote_vcont_probe, remote_resume_with_hc)
8160         (send_interrupt_sequence, interrupt_query)
8161         (remote_notif_get_pending_events, fetch_register_using_p)
8162         (send_g_packet, process_g_packet, fetch_registers_using_g)
8163         (store_register_using_P, store_registers_using_G)
8164         (set_remote_traceframe, check_binary_download)
8165         (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
8166         (remote_xfer_live_readonly_partial, remote_read_bytes)
8167         (remote_send_printf, remote_flash_write, readchar)
8168         (remote_serial_write, putpkt, putpkt_binary, skip_frame)
8169         (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
8170         (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
8171         (extended_remote_disable_randomization, extended_remote_run)
8172         (send_environment_packet, extended_remote_environment_support)
8173         (extended_remote_set_inferior_cwd, remote_write_qxfer)
8174         (remote_read_qxfer, push_stop_reply, vcont_r_supported)
8175         (packet_command): Now methods of ...
8176         (remote_target): ... this class.
8177         (m_remote_state) <remote_target>: New field.
8178         (struct remote_state) <stop_reply_queue,
8179         remote_async_inferior_event_token, wait_forever_enabled_p>: New
8180         fields.
8181         (remote_state::remote_state): Allocate stop_reply_queue.
8182         (remote_state): Delete global.
8183         (get_remote_state_raw): Delete.
8184         (remote_target::get_remote_state): Allocate m_remote_state on
8185         demand.
8186         (get_current_remote_target): New.
8187         (remote_ops, extended_remote_ops): Delete.
8188         (wait_forever_enabled_p, remote_async_inferior_event_token):
8189         Delete, moved to struct remote_state.
8190         (remote_target::close): Delete self.  Destruction bits split to
8191         ...
8192         (remote_target::~remote_target): ... this.
8193         (show_memory_packet_size): Adjust to use
8194         get_current_remote_target.
8195         (struct protocol_feature) <func>: Add remote_target parameter.
8196         All callers adjusted.
8197         (curr_quit_handler_target): New.
8198         (remote_serial_quit_handler): Reimplement.
8199         (remote_target::open_1): Adjust to use get_current_remote_target.
8200         Heap-allocate remote_target/extended_remote_target instances.
8201         (vcont_builder::vcont_builder): Add remote_target parameter, and
8202         save it in m_remote.  All callers adjusted.
8203         (vcont_builder::m_remote): New field.
8204         (vcont_builder::restart, vcont_builder::flush)
8205         (vcont_builder::push_action): Use it.
8206         (remote_target::commit_resume): Use it.
8207         (struct queue_iter_param) <remote>: New field.
8208         (remote_target::remove_new_fork_children): Fill in 'remote' field.
8209         (check_pending_event_prevents_wildcard_vcont_callback_data): New.
8210         (check_pending_event_prevents_wildcard_vcont_callback)
8211         (remote_target::check_pending_events_prevent_wildcard_vcont)
8212         (remote_target::discard_pending_stop_replies)
8213         (remote_target::discard_pending_stop_replies_in_queue)
8214         (remote_target::remote_notif_remove_queued_reply): Fill in
8215         'remote' field.
8216         (remote_notif_get_pending_events): New.
8217         (remote_target::readchar, remote_target::remote_serial_write):
8218         Save/restore curr_quit_handler_target.
8219         (putpkt): New.
8220         (kill_new_fork_children): Fill in 'remote' field.
8221         (packet_command): Use get_current_remote_target, defer to
8222         remote_target method of same name.
8223         (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
8224         parameter, and save it in m_remote.  All callers adjusted.
8225         (scoped_remote_fd::release): Use m_remote.
8226         (scoped_remote_fd::m_remote): New field.
8227         (remote_file_put, remote_file_get, remote_file_delete): Use
8228         get_current_remote_target, defer to remote_target method of same
8229         name.
8230         (remote_btrace_reset): Add remote_state paremeter.  Update all
8231         callers.
8232         (remote_async_inferior_event_handler). Pass down 'data'.
8233         (remote_new_objfile): Use get_current_remote_target.
8234         (remote_target::vcont_r_supported): New.
8235         (set_range_stepping): Use get_current_remote_target and
8236         remote_target::vcont_r_supported.
8237         (_initialize_remote): Don't allocate 'remote_state' and
8238         'stop_reply_queue' globals.
8239         * remote.h (struct remote_target): Forward declare.
8240         (getpkt, putpkt, remote_notif_get_pending_events): Add
8241         'remote_target' parameter.
8242
8243 2018-05-22  Pedro Alves  <palves@redhat.com>
8244
8245         * remote.c (vcont_builder): Now a class.  Make all data members
8246         private.
8247         (vcont_builder) <vcont_builder, restart, flush, push_action>:
8248         Declare methods.
8249         (vcont_builder_restart): Rename to ...
8250         (vcont_builder::restart): ... this.
8251         (vcont_builder_flush): Rename to ...
8252         (vcont_builder::flush): ... this.
8253         (vcont_builder_push_action): Rename to ...
8254         (vcont_builder::push_action): ... this.
8255         (remote_target::commit_resume): Adjust.
8256
8257 2018-05-22  Pedro Alves  <palves@redhat.com>
8258
8259         * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
8260         (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
8261         (get_fixed_memory_packet_size): New.
8262         (get_memory_packet_size): Use it.
8263         (set_memory_packet_size): Don't override the config size with
8264         DEFAULT_MAX_MEMORY_PACKET_SIZE.
8265         (show_memory_packet_size): Use get_fixed_memory_packet_size.
8266         Don't refer to get_memory_packet_size if not connected to a remote
8267         target.  Show "(default)" if configured size is 0.
8268
8269 2018-05-22  Pedro Alves  <palves@redhat.com>
8270
8271         * remote.c (remote_target::mourn_inferior): Move
8272         discard_pending_stop_replies call here from ...
8273         (_initialize_remote): ... here.
8274
8275 2018-05-22  Pedro Alves  <palves@redhat.com>
8276
8277         * remote.c (compare_section_command): Remove set_general_process
8278         call.
8279
8280 2018-05-22  Pedro Alves  <palves@redhat.com>
8281
8282         * remote.c (struct packet_reg, struct remote_arch_state):
8283         Move higher up in the file.
8284         (remote_state) <m_arch_states>: Store remote_arch_state values
8285         instead of remote_arch_state pointers.
8286         (remote_state::get_remote_arch_state): Adjust.
8287
8288 2018-05-22  Pedro Alves  <palves@redhat.com>
8289
8290         * remote.c: Include <unordered_map>.
8291         (remote_state): Now a class.
8292         (remote_state) <get_remote_arch_state>: Declare method.
8293         <get_remote_arch_state>: New field.
8294         (remote_arch_state) <remote_arch_state>: Declare ctor.
8295         <regs>: Now a unique_ptr.
8296         (remote_gdbarch_data_handle): Delete.
8297         (get_remote_arch_state): Delete.
8298         (remote_state::get_remote_arch_state): New.
8299         (get_remote_state): Adjust to call remote_state's
8300         get_remote_arch_state method.
8301         (init_remote_state): Delete, bits factored out to ...
8302         (remote_arch_state::remote_arch_state): ... this new method.
8303         (get_remote_packet_size, get_memory_packet_size)
8304         (process_g_packet, remote_target::fetch_registers)
8305         (remote_target::prepare_to_store, store_registers_using_G)
8306         (remote_target::store_registers, remote_target::get_trace_status):
8307         Adjust to call remote_state's method.
8308         (_initialize_remote): Remove reference to
8309         remote_gdbarch_data_handle.
8310
8311 2018-05-22  Pedro Alves  <palves@redhat.com>
8312
8313         * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
8314         pread>: New method declarations.
8315         (remote_target::open_1): Adjust.
8316         (readahead_cache_invalidate): Rename to ...
8317         (readahead_cache::invalidate): ... this, and adjust to be a class
8318         method.
8319         (readahead_cache_invalidate_fd): Rename to ...
8320         (readahead_cache::invalidate_fd): ... this, and adjust to be a
8321         class method.
8322         (remote_hostio_pwrite): Adjust.
8323         (remote_hostio_pread_from_cache): Rename to ...
8324         (readahead_cache::pread): ... this, and adjust to be a class
8325         method.
8326         (remote_hostio_close): Adjust.
8327
8328 2018-05-22  Pedro Alves  <palves@redhat.com>
8329
8330         * remote.c (remote_hostio_close_cleanup): Delete.
8331         (class scoped_remote_fd): New.
8332         (remote_file_put, remote_file_get): Use it.
8333
8334 2018-05-22  Pedro Alves  <palves@redhat.com>
8335
8336         (struct vCont_action_support): Use bool and initialize all fields.
8337         (struct readahead_cache): Initialize all fields.
8338         (remote_state): Use bool and initialize all fields.
8339         (remote_state::remote_state, remote_state::~remote_state): New.
8340         (new_remote_state): Delete.
8341         (_initialize_remote): Use new to allocate remote_state.
8342
8343 2018-05-22  Pedro Alves  <palves@redhat.com>
8344             張俊芝  <zjz@zjz.name>
8345
8346         PR gdb/22973
8347         * c-exp.y: Include "c-support.h".
8348         (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
8349         of tolower.  Use c_ident_is_alpha to scan names.
8350         * c-lang.c: Include "c-support.h".
8351         (convert_ucn, convert_octal, convert_hex, convert_escape): Use
8352         ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
8353         * c-support.h: New file, with bits factored out from ...
8354         * cp-name-parser.y: ... this file.
8355         Include "c-support.h".
8356         (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
8357         c-support.h and renamed.
8358         (symbol_end, yylex): Adjust.
8359
8360 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8361
8362         * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
8363         parameter type to CORE_ADDR.
8364         * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
8365         parameter type in declaration to CORE_ADDR.
8366         * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
8367         target_auxv_search to get AT_HWCAP and use the result to get the
8368         target description.
8369         * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
8370         to CORE_ADDR. Remove the cast of the return value to unsigned
8371         long. Fix error predicate of target_auxv_search.
8372         (ppc_linux_nat_target::read_description): Change the type of the
8373         hwcap variable to CORE_ADDR.
8374
8375 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8376
8377         * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
8378         if the size of fpscr is larger than 32 bits.
8379
8380 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8381
8382         * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
8383         (ppc32_linux_vsxregmap): New global.
8384         (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
8385         regcache_supply_regset, and regcache_collect_regset.
8386         * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
8387         * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
8388         (fetch_vsx_register, store_vsx_register): Remove.
8389         (fetch_vsx_registers): Add regno parameter. Get regset using
8390         ppc_linux_vsxregset. Use regset to supply registers.
8391         (store_vsx_registers): Add regno parameter. Get regset using
8392         ppc_linux_vsxregset. Use regset to collect registers.
8393         (fetch_register): Call fetch_vsx_registers instead of
8394         fetch_vsx_register.
8395         (store_register): Call store_vsx_registers instead of
8396         store_vsx_register.
8397         (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
8398         new regno parameter.
8399         (store_ppc_registers): Call store_vsx_registers with -1 for the
8400         new regno parameter.
8401         * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
8402         (ppc_collect_vsxregset): Remove.
8403
8404 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8405
8406         * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
8407         offset fields.
8408         * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
8409         for vector register offset fields.
8410         (ppc64_fbsd_reg_offsets): Likewise.
8411         * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
8412         to vector register offset fields.
8413         * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
8414         to vector register offset fields.
8415         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
8416         vector register offset fields.
8417         * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
8418         initializers for vector register offset fields.
8419         (rs6000_aix64_reg_offsets): Likewise.
8420         * rs6000-tdep.c (ppc_vrreg_offset): Remove.
8421         (ppc_supply_vrregset): Remove.
8422         (ppc_collect_vrregset): Remove.
8423         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
8424         (ppc_linux_vrregset) : New function.
8425         (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
8426         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
8427         (ppc32_linux_vrregset): Remove.
8428         (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
8429         and use result instead of ppc32_linux_vrregset.
8430         (ppc32_linux_reg_offsets): Remove initializers for vector register
8431         offset fields.
8432         (ppc64_linux_reg_offsets): Likewise.
8433         * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
8434         * ppc-linux-nat.c: Include regset.h.
8435         (gdb_vrregset_t): Adjust comment to account for little-endian
8436         mode.
8437         (supply_vrregset, fill_vrregset): Remove.
8438         (fetch_altivec_register, store_altivec_register): Remove.
8439         (fetch_altivec_registers): Add regno parameter. Get regset using
8440         ppc_linux_vrregset. Use regset to supply registers.
8441         (store_altivec_registers): Add regno parameter. Get regset using
8442         ppc_linux_vrregset. Use regset to collect registers.
8443         (fetch_register): Call fetch_altivec_registers instead of
8444         fetch_altivec_register.
8445         (store_register): Call store_altivec_registers instead of
8446         store_altivec_register.
8447         (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
8448         the new regno parameter.
8449         (store_ppc_registers): Call store_altivec_registers with -1 for
8450         the new regno parameter.
8451
8452 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8453
8454         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
8455         (PPC_LINUX_SIZEOF_VSXREGSET): Define.
8456         * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
8457         (gdb_vrregset_t): Change array type size to
8458         PPC_LINUX_SIZEOF_VRREGSET.
8459         (gdb_vsxregset_t): Change array type size to
8460         PPC_LINUX_SIZEOF_VSXREGSET.
8461         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
8462         Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
8463         PPC_LINUX_SIZEOF_VSXREGSET.
8464
8465 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8466
8467         * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
8468         * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
8469         nat/ppc-linux.c.
8470         (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
8471         ppc_linux_target_wordsize with tid.
8472         (ppc_linux_nat_target::read_description): Call ppc_linux_target
8473         wordsize with tid.
8474         * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
8475         (ppc64_64bit_inferior_p): Add static and inline specifiers.
8476         (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
8477         tid parameter. Remove static specifier.
8478         * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
8479         (ppc_linux_target_wordsize): New declaration.
8480
8481 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8482
8483         * arch/ppc-linux-common.c: New file.
8484         * arch/ppc-linux-common.h: New file.
8485         * arch/ppc-linux-tdesc.h: New file.
8486         * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
8487         * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
8488         (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
8489         arch/ppc-linux-tdesc.h.
8490         * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
8491         arch/ppc-linux-tdesc.h.
8492         (ppc_linux_nat_target::read_description): Remove target
8493         description matching code. Fill a ppc_linux_features struct and
8494         call ppc_linux_match_description with it. Move comment about ISA
8495         2.05 to ppc-linux-common.c.
8496         * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
8497         arch/ppc-linux-tdesc.h.
8498         (ppc_linux_core_read_description): Remove target description
8499         matching code. Fill a ppc_linux_features struct and call
8500         ppc_linux_match_description with it.
8501         * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
8502         (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
8503         (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
8504         (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
8505         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
8506         (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
8507         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
8508         (tdesc_powerpc_e500l): Remove.
8509
8510 2018-05-22  Joel Brobecker  <brobecker@adacore.com>
8511
8512         * ada-lang.c (catch_assert_command): Pass empty string instead
8513         of NULL for excep_string argument.
8514
8515 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
8516
8517         * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
8518         the width of the requested register exceeds the width of the
8519         `ptrace' data type.
8520
8521 2018-05-21  Tom Tromey  <tom@tromey.com>
8522
8523         * printcmd.c (output_command): Remove.
8524         (output_command_const): Rename to output_command.
8525         * valprint.h (output_command): Rename from output_command_const.
8526         * tracepoint.c (trace_dump_actions): Call output_command.
8527
8528 2018-05-21  Tom Tromey  <tom@tromey.com>
8529
8530         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
8531         (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
8532         * ada-lang.h (create_ada_exception_catchpoint): Update.
8533         * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
8534         std::string.
8535         (create_excep_cond_exprs, ~ada_catchpoint)
8536         (should_stop_exception, print_one_exception)
8537         (print_mention_exception, print_recreate_exception): Update.
8538         (ada_get_next_arg): Remove.
8539         (catch_ada_exception_command_split): Use std::string.  Change type
8540         of "excep_string", "cond_string".
8541         (catch_ada_exception_command): Update.
8542         (create_ada_exception_catchpoint): Change type of excep_string.
8543         (ada_exception_sal): Remove excep_string parameter.
8544         (~ada_catchpoint): Remove.
8545
8546 2018-05-21  Tom Tromey  <tom@tromey.com>
8547
8548         * ada-lang.c (ada_collect_symbol_completion_matches): Remove
8549         cleanup.
8550
8551 2018-05-21  Tom Tromey  <tom@tromey.com>
8552
8553         * ada-lang.c (ada_exception_message_1, ada_exception_message):
8554         Return unique_xmalloc_ptr.
8555         (print_it_exception): Update.
8556
8557 2018-05-21  Tom Tromey  <tom@tromey.com>
8558
8559         * tracepoint.c (trace_dump_actions): Use std::string.
8560
8561 2018-05-21  Tom Tromey  <tom@tromey.com>
8562
8563         * symfile.c (reread_symbols): Use std::string for original_name.
8564
8565 2018-05-21  Tom Tromey  <tom@tromey.com>
8566
8567         * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
8568         (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN.  Default
8569         constructor.
8570
8571 2018-05-20  Simon Marchi  <simon.marchi@polymtl.ca>
8572
8573         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
8574         instance to...
8575         (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
8576         * objfiles.c (get_objfile_bfd_data): Allocate
8577         objfile_per_bfd_storage with obstack_new when allocating on
8578         obstack.
8579
8580 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
8581
8582         * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
8583         OBSTACK_ZALLOC.
8584         * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
8585         * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
8586         * mdebugread.c (mdebug_build_psymtabs): Likewise.
8587         (add_pending): Likewise.
8588         (parse_symbol): Likewise.
8589         (parse_partial_symbols): Likewise.
8590         (psymtab_to_symtab_1): Likewise.
8591         (new_psymtab): Likewise.
8592         (elfmdebug_build_psymtabs): Likewise.
8593         * minsyms.c (terminate_minimal_symbol_table): Likewise.
8594         * objfiles.c (get_objfile_bfd_data): Likewise.
8595         (objfile_register_static_link): Likewise.
8596         * psymtab.c (allocate_psymtab): Likewise.
8597         * stabsread.c (read_member_functions): Likewise.
8598         * xcoffread.c (xcoff_end_psymtab): Likewise.
8599
8600 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
8601
8602         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
8603         compiler supports std::is_trivially_constructible.
8604         * common/poison.h: Include obstack.h.
8605         (IsMallocable): Define to is_trivially_constructible if the
8606         compiler supports it, define to true_type otherwise.
8607         (xobnew): New.
8608         (XOBNEW): Redefine.
8609         (xobnewvec): New.
8610         (XOBNEWVEC): Redefine.
8611         * gdb_obstack.h (obstack_zalloc): New.
8612         (OBSTACK_ZALLOC): Redefine.
8613         (obstack_calloc): New.
8614         (OBSTACK_CALLOC): Redefine.
8615         (obstack_new): New.
8616         * gdbarch.sh: Include gdb_obstack in gdbarch.h.
8617         (gdbarch_obstack): New declaration in gdbarch.h, definition in
8618         gdbarch.c.
8619         (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
8620         obstack_calloc/obstack_zalloc.
8621         (gdbarch_obstack_zalloc): Remove.
8622         * target-descriptions.c (tdesc_data_init): Use obstack_new.
8623
8624 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
8625
8626         * stack.c (backtrace_command_1): Remove useless variable int i.
8627
8628 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
8629
8630         * stack.c (print_frame_info): Fix comment.
8631
8632 2018-05-18  Tom Tromey  <tom@tromey.com>
8633
8634         * dwarf2read.c (struct dwz_file): Add constructor, initializers.
8635         <dwz_bfd>: Now a gdb_bfd_ref_ptr.
8636         (~dwarf2_per_objfile): Update
8637         (dwarf2_get_dwz_file): Use new.
8638         * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
8639         unique_ptr.
8640
8641 2018-05-18  Tom Tromey  <tom@tromey.com>
8642
8643         * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
8644         unique_ptr.
8645         * dwarf2read.c (struct dwp_file): Add constructor and
8646         initializers.
8647         (open_and_init_dwp_file): Return a unique_ptr.
8648         (dwarf2_per_objfile, create_dwp_hash_table)
8649         (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
8650         (lookup_dwo_unit_in_dwp): Update.
8651         (open_and_init_dwp_file, get_dwp_file): Update.
8652
8653 2018-05-18  Tom Tromey  <tom@tromey.com>
8654
8655         * dwarf2read.c (dwarf2_per_objfile): Update.
8656         (struct mapped_index): Add initializers.
8657         (dwarf2_read_index): Use new.
8658         (dw2_symtab_iter_init): Update.
8659         * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
8660         unique_ptr.
8661
8662 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
8663
8664         * dwarf2read.c (mapped_index) <total_size>: Remove.
8665
8666 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
8667
8668         * unittests/format_pieces-selftests.c (test_format_specifier):
8669         Add ARI comments.
8670
8671 2018-05-18  Tom Tromey  <tom@tromey.com>
8672
8673         * c-typeprint.c (maybe_print_hole): New function.
8674         (c_print_type_struct_field_offset): Update.
8675         (c_type_print_base_struct_union): Call maybe_print_hole.
8676
8677 2018-05-17  Keith Seitz  <keiths@redhat.com>
8678
8679         * breakpoint.c (build_bpstat_chain): New function, moved from
8680         bpstat_stop_status.
8681         (bpstat_stop_status): Add optional parameter, `stop_chain'.
8682         If no stop chain is passed, call build_bpstat_chain to build it.
8683         * breakpoint.h (build_bpstat_chain): Declare.
8684         (bpstat_stop_status): Move documentation here from breakpoint.c.
8685         * infrun.c (handle_signal_stop): Before eliding inlined frames,
8686         build the stop chain and pass it to skip_inline_frames.
8687         Pass this stop chain to bpstat_stop_status.
8688         * inline-frame.c: Include breakpoint.h.
8689         (stopped_by_user_bp_inline_frame): New function.
8690         (skip_inline_frames): Add parameter `stop_chain'.
8691         Move documention to inline-frame.h.
8692         If non-NULL, use stopped_by_user_bp_inline_frame to determine
8693         whether the frame should be elided.
8694         * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
8695         Add moved documentation and update for new parameter.
8696
8697 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
8698
8699         PR cli/14975
8700         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8701         unittests/format_pieces-selftests.c.
8702         * common/format.h (format_piece) <operator==>: New.
8703         (format_pieces) <operator[]>: Remove.
8704         * common/format.c (format_pieces::format_pieces): Handle \e.
8705         * unittests/format_pieces-selftests.c: New.
8706
8707 2018-05-17  Tom Tromey  <tom@tromey.com>
8708
8709         PR symtab/23010:
8710         * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
8711         (dw2_instantiate_symtab): Add skip_partial parameter.
8712         (dw2_find_last_source_symtab, dw2_map_expand_apply)
8713         (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
8714         (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
8715         (dw2_expand_symtabs_matching_one)
8716         (dw2_find_pc_sect_compunit_symtab)
8717         (dw2_debug_names_lookup_symbol)
8718         (dw2_debug_names_expand_symtabs_for_function): Update.
8719         (init_cutu_and_read_dies): Add skip_partial parameter.
8720         (process_psymtab_comp_unit, build_type_psymtabs_1)
8721         (process_skeletonless_type_unit, load_partial_comp_unit)
8722         (psymtab_to_symtab_1): Update.
8723         (load_full_comp_unit): Add skip_partial parameter.
8724         (process_imported_unit_die, dwarf2_read_addr_index)
8725         (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
8726         (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
8727         (read_signatured_type): Update.
8728
8729 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
8730
8731         * value.c (release_value): Remove unused variable.
8732         (record_latest_value): Likewise.
8733         (access_value_history): Likewise.
8734         (preserve_values): Likewise.
8735
8736 2018-05-17  Tom Tromey  <tom@tromey.com>
8737
8738         * extension.h (struct ext_lang_type_printers) <py_type_printers>:
8739         Initialize.
8740
8741 2018-05-16  Maciej W. Rozycki  <macro@mips.com>
8742
8743         PR gdb/22286
8744         * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
8745         Also handle registers whose width is not a multiple of
8746         PTRACE_TYPE_RET.
8747         (linux_nat_trad_target::store_register): Likewise.
8748
8749 2018-05-16  Tom Tromey  <tom@tromey.com>
8750
8751         * gdbcore.h (core_bfd): Redefine.
8752         * corelow.c (core_target::close): Update.
8753         (core_target_open): Update.
8754         * progspace.h (struct program_space) <cbfd>: Now a
8755         gdb_bfd_ref_ptr.
8756
8757 2018-05-16  Tom Tromey  <tom@tromey.com>
8758
8759         PR cli/19551:
8760         * symfile-add-flags.h (enum symfile_add_flags)
8761         <SYMFILE_NOT_FILENAME>: New constant.
8762         * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME.  Get
8763         objfile name from BFD.
8764         (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
8765         * minidebug.c (find_separate_debug_file_in_section): Put
8766         ".gnu_debugdata" into BFD's file name.
8767
8768 2018-05-16  Simon Marchi  <simon.marchi@ericsson.com>
8769
8770         * regcache.c (regcache_read_ftype, regcache_write_ftype):
8771         Remove.
8772
8773 2018-05-15  Tamar Christina  <tamar.christina@arm.com>
8774
8775         PR binutils/21446
8776         * aarch64-tdep.c (aarch64_analyze_prologue,
8777         aarch64_software_single_step, aarch64_displaced_step_copy_insn):
8778         Indicate not interested in errors.
8779
8780 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
8781
8782         * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
8783         Supply the MIPS_ZERO_REGNUM register.
8784
8785 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
8786
8787         * mips-tdep.c (mask_address_var): Make variable static.
8788
8789 2018-05-14  Tom Tromey  <tom@tromey.com>
8790
8791         * dwarf2read.c (rust_union_quirks): Clear rust_unions.
8792
8793 2018-05-11  Andrew Burgess  <andrew.burgess@embecosm.com>
8794
8795         * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
8796         FXSAVE_ADDR for the mxcsr register.
8797
8798 2018-05-11  Max Filippov  <jcmvbkbc@gmail.com>
8799
8800         * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
8801
8802 2018-05-11  Pedro Alves  <palves@redhat.com>
8803
8804         * corelow.c (core_target) <core_target>: No longer inline.
8805         Initialize m_core_gdbarch, m_core_vec and build the section table
8806         here.
8807         <~core_target>: New.
8808         <core_gdbarch, get_core_register_section>: New methods.
8809         <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
8810         factored out from ...
8811         <core_data, core_vec, core_gdbarch>: ... these deleted globals.
8812         (core_ops): Delete.
8813         (sniff_core_bfd): Add gdbarch parameter.
8814         (core_close): Delete, merged into ...
8815         (core_target::close): ... here.  Delete self.
8816         (core_close_cleanup): Delete.
8817         (core_target_open): Allocate a core_target on the heap.  Use a
8818         unique_ptr instead of a cleanup.  Bits moved into the core_target
8819         ctor.  Adjust to use core_target methods instead of globals.
8820         (get_core_register_section): Rename to ...
8821         (core_target::get_core_register_section): ... this and adjust.
8822         (struct get_core_registers_cb_data): New.
8823         (get_core_registers_cb): Use it.  Use bool.
8824         (core_target::fetch_registers, core_target::files_info)
8825         (core_target::xfer_partial, core_target::read_description)
8826         (core_target::pid_to, core_target::thread_name): Adjust to
8827         reference class fields instead of globals.
8828         * target.h (struct target_ops_deleter, target_ops_up): New.
8829
8830 2018-05-11  Pedro Alves  <palves@redhat.com>
8831
8832         * corefile.c (core_file_command): Move to corelow.c.
8833         * corelow.c (the_core_target): Delete.
8834         (core_file_command): Moved from corefile.c.  Check exec_bfd
8835         instead of the_core_target.  Use target_detach instead of calling
8836         into the_core_target directly.
8837         (maybe_say_no_core_file_now): New.
8838         (core_target::detach): Use it.
8839         (_initialize_corelow): Remove references to the_core_target.
8840         * gdbcore.h (the_core_target): Delete.
8841
8842 2018-05-11  Tom Tromey  <tromey@redhat.com>
8843             Pedro Alves  <palves@redhat.com>
8844
8845         * corefile.c (core_bfd): Remove.
8846         * gdbcore.h (core_bfd): Now a macro.
8847         * progspace.h (struct program_space) <cbfd>: New field.
8848
8849 2018-05-11  Tom Tromey  <tom@tromey.com>
8850
8851         * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
8852         gdb::def_vector.
8853
8854 2018-05-10  Tom Tromey  <tom@tromey.com>
8855
8856         * configure: Rebuild.
8857         * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
8858
8859 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
8860
8861         PR server/23158:
8862         * regformats/regdat.sh: Adjust script, following the addition
8863         of the new expedite_regs parameter to init_target_desc.
8864
8865 2018-05-10  Omair Javaid  <omair.javaid@linaro.org>
8866     
8867         PR gdb/23127
8868         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
8869         set_gdbarch_significant_addr_bit.
8870         * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
8871         set_gdbarch_significant_addr_bit.
8872         * utils.c (address_significant): Update to sign extend addr.
8873
8874 2018-05-09  Max Filippov  <jcmvbkbc@gmail.com>
8875
8876         * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
8877         (xtensa_linux_init_abi): Limit tdep->num_regs by
8878         tdep->num_nopriv_regs.
8879         * xtensa-tdep.c (xtensa_derive_tdep): Calculate
8880         tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
8881         not initialized.
8882
8883 2018-05-08  Simon Marchi  <simon.marchi@ericsson.com>
8884
8885         * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
8886
8887 2018-05-08  Andrew Burgess  <andrew.burgess@embecosm.com>
8888
8889         * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
8890         (I387_MXCSR_INIT_VAL): New constant.
8891         * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
8892         buffer if it was supplied by the inferior.
8893         * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
8894         (i387_xsave_get_clear_bv): New function.
8895         (i387_supply_xsave): Only read x87 control registers from the
8896         xsave buffer if the feature is enabled, and the state will have
8897         been written, otherwise, provide a suitable default.
8898         (i387_collect_xsave): Pre-clear all registers in xsave buffer,
8899         including x87 control registers.  Update control registers if they
8900         have changed from the default value, and mark features as enabled
8901         as required.
8902         * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
8903
8904 2018-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
8905
8906         * spu-tdep.c (info_spu_event_command): Fix output formatting.
8907
8908 2018-05-07  Tom Tromey  <tom@tromey.com>
8909
8910         * configure: Rebuild.
8911         * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
8912
8913 2018-05-07  Tom Tromey  <tom@tromey.com>
8914
8915         PR tdep/20362:
8916         * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
8917         bit.  Use correct value for VDIV.
8918
8919 2018-05-04  Tom Tromey  <tom@tromey.com>
8920
8921         * configure: Rebuild.
8922         * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
8923
8924 2018-05-04  Tom Tromey  <tom@tromey.com>
8925
8926         * linux-record.c (record_linux_system_call) <case
8927         RECORD_SYS_RECVFROM>: Add "break".
8928
8929 2018-05-04  Tom Tromey  <tom@tromey.com>
8930
8931         * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
8932         Add missing "break".
8933         * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
8934         Add missing "break".
8935
8936 2018-05-04  Tom Tromey  <tom@tromey.com>
8937
8938         * rs6000-tdep.c (ppc_process_record_op4)
8939         (ppc_process_record_op63): Add fall-through comment.
8940
8941 2018-05-04  Tom Tromey  <tom@tromey.com>
8942
8943         * i386-tdep.c (i386_process_record): Add fall-through comment.
8944
8945 2018-05-04  Tom Tromey  <tom@tromey.com>
8946
8947         * stabsread.c (define_symbol) <case 'p'>: Add fall-through
8948         comment.
8949
8950 2018-05-04  Tom Tromey  <tom@tromey.com>
8951
8952         * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
8953         * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
8954         * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
8955         comment.
8956         * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
8957         comment.
8958         * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
8959         comment.
8960
8961 2018-05-04  Tom Tromey  <tom@tromey.com>
8962
8963         * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
8964
8965 2018-05-04  Tom Tromey  <tom@tromey.com>
8966
8967         * s390-tdep.c (s390_process_record): Fix fall-through comments.
8968         * xcoffread.c (scan_xcoff_symtab): Move comment later.
8969         * symfile.c (section_is_mapped): Fix fall-through comment.
8970         * stabsread.c (define_symbol, read_member_functions): Fix
8971         fall-through comment.
8972         * s390-linux-tdep.c (s390_process_record): Fix fall-through
8973         comment.
8974         * remote.c (remote_wait_as): Fix fall-through comment.
8975         * p-exp.y (yylex): Fix fall-through comment.
8976         * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
8977         comment.
8978         * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
8979         * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
8980         * jv-exp.y (yylex): Fix fall-through comment.
8981         * go-exp.y (lex_one_token): Fix fall-through comment.
8982         * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
8983         fall-through comment.
8984         * f-exp.y (yylex): Fix fall-through comment.
8985         * dwarf2read.c (process_die): Fix fall-through comments.
8986         * dbxread.c (process_one_symbol): Fix fall-through comment.
8987         * d-exp.y (lex_one_token): Fix fall-through comment.
8988         * cp-name-parser.y (yylex): Fix fall-through comment.
8989         * coffread.c (coff_symtab_read): Fix fall-through comment.
8990         * c-exp.y (lex_one_token): Fix fall-through comment.
8991         * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
8992         comment.
8993         * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
8994         comment.
8995
8996 2018-05-04  Tom Tromey  <tom@tromey.com>
8997
8998         PR python/22730:
8999         * NEWS: Mention gdb.execute change.
9000         * gdbcmd.h (execute_control_command): Don't declare.
9001         * python/python.c (execute_gdb_command): Use read_command_lines_1,
9002         execute_control_commands, execute_control_commands_to_string.
9003         * cli/cli-script.h (execute_control_commands)
9004         (execute_control_commands_to_string): Declare.
9005         (execute_control_command): Add from_tty parameter.
9006         * cli/cli-script.c (execute_control_commands)
9007         (execute_control_commands_to_string): New functions.
9008         (execute_user_command): Use execute_control_commands.
9009         (execute_control_command_1): Add "from_tty" parameter.  Update.
9010         (execute_control_command): Likewise.
9011
9012 2018-05-04  Tom Tromey  <tom@tromey.com>
9013
9014         PR python/22731:
9015         * NEWS: Mention that breakpoint commands are writable.
9016         * python/py-breakpoint.c (bppy_set_commands): New function.
9017         (breakpoint_object_getset) <"commands">: Use it.
9018
9019 2018-05-04  Tom Tromey  <tom@tromey.com>
9020
9021         * tracepoint.c (actions_command): Update.
9022         * mi/mi-cmd-break.c (mi_command_line_array)
9023         (mi_command_line_array_cnt, mi_command_line_array_ptr)
9024         (mi_read_next_line): Remove.
9025         (mi_cmd_break_commands): Update.
9026         * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
9027         function_view.
9028         * cli/cli-script.c (get_command_line): Update.
9029         (process_next_line): Use function_view.  Constify.
9030         (recurse_read_control_structure, read_command_lines)
9031         (read_command_lines_1): Change argument types to function_view.
9032         (do_define_command, document_command): Update.
9033         * breakpoint.h (check_tracepoint_command): Don't declare.
9034         * breakpoint.c (check_tracepoint_command): Remove.
9035         (commands_command_1, create_tracepoint_from_upload): Update.
9036
9037 2018-05-04  Tom Tromey  <tom@tromey.com>
9038
9039         PR gdb/11750:
9040         * cli/cli-script.h (enum command_control_type) <define_control>:
9041         New constant.
9042         * cli/cli-script.c (multi_line_command_p): Handle define_control.
9043         (build_command_line, execute_control_command_1)
9044         (process_next_line): Likewise.
9045         (do_define_command): New function, extracted from define_command.
9046         (define_command): Use it.
9047
9048 2018-05-04  Tom Tromey  <tom@tromey.com>
9049
9050         * tracepoint.c (actions_command): Update.
9051         * cli/cli-script.h (read_command_lines): Update.
9052         * cli/cli-script.c (read_command_lines): Constify prompt_arg.
9053         (MAX_TMPBUF): Remove define.
9054         (define_command): Use string_printf.
9055         (document_command): Likewise.
9056         * breakpoint.c (commands_command_1): Update.
9057
9058 2018-05-04  Tom Tromey  <tom@tromey.com>
9059
9060         * top.c (execute_command): Update.
9061         * cli/cli-script.h (print_command_lines): Now varargs.
9062         * cli/cli-script.c (print_command_lines): Now varargs.
9063         (execute_control_command_1) <case while_control, case if_control>:
9064         Update.
9065
9066 2018-05-04  Tom Tromey  <tom@tromey.com>
9067
9068         * tracepoint.c (all_tracepoint_actions): Rename from
9069         all_tracepoint_actions_and_cleanup.  Change return type.
9070         (actions_command, encode_actions_1, encode_actions)
9071         (trace_dump_actions, tdump_command): Update.
9072         * remote.c (remote_download_command_source): Update.
9073         * python/python.c (gdbpy_eval_from_control_command)
9074         (python_command, python_interactive_command): Update.
9075         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
9076         * guile/guile.c (guile_command)
9077         (gdbscm_eval_from_control_command, guile_command): Update.
9078         * compile/compile.c (compile_code_command)
9079         (compile_print_command, compile_to_object): Update.
9080         * cli/cli-script.h (struct command_lines_deleter): New.
9081         (counted_command_line): New typedef.
9082         (struct command_line): Add constructor, destructor.
9083         <body_list>: Remove.
9084         <body_list_0, body_list_1>: New members.
9085         (command_line_up): Remove typedef.
9086         (read_command_lines, read_command_lines_1, get_command_line):
9087         Update.
9088         (copy_command_lines): Don't declare.
9089         * cli/cli-script.c (build_command_line): Use "new".
9090         (get_command_line): Return counted_command_line.
9091         (print_command_lines, execute_user_command)
9092         (execute_control_command_1, while_command, if_command): Update.
9093         (realloc_body_list): Remove.
9094         (process_next_line, recurse_read_control_structure): Update.
9095         (read_command_lines, read_command_lines_1): Return counted_command_line.
9096         (free_command_lines): Use "delete".
9097         (copy_command_lines): Remove.
9098         (define_command, document_command, show_user_1): Update.
9099         * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
9100         a counted_command_line.
9101         * breakpoint.h (counted_command_line): Remove typedef.
9102         (breakpoint_set_commands): Update.
9103         * breakpoint.c (check_no_tracepoint_commands)
9104         (validate_commands_for_breakpoint): Update.
9105         (breakpoint_set_commands): Change commands to be a
9106         counted_command_line.
9107         (commands_command_1, update_dprintf_command_list)
9108         (create_tracepoint_from_upload): Update.
9109
9110 2018-05-04  Tom Tromey  <tom@tromey.com>
9111
9112         * cli/cli-decode.h (cmd_list_element): New constructor.
9113         (~cmd_list_element): New destructor.
9114         (struct cmd_list_element): Add initializers.
9115         * cli/cli-decode.c (do_add_cmd): Use "new".
9116         (delete_cmd): Use "delete".
9117
9118 2018-05-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
9119             Pedro Alves <palves@redhat.com>
9120
9121         PR breakpoints/19806 and support for PR external/20207.
9122         * NEWS: Mention Aarch64 watchpoint improvements.
9123         * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
9124         watchpoints and PR external/20207 watchpoints.
9125         * nat/aarch64-linux-hw-point.c
9126         (kernel_supports_any_contiguous_range): New.
9127         (aarch64_watchpoint_offset): New.
9128         (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
9129         (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
9130         (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
9131         (aarch64_align_watchpoint): New parameters aligned_offset_p and
9132         next_addr_orig_p.  Support PR external/20207 watchpoints.
9133         (aarch64_downgrade_regs): New.
9134         (aarch64_dr_state_insert_one_point): New parameters offset and
9135         addr_orig.
9136         (aarch64_dr_state_remove_one_point): Likewise.
9137         (aarch64_handle_breakpoint): Update caller.
9138         (aarch64_handle_aligned_watchpoint): Likewise.
9139         (aarch64_handle_unaligned_watchpoint): Support addr_orig and
9140         aligned_offset.
9141         (aarch64_linux_set_debug_regs): Remove const from state.  Call
9142         aarch64_downgrade_regs.
9143         (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
9144         * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
9145         (DR_CONTROL_MASK): ... this.
9146         (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
9147         (unsigned int aarch64_watchpoint_offset): New prototype.
9148         (aarch64_linux_set_debug_regs): Remove const from state.
9149         * utils.c (align_up, align_down): Move to ...
9150         * common/common-utils.c (align_up, align_down): ... here.
9151         * utils.h (align_up, align_down): Move to ...
9152         * common/common-utils.h (align_up, align_down): ... here.
9153
9154 2018-05-04  Joel Brobecker  <brobecker@adacore.com>
9155
9156         * sparc-tdep.c (sparc_structure_return_p): Re-implement to
9157         match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
9158         (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
9159         Re-implement to match the ABI as summarized in GCC's
9160         gcc/config/sparc/sparc.c.  All callers updated.
9161         (sparc32_store_arguments): Remove assertion.
9162
9163 2018-05-04  Tom Tromey  <tom@tromey.com>
9164
9165         * printcmd.c: Don't include tui.h.
9166         (decode_format): Use skip_spaces.
9167
9168 2018-05-04  Tom Tromey  <tom@tromey.com>
9169
9170         PR gdb/22619:
9171         * printcmd.c (last_count): New global.
9172         (x_command): Use saved count when repeating.
9173
9174 2018-05-04  Tom Tromey  <tom@tromey.com>
9175
9176         * nto-procfs.c (do_closedir_cleanup): Remove.
9177         (procfs_pidlist): Use gdb_dir_up.
9178         * procfs.c (do_closedir_cleanup): Remove.
9179         (proc_update_threads): Use gdb_dir_up.
9180         * common/filestuff.h (struct gdb_dir_deleter): New.
9181         (gdb_dir_up): New typedef.
9182
9183 2018-05-04  Tom Tromey  <tom@tromey.com>
9184
9185         * ada-lang.c (print_mention_exception): Use std::string.
9186
9187 2018-05-04  Tom Tromey  <tom@tromey.com>
9188
9189         * ada-lang.c (create_excep_cond_exprs): Update.
9190         (ada_exception_catchpoint_cond_string): Use std::string.
9191
9192 2018-05-04  Tom Tromey  <tom@tromey.com>
9193
9194         * ada-lang.c (xget_renaming_scope): Return std::string.
9195         (old_renaming_is_invisible): Update.
9196
9197 2018-05-04  Tom Tromey  <tom@tromey.com>
9198
9199         * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
9200         (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
9201
9202 2018-05-04  Ulrich Weigand  <uweigand@de.ibm.com>
9203
9204         * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
9205
9206 2018-05-04  Tom Tromey  <tom@tromey.com>
9207
9208         * remote.c (remote_query_supported_append): Change type.
9209         (remote_check_symbols): Update.
9210
9211 2018-05-04  Paul Pluzhnikov  <ppluzhnikov@google.com>
9212
9213         PR gdb/11420
9214         * configure.ac: Prepend libpython.
9215         * python/python-config.py: Likewise.
9216         * configure: Regenerate.
9217
9218 2018-05-03  Simon Marchi  <simon.marchi@ericsson.com>
9219
9220         * Makefile.in (%.c: %.l): Use -t instead of --stdout.
9221
9222 2018-05-03  Pedro Alves  <palves@redhat.com>
9223
9224         * s390-linux-nat.c
9225         (s390_linux_nat_target::have_continuable_watchpoint): Mark with
9226         override.  Write 'true' instead of '1'.
9227         (s390_linux_nat_target::watchpoint_addr_within_range): Remove
9228         declaration.
9229
9230 2018-05-02  Pedro Alves  <palves@redhat.com>
9231
9232         * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
9233         add_inf_child_target.
9234         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
9235         add_inf_child_target.
9236         * aix-thread.c (aix_thread_target_info): New.
9237         (aix_thread_target) <shortname, longname, doc>: Delete.
9238         <info>: New.
9239         * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
9240         add_inf_child_target.
9241         * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
9242         add_inf_child_target.
9243         * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
9244         add_inf_child_target.
9245         * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
9246         add_inf_child_target.
9247         * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
9248         add_inf_child_target.
9249         * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
9250         add_inf_child_target.
9251         * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
9252         add_inf_child_target.
9253         * arm-linux-nat.c (_initialize_arm_linux_nat): Use
9254         add_inf_child_target.
9255         * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
9256         add_inf_child_target.
9257         * bfd-target.c (target_bfd_target_info): New.
9258         (target_bfd) <shortname, longname, doc>: Delete.
9259         <info>: New.
9260         * bsd-kvm.c (bsd_kvm_target_info): New.
9261         (bsd_kvm_target) <shortname, longname, doc>: Delete.
9262         <info>: New.
9263         (bsd_kvm_target::open): Rename to ...
9264         (bsd_kvm_target_open): ... this.  Adjust.
9265         * bsd-uthread.c (bsd_uthread_target_info): New.
9266         (bsd_uthread_target) <shortname, longname, doc>: Delete.
9267         <info>: New.
9268         * corefile.c (core_file_command): Adjust.
9269         * corelow.c (core_target_info): New.
9270         (core_target) <shortname, longname, doc>: Delete.
9271         <info>: New.
9272         (core_target::open): Rename to ...
9273         (core_target_open): ... this.  Adjust.
9274         * ctf.c (ctf_target_info): New.
9275         (ctf_target) <shortname, longname, doc>: Delete.
9276         <info>: New.
9277         (ctf_target::open): Rename to ...
9278         (ctf_target_open): ... this.
9279         (_initialize_ctf): Adjust.
9280         * exec.c (exec_target_info): New.
9281         (exec_target) <shortname, longname, doc>: Delete.
9282         <info>: New.
9283         (exec_target::open): Rename to ...
9284         (exec_target_open): ... this.
9285         * gdbcore.h (core_target_open): Declare.
9286         * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
9287         * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
9288         add_inf_child_target.
9289         * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
9290         add_inf_child_target.
9291         * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
9292         add_inf_child_target.
9293         * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
9294         add_inf_child_target.
9295         * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
9296         add_inf_child_target.
9297         * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
9298         add_inf_child_target.
9299         * i386-linux-nat.c (_initialize_i386_linux_nat): Use
9300         add_inf_child_target.
9301         * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
9302         add_inf_child_target.
9303         * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
9304         add_inf_child_target.
9305         * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
9306         add_inf_child_target.
9307         * inf-child.c (inf_child_target_info): New.
9308         (inf_child_target::info): New.
9309         (inf_child_open_target): Remove 'target' parameter.  Use
9310         get_native_target instead.
9311         (inf_child_target::open): Delete.
9312         (add_inf_child_target): New.
9313         * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
9314         Delete.
9315         <info>: New.
9316         (add_inf_child_target): Declare.
9317         (inf_child_open_target): Declare.
9318         * linux-thread-db.c (thread_db_target_info): New.
9319         (thread_db_target) <shortname, longname, doc>: Delete.
9320         <info>: New.
9321         * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
9322         add_inf_child_target.
9323         * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
9324         add_inf_child_target.
9325         * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
9326         add_inf_child_target.
9327         * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
9328         add_inf_child_target.
9329         * make-target-delegates (print_class): Adjust.
9330         * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
9331         add_inf_child_target.
9332         * mips-linux-nat.c (_initialize_mips_linux_nat): Use
9333         add_inf_child_target.
9334         * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
9335         add_inf_child_target.
9336         * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
9337         add_inf_child_target.
9338         * nto-procfs.c (nto_native_target_info): New.
9339         (nto_procfs_target_native) <shortname, longname, doc>:
9340         Delete.
9341         <info>: New.
9342         (nto_procfs_target_info): New.
9343         (nto_procfs_target_procfs) <shortname, longname, doc>:
9344         Delete.
9345         <info>: New.
9346         (init_procfs_targets): Adjust.
9347         * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
9348         add_inf_child_target.
9349         * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
9350         add_inf_child_target.
9351         * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
9352         add_inf_child_target.
9353         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
9354         add_inf_child_target.
9355         * ravenscar-thread.c (ravenscar_target_info): New.
9356         (ravenscar_thread_target) <shortname, longname, doc>:
9357         Delete.
9358         <info>: New.
9359         * record-btrace.c (record_btrace_target_info):
9360         (record_btrace_target) <shortname, longname, doc>: Delete.
9361         <info>: New.
9362         (record_btrace_target::open): Rename to ...
9363         (record_btrace_target_open): ... this.  Adjust.
9364         * record-full.c (record_longname, record_doc): New.
9365         (record_full_base_target) <shortname, longname, doc>: Delete.
9366         <info>: New.
9367         (record_full_target_info): New.
9368         (record_full_target): <shortname>: Delete.
9369         <info>: New.
9370         (record_full_core_open_1, record_full_open_1): Update comments.
9371         (record_full_base_target::open): Rename to ...
9372         (record_full_open): ... this.
9373         (cmd_record_full_restore): Update.
9374         (_initialize_record_full): Update.
9375         * remote-sim.c (remote_sim_target_info): New.
9376         (gdbsim_target) <shortname, longname, doc>: Delete.
9377         <info>: New.
9378         (gdbsim_target::open): Rename to ...
9379         (gdbsim_target_open): ... this.
9380         (_initialize_remote_sim): Adjust.
9381         * remote.c (remote_doc): New.
9382         (remote_target_info): New.
9383         (remote_target) <shortname, longname, doc>: Delete.
9384         <info>: New.
9385         (extended_remote_target_info): New.
9386         (extended_remote_target) <shortname, longname, doc>: Delete.
9387         <info>: New.
9388         (remote_target::open_1): Make static.  Adjust.
9389         * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
9390         * s390-linux-nat.c (_initialize_s390_nat): Use
9391         add_inf_child_target.
9392         * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
9393         add_inf_child_target.
9394         * sol-thread.c (thread_db_target_info): New.
9395         (sol_thread_target) <shortname, longname, doc>: Delete.
9396         <info>: New.
9397         * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
9398         add_inf_child_target.
9399         * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
9400         add_inf_child_target.
9401         * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
9402         add_inf_child_target.
9403         * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
9404         add_inf_child_target.
9405         * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
9406         add_inf_child_target.
9407         * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
9408         add_inf_child_target.
9409         * spu-linux-nat.c (_initialize_spu_nat): Use
9410         add_inf_child_target.
9411         * spu-multiarch.c (spu_multiarch_target_info): New.
9412         (spu_multiarch_target) <shortname, longname, doc>: Delete.
9413         <info>: New.
9414         * target-delegates.c: Regenerate.
9415         * target.c: Include <unordered_map>.
9416         (target_ops_p): Delete.
9417         (DEF_VEC_P(target_ops_p)): Delete.
9418         (target_factories): New.
9419         (test_target_info): New.
9420         (test_target_ops::info): New.
9421         (open_target): Adjust to use target_factories.
9422         (add_target_with_completer): Rename to ...
9423         (add_target): ... this.  Change prototype.  Register target_info
9424         and open callback in target_factories.  Register target_info in
9425         command context instead of target_ops.
9426         (add_target): Delete old implementation.
9427         (add_deprecated_target_alias): Change prototype.  Adjust.
9428         (the_native_target): New.
9429         (set_native_target, get_native_target): New.
9430         (find_default_run_target): Use the_native_target.
9431         (find_attach_target, find_run_target): Simplify.
9432         (target_ops::open): Delete.
9433         (dummy_target_info): New.
9434         (dummy_target::shortname, dummy_target::longname)
9435         (dummy_target::doc): Delete.
9436         (dummy_target::info): New.
9437         (debug_target::shortname, debug_target::longname)
9438         (debug_target::doc): Delete.
9439         (debug_target::info): New.
9440         * target.h (struct target_info): New.
9441         (target_ops::~target_ops): Add comment.
9442         (target_ops::info): New.
9443         (target_ops::shortname, target_ops::longname, target_ops::doc): No
9444         longer virtual.  Implement in terms of target_info.
9445         (set_native_target, get_native_target): Declare.
9446         (target_open_ftype): New.
9447         (add_target, add_target_with_completer)
9448         (add_deprecated_target_alias): Change prototype.
9449         (test_target) <shortname, longname, doc>: Delete.
9450         <info>: New.
9451         * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
9452         add_inf_child_target.
9453         * tracefile-tfile.c (tfile_target_info): New.
9454         (tfile_target) <shortname, longname, doc>: Delete.
9455         <info>: New.
9456         (tfile_target::open): Rename to ...
9457         (tfile_target_open): ... this.
9458         (_initialize_tracefile_tfile): Adjust.
9459         * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
9460         add_inf_child_target.
9461         * windows-nat.c (_initialize_windows_nat): Use
9462         add_inf_child_target.
9463         * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
9464         add_inf_child_target.
9465
9466 2018-05-02  Pedro Alves  <palves@redhat.com>
9467
9468         * linux-nat.h (linux_nat_target) <low_new_thread,
9469         low_delete_thread, low_new_fork, low_forget_process,
9470         low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
9471         New virtual methods.
9472         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
9473         (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
9474         (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
9475         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
9476         (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
9477         Delete.
9478         * linux-fork.c (delete_fork): Adjust to call low method.
9479         * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
9480         (linux_nat_new_fork, linux_nat_forget_process_hook)
9481         (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
9482         (linux_nat_status_is_event):
9483         (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
9484         (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
9485         to call low method.
9486         (sigtrap_is_event): Rename to ...
9487         (linux_nat_target::low_status_is_event): ... this.
9488         (linux_nat_set_status_is_event): Delete.
9489         (save_stop_reason, linux_nat_wait_1)
9490         (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
9491         low methods.
9492         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
9493         (linux_nat_set_new_fork, linux_nat_set_forget_process)
9494         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
9495         (linux_nat_set_prepare_to_resume): Delete.
9496         * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
9497         low virtual methods.
9498         * amd64-linux-nat.c: Likewise.
9499         * arm-linux-nat.c: Likewise.
9500         * i386-linux-nat.c: Likewise.
9501         * ia64-linux-nat.c: Likewise.
9502         * mips-linux-nat.c: Likewise.
9503         * ppc-linux-nat.c: Likewise.
9504         * s390-linux-nat.c: Likewise.
9505         * sparc64-linux-nat.c: Likewise.
9506         * x86-linux-nat.c: Likewise.
9507         * x86-linux-nat.h: Include "nat/x86-linux.h".
9508         (x86_linux_nat_target) <low_new_fork, low_forget_process,
9509         low_prepare_to_resume, low_new_thread, low_delete_thread>:
9510         Override methods.
9511
9512 2018-05-02  Pedro Alves  <palves@redhat.com>
9513
9514         * target.h (target_ops)
9515         <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
9516         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
9517         stopped_by_watchpoint, have_continuable_watchpoint,
9518         stopped_data_address, watchpoint_addr_within_range,
9519         can_accel_watchpoint_condition, can_run, thread_alive,
9520         has_all_memory, has_memory, has_stack, has_registers,
9521         has_execution, can_async_p, is_async_p, supports_non_stop,
9522         always_non_stop_p, can_execute_reverse, supports_multi_process,
9523         supports_enable_disable_tracepoint,
9524         supports_disable_randomization, supports_string_tracing,
9525         supports_evaluation_of_breakpoint_conditions,
9526         can_run_breakpoint_commands, filesystem_is_local,
9527         can_download_tracepoint, get_trace_state_variable_value,
9528         set_trace_notes, get_tib_address, use_agent, can_use_agent,
9529         record_is_replaying, record_will_replay,
9530         augmented_libraries_svr4_read>: Adjust to return bool.
9531         * aarch64-linux-nat.c: All implementations adjusted.
9532         * aix-thread.c: All implementations adjusted.
9533         * arm-linux-nat.c: All implementations adjusted.
9534         * breakpoint.c: All implementations adjusted.
9535         * bsd-kvm.c: All implementations adjusted.
9536         * bsd-uthread.c: All implementations adjusted.
9537         * corelow.c: All implementations adjusted.
9538         * ctf.c: All implementations adjusted.
9539         * darwin-nat.c: All implementations adjusted.
9540         * darwin-nat.h: All implementations adjusted.
9541         * exec.c: All implementations adjusted.
9542         * fbsd-nat.c: All implementations adjusted.
9543         * fbsd-nat.h: All implementations adjusted.
9544         * gnu-nat.c: All implementations adjusted.
9545         * gnu-nat.h: All implementations adjusted.
9546         * go32-nat.c: All implementations adjusted.
9547         * ia64-linux-nat.c: All implementations adjusted.
9548         * inf-child.c: All implementations adjusted.
9549         * inf-child.h: All implementations adjusted.
9550         * inf-ptrace.c: All implementations adjusted.
9551         * inf-ptrace.h: All implementations adjusted.
9552         * linux-nat.c: All implementations adjusted.
9553         * linux-nat.h: All implementations adjusted.
9554         * mips-linux-nat.c: All implementations adjusted.
9555         * nto-procfs.c: All implementations adjusted.
9556         * ppc-linux-nat.c: All implementations adjusted.
9557         * procfs.c: All implementations adjusted.
9558         * ravenscar-thread.c: All implementations adjusted.
9559         * record-btrace.c: All implementations adjusted.
9560         * record-full.c: All implementations adjusted.
9561         * remote-sim.c: All implementations adjusted.
9562         * remote.c: All implementations adjusted.
9563         * s390-linux-nat.c: All implementations adjusted.
9564         * sol-thread.c: All implementations adjusted.
9565         * spu-multiarch.c: All implementations adjusted.
9566         * target-delegates.c: All implementations adjusted.
9567         * target.c: All implementations adjusted.
9568         * target.h: All implementations adjusted.
9569         * tracefile-tfile.c: All implementations adjusted.
9570         * tracefile.c: All implementations adjusted.
9571         * tracefile.h: All implementations adjusted.
9572         * windows-nat.c: All implementations adjusted.
9573         * x86-linux-nat.h: All implementations adjusted.
9574         * x86-nat.h: All implementations adjusted.
9575
9576 2018-05-02  Pedro Alves  <palves@redhat.com>
9577
9578         * make-target-delegates (scan_target_h): Don't trim lines here.
9579         Replace sequences of tabs and/or whitespace with a single
9580         whitespace.
9581         (top level, parsing methods): Trim each line before processing it
9582         here.
9583
9584 2018-05-02  Pedro Alves  <palves@redhat.com>
9585             John Baldwin  <jhb@freebsd.org>
9586
9587         * target.h (enum strata) <debug_stratum>: New.
9588         (struct target_ops) <all delegation methods>: Replace by C++
9589         virtual methods, and drop "to_" prefix.  All references updated
9590         throughout.
9591         <to_shortname, to_longname, to_doc, to_data,
9592         to_have_steppable_watchpoint, to_have_continuable_watchpoint,
9593         to_has_thread_control, to_attach_no_wait>: Delete, replaced by
9594         virtual methods.  All references updated throughout.
9595         <can_attach, supports_terminal_ours, can_create_inferior,
9596         get_thread_control_capabilities, attach_no_wait>: New
9597         virtual methods.
9598         <insert_breakpoint, remove_breakpoint>: Now
9599         TARGET_DEFAULT_NORETURN methods.
9600         <info_proc>: Now returns bool.
9601         <to_magic>: Delete.
9602         (OPS_MAGIC): Delete.
9603         (current_target): Delete.  All references replaced by references
9604         to ...
9605         (target_stack): ... this.  New.
9606         (target_shortname, target_longname): Adjust.
9607         (target_can_run): Now a function declaration.
9608         (default_child_has_all_memory, default_child_has_memory)
9609         (default_child_has_stack, default_child_has_registers)
9610         (default_child_has_execution): Remove target_ops parameter.
9611         (complete_target_initialization): Delete.
9612         (memory_breakpoint_target): New template class.
9613         (test_target_ops): Refactor as a C++ class with virtual methods.
9614         * make-target-delegates (NAME_PART): Tighten.
9615         (POINTER_PART, CP_SYMBOL): New.
9616         (SIMPLE_RETURN_PART): Reimplement.
9617         (VEC_RETURN_PART): Expect less.
9618         (RETURN_PART, VIRTUAL_PART): New.
9619         (METHOD): Adjust to C++ virtual methods.
9620         (scan_target_h): Remove reference to C99.
9621         (dname): Output "target_ops::" prefix.
9622         (write_function_header): Adjust to output a C++ class method.
9623         (write_declaration): New.
9624         (write_delegator): Adjust to output a C++ class method.
9625         (tdname): Output "dummy_target::" prefix.
9626         (write_tdefault, write_debugmethod): Adjust to output a C++ class
9627         method.
9628         (tdefault_names, debug_names): Delete.
9629         (return_types, tdefaults, styles, argtypes_array): New.
9630         (top level): All methods are delegators.
9631         (print_class): New.
9632         (top level): Print dummy_target and debug_target classes.
9633         * target-delegates.c: Regenerate.
9634         * target-debug.h (target_debug_print_enum_info_proc_what)
9635         (target_debug_print_thread_control_capabilities)
9636         (target_debug_print_thread_info_p): New.
9637         * target.c (dummy_target): Delete.
9638         (the_dummy_target, the_debug_target): New.
9639         (target_stack): Now extern.
9640         (set_targetdebug): Push/unpush debug target.
9641         (default_child_has_all_memory, default_child_has_memory)
9642         (default_child_has_stack, default_child_has_registers)
9643         (default_child_has_execution): Remove target_ops parameter.
9644         (complete_target_initialization): Delete.
9645         (add_target_with_completer): No longer call
9646         complete_target_initialization.
9647         (target_supports_terminal_ours): Use regular delegation.
9648         (update_current_target): Delete.
9649         (push_target): No longer check magic number.  Don't call
9650         update_current_target.
9651         (unpush_target): Don't call update_current_target.
9652         (target_is_pushed): No longer check magic number.
9653         (target_require_runnable): Skip for all stratums over
9654         process_stratum.
9655         (target_ops::info_proc): New.
9656         (target_info_proc): Use find_target_at and
9657         find_default_run_target.
9658         (target_supports_disable_randomization): Use regular delegation.
9659         (target_get_osdata): Use find_target_at.
9660         (target_ops::open, target_ops::close, target_ops::can_attach)
9661         (target_ops::attach, target_ops::can_create_inferior)
9662         (target_ops::create_inferior, target_ops::can_run)
9663         (target_can_run): New.
9664         (default_fileio_target): Use regular delegation.
9665         (target_ops::fileio_open, target_ops::fileio_pwrite)
9666         (target_ops::fileio_pread, target_ops::fileio_fstat)
9667         (target_ops::fileio_close, target_ops::fileio_unlink)
9668         (target_ops::fileio_readlink): New.
9669         (target_fileio_open_1, target_fileio_unlink)
9670         (target_fileio_readlink): Always call the target method.  Handle
9671         FILEIO_ENOSYS.
9672         (return_zero, return_zero_has_execution): Delete.
9673         (init_dummy_target): Delete.
9674         (dummy_target::dummy_target, dummy_target::shortname)
9675         (dummy_target::longname, dummy_target::doc)
9676         (debug_target::debug_target, debug_target::shortname)
9677         (debug_target::longname, debug_target::doc): New.
9678         (target_supports_delete_record): Use regular delegation.
9679         (setup_target_debug): Delete.
9680         (maintenance_print_target_stack): Skip debug_stratum.
9681         (initialize_targets): Instantiate the_dummy_target and
9682         the_debug_target.
9683         * auxv.c (target_auxv_parse): Remove 'ops' parameter.  Adjust to
9684         use target_stack.
9685         (target_auxv_search, fprint_target_auxv): Adjust.
9686         (info_auxv_command): Adjust to use target_stack.
9687         * auxv.h (target_auxv_parse): Remove 'ops' parameter.
9688         * exceptions.c (print_flush): Handle a NULL target_stack.
9689         * regcache.c (target_ops_no_register): Refactor as class with
9690         virtual methods.
9691
9692         * exec.c (exec_target): New class.
9693         (exec_ops): Now an exec_target.
9694         (exec_open, exec_close_1, exec_get_section_table)
9695         (exec_xfer_partial, exec_files_info, exec_has_memory)
9696         (exec_make_note_section): Refactor as exec_target methods.
9697         (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
9698         Delete.
9699         (exec_target::find_memory_regions): New.
9700         (_initialize_exec): Don't call init_exec_ops.
9701         * gdbcore.h (exec_file_clear): Delete.
9702
9703         * corefile.c (core_target): Delete.
9704         (core_file_command): Adjust.
9705         * corelow.c (core_target): New class.
9706         (the_core_target): New.
9707         (core_close): Remove target_ops parameter.
9708         (core_close_cleanup): Adjust.
9709         (core_target::close): New.
9710         (core_open, core_detach, get_core_registers, core_files_info)
9711         (core_xfer_partial, core_thread_alive, core_read_description)
9712         (core_pid_to_str, core_thread_name, core_has_memory)
9713         (core_has_stack, core_has_registers, core_info_proc): Rework as
9714         core_target methods.
9715         (ignore, core_remove_breakpoint, init_core_ops): Delete.
9716         (_initialize_corelow): Initialize the_core_target.
9717         * gdbcore.h (core_target): Delete.
9718         (the_core_target): New.
9719
9720         * ctf.c: (ctf_target): New class.
9721         (ctf_ops): Now a ctf_target.
9722         (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
9723         (ctf_xfer_partial, ctf_get_trace_state_variable_value)
9724         (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
9725         methods.
9726         (init_ctf_ops): Delete.
9727         (_initialize_ctf): Don't call it.
9728         * tracefile-tfile.c (tfile_target): New class.
9729         (tfile_ops): Now a tfile_target.
9730         (tfile_open, tfile_close, tfile_files_info)
9731         (tfile_get_tracepoint_status, tfile_trace_find)
9732         (tfile_fetch_registers, tfile_xfer_partial)
9733         (tfile_get_trace_state_variable_value, tfile_traceframe_info):
9734         Refactor as tfile_target methods.
9735         (tfile_xfer_partial_features): Remove target_ops parameter.
9736         (init_tfile_ops): Delete.
9737         (_initialize_tracefile_tfile): Don't call it.
9738         * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
9739         (tracefile_has_stack, tracefile_has_registers)
9740         (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
9741         tracefile_target methods.
9742         (init_tracefile_ops): Delete.
9743         (tracefile_target::tracefile_target): New.
9744         * tracefile.h: Include "target.h".
9745         (tracefile_target): New class.
9746         (init_tracefile_ops): Delete.
9747
9748         * spu-multiarch.c (spu_multiarch_target): New class.
9749         (spu_ops): Now a spu_multiarch_target.
9750         (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
9751         (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
9752         (spu_search_memory, spu_mourn_inferior): Refactor as
9753         spu_multiarch_target methods.
9754         (init_spu_ops): Delete.
9755         (_initialize_spu_multiarch): Remove references to init_spu_ops,
9756         complete_target_initialization.
9757
9758         * ravenscar-thread.c (ravenscar_thread_target): New class.
9759         (ravenscar_ops): Now a ravenscar_thread_target.
9760         (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
9761         (ravenscar_thread_alive, ravenscar_pid_to_str)
9762         (ravenscar_fetch_registers, ravenscar_store_registers)
9763         (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
9764         (ravenscar_stopped_by_hw_breakpoint)
9765         (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
9766         (ravenscar_mourn_inferior, ravenscar_core_of_thread)
9767         (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
9768         methods.
9769         (init_ravenscar_thread_ops): Delete.
9770         (_initialize_ravenscar): Remove references to
9771         init_ravenscar_thread_ops and complete_target_initialization.
9772
9773         * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
9774         (bsd_uthread_target): New class.
9775         (bsd_uthread_ops): Now a bsd_uthread_target.
9776         (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
9777         (bsd_uthread_close, bsd_uthread_mourn_inferior)
9778         (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
9779         (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
9780         (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
9781         (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
9782         (bsd_uthread_target): Delete function.
9783         (_initialize_bsd_uthread): Remove reference to
9784         complete_target_initialization.
9785
9786         * bfd-target.c (target_bfd_data): Delete.  Fields folded into ...
9787         (target_bfd): ... this new class.
9788         (target_bfd_xfer_partial, target_bfd_get_section_table)
9789         (target_bfd_close): Refactor as target_bfd methods.
9790         (target_bfd::~target_bfd): New.
9791         (target_bfd_reopen): Adjust.
9792         (target_bfd::close): New.
9793
9794         * record-btrace.c (record_btrace_target): New class.
9795         (record_btrace_ops): Now a record_btrace_target.
9796         (record_btrace_open, record_btrace_stop_recording)
9797         (record_btrace_disconnect, record_btrace_close)
9798         (record_btrace_async, record_btrace_info)
9799         (record_btrace_insn_history, record_btrace_insn_history_range)
9800         (record_btrace_insn_history_from, record_btrace_call_history)
9801         (record_btrace_call_history_range)
9802         (record_btrace_call_history_from, record_btrace_record_method)
9803         (record_btrace_is_replaying, record_btrace_will_replay)
9804         (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
9805         (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
9806         (record_btrace_store_registers, record_btrace_prepare_to_store)
9807         (record_btrace_to_get_unwinder)
9808         (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
9809         (record_btrace_commit_resume, record_btrace_wait)
9810         (record_btrace_stop, record_btrace_can_execute_reverse)
9811         (record_btrace_stopped_by_sw_breakpoint)
9812         (record_btrace_supports_stopped_by_sw_breakpoint)
9813         (record_btrace_stopped_by_hw_breakpoint)
9814         (record_btrace_supports_stopped_by_hw_breakpoint)
9815         (record_btrace_update_thread_list, record_btrace_thread_alive)
9816         (record_btrace_goto_begin, record_btrace_goto_end)
9817         (record_btrace_goto, record_btrace_stop_replaying_all)
9818         (record_btrace_execution_direction)
9819         (record_btrace_prepare_to_generate_core)
9820         (record_btrace_done_generating_core): Refactor as
9821         record_btrace_target methods.
9822         (init_record_btrace_ops): Delete.
9823         (_initialize_record_btrace): Remove reference to
9824         init_record_btrace_ops.
9825         * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
9826         the execution_direction global.
9827         (record_full_base_target, record_full_target)
9828         (record_full_core_target): New classes.
9829         (record_full_ops): Now a record_full_target.
9830         (record_full_core_ops): Now a record_full_core_target.
9831         (record_full_target::detach, record_full_target::disconnect)
9832         (record_full_core_target::disconnect)
9833         (record_full_target::mourn_inferior, record_full_target::kill):
9834         New.
9835         (record_full_open, record_full_close, record_full_async): Refactor
9836         as methods of the record_full_base_target class.
9837         (record_full_resume, record_full_commit_resume): Refactor
9838         as methods of the record_full_target class.
9839         (record_full_wait, record_full_stopped_by_watchpoint)
9840         (record_full_stopped_data_address)
9841         (record_full_stopped_by_sw_breakpoint)
9842         (record_full_supports_stopped_by_sw_breakpoint)
9843         (record_full_stopped_by_hw_breakpoint)
9844         (record_full_supports_stopped_by_hw_breakpoint): Refactor as
9845         methods of the record_full_base_target class.
9846         (record_full_store_registers, record_full_xfer_partial)
9847         (record_full_insert_breakpoint, record_full_remove_breakpoint):
9848         Refactor as methods of the record_full_target class.
9849         (record_full_can_execute_reverse, record_full_get_bookmark)
9850         (record_full_goto_bookmark, record_full_execution_direction)
9851         (record_full_record_method, record_full_info, record_full_delete)
9852         (record_full_is_replaying, record_full_will_replay)
9853         (record_full_goto_begin, record_full_goto_end, record_full_goto)
9854         (record_full_stop_replaying): Refactor as methods of the
9855         record_full_base_target class.
9856         (record_full_core_resume, record_full_core_kill)
9857         (record_full_core_fetch_registers)
9858         (record_full_core_prepare_to_store)
9859         (record_full_core_store_registers, record_full_core_xfer_partial)
9860         (record_full_core_insert_breakpoint)
9861         (record_full_core_remove_breakpoint)
9862         (record_full_core_has_execution): Refactor
9863         as methods of the record_full_core_target class.
9864         (record_full_base_target::supports_delete_record): New.
9865         (init_record_full_ops): Delete.
9866         (init_record_full_core_ops): Delete.
9867         (record_full_save): Refactor as method of the
9868         record_full_base_target class.
9869         (_initialize_record_full): Remove references to
9870         init_record_full_ops and init_record_full_core_ops.
9871
9872         * remote.c (remote_target, extended_remote_target): New classes.
9873         (remote_ops): Now a remote_target.
9874         (extended_remote_ops): Now an extended_remote_target.
9875         (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
9876         (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
9877         (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
9878         (remote_pass_signals, remote_set_syscall_catchpoint)
9879         (remote_program_signals, )
9880         (remote_thread_always_alive): Remove target_ops parameter.
9881         (remote_thread_alive, remote_thread_name)
9882         (remote_update_thread_list, remote_threads_extra_info)
9883         (remote_static_tracepoint_marker_at)
9884         (remote_static_tracepoint_markers_by_strid)
9885         (remote_get_ada_task_ptid, remote_close, remote_start_remote)
9886         (remote_open): Refactor as methods of remote_target.
9887         (extended_remote_open, extended_remote_detach)
9888         (extended_remote_attach, extended_remote_post_attach):
9889         (extended_remote_supports_disable_randomization)
9890         (extended_remote_create_inferior): : Refactor as method of
9891         extended_remote_target.
9892         (remote_set_permissions, remote_open_1, remote_detach)
9893         (remote_follow_fork, remote_follow_exec, remote_disconnect)
9894         (remote_resume, remote_commit_resume, remote_stop)
9895         (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
9896         (remote_terminal_ours, remote_wait, remote_fetch_registers)
9897         (remote_prepare_to_store, remote_store_registers)
9898         (remote_flash_erase, remote_flash_done, remote_files_info)
9899         (remote_kill, remote_mourn, remote_insert_breakpoint)
9900         (remote_remove_breakpoint, remote_insert_watchpoint)
9901         (remote_watchpoint_addr_within_range)
9902         (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
9903         (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
9904         (remote_supports_stopped_by_sw_breakpoint)
9905         (remote_stopped_by_hw_breakpoint)
9906         (remote_supports_stopped_by_hw_breakpoint)
9907         (remote_stopped_by_watchpoint, remote_stopped_data_address)
9908         (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
9909         (remote_verify_memory): Refactor as methods of remote_target.
9910         (remote_write_qxfer, remote_read_qxfer): Remove target_ops
9911         parameter.
9912         (remote_xfer_partial, remote_get_memory_xfer_limit)
9913         (remote_search_memory, remote_rcmd, remote_memory_map)
9914         (remote_pid_to_str, remote_get_thread_local_address)
9915         (remote_get_tib_address, remote_read_description): Refactor as
9916         methods of remote_target.
9917         (remote_target::fileio_open, remote_target::fileio_pwrite)
9918         (remote_target::fileio_pread, remote_target::fileio_close): New.
9919         (remote_hostio_readlink, remote_hostio_fstat)
9920         (remote_filesystem_is_local, remote_can_execute_reverse)
9921         (remote_supports_non_stop, remote_supports_disable_randomization)
9922         (remote_supports_multi_process, remote_supports_cond_breakpoints)
9923         (remote_supports_enable_disable_tracepoint)
9924         (remote_supports_string_tracing)
9925         (remote_can_run_breakpoint_commands, remote_trace_init)
9926         (remote_download_tracepoint, remote_can_download_tracepoint)
9927         (remote_download_trace_state_variable, remote_enable_tracepoint)
9928         (remote_disable_tracepoint, remote_trace_set_readonly_regions)
9929         (remote_trace_start, remote_get_trace_status)
9930         (remote_get_tracepoint_status, remote_trace_stop)
9931         (remote_trace_find, remote_get_trace_state_variable_value)
9932         (remote_save_trace_data, remote_get_raw_trace_data)
9933         (remote_set_disconnected_tracing, remote_core_of_thread)
9934         (remote_set_circular_trace_buffer, remote_traceframe_info)
9935         (remote_get_min_fast_tracepoint_insn_len)
9936         (remote_set_trace_buffer_size, remote_set_trace_notes)
9937         (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
9938         (remote_disable_btrace, remote_teardown_btrace)
9939         (remote_read_btrace, remote_btrace_conf)
9940         (remote_augmented_libraries_svr4_read, remote_load)
9941         (remote_pid_to_exec_file, remote_can_do_single_step)
9942         (remote_execution_direction, remote_thread_handle_to_thread_info):
9943         Refactor as methods of remote_target.
9944         (init_remote_ops, init_extended_remote_ops): Delete.
9945         (remote_can_async_p, remote_is_async_p, remote_async)
9946         (remote_thread_events, remote_upload_tracepoints)
9947         (remote_upload_trace_state_variables): Refactor as methods of
9948         remote_target.
9949         (_initialize_remote): Remove references to init_remote_ops and
9950         init_extended_remote_ops.
9951
9952         * remote-sim.c (gdbsim_target): New class.
9953         (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
9954         (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
9955         (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
9956         (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
9957         (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
9958         (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
9959         Refactor as methods of gdbsim_target.
9960         (gdbsim_ops): Now a gdbsim_target.
9961         (init_gdbsim_ops): Delete.
9962         (gdbsim_cntrl_c): Adjust.
9963         (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
9964
9965         * amd64-linux-nat.c (amd64_linux_nat_target): New class.
9966         (the_amd64_linux_nat_target): New.
9967         (amd64_linux_fetch_inferior_registers)
9968         (amd64_linux_store_inferior_registers): Refactor as methods of
9969         amd64_linux_nat_target.
9970         (_initialize_amd64_linux_nat): Adjust.  Set linux_target.
9971         * i386-linux-nat.c: Don't include "linux-nat.h".
9972         (i386_linux_nat_target): New class.
9973         (the_i386_linux_nat_target): New.
9974         (i386_linux_fetch_inferior_registers)
9975         (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
9976         as methods of i386_linux_nat_target.
9977         (_initialize_i386_linux_nat): Adjust.  Set linux_target.
9978         * inf-child.c (inf_child_ops): Delete.
9979         (inf_child_fetch_inferior_registers)
9980         (inf_child_store_inferior_registers): Delete.
9981         (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
9982         methods of inf_child_target.
9983         (inf_child_target::supports_terminal_ours)
9984         (inf_child_target::terminal_init)
9985         (inf_child_target::terminal_inferior)
9986         (inf_child_target::terminal_ours_for_output)
9987         (inf_child_target::terminal_ours, inf_child_target::interrupt)
9988         (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
9989         New.
9990         (inf_child_open, inf_child_disconnect, inf_child_close)
9991         (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
9992         (inf_child_post_startup_inferior, inf_child_can_run)
9993         (inf_child_pid_to_exec_file): Refactor as methods of
9994         inf_child_target.
9995         (inf_child_follow_fork): Delete.
9996         (inf_child_target::can_create_inferior)
9997         (inf_child_target::can_attach): New.
9998         (inf_child_target::has_all_memory, inf_child_target::has_memory)
9999         (inf_child_target::has_stack, inf_child_target::has_registers)
10000         (inf_child_target::has_execution): New.
10001         (inf_child_fileio_open, inf_child_fileio_pwrite)
10002         (inf_child_fileio_pread, inf_child_fileio_fstat)
10003         (inf_child_fileio_close, inf_child_fileio_unlink)
10004         (inf_child_fileio_readlink, inf_child_use_agent)
10005         (inf_child_can_use_agent): Refactor as methods of
10006         inf_child_target.
10007         (return_zero, inf_child_target): Delete.
10008         (inf_child_target::inf_child_target): New.
10009         * inf-child.h: Include "target.h".
10010         (inf_child_target): Delete function prototype.
10011         (inf_child_target): New class.
10012         (inf_child_open_target, inf_child_mourn_inferior)
10013         (inf_child_maybe_unpush_target): Delete.
10014         * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
10015         (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
10016         (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
10017         (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
10018         (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
10019         (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
10020         (inf_ptrace_wait, inf_ptrace_xfer_partial)
10021         (inf_ptrace_thread_alive, inf_ptrace_files_info)
10022         (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
10023         methods of inf_ptrace_target.
10024         (inf_ptrace_target): Delete function.
10025         * inf-ptrace.h: Include "inf-child.h".
10026         (inf_ptrace_target): Delete function declaration.
10027         (inf_ptrace_target): New class.
10028         (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
10029         * linux-nat.c (linux_target): New.
10030         (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
10031         (linux_nat_target::~linux_nat_target): New.
10032         (linux_child_post_attach, linux_child_post_startup_inferior)
10033         (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
10034         (linux_child_remove_fork_catchpoint)
10035         (linux_child_insert_vfork_catchpoint)
10036         (linux_child_remove_vfork_catchpoint)
10037         (linux_child_insert_exec_catchpoint)
10038         (linux_child_remove_exec_catchpoint)
10039         (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
10040         (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
10041         (linux_nat_resume, linux_nat_stopped_by_watchpoint)
10042         (linux_nat_stopped_data_address)
10043         (linux_nat_stopped_by_sw_breakpoint)
10044         (linux_nat_supports_stopped_by_sw_breakpoint)
10045         (linux_nat_stopped_by_hw_breakpoint)
10046         (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
10047         (linux_nat_kill, linux_nat_mourn_inferior)
10048         (linux_nat_xfer_partial, linux_nat_thread_alive)
10049         (linux_nat_update_thread_list, linux_nat_pid_to_str)
10050         (linux_nat_thread_name, linux_child_pid_to_exec_file)
10051         (linux_child_static_tracepoint_markers_by_strid)
10052         (linux_nat_is_async_p, linux_nat_can_async_p)
10053         (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
10054         (linux_nat_supports_multi_process)
10055         (linux_nat_supports_disable_randomization, linux_nat_async)
10056         (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
10057         (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
10058         (linux_nat_fileio_open, linux_nat_fileio_readlink)
10059         (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
10060         methods of linux_nat_target.
10061         (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
10062         (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
10063         parameter.
10064         (check_stopped_by_watchpoint): Adjust.
10065         (linux_xfer_partial): Delete.
10066         (linux_target_install_ops, linux_target, linux_nat_add_target):
10067         Delete.
10068         (linux_nat_target::linux_nat_target): New.
10069         * linux-nat.h: Include "inf-ptrace.h".
10070         (linux_nat_target): New.
10071         (linux_target, linux_target_install_ops, linux_nat_add_target):
10072         Delete function declarations.
10073         (linux_target): Declare global.
10074         * linux-thread-db.c (thread_db_target): New.
10075         (thread_db_target::thread_db_target): New.
10076         (thread_db_ops): Delete.
10077         (the_thread_db_target): New.
10078         (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
10079         (thread_db_update_thread_list, thread_db_pid_to_str)
10080         (thread_db_extra_thread_info)
10081         (thread_db_thread_handle_to_thread_info)
10082         (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
10083         (thread_db_resume): Refactor as methods of thread_db_target.
10084         (init_thread_db_ops): Delete.
10085         (_initialize_thread_db): Remove reference to init_thread_db_ops.
10086         * x86-linux-nat.c: Don't include "linux-nat.h".
10087         (super_post_startup_inferior): Delete.
10088         (x86_linux_nat_target::~x86_linux_nat_target): New.
10089         (x86_linux_child_post_startup_inferior)
10090         (x86_linux_read_description, x86_linux_enable_btrace)
10091         (x86_linux_disable_btrace, x86_linux_teardown_btrace)
10092         (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
10093         methods of x86_linux_nat_target.
10094         (x86_linux_create_target): Delete.  Bits folded ...
10095         (x86_linux_add_target): ... here.  Now takes a linux_nat_target
10096         pointer.
10097         * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
10098         (x86_linux_nat_target): New class.
10099         (x86_linux_create_target): Delete.
10100         (x86_linux_add_target): Now takes a linux_nat_target pointer.
10101         * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
10102         (x86_region_ok_for_watchpoint, x86_stopped_data_address)
10103         (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
10104         (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
10105         (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
10106         make extern.
10107         (x86_use_watchpoints): Delete.
10108         * x86-nat.h: Include "breakpoint.h" and "target.h".
10109         (x86_use_watchpoints): Delete.
10110         (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
10111         (x86_stopped_by_watchpoint, x86_stopped_data_address)
10112         (x86_insert_watchpoint, x86_remove_watchpoint)
10113         (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
10114         (x86_stopped_by_hw_breakpoint): New declarations.
10115         (x86_nat_target): New template class.
10116
10117         * ppc-linux-nat.c (ppc_linux_nat_target): New class.
10118         (the_ppc_linux_nat_target): New.
10119         (ppc_linux_fetch_inferior_registers)
10120         (ppc_linux_can_use_hw_breakpoint)
10121         (ppc_linux_region_ok_for_hw_watchpoint)
10122         (ppc_linux_ranged_break_num_registers)
10123         (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
10124         (ppc_linux_insert_mask_watchpoint)
10125         (ppc_linux_remove_mask_watchpoint)
10126         (ppc_linux_can_accel_watchpoint_condition)
10127         (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
10128         (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
10129         (ppc_linux_watchpoint_addr_within_range)
10130         (ppc_linux_masked_watch_num_registers)
10131         (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
10132         (ppc_linux_read_description): Refactor as methods of
10133         ppc_linux_nat_target.
10134         (_initialize_ppc_linux_nat): Adjust.  Set linux_target.
10135
10136         * procfs.c (procfs_xfer_partial): Delete forward declaration.
10137         (procfs_target): New class.
10138         (the_procfs_target): New.
10139         (procfs_target): Delete function.
10140         (procfs_auxv_parse, procfs_attach, procfs_detach)
10141         (procfs_fetch_registers, procfs_store_registers, procfs_wait)
10142         (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
10143         (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
10144         (procfs_create_inferior, procfs_update_thread_list)
10145         (procfs_thread_alive, procfs_pid_to_str)
10146         (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
10147         (procfs_stopped_data_address, procfs_insert_watchpoint)
10148         (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
10149         (proc_find_memory_regions, procfs_info_proc)
10150         (procfs_make_note_section): Refactor as methods of procfs_target.
10151         (_initialize_procfs): Adjust.
10152         * sol-thread.c (sol_thread_target): New class.
10153         (sol_thread_ops): Now a sol_thread_target.
10154         (sol_thread_detach, sol_thread_resume, sol_thread_wait)
10155         (sol_thread_fetch_registers, sol_thread_store_registers)
10156         (sol_thread_xfer_partial, sol_thread_mourn_inferior)
10157         (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
10158         (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
10159         (init_sol_thread_ops): Delete.
10160         (_initialize_sol_thread): Adjust.  Remove references to
10161         init_sol_thread_ops and complete_target_initialization.
10162
10163         * windows-nat.c (windows_nat_target): New class.
10164         (windows_fetch_inferior_registers)
10165         (windows_store_inferior_registers, windows_resume, windows_wait)
10166         (windows_attach, windows_detach, windows_pid_to_exec_file)
10167         (windows_files_info, windows_create_inferior)
10168         (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
10169         (windows_close, windows_pid_to_str, windows_xfer_partial)
10170         (windows_get_tib_address, windows_get_ada_task_ptid)
10171         (windows_thread_name, windows_thread_alive): Refactor as
10172         windows_nat_target methods.
10173         (do_initial_windows_stuff): Adjust.
10174         (windows_target): Delete function.
10175         (_initialize_windows_nat): Adjust.
10176
10177         * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
10178         (darwin_mourn_inferior, darwin_kill_inferior)
10179         (darwin_create_inferior, darwin_attach, darwin_detach)
10180         (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
10181         (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
10182         (darwin_supports_multi_process): Refactor as darwin_nat_target
10183         methods.
10184         (darwin_resume_to, darwin_files_info): Delete.
10185         (_initialize_darwin_inferior): Rename to ...
10186         (_initialize_darwin_nat): ... this.  Adjust to C++ification.
10187         * darwin-nat.h: Include "inf-child.h".
10188         (darwin_nat_target): New class.
10189         (darwin_complete_target): Delete.
10190         * i386-darwin-nat.c (i386_darwin_nat_target): New class.
10191         (darwin_target): New.
10192         (i386_darwin_fetch_inferior_registers)
10193         (i386_darwin_store_inferior_registers): Refactor as methods of
10194         darwin_nat_target.
10195         (darwin_complete_target): Delete, with ...
10196         (_initialize_i386_darwin_nat): ... bits factored out here.
10197
10198         * alpha-linux-nat.c (alpha_linux_nat_target): New class.
10199         (the_alpha_linux_nat_target): New.
10200         (alpha_linux_register_u_offset): Refactor as
10201         alpha_linux_nat_target method.
10202         (_initialize_alpha_linux_nat): Adjust.
10203         * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
10204         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
10205         (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
10206         methods of linux_nat_trad_target.
10207         (linux_trad_target): Delete.
10208         * linux-nat-trad.h (linux_trad_target): Delete function.
10209         (linux_nat_trad_target): New class.
10210         * mips-linux-nat.c (mips_linux_nat_target): New class.
10211         (super_fetch_registers, super_store_registers, super_close):
10212         Delete.
10213         (the_mips_linux_nat_target): New.
10214         (mips64_linux_regsets_fetch_registers)
10215         (mips64_linux_regsets_store_registers)
10216         (mips64_linux_fetch_registers, mips64_linux_store_registers)
10217         (mips_linux_register_u_offset, mips_linux_read_description)
10218         (mips_linux_can_use_hw_breakpoint)
10219         (mips_linux_stopped_by_watchpoint)
10220         (mips_linux_stopped_data_address)
10221         (mips_linux_region_ok_for_hw_watchpoint)
10222         (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
10223         (mips_linux_close): Refactor as methods of mips_linux_nat.
10224         (_initialize_mips_linux_nat): Adjust to C++ification.
10225
10226         * aix-thread.c (aix_thread_target): New class.
10227         (aix_thread_ops): Now an aix_thread_target.
10228         (aix_thread_detach, aix_thread_resume, aix_thread_wait)
10229         (aix_thread_fetch_registers, aix_thread_store_registers)
10230         (aix_thread_xfer_partial, aix_thread_mourn_inferior)
10231         (aix_thread_thread_alive, aix_thread_pid_to_str)
10232         (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
10233         Refactor as methods of aix_thread_target.
10234         (init_aix_thread_ops): Delete.
10235         (_initialize_aix_thread): Remove references to init_aix_thread_ops
10236         and complete_target_initialization.
10237         * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
10238         (rs6000_nat_target): New class.
10239         (the_rs6000_nat_target): New.
10240         (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
10241         (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
10242         (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
10243         (super_create_inferior): Delete.
10244         (_initialize_rs6000_nat): Adjust to C++ification.
10245
10246         * arm-linux-nat.c (arm_linux_nat_target): New class.
10247         (the_arm_linux_nat_target): New.
10248         (arm_linux_fetch_inferior_registers)
10249         (arm_linux_store_inferior_registers, arm_linux_read_description)
10250         (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
10251         (arm_linux_remove_hw_breakpoint)
10252         (arm_linux_region_ok_for_hw_watchpoint)
10253         (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
10254         (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
10255         (arm_linux_watchpoint_addr_within_range): Refactor as methods of
10256         arm_linux_nat_target.
10257         (_initialize_arm_linux_nat): Adjust to C++ification.
10258
10259         * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
10260         (the_aarch64_linux_nat_target): New.
10261         (aarch64_linux_fetch_inferior_registers)
10262         (aarch64_linux_store_inferior_registers)
10263         (aarch64_linux_child_post_startup_inferior)
10264         (aarch64_linux_read_description)
10265         (aarch64_linux_can_use_hw_breakpoint)
10266         (aarch64_linux_insert_hw_breakpoint)
10267         (aarch64_linux_remove_hw_breakpoint)
10268         (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
10269         (aarch64_linux_region_ok_for_hw_watchpoint)
10270         (aarch64_linux_stopped_data_address)
10271         (aarch64_linux_stopped_by_watchpoint)
10272         (aarch64_linux_watchpoint_addr_within_range)
10273         (aarch64_linux_can_do_single_step): Refactor as methods of
10274         aarch64_linux_nat_target.
10275         (super_post_startup_inferior): Delete.
10276         (_initialize_aarch64_linux_nat): Adjust to C++ification.
10277
10278         * hppa-linux-nat.c (hppa_linux_nat_target): New class.
10279         (the_hppa_linux_nat_target): New.
10280         (hppa_linux_fetch_inferior_registers)
10281         (hppa_linux_store_inferior_registers): Refactor as methods of
10282         hppa_linux_nat_target.
10283         (_initialize_hppa_linux_nat): Adjust to C++ification.
10284
10285         * ia64-linux-nat.c (ia64_linux_nat_target): New class.
10286         (the_ia64_linux_nat_target): New.
10287         (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
10288         (ia64_linux_stopped_data_address)
10289         (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
10290         (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
10291         ia64_linux_nat_target methods.
10292         (super_xfer_partial): Delete.
10293         (_initialize_ia64_linux_nat): Adjust to C++ification.
10294
10295         * m32r-linux-nat.c (m32r_linux_nat_target): New class.
10296         (the_m32r_linux_nat_target): New.
10297         (m32r_linux_fetch_inferior_registers)
10298         (m32r_linux_store_inferior_registers): Refactor as
10299         m32r_linux_nat_target methods.
10300         (_initialize_m32r_linux_nat): Adjust to C++ification.
10301
10302         * m68k-linux-nat.c (m68k_linux_nat_target): New class.
10303         (the_m68k_linux_nat_target): New.
10304         (m68k_linux_fetch_inferior_registers)
10305         (m68k_linux_store_inferior_registers): Refactor as
10306         m68k_linux_nat_target methods.
10307         (_initialize_m68k_linux_nat): Adjust to C++ification.
10308
10309         * s390-linux-nat.c (s390_linux_nat_target): New class.
10310         (the_s390_linux_nat_target): New.
10311         (s390_linux_fetch_inferior_registers)
10312         (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
10313         (s390_insert_watchpoint, s390_remove_watchpoint)
10314         (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
10315         (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
10316         (s390_auxv_parse, s390_read_description): Refactor as methods of
10317         s390_linux_nat_target.
10318         (_initialize_s390_nat): Adjust to C++ification.
10319
10320         * sparc-linux-nat.c (sparc_linux_nat_target): New class.
10321         (the_sparc_linux_nat_target): New.
10322         (_initialize_sparc_linux_nat): Adjust to C++ification.
10323         * sparc-nat.c (sparc_fetch_inferior_registers)
10324         (sparc_store_inferior_registers): Remove target_ops parameter.
10325         * sparc-nat.h (sparc_fetch_inferior_registers)
10326         (sparc_store_inferior_registers): Remove target_ops parameter.
10327         * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
10328         (the_sparc64_linux_nat_target): New.
10329         (_initialize_sparc64_linux_nat): Adjust to C++ification.
10330
10331         * spu-linux-nat.c (spu_linux_nat_target): New class.
10332         (the_spu_linux_nat_target): New.
10333         (spu_child_post_startup_inferior, spu_child_post_attach)
10334         (spu_child_wait, spu_fetch_inferior_registers)
10335         (spu_store_inferior_registers, spu_xfer_partial)
10336         (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
10337         methods.
10338         (_initialize_spu_nat): Adjust to C++ification.
10339
10340         * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
10341         (the_tilegx_linux_nat_target): New.
10342         (fetch_inferior_registers, store_inferior_registers):
10343         Refactor as methods.
10344         (_initialize_tile_linux_nat): Adjust to C++ification.
10345
10346         * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
10347         (the_xtensa_linux_nat_target): New.
10348         (xtensa_linux_fetch_inferior_registers)
10349         (xtensa_linux_store_inferior_registers): Refactor as
10350         xtensa_linux_nat_target methods.
10351         (_initialize_xtensa_linux_nat): Adjust to C++ification.
10352
10353         * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
10354         (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
10355         (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
10356         (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
10357         (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
10358         (fbsd_stopped_by_sw_breakpoint)
10359         (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
10360         (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
10361         (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
10362         (fbsd_post_startup_inferior, fbsd_post_attach)
10363         (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
10364         (fbsd_set_syscall_catchpoint)
10365         (super_xfer_partial, super_resume, super_wait)
10366         (fbsd_supports_stopped_by_hw_breakpoint): Delete.
10367         (fbsd_handle_debug_trap): Remove target_ops parameter.
10368         (fbsd_nat_add_target): Delete.
10369         * fbsd-nat.h: Include "inf-ptrace.h".
10370         (fbsd_nat_add_target): Delete.
10371         (USE_SIGTRAP_SIGINFO): Define.
10372         (fbsd_nat_target): New class.
10373
10374         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
10375         (amd64bsd_store_inferior_registers): Remove target_ops parameter.
10376         (amd64bsd_target): Delete.
10377         * amd64-bsd-nat.h: New file.
10378         * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
10379         "x86-bsd-nat.h".
10380         (amd64_fbsd_nat_target): New class.
10381         (the_amd64_fbsd_nat_target): New.
10382         (amd64fbsd_read_description): Refactor as method of
10383         amd64_fbsd_nat_target.
10384         (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
10385         (_initialize_amd64fbsd_nat): Adjust to C++ification.
10386         * amd64-nat.h (amd64bsd_target): Delete function declaration.
10387         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
10388         (i386bsd_store_inferior_registers): Remove target_ops parameter.
10389         (i386bsd_target): Delete.
10390         * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
10391         (i386bsd_fetch_inferior_registers)
10392         (i386bsd_store_inferior_registers): Declare.
10393         (i386_bsd_nat_target): New class.
10394         * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
10395         (the_i386_fbsd_nat_target): New.
10396         (i386fbsd_resume, i386fbsd_read_description): Refactor as
10397         i386_fbsd_nat_target methods.
10398         (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
10399         (_initialize_i386fbsd_nat): Adjust to C++ification.
10400         * x86-bsd-nat.c (super_mourn_inferior): Delete.
10401         (x86bsd_mourn_inferior, x86bsd_target): Delete.
10402         (_initialize_x86_bsd_nat): Adjust to C++ification.
10403         * x86-bsd-nat.h: Include "x86-nat.h".
10404         (x86bsd_target): Delete declaration.
10405         (x86bsd_nat_target): New class.
10406
10407         * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
10408         (the_aarch64_fbsd_nat_target): New.
10409         (aarch64_fbsd_fetch_inferior_registers)
10410         (aarch64_fbsd_store_inferior_registers): Refactor as methods of
10411         aarch64_fbsd_nat_target.
10412         (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
10413         * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
10414         (the_alpha_bsd_nat_target): New.
10415         (alphabsd_fetch_inferior_registers)
10416         (alphabsd_store_inferior_registers): Refactor as
10417         alpha_bsd_nat_target methods.
10418         (_initialize_alphabsd_nat): Refactor as methods of
10419         alpha_bsd_nat_target.
10420         * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
10421         (the_amd64_nbsd_nat_target): New.
10422         (_initialize_amd64nbsd_nat): Adjust to C++ification.
10423         * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
10424         (the_amd64_obsd_nat_target): New.
10425         (_initialize_amd64obsd_nat): Adjust to C++ification.
10426         * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
10427         (the_arm_fbsd_nat_target): New.
10428         (arm_fbsd_fetch_inferior_registers)
10429         (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
10430         (_initialize_arm_fbsd_nat): Refactor as methods of
10431         arm_fbsd_nat_target.
10432         (_initialize_arm_fbsd_nat): Adjust to C++ification.
10433         * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
10434         (the_arm_netbsd_nat_target): New.
10435         (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
10436         arm_netbsd_nat_target.
10437         (_initialize_arm_netbsd_nat): Adjust to C++ification.
10438         * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
10439         (the_hppa_nbsd_nat_target): New.
10440         (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
10441         hppa_nbsd_nat_target methods.
10442         (_initialize_hppanbsd_nat): Adjust to C++ification.
10443         * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
10444         (the_hppa_obsd_nat_target): New.
10445         (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
10446         methods of hppa_obsd_nat_target.
10447         (_initialize_hppaobsd_nat): Adjust to C++ification.  Use
10448         add_target.
10449         * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
10450         (_initialize_i386nbsd_nat): Adjust to C++ification.  Use
10451         add_target.
10452         * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
10453         (_initialize_i386obsd_nat): Use add_target.
10454         * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
10455         (the_m68k_bsd_nat_target): New.
10456         (m68kbsd_fetch_inferior_registers)
10457         (m68kbsd_store_inferior_registers): Refactor as methods of
10458         m68k_bsd_nat_target.
10459         (_initialize_m68kbsd_nat): Adjust to C++ification.
10460         * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
10461         (the_mips_fbsd_nat_target): New.
10462         (mips_fbsd_fetch_inferior_registers)
10463         (mips_fbsd_store_inferior_registers): Refactor as methods of
10464         mips_fbsd_nat_target.
10465         (_initialize_mips_fbsd_nat): Adjust to C++ification.  Use
10466         add_target.
10467         * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
10468         (the_mips_nbsd_nat_target): New.
10469         (mipsnbsd_fetch_inferior_registers)
10470         (mipsnbsd_store_inferior_registers): Refactor as methods of
10471         mips_nbsd_nat_target.
10472         (_initialize_mipsnbsd_nat): Adjust to C++ification.
10473         * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
10474         (the_mips64_obsd_nat_target): New.
10475         (mips64obsd_fetch_inferior_registers)
10476         (mips64obsd_store_inferior_registers): Refactor as methods of
10477         mips64_obsd_nat_target.
10478         (_initialize_mips64obsd_nat): Adjust to C++ification.  Use
10479         add_target.
10480         * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
10481         nbsd_nat_target.
10482         * nbsd-nat.h: Include "inf-ptrace.h".
10483         (nbsd_nat_target): New class.
10484         * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
10485         (obsd_wait): Refactor as methods of obsd_nat_target.
10486         (obsd_add_target): Delete.
10487         * obsd-nat.h: Include "inf-ptrace.h".
10488         (obsd_nat_target): New class.
10489         * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
10490         (the_ppc_fbsd_nat_target): New.
10491         (ppcfbsd_fetch_inferior_registers)
10492         (ppcfbsd_store_inferior_registers): Refactor as methods of
10493         ppc_fbsd_nat_target.
10494         (_initialize_ppcfbsd_nat): Adjust to C++ification.  Use
10495         add_target.
10496         * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
10497         (the_ppc_nbsd_nat_target): New.
10498         (ppcnbsd_fetch_inferior_registers)
10499         (ppcnbsd_store_inferior_registers): Refactor as methods of
10500         ppc_nbsd_nat_target.
10501         (_initialize_ppcnbsd_nat): Adjust to C++ification.
10502         * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
10503         (the_ppc_obsd_nat_target): New.
10504         (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
10505         methods of ppc_obsd_nat_target.
10506         (_initialize_ppcobsd_nat): Adjust to C++ification.  Use
10507         add_target.
10508         * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
10509         (the_sh_nbsd_nat_target): New.
10510         (shnbsd_fetch_inferior_registers)
10511         (shnbsd_store_inferior_registers): Refactor as methods of
10512         sh_nbsd_nat_target.
10513         (_initialize_shnbsd_nat): Adjust to C++ification.
10514         * sparc-nat.c (sparc_xfer_wcookie): Make extern.
10515         (inf_ptrace_xfer_partial): Delete.
10516         (sparc_xfer_partial, sparc_target): Delete.
10517         * sparc-nat.h (sparc_fetch_inferior_registers)
10518         (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
10519         (sparc_target): Delete function declaration.
10520         (sparc_target): New template class.
10521         * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
10522         (_initialize_sparcnbsd_nat): Adjust to C++ification.
10523         * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
10524         (_initialize_sparc64fbsd_nat): Adjust to C++ification.  Use
10525         add_target.
10526         * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
10527         (_initialize_sparc64nbsd_nat): Adjust to C++ification.
10528         * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
10529         (_initialize_sparc64obsd_nat): Adjust to C++ification.  Use
10530         add_target.
10531         * vax-bsd-nat.c (vax_bsd_nat_target): New class.
10532         (the_vax_bsd_nat_target): New.
10533         (vaxbsd_fetch_inferior_registers)
10534         (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
10535         methods.
10536         (_initialize_vaxbsd_nat): Adjust to C++ification.
10537
10538         * bsd-kvm.c (bsd_kvm_target): New class.
10539         (bsd_kvm_ops): Now a bsd_kvm_target.
10540         (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
10541         (bsd_kvm_files_info, bsd_kvm_fetch_registers)
10542         (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
10543         bsd_kvm_target.
10544         (bsd_kvm_return_one): Delete.
10545         (bsd_kvm_add_target): Adjust to C++ification.
10546
10547         * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
10548         (nto_procfs_target_procfs): New classes.
10549         (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
10550         (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
10551         (procfs_post_attach, procfs_wait, procfs_fetch_registers)
10552         (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
10553         (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
10554         (procfs_remove_hw_breakpoint, procfs_resume)
10555         (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
10556         (procfs_kill_inferior, procfs_store_registers)
10557         (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
10558         as methods of nto_procfs_target.
10559         (nto_procfs_ops): Now an nto_procfs_target_procfs.
10560         (nto_native_ops): Delete.
10561         (procfs_open, procfs_native_open): Delete.
10562         (nto_native_ops): Now an nto_procfs_target_native.
10563         (init_procfs_targets): Adjust to C++ification.
10564         (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
10565         (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
10566         Refactor as methods of nto_procfs_target.
10567
10568         * go32-nat.c (go32_nat_target): New class.
10569         (the_go32_nat_target): New.
10570         (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
10571         (go32_store_registers, go32_xfer_partial, go32_files_info)
10572         (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
10573         (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
10574         (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
10575         (go32_pid_to_str): Refactor as methods of go32_nat_target.
10576         (go32_target): Delete.
10577         (_initialize_go32_nat): Adjust to C++ification.
10578
10579         * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
10580         (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
10581         (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
10582         (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
10583         gnu_nat_target.
10584         (gnu_target): Delete.
10585         * gnu-nat.h (gnu_target): Delete.
10586         (gnu_nat_target): New class.
10587         * i386-gnu-nat.c (gnu_base_target): New.
10588         (i386_gnu_nat_target): New class.
10589         (the_i386_gnu_nat_target): New.
10590         (_initialize_i386gnu_nat): Adjust to C++ification.
10591
10592 2018-05-02  Pedro Alves  <palves@redhat.com>
10593
10594         * bfd-target.c (target_bfd_xclose): Rename to ...
10595         (target_bfd_close): ... this.
10596         (target_bfd_reopen): Adjust.
10597         * target.c (target_close): Remove references to to_xclose.
10598         * target.h (target_ops::to_xclose): Delete.
10599         (target_ops::to_close): Update comments.
10600
10601 2018-05-02  Pedro Alves  <palves@redhat.com>
10602
10603         * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
10604         "linux-nat.h".
10605         * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
10606         * inf-ptrace.c (inf_ptrace_register_u_offset)
10607         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
10608         (inf_ptrace_store_register, inf_ptrace_store_registers)
10609         (inf_ptrace_trad_target): Move to ...
10610         * linux-nat-trad.c: ... this new file.
10611         * linux-nat-trad.h: New file.
10612         * linux-nat.c (linux_target_install_ops): Make extern.
10613         (linux_trad_target): Delete.
10614         * linux-nat.h (linux_trad_target): Delete declaration.
10615         (linux_target_install_ops): Declare.
10616         * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
10617         "linux-nat.h".
10618
10619 2018-05-02  Pedro Alves  <palves@redhat.com>
10620
10621         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
10622         procfs_target/add_target here.
10623         * procfs.c (procfs_target): Make static.
10624         (_initialize_procfs): Call add_target here.
10625         * procfs.h (struct target_ops): Remove forward declaration.
10626         (procfs_target): Remove declaration.
10627         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
10628
10629 2018-05-02  Pedro Alves  <palves@redhat.com>
10630
10631         * procfs.c (procfs_stopped_by_watchpoint)
10632         (procfs_insert_watchpoint, procfs_remove_watchpoint)
10633         (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
10634         Forward declare.
10635         (procfs_use_watchpoints): Delete, move contents...
10636         (procfs_target): ... here.
10637         * procfs.h (procfs_use_watchpoints): Delete declaration.
10638         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
10639         procfs_use_watchpoints.
10640         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
10641         procfs_use_watchpoints.
10642
10643 2018-05-02  Tom Tromey  <tom@tromey.com>
10644
10645         PR python/20084:
10646         * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
10647         and var_zuinteger_unlimited.
10648         * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
10649         and PARAM_ZUINTEGER_UNLIMITED.
10650         (set_parameter_value): Handle var_zuinteger and
10651         var_zuinteger_unlimited.
10652         (add_setshow_generic): Likewise.
10653         (parmpy_init): Likewise.
10654
10655 2018-04-28  Dan Robertson  <danlrobertson89@gmail.com>
10656
10657         PR rust/23124
10658         * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
10659         pointer is not null before dereferencing it.
10660
10661 2018-04-30  Tom Tromey  <tom@tromey.com>
10662
10663         * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
10664         is_mi_like_p.
10665
10666 2018-04-30  Tom Tromey  <tom@tromey.com>
10667
10668         * breakpoint.c (mention): Remove use of is_mi_like_p.
10669         (print_mention_ranged_breakpoint): Likewise.
10670         * break-catch-throw.c (print_it_exception_catchpoint): Remove use
10671         of is_mi_like_p.
10672
10673 2018-04-30  Tom Tromey  <tom@tromey.com>
10674
10675         * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
10676
10677 2018-04-30  Tom Tromey  <tom@tromey.com>
10678
10679         * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
10680         (info_spu_event_command): Remove some uses of is_mi_like_p.
10681
10682 2018-04-30  Tom Tromey  <tom@tromey.com>
10683
10684         * python/py-framefilter.c (py_print_single_arg)
10685         (enumerate_locals, py_print_args, py_print_frame): Remove some
10686         uses of is_mi_like_p.
10687
10688 2018-04-30  Tom Tromey  <tom@tromey.com>
10689
10690         * ui-out.c: Update.
10691         * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
10692         * ui-out.h (ui_out::is_mi_like_p): Now const.
10693         (ui_out::do_is_mi_like_p): Now const.
10694         * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
10695
10696 2018-04-30  Tom Tromey  <tom@tromey.com>
10697
10698         * varobj.c (varobj_set_visualizer): Use new_reference.
10699         * python/python.c (gdbpy_decode_line): Use new_reference.
10700         * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
10701         new_reference.
10702
10703 2018-04-30  Tom Tromey  <tom@tromey.com>
10704
10705         * varobj.c (install_new_value): Use new_reference.
10706         * value.h (value_incref): Return void.  Swap intro comment with
10707         value_decref.
10708         * value.c (set_value_parent): Use new_reference.
10709         (value_incref): Return void.  Update intro comment.
10710         (release_value): Use new_reference.
10711         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
10712
10713 2018-04-30  Tom Tromey  <tom@tromey.com>
10714
10715         * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
10716         * gdb_bfd.h (new_bfd_ref): Remove.
10717         (gdb_bfd_open): Update comment.
10718         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
10719         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
10720         (gdb_bfd_fdopenr): Use new_reference.
10721         * exec.c (exec_file_attach): Use new_reference.
10722
10723 2018-04-30  Tom Tromey  <tom@tromey.com>
10724
10725         * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
10726         method.
10727
10728 2018-04-30  Tom Tromey  <tom@tromey.com>
10729
10730         * jit.c (jit_read_code_entry): Use type_align.
10731         * i386-tdep.c (i386_gdbarch_init): Don't call
10732         set_gdbarch_long_long_align_bit.
10733         * gdbarch.sh: Remove long_long_align_bit.
10734         * gdbarch.c, gdbarch.h: Rebuild.
10735         * arc-tdep.c (arc_type_align): New function.
10736         (arc_gdbarch_init): Use arc_type_align.  Don't call
10737         set_gdbarch_long_long_align_bit.
10738
10739 2018-04-30  Tom Tromey  <tom@tromey.com>
10740
10741         * rust-lang.c (rust_type_alignment): Remove.
10742         (rust_composite_type): Use type_align.
10743
10744 2018-04-30  Tom Tromey  <tom@tromey.com>
10745
10746         * NEWS: Mention Type.align.
10747         * python/py-type.c (typy_get_alignof): New function.
10748         (type_object_getset): Add "alignof".
10749
10750 2018-04-30  Tom Tromey  <tom@tromey.com>
10751
10752         PR exp/17095:
10753         * NEWS: Update.
10754         * std-operator.def (UNOP_ALIGNOF): New operator.
10755         * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
10756         New.
10757         * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
10758         * c-lang.c (c_op_print_tab): Add alignof.
10759         * c-exp.y (ALIGNOF): New token.
10760         (exp): Add "ALIGNOF" production.
10761         (ident_tokens): Add _Alignof and alignof.
10762
10763 2018-04-30  Tom Tromey  <tom@tromey.com>
10764
10765         * i386-tdep.c (i386_type_align): New function.
10766         (i386_gdbarch_init): Update.
10767         * gdbarch.sh (type_align): New method.
10768         * gdbarch.c, gdbarch.h: Rebuild.
10769         * arch-utils.h (default_type_align): Declare.
10770         * arch-utils.c (default_type_align): New function.
10771         * gdbtypes.h (TYPE_ALIGN_BITS): New define.
10772         (struct type) <align_log2>: New field.
10773         <instance_flags>: Now a bitfield.
10774         (TYPE_RAW_ALIGN): New macro.
10775         (type_align, type_raw_align, set_type_align): Declare.
10776         * gdbtypes.c (type_align, type_raw_align, set_type_align): New
10777         functions.
10778         * dwarf2read.c (quirk_rust_enum): Set type alignment.
10779         (get_alignment, maybe_set_alignment): New functions.
10780         (read_structure_type, read_enumeration_type, read_array_type)
10781         (read_set_type, read_tag_pointer_type, read_tag_reference_type)
10782         (read_subrange_type, read_base_type): Set type alignment.
10783
10784 2018-04-30  Simon Marchi  <simon.marchi@ericsson.com>
10785
10786         * dwarf2read.c (read_index_from_section): Use bool.
10787
10788 2018-04-29  Fabian Groffen  <grobian@gentoo.org>
10789
10790         PR gdb/22950
10791         * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
10792         with #ifdef.
10793
10794 2018-04-29  John Reiser  <jreiser@BitWagon.com>
10795
10796         PR build/22873
10797         * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
10798         last step, and do it atomically.
10799
10800 2018-04-27  Alexandre Oliva  <aoliva@redhat.com>
10801
10802         * compile/compile-c-types.c (convert_int, convert_float):
10803         Update for C FE v1.
10804
10805 2018-04-27  Tom Tromey  <tom@tromey.com>
10806
10807         PR rust/22545:
10808         * rust-lang.c (rust_inclusive_range_type_p): New function.
10809         (rust_range): Handle inclusive ranges.
10810         (rust_compute_range): Likewise.
10811         * rust-exp.y (struct rust_op) <inclusive>: New field.
10812         (DOTDOTEQ): New constant.
10813         (range_expr): Add "..=" productions.
10814         (operator_tokens): Add "..=" token.
10815         (ast_range): Add "inclusive" parameter.
10816         (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
10817         ranges.
10818         * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
10819         bounds values.
10820         * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
10821         LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
10822         Update comments.
10823         * expprint.c (print_subexp_standard): Handle new bounds values.
10824         (dump_subexp_body_standard): Likewise.
10825
10826 2018-04-27  Tom Tromey  <tom@tromey.com>
10827
10828         * configure: Rebuild.
10829         * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
10830         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
10831         "OVERRIDE".
10832         (class symbol_needs_eval_context): Likewise.
10833         * dwarf2read.c (mock_mapped_index::symbol_name_count)
10834         (mock_mapped_index::symbol_name_at): Use "override".  Remove
10835         "virtual".
10836         * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
10837         "override".
10838         (class dwarf_expr_executor): Use "override", not "OVERRIDE".
10839         * aarch64-tdep.c (instruction_reader::read): Use "override".
10840         (instruction_reader_test::read): Likewise.
10841         * arm-tdep.c (instruction_reader::read): Use "override".
10842         (instruction_reader_thumb::read): Likewise.
10843
10844 2018-04-26  Andrzej Kaczmarek  <andrzej.kaczmarek@codecoup.pl>
10845
10846         PR remote/9665
10847         * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
10848         instead of remote_send.
10849         (remote_send): Remove.
10850
10851 2018-04-26  Pedro Alves  <palves@redhat.com>
10852
10853         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
10854         find_function_start_sal instead of find_pc_line.
10855
10856 2018-04-26  Pedro Alves  <palves@redhat.com>
10857
10858         * breakpoint.c (set_breakpoint_location_function): Handle
10859         mst_data_gnu_ifunc.
10860         * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
10861         * elfread.c (elf_symtab_read): Give data symbols with
10862         BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
10863         (elf_rel_plt_read): Update comment.
10864         * linespec.c (convert_linespec_to_sals): Handle
10865         mst_data_gnu_ifunc.
10866         (minsym_found): Handle mst_data_gnu_ifunc.
10867         * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
10868         (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
10869         * parse.c (find_minsym_type_and_address): Handle
10870         mst_data_gnu_ifunc.
10871         * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
10872         * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
10873         * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
10874         comment.
10875         <mst_data_gnu_ifunc>: New enumerator.
10876
10877 2018-04-26  Pedro Alves  <palves@redhat.com>
10878
10879         * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
10880         (lookup_minimal_symbol_by_pc_section): ... this.  Replace
10881         'want_trampoline' parameter by a lookup_msym_prefer parameter.
10882         Handle it.
10883         (lookup_minimal_symbol_by_pc_section): Delete old implementation.
10884         (lookup_minimal_symbol_by_pc): Adjust.
10885         (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
10886         (lookup_solib_trampoline_symbol_by_pc): Adjust.
10887         * minsyms.h (lookup_msym_prefer): New enum.
10888         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
10889         parameter by a lookup_msym_prefer parameter.
10890
10891 2018-04-26  Pedro Alves  <palves@redhat.com>
10892
10893         * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
10894         ends in "@plt" instead of looking at the symbol's section.
10895
10896 2018-04-26  Pedro Alves  <palves@redhat.com>
10897
10898         * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete.  Remove
10899         all references.
10900         (find_pc_partial_function_gnu_ifunc): Rename to ...
10901         (find_pc_partial_function): ... this, and remove references to
10902         'is_gnu_ifunc_p'.
10903         (find_pc_partial_function): Delete old implementation.
10904         * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
10905
10906 2018-04-26  Pedro Alves  <palves@redhat.com>
10907
10908         * linespec.c (struct bound_minimal_symbol_search_key): New.
10909         (convert_linespec_to_sals): Sort minimal symbols earlier.  Don't
10910         skip first line if we found a GNU ifunc minimal symbol by name.
10911         (compare_msymbols): Change parameters to work with a destructured
10912         lhs minsym.
10913         (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
10914         functions.
10915
10916 2018-04-26  Pedro Alves  <palves@redhat.com>
10917
10918         * breakpoint.c (set_breakpoint_location_function): Don't resolve
10919         ifunc targets here.  Instead, if we have an ifunc minsym, use its
10920         address/name.
10921         (add_location_to_breakpoint): Store the minsym and the objfile in
10922         the breakpoint location.
10923         * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
10924         * linespec.c (minsym_found): Resolve GNU ifunc targets here.
10925         Record the minsym in the sal.
10926         * symtab.h (symtab_and_line) <msymbol>: New field.
10927
10928 2018-04-26  Pedro Alves  <palves@redhat.com>
10929
10930         * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
10931         unless we actually resolved the ifunc.
10932
10933 2018-04-26  Pedro Alves  <palves@redhat.com>
10934
10935         * c-exp.y (variable production): Prefer ifunc minsyms over
10936         regular function symbols.
10937         * symtab.c (find_gnu_ifunc): New function.
10938         * minsyms.h (lookup_msym_prefer): New enum.
10939         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
10940         parameter by a lookup_msym_prefer parameter.
10941         * symtab.h (find_gnu_ifunc): New declaration.
10942
10943 2018-04-26  Pedro Alves  <palves@redhat.com>
10944
10945         * blockframe.c (find_gnu_ifunc_target_type): New function.
10946         (find_function_type): New.
10947         * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
10948         return a value with a memory address.
10949         (eval_call): For calls to GNU ifunc functions, try to find the
10950         type of the target function from the type that the resolver
10951         returns.
10952         * gdbtypes.c (objfile_type): Don't install a return type for ifunc
10953         symbols.
10954         * infcall.c (find_function_return_type): Delete.
10955         (find_function_addr): Add 'function_type' parameter.  For calls to
10956         GNU ifunc functions, try to find the type of the target function
10957         from the type that the resolver returns, and return it via
10958         FUNCTION_TYPE.
10959         (call_function_by_hand_dummy): Adjust to use the function type
10960         returned by find_function_addr.
10961         (find_function_addr): Add 'function_type' parameter and move
10962         description here.
10963         * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
10964         declarations.
10965
10966 2018-04-26  Pedro Alves  <palves@redhat.com>
10967
10968         * c-exp.y (variable production): Skip finding an alias for ifunc
10969         symbols.
10970
10971 2018-04-26  Pedro Alves  <palves@redhat.com>
10972
10973         * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
10974
10975 2018-04-25  Pedro Alves  <palves@redhat.com>
10976
10977         * infcmd.c (kill_command): Print the pid as string, not the whole
10978         thread's ptid.  Add comment.  s/has been killed/killed/ in output
10979         message.
10980         * remote.c (remote_detach_1): Print the pid as string, not the
10981         whole thread's ptid.
10982
10983 2018-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
10984             Sergio Durigan Junior  <sergiodj@redhat.com>
10985             Pedro Alves  <palves@redhat.com>
10986
10987         * infcmd.c (kill_command): Print message when inferior has
10988         been killed.
10989         * inferior.c (print_inferior_events): Remove 'static'.  Set as
10990         '1'.
10991         (add_inferior): Improve message printed when
10992         'print_inferior_events' is on.
10993         (exit_inferior): Remove message printed when
10994         'print_inferior_events' is on.
10995         (detach_inferior): Improve message printed when
10996         'print_inferior_events' is on.
10997         (initialize_inferiors): Use 'add_inferior_silent' to set
10998         'current_inferior_'.
10999         * inferior.h (print_inferior_events): Declare here as
11000         'extern'.
11001         * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
11002         '[Detaching...]' messages when 'print_inferior_events' is on.
11003         Use 'add_thread_silent' instead of 'add_thread'.  Add '[' and ']'
11004         as prefix/suffix for messages.  Remove periods.  Fix erroneous
11005         'Detaching after fork from child...', replace it by '... from
11006         parent...'.
11007         (handle_vfork_child_exec_or_exit): Add '[' and ']' as
11008         prefix/suffix when printing 'Detaching...' messages.  Print
11009         them when 'print_inferior_events' is on.
11010         * remote.c (remote_detach_1): Print message when detaching
11011         from inferior and '!is_fork_parent'.
11012
11013 2018-04-24  Tom Tromey  <tom@tromey.com>
11014
11015         * cli-out.h: Reindent.
11016
11017 2018-04-24  Tom Tromey  <tom@tromey.com>
11018
11019         * cli-out.c (cli_ui_out::out_field_fmt): Remove.
11020         (cli_ui_out::do_field_string): Use fputs_filtered.
11021         * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
11022
11023 2018-04-23  Tom Tromey  <tom@tromey.com>
11024
11025         * guile/scm-frame.c (gdbscm_frame_read_var): Use
11026         gdb::unique_xmalloc_ptr.
11027
11028 2018-04-23  Tom Tromey  <tom@tromey.com>
11029
11030         * configure: Rebuild.
11031
11032 2018-04-22  Rajendra SY  <rajendra.sy@gmail.com>
11033
11034         PR gdb/23095
11035         * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
11036         prepare_for_testing.  Set normal_bp to r_debug_state if target
11037         is bsd.
11038
11039 2018-04-21  Pedro Alves  <palves@redhat.com>
11040             Rajendra SY  <rajendra.sy@gmail.com>
11041
11042         * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
11043         * remote.c (extended_remote_attach): In all-stop mode, mark the
11044         thread as executing.
11045
11046 2018-04-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
11047
11048         * thread.c (thread_apply_all_command): Fix comment.
11049         (thread_command): Fix comment.
11050
11051 2018-04-10  Alan Hayward  <alan.hayward@arm.com>
11052
11053         * common/tdesc.h (tdesc_create_feature): Remove xml filename
11054         parameter.
11055         * features/aarch64-core.c (create_feature_aarch64_core):
11056         Regenerate.
11057         * features/aarch64-fpu.c (create_feature_aarch64_fpu):
11058         Likewise.
11059         * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
11060         Likewise.
11061         * features/i386/32bit-avx512.c
11062         (create_feature_i386_32bit_avx512): Likewise.
11063         * features/i386/32bit-core.c (create_feature_i386_32bit_core):
11064         Likewise.
11065         * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
11066         Likewise.
11067         * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
11068         Likewise.
11069         * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
11070         Likewise.
11071         * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
11072         Likewise.
11073         * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
11074         Likewise.
11075         * features/i386/64bit-avx512.c
11076         (create_feature_i386_64bit_avx512): Likewise.
11077         * features/i386/64bit-core.c (create_feature_i386_64bit_core):
11078         Likewise.
11079         * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
11080         Likewise.
11081         * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
11082         Likewise.
11083         * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
11084         Likewise.
11085         * features/i386/64bit-segments.c
11086         (create_feature_i386_64bit_segments): Likewise.
11087         * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
11088         Likewise.
11089         * features/i386/x32-core.c
11090         (create_feature_i386_x32_core): Likewise.
11091         * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
11092         * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
11093         * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
11094         * target-descriptions.c: In generated code, don't pass xml
11095         filename.
11096
11097 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
11098
11099         * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
11100         (print_xml_feature::visit_post): Likewise.
11101         (print_xml_feature::visit): Likewise.
11102         * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
11103         (print_xml_feature): Add new class.
11104         * regformats/regdat.sh: Null xmltarget on feature targets.
11105         * target-descriptions.c (struct target_desc): Add xmltarget.
11106         (maintenance_check_tdesc_xml_convert): Add unittest function.
11107         (tdesc_get_features_xml): Add function to get xml.
11108         (maintenance_check_xml_descriptions): Test xml generation.
11109         * xml-tdesc.c (string_read_description_xml): Add function.
11110         * xml-tdesc.h (string_read_description_xml): Add declaration.
11111
11112 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
11113
11114         * features/Makefile: Add feature marker to targets with new style
11115         target descriptions.
11116         * regformats/aarch64.dat: Regenerate.
11117         * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
11118         * regformats/i386/amd64-avx-linux.dat: Likewise.
11119         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
11120         * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
11121         * regformats/i386/amd64-linux.dat: Likewise.
11122         * regformats/i386/amd64-mpx-linux.dat: Likewise.
11123         * regformats/i386/amd64.dat: Likewise.
11124         * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
11125         * regformats/i386/i386-avx-linux.dat: Likewise.
11126         * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
11127         * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
11128         * regformats/i386/i386-linux.dat: Likewise.
11129         * regformats/i386/i386-mmx-linux.dat: Likewise.
11130         * regformats/i386/i386-mpx-linux.dat: Likewise.
11131         * regformats/i386/i386.dat: Likewise.
11132         * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
11133         * regformats/i386/x32-avx-linux.dat: Likewise.
11134         * regformats/i386/x32-linux.dat: Likewise.
11135         * regformats/tic6x-c62x-linux.dat: Likewise.
11136         * regformats/tic6x-c64x-linux.dat: Likewise.
11137         * regformats/tic6x-c64xp-linux.dat: Likewise.
11138         * regformats/regdat.sh: Parse feature marker.
11139
11140 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
11141
11142         * common/tdesc.h (tdesc_architecture_name): Add new declaration.
11143         (tdesc_osabi_name): Likewise.
11144         * target-descriptions.c (tdesc_architecture_name): Add new
11145         function.
11146         (tdesc_osabi_name): Likewise.
11147
11148 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
11149
11150         * common/tdesc.c (tdesc_predefined_type): Move to here.
11151         (tdesc_named_type): Likewise.
11152         (tdesc_create_vector): Likewise.
11153         (tdesc_create_struct): Likewise.
11154         (tdesc_set_struct_size): Likewise.
11155         (tdesc_create_union): Likewise.
11156         (tdesc_create_flags): Likewise.
11157         (tdesc_create_enum): Likewise.
11158         (tdesc_add_field): Likewise.
11159         (tdesc_add_typed_bitfield): Likewise.
11160         (tdesc_add_bitfield): Likewise.
11161         (tdesc_add_flag): Likewise.
11162         (tdesc_add_enum_value): Likewise.
11163         * common/tdesc.h (struct tdesc_type_builtin): Likewise.
11164         (struct tdesc_type_vector): Likewise.
11165         (struct tdesc_type_field): Likewise.
11166         (struct tdesc_type_with_fields): Likewise.
11167         (tdesc_create_enum): Add declaration.
11168         (tdesc_add_typed_bitfield): Likewise.
11169         (tdesc_add_enum_value): Likewise.
11170         * target-descriptions.c (tdesc_type_field): Move from here.
11171         (tdesc_type_builtin): Likewise.
11172         (tdesc_type_vector): Likewise.
11173         (tdesc_type_with_fields): Likewise.
11174         (tdesc_predefined_types): Likewise.
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         * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
11188         (tdesc_add_typed_bitfield): Likewise.
11189         (tdesc_add_enum_value): Likewise.
11190
11191 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
11192
11193         * common/tdesc.c (tdesc_feature::accept): Move to here.
11194         (tdesc_feature::operator==): Likewise.
11195         (tdesc_create_reg): Likewise.
11196         * common/tdesc.h (tdesc_type_kind): Likewise.
11197         (struct tdesc_type): Likewise.
11198         (struct tdesc_feature): Likewise.
11199         * regformats/regdat.sh: Create a feature.
11200         * target-descriptions.c (tdesc_type_kind): Move from here.
11201         (tdesc_type): Likewise.
11202         (tdesc_type_up): Likewise.
11203         (tdesc_feature): Likewise.
11204         (tdesc_create_reg): Likewise.
11205
11206 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
11207
11208         * Makefile.in: Add arch/tdesc.c
11209         * common/tdesc.c: New file.
11210         * common/tdesc.h (tdesc_element_visitor): Move to here.
11211         (tdesc_element): Likewise.
11212         (tdesc_reg): Likewise.
11213         (tdesc_reg_up): Likewise.
11214         * regformats/regdef.h (reg): Add offset to constructors.
11215         * target-descriptions.c (tdesc_element_visitor): Move from here.
11216         (tdesc_element): Likewise.
11217         (tdesc_reg): Likewise.
11218         (tdesc_reg_up): Likewise.
11219
11220 2018-04-17  Tom Tromey  <tom@tromey.com>
11221
11222         * dwarf2read.c (quirk_rust_enum): Conditionally drop the
11223         discriminant field.
11224
11225 2018-04-17  Tom Tromey  <tom@tromey.com>
11226
11227         * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
11228
11229 2018-04-17  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11230
11231         * symtab.c (print_symbol_info): Skip printing filename and line
11232         number when `last' is NULL.
11233         (symtab_symbol_info): Use empty string instead of NULL for first
11234         invocation of print_symbol_info.
11235         (rbreak_command): Pass NULL to `last' parameter of
11236         print_symbol_info.
11237
11238 2018-04-16  Simon Marchi  <simon.marchi@ericsson.com>
11239
11240         * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
11241         instead of nullptr.
11242
11243 2018-04-16  Pedro Alves  <palves@redhat.com>
11244
11245         * MAINTAINERS (sh): Remove.
11246         * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
11247         (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
11248         (ALLDEPFILES): Remove sh64-tdep.c.
11249         * NEWS: Mentions that support for SH-5/SH64 is removed.
11250         * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
11251         (sh*-*-openbsd*): Ditto.
11252         (sh64-*-elf*): Remove.
11253         (sh*): Remove.
11254         * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
11255         * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
11256         * sh-tdep.c: No longer include "sh64-tdep.h".
11257         (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
11258         * sh64-tdep.c, sh64-tdep.h: Remove files.
11259
11260 2018-04-16  Pedro Alves  <palves@redhat.com>
11261
11262         * MAINTAINERS: Remove m88k.
11263         * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
11264         (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
11265         (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
11266         * NEWS: Mention that support for m88k was removed.
11267         * configure.host (m88*-*-*): Remove support.
11268         * configure.nat (m88k-*-*): Remove support.
11269         * configure.tgt (m88*-*-openbsd*): Remove.
11270         * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
11271
11272 2018-04-15  Simon Marchi  <simon.marchi@polymtl.ca>
11273
11274         * configure.tgt (x86_tobjs): New variable.
11275         (amd64_tobjs, i386_tobjs): Use it.
11276
11277 2018-04-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11278
11279         * symtab.c (print_symbol_info): Precede the symbol definition by
11280         the line number when available.
11281         * NEWS: Advertise this enhancement.
11282
11283 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
11284
11285         * NEWS (New options): announce set/show record btrace cpu.
11286         * btrace.c: Include record-btrace.h.
11287         (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
11288         the vendor is unknown.
11289         (btrace_compute_ftrace_1): Add cpu parameter.  Update callers.
11290         Maybe overwrite the btrace configuration's cpu.
11291         (btrace_compute_ftrace): Add cpu parameter.  Update callers.
11292         (btrace_fetch): Add cpu parameter.  Update callers.
11293         (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
11294         Maybe overwrite the btrace configuration's cpu.  Skip enabling
11295         errata workarounds if the vendor is unknown.
11296         * python/py-record-btrace.c: Include record-btrace.h.
11297         (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
11298         (recpy_bt_function_call_history): Call record_btrace_get_cpu.
11299         * record-btrace.c (record_btrace_cpu_state_kind): New.
11300         (record_btrace_cpu): New.
11301         (set_record_btrace_cpu_cmdlist): New.
11302         (record_btrace_get_cpu): New.
11303         (require_btrace_thread, record_btrace_info)
11304         (record_btrace_resume_thread): Call record_btrace_get_cpu.
11305         (cmd_set_record_btrace_cpu_none): New.
11306         (cmd_set_record_btrace_cpu_auto): New.
11307         (cmd_set_record_btrace_cpu): New.
11308         (cmd_show_record_btrace_cpu): New.
11309         (_initialize_record_btrace): Initialize set/show record btrace cpu
11310         commands.
11311         * record-btrace.h (record_btrace_get_cpu): New.
11312
11313 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
11314
11315         * record.c (set_record_command): Fix typo in message.
11316
11317 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
11318
11319         * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
11320
11321 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
11322
11323         * infrun.c (process_event_stop_test): Call
11324         gdbarch_in_indirect_branch_thunk.
11325         * gdbarch.sh (in_indirect_branch_thunk): New.
11326         * gdbarch.c: Regenerated.
11327         * gdbarch.h: Regenerated.
11328         * x86-tdep.h: New.
11329         * x86-tdep.c: New.
11330         * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
11331         (HFILES_NO_SRCDIR): Add x86-tdep.h.
11332         (ALLDEPFILES): Add x86-tdep.c.
11333         * arch-utils.h (default_in_indirect_branch_thunk): New.
11334         * arch-utils.c (default_in_indirect_branch_thunk): New.
11335         * i386-tdep: Include x86-tdep.h.
11336         (i386_in_indirect_branch_thunk): New.
11337         (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
11338         function.
11339         * amd64-tdep: Include x86-tdep.h.
11340         (amd64_in_indirect_branch_thunk): New.
11341         (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
11342
11343 2018-04-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
11344
11345         PR gdb/23053
11346         * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
11347         (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
11348         (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
11349         regression.
11350
11351 2018-04-12  Tom Tromey  <tom@tromey.com>
11352
11353         * rust-lang.c (rust_print_struct_def): Remove univariant code.
11354         (rust_evaluate_subexp): Likewise.
11355
11356 2018-04-12  Pedro Alves  <palves@redhat.com>
11357
11358         * procfs.c (procfs_detach): Make forward declaration's prototype
11359         match definition's protototype.
11360         (proc_get_LDT_entry): Remove stale do_cleanups call.
11361
11362 2018-04-12  Pedro Alves  <palves@redhat.com>
11363
11364         * target.h (target_ops::to_has_exited): Delete.
11365         (target_has_exited): Delete.
11366         * target-delegates.c: Regenerate.
11367
11368 2018-04-11  Pedro Alves  <palves@redhat.com>
11369
11370         * target.c (fileio_fh_t::t): Add comment.
11371         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
11372         (target_fileio_close): Handle a NULL target.
11373         (invalidate_fileio_fh): New.
11374         (target_close): Call it.
11375         * remote.c (remote_hostio_send_command): No longer check whether
11376         remote_desc is open.
11377
11378 2018-04-11  Pedro Alves  <palves@redhat.com>
11379
11380         * target.c (fileio_fh_t): Make it a named struct instead of a
11381         typedef.
11382         (fileio_fh_t::is_closed): New method.
11383         (DEF_VEC_O (fileio_fh_t)): Remove.
11384         (fileio_fhandles): Now a std::vector.
11385         (is_closed_fileio_fh): Delete.
11386         (acquire_fileio_fd): Adjust.  Rename parameters.
11387         (release_fileio_fd): Adjust.
11388         (fileio_fd_to_fh): Reimplement as a function instead of a macro.
11389         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
11390         (target_fileio_close): Adjust.
11391
11392 2018-04-10  Simon Marchi  <simon.marchi@ericsson.com>
11393
11394         * auto-load.c (auto_load_safe_path_vec_update): Iterate by
11395         index.
11396
11397 2018-04-10  Pedro Alves  <palves@redhat.com>
11398
11399         * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
11400         (scoped_finish_thread_state): New class.
11401         * infcmd.c (run_command_1): Use it instead of finish_thread_state
11402         cleanup.
11403         * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
11404         (fetch_inferior_event, normal_stop): Likewise.
11405         * thread.c (finish_thread_state_cleanup): Delete.
11406
11407 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11408             Pedro Alves  <palves@redhat.com>
11409
11410         * value.c: Include "selftest.h" and "common/array-view.h".
11411         (struct range) <operator ==>: New.
11412         (test_ranges_contain): New.
11413         (check_ranges_vector): New.
11414         (test_insert_into_bit_range_vector): New.
11415         (_initialize_values): Register selftests.
11416         * common/array-view.h (operator==, operator!=): New.
11417
11418 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11419
11420         * common/gdb_vecs.h (unordered_remove): Add overload that takes
11421         an iterator.
11422         * inline-frame.c: Include <algorithm>.
11423         (struct inline_state): Add constructor.
11424         (inline_state_s): Remove.
11425         (DEF_VEC_O(inline_state_s)): Remove.
11426         (inline_states): Change type to std::vector.
11427         (find_inline_frame_state): Adjust to std::vector.
11428         (allocate_inline_frame_state): Remove.
11429         (clear_inline_frame_state): Adjust to std::vector.
11430         (skip_inline_frames): Adjust to std::vector.
11431
11432 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11433
11434         * tracepoint.h (struct trace_state_variable): Add constructor.
11435         <name>: Change type to std::string.
11436         * tracepoint.c (tsv_s): Remove.
11437         (DEF_VEC_O(tsv_s)): Remove.
11438         (tvariables): Change to std::vector.
11439         (create_trace_state_variable): Adjust to std::vector.
11440         (find_trace_state_variable): Likewise.
11441         (find_trace_state_variable_by_number): Likewise.
11442         (delete_trace_state_variable): Likewise.
11443         (trace_variable_command): Adjust to std::string.
11444         (delete_trace_variable_command): Likewise.
11445         (tvariables_info_1): Adjust to std::vector.
11446         (save_trace_state_variables): Likewise.
11447         (start_tracing): Likewise.
11448         (merge_uploaded_trace_state_variables): Adjust to std::vector
11449         and std::string.
11450         * target.h (struct target_ops)
11451         <to_download_trace_state_variable>: Pass reference to
11452         trace_state_variable.
11453         * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
11454         * target-delegates.c: Re-generate.
11455         * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
11456         (mi_tsv_deleted): Likewise.
11457         * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
11458         * remote.c (remote_download_trace_state_variable): Change
11459         pointer to reference and adjust.
11460         * make-target-delegates (parse_argtypes): Handle references.
11461         (write_function_header): Likewise.
11462         (munge_type): Likewise.
11463
11464 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11465
11466         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11467         string_view-selftests.c.
11468         * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
11469         testsuite.
11470         * unittests/basic_string_view/cons/char/1.cc: Likewise.
11471         * unittests/basic_string_view/cons/char/2.cc: Likewise.
11472         * unittests/basic_string_view/cons/char/3.cc: Likewise.
11473         * unittests/basic_string_view/element_access/char/1.cc:
11474         Likewise.
11475         * unittests/basic_string_view/element_access/char/empty.cc:
11476         Likewise.
11477         * unittests/basic_string_view/element_access/char/front_back.cc:
11478         Likewise.
11479         * unittests/basic_string_view/inserters/char/2.cc: Likewise.
11480         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
11481         Likewise.
11482         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
11483         Likewise.
11484         * unittests/basic_string_view/modifiers/swap/char/1.cc:
11485         Likewise.
11486         * unittests/basic_string_view/operations/compare/char/1.cc:
11487         Likewise.
11488         * unittests/basic_string_view/operations/compare/char/13650.cc:
11489         Likewise.
11490         * unittests/basic_string_view/operations/copy/char/1.cc:
11491         Likewise.
11492         * unittests/basic_string_view/operations/data/char/1.cc:
11493         Likewise.
11494         * unittests/basic_string_view/operations/find/char/1.cc:
11495         Likewise.
11496         * unittests/basic_string_view/operations/find/char/2.cc:
11497         Likewise.
11498         * unittests/basic_string_view/operations/find/char/3.cc:
11499         Likewise.
11500         * unittests/basic_string_view/operations/find/char/4.cc:
11501         Likewise.
11502         * unittests/basic_string_view/operations/rfind/char/1.cc:
11503         Likewise.
11504         * unittests/basic_string_view/operations/rfind/char/2.cc:
11505         Likewise.
11506         * unittests/basic_string_view/operations/rfind/char/3.cc:
11507         Likewise.
11508         * unittests/basic_string_view/operations/substr/char/1.cc:
11509         Likewise.
11510         * unittests/basic_string_view/operators/char/2.cc: Likewise.
11511         * unittests/string_view-selftests.c: New file.
11512
11513 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11514
11515         * unittests/basic_string_view/capacity/1.cc: New file.
11516         * unittests/basic_string_view/capacity/empty_neg.cc: New file.
11517         * unittests/basic_string_view/cons/char/1.cc: New file.
11518         * unittests/basic_string_view/cons/char/2.cc: New file.
11519         * unittests/basic_string_view/cons/char/3.cc: New file.
11520         * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
11521         * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
11522         * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
11523         * unittests/basic_string_view/element_access/char/1.cc: New file.
11524         * unittests/basic_string_view/element_access/char/2.cc: New file.
11525         * unittests/basic_string_view/element_access/char/empty.cc: New file.
11526         * unittests/basic_string_view/element_access/char/front_back.cc: New file.
11527         * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
11528         * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
11529         * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
11530         * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
11531         * unittests/basic_string_view/include.cc: New file.
11532         * unittests/basic_string_view/inserters/char/1.cc: New file.
11533         * unittests/basic_string_view/inserters/char/2.cc: New file.
11534         * unittests/basic_string_view/inserters/char/3.cc: New file.
11535         * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
11536         * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
11537         * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
11538         * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
11539         * unittests/basic_string_view/literals/types.cc: New file.
11540         * unittests/basic_string_view/literals/values.cc: New file.
11541         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
11542         * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
11543         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
11544         * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
11545         * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
11546         * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
11547         * unittests/basic_string_view/operations/compare/char/1.cc: New file.
11548         * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
11549         * unittests/basic_string_view/operations/compare/char/2.cc: New file.
11550         * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
11551         * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
11552         * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
11553         * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
11554         * unittests/basic_string_view/operations/copy/char/1.cc: New file.
11555         * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
11556         * unittests/basic_string_view/operations/data/char/1.cc: New file.
11557         * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
11558         * unittests/basic_string_view/operations/find/char/1.cc: New file.
11559         * unittests/basic_string_view/operations/find/char/2.cc: New file.
11560         * unittests/basic_string_view/operations/find/char/3.cc: New file.
11561         * unittests/basic_string_view/operations/find/char/4.cc: New file.
11562         * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
11563         * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
11564         * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
11565         * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
11566         * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
11567         * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
11568         * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
11569         * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
11570         * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
11571         * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
11572         * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
11573         * unittests/basic_string_view/operations/substr/char/1.cc: New file.
11574         * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
11575         * unittests/basic_string_view/operators/char/2.cc: New file.
11576         * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
11577         * unittests/basic_string_view/range_access/char/1.cc: New file.
11578         * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
11579         * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
11580         * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
11581         * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
11582         * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
11583         * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
11584         * unittests/basic_string_view/requirements/typedefs.cc: New file.
11585         * unittests/basic_string_view/typedefs.cc: New file.
11586         * unittests/basic_string_view/types/1.cc: New file.
11587
11588 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11589
11590         * common/gdb_string_view.h: Remove libstdc++ implementation
11591         details, adjust to gdb reality.
11592         * common/gdb_string_view.tcc: Likewise.
11593         * cli/cli-script.c (struct string_view): Remove.
11594         (user_args) <m_args>: Change element type to gdb::string_view.
11595         (user_args::insert_args): Adjust.
11596
11597 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11598
11599         * common/gdb_string_view.h: New file.
11600         * common/gdb_string_view.tcc: New file.
11601
11602 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11603
11604         * ax_cxx_compile_stdcxx.m4: Sync with upstream.
11605         * configure: Re-generate.
11606
11607 2018-04-09  Pedro Alves  <palves@redhat.com>
11608
11609         * gdbarch.sh: Include "observable.h" instead of "observer.h".
11610         (set_target_gdbarch): Call
11611         gdb::observers::architecture_changed.notify instead of
11612         observer_notify_architecture_changed.
11613
11614 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11615
11616         * tracepoint.c (struct current_traceframe_cleanup): Remove.
11617         (do_restore_current_traceframe_cleanup): Remove.
11618         (restore_current_traceframe_cleanup_dtor): Remove.
11619         (make_cleanup_restore_current_traceframe): Remove.
11620         (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
11621         New.
11622         * tracepoint.h (struct scoped_restore_current_traceframe): New.
11623         * infrun.c (fetch_inferior_event): Use
11624         scoped_restore_current_traceframe.
11625
11626 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11627
11628         * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
11629         Remove.
11630         <n_allocated_type_units>: Remove.
11631         <all_type_units>: Change to std::vector.
11632         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
11633         to std::vector change.
11634         (dwarf2_per_objfile::get_cutu): Likewise.
11635         (dwarf2_per_objfile::get_tu): Likewise.
11636         (create_signatured_type_table_from_index): Likewise.
11637         (create_signatured_type_table_from_debug_names): Likewise.
11638         (dw2_symtab_iter_next): Likewise.
11639         (dw2_print_stats): Likewise.
11640         (dw2_expand_all_symtabs): Likewise.
11641         (dw2_expand_marked_cus): Likewise.
11642         (dw2_debug_names_iterator::next): Likewise.
11643         (dwarf2_initialize_objfile): Likewise.
11644         (add_signatured_type_cu_to_table): Likewise.
11645         (create_all_type_units): Likewise.
11646         (add_type_unit): Likewise.
11647         (struct tu_abbrev_offset): Add constructor.
11648         (build_type_psymtabs_1): Adjust to std::vector change.
11649         (print_tu_stats): Likewise.
11650         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
11651         (write_debug_names): Likewise.
11652
11653 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11654
11655         * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
11656         Make an std::vector.
11657         <n_comp_units>: Remove.
11658         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
11659         to std::vector change.
11660         (dwarf2_per_objfile::get_cutu): Likewise.
11661         (dwarf2_per_objfile::get_cu): Likewise.
11662         (create_cus_from_index): Likewise.
11663         (create_addrmap_from_index): Likewise.
11664         (create_addrmap_from_aranges): Likewise.
11665         (dwarf2_read_index): Likewise.
11666         (dw2_find_last_source_symtab): Likewise.
11667         (dw2_map_symtabs_matching_filename): Likewise.
11668         (dw2_symtab_iter_next): Likewise.
11669         (dw2_print_stats): Likewise.
11670         (dw2_expand_all_symtabs): Likewise.
11671         (dw2_expand_symtabs_with_fullname): Likewise.
11672         (dw2_expand_marked_cus): Likewise.
11673         (dw2_map_symbol_filenames): Likewise.
11674         (create_cus_from_debug_names): Likewise.
11675         (dwarf2_read_debug_names): Likewise.
11676         (dw2_debug_names_iterator::next): Likewise.
11677         (dwarf2_initialize_objfile): Likewise.
11678         (set_partial_user): Likewise.
11679         (dwarf2_build_psymtabs_hard): Likewise.
11680         (read_comp_units_from_section): Remove arguments, adjust to
11681         std::vector change.
11682         (create_all_comp_units): Adjust to std::vector and
11683         read_comp_units_from_section changes.
11684         (dwarf2_find_containing_comp_unit): Adjust to std::vector
11685         change.
11686         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
11687         (psyms_seen_size): Likewise.
11688         (write_gdbindex): Likewise.
11689         (write_debug_names): Likewise.
11690
11691 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11692
11693         * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
11694         with dwarf2_per_objfile.
11695         (create_cus_from_index): Likewise.
11696         (create_signatured_type_table_from_index): Likewise.
11697         (dwarf2_read_index): Likewise.
11698         (dwarf2_initialize_objfile): Likewise.
11699         (dwarf2_fetch_die_loc_sect_off):  Get dwarf2_per_objfile from
11700         per_cu rather than get_dwarf2_per_objfile.
11701
11702 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11703
11704         * dwarf2read.h (struct signatured_type): Forward declare.
11705         (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
11706         New methods.
11707         * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
11708         (dw2_get_cutu): ...this.
11709         (dwarf2_per_objfile::get_cu): Rename from...
11710         (dw2_get_cu): ...this.
11711         (dwarf2_per_objfile::get_tu): New.
11712         (create_addrmap_from_index): Adjust.
11713         (create_addrmap_from_aranges): Adjust.
11714         (dw2_find_last_source_symtab): Adjust.
11715         (dw2_map_symtabs_matching_filename): Adjust.
11716         (dw2_symtab_iter_next): Adjust.
11717         (dw2_print_stats): Adjust.
11718         (dw2_expand_all_symtabs): Adjust.
11719         (dw2_expand_symtabs_with_fullname): Adjust.
11720         (dw2_expand_marked_cus): Adjust.
11721         (dw_expand_symtabs_matching_file_matcher): Adjust.
11722         (dw2_map_symbol_filenames): Adjust.
11723         (dw2_debug_names_iterator::next): Adjust.
11724         (dwarf2_initialize_objfile): Adjust.
11725         (set_partial_user): Adjust.
11726         (dwarf2_build_psymtabs_hard): Adjust.
11727
11728 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11729
11730         * dwarf2read.c (create_signatured_type_table_from_debug_names):
11731         Remove unused variables.
11732         (dw2_map_symtabs_matching_filename): Likewise.
11733         (dwarf2_record_block_ranges): Likewise.
11734         (dwarf2_read_addr_index): Likewise.
11735         (follow_die_offset): Likewise.
11736
11737 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11738
11739         * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
11740         to symbol_file_add_main.
11741
11742 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11743
11744         PR mi/22299
11745         * mi/mi-console.c (do_fputc_async_safe): New.
11746         (mi_console_file::write_async_safe): New.
11747         (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
11748         * mi/mi-console.h (class mi_console_file) <write_async_safe>:
11749         New.
11750         * ui-file.c (ui_file::putstrn): Adjust call to
11751         fputstrn_unfiltered.
11752         * utils.c (printchar): Replace do_fputs and do_fprintf
11753         parameters by do_fputc.
11754         (fputstr_filtered): Adjust call to printchar.
11755         (fputstr_unfiltered): Likewise.
11756         (fputstrn_filtered): Likewise.
11757         (fputstrn_unfiltered): Add do_fputc parameter, pass to
11758         printchar.
11759         * utils.h (do_fputc_ftype): New typedef.
11760         (fputstrn_unfiltered): Add do_fputc parameter.
11761
11762 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11763
11764         * regformats/i386/i386-avx.dat: Remove.
11765
11766 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
11767
11768         PR gdb/22979
11769         * amd64-tdep.c (amd64_none_init_abi): New function.
11770         (amd64_x32_none_init_abi): New function.
11771         (_initialize_amd64_tdep): Register handlers for x86-64 and
11772         x64_32 with GDB_OSABI_NONE.
11773         * osabi.c (gdbarch_init_osabi): Allow running handlers for the
11774         GDB_OSABI_NONE osabi.
11775
11776 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
11777
11778         PR gdb/22980
11779         * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
11780         GDB_OSABI_NONE.
11781         * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
11782         * osabi.c (gdb_osabi_names): Add "unknown" entry.
11783
11784 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
11785
11786         * common/byte-vector.h (char_vector): New type.
11787         * target.h (target_read_alloc): Return
11788         gdb::optional<byte_vector>.
11789         (target_read_stralloc): Return gdb::optional<char_vector>.
11790         (target_get_osdata): Return gdb::optional<char_vector>.
11791         * target.c (target_read_alloc_1): Templatize.  Replacement
11792         manual memory management with vector.
11793         (target_read_alloc): Change return type, adjust.
11794         (target_read_stralloc): Change return type, adjust.
11795         (target_get_osdata): Change return type, adjust.
11796         * auxv.c (struct auxv_info) <length>: Remove.
11797         <data>: Change type to gdb::optional<byte_vector>.
11798         (auxv_inferior_data_cleanup): Free auxv_info with delete.
11799         (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
11800         (target_auxv_search): Adjust.
11801         (fprint_target_auxv): Adjust.
11802         * avr-tdep.c (avr_io_reg_read_command): Adjust.
11803         * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
11804         (linux_make_corefile_notes): Adjust.
11805         * osdata.c (get_osdata): Adjust.
11806         * remote.c (remote_get_threads_with_qxfer): Adjust.
11807         (remote_memory_map): Adjust.
11808         (remote_traceframe_info): Adjust.
11809         (btrace_read_config): Adjust.
11810         (remote_read_btrace): Adjust.
11811         (remote_pid_to_exec_file): Adjust.
11812         * solib-aix.c (solib_aix_get_library_list): Adjust.
11813         * solib-dsbt.c (decode_loadmap): Don't free buf.
11814         (dsbt_get_initial_loadmaps): Adjust.
11815         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
11816         * solib-target.c (solib_target_current_sos): Adjust.
11817         * tracepoint.c (sdata_make_value): Adjust.
11818         * xml-support.c (xinclude_start_include): Adjust.
11819         (xml_fetch_content_from_file): Adjust.
11820         * xml-support.h (xml_fetch_another): Change return type.
11821         (xml_fetch_content_from_file): Change return type.
11822         * xml-syscall.c (xml_init_syscalls_info): Adjust.
11823         * xml-tdesc.c (file_read_description_xml): Adjust.
11824         (fetch_available_features_from_target): Change return type.
11825         (target_fetch_description_xml): Adjust.
11826         (target_read_description_xml): Adjust.
11827
11828 2018-04-06  Tom Tromey  <tom@tromey.com>
11829
11830         * value.c (~value): Update.
11831         (struct value) <contents>: Now unique_xmalloc_ptr.
11832         (value_contents_bits_eq, allocate_value_contents)
11833         (value_contents_raw, value_contents_all_raw)
11834         (value_contents_for_printing, value_contents_for_printing_const)
11835         (set_value_enclosing_type): Update.
11836
11837 2018-04-06  Tom Tromey  <tom@tromey.com>
11838
11839         * value.c (range_s): Remove typedef, VEC.
11840         (struct range): Add operator<.
11841         (range_lessthan): Remove.
11842         (ranges_contain): Change type.
11843         (~value): Update.
11844         (struct value) <unavailable, optimized_out>: Now std::vector.
11845         (value_entirely_available)
11846         (value_entirely_covered_by_range_vector)
11847         (value_entirely_unavailable, value_entirely_optimized_out):
11848         Update.
11849         (insert_into_bit_range_vector): Change argument type.
11850         (find_first_range_overlap): Likewise.
11851         (struct ranges_and_idx, value_contents_bits_eq)
11852         (require_not_optimized_out, require_available): Update.
11853         (ranges_copy_adjusted): Change argument types.
11854         (value_optimized_out, value_copy, value_fetch_lazy): Update.
11855
11856 2018-04-06  Tom Tromey  <tom@tromey.com>
11857
11858         * value.c (~value): Update.
11859         (struct value) <parent>: Now a value_ref_ptr.
11860         (value_parent, set_value_parent, value_address, value_copy):
11861         Update.
11862
11863 2018-04-06  Tom Tromey  <tom@tromey.com>
11864
11865         * value.c (struct value): Add constructor, destructor, and member
11866         initializers.
11867         (allocate_value_lazy, value_decref): Update.
11868
11869 2018-04-06  Tom Tromey  <tom@tromey.com>
11870
11871         * value.c (struct value) <released, next>: Remove.
11872         (all_values): Now a std::vector.
11873         (allocate_value_lazy): Update.
11874         (value_next): Remove.
11875         (value_mark, value_free_to_mark, release_value)
11876         (value_release_to_mark): Update.
11877
11878 2018-04-06  Tom Tromey  <tom@tromey.com>
11879
11880         * value.h (fetch_subexp_value, value_release_to_mark): Update.
11881         (free_value_chain): Remove.
11882         * value.c (free_value_chain): Remove.
11883         (value_release_to_mark): Return a std::vector.
11884         * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
11885         std::vector.
11886         (check_condition): Update.
11887         * eval.c (fetch_subexp_value): Change "val_chain" to a
11888         std::vector.
11889         * breakpoint.c (update_watchpoint): Update.
11890         (can_use_hardware_watchpoint): Change "vals" to a std::vector.
11891
11892 2018-04-06  Tom Tromey  <tom@tromey.com>
11893
11894         * value.h (free_all_values): Remove.
11895         * value.c (free_all_values): Remove.
11896
11897 2018-04-06  Tom Tromey  <tom@tromey.com>
11898
11899         * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
11900         (value_history_chain, value_history_count): Remove.
11901         (value_history): New global.
11902         (record_latest_value, access_value_history, show_values)
11903         (preserve_values): Update.
11904
11905 2018-04-06  Tom Tromey  <tom@tromey.com>
11906
11907         * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
11908         * varobj.c (varobj_set_display_format, varobj_set_value)
11909         (install_default_visualizer, construct_visualizer)
11910         (install_new_value, ~varobj, varobj_get_value_type)
11911         (my_value_of_variable, varobj_editable_p): Update.
11912         * c-varobj.c (c_describe_child, c_value_of_variable)
11913         (cplus_number_of_children, cplus_describe_child): Update.
11914         * ada-varobj.c (ada_number_of_children, ada_name_of_child)
11915         (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
11916         (ada_value_of_variable, ada_value_is_changeable_p): Update.
11917
11918 2018-04-06  Tom Tromey  <tom@tromey.com>
11919
11920         * printcmd.c (last_examine_address): Change type to
11921         value_ref_ptr.
11922         (do_examine, x_command): Update.
11923
11924 2018-04-06  Tom Tromey  <tom@tromey.com>
11925
11926         * value.c (release_value): Update.
11927         * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
11928         (struct bpstats) <val>: Now a value_ref_ptr.
11929         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
11930         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
11931         (~watchpoint, print_it_watchpoint, watch_command_1)
11932         (invalidate_bp_value_on_memory_change): Update.
11933
11934 2018-04-06  Tom Tromey  <tom@tromey.com>
11935
11936         * varobj.c (varobj_clear_saved_item)
11937         (update_dynamic_varobj_children, install_new_value, ~varobj):
11938         Update.
11939         * value.h (value_incref): Move declaration earlier.
11940         (value_decref): Rename from value_free.
11941         (struct value_ref_policy): New.
11942         (value_ref_ptr): New typedef.
11943         (struct value_deleter): Remove.
11944         (gdb_value_up): Remove typedef.
11945         (release_value): Change return type.
11946         (release_value_or_incref): Remove.
11947         * value.c (set_value_parent): Update.
11948         (value_incref): Change return type.
11949         (value_decref): Rename from value_free.
11950         (value_free_to_mark, free_all_values, free_value_chain): Update.
11951         (release_value): Return value_ref_ptr.
11952         (release_value_or_incref): Remove.
11953         (record_latest_value, set_internalvar, clear_internalvar):
11954         Update.
11955         * stack.c (info_frame_command): Don't call value_free.
11956         * python/py-value.c (valpy_dealloc, valpy_new)
11957         (value_to_value_object): Update.
11958         * printcmd.c (do_examine): Update.
11959         * opencl-lang.c (lval_func_free_closure): Update.
11960         * mi/mi-main.c (register_changed_p): Don't call value_free.
11961         * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
11962         * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
11963         * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
11964         value_free.
11965         * guile/scm-value.c (vlscm_free_value_smob)
11966         (vlscm_scm_from_value): Update.
11967         * frame.c (frame_register_unwind, frame_unwind_register_signed)
11968         (frame_unwind_register_unsigned, get_frame_register_bytes)
11969         (put_frame_register_bytes): Don't call value_free.
11970         * findvar.c (address_from_register): Don't call value_free.
11971         * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
11972         * dwarf2loc.c (entry_data_value_free_closure)
11973         (value_of_dwarf_reg_entry, free_pieced_value_closure)
11974         (dwarf2_evaluate_loc_desc_full): Update.
11975         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
11976         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
11977         (~watchpoint, watch_command_1)
11978         (invalidate_bp_value_on_memory_change): Update.
11979         * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
11980
11981 2018-04-06  Simon Marchi  <simon.marchi@polymtl.ca>
11982
11983         PR gdb/23022
11984         * warning.m4: Add -Wno-error=deprecated-register.
11985         * configure: Re-generate.
11986
11987 2018-04-05  Tom Tromey  <tom@tromey.com>
11988
11989         * linespec.h: Remove include of "vec.h".
11990
11991 2018-04-05  Tom Tromey  <tom@tromey.com>
11992
11993         * linespec.c (typep): Remove typedef.
11994         (find_methods, find_superclass_methods): Take a std::vector.
11995         (find_method): Use std::vector.
11996
11997 2018-04-05  Tom Tromey  <tom@tromey.com>
11998
11999         * utils.c (compare_strings): Remove.
12000         * utils.h (compare_strings): Remove.
12001         * objc-lang.h (find_imps): Update.
12002         * objc-lang.c (find_methods): Take a std::vector.
12003         (uniquify_strings, find_imps): Likewise.
12004         * linespec.c (find_methods): Take a std::vector.
12005         (decode_objc): Use std::vector.
12006         (add_all_symbol_names_from_pspace, find_superclass_methods): Take
12007         a std::vector.
12008         (find_method, find_function_symbols): Use std::vector.
12009
12010 2018-04-05  Tom Tromey  <tom@tromey.com>
12011
12012         * completer.c (completion_tracker::completion_tracker): Remove
12013         cast.
12014         (completion_tracker::discard_completions): Likewise.
12015         * breakpoint.c (ambiguous_names_p): Remove cast.
12016         * ada-lang.c (_initialize_ada_language): Remove cast.
12017         * utils.h (streq): Update.
12018         (streq_hash): Add new declaration.
12019         * utils.c (streq): Return bool.
12020         (streq_hash): New function.
12021
12022 2018-04-05  Tom Tromey  <tom@tromey.com>
12023
12024         * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
12025         Remove a string copy.
12026
12027 2018-04-05  Tom Tromey  <tom@tromey.com>
12028
12029         * linespec.c (filter_results): Use std::vector.
12030         (decode_line_2, decode_line_full): Update.
12031
12032 2018-04-05  Tom Tromey  <tom@tromey.com>
12033
12034         * linespec.c (canonical_to_fullform): Return std::string.
12035         (filter_results): Update.
12036         (struct decode_line_2_item): Add constructor.
12037         <fullform, displayform>: Now std::string.
12038         (decode_line_2_compare_items): Now a std::sort comparator.
12039         (decode_line_2): Update.
12040
12041 2018-04-05  Tom Tromey  <tom@tromey.com>
12042
12043         * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
12044         (unexpected_linespec_error): Update.
12045         (linespec_parse_basic, parse_linespec): Update.
12046
12047 2018-04-05  Tom Tromey  <tom@tromey.com>
12048
12049         * linespec.c (linespec_parse_basic): Reindent.
12050
12051 2018-04-05  Tom Tromey  <tom@tromey.com>
12052
12053         * minsyms.h (iterate_over_minimal_symbols): Update.
12054         * minsyms.c (iterate_over_minimal_symbols): Take a
12055         gdb::function_view.
12056         * linespec.c (struct collect_minsyms): Remove.
12057         (compare_msyms): Now a std::sort comparator.
12058         (add_minsym): Add parameters.
12059         (search_minsyms_for_name): Update.  Use std::vector.
12060
12061 2018-04-03  Tom Tromey  <tom@tromey.com>
12062
12063         * mipsread.c (read_alphacoff_dynamic_symtab): Use
12064         gdb::byte_vector.
12065
12066 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
12067
12068         * MAINTAINERS (Write After Approval): Add Weimin Pan.
12069
12070 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
12071
12072         PR gdb/16959
12073         * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when 
12074         printing static type.
12075
12076 2018-04-01  Tom Tromey  <tom@tromey.com>
12077
12078         * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
12079         (rs6000_xfer_shared_libraries): Update.
12080
12081 2018-04-01  Simon Marchi  <simon.marchi@polymtl.ca>
12082
12083         * common/gdb_vecs.h (char_ptr): Remove.
12084         * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
12085
12086 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
12087
12088         * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
12089         with std::vector.
12090         * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
12091
12092 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
12093
12094         * tracepoint.h (struct uploaded_tp): Initialize fields.
12095         <actions, step_actions, cmd_strings>: Change type to
12096         std::vector<char *>.
12097         * tracepoint.c (get_uploaded_tp): Allocate with new.
12098         (free_uploaded_tps): Free with delete.
12099         (parse_tracepoint_definition): Adjust to std::vector change.
12100         * breakpoint.c (read_uploaded_action): Likewise.
12101         (create_tracepoint_from_upload): Likewise.
12102         * ctf.c (ctf_write_uploaded_tp): Likewise.
12103         (SET_ARRAY_FIELD): Likewise.
12104         * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
12105
12106 2018-03-30  Tom Tromey  <tom@tromey.com>
12107
12108         * solib-svr4.c (lm_info_read): Use gdb::byte_vector.  Return
12109         std::unique_ptr.
12110         (svr4_keep_data_in_core): Update.
12111         (svr4_read_so_list): Update.
12112
12113 2018-03-30  Tom Tromey  <tom@tromey.com>
12114
12115         * windows-nat.c (handle_output_debug_string, handle_exception):
12116         Update.
12117         * target.h (target_read_string): Update.
12118         * target.c (target_read_string): Change "string" to
12119         unique_xmalloc_ptr.
12120         * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
12121         Update.
12122         * solib-frv.c (frv_current_sos): Update.
12123         * solib-dsbt.c (dsbt_current_sos): Update.
12124         * solib-darwin.c (darwin_current_sos): Update.
12125         * linux-thread-db.c (inferior_has_bug): Update.
12126         * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
12127         Update.  Remove alloca.
12128         * ada-lang.c (ada_main_name): Update.
12129
12130 2018-03-30  Tom Tromey  <tom@tromey.com>
12131
12132         * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
12133         (struct dwo_file_deleter): New.
12134         (dwo_file_up): New typedef.
12135         (open_and_init_dwo_file): Use dwo_file_up.
12136         (free_dwo_file_cleanup): Remove.
12137
12138 2018-03-30  Tom Tromey  <tom@tromey.com>
12139
12140         * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
12141         (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
12142
12143 2018-03-30  Tom Tromey  <tom@tromey.com>
12144
12145         * dwarf2read.c (class free_cached_comp_units): New class.
12146         (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
12147         (free_cached_comp_units): Remove function.
12148
12149 2018-03-30  Tom Tromey  <tom@tromey.com>
12150
12151         * utils.h (make_cleanup_unpush_target): Remove.
12152         * inf-ptrace.c (struct target_unpusher): New.
12153         (target_unpush_up) New typedef.
12154         (inf_ptrace_create_inferior, inf_ptrace_attach): Use
12155         target_unpush_up.
12156         * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
12157
12158 2018-03-27  Tom Tromey  <tom@tromey.com>
12159
12160         * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
12161
12162 2018-03-27  Pedro Alves  <palves@redhat.com>
12163             Tom Tromey  <tom@tromey.com>
12164
12165         * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
12166         destructor.  Now a class.
12167         (gdb_readline_wrapper_cleanup): Remove function.
12168         (gdb_readline_wrapper): Remove cleanups.
12169
12170 2018-03-27  Tom Tromey  <tom@tromey.com>
12171
12172         * typeprint.h (struct type_print_options) <local_typedefs,
12173         global_typedefs>: Remove "struct" keyword.
12174         (class typedef_hash_table): New class.
12175         (recursively_update_typedef_hash, add_template_parameters)
12176         (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
12177         (find_typedef_in_hash): Don't declare.
12178         * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
12179         (typedef_hash_table::recursively_update): Rename from
12180         recursively_update_typedef_hash.  Now a member.
12181         (typedef_hash_table::add_template_parameters): Rename from
12182         add_template_parameters.  Now a member.
12183         (typedef_hash_table::typedef_hash_table): Now a constructor;
12184         rename from create_typedef_hash.
12185         (typedef_hash_table::~typedef_hash_table): Now a destructor;
12186         rename from free_typedef_hash.
12187         (do_free_typedef_hash, make_cleanup_free_typedef_hash)
12188         (do_free_global_table): Remove.
12189         (typedef_hash_table::typedef_hash_table): New constructor; renamed
12190         from copy_type_recursive.
12191         (create_global_typedef_table): Remove.
12192         (typedef_hash_table::find_global_typedef): Now a member of
12193         typedef_hash_table.
12194         (typedef_hash_table::find_typedef): Rename from
12195         find_typedef_in_hash; now a member.
12196         (whatis_exp): Update.
12197         * extension.h (struct ext_lang_type_printers): Add constructor and
12198         destructor.
12199         (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
12200         declare.
12201         * extension.c (ext_lang_type_printers::ext_lang_type_printers):
12202         Now a constructor; rename from start_ext_lang_type_printers.
12203         (ext_lang_type_printers): Now a destructor; rename from
12204         free_ext_lang_type_printers.
12205         * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
12206         Update.
12207         (c_type_print_base_struct_union): Update.  Remove cleanups.
12208
12209 2018-03-27  Tom Tromey  <tom@tromey.com>
12210
12211         * dwarf-index-write.c: Include <cmath>.
12212
12213 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
12214
12215         * NEWS: Add entry describing new "set|show varsize-limit" command.
12216         * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
12217         command.
12218         * printcmd.c (_initialize_printcmd): Add "set var" alias of
12219         "set variable".
12220
12221 2018-03-27  Simon Marchi  <simon.marchi@ericsson.com>
12222
12223         * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
12224         dwarf-index-write.c
12225         (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
12226         * dwarf-index-common.c: New file.
12227         * dwarf-index-common.h: New file.
12228         * dwarf-index-write.c: New file.
12229         * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
12230         (struct dwarf2_section_info): Move from here.
12231         (dwarf2_section_info_def): Likewise.
12232         (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
12233         (offset_type): Likewise.
12234         (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
12235         (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
12236         (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
12237         (byte_swap): Likewise.
12238         (MAYBE_SWAP): Likewise.
12239         (dwarf2_per_cu_ptr): Likewise.
12240         (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
12241         (struct tu_stats): Likewise.
12242         (struct dwarf2_per_objfile): Likewise.
12243         (struct dwarf2_per_cu_data): Likewise.
12244         (struct signatured_type): Likewise.
12245         (sig_type_ptr): Likewise.
12246         (DEF_VEC_P (sig_type_ptr)): Likewise.
12247         (INDEX4_SUFFIX): Likewise.
12248         (INDEX5_SUFFIX): Likewise.
12249         (DEBUG_STR_SUFFIX): Likewise.
12250         (dwarf2_read_section): Make non-static.
12251         (mapped_index_string_hash): Move from here.
12252         (dwarf5_djb_hash): Likewise.
12253         (file_write): Likewise.
12254         (class data_buf): Likewise.
12255         (struct symtab_index_entry): Likewise.
12256         (struct mapped_symtab): Likewise.
12257         (find_slot): Likewise.
12258         (hash_expand): Likewise.
12259         (add_index_entry): Likewise.
12260         (uniquify_cu_indices): Likewise.
12261         (class c_str_view): Likewise.
12262         (class c_str_view_hasher): Likewise.
12263         (class vector_hasher): Likewise.
12264         (write_hash_table): Likewise.
12265         (psym_index_map): Likewise.
12266         (struct addrmap_index_data): Likewise.
12267         (add_address_entry): Likewise.
12268         (add_address_entry_worker): Likewise.
12269         (write_address_map): Likewise.
12270         (symbol_kind): Likewise.
12271         (write_psymbols): Likewise.
12272         (struct signatured_type_index_data): Likewise.
12273         (write_one_signatured_type): Likewise.
12274         (recursively_count_psymbols): Likewise.
12275         (recursively_write_psymbols): Likewise.
12276         (class debug_names): Likewise.
12277         (check_dwarf64_offsets): Likewise.
12278         (psyms_seen_size): Likewise.
12279         (write_gdbindex): Likewise.
12280         (write_debug_names): Likewise.
12281         (assert_file_size): Likewise.
12282         (write_psymtabs_to_index): Likewise.
12283         (save_gdb_index_command): Likewise.
12284         (_initialize_dwarf2_read): Don't register the "save gdb-index"
12285         command.
12286         * dwarf2read.h: New file.
12287
12288 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
12289
12290         PR gdb/22670
12291         * dwarf2read.c (dwarf2_physname): Do not return the demangled
12292         symbol name if the CU's language stores symbol names in linkage
12293         format.
12294         * language.h (struct language_defn)
12295         <la_store_sym_names_in_linkage_form_p>: New field.  Adjust
12296         all instances of this struct.
12297
12298 2018-03-26  Tom Tromey  <tom@tromey.com>
12299
12300         * stack.c (backtrace_command_1): Remove verbose code.
12301
12302 2018-03-26  Tom Tromey  <tom@tromey.com>
12303
12304         * python/py-framefilter.c (py_print_type): Don't catch
12305         exceptions.  Return void.
12306         (py_print_value): Likewise.
12307         (py_print_single_arg): Likewise.
12308         (enumerate_args): Don't catch exceptions.
12309         (py_print_args): Likewise.
12310         (py_print_frame): Likewise.
12311         (gdbpy_apply_frame_filter): Catch exceptions here.
12312
12313 2018-03-26  Tom Tromey  <tom@tromey.com>
12314
12315         * stack.c (_initialize_stack): Remove trailing newlines from help
12316         text.  Add "Usage" line to "backtrace" help.
12317
12318 2018-03-26  Tom Tromey  <tom@tromey.com>
12319
12320         PR python/16486:
12321         * python/py-framefilter.c (py_print_args): Call wrap_hint.
12322
12323 2018-03-26  Tom Tromey  <tom@tromey.com>
12324
12325         * python/py-framefilter.c (py_print_single_arg): Return
12326         EXT_LANG_BT_ERROR from catch.
12327
12328 2018-03-26  Tom Tromey  <tom@tromey.com>
12329
12330         PR backtrace/15584:
12331         * stack.c (backtrace_command_1): Move some code into no-filters
12332         "if".
12333
12334 2018-03-26  Tom Tromey  <tom@tromey.com>
12335
12336         * python/py-framefilter.c (throw_quit_or_print_exception): New
12337         function.
12338         (gdbpy_apply_frame_filter): Use it.
12339
12340 2018-03-26  Tom Tromey  <tom@tromey.com>
12341
12342         PR cli/17716:
12343         * python/py-framefilter.c (py_print_type, py_print_value)
12344         (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
12345         RETURN_MASK_ERROR.
12346
12347 2018-03-26  Tom Tromey  <tom@tromey.com>
12348
12349         * python/py-framefilter.c (enumerate_args): Use
12350         gdb::unique_xmalloc_ptr.
12351
12352 2018-03-26  Tom Tromey  <tom@tromey.com>
12353
12354         * python/py-framefilter.c (py_print_frame): Return
12355         EXT_LANG_BT_OK.
12356         (gdbpy_apply_frame_filter): Update comment.
12357         * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
12358         Remove.
12359         <EXT_LANG_BT_NO_FILTERS>: Change value.
12360
12361 2018-03-26  Tom Tromey  <tom@tromey.com>
12362
12363         PR backtrace/15582:
12364         * stack.c (backtrace_command): Parse "hide" argument.
12365         * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
12366         * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
12367         constant.
12368
12369 2018-03-26  Tom Tromey  <tom@tromey.com>
12370
12371         * stack.c (backtrace_command_1): Remove "show_locals" parameter,
12372         add "flags".
12373         (backtrace_command): Remove "fulltrace", add "flags".
12374
12375 2018-03-26  Tom Tromey  <tom@tromey.com>
12376
12377         * stack.c (backtrace_command): Rewrite command line parsing.
12378
12379 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
12380
12381         * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
12382
12383 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
12384
12385         * filename-seen-cache.h: Add include guard.
12386
12387 2018-03-26  Keith Seitz  <keiths@redhat.com>
12388
12389         * symfile.c (place_section): Remove "struct" from section_addr_info
12390         in comment.
12391         * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
12392         "struct" keyword from section_addr_info.
12393
12394 2018-03-26  Alan Hayward  <alan.hayward@arm.com>
12395
12396         * regformats/regdef.h (reg): Add constructors.
12397
12398 2018-03-25  Pedro Alves  <palves@redhat.com>
12399
12400         * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
12401         if then/else bodies in var_func_name extraction.
12402
12403 2018-03-23  Weimin Pan  <weimin.pan@oracle.com>
12404
12405         * minsyms.c (lookup_minimal_symbol_and_objfile): Use
12406         lookup_minimal_symbol() to find symbol entry.
12407         * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
12408
12409 2018-03-23  Keith Seitz  <keiths@redhat.com>
12410
12411         PR c++/22968
12412         * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
12413         nested type definitions for C++, too.
12414
12415 2018-03-23  Tom Tromey  <tom@tromey.com>
12416
12417         * machoread.c (struct oso_el): Add a constructor.  Don't define as
12418         a typedef.
12419         (macho_register_oso): Remove.
12420         (macho_symtab_read): Take a std::vector.
12421         (oso_el_compare_name): Now a std::sort comparator.
12422         (macho_symfile_read_all_oso): Take a std::vector.
12423         (macho_symfile_read): Use std::vector.  Remove cleanups.
12424
12425 2018-03-22  Tom Tromey  <tom@tromey.com>
12426
12427         * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
12428         (record_full_goto_bookmark): Use std::string.
12429
12430 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
12431
12432         PR tdep/18295
12433         * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
12434         a single mask.
12435
12436 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
12437
12438         * rs6000-tdep.c (store_insn_p): New function.
12439         (skip_prologue): New variable alloca_reg_offset. Set lr_reg
12440         and cr_reg to their unshifted values. Use store_insn_p to
12441         match LR saves using either R1 or fdata->alloca_reg. Use
12442         store_insn_p to match CR saves. Set alloca_reg_offset
12443         when alloca_reg and framep are set. Remove lr_reg shift
12444         when assigning to fdata->lr_register.
12445
12446 2018-03-22  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12447
12448         * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
12449         command line args instead of emitting a warning.
12450
12451 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
12452
12453         * tracepoint.h (struct static_tracepoint_marker): Initialize
12454         fields, define default constructor, move constructor and move
12455         assignment, disable the rest.
12456         <str_id, extra>: Make std::string.
12457         (release_static_tracepoint_marker): Remove.
12458         (free_current_marker): Remove.
12459         * tracepoint.c (free_current_marker): Remove.
12460         (parse_static_tracepoint_marker_definition): Adjust to
12461         std::string, use new hex2str overload.
12462         (release_static_tracepoint_marker): Remove.
12463         (print_one_static_tracepoint_marker): Get marker by reference
12464         and adjust to std::string.
12465         (info_static_tracepoint_markers_command): Adjust to std::vector
12466         changes
12467         * target.h (static_tracepoint_marker_p): Remove typedef.
12468         (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
12469         (struct target_ops) <to_static_tracepoint_marker_at>: Return
12470         bool.
12471         <to_static_tracepoint_markers_by_strid>: Return std::vector.
12472         * target-debug.h
12473         (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
12474         (target_debug_print_std_vector_static_tracepoint_marker): New.
12475         (target_debug_print_struct_static_tracepoint_marker_p): Rename
12476         to...
12477         (target_debug_print_static_tracepoint_marker_p): ... this.
12478         * target-delegates.c: Re-generate.
12479         * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
12480         Make std::string.
12481         * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
12482         (decode_static_tracepoint_spec): Adjust to std::vector.
12483         (tracepoint_print_one_detail): Adjust to std::string.
12484         (strace_marker_decode_location): Adjust to std::string.
12485         (update_static_tracepoint): Adjust to std::string, remove call
12486         to release_static_tracepoint_marker.
12487         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
12488         Adjust to std::vector.
12489         * remote.c (remote_static_tracepoint_marker_at): Return bool.
12490         (remote_static_tracepoint_markers_by_strid): Adjust to
12491         std::vector.
12492         * common/rsp-low.h (hex2str): New overload with explicit count
12493         of bytes.
12494         * common/rsp-low.c (hex2str): New overload with explicit count
12495         of bytes.
12496         * unittests/rsp-low-selftests.c (test_hex2str): New function.
12497         (_initialize_rsp_low_selftests): Add test_hex2str test.
12498         * unittests/tracepoint-selftests.c
12499         (test_parse_static_tracepoint_marker_definition): Adjust to
12500         std::string.
12501
12502 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
12503
12504         * tracepoint.c (parse_static_tracepoint_marker_definition):
12505         Consider case where the definition is followed by more
12506         definitions.
12507         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12508         tracepoint-selftests.c.
12509         * unittests/tracepoint-selftests.c: New.
12510
12511 2018-03-21  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
12512
12513         * MAINTAINERS (Write After Approval): Add Pedro Franco de
12514         Carvalho.
12515
12516 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
12517
12518         * symtab.c (find_pc_sect_line): fixed indentation.
12519
12520 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
12521
12522         * symtab.c (find_pc_sect_line): now uses binary search.
12523
12524 2018-03-19  Tom Tromey  <tom@tromey.com>
12525
12526         * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
12527         "IDENT" production.
12528
12529 2018-03-19  Pedro Alves  <palves@redhat.com>
12530             Tom Tromey  <tom@tromey.com>
12531
12532         * unittests/observable-selftests.c: New file.
12533         * common/observable.h: New file.
12534         * observable.h: New file.
12535         * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
12536         arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
12537         breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
12538         corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
12539         extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
12540         infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
12541         linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
12542         mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
12543         ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
12544         python/py-breakpoint.c, python/py-finishbreakpoint.c,
12545         python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
12546         record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
12547         riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
12548         spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
12549         symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
12550         tui/tui-interp.c, valops.c: Update all users.
12551         * tui/tui-hooks.c (tui_bp_created_observer)
12552         (tui_bp_deleted_observer, tui_bp_modified_observer)
12553         (tui_inferior_exit_observer, tui_before_prompt_observer)
12554         (tui_normal_stop_observer, tui_register_changed_observer):
12555         Remove.
12556         (tui_observers_token): New global.
12557         (attach_or_detach, tui_attach_detach_observers): New functions.
12558         (tui_install_hooks, tui_remove_hooks): Use
12559         tui_attach_detach_observers.
12560         * record-btrace.c (record_btrace_thread_observer): Remove.
12561         (record_btrace_thread_observer_token): New global.
12562         * observer.sh: Remove.
12563         * observer.c: Rename to observable.c.
12564         * observable.c (namespace gdb_observers): Define new objects.
12565         (observer_debug): Move into gdb_observers namespace.
12566         (struct observer, struct observer_list, xalloc_observer_list_node)
12567         (xfree_observer_list_node, generic_observer_attach)
12568         (generic_observer_detach, generic_observer_notify): Remove.
12569         (_initialize_observer): Update.
12570         Don't include observer.inc.
12571         * Makefile.in (generated_files): Remove observer.h, observer.inc.
12572         (clean mostlyclean): Likewise.
12573         (observer.h, observer.inc): Remove targets.
12574         (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
12575         (COMMON_SFILES): Use observable.c, not observer.c.
12576         * .gitignore: Remove observer.h.
12577
12578 2018-03-18  Tom Tromey  <tom@tromey.com>
12579
12580         * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
12581         gdb::def_vector.
12582         (bfd_lookup_symbol_from_dyn_symtab): Likewise.
12583
12584 2018-03-17  Tom Tromey  <tom@tromey.com>
12585
12586         * auto-load.c (auto_load_objfile_script_1): Use std::string.
12587
12588 2018-03-17  Tom Tromey  <tom@tromey.com>
12589
12590         * target.c (class scoped_target_fd): New.
12591         (target_fileio_close_cleanup): Remove.
12592         (target_fileio_read_alloc_1): Use scoped_target_fd.
12593
12594 2018-03-16  Simon Marchi  <simon.marchi@polymtl.ca>
12595
12596         * silent-rules.mk: New.
12597         * Makefile.in: Include silent-rules.mk
12598         (srcdir, VPATH, top_srcdir): Move up.
12599         (COMPILE): Add ECHO_CXX.
12600         (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
12601         (init.c): Add ECHO_INIT_C.
12602         (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
12603         (version.c): Add ECHO_GEN.
12604         (printcmd.o): Add ECHO_CXX.
12605         (target-float.o): Add ECHO_CXX.
12606         (ada-exp.o): Add ECHO_CXX.
12607         (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
12608         (insight$(EXEEXT)): Add ECHO_CXXLD.
12609         * gnulib/configure.ac: Add AM_SILENT_RULES.
12610         * gnulib/aclocal.m4: Re-generate.
12611         * gnulib/configure: Re-generate.
12612         * gnulib/import/Makefile.in: Re-generate.
12613
12614 2018-03-16  Tom Tromey  <tom@tromey.com>
12615
12616         * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
12617         * utils.h (make_cleanup_free_section_addr_info): Don't declare.
12618         * utils.c (do_free_section_addr_info)
12619         (make_cleanup_free_section_addr_info): Remove.
12620         * symfile.h (struct other_sections): Add constructor.
12621         (struct section_addr_info): Remove.
12622         (section_addr_info): New typedef.
12623         (struct sym_fns) <sym_offsets>: Change type of parameter.
12624         (build_section_addr_info_from_objfile)
12625         (relative_addr_info_to_section_offsets, addr_info_make_relative)
12626         (default_symfile_offsets, symbol_file_add)
12627         (symbol_file_add_from_bfd)
12628         (build_section_addr_info_from_section_table): Update.
12629         (alloc_section_addr_info, free_section_addr_info): Don't declare.
12630         * symfile.c (alloc_section_addr_info): Remove.
12631         (build_section_addr_info_from_section_table): Change return type.
12632         Update.
12633         (build_section_addr_info_from_bfd)
12634         (build_section_addr_info_from_objfile): Likewise.
12635         (free_section_addr_info): Remove.
12636         (relative_addr_info_to_section_offsets): Change type of "addrs".
12637         (addrs_section_compar): Now a std::sort comparator.
12638         (addrs_section_sort): Change return type.
12639         (addr_info_make_relative): Change type of "addrs".  Update.
12640         (default_symfile_offsets, syms_from_objfile_1)
12641         (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
12642         (symbol_file_add_separate): Update.
12643         (symbol_file_add): Change type of "addrs".  Update.
12644         (add_symbol_file_command): Update.  Remove cleanups.
12645         * symfile-mem.c (symbol_file_add_from_memory): Update.  Remove
12646         cleanups.
12647         * symfile-debug.c (debug_sym_offsets): Change type of "info".
12648         * solib.c (solib_read_symbols): Update.
12649         * objfiles.c (objfile_relocate): Update.  Remove cleanups.
12650         * machoread.c (macho_symfile_offsets): Update.
12651         * jit.c (jit_bfd_try_read_symtab): Update.
12652
12653 2018-03-15  Simon Marchi  <simon.marchi@polymtl.ca>
12654
12655         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12656         unittests/utils-selftests.c.
12657         * unittests/utils-selftests.c: New file.
12658
12659 2018-03-14  Tom Tromey  <tom@tromey.com>
12660
12661         PR cli/14977:
12662         * printcmd.c (printf_c_string, printf_wide_c_string): Special case
12663         for NULL.
12664
12665 2018-03-14  Tom Tromey  <tom@tromey.com>
12666
12667         PR cli/19918:
12668         * printcmd.c (printf_pointer): Allow "-" in format.
12669
12670 2018-03-14  Tom Tromey  <tom@tromey.com>
12671
12672         * printcmd.c (_initialize_printcmd): Add usage to printf.
12673
12674 2018-03-14  Yao Qi  <qiyao@sourceware.org>
12675
12676         * MAINTAINERS: Update my email address.
12677
12678 2018-03-13  Tom Tromey  <tom@tromey.com>
12679
12680         * machoread.c (macho_check_dsym): Change filenamep to a
12681         std::string*.
12682         (macho_symfile_read): Update.
12683         * symfile.c (load_command): Use std::string.
12684
12685 2018-03-12  Andrew Burgess  <andrew.burgess@embecosm.com>
12686
12687         * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
12688         to error message string.
12689         (riscv_register_name): Use xsnprintf instead of sprintf.
12690         (riscv_insn::fetch_instruction): Use gdb_assert instead of
12691         internal_error.
12692         (riscv_print_arg_location): Use gdb_assert_not_reached instead of
12693         error.
12694         (riscv_push_dummy_call): Likewise.
12695
12696 2018-03-12  Tom Tromey  <tom@tromey.com>
12697
12698         * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
12699         Use gdb::byte_vector.
12700         * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
12701
12702 2018-03-12  Yao Qi  <yao.qi@linaro.org>
12703
12704         * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
12705         parameter type to readable_regcache.
12706         * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
12707         the declaration.
12708
12709 2018-03-11  Tom Tromey  <tom@tromey.com>
12710
12711         * dwarf2read.c (struct nextfield): Add initializers.
12712         (struct nextfnfield): Remove.
12713         (struct fnfieldlist): Add initializers.  Remove "length" and
12714         "head", use std::vector.
12715         (struct decl_field_list): Remove.
12716         (struct field_info): Add initializers.
12717         <fields, baseclasses>: Now std::vector.
12718         <nbaseclasses, nfnfields, typedef_field_list_count,
12719         nested_types_list_count>: Remove.
12720         (dwarf2_add_field, dwarf2_add_type_defn)
12721         (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
12722         (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
12723         (process_structure_scope): Update.
12724
12725 2018-03-11  Tom Tromey  <tom@tromey.com>
12726
12727         * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
12728         for use by std::sort.
12729         (build_type_psymtabs_1): Use std::vector.
12730
12731 2018-03-09  Eli Zaretskii  <eliz@gnu.org>
12732
12733         * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
12734         and LIBMPFR in the printed configuration.
12735
12736 2018-03-08  Tom Tromey  <tom@tromey.com>
12737
12738         * source.c (get_filename_and_charpos): Use scoped_fd.
12739         * nto-procfs.c (procfs_open_1): Use scoped_fd.
12740         (procfs_pidlist): Likewise.
12741         * procfs.c (proc_get_LDT_entry): Use scoped_fd.
12742         (iterate_over_mappings): Likewise.
12743
12744 2018-03-08  Tom Tromey  <tom@tromey.com>
12745
12746         * infcall.c (struct call_return_meta_info)
12747         <stack_temporaries_enabled>: Remove.
12748         (get_call_return_value, call_function_by_hand_dummy): Update.
12749         * thread.c (disable_thread_stack_temporaries): Remove.
12750         (enable_thread_stack_temporaries): Remove.
12751         (thread_stack_temporaries_enabled_p): Return bool.
12752         (push_thread_stack_temporary, value_in_thread_stack_temporaries)
12753         (get_last_thread_stack_temporary): Update.
12754         * eval.c (evaluate_subexp): Update.
12755         * gdbthread.h (class enable_thread_stack_temporaries): Now a
12756         class, not a function.
12757         (value_ptr, value_vec): Remove typedefs.
12758         (class thread_info) <stack_temporaries_enabled>: Now bool.
12759         <stack_temporaries>: Now a std::vector.
12760         (thread_stack_temporaries_enabled_p)
12761         (value_in_thread_stack_temporaries): Return bool.
12762
12763 2018-03-08  Simon Marchi  <simon.marchi@ericsson.com>
12764
12765         * remote.c (putpkt_binary): Fix omitted bytes reporting.
12766         (getpkt_or_notif_sane_1): Likewise.
12767
12768 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
12769
12770         * build-id.c (build_id_to_debug_bfd): Use std::string.
12771
12772 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
12773
12774         * build-id.c (find_separate_debug_file_by_buildid): Return
12775         std::string.
12776         * build-id.h (find_separate_debug_file_by_buildid): Return
12777         std::string.
12778         * coffread.c (coff_symfile_read): Adjust to std::string.
12779         * elfread.c (elf_symfile_read): Adjust to std::string.
12780         * symfile.c (separate_debug_file_exists): Change parameter to
12781         std::string.
12782         (find_separate_debug_file): Return std::string.
12783         (find_separate_debug_file_by_debuglink): Return std::string.
12784         * symfile.h (find_separate_debug_file_by_debuglink): Return
12785         std::string.
12786
12787 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
12788
12789         * common/xml-utils.c (xml_escape_text): Move code to...
12790         (xml_escape_text_append): ... this new function.
12791         * common/xml-utils.h (xml_escape_text_append): New declaration.
12792         * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
12793         New function.
12794         (_initialize_xml_utils): register test_xml_escape_text_append as
12795         a selftest.
12796
12797 2018-03-07  Alan Hayward  <alan.hayward@arm.com>
12798
12799         * defs.h: Remove MAX_REGISTER_SIZE.
12800         * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
12801         asserts.
12802         * python/py-unwind.c (pyuw_sniffer): Likewise.
12803
12804 2018-03-07  Tom Tromey  <tom@tromey.com>
12805
12806         * linux-tdep.c (linux_info_proc): Update.
12807         * target.h (struct target_ops) <to_fileio_readlink>: Return
12808         optional<string>.
12809         (target_fileio_readlink): Return optional<string>.
12810         * remote.c (remote_hostio_readlink): Return optional<string>.
12811         * inf-child.c (inf_child_fileio_readlink): Return
12812         optional<string>.
12813         * target.c (target_fileio_readlink): Return optional<string>.
12814
12815 2018-03-07  Andrew Burgess  <andrew.burgess@embecosm.com>
12816
12817         * regcache.c (cooked_read_test): Add riscv to the list of
12818         architectures that have a save_reggroup.
12819
12820 2018-03-07  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12821
12822         * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
12823         value is not a dynamic class object.
12824
12825 2018-03-06  Tom Tromey  <tom@tromey.com>
12826
12827         * rust-exp.y: Formatting fixes.
12828
12829 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12830
12831         * riscv-tdep.c (riscv_register_name): Remove target description
12832         support.
12833         (riscv_gdbarch_init): Remove target description check.
12834
12835 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12836
12837         * riscv-tdep.c: Remove 'Contributed by ...' lines from header
12838         comment.
12839         * riscv-tdep.h: Likewise.
12840
12841 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12842
12843         * riscv-tdep.c (riscv_pseudo_register_read): Delete.
12844         (riscv_pseudo_register_write): Delete.
12845         (riscv_gdbarch_init): Remove all use of pseudo registers.
12846
12847 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
12848
12849         * record-btrace.c (btrace_print_lines): Replace cleanup
12850         parameter with RAII equivalents.
12851         (btrace_insn_history): Replace cleanup with RAII equivalents.
12852         * ui-out.h (make_cleanup_ui_out_list_begin_end,
12853         make_cleanup_ui_out_tuple_begin_end): Remove.
12854         * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
12855         make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
12856         make_cleanup_ui_out_list_begin_end): Remove.
12857
12858 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
12859
12860         * record-btrace.c (record_btrace_maybe_mark_async_event): Change
12861         parameter types to std::vector.  Use bool.
12862         (record_btrace_wait): Replace VEC(tp_t) with
12863         std::vector<thread_info *>.
12864         * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
12865
12866 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
12867
12868         * record-btrace.c (record_btrace_disable_callback): Remove.
12869         (struct scoped_btrace_disable): New.
12870         (record_btrace_open): Use scoped_btrace_disable.
12871
12872 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12873
12874         * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
12875         reading values from registers.
12876
12877 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12878
12879         * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
12880         where appropriate.
12881
12882 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12883
12884         * riscv-tdep.c (riscv_print_arg_location): Add header comment,
12885         change parameter type.  Use GDB's print functions, and use
12886         core_addr_to_string where appropriate.
12887         (riscv_push_dummy_call): Use core_addr_to_string where
12888         appropriate, update call to riscv_print_arg_location, and reindent
12889         a few lines.
12890         (riscv_return_value): Update call to riscv_print_arg_location.
12891
12892 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12893             Tim Newsome <tim@sifive.com>
12894             Albert Ou <a0u@eecs.berkeley.edu>
12895             Darius Rad <darius@bluespec.com>
12896
12897         * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
12898         (HFILES_NO_SRCDIR): Add riscv-tdep.h.
12899         (ALLDEPFILES): Add riscv-tdep.c
12900         * configure.tgt: Add riscv support.
12901         * riscv-tdep.c: New file.
12902         * riscv-tdep.h: New file.
12903         * NEWS: Mention new target.
12904         * MAINTAINERS: Add entry for riscv.
12905
12906 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12907
12908         * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
12909         fields within aggregates.
12910
12911 2018-03-04  Simon Marchi  <simon.marchi@polymtl.ca>
12912
12913         * record-btrace.c (btrace_print_lines): Change type of flags to
12914         gdb_disassembly_flags.
12915
12916 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
12917
12918         * fbsd-nat.c: Include "inf-ptrace.h".
12919         (USE_SIGTRAP_SIGINFO): Conditionally define.
12920         [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
12921         (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
12922         [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
12923         function.
12924         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
12925         Likewise.
12926         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
12927         Likewise.
12928         (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
12929         "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
12930         "supports_stopped_by_hw_breakpoint" target methods.
12931
12932 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
12933
12934         * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
12935         * fbsd-nat.c (debug_fbsd_nat): New variable.
12936         (show_fbsd_nat_debug): New function.
12937         (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
12938         (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
12939
12940 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
12941
12942         * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
12943         * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
12944         prototype.
12945         * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
12946         (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
12947         method.
12948
12949 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
12950
12951         * common/gdb_vecs.c (free_char_ptr_vec): Remove.
12952         * common/gdb_vecs.h (free_char_ptr_vec): Remove.
12953
12954 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
12955
12956         * charset.c (struct charset_vector): New.
12957         (charsets): Change type to charset_vector.
12958         (find_charset_names): Adjust.
12959         (add_one): Adjust.
12960         (_initialize_charset): Adjust.
12961
12962 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
12963
12964         * progspace.h (struct program_space) <deleted_solibs>: Change
12965         type to std::vector<std::string>.
12966         * progspace.c (clear_program_space_solib_cache): Adjust.
12967         * breakpoint.c (print_solib_event): Adjust.
12968         (check_status_catch_solib): Adjust.
12969         * solib.c (update_solib_list): Adjust.
12970         * ui-out.h (class ui_out) <field_string>: New overload.
12971         * ui-out.c (ui_out::field_string): New overload.
12972
12973 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
12974
12975         * progspace.h (struct program_space): Add constructor and
12976         destructor, initialize fields.
12977         (add_program_space): Remove.
12978         * progspace.c (add_program_space): Rename to...
12979         (program_space::program_space): ... this.
12980         (release_program_space): Rename to...
12981         (program_space::~program_space): ... this.
12982         (delete_program_space): Use delete to delete program_space.
12983         (initialize_progspace): Use new to allocate program_space.
12984         * inferior.c (add_inferior_with_spaces): Likewise.
12985         (clone_inferior_command): Likewise.
12986         * infrun.c (follow_fork_inferior): Likewise.
12987         (handle_vfork_child_exec_or_exit): Likewise.
12988
12989 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
12990
12991         * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
12992         (delim_string_to_char_ptr_vec): Return std::vector of
12993         gdb::unique_xmalloc_ptr.
12994         (dirnames_to_char_ptr_vec_append): Take std::vector of
12995         gdb::unique_xmalloc_ptr.
12996         (dirnames_to_char_ptr_vec): Return std::vector of
12997         gdb::unique_xmalloc_ptr.
12998         * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
12999         Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
13000         (delim_string_to_char_ptr_vec): Return an std::vector of
13001         gdb::unique_xmalloc_ptr, adjust the code.
13002         (dirnames_to_char_ptr_vec_append): Take an std::vector of
13003         gdb::unique_xmalloc_ptr, adjust the code.
13004         (dirnames_to_char_ptr_vec): Return an std::vector of
13005         gdb::unique_xmalloc_ptr, adjust the code.
13006         * auto-load.c (auto_load_safe_path_vec): Change type to
13007         std::vector of gdb::unique_xmalloc_ptr.
13008         (auto_load_expand_dir_vars): Return an std::vector of
13009         gdb::unique_xmalloc_ptr, adjust the code.
13010         (auto_load_safe_path_vec_update): Adjust.
13011         (filename_is_in_auto_load_safe_path_vec): Adjust.
13012         (auto_load_objfile_script_1): Adjust.
13013         * build-id.c (build_id_to_debug_bfd): Adjust.
13014         * linux-thread-db.c (thread_db_load_search): Adjust.
13015         * source.c (add_path): Adjust.
13016         (openp): Adjust.
13017         * symfile.c (find_separate_debug_file): Adjust.
13018         * utils.c (do_free_char_ptr_vec): Remove.
13019         (make_cleanup_free_char_ptr_vec): Remove.
13020
13021 2018-03-01  Sergio Durigan Junior  <sergiodj@redhat.com>
13022
13023         PR gdb/22907
13024         * common/pathstuff.c: Conditionally include "<windows.h>".
13025
13026 2018-03-01  Georg Sauthoff  <mail@georg.so>
13027
13028         PR gdb/22888
13029         * gcore.in: Quote variables and switch interpreter to bash.
13030
13031 2018-03-01  Tom Tromey  <tom@tromey.com>
13032
13033         * dwarf2read.c (alloc_discriminant_info): Fix default_index
13034         assertion.  Add assertion for discriminant_index.
13035         (quirk_rust_enum): Use correct base type name in univariant case.
13036
13037 2018-03-01  Simon Marchi  <simon.marchi@ericsson.com>
13038
13039         * record.c (get_call_history_modifiers): Return a
13040         record_print_flags.
13041         (cmd_record_call_history): Adjust.
13042         * record-btrace.c (record_btrace_call_history): Adjust.
13043         (record_btrace_call_history_range): Adjust.
13044         (record_btrace_call_history_from): Adjust.
13045         * target-debug.h (target_debug_print_record_print_flags): New.
13046         * target-delegates.c: Re-generate.
13047         * target.c (target_call_history): Change flags type.
13048         (target_call_history_from): Likewise.
13049         (target_call_history_range): Likewise.
13050         * target.h (struct target_ops) <target_call_history>: Likewise.
13051         (target_call_history_from): Likewise.
13052         (target_call_history_range): Likewise.
13053
13054 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
13055             Simon Marchi  <simon.marchi@polymtl.ca>
13056
13057         * common/common-utils.c: Include "sys/stat.h".
13058         (is_regular_file): Move here from "source.c"; change return
13059         type to "bool".
13060         * common/common-utils.h (is_regular_file): New prototype.
13061         * common/pathstuff.c (contains_dir_separator): New function.
13062         * common/pathstuff.h (contains_dir_separator): New prototype.
13063         * source.c: Don't include "sys/stat.h".
13064         (is_regular_file): Move to "common/common-utils.c".
13065
13066 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
13067
13068         * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
13069         (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
13070         * auto-load.c: Include "common/pathstuff.h".
13071         * common/common-def.h (current_directory): Move here.
13072         * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
13073         function.
13074         * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
13075         prototype.
13076         * common/pathstuff.c: New file.
13077         * common/pathstuff.h: New file.
13078         * compile/compile.c: Include "common/pathstuff.h".
13079         * defs.h (current_directory): Move to "common/common-defs.h".
13080         * dwarf2read.c: Include "common/pathstuff.h".
13081         * exec.c: Likewise.
13082         * guile/scm-safe-call.c: Likewise.
13083         * linux-thread-db.c: Likewise.
13084         * main.c: Likewise.
13085         * nto-tdep.c: Likewise.
13086         * objfiles.c: Likewise.
13087         * source.c: Likewise.
13088         * symtab.c: Likewise.
13089         * utils.c: Include "common/pathstuff.h".
13090         (gdb_realpath): Move to "common/pathstuff.c".
13091         (gdb_realpath_keepfile): Likewise.
13092         (gdb_abspath): Likewise.
13093         * utils.h (gdb_realpath): Move to "common/pathstuff.h".
13094         (gdb_realpath_keepfile): Likewise.
13095         (gdb_abspath): Likewise.
13096
13097 2018-02-28  John Baldwin  <jhb@FreeBSD.org>
13098
13099         * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
13100         wildcard process pid for super_resume for kernels with a
13101         specific bug.
13102
13103 2018-02-27  Phil Muldoon  <pmuldoon@redhat.com>
13104
13105         * compile/compile.c (get_args): Add additional comments
13106         explaining function.
13107
13108 2018-02-27  Simon Marchi  <simon.marchi@polymtl.ca>
13109             Tom Tromey  <tom@tromey.com>
13110
13111         * target.h (memory_write_request_s): Remove typedef.  Don't define
13112         VEC.
13113         (target_write_memory_blocks): Change argument to std::vector.
13114         (struct memory_write_request): Add constructor.
13115         * target-memory.c (compare_block_starting_address): Return bool.
13116         Change argument types.
13117         (claim_memory): Change arguments to use std::vector.
13118         (split_regular_and_flash_blocks, blocks_to_erase)
13119         (compute_garbled_blocks): Likewise.
13120         (cleanup_request_data, cleanup_write_requests_vector): Remove.
13121         (target_write_memory_blocks): Change argument to std::vector.
13122         * symfile.c (struct load_section_data): Add constructor and
13123         destructor.  Use std::vector for "requests".
13124         (struct load_progress_data): Add initializers.
13125         (load_section_callback): Update.  Use "new".
13126         (clear_memory_write_data): Remove.
13127         (generic_load): Update.
13128
13129 2018-02-27  Alan Hayward  <alan.hayward@arm.com>
13130
13131         * arch/aarch64.h: Use common/tdesc.h.
13132
13133 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
13134
13135         * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
13136         architecture with a 64-bit ABI.
13137
13138 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
13139
13140         * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
13141         ahead of target description loading.
13142
13143 2018-02-26  Tom Tromey  <tom@tromey.com>
13144
13145         * stack.c (backtrace_command_1): Update.
13146         * python/python-internal.h (gdbpy_apply_frame_filter): Change type
13147         of "flags".
13148         * python/py-framefilter.c (py_print_frame)
13149         (gdbpy_apply_frame_filter): Change type of "flags".
13150         * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
13151         of "flags".
13152         (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
13153         (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
13154         * extension.h (enum frame_filter_flag): Rename from
13155         frame_filter_flags.
13156         (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
13157         (apply_ext_lang_frame_filter): Change type of "flags".
13158         * extension.c (apply_ext_lang_frame_filter): Change type of
13159         "flags".
13160         * extension-priv.h (struct extension_language_ops)
13161         <apply_frame_filter>: Change type of "flags".
13162
13163 2018-02-26  Tom Tromey  <tom@tromey.com>
13164
13165         PR python/16497:
13166         * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag.  Fix
13167         off-by-one in py_end computation.
13168         * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
13169         PRINT_MORE_FRAMES.
13170         * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
13171         constant.
13172
13173 2018-02-26  Tom Tromey  <tom@tromey.com>
13174
13175         * dwarf2read.c (struct variant_field): New.
13176         (struct nextfield) <variant>: New field.
13177         (dwarf2_add_field): Handle DW_TAG_variant_part.
13178         (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
13179         discriminated union.
13180         (read_structure_type): Handle DW_TAG_variant_part.
13181         (handle_struct_member_die): New function, extracted from
13182         process_structure_scope.  Handle DW_TAG_variant.
13183         (process_structure_scope): Handle discriminated unions.  Call
13184         handle_struct_member_die.
13185
13186 2018-02-26  Tom Tromey  <tom@tromey.com>
13187
13188         * rust-lang.h (rust_last_path_segment): Declare.
13189         * rust-lang.c (rust_last_path_segment): Now public.  Change
13190         contract.
13191         (struct disr_info): Remove.
13192         (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
13193         (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
13194         (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
13195         (rust_enum_p, rust_enum_variant): New function.
13196         (rust_underscore_fields): Remove "offset" parameter.
13197         (rust_print_enum): New function.
13198         (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
13199         <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
13200         (rust_print_struct_def): Add "for_rust_enum" parameter.  Handle
13201         enums.
13202         (rust_internal_print_type): New function, from rust_print_type.
13203         Remove enum code.
13204         (rust_print_type): Call rust_internal_print_type.
13205         (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
13206         Update enum handling.
13207         * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
13208         (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
13209         (rust_union_quirks): New functions.
13210         (process_full_comp_unit, process_full_type_unit): Call
13211         rust_union_quirks.
13212         (process_structure_scope): Update rust_unions if necessary.
13213
13214 2018-02-26  Tom Tromey  <tom@tromey.com>
13215
13216         * value.h (value_union_variant): Declare.
13217         * valops.c (value_union_variant): New function.
13218         * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
13219         (struct discriminant_info): New.
13220         (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
13221         enumerator.
13222         (struct main_type) <flag_discriminated_union>: New field.
13223
13224 2018-02-26  Tom Tromey  <tom@tromey.com>
13225
13226         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13227         unittests/unpack-selftests.c.
13228         * unittests/unpack-selftests.c: New file.
13229         * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
13230
13231 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13232
13233         * dwarf2read.c (struct partial_die_info) <read>: New method.
13234         (read_partial_die): Remove the declaration.
13235         (load_partial_dies): Update.
13236         (partial_die_info::partial_die_info):
13237         (read_partial_die): Change it to partial_die_info::read.
13238
13239 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13240
13241         * dwarf2read.c (struct partial_die_info) <fixup>: New method.
13242         (fixup_partial_die): Remove declaration.
13243         (scan_partial_symbols): Update.
13244         (partial_die_parent_scope): Likewise.
13245         (partial_die_full_name): Likewise.
13246         (fixup_partial_die): Change it to partial_die_info::fixup.
13247
13248 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13249
13250         * dwarf2read.c (read_partial_die): Update the declaration.
13251         (load_partial_dies): Caller update.
13252         (read_partial_die): Remove one argument abbrev_len.
13253
13254 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13255
13256         * dwarf2read.c (struct partial_die_info): Add ctor, delete
13257         assignment operator.
13258         (load_partial_dies): Use ctor and copy ctor.
13259         (read_partial_die): Update.
13260         (dwarf2_cu::find_partial_die): Use ctor.
13261
13262 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13263
13264         * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
13265         (find_partial_die_in_comp_unit): Change it to
13266         dwarf2_cu::find_partial_die.
13267         (find_partial_die): Update.
13268
13269 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13270
13271         * dwarf2read.c (read_partial_die): Remove the code checking abbrev
13272         is NULL.
13273
13274 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13275
13276         * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
13277
13278 2018-02-26  Alan Hayward  <alan.hayward@arm.com>
13279
13280         * arch/amd64.h: Use common/tdesc.h.
13281         * arch/i386.c: Likewise.
13282         * arch/i386.h: Likewise.
13283         * arch/tic6x.c: Likewise.
13284         * arch/tdesc.h: Move file from here...
13285         * common/tdesc.h: ...to here.
13286         * features/aarch64-core.c: Regenerate.
13287         * features/aarch64-fpu.c: Regenerate.
13288         * features/i386/32bit-avx.c: Regenerate.
13289         * features/i386/32bit-avx512.c: Regenerate.
13290         * features/i386/32bit-core.c: Regenerate.
13291         * features/i386/32bit-linux.c: Regenerate.
13292         * features/i386/32bit-mpx.c: Regenerate.
13293         * features/i386/32bit-pkeys.c: Regenerate.
13294         * features/i386/32bit-sse.c: Regenerate.
13295         * features/i386/64bit-avx.c: Regenerate.
13296         * features/i386/64bit-avx512.c: Regenerate.
13297         * features/i386/64bit-core.c: Regenerate.
13298         * features/i386/64bit-linux.c: Regenerate.
13299         * features/i386/64bit-mpx.c: Regenerate.
13300         * features/i386/64bit-pkeys.c: Regenerate.
13301         * features/i386/64bit-segments.c: Regenerate.
13302         * features/i386/64bit-sse.c: Regenerate.
13303         * features/i386/x32-core.c: Regenerate.
13304         * features/tic6x-c6xp.c: Regenerate.
13305         * features/tic6x-core.c: Regenerate.
13306         * features/tic6x-gp.c: Regenerate.
13307         * target-descriptions.c: Use common/tdesc.h.
13308         * target-descriptions.h: Likewise.
13309
13310 2018-02-24  Tom Tromey  <tom@tromey.com>
13311
13312         * linux-thread-db.c (try_thread_db_load_from_pdir_1)
13313         (try_thread_db_load_from_dir, thread_db_load_search): Use
13314         std::string.
13315         (info_auto_load_libthread_db_compare): Return bool.  Change
13316         argument types.
13317         (info_auto_load_libthread_db): Use std::vector, std::string.
13318         Remove cleanups.
13319
13320 2018-02-24  Tom Tromey  <tom@tromey.com>
13321
13322         * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
13323         std::string.
13324         * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
13325         std::string*.
13326         * gdbarch.c: Rebuild.
13327         * gdbarch.h: Rebuild.
13328         * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
13329         * arch-utils.h (default_fast_tracepoint_valid_at): Update.
13330         * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
13331         std::string*.
13332
13333 2018-02-23  Simon Marchi  <simon.marchi@polymtl.ca>
13334
13335         * gdbtypes.h (sect_offset): Change type to uint64_t.
13336         (sect_offset_str): New function.
13337         * dwarf2read.c (create_addrmap_from_aranges): Use
13338         sect_offset_str.
13339         (error_check_comp_unit_head): Likewise.
13340         (create_debug_type_hash_table): Likewise.
13341         (read_cutu_die_from_dwo): Likewise.
13342         (init_cutu_and_read_dies): Likewise.
13343         (init_cutu_and_read_dies_no_follow): Likewise.
13344         (process_psymtab_comp_unit_reader): Likewise.
13345         (partial_die_parent_scope): Likewise.
13346         (peek_die_abbrev): Likewise.
13347         (process_queue): Likewise.
13348         (dwarf2_physname): Likewise.
13349         (read_namespace_alias): Likewise.
13350         (read_import_statement): Likewise.
13351         (create_dwo_cu_reader): Likewise.
13352         (create_cus_hash_table): Likewise.
13353         (lookup_dwo_cutu): Likewise.
13354         (inherit_abstract_dies): Likewise.
13355         (read_func_scope): Likewise.
13356         (read_call_site_scope): Likewise.
13357         (dwarf2_add_member_fn): Likewise.
13358         (read_common_block): Likewise.
13359         (read_module_type): Likewise.
13360         (read_typedef): Likewise.
13361         (read_subrange_type): Likewise.
13362         (load_partial_dies): Likewise.
13363         (read_partial_die): Likewise.
13364         (find_partial_die): Likewise.
13365         (read_str_index): Likewise.
13366         (dwarf2_string_attr): Likewise.
13367         (build_error_marker_type): Likewise.
13368         (lookup_die_type): Likewise.
13369         (dump_die_shallow): Likewise.
13370         (follow_die_ref): Likewise.
13371         (dwarf2_fetch_die_loc_sect_off): Likewise.
13372         (dwarf2_fetch_constant_bytes): Likewise.
13373         (follow_die_sig): Likewise.
13374         (get_signatured_type): Likewise.
13375         (get_DW_AT_signature_type): Likewise.
13376         (dwarf2_find_containing_comp_unit): Likewise.
13377         (set_die_type): Likewise.
13378
13379 2018-02-21  John Baldwin  <jhb@FreeBSD.org>
13380
13381         * arch/aarch64.c: Include "common-defs.h".
13382         * arch/amd64.c: Likewise.
13383         * arch/i386.c: Likewise.
13384
13385 2018-02-21  Tom Tromey  <tom@tromey.com>
13386
13387         * value.h: (extract_field_op): Update.
13388         * eval.c (extract_field_op): Return a const char *.
13389         * expression.h (parse_expression_for_completion): Update.
13390         * completer.c (complete_expression): Update.
13391         (add_struct_fields): Make fieldname const.
13392         * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
13393         (mark_completion_tag, parse_exp_in_context_1): Update.
13394         (parse_expression_for_completion): Change "name" to
13395         unique_xmalloc_ptr*.
13396
13397 2018-02-21  Tom Tromey  <tom@tromey.com>
13398
13399         * infcall.c (call_function_by_hand_dummy): Use std::vector.
13400
13401 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13402
13403         * avr-tdep.c (avr_read_pc): Change parameter type to
13404         readable_regcache.
13405         * gdbarch.sh (read_pc): Likewise.
13406         * gdbarch.c: Re-generated.
13407         * gdbarch.h: Re-generated.
13408         * hppa-tdep.c (hppa_read_pc): Change parameter type to
13409         readable_regcache.
13410         * ia64-tdep.c (ia64_read_pc): Likewise.
13411         * mips-tdep.c (mips_read_pc): Likewise.
13412         * spu-tdep.c (spu_read_pc): Likewise.
13413
13414 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13415
13416         * Makefile.in (COMMON_SFILES): Add regcache-dump.c
13417         * regcache-dump.c: New file.
13418         * regcache.c: Move register_dump to regcache-dump.c.
13419         (maintenance_print_registers): Likewise.
13420         (maintenance_print_raw_registers): Likewise.
13421         (maintenance_print_cooked_registers): Likewise.
13422         (maintenance_print_register_groups): Likewise.
13423         (maintenance_print_remote_registers): Likewise.
13424         (_initialize_regcache): Likewise.
13425         * regcache.h (register_dump): Moved from regcache.c.
13426
13427 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13428
13429         * regcache.c (regcache::regcache): Update.
13430         (regcache::invalidate): Move it to detached_regcache::invalidate.
13431         (get_thread_arch_aspace_regcache): Update.
13432         (regcache::raw_update): Update.
13433         (regcache::cooked_read): Remove some code.
13434         (regcache::cooked_read_value): Likewise.
13435         (regcache::raw_write): Remove assert on m_readonly_p.
13436         (regcache::raw_supply_integer): Move it to
13437         detached_regcache::raw_supply_integer.
13438         (regcache::raw_supply_zeroed): Likewise.
13439         * regcache.h (detached_regcache) <raw_supply_integer>: New
13440         declaration.
13441         <raw_supply_zeroed, invalidate>: Likewise.
13442         (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
13443         <invalidate>: Likewise.
13444         <m_readonly_p>: Removed.
13445
13446 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13447
13448         * infcmd.c (get_return_value): Let stop_regs point to
13449         get_current_regcache.
13450         * regcache.c (regcache::regcache): Remove.
13451         (register_dump_reg_buffer): New class.
13452         (regcache_print): Adjust.
13453         * regcache.h (regcache): Remove constructors.
13454
13455 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13456
13457         * regcache.c (class register_dump): New class.
13458         (register_dump_regcache, register_dump_none): New class.
13459         (register_dump_remote, register_dump_groups): New class.
13460         (regcache_print): Update.
13461         * regcache.h (regcache_dump_what): Move it to regcache.c.
13462         (regcache) <dump>: Remove.
13463
13464 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13465
13466         * jit.c (struct jit_unwind_private) <regcache>: Change its type to
13467          reg_buffer_rw *.
13468         (jit_unwind_reg_set_impl): Call raw_supply.
13469         (jit_frame_sniffer): Use reg_buffer_rw.
13470         * record-full.c (record_full_core_regbuf): Change its type.
13471         (record_full_core_open_1): Use reg_buffer_rw.
13472         (record_full_close): Likewise.
13473         (record_full_core_fetch_registers): Use regcache->raw_supply.
13474         (record_full_core_store_registers): Likewise.
13475         * regcache.c (regcache::get_register_status): Move it to
13476         reg_buffer.
13477         (regcache_raw_set_cached_value): Remove.
13478         (regcache::raw_set_cached_value): Remove.
13479         (regcache::raw_write): Call raw_supply.
13480         (regcache::raw_supply): Move it to reg_buffer_rw.
13481         * regcache.h (regcache_raw_set_cached_value): Remove.
13482         (reg_buffer_rw): New class.
13483
13484 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13485
13486         * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
13487         readonly_detached_regcache.
13488         (dummy_frame_prev_register): Use regcache->cooked_read.
13489         * frame.c (frame_save_as_regcache): Change return type.
13490         (frame_pop): Update.
13491         * frame.h (frame_save_as_regcache): Update declaration.
13492         * inferior.h (get_infcall_suspend_state_regcache): Update
13493         declaration.
13494         * infrun.c (infcall_suspend_state) <registers>: use
13495         readonly_detached_regcache.
13496         (save_infcall_suspend_state): Don't use regcache_dup.
13497         (get_infcall_suspend_state_regcache): Change return type.
13498         * linux-fork.c (struct fork_info) <savedregs>: Change to
13499         readonly_detached_regcache.
13500         <pc>: New field.
13501         (fork_save_infrun_state): Don't use regcache_dup.
13502         (info_checkpoints_command): Adjust.
13503         * mi/mi-main.c (register_changed_p): Update declaration.
13504         (mi_cmd_data_list_changed_registers): Use
13505         readonly_detached_regcache.
13506         (register_changed_p): Change parameter type to
13507         readonly_detached_regcache.
13508         * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
13509         readonly_detached_regcache.
13510         (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
13511         * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
13512         New.
13513         (regcache::save): Move it to reg_buffer.
13514         (regcache::restore): Change parameter type.
13515         (regcache_dup): Remove.
13516         * regcache.h (reg_buffer) <save>: New method.
13517         (readonly_detached_regcache): New class.
13518         * spu-tdep.c (spu2ppu_cache) <regcache>: Use
13519         readonly_detached_regcache.
13520         (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
13521
13522 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13523
13524         * frame.c (frame_save_as_regcache): Use regcache method save.
13525         (frame_pop): Use regcache method restore.
13526         * infrun.c (restore_infcall_suspend_state): Likewise.
13527         * linux-fork.c (fork_load_infrun_state): Likewise.
13528         * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
13529         save.
13530         * regcache.c (regcache_save): Remove.
13531         (regcache::restore): More asserts.
13532         (regcache_cpy): Remove.
13533         * regcache.h (regcache_save): Remove the declaration.
13534         (regcache::restore): Move from private to public.
13535         Remove the friend declaration of regcache_cpy.
13536         (regcache_cpy): Remove declaration.
13537
13538 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13539
13540         * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
13541         parameter type to 'readable_regcache *'.
13542         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
13543         * arm-tdep.c (arm_neon_quad_read): Likewise.
13544         (arm_pseudo_read): Likewise.
13545         * avr-tdep.c (avr_pseudo_register_read): Likewise.
13546         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
13547         * frv-tdep.c (frv_pseudo_register_read): Likewise.
13548         * gdbarch.c: Re-generated.
13549         * gdbarch.h: Re-generated.
13550         * gdbarch.sh (pseudo_register_read): Change parameter type to
13551         'readable_regcache *'.
13552         (pseudo_register_read_value): Likewise.
13553         * h8300-tdep.c (pseudo_from_raw_register): Likewise.
13554         (h8300_pseudo_register_read): Likewise.
13555         * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
13556         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
13557         (i386_pseudo_register_read_into_value): Likewise.
13558         (i386_pseudo_register_read_value): Likewise.
13559         * i386-tdep.h (i386_pseudo_register_read_into_value): Update
13560         declaration.
13561         * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
13562         * m32c-tdep.c (m32c_raw_read): Likewise.
13563         (m32c_read_flg): Likewise.
13564         (m32c_banked_register): Likewise.
13565         (m32c_banked_read): Likewise.
13566         (m32c_sb_read): Likewise.
13567         (m32c_part_read): Likewise.
13568         (m32c_cat_read): Likewise.
13569         (m32c_r3r2r1r0_read): Likewise.
13570         (m32c_pseudo_register_read): Likewise.
13571         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
13572         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
13573         (mep_pseudo_cr64_read): Likewise.
13574         (mep_pseudo_register_read): Likewise.
13575         * mips-tdep.c (mips_pseudo_register_read): Likewise.
13576         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
13577         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
13578         * regcache.c (regcache::raw_read): Move it to readable_regcache.
13579         (regcache::cooked_read): Likewise.
13580         (regcache::cooked_read_value): Likewise.
13581         (regcache_cooked_read_signed):
13582         (regcache::cooked_read): Likewise.
13583         * regcache.h (readable_regcache): New class.
13584         (regcache): Inherit readable_regcache.  Move some methods to
13585         readable_regcache.
13586         * rl78-tdep.c (rl78_pseudo_register_read): Change
13587         parameter type to 'readable_regcache *'.
13588         * rs6000-tdep.c (do_regcache_raw_read): Remove.
13589         (e500_pseudo_register_read): Change parameter type to
13590         'readable_regcache *'.
13591         (dfp_pseudo_register_read): Likewise.
13592         (vsx_pseudo_register_read): Likewise.
13593         (efpr_pseudo_register_read): Likewise.
13594         * s390-tdep.c (s390_pseudo_register_read): Likewise.
13595         * sh-tdep.c (sh_pseudo_register_read): Likewise.
13596         * sh64-tdep.c (pseudo_register_read_portions): Likewise.
13597         (sh64_pseudo_register_read): Likewise.
13598         * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
13599         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
13600         * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
13601         (spu_pseudo_register_read): Likewise.
13602         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
13603         (xtensa_pseudo_register_read): Likewise.
13604
13605 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13606
13607         * regcache.c (regcache::regcache): Call reg_buffer ctor.
13608         (regcache::arch): Move it to reg_buffer::arch.
13609         (regcache::register_buffer): Likewise.
13610         (regcache::assert_regnum): Likewise.
13611         (regcache::num_raw_registers): Likewise.
13612         * regcache.h (reg_buffer): New class.
13613         (regcache): Inherit reg_buffer.
13614
13615 2018-02-20  Simon Marchi  <simon.marchi@ericsson.com>
13616
13617         * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
13618         gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
13619
13620 2018-02-20  Markus Metzger  <markus.t.metzger@intel.com>
13621
13622         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
13623
13624 2018-02-19  Alan Hayward  <alan.hayward@arm.com>
13625
13626         * Makefile.in: (COMMON_SFILES): Add common/*.c files.
13627         (SFILES): Remove common/*.c files.
13628         (COMMON_OBS): Remove some *.o files built from common/*.c files.
13629         * common/common.host: Add common reference.
13630         * configure.ac: Likewise.
13631         * configure: Regenerate.
13632
13633 2018-02-16  Yao Qi  <yao.qi@linaro.org>
13634
13635         * block.c (block_namespace_info): Inherit allocate_on_obstack.
13636         (block_initialize_namespace): Use new.
13637         * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
13638         (dwarf2_free_objfile): Use delete.
13639         * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
13640         (copy_type_recursive): Use new.
13641         * gdb_obstack.h (allocate_on_obstack): New.
13642
13643 2018-02-15  Yao Qi  <yao.qi@linaro.org>
13644
13645         PR gdb/22849
13646         * inferior.c (exit_inferior_1): Reset inf->control.
13647
13648 2018-02-15  Joel Brobecker  <brobecker@adacore.com>
13649
13650         * ada-lang.c (ada_to_fixed_value_create): Delete advance
13651         declaration.
13652
13653 2018-02-14  Pedro Alves  <palves@redhat.com>
13654
13655         * frame-unwind.c (frame_unwind_try_unwinder): Always call
13656         frame_cleanup_after_sniffer on exception.
13657
13658 2018-02-14  Tom Tromey  <tom@tromey.com>
13659
13660         * solist.h (struct target_so_ops) <bfd_open>: Make pathname
13661         const.
13662         (solib_bfd_open): Make pathname const.
13663         * solib.c (solib_bfd_open): Make pathname const.
13664         * solib-spu.c (spu_bfd_fopen): Make name const.
13665         (spu_bfd_open): Make pathname const.
13666         * solib-darwin.c (darwin_bfd_open): Make pathname const.
13667         * solib-aix.c (solib_aix_bfd_open): Make pathname const.
13668
13669 2018-02-14  Tom Tromey  <tom@tromey.com>
13670
13671         * symfile.c (symfile_bfd_open): Update.
13672         * source.h (openp, source_full_path_of, find_and_open_source):
13673         Change argument type to unique_xmalloc_ptr.
13674         * source.c (openp): Take a unique_xmalloc_ptr.
13675         (source_full_path_of, find_and_open_source): Likewise.
13676         (open_source_file, symtab_to_fullname): Update.
13677         * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
13678         unique_xmalloc_ptr.
13679         * solib.c (solib_find_1): Use unique_xmalloc_ptr.
13680         (exec_file_find): Update.
13681         * psymtab.c (psymtab_to_fullname): Update.
13682         * nto-tdep.h (nto_find_and_open_solib): Update.
13683         * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
13684         unique_xmalloc_ptr.
13685         * exec.c (exec_file_attach): Update.
13686         * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
13687         * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
13688
13689 2018-02-14  Tom Tromey  <tom@tromey.com>
13690
13691         * solib.c: Include source.h.
13692         * nto-tdep.c: Include source.h.
13693         * mi/mi-cmd-env.c: Include source.h.
13694         * infcmd.c: Include source.h.
13695         * exec.c: Include source.h.
13696         * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
13697         (add_path, directory_switch, source_path, init_source_path): Move
13698         declarations...
13699         * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
13700         (add_path, directory_switch, source_path, init_source_path):
13701         ...here.
13702
13703 2018-02-14  Tom Tromey  <tom@tromey.com>
13704
13705         * solist.h (exec_file_find, solib_find): Return
13706         unique_xmalloc_ptr.
13707         (solib_bfd_fopen): Take a const char *.
13708         * solib.c (solib_find_1): Return unique_xmalloc_ptr.
13709         (exec_file_find, solib_find): Likewise.
13710         (solib_bfd_fopen): Do not take ownership of "pathname".
13711         (solib_bfd_open): Use unique_xmalloc_ptr.
13712         * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
13713         * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
13714         * infrun.c (follow_exec): Use unique_xmalloc_ptr.
13715         * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
13716
13717 2018-02-14  Joel Brobecker  <brobecker@adacore.com>
13718
13719         * ada-lang.c (name_match_type_from_name): Remove reference to
13720         ada_name_for_lookup in function's documentation.
13721         * ada-lang.h (ada_name_for_lookup): Delete declaration.
13722
13723 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
13724
13725         * defs.h (enum openp_flags): New enum.
13726         (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
13727         Move to enum openp_flags.
13728         (openp_flags): New enum flags.
13729         (openp): Change parameter type to openp_flags.
13730         * source.c (openp): Change parameter type to openp_flags.
13731         * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
13732         * dwarf2read.c (try_open_dwop_file): Use openp_flags.
13733
13734 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
13735
13736         * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
13737         per-command.
13738
13739 2018-02-12  Andrew Burgess  <andrew.burgess@embecosm.com>
13740
13741         * dwarf2read.c (dwarf2_release_queue): Delete function, move body
13742         into...
13743         (class dwarf2_queue_guard): ...the destructor of this new class.
13744         (dw2_do_instantiate_symtab): Create instance of the new class
13745         dwarf2_queue_guard, remove cleanup.
13746
13747 2018-02-09  Tom Tromey  <tom@tromey.com>
13748
13749         * source.c (find_source_lines): Don't reference past the end of
13750         the vector.
13751
13752 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13753
13754         * remote.c (remote_btrace_maybe_reopen): Change error message.
13755         * btrace.c (btrace_enable): Likewise.
13756         (parse_xml_btrace): Likewise.
13757         (parse_xml_btrace_conf): Likewise.
13758
13759 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13760
13761         * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
13762         (linux_enable_pt, linux_enable_bts): Call
13763         diagnose_perf_event_open_fail.
13764
13765 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13766
13767         * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
13768         Remove parameter and change return type.  Update callers.  Move it.
13769         (linux_enable_bts, linux_enable_pt): Improve error message.
13770         (linux_enable_pt): Remove zero buffer size check.
13771         (linux_enable_btrace): Improve error messages.  Remove NULL return
13772         check.
13773
13774 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13775
13776         * btrace.c (btrace_enable): Remove target_supports_btrace call.
13777         * nat/linux-btrace.c (perf_event_pt_event_type): Move.
13778         (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
13779         (linux_supports_pt, linux_supports_btrace): Remove.
13780         (linux_enable_bts): Call cpu_supports_bts.
13781         * nat/linux-btrace.h (linux_supports_btrace): Remove.
13782         * remote.c (remote_supports_btrace): Remove.
13783         (init_remote_ops): Remove remote_supports_btrace.
13784         * target-delegates.c: Regenerated.
13785         * target.c (target_supports_btrace): Remove.
13786         * target.h (target_ops) <to_supports_btrace>: Remove
13787         (target_supports_btrace): Remove.
13788         * x86-linux-nat.c (x86_linux_create_target): Remove
13789         linux_supports_btrace.
13790
13791 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13792
13793         * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
13794         btrace failed.
13795         * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
13796         exception and use message in own exception.
13797
13798 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13799
13800         * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
13801         (perf_event_pt_event_type): Use gdb_file_up.
13802         (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
13803         scoped_fd, and scoped_mmap.
13804
13805 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13806
13807         * common/scoped_mmap.h: New.
13808         * unittests/scoped_mmap-selftest.c: New.
13809         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13810         unittests/scoped_mmap-selftest.c.
13811
13812 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13813
13814         * common/scoped_fd.h: New.
13815         * unittests/scoped_fd-selftest.c: New.
13816         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13817         unittests/scoped_fd-selftest.c.
13818
13819 2018-02-09  Tom Tromey  <tom@tromey.com>
13820
13821         * auto-load.c (auto_load_section_scripts): Use
13822         gdb::unique_xmalloc_ptr.
13823
13824 2018-02-09  Tom Tromey  <tom@tromey.com>
13825
13826         * auto-load.c (execute_script_contents): Use std::string.
13827
13828 2018-02-09  Joel Brobecker  <brobecker@adacore.com>
13829
13830         * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
13831         Python function, rather than a new command.
13832
13833 2018-02-08  Tom Tromey  <tom@tromey.com>
13834
13835         * solib.c (solib_find_1): Use std::string.
13836         (solib_bfd_fopen): Use unique_xmalloc_ptr.
13837
13838 2018-02-08  Tom Tromey  <tom@tromey.com>
13839
13840         * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
13841
13842 2018-02-08  Tom Tromey  <tom@tromey.com>
13843
13844         * source.c (find_source_lines): Use gdb::def_vector.
13845
13846 2018-02-08  Tom Tromey  <tom@tromey.com>
13847
13848         * macrocmd.c (struct temporary_macro_definition): New.
13849         (macro_define_command): Use temporary_macro_definition.  Remove
13850         cleanups.
13851         (free_macro_definition_ptr): Remove.
13852
13853 2018-02-08  Tom Tromey  <tom@tromey.com>
13854
13855         * macroexp.c (maybe_expand): Use std::string.
13856
13857 2018-02-08  Tom Tromey  <tom@tromey.com>
13858
13859         * macroexp.c (struct macro_buffer): Add initializers for some
13860         members.
13861         (init_buffer, init_shared_buffer, free_buffer)
13862         (free_buffer_return_text): Remove.
13863         (macro_buffer): New constructors.
13864         (~macro_buffer): New destructor.
13865         (macro_buffer::set_shared): New method.
13866         (macro_buffer::resize_buffer, macro_buffer::appendc)
13867         (macro_buffer::appendmem): Now methods, not free functions.
13868         (set_token, append_tokens_without_splicing, stringify)
13869         (macro_stringify): Update.
13870         (gather_arguments): Change return type.  Remove argc_p argument,
13871         add args_ptr argument.  Use std::vector.
13872         (substitute_args): Remove argc argument.  Accept std::vector.
13873         (expand): Update.  Use std::vector.
13874         (scan, macro_expand, macro_expand_next): Update.
13875
13876 2018-02-08  Tom Tromey  <tom@tromey.com>
13877
13878         * symtab.c (default_collect_symbol_completion_matches_break_on):
13879         Use unique_xmalloc_ptr.
13880         * macroscope.h: (sal_macro_scope, user_macro_scope)
13881         (default_macro_scope): Return unique_xmalloc_ptr.
13882         * macroscope.c (sal_macro_scope, user_macro_scope)
13883         (default_macro_scope): Return unique_xmalloc_ptr.
13884         * macroexp.h (macro_expand, macro_expand_once): Return
13885         unique_xmalloc_ptr.
13886         * macroexp.c (macro_expand, macro_expand_once): Return
13887         unique_xmalloc_ptr.
13888         * macrocmd.c (macro_expand_command, macro_expand_once_command)
13889         (info_macro_command, info_macros_command): Use
13890         unique_xmalloc_ptr.
13891         * compile/compile-c-support.c (write_macro_definitions): Use
13892         unique_xmalloc_ptr.
13893         * c-exp.y (c_parse): Use unique_xmalloc_ptr.
13894
13895 2018-02-07  Simon Marchi  <simon.marchi@ericsson.com>
13896
13897         * value.c (value_static_field): Assign field type instead of
13898         containing type when returning an optimized out value.
13899
13900 2018-02-06  Yao Qi  <yao.qi@linaro.org>
13901
13902         * ft32-tdep.c (ft32_read_pc): Remove.
13903         (ft32_write_pc): Remove.
13904         (ft32_gdbarch_init): Update.
13905         * m32r-tdep.c (m32r_read_pc): Remove.
13906         (m32r_gdbarch_init): Update.
13907         * mep-tdep.c (mep_read_pc): Remove.
13908         (mep_gdbarch_init): Update.
13909         * microblaze-tdep.c (microblaze_write_pc): Remove.
13910         (microblaze_gdbarch_init): Update.
13911         * mn10300-tdep.c (mn10300_read_pc): Remove.
13912         (mn10300_write_pc): Remove.
13913         (mn10300_gdbarch_init): Update.
13914         * moxie-tdep.c (moxie_read_pc): Remove.
13915         (moxie_write_pc): Remove.
13916         (moxie_gdbarch_init): Update.
13917
13918 2018-02-06  Yao Qi  <yao.qi@linaro.org>
13919
13920         * expprint.c (print_subexp_standard): Handle
13921         OP_F77_UNDETERMINED_ARGLIST.
13922         (dump_subexp_body_standard): Likewise.
13923
13924 2018-02-05  Alan Hayward  <alan.hayward@arm.com>
13925
13926         * target-descriptions.c (tdesc_element_visitor) Add empty
13927         implementations.
13928         (tdesc_type): Move make_gdb_type from here.
13929         (tdesc_type_builtin): Likewise.
13930         (tdesc_type_vector): Likewise.
13931         (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
13932         (make_gdb_type_struct): Move from tdesc_type_with_fields.
13933         (make_gdb_type_union): Likewise.
13934         (make_gdb_type_flags): Likewise.
13935         (make_gdb_type_enum): Likewise.
13936         (make_gdb_type): New function.
13937         (tdesc_register_type): Use static make_gdb_type.
13938
13939 2018-02-05  Ruslan Kabatsayev <b7.10110111@gmail.com>
13940
13941         * infcmd.c (default_print_one_register_info): Align natural-format
13942         column values consistently one under another.
13943         (pad_to_column): New function.
13944
13945 2018-02-05  Joel Brobecker  <brobecker@adacore.com>
13946
13947         * dwarf2read.c (dwarf2_physname): Move commment.
13948
13949 2018-02-01  Leszek Swirski  <leszeks@google.com>
13950
13951         * varobj.c (varobj_formatted_print_options): Allow recursive
13952         pretty printing if pretty printing is enabled.
13953
13954 2018-02-01  Leszek Swirski  <leszeks@google.com>
13955
13956         * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
13957         names after a structop as a filename.
13958
13959 2018-02-01  Yao Qi  <yao.qi@linaro.org>
13960
13961         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
13962         (arm_record_coproc_data_proc): Likewise.
13963
13964 2018-02-01  Yao Qi  <yao.qi@linaro.org>
13965
13966         * arm-tdep.c (arm_record_extension_space): Change ret to signed.
13967
13968 2018-01-31  Nikola Prica  <nikola.prica@rt-rk.com>
13969
13970         * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
13971         assign shifted lr_reg to fdata->lr_register when lr_reg is set.
13972
13973 2018-01-31  Pedro Alves  <palves@redhat.com>
13974
13975         * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
13976         * inflow.c (child_terminal_save_inferior): Wrap reference to
13977         tcgetpgrp in HAVE_TERMIOS_H.
13978         (child_interrupt, child_pass_ctrlc): Wrap references to signal in
13979         _WIN32.
13980         * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
13981         always iterate over all inferiors.
13982         (gdbsim_cntrl_c): Adjust.
13983         * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
13984
13985 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
13986
13987         * gdbtypes.c (lookup_array_range_type): Make sure the array's
13988         index type is objfile-owned if the element type is as well.
13989
13990 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
13991
13992         GDB 8.1 released.
13993
13994 2018-01-30  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13995
13996         * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
13997         "features/s390x-linux64.c".
13998         (_initialize_s390_linux_tdep): Remove initialization of tdescs
13999         s390_linux32 and s390x_linux64.
14000         (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
14001         default tdesc.
14002         * s390-tdep.c: Include "features/s390-linux32.c" and
14003         "features/s390x-linux64.c".
14004         (s390_tdesc_valid): Add check for tdesc_has_registers.
14005         (s390_gdbarch_init): Make sure there is always a valid tdesc.
14006         (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
14007         tdesc_s390x_linux64.
14008         * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
14009         tdesc_s390x_linux64 to...
14010         * s390-tdep.h: ...here.
14011
14012 2018-01-30  Pedro Alves  <palves@redhat.com>
14013
14014         PR gdb/13211
14015         * config.in, configure: Regenerate.
14016         * configure.ac: Check for getpgid.
14017         * go32-nat.c (go32_pass_ctrlc): New.
14018         (go32_target): Install it.
14019         * inf-child.c (inf_child_target): Install
14020         child_terminal_save_inferior, child_pass_ctrlc and
14021         child_interrupt.
14022         * inf-ptrace.c (inf_ptrace_interrupt): Delete.
14023         (inf_ptrace_target): No longer install it.
14024         * infcmd.c (interrupt_target_1): Adjust.
14025         * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
14026         (child_interrupt): Declare.
14027         (inferior::terminal_state): New.
14028         * inflow.c (struct terminal_info): Update comments.
14029         (inferior_process_group): Delete.
14030         (terminal_is_ours): Delete.
14031         (gdb_tty_state): New.
14032         (child_terminal_init): Adjust.
14033         (is_gdb_terminal, sharing_input_terminal_1)
14034         (sharing_input_terminal): New functions.
14035         (child_terminal_inferior): Adjust.  Use sharing_input_terminal.
14036         Set the process's actual process group in the foreground if
14037         possible.  Handle is_ours_for_output/is_ours distinction.  Don't
14038         mark terminal as the inferior's if not sharing GDB's terminal.
14039         Don't check attach_flag.
14040         (child_terminal_ours_for_output, child_terminal_ours): Adjust to
14041         pass down a target_terminal_state.
14042         (child_terminal_save_inferior): New, factored out from ...
14043         (child_terminal_ours_1): ... this.  Handle
14044         target_terminal_state::is_ours_for_output.
14045         (child_interrupt, child_pass_ctrlc): New.
14046         (inflow_inferior_exit): Clear the inferior's terminal_state.
14047         (copy_terminal_info): Copy the inferior's terminal state.
14048         (_initialize_inflow): Remove reference to terminal_is_ours.
14049         * inflow.h (inferior_process_group): Delete.
14050         * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
14051         * procfs.c (procfs_target): Don't install procfs_interrupt.
14052         (procfs_interrupt): Delete.
14053         * remote.c (remote_serial_quit_handler): Adjust.
14054         (remote_interrupt): Remove ptid parameter.  Adjust.
14055         * target-delegates.c: Regenerate.
14056         * target.c: Include "terminal.h".
14057         (target_terminal::terminal_state): Rename to ...
14058         (target_terminal::m_terminal_state): ... this.
14059         (target_terminal::init): Adjust.
14060         (target_terminal::inferior): Adjust to per-inferior
14061         terminal_state.
14062         (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
14063         (target_terminal::ours, target_terminal::ours_for_output): Use
14064         target_terminal_is_ours_kind.
14065         (target_interrupt): Remove ptid parameter.  Adjust.
14066         (default_target_pass_ctrlc): Adjust.
14067         * target.h (target_ops::to_terminal_save_inferior): New field.
14068         (target_ops::to_interrupt): Remove ptid_t parameter.
14069         (target_interrupt): Remove ptid_t parameter.  Update comment.
14070         (target_pass_ctrlc): Update comment.
14071         * target/target.h (target_terminal_state): New scoped enum,
14072         factored out of ...
14073         (target_terminal::terminal_state): ... here.
14074         (target_terminal::inferior): Update comments.
14075         (target_terminal::restore_inferior): New.
14076         (target_terminal::is_inferior, target_terminal::is_ours)
14077         (target_terminal::is_ours_for_output): Adjust.
14078         (target_terminal::scoped_restore_terminal_state): Adjust to
14079         rename, and call restore_inferior() instead of inferior().
14080         (target_terminal::scoped_restore_terminal_state::m_state): Change
14081         type.
14082         (target_terminal::terminal_state): Rename to ...
14083         (target_terminal::m_terminal_state): ... this and change type.
14084
14085 2018-01-30  Pedro Alves  <palves@redhat.com>
14086
14087         * linux-nat.c (wait_for_signal): New function.
14088         (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
14089         directly.
14090         (async_terminal_is_ours)
14091         (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
14092         (linux_nat_add_target): Don't override
14093         to_terminal_inferior/to_terminal_ours.
14094
14095 2018-01-29  Sergio Durigan Junior  <sergiodj@redhat.com>
14096
14097         * remote.c (remote_follow_fork): Don't call "detach_inferior".
14098
14099 2018-01-28  Simon Marchi  <simon.marchi@ericsson.com>
14100
14101         * dwarf2read.c (free_dwo_files): Add forward-declaration.
14102         (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
14103         dwarf2_per_objfile_free here.
14104         (dwarf2_per_objfile_free): Remove.
14105         (_initialize_dwarf2_read): Don't register
14106         dwarf2_per_objfile_free as a registry cleanup.
14107
14108 2018-01-27  Eli Zaretskii  <eliz@gnu.org>
14109
14110         Avoid compilation errors in MinGW native builds
14111
14112         The error is triggered by including python-internal.h, and the
14113         error message is:
14114
14115              In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
14116                       from build-gnulib/import/math.h:27,
14117                       from d:/usr/Python26/include/pyport.h:235,
14118                       from d:/usr/Python26/include/Python.h:58,
14119                       from python/python-internal.h:94,
14120                       from python/py-arch.c:24:
14121              d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
14122         using ::hypot;
14123                 ^~~~~
14124
14125         This happens because Python headers define 'hypot' to expand t
14126         '_hypot' in the Windows builds.
14127         * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
14128         'hypoth'.  This avoids a compilation error.
14129
14130 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
14131
14132         * MAINTAINERS (Write After Approval): Fix ordering.
14133
14134 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
14135
14136         * MAINTAINERS (Write After Approval): Add Alan Hayward.
14137
14138 2018-01-26  Alan Modra  <amodra@gmail.com>
14139
14140         * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
14141         (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
14142         Remove nop.  Make const.  Comment.
14143         (powerpc32_plt_stub_so_2): New.
14144         (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
14145         Correct count.  Update uses.
14146         (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
14147         Move common code reading PLT entry word.  Correct
14148         powerpc32_plt_stub PLT address calculation.
14149         * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
14150         (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
14151         (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
14152         (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
14153         (ppc64_standard_linkage8): Likewise.
14154         * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
14155         Correct insns description.
14156         * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
14157
14158 2018-01-24  Pedro Alves  <palves@redhat.com>
14159
14160         GCC PR libstdc++/83906
14161         * gdbtypes.c (operator==(const dynamic_prop &,
14162         const dynamic_prop &)): New.
14163         (operator==(const range_bounds &, const range_bounds &)): New.
14164         (check_types_equal): Use them instead of memcmp.
14165         * gdbtypes.h (operator==(const dynamic_prop &,
14166         const dynamic_prop &)): Declare.
14167         (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
14168         (operator==(const range_bounds &, const range_bounds &)): Declare.
14169         (operator!=(const range_bounds &, const range_bounds &)): Declare.
14170
14171 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14172
14173         * s390-linux-tdep.c (s390_record_address_mask)
14174         (s390_record_calc_disp_common, s390_record_calc_disp)
14175         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
14176         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
14177         (s390_process_record): Move to s390-tdep.c.
14178         (s390_linux_init_abi_any): Adjust.
14179         * s390-tdep.c (s390_record_address_mask)
14180         (s390_record_calc_disp_common, s390_record_calc_disp)
14181         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
14182         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
14183         (s390_process_record): Moved from s390-linux-tdep.c
14184         (s390_gdbarch_init): Adjust.
14185
14186 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14187
14188         * s390-linux-nat.c (s390-tdep.h): New include.
14189         * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
14190         (HFILES_NO_SRCDIR): Add s390-tdep.h.
14191         (ALLDEPFILES): Add s390-tdep.c.
14192         * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
14193         * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
14194         * s390-tdep.h: ...this.  New file.
14195         * s390-linux-tdep.c (s390-tdep.h): New include.
14196         (_initialize_s390_tdep): Rename to...
14197         (_initialize_s390_linux_tdep): ...this and adjust.
14198         (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
14199         (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
14200         s390-tdep.h.
14201         (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
14202         (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
14203         (s390_is_partial_instruction, s390_software_single_step)
14204         (is_non_branch_ril, s390_displaced_step_copy_insn)
14205         (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
14206         (s390_prologue_data, s390_addr, s390_store, s390_load)
14207         (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
14208         (s390_register_call_saved, s390_guess_tracepoint_registers)
14209         (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
14210         (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
14211         (s390_pseudo_register_name, s390_pseudo_register_type)
14212         (s390_pseudo_register_read, s390_pseudo_register_write)
14213         (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
14214         (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
14215         (s390_addr_bits_remove, s390_address_class_type_flags)
14216         (s390_address_class_type_flags_to_name)
14217         (s390_address_class_name_to_type_flags, s390_effective_inner_type)
14218         (s390_function_arg_float, s390_function_arg_vector)
14219         (is_power_of_two, s390_function_arg_integer, s390_arg_state)
14220         (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
14221         (s390_frame_align, s390_register_return_value, s390_return_value)
14222         (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
14223         (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
14224         (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
14225         (s390_trad_frame_prev_register, s390_unwind_cache)
14226         (s390_prologue_frame_unwind_cache)
14227         (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
14228         (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
14229         (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
14230         (s390_stub_frame_this_id, s390_stub_frame_prev_register)
14231         (s390_stub_frame_sniffer, s390_stub_frame_unwind)
14232         (s390_frame_base_address, s390_local_base_address)
14233         (s390_frame_base, s390_gcc_target_options)
14234         (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
14235         (s390_validate_reg_range, s390_tdesc_valid)
14236         (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
14237         * s390-tdep.c: ...this.  New file.
14238
14239 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14240
14241         * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
14242         (s390_process_record, s390_gdbarch_tdep_alloc)
14243         (s390_linux_init_abi_any): Use/set new hook.
14244
14245 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14246
14247         * s390-linux-tdep.c (osabi.h): New include.
14248         (s390_linux_init_abi_31, s390_linux_init_abi_64)
14249         (s390_linux_init_abi_any): New functions.
14250         (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
14251
14252 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14253
14254         * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
14255         tdesc_has_registers check
14256
14257 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14258
14259         * s390-linux-tdep.c (s390_tdesc_valid): New function.
14260         (s390_validate_reg_range): New macro.
14261         (s390_gdbarch_init): Adjust.
14262
14263 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14264
14265         * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
14266         (s390_gdbarch_tdep_alloc): Adjust.
14267         (s390_gdbarch_init): Adjust.
14268
14269 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14270
14271         * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
14272         <have_tdb>: Change type to bool.
14273         (s390_gdbarch_tdep_alloc): Adjust.
14274         (s390_gdbarch_init): Adjust.
14275
14276 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14277
14278         * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
14279         (gdbarch_tdep) <have_upper, have_vx>: New fields.
14280         (s390_gdbarch_tdep_alloc): New function.
14281         (s390_gdbarch_init): Allocate tdep at start and use its fields
14282         instead of separate variables.
14283
14284 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14285
14286         * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
14287         when looking for cached gdbarch and add comment for remaining.
14288
14289 2018-01-22  Pedro Alves  <palves@redhat.com>
14290             Sergio Durigan Junior  <sergiodj@redhat.com>
14291
14292         * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
14293         case.
14294
14295 2018-01-22  Maciej W. Rozycki  <macro@mips.com>
14296
14297         * MAINTAINERS: Update my company e-mail address.
14298
14299 2018-01-22  Yao Qi  <yao.qi@linaro.org>
14300
14301         * regcache.c (cooked_write_test): New function.
14302         (_initialize_regcache): Register the test.
14303
14304 2018-01-22  Yao Qi  <yao.qi@linaro.org>
14305
14306         * ia64-tdep.c (ia64_pseudo_register_read): Call
14307         regcache->cooked_read instead of regcache_cooked_read_unsigned.
14308         * m32c-tdep.c (m32c_cat_read): Likewise.
14309         (m32c_r3r2r1r0_read): Likewise.
14310         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
14311         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
14312
14313 2018-01-22  Yao Qi  <yao.qi@linaro.org>
14314
14315         * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
14316         method raw_read instead of regcache_raw_read.
14317         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
14318         * arm-tdep.c (arm_neon_quad_read): Likewise.
14319         * avr-tdep.c (avr_pseudo_register_read): Likewise.
14320         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
14321         * frv-tdep.c (frv_pseudo_register_read): Likewise.
14322         * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
14323         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
14324         (i386_pseudo_register_read_into_value): Likewise.
14325         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
14326         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
14327         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
14328         * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
14329         * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
14330         * sparc-tdep.c (sparc32_pseudo_register_read):  Likewise.
14331         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
14332         * spu-tdep.c (spu_pseudo_register_read_spu):  Likewise.
14333         * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
14334
14335 2018-01-22  Yao Qi  <yao.qi@linaro.org>
14336
14337         * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
14338         * configure.tgt: Remove target mt.
14339         * mt-tdep.c: Remove.
14340         * regcache.c (cooked_read_test): Remove the check for mt.
14341
14342 2018-01-22  Yao Qi  <yao.qi@linaro.org>
14343
14344         * jit.c (jit_frame_prev_register): Call regcache::cooked_read
14345         instead of gdbarch_pseudo_register_read_value.
14346
14347 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
14348
14349         * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
14350         language is Ada.
14351
14352 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
14353
14354         * linespec.c (create_sals_line_offset): Remove code that preserved
14355         the symtab_and_line's line number.
14356
14357 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
14358
14359         * varobj.c (varobj_create): Don't set valid_block when creating a
14360         floating varobj.
14361
14362 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
14363
14364         * varobj.c (varobj_create): Remove out of date comment.
14365
14366 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
14367
14368         PR mi/20395
14369         * ada-exp.y (write_var_from_sym): Pass extra parameter when
14370         updating innermost block.
14371         * parse.c (innermost_block_tracker::update): Take extra type
14372         parameter, and check types match before updating innermost block.
14373         (write_dollar_variable): Update innermost block for registers.
14374         * parser-defs.h (enum innermost_block_tracker_type): New enum.
14375         (innermost_block_tracker::innermost_block_tracker): Initialise
14376         m_types member.
14377         (innermost_block_tracker::reset): Take type parameter.
14378         (innermost_block_tracker::update): Take type parameter, and pass
14379         type through as needed.
14380         (innermost_block_tracker::m_types): New member.
14381         * varobj.c (varobj_create): Pass type when reseting innermost
14382         block.
14383
14384 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
14385
14386         * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
14387         * ada-lang.c (resolve_subexp): Likewise.
14388         * breakpoint.c (set_breakpoint_condition) Likewise.
14389         (watch_command_1) Likewise.
14390         * c-exp.y (variable): Likewise.
14391         * d-exp.y (PrimaryExpression): Likewise.
14392         * f-exp.y (variable): Likewise.
14393         * go-exp.y (variable): Likewise.
14394         * m2-exp.y (variable): Likewise.
14395         * objfiles.c (objfile::~objfile): Likewise.
14396         * p-exp.y (variable): Likewise.
14397         * parse.c (innermost_block): Change type.
14398         * parser-defs.h (class innermost_block_tracker): New.
14399         (innermost_block): Change to innermost_block_tracker.
14400         * printcmd.c (display_command): Switch to innermost_block API.
14401         (do_one_display): Likewise.
14402         * rust-exp.y (do_one_display): Likewise.
14403         * symfile.c (clear_symtab_users): Likewise.
14404         * varobj.c (varobj_create): Switch to innermost_block API, replace
14405         use of innermost_block with block stored on varobj object.
14406
14407 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
14408
14409         * expression.h (innermost_block): Remove declaration.
14410         * varobj.c: Add 'parser-defs.h' include.
14411
14412 2018-01-19  Tom Tromey  <tom@tromey.com>
14413
14414         * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
14415         symbols in the static and global blocks.
14416
14417 2018-01-19  James Clarke  <jrtc27@jrtc27.com>
14418
14419         * nat/linux-ptrace.c: Remove unnecessary reinclusion of
14420         gdb_ptrace.h, and move including gdb_wait.h ...
14421         * nat/linux-ptrace.h: ... to here.
14422
14423 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
14424
14425         * inf-ptrace.c (inf_ptrace_detach): Adjust call to
14426         inf_ptrace_detach_success.
14427         (inf_ptrace_detach_success): Add inferior parameter, use it
14428         instead of inferior_ptid, pass it to detach_inferior.
14429         * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
14430         parameter.
14431         * inferior.c (detach_inferior): Add overload that takes an
14432         inferior object.
14433         * inferior.h (detach_inferior): Likewise.
14434         * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
14435         use inferior_ptid, adjust call to inf_ptrace_detach_success.
14436         * linux-thread-db.c (thread_db_detach): Use inf parameter.
14437
14438 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
14439
14440         * target.h (struct target_ops) <to_detach>: Add inferior
14441         parameter.
14442         (target_detach): Likewise.
14443         * target.c (dispose_inferior): Pass inferior down.
14444         (target_detach): Pass inferior down.  Assert that it is equal to
14445         the current inferior.
14446         * aix-thread.c (aix_thread_detach): Pass inferior down.
14447         * corefile.c (core_file_command): Pass current_inferior() down.
14448         * corelow.c (core_detach): Add inferior parameter.
14449         * darwin-nat.c (darwin_detach): Likewise.
14450         * gnu-nat.c (gnu_detach): Likewise.
14451         * inf-ptrace.c (inf_ptrace_detach): Likewise.
14452         * infcmd.c (detach_command): Pass current_inferior() down to
14453         target_detach.
14454         * infrun.c (follow_fork_inferior): Pass parent_inf to
14455         target_detach.
14456         (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
14457         target_detach.
14458         * linux-nat.c (linux_nat_detach): Add inferior parameter.
14459         * linux-thread-db.c (thread_db_detach): Likewise.
14460         * nto-procfs.c (procfs_detach): Likewise.
14461         * procfs.c (procfs_detach): Likewise.
14462         * record.c (record_detach): Likewise.
14463         * record.h (struct inferior): Forward-declare.
14464         (record_detach): Add inferior parameter.
14465         * remote-sim.c (gdbsim_detach): Likewise.
14466         * remote.c (remote_detach_1): Likewise.
14467         (remote_detach): Likewise.
14468         (extended_remote_detach): Likewise.
14469         * sol-thread.c (sol_thread_detach): Likewise.
14470         * target-debug.h (target_debug_print_inferior_p): New macro.
14471         * target-delegates.c: Re-generate.
14472         * top.c (kill_or_detach): Pass inferior down to target_detach.
14473         * windows-nat.c (windows_detach): Add inferior parameter.
14474
14475 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
14476
14477         * target.h (struct target_ops) <to_detach>: Remove args
14478         parameter.
14479         (target_detach): Likewise.
14480         * target.c (dispose_inferior): Adjust.
14481         (target_detach): Remove args parameter, adjust.
14482         * aix-thread.c (aix_thread_detach): Adjust.
14483         * corefile.c (core_file_command): Adjust.
14484         * corelow.c (core_detach): Adjust.
14485         * darwin-nat.c (darwin_detach): Adjust.
14486         * gnu-nat.c (gnu_detach): Adjust.
14487         * inf-ptrace.c (inf_ptrace_detach): Adjust.
14488         * infcmd.c (detach_command): Adjust
14489         * infrun.c (follow_fork_inferior): Adjust.
14490         (handle_vfork_child_exec_or_exit): Adjust.
14491         * linux-fork.c (linux_fork_detach): Remove args parameter.
14492         * linux-fork.h (linux_fork_detach): Likewise.
14493         * linux-nat.c (linux_nat_detach): Likewise, and adjust.
14494         * linux-thread-db.c (thread_db_detach): Likewise.
14495         * nto-procfs.c (procfs_detach): Likewise.
14496         * procfs.c (procfs_detach): Likewise.
14497         (do_detach): Remove signo parameter.
14498         * record.c (record_detach): Remove args parameter.
14499         * record.h (record_detach): Likewise.
14500         * remote-sim.c (gdbsim_detach): Likewise.
14501         * remote.c (remote_detach_1): Likewise.
14502         (remote_detach): Likewise.
14503         (extended_remote_detach): Likewise.
14504         * sol-thread.c (sol_thread_detach): Likewise.
14505         * target-delegates.c: Re-generate.
14506         * top.c (struct qt_args) <args>: Remove field.
14507         (kill_or_detach): Don't pass args.
14508         (quit_force): Don't set args.
14509         * windows-nat.c (windows_detach): Remove args parameter.
14510
14511 2018-01-19  Yao Qi  <yao.qi@linaro.org>
14512
14513         * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
14514         (arm_linux_init_abi): Install it.
14515
14516 2018-01-19  Yao Qi  <yao.qi@linaro.org>
14517
14518         * osabi.c (gdb_osabi_names): Extend the regexp for
14519         arm-linux-gnueabihf.
14520
14521 2018-01-18  Yao Qi  <yao.qi@linaro.org>
14522
14523         * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
14524         m_abbrevs.
14525         (abbrev_table::add_abbrev): Update.
14526         (abbrev_table::lookup_abbrev): Update.
14527
14528 2018-01-18  Yao Qi  <yao.qi@linaro.org>
14529
14530         * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
14531
14532 2018-01-17  Sergio Durigan Junior  <sergiodj@redhat.com>
14533
14534         * compile/compile.c (compile_to_object): Convert "triplet_rx"
14535         to "std::string".
14536
14537 2018-01-17  Tom Tromey  <tom@tromey.com>
14538
14539         * dwarf2read.c (symbolp): Remove typedef.  Don't instantiate VEC.
14540
14541 2018-01-17  Tom Tromey  <tom@tromey.com>
14542
14543         * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
14544         * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
14545         (create_array_type_with_stride): Update.
14546         * dwarf2read.c (set_die_type): Update.
14547
14548 2018-01-17  Tom Tromey  <tom@tromey.com>
14549
14550         * dwarf2read.c (delayed_method_info): Remove typedef.
14551         (dwarf2_cu::method_info): Now a std::vector.
14552         (add_to_method_list): Update.
14553         (free_delayed_list): Remove.
14554         (compute_delayed_physnames): Update.
14555         (process_full_comp_unit, process_full_type_unit): Clear the method
14556         list.  Remove cleanups.
14557         (psymtab_include_file_name): Add name_holder parameter.  Use
14558         unique_xmalloc_ptr.
14559         (dwarf_decode_lines): Update.
14560
14561 2018-01-17  Tom Tromey  <tom@tromey.com>
14562             Simon Marchi  <simon.marchi@ericsson.com>
14563
14564         * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
14565         (dwarf2_per_objfile::free_cached_comp_units)
14566         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
14567         (init_cutu_and_read_dies_no_follow): Update.
14568         (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
14569         (dwarf2_cu::~dwarf2_cu): New.
14570         (free_heap_comp_unit, free_stack_comp_unit): Remove.
14571         (age_cached_comp_units, free_one_cached_comp_unit): Update.
14572
14573 2018-01-17  Tom Tromey  <tom@tromey.com>
14574             Simon Marchi  <simon.marchi@ericsson.com>
14575
14576         * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
14577         (struct die_reader_specs) <abbrev_table>: New member.
14578         (struct abbrev_table): Add constructor.
14579         <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
14580         <abbrev_obstack>: Now an auto_obstack.
14581         (abbrev_table_up): New typedef.
14582         (init_cu_die_reader): Add abbrev_table parameter.
14583         (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
14584         Add result_dwo_abbrev_table.
14585         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
14586         (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
14587         Update.
14588         (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
14589         parameter.
14590         (skip_children): Update.
14591         (abbrev_table::alloc_abbrev): Rename from
14592         abbrev_table_alloc_abbrev.
14593         (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
14594         (abbrev_table::lookup_abbrev): Rename from
14595         abbrev_table_lookup_abbrev.
14596         (abbrev_table_read_table): Return abbrev_table_up.
14597         (abbrev_table_free, abbrev_table_free_cleanup)
14598         (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
14599         (load_partial_dies): Update.
14600
14601 2018-01-17  Tom Tromey  <tom@tromey.com>
14602
14603         * dwarf2read.c (dwarf2_compute_name): Update comment.
14604         (read_func_scope, read_variable): Update.
14605         (new_symbol): Remove.
14606         (new_symbol_full): Rename to new_symbol.
14607
14608 2018-01-17  Mike Gulick  <mgulick@mathworks.com>
14609
14610         PR gdb/16577
14611         * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
14612         a warning instead of throwing an error, set section size to 0 and return
14613         NULL.
14614         * gdb_bfd.h (gdb_bfd_map_section): Update description.
14615
14616 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
14617
14618         * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
14619         std::string.
14620         (linux_ptrace_attach_fail_reason_string): Likewise.
14621         * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
14622         Likewise.
14623         (linux_ptrace_attach_fail_reason_string): Likewise.
14624         * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
14625
14626 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
14627
14628         * linux-nat.c (linux_nat_attach): Remove xstrdup.
14629
14630 2018-01-17  Eldar Abusalimov  <eldar.abusalimov@jetbrains.com>
14631
14632         PR gdb/21559
14633         * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
14634         checking for fs_base/gs_base fields in struct user_regs_struct.
14635         * configure: Regenerate.
14636
14637 2018-01-17  Yao Qi  <yao.qi@linaro.org>
14638
14639         * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
14640         function.
14641         (aarch64_linux_init_abi): Install it to gdbarch hook
14642         gcc_target_options.
14643
14644 2018-01-15  Pedro Alves  <palves@redhat.com>
14645
14646         * common/signals-state-save-restore.c
14647         (save_original_signals_state): Fix typos.
14648
14649 2017-01-12  Tom Tromey  <tom@tromey.com>
14650             Sergio Durigan Junior  <sergiodj@redhat.com>
14651
14652         * Makefile.in (install-only): Install gdb-add-index.
14653
14654 2018-01-12  John Baldwin  <jhb@FreeBSD.org>
14655
14656         * fbsd-tdep.c (KVE_PROTECTION): Correct value.
14657
14658 2018-01-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
14659
14660         * infrun.c (keep_going_pass_signal): Clear step-over info when
14661         insert_breakpoints fails.
14662
14663 2018-01-11  Pedro Alves  <palves@redhat.com>
14664
14665         PR gdb/22583
14666         * infrun.c (resume): Rename to ...
14667         (resume_1): ... this.
14668         (resume): Reimplement as wrapper around resume_1.
14669
14670 2018-01-11  Pedro Alves  <palves@redhat.com>
14671
14672         PR remote/22597
14673         * remote.c (remote_parse_stop_reply): Default to the last-set
14674         general thread instead of to 'magic_null_ptid'.
14675
14676 2018-01-10  Pedro Alves  <palves@redhat.com>
14677
14678         * language.h (language_get_symbol_name_matcher): Rename ...
14679         (get_symbol_name_matcher): ... this.
14680         * language.c (language_get_symbol_name_matcher): Ditto.
14681         * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
14682         callers adjusted.
14683
14684 2018-01-10  Pedro Alves  <palves@redhat.com>
14685
14686         PR gdb/22670
14687         * dwarf2read.c
14688         (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
14689         Adjust to use language_get_symbol_name_matcher instead of
14690         language_defn::la_get_symbol_name_matcher.
14691         * language.c (language_get_symbol_name_matcher): If in Ada mode
14692         and the lookup name is a verbatim match, return Ada's matcher.
14693         * language.h (language_get_symbol_name_matcher): Adjust comment.
14694         (ada_lookup_name_info::verbatim_p):: New method.
14695
14696 2018-01-10  Pedro Alves  <palves@redhat.com>
14697
14698         PR gdb/22670
14699         * ada-lang.c (ada_collect_symbol_completion_matches): If the
14700         minsym's language is language_auto or language_cplus, pass down
14701         language_ada instead.
14702         * symtab.c (compare_symbol_name): Don't frob symbol language here.
14703
14704 2018-01-10  Pedro Alves  <palves@redhat.com>
14705
14706         PR gdb/22670
14707         * minsyms.c (linkage_name_str): New function.
14708         (iterate_over_minimal_symbols): Use it.
14709
14710 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
14711
14712         * NEWS: Document that 'info proc' now works on FreeBSD.
14713
14714 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
14715
14716         * configure.ac: Check for kinfo_getfile in libutil.
14717         * configure: Regenerate.
14718         * config.in: Regenerate.
14719         * fbsd-nat.c: Include "fbsd-tdep.h".
14720         (fbsd_fetch_cmdline): New.
14721         (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
14722         rather than calling error.
14723         (fbsd_info_proc): New.
14724         (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
14725         (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
14726         (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
14727
14728 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
14729
14730         * fbsd-nat.c (struct free_deleter): Remove.
14731         (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
14732
14733 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
14734
14735         * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
14736         NULL for an empty pathname.
14737
14738 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
14739
14740         * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
14741         (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
14742         (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
14743         (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
14744         (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
14745         (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
14746         (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
14747         (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
14748         (kinfo_proc_layout_32, kinfo_proc_layout_i386)
14749         (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
14750         (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
14751         (fbsd_core_fetch_timeval, fbsd_print_sigset)
14752         (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
14753         (fbsd_init_abi):  Install gdbarch "core_info_proc" method.
14754         * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
14755
14756 2018-01-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>
14757
14758         * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
14759         (gnu_xfer_auxv): New function.
14760         (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
14761         TARGET_OBJECT_AUXV.
14762
14763 2018-01-08  Yao Qi  <yao.qi@linaro.org>
14764             Simon Marchi  <simon.marchi@ericsson.com>
14765
14766         * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
14767         common/selftest.c.
14768         (COMMON_OBS): Remove selftest.o.
14769         * configure.ac: Append selftest-arch.c and common/selftest.c to
14770         CONFIG_SRCS.  Append selftest-arch.o and selftest.o to COMMON_OBS.
14771         * configure: Re-generated.
14772         * maint.c (maintenance_selftest): Wrap selftests::run_tests with
14773         GDB_SELF_TEST.
14774         (maintenance_info_selftests): Likewise.
14775
14776 2018-01-08  Xavier Roirand  <roirand@adacore.com>
14777
14778         * ada-valprint.c (val_print_packed_array_elements): Use
14779         proper number of elements when printing an array indexed
14780         by an enumeration type.
14781
14782 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
14783
14784         * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
14785         (dw2_get_file_names_reader): Adjust.
14786         (lookup_dwo_signatured_type): Adjust.
14787         (lookup_dwp_signatured_type): Adjust.
14788         (lookup_signatured_type): Adjust.
14789         (create_type_unit_group): Adjust.
14790         (get_type_unit_group): Adjust.
14791         (process_psymtab_comp_unit_reader): Adjust.
14792         (build_type_psymtabs_reader): Adjust.
14793         (scan_partial_symbols): Adjust.
14794         (add_partial_symbol): Adjust.
14795         (add_partial_subprogram): Adjust.
14796         (peek_die_abbrev): Adjust.
14797         (fixup_go_packaging): Adjust.
14798         (process_imported_unit_die): Adjust.
14799         (dwarf2_compute_name): Adjust.
14800         (dwarf2_physname): Adjust.
14801         (read_import_statement): Adjust.
14802         (handle_DW_AT_stmt_list): Adjust.
14803         (read_file_scope): Adjust.
14804         (read_func_scope): Adjust.
14805         (read_lexical_block_scope): Adjust.
14806         (read_call_site_scope): Adjust.
14807         (read_variable): Adjust.
14808         (dwarf2_rnglists_process): Adjust.
14809         (dwarf2_ranges_process): Adjust.
14810         (dwarf2_ranges_read): Adjust.
14811         (dwarf2_get_pc_bounds): Adjust.
14812         (dwarf2_record_block_ranges): Adjust.
14813         (dwarf2_add_field): Adjust.
14814         (dwarf2_add_member_fn): Adjust.
14815         (read_structure_type): Adjust.
14816         (process_structure_scope): Adjust.
14817         (read_enumeration_type): Adjust.
14818         (read_array_type): Adjust.
14819         (mark_common_block_symbol_computed): Adjust.
14820         (read_common_block): Adjust.
14821         (read_namespace_type): Adjust.
14822         (read_namespace): Adjust.
14823         (read_module_type): Adjust.
14824         (read_tag_pointer_type): Adjust.
14825         (read_tag_ptr_to_member_type): Adjust.
14826         (read_tag_string_type): Adjust.
14827         (read_subroutine_type): Adjust.
14828         (read_typedef): Adjust.
14829         (read_base_type): Adjust.
14830         (attr_to_dynamic_prop): Adjust.
14831         (read_subrange_type): Adjust.
14832         (read_unspecified_type): Adjust.
14833         (dwarf2_read_abbrevs): Adjust.
14834         (load_partial_dies): Adjust.
14835         (read_partial_die): Adjust.
14836         (find_partial_die): Adjust.
14837         (guess_partial_die_structure_name): Adjust.
14838         (fixup_partial_die): Adjust.
14839         (read_attribute_value): Adjust.
14840         (read_addr_index): Adjust.
14841         (read_addr_index_from_leb128): Adjust.
14842         (read_str_index): Adjust.
14843         (dwarf2_string_attr): Adjust.
14844         (get_debug_line_section): Adjust.
14845         (dwarf_decode_line_header): Adjust.
14846         (lnp_state_machine::check_line_address): Adjust.
14847         (dwarf_decode_lines_1): Adjust.
14848         (dwarf_decode_lines): Adjust.
14849         (dwarf2_start_symtab): Adjust.
14850         (var_decode_location): Adjust.
14851         (new_symbol_full): Adjust.
14852         (dwarf2_const_value_data): Adjust.
14853         (dwarf2_const_value_attr): Adjust.
14854         (dwarf2_const_value): Adjust.
14855         (die_type): Adjust.
14856         (die_containing_type): Adjust.
14857         (build_error_marker_type): Adjust.
14858         (lookup_die_type): Adjust.
14859         (guess_full_die_structure_name): Adjust.
14860         (anonymous_struct_prefix): Adjust.
14861         (determine_prefix): Adjust.
14862         (dwarf2_name): Adjust.
14863         (follow_die_ref_or_sig): Adjust.
14864         (follow_die_offset): Adjust.
14865         (follow_die_ref): Adjust.
14866         (follow_die_sig_1): Adjust.
14867         (follow_die_sig): Adjust.
14868         (get_signatured_type): Adjust.
14869         (get_DW_AT_signature_type): Adjust.
14870         (decode_locdesc): Adjust.
14871         (dwarf_decode_macros): Adjust.
14872         (cu_debug_loc_section): Adjust.
14873         (fill_in_loclist_baton): Adjust.
14874         (dwarf2_symbol_mark_computed): Adjust.
14875         (init_one_comp_unit): Don't assign
14876         dwarf2_cu::dwarf2_per_objfile.
14877         (set_die_type): Adjust.
14878
14879 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
14880
14881         * dwarf2read.c (struct mapped_debug_names): Add constructor.
14882         <dwarf2_per_objfile>: New field.
14883         (dwarf2_per_objfile): Remove global.
14884         (get_dwarf2_per_objfile): New function.
14885         (set_dwarf2_per_objfile): New function.
14886         (dwarf2_build_psymtabs_hard): Change objfile parameter to
14887         dwarf2_per_objfile.
14888         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
14889         (read_abbrev_offset): Likewise.
14890         (read_indirect_string): Likewise.
14891         (read_indirect_line_string): Likewise.
14892         (read_indirect_string_at_offset): Likewise.
14893         (read_indirect_string_from_dwz): Likewise.
14894         (dwarf2_find_containing_comp_unit): Change objfile parameter to
14895         dwarf2_per_objfile.
14896         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
14897         (create_all_comp_units): Change objfile parameter to
14898         dwarf2_per_objfile.
14899         (create_all_type_units): Likewise.
14900         (process_queue): Add dwarf2_per_objfile parameter.
14901         (read_and_check_comp_unit_head): Likewise.
14902         (lookup_dwo_unit_in_dwp): Likewise.
14903         (get_dwp_file): Likewise.
14904         (process_cu_includes): Likewise.
14905         (struct free_dwo_file_cleanup_data): New struct.
14906         (dwarf2_has_info): Use get_dwarf2_per_objfile and
14907         set_dwarf2_per_objfile.
14908         (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
14909         (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
14910         context, adjust calls.
14911         (dw2_instantiate_symtab): Likewise.
14912         (dw2_get_cutu): Add dwarf2_per_objfile parameter.
14913         (dw2_get_cu): Likewise.
14914         (create_cu_from_index_list): Change objfile parameter to
14915         dwarf2_per_objfile.
14916         (create_cus_from_index_list): Get dwarf2_per_objfile from
14917         context, adjust calls.
14918         (create_cus_from_index): Likewise.
14919         (create_signatured_type_table_from_index): Change objfile
14920         parameter to dwarf2_per_objfile.
14921         (create_signatured_type_table_from_debug_names): Change objfile
14922         parameter to dwarf2_per_objfile.
14923         (create_addrmap_from_index): Likewise.
14924         (create_addrmap_from_aranges): Likewise.
14925         (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
14926         (dw2_setup): Remove.
14927         (dw2_get_file_names_reader): Get dwarf2_per_objfile from
14928         context.
14929         (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
14930         get_dwarf2_per_objfile.
14931         (dw2_forget_cached_source_info): Likewise.
14932         (dw2_map_symtabs_matching_filename): Likewise.
14933         (struct dw2_symtab_iterator) <index>: Remove.
14934         <dwarf2_per_objfile>: New field.
14935         (dw2_symtab_iter_init): Replace index parameter with
14936         dwarf2_per_objfile.
14937         (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
14938         (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
14939         (dw2_print_stats): Likewise.
14940         (dw2_dump): Likewise.
14941         (dw2_expand_symtabs_for_function): Likewise.
14942         (dw2_expand_all_symtabs): Likewise.
14943         (dw2_expand_symtabs_with_fullname): Likewise.
14944         (dw2_expand_marked_cus): Replace index and objfile parameters
14945         with dwarf2_per_objfile.
14946         (dw_expand_symtabs_matching_file_matcher): Add
14947         dwarf2_per_objfile parameter and adjust calls.
14948         (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
14949         adjust calls.
14950         (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
14951         (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
14952         adjust calls.
14953         (create_cus_from_debug_names_list): Replace objfile parameter
14954         with dwarf2_per_objfile and adjust calls.
14955         (create_cus_from_debug_names): Likewise.
14956         (dwarf2_read_debug_names): Likewise.
14957         (mapped_debug_names::namei_to_name): Adjust call.
14958         (dw2_debug_names_iterator::next): Likewise.
14959         (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
14960         (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
14961         (dw2_debug_names_dump): Likewise.
14962         (dw2_debug_names_expand_symtabs_for_function): Likewise.
14963         (dw2_debug_names_expand_symtabs_matching): Likewise.
14964         (dwarf2_initialize_objfile): Likewise.
14965         (dwarf2_build_psymtabs): Likewise.
14966         (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
14967         this_cu.
14968         (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
14969         (read_and_check_comp_unit_head): Likewise.
14970         (read_abbrev_offset): Likewise.
14971         (create_debug_type_hash_table): Likewise.
14972         (create_debug_types_hash_table): Likewise.
14973         (create_all_type_units): Replace objfile parameter with
14974         dwarf2_per_objfile.
14975         (add_type_unit): Add dwarf2_per_objfile parameter.
14976         (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
14977         with dwarf2_per_objfile.
14978         (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
14979         (lookup_dwp_signatured_type): Likewise.
14980         (lookup_signatured_type): Likewise.
14981         (read_cutu_die_from_dwo): Likewise.
14982         (init_tu_and_read_dwo_dies): Likewise.
14983         (init_cutu_and_read_dies): Likewise.
14984         (init_cutu_and_read_dies_no_follow): Likewise.
14985         (allocate_type_unit_groups_table): Add objfile parameter.
14986         (create_type_unit_group): Use dwarf2_per_objfile from cu.
14987         (get_type_unit_group): Likewise.
14988         (process_psymtab_comp_unit): Update call.
14989         (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
14990         (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
14991         (print_tu_stats): Likewise.
14992         (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
14993         in void* parameter.
14994         (build_type_psymtabs): Change objfile parameter to
14995         dwarf2_per_objfile.
14996         (process_skeletonless_type_unit): Use dwarf2_per_objfile
14997         passed in void* parameter.
14998         (process_skeletonless_type_units): Change objfile parameter to
14999         dwarf2_per_objfile.
15000         (set_partial_user): Likewise.
15001         (dwarf2_build_psymtabs_hard): Likewise.
15002         (read_comp_units_from_section): Likewise.
15003         (create_all_comp_units): Likewise.
15004         (scan_partial_symbols): Update calls.
15005         (add_partial_symbol): Likewise.
15006         (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
15007         (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
15008         (process_queue): Add dwarf2_per_objfile parameter.
15009         (get_compunit_symtab): Use dwarf2_per_objfile from cu.
15010         (compute_compunit_symtab_includes): Likewise.
15011         (process_cu_includes): Add dwarf2_per_objfile parameter.
15012         (process_full_comp_unit): Use dwarf2_per_objfile from cu.
15013         (process_full_type_unit): Likewise.
15014         (process_imported_unit_die): Update call.
15015         (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
15016         (read_file_scope): Likewise.
15017         (allocate_dwo_file_hash_table): Add objfile parameter.
15018         (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
15019         (create_cus_hash_table): Likewise.
15020         (create_dwp_hash_table): Likewise.
15021         (create_dwo_unit_in_dwp_v1): Likewise.
15022         (create_dwp_v2_section): Likewise.
15023         (create_dwo_unit_in_dwp_v2): Likewise.
15024         (lookup_dwo_unit_in_dwp): Likewise.
15025         (try_open_dwop_file): Likewise.
15026         (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
15027         (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
15028         cleanup to include a reference to dwarf2_per_objfile.
15029         (open_dwp_file): Add dwarf2_per_objfile parameter.
15030         (open_and_init_dwp_file): Likewise.
15031         (get_dwp_file): Likewise.
15032         (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
15033         (queue_and_load_all_dwo_tus): Update call.
15034         (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
15035         data.
15036         (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
15037         (dwarf2_ranges_process): Likewise.
15038         (dwarf2_get_pc_bounds): Likewise.
15039         (mark_common_block_symbol_computed): Likewise.
15040         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
15041         (dwarf2_read_abbrevs): Update call.
15042         (read_partial_die): Use dwarf2_per_objfile from cu.
15043         (find_partial_die): Likewise.
15044         (fixup_partial_die): Likewise.
15045         (read_attribute_value): Likewise.
15046         (read_indirect_string_at_offset_from): Add objfile parameter.
15047         (read_indirect_string_at_offset): Add dwarf2_per_objfile
15048         parameter.
15049         (read_indirect_string_from_dwz): Add objfile parameter.
15050         (read_indirect_string): Add objfile parameter.
15051         (read_addr_index_1): Add dwarf2_per_objfile parameter.
15052         (read_addr_index): Use dwarf2_per_objfile from cu.
15053         (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
15054         call dw2_setup.
15055         (read_str_index): Use dwarf2_per_objfile from cu.
15056         (get_debug_line_section): Likewise.
15057         (read_formatted_entries): Add dwarf2_per_objfile parameter.
15058         (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
15059         (new_symbol_full): Use dwarf2_per_objfile from cu.
15060         (build_error_marker_type): Likewise.
15061         (lookup_die_type): Likewise.
15062         (determine_prefix): Likewise.
15063         (follow_die_offset): Likewise.
15064         (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
15065         (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
15066         (dwarf2_fetch_die_type_sect_off): Likewise.
15067         (dwarf2_get_die_type): Likewise.
15068         (follow_die_sig_1): Use dwarf2_per_objfile from cu.
15069         (get_signatured_type): Likewise.
15070         (get_DW_AT_signature_type): Likewise.
15071         (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
15072         (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
15073         (cu_debug_loc_section): Likewise.
15074         (fill_in_loclist_baton): Likewise.
15075         (dwarf2_symbol_mark_computed): Likewise.
15076         (dwarf2_find_containing_comp_unit): Change objfile parameter to
15077         dwarf2_per_objfile.
15078         (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
15079         parameter.
15080         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
15081         (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
15082         (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
15083         (set_die_type): Use dwarf2_free_objfile from cu.
15084         (get_die_type_at_offset): Likewise.
15085         (dwarf2_per_objfile_free): Don't assign global variable.
15086         (debug_names) <constructor>: Add dwarf2_per_objfile
15087         parameter, update m_debugstrlookup construction.
15088         (debug_names::debug_str_lookup): Add dwarf2_per_objfile
15089         parameter.
15090         <m_dwarf2_per_objfile>: New field.
15091         <lookup>: Use m_dwarf2_per_objfile.
15092         (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
15093         (psyms_seen_size): Likewise.
15094         (write_gdbindex): Replace objfile parameter with
15095         dwarf2_per_objfile.
15096         (write_debug_names): Likewise.
15097         (write_psymtabs_to_index): Likewise.
15098         (save_gdb_index_command): Use get_dwarf2_per_objfile, update
15099         calls.
15100
15101 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
15102
15103         * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
15104         <dwarf2_per_objfile>: New field.
15105         (struct dwarf2_per_cu_data) <objfile>: Remove.
15106         <dwarf2_per_objfile>: New field.
15107         (create_cu_from_index_list): Assign dwarf2_per_objfile instead
15108         of objfile.
15109         (create_signatured_type_table_from_index): Likewise.
15110         (create_debug_type_hash_table): Likewise.
15111         (fill_in_sig_entry_from_dwo_entry): Likewise.
15112         (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
15113         (create_type_unit_group): Assign dwarf2_per_objfile instead of
15114         objfile.
15115         (create_partial_symtab): Access objfile through
15116         dwarf2_per_objfile.
15117         (process_psymtab_comp_unit_reader): Likewise.
15118         (read_comp_units_from_section): Likewise.
15119         (scan_partial_symbols): Likewise.
15120         (add_partial_symbol): Likewise.
15121         (add_partial_subprogram): Likewise.
15122         (peek_die_abbrev): Likewise.
15123         (fixup_go_packaging): Likewise.
15124         (process_full_comp_unit): Likewise.
15125         (process_full_type_unit): Likewise.
15126         (process_imported_unit_die): Likewise.
15127         (dwarf2_compute_name): Likewise.
15128         (dwarf2_physname): Likewise.
15129         (read_import_statement): Likewise.
15130         (create_cus_hash_table): Assign dwarf2_physname instead of
15131         objfile.
15132         (read_func_scope): Access objfile through dwarf2_per_objfile.
15133         (read_lexical_block_scope): Likewise.
15134         (read_call_site_scope): Likewise.
15135         (read_variable): Likewise.
15136         (dwarf2_rnglists_process): Likewise.
15137         (dwarf2_ranges_process): Likewise.
15138         (dwarf2_ranges_read): Likewise.
15139         (dwarf2_record_block_ranges): Likewise.
15140         (dwarf2_add_field): Likewise.
15141         (dwarf2_add_member_fn): Likewise.
15142         (read_structure_type): Likewise.
15143         (process_structure_scope): Likewise.
15144         (read_enumeration_type): Likewise.
15145         (read_array_type): Likewise.
15146         (read_common_block): Likewise.
15147         (read_namespace_type): Likewise.
15148         (read_namespace): Likewise.
15149         (read_module_type): Likewise.
15150         (read_tag_pointer_type): Likewise.
15151         (read_tag_ptr_to_member_type): Likewise.
15152         (read_tag_string_type): Likewise.
15153         (read_subroutine_type): Likewise.
15154         (read_typedef): Likewise.
15155         (read_base_type): Likewise.
15156         (attr_to_dynamic_prop): Likewise.
15157         (read_subrange_type): Likewise.
15158         (read_unspecified_type): Likewise.
15159         (load_partial_dies): Likewise.
15160         (read_partial_die): Likewise.
15161         (find_partial_die): Likewise.
15162         (guess_partial_die_structure_name): Likewise.
15163         (fixup_partial_die): Likewise.
15164         (read_attribute_value): Likewise.
15165         (read_addr_index_from_leb128): Likewise.
15166         (dwarf2_read_addr_index): Likewise.
15167         (dwarf2_string_attr): Likewise.
15168         (lnp_state_machine::check_line_address): Likewise.
15169         (dwarf_decode_lines_1): Likewise.
15170         (dwarf_decode_lines): Likewise.
15171         (dwarf2_start_symtab): Likewise.
15172         (var_decode_location): Likewise.
15173         (new_symbol_full): Likewise.
15174         (dwarf2_const_value_data): Likewise.
15175         (dwarf2_const_value_attr): Likewise.
15176         (dwarf2_const_value): Likewise.
15177         (die_type): Likewise.
15178         (die_containing_type): Likewise.
15179         (lookup_die_type): Likewise.
15180         (guess_full_die_structure_name): Likewise.
15181         (anonymous_struct_prefix): Likewise.
15182         (dwarf2_name): Likewise.
15183         (follow_die_ref_or_sig): Likewise.
15184         (follow_die_offset): Likewise.
15185         (follow_die_ref): Likewise.
15186         (dwarf2_fetch_die_loc_sect_off): Likewise.
15187         (dwarf2_fetch_constant_bytes): Likewise.
15188         (dwarf2_fetch_die_type_sect_off): Likewise.
15189         (dwarf2_get_die_type): Likewise.
15190         (follow_die_sig): Likewise.
15191         (decode_locdesc): Likewise.
15192         (dwarf2_per_cu_objfile): Likewise.
15193         (dwarf2_per_cu_text_offset): Likewise.
15194         (init_one_comp_unit): Assign dwarf2_per_objfile instead of
15195         objfile.
15196         (set_die_type): Access objfile through
15197         dwarf2_per_objfile.
15198
15199 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
15200
15201         * valprint.c (converted_character_d): Remove typedef.
15202         (DEF_VEC_O (converted_character_d)): Remove.
15203         (count_next_character): Use std::vector.
15204         (print_converted_chars_to_obstack): Likewise.
15205         (generic_printstr): Likewise.
15206
15207 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
15208
15209         * xml-support.h (struct gdb_xml_value): Add constructor.
15210         <value>: Change type to unique_xmalloc_ptr.
15211         (gdb_xml_value_s): Remove typedef.
15212         (DEF_VEC_O (gdb_xml_value_s)): Remove.
15213         (gdb_xml_element_start_handler): Change parameter type to
15214         std::vector.
15215         (xml_find_attribute): Likewise.
15216         * xml-support.c (xml_find_attribute): Change parameter type to
15217         std::vector and adjust.
15218         (gdb_xml_values_cleanup): Remove.
15219         (gdb_xml_parser::start_element): Adjust to std::vector.
15220         (xinclude_start_include): Change paraeter type to std::vector
15221         and adjust.
15222         * btrace.c (check_xml_btrace_version): Likewise.
15223         (parse_xml_btrace_block): Likewise.
15224         (parse_xml_btrace_pt_config_cpu): Likewise.
15225         (parse_xml_btrace_pt): Likewise.
15226         (parse_xml_btrace_conf_bts): Likewise.
15227         (parse_xml_btrace_conf_pt): Likewise.
15228         * memory-map.c (memory_map_start_memory): Likewise.
15229         (memory_map_start_property): Likewise.
15230         * osdata.c (osdata_start_osdata): Likewise.
15231         (osdata_start_item): Likewise.
15232         (osdata_start_column): Likewise.
15233         * remote.c (start_thread): Likewise.
15234         * solib-aix.c (library_list_start_library): Likewise.
15235         (library_list_start_list): Likewise.
15236         * solib-svr4.c (library_list_start_library): Likewise.
15237         (svr4_library_list_start_list): Likewise.
15238         * solib-target.c (library_list_start_segment): Likewise.
15239         (library_list_start_section): Likewise.
15240         (library_list_start_library): Likewise.
15241         (library_list_start_list): Likewise.
15242         * tracepoint.c (traceframe_info_start_memory): Likewise.
15243         (traceframe_info_start_tvar): Likewise.
15244         * xml-syscall.c (syscall_start_syscall): Likewise.
15245         * xml-tdesc.c (tdesc_start_target): Likewise.
15246         (tdesc_start_feature): Likewise.
15247         (tdesc_start_reg): Likewise.
15248         (tdesc_start_union): Likewise.
15249         (tdesc_start_struct): Likewise.
15250         (tdesc_start_flags): Likewise.
15251         (tdesc_start_enum): Likewise.
15252         (tdesc_start_field): Likewise.
15253         (tdesc_start_enum_value): Likewise.
15254         (tdesc_start_vector): Likewise.
15255
15256 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
15257
15258         * extension.h (struct xmethod_worker) <clone>: Remove.
15259         * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
15260         Remove.
15261         (python_xmethod_worker::clone): Remove.
15262         * valops.c (find_overload_match): Use std::move instead of
15263         clone.
15264
15265 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
15266
15267         * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
15268         (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
15269         <free_xmethod_worker_data>: Remove.
15270         <get_matching_xmethod_workers>: Chance VEC to std::vector.
15271         <get_xmethod_arg_types>: Remove.
15272         <get_xmethod_result_type>: Remove.
15273         <invoke_xmethod>: Remove.
15274         * extension.c (new_xmethod_worker): Remove.
15275         (clone_xmethod_worker): Remove.
15276         (get_matching_xmethod_workers): Return void, pass std::vector by
15277         pointer.
15278         (get_xmethod_arg_types): Rename to...
15279         (xmethod_worker::get_arg_types): ... this, and adjust.
15280         (get_xmethod_result_type): Rename to...
15281         (xmethod_worker::get_result_type): ... this, and adjust.
15282         (invoke_xmethod): Remove.
15283         (free_xmethod_worker): Remove.
15284         (free_xmethod_worker_vec): Remove.
15285         * extension.h (enum ext_lang_rc): Move here from
15286         extension-priv.h.
15287         (struct xmethod_worker): Add constructor and destructor.
15288         <data>: Remove.
15289         <value>: Remove.
15290         <invoke, clone, do_get_result_type, do_get_arg_types>: New
15291         virtual pure methods.
15292         <get_arg_types, get_result_type>: New methods.
15293         (xmethod_worker_ptr): Remove typedef.
15294         (DEF_VEC_P (xmethod_worker_ptr)): Remove.
15295         (xmethod_worker_vec): Remove typedef.
15296         (xmethod_worker_up): New typedef.
15297         (invoke_xmethod): Remove.
15298         (clone_xmethod_worker): Remove.
15299         (free_xmethod_worker): Remove.
15300         (free_xmethod_worker_vec): Remove.
15301         (get_xmethod_arg_types): Remove.
15302         (get_xmethod_result_type): Remove.
15303         * valops.c (find_method_list): Use std::vector, don't use
15304         intermediate vector.
15305         (value_find_oload_method_list): Use std::vector.
15306         (find_overload_match): Use std::vector.
15307         (find_oload_champ): Use std::vector.
15308         * value.c (value_free): Use operator delete.
15309         (value_of_xmethod): Rename to...
15310         (value_from_xmethod): ... this.  Don't assign
15311         xmethod_worker::value, take rvalue-reference.
15312         (result_type_of_xmethod): Adjust.
15313         (call_xmethod): Adjust.
15314         * value.h: Include extension.h.
15315         (struct xmethod_worker): Don't forward-declare.
15316         (value_of_xmethod): Rename to...
15317         (value_from_xmethod): ... this, take rvalue-reference.
15318         * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
15319         (struct python_xmethod_worker): ... this, add constructor and
15320         destructor.
15321         <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
15322         (gdbpy_free_xmethod_worker_data): Rename to...
15323         (python_xmethod_worker::~python_xmethod_worker): ... this and
15324         adjust.
15325         (gdbpy_clone_xmethod_worker_data): Rename to...
15326         (python_xmethod_worker::clone): ... this and adjust.
15327         (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
15328         temporary vector.
15329         (gdbpy_get_xmethod_arg_types): Rename to...
15330         (python_xmethod_worker::do_get_arg_types): ... this and adjust.
15331         (gdbpy_get_xmethod_result_type): Rename to...
15332         (python_xmethod_worker::do_get_result_type): ... this and
15333         adjust.
15334         (gdbpy_invoke_xmethod): Rename to...
15335         (python_xmethod_worker::invoke): ... this and adjust.
15336         (new_python_xmethod_worker): Rename to...
15337         (python_xmethod_worker::python_xmethod_worker): ... this and
15338         adjust.
15339         * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
15340         Remove.
15341         (gdbpy_free_xmethod_worker_data): Remove.
15342         (gdbpy_get_matching_xmethod_workers): Use std::vector.
15343         (gdbpy_get_xmethod_arg_types): Remove.
15344         (gdbpy_get_xmethod_result_type): Remove.
15345         (gdbpy_invoke_xmethod): Remove.
15346         * python/python.c (python_extension_ops): Remove obsolete
15347         callbacks.
15348
15349 2018-01-05  Pedro Alves  <palves@redhat.com>
15350
15351         PR gdb/18653
15352         * common/signals-state-save-restore.c
15353         (save_original_signals_state): New parameter 'quiet'.  Warn if we
15354         find a custom handler preinstalled, instead of internal erroring.
15355         But only warn if !quiet.
15356         * common/signals-state-save-restore.h
15357         (save_original_signals_state): New parameter 'quiet'.
15358         * main.c (captured_main_1): Move save_original_signals_state call
15359         after option handling, and pass QUIET.
15360
15361 2018-01-05  Pedro Alves  <palves@redhat.com>
15362
15363         * spu-tdep.c (spu_catch_start): Pass
15364         symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
15365
15366 2018-01-05  Pedro Alves  <palves@redhat.com>
15367
15368         PR gdb/22670
15369         * ada-lang.c (literal_symbol_name_matcher): New function.
15370         (ada_get_symbol_name_matcher): Use it for
15371         symbol_name_match_type::SEARCH_NAME.
15372         * block.c (block_lookup_symbol): New parameter 'match_type'.  Pass
15373         it down instead of assuming symbol_name_match_type::FULL.
15374         * block.h (block_lookup_symbol): New parameter 'match_type'.
15375         * c-valprint.c (print_unpacked_pointer): Use
15376         lookup_symbol_search_name instead of lookup_symbol.
15377         * compile/compile-object-load.c (get_out_value_type): Pass down
15378         symbol_name_match_type::SEARCH_NAME.
15379         * cp-namespace.c (cp_basic_lookup_symbol): Pass down
15380         symbol_name_match_type::FULL.
15381         * cp-support.c (cp_get_symbol_name_matcher): Handle
15382         symbol_name_match_type::SEARCH_NAME.
15383         * infrun.c (insert_exception_resume_breakpoint): Use
15384         lookup_symbol_search_name.
15385         * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
15386         * psymtab.c (maintenance_check_psymtabs): Use
15387         symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
15388         * stack.c (print_frame_args): Use lookup_symbol_search_name and
15389         SYMBOL_SEARCH_NAME.
15390         * symtab.c (lookup_local_symbol): Don't demangle the lookup name
15391         if symbol_name_match_type::SEARCH_NAME.
15392         (lookup_symbol_in_language): Pass down
15393         symbol_name_match_type::FULL.
15394         (lookup_symbol_search_name): New.
15395         (lookup_language_this): Pass down
15396         symbol_name_match_type::SEARCH_NAME.
15397         (lookup_symbol_aux, lookup_local_symbol): New parameter
15398         'match_type'.  Pass it down.
15399         * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
15400         (lookup_symbol_search_name): New declaration.
15401         (lookup_symbol_in_block): New 'match_type' parameter.
15402
15403 2018-01-05  Pedro Alves  <palves@redhat.com>
15404
15405         PR gdb/22670
15406         * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
15407         ada_lookup_symbol.
15408         (ada_lookup_symbol): Reimplement in terms of
15409         ada_lookup_symbol_list, bits factored out from
15410         ada_lookup_encoded_symbol.
15411
15412 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
15413
15414         * ada-exp.y (write_object_renaming): When subscripting an array
15415         using a symbol as the index, pass the block in call to
15416         ada_lookup_encoded_symbol when looking that symbol up.
15417
15418 2018-01-05  Jerome Guitton  <guitton@adacore.com>
15419
15420         * ada-lang.c (ada_array_length): Use ada_index_type instead of
15421         TYPE_INDEX_TYPE.
15422
15423 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
15424
15425         * ada-lang.c (ada_to_fixed_value_create): Add handling of
15426         the case where VALUE_LVAL (val0) is not lval_memory.
15427
15428 2018-01-05  Xavier Roirand  <roirand@adacore.com>
15429
15430         * ada-valprint.c (print_optional_low_bound): Handle
15431         character-indexed array printing like boolean-indexed array
15432         printing.
15433
15434 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
15435
15436         * NEWS: Create a new section for the next release branch.
15437         Rename the section of the current branch, now that it has
15438         been cut.
15439
15440 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
15441
15442         GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
15443         * version.in: Bump version to 8.1.50.DATE-git.
15444
15445 2018-01-03  Xavier Roirand  <roirand@adacore.com>
15446
15447         * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
15448         Add field.
15449         * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
15450         Add field.
15451         (default_exception_support_info) <catch_handlers_sym>: Add field.
15452         (exception_support_info_fallback) <catch_handlers_sym>: Add field.
15453         (ada_exception_name_addr_1): Add "catch handlers" handling.
15454         (ada_exception_catchpoint_cond_string) <ex>: New parameter.
15455         Update all callers.
15456         (create_excep_cond_exprs) <ex>: Add parameter.
15457         (re_set_exception): Update create_excep_cond_exprs call.
15458         (print_it_exception, print_one_exception, print_mention_exception)
15459         (print_recreate_exception): Add "catch handler" handling.
15460         (allocate_location_catch_handlers, re_set_catch_handlers)
15461         (check_status_catch_handlers, print_it_catch_handlers)
15462         (print_one_catch_handlers, print_mention_catch_handlers)
15463         (print_recreate_catch_handlers): New function.
15464         (catch_handlers_breakpoint_ops): New variable.
15465         (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
15466         Add parameter.  Add "catch handler" handling.
15467         (ada_exception_sym_name, ada_exception_breakpoint_ops):
15468         Add "catch handler" handling.
15469         (ada_exception_catchpoint_cond_string): Add "catch handler"
15470         handling.
15471         (create_ada_exception_catchpoint): Update create_excep_cond_exprs
15472         call.
15473         (catch_ada_handlers_command): New function.
15474         (initialize_ada_catchpoint_ops): Initialize "catch handlers"
15475         operations structure.
15476         (_initialize_ada_language): Add "catch handlers" command entry.
15477         * NEWS: Document "catch handlers" feature.
15478
15479 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
15480
15481         * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
15482         account when creating the array type of the slice.
15483         (ada_value_slice): Likewise.
15484
15485 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
15486
15487         * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
15488         New enum value.
15489         (create_array_type_with_stride): Add byte_stride_prop parameter.
15490         * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
15491         New parameter.  Update all callers in this file.
15492         (array_type_has_dynamic_stride): New function.
15493         (is_dynamic_type_internal, resolve_dynamic_array): Add handling
15494         of arrays with dynamic byte strides.
15495         * dwarf2read.c (read_array_type): Add support for dynamic
15496         DW_AT_byte_stride attributes.
15497
15498 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
15499
15500         * dwarf2read.c (read_unspecified_type): Treat
15501         DW_TAG_enumeration_type DIEs from Ada units as stubs.
15502
15503 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
15504
15505         Update copyright year range in all GDB files.
15506
15507 2018-01-01, 18  Joel Brobecker  <brobecker@adacore.com>
15508
15509         * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
15510         and gdb/testsuite/gdb.base/step-line.c.
15511
15512 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
15513
15514         * copyright.py (main): Dump the contents of
15515         MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
15516         even if BY_HAND is empty.
15517
15518 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
15519
15520         * top.c (print_gdb_version): Update Copyright year in version
15521         message.
15522
15523 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
15524
15525         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
15526
15527 For older changes see ChangeLog-2017.
15528 \f
15529 Local Variables:
15530 mode: change-log
15531 left-margin: 8
15532 fill-column: 74
15533 version-control: never
15534 coding: utf-8
15535 End: