Revert "GDB: Only build for "unix:" connections if AF_LOCAL is supported."
[external/binutils.git] / gdb / ChangeLog
1 2018-10-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2
3         * procfs.c: Include common/pathstuff.h.
4
5 2018-10-28  Andrew Burgess  <andrew.burgess@embecosm.com>
6
7         * riscv-linux-nat.c (riscv_linux_nat_target::fetch_registers):
8         Add missing braces.  No functional change.
9
10 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
11
12         * macrocmd.c (info_macro_command): Use report_unrecognized_option_error
13         to report a bad option and fix indentation.
14         * demangle.c (demangle_command): Use report_unrecognized_option_error
15         to report a bad option and correctly report the bad option.
16
17 2018-10-27  Tom Tromey  <tom@tromey.com>
18
19         PR cli/23364:
20         * darwin-nat.c (copied_shell): New global.
21         (may_have_sip): Rename from should_disable_startup_with_shell.
22         (copy_shell_to_cache, maybe_cache_shell): New functions.
23         (darwin_nat_target::create_inferior): Update.  Use
24         copied_shell.
25
26 2018-10-27  Tom Tromey  <tom@tromey.com>
27
28         * unittests/scoped_fd-selftests.c (test_to_file): New function.
29         (run_tests): Call test_to_file.
30         * dwarf-index-write.c (write_psymtabs_to_index): Do not reopen
31         temporary files.
32         * common/scoped_fd.h (scoped_fd::to_file): New method.
33
34 2018-10-27  Tom Tromey  <tom@tromey.com>
35
36         * unittests/scoped_mmap-selftests.c (test_normal): Use
37         gdb_mkostemp_cloexec.
38         * unittests/scoped_fd-selftests.c (test_destroy, test_release):
39         Use gdb_mkostemp_cloexec.
40         * gnulib/aclocal-m4-deps.mk, gnulib/aclocal.m4,
41         gnulib/config.in, gnulib/configure,
42         gnulib/import/Makefile.am, gnulib/import/Makefile.in,
43         gnulib/import/m4/gnulib-cache.m4,
44         gnulib/import/m4/gnulib-comp.m4: Update.
45         * gnulib/import/m4/mkostemp.m4: New file.
46         * gnulib/import/m4/mkstemp.m4: Remove.
47         * gnulib/import/mkostemp.c: New file.
48         * gnulib/import/mkstemp.m4: Remove.
49         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Remove
50         mkstemp, add mkostemp.  Apply new patch.
51         * gnulib/import/stdlib.in.h: Apply patch.
52         * gnulib/patches/0002-mkostemp-mkostemps-Fix-compilation-error-in-C-mode-o.patch:
53         New file.
54         * dwarf-index-write.c (write_psymtabs_to_index): Use
55         gdb_mkostemp_cloexec.
56         * common/filestuff.h (gdb_mkostemp_cloexec): New function.
57
58 2018-10-27  Tom Tromey  <tom@tromey.com>
59
60         * unittests/mkdir-recursive-selftests.c: New file.
61         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
62         unittests/mkdir-recursive-selftests.c.
63         * dwarf-index-cache.c (mkdir_recursive): Move to
64         common/filestuff.c.
65         (index_cache::store): Check return value of mkdir_recursive.
66         (create_dir_and_check, test_mkdir_recursive): Move to new file.
67         (_initialize_index_cache): Don't register test.
68         * common/filestuff.h (mkdir_recursive): Declare.
69         * common/filestuff.c (mkdir_recursive): Move from
70         dwarf-index-cache.c.  Return bool.
71
72 2018-10-27  Tom Tromey  <tom@tromey.com>
73
74         * dwarf-index-write.c (write_psymtabs_to_index): Move
75         make_temp_filename to common/pathstuff.c.
76         * common/pathstuff.h (make_temp_filename): Declare.
77         * common/pathstuff.c (make_temp_filename): New function, moved
78         from dwarf-index-write.c.
79
80 2018-10-27  Tom Tromey  <tom@tromey.com>
81
82         * procfs.c (procfs_target::create_inferior): Use get_shell.
83         * cli/cli-cmds.c (shell_escape): Use get_shell.
84         * windows-nat.c (windows_nat_target::create_inferior): Use
85         get_shell.
86         * common/pathstuff.c (get_shell): New function.
87         * nat/fork-inferior.c (SHELL_FILE, get_startup_shell): Remove.
88         (fork_inferior): Use get_shell.
89         * common/pathstuff.h (get_shell): Declare.
90
91 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
92
93         * NEWS: Mention changes to 'info [args|functions|locals|variables]'
94
95 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
96
97         * stack.c (print_variable_and_value_data): Add preg and treg.
98         (print_frame_local_vars): Add quiet, regexp and t_regexp arguments,
99         and update callers.
100         (print_frame_arg_vars): Likewise.
101         (prepare_reg): New function.
102         (info_locals_command): Extract info print args and use them.
103         (info_args_command): Likewise.
104         (_initialize_stack): Modify on-line help.
105         * symtab.c (treg_matches_sym_type_name): New function.
106         (search_symbols): New arg t_regexp.
107         (symtab_symbol_info): New args quiet, regexp, t_regexp.
108         (info_variables_command): Extract info print args and use them.
109         (info_functions_command): Likewise.
110         (info_types_command): Update call to symtab_symbol_info.
111         (_initialize_symtab): Modify on-line help.
112         * symtab.h (treg_matches_sym_type_name): New function.
113         (search_symbols): New t_regexp arg.
114
115 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
116
117         * cli-utils.c (extract_arg_maybe_quoted): New function.
118         (extract_info_print_args): New function.
119         (info_print_args_help): New function.
120         (report_unrecognized_option_error): New function.
121         * cli-utils.h (extract_arg_maybe_quoted): New function.
122         (extract_info_print_args): New function.
123         (info_print_args_help): New function.
124         (report_unrecognized_option_error): New function.
125
126 2018-10-26  Tom Tromey  <tom@tromey.com>
127
128         * dwarf2read.c (recursively_compute_inclusions): Use std::vector.
129         (compute_compunit_symtab_includes): Update.
130         * symtab.h: (symtab_ptr): Remove typedef.  Don't define a VEC.
131         (compunit_symtab_ptr): Likewise.
132
133 2018-10-26  John Baldwin  <jhb@FreeBSD.org>
134
135         * fbsd-tdep.c (fbsd_print_auxv_entry): Only use
136         default_print_auxv_entry for specific tag values.
137
138 2018-10-26  John Baldwin  <jhb@FreeBSD.org>
139
140         * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_FREEBSD_HWCAP2.
141
142 2018-10-26  Jim Wilson  <jimw@sifive.com>
143
144         * riscv-linux-tdep.c: Include tramp-frame.h and trad-frame.h.
145         (riscv_linux_sigframe_init): Declare.
146         (RISCV_INST_LI_A7_SIGRETURN, RISCV_INT_ECALL): New.
147         (riscv_linux_sigframe): New.
148         (SIGFRAME_SIGINFO_SIZE, UCONTEXT_MCONTEXT_OFFSET): New.
149         (riscv_linux_sigframe_init): Define.
150         (riscv_linux_init_abi): Call tramp_frame_prepend_unwinder.
151
152         * riscv-tdep.c (riscv_isa_xlen): Refer to riscv-tdep.h comment.
153         (riscv_isa_flen): Likewise.  Drop static.
154         * riscv-tdep.h (riscv_isa_xlen): Move riscv-tdep.c comment to here.
155         (riscv_isa_flen): Likewise.  Declare.
156
157 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
158             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
159
160         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa207_htm_vsx32l)
161         (tdesc_powerpc_isa207_htm_vsx64l): Declare.
162         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_TM_SPRREGSET)
163         (PPC32_LINUX_SIZEOF_CGPRREGSET, PPC64_LINUX_SIZEOF_CGPRREGSET)
164         (PPC_LINUX_SIZEOF_CFPRREGSET, PPC_LINUX_SIZEOF_CVMXREGSET)
165         (PPC_LINUX_SIZEOF_CVSXREGSET, PPC_LINUX_SIZEOF_CPPRREGSET)
166         (PPC_LINUX_SIZEOF_CDSCRREGSET, PPC_LINUX_SIZEOF_CTARREGSET):
167         Define.
168         (struct ppc_linux_features) <htm>: New field.
169         (ppc_linux_no_features): Add initializer for htm field.
170         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
171         new tdescs.
172         * nat/ppc-linux.h (PPC_FEATURE2_HTM, NT_PPC_TM_CGPR)
173         (NT_PPC_TM_CFPR, NT_PPC_TM_CVMX, NT_PPC_TM_CVSX)
174         (NT_PPC_TM_SPR, NT_PPC_TM_CTAR, NT_PPC_TM_CPPR, NT_PPC_TM_CDSCR):
175         Define if not already defined.
176         * features/Makefile (WHICH): Add rs6000/powerpc-isa207-htm-vsx32l
177         and rs6000/powerpc-isa207-htm-vsx64l.
178         (XMLTOC): Add rs6000/powerpc-isa207-htm-vsx32l.xml and
179         rs6000/powerpc-isa207-htm-vsx64l.xml.
180         * features/rs6000/power-htm-spr.xml: New file.
181         * features/rs6000/power-htm-core.xml: New file.
182         * features/rs6000/power64-htm-core.xml: New file.
183         * features/rs6000/power-htm-fpu.xml: New file.
184         * features/rs6000/power-htm-altivec.xml: New file.
185         * features/rs6000/power-htm-vsx.xml: New file.
186         * features/rs6000/power-htm-ppr.xml: New file.
187         * features/rs6000/power-htm-dscr.xml: New file.
188         * features/rs6000/power-htm-tar.xml: New file.
189         * features/rs6000/powerpc-isa207-htm-vsx32l.xml: New file.
190         * features/rs6000/powerpc-isa207-htm-vsx64l.xml: New file.
191         * features/rs6000/powerpc-isa207-htm-vsx32l.c: Generate.
192         * features/rs6000/powerpc-isa207-htm-vsx64l.c: Generate.
193         * regformats/rs6000/powerpc-isa207-htm-vsx32l.dat: Generate.
194         * regformats/rs6000/powerpc-isa207-htm-vsx64l.dat: Generate.
195         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
196         fetch_regset with HTM regsets.
197         (store_register, store_ppc_registers): Call store_regset with HTM
198         regsets.
199         (ppc_linux_nat_target::read_description): Set htm field in the
200         features struct if needed.
201         * ppc-linux-tdep.c: Include
202         features/rs6000/powerpc-isa207-htm-vsx32l.c and
203         features/rs6000/powerpc-isa207-htm-vsx64l.c.
204         (ppc32_regmap_tm_spr, ppc32_regmap_cgpr, ppc64_le_regmap_cgpr)
205         (ppc64_be_regmap_cgpr, ppc32_regmap_cfpr, ppc32_le_regmap_cvmx)
206         (ppc32_be_regmap_cvmx, ppc32_regmap_cvsx, ppc32_regmap_cppr)
207         (ppc32_regmap_cdscr, ppc32_regmap_ctar): New globals.
208         (ppc32_linux_tm_sprregset, ppc32_linux_cgprregset)
209         (ppc64_be_linux_cgprregset, ppc64_le_linux_cgprregset)
210         (ppc32_linux_cfprregset, ppc32_le_linux_cvmxregset)
211         (ppc32_be_linux_cvmxregset, ppc32_linux_cvsxregset)
212         (ppc32_linux_cpprregset, ppc32_linux_cdscrregset)
213         (ppc32_linux_ctarregset): New globals.
214         (ppc_linux_cgprregset, ppc_linux_cvmxregset): New functions.
215         (ppc_linux_collect_core_cpgrregset): New function.
216         (ppc_linux_iterate_over_regset_sections): Call back with the htm
217         regsets.
218         (ppc_linux_core_read_description): Check if the tm spr section is
219         present and set htm in the features struct.
220         (_initialize_ppc_linux_tdep): Call
221         initialize_tdesc_powerpc_isa207_htm_vsx32l and
222         initialize_tdesc_powerpc_isa207_htm_vsx64l.
223         * ppc-linux-tdep.h (ppc_linux_cgprregset, ppc_linux_cvmxregset):
224         Declare.
225         (ppc32_linux_tm_sprregset, ppc32_linux_cfprregset)
226         (ppc32_linux_cvsxregset, ppc32_linux_cpprregset)
227         (ppc32_linux_cdscrregset, ppc32_linux_ctarregset): Declare.
228         * ppc-tdep.h (struct gdbarch_tdep) <have_htm_spr, have_htm_core>:
229         New fields.
230         <have_htm_fpu, have_htm_altivec, have_htm_vsx>:
231         Likewise.
232         <ppc_cppr_regnum, ppc_cdscr_regnum, ppc_ctar_regnum>: Likewise.
233         <ppc_cdl0_regnum, ppc_cvsr0_regnum, ppc_cefpr0_regnum>: Likewise.
234         (enum) <PPC_TFHAR_REGNUM, PPC_TEXASR_REGNUM, PPC_TFIAR_REGNUM>:
235         New enum fields.
236         <PPC_CR0_REGNUM, PPC_CCR_REGNUM, PPC_CXER_REGNUM>: Likewise.
237         <PPC_CLR_REGNUM, PPC_CCTR_REGNUM, PPC_CF0_REGNUM>: Likewise.
238         <PPC_CFPSCR_REGNUM, PPC_CVR0_REGNUM, PPC_CVSCR_REGNUM>: Likewise.
239         <PPC_CVRSAVE_REGNUM, PPC_CVSR0_UPPER_REGNUM>: Likewise.
240         <PPC_CPPR_REGNUM, PPC_CDSCR_REGNUM>: Likewise.
241         <PPC_CTAR_REGNUM>: Likewise.
242         (PPC_IS_TMSPR_REGNUM, PPC_IS_CKPTGP_REGNUM, PPC_IS_CKPTFP_REGNUM)
243         (PPC_IS_CKPTVMX_REGNUM, PPC_IS_CKPTVSX_REGNUM): Define.
244         * rs6000-tdep.c (IS_CDFP_PSEUDOREG, IS_CVSX_PSEUDOREG)
245         (IS_CEFP_PSEUDOREG): Define.
246         (rs6000_register_name): Hide the upper halves of checkpointed VSX
247         registers.  Return names for the checkpointed DFP, VSX, and EFP
248         pseudo registers.
249         (rs6000_pseudo_register_type): Remove initial assert and raise an
250         internal error in the else clause instead.  Return types for the
251         checkpointed DFP, VSX, and EFP pseudo registers.
252         (dfp_pseudo_register_read, dfp_pseudo_register_write): Handle
253         checkpointed DFP pseudo registers.
254         (vsx_pseudo_register_read, vsx_pseudo_register_write): Handle
255         checkpointed VSX pseudo registers.
256         (efp_pseudo_register_read, efp_pseudo_register_write): Rename
257         from efpr_pseudo_register_read and
258         efpr_pseudo_register_write.  Handle checkpointed EFP pseudo
259         registers.
260         (rs6000_pseudo_register_read, rs6000_pseudo_register_write):
261         Handle checkpointed DFP, VSX, and EFP registers.
262         (dfp_ax_pseudo_register_collect, vsx_ax_pseudo_register_collect)
263         (efp_ax_pseudo_register_collect): New functions.
264         (rs6000_ax_pseudo_register_collect): Move DFP, VSX and EFP pseudo
265         register logic to new functions.  Handle checkpointed DFP, VSX,
266         and EFP pseudo registers.
267         (rs6000_gdbarch_init): Look for and validate the htm features.
268         Include checkpointed DFP, VSX and EFP pseudo-registers.
269         * NEWS: Mention access to PPR, DSCR, TAR, EBB/PMU registers and
270         HTM registers.
271
272 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
273
274         * rs6000-tdep.c (rs6000_gdbarch_init): Reject tdescs with vsx but
275         without altivec or fpu.
276
277 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
278             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
279
280         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_EBBREGSET)
281         (PPC_LINUX_SIZEOF_PMUREGSET): Declare.
282         * nat/ppc-linux.h (PPC_FEATURE2_EBB, NT_PPC_EBB, NT_PPC_PMU):
283         Define if not already defined.
284         * features/rs6000/power-ebb.xml: New file.
285         * features/rs6000/power-linux-pmu.xml: New file.
286         * features/rs6000/powerpc-isa207-vsx32l.xml: Include ebb and pmu
287         features.
288         * features/rs6000/powerpc-isa207-vsx64l.xml: Likewise.
289         * features/rs6000/powerpc-isa207-vsx32l.c: Re-generate.
290         * features/rs6000/powerpc-isa207-vsx64l.c: Re-generate.
291         * regformats/rs6000/powerpc-isa207-vsx32l.dat: Re-generate.
292         * regformats/rs6000/powerpc-isa207-vsx64l.dat: Re-generate.
293         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
294         fetch_regset with ebb and pmu regsets.
295         (store_register, store_ppc_registers): Call store_regset with ebb
296         and pmu regsets.
297         (ppc_linux_nat_target::read_description): Set isa207 field in the
298         features struct if ebb and pmu are avaiable.
299         * ppc-linux-tdep.c (ppc32_regmap_ebb, ppc32_regmap_pmu)
300         (ppc32_linux_ebbregset, ppc32_linux_pmuregset): New globals.
301         (ppc_linux_iterate_over_regset_sections): Call back with the ebb
302         and pmu regsets.
303         (ppc_linux_core_read_description): Check if the pmu section is
304         present and set isa207 in the features struct.
305         * ppc-linux-tdep.h (ppc32_linux_ebbregset)
306         (ppc32_linux_pmuregset): Declare.
307         * ppc-tdep.h (struct gdbarch_tdep) <ppc_mmcr0_regnum>: New field.
308         <ppc_mmcr2_regnum, ppc_siar_regnum, ppc_sdar_regnum>: New fields.
309         <ppc_sier_regnum>: New field.
310         (enum): <PPC_BESCR_REGNUM, PPC_EBBHR_REGNUM, PPC_EBBRR_REGNUM>:
311         New enum values.
312         <PPC_MMCR0_REGNUM, PPC_MMCR2_REGNUM, PPC_SIAR_REGNUM>: New enum
313         values.
314         <PPC_SDAR_REGNUM, PPC_SIER_REGNUM>: New enum values.
315         (PPC_IS_EBB_REGNUM, PPC_IS_PMU_REGNUM): Define.
316         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate the
317         ebb and pmu features.
318
319 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
320             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
321
322         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa207_vsx32l)
323         (tdesc_powerpc_isa207_vsx64l): Declare.
324         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_TARREGSET): Define.
325         (struct ppc_linux_features) <isa207>: New field.
326         (ppc_linux_no_features): Add initializer for isa207 field.
327         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
328         new tdescs.
329         * nat/ppc-linux.h (PPC_FEATURE2_ARCH_2_07, PPC_FEATURE2_TAR)
330         (NT_PPC_TAR): Define if not already defined.
331         * features/Makefile (WHICH): Add rs6000/powerpc-isa207-vsx32l and
332         rs6000/powerpc-isa207-vsx64l.
333         (XMLTOC): Add rs6000/powerpc-isa207-vsx32l.xml and
334         rs6000/powerpc-isa207-vsx64l.xml.
335         * features/rs6000/power-tar.xml: New file.
336         * features/rs6000/powerpc-isa207-vsx32l.xml: New file.
337         * features/rs6000/powerpc-isa207-vsx64l.xml: New file.
338         * features/rs6000/powerpc-isa207-vsx32l.c: Generate.
339         * features/rs6000/powerpc-isa207-vsx64l.c: Generate.
340         * regformats/rs6000/powerpc-isa207-vsx32l.dat: Generate.
341         * regformats/rs6000/powerpc-isa207-vsx64l.dat: Generate.
342         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
343         fetch_regset with the TAR regset.
344         (store_register, store_ppc_registers): Call store_regset with the
345         TAR regset.
346         (ppc_linux_nat_target::read_description): Set isa207 field in the
347         features struct if needed.
348         * ppc-linux-tdep.c: Include
349         features/rs6000/powerpc-isa207-vsx32l.c and
350         features/rs6000/powerpc-isa207-vsx64l.c.
351         (ppc32_regmap_tar, ppc32_linux_tarregset): New globals.
352         (ppc_linux_iterate_over_regset_sections): Call back with the tar
353         regset.
354         (ppc_linux_core_read_description): Check if the tar section is
355         present and set isa207 in the features struct.
356         (_initialize_ppc_linux_tdep): Call
357         initialize_tdesc_powerpc_isa207_vsx32l and
358         initialize_tdesc_powerpc_isa207_vsx64l.
359         * ppc-linux-tdep.h (ppc32_linux_tarregset): Declare.
360         * ppc-tdep.h (gdbarch_tdep) <ppc_tar_regnum>: New field.
361         (enum) <PPC_TAR_REGNUM>: New enum value.
362         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate tar
363         feature.
364         (ppc_process_record_op31): Record changes to TAR.
365
366 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
367             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
368
369         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa205_ppr_dscr_vsx32l)
370         (tdesc_powerpc_isa205_ppr_dscr_vsx64l): Declare.
371         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_PPRREGSET)
372         (PPC_LINUX_SIZEOF_DSCRREGSET): Define.
373         (struct ppc_linux_features) <ppr_dscr>: New field.
374         (ppc_linux_no_features): Add initializer for ppr_dscr field.
375         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
376         new tdescs.
377         * nat/ppc-linux.h (PPC_FEATURE2_DSCR, NT_PPC_PPR, NT_PPC_DSCR):
378         Define if not already defined.
379         * features/Makefile (WHICH): Add
380         rs6000/powerpc-isa205-ppr-dscr-vsx32l and
381         rs6000/powerpc-isa205-ppr-dscr-vsx64l.
382         (XMLTOC): Add rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
383         rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml.
384         * features/rs6000/power-dscr.xml: New file.
385         * features/rs6000/power-ppr.xml: New file.
386         * features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml: New file.
387         * features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml: New file.
388         * features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c: Generate.
389         * features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c: Generate.
390         * regformats/rs6000/powerpc-isa205-ppr-dscr-vsx32l.dat: Generate.
391         * regformats/rs6000/powerpc-isa205-ppr-dscr-vsx64l.dat: Generate.
392         * ppc-linux-nat.c: Include <sys/uio.h>.
393         (fetch_regset, store_regset, check_regset): New functions.
394         (fetch_register, fetch_ppc_registers): Call fetch_regset with
395         DSCR and PPR regsets.
396         (store_register, store_ppc_registers): Call store_regset with
397         DSCR and PPR regsets.
398         (ppc_linux_get_hwcap2): New function.
399         (ppc_linux_nat_target::read_description): Call
400         ppc_linux_get_hwcap2 and check_regset, set ppr_dscr field in the
401         features struct if needed.
402         * ppc-linux-tdep.c: Include
403         features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c and
404         features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c.
405         (ppc32_regmap_ppr, ppc32_regmap_dscr, ppc32_linux_pprregset)
406         (ppc32_linux_dscrregset): New globals.
407         (ppc_linux_iterate_over_regset_sections): Call back with the ppr
408         and dscr regsets.
409         (ppc_linux_core_read_description): Check if the ppr and dscr
410         sections are present and set ppr_dscr in the features struct.
411         (_initialize_ppc_linux_tdep): Call
412         initialize_tdesc_powerpc_isa205_ppr_dscr_vsx32l and
413         initialize_tdesc_powerpc_isa205_ppr_dscr_vsx64l.
414         * ppc-linux-tdep.h (ppc32_linux_pprregset)
415         (ppc32_linux_dscrregset): Declare.
416         * ppc-tdep.h (struct gdbarch_tdep) <ppc_ppr_regnum>: New field.
417         <ppc_dscr_regnum>: New field.
418         (enum) <PPC_PPR_REGNUM, PPC_DSCR_REGNUM>: New enum values.
419         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate ppr
420         and dscr features.
421         (ppc_process_record_op31): Record changes to PPR and DSCR.
422
423 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
424
425         * rs6000-tdep.c (rs6000_gdbarch_init): Replace line wrapping by a
426         second initializer line for the have_* variables.  Initialize
427         have_fpu to 0 instead of 1.
428
429 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
430
431         * arch/ppc-linux-common.c (ppc_linux_match_description):
432         Parenthesize tdesc assignements and indent them properly.
433
434 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
435
436         * ppc-linux-nat.c (fetch_register): Change if statement to else
437         if.
438         (store_register): Likewise.
439
440 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
441
442         * rs6000-tdep.c: Remove reggroups.h include.
443         (rs6000_pseudo_register_reggroup_p): Remove.
444         (rs6000_gdbarch_init): Remove call to
445         set_tdesc_pseudo_register_reggroup_p.
446
447 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
448
449         * reggroups.c (default_register_reggroup_p): Return true for
450         decfloat registers and float_reggroup.
451
452 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
453
454         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): Remove.
455         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): Replace
456         ppc_linux_collect_vrregset by regcache_collect_regset.
457
458 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
459
460         * linux-tdep.c (linux_collect_regset_section_cb): Use
461         std::vector<gdb_byte> instead of char * and malloc for buf.
462         Remove xfree.
463
464 2018-10-26  Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
465
466         * xcoffread.c (read_xcoff_symtab): Pass deduced language to
467         symtab_start instead of always using language_unknown.
468
469 2018-10-26  Andrew Burgess  <andrew.burgess@embecosm.com>
470
471         * riscv-tdep.c (riscv_read_misa_reg): Update comment, remove
472         READ_P parameter, catch and ignore register access errors from
473         either the old or new MISA location.
474         (riscv_has_feature): Update call to riscv_read_misa_reg.
475
476 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
477
478         * python/py-function.c (convert_values_to_python): Return
479         gdbpy_ref<>.  Add header comment.
480         (fnpy_call): Adjust.
481
482 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
483
484         * python/py-cmd.c (cmdpy_completer_helper): Return gdbpy_ref<>.
485         (cmdpy_completer_handle_brkchars): Adjust.
486         (cmdpy_completer): Adjust.
487
488 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
489
490         * riscv-linux-nat.c (riscv_linux_nat_target::fetch_registers):
491         Pass correct regnum to raw_supply_zeroed.
492
493 2018-10-23  Hafiz Abid Qadeer  <abidh@codesourcery.com>
494
495         * regcache.c (cooked_read_test): Add CSKY to the list of
496         architectures with a save_reggroup
497
498 2018-10-23  Simon Marchi  <simon.marchi@polymtl.ca>
499
500         PR gdb/23368
501         * infrun.c (follow_exec): In the follow_exec_mode_new case,
502         transfer terminal state from old new new inferior.
503         * terminal.h (swap_terminal_info): New function.
504         * inflow.c (swap_terminal_info): New function.
505
506 2018-10-23  Tom Tromey  <tom@tromey.com>
507
508         * record-btrace.c (get_thread_current_frame_id): Rename from
509         get_thread_current_frame.  Return a frame_id.
510         (record_btrace_start_replaying): Update.
511
512 2018-10-23  Andrew Burgess  <andrew.burgess@embecosm.com>
513
514         * riscv-tdep.c (riscv_register_name): Use the user-friendly names
515         for CSRs.
516
517 2018-10-23  Joel Brobecker  <brobecker@adacore.com>
518
519         * riscv-tdep.c (riscv_gdbarch_init): Set the gdbarch's
520         have_nonsteppable_watchpoint attribute to 1.
521
522 2018-10-23  Andrew Burgess  <andrew.burgess@embecosm.com>
523
524         * riscv-tdep.c (riscv_gdb_reg_names): Update comment, and all
525         register names.
526         (struct register_alias): Rename to...
527         (struct riscv_register_alias): ...this, and update comment.
528         (riscv_register_aliases): Update type, and alias names.  Remove
529         CSR names from this list.
530         (riscv_register_name): Use riscv_gdb_reg_names for int and float
531         register names.  Add an extra assertion.
532         (riscv_is_regnum_a_named_csr): New function.
533         (riscv_register_reggroup_p): Use riscv_is_regnum_a_named_csr.
534
535 2018-10-22  Jim Wilson  <jimw@sifive.com>
536
537         * riscv-tdep.c (riscv_push_dummy_call) <in_reg>: Check for value in
538         FP reg smaller than FP reg size, and fill with -1 instead of 0.
539
540         * riscv-tdep.c (riscv_fpreg_d_type, riscv_fpreg_q_type): New.
541         (riscv_register_type): Use them.
542         (riscv_print_one_register_info): Handle union of floats same as float.
543         * riscv-tdep.h (struct gdbarch_tdep): Add riscv_fpreg_d_type and
544         riscv_fpreg_q_type fields.
545
546 2018-10-21  Simon Marchi  <simon.marchi@ericsson.com>
547
548         * gdbarch.sh (gdbarch_num_cooked_regs): New.
549         * gdbarch.h: Re-generate.
550         * ax-gdb.c (gen_expr): Use gdbarch_num_cooked_regs.
551         * dwarf2-frame.c (dwarf2_frame_cache): Likewise.
552         * eval.c (evaluate_subexp_standard): Likewise.
553         * findvar.c (value_of_register): Likewise.
554         (value_of_register_lazy): Likewise.
555         (address_from_register): Likewise.
556         * frame.c (get_frame_register_bytes): Likewise.
557         * gdbarch-selftests.c (register_to_value_test): Likewise.
558         * h8300-tdep.c (h8300_register_type): Likewise.
559         * i386-tdep.c (i386_dbx_reg_to_regnum): Likewise.
560         (i386_svr4_reg_to_regnum): Likewise.
561         * infcmd.c (default_print_registers_info): Likewise.
562         (registers_info): Likewise.
563         (print_vector_info): Likewise.
564         (default_print_float_info): Likewise.
565         * m68hc11-tdep.c (m68hc11_frame_unwind_cache): Likewise.
566         * mdebugread.c (mdebug_reg_to_regnum): Likewise.
567         * mi/mi-main.c (mi_cmd_data_list_register_names): Likewise.
568         (mi_cmd_data_list_changed_registers): Likewise.
569         (mi_cmd_data_list_register_values): Likewise.
570         (mi_cmd_data_write_register_values): Likewise.
571         (mi_cmd_trace_frame_collected): Likewise.
572         * mips-tdep.c (print_gp_register_row): Likewise.
573         (mips_print_registers_info): Likewise.
574         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
575         * regcache.c (init_regcache_descr): Likewise.
576         (register_size): Likewise.
577         (register_dump::dump): Likewise.
578         (cooked_read_test): Likewise.
579         (cooked_write_test): Likewise.
580         * rs6000-tdep.c (rs6000_register_sim_regno): Likewise.
581         (rs6000_gdbarch_init): Likewise.
582         * stabsread.c (stab_reg_to_regnum): Likewise.
583         * stack.c (info_frame_command): Likewise.
584         * target-descriptions.c (tdesc_register_name): Likewise.
585         * trad-frame.c (trad_frame_alloc_saved_regs): Likewise.
586         * tui/tui-regs.c (tui_show_register_group): Likewise.
587         * user-regs.c (user_reg_map_name_to_regnum): Likewise.
588         (user_reg_map_regnum_to_name): Likewise.
589         (value_of_user_reg): Likewise.
590         (maintenance_print_user_registers): Likewise.
591         * xtensa-tdep.c (xtensa_find_register_by_name): Likewise.
592         (xtensa_register_name): Likewise.
593         (xtensa_register_type): Likewise.
594         (xtensa_reg_to_regnum): Likewise.
595         (xtensa_pseudo_register_read): Likewise.
596         (xtensa_pseudo_register_write): Likewise.
597
598 2018-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
599
600         * amd64-tdep.c (amd64_pseudo_register_read_value): Use
601         correctly-sized buffer with raw_read.
602         (amd64_pseudo_register_write): Use correctly-sized buffer for
603         raw_read/raw_write.
604
605 2018-10-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
606
607         * typeprint.c (_initialize_typeprint): Fix wrong prefixname arg
608         in add_prefix_cmd of set print type.
609
610 2018-10-19  Tom Tromey  <tom@tromey.com>
611
612         PR tui/18388:
613         * NEWS: Mention tabset deprecation.
614         * tui/tui-win.c (tui_tab_width, internal_tab_width): New globals.
615         (update_tab_width): New function.
616         (tui_set_tab_width, tui_show_tab_width): New functions.
617         (tui_set_tab_width_command): Use update_tab_width.
618         (_initialize_tui_win): Move to end of file.  Deprecate "tabset".
619         Add new "set tui tab-width" command.
620         * tui/tui-source.c (tui_set_source_content): Update.
621         * tui/tui-disasm.c (tui_set_disassem_content): Update.
622         * tui/tui-data.h (tui_default_tab_len, tui_set_default_tab_len):
623         Don't declare.
624         (tui_tab_width): Declare.
625         * tui/tui-data.c (default_tab_len, tui_default_tab_len)
626         (tui_set_default_tab_len): Remove.
627
628 2018-10-19  Tom Tromey  <tom@tromey.com>
629
630         * tui/tui-io.h (key_is_start_sequence, key_is_end_sequence)
631         (key_is_backspace, tui_getc): Don't declare.
632         * tui/tui-io.c (key_is_start_sequence): Now static.
633         (key_is_end_sequence, key_is_backspace): Remove.
634         (tui_getc): Now static.
635
636 2018-10-19  Tom Tromey  <tom@tromey.com>
637
638         * symfile.c (reread_symbols): Clear "static_links".
639
640 2018-10-19  Alan Hayward  <alan.hayward@arm.com>
641
642         * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_SIZE): New
643         define.
644         (aarch64_linux_sigframe_init): Extra boundary checks.
645
646 2018-10-19  Andreas Arnez  <arnez@linux.ibm.com>
647
648         * s390-tdep.c (s390_pseudo_register_type): For v0-v15 don't yield
649         the possibly non-existent tdesc type 'vec128', but the type of raw
650         register v16 instead.
651
652 2018-10-19  Gary Benson <gbenson@redhat.com>
653
654         * cli/cli-interp.c (cli_interp::~cli_interp): New function.
655
656 2018-10-18  Sergio Durigan Junior  <sergiodj@redhat.com>
657
658         PR cli/23785
659         * cli/cli-dump.c (restore_binary_file): Check if "file" is
660         NULL.
661
662 2018-10-17  Paul Koning  <paul_koning@dell.com>
663
664         * charset.c (convert_between_encodings): Fix unsigned overflow.
665
666 2018-10-17  John Baldwin  <jhb@FreeBSD.org>
667
668         * fbsd-nat.c (fbsd_nat_target::info_proc) Use
669         fbsd_info_proc_mappings_header and fbsd_info_proc_mappings_entry.
670         * fbsd-tdep.c (fbsd_vm_map_entry_flags): Mark static.
671         (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
672         New functions.
673         (fbsd_core_info_proc_mappings): Use fbsd_info_proc_mappings_header
674         and fbsd_info_proc_mappings_header.
675         * fbsd-tdep.h (fbsd_vm_map_entry_flags): Remove.
676         (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
677         New.
678
679 2018-10-17  Joel Brobecker  <brobecker@adacore.com>
680
681         * MAINTAINERS (Responsible Maintainers): Add Rainer Orth as
682         Solaris Maintainer.
683
684 2018-10-15  Tom Tromey  <tom@tromey.com>
685
686         * tui/tui.c (strcat_to_buf): Remove casts.
687         * tui/tui-winsource.c (tui_show_source_line)
688         (tui_set_is_exec_point_at, tui_line_is_displayed): Remove casts.
689         * tui/tui-wingeneral.c (tui_refresh_win, box_win): Remove casts.
690         * tui/tui-windata.c (tui_first_data_item_displayed)
691         (tui_delete_data_content_windows, tui_erase_data_content)
692         (tui_display_all_data, tui_display_data_from)
693         (tui_refresh_data_win, tui_vertical_data_scroll): Remove casts.
694         * tui/tui-win.c (tui_set_win_height)
695         (make_invisible_and_set_new_height, parse_scrolling_args): Remove
696         casts.
697         * tui/tui-win.c (tui_resize_all): Remove casts.
698         (tui_scroll_backward_command, tui_set_focus)
699         (tui_set_tab_width_command): Likewise.
700         * tui/tui-source.c (tui_vertical_source_scroll): Remove cast.
701         * tui/tui-regs.c (tui_show_register_group): Remove cast.
702         * tui/tui-layout.c (tui_set_layout_by_name): Remove cast.
703         * tui/tui-disasm.c (tui_vertical_disassem_scroll): Remove cast.
704         * tui/tui-data.c (tui_partial_win_by_name, tui_free_win_content):
705         Remove casts.
706
707 2018-10-15  Simon Marchi  <simon.marchi@ericsson.com>
708
709         * MAINTAINERS (Responsible Maintainers): Add Alan Hayward as
710         AArch64/ARM maintainer.
711
712 2018-10-11  Gary Benson <gbenson@redhat.com>
713
714         * interps.h (interp::m_name): Make private and mutable.
715         * interps.c (interp::~interp): Free m_name.
716
717 2018-10-10  Sergio Durigan Junior  <sergiodj@redhat.com>
718             Simon Marchi <simark@simark.ca>
719
720         * README (`configure' options): Add documentation for new
721         "--enable-unit-tests" option.
722         * acinclude.m4: Include "selftest.m4".
723         * configure: Regenerate.
724         * configure.ac: Use "GDB_AC_SELFTEST".
725         * maint.c (maintenance_selftest): Update message informing
726         that selftests have been disabled.
727         (maintenance_info_selftests): Likewise.
728         * selftest.m4: New file.
729
730 2018-10-10  Gary Benson <gbenson@redhat.com>
731
732         * remote.c (remote_target::remote_send_printf): Add
733         missing va_end found by Coverity.
734
735 2018-10-10  Markus Metzger  <markus.t.metzger@intel.com>
736
737         * btrace.c (ftrace_update_function): Add indirect jump heuristic.
738
739 2018-10-09  Tom Tromey  <tom@tromey.com>
740
741         * configure: Rebuild.
742         * sanitize.m4 (AM_GDB_UBSAN): Default to no.
743         * NEWS: Update --enable-ubsan documentation.
744
745 2018-10-09  Gary Benson <gbenson@redhat.com>
746
747         * dwarf2read.c (create_dwp_hash_table): Fix buffer overrun
748         found by Coverity.
749
750 2018-10-08  Tom Tromey  <tom@tromey.com>
751
752         * riscv-fbsd-tdep.c (riscv_fbsd_sigframe_init): Remove unused
753         variable.
754         (riscv_fbsd_init_abi): Likewise.
755
756 2018-10-08  Weimin Pan  <weimin.pan@oracle.com>
757         * valops.c (value_struct_elt_for_reference): Rename local variable
758         to work around the shadowing a previous local warning.
759
760 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
761
762         * Makefile.in (ALLDEPFILES): Add riscv-fbsd-nat.c.
763         * NEWS: Mention new FreeBSD/riscv native configuration.
764         * configure.host: Add riscv*-*-freebsd*.
765         * configure.nat: Likewise.
766         * riscv-fbsd-nat.c: New file.
767
768 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
769
770         * Makefile.in (ALL_TARGET_OBS): Add riscv-fbsd-tdep.o.
771         (HFILES_NO_SRCDIR): Add riscv-fbsd-tdep.h.
772         (ALLDEPFILES): Add riscv-fbsd-tdep.c.
773         * NEWS: Mention new FreeBSD/riscv target.
774         * configure.tgt: Add riscv*-*-freebsd*.
775         * riscv-fbsd-tdep.c: New file.
776         * riscv-fbsd-tdep.h: New file.
777
778 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
779
780         * regcache.h (struct regcache_map_entry): Note that this type can
781         be used with traditional frame caches.
782         * trad-frame.c (trad_frame_set_reg_regmap): New.
783         * trad-frame.h (trad_frame_set_reg_regmap): New.
784
785 2018-10-08  Weimin Pan  <weimin.pan@oracle.com>
786
787         PR c++/16841
788         * valops.c (get_virtual_base_offset): New function.
789         (value_struct_elt_for_reference): Use it to get virtual base offset
790         and add it in calculating class member address.
791
792 2018-10-08   John Darrington <john@darrington.wattle.id.au>
793
794     * dwarf2read.c (dwarf2_cu) <producer_is_codewarrior>: New field.
795       (check_producer): Check if the producer is codewarrior.
796       (producer_is_codewarrior): New function.
797       (lnp_state_machine::record_line): Ignore is_stmt flag for records
798        produced by codewarrior.
799       (dwarf2_cu::dwarf2_cu): Initialize producer_is_codewarrior.
800
801 2018-10-06  Tom Tromey  <tom@tromey.com>
802
803         PR python/19399:
804         * python/py-inferior.c: Add "architecture" entry.
805         (infpy_architecture): New function.
806
807 2018-10-06  Tom Tromey  <tom@tromey.com>
808
809         PR python/21765:
810         * python/py-symbol.c (gdbpy_initialize_symbols): Redefine
811         SYMBOL_VARIABLES_DOMAIN, SYMBOL_FUNCTIONS_DOMAIN,
812         SYMBOL_TYPES_DOMAIN.  Define SYMBOL_MODULE_DOMAIN,
813         SYMBOL_COMMON_BLOCK_DOMAIN, SYMBOL_LOC_COMMON_BLOCK.
814
815 2018-10-06  Tom Tromey  <tom@tromey.com>
816
817         PR build/17077:
818         * Makefile.in (OPCODES_CFLAGS): Remove "-I$(OPCODES_SRC)/..".
819         * arc-tdep.c, frv-tdep.c, lm32-tdep.c, mep-tdep.c,
820         microblaze-tdep.c, or1k-tdep.h: Use ../opcodes, not opcodes, in
821         #include.
822
823 2018-10-06  Tom Tromey  <tom@tromey.com>
824
825         * python/py-breakpoint.c (bppy_get_location): Handle a
826         bp_breakpoint without a location.
827
828 2018-10-06  Tom Tromey  <tom@tromey.com>
829
830         * python/lib/gdb/function/strfns.py (_MemEq, _StrLen, _StrEq)
831         (_RegEx): Reformat help text.
832         * python/lib/gdb/function/caller_is.py (CallerIs, CallerMatches)
833         (AnyCallerIs, AnyCallerMatches): Reformat help text.
834         * python/lib/gdb/function/as_string.py (_AsString): Reformat help
835         text.
836         * python/lib/gdb/command/xmethods.py (InfoXMethod)
837         (EnableXMethod, DisableXMethod): Remove help indentation.
838         Capitalize meta-syntactic variables.
839         * python/lib/gdb/command/unwinders.py (InfoUnwinder)
840         (EnableUnwinder, DisableUnwinder): Remove help indentation.
841         Capitalize meta-syntactic variables.
842         * python/lib/gdb/command/explore.py (ExploreCommand)
843         (ExploreValueCommand, ExploreTypeCommand): Reformat help text.
844         * python/lib/gdb/command/type_printers.py (InfoTypePrinter)
845         (EnableTypePrinter, DisableTypePrinter): Remove help indentation.
846         * python/lib/gdb/command/pretty_printers.py (InfoPrettyPrinter):
847         Remove help indentation.
848         (EnablePrettyPrinter, DisablePrettyPrinter): Likewise.
849         * python/lib/gdb/command/frame_filters.py (EnableFrameFilter)
850         (DisableFrameFilter, SetFrameFilterPriority)
851         (ShowFrameFilterPriority, InfoFrameFilter): Reword help text.
852
853 2018-10-06  Tom Tromey  <tom@tromey.com>
854
855         PR tui/28819:
856         * tui/tui-io.c (gdb_wgetch): New function.
857         (tui_mld_getc, tui_getc): Use it.
858
859 2018-10-05  Tom Tromey  <tom@tromey.com>
860
861         * sol-thread.c (sol_thread_target::wait): Rename inner
862         "save_ptid".
863
864 2018-10-04  Tom Tromey  <tom@tromey.com>
865
866         * configure: Rebuild.
867         * warning.m4 (AM_GDB_WARNINGS): Add -Wshadow=local.
868
869 2018-10-04  Tom Tromey  <tom@tromey.com>
870
871         * guile/scm-frame.c (gdbscm_frame_read_var): Remove inner
872         declaration of "block".
873
874 2018-10-04  Tom Tromey  <tom@tromey.com>
875
876         * common/filestuff.c (fdwalk): Remove inner declaration of
877         "result".
878
879 2018-10-04  Tom Tromey  <tom@tromey.com>
880
881         * msp430-tdep.c (msp430_push_dummy_call): Rename inner
882         "structs_addr" and hoist declaration.
883
884 2018-10-04  Tom Tromey  <tom@tromey.com>
885
886         * linux-tdep.c (linux_make_mappings_corefile_notes): Introduce new
887         variable "size".
888
889 2018-10-04  Tom Tromey  <tom@tromey.com>
890
891         * mdebugread.c (parse_partial_symbols): Use std::string.
892
893 2018-10-04  Tom Tromey  <tom@tromey.com>
894
895         * ctf.c (SET_ARRAY_FIELD): Rename "u32".
896         * p-valprint.c (pascal_val_print): Split inner "i" variable.
897         * xtensa-tdep.c (xtensa_push_dummy_call): Declare "i" in loop
898         header.
899         * xstormy16-tdep.c (xstormy16_push_dummy_call): Declare "val" in
900         more inner scope.
901         * xcoffread.c (read_xcoff_symtab): Rename inner "symbol".
902         * varobj.c (varobj_update): Rename inner "newobj",
903         "type_changed".
904         * valprint.c (generic_emit_char): Rename inner "buf".
905         * valops.c (find_overload_match): Rename inner "temp".
906         (value_struct_elt_for_reference): Declare "v" in more inner
907         scope.
908         * v850-tdep.c (v850_push_dummy_call): Rename "len".
909         * unittests/array-view-selftests.c (run_tests): Rename inner
910         "vec".
911         * tui/tui-stack.c (tui_show_frame_info): Declare "i" in loop
912         header.
913         * tracepoint.c (merge_uploaded_trace_state_variables): Declare
914         "tsv" in more inner scope.
915         (print_one_static_tracepoint_marker): Rename inner
916         "tuple_emitter".
917         * tic6x-tdep.c (tic6x_analyze_prologue): Declare "inst" lower.
918         (tic6x_push_dummy_call): Don't redeclare "addr".
919         * target-float.c: Declare "dto" lower.
920         * symtab.c (lookup_local_symbol): Rename inner "sym".
921         (find_pc_sect_line): Rename inner "pc".
922         * stack.c (print_frame): Don't redeclare "gdbarch".
923         (return_command): Rename inner "gdbarch".
924         * s390-tdep.c (s390_prologue_frame_unwind_cache): Renam inner
925         "sp".
926         * rust-lang.c (rust_internal_print_type): Declare "i" in loop
927         header.
928         * rs6000-tdep.c (ppc_process_record): Rename inner "addr".
929         * riscv-tdep.c (riscv_push_dummy_call): Declare "info" in inner
930         scope.
931         * remote.c (remote_target::update_thread_list): Don't redeclare
932         "tp".
933         (remote_target::process_initial_stop_replies): Rename inner
934         "thread".
935         (remote_target::remote_parse_stop_reply): Don't redeclare "p".
936         (remote_target::wait_as): Don't redeclare "stop_reply".
937         (remote_target::get_thread_local_address): Rename inner
938         "result".
939         (remote_target::get_tib_address): Likewise.
940
941         * regcache.c (cooked_read_test): Rename "regnum".
942         * record-btrace.c (cmd_record_btrace_start): Rename inner
943         "exception".
944         * ppc-sysv-tdep.c (ppc64_sysv_abi_return_value): Declare "i" in
945         loop header.
946         * ppc-linux-tdep.c (ppc_linux_syscall_record): Declare "i" in loop
947         header.
948         (ppu2spu_sniffer): Rename inner "buf".
949         * parse.c (operator_check_standard): Rename inner "type",
950         "objfile".
951         * p-valprint.c (pascal_val_print): Introduce new scope for
952         "low_bound", "high_bound".
953         * p-exp.y (yylex): Declare "i" in loop header.
954         * objfiles.c (objfile_relocate1): Declare "i" in loop header.
955         Lower declaration of "s".
956         * nios2-tdep.c (nios2_analyze_prologue): Declare "i" in loop
957         header.
958         (nios2_push_dummy_call): Rename "len".
959         * nat/linux-osdata.c (linux_xfer_osdata_cpus): Rename static
960         "buf".
961         (linux_xfer_osdata_fds, linux_xfer_osdata_shm)
962         (linux_xfer_osdata_sem, linux_xfer_osdata_msg)
963         (linux_xfer_osdata_modules): Likewise.
964         * mips-tdep.c (mips_eabi_push_dummy_call): Rename outer "len".
965         (mips_n32n64_push_dummy_call, mips_o32_push_dummy_call)
966         (mips_o64_push_dummy_call): Likewise.
967         * microblaze-tdep.c (microblaze_analyze_prologue): Rename inner
968         "op".
969         * mi/mi-main.c (list_available_thread_groups): Rename inner
970         "tuple_emitter".
971         (mi_cmd_data_read_memory): Rename inner "opts".
972         * mi/mi-cmd-var.c (varobj_update_one): Rename inner
973         "tuple_emitter".
974         * mep-tdep.c (mep_analyze_prologue): Declare "rn" in loop header.
975         * mdebugread.c (parse_symbol): Rename inner "b".  Declare "f" in
976         more inner scope.
977         (parse_partial_symbols): Rename inner "pst", "p", "name"
978         * main.c (captured_main_1): Rename inner "i"s.
979         * machoread.c (macho_symfile_read_all_oso): Don't redeclare
980         "oso2".
981         * linux-tdep.c (linux_info_proc): Rename inner "filename".
982         * linespec.c (linespec_lexer_lex_string): Rename inner "p".
983         * infrun.c (handle_no_resumed): Don't redeclare "thread".
984         (handle_signal_stop): Rename inner "gdbarch".
985         (handle_command): Declare "signum" in loop header.
986         * ia64-tdep.c (ia64_pseudo_register_read): Don't redeclare
987         "status".
988         (examine_prologue): Rename inner "sol" and "sof".
989         (ia64_extract_return_value): Rename inner "val".  Declare another
990         "val" in a more inner scope.
991         * hppa-bsd-tdep.c (hppabsd_find_global_pointer): Declare "buf" in
992         inner scope.
993         * guile/scm-symbol.c (gdbscm_lookup_symbol): Rename inner
994         "except".
995         * findvar.c (default_read_var_value): Don't redeclare "addr".
996         * f-exp.y (yylex): Declare "i" in loop header.
997         * eval.c (evaluate_subexp_standard): Don't redeclare "type".
998         Rename inner "type", "expect_type".
999         (evaluate_subexp_for_sizeof): Rename inner "pc".
1000         * elfread.c (elf_symfile_read): Rename inner "abfd".
1001         * dwarf2read.c (read_debug_names_from_section): Don't redeclare
1002         "bytes_read".
1003         (process_psymtab_comp_unit_reader): Don't redeclare "gdbarch".
1004         (add_partial_subprogram): Rename inner "lowpc" and "highpc".
1005         (dwarf_decode_line_header): Rename inner "lh".
1006         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Don't redeclare
1007         "offset".  Declare "i" in loop header.
1008         (disassemble_dwarf_expression): Rename inner "addr_size".
1009         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Rename
1010         inner "result".
1011         (dwarf_expr_context::execute_stack_op): Rename inner "offset".
1012         * dwarf2-frame.c (decode_frame_entry_1): Rename inner "length"s.
1013         * disasm.c (do_mixed_source_and_assembly_deprecated): Rename inner
1014         "inner_list_emitter".
1015         (do_mixed_source_and_assembly): Rename inner "tuple_emitter".
1016         * disasm-selftests.c (print_one_insn_test): Wrap "bplen"
1017         declaration in a block.
1018         * csky-tdep.c (csky_analyze_prologue): Declare "offset" lower.
1019         * cp-valprint.c (cp_print_value_fields): Don't redeclare
1020         "obstack_final_size".
1021         * cp-support.c (inspect_type): Declare "i" in loop header.
1022         * compile/compile.c (compile_instance::insert_symbol_error):
1023         Rename inner "e".
1024         * common/agent.c (agent_run_command): Remove inner "ret"
1025         declaration.
1026         * coffread.c (coff_symfile_read): Rename inner "name".
1027         (coff_symfile_read): Rename inner "abfd".
1028         * cli/cli-utils.c (get_number_trailer): Rename inner "val".
1029         * cli/cli-cmds.c (print_disassembly): Rename inner "low" and
1030         "high".
1031         * c-exp.y (lex_one_token): Move "len" declaration lower.
1032         * breakpoint.c (create_longjmp_master_breakpoint): Don't redeclare
1033         "gdbarch".
1034         (create_exception_master_breakpoint): Likewise.  Don't redeclare
1035         "b".
1036         (watch_command_1): Declare "mark" later.
1037         (clear_command): Don't shadow "a" or "b".
1038         (delete_command): Rename inner "b".
1039         (delete_trace_command): Likewise.
1040         * arm-tdep.c (thumb_process_displaced_32bit_insn): Rename inner
1041         "op".
1042         (arm_gdbarch_init): Remove inner "e_flags".
1043         * arch/arm-get-next-pcs.c (thumb_get_next_pcs_raw): Declare
1044         "offset" in inner blocks.
1045
1046 2018-10-04  Simon Marchi  <simon.marchi@ericsson.com>
1047
1048         * dwarf-index-write.c (file_write): Don't write if the vector is
1049         empty.
1050
1051 2018-10-05  Tom de Vries  <tdevries@suse.de>
1052
1053         * python/py-progspace.c (pspy_solib_name): Fix type mismatch in
1054         PyArg_ParseTuple call.
1055
1056 2018-10-05  Tom de Vries  <tdevries@suse.de>
1057
1058         * python/py-record-btrace.c (recpy_bt_goto): Fix type mismatch in
1059         PyArg_ParseTuple call.
1060
1061 2018-10-04  Joel Brobecker  <brobecker@adacore.com>
1062
1063         * psymtab.c (recursively_search_psymtabs): Reformat parameters
1064         to avoid exceeding 80 characters per line limit.
1065
1066 2018-10-04  Tom Tromey  <tom@tromey.com>
1067
1068         * symfile.c (syms_from_objfile_1, finish_new_objfile)
1069         (reread_symbols): Update.
1070         * complaints.h (clear_complaints): Remove argument.
1071         * complaints.c (enum complaint_series): Remove.
1072         (series): Remove global.
1073         (complaint_internal): Update.
1074         (clear_complaints): Remove argument.
1075
1076 2018-10-04  Tom Tromey  <tom@tromey.com>
1077
1078         * symfile.c (symbol_file_add_with_addrs): Do not print "no
1079         debugging symbols" message if there is a separate debug objfile.
1080
1081 2018-10-04  Tom Tromey  <tom@tromey.com>
1082
1083         PR cli/19551:
1084         * symfile.c (symbol_file_add_with_addrs): Update output.
1085         * psymtab.c (require_partial_symbols): Update output.
1086
1087 2018-10-04  Tom Tromey  <tom@tromey.com>
1088
1089         PR cli/22234:
1090         * complaints.c: Emit \n.
1091
1092 2018-10-04  Tom Tromey  <tom@tromey.com>
1093
1094         * symfile.c (symbol_file_add_with_addrs, symbol_file_clear)
1095         (separate_debug_file_exists, find_separate_debug_file)
1096         (add_symbol_file_command, reread_symbols, allocate_symtab)
1097         (allocate_compunit_symtab): Use filtered printing, not
1098         unfiltered.
1099         * psymtab.c (require_partial_symbols, dump_psymtab)
1100         (allocate_psymtab): Use filtered printing, not unfiltered.
1101
1102 2018-10-04  Tom Tromey  <tom@tromey.com>
1103
1104         * complaints.c (complaint_internal): Correctly check complaint
1105         count.
1106
1107 2018-10-04  Tom Tromey  <tom@tromey.com>
1108
1109         * complaints.h (struct complaints): Remove declaration.
1110         * complaints.c (clear_complaints): Remove an unused variable.
1111
1112 2018-10-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1113
1114         * MAINTAINERS (Write After Approval): Add self.
1115
1116 2018-10-03  Tom Tromey  <tom@tromey.com>
1117
1118         * guile/scm-value.c (gdbscm_value_to_string): Initialize
1119         "buffer_contents".
1120         * coffread.c (coff_symtab_read): Initialize "newobj".
1121
1122 2018-10-03  Simon Marchi  <simon.marchi@polymtl.ca>
1123
1124         * dwarf2read.c (read_func_scope): Remove struct keyword in
1125         range-based for.
1126
1127 2018-10-03  Tom Tromey  <tom@tromey.com>
1128
1129         * README: Mention --enable-ubsan.
1130         * NEWS: Mention --enable-ubsan.
1131         * acinclude.m4: Include sanitize.m4.
1132         * configure: Rebuild.
1133         * configure.ac: Call AM_GDB_UBSAN.
1134         * sanitize.m4: New file.
1135
1136 2018-10-03  Tom Tromey  <tom@tromey.com>
1137
1138         * expression.h (enum exp_opcode): Use uint8_t as base type.
1139         * expprint.c (op_name): Handle invalid opcodes.
1140
1141 2018-10-03  Tom Tromey  <tom@tromey.com>
1142
1143         * parse.c (prefixify_expression): Add assert.
1144         (parse_exp_in_context_1): Throw exception if the expression is
1145         empty.
1146
1147 2018-10-03  Tom Tromey  <tom@tromey.com>
1148
1149         * dwarf2read.c (read_signed_leb128): Work in ULONGEST.
1150
1151 2018-10-03  Tom Tromey  <tom@tromey.com>
1152
1153         * c-exp.y (parse_number): Work in unsigned.  Remove casts.
1154
1155 2018-10-03  Tom Tromey  <tom@tromey.com>
1156
1157         * dwarf2read.c (read_subrange_type): Make "negative_mask"
1158         unsigned.
1159
1160 2018-10-03  Tom Tromey  <tom@tromey.com>
1161
1162         * findvar.c (extract_integer): Do work in an unsigned type.
1163
1164 2018-10-03  Tom Tromey  <tom@tromey.com>
1165
1166         * common/enum-flags.h (enum_flags::operator~): Add static assert.
1167         * symfile-add-flags.h (enum symfile_add_flag): Use unsigned as
1168         base type.
1169         * objfile-flags.h (enum objfile_flag): Use unsigned as base type.
1170         * gdbtypes.h (enum type_instance_flag_value): Use unsigned as base
1171         type.
1172         * c-lang.h (enum c_string_type_values): Use unsigned as base
1173         type.
1174         * btrace.h (enum btrace_thread_flag): Use unsigned as base type.
1175
1176 2018-10-03  Tom Tromey  <tom@tromey.com>
1177
1178         * dwarf2-frame.h (dwarf2_frame_state_reg_info)
1179         <~dwarf2_frame_state_reg_info>: Update.
1180         <dwarf2_frame_state_reg_info>: Update.
1181         <alloc_regs>: Add assertion.  Update.
1182         <reg>: Now a std::vector.
1183         <num_regs>: Remove.
1184         <swap>: Update.
1185         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
1186         (execute_cfa_program_test, dwarf2_frame_cache): Update.
1187
1188 2018-10-03  Tom Tromey  <tom@tromey.com>
1189
1190         * namespace.c (add_using_directive): Don't pass NULL to memcpy.
1191
1192 2018-10-03  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1193
1194         * tid-parse.c (tid_is_in_list): Fix wrong 'See' comment.
1195
1196 2018-10-02  Tom Tromey  <tom@tromey.com>
1197
1198         * aarch64-linux-tdep.c (aarch64_linux_sigframe_init): Use pulongest.
1199
1200 2018-10-02  John Darrington <john@darrington.wattle.id.au>
1201
1202         * NEWS: Mention changed commands.
1203         * ser-uds.c: New file.
1204         * configure.ac (SER_HARDWIRE): Add ser-uds.o.
1205         * configure: Regenerate.
1206         * Makefile.in: Add new file.
1207         * serial.c (serial_open): Check if filename is a socket
1208           and lookup the appropriate interface accordingly.
1209
1210 2018-10-01  Alan Hayward  <alan.hayward@arm.com>
1211
1212         * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_OFFSET): Add
1213         define.
1214         (AARCH64_EXTRA_MAGIC): Likewise.
1215         (AARCH64_FPSIMD_MAGIC): Likewise.
1216         (AARCH64_SVE_MAGIC): Likewise.
1217         (AARCH64_EXTRA_DATAP_OFFSET): Likewise.
1218         (AARCH64_FPSIMD_FPSR_OFFSET): Likewise.
1219         (AARCH64_FPSIMD_FPCR_OFFSET): Likewise.
1220         (AARCH64_FPSIMD_V0_OFFSET): Likewise.
1221         (AARCH64_FPSIMD_VREG_SIZE): Likewise.
1222         (AARCH64_SVE_CONTEXT_VL_OFFSET): Likewise.
1223         (AARCH64_SVE_CONTEXT_REGS_OFFSET): Likewise.
1224         (AARCH64_SVE_CONTEXT_P_REGS_OFFSET): Likewise.
1225         (AARCH64_SVE_CONTEXT_FFR_OFFSET): Likewise.
1226         (AARCH64_SVE_CONTEXT_SIZE): Likewise.
1227         (read_aarch64_ctx): Add function.
1228         (aarch64_linux_sigframe_init): Detect FP registers.
1229
1230 2018-10-01  Alan Hayward  <alan.hayward@arm.com>
1231
1232         * aarch64-tdep.c (AARCH64_Q0_REGNUM): Move to here.
1233         (AARCH64_D0_REGNUM): Likewise.
1234         (AARCH64_S0_REGNUM): Likewise.
1235         (AARCH64_H0_REGNUM): Likewise.
1236         (AARCH64_B0_REGNUM): Likewise.
1237         (AARCH64_SVE_V0_REGNUM): Likewise.
1238         * arch/aarch64.h (AARCH64_Q0_REGNUM): Move from here.
1239         (AARCH64_D0_REGNUM): Likewise.
1240         (AARCH64_S0_REGNUM): Likewise.
1241         (AARCH64_H0_REGNUM): Likewise.
1242         (AARCH64_B0_REGNUM): Likewise.
1243         (AARCH64_SVE_V0_REGNUM): Likewise.
1244
1245 2018-10-01  Gary Benson <gbenson@redhat.com>
1246
1247         * gdb_proc_service.h (gdb_prfpregset_t): Remove typedef.
1248         * proc-service.c (ps_lgetfpregs, ps_lsetfpregs): Use
1249         prfpregset_t instead of gdb_prfpregset_t.
1250         * configure.ac (PRFPREGSET_T_BROKEN): Remove check.
1251         * configure, config.in: Rebuild.
1252
1253 2018-10-01  Gary Benson <gbenson@redhat.com>
1254
1255         * common/gdb_proc_service.h: New file, factored out from...
1256         * gdb_proc_service.h: Moved common code to the above file.
1257         * Makefile.in (HFILES_NO_SRCDIR): Add the above new file.
1258
1259 2018-10-01  Gary Benson <gbenson@redhat.com>
1260
1261         * gdb_proc_service.h: Use elf_gregset_t if prgregset_t is
1262         undefined.  Use elf_fpregset_t if prfpregset_t is undefined.
1263
1264 2018-10-01  Gary Benson <gbenson@redhat.com>
1265
1266         * configure.ac: Check if sys/procfs.h defines elf_fpregset_t.
1267         (AC_CHECK_HEADERS): Check for linux/elf.h.
1268         * configure, config.in: Rebuild.
1269         * gdb_proc_service.h: Include linux/elf.h if sys/procfs.h
1270         doesn't define elf_fpregset_t.
1271
1272 2018-10-01  Gary Benson <gbenson@redhat.com>
1273
1274         * gdb_proc_service.h: Whitespace change.
1275
1276 2018-10-01  Tom Tromey  <tom@tromey.com>
1277
1278         * unittests/scoped_mmap-selftests.c: Don't check HAVE_UNISTD_H.
1279         * unittests/scoped_fd-selftests.c: Don't check HAVE_UNISTD_H.
1280         * common/scoped_fd.h: Don't check HAVE_UNISTD_H.
1281
1282 2018-10-01  Tom Tromey  <tom@tromey.com>
1283
1284         * README: Minor change.
1285
1286 2018-09-30  Pedro Alves  <palves@redhat.com>
1287
1288         * darwin-nat-info.c (darwin_debug_regions_recurse)
1289         (info_mach_exceptions_command): Remove unused local variables.
1290         * darwin-nat.c (darwin_decode_notify_message)
1291         (darwin_nat_target::resume, darwin_nat_target::mourn_inferior)
1292         (darwin_stop_inferior, darwin_setup_exceptions)
1293         (darwin_nat_target::kill, darwin_attach_pid, darwin_ptrace_him)
1294         (darwin_nat_target::attach, darwin_nat_target::detach)
1295         (darwin_read_write_inferior, darwin_read_dyld_info): Remove unused
1296         local variables.
1297         * i386-darwin-nat.c (i386_darwin_dr_set): Remove unused local
1298         variables.
1299
1300 2018-09-29  Tom Tromey  <tom@tromey.com>
1301
1302         * README: Remove some leftover text.
1303
1304 2018-09-29  Tom Tromey  <tom@tromey.com>
1305
1306         * PROBLEMS: Rewrite.
1307         * README: Update.
1308
1309 2018-09-28  John Baldwin  <jhb@FreeBSD.org>
1310
1311         * disasm-selftests.c (print_one_insn_test): Add bfd_arch_riscv to
1312         case with explicit breakpoint kind.
1313         * riscv-tdep.c (show_use_compressed_breakpoints): Remove
1314         'additional_info' and related logic.
1315         (riscv_debug_breakpoints): New variable.
1316         (riscv_breakpoint_kind_from_pc): Use the length of the existing
1317         instruction to determine the breakpoint kind.
1318         (_initialize_riscv_tdep): Add 'set/show debug riscv breakpoints'
1319         flag.  Update description of 'set/show riscv
1320         use-compressed-breakpoints' flag.
1321
1322 2018-09-28  Andrew Burgess  <andrew.burgess@embecosm.com>
1323
1324         (NEWS): Mention changes to frame related commands.
1325         * cli/cli-decode.c (add_cmd_suppress_notification): New function.
1326         (add_prefix_cmd_suppress_notification): New function.
1327         (add_com_suppress_notification): Call
1328         add_cmd_suppress_notification.
1329         * command.h (add_cmd_suppress_notification): Declare.
1330         (add_prefix_cmd_suppress_notification): Declare.
1331         * mi/mi-cmd-stack.c: Add 'safe-ctype.h' include.
1332         (parse_frame_specification): Moved from stack.c, with
1333         simplification to handle a single argument.
1334         (mi_cmd_stack_select_frame): Use parse_frame_specification, the
1335         switch to the selected frame.  Add a header comment.
1336         * stack.c: Remove 'safe-ctype.h' include.
1337         (find_frame_for_function): Add declaration.
1338         (find_frame_for_address): New function.
1339         (parse_frame_specification): Moved into mi/mi-cmd-stack.c.
1340         (frame_selection_by_function_completer): New function.
1341         (info_frame_command): Rename to...
1342         (info_frame_command_core): ...this, and update parameter types.
1343         (select_frame_command): Rename to...
1344         (select_frame_command_core): ...this, and update parameter types.
1345         (frame_command): Rename to...
1346         (frame_command_core): ...this, and update parameter types.
1347         (class frame_command_helper): New class to wrap implementations of
1348         frame related sub-commands.
1349         (frame_apply_cmd_list): New static global.
1350         (frame_cmd_list): Make static.
1351         (select_frame_cmd_list): New global for sub-commands.
1352         (info_frame_cmd_list): New global for sub-commands.
1353         (_initialize_stack): Register sub-commands for 'frame',
1354         'select-frame', and 'info frame'.  Update 'frame apply' commands
1355         to use frame_apply_cmd_list.  Move function local static
1356         frame_apply_list to file static frame_apply_cmd_list for
1357         consistency.
1358         * stack.h (select_frame_command): Delete declarationn.
1359         (select_frame_for_mi): Declare new function.
1360
1361 2018-09-26  Andrew Burgess  <andrew.burgess@embecosm.com>
1362
1363         * riscv-tdep.c (riscv_insn::decode): Decode c.lui.
1364         (riscv_scan_prologue): Split handling of AUIPC, LUI, ADD, ADDI,
1365         and NOP.
1366
1367 2018-09-26  Simon Marchi  <simon.marchi@ericsson.com>
1368
1369         * elf32-nds32.c (elf32_nds32_allocate_dynrelocs): Remove.
1370
1371 2018-09-26  Tom Tromey  <tom@tromey.com>
1372
1373         * valops.c (auto_abandon): Remove dead code.
1374
1375 2018-09-26  Tom Tromey  <tom@tromey.com>
1376
1377         * tui/tui-win.c (WIN_HEIGHT_USAGE): Remove extra ">"s.
1378
1379 2018-09-24  Tom Tromey  <tom@tromey.com>
1380
1381         * common/pathstuff.c (get_standard_cache_dir): Make
1382         "xdg_cache_home" and "home" const.
1383         * top.c (init_history): Make "tmpenv" const.
1384         * main.c (get_init_files): Make "homedir" const.
1385
1386 2018-09-23  Tom Tromey  <tom@tromey.com>
1387
1388         PR python/18852:
1389         * python/py-param.c (get_set_value): Use gdbpy_handle_exception.
1390
1391 2018-09-23  Tom Tromey  <tom@tromey.com>
1392
1393         * python/py-function.c (fnpy_call): Use gdbpy_handle_exception.
1394         * python/py-cmd.c (cmdpy_function): Use gdbpy_handle_exception.
1395         * python/python-internal.h (gdbpy_handle_exception): Declare.
1396         * python/py-utils.c (gdbpy_handle_exception): New function.
1397
1398 2018-09-23  Tom Tromey  <tom@tromey.com>
1399
1400         PR python/17284:
1401         * python/py-type.c (typy_template_argument): Check for negative
1402         argument number.
1403
1404 2018-09-23  Tom Tromey  <tom@tromey.com>
1405
1406         PR python/14062:
1407         * python/python.c (gdbpy_run_events): Do not ignore exceptions.
1408
1409 2018-09-23  Tom Tromey  <tom@tromey.com>
1410
1411         PR python/18170:
1412         * python/py-value.c (valpy_int): Allow conversion from pointer
1413         type.
1414
1415 2018-09-23  Tom Tromey  <tom@tromey.com>
1416
1417         PR python/20126:
1418         * python/py-value.c (valpy_int): Respect type sign.
1419
1420 2018-09-23  Tom Tromey  <tom@tromey.com>
1421
1422         PR python/18352;
1423         * python/py-value.c (valpy_float): Allow conversions from int or
1424         char.
1425         (valpy_int, valpy_long): Allow conversions from float.
1426
1427 2018-09-23  Tom Tromey  <tom@tromey.com>
1428
1429         * ctf.c (ctf_start): Use gdb_fopen_cloexec.
1430         * common/scoped_mmap.c (mmap_file): Use gdb_open_cloexec.
1431
1432 2018-09-23  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1433
1434         * amd64-sol2-tdep.c (amd64_sol2_sigtramp_p): Also recognize
1435         __sighndlr.
1436         * i386-sol2-tdep.c (i386_sol2_sigtramp_p): Likewise.
1437
1438 2018-08-02  Jon Turney  <jon.turney@dronecode.org.uk>
1439
1440         * windows-nat.c (windows_nat_target::wait): Remove a spurious
1441         target_terminal::ours().
1442
1443 2018-09-23  Simon Marchi  <simon.marchi@ericsson.com>
1444
1445         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): Change type
1446         of vl to ULONGEST.
1447
1448 2018-09-21  Yacov Simhony  <ysimhony@gmail.com>
1449
1450         * breakpoint.c (update_inserted_breakpoint_locations): Remove
1451         redundant condition.
1452
1453 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1454
1455         * proc-utils.h (PROC_CTL_WORD_TYPE): Remove.
1456
1457         * procfs.c: Don't check for PR_MODEL_NATIVE definition.
1458         * sparc-sol2-nat.c: Likewise.  Remove Linux, __arch64__ references.
1459         * sol-thread.c (ps_pdmodel): Don't guard definition.
1460
1461         * procfs.c: Fix formatting.
1462
1463         * procfs.c (sysset_t_alloc): Remove.
1464         (create_procinfo): Use XNEW instead of sysset_t_alloc.
1465         (procfs_debug_inferior): Likewise.
1466         (procfs_set_exec_trap): Likewise.
1467         (proc_set_traced_sysentry): Don't allocate argp dynamically.
1468         (proc_set_traced_sysexit): Likewise.
1469
1470         * procfs.c (create_procinfo): Use xsnprintf to fix ARI warning.
1471         (dead_procinfo): Likewise.
1472         (proc_warn): Likewise.
1473         (proc_error): Likewise.
1474         (proc_get_LDT_entry): Likewise.
1475         (do_attach): Likewise.
1476         (procfs_target::pid_to_str): Likewise.
1477         (iterate_over_mappings): Likewise.
1478
1479         * procfs.c (create_procinfo): Fix ARI warning.
1480         (proc_get_status): Likewise.
1481         (proc_stop_process): Likewise.
1482         (proc_run_process): Likewise.
1483         (proc_kill): Likewise.
1484         (proc_get_LDT_entry): Likewise.
1485         (procfs_find_LDT_entry): Likewise.
1486         (proc_update_threads): Likewise.
1487         (proc_iterate_over_threads): Likewise.
1488         (do_attach): Likewise.
1489         (procfs_xfer_memory): Likewise.
1490         (invalidate_cache): Likewise.
1491         (procfs_target::resume): Likewise.
1492         (procfs_init_inferior): Likewise.
1493         (procfs_set_exec_trap): Likewise.
1494         (procfs_target::thread_alive): Likewise.
1495         (procfs_target::pid_to_exec_file): Likewise.
1496         (iterate_over_mappings): Likewise.
1497         (procfs_target::make_corefile_notes): Likewise.
1498         * sol-thread.c (sol_thread_target::thread_alive): Likewise.
1499
1500         * procfs.c (procfs_find_LDT_entry): Silence ARI warning.
1501         (procfs_find_LDT_entry): Likewise.
1502         * sol-thread.c (ps_lgetLDT): Likewise.
1503
1504 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1505
1506         PR tdep/17903
1507         * procfs.c (procfs_target): Declare pid_to_exec_file.
1508         (procfs_target::pid_to_exec_file): New.
1509
1510 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1511
1512         * auxv.c (default_print_auxv_entry): Reflect AT_SUN_CAP_HW1
1513         renaming.
1514         Handle AT_SUN_EMULATOR, AT_SUN_BRANDNAME, AT_SUN_BRAND_AUX1,
1515         AT_SUN_BRAND_AUX2, AT_SUN_BRAND_AUX3, AT_SUN_CAP_HW2.
1516
1517 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1518
1519         * i386-v4-nat.c (regmap, supply_gregset, fill_gregset)
1520         (supply_fpregset, fill_fpregset): Move ...
1521         * i386-sol2-nat.c [PR_MODEL_NATIVE != PR_MODEL_LP64]: ... here.
1522         Remove HAVE_GREGSET_T, HAVE_FPREGET_T guards.
1523         Remove references to ioctl-based procfs.
1524         Include <sys/reg.h>.
1525         Remove PR_MODEL_NATIVE guards.
1526         * configure.nat <sol2, i386> (NATDEPFILES): Remove i386-v4-nat.o.
1527         * Makefile.in (ALLDEPFILES): Remove i386-v4-nat.c.
1528
1529 2018-09-19  Xavier Roirand  <roirand@adacore.com>
1530
1531         PR gdb/20981:
1532         * solib-darwin.c (darwin_get_dyld_bfd): New function.
1533         (darwin_solib_get_all_image_info_addr_at_init): Update call.
1534         (darwin_solib_create_inferior_hook): Handle unrelocated dyld.
1535
1536 2018-09-19  John Baldwin  <jhb@FreeBSD.org>
1537
1538         * fbsd-tdep.c (fbsd_print_sockaddr_in): Style fix.
1539         (fbsd_print_sockaddr_in6): Likewise.
1540
1541 2018-09-19  Richard Bunt  <richard.bunt@arm.com>
1542             Chris January  <chris.january@arm.com>
1543
1544         * eval.c (skip_undetermined_arglist): Skip argument list helper.
1545         (evaluate_subexp_standard): Return a dummy type when
1546         honoring EVAL_SKIP in OP_VAR_VALUE and handle skipping in the
1547         OP_F77_UNDETERMINED_ARGLIST case.
1548         * expression.h (enum noside): Update comment.
1549
1550 2018-09-19  George Vasick <george.vasick@oracle.com>
1551
1552         * solib-svr4.c (svr4_same_1): Also handle amd64 ld.so.1.
1553
1554 2018-09-19  Stefan Teleman <stefan.teleman@oracle.com>
1555             April Chin <april.chin@oracle.com>
1556             Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1557
1558         * procfs.c (MAX_PROC_NAME_SIZE): Allow for 6-digit PID_MAX and
1559         uint_t lwpid_t.
1560         (create_procinfo): Print pids in /proc without leading zeros.
1561
1562 2018-09-18  Sandra Loosemore  <sandra@codesourcery.com>
1563
1564         * nios2-tdep.c (nios2_gcc_target_options): New.
1565         (nios2_gdb_arch_init): Install new hook.
1566
1567 2018-09-18  Simon Marchi  <simon.marchi@ericsson.com>
1568
1569         * patches/0001-Fix-PR-gdb-23558-Use-system-s-getcwd-when-cross-comp.patch:
1570         New file.
1571         * update-gnulib.sh: Apply patch.
1572         * configure: Re-generate.
1573
1574 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1575
1576         * infcmd.c (_initialize_infcmd): Remove "running" from "info proc"
1577         description.  Make "info proc" command descriptions more
1578         consistent.
1579
1580 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1581
1582         * NEWS: Mention 'info proc files' command.
1583
1584 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1585
1586         * fbsd-nat.c (fbsd_nat_target::info_proc): List open file
1587         descriptors for IP_FILES and IP_ALL.
1588
1589 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1590
1591         * fbsd-tdep.c (KF_FLAGS, KF_OFFSET, KF_VNODE_TYPE, KF_SOCK_DOMAIN)
1592         (KF_SOCK_TYPE, KF_SOCK_PROTOCOL, KF_SA_LOCAL, KF_SA_PEER)
1593         (KINFO_FILE_TYPE_SOCKET, KINFO_FILE_TYPE_PIPE)
1594         (KINFO_FILE_TYPE_FIFO, KINFO_FILE_TYPE_KQUEUE)
1595         (KINFO_FILE_TYPE_CRYPTO, KINFO_FILE_TYPE_MQUEUE)
1596         (KINFO_FILE_TYPE_SHM, KINFO_FILE_TYPE_SEM, KINFO_FILE_TYPE_PTS)
1597         (KINFO_FILE_TYPE_PROCDESC, KINFO_FILE_FD_TYPE_ROOT)
1598         (KINFO_FILE_FD_TYPE_JAIL, KINFO_FILE_FD_TYPE_TRACE)
1599         (KINFO_FILE_FD_TYPE_CTTY, KINFO_FILE_FLAG_READ)
1600         (KINFO_FILE_FLAG_WRITE, KINFO_FILE_FLAG_APPEND)
1601         (KINFO_FILE_FLAG_ASYNC, KINFO_FILE_FLAG_FSYNC)
1602         (KINFO_FILE_FLAG_NONBLOCK, KINFO_FILE_FLAG_DIRECT)
1603         (KINFO_FILE_FLAG_HASLOCK, KINFO_FILE_FLAG_EXEC)
1604         (KINFO_FILE_VTYPE_VREG, KINFO_FILE_VTYPE_VDIR)
1605         (KINFO_FILE_VTYPE_VCHR, KINFO_FILE_VTYPE_VLNK)
1606         (KINFO_FILE_VTYPE_VSOCK, KINFO_FILE_VTYPE_VFIFO, FBSD_AF_UNIX)
1607         (FBSD_AF_INET, FBSD_AF_INET6, FBSD_SOCK_STREAM, FBSD_SOCK_DGRAM)
1608         (FBSD_SOCK_SEQPACKET, FBSD_IPPROTO_ICMP, FBSD_IPPROTO_TCP)
1609         (FBSD_IPPROTO_UDP, FBSD_IPPROTO_SCTP): New defines.
1610         (struct fbsd_sockaddr_in, struct fbsd_sockaddr_in6)
1611         (struct fbsd_sockaddr_un): New types.
1612         (fbsd_file_fd, fbsd_file_type, fbsd_file_flags, fbsd_ipproto)
1613         (fbsd_print_sockaddr_in, fbsd_print_sockaddr_in6)
1614         (fbsd_info_proc_files_header, fbsd_info_proc_files_entry)
1615         (fbsd_core_info_proc_files): New functions.
1616         (fbsd_core_info_proc): List open file descriptors for IP_FILES and
1617         IP_ALL.
1618         * fbsd-tdep.h (fbsd_info_proc_files_header)
1619         (fbsd_info_proc_files_entry): New.
1620
1621 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1622
1623         * defs.h (enum info_proc_what) [IP_FILES]: New value.
1624         * infcmd.c (info_proc_cmd_files): New function.
1625         (_initialize_infcmd): Register 'info proc files' command.
1626
1627 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1628
1629         * gnulib/aclocal-m4-deps.mk: Re-generate.
1630         * gnulib/aclocal.m4: Re-generate.
1631         * gnulib/config.in: Re-generate.
1632         * gnulib/configure: Re-generate.
1633         * gnulib/import/Makefile.am: Re-generate.
1634         * gnulib/import/Makefile.in: Re-generate.
1635         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
1636         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1637         * gnulib/import/arpa_inet.in.h: New file.
1638         * gnulib/import/inet_ntop.c: New file.
1639         * gnulib/import/m4/arpa_inet_h.m4: New file.
1640         * gnulib/import/m4/inet_ntop.m4: New file.
1641         * gnulib/import/m4/netinet_in_h.m4: New file.
1642         * gnulib/import/m4/socklen.m4: New file.
1643         * gnulib/import/m4/sockpfaf.m4: New file.
1644         * gnulib/import/m4/stdalign.m4: New file.
1645         * gnulib/import/m4/sys_uio_h.m4: New file.
1646         * gnulib/import/netinet_in.in.h: New file.
1647         * gnulib/import/stdalign.in.h: New file.
1648         * gnulib/import/sys_socket.c: New file.
1649         * gnulib/import/sys_socket.in.h: New file.
1650         * gnulib/import/sys_uio.in.h: New file.
1651         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add inet_ntop
1652         module.
1653
1654 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1655
1656         * gnulib/aclocal-m4-deps.mk: New file.
1657         * gnulib/update-gnulib.sh: Generate "aclocal-m4-deps.mk"
1658         deterministically.
1659
1660 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1661
1662         * fbsd-tdep.c (fbsd_core_vnode_path): Use KF_PATH instead of
1663         KVE_PATH.
1664
1665 2018-09-18  Tom Tromey  <tom@tromey.com>
1666
1667         * compile/compile-object-load.c (struct
1668         link_hash_table_cleanup_data): Add constructor and destructor.
1669         Use DISABLE_COPY_AND_ASSIGN.
1670         (~link_hash_table_cleanup_data): Rename from
1671         link_hash_table_free.  Now a destructor.
1672         (copy_sections): Use gdb::unique_xmalloc_ptr.  Remove cleanups.
1673
1674 2018-09-18  Tom Tromey  <tom@tromey.com>
1675
1676         * compile/compile-object-run.c (do_module_cleanup): Use delete.
1677         * compile/compile-object-load.c (struct munmap_list): Move to
1678         header file.
1679         (munmap_list::add): Rename from munmap_list_add; rewrite.
1680         (munmap_list::~munmap_list): Rename from munmap_list_free.
1681         (munmap_listp_free_cleanup): Remove.
1682         (compile_object_load): Update.
1683         * compile/compile-object-load.h (struct munmap_list): Move from
1684         compile-object-load.c.  Rewrite.
1685
1686 2018-09-18  Alan Hayward  <alan.hayward@arm.com>
1687
1688         * aarch64-tdep.c (pass_in_v): Use register size.
1689         (aarch64_extract_return_value): Likewise.
1690         (aarch64_store_return_value): Likewise.
1691
1692 2018-09-18  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1693
1694         * utils.c (dump_core) [HAVE_SETRLIMIT]: Cast RLIM_INFINITY to
1695         rlim_t.
1696
1697 2018-09-17  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1698
1699         * python/lib/gdb/command/frame_filters.py (EnableFrameFilter):
1700         Fix short help line.
1701
1702 2018-09-17  Tom Tromey  <tom@tromey.com>
1703
1704         PR python/20445:
1705         * configure: Rebuild.
1706         * configure.ac: Conditionally use -DNDEBUG for Python.
1707
1708 2018-09-17  Tom Tromey  <tom@tromey.com>
1709
1710         * configure: Rebuild.
1711         * configure.ac: Use gmp as a library dependency when checking for
1712         mpfr.
1713
1714 2018-09-17  Pedro Alves  <palves@redhat.com>
1715
1716         * python/py-inferior.c (find_inferior_object): Delete.
1717
1718 2018-09-17  Simon Marchi  <simon.marchi@ericsson.com>
1719
1720         * compile/compile-cplus-types.c
1721         (compile_cplus_instance::enter_scope): Don't use new_scope after
1722         std::move.
1723
1724 2018-09-17  Tom Tromey  <tom@tromey.com>
1725
1726         * common/pathstuff.c (get_standard_cache_dir): Use
1727         ~/Library/Caches on macOS.
1728         * common/pathstuff.h (get_standard_cache_dir): Update comment.
1729
1730 2018-09-17  Simon Marchi  <simon.marchi@polymtl.ca>
1731
1732         PR python/23669
1733         * breakpoint.c (commands_cmd_element): New.
1734         (_initialize_breakpoint): Assign commands_cmd_element.
1735         * breakpoint.h (commands_cmd_element): New.
1736         * cli/cli-script.c (while_cmd_element, if_command,
1737         define_cmd_element): New.
1738         (command_name_equals): Remove.
1739         (process_next_line): Compare commands by pointer, not by name.
1740         (_initialize_cli_script): Assign the various cmd_list_element
1741         variables.
1742         * compile/compile.c (compile_cmd_element): New.
1743         (_initialize_compile): Assign compile_cmd_element.
1744         * compile/compile.h (compile_cmd_element): New.
1745         * guile/guile.c (guile_cmd_element): New.
1746         (install_gdb_commands): Assign guile_cmd_element.
1747         * guile/guile.h (guile_cmd_element): New.
1748         * python/python.c (python_cmd_element): New.
1749         (_initialize_python): Assign python_cmd_element.
1750         * python/python.h (python_cmd_element): New.
1751         * tracepoint.c (while_stepping_cmd_element): New.
1752         (_initialize_tracepoint): Assign while_stepping_cmd_element.
1753         * tracepoint.h (while_stepping_cmd_element): New.
1754
1755 2018-09-17  Tom Tromey  <tom@tromey.com>
1756
1757         * infrun.c (save_infcall_suspend_state): Return
1758         infcall_suspend_state_up.
1759         (save_infcall_control_state): Return infcall_control_state_up.
1760         * inferior.h (save_infcall_suspend_state)
1761         (save_infcall_control_state): Declare later.  Return unique
1762         pointers.
1763
1764 2018-09-17  Tom Tromey  <tom@tromey.com>
1765
1766         * infrun.c (struct stop_context): Declare constructor,
1767         destructor, "changed" method.
1768         (stop_context::stop_context): Rename from save_stop_context.
1769         (stop_context::~stop_context): Rename from
1770         release_stop_context_cleanup.
1771         (normal_stop): Update.
1772         (stop_context::changed): Rename from stop_context_changed.  Return
1773         bool.
1774
1775 2018-09-17  Tom Tromey  <tom@tromey.com>
1776
1777         * inferior.h (struct infcall_suspend_state_deleter): New.
1778         (infcall_suspend_state_up): New typedef.
1779         (struct infcall_control_state_deleter): New.
1780         (infcall_control_state_up): New typedef.
1781         (make_cleanup_restore_infcall_suspend_state)
1782         (make_cleanup_restore_infcall_control_state): Don't declare.
1783         * infcall.c (call_function_by_hand_dummy): Update.
1784         * infrun.c (do_restore_infcall_suspend_state_cleanup)
1785         (make_cleanup_restore_infcall_suspend_state): Remove.
1786         (do_restore_infcall_control_state_cleanup)
1787         (make_cleanup_restore_infcall_control_state): Remove.
1788
1789 2018-09-17  Tom Tromey  <tom@tromey.com>
1790
1791         * gdbthread.h (struct thread_control_state): Add initializer.
1792         (class thread_info) <control>: Remove initializer.
1793         * inferior.h (struct inferior_control_state): Add initializer.
1794         (class inferior) <control>: Remove initializer.
1795         (exit_inferior_1): Update.
1796         * infrun.c (struct infcall_control_state): Add constructors.
1797         (save_infcall_control_state): Use new.
1798         (restore_infcall_control_state, discard_infcall_control_state):
1799         Use delete.
1800
1801 2018-09-17  Tom Tromey  <tom@tromey.com>
1802
1803         * infrun.c (struct infcall_suspend_state) <registers>: Now a
1804         unique_ptr.
1805         <siginfo_data>: Now a unique_xmalloc_ptr.
1806         (save_infcall_suspend_state, restore_infcall_suspend_state)
1807         (discard_infcall_suspend_state)
1808         (get_infcall_suspend_state_regcache): Update.
1809
1810 2018-09-17  Tom Tromey  <tom@tromey.com>
1811
1812         * gdbthread.h (struct thread_suspend_state): Add initializers.
1813         (class thread_info) <suspend>: Remove initializer.
1814         * infrun.c (struct infcall_suspend_state): Add initializers.
1815         (save_infcall_suspend_state): Use new.
1816         (discard_infcall_suspend_state): Use delete.
1817
1818 2018-09-16  Tom Tromey  <tom@tromey.com>
1819
1820         * python/python-internal.h (CPYCHECKER_STEALS_REFERENCE_TO_ARG):
1821         Remove.
1822         * python/py-varobj.c (py_varobj_iter_ctor): Change pyiter to
1823         rvalue reference.  Remove CPYCHECKER_STEALS_REFERENCE_TO_ARG.
1824         (py_varobj_iter_new): Likewise.
1825         (py_varobj_get_iterator): Use gdbpy_ref.
1826
1827 2018-09-16  Tom Tromey  <tom@tromey.com>
1828
1829         * python/py-threadevent.c (py_get_event_thread): Simplify.
1830         * python/py-inferior.c (infpy_thread_from_thread_handle):
1831         Return immediately after calling thread_to_thread_object.  Use
1832         Py_RETURN_NONE.
1833         (thread_to_thread_object): Set the exception on a NULL return.
1834
1835 2018-09-16  Simon Marchi  <simon.marchi@polymtl.ca>
1836
1837         * Makefile.in (LIBGDB_OBS): Sort COMMON_OBS.
1838
1839 2018-09-16  Tom Tromey  <tom@tromey.com>
1840
1841         * python/python-internal.h (CPYCHECKER_RETURNS_BORROWED_REF):
1842         Remove.
1843
1844 2018-09-16  Tom Tromey  <tom@tromey.com>
1845
1846         * python/python-internal.h (thread_to_thread_object): Change
1847         return type.
1848         * python/py-inferior.c (thread_to_thread_object): Return a new
1849         reference.
1850         (infpy_thread_from_thread_handle): Update.
1851         * python/py-infthread.c (gdbpy_selected_thread): Update.
1852         * python/py-stopevent.c (create_stop_event_object): Update.
1853         * python/py-threadevent.c (py_get_event_thread): Return a new
1854         reference.
1855         (py_get_event_thread): Update.
1856         * python/py-event.h (py_get_event_thread): Change return type.
1857         * python/py-continueevent.c (create_continue_event_object):
1858         Update.
1859
1860 2018-09-16  Tom Tromey  <tom@tromey.com>
1861
1862         * python/py-progspace.c (pspy_get_objfiles): Update.
1863         * python/python-internal.h (objfile_to_objfile_object): Change
1864         return type.
1865         * python/py-newobjfileevent.c (create_new_objfile_event_object):
1866         Update.
1867         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
1868         Update.
1869         * python/python.c (gdbpy_get_current_objfile): Update.
1870         (gdbpy_objfiles): Update.
1871         * python/py-objfile.c (objfpy_get_owner, gdbpy_lookup_objfile):
1872         Update.
1873         (objfile_to_objfile_object): Return a new reference.
1874         * python/py-symtab.c (stpy_get_objfile): Update.
1875         * python/py-prettyprint.c (find_pretty_printer_from_objfiles):
1876         Update.
1877
1878 2018-09-16  Tom Tromey  <tom@tromey.com>
1879
1880         * python/py-inferior.c (infpy_get_progspace): Update.
1881         * python/python-internal.h (pspace_to_pspace_object): Change
1882         return type.
1883         * python/py-newobjfileevent.c
1884         (create_clear_objfiles_event_object): Update.
1885         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
1886         Update.
1887         * python/python.c (gdbpy_get_current_progspace): Update.
1888         (gdbpy_progspaces): Update.
1889         * python/py-progspace.c (pspace_to_pspace_object): Return a new
1890         reference.
1891         * python/py-objfile.c (objfpy_get_progspace): Update.
1892         * python/py-prettyprint.c (find_pretty_printer_from_progspace):
1893         Update.
1894
1895 2018-09-16  Tom Tromey  <tom@tromey.com>
1896
1897         * python/lib/gdb/__init__.py (current_progspace, objfiles)
1898         (solib_name, block_for_pc, find_pc_line): New functions.
1899         (execute_unwinders): Update.
1900         * python/py-block.c (gdbpy_block_for_pc): Remove.
1901         * python/py-inferior.c (infpy_get_progspace): New function.
1902         (inferior_object_getset) <progspace>: Add.
1903         * python/py-progspace.c (pspy_objfiles): Rewrite.
1904         (pspy_solib_name, pspy_block_for_pc)
1905         (pspy_find_pc_line, pspy_is_valid): New functions.
1906         (progspace_object_methods): Add entries for solib_name,
1907         block_for_pc, find_pc_line, is_valid.
1908         * python/python-internal.h (gdbpy_block_for_pc)
1909         (build_objfiles_list): Don't declare.
1910         * python/python.c: Don't include solib.h.
1911         (gdbpy_solib_name, gdbpy_find_pc_line)
1912         (gdbpy_get_current_progspace, build_objfiles_list)
1913         (gdbpy_objfiles): Remove.
1914         (GdbMethods) <current_progspace, objfiles, block_for_pc,
1915         solib_name, find_pc_line>: Remove entries.
1916
1917 2018-09-16  Tom Tromey  <tom@tromey.com>
1918
1919         * top.c (new_ui_command): Use GNU style for metasyntactic
1920         variables.
1921         * breakpoint.c (stopat_command): Use GNU style for metasyntactic
1922         variables.
1923         * maint.c (maintenance_translate_address): Remove "<>" around
1924         text.
1925         * interps.c (interpreter_exec_cmd): Use GNU style for
1926         metasyntactic variables.
1927         * nto-procfs.c (nto_procfs_target_info): Use GNU style for
1928         metasyntactic variables.
1929         * tracepoint.c (tfind_range_command): Use GNU style for
1930         metasyntactic variables.
1931         (tfind_outside_command): Likewise.
1932         (_initialize_tracepoint): Likewise.
1933         * remote.c (extended_remote_target::create_inferior): Use GNU
1934         style for metasyntactic variables.
1935         * sparc64-tdep.c (adi_examine_command): Use GNU style for
1936         metasyntactic variables.
1937         (adi_assign_command): Likewise.
1938
1939 2018-09-16  Tom Tromey  <tom@tromey.com>
1940
1941         * disasm.c (show_disassembler_options_sfunc): Use GNU style for
1942         metasyntactic variables.  Print message if no disassembler options
1943         are available.
1944
1945 2018-09-15  Tom Tromey  <tom@tromey.com>
1946
1947         * infcmd.c (get_inferior_args): Return const char *.
1948         * inferior.h (get_inferior_args): Return type now const.
1949         * linux-tdep.c (linux_fill_prpsinfo): Update.
1950         * procfs.c (procfs_target::make_corefile_notes): Update.
1951
1952 2018-09-07  Tom Tromey  <tom@tromey.com>
1953
1954         * python/python.c (execute_gdb_command): Call bpstat_do_actions
1955         inside the TRY.
1956
1957 2018-09-14  Sandra Loosemore  <sandra@codesourcery.com>
1958
1959         * nios2-tdep.c (nios2_type_align): New.
1960         (nios2_gdb_arch_init): Install type_align hook.
1961
1962 2018-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
1963
1964         * eval.c (fake_method::fake_method): Call xzalloc directly for a
1965         type that is neither object file owned, nor gdbarch owned.
1966         * gdbtypes.c (get_type_gdbarch): Add an assert that returned
1967         gdbarch is non-NULL.
1968         (alloc_type_instance): Allocate non-objfile owned types on the
1969         gdbarch obstack.
1970         (copy_type_recursive): Allocate TYPE_FIELDS and TYPE_RANGE_DATA
1971         using TYPE_ALLOC to ensure memory is allocated on the correct
1972         obstack.
1973         * gdbtypes.h (TYPE_ALLOC): Allocate space on either the objfile
1974         obstack, or the gdbarch obstack.
1975         (TYPE_ZALLOC): Rewrite using TYPE_ALLOC.
1976
1977 2018-09-14  Tom Tromey  <tom@tromey.com>
1978
1979         * infcall.c (call_function_by_hand_dummy): Remove unnecessary
1980         block.
1981
1982 2018-09-14  Tom Tromey  <tom@tromey.com>
1983
1984         * nat/fork-inferior.c (get_startup_shell): Remove "static".
1985
1986 2018-09-13  Tom Tromey  <tom@tromey.com>
1987
1988         * python/py-inferior.c (infpy_thread_from_thread_handle): Now
1989         static.
1990
1991 2018-09-13  Tom Tromey  <tom@tromey.com>
1992
1993         * exec.c (try_open_exec_file): Use std::string.
1994
1995 2018-09-13  Tom Tromey  <tom@tromey.com>
1996
1997         * utils.h (gdb_bfd_errmsg): Return std::string.
1998         * exec.c (exec_file_attach): Update.
1999         * compile/compile-object-load.c (compile_object_load): Update.
2000         * utils.c (gdb_bfd_errmsg): Return std::string.
2001
2002 2018-09-13  Tom Tromey  <tom@tromey.com>
2003
2004         * procfs.c (struct procinfo_deleter): New.
2005         (procinfo_up): New typedef.
2006         (do_destroy_procinfo_cleanup): Remove.
2007         (procfs_target::info_proc): Use procinfo_up.  Remove cleanups.
2008
2009 2018-09-13  Tom Tromey  <tom@tromey.com>
2010
2011         * source.c (add_path): Use gdb::unique_xmalloc_ptr.
2012
2013 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
2014 2018-09-13  Tom Tromey  <tom@tromey.com>
2015
2016         * python/py-progspace.c (PSPY_REQUIRE_VALID): New macro.
2017         (pspy_get_objfiles): New function.
2018         (progspace_object_methods): New.
2019         (pspace_object_type): Add tp_methods callback.
2020         * python/python-internal.h (build_objfiles_list): New
2021         declaration.
2022         * python/python.c (build_objfiles_list): New function.
2023         (gdbpy_objfiles): Implement using build_objfiles_list.
2024         * NEWS: Mention the Progspace.objfiles method.
2025
2026 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
2027
2028         * python/py-inferior.c (infpy_get_progspace): New function.
2029         (inferior_object_getset): Add progspace property.
2030         * NEWS: Mention the new property.
2031
2032 2018-09-13  Tom Tromey  <tom@tromey.com>
2033
2034         PR rust/23650:
2035         * rust-lang.c (rust_evaluate_subexp): Use field name, not "foo".
2036
2037 2018-09-13  Tom Tromey  <tom@tromey.com>
2038
2039         PR rust/23626:
2040         * rust-lang.c (rust_enum_variant): Now static.
2041         (rust_empty_enum_p): New function.
2042         (rust_print_enum, rust_evaluate_subexp, rust_print_struct_def):
2043         Handle empty enum.
2044
2045 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
2046
2047         * python/py-inferior.c (infpy_repr): New.
2048         (inferior_object_type): Register infpy_repr.
2049         * python/py-objfile.c (objfpy_repr): New.
2050         (objfile_object_type): Register objfpy_repr.
2051
2052 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
2053
2054         * fbsd-nat.c (fbsd_nat_target::info_proc): Remove unused variable.
2055
2056 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
2057
2058         * aarch64-fbsd-tdep.h (AARCH64_FBSD_SIZEOF_GREGSET): Fix comment
2059         typo.
2060
2061 2018-09-12  Sergio Durigan Junior  <sergiodj@redhat.com>
2062
2063         * common/common-utils.c: Don't include '<sys/stat.h>'.
2064         (is_regular_file): Move to...
2065         * common/filestuff.c (is_regular_file): ... here.
2066         * common/common-utils.h (is_regular_file): Move to...
2067         * common/filestuff.h (is_regular_file): ... here.
2068
2069 2018-09-12  Simon Marchi  <simon.marchi@ericsson.com>
2070
2071         * skip.c (debug_skip): New variable.
2072         (skiplist_entry::do_skip_file_p): Add debug output.
2073         (skiplist_entry::do_skip_gfile_p): Likewise.
2074         (skiplist_entry::skip_function_p): Likewise.
2075         (_initialize_step_skip): Create debug command.
2076         * NEWS: Mention set/show debug skip.
2077
2078 2018-09-11  Xavier Roirand  <roirand@adacore.com>
2079
2080         * darwin-nat.c (should_disable_startup_with_shell):
2081         New function.
2082         (darwin_nat_target::create_inferior): Add call.
2083
2084 2018-09-11  Xavier Roirand  <roirand@adacore.com>
2085
2086         * darwin-nat.h (struct darwin_thread_info) <gdb_port,
2087         inf_port, msg_state>: Initialize.
2088         (struct darwin_thread_info) <signaled, single_step>: Change
2089         type and initialize.
2090         (struct darwin_thread_info) <event>: Initialize.
2091
2092 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
2093
2094         PR gdb/23555
2095         PR gdb/23558
2096         * gnulib/import/m4/getcwd-path-max.m4: Add cross-compilation
2097         guesses.
2098
2099 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
2100
2101         Revert:
2102         2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
2103
2104         PR gdb/23555
2105         PR gdb/23558
2106         * gnulib/aclocal.m4: Regenerate.
2107         * gnulib/config.in: Regenerate.
2108         * gnulib/configure: Regenerate.
2109         * gnulib/import/Makefile.am: Update.
2110         * gnulib/import/Makefile.in: Update.
2111         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
2112         * gnulib/import/_Noreturn.h: ... this.
2113         * gnulib/import/alloca.in.h: Update.
2114         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
2115         * gnulib/import/arg-nonnull.h: ... this.
2116         * gnulib/import/assure.h: Update.
2117         * gnulib/import/at-func.c: Update.
2118         * gnulib/import/basename-lgpl.c: Update.
2119         * gnulib/import/extra/snippet/c++defs.h: Rename to...
2120         * gnulib/import/c++defs.h: ... this.
2121         * gnulib/import/canonicalize-lgpl.c: Update.
2122         * gnulib/import/cdefs.h: Update.
2123         * gnulib/import/chdir-long.c: Update.
2124         * gnulib/import/chdir-long.h: Update.
2125         * gnulib/import/cloexec.c: Update.
2126         * gnulib/import/cloexec.h: Update.
2127         * gnulib/import/close.c: Update.
2128         * gnulib/import/closedir.c: Update.
2129         * gnulib/import/config.charset: Update.
2130         * gnulib/import/dirent-private.h: Update.
2131         * gnulib/import/dirent.in.h: Update.
2132         * gnulib/import/dirfd.c: Update.
2133         * gnulib/import/dirname-lgpl.c: Update.
2134         * gnulib/import/dirname.h: Update.
2135         * gnulib/import/dosname.h: Update.
2136         * gnulib/import/dup-safer-flag.c: Update.
2137         * gnulib/import/dup-safer.c: Update.
2138         * gnulib/import/dup.c: Update.
2139         * gnulib/import/dup2.c: Update.
2140         * gnulib/import/errno.in.h: Update.
2141         * gnulib/import/error.c: Update.
2142         * gnulib/import/error.h: Update.
2143         * gnulib/import/exitfail.c: Update.
2144         * gnulib/import/exitfail.h: Update.
2145         * gnulib/import/extra/update-copyright: Update.
2146         * gnulib/import/fchdir.c: Update.
2147         * gnulib/import/fcntl.c: Update.
2148         * gnulib/import/fcntl.in.h: Update.
2149         * gnulib/import/fd-hook.c: Update.
2150         * gnulib/import/fd-hook.h: Update.
2151         * gnulib/import/fd-safer-flag.c: Update.
2152         * gnulib/import/fd-safer.c: Update.
2153         * gnulib/import/fdopendir.c: Update.
2154         * gnulib/import/filename.h: Update.
2155         * gnulib/import/filenamecat-lgpl.c: Update.
2156         * gnulib/import/filenamecat.h: Update.
2157         * gnulib/import/flexmember.h: Update.
2158         * gnulib/import/float+.h: Update.
2159         * gnulib/import/float.c: Update.
2160         * gnulib/import/float.in.h: Update.
2161         * gnulib/import/fnmatch.c: Update.
2162         * gnulib/import/fnmatch.in.h: Update.
2163         * gnulib/import/fnmatch_loop.c: Update.
2164         * gnulib/import/fpucw.h: Update.
2165         * gnulib/import/frexp.c: Update.
2166         * gnulib/import/frexpl.c: Update.
2167         * gnulib/import/fstat.c: Update.
2168         * gnulib/import/fstatat.c: Update.
2169         * gnulib/import/getcwd-lgpl.c: Update.
2170         * gnulib/import/getcwd.c: Update.
2171         * gnulib/import/getdtablesize.c: Update.
2172         * gnulib/import/getlogin_r.c: Update.
2173         * gnulib/import/getprogname.c: Update.
2174         * gnulib/import/getprogname.h: Update.
2175         * gnulib/import/gettext.h: Update.
2176         * gnulib/import/gettimeofday.c: Update.
2177         * gnulib/import/glob-libc.h: Update.
2178         * gnulib/import/glob.c: Update.
2179         * gnulib/import/glob.in.h: Update.
2180         * gnulib/import/glob_internal.h: Update.
2181         * gnulib/import/glob_pattern_p.c: Update.
2182         * gnulib/import/globfree.c: Update.
2183         * gnulib/import/hard-locale.c: Update.
2184         * gnulib/import/hard-locale.h: Update.
2185         * gnulib/import/intprops.h: Update.
2186         * gnulib/import/inttypes.in.h: Update.
2187         * gnulib/import/isnan.c: Update.
2188         * gnulib/import/isnand-nolibm.h: Update.
2189         * gnulib/import/isnand.c: Update.
2190         * gnulib/import/isnanl-nolibm.h: Update.
2191         * gnulib/import/isnanl.c: Update.
2192         * gnulib/import/itold.c: Update.
2193         * gnulib/import/libc-config.h: Update.
2194         * gnulib/import/limits.in.h: Update.
2195         * gnulib/import/localcharset.c: Update.
2196         * gnulib/import/localcharset.h: Update.
2197         * gnulib/import/localtime-buffer.c: Update.
2198         * gnulib/import/localtime-buffer.h: Update.
2199         * gnulib/import/lstat.c: Update.
2200         * gnulib/import/m4/00gnulib.m4: Update.
2201         * gnulib/import/m4/__inline.m4: Update.
2202         * gnulib/import/m4/absolute-header.m4: Update.
2203         * gnulib/import/m4/alloca.m4: Update.
2204         * gnulib/import/m4/builtin-expect.m4: Update.
2205         * gnulib/import/m4/canonicalize.m4: Update.
2206         * gnulib/import/m4/chdir-long.m4: Update.
2207         * gnulib/import/m4/close.m4: Update.
2208         * gnulib/import/m4/closedir.m4: Update.
2209         * gnulib/import/m4/configmake.m4: Update.
2210         * gnulib/import/m4/d-ino.m4: Update.
2211         * gnulib/import/m4/d-type.m4: Update.
2212         * gnulib/import/m4/dirent_h.m4: Update.
2213         * gnulib/import/m4/dirfd.m4: Update.
2214         * gnulib/import/m4/dirname.m4: Update.
2215         * gnulib/import/m4/double-slash-root.m4: Update.
2216         * gnulib/import/m4/dup.m4: Update.
2217         * gnulib/import/m4/dup2.m4: Update.
2218         * gnulib/import/m4/eealloc.m4: Update.
2219         * gnulib/import/m4/environ.m4: Update.
2220         * gnulib/import/m4/errno_h.m4: Update.
2221         * gnulib/import/m4/error.m4: Update.
2222         * gnulib/import/m4/exponentd.m4: Update.
2223         * gnulib/import/m4/exponentl.m4: Update.
2224         * gnulib/import/m4/extensions.m4: Update.
2225         * gnulib/import/m4/extern-inline.m4: Update.
2226         * gnulib/import/m4/fchdir.m4: Update.
2227         * gnulib/import/m4/fcntl-o.m4: Update.
2228         * gnulib/import/m4/fcntl.m4: Update.
2229         * gnulib/import/m4/fcntl_h.m4: Update.
2230         * gnulib/import/m4/fdopendir.m4: Update.
2231         * gnulib/import/m4/filenamecat.m4: Update.
2232         * gnulib/import/m4/flexmember.m4: Update.
2233         * gnulib/import/m4/float_h.m4: Update.
2234         * gnulib/import/m4/fnmatch.m4: Update.
2235         * gnulib/import/m4/fnmatch_h.m4: Update.
2236         * gnulib/import/m4/fpieee.m4: Update.
2237         * gnulib/import/m4/frexp.m4: Update.
2238         * gnulib/import/m4/frexpl.m4: Update.
2239         * gnulib/import/m4/fstat.m4: Update.
2240         * gnulib/import/m4/fstatat.m4: Update.
2241         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
2242         * gnulib/import/m4/getcwd-path-max.m4: Update.
2243         * gnulib/import/m4/getcwd.m4: Update.
2244         * gnulib/import/m4/getdtablesize.m4: Update.
2245         * gnulib/import/m4/getlogin.m4: Update.
2246         * gnulib/import/m4/getlogin_r.m4: Update.
2247         * gnulib/import/m4/getpagesize.m4: Update.
2248         * gnulib/import/m4/getprogname.m4: Update.
2249         * gnulib/import/m4/gettimeofday.m4: Update.
2250         * gnulib/import/m4/glibc21.m4: Update.
2251         * gnulib/import/m4/glob.m4: Update.
2252         * gnulib/import/m4/glob_h.m4: Update.
2253         * gnulib/import/m4/gnulib-cache.m4: Update.
2254         * gnulib/import/m4/gnulib-common.m4: Update.
2255         * gnulib/import/m4/gnulib-comp.m4: Update.
2256         * gnulib/import/m4/gnulib-tool.m4: Update.
2257         * gnulib/import/m4/hard-locale.m4: Update.
2258         * gnulib/import/m4/include_next.m4: Update.
2259         * gnulib/import/m4/inttypes-pri.m4: Update.
2260         * gnulib/import/m4/inttypes.m4: Update.
2261         * gnulib/import/m4/isnand.m4: Update.
2262         * gnulib/import/m4/isnanl.m4: Update.
2263         * gnulib/import/m4/largefile.m4: Update.
2264         * gnulib/import/m4/limits-h.m4: Update.
2265         * gnulib/import/m4/localcharset.m4: Update.
2266         * gnulib/import/m4/locale-fr.m4: Update.
2267         * gnulib/import/m4/locale-ja.m4: Update.
2268         * gnulib/import/m4/locale-zh.m4: Update.
2269         * gnulib/import/m4/localtime-buffer.m4: Update.
2270         * gnulib/import/m4/longlong.m4: Update.
2271         * gnulib/import/m4/lstat.m4: Update.
2272         * gnulib/import/m4/malloc.m4: Update.
2273         * gnulib/import/m4/malloca.m4: Update.
2274         * gnulib/import/m4/math_h.m4: Update.
2275         * gnulib/import/m4/mbrtowc.m4: Update.
2276         * gnulib/import/m4/mbsinit.m4: Update.
2277         * gnulib/import/m4/mbsrtowcs.m4: Update.
2278         * gnulib/import/m4/mbstate_t.m4: Update.
2279         * gnulib/import/m4/memchr.m4: Update.
2280         * gnulib/import/m4/memmem.m4: Update.
2281         * gnulib/import/m4/mempcpy.m4: Update.
2282         * gnulib/import/m4/memrchr.m4: Update.
2283         * gnulib/import/m4/mkdir.m4: Update.
2284         * gnulib/import/m4/mkstemp.m4: Update.
2285         * gnulib/import/m4/mmap-anon.m4: Update.
2286         * gnulib/import/m4/mode_t.m4: Update.
2287         * gnulib/import/m4/msvc-inval.m4: Update.
2288         * gnulib/import/m4/msvc-nothrow.m4: Update.
2289         * gnulib/import/m4/multiarch.m4: Update.
2290         * gnulib/import/m4/nocrash.m4: Update.
2291         * gnulib/import/m4/off_t.m4: Update.
2292         * gnulib/import/m4/onceonly.m4: Update.
2293         * gnulib/import/m4/open-cloexec.m4: Update.
2294         * gnulib/import/m4/open.m4: Update.
2295         * gnulib/import/m4/openat.m4: Update.
2296         * gnulib/import/m4/opendir.m4: Update.
2297         * gnulib/import/m4/pathmax.m4: Update.
2298         * gnulib/import/m4/rawmemchr.m4: Update.
2299         * gnulib/import/m4/readdir.m4: Update.
2300         * gnulib/import/m4/readlink.m4: Update.
2301         * gnulib/import/m4/realloc.m4: Update.
2302         * gnulib/import/m4/rename.m4: Update.
2303         * gnulib/import/m4/rewinddir.m4: Update.
2304         * gnulib/import/m4/rmdir.m4: Update.
2305         * gnulib/import/m4/save-cwd.m4: Update.
2306         * gnulib/import/m4/secure_getenv.m4: Update.
2307         * gnulib/import/m4/setenv.m4: Update.
2308         * gnulib/import/m4/signal_h.m4: Update.
2309         * gnulib/import/m4/ssize_t.m4: Update.
2310         * gnulib/import/m4/stat-time.m4: Update.
2311         * gnulib/import/m4/stat.m4: Update.
2312         * gnulib/import/m4/std-gnu11.m4: Update.
2313         * gnulib/import/m4/stdbool.m4: Update.
2314         * gnulib/import/m4/stddef_h.m4: Update.
2315         * gnulib/import/m4/stdint.m4: Update.
2316         * gnulib/import/m4/stdio_h.m4: Update.
2317         * gnulib/import/m4/stdlib_h.m4: Update.
2318         * gnulib/import/m4/strchrnul.m4: Update.
2319         * gnulib/import/m4/strdup.m4: Update.
2320         * gnulib/import/m4/strerror.m4: Update.
2321         * gnulib/import/m4/string_h.m4: Update.
2322         * gnulib/import/m4/strstr.m4: Update.
2323         * gnulib/import/m4/strtok_r.m4: Update.
2324         * gnulib/import/m4/sys_socket_h.m4: Update.
2325         * gnulib/import/m4/sys_stat_h.m4: Update.
2326         * gnulib/import/m4/sys_time_h.m4: Update.
2327         * gnulib/import/m4/sys_types_h.m4: Update.
2328         * gnulib/import/m4/tempname.m4: Update.
2329         * gnulib/import/m4/time_h.m4: Update.
2330         * gnulib/import/m4/unistd-safer.m4: Update.
2331         * gnulib/import/m4/unistd_h.m4: Update.
2332         * gnulib/import/m4/warn-on-use.m4: Update.
2333         * gnulib/import/m4/wchar_h.m4: Update.
2334         * gnulib/import/m4/wchar_t.m4: Update.
2335         * gnulib/import/m4/wctype_h.m4: Update.
2336         * gnulib/import/m4/wint_t.m4: Update.
2337         * gnulib/import/malloc.c: Update.
2338         * gnulib/import/malloc/scratch_buffer.h: Update.
2339         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
2340         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
2341         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
2342         * gnulib/import/malloca.c: Update.
2343         * gnulib/import/malloca.h: Update.
2344         * gnulib/import/malloca.valgrind: Update.
2345         * gnulib/import/math.in.h: Update.
2346         * gnulib/import/mbrtowc.c: Update.
2347         * gnulib/import/mbsinit.c: Update.
2348         * gnulib/import/mbsrtowcs-impl.h: Update.
2349         * gnulib/import/mbsrtowcs-state.c: Update.
2350         * gnulib/import/mbsrtowcs.c: Update.
2351         * gnulib/import/memchr.c: Update.
2352         * gnulib/import/memmem.c: Update.
2353         * gnulib/import/mempcpy.c: Update.
2354         * gnulib/import/memrchr.c: Update.
2355         * gnulib/import/mkdir.c: Update.
2356         * gnulib/import/mkstemp.c: Update.
2357         * gnulib/import/msvc-inval.c: Update.
2358         * gnulib/import/msvc-inval.h: Update.
2359         * gnulib/import/msvc-nothrow.c: Update.
2360         * gnulib/import/msvc-nothrow.h: Update.
2361         * gnulib/import/open.c: Update.
2362         * gnulib/import/openat-die.c: Update.
2363         * gnulib/import/openat-priv.h: Update.
2364         * gnulib/import/openat-proc.c: Update.
2365         * gnulib/import/openat.c: Update.
2366         * gnulib/import/openat.h: Update.
2367         * gnulib/import/opendir.c: Update.
2368         * gnulib/import/pathmax.h: Update.
2369         * gnulib/import/pipe-safer.c: Update.
2370         * gnulib/import/rawmemchr.c: Update.
2371         * gnulib/import/readdir.c: Update.
2372         * gnulib/import/readlink.c: Update.
2373         * gnulib/import/realloc.c: Update.
2374         * gnulib/import/ref-add.sin: Update.
2375         * gnulib/import/ref-del.sin: Update.
2376         * gnulib/import/rename.c: Update.
2377         * gnulib/import/rewinddir.c: Update.
2378         * gnulib/import/rmdir.c: Update.
2379         * gnulib/import/same-inode.h: Update.
2380         * gnulib/import/save-cwd.c: Update.
2381         * gnulib/import/save-cwd.h: Update.
2382         * gnulib/import/scratch_buffer.h: Update.
2383         * gnulib/import/secure_getenv.c: Update.
2384         * gnulib/import/setenv.c: Update.
2385         * gnulib/import/signal.in.h: Update.
2386         * gnulib/import/stat-time.c: Update.
2387         * gnulib/import/stat-time.h: Update.
2388         * gnulib/import/stat-w32.c: Update.
2389         * gnulib/import/stat-w32.h: Update.
2390         * gnulib/import/stat.c: Update.
2391         * gnulib/import/stdbool.in.h: Update.
2392         * gnulib/import/stddef.in.h: Update.
2393         * gnulib/import/stdint.in.h: Update.
2394         * gnulib/import/stdio.in.h: Update.
2395         * gnulib/import/stdlib.in.h: Update.
2396         * gnulib/import/str-two-way.h: Update.
2397         * gnulib/import/strchrnul.c: Update.
2398         * gnulib/import/strdup.c: Update.
2399         * gnulib/import/streq.h: Update.
2400         * gnulib/import/strerror-override.c: Update.
2401         * gnulib/import/strerror-override.h: Update.
2402         * gnulib/import/strerror.c: Update.
2403         * gnulib/import/string.in.h: Update.
2404         * gnulib/import/stripslash.c: Update.
2405         * gnulib/import/strnlen1.c: Update.
2406         * gnulib/import/strnlen1.h: Update.
2407         * gnulib/import/strstr.c: Update.
2408         * gnulib/import/strtok_r.c: Update.
2409         * gnulib/import/sys_stat.in.h: Update.
2410         * gnulib/import/sys_time.in.h: Update.
2411         * gnulib/import/sys_types.in.h: Update.
2412         * gnulib/import/tempname.c: Update.
2413         * gnulib/import/tempname.h: Update.
2414         * gnulib/import/time.in.h: Update.
2415         * gnulib/import/unistd--.h: Update.
2416         * gnulib/import/unistd-safer.h: Update.
2417         * gnulib/import/unistd.in.h: Update.
2418         * gnulib/import/unsetenv.c: Update.
2419         * gnulib/import/verify.h: Update.
2420         * gnulib/import/extra/snippet/warn-on-use.h: Update.
2421         * gnulib/import/wchar.in.h: Update.
2422         * gnulib/import/wctype.in.h: Update.
2423         * gnulib/import/xalloc-oversized.h: Update.
2424         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
2425         "53e2c179f26a890fa6685af4b6c1397ee370433b".
2426
2427 2018-09-10  Simon Marchi  <simon.marchi@ericsson.com>
2428
2429         * record-btrace.c (get_thread_current_frame): Remove
2430         old_inferior_ptid.
2431
2432 2018-09-10  Jerome Guitton  <guitton@adacore.com>
2433
2434         * ada-lang.c (ada_value_struct_elt): Call ada_to_fixed_type
2435         with check_tag to 1 if and only if the type is tagged and the
2436         component being searched cannot been found in the current
2437         view. Otherwise, always call ada_to_fixed_type with
2438         check_tag to 0.
2439
2440 2018-09-10  Xavier Roirand  <roirand@adacore.com>
2441
2442         * ada-lang.c (ada_is_access_to_unconstrained_array): Remove static
2443         declaration.
2444         * ada-lang.h: add ada_is_access_to_unconstrained_array prototype.
2445         * ada-varobj.c (ada_varobj_get_number_of_children,
2446         ada_varobj_describe_child, ada_value_is_changeable_p): Cleanup code.
2447
2448 2018-09-10  Xavier Roirand  <roirand@adacore.com>
2449
2450         * ada-valprint.c (ada_value_print): Use type instead of
2451         enclosing type.
2452
2453 2018-09-10  Xavier Roirand  <roirand@adacore.com>
2454
2455         * ada-lang.c (ada_value_subscript): Handle case when parameter is
2456         an array of access to unconstrained array.
2457
2458 2018-09-10  Xavier Roirand  <roirand@adacore.com>
2459
2460         * ada-lang.c (ada_is_access_to_unconstrained_array): New function.
2461         (ada_check_typedef): Use it.
2462
2463 2018-09-10  Xavier Roirand  <roirand@adacore.com>
2464
2465         * ada-varobj.c (ada_varobj_describe_struct_child)
2466         (ada_varobj_describe_child): Handle union case like struct one.
2467
2468 2018-09-10  Tom Tromey  <tom@tromey.com>
2469
2470         PR python/18380:
2471         * python/python.c (_initialize_python): Make example in "python"
2472         help work in Python 3.
2473
2474 2018-09-10  Eli Zaretskii  <eliz@gnu.org>
2475
2476         * Makefile.in (transformed_name): Use INSTALL_SCRIPT instead of
2477         INSTALL_PROGRAM to install gdb-add-index.sh.  Don't append
2478         $(EXEEXT) to the script, as it is not a program.
2479
2480 2018-09-09  Simon Marchi  <simon.marchi@ericsson.com>
2481
2482         * python/py-prettyprint.c (pretty_print_one_value): Return
2483         gdbpy_ref<>.
2484         (print_string_repr): Adjust.
2485         (apply_varobj_pretty_printer): Return gdbpy_ref<>.
2486         * python/python-internal.h (apply_varobj_pretty_printer): Return
2487         gdbpy_ref<>.
2488         * varobj.c (varobj_value_get_print_value): Adjust.
2489
2490 2018-09-08  Tom Tromey  <tom@tromey.com>
2491
2492         PR python/16047:
2493         * python/py-prettyprint.c (pretty_print_one_value): Check for
2494         to_string method.
2495
2496 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2497
2498         * ada-lang.c (resolve_subexp): Pass correct OPLEN in call to
2499         replace_operator_with_call.
2500
2501 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2502
2503         * ada-lang.c (ada_value_cast): Remove unnecessary parentheses.
2504
2505 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2506
2507         * ada-typeprint.c (print_range): Print the bounds using TYPE
2508         rather than its TYPE_TARGET_TYPE.
2509
2510 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2511
2512         * ada-lang.c (ada_to_fixed_value): Minor reformatting in
2513         call to ada_to_fixed_value_create.
2514
2515 2018-09-08  Jerome Guitton  <guitton@adacore.com>
2516
2517         * ada-lang.c (ada_decode): strip dot prefix in symbol name.
2518
2519 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2520
2521         * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
2522         by calls to error.
2523
2524 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2525
2526         * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
2527         Move update of loop variable "fi".
2528
2529 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2530
2531         * ada-lang.c (value_assign_to_component): In the case of
2532         big-endian targets, extract the bits of the given VAL
2533         using an src_offset of zero if container is not a scalar.
2534
2535 2018-09-06  Simon Ser  <contact@emersion.fr>
2536
2537         PR gdb/23105
2538         * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
2539         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
2540         * fbsd-tdep.c (fbsd_make_note_desc): New.
2541         (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
2542         NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
2543         * target.h (enum target_object) Add FreeBSD-specific
2544         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
2545
2546 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
2547
2548         * compile/compile-c.h (generate_c_for_variable_locations):
2549         Change reference to pointer.
2550         * compile/compile-c-support.c (compile_program) <compute>:
2551         Likewise.
2552         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
2553         (generate_c_for_for_one_variable): Likewise
2554         (generate_c_for_variable_locations): Likewise
2555         * compile/compile-c-types.c (compile_c_instance::convert_type):
2556         Likewise
2557         * compile/compile-cplus-symbols.c (convert_one_symbol):
2558         std::move the scope passed to enter_scope.
2559         * compile/compile-cplus-types.c
2560         (compile_cplus_instance::enter_scope): Make parameter
2561         rvalue-reference.
2562         (compile_cplus_instance::new_scope): Change reference to
2563         pointer.
2564         (compile_cplus_instance::convert_type): Likewise
2565         (compile_cplus_convert_typedef): std::move the scope passed to
2566         enter_scope.
2567         (compile_cplus_convert_struct_or_union): Likewise.
2568         (compile_cplus_convert_enum): Likewise.
2569         (compile_cplus_convert_namespace): Likewise.
2570         * compile/compile-cplus.h (compile_cplus_instance)
2571         <enter_scope>: Make parameter rvalue-reference.
2572         * compile/compile-internal.h (compile_instance)
2573         <get_cached_type>: Likewise
2574         * compile/compile-loc2c.c (push): Likewise
2575         (pushf): Likewise
2576         (unary): Likewise
2577         (binary): Likewise
2578         (print_label): Likewise
2579         (pushf_register_address): Likewise
2580         (pushf_register): Likewise
2581         (do_compile_dwarf_expr_to_c): Likewise
2582         (compile_dwarf_expr_to_c): Likewise
2583         (compile_dwarf_bounds_to_c): Likewise
2584         * compile/compile.c (compile_instance::get_cached_type):
2585         Likewise
2586         * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
2587         (compile_dwarf_bounds_to_c): Likewise
2588         * dwarf2loc.c (locexpr_generate_c_location): Likewise.
2589         (dwarf2_compile_property_to_c): Likewise
2590         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
2591         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
2592         Likewise
2593
2594 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
2595
2596         * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
2597         * tui/tui-data.c (init_content_element): Don't initialize it.
2598
2599 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
2600
2601         * tui/tui-data.h (struct tui_win_info)
2602         <detail::opaque>: Remove.
2603         * tui/tui-data.c (init_win_info): Remove assignment.
2604
2605 2018-09-05  Tom Tromey  <tom@tromey.com>
2606
2607         * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
2608         -Wformat-nonliteral.
2609         * target-float.c (host_float_ops<T>::to_string)
2610         (host_float_ops<T>::from_string): Use
2611         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
2612         * configure: Rebuild.
2613
2614 2018-09-05  Simon Marchi  <simon.marchi@ericsson.com>
2615
2616         * printcmd.c (printf_c_string): Use
2617         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
2618         (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
2619
2620 2018-09-05  Tom Tromey  <tom@tromey.com>
2621
2622         * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
2623
2624 2018-09-05  Tom de Vries  <tdevries@suse.de>
2625
2626         * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
2627         with resolve_abstract_p == true.
2628         (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
2629         defaulting to false. Propagate resolve_abstract_p to
2630         dwarf2_fetch_die_loc_sect_off.
2631         * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
2632         parameter, defaulting to false.
2633         * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
2634         (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
2635         parameter.
2636         * dwarf2read.h (struct die_info): Forward-declare.
2637         (die_info_ptr): New typedef.
2638         (struct dwarf2_per_objfile): Add abstract_to_concrete field.
2639
2640 2018-09-05  Joel Brobecker  <brobecker@adacore.com>
2641
2642         GDB 8.2 released.
2643
2644 2018-09-04  Sergio Durigan Junior  <sergiodj@redhat.com>
2645             Pedro Alves  <palves@redhat.com>
2646
2647         * gnulib/Makefile.in (aclocal_m4_deps): Move to
2648         "aclocal-m4-deps.mk".  Include file here.
2649         $(srcdir)/aclocal.m4: Add "configure.ac".
2650         * gnulib/aclocal-m4-deps.mk: New file.
2651         * gnulib/update-gnulib.sh: Automatically update
2652         "aclocal-m4-deps.mk".
2653
2654 2018-09-04  Tom Tromey  <tom@tromey.com>
2655
2656         * configure: Rebuild.
2657         * configure.ac: Remove multi-ice code.
2658
2659 2018-09-04  Tom Tromey  <tom@tromey.com>
2660
2661         * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
2662         (ada-exp.o): Update.
2663
2664 2018-09-04  Tom Tromey  <tom@tromey.com>
2665
2666         * Makefile.in (printcmd.o, target-float.o): Remove.
2667         (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
2668
2669 2018-09-04  Tom Tromey  <tom@tromey.com>
2670
2671         * gnulib/Makefile.in: Remove obsolete comment.
2672         * Makefile.in: Remove obsolete comment.
2673
2674 2018-09-04  Andrew Burgess  <andrew.burgess@embecosm.com>
2675
2676         * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
2677         line with '+'.
2678
2679 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
2680
2681         * riscv-tdep.c: Add 'prologue-value.h' include.
2682         (struct riscv_unwind_cache): New struct.
2683         (riscv_debug_unwinder): New global.
2684         (riscv_scan_prologue): Update arguments, capture register details
2685         from prologue scan.
2686         (riscv_skip_prologue): Reformat arguments line, move end of
2687         prologue calculation into riscv_scan_prologue.
2688         (riscv_frame_cache): Update return type, create
2689         riscv_unwind_cache, scan the prologue, and fill in remaining cache
2690         details.
2691         (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
2692         (riscv_frame_prev_register): Use the trad_frame within the
2693         riscv_unwind_cache.
2694         (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
2695         flag.
2696
2697 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
2698
2699         * trad-frame.h (trad_frame_set_realreg): Declare.
2700         (trad_frame_set_addr): Declare.
2701         * trad-frame.c (trad_frame_set_realreg): Define new function.
2702         (trad_frame_set_addr): Define new function.
2703         (trad_frame_set_reg_realreg): Use new function.
2704         (trad_frame_set_reg_addr): Use new function.
2705
2706 2018-09-01  Keith Seitz  <keiths@redhat.com>
2707
2708         * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
2709         pulongest instead of "%lld".
2710         * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
2711         ATTRIBUTE_UNUSED.
2712
2713 2018-08-31  Tom Tromey  <tom@tromey.com>
2714
2715         * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
2716         variant part type.
2717
2718 2018-08-31  Pedro Alves  <palves@redhat.com>
2719
2720         * gdbarch.h: Regenerate.
2721
2722 2018-08-31  Pedro Alves  <palves@redhat.com>
2723
2724         * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
2725         * target.h (Hardware watchpoint interfaces): Describe
2726         continuable/steppable/non-steppable watchpoints.
2727         * gdbarch.h, gdbarch.c: Regenerate.
2728
2729 2018-08-31  Pedro Alves  <palves@redhat.com>
2730
2731         * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
2732         Delete.
2733         * s390-linux-nat.c
2734         (s390_linux_nat_target::have_continuable_watchpoint): Delete.
2735         * target.h (target_ops::have_continuable_watchpoint): Delete.
2736         (target_have_continuable_watchpoint): Delete.
2737         * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
2738         * target-delegates.c: Regenerate.
2739
2740 2018-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
2741
2742         * gnulib/Makefile.in (aclocal_m4_deps): Update according to
2743         the files present in "gnulib/import/m4/".
2744
2745 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
2746
2747         * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
2748         c.sw, c.swsp, and c.sdsp.
2749
2750 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
2751
2752         * riscv-tdep.c (struct riscv_inferior_data): Delete.
2753         (riscv_read_misa_reg): Don't cache value read into inferior data.
2754         (riscv_new_inferior_data): Delete.
2755         (riscv_inferior_data_cleanup): Delete.
2756         (riscv_inferior_data): Delete.
2757         (riscv_invalidate_inferior_data): Delete.
2758         (_initialize_riscv_tdep): Remove initialisation of inferior data.
2759
2760 2018-08-30  Simon Marchi  <simon.marchi@ericsson.com>
2761
2762         * compile/compile-cplus-types.c
2763         (compile_cplus_instance::leave_scope): Take the address of scope
2764         object.
2765         (compile_cplus_instance::convert_qualified_base): Compare quals
2766         to 0.
2767
2768 2018-08-30  Keith Seitz  <keiths@redhat.com>
2769
2770         * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
2771         Use "%s" and host_address_to_string instead of "%p" in printf.
2772
2773 2018-08-29  Keith Seitz  <keiths@redhat.com>
2774
2775         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
2776         and compile-cplus-types.c.
2777         (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
2778         * c-lang.c (cplus_language_defn): Set C++ compile functions.
2779         * c-lang.h (cplus_get_compile_context, cplus_compute_program):
2780         Declare.
2781         * compile/compile-c-support.c: Include compile-cplus.h.
2782         (load_libcompile): Templatize.
2783         (get_compile_context): "New" function.
2784         (c_get_compile_context): Use get_compile_context.
2785         (cplus_get_compile_context): New function.
2786         (cplus_push_user_expression, cplus_pop_user_expression)
2787         (cplus_add_code_header, cplus_add_input, cplus_compile_program)
2788         (cplus_compute_program): Define new structs/functions.
2789         * compile/compile-cplus-symmbols.c: New file.
2790         * compile/compile-cplus-types.c: New file.
2791         * compile/compile-cplus.h: New file.
2792         * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
2793         Declare.
2794         * compile/compile-object-load.c (get_out_value_type): Use
2795         strncmp_iw when comparing symbol names.
2796         (compile_object_load): Add mst_bss and mst_data.
2797         * compile/compile.c (_initialize_compile): Remove
2798         -Wno-implicit-function-declaration from `compile_args'.
2799         * compile/gcc-cp-plugin.h: New file.
2800         * NEWS: Mention C++ compile support and new debug options.
2801
2802 2018-08-29  Keith Seitz  <keiths@redhat.com>
2803
2804         * linespec.c (collect_info::add_symbol): Make virtual.
2805         (struct symbol_searcher_collect_info): New struct.
2806         (symbol_searcher::find_all_symbols): New method.
2807         * symtab.h (class symbol_searcher): New class.
2808
2809 2018-08-29  Keith Seitz  <keiths@redhat.com>
2810
2811         * linespec.c (struct linespec) <function_symbols, label_symbols>:
2812         Change to vector of block_symbol.  Update all users.
2813         (struct collect_info) <symbols>: Likewise.
2814         (collect_info::add_symbol): Take block_symbol as argument.
2815         Update all callers.
2816         (decode_compound_collector) <m_symbols>: Change type to vector
2817         of block_symbol.  Update all users.
2818         (decode_compound_collector::operator ()): Change parameter type
2819         to block_symbol.
2820         (find_method, find_function_symbols, find_linespec_symbols)
2821         (find_label_symbols_in_block, find_label_symbols): Change symbol
2822         vectors to block_symbol vectors.
2823         * symtab.h (symbol_found_callback_ftype): Change parameter type to
2824         block_symbol.
2825
2826 2018-08-29  Keith Seitz  <keiths@redhat.com>
2827
2828         * linespec.c (symbolp): Remove typedef and VEC definitions.
2829         (bound_minimal_symbol_d): Likewise.
2830
2831 2018-08-29  Keith Seitz  <keiths@redhat.com>
2832
2833         * linespec.c (decode_compound_collector::decode_compound_collector):
2834         Remove initialization for `m_symtabs'.
2835         (decode_compound_collector::release_symbols): Change return type
2836         to std::vector.  Update all callers.
2837         (class decode_compound_collector) <m_symbols>: Change type to
2838         std::vector.
2839         (lookup_prefix_sym): Change return type to std::vector.  Update all
2840         callers.
2841         (compare_symbols): Remove.
2842         (std_compare_symbols): Rename to `compare_symbols'.
2843         (find_method): Change `sym_classes' parameter to std::vector.
2844         Update all callers.  Use std::sort to sort sym_classes.
2845         (find_linespec_symbols): Remove cleanup.
2846
2847 2018-08-29  Keith Seitz  <keiths@redhat.com>
2848
2849         * linespec.c (struct linespec) <minimal_symbols>: Change type to
2850         std::vector.  Update all users.
2851         (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
2852         (struct collect_info) <minimal_symbols>: Likewise.
2853         (compare_msymbols): Return bool.  Change parameters to const
2854         bound_minimal_symbol references.
2855         (find_method, find_function_symbols, find_linespec_symbols): Change
2856         `minsyms' parameter to std::vector.  Update all callers.
2857
2858 2018-08-29  Keith Seitz  <keiths@redhat.com>
2859
2860         * linespec.c (struct linespec) <label_symbols>: Change type to
2861         std::vector.  Update all users.
2862         (find_label_symbols_in_block): Change `result' parameter to
2863         std::vector.  Update all callers.
2864         (find_label_symbols): Return std::vector.  Update all callers.
2865
2866 2018-08-29  Keith Seitz  <keiths@redhat.com>
2867
2868         * linespec.c (struct linespec) <function_symbols>: Change type to
2869         std::vector.  Update all users.
2870         (struct collect_info) <function_symbols>: Likewise.
2871         (convert_linespec_to_sals): Use std::sort to sort function_symbols.
2872         (std_compare_symbols): New function.
2873         (find_method, find_function_symbols, find_linespec_symbols)
2874         (find_label_symbols_in_block): Change `symbols' parameter to
2875         std::vector.  Update all callers.
2876         (find_label_symbols): Likewise for `function_symbols' and
2877         `label_funcs_ret'.
2878
2879 2018-08-29  Keith Seitz  <keiths@redhat.com>
2880
2881         * linespec.c (symtab_vector_up): Define.
2882         (struct linespec) <file_symtabs>: Change type to std::vector *.
2883         Update all uses.
2884         (struct collect_info) <file_symtabs>: Likewise.
2885         (collect_symtabs_from_filename): Return symtab_vector_up.
2886         Update all callers.
2887         (decode_objc): Remove cleanup.
2888         (symtab_collector::symtab_collector): Initialize `m_symtabs'.
2889         (symtab_collector::release_symtabs): Return symtab_vector_up.
2890         Update all callers.
2891         (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
2892         Update all users.
2893         (collect_symtabs_from_filename, symtabs_from_filename): Return
2894         symtab_vector_up.  Update all callers.
2895
2896 2018-08-29  Tom Tromey  <tom@tromey.com>
2897
2898         * csky-tdep.c (csky_analyze_prologue): Use
2899         core_addr_to_string_nz.
2900
2901 2018-08-29  Tom Tromey  <tom@tromey.com>
2902
2903         * windows-nat.c (struct xlate_exception) <them>: Change type to
2904         DWORD.
2905         (xlate): Fix formatting.  Remove last entry.
2906         (struct xlate_exception, xlate): Comment out.
2907         (windows_nat_target::resume): Use ranged for.
2908
2909 2018-08-29  Jim Wilson  <jimw@sifive.com>
2910
2911         * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
2912         (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
2913         of NT_PRFPREG.
2914         (riscv_linux_nat_target::store_registers): Likewise.
2915
2916 2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
2917
2918         PR gdb/23555
2919         PR gdb/23558
2920         * gnulib/aclocal.m4: Regenerate.
2921         * gnulib/config.in: Regenerate.
2922         * gnulib/configure: Regenerate.
2923         * gnulib/import/Makefile.am: Update.
2924         * gnulib/import/Makefile.in: Update.
2925         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
2926         * gnulib/import/_Noreturn.h: ... this.
2927         * gnulib/import/alloca.in.h: Update.
2928         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
2929         * gnulib/import/arg-nonnull.h: ... this.
2930         * gnulib/import/assure.h: Update.
2931         * gnulib/import/at-func.c: Update.
2932         * gnulib/import/basename-lgpl.c: Update.
2933         * gnulib/import/extra/snippet/c++defs.h: Rename to...
2934         * gnulib/import/c++defs.h: ... this.
2935         * gnulib/import/canonicalize-lgpl.c: Update.
2936         * gnulib/import/cdefs.h: Update.
2937         * gnulib/import/chdir-long.c: Update.
2938         * gnulib/import/chdir-long.h: Update.
2939         * gnulib/import/cloexec.c: Update.
2940         * gnulib/import/cloexec.h: Update.
2941         * gnulib/import/close.c: Update.
2942         * gnulib/import/closedir.c: Update.
2943         * gnulib/import/config.charset: Update.
2944         * gnulib/import/dirent-private.h: Update.
2945         * gnulib/import/dirent.in.h: Update.
2946         * gnulib/import/dirfd.c: Update.
2947         * gnulib/import/dirname-lgpl.c: Update.
2948         * gnulib/import/dirname.h: Update.
2949         * gnulib/import/dosname.h: Update.
2950         * gnulib/import/dup-safer-flag.c: Update.
2951         * gnulib/import/dup-safer.c: Update.
2952         * gnulib/import/dup.c: Update.
2953         * gnulib/import/dup2.c: Update.
2954         * gnulib/import/errno.in.h: Update.
2955         * gnulib/import/error.c: Update.
2956         * gnulib/import/error.h: Update.
2957         * gnulib/import/exitfail.c: Update.
2958         * gnulib/import/exitfail.h: Update.
2959         * gnulib/import/extra/update-copyright: Update.
2960         * gnulib/import/fchdir.c: Update.
2961         * gnulib/import/fcntl.c: Update.
2962         * gnulib/import/fcntl.in.h: Update.
2963         * gnulib/import/fd-hook.c: Update.
2964         * gnulib/import/fd-hook.h: Update.
2965         * gnulib/import/fd-safer-flag.c: Update.
2966         * gnulib/import/fd-safer.c: Update.
2967         * gnulib/import/fdopendir.c: Update.
2968         * gnulib/import/filename.h: Update.
2969         * gnulib/import/filenamecat-lgpl.c: Update.
2970         * gnulib/import/filenamecat.h: Update.
2971         * gnulib/import/flexmember.h: Update.
2972         * gnulib/import/float+.h: Update.
2973         * gnulib/import/float.c: Update.
2974         * gnulib/import/float.in.h: Update.
2975         * gnulib/import/fnmatch.c: Update.
2976         * gnulib/import/fnmatch.in.h: Update.
2977         * gnulib/import/fnmatch_loop.c: Update.
2978         * gnulib/import/fpucw.h: Update.
2979         * gnulib/import/frexp.c: Update.
2980         * gnulib/import/frexpl.c: Update.
2981         * gnulib/import/fstat.c: Update.
2982         * gnulib/import/fstatat.c: Update.
2983         * gnulib/import/getcwd-lgpl.c: Update.
2984         * gnulib/import/getcwd.c: Update.
2985         * gnulib/import/getdtablesize.c: Update.
2986         * gnulib/import/getlogin_r.c: Update.
2987         * gnulib/import/getprogname.c: Update.
2988         * gnulib/import/getprogname.h: Update.
2989         * gnulib/import/gettext.h: Update.
2990         * gnulib/import/gettimeofday.c: Update.
2991         * gnulib/import/glob-libc.h: Update.
2992         * gnulib/import/glob.c: Update.
2993         * gnulib/import/glob.in.h: Update.
2994         * gnulib/import/glob_internal.h: Update.
2995         * gnulib/import/glob_pattern_p.c: Update.
2996         * gnulib/import/globfree.c: Update.
2997         * gnulib/import/hard-locale.c: Update.
2998         * gnulib/import/hard-locale.h: Update.
2999         * gnulib/import/intprops.h: Update.
3000         * gnulib/import/inttypes.in.h: Update.
3001         * gnulib/import/isnan.c: Update.
3002         * gnulib/import/isnand-nolibm.h: Update.
3003         * gnulib/import/isnand.c: Update.
3004         * gnulib/import/isnanl-nolibm.h: Update.
3005         * gnulib/import/isnanl.c: Update.
3006         * gnulib/import/itold.c: Update.
3007         * gnulib/import/libc-config.h: Update.
3008         * gnulib/import/limits.in.h: Update.
3009         * gnulib/import/localcharset.c: Update.
3010         * gnulib/import/localcharset.h: Update.
3011         * gnulib/import/localtime-buffer.c: Update.
3012         * gnulib/import/localtime-buffer.h: Update.
3013         * gnulib/import/lstat.c: Update.
3014         * gnulib/import/m4/00gnulib.m4: Update.
3015         * gnulib/import/m4/__inline.m4: Update.
3016         * gnulib/import/m4/absolute-header.m4: Update.
3017         * gnulib/import/m4/alloca.m4: Update.
3018         * gnulib/import/m4/builtin-expect.m4: Update.
3019         * gnulib/import/m4/canonicalize.m4: Update.
3020         * gnulib/import/m4/chdir-long.m4: Update.
3021         * gnulib/import/m4/close.m4: Update.
3022         * gnulib/import/m4/closedir.m4: Update.
3023         * gnulib/import/m4/configmake.m4: Update.
3024         * gnulib/import/m4/d-ino.m4: Update.
3025         * gnulib/import/m4/d-type.m4: Update.
3026         * gnulib/import/m4/dirent_h.m4: Update.
3027         * gnulib/import/m4/dirfd.m4: Update.
3028         * gnulib/import/m4/dirname.m4: Update.
3029         * gnulib/import/m4/double-slash-root.m4: Update.
3030         * gnulib/import/m4/dup.m4: Update.
3031         * gnulib/import/m4/dup2.m4: Update.
3032         * gnulib/import/m4/eealloc.m4: Update.
3033         * gnulib/import/m4/environ.m4: Update.
3034         * gnulib/import/m4/errno_h.m4: Update.
3035         * gnulib/import/m4/error.m4: Update.
3036         * gnulib/import/m4/exponentd.m4: Update.
3037         * gnulib/import/m4/exponentl.m4: Update.
3038         * gnulib/import/m4/extensions.m4: Update.
3039         * gnulib/import/m4/extern-inline.m4: Update.
3040         * gnulib/import/m4/fchdir.m4: Update.
3041         * gnulib/import/m4/fcntl-o.m4: Update.
3042         * gnulib/import/m4/fcntl.m4: Update.
3043         * gnulib/import/m4/fcntl_h.m4: Update.
3044         * gnulib/import/m4/fdopendir.m4: Update.
3045         * gnulib/import/m4/filenamecat.m4: Update.
3046         * gnulib/import/m4/flexmember.m4: Update.
3047         * gnulib/import/m4/float_h.m4: Update.
3048         * gnulib/import/m4/fnmatch.m4: Update.
3049         * gnulib/import/m4/fnmatch_h.m4: Update.
3050         * gnulib/import/m4/fpieee.m4: Update.
3051         * gnulib/import/m4/frexp.m4: Update.
3052         * gnulib/import/m4/frexpl.m4: Update.
3053         * gnulib/import/m4/fstat.m4: Update.
3054         * gnulib/import/m4/fstatat.m4: Update.
3055         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
3056         * gnulib/import/m4/getcwd-path-max.m4: Update.
3057         * gnulib/import/m4/getcwd.m4: Update.
3058         * gnulib/import/m4/getdtablesize.m4: Update.
3059         * gnulib/import/m4/getlogin.m4: Update.
3060         * gnulib/import/m4/getlogin_r.m4: Update.
3061         * gnulib/import/m4/getpagesize.m4: Update.
3062         * gnulib/import/m4/getprogname.m4: Update.
3063         * gnulib/import/m4/gettimeofday.m4: Update.
3064         * gnulib/import/m4/glibc21.m4: Update.
3065         * gnulib/import/m4/glob.m4: Update.
3066         * gnulib/import/m4/glob_h.m4: Update.
3067         * gnulib/import/m4/gnulib-cache.m4: Update.
3068         * gnulib/import/m4/gnulib-common.m4: Update.
3069         * gnulib/import/m4/gnulib-comp.m4: Update.
3070         * gnulib/import/m4/gnulib-tool.m4: Update.
3071         * gnulib/import/m4/hard-locale.m4: Update.
3072         * gnulib/import/m4/include_next.m4: Update.
3073         * gnulib/import/m4/inttypes-pri.m4: Update.
3074         * gnulib/import/m4/inttypes.m4: Update.
3075         * gnulib/import/m4/isnand.m4: Update.
3076         * gnulib/import/m4/isnanl.m4: Update.
3077         * gnulib/import/m4/largefile.m4: Update.
3078         * gnulib/import/m4/limits-h.m4: Update.
3079         * gnulib/import/m4/localcharset.m4: Update.
3080         * gnulib/import/m4/locale-fr.m4: Update.
3081         * gnulib/import/m4/locale-ja.m4: Update.
3082         * gnulib/import/m4/locale-zh.m4: Update.
3083         * gnulib/import/m4/localtime-buffer.m4: Update.
3084         * gnulib/import/m4/longlong.m4: Update.
3085         * gnulib/import/m4/lstat.m4: Update.
3086         * gnulib/import/m4/malloc.m4: Update.
3087         * gnulib/import/m4/malloca.m4: Update.
3088         * gnulib/import/m4/math_h.m4: Update.
3089         * gnulib/import/m4/mbrtowc.m4: Update.
3090         * gnulib/import/m4/mbsinit.m4: Update.
3091         * gnulib/import/m4/mbsrtowcs.m4: Update.
3092         * gnulib/import/m4/mbstate_t.m4: Update.
3093         * gnulib/import/m4/memchr.m4: Update.
3094         * gnulib/import/m4/memmem.m4: Update.
3095         * gnulib/import/m4/mempcpy.m4: Update.
3096         * gnulib/import/m4/memrchr.m4: Update.
3097         * gnulib/import/m4/mkdir.m4: Update.
3098         * gnulib/import/m4/mkstemp.m4: Update.
3099         * gnulib/import/m4/mmap-anon.m4: Update.
3100         * gnulib/import/m4/mode_t.m4: Update.
3101         * gnulib/import/m4/msvc-inval.m4: Update.
3102         * gnulib/import/m4/msvc-nothrow.m4: Update.
3103         * gnulib/import/m4/multiarch.m4: Update.
3104         * gnulib/import/m4/nocrash.m4: Update.
3105         * gnulib/import/m4/off_t.m4: Update.
3106         * gnulib/import/m4/onceonly.m4: Update.
3107         * gnulib/import/m4/open-cloexec.m4: Update.
3108         * gnulib/import/m4/open.m4: Update.
3109         * gnulib/import/m4/openat.m4: Update.
3110         * gnulib/import/m4/opendir.m4: Update.
3111         * gnulib/import/m4/pathmax.m4: Update.
3112         * gnulib/import/m4/rawmemchr.m4: Update.
3113         * gnulib/import/m4/readdir.m4: Update.
3114         * gnulib/import/m4/readlink.m4: Update.
3115         * gnulib/import/m4/realloc.m4: Update.
3116         * gnulib/import/m4/rename.m4: Update.
3117         * gnulib/import/m4/rewinddir.m4: Update.
3118         * gnulib/import/m4/rmdir.m4: Update.
3119         * gnulib/import/m4/save-cwd.m4: Update.
3120         * gnulib/import/m4/secure_getenv.m4: Update.
3121         * gnulib/import/m4/setenv.m4: Update.
3122         * gnulib/import/m4/signal_h.m4: Update.
3123         * gnulib/import/m4/ssize_t.m4: Update.
3124         * gnulib/import/m4/stat-time.m4: Update.
3125         * gnulib/import/m4/stat.m4: Update.
3126         * gnulib/import/m4/std-gnu11.m4: Update.
3127         * gnulib/import/m4/stdbool.m4: Update.
3128         * gnulib/import/m4/stddef_h.m4: Update.
3129         * gnulib/import/m4/stdint.m4: Update.
3130         * gnulib/import/m4/stdio_h.m4: Update.
3131         * gnulib/import/m4/stdlib_h.m4: Update.
3132         * gnulib/import/m4/strchrnul.m4: Update.
3133         * gnulib/import/m4/strdup.m4: Update.
3134         * gnulib/import/m4/strerror.m4: Update.
3135         * gnulib/import/m4/string_h.m4: Update.
3136         * gnulib/import/m4/strstr.m4: Update.
3137         * gnulib/import/m4/strtok_r.m4: Update.
3138         * gnulib/import/m4/sys_socket_h.m4: Update.
3139         * gnulib/import/m4/sys_stat_h.m4: Update.
3140         * gnulib/import/m4/sys_time_h.m4: Update.
3141         * gnulib/import/m4/sys_types_h.m4: Update.
3142         * gnulib/import/m4/tempname.m4: Update.
3143         * gnulib/import/m4/time_h.m4: Update.
3144         * gnulib/import/m4/unistd-safer.m4: Update.
3145         * gnulib/import/m4/unistd_h.m4: Update.
3146         * gnulib/import/m4/warn-on-use.m4: Update.
3147         * gnulib/import/m4/wchar_h.m4: Update.
3148         * gnulib/import/m4/wchar_t.m4: Update.
3149         * gnulib/import/m4/wctype_h.m4: Update.
3150         * gnulib/import/m4/wint_t.m4: Update.
3151         * gnulib/import/malloc.c: Update.
3152         * gnulib/import/malloc/scratch_buffer.h: Update.
3153         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
3154         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
3155         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
3156         * gnulib/import/malloca.c: Update.
3157         * gnulib/import/malloca.h: Update.
3158         * gnulib/import/malloca.valgrind: Update.
3159         * gnulib/import/math.in.h: Update.
3160         * gnulib/import/mbrtowc.c: Update.
3161         * gnulib/import/mbsinit.c: Update.
3162         * gnulib/import/mbsrtowcs-impl.h: Update.
3163         * gnulib/import/mbsrtowcs-state.c: Update.
3164         * gnulib/import/mbsrtowcs.c: Update.
3165         * gnulib/import/memchr.c: Update.
3166         * gnulib/import/memmem.c: Update.
3167         * gnulib/import/mempcpy.c: Update.
3168         * gnulib/import/memrchr.c: Update.
3169         * gnulib/import/mkdir.c: Update.
3170         * gnulib/import/mkstemp.c: Update.
3171         * gnulib/import/msvc-inval.c: Update.
3172         * gnulib/import/msvc-inval.h: Update.
3173         * gnulib/import/msvc-nothrow.c: Update.
3174         * gnulib/import/msvc-nothrow.h: Update.
3175         * gnulib/import/open.c: Update.
3176         * gnulib/import/openat-die.c: Update.
3177         * gnulib/import/openat-priv.h: Update.
3178         * gnulib/import/openat-proc.c: Update.
3179         * gnulib/import/openat.c: Update.
3180         * gnulib/import/openat.h: Update.
3181         * gnulib/import/opendir.c: Update.
3182         * gnulib/import/pathmax.h: Update.
3183         * gnulib/import/pipe-safer.c: Update.
3184         * gnulib/import/rawmemchr.c: Update.
3185         * gnulib/import/readdir.c: Update.
3186         * gnulib/import/readlink.c: Update.
3187         * gnulib/import/realloc.c: Update.
3188         * gnulib/import/ref-add.sin: Update.
3189         * gnulib/import/ref-del.sin: Update.
3190         * gnulib/import/rename.c: Update.
3191         * gnulib/import/rewinddir.c: Update.
3192         * gnulib/import/rmdir.c: Update.
3193         * gnulib/import/same-inode.h: Update.
3194         * gnulib/import/save-cwd.c: Update.
3195         * gnulib/import/save-cwd.h: Update.
3196         * gnulib/import/scratch_buffer.h: Update.
3197         * gnulib/import/secure_getenv.c: Update.
3198         * gnulib/import/setenv.c: Update.
3199         * gnulib/import/signal.in.h: Update.
3200         * gnulib/import/stat-time.c: Update.
3201         * gnulib/import/stat-time.h: Update.
3202         * gnulib/import/stat-w32.c: Update.
3203         * gnulib/import/stat-w32.h: Update.
3204         * gnulib/import/stat.c: Update.
3205         * gnulib/import/stdbool.in.h: Update.
3206         * gnulib/import/stddef.in.h: Update.
3207         * gnulib/import/stdint.in.h: Update.
3208         * gnulib/import/stdio.in.h: Update.
3209         * gnulib/import/stdlib.in.h: Update.
3210         * gnulib/import/str-two-way.h: Update.
3211         * gnulib/import/strchrnul.c: Update.
3212         * gnulib/import/strdup.c: Update.
3213         * gnulib/import/streq.h: Update.
3214         * gnulib/import/strerror-override.c: Update.
3215         * gnulib/import/strerror-override.h: Update.
3216         * gnulib/import/strerror.c: Update.
3217         * gnulib/import/string.in.h: Update.
3218         * gnulib/import/stripslash.c: Update.
3219         * gnulib/import/strnlen1.c: Update.
3220         * gnulib/import/strnlen1.h: Update.
3221         * gnulib/import/strstr.c: Update.
3222         * gnulib/import/strtok_r.c: Update.
3223         * gnulib/import/sys_stat.in.h: Update.
3224         * gnulib/import/sys_time.in.h: Update.
3225         * gnulib/import/sys_types.in.h: Update.
3226         * gnulib/import/tempname.c: Update.
3227         * gnulib/import/tempname.h: Update.
3228         * gnulib/import/time.in.h: Update.
3229         * gnulib/import/unistd--.h: Update.
3230         * gnulib/import/unistd-safer.h: Update.
3231         * gnulib/import/unistd.in.h: Update.
3232         * gnulib/import/unsetenv.c: Update.
3233         * gnulib/import/verify.h: Update.
3234         * gnulib/import/extra/snippet/warn-on-use.h: Update.
3235         * gnulib/import/wchar.in.h: Update.
3236         * gnulib/import/wctype.in.h: Update.
3237         * gnulib/import/xalloc-oversized.h: Update.
3238         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
3239         "53e2c179f26a890fa6685af4b6c1397ee370433b".
3240
3241 2018-08-16  Gary Benson <gbenson@redhat.com>
3242
3243         PR gdb/13000:
3244         * gdb/main.c (captured_main_1): Exit with nonzero status
3245         in batch mode if the last command to be executed failed.
3246         * NEWS: Mention the above.
3247
3248 2018-08-29  Simon Marchi  <simon.marchi@ericsson.com>
3249
3250         * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
3251         end of warning message.
3252
3253 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
3254
3255         PR gdb/22943:
3256         * aarch64-tdep.c (is_hfa_or_hva): Remove function.
3257         (aarch64_extract_return_value): Use
3258         aapcs_is_vfp_call_or_return_candidate.
3259         (aarch64_return_in_memory): Likewise.
3260         (aarch64_store_return_value): Likewise.
3261
3262 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
3263
3264         * aarch64-tdep.c
3265         (aapcs_is_vfp_call_or_return_candidate): Make static
3266         (pass_in_v_or_stack): Remove function.
3267         (pass_in_v_vfp_candidate): New function.
3268         (aarch64_push_dummy_call): Check for float register candidates.
3269
3270 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
3271
3272         * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
3273         (aapcs_is_vfp_call_or_return_candidate_1): New function.
3274         (aapcs_is_vfp_call_or_return_candidate): Likewise.
3275
3276 2018-08-28  Simon Marchi  <simon.marchi@polymtl.ca>
3277
3278         PR build/23399
3279         * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
3280         (struct ipa_sym_addresses): Rename to...
3281         (struct ipa_sym_addresses_common): ... this.
3282         * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
3283
3284 2018-08-28  Tom Tromey  <tom@tromey.com>
3285
3286         * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
3287         (token_fifo): Now a std::vector.
3288         (yylex, c_parse): Update.
3289         * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
3290         (token_fifo): Now a std::vector.
3291         (yylex, d_parse): Update.
3292         * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
3293         (token_fifo): Now a std::vector.
3294         (yylex, go_parse): Update.
3295
3296 2018-08-28  Simon Marchi  <simon.marchi@ericsson.com>
3297
3298         * parser-defs.h (struct type_stack) <elements>: Change type to
3299         std::vector<union type_stack_elt>.
3300         <depth, size>: Remove.
3301         * parse.c (parse_exp_in_context_1): Adjust.
3302         (type_stack_reserve): Remove.
3303         (check_type_stack_depth): Remove.
3304         (insert_into_type_stack): Adjust to std::vector.
3305         (insert_type): Likewise.
3306         (push_type): Likewise.
3307         (push_type_int): Likewise.
3308         (insert_type_address_space): Likewise.
3309         (pop_type): Likewise.
3310         (pop_type_int): Likewise.
3311         (pop_typelist): Likewise.
3312         (pop_type_stack): Likewise.
3313         (append_type_stack): Likewise.
3314         (push_type_stack): Likewise.
3315         (get_type_stack): Likewise.
3316         (type_stack_cleanup): Likewise.
3317         (push_typelist): Likewise.
3318         (follow_types): Likewise.
3319         (_initialize_parse): Likewise.
3320
3321 2018-08-28  Hafiz Abid Qadeer  <abidh@codesourcery.com>
3322
3323         * NEWS: Mention csky target.
3324
3325 2018-08-28  Jiangshuai Li  <jiangshuai_li@c-sky.com>
3326             Hafiz Abid Qadeer  <abidh@codesourcery.com>
3327             Don Breazeal  <donb@codesourcery.com>
3328
3329         * csky-linux-tdep.c: New file.
3330         * csky-tdep.c: Likewise.
3331         * csky-tdep.h: Likewise.
3332         * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
3333         csky-tdep.o.
3334         (HFILES_NO_SRCDIR): Add csky-tdep.h.
3335         (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
3336         * configure.tgt: Add csky support.
3337
3338 2018-08-27  Jan Vrany  <jan.vrany@fit.cvut.cz>
3339
3340         * python/py-framefilter.c (py_print_frame): Print frame architecture
3341         when printing on an MI output.
3342
3343 2018-08-27  Tom Tromey  <tom@tromey.com>
3344
3345         PR build/23087:
3346         * configure: Rebuild.
3347         * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
3348
3349 2018-08-27  Tom Tromey  <tom@tromey.com>
3350
3351         * aarch64-linux-tdep.c
3352         (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
3353         casts to int.
3354
3355 2018-08-27  Tom Tromey  <tom@tromey.com>
3356
3357         * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
3358         unsigned.
3359         (ppc64_standard_linkage1, ppc64_standard_linkage2)
3360         (ppc64_standard_linkage3, ppc64_standard_linkage4)
3361         (ppc64_standard_linkage5, ppc64_standard_linkage6)
3362         (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
3363         unsigned.
3364
3365 2018-08-27  Tom Tromey  <tom@tromey.com>
3366
3367         * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
3368         (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
3369
3370 2018-08-27  Tom Tromey  <tom@tromey.com>
3371
3372         * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
3373         * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
3374         ULONGEST_MAX.
3375         * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
3376         ULONGEST_MAX.
3377         * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
3378         ULONGEST_MAX.
3379         * sparc-linux-tdep.c (sparc32_linux_sigframe)
3380         (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
3381         * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
3382         ULONGEST_MAX.
3383         * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
3384         (ppc64_linux_sigaction_tramp_frame)
3385         (ppc32_linux_sighandler_tramp_frame)
3386         (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
3387         * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
3388         (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
3389         * mn10300-linux-tdep.c (am33_linux_sigframe)
3390         (am33_linux_rt_sigframe): Use ULONGEST_MAX.
3391         * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
3392         * mips-linux-tdep.c (mips_linux_o32_sigframe)
3393         (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
3394         (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
3395         (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
3396         (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
3397         * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
3398         (mips64_fbsd_sigframe): Use ULONGEST_MAX.
3399         * microblaze-linux-tdep.c
3400         (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
3401         * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
3402         (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
3403         (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
3404         * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
3405         * common/common-types.h (ULONGEST_MAX): New define.
3406         (CORE_ADDR_MAX): Fix formatting.
3407         * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
3408         * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
3409         * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
3410         (arm_linux_rt_sigreturn_tramp_frame)
3411         (arm_eabi_linux_sigreturn_tramp_frame)
3412         (arm_eabi_linux_rt_sigreturn_tramp_frame)
3413         (thumb2_eabi_linux_sigreturn_tramp_frame)
3414         (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
3415         (arm_linux_restart_syscall_tramp_frame)
3416         (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
3417         * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
3418         * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
3419         ULONGEST_MAX.
3420         * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
3421
3422 2018-08-27  Tom Tromey  <tom@tromey.com>
3423
3424         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
3425         CORE_ADDR_MAX.
3426         * mips-tdep.c (mips_deal_with_atomic_sequence)
3427         (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
3428         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
3429         (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
3430         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
3431         CORE_ADDR_MAX.
3432         * aarch64-tdep.c (aarch64_software_single_step): Use
3433         CORE_ADDR_MAX.
3434
3435 2018-08-27  Tom Tromey  <tom@tromey.com>
3436
3437         * linespec.c (complete_linespec_component): Add cast to "char".
3438         * completer.c (completion_tracker::build_completion_result): Add
3439         cast to "char".
3440
3441 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
3442
3443         * solist.h (struct solist, struct target_so_ops): Fix
3444         indentation.
3445
3446 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
3447
3448         * ada-tasks.c (ada_task_info_s): Remove typedef.
3449         (DEF_VEC_O(ada_task_info_s)): Remove.
3450         (struct ada_tasks_inferior_data): Initialize fields.
3451         <task_list>: Make an std::vector.
3452         (get_ada_tasks_inferior_data): Allocate with new.
3453         (ada_get_task_number): Adjust.
3454         (get_task_number_from_id): Likewise.
3455         (valid_task_id): Likewise.
3456         (ada_get_task_info_from_ptid): Likewise.
3457         (iterate_over_live_ada_tasks): Likewise.
3458         (add_ada_task): Likewise.
3459         (read_known_tasks): Likewise.
3460         (ada_build_task_list): Likewise.
3461         (print_ada_task_info): Likewise.
3462         (info_task): Likewise.
3463         (task_command_1): Likewise.
3464
3465 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
3466
3467         * ada-lang.c (add_angle_brackets): Return std::string.
3468
3469 2018-08-25  Simon Marchi  <simon.marchi@polymtl.ca>
3470
3471         * python/py-threadevent.c (py_get_event_thread): Initialize
3472         pythread.
3473
3474 2018-08-24  Pedro Alves  <palves@redhat.com>
3475
3476         * python/py-bpevent.c (create_breakpoint_event_object): Use
3477         copy-initialization.
3478         * python/py-continueevent.c (emit_continue_event): Use
3479         copy-initialization.
3480         * python/py-exitedevent.c (create_exited_event_object): Return a
3481         gdbpy_ref<>.
3482         (emit_exited_event): Use copy-initialization.
3483         * python/py-inferior.c (python_new_inferior)
3484         (python_inferior_deleted, add_thread_object): Use
3485         copy-initialization.
3486         * python/py-infevents.c (create_inferior_call_event_object)
3487         (create_register_changed_event_object)
3488         (create_memory_changed_event_object): Return a gdbpy_ref<>.
3489         (emit_inferior_call_event, emit_memory_changed_event)
3490         (emit_register_changed_event): Use copy-initialization.
3491         * python/py-newobjfileevent.c (create_new_objfile_event_object):
3492         Return a gdbpy_ref<>.
3493         (emit_new_objfile_event): Use copy-initialization.
3494         (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
3495         (emit_clear_objfiles_event): Use copy-initialization.
3496         * python/py-signalevent.c (create_signal_event_object): Use
3497         copy-initialization.
3498         * python/py-threadevent.c (create_thread_event_object): Use
3499         copy-initialization.
3500
3501 2018-08-24  Pedro Alves  <palves@redhat.com>
3502             Simon Marchi  <simon.marchi@ericsson.com>
3503
3504         PR gdb/23379
3505         * python/py-continueevent.c: Include "gdbthread.h".
3506         (create_continue_event_object): Add intro comment.  Add 'ptid'
3507         parameter.  Use it to find thread to pass to
3508         create_thread_event_object.
3509         (emit_continue_event): Pass PTID down to
3510         create_continue_event_object.
3511         * python/py-event.h (py_get_event_thread): Declare.
3512         (create_thread_event_object): Remove default from 'thread'
3513         parameter.
3514         * python/py-stopevent.c (create_stop_event_object): Use
3515         py_get_event_thread.
3516         * python/py-threadevent.c (get_event_thread): Rename to ...
3517         (py_get_event_thread): ... this, make extern, add 'ptid' parameter
3518         and use it to find the thread.
3519         (create_thread_event_object): Assert that THREAD isn't null.
3520         Don't find the event thread here.
3521
3522 2018-08-23  Kevin Buettner  <kevinb@redhat.com>
3523
3524         * block.h (blockrange, blockranges): New struct declarations.
3525         (struct block): Add new field named `ranges'.
3526         (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
3527         (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
3528         macros for accessing ranges in struct block.
3529         (make_blockranges): New declaration.
3530         block.c (make_blockranges): New function.
3531         * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
3532         for block.
3533         * symtab.h (find_pc_partial_function): Add new parameter `block'.
3534         * blockframe.c (cache_pc_function_block): New static global.
3535         (clear_pc_function_cache): Clear cache_pc_function_block.
3536         (find_pc_partial_function): Move comment to symtab.h.  Add
3537         support for non-contiguous blocks.
3538         * cli/cli-cmds.c (block.h): Include.
3539         (print_disassembly): Handle printing of non-contiguous blocks.
3540         (disassemble_current_function): Likewise.
3541         (disassemble_command): Likewise.
3542
3543         * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
3544         BLOCK_START.
3545         * blockframe.c (get_pc_function_start): Likewise.
3546         * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
3547         (gcc_symbol_address): Likewise.
3548         * compile/compile-object-run.c (compile_object_run): Likewise.
3549         * compile/compile.c (get_expr_block_and_pc): Likewise.
3550         * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
3551         (func_addr_to_tail_call_list): Likewise.
3552         * findvar.c (default_read_var_value): Likewise.
3553         * inline-frame.c (inline_frame_this_id): Likewise.
3554         (skip-inline_frames): Likewise.
3555         * infcmd.c (until_next_command): Likewise.
3556         * linespec.c (convert_linespec_to_sals): Likewise.
3557         * parse.c (parse_exp_in_context_1): Likewise.
3558         * printcmd.c (build_address_symbolic): likewise.
3559         (info_address_command): Likewise.
3560         symtab.c (find_function_start_sal): Likewise.
3561         (skip_prologue_sal): Likewise.
3562         (find_function_alias_target): Likewise.
3563         (find_gnu_ifunc): Likewise.
3564         * stack.c (find_frame_funname): Likewise.
3565         * symtab.c (fixup_symbol_section): Likewise.
3566         (find_function_start_sal): Likewise.
3567         (skip_prologue_sal): Likewsie.
3568         (find_function_alias_target): Likewise.
3569         (find_gnu_ifunc): Likewise.
3570         * tracepoint.c (info_scope_command): Likewise.
3571         * value.c (value_fn_field): Likewise.
3572
3573         * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
3574         in place of find_pc_partial_function.
3575         * blockframe.c (find_function_entry_range_from_pc): New function.
3576         * symtab.h (find_function_entry_range_from_pc): Declare and document.
3577         * objfiles.c (objfile_relocate1): Relocate start and end addresses
3578         for each range in a block.
3579
3580
3581 2018-08-23  Xavier Roirand  <roirand@adacore.com>
3582
3583         * machoread.c (macho_symfile_read_all_oso): Remove uneeded
3584         incrementation.
3585
3586 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
3587
3588         * solib-svr4.c (read_program_headers_from_bfd): Return
3589         gdb::optional<gdb::byte_vector>.
3590         (svr4_exec_displacement): Adjust.
3591
3592 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
3593
3594         * solib-svr4.c (read_program_header): Return
3595         gdb::optional<gdb::byte_vector>, remove p_sect_size param.
3596         (find_program_interpreter): Return
3597         gdb::optional<gdb::byte_vector>.
3598         (scan_dyntag_auxv): Adjust.
3599         (enable_break): Adjust.
3600         (svr4_exec_displacement): Adjust.
3601
3602 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
3603
3604         * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
3605         * inf-child.c (inf_child_target::terminal_save_inferior): New.
3606
3607 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
3608
3609         * guile/scm-string.c (gdbscm_scm_from_printf): Use
3610         string_vprintf.
3611         * guile/scm-utils.c (gdbscm_printf): Likewise.
3612         * serial.c (serial_printf): Likewise.
3613         * xml-support.c (gdb_xml_parser::vdebug): Likewise.
3614
3615 2018-08-22  Jan Vrany  <jan.vrany@fit.cvut.cz>
3616
3617         * stack.c (print_frame): Print frame architecture when printing on
3618         an MI output.
3619         * NEWS: Mention new "arch" attribute in frame output.
3620
3621 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
3622
3623         * arch/aarch64.h (aarch64_regnum): Update comment.
3624
3625 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
3626
3627         * NEWS: Add SVE to 8.2 section.
3628
3629 2018-08-21  Pedro Alves  <palves@redhat.com>
3630
3631         * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
3632         out from gdbscm_parse_function_args.
3633         (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
3634         gdbscm_parse_function_args_1.
3635
3636 2018-08-21  Simon Marchi  <simon.marchi@ericsson.com>
3637
3638         PR gdb/17816
3639         * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
3640         operator.
3641
3642 2018-08-19  Simon Marchi  <simon.marchi@polymtl.ca>
3643
3644         * solib-svr4.c (svr4_exec_displacement): Fix formatting.
3645
3646 2018-08-19  Michael Spang  <spang@google.com>
3647
3648         PR gdb/11786
3649         * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
3650         for PT_TLS segments.
3651
3652 2018-08-18  Kevin Buettner  <kevinb@redhat.com>
3653
3654         * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
3655         dwarf_variable_value.
3656         * dwarf2-frame.c (class dwarf_expr_executor):
3657         Add override for dwarf_variable_value.
3658         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
3659         (class symbol_needs_eval_context): Likewise.
3660         (indirect_synthetic_pointer): Add forward declaration.
3661         (sect_variable_value): New function.
3662         (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
3663         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
3664         for DW_OP_GNU_variable_value.
3665
3666 2018-08-16  Tom Tromey  <tom@tromey.com>
3667
3668         * top.c (read_command_file): Update.
3669         (command_line_input): Remove "repeat" argument.
3670         * ada-lang.c (get_selections): Update.
3671         * linespec.c (decode_line_2): Update.
3672         * defs.h (command_line_input): Remove argument.
3673         * cli/cli-script.c (read_next_line): Update.
3674         * python/py-gdb-readline.c: Update.
3675
3676 2018-08-17  Tom Tromey  <tom@tromey.com>
3677
3678         * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
3679         command_line_input.
3680
3681 2018-08-15  Tom Tromey  <tom@tromey.com>
3682
3683         * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
3684
3685 2018-08-14  Jan Vrany  <jan.vrany@fit.cvut.cz>
3686
3687         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
3688         If used, use find_pc_partial_function to find address range
3689         to disassemble.
3690         * mi/mi-main.c (mi_cmd_list_features): Report
3691         "data-disassemble-a-option" feature.
3692         * NEWS: Mention new -data-disassemble option -a.
3693
3694 2018-08-13  Tom Tromey  <tom@tromey.com>
3695
3696         * common/common-defs.h (_FORTIFY_SOURCE): Define.
3697
3698 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
3699
3700         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
3701         (aarch64_linux_collect_sve_regset): Likewise.
3702         (aarch64_linux_iterate_over_regset_sections): Check for SVE.
3703         * regcache.h (regcache_map_entry_size): New function.
3704
3705 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
3706
3707         * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
3708         (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
3709         (SVE_HEADER_VL_LENGTH): Likewise.
3710         (SVE_HEADER_MAX_VL_LENGTH): Likewise.
3711         (SVE_HEADER_FLAGS_LENGTH): Likewise.
3712         (SVE_HEADER_RESERVED_LENGTH): Likewise.
3713         (SVE_HEADER_SIZE_OFFSET): Likewise.
3714         (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
3715         (SVE_HEADER_VL_OFFSET): Likewise.
3716         (SVE_HEADER_MAX_VL_OFFSET): Likewise.
3717         (SVE_HEADER_FLAGS_OFFSET): Likewise.
3718         (SVE_HEADER_RESERVED_OFFSET): Likewise.
3719         (SVE_HEADER_SIZE): Likewise.
3720         (aarch64_linux_core_read_vq): Add function.
3721         (aarch64_linux_core_read_description): Check for SVE section.
3722
3723 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
3724
3725         * aarch64-fbsd-tdep.c
3726         (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
3727         collect_size.
3728         * aarch64-linux-tdep.c
3729         (aarch64_linux_iterate_over_regset_sections): Likewise.
3730         * alpha-linux-tdep.c
3731         (alpha_linux_iterate_over_regset_sections):
3732         * alpha-nbsd-tdep.c
3733         (alphanbsd_iterate_over_regset_sections): Likewise.
3734         * amd64-fbsd-tdep.c
3735         (amd64fbsd_iterate_over_regset_sections): Likewise.
3736         * amd64-linux-tdep.c
3737         (amd64_linux_iterate_over_regset_sections): Likewise.
3738         * arm-bsd-tdep.c
3739         (armbsd_iterate_over_regset_sections): Likewise.
3740         * arm-fbsd-tdep.c
3741         (arm_fbsd_iterate_over_regset_sections): Likewise.
3742         * arm-linux-tdep.c
3743         (arm_linux_iterate_over_regset_sections): Likewise.
3744         * corelow.c (get_core_registers_cb): Likewise.
3745         (core_target::fetch_registers): Likewise.
3746         * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
3747         * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
3748         * gdbarch.h (void): Regenerate.
3749         * gdbarch.sh: Add supply_size and collect_size.
3750         * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
3751         * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
3752         * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
3753         * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
3754         * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
3755         * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
3756         * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
3757         * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
3758         * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
3759         * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
3760         * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
3761         * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
3762         * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
3763         * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
3764         * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
3765         * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
3766         * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
3767         * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
3768         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
3769         * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
3770         * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
3771         * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
3772         * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
3773         * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
3774         * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
3775         * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
3776         * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
3777         * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
3778         * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
3779         * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
3780
3781 2018-08-10  Simon Marchi  <simon.marchi@ericsson.com>
3782
3783         * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
3784         with string_printf.
3785
3786 2018-08-10  Keith Seitz  <keiths@redhat.com>
3787
3788         * compile/compile-c-support.c (add_code_header, add_code_footer):
3789         Move into policy class.
3790         (c_push_user_expression, pop_user_expression_nop)
3791         (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
3792         (compile_program): New host class.
3793         (c_compile_program): New typedef.
3794         (c_compute_porgram): Use c_compile_program.
3795
3796 2018-08-10  Keith Seitz  <keiths@redhat.com>
3797
3798         * compile/compile-internal.h (compile_instance::~compile_instance):
3799         Remove calls to htab_delete.
3800         <m_type_map, m_symbol_err_map>: Switch type to htab_up.
3801         * compile.c (compile_instance::compile_instance): Initialize
3802         htab unique pointers.
3803         (compile_instance::get_cached_type, compile_instance::insert_type)
3804         (compile_instance::error_symbol_once): Update for unique_ptr.
3805
3806 2018-08-10  Keith Seitz  <keiths@redhat.com>
3807
3808         * compile/compile-c-symbols.c (struct symbol_error)
3809         (hash_symbol_error, eq_symbol_error, del_symbol_error)
3810         (compile_instance::insert_symbol_error)
3811         (compile_instance::error_symbol_once): Move to ...
3812         * compile/compile.c: ... here.
3813
3814 2018-08-10  Keith Seitz  <keiths@redhat.com>
3815
3816         * compile/compile-c-support.c (c_get_compile_context): Use `new'
3817         instead of `new_compile_instance'.
3818         * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
3819         Update description.
3820         If the symbol error map is not initialized, create it.
3821         (generate_c_for_for_one_symbol): Do not check/initialize
3822         the symbol error map.
3823         * compile/compile-c-types.c (compile_c_instance): Make a class.
3824         Update all callers.
3825         (compile_instance::compile_instance): Initialize the type cache.
3826         (get_cached_type): New function.
3827         (insert_type): Update description.
3828         (compile_c_instance::m_default_cflags): Define.
3829         (convert_type): Update description.  Use get_cached_type.
3830         (delete_instance): Moved to destructor.
3831         (new_compile_instance): Moved to constructor.
3832         * compile/compile-c.h (compile_c_instance): Make class inheriting
3833         from compile_instance.
3834         <base>: Remove field.
3835         <type_map, symbol_err_map>: Move to base class.
3836         <c_plugin>: Rename to `m_plugin' and remove pointer type.
3837         * compile/compile-internal.h (compile_instance): Make class.
3838         <type_map_t, symbol_err_map_t>: Define.
3839         <fe>: Rename to `m_gcc_fe'.
3840         <scope, block, gcc_target_options>: Add `m_' prefix.
3841         <m_type_map, m_symbol_err_map>: New fields, moved from
3842         compile_c_instance.
3843         <destroy>: Remove.
3844         (convert_type, new_compile_instance): Remove.
3845         * compile/compile.c (cleanup_compile_instance): Remove.
3846         (compile_to_object): Use unique_ptr to eliminate cleanups.
3847         (compile_instance::set_print_callback, compile_instance::version)
3848         (compile_instance::set_verbose)
3849         (compile_instance::set_driver_filename)
3850         (compile_instance::set_triplet_regexp)
3851         (compile_instance::set_arguments)
3852         (compile_instance::set_source_file)
3853         (compile_instance::compile): Define.
3854
3855 2018-08-10  Keith Seitz  <keiths@redhat.com>
3856
3857         * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
3858         * compile/compile-c-types.c: Define GCC_METHODN macros and include
3859         gcc-c-fe.def to define C plugin.
3860         (delete_instance): Delete `c_plugin'.
3861         (new_compile_instance): Initialize `c_plugin'.
3862         * compile/compile-c.h: Include gcc_c_plugin.h.
3863         (struct compile_c_instance) <c_plugin>: New member.
3864         * gcc-c-plugin.h: New file.
3865         Update all callers with API change.
3866
3867 2018-08-10  Keith Seitz  <keiths@redhat.com>
3868
3869         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
3870         (HFILES_NO_SRCDIR): ... to here.
3871         Add compile-internal.h and compile-c.h.
3872         * compile/compile-c-support.c: Include compile-c.h.
3873         * compile/compile-c-symbols.c: Include compile-c.h.
3874         (generate_c_for_variable_locations): Update comment.
3875         * compile/compile-c-types.c: Include compile-c.h.
3876         * compile/compile-c.h: New file -- moved C language declarations
3877         from other files here.
3878         * compile/compile-internal.h: Do not include hashtab.h or
3879         common/enum-flags.h.
3880         (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
3881         (gcc_convert_symbol, gcc_symbol_address)
3882         (generate_c_for_variable_locations, c_get_mode_for_size)
3883         (c_get_range_decl_name): Definitions moved to compile-c.h.
3884         * compile/compile-loc2c.c: Include compile-c.h.
3885
3886 2018-08-10  Keith Seitz  <keiths@redhat.com>
3887
3888         * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
3889         (c_symbol_substitution_name): ... this.
3890         Update all callers.
3891
3892 2018-08-10  Keith Seitz  <keiths@redhat.com>
3893
3894         * compile/compile-c-support.c (c_compute_program): Use
3895         unique_xmalloc_ptr to eliminate cleanup.
3896         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
3897         Return a unique_xmalloc_ptr and eliminate cleanup.
3898         * compile/compile-internal.h (generate_c_for_variable_locations):
3899         Return unique_xmalloc_ptr and update description.
3900
3901 2018-08-10  Alan Hayward  <alan.hayward@arm.com>
3902
3903         * corelow.c (core_target::get_core_register_section): Rename
3904         min_size to section_min_size.
3905
3906 2018-08-09  Jim Wilson  <jimw@sifive.com>
3907
3908         * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
3909         (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
3910         * NEWS: Mention new GNU/Linux RISC-V target.
3911         * configure.host: Add riscv*-*-linux*.
3912         * configure.nat: Add riscv*.
3913         * configure.tgt: Add riscv*-*-linux*.
3914         * riscv-linux-nat.c: New file.
3915         * riscv-linux-tdep.c: New file.
3916
3917 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
3918
3919         * infrun.c (resume): Make static, add forward declaration.
3920         (proceed): Update header comment.
3921         * infrun.h (resume): Delete declaration.
3922
3923 2018-08-09  Tom Tromey  <tom@tromey.com>
3924
3925         * riscv-tdep.h: Minor formatting fixes.
3926
3927 2018-08-09  Simon Marchi  <simon.marchi@ericsson.com>
3928
3929         * common/scoped_mmap.c (mmap_file): Silence ARI warning.
3930         * dwarf-index-cache.c (create_dir_and_check): Likewise.
3931         (test_mkdir_recursive): Likewise.
3932         * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
3933
3934 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
3935
3936         * valarith.c (value_subscripted_rvalue): If an array is not in
3937         memory, and we don't know the upper bound, then we can't know that
3938         the requested element exists or not.
3939
3940 2018-08-08  Simon Marchi  <simon.marchi@ericsson.com>
3941
3942         * target.c (str_comma_list_concat_elem): Fix typo in comment.
3943         (target_options_to_string): Add comment.
3944
3945 2018-08-08  Tom Tromey  <tom@tromey.com>
3946
3947         * unittests/scoped_mmap-selftests.c: Check result of "write".
3948
3949 2018-08-08  Jim Wilson  <jimw@sifive.com>
3950
3951         * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
3952         (decode_register_index_short): New.
3953         (decode_j_type_insn, decode_cj_type_insn): New.
3954         (decode_b_type_insn, decode_cb_type_insn): New.
3955         (riscv_insn::decode): Add support for jumps, branches, lr, and sc.  New
3956         local xlen.  Check xlen when decoding ambiguous compressed insns.  In
3957         compressed decode, use is_c_lui_insn instead of is_lui_insn, and
3958         is_c_sw_insn instead of is_sw_insn.
3959         (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
3960         (riscv_software_single_step): New.
3961         * riscv-tdep.h (riscv_software_single_step): Declare.
3962
3963         * riscv-tdep.c (riscv_isa_xlen): Drop static.
3964         * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
3965
3966 2018-08-08  Andrew Burgess  <andrew.burgess@embecosm.com>
3967
3968         PR gdb/18050:
3969         * target.c (dispose_inferior): Don't dispose of inferiors that are
3970         already killed.
3971
3972 2018-08-08  Szabolcs Nagy  <szabolcs.nagy@arm.com>
3973
3974         * remote.c (remote_target::download_tracepoint): Change char* to
3975         const char*.
3976
3977 2018-08-07  Simon Marchi  <simon.marchi@polymtl.ca>
3978
3979         * target.h (target_options_to_string): Return an std::string.
3980         * target.c (str_comma_list_concat_elem): Return void, use
3981         std::string.
3982         (do_option): Likewise.
3983         (target_options_to_string): Return an std::string.
3984         * linux-nat.c (linux_nat_target::wait): Adjust.
3985         * target-debug.h (target_debug_print_options): Adjust.
3986
3987 2018-08-07  Tom Tromey  <tom@tromey.com>
3988
3989         * Makefile.in (CPPFLAGS): New variable.
3990         (INTERNAL_CPPFLAGS): Use it.
3991
3992 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
3993
3994         * NEWS: Mention the index cache.
3995
3996 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
3997
3998         * common/pathstuff.h (get_standard_cache_dir): New.
3999         * common/pathstuff.c (get_standard_cache_dir): New.
4000         * build-id.h (build_id_to_string): New.
4001         * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
4002         DEBUG_STR_SUFFIX): Move to here.
4003         * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
4004         DEBUG_STR_SUFFIX): Move from there.
4005         (write_psymtabs_to_index): Make non-static, add basename
4006         parameter.  Write to temporary files, rename when done.
4007         (save_gdb_index_command): Adjust call to
4008         write_psymtabs_to_index.
4009         * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
4010         field.
4011         * dwarf2read.c (dwz_file) <index_cache_res>: New field.
4012         (get_gdb_index_contents_from_cache): New.
4013         (get_gdb_index_contents_from_cache_dwz): New.
4014         (dwarf2_initialize_objfile): Read index from cache.
4015         (dwarf2_build_psymtabs): Save to index.
4016         * dwarf-index-cache.h: New file.
4017         * dwarf-index-cache.c: New file.
4018         * dwarf-index-write.h: New file.
4019
4020 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4021
4022         * gnulib/aclocal.m4: Re-generate.
4023         * gnulib/config.in: Re-generate.
4024         * gnulib/configure: Re-generate.
4025         * gnulib/import/Makefile.am: Re-generate.
4026         * gnulib/import/Makefile.in: Re-generate.
4027         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
4028         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
4029         * gnulib/import/m4/mkdir.m4: New file.
4030         * gnulib/import/mkdir.c: New file.
4031         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
4032         module.
4033
4034 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4035
4036         * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
4037         * common/scoped_mmap.c: New file.
4038         * common/scoped_mmap.h (destroy): New method.
4039         (~scoped_mmap, reset): Use destroy.
4040         (scoped_mmap): New move constructor.
4041         (mmap_file): New declaration.
4042         * unittests/scoped_mmap-selftests.c (test_normal,
4043         test_invalid_filename, run_tests): New functions.
4044         (_initialize_scoped_mmap_selftests): Register selftest.
4045
4046 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4047
4048         * dwarf2read.c (read_gdb_index_from_section): Rename to...
4049         (read_gdb_index_from_buffer): ... this.  Remove section
4050         parameter, add buffer parameter.
4051         (get_gdb_index_contents_ftype,
4052         get_gdb_index_contents_dwz_ftype): New typedefs.
4053         (dwarf2_read_gdb_index): Add callback parameters to get the
4054         index contents.
4055         (get_gdb_index_contents_from_section): New.
4056         (dwarf2_initialize_objfile): Update call to
4057         dwarf2_read_gdb_index.
4058
4059 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4060
4061         * common/filestuff.h (gdb_fopen_cloexec): New overload.
4062         (gdb_open_cloexec): Likewise.
4063         * nat/linux-osdata.c (command_from_pid): Use string_printf.
4064         (commandline_from_pid): Likewise.
4065         (linux_xfer_osdata_threads): Likewise.
4066         (linux_xfer_osdata_fds): Likewise.
4067         * ada-lang.c (is_package_name): Likewise.
4068         * auxv.c (procfs_xfer_auxv): Likewise.
4069         * breakpoint.c (print_one_breakpoint_location): Use
4070         uiout::field_fmt.
4071         (print_one_catch_solib): Use string_printf.
4072         * coff-pe-read.c (add_pe_exported_sym): Likewise.
4073         (add_pe_forwarded_sym): Likewise.
4074         * dwarf2read.c (create_type_unit_group): Likewise.
4075         (build_error_marker_type): Likewise.
4076         * infcall.c (get_function_name): Likewise.
4077         * valprint.c (print_converted_chars_to_obstack): Likewise.
4078         * xtensa-tdep.c (xtensa_register_type): Likewise.
4079
4080 2018-08-06  Simon Marchi  <simon.marchi@ericsson.com>
4081
4082         * remote.c (remote_target::download_tracepoint): Fix format
4083         string errors.
4084
4085 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
4086
4087         * tracefile.c: Include common/byte-vector.h.
4088         (trace_save): Change type of buf to gdb::byte_vector.  Initialize
4089         with trace_regblock_size if needed.  Update uses of buf.
4090
4091 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
4092
4093         * tracepoint.h (collection_list) <m_regs_mask>: Change type to
4094         std::vector<unsigned char>.
4095         * tracepoint.c (collection_list::collection_list): Remove
4096         m_regs_mask initializer from initializer list.  Resize
4097         m_regs_mask using the largest remote register number.
4098         (collection_list::add_remote_register): Remove size check on
4099         m_regs_mask.  Use at to access element.
4100         (collection_list::stringify): Change type of temp_buf to
4101         gdb::char_vector.  Update uses of temp_buf.  Resize if needed to
4102         stringify the register mask.  Use pack_hex_byte for the register
4103         mask.
4104
4105 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
4106
4107         * tracepoint.h (class collection_list) <add_register>: Remove.
4108         <add_remote_register, add_ax_registers, add_local_register>:
4109         Declare.
4110         <add_memrange>: Add scope parameter.
4111         * tracepoint.c (encode_actions_1): Likewise.
4112         (collection_list::add_register): Rename to ...
4113         (collection_list::add_remote_register): ... this.  Update
4114         comment.
4115         (collection_list::add_ax_registers, add_local_register): New
4116         methods.
4117         (collection_list::add_memrange): Add scope parameter.  Call
4118         add_local_register instead of add_register.
4119         (finalize_tracepoint_aexpr): New function.
4120         (collection_list::collect_symbol): Update calls to add_memrange.
4121         Call add_local_register instead of add_register.  Call
4122         add_ax_registers.  Call finalize_tracepoint_aexpr.
4123         (encode_actions_1): Get remote regnos for $reg action.  Call
4124         add_remote_register, add_ax_registers, and add_local_register.
4125         Update call to add_memrange.  Call finalize_tracepoint_aexpr.
4126         (validate_actionline): Call finalize_tracepoint_aexpr.
4127
4128 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
4129
4130         * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
4131         Replace array buf with gdb::char_vector buf, of size
4132         get_remote_packet_size ().  Replace references to buf and
4133         BUF_SIZE to buf.data () and buf.size ().  Replace strcpy, strcat
4134         and xsnprintf with snprintf.  Raise errors if the buffer is too
4135         small.
4136
4137 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
4138
4139         * remote.c (remote_target::download_tracepoint): Fix the has_more
4140         predicate in the QTDP action list iteration.
4141
4142 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
4143
4144         * remote.c (remote_target::download_tracepoint): Fix indentation
4145         in for block.
4146
4147 2018-08-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4148
4149         * proc-api.c (_initialize_proc_api): Remove c, unused.
4150         * procfs.c (procfs_init_inferior): Remove signals, unused.
4151         (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
4152         unused.
4153
4154 2018-08-06  Sergey Korolev  <s.korolev@ndmsystems.com>
4155             Andrew Burgess  <andrew.burgess@embecosm.com>
4156
4157         * linux-nat.c (linux_nat_target::follow_fork): Avoid using
4158         'W_STOPCODE (0)' as this could be ambiguous.
4159
4160 2018-08-03  Sergio Durigan Junior  <sergiodj@redhat.com>
4161
4162         * ser-tcp.c (net_open): Fix thinko when deciding whether to
4163         disable TCP's Nagle algorithm (use "ai_protocol" instead of
4164         "ai_socktype").
4165
4166 2018-08-02  Tom Tromey  <tom@tromey.com>
4167
4168         PR symtab/16842.
4169         * dwarf2read.c (read_func_scope): Set symtab on template parameter
4170         symbols.
4171         (process_structure_scope): Likewise.
4172
4173 2018-08-02  Xavier Roirand  <roirand@adacore.com>
4174
4175         PR gdb/22629:
4176         * darwin-nat.c (darwin_kill_inferior): Fix handling of
4177         kill inferior.
4178
4179 2018-08-02  Tom Tromey  <tom@tromey.com>
4180
4181         * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
4182         (darwin_suspend_inferior, darwin_resume_inferior)
4183         (darwin_decode_notify_message, darwin_resume_inferior_threads)
4184         (darwin_check_new_threads): Check result of get_darwin_inferior.
4185
4186 2018-07-31  Joel Brobecker  <brobecker@adacore.com>
4187
4188         GDB 8.1.1 released.
4189
4190 2018-07-31  Jan Vrany  <jan.vrany@fit.cvut.cz>
4191
4192         * varobj.c (varobj_get_path_expr_parent): Report an error if
4193         parent is a dynamic varobj.
4194
4195 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
4196
4197         * gnulib/aclocal.m4: Re-generate.
4198         * gnulib/config.in: Re-generate.
4199         * gnulib/configure: Re-generate.
4200         * gnulib/import/Makefile.in: Re-generate.
4201         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
4202         * gnulib/import/m4/onceonly.m4: Re-generate.
4203
4204 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
4205
4206         * target-descriptions.c (struct xml_test_tdesc): New.
4207         (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
4208         (record_xml_tdesc): Update.
4209         (maintenance_check_xml_descriptions): Update.
4210         * target-descriptions.h (record_xml_tdesc): Update comment.
4211
4212 2018-07-30  Andrew Burgess  <andrew.burgess@embecosm.com>
4213
4214         * eval.c (evaluate_subexp_for_sizeof): Check for array type before
4215         checking array bounds are defined.
4216
4217 2018-07-30  Tom Tromey  <tom@tromey.com>
4218
4219         * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
4220         irreflexivity violation.
4221
4222 2018-07-30  Tom Tromey  <tom@tromey.com>
4223
4224         * cli/cli-decode.c (lookup_cmd): Remove lint code.
4225         * value.c (unpack_long): Remove lint code.
4226         * valops.c (value_ind): Remove lint code.
4227         * valarith.c (value_x_binop, value_x_unop, value_equal)
4228         (value_pos): Remove lint code.
4229
4230 2018-07-28  Tom de Vries  <tdevries@suse.de>
4231
4232         * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
4233         with undefined upper bound as <optimized out>.
4234
4235 2018-07-27  Sergio Durigan Junior  <sergiodj@redhat.com>
4236
4237         * gcore.in: Rename variable "name" to "prefix".  Expand
4238         "usage" text.
4239
4240 2018-07-14  Jon Turney  <jon.turney@dronecode.org.uk>
4241
4242         * windows-nat.c (windows_nat_target::create_inferior): Update to
4243         call close() in global namespace.
4244
4245 2018-07-26  Tom Tromey  <tom@tromey.com>
4246
4247         * dwarf-index-write.c (add_address_entry): Don't add objfile
4248         offsets.
4249         * dbxread.c (find_stab_function): Rename from
4250         find_stab_function_addr.  Return a bound_minimal_symbol.
4251         (read_dbx_symtab): Use raw_text_low, raw_text_high.
4252         Don't add objfile offsets.
4253         (end_psymtab): Use raw_text_low, raw_text_high,
4254         MSYMBOL_VALUE_RAW_ADDRESS.
4255         (read_ofile_symtab): Update.
4256         (process_one_symbol): Update.
4257         * dwarf2read.c (create_addrmap_from_index): Don't add objfile
4258         offsets.
4259         (dw2_relocate): Remove.
4260         (dw2_find_pc_sect_symtab): Bias PC by the text offset before
4261         searching addrmap.
4262         (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
4263         Update.
4264         (process_psymtab_comp_unit_reader, add_partial_symbol)
4265         (add_partial_subprogram, dwarf2_ranges_read): Update.
4266         (load_partial_dies): Update.
4267         (add_address_entry): Don't add objfile offsets.
4268         (dwarf2_build_include_psymtabs): Update.
4269         (create_addrmap_from_aranges): Don't add objfile offsets.
4270         (dw2_find_pc_sect_compunit_symtab): Update.
4271         * mdebugread.c (parse_symbol): Don't add objfile offsets.
4272         (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
4273         Update.
4274         (parse_partial_symbols): Don't add objfile offsets.  Use
4275         raw_text_low, raw_text_high.  Update.
4276         (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
4277         * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
4278         or call 'relocate' quick function.  Clear psymbol_map.
4279         * psympriv.h (struct partial_symbol) <address>: Add section
4280         offset.
4281         <set_unrelocated_address>: Rename from set_address.
4282         <raw_text_low, raw_text_high>: New methods.
4283         <text_low, text_high>: Add objfile parameter.
4284         (add_psymbol_to_bcache): Add 'section' parameter.  Call
4285         set_unrelocated_address.
4286         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
4287         (find_pc_psymbol): Update.
4288         (fixup_psymbol_section, relocate_psymtabs): Remove.
4289         (dump_psymtab, psym_functions): Update.
4290         (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
4291         parameter.
4292         (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
4293         (start_psymtab_common): Update.
4294         * symfile-debug.c (debug_qf_relocate): Remove.
4295         (debug_sym_quick_functions): Update.
4296         * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
4297         * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
4298         Update.
4299
4300 2018-07-26  Tom Tromey  <tromey@redhat.com>
4301
4302         * dbxread.c (end_psymtab): Use text_high_valid and
4303         text_low_valid.
4304         * mdebugread.c (parse_partial_symbols): Use text_low_valid.
4305         (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
4306         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
4307         Update comment.
4308         <text_low_valid, text_high_valid>: New fields.
4309         <set_text_low, set_text_high>: Update.
4310         * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
4311
4312 2018-07-26  Tom Tromey  <tom@tromey.com>
4313
4314         * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
4315         Update.
4316         * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
4317         textlow and texthigh fields.
4318         (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
4319         Update.
4320         * mdebugread.c (parse_lines, parse_partial_symbols)
4321         (psymtab_to_symtab_1): Update.
4322         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
4323         Rename fields.  Update comment.  Now private.
4324         <text_low, text_high, set_text_low, set_text_high>: New methods.
4325         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
4326         (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
4327         (start_psymtab_common, maintenance_info_psymtabs)
4328         (maintenance_check_psymtabs): Update.
4329         * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
4330         texthigh fields.
4331         (scan_xcoff_symtab): Update.
4332
4333 2018-07-26  Tom Tromey  <tromey@redhat.com>
4334
4335         * psympriv.h (struct partial_symbol) <unrelocated_address,
4336         address, set_address>: New methods.
4337         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
4338         (fixup_psymbol_section, relocate_psymtabs): Update.
4339         (print_partial_symbols): Add 'objfile' parameter.  Update.
4340         (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
4341         Update.
4342
4343 2018-07-26  Tom Tromey  <tom@tromey.com>
4344
4345         * dwarf-index-write.c (write_psymbols, debug_names::insert)
4346         (debug_names::write_psymbols): Update.
4347         * psympriv.h (struct partial_symbol): Derive from
4348         general_symbol_info.
4349         <obj_section>: New method.
4350         (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
4351         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
4352         (find_pc_sect_psymbol, fixup_psymbol_section)
4353         (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
4354         (print_partial_symbols, recursively_search_psymtabs)
4355         (compare_psymbols, psymbol_hash, psymbol_compare)
4356         (add_psymbol_to_bcache, maintenance_check_psymtabs)
4357         (psymbol_name_matches, psym_fill_psymbol_map): Update.
4358
4359 2018-07-26  Tom Tromey  <tromey@redhat.com>
4360
4361         * dbxread.c (end_psymtab): Remove dead code.
4362
4363 2018-07-26  Andrew Burgess  <andrew.burgess@embecosm.com>
4364
4365         * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
4366         DWARF unwinders are disabled.
4367         * dwarf2-frame.c: Add dwarf2read.h include.
4368         (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
4369         disabled.
4370         (dwarf2_frame_unwinders_enabled_p): Define.
4371         (show_dwarf_unwinders_enabled_p): New function.
4372         (_initialize_dwarf2_frame): Register switch to control DWARF
4373         unwinder use.
4374         * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
4375         * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
4376         (show_dwarf_cmdlist): Remove static keyword.
4377         * dwarf2read.h (set_dwarf_cmdlist): Declare.
4378         (show_dwarf_cmdlist): Declare.
4379         * NEWS: Document new feature.
4380
4381 2018-07-26  Tom de Vries  <tdevries@suse.de>
4382
4383         PR breakpoints/23366
4384         * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
4385
4386 2018-07-26  Tom de Vries  <tdevries@suse.de>
4387
4388         * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
4389         DW_AT_count can't be translated to a dynamic prop.
4390
4391 2018-07-25  Tom de Vries  <tdevries@suse.de>
4392
4393         * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
4394         try/catch.
4395
4396 2018-07-25  Jan Vrany  <jan.vrany@fit.cvut.cz>
4397
4398         * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
4399
4400 2018-07-25  Joel Brobecker  <brobecker@adacore.com>
4401
4402         * MAINTAINERS (Global Maintainers): Add Tom Tromey.
4403
4404 2018-07-24  Keith Seitz  <keiths@redhat.comt
4405
4406         PR symtab/23010
4407         * dwarf2read.c (dw2_add_symbol_to_list): New function.
4408         (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
4409         instead of add_symbol_to_list.
4410         (read_file_scope): Call prepare_one_comp_unit before reading
4411         any other DIEs.
4412
4413 2018-07-24  Simon Marchi  <simon.marchi@ericsson.com>
4414
4415         * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
4416
4417 2018-07-24  Tom Tromey  <tom@tromey.com>
4418
4419         * utils.c (malloc, realloc, free): Don't declare.
4420         * configure, config.in: Rebuild.
4421         * configure.ac: Don't check for declarations of free, malloc, or
4422         realloc.
4423
4424 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
4425
4426         * aarch64-linux-nat.c
4427         (aarch64_linux_nat_target::stopped_data_address): Remove unused
4428         variable.
4429         * arm-linux-nat.c (fetch_regs): Likewise.
4430         (store_regs): Likewise.
4431         (fetch_vfp_regs): Likewise.
4432         (store_vfp_regs): Likewise.
4433         (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
4434         (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
4435         (arm_linux_nat_target::insert_watchpoint): Likewise.
4436         (arm_linux_nat_target::remove_watchpoint): Likewise.
4437         * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
4438         Likewise.
4439         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
4440         Likewise.
4441         * ppc-linux-nat.c (fetch_register): Likewise.
4442         (fetch_all_gp_regs): Likewise.
4443         (fetch_ppc_registers): Likewise.
4444         (store_all_gp_regs): Likewise.
4445         (store_ppc_registers): Likewise.
4446         (hwdebug_insert_point): Likewise.
4447         (can_use_watchpoint_cond_accel): Likewise.
4448         * remote-sim.c (gdb_os_write_stdout): Likewise.
4449
4450 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
4451             Tom Tromey  <tom@tromey.com>
4452
4453         * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
4454         test for it.
4455         * configure: Rebuild.
4456
4457 2018-07-22  Tom Tromey  <tom@tromey.com>
4458
4459         * regformats/regdat.sh: Define xmltarget_${name} inside
4460         #ifndef IN_PROCESS_AGENT.
4461
4462 2018-07-22  Tom Tromey  <tom@tromey.com>
4463
4464         * value.c (value_fetch_lazy_bitfield): Remove unused variable.
4465
4466 2018-07-22  Tom Tromey  <tom@tromey.com>
4467
4468         * symfile.c (reread_symbols): Notify iter, not objfile.
4469
4470 2018-07-22  Tom Tromey  <tom@tromey.com>
4471
4472         * ravenscar-thread.c (ravenscar_thread_target::store_registers):
4473         Use arch_ops.
4474         (ravenscar_thread_target::prepare_to_store): Likewise.
4475
4476 2018-07-22  Tom Tromey  <tom@tromey.com>
4477
4478         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
4479         unused variable.  Call value_fetch_lazy when needed.
4480         * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
4481         Remove unused variable.  Call value_fetch_lazy when needed.
4482
4483 2018-07-22  Tom Tromey  <tom@tromey.com>
4484
4485         * m32c-tdep.c (mark_dma): Return void.
4486         (make_regs): Remove unused declarations.
4487
4488 2018-07-22  Tom Tromey  <tom@tromey.com>
4489
4490         * guile/scm-cmd.c (gdbscm_dont_repeat): Call
4491         cmdscm_get_valid_command_smob_arg_unsafe for effect.
4492         * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
4493         bkscm_get_valid_block_smob_arg_unsafe for effect.
4494
4495 2018-07-22  Tom Tromey  <tom@tromey.com>
4496
4497         * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
4498         value_type.
4499
4500 2018-07-22  Tom Tromey  <tom@tromey.com>
4501
4502         * windows-nat.c (saved_context): Conditionally define.
4503         * remote.c (remote_target::remote_btrace_maybe_reopen):
4504         Conditionally declare "warned".
4505         * inflow.c (sigquit_ours): Conditionally define.
4506         (new_tty): Move "tty" declaration inside #if.
4507         * guile/guile.c (guile_datadir): Conditionally define.
4508         * charset.c (set_be_le_names): Move some declarations inside #if.
4509         * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
4510         #if.
4511         (parse_xml_btrace_conf): Likewise.
4512
4513 2018-07-22  Tom Tromey  <tom@tromey.com>
4514
4515         * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
4516
4517 2018-07-22  Tom Tromey  <tom@tromey.com>
4518
4519         * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
4520         * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
4521         (vlscm_convert_typed_value_from_scheme): Remove unused variable.
4522         * buildsym-legacy.c (get_macro_table): Remove unused variable.
4523         * stack.c (frame_apply_level_command): Remove unused variable.
4524         * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
4525         * sparc64-tdep.c (adi_examine_command): Remove unused variable.
4526         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
4527         unused variable.
4528         * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
4529         * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
4530         * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
4531         variable.
4532         * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
4533         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
4534         variable.
4535         * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
4536         Remove unused variable.
4537         * cli/cli-script.c (recurse_read_control_structure): Remove unused
4538         variable.
4539         * common/tdesc.c (print_xml_feature::visit): Remove unused
4540         variable.
4541         * compile/compile-object-load.c (store_regs): Remove unused
4542         variables.
4543         * complaints.c (clear_complaints): Remove unused variable.
4544         * corelow.c (core_target_open): Remove unused variable.
4545         * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
4546         variable.
4547         * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
4548         variable.
4549         * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
4550         variable.
4551         * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
4552         variable.
4553         * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
4554         variable.
4555         * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
4556         variable.
4557         * ia64-tdep.c (examine_prologue): Remove unused variable.
4558         * infcall.c (run_inferior_call): Remove unused variable.
4559         * inferior.c (exit_inferior): Remove unused variable.
4560         * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
4561         * linespec.c (decode_line_2): Remove unused variable.
4562         * linux-nat.c (super_close): Remove.
4563         * linux-tdep.c (linux_info_proc): Remove unused variable.
4564         * mi/mi-main.c (mi_execute_command): Remove unused variable.
4565         * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
4566         Remove unused variable.
4567         * parse.c (find_minsym_type_and_address): Remove unused variable.
4568         * printcmd.c (info_symbol_command, printf_floating): Remove unused
4569         variable.
4570         * python/py-breakpoint.c (bppy_set_commands): Remove unused
4571         variable.
4572         * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
4573         variables.
4574         * record-btrace.c (record_btrace_target::store_registers): Remove
4575         unused variable.
4576         (cmd_show_record_btrace_cpu): Remove unused variable.
4577         * riscv-tdep.c (riscv_register_reggroup_p)
4578         (riscv_push_dummy_call, riscv_return_value): Remove unused
4579         variable.
4580         * rust-exp.y (literal): Remove unused variable.
4581         * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
4582         unused variable.
4583         <STRUCTOP_ANONYMOUS>: Likewise.
4584         * s390-linux-tdep.c (s390_linux_init_abi_31)
4585         (s390_linux_init_abi_64): Remove unused variable.
4586         * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
4587         (file_select_thread, net_windows_open, _initialize_ser_windows):
4588         Remove unused variables.
4589         * symtab.c (find_pc_sect_line): Remove unused variable.
4590         * target-memory.c (compute_garbled_blocks): Remove unused
4591         variable.
4592         (target_write_memory_blocks): Remove unused variable.
4593         * target.c (target_stack::unpush): Remove unused variables.
4594         * tracepoint.c (start_tracing, all_tracepoint_actions)
4595         (merge_uploaded_trace_state_variables)
4596         (print_one_static_tracepoint_marker): Remove unused variable.
4597         * unittests/basic_string_view/element_access/char/1.cc (test01):
4598         Remove unused variable.
4599         * windows-nat.c (windows_continue, windows_add_all_dlls)
4600         (do_initial_windows_stuff, windows_nat_target::create_inferior):
4601         Remove unused variables.
4602
4603 2018-07-21  Simon Marchi  <simon.marchi@polymtl.ca>
4604
4605         * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
4606         attr_profile in HAVE_ELF.
4607         * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
4608         HAVE_ELF.
4609
4610 2018-07-20  Simon Marchi  <simon.marchi@polymtl.ca>
4611
4612         * frame.c (frame_register_unwind): Change parameter name.
4613         (frame_unwind_register): Likewise.
4614         (frame_unwind_register_value): Likewise.
4615         (frame_unwind_register_signed): Likewise.
4616         (frame_unwind_register_unsigned): Likewise.
4617         * frame.h (frame_register_unwind): Likewise.
4618         (frame_unwind_register): Likewise.
4619         (frame_unwind_register_value): Likewise.
4620         (frame_unwind_register_signed): Likewise.
4621         (frame_unwind_register_unsigned): Likewise.
4622         (frame_unwind_arch): Likewise.
4623
4624 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
4625
4626         * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
4627         ISA maintenance.
4628
4629 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
4630
4631         * mips-linux-nat.c (mips_linux_nat_target::read_description):
4632         Call `get_ptrace_pid' rather than extracting the ptrace PID by
4633         hand.
4634
4635 2018-07-20  Keith Seitz  <keiths@redhat.com>
4636
4637         * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
4638         m_main_subfile, m_comp_dir, m_producer, m_debugformat,
4639         m_compunit_symtab, m_language>: Add "m_" prefix.
4640         Update all uses.
4641         * buildsym.c: Update all uses.
4642
4643 2018-07-20  Tom Tromey  <tom@tromey.com>
4644
4645         * buildsym-legacy.h (record_line): Don't use record_line_ftype.
4646         * buildsym.h (record_line_ftype): Remove typedef.
4647
4648 2018-07-20  Tom Tromey  <tom@tromey.com>
4649
4650         * buildsym-legacy.h (augment_type_symtab): Don't declare.
4651         (end_expandable_symtab): Likewise.
4652         (end_symtab_get_static_block): Likewise.
4653         (end_symtab_from_static_block): Likewise.
4654         * buildsym-legacy.c (augment_type_symtab): Remove.
4655         (end_expandable_symtab): Remove.
4656         (end_symtab_get_static_block): Remove.
4657         (end_symtab_from_static_block): Remove.
4658
4659 2018-07-20  Tom Tromey  <tom@tromey.com>
4660
4661         * dwarf2read.c: Include buildsym.h.
4662         (struct dwarf2_cu) <builder>: New method.
4663         (fixup_go_packaging): Update.
4664         (process_full_comp_unit, process_full_type_unit): Update.  Don't
4665         use scoped_free_pendings.
4666         (using_directives): Add "cu" parameter, remove "language".
4667         (read_import_statement, setup_type_unit_groups, )
4668         (read_func_scope, read_lexical_block_scope)
4669         (dwarf2_record_block_ranges, read_namespace): Update.
4670         (lnp_state_machine::lnp_state_machine): Add cu parameter.
4671         (lnp_state_machine::handle_end_sequence): Update.
4672         (class lnp_state_machine) <m_cu>: New member.
4673         <m_record_line_callback>: Remove.
4674         <m_currently_recording_lines>: New member.
4675         (lnp_state_machine::handle_set_file): Update.
4676         (noop_record_line): Remove.
4677         (dwarf_record_line_p): Add cu parameter.
4678         (dwarf_record_line_1, dwarf_finish_line): Likewise.
4679         (lnp_state_machine::record_line)
4680         (lnp_state_machine::lnp_state_machine)
4681         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
4682         (dwarf_decode_lines): Update.
4683         (dwarf2_start_subfile): Add cu parameter.
4684         (dwarf2_start_symtab, new_symbol): Update.
4685         (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
4686         Remove dwarf2_per_objfile parameter.
4687         (dwarf_decode_macros): Update.
4688
4689 2018-07-20  Tom Tromey  <tom@tromey.com>
4690
4691         * stabsread.c (define_symbol): Update.
4692         * buildsym-legacy.h (get_buildsym_compunit): Declare.
4693         * dwarf2read.c (new_symbol): Update.
4694         * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
4695         * cp-namespace.c: Include buildsym.h.
4696         (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
4697         * buildsym-legacy.c (get_buildsym_compunit): New function.
4698
4699 2018-07-20  Tom Tromey  <tom@tromey.com>
4700
4701         * xcoffread.c: Include buildsym-legacy.h.
4702         * windows-nat.c: Include buildsym-legacy.h.
4703         * stabsread.c: Include buildsym-legacy.h.
4704         * mdebugread.c: Include buildsym-legacy.h.
4705         * buildsym-legacy.h: New file.
4706         * buildsym-legacy.c: New file, from buildsym.c.
4707         * go32-nat.c: Include buildsym-legacy.h.
4708         * dwarf2read.c: Include buildsym-legacy.h.
4709         * dbxread.c: Include buildsym-legacy.h.
4710         * cp-namespace.c: Include buildsym-legacy.h.
4711         * coffread.c: Include buildsym-legacy.h.
4712         * buildsym.h: Move some contents to buildsym-legacy.h.
4713         * buildsym.c: Include buildsym-legacy.h.  Move many functions to
4714         buildsym-legacy.c.
4715         * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
4716
4717 2018-07-20  Tom Tromey  <tom@tromey.com>
4718
4719         * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
4720         * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
4721         (buildsym_compunit::buildsym_compunit)
4722         (buildsym_compunit::~buildsym_compunit)
4723         (buildsym_compunit::get_macro_table): Define.
4724
4725 2018-07-20  Tom Tromey  <tom@tromey.com>
4726
4727         * buildsym.c (reset_symtab_globals): Remove.
4728         (buildsym_compunit::end_symtab_from_static_block): Update.
4729         (buildsym_compunit::augment_type_symtab): Update.
4730         (end_symtab_from_static_block): Call free_buildsym_compunit.
4731         (augment_type_symtab, end_symtab, end_expandable_symtab):
4732         Likewise.
4733
4734 2018-07-20  Tom Tromey  <tom@tromey.com>
4735
4736         * arch-utils.c: Do not include buildsym.h.
4737         * mipsread.c: Do not include buildsym.h.
4738         * machoread.c: Do not include buildsym.h.
4739         * elfread.c: Do not include buildsym.h.
4740
4741 2018-07-20  Tom Tromey  <tom@tromey.com>
4742
4743         * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
4744         initialization.
4745         (buildsym_compunit): Add new constructor.
4746         (struct buildsym_compunit) <get_last_source_file, finish_block,
4747         record_block_range, start_subfile, patch_subfile_names,
4748         push_subfile, pop_subfile, record_line, get_compunit_symtab,
4749         set_last_source_start_addr, get_last_source_start_addr,
4750         get_local_using_directives, set_local_using_directives,
4751         get_global_using_directives, outermost_context_p,
4752         get_current_context_stack, get_context_stack_depth,
4753         get_current_subfile, get_local_symbols, get_file_symbols,
4754         get_global_symbols, record_debugformat, record_producer,
4755         push_context, pop_context, end_symtab_get_static_block,
4756         end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
4757         New public methods.
4758         <record_pending_block, finish_block_internal, make_blockvector,
4759         watch_main_source_file_lossage, end_symtab_with_blockvector>: New
4760         private methods.
4761         Update all users.
4762
4763 2018-05-22  Tom Tromey  <tom@tromey.com>
4764
4765         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
4766         parameter.
4767         (finish_block_internal): Update.
4768
4769 2018-07-20  Tom Tromey  <tom@tromey.com>
4770
4771         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
4772         parameter.
4773         (finish_block_internal): Update.
4774
4775 2018-07-20  Tom Tromey  <tom@tromey.com>
4776
4777         * buildsym.h (EXTERN): Don't define or undef.
4778         * buildsym.c (EXTERN): Don't define.
4779
4780 2018-07-20  Tom Tromey  <tom@tromey.com>
4781
4782         * buildsym.c: Remove TODO comment.
4783
4784 2018-07-20  Tom Tromey  <tom@tromey.com>
4785
4786         * coffread.c (coff_symtab_read): Update.
4787         * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
4788         (xcoff_new_init): Update.
4789         * mipsread.c (mipscoff_new_init): Update.
4790         * mdebugread.c (mdebug_build_psymtabs): Update.
4791         * elfread.c (elf_new_init): Update.
4792         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
4793         Update.
4794         * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
4795         (coffstab_build_psymtabs, elfstab_build_psymtabs)
4796         (stabsect_build_psymtabs): Update.
4797         * buildsym.h (buildsym_init): Don't declare.
4798         * buildsym.c: Update comment.
4799         (prepare_for_building): Remove.
4800         (start_symtab, restart_symtab): Update.
4801         (reset_symtab_globals): Update comment.
4802         (buildsym_init): Remove.
4803
4804 2018-07-20  Tom Tromey  <tom@tromey.com>
4805
4806         * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
4807         * stabsread.c (patch_block_stabs, define_symbol, read_type)
4808         (read_enum_type, common_block_start, common_block_end)
4809         (cleanup_undefined_types_1, finish_global_stabs): Update.
4810         * mdebugread.c (psymtab_to_symtab_1): Update.
4811         * dwarf2read.c (fixup_go_packaging, read_func_scope)
4812         (read_lexical_block_scope, new_symbol): Update.
4813         * dbxread.c (process_one_symbol): Update.
4814         * coffread.c (coff_symtab_read, process_coff_symbol)
4815         (coff_read_enum_type): Update.
4816         * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
4817         declare.
4818         (get_local_symbols, get_file_symbols, get_global_symbols): New
4819         functions.
4820         * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
4821         m_global_symbols.
4822         <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
4823         (~scoped_free_pendings): Update.
4824         (finish_block, prepare_for_building, reset_symtab_globals)
4825         (end_symtab_get_static_block, end_symtab_with_blockvector)
4826         (augment_type_symtab, push_context): Update.
4827         (get_local_symbols, get_file_symbols, get_global_symbols): New
4828         functions.
4829         (buildsym_init): Update.
4830
4831 2018-07-20  Tom Tromey  <tom@tromey.com>
4832
4833         * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
4834         (process_full_type_unit): Likewise.
4835         (dwarf2_start_symtab): Set list_in_scope.
4836
4837 2018-07-20  Tom Tromey  <tom@tromey.com>
4838
4839         * dwarf2read.c (process_psymtab_comp_unit_reader)
4840         (build_type_psymtabs_reader): Do not set list_in_scope.
4841
4842 2018-07-20  Tom Tromey  <tom@tromey.com>
4843
4844         * buildsym.c (free_pendings): Remove.
4845         (add_symbol_to_list, scoped_free_pendings)
4846         (finish_block_internal, buildsym_init): Update.
4847
4848 2018-07-20  Tom Tromey  <tom@tromey.com>
4849
4850         * xcoffread.c (read_xcoff_symtab): Update.
4851         * dwarf2read.c (read_func_scope, read_lexical_block_scope):
4852         Update.
4853         * dbxread.c (process_one_symbol): Update.
4854         * coffread.c (coff_symtab_read): Update.
4855         * buildsym.h (finish_block): Update.
4856         * buildsym.c (finish_block): Remove "listhead" argument.
4857         (end_symtab_get_static_block): Update.
4858
4859 2018-07-20  Tom Tromey  <tom@tromey.com>
4860
4861         * buildsym.h (class scoped_free_pendings): Remove constructor.
4862         * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
4863         method.
4864         <m_pending_block_obstack, m_pending_blocks>: New members.
4865         (pending_block_obstack, pending_blocks): Remove.
4866         (scoped_free_pendings::scoped_free_pendings): Default.
4867         (~scoped_free_pendings): Update.
4868         (free_pending_blocks): Remove.
4869         (finish_block_internal, record_pending_block, make_blockvector)
4870         (end_symtab_get_static_block, augment_type_symtab, push_context)
4871         (buildsym_init): Update.
4872
4873 2018-07-20  Tom Tromey  <tom@tromey.com>
4874
4875         * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
4876         m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
4877         members.
4878         (pending_addrmap, pending_addrmap_obstack)
4879         (pending_addrmap_interesting): Remove.
4880         (scoped_free_pendings, record_block_range, make_blockvector)
4881         (prepare_for_building, reset_symtab_globals, buildsym_init):
4882         Update.
4883
4884 2018-07-20  Tom Tromey  <tom@tromey.com>
4885
4886         * xcoffread.c (process_linenos): Update.
4887         * stabsread.c (define_symbol, read_type, read_enum_type): Update.
4888         * mdebugread.c (psymtab_to_symtab_1): Update.
4889         * dwarf2read.c (setup_type_unit_groups)
4890         (lnp_state_machine::handle_set_file, dwarf_record_line_p)
4891         (lnp_state_machine::record_line, dwarf_decode_lines): Update.
4892         * dbxread.c (process_one_symbol): Update.
4893         * coffread.c (coff_symtab_read, enter_linenos)
4894         (process_coff_symbol): Update.
4895         * buildsym.h (current_subfile): Don't declare.
4896         (get_current_subfile): Declare.
4897         * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
4898         member.
4899         (start_subfile, free_buildsym_compunit, push_subfile)
4900         (prepare_for_building, start_symtab): Update.
4901         (get_current_subfile): New function.
4902
4903 2018-07-20  Tom Tromey  <tom@tromey.com>
4904
4905         * coffread.c (coff_symtab_read): Update.
4906         * xcoffread.c (read_xcoff_symtab): Update.
4907         * dwarf2read.c (new_symbol): Update.
4908         (read_func_scope, read_lexical_block_scope): Update.
4909         * dbxread.c (process_one_symbol): Update.
4910         * buildsym.h (context_stack, context_stack_depth): Don't declare.
4911         (outermost_context_p): Remove macro.
4912         (outermost_context_p, get_current_context_stack)
4913         (get_context_stack_depth): Declare.
4914         (pop_context): Return struct context_stack.
4915         * buildsym.c (struct buildsym_compunit) <m_context_stack: New
4916         member.
4917         (context_stack_size): Remove.
4918         (INITIAL_CONTEXT_STACK_SIZE): Remove.
4919         (prepare_for_building, end_symtab_get_static_block)
4920         (augment_type_symtab, push_context): Update.
4921         (pop_context): Return struct context_stack.
4922         (outermost_context_p, get_current_context_stack)
4923         (get_context_stack_depth): New functions.
4924         (buildsym_init): Update.
4925
4926 2018-07-20  Tom Tromey  <tom@tromey.com>
4927
4928         * rust-exp.y: Now a pure parser.  Update all rules.
4929         (%union): Move earlier.
4930         (current_parser, work_obstack): Remove globals.
4931         (rust_parser, ~rust_parser): Update.
4932         (class rust_parser) <copy_name, concat3, crate_name, super_name,
4933         lex_character, lex_number, lex_string, lex_identifier,
4934         rust_lookup_type, convert_params_to_types, convert_ast_to_type,
4935         convert_name, convert_params_to_expression,
4936         convert_ast_to_expression, ast_basic_type, ast_operation,
4937         ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
4938         ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
4939         ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
4940         ast_array_type, ast_slice_type, ast_reference_type,
4941         ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
4942         (rust_parse): Update.
4943         (rustyyerror, rustyylex): Add parser parameter.
4944         (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
4945         (rust_lex_stringish_test, rust_lex_test_sequence)
4946         (rust_lex_test_trailing_dot, rust_lex_test_completion)
4947         (rust_lex_test_push_back, rust_lex_tests): Update.
4948
4949 2018-07-19  Pedro Alves  <palves@redhat.com>
4950
4951         * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
4952         gdb::unique_xmalloc_ptr.
4953         * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
4954         Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
4955         * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
4956         copy-initialization.
4957         * guile/scm-pretty-print.c (ppscm_print_children): Use
4958         gdb::unique_xmalloc_ptr instead of cleanups.
4959         (gdbscm_apply_val_pretty_printer): Remove cleanups.
4960         * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
4961         gdb::unique_xmalloc_ptr.
4962         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
4963         Adjust to use gdb::unique_xmalloc_ptr.
4964         * guile/scm-utils.c (extract_arg): Adjust.
4965         * guile/scm-value.c (gdbscm_value_field): Adjust to use
4966         gdb::unique_xmalloc_ptr instead of a cleanup.
4967
4968 2018-07-19  Tom Tromey  <tom@tromey.com>
4969
4970         * utils.c (do_value_free_to_mark)
4971         (make_cleanup_value_free_to_mark): Remove.
4972         * utils.h (make_cleanup_value_free_to_mark): Remove.
4973
4974 2018-07-19  Pedro Alves  <palves@redhat.com>
4975
4976         * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
4977         forwarding reference.
4978
4979 2018-07-18  Pedro Alves  <palves@redhat.com>
4980
4981         * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
4982         gdbscm_wrap.  Use gdb::unique_xmalloc_ptr<char> instead of a
4983         cleanup.
4984
4985 2018-07-18  Pedro Alves  <palves@redhat.com>
4986
4987         * guile/guile-internal.h: Add comment about mixing GDB and Scheme
4988         exceptions.
4989         (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
4990         (gdbscm_wrap): New.
4991         * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
4992         directly instead of a cleanup.
4993         * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
4994         (vlscm_unop): ... this.  Reimplement using gdbscm_wrap.
4995         (vlscm_binop_gdbthrow): New, factored out from ...
4996         (vlscm_binop): ... this.  Reimplement using gdbscm_wrap.
4997         (vlscm_rich_compare): Use gdbscm_wrap.
4998         * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
4999         instead of a cleanup.
5000         (gdbscm_lookup_global_symbol): Use xfree directly instead of a
5001         cleanup.
5002         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
5003         Use xfree directly instead of a cleanup.
5004         * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
5005         Adjust to use gdbscm_wrap and scoped_value_mark.
5006         (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
5007         (gdbscm_value_address, gdbscm_value_dereference)
5008         (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
5009         scoped_value_mark.
5010         (gdbscm_value_dynamic_type): Use scoped_value_mark.
5011         (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
5012         scoped_value_mark.
5013         (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
5014         gdbscm_wrap and scoped_value_mark.
5015         (gdbscm_value_to_string): Use xfree directly instead of a
5016         cleanup.  Move 'buffer' unique_ptr to TRY scope.
5017         (gdbscm_value_to_lazy_string): Use xfree directly instead of a
5018         cleanup.  Move 'buffer' unique_ptr to TRY scope.  Use
5019         scoped_value_mark.
5020         (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
5021         (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
5022         scoped_value_mark.
5023         (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
5024         gdbscm_wrap.
5025
5026 2018-07-18  Tom de Vries  <tdevries@suse.de>
5027
5028         * findvar.c (default_read_var_value): Also resolve dynamic type for
5029         LOC_OPTIMIZED_OUT vars.
5030
5031 2018-07-18  Maciej W. Rozycki  <macro@mips.com>
5032
5033         * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
5034         decoding.
5035
5036 2018-07-17  Tom Tromey  <tom@tromey.com>
5037
5038         * guile/scm-param.c (pascm_set_func, pascm_show_func)
5039         (compute_enum_list, pascm_set_param_value_x)
5040         (gdbscm_parameter_value): Update.
5041         * guile/guile-internal.h (gdbscm_scm_to_string): Update.
5042         (gdbscm_scm_to_host_string): Update.
5043         * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
5044         Update.
5045         * guile/scm-cmd.c (cmdscm_add_completion): Update.
5046         * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
5047         * guile/scm-string.c (gdbscm_scm_to_string): Return
5048         unique_xmalloc_ptr.
5049         (gdbscm_scm_to_host_string): Likewise.
5050
5051 2018-07-17  Tom Tromey  <tom@tromey.com>
5052
5053         * guile/guile.c (gdbscm_eval_from_control_command): Update.
5054         * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
5055         * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
5056         * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
5057         unique_xmalloc_ptr.
5058
5059 2018-07-17  Tom Tromey  <tom@tromey.com>
5060
5061         * guile/scm-param.c (pascm_signal_setshow_error): Update.
5062         * guile/guile-internal.h (gdbscm_exception_message_to_string):
5063         Update.
5064         * guile/scm-cmd.c (cmdscm_function): Update.
5065         * guile/scm-pretty-print.c
5066         (ppscm_print_exception_unless_memory_error): Update.
5067         * guile/scm-exception.c (gdbscm_exception_message_to_string):
5068         Return unique_xmalloc_ptr.
5069
5070 2018-07-17  Tom Tromey  <tom@tromey.com>
5071
5072         * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
5073         Use string_printf.
5074
5075 2018-07-17  Jim Wilson  <jimw@sifive.com>
5076
5077         * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
5078         set_gdbarch_decr_pc_after_break.  Call riscv_read_misa_reg always.
5079         (riscv_gdbarch_init): Delete local has_compressed_isa.  Delete now
5080         unecessary braces after EF_RISCV_RVC test.  Delete call to
5081         set_gdbarch_decr_pc_after_break.
5082
5083         * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
5084         RISCV_LAST_FP_REGNUM + 1.
5085         (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
5086
5087 2018-07-17  Tom Tromey  <tom@tromey.com>
5088
5089         * configure.ac: Remove --disable-gdbcli.
5090         * configure: Rebuild.
5091         * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
5092         (SUBDIR_CLI_CFLAGS): Remove.
5093         (SFILES): Use SUBDIR_CLI_SRCS.
5094         (COMMON_OBS): Use SUBDIR_CLI_OBS.
5095
5096 2018-07-17  Tom Tromey  <tom@tromey.com>
5097
5098         PR gdb/18624:
5099         * coffread.c (coff_symtab_read): Use scoped_free_pendings.
5100
5101 2018-07-16  Jim Wilson  <jimw@sifive.com>
5102
5103         * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
5104
5105 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
5106
5107         * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
5108         variable.
5109         (libunwind_frame_sniffer): Likewise.
5110         (libunwind_frame_prev_register): Likewise.
5111         (libunwind_sigtramp_frame_sniffer): Likewise.
5112         * ia64-tdep.c (ia64_access_reg): Likewise.
5113         (ia64_access_rse_reg): Likewise.
5114         (ia64_libunwind_sigtramp_frame_this_id): Likewise.
5115         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
5116
5117 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
5118
5119         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
5120
5121 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
5122
5123         * remote-sim.c (gdbsim_target::close,
5124         gdbsim_target::mourn_inferior): Remove unused variables.
5125
5126 2018-07-16  Simon Marchi  <simon.marchi@polymtl.ca>
5127
5128         * ia64-tdep.c (ktab_buf): New global.
5129         (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
5130         (get_kernel_table): Adjust.
5131
5132 2018-07-16  Tom Tromey  <tom@tromey.com>
5133
5134         * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
5135         * dwarf2read.c (using_directives, new_symbol): Use
5136         outermost_context_p.
5137         * dbxread.c (process_one_symbol): Use outermost_context_p.
5138         * coffread.c (coff_symtab_read): Use outermost_context_p.
5139
5140 2018-07-16  Tom Tromey  <tom@tromey.com>
5141
5142         * dwarf2read.c (using_directives, read_func_scope)
5143         (read_lexical_block_scope): Update.
5144         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
5145         * buildsym.h (local_using_directives, global_using_directives):
5146         Don't declare.
5147         (get_local_using_directives, set_local_using_directives)
5148         (get_global_using_directives): Declare.
5149         * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
5150         m_global_using_directives>: New members.
5151         (finish_block_internal, prepare_for_building)
5152         (reset_symtab_globals, end_symtab_get_static_block)
5153         (push_context): Update.
5154         (get_local_using_directives, set_local_using_directives)
5155         (get_global_using_directives): New functions.
5156         (buildsym_init): Update.
5157
5158 2018-07-16  Tom Tromey  <tom@tromey.com>
5159
5160         * xcoffread.c (xcoff_initial_scan): Don't call
5161         free_pending_blocks.
5162         * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
5163         * buildsym.h (class scoped_free_pendings): Add constructor.
5164         (free_pending_blocks): Don't declare.
5165         * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
5166         (free_pending_blocks): Now static.
5167
5168 2018-07-16  Tom Tromey  <tom@tromey.com>
5169
5170         * buildsym.h (push_subfile, pop_subfile): Update declarations.
5171         * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
5172         member.
5173         (struct subfile_stack): Remove.
5174         (subfile_stack): Remove.
5175         (push_subfile, pop_subfile, buildsym_init): Update.
5176
5177 2018-07-16  Tom Tromey  <tom@tromey.com>
5178
5179         * buildsym.c (push_subfile): Use gdb_assert.
5180         (pop_subfile): Use gdb_assert.
5181
5182 2018-07-16  Tom Tromey  <tom@tromey.com>
5183
5184         * buildsym.h (merge_symbol_lists): Remove.
5185         * buildsym.c (merge_symbol_lists): Remove.
5186
5187 2018-07-16  Tom Tromey  <tom@tromey.com>
5188
5189         * stabsread.c (scan_file_globals): Update comment.
5190         * stabsread.h (scan_file_globals): Move from buildsym.h.
5191         * buildsym.h (scan_file_globals): Move to stabsread.h.
5192
5193 2018-07-16  Tom Tromey  <tom@tromey.com>
5194
5195         * xcoffread.c (xcoff_new_init): Update.
5196         * mipsread.c (mipscoff_new_init): Update.
5197         * mdebugread.c (mdebug_build_psymtabs): Update.
5198         * elfread.c (elf_new_init): Update.
5199         * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
5200         (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
5201         * buildsym.h (buildsym_new_init): Don't declare.
5202         * buildsym.c (buildsym_new_init): Remove.
5203
5204 2018-07-16  Tom Tromey  <tom@tromey.com>
5205
5206         * stabsread.h (within_function): Move from buildsym.h.
5207         * stabsread.c (start_stabs): Clear within_function.
5208         * coffread.c (coff_start_symtab): Clear within_function.
5209         * buildsym.h (within_function): Move to stabsread.h.
5210         * buildsym.c (prepare_for_building): Update.
5211
5212 2018-07-16  Tom Tromey  <tom@tromey.com>
5213
5214         * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
5215         * dwarf2read.c (dwarf2_start_symtab): Don't set
5216         processing_gcc_compilation.
5217         * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
5218
5219 2018-07-16  Tom Tromey  <tom@tromey.com>
5220
5221         * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
5222         (next_symbol_text_func): Move from buildsym.h.
5223         * stabsread.c (hashname): Move from buildsym.c.
5224         * buildsym.h (HASHSIZE, symnum, next_symbol_text)
5225         (next_symbol_text_func, hashname): Move to stabsread.h.
5226         * buildsym.c: Don't include bcache.h
5227         (hashname): Move to stasbread.c.
5228
5229 2018-07-16  Tom Tromey  <tom@tromey.com>
5230
5231         * buildsym.h (context_stack_size): Don't declare.
5232         * buildsym.c (context_stack_size): New global.
5233
5234 2018-07-16  Tom Tromey  <tom@tromey.com>
5235
5236         * dbxread.c (processing_acc_compilation): New global.
5237         * buildsym.h (processing_acc_compilation): Don't declare.
5238
5239 2018-07-16  Tom Tromey  <tom@tromey.com>
5240
5241         * xcoffread.c (aix_process_linenos, complete_symtab): Update.
5242         * dbxread.c (read_ofile_symtab): Update.
5243         * coffread.c (coff_start_symtab, coff_end_symtab): Update.
5244         * buildsym.h (last_source_start_addr): Remove.
5245         (set_last_source_start_addr, get_last_source_start_addr):
5246         Declare.
5247         * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
5248         parameter.
5249         (struct buildsym_compunit) <m_last_source_start_addr>: New
5250         member.
5251         (prepare_for_building): Remove start_addr parameter.
5252         (start_symtab, restart_symtab, end_symtab_get_static_block)
5253         (end_symtab_with_blockvector): Update.
5254         (set_last_source_start_addr, get_last_source_start_addr): New
5255         functions.
5256
5257 2018-07-16  Tom Tromey  <tom@tromey.com>
5258
5259         * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
5260         member.
5261         (have_line_numbers): Remove.
5262         (record_line, prepare_for_building, end_symtab_get_static_block)
5263         (augment_type_symtab): Update.
5264
5265 2018-07-16  Tom Tromey  <tom@tromey.com>
5266
5267         * buildsym.c (~buildsym_compunit): Free the macro table.
5268         (struct buildsym_compunit) <get_macro_table, release_macros>: New
5269         methods.
5270         <m_pending_macros>: New member.
5271         (pending_macros): Remove.
5272         (~scoped_free_pendings, get_macro_table, prepare_for_building)
5273         (reset_symtab_globals, end_symtab_get_static_block)
5274         (end_symtab_with_blockvector, augment_type_symtab)
5275         (buildsym_init): Update.
5276
5277 2018-07-16  Tom Tromey  <tom@tromey.com>
5278
5279         * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
5280         parameter.
5281         (buildsym_compunit::set_last_source_file): New method.
5282         <m_last_source_file>: New member.
5283         (prepare_for_building): Remove "name" parameter.
5284         (start_symtab, restart_symtab, reset_symtab_globals): Update.
5285         (last_source_file): Remove.
5286         (set_last_source_file, get_last_source_file): Update.
5287
5288 2018-07-16  Tom Tromey  <tom@tromey.com>
5289
5290         * buildsym.c (prepare_for_building): Add assert.
5291
5292 2018-07-16  Tom Tromey  <tom@tromey.com>
5293
5294         * buildsym.c (~buildsym_compunit): Update.
5295         (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
5296         (start_subfile, patch_subfile_names)
5297         (end_symtab_with_blockvector): Update.
5298
5299 2018-07-16  Tom Tromey  <tom@tromey.com>
5300
5301         * buildsym.c (struct buildsym_compunit): Add constructor,
5302         destructor, initializers.
5303         (start_buildsym_compunit): Remove.
5304         (free_buildsym_compunit): Use "delete".
5305         (start_symtab, restart_symtab): Use "new".
5306
5307 2018-07-13  Simon Marchi  <simon.marchi@polymtl.ca>
5308
5309         * symfile.c (set_objfile_default_section_offset): Remove struct
5310         keyword.
5311
5312 2018-07-14  Stafford Horne  <shorne@gmail.com>
5313
5314         * (Responsible Maintainers): Add myself as or1k maintainer.
5315
5316 2018-07-13  Tom Tromey  <tom@tromey.com>
5317
5318         * symfile.c (set_objfile_default_section_offset): Use extra braces
5319         around initializer.
5320
5321 2018-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5322
5323         * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
5324         non-branching basr.
5325
5326 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5327
5328         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5329         unittests/cli-utils-selftests.c
5330         * unittests/cli-utils-selftests.c: New file.
5331
5332 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5333
5334         * NEWS: Mention new commands. Mention change to 'thread apply'.
5335
5336 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5337
5338         * thread.c (thr_try_catch_cmd): New function.
5339         (thread_apply_all_command): Handle qcs flags.
5340         (thread_apply_command): Handle qcs flags.
5341         (taas_command): New function.
5342         (tfaas_command): New function.
5343         (_initialize_thread): Update to setup the new commands 'taas
5344         and 'tfaas'. Change doc string for 'thread apply'.
5345
5346 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5347
5348         * stack.c: (trailing_outermost_frame): New function, mostly
5349         extracted from backtrace_command_1.
5350         (leading_innermost_frame): New function.
5351         (backtrace_command_1): Update to call trailing_outermost_frame.
5352         (frame_apply_command_count): New function.
5353         (frame_apply_level_command): New function.
5354         (frame_apply_all_command): New function.
5355         (frame_apply_command): New function.
5356         (faas_command): New function.
5357         (frame_cmd_list): New variable.
5358         (_initialize_stack): Update to setup the new commands 'frame apply'
5359         and 'faas'.
5360
5361 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5362
5363         * cli-utils.c (number_or_range_parser::get_number): Only handle
5364         numbers or convenience var as numbers.
5365         (parse_flags): New function.
5366         (parse_flags_qcs): New function.
5367         (number_or_range_parser::finished): Ensure parsing end is detected
5368         before end of string.
5369         * cli-utils.h (parse_flags): New function.
5370         (parse_flags_qcs): New function.
5371         (number_or_range_parser): Remove m_finished bool.
5372         (number_or_range_parser::skip_range): Set m_in_range to false.
5373
5374 2018-07-12  Sergio Durigan Junior  <sergiodj@redhat.com>
5375
5376         * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
5377         on Windows.
5378
5379 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
5380             Jan Kratochvil  <jan.kratochvil@redhat.com>
5381             Paul Fertser  <fercerpav@gmail.com>
5382             Tsutomu Seki  <sekiriki@gmail.com>
5383             Pedro Alves  <palves@redhat.com>
5384
5385         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5386         'unittests/parse-connection-spec-selftests.c'.
5387         (COMMON_SFILES): Add 'common/netstuff.c'.
5388         (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
5389         * NEWS (Changes since GDB 8.2): Mention IPv6 support.
5390         * common/netstuff.c: New file.
5391         * common/netstuff.h: New file.
5392         * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
5393         (wait_for_connect): Update comment.  New parameter
5394         'gdb::optional<int> sock' instead of 'struct serial *scb'.
5395         Use 'sock' directly instead of 'scb->fd'.
5396         (try_connect): New function, with code from 'net_open'.
5397         (net_open): Rewrite main loop to deal with multiple
5398         sockets/addresses.  Handle IPv6-style hostnames; implement
5399         support for IPv6 connections.
5400         * unittests/parse-connection-spec-selftests.c: New file.
5401
5402 2018-07-11  Pedro Alves  <palves@redhat.com>
5403
5404         PR gdb/23377
5405         * remote.c (remote_target::remote_detach_pid): Call
5406         set_current_process.
5407
5408 2018-07-11  Pedro Alves  <palves@redhat.com>
5409
5410         * h8300-tdep.c (h8300_gdbarch_init): Remove
5411         set_gdbarch_ecoff_reg_to_regnum calls.
5412
5413 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
5414
5415         PR c++/23373
5416         * c-typeprint.c (c_type_print_base_struct_union): Don't print
5417         offsets/sizes for static members of a class/struct.
5418
5419 2018-07-11  Alan Hayward  <alan.hayward@arm.com>
5420
5421         * target-descriptions.c (tdesc_register_bitsize): Rename.
5422         * target-descriptions.h (tdesc_register_bitsize): Likewise.
5423         * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
5424         * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
5425
5426 2018-07-10  Tom Tromey  <tom@tromey.com>
5427
5428         * breakpoint.c (moribund_locations): Now static and a
5429         std::vector.
5430         (breakpoint_init_inferior, moribund_breakpoint_here_p)
5431         (build_bpstat_chain, update_global_location_list)
5432         (breakpoint_retire_moribund): Update.
5433         * breakpoint.h (bp_location_p): Remove typedef.  Don't declare
5434         VEC.
5435
5436 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
5437
5438         * riscv-tdep.c (riscv_is_fp_regno_p): New function.
5439         (riscv_register_reggroup_p): Use new function, remove unneeded
5440         parenthesis.
5441         (riscv_push_dummy_call): Extend assert to compare against xlen or
5442         flen based on register type.
5443
5444 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
5445
5446         * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
5447
5448 2018-07-09  Andrew Burgess  <andrew.burgess@embecosm.com>
5449
5450         * remote.c (show_hardware_watchpoint_limit): New function.
5451         (show_hardware_watchpoint_length_limit): New function.
5452         (show_hardware_breakpoint_limit): New function.
5453         (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
5454         where appropriate, update help text.
5455
5456 2018-07-09  Tom Tromey  <tom@tromey.com>
5457
5458         * Makefile.in (CDEPS): Don't mention XM_CDEPS.
5459         (CLIBS): Don't mention NAT_CLIBS.
5460
5461 2018-07-09  Tom Tromey  <tom@tromey.com>
5462
5463         * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
5464         (LIBGDB_OBS, clean mostlyclean): Update.
5465         (gdb$(EXEEXT), insight$(EXEEXT)): Update.
5466
5467 2018-07-09  Tom Tromey  <tom@tromey.com>
5468
5469         * Makefile.in (%.c: %.y): Use ECHO_YACC.
5470         (%.c: %.l): Use ECHO_LEX.  Just fail if flex not available.
5471         * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
5472
5473 2018-07-09  Tom Tromey  <tom@tromey.com>
5474
5475         * Makefile.in (ALLDEPFILES): Remove exec.c.
5476         (COMMON_OBS): Remove exec.o.
5477         (COMMON_SFILES): Add exec.c.
5478
5479 2018-07-09  Tom Tromey  <tom@tromey.com>
5480
5481         * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
5482
5483 2018-07-09  Tom Tromey  <tom@tromey.com>
5484
5485         * Makefile.in (clean mostlyclean): Remove stamp-version.
5486         (version.c): Depend on stamp-version.
5487         (stamp-version): New rule, from version.c rule.
5488
5489 2018-07-09  Tom Tromey  <tom@tromey.com>
5490
5491         * Makefile.in (init.c): Depend on stamp-init.
5492         (stamp-init): New rule, from init.c rule.
5493         (clean mostlyclean): Remove stamp-init.
5494
5495 2018-07-09  Tom Tromey  <tom@tromey.com>
5496
5497         * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
5498         SUBDIR_GCC_COMPILE_SRCS.
5499
5500 2018-07-09  Tom Tromey  <tom@tromey.com>
5501
5502         * Makefile.in (init.c): Remove some unused sed rules.
5503
5504 2018-07-09  Tom Tromey  <tom@tromey.com>
5505
5506         * Makefile.in (TSOBS): Remove.
5507         (INIT_FILES): Update.
5508         (LIBGDB_OBS): Update.
5509         (COMMON_SFILES): Add inflow.c.
5510         (SFILES): Remove inflow.c.
5511
5512 2018-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
5513
5514         * contrib/gdb-add-index.sh ($dwarf5): New, use it.
5515
5516 2018-07-07  Simon Marchi  <simon.marchi@polymtl.ca>
5517
5518         * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
5519         get_saveloc_name, is_signal_frame_name, step_name,
5520         init_remote_name, create_addr_space_name,
5521         destroy_addr_space_name, search_unwind_table_name,
5522         find_dyn_list_name): Constify.
5523
5524 2018-07-05  Simon Marchi  <simon.marchi@polymtl.ca>
5525
5526         * darwin-nat.c (darwin_pthread_kill): New function.
5527         (darwin_resume_thread): Use darwin_pthread_kill.
5528
5529 2018-07-05  Tom de Vries  <tdevries@suse.de>
5530
5531         * macroexp.c (macro_buffer) <operator=>: New member function.
5532
5533 2018-07-04  Tom Tromey  <tom@tromey.com>
5534
5535         * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
5536
5537 2018-07-04  Simon Marchi  <simon.marchi@polymtl.ca>
5538
5539         * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
5540         * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
5541         * maint.c: Likewise.
5542         * top.c: Likewise.
5543
5544 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
5545
5546         * NEWS: Create a new section for the next release branch.
5547         Rename the section of the current branch, now that it has
5548         been cut.
5549
5550 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
5551
5552         GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
5553         * version.in: Bump version to 8.2.50.DATE-git.
5554
5555 2018-07-04  Vyacheslav Barinov  <v.barinov@samsung.com>
5556             Pedro Alves  <palves@redhat.com>
5557
5558         * linux-nat.c (linux_init_ptrace): Rename to ...
5559         (linux_init_ptrace_procfs): ... this.  Call
5560         linux_proc_init_warnings.
5561         (linux_nat_target::post_attach)
5562         (linux_nat_target::post_startup_inferior): Adjust.
5563         * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
5564         * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
5565
5566 2018-07-04  Tom de Vries  <tdevries@suse.de>
5567
5568         * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
5569         check ...
5570         (read_comp_unit_head): ... here.
5571
5572 2018-07-03  Tom Tromey  <tom@tromey.com>
5573
5574         * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
5575         (stop_tracing, tstatus_command)
5576         (find_matching_tracepoint_location, merge_uploaded_tracepoints)
5577         (print_one_static_tracepoint_marker): Update.
5578         * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
5579         std::vector.
5580         * breakpoint.h (breakpoint_p): Remove typedef.  Don't declare
5581         VEC.
5582         (all_tracepoints, static_tracepoints_here): Return std::vector.
5583
5584 2018-07-03  Tom Tromey  <tom@tromey.com>
5585
5586         * common/ptid.c (ptid_equal): Remove.
5587         * common/ptid.h (ptid_equal): Don't declare.
5588         * ada-tasks.c: Update.
5589         * breakpoint.c: Update.
5590         * common/agent.c: Update.
5591         * corelow.c: Update.
5592         * darwin-nat-info.c: Update.
5593         * darwin-nat.c: Update.
5594         * dcache.c: Update.
5595         * dtrace-probe.c: Update.
5596         * dummy-frame.c: Update.
5597         * fbsd-nat.c: Update.
5598         * frame.c: Update.
5599         * gdbthread.h: Update.
5600         * gnu-nat.c: Update.
5601         * go32-nat.c: Update.
5602         * inf-loop.c: Update.
5603         * inf-ptrace.c: Update.
5604         * infcall.c: Update.
5605         * infcmd.c: Update.
5606         * inflow.c: Update.
5607         * infrun.c: Update.
5608         * linux-fork.c: Update.
5609         * linux-nat.c: Update.
5610         * linux-thread-db.c: Update.
5611         * mi/mi-cmd-var.c: Update.
5612         * mi/mi-interp.c: Update.
5613         * mi/mi-main.c: Update.
5614         * nto-procfs.c: Update.
5615         * ppc-linux-tdep.c: Update.
5616         * procfs.c: Update.
5617         * python/py-inferior.c: Update.
5618         * python/py-record-btrace.c: Update.
5619         * python/py-record.c: Update.
5620         * ravenscar-thread.c: Update.
5621         * regcache.c: Update.
5622         * remote-sim.c: Update.
5623         * remote.c: Update.
5624         * sol-thread.c: Update.
5625         * solib.c: Update.
5626         * target.c: Update.
5627         * tui/tui-stack.c: Update.
5628         * varobj.c: Update.
5629         * windows-nat.c: Update.
5630         * windows-tdep.c: Update.
5631
5632 2018-07-03  Tom Tromey  <tom@tromey.com>
5633
5634         * common/ptid.c (ptid_match): Remove.
5635         * common/ptid.h (ptid_match): Don't declare.
5636         * fbsd-nat.c: Update.
5637         * infcmd.c: Update.
5638         * infrun.c: Update.
5639         * linux-nat.c: Update.
5640         * record-btrace.c: Update.
5641         * regcache.c: Update.
5642         * remote.c: Update.
5643
5644 2018-07-03  Tom Tromey  <tom@tromey.com>
5645
5646         * common/ptid.c (ptid_tid_p): Remove.
5647         * common/ptid.h (ptid_tid_p): Don't declare.
5648         * sol-thread.c: Update.
5649
5650 2018-07-03  Tom Tromey  <tom@tromey.com>
5651
5652         * common/ptid.c (ptid_lwp_p): Remove.
5653         * common/ptid.h (ptid_lwp_p): Don't declare.
5654         * fbsd-nat.c: Update.
5655         * linux-nat.c: Update.
5656         * nat/linux-procfs.c: Update.
5657         * nat/x86-linux-dregs.c: Update.
5658         * sol-thread.c: Update.
5659
5660 2018-07-03  Tom Tromey  <tom@tromey.com>
5661
5662         * common/ptid.c (ptid_is_pid): Remove.
5663         * common/ptid.h (ptid_is_pid): Don't declare.
5664         * infrun.c: Update.
5665         * linux-nat.c: Update.
5666         * mi/mi-interp.c: Update.
5667         * remote.c: Update.
5668         * thread.c: Update.
5669
5670 2018-07-03  Tom Tromey  <tom@tromey.com>
5671
5672         * common/ptid.c (ptid_get_tid): Remove.
5673         * common/ptid.h (ptid_get_tid): Don't declare.
5674         * ada-tasks.c: Update.
5675         * aix-thread.c: Update.
5676         * bsd-uthread.c: Update.
5677         * darwin-nat.c: Update.
5678         * fbsd-nat.c: Update.
5679         * i386-darwin-nat.c: Update.
5680         * infrun.c: Update.
5681         * linux-tdep.c: Update.
5682         * nto-procfs.c: Update.
5683         * ppc-ravenscar-thread.c: Update.
5684         * python/py-infthread.c: Update.
5685         * ravenscar-thread.c: Update.
5686         * sol-thread.c: Update.
5687         * sparc-ravenscar-thread.c: Update.
5688         * windows-nat.c: Update.
5689
5690 2018-07-03  Tom Tromey  <tom@tromey.com>
5691
5692         * common/ptid.c (ptid_get_lwp): Remove.
5693         * common/ptid.h (ptid_get_lwp): Don't declare.
5694         * aarch64-linux-nat.c: Update.
5695         * ada-tasks.c: Update.
5696         * aix-thread.c: Update.
5697         * amd64-linux-nat.c: Update.
5698         * arm-linux-nat.c: Update.
5699         * corelow.c: Update.
5700         * fbsd-nat.c: Update.
5701         * fbsd-tdep.c: Update.
5702         * gnu-nat.c: Update.
5703         * i386-cygwin-tdep.c: Update.
5704         * i386-gnu-nat.c: Update.
5705         * i386-linux-nat.c: Update.
5706         * ia64-linux-nat.c: Update.
5707         * inf-ptrace.c: Update.
5708         * infrun.c: Update.
5709         * linux-fork.c: Update.
5710         * linux-nat.c: Update.
5711         * linux-tdep.c: Update.
5712         * linux-thread-db.c: Update.
5713         * mips-linux-nat.c: Update.
5714         * nat/aarch64-linux-hw-point.c: Update.
5715         * nat/aarch64-linux.c: Update.
5716         * nat/linux-btrace.c: Update.
5717         * nat/linux-osdata.c: Update.
5718         * nat/linux-procfs.c: Update.
5719         * nat/x86-linux-dregs.c: Update.
5720         * obsd-nat.c: Update.
5721         * ppc-fbsd-nat.c: Update.
5722         * ppc-linux-nat.c: Update.
5723         * procfs.c: Update.
5724         * python/py-infthread.c: Update.
5725         * ravenscar-thread.c: Update.
5726         * remote.c: Update.
5727         * s390-linux-nat.c: Update.
5728         * sol-thread.c: Update.
5729         * sol2-tdep.c: Update.
5730         * spu-linux-nat.c: Update.
5731         * x86-linux-nat.c: Update.
5732         * xtensa-linux-nat.c: Update.
5733
5734 2018-07-03  Tom Tromey  <tom@tromey.com>
5735
5736         * common/ptid.c (ptid_get_pid): Remove.
5737         * common/ptid.h (ptid_get_pid): Don't declare.
5738         * aarch64-linux-nat.c: Update.
5739         * ada-lang.c: Update.
5740         * aix-thread.c: Update.
5741         * alpha-bsd-nat.c: Update.
5742         * amd64-fbsd-nat.c: Update.
5743         * amd64-linux-nat.c: Update.
5744         * arm-linux-nat.c: Update.
5745         * arm-nbsd-nat.c: Update.
5746         * auxv.c: Update.
5747         * break-catch-syscall.c: Update.
5748         * breakpoint.c: Update.
5749         * bsd-uthread.c: Update.
5750         * corelow.c: Update.
5751         * ctf.c: Update.
5752         * darwin-nat.c: Update.
5753         * fbsd-nat.c: Update.
5754         * fbsd-tdep.c: Update.
5755         * gcore.c: Update.
5756         * gnu-nat.c: Update.
5757         * hppa-nbsd-nat.c: Update.
5758         * hppa-obsd-nat.c: Update.
5759         * i386-fbsd-nat.c: Update.
5760         * ia64-linux-nat.c: Update.
5761         * inf-ptrace.c: Update.
5762         * infcmd.c: Update.
5763         * inferior.c: Update.
5764         * inferior.h: Update.
5765         * inflow.c: Update.
5766         * infrun.c: Update.
5767         * linux-fork.c: Update.
5768         * linux-nat.c: Update.
5769         * linux-tdep.c: Update.
5770         * linux-thread-db.c: Update.
5771         * m68k-bsd-nat.c: Update.
5772         * mi/mi-interp.c: Update.
5773         * mi/mi-main.c: Update.
5774         * mips-linux-nat.c: Update.
5775         * mips-nbsd-nat.c: Update.
5776         * mips64-obsd-nat.c: Update.
5777         * nat/aarch64-linux-hw-point.c: Update.
5778         * nat/aarch64-linux.c: Update.
5779         * nat/linux-btrace.c: Update.
5780         * nat/linux-osdata.c: Update.
5781         * nat/linux-procfs.c: Update.
5782         * nat/x86-linux-dregs.c: Update.
5783         * nto-procfs.c: Update.
5784         * obsd-nat.c: Update.
5785         * ppc-linux-nat.c: Update.
5786         * ppc-nbsd-nat.c: Update.
5787         * ppc-obsd-nat.c: Update.
5788         * proc-service.c: Update.
5789         * procfs.c: Update.
5790         * python/py-inferior.c: Update.
5791         * python/py-infthread.c: Update.
5792         * ravenscar-thread.c: Update.
5793         * record.c: Update.
5794         * remote-sim.c: Update.
5795         * remote.c: Update.
5796         * rs6000-nat.c: Update.
5797         * s390-linux-nat.c: Update.
5798         * sh-nbsd-nat.c: Update.
5799         * sol-thread.c: Update.
5800         * sparc-nat.c: Update.
5801         * sparc64-tdep.c: Update.
5802         * spu-linux-nat.c: Update.
5803         * spu-tdep.c: Update.
5804         * target-debug.h: Update.
5805         * target.c: Update.
5806         * thread.c: Update.
5807         * tid-parse.c: Update.
5808         * tracefile-tfile.c: Update.
5809         * vax-bsd-nat.c: Update.
5810         * windows-nat.c: Update.
5811         * x86-linux-nat.c: Update.
5812         * x86-nat.c: Update.
5813
5814 2018-07-03  Tom Tromey  <tom@tromey.com>
5815
5816         * common/ptid.c (pid_to_ptid): Remove.
5817         * common/ptid.h (pid_to_ptid): Don't declare.
5818         * aix-thread.c: Update.
5819         * arm-linux-nat.c: Update.
5820         * common/ptid.c: Update.
5821         * common/ptid.h: Update.
5822         * corelow.c: Update.
5823         * ctf.c: Update.
5824         * darwin-nat.c: Update.
5825         * fbsd-nat.c: Update.
5826         * fork-child.c: Update.
5827         * gnu-nat.c: Update.
5828         * go32-nat.c: Update.
5829         * inf-ptrace.c: Update.
5830         * infcmd.c: Update.
5831         * inferior.c: Update.
5832         * infrun.c: Update.
5833         * linux-fork.c: Update.
5834         * linux-nat.c: Update.
5835         * nat/aarch64-linux-hw-point.c: Update.
5836         * nat/fork-inferior.c: Update.
5837         * nat/x86-linux-dregs.c: Update.
5838         * nto-procfs.c: Update.
5839         * obsd-nat.c: Update.
5840         * procfs.c: Update.
5841         * progspace.c: Update.
5842         * remote.c: Update.
5843         * rs6000-nat.c: Update.
5844         * s390-linux-nat.c: Update.
5845         * sol-thread.c: Update.
5846         * spu-linux-nat.c: Update.
5847         * target.c: Update.
5848         * top.c: Update.
5849         * tracefile-tfile.c: Update.
5850         * windows-nat.c: Update.
5851
5852 2018-07-03  Tom Tromey  <tom@tromey.com>
5853
5854         * common/ptid.h (ptid_build): Don't declare.
5855         * common/ptid.c (ptid_build): Remove.
5856         * aix-thread.c: Update.
5857         * bsd-kvm.c: Update.
5858         * bsd-uthread.c: Update.
5859         * common/agent.c: Update.
5860         * common/ptid.c: Update.
5861         * common/ptid.h: Update.
5862         * corelow.c: Update.
5863         * darwin-nat.c: Update.
5864         * fbsd-nat.c: Update.
5865         * gnu-nat.c: Update.
5866         * linux-fork.c: Update.
5867         * linux-nat.c: Update.
5868         * linux-thread-db.c: Update.
5869         * nat/linux-osdata.c: Update.
5870         * nat/linux-procfs.c: Update.
5871         * nto-procfs.c: Update.
5872         * obsd-nat.c: Update.
5873         * proc-service.c: Update.
5874         * procfs.c: Update.
5875         * ravenscar-thread.c: Update.
5876         * remote-sim.c: Update.
5877         * remote.c: Update.
5878         * sol-thread.c: Update.
5879         * target.c: Update.
5880         * windows-nat.c: Update.
5881
5882 2018-07-03  Tom Tromey  <tom@tromey.com>
5883
5884         * infrun.c (follow_exec): Use exit_inferior_silent.
5885         * inferior.c (exit_inferior_num_silent): Remove.
5886         * inferior.h (exit_inferior_num_silent): Don't declare.
5887
5888 2018-07-03  Tom Tromey  <tom@tromey.com>
5889
5890         PR cli/23340:
5891         * darwin-nat.c (darwin_attach_pid): Reset inferior and
5892         inferior_ptid on error.
5893
5894 2018-07-02  Maciej W. Rozycki  <macro@mips.com>
5895             Simon Marchi  <simon.marchi@polymtl.ca>
5896
5897         PR tdep/8282
5898         * disasm.h (gdb_disassembler): Add
5899         `m_disassembler_options_holder'. member
5900         * disasm.c (get_all_disassembler_options): New function.
5901         (gdb_disassembler::gdb_disassembler): Use it.
5902         (gdb_buffered_insn_length_init_dis): Likewise.
5903         (gdb_buffered_insn_length): Adjust accordingly.
5904         (set_disassembler_options): Handle options with arguments.
5905         (show_disassembler_options_sfunc): Likewise.  Add a leading new
5906         line if showing options with descriptions.
5907         (disassembler_options_completer): Adapt to using the
5908         `disasm_options_and_args_t' structure.
5909         * mips-tdep.c (mips_disassembler_options): New variable.
5910         (mips_disassembler_options_o32): Likewise.
5911         (mips_disassembler_options_n32): Likewise.
5912         (mips_disassembler_options_n64): Likewise.
5913         (gdb_print_insn_mips): Don't set `disassembler_options'.
5914         (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
5915         functions.
5916         (mips_gdbarch_init): Always set `gdbarch_print_insn' to
5917         `gdb_print_insn_mips'.  Set `gdbarch_disassembler_options',
5918         `gdbarch_disassembler_options_implicit' and
5919         `gdbarch_valid_disassembler_options'.
5920         * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
5921         `disasm_options_and_args_t' structure.
5922         * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
5923         method.
5924         (valid_disassembler_options): Switch from `disasm_options_t' to
5925         the `disasm_options_and_args_t' structure.
5926         * NEWS: Document `set disassembler-options' support for the MIPS
5927         target.
5928         * gdbarch.h: Regenerate.
5929         * gdbarch.c: Regenerate.
5930
5931 2018-07-02  Sebastian Huber  <sebastian.huber@embedded-brains.de>
5932
5933         * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
5934
5935 2018-06-29  Joel Brobecker  <brobecker@adacore.com>
5936
5937         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
5938         parameter in call to amd64_target_description.
5939         * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
5940         * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
5941         (amd64fbsd_init_abi): Likewise.
5942         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
5943         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
5944         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
5945         * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
5946
5947 2018-06-29  Pedro Alves  <palves@redhat.com>
5948
5949         * gdb/amd64-tdep.h (amd64_create_target_description): Add
5950         "segments" parameter.
5951         * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
5952         (_initialize_amd64_tdep): Update call to
5953         amd64_create_target_description.
5954         (amd64_target_description): Add "segments" parameter.  Adjust
5955         the implementation to use it.
5956         * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
5957         call to amd64_create_target_description.
5958         * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
5959         * gdb/arch/amd64.h (amd64_create_target_description): Add
5960         "segments" register.
5961         * gdb/arch/amd64.c (amd64_create_target_description): Add
5962         "segments" parameter.  Call create_feature_i386_64bit_segments
5963         only if SEGMENTS is true.
5964         * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
5965         call to amd64_create_target_description.
5966
5967 2018-06-29  Pedro Alves  <palves@redhat.com>
5968
5969         * thread.c (thread_target_id_str): New, factored out from ...
5970         (print_thread_info_1): ... here.  Use it to compute the max
5971         "Target Id" column width.
5972
5973 2018-06-29  Pedro Alves  <palves@redhat.com>
5974
5975         * remote.c (remote_target::extra_thread_info): Delete
5976         'display_buf' and 'n' locals.  from the cache, regardless of
5977         packet mechanims is in use.  Use cache for qThreadExtra and qP
5978         methods too.
5979
5980 2018-06-29  Pedro Alves  <palves@redhat.com>
5981
5982         * blockframe.c (find_pc_sect_containing_function): New function.
5983         * breakpoint.c (print_breakpoint_location): Don't call
5984         find_pc_sect_function.
5985         * linespec.c (create_sals_line_offset): Record the location's
5986         symbol in the sal.
5987         * linespec.c (convert_address_location_to_sals): Fill in sal's
5988         symbol with find_pc_sect_containing_function.
5989         * symtab.c (find_function_start_sal): Rename to ...
5990         (find_function_start_sal_1): ... this.
5991         (find_function_start_sal): Reimplement as wrapper around
5992         find_function_start_sal_1, and use
5993         find_pc_sect_containing_function to fill in the sal's symbol.
5994         (find_function_start_sal(symbol*, bool)): Adjust.
5995         * symtab.h (find_pc_function, find_pc_sect_function): Adjust
5996         comments.
5997         (find_pc_sect_containing_function): Declare.
5998
5999 2018-06-29  Pedro Alves  <palves@redhat.com>
6000
6001         * inline-frame.c (stopped_by_user_bp_inline_frame): Return
6002         true if the the location has no symbol.
6003
6004 2018-06-28  Tom Tromey  <tom@tromey.com>
6005
6006         * NEWS: Mention --enable-codesign.
6007         * silent-rules.mk (ECHO_SIGN): New variable.
6008         * configure.ac: Add --enable-codesign.
6009         * configure: Rebuild.
6010         * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
6011         (gdb$(EXEEXT)): Optionally invoke codesign.
6012
6013 2018-06-28  Pedro Alves  <palves@redhat.com>
6014
6015         * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
6016         comments.
6017         (switch_to_thread_no_regs): Adjust comment.
6018         * infcmd.c (stop_pc): Delete.
6019         (post_create_inferior, info_program_command): Replace references
6020         to stop_pc with references to thread_info->suspend.stop_pc.
6021         * inferior.h (stop_pc): Delete declaration.
6022         * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
6023         (handle_inferior_event_1, handle_signal_stop)
6024         (process_event_stop_test, keep_going_stepped_thread)
6025         (handle_step_into_function, handle_step_into_function_backward)
6026         (print_stop_location): Replace references to stop_pc with
6027         references to thread_info->suspend.stop_pc.
6028         (struct infcall_suspend_state) <stop_pc>: Delete field.
6029         (save_infcall_suspend_state, restore_infcall_suspend_state):
6030         Remove references to inf_stat->stop_pc.
6031         * linux-fork.c (fork_load_infrun_state): Likewise.
6032         * record-btrace.c (record_btrace_set_replay): Likewise.
6033         * record-full.c (record_full_goto_entry): Likewise.
6034         * remote.c (print_one_stopped_thread): Likewise.
6035         * target.c (target_resume): Extend comment.
6036         * thread.c (set_executing_thread): New.
6037         (set_executing): Use it.
6038         (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
6039         Remove references to stop_pc.
6040
6041 2018-06-28  Pedro Alves  <palves@redhat.com>
6042
6043         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
6044         Moving fetching stop_pc until after ecs->event_thread is refreshed.
6045
6046 2018-06-28  Tom Tromey  <tom@tromey.com>
6047
6048         * coffread.c (coff_symfile_finish): Update.
6049         * xcoffread.c (xcoff_symfile_finish): Update.
6050         * elfread.c (elf_symfile_finish): Update.
6051         * symfile.h (dwarf2_free_objfile): Don't declare.
6052         * dwarf2read.c (_initialize_dwarf2_read): Use
6053         register_objfile_data_with_cleanup.
6054         (dwarf2_free_objfile): Now static.  Change signature.
6055
6056 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
6057
6058         * symfile.c (add_symbol_file_command, _initialize_symfile): Add
6059         option "-o" to add-symbol-file-load to add an offset to each
6060         section's load address.
6061         * symfile.c (set_objfile_default_section_offset): New function.
6062
6063 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
6064
6065         * symfile.c (add_symbol_file_command): Make sure that sections
6066         with the same name are sorted in the same order.
6067
6068 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
6069
6070         * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
6071         require the second argument.  If omitted, load sections at the
6072         addresses specified in the file.
6073
6074 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
6075
6076         * symfile.c (symbol_file_command, symbol_file_add_main_1)
6077         (_initialize_symfile): Add option "-o" to symbol-file to add an
6078         offset to each section of the symbol file.
6079
6080 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
6081
6082         * MAINTAINERS (Write After Approval): Add Petr Tesarik.
6083
6084 2018-06-27  Tom Tromey  <tom@tromey.com>
6085
6086         * stack.c (_initialize_stack): Update "func" help text.
6087
6088 2018-06-27  Tom Tromey  <tom@tromey.com>
6089
6090         * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
6091         std::vector.
6092         (unwind_infopy_str, pyuw_create_unwind_info)
6093         (unwind_infopy_add_saved_register, pyuw_sniffer)
6094         (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
6095         Update.
6096         (struct saved_reg): Add constructor.
6097         <value>: Now a gdbpy_ref<>.
6098
6099 2018-06-27  Tom Tromey  <tom@tromey.com>
6100
6101         * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
6102
6103 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6104
6105         * gdb-gdb.py.in: Format using autopep8.
6106
6107 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6108
6109         * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
6110         (type_lookup_function): Recognize CORE_ADDR values.
6111
6112 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6113
6114         * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
6115         print tag_name.
6116
6117 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6118
6119         * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
6120         <__lt__>: Add.
6121
6122 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6123
6124         * gdb-gdb.py: Move to...
6125         * gdb-gdb.py.in: ... here.
6126         * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
6127         * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
6128         dependencies.
6129         (distclean): Remove gdb-gdb.py when cleaning.
6130         (gdb-gdb.py, gdb-gdb.gdb): New rules.
6131         * configure: Re-generate.
6132
6133 2018-06-27  Pedro Alves  <palves@redhat.com>
6134
6135         * proc-service.c (get_ps_regcache): New.
6136         (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
6137         (ps_lsetfpregs): Use it.
6138
6139 2018-06-27  Omair Javaid  <omair.javaid@linaro.org>
6140
6141         PR gdb/21695
6142         * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
6143         (dwarf_decode_lines_1): Adjust.
6144
6145 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6146
6147         * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
6148         override.
6149         <info_proc>: Likewise.
6150
6151 2018-06-26  Joel Brobecker  <brobecker@adacore.com>
6152
6153         * windows-nat.c (do_windows_fetch_inferior_registers): Rename
6154         to windows_fetch_one_register, and only handle the case of
6155         fetching one register.  Move the code that reloads the context
6156         and iterates over all registers if R is negative to...
6157         (windows_nat_target::fetch_registers): ... here.
6158         (do_windows_store_inferior_registers): Rename to
6159         windows_store_one_register, and only handle the case of storing
6160         one register.  Move the code that handles the case where r is
6161         negative to...
6162         (windows_nat_target::store_registers) ... here.
6163
6164 2018-06-26  Tom Tromey  <tom@tromey.com>
6165
6166         PR rust/22574:
6167         * typeprint.c (whatis_exp): Allow ptype/o for Rust.
6168         * rust-lang.c (rust_print_struct_def): Add podata parameter.
6169         Update.
6170         (rust_internal_print_type): Add podata parameter.
6171         (rust_print_type): Update.
6172
6173 2018-06-26  Tom Tromey  <tom@tromey.com>
6174
6175         * typeprint.h (struct print_offset_data) <update, finish,
6176         maybe_print_hole>: New methods.
6177         <indentation>: New constant.
6178         * typeprint.c (print_offset_data::indentation): Define.
6179         (print_offset_data::maybe_print_hole, print_offset_data::update)
6180         (print_offset_data::finish): Move from c-typeprint.c and rename.
6181         * c-typeprint.c (OFFSET_SPC_LEN): Remove.
6182         (print_spaces_filtered_with_print_options): Update.
6183         (c_print_type_union_field_offset, maybe_print_hole)
6184         (c_print_type_struct_field_offset): Move to typeprint.c and
6185         rename.
6186         (c_type_print_base_struct_union): Update.
6187
6188 2018-06-25  Pedro Alves  <palves@redhat.com>
6189
6190         * gdbthread.h (thread_info_ref, delete_thread)
6191         (delete_thread_silent, first_thread_of_inferior)
6192         (any_thread_of_inferior, switch_to_thread)
6193         (enable_thread_stack_temporaries)
6194         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
6195         (get_last_thread_stack_temporary)
6196         (value_in_thread_stack_temporaries, can_access_registers_thread):
6197         Spell out "struct thread_info" instead of just "thread_info".
6198         * inferior.h (notice_new_inferior): Likewise.
6199
6200 2018-06-25  Pedro Alves  <palves@redhat.com>
6201
6202         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
6203         pass thread_info pointer to delete_thread.
6204         (windows_nat_target::detach): Pass inferior pointer to
6205         detach_inferior.
6206         * aix-thread.c (sync_threadlists): Pass thread_info pointer to
6207         delete_thread.
6208         * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
6209         * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
6210         and pass a thread_info pointer to delete_thread.
6211         * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
6212         pass thread_info pointer to delete_thread.
6213         * go32-nat.c (go32_nat_target::mourn_inferior): Remove
6214         delete_thread_silent call.
6215         * procfs.c (procfs_target::detach): Pass inferior pointer to
6216         detach_inferior.
6217         (procfs_target::wait): Pass thread_info pointer to delete_thread.
6218         * remote-sim.c (gdbsim_target::mourn_inferior): Remove
6219         delete_thread_silent call.
6220         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
6221         pass thread_info pointer to delete_thread.
6222         (windows_nat_target::detach): Pass inferior pointer to
6223         delete_inferior.
6224
6225 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
6226
6227         * regcache.c (readable_regcache::read_part): Fix asserts.
6228         (reg_buffer::raw_collect_part): New function.
6229         (regcache::write_part): Fix asserts.
6230         (reg_buffer::raw_supply_part): New function.
6231         (regcache::transfer_regset_register): New helper function.
6232         (regcache::transfer_regset): Call new functions.
6233         (regcache_supply_regset): Use gdb_byte*.
6234         (regcache::supply_regset): Likewise.
6235         (regcache_collect_regset): Likewise.
6236         (regcache::collect_regset): Likewise.
6237         * regcache.h (reg_buffer::raw_collect_part): New declaration.
6238         (reg_buffer::raw_supply_part): Likewise.
6239         (regcache::transfer_regset_register): Likewise.
6240         (regcache::transfer_regset): Use gdb_byte*.
6241
6242 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
6243
6244         * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
6245
6246 2018-06-21  Pedro Alves  <palves@redhat.com>
6247
6248         * ada-lang.h (ada_get_task_number): Take a thread_info pointer
6249         instead of a ptid_t.  All callers adjusted.
6250         * ada-tasks.c (ada_get_task_number): Likewise.  All callers
6251         adjusted.
6252         (print_ada_task_info, display_current_task_id, task_command_1):
6253         Adjust.
6254         * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
6255         inferior_thread.
6256         (breakpoint_kind): Adjust.
6257         (remove_breakpoints_pid): Rename to ...
6258         (remove_breakpoints_inf): ... this.  Adjust to take an inferior
6259         pointer.  All callers adjusted.
6260         (bpstat_clear_actions): Use inferior_thread.
6261         (get_bpstat_thread): New.
6262         (bpstat_do_actions): Use it.
6263         (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
6264         to take a thread_info pointer.  All callers adjusted.
6265         (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
6266         (breakpoint_re_set_thread): Use inferior_thread.
6267         * breakpoint.h (struct inferior): Forward declare.
6268         (bpstat_stop_status): Update.
6269         (remove_breakpoints_pid): Delete.
6270         (remove_breakpoints_inf): New.
6271         * bsd-uthread.c (bsd_uthread_target::wait)
6272         (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
6273         * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
6274         (maint_btrace_packet_history_cmd)
6275         (maint_btrace_clear_packet_history_cmd): Adjust.
6276         (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
6277         inferior_thread.
6278         * cli/cli-interp.c: Include "inferior.h".
6279         * common/refcounted-object.h (struct
6280         refcounted_object_ref_policy): New.
6281         * compile/compile-object-load.c: Include gdbthread.h.
6282         (store_regs): Use inferior_thread.
6283         * corelow.c (core_target::close): Use current_inferior.
6284         (core_target_open): Adjust to use first_thread_of_inferior and use
6285         the current inferior.
6286         * ctf.c (ctf_target::close): Adjust to use current_inferior.
6287         * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
6288         <thread>: ... this new field.  All references adjusted.
6289         (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
6290         Take a thread_info pointer instead of a ptid_t.
6291         * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
6292         (dummy_frame_discard, register_dummy_frame_dtor): Take a
6293         thread_info pointer instead of a ptid_t.
6294         * elfread.c: Include "inferior.h".
6295         (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
6296         Use inferior_thread.
6297         * eval.c (evaluate_subexp): Likewise.
6298         * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
6299         inferior_thread.
6300         * gdb_proc_service.h (struct thread_info): Forward declare.
6301         (struct ps_prochandle) <ptid>: Delete, replaced by ...
6302         <thread>: ... this new field.  All references adjusted.
6303         * gdbarch.h, gdbarch.c: Regenerate.
6304         * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
6305         'thread' parameter.  All implementations and callers adjusted.
6306         * gdbthread.h (thread_info) <set_running>: New method.
6307         (delete_thread, delete_thread_silent): Take a thread_info pointer
6308         instead of a ptid.
6309         (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
6310         (first_thread_of_process): Delete, replaced by ...
6311         (first_thread_of_inferior): ... this new function.  All callers
6312         adjusted.
6313         (any_live_thread_of_process): Delete, replaced by ...
6314         (any_live_thread_of_inferior): ... this new function.  All callers
6315         adjusted.
6316         (switch_to_thread, switch_to_no_thread): Declare.
6317         (is_executing): Delete.
6318         (enable_thread_stack_temporaries): Update comment.
6319         <enable_thread_stack_temporaries>: Take a thread_info pointer
6320         instead of a ptid_t.  Incref the thread.
6321         <~enable_thread_stack_temporaries>: Decref the thread.
6322         <m_ptid>: Delete
6323         <m_thr>: New.
6324         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
6325         (get_last_thread_stack_temporary)
6326         (value_in_thread_stack_temporaries, can_access_registers_thread):
6327         Take a thread_info pointer instead of a ptid_t.  All callers
6328         adjusted.
6329         * infcall.c (get_call_return_value): Use inferior_thread.
6330         (run_inferior_call): Work with thread pointers instead of ptid_t.
6331         (call_function_by_hand_dummy): Work with thread pointers instead
6332         of ptid_t.  Use thread_info_ref.
6333         * infcmd.c (proceed_thread_callback): Access thread's state
6334         directly.
6335         (ensure_valid_thread, ensure_not_running): Use inferior_thread,
6336         access thread's state directly.
6337         (continue_command): Use inferior_thread.
6338         (info_program_command): Use find_thread_ptid and access thread
6339         state directly.
6340         (proceed_after_attach_callback): Use thread state directly.
6341         (notice_new_inferior): Take a thread_info pointer instead of a
6342         ptid_t.  All callers adjusted.
6343         (exit_inferior): Take an inferior pointer instead of a pid.  All
6344         callers adjusted.
6345         (exit_inferior_silent): New.
6346         (detach_inferior): Delete.
6347         (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
6348         (gdb_inferior_id_to_pid, in_inferior_list): Delete.
6349         (detach_inferior_command, kill_inferior_command): Use
6350         find_inferior_id instead of valid_gdb_inferior_id and
6351         gdb_inferior_id_to_pid.
6352         (inferior_command): Use inferior and thread pointers.
6353         * inferior.h (struct thread_info): Forward declare.
6354         (notice_new_inferior): Take a thread_info pointer instead of a
6355         ptid_t.  All callers adjusted.
6356         (detach_inferior): Delete declaration.
6357         (exit_inferior, exit_inferior_silent): Take an inferior pointer
6358         instead of a pid.  All callers adjusted.
6359         (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
6360         (valid_gdb_inferior_id): Delete.
6361         * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
6362         (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
6363         (struct displaced_step_inferior_state) <pid>: Delete, replaced by
6364         ...
6365         <inf>: ... this new field.
6366         <step_ptid>: Delete, replaced by ...
6367         <step_thread>: ... this new field.
6368         (get_displaced_stepping_state): Take an inferior pointer instead
6369         of a pid.  All callers adjusted.
6370         (displaced_step_in_progress_any_inferior): Adjust.
6371         (displaced_step_in_progress_thread): Take a thread pointer instead
6372         of a ptid_t.  All callers adjusted.
6373         (displaced_step_in_progress, add_displaced_stepping_state): Take
6374         an inferior pointer instead of a pid.  All callers adjusted.
6375         (get_displaced_step_closure_by_addr): Adjust.
6376         (remove_displaced_stepping_state): Take an inferior pointer
6377         instead of a pid.  All callers adjusted.
6378         (displaced_step_prepare_throw, displaced_step_prepare)
6379         (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
6380         All callers adjusted.
6381         (start_step_over): Adjust.
6382         (infrun_thread_ptid_changed): Remove bit updating ptids in the
6383         displaced step queue.
6384         (do_target_resume): Adjust.
6385         (fetch_inferior_event): Use inferior_thread.
6386         (context_switch, get_inferior_stop_soon): Take an
6387         execution_control_state pointer instead of a ptid_t.  All callers
6388         adjusted.
6389         (switch_to_thread_cleanup): Delete.
6390         (stop_all_threads): Use scoped_restore_current_thread.
6391         * inline-frame.c: Include "gdbthread.h".
6392         (inline_state) <inline_state>: Take a thread pointer instead of a
6393         ptid_t.  All callers adjusted.
6394         <ptid>: Delete, replaced by ...
6395         <thread>: ... this new field.
6396         (find_inline_frame_state): Take a thread pointer instead of a
6397         ptid_t.  All callers adjusted.
6398         (skip_inline_frames, step_into_inline_frame)
6399         (inline_skipped_frames, inline_skipped_symbol): Take a thread
6400         pointer instead of a ptid_t.  All callers adjusted.
6401         * inline-frame.h (skip_inline_frames, step_into_inline_frame)
6402         (inline_skipped_frames, inline_skipped_symbol): Likewise.
6403         * linux-fork.c (delete_checkpoint_command): Adjust to use thread
6404         pointers directly.
6405         * linux-nat.c (get_detach_signal): Likewise.
6406         * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
6407         (thread_db_notice_clone): Adjust.
6408         (thread_db_find_new_threads_silently)
6409         (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
6410         a thread pointer instead of a ptid_t.  All callers adjusted.
6411         * mi/mi-cmd-var.c: Include "inferior.h".
6412         (mi_cmd_var_update_iter): Update to use thread pointers.
6413         * mi/mi-interp.c (mi_new_thread): Update to use the thread's
6414         inferior directly.
6415         (mi_output_running_pid, mi_inferior_count): Delete, bits factored
6416         out to ...
6417         (mi_output_running): ... this new function.
6418         (mi_on_resume_1): Adjust to use it.
6419         (mi_user_selected_context_changed): Adjust to use inferior_thread.
6420         * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
6421         directly.
6422         (interrupt_thread_callback): : Adjust to use thread and inferior
6423         pointers.
6424         * proc-service.c: Include "gdbthread.h".
6425         (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
6426         * progspace-and-thread.c: Include "inferior.h".
6427         * progspace.c: Include "inferior.h".
6428         * python/py-exitedevent.c (create_exited_event_object): Adjust to
6429         hold a reference to an inferior_object.
6430         * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
6431         inferior_thread.
6432         * python/py-inferior.c (struct inferior_object): Give the type a
6433         tag name instead of a typedef.
6434         (python_on_normal_stop): No need to check if the current thread is
6435         listed.
6436         (inferior_to_inferior_object): Change return type to
6437         inferior_object.  All callers adjusted.
6438         (find_thread_object): Delete, bits factored out to ...
6439         (thread_to_thread_object): ... this new function.
6440         * python/py-infthread.c (create_thread_object): Use
6441         inferior_to_inferior_object.
6442         (thpy_is_stopped): Use thread pointer directly.
6443         (gdbpy_selected_thread): Use inferior_thread.
6444         * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
6445         field, replaced with ...
6446         <thread>: ... this new field.  All users adjusted.
6447         (btpy_insn_or_gap_new): Drop const.
6448         (btpy_list_new): Take a thread pointer instead of a ptid_t.  All
6449         callers adjusted.
6450         * python/py-record.c: Include "gdbthread.h".
6451         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
6452         a ptid_t.  All callers adjusted.
6453         (gdbpy_current_recording): Use inferior_thread.
6454         * python/py-record.h (recpy_record_object) <ptid>: Delete
6455         field, replaced with ...
6456         <thread>: ... this new field.  All users adjusted.
6457         (recpy_element_object) <ptid>: Delete
6458         field, replaced with ...
6459         <thread>: ... this new field.  All users adjusted.
6460         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
6461         a ptid_t.  All callers adjusted.
6462         * python/py-threadevent.c: Include "gdbthread.h".
6463         (get_event_thread): Use thread_to_thread_object.
6464         * python/python-internal.h (struct inferior_object): Forward
6465         declare.
6466         (find_thread_object, find_inferior_object): Delete declarations.
6467         (thread_to_thread_object, inferior_to_inferior_object): New
6468         declarations.
6469         * record-btrace.c: Include "inferior.h".
6470         (require_btrace_thread): Use inferior_thread.
6471         (record_btrace_frame_sniffer)
6472         (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
6473         (get_thread_current_frame): Use scoped_restore_current_thread and
6474         switch_to_thread.
6475         (get_thread_current_frame): Use thread pointer directly.
6476         (record_btrace_replay_at_breakpoint): Use thread's inferior
6477         pointer directly.
6478         * record-full.c: Include "inferior.h".
6479         * regcache.c: Include "gdbthread.h".
6480         (get_thread_arch_regcache): Use the inferior's address space
6481         directly.
6482         (get_thread_regcache, registers_changed_thread): New.
6483         * regcache.h (get_thread_regcache(thread_info *thread)): New
6484         overload.
6485         (registers_changed_thread): New.
6486         (remote_target) <remote_detach_1>: Swap order of parameters.
6487         (remote_add_thread): <remote_add_thread>: Return the new thread.
6488         (get_remote_thread_info(ptid_t)): New overload.
6489         (remote_target::remote_notice_new_inferior): Use thread pointers
6490         directly.
6491         (remote_target::process_initial_stop_replies): Use
6492         thread_info::set_running.
6493         (remote_target::remote_detach_1, remote_target::detach)
6494         (extended_remote_target::detach): Adjust.
6495         * stack.c (frame_show_address): Use inferior_thread.
6496         * target-debug.h (target_debug_print_thread_info_pp): New.
6497         * target-delegates.c: Regenerate.
6498         * target.c (default_thread_address_space): Delete.
6499         (memory_xfer_partial_1): Use current_inferior.
6500         (target_detach): Use current_inferior.
6501         (target_thread_address_space): Delete.
6502         (generic_mourn_inferior): Use current_inferior.
6503         * target.h (struct target_ops) <thread_address_space>: Delete.
6504         (target_thread_address_space): Delete.
6505         * thread.c (init_thread_list): Use ALL_THREADS_SAFE.  Use thread
6506         pointers directly.
6507         (delete_thread_1, delete_thread, delete_thread_silent): Take a
6508         thread pointer instead of a ptid_t.  Adjust all callers.
6509         (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
6510         (first_thread_of_process): Delete, replaced by ...
6511         (first_thread_of_inferior): ... this new function.  All callers
6512         adjusted.
6513         (any_thread_of_process): Rename to ...
6514         (any_thread_of_inferior): ... this, and take an inferior pointer.
6515         (any_live_thread_of_process): Rename to ...
6516         (any_live_thread_of_inferior): ... this, and take an inferior
6517         pointer.
6518         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
6519         (value_in_thread_stack_temporaries)
6520         (get_last_thread_stack_temporary): Take a thread pointer instead
6521         of a ptid_t.  Adjust all callers.
6522         (thread_info::set_running): New.
6523         (validate_registers_access): Use inferior_thread.
6524         (can_access_registers_ptid): Rename to ...
6525         (can_access_registers_thread): ... this, and take a thread
6526         pointer.
6527         (print_thread_info_1): Adjust to compare thread pointers instead
6528         of ptids.
6529         (switch_to_no_thread, switch_to_thread): Make extern.
6530         (scoped_restore_current_thread::~scoped_restore_current_thread):
6531         Use m_thread pointer directly.
6532         (scoped_restore_current_thread::scoped_restore_current_thread):
6533         Use inferior_thread.
6534         (thread_command): Use thread pointer directly.
6535         (thread_num_make_value_helper): Use inferior_thread.
6536         * top.c (execute_command): Use inferior_thread.
6537         * tui/tui-interp.c: Include "inferior.h".
6538         * varobj.c (varobj_create): Use inferior_thread.
6539         (value_of_root_1): Use find_thread_global_id instead of
6540         global_thread_id_to_ptid.
6541
6542 2018-06-21  Alan Hayward  <alan.hayward@arm.com>
6543
6544         * regcache.c (readable_regcache::read_part): Avoid memcpy when
6545         possible.
6546         (regcache::write_part): Likewise.
6547         (readable_regcache::cooked_read_part): Update comment.
6548         (readable_regcache::cooked_write_part): Likewise.
6549         * regcache.h: (readable_regcache::read_part): Likewise.
6550         (regcache::write_part): Likewise.
6551
6552 2018-06-21  Richard Bunt  <richard.bunt@arm.com>
6553             Dirk Schubert  <dirk.schubert@arm.com>
6554
6555         * aarch64-linux-nat.c (post_attach): New.
6556         (aarch64_linux_nat_target::post_attach): Override post_attach to
6557         record the number of hardware debug registers.
6558
6559 2018-06-20  Tom Tromey  <tom@tromey.com>
6560
6561         * python/py-param.c (add_setshow_generic): Make parameters const.
6562         (parmpy_init): Update.
6563
6564 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
6565
6566         * regcache.h (regcache_cooked_read_ftype): Rename to...
6567         (register_read_ftype): ...this, change type to function_view.
6568         (class reg_buffer) <save>: Remove src parameter.
6569         (readonly_detached_regcache) <readonly_detached_regcache>: Make
6570         parameter non-const in first overload.  Remove src parameter in
6571         second overload.
6572         * regcache.c (do_cooked_read): Remove.
6573         (readonly_detached_regcache::readonly_detached_regcache): Make
6574         parameter non-const, adjust call to other constructor.
6575         (reg_buffer::save): Remove src parameter.
6576         * frame.c (do_frame_register_read): Remove.
6577         (frame_save_as_regcache): Use lambda function.
6578         * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
6579         parameter to ppu2spu_data *.
6580         (ppu2spu_sniffer): Use lambda function.
6581
6582 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
6583
6584         * record-full.c (record_full_target::insert_breakpoint): Remove
6585         "struct" keyword, add const.
6586
6587 2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>
6588
6589         * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
6590         PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
6591         * configure.ac: Remove AC_PREREQ, add missing quoting.
6592         * gnulib/configure.ac: Modernize usage of
6593         AC_INIT/AM_INIT_AUTOMAKE.  Remove AC_PREREQ.
6594         * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
6595         (AUTOMAKE_VERSION): Bump to 1.15.1.
6596         * configure: Re-generate.
6597         * config.in: Re-generate.
6598         * aclocal.m4: Re-generate.
6599         * gnulib/aclocal.m4: Re-generate.
6600         * gnulib/config.in: Re-generate.
6601         * gnulib/configure: Re-generate.
6602         * gnulib/import/Makefile.in: Re-generate.
6603
6604 2018-06-19  Pedro Alves  <palves@redhat.com>
6605
6606         * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
6607         (lookup_minimal_symbol_by_pc_section): ... here with
6608         gdb_assert_not_reached added.
6609
6610 2018-06-19  Pedro Alves  <palves@redhat.com>
6611
6612         * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
6613         parameter with a block parameter.  Compare location's block symbol
6614         with the frame's block instead of addresses.
6615         (skip_inline_frames): Pass the current block instead of the
6616         frame's address.  Break out as soon as we determine the frame
6617         should not be skipped.
6618
6619 2018-06-18  Tom Tromey  <tom@tromey.com>
6620
6621         * solib-aix.c (solib_aix_get_section_offsets): Return
6622         unique_xmalloc_ptr.
6623         (solib_aix_solib_create_inferior_hook): Update.
6624
6625 2018-06-18  Tom Tromey  <tom@tromey.com>
6626
6627         * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
6628
6629 2018-06-18  Tom Tromey  <tom@tromey.com>
6630
6631         * solib-frv.c (frv_relocate_main_executable): Use
6632         unique_xmalloc_ptr.
6633         * solib-dsbt.c (dsbt_relocate_main_executable): Use
6634         unique_xmalloc_ptr.
6635
6636 2018-06-18  Tom Tromey  <tom@tromey.com>
6637
6638         * objfiles.h (inhibit_section_map_updates): Update.
6639         (resume_section_map_updates, resume_section_map_updates_cleanup):
6640         Remove.
6641         * solib-svr4.c (svr4_handle_solib_event): Update.
6642         * objfiles.c (inhibit_section_map_updates): Return
6643         scoped_restore_tmpl<int>.
6644         (resume_section_map_updates, resume_section_map_updates_cleanup):
6645         Remove.
6646
6647 2018-06-18  Tom Tromey  <tom@tromey.com>
6648
6649         * valprint.h (read_string): Update.
6650         * valprint.c (read_string): Change type of "buffer".
6651         (val_print_string): Update.
6652         * python/py-value.c (valpy_string): Update.
6653         * language.h (struct language_defn) <la_get_string>: Change
6654         type of "buffer".
6655         (default_get_string, c_get_string): Update.
6656         * language.c (default_get_string): Change type of "buffer".
6657         * guile/scm-value.c (gdbscm_value_to_string): Update.
6658         * c-lang.c (c_get_string): Change type of "buffer".
6659
6660 2018-06-18  Tom Tromey  <tom@tromey.com>
6661
6662         * ser-mingw.c (struct pipe_state_destroyer): New.
6663         (pipe_state_up): New typedef.
6664         (cleanup_pipe_state): Remove.
6665         (pipe_windows_open): Use pipe_state_up.  Don't release argv.
6666
6667 2018-06-18  Tom Tromey  <tom@tromey.com>
6668
6669         * rust-lang.h (rust_yyerror): Don't declare.
6670         * rust-lang.c (rust_language_defn): Update.
6671         * rust-exp.y (yyerror): Now static.
6672         * parse.c (parse_exp_in_context_1): Update.
6673         * p-lang.h (p_yyerror): Don't declare.
6674         * p-lang.c (p_language_defn): Update.
6675         * p-exp.y (yyerror): Now static.
6676         * opencl-lang.c (opencl_language_defn): Update.
6677         * objc-lang.c (objc_language_defn): Update.
6678         * m2-lang.h (m2_yyerror): Don't declare.
6679         * m2-lang.c (m2_language_defn): Update.
6680         * m2-exp.y (yyerror): Now static.
6681         * language.h (struct language_defn) <la_error>: Remove.
6682         * language.c (unk_lang_error): Remove.
6683         (unknown_language_defn, auto_language_defn): Remove.
6684         * go-lang.h (go_yyerror): Don't declare.
6685         * go-lang.c (go_language_defn): Update.
6686         * go-exp.y (yyerror): Now static.
6687         * f-lang.h (f_yyerror): Don't declare.
6688         * f-lang.c (f_language_defn): Update.
6689         * f-exp.y (yyerror): Now static.
6690         * d-lang.h (d_yyerror): Don't declare.
6691         * d-lang.c (d_language_defn): Update.
6692         * d-exp.y (yyerror): Now static.
6693         * c-lang.h (c_yyerror): Don't declare.
6694         * c-lang.c (c_language_defn, cplus_language_defn)
6695         (asm_language_defn, minimal_language_defn): Update.
6696         * c-exp.y (yyerror): Now static.
6697         * ada-lang.h (ada_yyerror): Don't declare.
6698         * ada-lang.c (ada_language_defn): Update.
6699         * ada-exp.y (yyerror): Now static.
6700
6701 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
6702
6703         * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
6704         (store_sveregs_to_thread): Likewise.
6705         (aarch64_linux_fetch_inferior_registers): Check for SVE.
6706         (aarch64_linux_store_inferior_registers): Likewise.
6707         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
6708         function.
6709         (aarch64_sve_regs_copy_to_regcache): Likewise.
6710         (aarch64_sve_regs_copy_from_regcache): Likewise.
6711         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
6712         declaration.
6713         (aarch64_sve_regs_copy_to_regcache): Likewise.
6714         (aarch64_sve_regs_copy_from_regcache): Likewise.
6715         (sve_context): Structure from Linux headers.
6716         (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
6717         (SVE_SIG_ZREG_SIZE): Likewise.
6718         (SVE_SIG_PREG_SIZE): Likewise.
6719         (SVE_SIG_FFR_SIZE): Likewise.
6720         (SVE_SIG_REGS_OFFSET): Likewise.
6721         (SVE_SIG_ZREGS_OFFSET): Likewise.
6722         (SVE_SIG_ZREG_OFFSET): Likewise.
6723         (SVE_SIG_ZREGS_SIZE): Likewise.
6724         (SVE_SIG_PREGS_OFFSET): Likewise.
6725         (SVE_SIG_PREG_OFFSET): Likewise.
6726         (SVE_SIG_PREGS_SIZE): Likewise.
6727         (SVE_SIG_FFR_OFFSET): Likewise.
6728         (SVE_SIG_REGS_SIZE): Likewise.
6729         (SVE_SIG_CONTEXT_SIZE): Likewise.
6730         (SVE_PT_REGS_MASK): Likewise.
6731         (SVE_PT_REGS_FPSIMD): Likewise.
6732         (SVE_PT_REGS_SVE): Likewise.
6733         (SVE_PT_VL_INHERIT): Likewise.
6734         (SVE_PT_VL_ONEXEC): Likewise.
6735         (SVE_PT_REGS_OFFSET): Likewise.
6736         (SVE_PT_FPSIMD_OFFSET): Likewise.
6737         (SVE_PT_FPSIMD_SIZE): Likewise.
6738         (SVE_PT_SVE_ZREG_SIZE): Likewise.
6739         (SVE_PT_SVE_PREG_SIZE): Likewise.
6740         (SVE_PT_SVE_FFR_SIZE): Likewise.
6741         (SVE_PT_SVE_FPSR_SIZE): Likewise.
6742         (SVE_PT_SVE_FPCR_SIZE): Likewise.
6743         (__SVE_SIG_TO_PT): Likewise.
6744         (SVE_PT_SVE_OFFSET): Likewise.
6745         (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
6746         (SVE_PT_SVE_ZREG_OFFSET): Likewise.
6747         (SVE_PT_SVE_ZREGS_SIZE): Likewise.
6748         (SVE_PT_SVE_PREGS_OFFSET): Likewise.
6749         (SVE_PT_SVE_PREG_OFFSET): Likewise.
6750         (SVE_PT_SVE_PREGS_SIZE): Likewise.
6751         (SVE_PT_SVE_FFR_OFFSET): Likewise.
6752         (SVE_PT_SVE_FPSR_OFFSET): Likewise.
6753         (SVE_PT_SVE_FPCR_OFFSET): Likewise.
6754         (SVE_PT_SVE_SIZE): Likewise.
6755         (SVE_PT_SIZE): Likewise.
6756         (HAS_SVE_STATE): New define.
6757
6758 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
6759
6760         * nat/aarch64-sve-linux-sigcontext.h: New file.
6761         * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
6762         new files.
6763         (SVE_VQ_MIN): Likewise.
6764         (SVE_VQ_MAX): Likewise.
6765         (SVE_VL_MIN): Likewise.
6766         (SVE_VL_MAX): Likewise.
6767         (SVE_NUM_ZREGS): Likewise.
6768         (SVE_NUM_PREGS): Likewise.
6769         (sve_vl_valid): Likewise.
6770         (struct user_sve_header): Likewise.
6771
6772 2018-06-16  Andrew Burgess  <andrew.burgess@embecosm.com>
6773             Richard Bunt <Richard.Bunt@arm.com>
6774
6775         * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
6776         was requested by GDB.
6777
6778 2018-06-15  Tom de Vries  <tdevries@suse.de>
6779
6780         * MAINTAINERS (Write After Approval): Add Tom de Vries.
6781
6782 2018-06-14  Simon Marchi  <simon.marchi@polymtl.ca>
6783
6784         * gnulib/update-gnulib.sh: Print expected versions of
6785         autoconf/aclocal.
6786
6787 2018-06-14  Simon Marchi  <simon.marchi@ericsson.com>
6788
6789         * arch-utils.c (default_type_align): Use type_length_units.
6790         * gdbtypes.c (type_align): Use type_length_units.
6791
6792 2018-06-14  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6793
6794         * cli/cli-script.c (_initialize_cli_script): Fix online documentation
6795         of 'define' command.
6796
6797 2018-06-14  Tom de Vries  <tdevries@suse.de>
6798
6799         PR cli/22573
6800         * infcmd.c (print_return_value_1): Use get_user_print_options instead of
6801         get_no_prettyformat_print_options.
6802
6803 2018-06-13  Simon Marchi  <simon.marchi@ericsson.com>
6804
6805         * sparc-nat.h: Include target.h.
6806         * sparc64-linux-nat.c (class sparc64_linux_nat_target)
6807         <fetch_registers>: Remove this argument in function call.
6808         <store_registers>: Remove this argument in function call, remove
6809         extra semicolon.
6810         <low_forget_process>: Call sparc64_forget_process instead of
6811         sparc_forget_process.
6812
6813 2018-06-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
6814
6815         * procfs.c (_initialize_procfs): Use add_inf_child_target.
6816         (procfs_target::make_corefile_notes): Adjust to new
6817         target_read_alloc return type.
6818
6819 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
6820             Stephen Roberts  <stephen.roberts@arm.com>
6821
6822         PR gdb/22882
6823         * infrun.c (fetch_inferior_event): If GDB is not proceeding then
6824         run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
6825         Move should_notify_stop local into more inner scope.
6826
6827 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
6828             Stephen Roberts  <stephen.roberts@arm.com>
6829
6830         PR gdb/22882
6831         * infrun.c (resume_1): Add call to mark_async_event_handler.
6832
6833 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
6834
6835         * infrun.c (do_target_wait): Change old version of $pc printed.
6836
6837 2018-06-11  Simon Marchi  <simon.marchi@ericsson.com>
6838
6839         * dwarf2read.c (read_index_from_section): Rename to...
6840         (read_gdb_index_from_section): ... this, update all callers.
6841         (dwarf2_read_index): Rename to...
6842         (dwarf2_read_gdb_index): ... this, update all callers.
6843
6844 2018-06-11  John David Anglin  <danglin@gcc.gnu.org>
6845
6846         * gdb/hppa-linux-nat.c
6847         (hppa_linux_nat_target::fetch_inferior_registers): Rename to
6848         hppa_linux_nat_target::fetch_registers.
6849
6850 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
6851
6852         * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
6853         * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
6854         (AARCH64_DWARF_SVE_FFR): Likewise.
6855         (AARCH64_DWARF_SVE_P0): Likewise.
6856         (AARCH64_DWARF_SVE_Z0): Likewise.
6857
6858 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
6859
6860         * common/common-regcache.h (raw_compare): New function.
6861         * regcache.c (regcache::raw_compare): Likewise.
6862         * regcache.h (regcache::raw_compare): New declaration.
6863
6864 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
6865
6866         * common/common-regcache.h (reg_buffer_common): New structure.
6867         * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
6868         (reg_buffer::raw_supply): Likewise.
6869         (reg_buffer::raw_supply_integer): Likewise.
6870         (reg_buffer::raw_supply_zeroed): Likewise.
6871         (reg_buffer::raw_collect): Likewise.
6872         (reg_buffer::raw_collect_integer): Likewise.
6873         * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
6874         (reg_buffer::raw_supply): Likewise.
6875         (reg_buffer::raw_supply_integer): Likewise.
6876         (reg_buffer::raw_supply_zeroed): Likewise.
6877         (reg_buffer::raw_collect): Likewise.
6878         (reg_buffer::raw_collect_integer): Likewise.
6879
6880 2018-06-10  Tom Tromey  <tom@tromey.com>
6881
6882         * remote.c (stop_reply_p): Remove typedef.  Don't declare queue.
6883         (class remote_state) <stop_reply_queue>: Now std::vector.
6884         (remote_state::~remote_state)
6885         (remote_target::stop_reply_queue_length): Update.
6886         (struct queue_iter_param, remove_child_of_pending_fork)
6887         (struct check_pending_event_prevents_wildcard_vcont_callback_data)
6888         (check_pending_event_prevents_wildcard_vcont_callback)
6889         (remove_stop_reply_for_inferior)
6890         (remove_stop_reply_of_remote_state)
6891         (remote_notif_remove_once_on_match)
6892         (stop_reply_match_ptid_and_ws)
6893         (remote_kill_child_of_pending_fork): Remove.
6894         (remote_target::remove_new_fork_children)
6895         (remote_target::check_pending_events_prevent_wildcard_vcont)
6896         (remote_target::discard_pending_stop_replies)
6897         (remote_target::discard_pending_stop_replies_in_queue)
6898         (remote_target::remote_notif_remove_queued_reply)
6899         (remote_target::queued_stop_reply)
6900         (remote_target::push_stop_reply, remote_target::peek_stop_reply)
6901         (remote_target::wait, remote_target::kill_new_fork_children)
6902         (remote_target::async): Update.
6903
6904 2018-06-10  Tom Tromey  <tom@tromey.com>
6905
6906         * record-full.c (record_full_arch_list_cleanups): Remove.
6907         (record_full_message): Use try/catch.
6908         (record_full_wait_cleanups): Remove.
6909         (record_full_wait_1): Use try/catch.
6910         (record_full_restore): Likewise.
6911
6912 2018-06-10  Tom Tromey  <tom@tromey.com>
6913
6914         * record-full.c (record_full_breakpoint_p): Remove typedef.  Don't
6915         declare VEC.  Add constructor.
6916         <in_target_beneath>: Now bool.
6917         (record_full_breakpoints): Now a std::vector, static.
6918         (record_full_sync_record_breakpoints)
6919         (record_full_init_record_breakpoints)
6920         (record_full_target::insert_breakpoint)
6921         (record_full_target::remove_breakpoint): Update.  Don't use XNEW.
6922
6923 2018-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
6924
6925         * dwarf2read.c (process_cu_includes): Remove struct keyword.
6926         * serial.c (serial_interface_lookup): Remove struct keyword.
6927
6928 2018-06-10  Tom Tromey  <tom@tromey.com>
6929
6930         * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
6931         method.
6932         * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
6933         a method.
6934         * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
6935         method.
6936         * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
6937         "beneath" as a method.
6938         * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
6939         Use "beneath" as a method.
6940
6941 2018-06-10  Tom Tromey  <tom@tromey.com>
6942
6943         * tracefile.c (struct trace_file_writer_deleter): New.
6944         <operator()>: Rename from trace_file_writer_xfree.
6945         (trace_file_writer_up): New typedef.
6946         (tsave_command, trace_save_tfile, trace_save_ctf): Update.
6947
6948 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
6949
6950         * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
6951         <m_registers, m_register_status>: Change type to
6952         std::unique_ptr.
6953         * regcache.c (reg_buffer::reg_buffer): Use new instead of
6954         XCNEWVEC.
6955
6956 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
6957
6958         * common/common-regcache.h (enum register_status): Add
6959         underlying type "signed char".
6960         * regcache.h (reg_buffer) <m_register_status>: Change type to
6961         register_status *.
6962         * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
6963         register_status instead of signed char.
6964         (reg_buffer::save): Use REG_UNKNOWN instead of 0.
6965         (reg_buffer::get_register_status): Remove cast.
6966         (readable_regcache::raw_read): Remove cast.
6967         (readable_regcache::cooked_read): Remove cast.
6968
6969 2018-06-09  Tom Tromey  <tom@tromey.com>
6970
6971         * source.c (reverse_search_command, forward_search_command): Use
6972         scoped_fd.
6973
6974 2018-06-09  Tom Tromey  <tom@tromey.com>
6975
6976         * serial.c (serial_ops_p): Remove typedef.  Don't declare VEC.
6977         (serial_ops_list): Now static, std::vector.
6978         (serial_interface_lookup, serial_add_interface): Update.
6979
6980 2018-06-09  Tom Tromey  <tom@tromey.com>
6981
6982         * dwarf2read.c (process_cu_includes): Update.
6983         (process_full_comp_unit): Update.
6984         * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
6985         std::vector.
6986
6987 2018-06-08  Paul Koning  <paul_koning@dell.com>
6988
6989         PR gdb/23252
6990
6991         * python/python.c (do_start_initialization):
6992         Avoid call to internal Python API.
6993         (init__gdb_module): New function.
6994
6995 2018-06-08  Gary Benson <gbenson@redhat.com>
6996
6997         * linux-thread-db.c (valprint.h): New include.
6998         (struct check_thread_db_info): New structure.
6999         (check_thread_db_on_load, tdb_testinfo): New static globals.
7000         (check_thread_db, check_thread_db_callback): New functions.
7001         (try_thread_db_load_1): Run integrity checks if requested.
7002         (maintenance_check_libthread_db): New function.
7003         (_initialize_thread_db): Register "maint check libthread-db"
7004         and "maint set/show check-libthread-db".
7005         * NEWS: Mention the above new commands.
7006
7007 2018-06-08  Tom Tromey  <tom@tromey.com>
7008
7009         * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
7010         now a method.
7011
7012 2018-06-08  Tom Tromey  <tom@tromey.com>
7013
7014         * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
7015
7016 2018-06-08  Tom Tromey  <tom@tromey.com>
7017
7018         * common/btrace-common.h (struct btrace_data): Add constructor,
7019         destructor, move assignment operator.
7020         <empty, clear, fini>: New methods.
7021         <format>: Initialize.
7022         (btrace_data_init, btrace_data_fini, btrace_data_clear)
7023         (btrace_data_empty): Don't declare.
7024         * common/btrace-common.c (btrace_data_init): Remove.
7025         (btrace_data::fini): Rename from btrace_data_fini.
7026         (btrace_data::empty): Rename from btrace_data_empty.
7027         (btrace_data::clear): Rename from btrace_data_clear.  Return
7028         bool.
7029         * btrace.h (make_cleanup_btrace_data): Don't declare.
7030         * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
7031         (parse_xml_btrace): Update.
7032         (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
7033         (maint_btrace_clear_packet_history_cmd): Update.
7034
7035 2018-06-07  Pedro Alves  <palves@redhat.com>
7036
7037         * target.h (target_ops) <beneath>: Now a method.  All references
7038         updated.
7039         (class target_stack): New.
7040         * target.c (g_target_stack): New.
7041         (g_current_top_target): Delete.
7042         (current_top_target): Get the top target out of g_target_stack.
7043         (target_stack::push, target_stack::unpush): New.
7044         (push_target, unpush_target): Reimplement.
7045         (target_is_pushed): Reimplement in terms of g_target_stack.
7046         (target_ops::beneath, target_stack::find_beneath): New.
7047
7048 2018-06-07  Pedro Alves  <palves@redhat.com>
7049
7050         * target.h (find_target_beneath): Delete declaration.
7051         * target.c (find_target_beneath): Delete definition.
7052         * aix-thread.c: All callers of find_target_beneath adjusted to
7053         call target_ops::beneath instead.
7054         * bsd-uthread.c: Likewise.
7055         * linux-thread-db.c: Likewise.
7056         * ravenscar-thread.c: Likewise.
7057         * sol-thread.c: Likewise.
7058         * spu-multiarch.c: Likewise.
7059
7060 2018-06-07  Pedro Alves  <palves@redhat.com>
7061
7062         * target.h (target_ops) <beneath>: Now a method.  All references
7063         updated.
7064         (target_ops) <m_beneath>: New.
7065         * target.c (target_ops::beneath): New.
7066         * corelow.c: Adjust all references to target_ops::beneath.
7067         * linux-thread-db.c: Likewise.
7068         * make-target-delegates: Likewise.
7069         * record-btrace.c: Likewise.
7070         * record-full.c: Likewise.
7071         * remote.c: Likewise.
7072         * target.c: Likewise.
7073         * target-delegates.c: Regenerate.
7074
7075 2018-06-07  Pedro Alves  <palves@redhat.com>
7076
7077         * target.h (target_stack): Delete.
7078         (current_top_target): Declare function.
7079         * target.c (target_stack): Delete.
7080         (g_current_top_target): New.
7081         (current_top_target): New function.
7082         * auxv.c: Use current_top_target instead of target_stack
7083         throughout.
7084         * avr-tdep.c: Likewise.
7085         * breakpoint.c: Likewise.
7086         * corefile.c: Likewise.
7087         * elfread.c: Likewise.
7088         * eval.c: Likewise.
7089         * exceptions.c: Likewise.
7090         * frame.c: Likewise.
7091         * gdbarch-selftests.c: Likewise.
7092         * gnu-v3-abi.c: Likewise.
7093         * ia64-tdep.c: Likewise.
7094         * ia64-vms-tdep.c: Likewise.
7095         * infcall.c: Likewise.
7096         * infcmd.c: Likewise.
7097         * infrun.c: Likewise.
7098         * linespec.c: Likewise.
7099         * linux-tdep.c: Likewise.
7100         * minsyms.c: Likewise.
7101         * ppc-linux-nat.c: Likewise.
7102         * ppc-linux-tdep.c: Likewise.
7103         * procfs.c: Likewise.
7104         * regcache.c: Likewise.
7105         * remote.c: Likewise.
7106         * rs6000-tdep.c: Likewise.
7107         * s390-linux-nat.c: Likewise.
7108         * s390-tdep.c: Likewise.
7109         * solib-aix.c: Likewise.
7110         * solib-darwin.c: Likewise.
7111         * solib-dsbt.c: Likewise.
7112         * solib-spu.c: Likewise.
7113         * solib-svr4.c: Likewise.
7114         * solib-target.c: Likewise.
7115         * sparc-tdep.c: Likewise.
7116         * sparc64-tdep.c: Likewise.
7117         * spu-tdep.c: Likewise.
7118         * symfile.c: Likewise.
7119         * symtab.c: Likewise.
7120         * target-descriptions.c: Likewise.
7121         * target-memory.c: Likewise.
7122         * target.c: Likewise.
7123         * target.h: Likewise.
7124         * tracefile-tfile.c: Likewise.
7125         * tracepoint.c: Likewise.
7126         * valops.c: Likewise.
7127         * valprint.c: Likewise.
7128         * value.c: Likewise.
7129         * windows-tdep.c: Likewise.
7130         * mi/mi-main.c: Likewise.
7131
7132 2018-06-07  Tom Tromey  <tom@tromey.com>
7133
7134         * valprint.h (build_address_symbolic): Declare.
7135         * printcmd.c (print_address_symbolic): Update.
7136         (build_address_symbolic): Change "name" and "filename" to
7137         std::string.
7138         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
7139         Update.
7140         * defs.h (build_address_symbolic): Remove declaration.
7141
7142 2018-06-07  Alan Hayward  <alan.hayward@arm.com>
7143
7144         * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
7145         (aarch64_vnv_type): Add function.
7146         (aarch64_pseudo_register_name): Add V regs for SVE.
7147         (aarch64_pseudo_register_type): Likewise.
7148         (aarch64_pseudo_register_reggroup_p): Likewise.
7149         (aarch64_pseudo_read_value_2): Use V0 offset for SVE
7150         (aarch64_pseudo_read_value): Add V regs for SVE.
7151         (aarch64_pseudo_write_2): Use V0 offset for SVE
7152         (aarch64_pseudo_write): Add V regs for SVE.
7153         * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
7154
7155 2018-06-06  Sergio Durigan Junior  <sergiodj@redhat.com>
7156
7157         * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
7158         (sve_vl_from_vq): Likewise.
7159
7160 2018-06-05  Tom Tromey  <tom@tromey.com>
7161
7162         * cli/cli-cmds.c (show_version): Update.
7163         * top.c (print_gdb_version): Add "interactive" parameter.
7164         Update.
7165         * main.c (captured_main_1): Update.
7166         * top.h (print_gdb_version): Add "interactive" parameter and a
7167         comment.
7168
7169 2018-06-05  David Malcolm  <dmalcolm@redhat.com>
7170
7171         * common/enum-flags.h: Add trailing semicolon to example in
7172         comment.
7173
7174 2018-06-05  Tom Tromey  <tom@tromey.com>
7175
7176         PR cli/12326:
7177         * NEWS: Add entry about pager.
7178         * utils.c (pagination_disabled_for_command): New global.
7179         (prompt_for_continue): Allow "c" response to prompt.
7180         (reinitialize_more_filter): Clear
7181         pagination_disabled_for_command.
7182         (fputs_maybe_filtered): Check pagination_disabled_for_command.
7183
7184 2018-06-04  Tom Tromey  <tom@tromey.com>
7185
7186         * ada-lang.h (ada_lookup_symbol_list): Update.
7187         * ada-lang.c (resolve_subexp): Update.
7188         (symbols_are_identical_enums): Change type of syms.  Remove nsyms
7189         parameter.
7190         (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
7191         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
7192         results parameter to std::vector.
7193         (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
7194         Update.
7195         * ada-exp.y (block_lookup): Update.
7196         (select_possible_type_sym): Change type of syms.  Remove nsyms
7197         parameter.
7198         (write_var_or_type, write_name_assoc): Update.
7199
7200 2018-06-04  Joel Brobecker  <brobecker@adacore.com>
7201
7202         * windows-nat.c (windows_nat_target::xfer_partial): Return
7203         TARGET_XFER_E_IO if we need to delegate to the target beneath
7204         but BENEATH is NULL.
7205
7206 2018-06-04  Simon Marchi  <simon.marchi@ericsson.com>
7207
7208         * Makefile.in (config.status): Add configure.nat as a
7209         dependency.
7210
7211 2018-06-04  Tom Tromey  <tom@tromey.com>
7212
7213         * cp-name-parser.y (cpname_state): Add method declarations.
7214         (HANDLE_QUAL): Update.
7215         (cpname_state::d_grab, cpname_state::fill_comp)
7216         (cpname_state::make_operator, cpname_state::make_dtor)
7217         (cpname_state::make_builtin_type, cpname_state::make_name)
7218         (cpname_state::d_qualify, cpname_state::d_int_type)
7219         (cpname_state::d_unary, cpname_state::d_binary): Now methods.
7220         (%union): Move earlier.
7221
7222 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
7223
7224         * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
7225
7226 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
7227
7228         * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
7229         (aarch64_pseudo_write_1): Likewise.
7230         (aarch64_pseudo_read_value): Use helper.
7231         (aarch64_pseudo_write): Likewise.
7232
7233 2018-06-04  Pedro Alves  <palves@redhat.com>
7234
7235         * darwin-nat.c (darwin_ops): Delete.
7236         (darwin_attach_pid): Use get_native_target.
7237
7238 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
7239
7240         * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
7241         * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
7242
7243 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
7244
7245         * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
7246         * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
7247         (aarch64_gdbarch_init): Check for SVE.
7248         * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
7249
7250 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
7251
7252         * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
7253         * aarch64-tdep.h (aarch64_read_description): Likewise.
7254         * arch/aarch64.c (aarch64_create_target_description): Likewise.
7255         * arch/aarch64.h (aarch64_create_target_description): Likewise.
7256         * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
7257         * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
7258         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
7259
7260 2018-06-02  Simon Marchi  <simon.marchi@ericsson.com>
7261
7262         * value.c (value_fetch_lazy_bitfield): New.
7263         (value_fetch_lazy_memory): New.
7264         (value_fetch_lazy_register): New.
7265         (value_fetch_lazy): Factor out to smaller functions.
7266
7267 2018-06-01  Tom Tromey  <tom@tromey.com>
7268
7269         * cp-name-parser.y (backslashable, represented): Now const.
7270
7271 2018-06-01  Tom Tromey  <tom@tromey.com>
7272
7273         * cp-name-parser.y: Include parser-defs.h.
7274         (parser_fprintf): Remove declaration.
7275
7276 2018-06-01  Tom Tromey  <tom@tromey.com>
7277
7278         * cp-name-parser.y: Use %pure-parser, %lex-param, and
7279         %parse-param.
7280         (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
7281         (global_result): Remove globals.
7282         (struct cpname_state): New.
7283         (yyparse): Don't declare.
7284         (yylex, yyerror): Move declarations after %union.
7285         (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
7286         (make_name): Add state parameter.
7287         Update all callers.
7288         (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
7289         parameter.
7290         (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
7291         Update.
7292         (yylex): Add lvalp, state parameters.
7293         (yyerror): Add state parameter.
7294         (cp_demangled_name_to_comp): Update.
7295
7296 2018-06-01  Tom Tromey  <tom@tromey.com>
7297
7298         * cp-name-parser.y (parser_fprintf): Declare.
7299         (GDB_YY_REMAP_PREFIX): Define.
7300         Include yy-remap.h.  Don't redefine yy* identifiers.
7301
7302 2018-06-01  Tom Tromey  <tom@tromey.com>
7303
7304         * python/py-type.c (typy_legacy_template_argument): Update.
7305         * cp-support.h (cp_demangled_name_to_comp): Update.
7306         * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
7307         parameter to be a "std::string *".
7308         (main): Update.
7309
7310 2018-06-01  H.J. Lu  <hongjiu.lu@intel.com>
7311
7312         * ada-lex.l: Include "diagnostics.h" instead of
7313         "common/diagnostics.h".
7314         * unittests/environ-selftests.c: Likewise.
7315         * common/diagnostics.h: Moved to ../include.
7316
7317 2018-06-01  Joel Brobecker  <brobecker@adacore.com>
7318
7319         * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
7320         to language_mode_manual while calling breakpoint_re_set_one.
7321
7322 2018-06-01  Tom Tromey  <tom@tromey.com>
7323
7324         * valops.c (value_cast_structs, destructor_name_p): Update.
7325         * symtab.c (gdb_mangle_name): Update.
7326         * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
7327         Update.
7328         * p-valprint.c (pascal_object_is_vtbl_ptr_type)
7329         (pascal_object_print_value_fields, pascal_object_print_value):
7330         Update.
7331         * p-typeprint.c (pascal_type_print_derivation_info): Update.
7332         * linespec.c (find_methods): Update.
7333         * gdbtypes.h (type_name_no_tag): Remove.
7334         (type_name_or_error): Rename from type_name_no_tag_or_error.
7335         * gdbtypes.c (type_name_no_tag): Remove.
7336         (type_name_or_error): Rename from type_name_no_tag_or_error.
7337         (lookup_struct_elt_type, check_typedef): Update.
7338         * expprint.c (print_subexp_standard): Update.
7339         * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
7340         * d-namespace.c (d_lookup_nested_symbol): Update.
7341         * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
7342         (cp_print_class_member): Update.
7343         * cp-namespace.c (cp_lookup_nested_symbol): Update.
7344         * completer.c (add_struct_fields): Update.
7345         * c-typeprint.c (cp_type_print_derivation_info)
7346         (c_type_print_varspec_prefix, c_type_print_base_struct_union):
7347         Update.
7348         * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
7349         (ada_prefer_type, ada_is_exception_sym): Update.
7350
7351 2018-06-01  Tom Tromey  <tom@tromey.com>
7352
7353         * valops.c (enum_constant_from_type, value_namespace_elt)
7354         (value_maybe_namespace_elt): Update.
7355         * valarith.c (find_size_for_pointer_math): Update.
7356         * target-descriptions.c (make_gdb_type): Update.
7357         * symmisc.c (print_symbol): Update.
7358         * stabsread.c (define_symbol, read_type)
7359         (complain_about_struct_wipeout, add_undefined_type)
7360         (cleanup_undefined_types_1): Update.
7361         * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
7362         (rust_range_type_p, val_print_struct, rust_print_struct_def)
7363         (rust_internal_print_type, rust_composite_type)
7364         (rust_evaluate_funcall, rust_evaluate_subexp)
7365         (rust_inclusive_range_type_p): Update.
7366         * python/py-type.c (typy_get_tag): Update.
7367         * p-typeprint.c (pascal_type_print_base): Update.
7368         * mdebugread.c (parse_symbol, parse_type): Update.
7369         * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
7370         Update.
7371         * guile/scm-type.c (gdbscm_type_tag): Update.
7372         * go-lang.c (sixg_string_p): Update.
7373         * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
7374         Update.
7375         * gdbtypes.h (struct main_type) <tag_name>: Remove.
7376         (TYPE_TAG_NAME): Remove.
7377         * gdbtypes.c (type_name_no_tag): Simplify.
7378         (check_typedef, check_types_equal, recursive_dump_type)
7379         (copy_type_recursive, arch_composite_type): Update.
7380         * f-typeprint.c (f_type_print_base): Update.  Print "Type" prefix
7381         in summary mode when needed.
7382         * eval.c (evaluate_funcall): Update.
7383         * dwarf2read.c (fixup_go_packaging, read_structure_type)
7384         (process_structure_scope, read_enumeration_type)
7385         (read_namespace_type, read_module_type, determine_prefix): Update.
7386         * cp-support.c (inspect_type): Update.
7387         * coffread.c (process_coff_symbol, decode_base_type): Update.
7388         * c-varobj.c (c_is_path_expr_parent): Update.
7389         * c-typeprint.c (c_type_print_base_struct_union): Update.
7390         (c_type_print_base_1): Update.  Print struct/class/union/enum in
7391         summary when using C language.
7392         * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
7393         (gen_maybe_namespace_elt): Update.
7394         * ada-lang.c (ada_type_name): Simplify.
7395         (empty_record, ada_template_to_fixed_record_type_1)
7396         (template_to_static_fixed_type)
7397         (to_record_with_fixed_variant_part, ada_check_typedef): Update.
7398
7399 2018-06-01  Tom Tromey  <tom@tromey.com>
7400
7401         * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
7402         c_print_type.
7403         * c-typeprint.c (c_print_type_1): Add "language" parameter.
7404         (c_print_type): Update.
7405         (c_print_type): New overload.
7406         (c_type_print_varspec_prefix, c_type_print_args)
7407         (c_type_print_varspec_suffix, c_print_type_no_offsets)
7408         (c_type_print_base_struct_union, c_type_print_base_1)
7409         (cp_type_print_method_args): Add "language" parameter.
7410         (c_type_print_base): Update.
7411         * c-lang.h (c_print_type): Add new overload.
7412
7413 2018-06-01  Tom Tromey  <tom@tromey.com>
7414
7415         * typeprint.h (c_type_print_varspec_suffix): Don't declare.
7416         * c-typeprint.c (c_type_print_varspec_suffix): Now static.
7417
7418 2018-06-01  Alan Hayward  <alan.hayward@arm.com>
7419
7420         * aarch64-tdep.c (aarch64_sve_register_names): New const
7421         var.
7422         * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
7423         (AARCH64_SVE_Z_REGS_NUM): New define.
7424         (AARCH64_SVE_P_REGS_NUM): Likewise.
7425         (AARCH64_SVE_NUM_REGS): Likewise.
7426
7427 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
7428
7429         * nat/linux-ptrace.h [__alpha__]
7430         (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
7431         definitions.
7432
7433 2018-05-31  Maciej W. Rozycki  <macro@mips.com>
7434
7435         * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
7436         the endianness selected.
7437         * NEWS: Document `set endian auto' mode operation update.
7438
7439 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
7440
7441         * Makefile.in: Add new header.
7442         * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
7443         (sve_vl_from_vg): Likewise.
7444         (sve_vq_from_vl): Likewise.
7445         (sve_vl_from_vq): Likewise.
7446         (sve_vq_from_vg): Likewise.
7447         (sve_vg_from_vq): Likewise.
7448         * configure.nat: Add new c file.
7449         * nat/aarch64-sve-linux-ptrace.c: New file.
7450         * nat/aarch64-sve-linux-ptrace.h: New file.
7451
7452 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
7453
7454         * aarch64-linux-nat.c (aarch64_linux_read_description):
7455         Add parmeter zero.
7456         * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
7457         Likewise.
7458         * aarch64-tdep.c (tdesc_aarch64_list): Add.
7459         (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
7460         (aarch64_gdbarch_init): Add parmeter zero.
7461         * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
7462         * arch/aarch64.c (aarch64_create_target_description): Check VQ.
7463         * arch/aarch64.h (aarch64_create_target_description): Add VQ.
7464         parmeter.
7465         * doc/gdb.texinfo: Describe SVE feature
7466         * features/aarch64-sve.c: New file.
7467
7468 2018-05-31  Omair Javaid  <omair.javaid@linaro.org>
7469
7470         PR gdb/23210
7471         * gdbarch.sh (significant_addr_bit): Default to zero when
7472         not set by target architecture.
7473         * gdbarch.c: Re-generated.
7474         * utils.c (address_significant): Update.
7475
7476 2018-05-30  Joel Brobecker  <brobecker@adacore.com>
7477
7478         * stack.c (func_command): Remove trailing newline in call to error.
7479
7480 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7481
7482         * regcache.h (regcache_raw_collect): Remove, update callers to
7483         use regcache::raw_collect.
7484         * regcache.c (regcache_raw_collect): Remove.
7485
7486 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7487
7488         * regcache.h (regcache_raw_supply): Remove, update callers to
7489         use detached_regcache::raw_supply.
7490         * regcache.c (regcache_raw_supply): Remove.
7491
7492 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7493
7494         * regcache.h (regcache_cooked_write_part): Remove, update
7495         callers to use regcache::cooked_write_part.
7496         * regcache.c (regcache_cooked_write_part): Remove.
7497
7498 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7499
7500         * regcache.h (regcache_cooked_read_part): Remove, update callers
7501         to use readable_regcache::cooked_read_part.
7502         * regcache.c (regcache_cooked_read_part): Remove.
7503
7504 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7505
7506         * regcache.h (regcache_cooked_read_value): Remove, update
7507         callers to use readable_regcache::cooked_read_value.
7508         * regcache.c (regcache_cooked_read_value): Remove.
7509
7510 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7511
7512         * regcache.h (regcache_cooked_write): Remove, update callers to
7513         use regcache::cooked_write.
7514         * regcache.c (regcache_cooked_write): Remove.
7515
7516 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7517
7518         * regcache.h (regcache_invalidate): Remove, update callers to
7519         use detached_regcache::invalidate instead.
7520         * regcache.c (regcache_invalidate): Remove.
7521
7522 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7523
7524         * regcache.h (regcache_raw_write_part): Remove, update callers
7525         to use regcache::raw_write_part instead.
7526         * regcache.c (regcache_raw_write_part): Remove.
7527
7528 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7529
7530         * regcache.h (regcache_raw_read_part): Remove, update callers to
7531         use readable_regcache::raw_read_part instead.
7532         * regcache.c (regcache_raw_read_part): Remove.
7533
7534 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7535
7536         * regcache.h (regcache_cooked_read): Remove, update callers to
7537         use readable_regcache::cooked_read instead.
7538         * regcache.c (regcache_cooked_read): Remove.
7539
7540 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7541
7542         * regcache.h (regcache_raw_write): Remove, update callers to use
7543         regcache::raw_write instead.
7544         * regcache.c (regcache_raw_write): Remove.
7545
7546 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7547
7548         * regcache.h (regcache_raw_read): Remove, update callers to use
7549         readable_regcache::raw_read instead.
7550         * regcache.c (regcache_raw_read): Remove.
7551
7552 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7553
7554         * regcache.h (regcache_raw_update): Remove, update callers to
7555         use readable_regcache::raw_update instead.
7556         * regcache.c (regcache_raw_update): Remove.
7557
7558 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7559
7560         * regcache.h (regcache_register_status): Remove, update callers
7561         to use reg_buffer::get_register_status directly instead.
7562         * regcache.c (regcache_register_status): Remove.
7563
7564 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7565
7566         * regcache.h (regcache_get_ptid): Remove, update all callers to
7567         call regcache::ptid instead.
7568         * regcache.c (regcache_get_ptid): Remove.
7569
7570 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7571
7572         * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
7573
7574 2018-05-30  Pedro Alves  <palves@redhat.com>
7575
7576         * common/common-exceptions.h (exception_rethrow): Use
7577         ATTRIBUTE_NORETURN.
7578
7579 2018-05-29  Simon Marchi  <simon.marchi@polymtl.ca>
7580
7581         * breakpoint.c (print_solib_event, check_status_catch_solib):
7582         Remove struct keyword in range-based for loops.
7583         * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
7584         * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
7585         Likewise.
7586         * linespec.c (find_superclass_methods, search_minsyms_for_name):
7587         Likewise.
7588         * symfile.c (addr_info_make_relative): Likewise.
7589         * thread.c (value_in_thread_stack_temporaries): Likewise.
7590
7591 2018-06-12  Weimin Pan  <weimin.pan@oracle.com>
7592
7593         PR gdb/16841
7594         * valops.c (value_struct_elt_for_reference): Call check_typedef on
7595         aggregate type to get its real type before accessing it.
7596
7597 2018-05-29  Weimin Pan  <weimin.pan@oracle.com>
7598
7599         * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
7600         * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
7601         * coff-pe-read.c (add_pe_forwarded_sym): Replace
7602         lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
7603         * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
7604         * jit.c (jit_breakpoint_re_set_internal): Likewise.
7605         * printcmd.c (info_address_command): Likewise.
7606
7607 2018-05-29  Tom Tromey  <tom@tromey.com>
7608
7609         * windows-nat.c (handle_exception): Update fall-through comment.
7610
7611 2018-05-29  Tom Tromey  <tom@tromey.com>
7612
7613         * progspace.h (so_list_ptr): Remove typedef.  Don't declare VEC.
7614         (struct program_space) <added_solibs>: Now a std::vector.
7615         * breakpoint.c (print_solib_event): Update.
7616         (check_status_catch_solib): Update.
7617         * progspace.c (clear_program_space_solib_cache): Update.
7618         * solib.c (update_solib_list): Update.
7619
7620 2018-05-29  Tom Tromey  <tom@tromey.com>
7621
7622         * python/py-type.c (typy_richcompare): Update.
7623         * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
7624         * gdbtypes.h (types_deeply_equal): Return bool.
7625         (types_equal): Likewise.
7626         * gdbtypes.c (type_equality_entry_d): Remove typedef.  Don't
7627         declare VEC.
7628         (check_types_equal): Change worklist to std::vector.  Return
7629         bool.
7630         (struct type_equality_entry): Add constructor.
7631         (compare_maybe_null_strings): Return bool.
7632         (check_types_worklist): Return bool.  Change worklist to
7633         std::vector.
7634         (types_deeply_equal): Use std::vector.
7635         (types_equal): Return bool.
7636         (compare_maybe_null_strings): Simplify.
7637
7638 2018-05-29  Tom Tromey  <tom@tromey.com>
7639
7640         * record-btrace.c (tp_t): Remove typedef.  Don't declare VEC.
7641
7642 2018-05-29  Tom Tromey  <tom@tromey.com>
7643
7644         * objc-lang.h: Don't include cp-support.h.
7645         * common/gdb_vecs.h (const_char_ptr): Remove typedef.  Don't
7646         declare VEC.
7647
7648 2018-05-27  Tom Tromey  <tom@tromey.com>
7649
7650         * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
7651
7652 2018-05-25  Tom Tromey  <tom@tromey.com>
7653
7654         * value.c (value::location): Initialize.
7655
7656 2018-05-25  Tom Tromey  <tom@tromey.com>
7657
7658         * dbxread.c (init_bincl_list): Remove.
7659         (bincl_list): Now a std::vector.
7660         (bincls_allocated, next_bincl): Remove.
7661         (free_bincl_list, do_free_bincl_list_cleanup)
7662         (make_cleanup_free_bincl_list): Remove.
7663         (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
7664         unique_xmalloc_ptr.
7665         (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
7666         (struct header_file_location): Add constructor.
7667         (add_bincl_to_list): Remove.
7668
7669 2018-05-25  Tom Tromey  <tom@tromey.com>
7670
7671         * tui/tui.c (tui_enable): Update.
7672         * mi/mi-interp.c (mi_interp::init): Update.
7673         * interps.h (class interp) <name>: New method.
7674         <m_name>: Rename from name.
7675         (~scoped_restore_interp): Update.
7676         * interps.c (interp::interp): Update.
7677         (interp_add, interp_set, interp_lookup_existing)
7678         (current_interp_named_p): Update.
7679
7680 2018-05-25  Tom Tromey  <tom@tromey.com>
7681
7682         * interps.c (interp_name): Remove.
7683         * mi/mi-interp.c (mi_interp::init): Update.
7684         * interps.h (interp_name): Remove.
7685         (~scoped_restore_interp): Update.
7686         * tui/tui.c (tui_enable): Update.
7687
7688 2018-05-25  Tom Tromey  <tom@tromey.com>
7689
7690         * utils.c (fputs_maybe_filtered): Update.
7691         * linespec.c (decode_line_full): Update.
7692         * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
7693         (mi_print_breakpoint_for_event, mi_solib_loaded)
7694         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
7695         (mi_user_selected_context_changed): Update.
7696         * mi/mi-main.c (mi_execute_command): Update.
7697         * cli/cli-script.c (execute_control_command): Update.
7698         * python/python.c (execute_gdb_command): Update.
7699         * solib.c (info_sharedlibrary_command): Update.
7700         * interps.c (interp_ui_out): Remove.
7701         * interps.h (interp_ui_out): Remove.
7702
7703 2018-05-25  Tom Tromey  <tom@tromey.com>
7704
7705         * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
7706         * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
7707         * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
7708
7709 2018-05-25  Tom Tromey  <tom@tromey.com>
7710
7711         * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
7712         * interps.c (interp_exec): Use scoped_restore.
7713
7714 2018-05-25  Tom Tromey  <tom@tromey.com>
7715
7716         * remote.c (remote_target::remote_file_get): Use
7717         gdb::byte_vector.
7718         (remote_target::remote_file_put): Likewise.
7719
7720 2018-05-25  Tom Tromey  <tom@tromey.com>
7721
7722         * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
7723         a std::string.
7724         (get_pe_section_index, add_pe_exported_sym): Update.
7725         (read_pe_exported_syms): Use gdb::def_vector.
7726
7727 2018-05-25  Tom Tromey  <tom@tromey.com>
7728
7729         * frame.c (remove_prev_frame): Remove.
7730         (get_prev_frame_if_no_cycle): Use TRY/CATCH.
7731
7732 2018-05-25  Maciej W. Rozycki  <macro@mips.com>
7733
7734         * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
7735         Remove prototypes.
7736         * mips-linux-nat.c (supply_fpregset): Always call
7737         `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
7738         (fill_fpregset): Always call `mips64_fill_fpregset' rather than
7739         `mips_fill_fpregset'.
7740         * mips-linux-tdep.c (mips_supply_fpregset)
7741         (mips_supply_fpregset_wrapper, mips_fill_fpregset)
7742         (mips_fill_fpregset_wrapper): Remove functions.
7743         (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
7744         (mips_linux_fpregset): Remove variable.
7745         (mips_linux_iterate_over_regset_sections): Use
7746         `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
7747         (mips_linux_o32_sigframe_init): Remove comment.
7748
7749 2018-05-25  Pedro Alves  <palves@redhat.com>
7750
7751         * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
7752         (struct readahead_cache, struct packet_reg, struct
7753         remote_arch_state, class remote_state): Move higher up in the
7754         file.
7755         (remote_target::m_remote_state): Now an object instead of a pointer.
7756         (remote_target::get_remote_state): Adjust.
7757
7758 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
7759
7760         * stack.c (select_and_print_frame): Delete.
7761         (struct function_bounds): Move struct within function.
7762         (func_command): Most content moved into new function
7763         find_frame_for_function, use new function, print result, add
7764         function comment.
7765         (find_frame_for_function): New function, now returns a result.
7766
7767 2018-05-24  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
7768
7769         * stack.c (iterate_over_block_arg_vars): Fix comment.
7770         (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
7771
7772 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
7773
7774         PR gdb/23203
7775         * frame.c
7776         (scoped_restore_selected_frame::scoped_restore_selected_frame):
7777         Define.
7778         (scoped_restore_selected_frame::~scoped_restore_selected_frame):
7779         Define.
7780         * frame.h (class scoped_restore_selected_frame): New class.
7781         * stack.c (print_frame_local_vars): Remove catching and rethrowing
7782         of any exception, use scoped_restore_selected_frame to restore the
7783         frame instead.
7784
7785 2018-05-24  Pedro Alves  <palves@redhat.com>
7786
7787         * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
7788         override.
7789
7790 2018-05-23  Tom Tromey  <tom@tromey.com>
7791
7792         * complaints.c (struct complaints): Remove.
7793         (symfile_complaint_book): Remove.
7794         (series): New global.
7795         (complaint_internal): Update.
7796         (clear_complaints): Update.
7797
7798 2018-05-23  Tom Tromey  <tom@tromey.com>
7799
7800         * complaints.c (counters): New global.
7801         (struct complain): Remove.
7802         (struct complaints) <root>: Remove.
7803         (complaint_sentinel): Remove.
7804         (symfile_complaint_book): Update.
7805         (find_complaint) Remove.
7806         (complaint_internal, clear_complaints): Update.
7807
7808 2018-05-23  Tom Tromey  <tom@tromey.com>
7809
7810         * complaints.c (struct complain) <file, line>: Remove.
7811         (find_complaint): Remove file, line parameters.
7812         (complaint_internal): Update.
7813
7814 2018-05-23  Tom Tromey  <tom@tromey.com>
7815
7816         * complaints.c (vcomplaint): Remove.
7817         (complaint_internal) Merge in contents of vcomplaint.
7818
7819 2018-05-23  Tom Tromey  <tom@tromey.com>
7820
7821         * complaints.c (struct complaints) <explanation>: Remove.
7822         (symfile_explanations): Remove.
7823         (symfile_complaint_book): Update.
7824         (vcomplaint): Update.
7825         (struct explanation): Remove.
7826
7827 2018-05-23  Tom Tromey  <tom@tromey.com>
7828
7829         * complaints.c (symfile_complaints): Remove.
7830         (complaint_internal): Remove "complaints" parameter.
7831         (clear_complaints, vcomplaint): Remove "c" parameter.
7832         (get_complaints): Remove.
7833         * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
7834         (dwarf2_debug_line_missing_file_complaint)
7835         (dwarf2_debug_line_missing_end_sequence_complaint)
7836         (dwarf2_complex_location_expr_complaint)
7837         (dwarf2_const_value_length_mismatch_complaint)
7838         (dwarf2_section_buffer_overflow_complaint)
7839         (dwarf2_macro_malformed_definition_complaint)
7840         (dwarf2_invalid_attrib_class_complaint)
7841         (create_addrmap_from_index, dw2_symtab_iter_next)
7842         (dw2_expand_marked_cus)
7843         (dw2_debug_names_iterator::find_vec_in_debug_names)
7844         (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
7845         (create_debug_type_hash_table, init_cutu_and_read_dies)
7846         (partial_die_parent_scope, add_partial_enumeration)
7847         (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
7848         (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
7849         (read_import_statement, read_file_scope, create_dwo_cu_reader)
7850         (create_cus_hash_table, create_dwp_hash_table)
7851         (inherit_abstract_dies, read_func_scope, read_call_site_scope)
7852         (dwarf2_rnglists_process, dwarf2_ranges_process)
7853         (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
7854         (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
7855         (handle_struct_member_die, process_structure_scope)
7856         (read_array_type, read_common_block, read_module_type)
7857         (read_tag_pointer_type, read_typedef, read_base_type)
7858         (read_subrange_type, load_partial_dies, partial_die_info::read)
7859         (partial_die_info::read, partial_die_info::read)
7860         (partial_die_info::read, read_checked_initial_length_and_offset)
7861         (dwarf2_string_attr, read_formatted_entries)
7862         (dwarf_decode_line_header)
7863         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
7864         (new_symbol, dwarf2_const_value_attr, lookup_die_type)
7865         (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
7866         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
7867         (get_signatured_type, get_DW_AT_signature_type)
7868         (decode_locdesc, file_file_name, consume_improper_spaces)
7869         (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
7870         (dwarf_decode_macro_bytes, dwarf_decode_macros)
7871         (dwarf2_symbol_mark_computed, set_die_type)
7872         (read_attribute_value): Update.
7873         * stap-probe.c (handle_stap_probe, get_stap_base_address):
7874         Update.
7875         * dbxread.c (unknown_symtype_complaint)
7876         (lbrac_mismatch_complaint, repeated_header_complaint)
7877         (set_namestring, function_outside_compilation_unit_complaint)
7878         (read_dbx_symtab, process_one_symbol): Update.
7879         * gdbtypes.c (stub_noname_complaint): Update.
7880         * windows-nat.c (handle_unload_dll): Update.
7881         * coffread.c (coff_symtab_read, enter_linenos, decode_type)
7882         (decode_base_type): Update.
7883         * xcoffread.c (bf_notfound_complaint, ef_complaint)
7884         (eb_complaint, record_include_begin, record_include_end)
7885         (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
7886         (process_xcoff_symbol, read_symbol)
7887         (function_outside_compilation_unit_complaint)
7888         (scan_xcoff_symtab): Update.
7889         * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
7890         * buildsym.c (finish_block_internal, make_blockvector)
7891         (end_symtab_get_static_block, augment_type_symtab): Update.
7892         * dtrace-probe.c (dtrace_process_dof)
7893         (dtrace_static_probe_ops::get_probes): Update.
7894         * complaints.h (struct complaint): Don't declare.
7895         (symfile_complaints): Remove.
7896         (complaint_internal): Remove "complaints" parameter.
7897         (complaint): Likewise.
7898         (clear_complaints): Likewise.
7899         * symfile.c (syms_from_objfile_1, finish_new_objfile)
7900         (reread_symbols): Update.
7901         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
7902         (dwarf2_frame_cache, decode_frame_entry): Update.
7903         * dwarf2loc.c (dwarf_reg_to_regnum): Update.
7904         * objc-lang.c (lookup_objc_class, lookup_child_selector)
7905         (info_selectors_command): Update.
7906         * macrotab.c (macro_include, check_for_redefinition)
7907         (macro_undef): Update.
7908         * objfiles.c (filter_overlapping_sections): Update.
7909         * stabsread.c (invalid_cpp_abbrev_complaint)
7910         (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
7911         (define_symbol, error_type, read_type, rs6000_builtin_type)
7912         (stabs_method_name_from_physname, read_member_functions)
7913         (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
7914         (attach_fields_to_type, complain_about_struct_wipeout)
7915         (read_range_type, read_args, common_block_start)
7916         (common_block_end, cleanup_undefined_types_1, scan_file_globals):
7917         Update.
7918         * mdebugread.c (index_complaint, unknown_ext_complaint)
7919         (basic_type_complaint, bad_tag_guess_complaint)
7920         (bad_rfd_entry_complaint, unexpected_type_code_complaint)
7921         (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
7922         (parse_procedure, parse_lines)
7923         (function_outside_compilation_unit_complaint)
7924         (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
7925         (bad_tag_guess_complaint, reg_value_complaint): Update.
7926         * cp-support.c (demangled_name_complaint): Update.
7927         * macroscope.c (sal_macro_scope): Update.
7928         * dwarf-index-write.c (class debug_names): Update.
7929
7930 2018-05-23  Tom Tromey  <tom@tromey.com>
7931
7932         * complaints.c (clear_complaints): Remove "noisy" parameter.
7933         * complaints.h (clear_complaints): Update.
7934         * symfile.c (syms_from_objfile_1, finish_new_objfile)
7935         (reread_symbols): Update.
7936
7937 2018-05-23  Tom Tromey  <tom@tromey.com>
7938
7939         * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
7940         SUBSEQUENT_MESSAGE.
7941         (vcomplaint, clear_complaints): Update.
7942         (symfile_explanations): Remove some messages.
7943
7944 2018-05-23  Tom Tromey  <tom@tromey.com>
7945
7946         * complaints.c (internal_complaint): Remove.
7947         * complaints.h (internal_complaint): Remove.
7948
7949 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
7950
7951         * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
7952
7953 2018-05-22  Pedro Alves  <palves@redhat.com>
7954
7955         * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
7956         (remote_fileio_badfd, remote_fileio_return_errno)
7957         (remote_fileio_return_success, remote_fileio_func_open)
7958         (remote_fileio_func_open, remote_fileio_func_close)
7959         (remote_fileio_func_read, remote_fileio_func_write)
7960         (remote_fileio_func_lseek, remote_fileio_func_rename)
7961         (remote_fileio_func_unlink, remote_fileio_func_stat)
7962         (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
7963         (remote_fileio_func_isatty, remote_fileio_func_system): Add
7964         remote_target parameter.
7965         (remote_fio_func_map) <func>: Add remote_target parameter.
7966         (do_remote_fileio_request, remote_fileio_request):
7967         * remote-fileio.h (remote_fileio_request):
7968         * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
7969         remote_target parameter.
7970         (remote_notif_process, handle_notification): Adjust to pass down
7971         the remote.
7972         (remote_notif_state_allocate): Add remote_target parameter.  Save
7973         it.
7974         * remote-notif.h (struct remote_target): Forward declare.
7975         (struct notif_client) <parse, ack, can_get_pending_events>: Add
7976         remote_target parameter.
7977         (struct remote_notif_state) <remote>: New field.
7978         (remote_notif_ack, remote_notif_parse): Add remote_target
7979         parameter.
7980         (remote_notif_state_allocate, remote_notif_state_allocate): Add
7981         remote_target parameter.
7982         * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
7983         (threads_listing_context, rmt_thread_action, protocol_feature)
7984         (packet_reg, stop_reply, stop_reply_p, enum packet_support)
7985         (packet_result, struct threads_listing_context, remote_state):
7986         Move definitions and declarations higher up.
7987         (remote_target) <~remote_target>: Declare.
7988         (remote_download_command_source, remote_file_put, remote_file_get)
7989         (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
7990         (remote_hostio_pread_vFile, remote_hostio_send_command)
7991         (remote_hostio_set_filesystem, remote_hostio_open)
7992         (remote_hostio_close, remote_hostio_unlink, remote_state)
7993         (get_remote_state, get_remote_packet_size, get_memory_packet_size)
7994         (get_memory_write_packet_size, get_memory_read_packet_size)
7995         (append_pending_thread_resumptions, remote_detach_1)
7996         (append_resumption, remote_resume_with_vcont)
7997         (add_current_inferior_and_thread, wait_ns, wait_as)
7998         (process_stop_reply, remote_notice_new_inferior)
7999         (process_initial_stop_replies, remote_add_thread)
8000         (btrace_sync_conf, remote_btrace_maybe_reopen)
8001         (remove_new_fork_children, kill_new_fork_children)
8002         (discard_pending_stop_replies, stop_reply_queue_length)
8003         (check_pending_events_prevent_wildcard_vcont)
8004         (discard_pending_stop_replies_in_queue, stop_reply)
8005         (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
8006         (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
8007         (remote_interrupt_as, remote_interrupt_ns)
8008         (remote_get_noisy_reply, remote_query_attached)
8009         (remote_add_inferior, remote_current_thread, get_current_thread)
8010         (set_thread, set_general_thread, set_continue_thread)
8011         (set_general_process, write_ptid)
8012         (remote_unpack_thread_info_response, remote_get_threadinfo)
8013         (parse_threadlist_response, remote_get_threadlist)
8014         (remote_threadlist_iterator, remote_get_threads_with_ql)
8015         (remote_get_threads_with_qxfer)
8016         (remote_get_threads_with_qthreadinfo, extended_remote_restart)
8017         (get_offsets, remote_check_symbols, remote_supported_packet)
8018         (remote_query_supported, remote_packet_size)
8019         (remote_serial_quit_handler, remote_detach_pid)
8020         (remote_vcont_probe, remote_resume_with_hc)
8021         (send_interrupt_sequence, interrupt_query)
8022         (remote_notif_get_pending_events, fetch_register_using_p)
8023         (send_g_packet, process_g_packet, fetch_registers_using_g)
8024         (store_register_using_P, store_registers_using_G)
8025         (set_remote_traceframe, check_binary_download)
8026         (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
8027         (remote_xfer_live_readonly_partial, remote_read_bytes)
8028         (remote_send_printf, remote_flash_write, readchar)
8029         (remote_serial_write, putpkt, putpkt_binary, skip_frame)
8030         (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
8031         (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
8032         (extended_remote_disable_randomization, extended_remote_run)
8033         (send_environment_packet, extended_remote_environment_support)
8034         (extended_remote_set_inferior_cwd, remote_write_qxfer)
8035         (remote_read_qxfer, push_stop_reply, vcont_r_supported)
8036         (packet_command): Now methods of ...
8037         (remote_target): ... this class.
8038         (m_remote_state) <remote_target>: New field.
8039         (struct remote_state) <stop_reply_queue,
8040         remote_async_inferior_event_token, wait_forever_enabled_p>: New
8041         fields.
8042         (remote_state::remote_state): Allocate stop_reply_queue.
8043         (remote_state): Delete global.
8044         (get_remote_state_raw): Delete.
8045         (remote_target::get_remote_state): Allocate m_remote_state on
8046         demand.
8047         (get_current_remote_target): New.
8048         (remote_ops, extended_remote_ops): Delete.
8049         (wait_forever_enabled_p, remote_async_inferior_event_token):
8050         Delete, moved to struct remote_state.
8051         (remote_target::close): Delete self.  Destruction bits split to
8052         ...
8053         (remote_target::~remote_target): ... this.
8054         (show_memory_packet_size): Adjust to use
8055         get_current_remote_target.
8056         (struct protocol_feature) <func>: Add remote_target parameter.
8057         All callers adjusted.
8058         (curr_quit_handler_target): New.
8059         (remote_serial_quit_handler): Reimplement.
8060         (remote_target::open_1): Adjust to use get_current_remote_target.
8061         Heap-allocate remote_target/extended_remote_target instances.
8062         (vcont_builder::vcont_builder): Add remote_target parameter, and
8063         save it in m_remote.  All callers adjusted.
8064         (vcont_builder::m_remote): New field.
8065         (vcont_builder::restart, vcont_builder::flush)
8066         (vcont_builder::push_action): Use it.
8067         (remote_target::commit_resume): Use it.
8068         (struct queue_iter_param) <remote>: New field.
8069         (remote_target::remove_new_fork_children): Fill in 'remote' field.
8070         (check_pending_event_prevents_wildcard_vcont_callback_data): New.
8071         (check_pending_event_prevents_wildcard_vcont_callback)
8072         (remote_target::check_pending_events_prevent_wildcard_vcont)
8073         (remote_target::discard_pending_stop_replies)
8074         (remote_target::discard_pending_stop_replies_in_queue)
8075         (remote_target::remote_notif_remove_queued_reply): Fill in
8076         'remote' field.
8077         (remote_notif_get_pending_events): New.
8078         (remote_target::readchar, remote_target::remote_serial_write):
8079         Save/restore curr_quit_handler_target.
8080         (putpkt): New.
8081         (kill_new_fork_children): Fill in 'remote' field.
8082         (packet_command): Use get_current_remote_target, defer to
8083         remote_target method of same name.
8084         (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
8085         parameter, and save it in m_remote.  All callers adjusted.
8086         (scoped_remote_fd::release): Use m_remote.
8087         (scoped_remote_fd::m_remote): New field.
8088         (remote_file_put, remote_file_get, remote_file_delete): Use
8089         get_current_remote_target, defer to remote_target method of same
8090         name.
8091         (remote_btrace_reset): Add remote_state paremeter.  Update all
8092         callers.
8093         (remote_async_inferior_event_handler). Pass down 'data'.
8094         (remote_new_objfile): Use get_current_remote_target.
8095         (remote_target::vcont_r_supported): New.
8096         (set_range_stepping): Use get_current_remote_target and
8097         remote_target::vcont_r_supported.
8098         (_initialize_remote): Don't allocate 'remote_state' and
8099         'stop_reply_queue' globals.
8100         * remote.h (struct remote_target): Forward declare.
8101         (getpkt, putpkt, remote_notif_get_pending_events): Add
8102         'remote_target' parameter.
8103
8104 2018-05-22  Pedro Alves  <palves@redhat.com>
8105
8106         * remote.c (vcont_builder): Now a class.  Make all data members
8107         private.
8108         (vcont_builder) <vcont_builder, restart, flush, push_action>:
8109         Declare methods.
8110         (vcont_builder_restart): Rename to ...
8111         (vcont_builder::restart): ... this.
8112         (vcont_builder_flush): Rename to ...
8113         (vcont_builder::flush): ... this.
8114         (vcont_builder_push_action): Rename to ...
8115         (vcont_builder::push_action): ... this.
8116         (remote_target::commit_resume): Adjust.
8117
8118 2018-05-22  Pedro Alves  <palves@redhat.com>
8119
8120         * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
8121         (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
8122         (get_fixed_memory_packet_size): New.
8123         (get_memory_packet_size): Use it.
8124         (set_memory_packet_size): Don't override the config size with
8125         DEFAULT_MAX_MEMORY_PACKET_SIZE.
8126         (show_memory_packet_size): Use get_fixed_memory_packet_size.
8127         Don't refer to get_memory_packet_size if not connected to a remote
8128         target.  Show "(default)" if configured size is 0.
8129
8130 2018-05-22  Pedro Alves  <palves@redhat.com>
8131
8132         * remote.c (remote_target::mourn_inferior): Move
8133         discard_pending_stop_replies call here from ...
8134         (_initialize_remote): ... here.
8135
8136 2018-05-22  Pedro Alves  <palves@redhat.com>
8137
8138         * remote.c (compare_section_command): Remove set_general_process
8139         call.
8140
8141 2018-05-22  Pedro Alves  <palves@redhat.com>
8142
8143         * remote.c (struct packet_reg, struct remote_arch_state):
8144         Move higher up in the file.
8145         (remote_state) <m_arch_states>: Store remote_arch_state values
8146         instead of remote_arch_state pointers.
8147         (remote_state::get_remote_arch_state): Adjust.
8148
8149 2018-05-22  Pedro Alves  <palves@redhat.com>
8150
8151         * remote.c: Include <unordered_map>.
8152         (remote_state): Now a class.
8153         (remote_state) <get_remote_arch_state>: Declare method.
8154         <get_remote_arch_state>: New field.
8155         (remote_arch_state) <remote_arch_state>: Declare ctor.
8156         <regs>: Now a unique_ptr.
8157         (remote_gdbarch_data_handle): Delete.
8158         (get_remote_arch_state): Delete.
8159         (remote_state::get_remote_arch_state): New.
8160         (get_remote_state): Adjust to call remote_state's
8161         get_remote_arch_state method.
8162         (init_remote_state): Delete, bits factored out to ...
8163         (remote_arch_state::remote_arch_state): ... this new method.
8164         (get_remote_packet_size, get_memory_packet_size)
8165         (process_g_packet, remote_target::fetch_registers)
8166         (remote_target::prepare_to_store, store_registers_using_G)
8167         (remote_target::store_registers, remote_target::get_trace_status):
8168         Adjust to call remote_state's method.
8169         (_initialize_remote): Remove reference to
8170         remote_gdbarch_data_handle.
8171
8172 2018-05-22  Pedro Alves  <palves@redhat.com>
8173
8174         * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
8175         pread>: New method declarations.
8176         (remote_target::open_1): Adjust.
8177         (readahead_cache_invalidate): Rename to ...
8178         (readahead_cache::invalidate): ... this, and adjust to be a class
8179         method.
8180         (readahead_cache_invalidate_fd): Rename to ...
8181         (readahead_cache::invalidate_fd): ... this, and adjust to be a
8182         class method.
8183         (remote_hostio_pwrite): Adjust.
8184         (remote_hostio_pread_from_cache): Rename to ...
8185         (readahead_cache::pread): ... this, and adjust to be a class
8186         method.
8187         (remote_hostio_close): Adjust.
8188
8189 2018-05-22  Pedro Alves  <palves@redhat.com>
8190
8191         * remote.c (remote_hostio_close_cleanup): Delete.
8192         (class scoped_remote_fd): New.
8193         (remote_file_put, remote_file_get): Use it.
8194
8195 2018-05-22  Pedro Alves  <palves@redhat.com>
8196
8197         (struct vCont_action_support): Use bool and initialize all fields.
8198         (struct readahead_cache): Initialize all fields.
8199         (remote_state): Use bool and initialize all fields.
8200         (remote_state::remote_state, remote_state::~remote_state): New.
8201         (new_remote_state): Delete.
8202         (_initialize_remote): Use new to allocate remote_state.
8203
8204 2018-05-22  Pedro Alves  <palves@redhat.com>
8205             張俊芝  <zjz@zjz.name>
8206
8207         PR gdb/22973
8208         * c-exp.y: Include "c-support.h".
8209         (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
8210         of tolower.  Use c_ident_is_alpha to scan names.
8211         * c-lang.c: Include "c-support.h".
8212         (convert_ucn, convert_octal, convert_hex, convert_escape): Use
8213         ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
8214         * c-support.h: New file, with bits factored out from ...
8215         * cp-name-parser.y: ... this file.
8216         Include "c-support.h".
8217         (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
8218         c-support.h and renamed.
8219         (symbol_end, yylex): Adjust.
8220
8221 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8222
8223         * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
8224         parameter type to CORE_ADDR.
8225         * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
8226         parameter type in declaration to CORE_ADDR.
8227         * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
8228         target_auxv_search to get AT_HWCAP and use the result to get the
8229         target description.
8230         * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
8231         to CORE_ADDR. Remove the cast of the return value to unsigned
8232         long. Fix error predicate of target_auxv_search.
8233         (ppc_linux_nat_target::read_description): Change the type of the
8234         hwcap variable to CORE_ADDR.
8235
8236 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8237
8238         * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
8239         if the size of fpscr is larger than 32 bits.
8240
8241 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8242
8243         * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
8244         (ppc32_linux_vsxregmap): New global.
8245         (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
8246         regcache_supply_regset, and regcache_collect_regset.
8247         * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
8248         * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
8249         (fetch_vsx_register, store_vsx_register): Remove.
8250         (fetch_vsx_registers): Add regno parameter. Get regset using
8251         ppc_linux_vsxregset. Use regset to supply registers.
8252         (store_vsx_registers): Add regno parameter. Get regset using
8253         ppc_linux_vsxregset. Use regset to collect registers.
8254         (fetch_register): Call fetch_vsx_registers instead of
8255         fetch_vsx_register.
8256         (store_register): Call store_vsx_registers instead of
8257         store_vsx_register.
8258         (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
8259         new regno parameter.
8260         (store_ppc_registers): Call store_vsx_registers with -1 for the
8261         new regno parameter.
8262         * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
8263         (ppc_collect_vsxregset): Remove.
8264
8265 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8266
8267         * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
8268         offset fields.
8269         * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
8270         for vector register offset fields.
8271         (ppc64_fbsd_reg_offsets): Likewise.
8272         * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
8273         to vector register offset fields.
8274         * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
8275         to vector register offset fields.
8276         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
8277         vector register offset fields.
8278         * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
8279         initializers for vector register offset fields.
8280         (rs6000_aix64_reg_offsets): Likewise.
8281         * rs6000-tdep.c (ppc_vrreg_offset): Remove.
8282         (ppc_supply_vrregset): Remove.
8283         (ppc_collect_vrregset): Remove.
8284         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
8285         (ppc_linux_vrregset) : New function.
8286         (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
8287         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
8288         (ppc32_linux_vrregset): Remove.
8289         (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
8290         and use result instead of ppc32_linux_vrregset.
8291         (ppc32_linux_reg_offsets): Remove initializers for vector register
8292         offset fields.
8293         (ppc64_linux_reg_offsets): Likewise.
8294         * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
8295         * ppc-linux-nat.c: Include regset.h.
8296         (gdb_vrregset_t): Adjust comment to account for little-endian
8297         mode.
8298         (supply_vrregset, fill_vrregset): Remove.
8299         (fetch_altivec_register, store_altivec_register): Remove.
8300         (fetch_altivec_registers): Add regno parameter. Get regset using
8301         ppc_linux_vrregset. Use regset to supply registers.
8302         (store_altivec_registers): Add regno parameter. Get regset using
8303         ppc_linux_vrregset. Use regset to collect registers.
8304         (fetch_register): Call fetch_altivec_registers instead of
8305         fetch_altivec_register.
8306         (store_register): Call store_altivec_registers instead of
8307         store_altivec_register.
8308         (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
8309         the new regno parameter.
8310         (store_ppc_registers): Call store_altivec_registers with -1 for
8311         the new regno parameter.
8312
8313 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8314
8315         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
8316         (PPC_LINUX_SIZEOF_VSXREGSET): Define.
8317         * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
8318         (gdb_vrregset_t): Change array type size to
8319         PPC_LINUX_SIZEOF_VRREGSET.
8320         (gdb_vsxregset_t): Change array type size to
8321         PPC_LINUX_SIZEOF_VSXREGSET.
8322         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
8323         Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
8324         PPC_LINUX_SIZEOF_VSXREGSET.
8325
8326 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8327
8328         * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
8329         * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
8330         nat/ppc-linux.c.
8331         (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
8332         ppc_linux_target_wordsize with tid.
8333         (ppc_linux_nat_target::read_description): Call ppc_linux_target
8334         wordsize with tid.
8335         * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
8336         (ppc64_64bit_inferior_p): Add static and inline specifiers.
8337         (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
8338         tid parameter. Remove static specifier.
8339         * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
8340         (ppc_linux_target_wordsize): New declaration.
8341
8342 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8343
8344         * arch/ppc-linux-common.c: New file.
8345         * arch/ppc-linux-common.h: New file.
8346         * arch/ppc-linux-tdesc.h: New file.
8347         * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
8348         * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
8349         (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
8350         arch/ppc-linux-tdesc.h.
8351         * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
8352         arch/ppc-linux-tdesc.h.
8353         (ppc_linux_nat_target::read_description): Remove target
8354         description matching code. Fill a ppc_linux_features struct and
8355         call ppc_linux_match_description with it. Move comment about ISA
8356         2.05 to ppc-linux-common.c.
8357         * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
8358         arch/ppc-linux-tdesc.h.
8359         (ppc_linux_core_read_description): Remove target description
8360         matching code. Fill a ppc_linux_features struct and call
8361         ppc_linux_match_description with it.
8362         * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
8363         (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
8364         (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
8365         (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
8366         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
8367         (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
8368         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
8369         (tdesc_powerpc_e500l): Remove.
8370
8371 2018-05-22  Joel Brobecker  <brobecker@adacore.com>
8372
8373         * ada-lang.c (catch_assert_command): Pass empty string instead
8374         of NULL for excep_string argument.
8375
8376 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
8377
8378         * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
8379         the width of the requested register exceeds the width of the
8380         `ptrace' data type.
8381
8382 2018-05-21  Tom Tromey  <tom@tromey.com>
8383
8384         * printcmd.c (output_command): Remove.
8385         (output_command_const): Rename to output_command.
8386         * valprint.h (output_command): Rename from output_command_const.
8387         * tracepoint.c (trace_dump_actions): Call output_command.
8388
8389 2018-05-21  Tom Tromey  <tom@tromey.com>
8390
8391         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
8392         (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
8393         * ada-lang.h (create_ada_exception_catchpoint): Update.
8394         * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
8395         std::string.
8396         (create_excep_cond_exprs, ~ada_catchpoint)
8397         (should_stop_exception, print_one_exception)
8398         (print_mention_exception, print_recreate_exception): Update.
8399         (ada_get_next_arg): Remove.
8400         (catch_ada_exception_command_split): Use std::string.  Change type
8401         of "excep_string", "cond_string".
8402         (catch_ada_exception_command): Update.
8403         (create_ada_exception_catchpoint): Change type of excep_string.
8404         (ada_exception_sal): Remove excep_string parameter.
8405         (~ada_catchpoint): Remove.
8406
8407 2018-05-21  Tom Tromey  <tom@tromey.com>
8408
8409         * ada-lang.c (ada_collect_symbol_completion_matches): Remove
8410         cleanup.
8411
8412 2018-05-21  Tom Tromey  <tom@tromey.com>
8413
8414         * ada-lang.c (ada_exception_message_1, ada_exception_message):
8415         Return unique_xmalloc_ptr.
8416         (print_it_exception): Update.
8417
8418 2018-05-21  Tom Tromey  <tom@tromey.com>
8419
8420         * tracepoint.c (trace_dump_actions): Use std::string.
8421
8422 2018-05-21  Tom Tromey  <tom@tromey.com>
8423
8424         * symfile.c (reread_symbols): Use std::string for original_name.
8425
8426 2018-05-21  Tom Tromey  <tom@tromey.com>
8427
8428         * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
8429         (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN.  Default
8430         constructor.
8431
8432 2018-05-20  Simon Marchi  <simon.marchi@polymtl.ca>
8433
8434         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
8435         instance to...
8436         (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
8437         * objfiles.c (get_objfile_bfd_data): Allocate
8438         objfile_per_bfd_storage with obstack_new when allocating on
8439         obstack.
8440
8441 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
8442
8443         * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
8444         OBSTACK_ZALLOC.
8445         * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
8446         * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
8447         * mdebugread.c (mdebug_build_psymtabs): Likewise.
8448         (add_pending): Likewise.
8449         (parse_symbol): Likewise.
8450         (parse_partial_symbols): Likewise.
8451         (psymtab_to_symtab_1): Likewise.
8452         (new_psymtab): Likewise.
8453         (elfmdebug_build_psymtabs): Likewise.
8454         * minsyms.c (terminate_minimal_symbol_table): Likewise.
8455         * objfiles.c (get_objfile_bfd_data): Likewise.
8456         (objfile_register_static_link): Likewise.
8457         * psymtab.c (allocate_psymtab): Likewise.
8458         * stabsread.c (read_member_functions): Likewise.
8459         * xcoffread.c (xcoff_end_psymtab): Likewise.
8460
8461 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
8462
8463         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
8464         compiler supports std::is_trivially_constructible.
8465         * common/poison.h: Include obstack.h.
8466         (IsMallocable): Define to is_trivially_constructible if the
8467         compiler supports it, define to true_type otherwise.
8468         (xobnew): New.
8469         (XOBNEW): Redefine.
8470         (xobnewvec): New.
8471         (XOBNEWVEC): Redefine.
8472         * gdb_obstack.h (obstack_zalloc): New.
8473         (OBSTACK_ZALLOC): Redefine.
8474         (obstack_calloc): New.
8475         (OBSTACK_CALLOC): Redefine.
8476         (obstack_new): New.
8477         * gdbarch.sh: Include gdb_obstack in gdbarch.h.
8478         (gdbarch_obstack): New declaration in gdbarch.h, definition in
8479         gdbarch.c.
8480         (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
8481         obstack_calloc/obstack_zalloc.
8482         (gdbarch_obstack_zalloc): Remove.
8483         * target-descriptions.c (tdesc_data_init): Use obstack_new.
8484
8485 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
8486
8487         * stack.c (backtrace_command_1): Remove useless variable int i.
8488
8489 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
8490
8491         * stack.c (print_frame_info): Fix comment.
8492
8493 2018-05-18  Tom Tromey  <tom@tromey.com>
8494
8495         * dwarf2read.c (struct dwz_file): Add constructor, initializers.
8496         <dwz_bfd>: Now a gdb_bfd_ref_ptr.
8497         (~dwarf2_per_objfile): Update
8498         (dwarf2_get_dwz_file): Use new.
8499         * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
8500         unique_ptr.
8501
8502 2018-05-18  Tom Tromey  <tom@tromey.com>
8503
8504         * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
8505         unique_ptr.
8506         * dwarf2read.c (struct dwp_file): Add constructor and
8507         initializers.
8508         (open_and_init_dwp_file): Return a unique_ptr.
8509         (dwarf2_per_objfile, create_dwp_hash_table)
8510         (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
8511         (lookup_dwo_unit_in_dwp): Update.
8512         (open_and_init_dwp_file, get_dwp_file): Update.
8513
8514 2018-05-18  Tom Tromey  <tom@tromey.com>
8515
8516         * dwarf2read.c (dwarf2_per_objfile): Update.
8517         (struct mapped_index): Add initializers.
8518         (dwarf2_read_index): Use new.
8519         (dw2_symtab_iter_init): Update.
8520         * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
8521         unique_ptr.
8522
8523 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
8524
8525         * dwarf2read.c (mapped_index) <total_size>: Remove.
8526
8527 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
8528
8529         * unittests/format_pieces-selftests.c (test_format_specifier):
8530         Add ARI comments.
8531
8532 2018-05-18  Tom Tromey  <tom@tromey.com>
8533
8534         * c-typeprint.c (maybe_print_hole): New function.
8535         (c_print_type_struct_field_offset): Update.
8536         (c_type_print_base_struct_union): Call maybe_print_hole.
8537
8538 2018-05-17  Keith Seitz  <keiths@redhat.com>
8539
8540         * breakpoint.c (build_bpstat_chain): New function, moved from
8541         bpstat_stop_status.
8542         (bpstat_stop_status): Add optional parameter, `stop_chain'.
8543         If no stop chain is passed, call build_bpstat_chain to build it.
8544         * breakpoint.h (build_bpstat_chain): Declare.
8545         (bpstat_stop_status): Move documentation here from breakpoint.c.
8546         * infrun.c (handle_signal_stop): Before eliding inlined frames,
8547         build the stop chain and pass it to skip_inline_frames.
8548         Pass this stop chain to bpstat_stop_status.
8549         * inline-frame.c: Include breakpoint.h.
8550         (stopped_by_user_bp_inline_frame): New function.
8551         (skip_inline_frames): Add parameter `stop_chain'.
8552         Move documention to inline-frame.h.
8553         If non-NULL, use stopped_by_user_bp_inline_frame to determine
8554         whether the frame should be elided.
8555         * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
8556         Add moved documentation and update for new parameter.
8557
8558 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
8559
8560         PR cli/14975
8561         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8562         unittests/format_pieces-selftests.c.
8563         * common/format.h (format_piece) <operator==>: New.
8564         (format_pieces) <operator[]>: Remove.
8565         * common/format.c (format_pieces::format_pieces): Handle \e.
8566         * unittests/format_pieces-selftests.c: New.
8567
8568 2018-05-17  Tom Tromey  <tom@tromey.com>
8569
8570         PR symtab/23010:
8571         * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
8572         (dw2_instantiate_symtab): Add skip_partial parameter.
8573         (dw2_find_last_source_symtab, dw2_map_expand_apply)
8574         (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
8575         (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
8576         (dw2_expand_symtabs_matching_one)
8577         (dw2_find_pc_sect_compunit_symtab)
8578         (dw2_debug_names_lookup_symbol)
8579         (dw2_debug_names_expand_symtabs_for_function): Update.
8580         (init_cutu_and_read_dies): Add skip_partial parameter.
8581         (process_psymtab_comp_unit, build_type_psymtabs_1)
8582         (process_skeletonless_type_unit, load_partial_comp_unit)
8583         (psymtab_to_symtab_1): Update.
8584         (load_full_comp_unit): Add skip_partial parameter.
8585         (process_imported_unit_die, dwarf2_read_addr_index)
8586         (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
8587         (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
8588         (read_signatured_type): Update.
8589
8590 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
8591
8592         * value.c (release_value): Remove unused variable.
8593         (record_latest_value): Likewise.
8594         (access_value_history): Likewise.
8595         (preserve_values): Likewise.
8596
8597 2018-05-17  Tom Tromey  <tom@tromey.com>
8598
8599         * extension.h (struct ext_lang_type_printers) <py_type_printers>:
8600         Initialize.
8601
8602 2018-05-16  Maciej W. Rozycki  <macro@mips.com>
8603
8604         PR gdb/22286
8605         * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
8606         Also handle registers whose width is not a multiple of
8607         PTRACE_TYPE_RET.
8608         (linux_nat_trad_target::store_register): Likewise.
8609
8610 2018-05-16  Tom Tromey  <tom@tromey.com>
8611
8612         * gdbcore.h (core_bfd): Redefine.
8613         * corelow.c (core_target::close): Update.
8614         (core_target_open): Update.
8615         * progspace.h (struct program_space) <cbfd>: Now a
8616         gdb_bfd_ref_ptr.
8617
8618 2018-05-16  Tom Tromey  <tom@tromey.com>
8619
8620         PR cli/19551:
8621         * symfile-add-flags.h (enum symfile_add_flags)
8622         <SYMFILE_NOT_FILENAME>: New constant.
8623         * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME.  Get
8624         objfile name from BFD.
8625         (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
8626         * minidebug.c (find_separate_debug_file_in_section): Put
8627         ".gnu_debugdata" into BFD's file name.
8628
8629 2018-05-16  Simon Marchi  <simon.marchi@ericsson.com>
8630
8631         * regcache.c (regcache_read_ftype, regcache_write_ftype):
8632         Remove.
8633
8634 2018-05-15  Tamar Christina  <tamar.christina@arm.com>
8635
8636         PR binutils/21446
8637         * aarch64-tdep.c (aarch64_analyze_prologue,
8638         aarch64_software_single_step, aarch64_displaced_step_copy_insn):
8639         Indicate not interested in errors.
8640
8641 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
8642
8643         * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
8644         Supply the MIPS_ZERO_REGNUM register.
8645
8646 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
8647
8648         * mips-tdep.c (mask_address_var): Make variable static.
8649
8650 2018-05-14  Tom Tromey  <tom@tromey.com>
8651
8652         * dwarf2read.c (rust_union_quirks): Clear rust_unions.
8653
8654 2018-05-11  Andrew Burgess  <andrew.burgess@embecosm.com>
8655
8656         * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
8657         FXSAVE_ADDR for the mxcsr register.
8658
8659 2018-05-11  Max Filippov  <jcmvbkbc@gmail.com>
8660
8661         * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
8662
8663 2018-05-11  Pedro Alves  <palves@redhat.com>
8664
8665         * corelow.c (core_target) <core_target>: No longer inline.
8666         Initialize m_core_gdbarch, m_core_vec and build the section table
8667         here.
8668         <~core_target>: New.
8669         <core_gdbarch, get_core_register_section>: New methods.
8670         <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
8671         factored out from ...
8672         <core_data, core_vec, core_gdbarch>: ... these deleted globals.
8673         (core_ops): Delete.
8674         (sniff_core_bfd): Add gdbarch parameter.
8675         (core_close): Delete, merged into ...
8676         (core_target::close): ... here.  Delete self.
8677         (core_close_cleanup): Delete.
8678         (core_target_open): Allocate a core_target on the heap.  Use a
8679         unique_ptr instead of a cleanup.  Bits moved into the core_target
8680         ctor.  Adjust to use core_target methods instead of globals.
8681         (get_core_register_section): Rename to ...
8682         (core_target::get_core_register_section): ... this and adjust.
8683         (struct get_core_registers_cb_data): New.
8684         (get_core_registers_cb): Use it.  Use bool.
8685         (core_target::fetch_registers, core_target::files_info)
8686         (core_target::xfer_partial, core_target::read_description)
8687         (core_target::pid_to, core_target::thread_name): Adjust to
8688         reference class fields instead of globals.
8689         * target.h (struct target_ops_deleter, target_ops_up): New.
8690
8691 2018-05-11  Pedro Alves  <palves@redhat.com>
8692
8693         * corefile.c (core_file_command): Move to corelow.c.
8694         * corelow.c (the_core_target): Delete.
8695         (core_file_command): Moved from corefile.c.  Check exec_bfd
8696         instead of the_core_target.  Use target_detach instead of calling
8697         into the_core_target directly.
8698         (maybe_say_no_core_file_now): New.
8699         (core_target::detach): Use it.
8700         (_initialize_corelow): Remove references to the_core_target.
8701         * gdbcore.h (the_core_target): Delete.
8702
8703 2018-05-11  Tom Tromey  <tromey@redhat.com>
8704             Pedro Alves  <palves@redhat.com>
8705
8706         * corefile.c (core_bfd): Remove.
8707         * gdbcore.h (core_bfd): Now a macro.
8708         * progspace.h (struct program_space) <cbfd>: New field.
8709
8710 2018-05-11  Tom Tromey  <tom@tromey.com>
8711
8712         * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
8713         gdb::def_vector.
8714
8715 2018-05-10  Tom Tromey  <tom@tromey.com>
8716
8717         * configure: Rebuild.
8718         * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
8719
8720 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
8721
8722         PR server/23158:
8723         * regformats/regdat.sh: Adjust script, following the addition
8724         of the new expedite_regs parameter to init_target_desc.
8725
8726 2018-05-10  Omair Javaid  <omair.javaid@linaro.org>
8727     
8728         PR gdb/23127
8729         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
8730         set_gdbarch_significant_addr_bit.
8731         * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
8732         set_gdbarch_significant_addr_bit.
8733         * utils.c (address_significant): Update to sign extend addr.
8734
8735 2018-05-09  Max Filippov  <jcmvbkbc@gmail.com>
8736
8737         * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
8738         (xtensa_linux_init_abi): Limit tdep->num_regs by
8739         tdep->num_nopriv_regs.
8740         * xtensa-tdep.c (xtensa_derive_tdep): Calculate
8741         tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
8742         not initialized.
8743
8744 2018-05-08  Simon Marchi  <simon.marchi@ericsson.com>
8745
8746         * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
8747
8748 2018-05-08  Andrew Burgess  <andrew.burgess@embecosm.com>
8749
8750         * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
8751         (I387_MXCSR_INIT_VAL): New constant.
8752         * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
8753         buffer if it was supplied by the inferior.
8754         * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
8755         (i387_xsave_get_clear_bv): New function.
8756         (i387_supply_xsave): Only read x87 control registers from the
8757         xsave buffer if the feature is enabled, and the state will have
8758         been written, otherwise, provide a suitable default.
8759         (i387_collect_xsave): Pre-clear all registers in xsave buffer,
8760         including x87 control registers.  Update control registers if they
8761         have changed from the default value, and mark features as enabled
8762         as required.
8763         * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
8764
8765 2018-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
8766
8767         * spu-tdep.c (info_spu_event_command): Fix output formatting.
8768
8769 2018-05-07  Tom Tromey  <tom@tromey.com>
8770
8771         * configure: Rebuild.
8772         * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
8773
8774 2018-05-07  Tom Tromey  <tom@tromey.com>
8775
8776         PR tdep/20362:
8777         * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
8778         bit.  Use correct value for VDIV.
8779
8780 2018-05-04  Tom Tromey  <tom@tromey.com>
8781
8782         * configure: Rebuild.
8783         * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
8784
8785 2018-05-04  Tom Tromey  <tom@tromey.com>
8786
8787         * linux-record.c (record_linux_system_call) <case
8788         RECORD_SYS_RECVFROM>: Add "break".
8789
8790 2018-05-04  Tom Tromey  <tom@tromey.com>
8791
8792         * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
8793         Add missing "break".
8794         * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
8795         Add missing "break".
8796
8797 2018-05-04  Tom Tromey  <tom@tromey.com>
8798
8799         * rs6000-tdep.c (ppc_process_record_op4)
8800         (ppc_process_record_op63): Add fall-through comment.
8801
8802 2018-05-04  Tom Tromey  <tom@tromey.com>
8803
8804         * i386-tdep.c (i386_process_record): Add fall-through comment.
8805
8806 2018-05-04  Tom Tromey  <tom@tromey.com>
8807
8808         * stabsread.c (define_symbol) <case 'p'>: Add fall-through
8809         comment.
8810
8811 2018-05-04  Tom Tromey  <tom@tromey.com>
8812
8813         * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
8814         * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
8815         * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
8816         comment.
8817         * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
8818         comment.
8819         * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
8820         comment.
8821
8822 2018-05-04  Tom Tromey  <tom@tromey.com>
8823
8824         * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
8825
8826 2018-05-04  Tom Tromey  <tom@tromey.com>
8827
8828         * s390-tdep.c (s390_process_record): Fix fall-through comments.
8829         * xcoffread.c (scan_xcoff_symtab): Move comment later.
8830         * symfile.c (section_is_mapped): Fix fall-through comment.
8831         * stabsread.c (define_symbol, read_member_functions): Fix
8832         fall-through comment.
8833         * s390-linux-tdep.c (s390_process_record): Fix fall-through
8834         comment.
8835         * remote.c (remote_wait_as): Fix fall-through comment.
8836         * p-exp.y (yylex): Fix fall-through comment.
8837         * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
8838         comment.
8839         * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
8840         * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
8841         * jv-exp.y (yylex): Fix fall-through comment.
8842         * go-exp.y (lex_one_token): Fix fall-through comment.
8843         * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
8844         fall-through comment.
8845         * f-exp.y (yylex): Fix fall-through comment.
8846         * dwarf2read.c (process_die): Fix fall-through comments.
8847         * dbxread.c (process_one_symbol): Fix fall-through comment.
8848         * d-exp.y (lex_one_token): Fix fall-through comment.
8849         * cp-name-parser.y (yylex): Fix fall-through comment.
8850         * coffread.c (coff_symtab_read): Fix fall-through comment.
8851         * c-exp.y (lex_one_token): Fix fall-through comment.
8852         * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
8853         comment.
8854         * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
8855         comment.
8856
8857 2018-05-04  Tom Tromey  <tom@tromey.com>
8858
8859         PR python/22730:
8860         * NEWS: Mention gdb.execute change.
8861         * gdbcmd.h (execute_control_command): Don't declare.
8862         * python/python.c (execute_gdb_command): Use read_command_lines_1,
8863         execute_control_commands, execute_control_commands_to_string.
8864         * cli/cli-script.h (execute_control_commands)
8865         (execute_control_commands_to_string): Declare.
8866         (execute_control_command): Add from_tty parameter.
8867         * cli/cli-script.c (execute_control_commands)
8868         (execute_control_commands_to_string): New functions.
8869         (execute_user_command): Use execute_control_commands.
8870         (execute_control_command_1): Add "from_tty" parameter.  Update.
8871         (execute_control_command): Likewise.
8872
8873 2018-05-04  Tom Tromey  <tom@tromey.com>
8874
8875         PR python/22731:
8876         * NEWS: Mention that breakpoint commands are writable.
8877         * python/py-breakpoint.c (bppy_set_commands): New function.
8878         (breakpoint_object_getset) <"commands">: Use it.
8879
8880 2018-05-04  Tom Tromey  <tom@tromey.com>
8881
8882         * tracepoint.c (actions_command): Update.
8883         * mi/mi-cmd-break.c (mi_command_line_array)
8884         (mi_command_line_array_cnt, mi_command_line_array_ptr)
8885         (mi_read_next_line): Remove.
8886         (mi_cmd_break_commands): Update.
8887         * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
8888         function_view.
8889         * cli/cli-script.c (get_command_line): Update.
8890         (process_next_line): Use function_view.  Constify.
8891         (recurse_read_control_structure, read_command_lines)
8892         (read_command_lines_1): Change argument types to function_view.
8893         (do_define_command, document_command): Update.
8894         * breakpoint.h (check_tracepoint_command): Don't declare.
8895         * breakpoint.c (check_tracepoint_command): Remove.
8896         (commands_command_1, create_tracepoint_from_upload): Update.
8897
8898 2018-05-04  Tom Tromey  <tom@tromey.com>
8899
8900         PR gdb/11750:
8901         * cli/cli-script.h (enum command_control_type) <define_control>:
8902         New constant.
8903         * cli/cli-script.c (multi_line_command_p): Handle define_control.
8904         (build_command_line, execute_control_command_1)
8905         (process_next_line): Likewise.
8906         (do_define_command): New function, extracted from define_command.
8907         (define_command): Use it.
8908
8909 2018-05-04  Tom Tromey  <tom@tromey.com>
8910
8911         * tracepoint.c (actions_command): Update.
8912         * cli/cli-script.h (read_command_lines): Update.
8913         * cli/cli-script.c (read_command_lines): Constify prompt_arg.
8914         (MAX_TMPBUF): Remove define.
8915         (define_command): Use string_printf.
8916         (document_command): Likewise.
8917         * breakpoint.c (commands_command_1): Update.
8918
8919 2018-05-04  Tom Tromey  <tom@tromey.com>
8920
8921         * top.c (execute_command): Update.
8922         * cli/cli-script.h (print_command_lines): Now varargs.
8923         * cli/cli-script.c (print_command_lines): Now varargs.
8924         (execute_control_command_1) <case while_control, case if_control>:
8925         Update.
8926
8927 2018-05-04  Tom Tromey  <tom@tromey.com>
8928
8929         * tracepoint.c (all_tracepoint_actions): Rename from
8930         all_tracepoint_actions_and_cleanup.  Change return type.
8931         (actions_command, encode_actions_1, encode_actions)
8932         (trace_dump_actions, tdump_command): Update.
8933         * remote.c (remote_download_command_source): Update.
8934         * python/python.c (gdbpy_eval_from_control_command)
8935         (python_command, python_interactive_command): Update.
8936         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
8937         * guile/guile.c (guile_command)
8938         (gdbscm_eval_from_control_command, guile_command): Update.
8939         * compile/compile.c (compile_code_command)
8940         (compile_print_command, compile_to_object): Update.
8941         * cli/cli-script.h (struct command_lines_deleter): New.
8942         (counted_command_line): New typedef.
8943         (struct command_line): Add constructor, destructor.
8944         <body_list>: Remove.
8945         <body_list_0, body_list_1>: New members.
8946         (command_line_up): Remove typedef.
8947         (read_command_lines, read_command_lines_1, get_command_line):
8948         Update.
8949         (copy_command_lines): Don't declare.
8950         * cli/cli-script.c (build_command_line): Use "new".
8951         (get_command_line): Return counted_command_line.
8952         (print_command_lines, execute_user_command)
8953         (execute_control_command_1, while_command, if_command): Update.
8954         (realloc_body_list): Remove.
8955         (process_next_line, recurse_read_control_structure): Update.
8956         (read_command_lines, read_command_lines_1): Return counted_command_line.
8957         (free_command_lines): Use "delete".
8958         (copy_command_lines): Remove.
8959         (define_command, document_command, show_user_1): Update.
8960         * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
8961         a counted_command_line.
8962         * breakpoint.h (counted_command_line): Remove typedef.
8963         (breakpoint_set_commands): Update.
8964         * breakpoint.c (check_no_tracepoint_commands)
8965         (validate_commands_for_breakpoint): Update.
8966         (breakpoint_set_commands): Change commands to be a
8967         counted_command_line.
8968         (commands_command_1, update_dprintf_command_list)
8969         (create_tracepoint_from_upload): Update.
8970
8971 2018-05-04  Tom Tromey  <tom@tromey.com>
8972
8973         * cli/cli-decode.h (cmd_list_element): New constructor.
8974         (~cmd_list_element): New destructor.
8975         (struct cmd_list_element): Add initializers.
8976         * cli/cli-decode.c (do_add_cmd): Use "new".
8977         (delete_cmd): Use "delete".
8978
8979 2018-05-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
8980             Pedro Alves <palves@redhat.com>
8981
8982         PR breakpoints/19806 and support for PR external/20207.
8983         * NEWS: Mention Aarch64 watchpoint improvements.
8984         * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
8985         watchpoints and PR external/20207 watchpoints.
8986         * nat/aarch64-linux-hw-point.c
8987         (kernel_supports_any_contiguous_range): New.
8988         (aarch64_watchpoint_offset): New.
8989         (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
8990         (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
8991         (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
8992         (aarch64_align_watchpoint): New parameters aligned_offset_p and
8993         next_addr_orig_p.  Support PR external/20207 watchpoints.
8994         (aarch64_downgrade_regs): New.
8995         (aarch64_dr_state_insert_one_point): New parameters offset and
8996         addr_orig.
8997         (aarch64_dr_state_remove_one_point): Likewise.
8998         (aarch64_handle_breakpoint): Update caller.
8999         (aarch64_handle_aligned_watchpoint): Likewise.
9000         (aarch64_handle_unaligned_watchpoint): Support addr_orig and
9001         aligned_offset.
9002         (aarch64_linux_set_debug_regs): Remove const from state.  Call
9003         aarch64_downgrade_regs.
9004         (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
9005         * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
9006         (DR_CONTROL_MASK): ... this.
9007         (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
9008         (unsigned int aarch64_watchpoint_offset): New prototype.
9009         (aarch64_linux_set_debug_regs): Remove const from state.
9010         * utils.c (align_up, align_down): Move to ...
9011         * common/common-utils.c (align_up, align_down): ... here.
9012         * utils.h (align_up, align_down): Move to ...
9013         * common/common-utils.h (align_up, align_down): ... here.
9014
9015 2018-05-04  Joel Brobecker  <brobecker@adacore.com>
9016
9017         * sparc-tdep.c (sparc_structure_return_p): Re-implement to
9018         match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
9019         (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
9020         Re-implement to match the ABI as summarized in GCC's
9021         gcc/config/sparc/sparc.c.  All callers updated.
9022         (sparc32_store_arguments): Remove assertion.
9023
9024 2018-05-04  Tom Tromey  <tom@tromey.com>
9025
9026         * printcmd.c: Don't include tui.h.
9027         (decode_format): Use skip_spaces.
9028
9029 2018-05-04  Tom Tromey  <tom@tromey.com>
9030
9031         PR gdb/22619:
9032         * printcmd.c (last_count): New global.
9033         (x_command): Use saved count when repeating.
9034
9035 2018-05-04  Tom Tromey  <tom@tromey.com>
9036
9037         * nto-procfs.c (do_closedir_cleanup): Remove.
9038         (procfs_pidlist): Use gdb_dir_up.
9039         * procfs.c (do_closedir_cleanup): Remove.
9040         (proc_update_threads): Use gdb_dir_up.
9041         * common/filestuff.h (struct gdb_dir_deleter): New.
9042         (gdb_dir_up): New typedef.
9043
9044 2018-05-04  Tom Tromey  <tom@tromey.com>
9045
9046         * ada-lang.c (print_mention_exception): Use std::string.
9047
9048 2018-05-04  Tom Tromey  <tom@tromey.com>
9049
9050         * ada-lang.c (create_excep_cond_exprs): Update.
9051         (ada_exception_catchpoint_cond_string): Use std::string.
9052
9053 2018-05-04  Tom Tromey  <tom@tromey.com>
9054
9055         * ada-lang.c (xget_renaming_scope): Return std::string.
9056         (old_renaming_is_invisible): Update.
9057
9058 2018-05-04  Tom Tromey  <tom@tromey.com>
9059
9060         * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
9061         (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
9062
9063 2018-05-04  Ulrich Weigand  <uweigand@de.ibm.com>
9064
9065         * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
9066
9067 2018-05-04  Tom Tromey  <tom@tromey.com>
9068
9069         * remote.c (remote_query_supported_append): Change type.
9070         (remote_check_symbols): Update.
9071
9072 2018-05-04  Paul Pluzhnikov  <ppluzhnikov@google.com>
9073
9074         PR gdb/11420
9075         * configure.ac: Prepend libpython.
9076         * python/python-config.py: Likewise.
9077         * configure: Regenerate.
9078
9079 2018-05-03  Simon Marchi  <simon.marchi@ericsson.com>
9080
9081         * Makefile.in (%.c: %.l): Use -t instead of --stdout.
9082
9083 2018-05-03  Pedro Alves  <palves@redhat.com>
9084
9085         * s390-linux-nat.c
9086         (s390_linux_nat_target::have_continuable_watchpoint): Mark with
9087         override.  Write 'true' instead of '1'.
9088         (s390_linux_nat_target::watchpoint_addr_within_range): Remove
9089         declaration.
9090
9091 2018-05-02  Pedro Alves  <palves@redhat.com>
9092
9093         * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
9094         add_inf_child_target.
9095         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
9096         add_inf_child_target.
9097         * aix-thread.c (aix_thread_target_info): New.
9098         (aix_thread_target) <shortname, longname, doc>: Delete.
9099         <info>: New.
9100         * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
9101         add_inf_child_target.
9102         * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
9103         add_inf_child_target.
9104         * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
9105         add_inf_child_target.
9106         * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
9107         add_inf_child_target.
9108         * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
9109         add_inf_child_target.
9110         * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
9111         add_inf_child_target.
9112         * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
9113         add_inf_child_target.
9114         * arm-linux-nat.c (_initialize_arm_linux_nat): Use
9115         add_inf_child_target.
9116         * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
9117         add_inf_child_target.
9118         * bfd-target.c (target_bfd_target_info): New.
9119         (target_bfd) <shortname, longname, doc>: Delete.
9120         <info>: New.
9121         * bsd-kvm.c (bsd_kvm_target_info): New.
9122         (bsd_kvm_target) <shortname, longname, doc>: Delete.
9123         <info>: New.
9124         (bsd_kvm_target::open): Rename to ...
9125         (bsd_kvm_target_open): ... this.  Adjust.
9126         * bsd-uthread.c (bsd_uthread_target_info): New.
9127         (bsd_uthread_target) <shortname, longname, doc>: Delete.
9128         <info>: New.
9129         * corefile.c (core_file_command): Adjust.
9130         * corelow.c (core_target_info): New.
9131         (core_target) <shortname, longname, doc>: Delete.
9132         <info>: New.
9133         (core_target::open): Rename to ...
9134         (core_target_open): ... this.  Adjust.
9135         * ctf.c (ctf_target_info): New.
9136         (ctf_target) <shortname, longname, doc>: Delete.
9137         <info>: New.
9138         (ctf_target::open): Rename to ...
9139         (ctf_target_open): ... this.
9140         (_initialize_ctf): Adjust.
9141         * exec.c (exec_target_info): New.
9142         (exec_target) <shortname, longname, doc>: Delete.
9143         <info>: New.
9144         (exec_target::open): Rename to ...
9145         (exec_target_open): ... this.
9146         * gdbcore.h (core_target_open): Declare.
9147         * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
9148         * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
9149         add_inf_child_target.
9150         * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
9151         add_inf_child_target.
9152         * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
9153         add_inf_child_target.
9154         * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
9155         add_inf_child_target.
9156         * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
9157         add_inf_child_target.
9158         * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
9159         add_inf_child_target.
9160         * i386-linux-nat.c (_initialize_i386_linux_nat): Use
9161         add_inf_child_target.
9162         * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
9163         add_inf_child_target.
9164         * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
9165         add_inf_child_target.
9166         * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
9167         add_inf_child_target.
9168         * inf-child.c (inf_child_target_info): New.
9169         (inf_child_target::info): New.
9170         (inf_child_open_target): Remove 'target' parameter.  Use
9171         get_native_target instead.
9172         (inf_child_target::open): Delete.
9173         (add_inf_child_target): New.
9174         * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
9175         Delete.
9176         <info>: New.
9177         (add_inf_child_target): Declare.
9178         (inf_child_open_target): Declare.
9179         * linux-thread-db.c (thread_db_target_info): New.
9180         (thread_db_target) <shortname, longname, doc>: Delete.
9181         <info>: New.
9182         * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
9183         add_inf_child_target.
9184         * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
9185         add_inf_child_target.
9186         * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
9187         add_inf_child_target.
9188         * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
9189         add_inf_child_target.
9190         * make-target-delegates (print_class): Adjust.
9191         * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
9192         add_inf_child_target.
9193         * mips-linux-nat.c (_initialize_mips_linux_nat): Use
9194         add_inf_child_target.
9195         * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
9196         add_inf_child_target.
9197         * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
9198         add_inf_child_target.
9199         * nto-procfs.c (nto_native_target_info): New.
9200         (nto_procfs_target_native) <shortname, longname, doc>:
9201         Delete.
9202         <info>: New.
9203         (nto_procfs_target_info): New.
9204         (nto_procfs_target_procfs) <shortname, longname, doc>:
9205         Delete.
9206         <info>: New.
9207         (init_procfs_targets): Adjust.
9208         * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
9209         add_inf_child_target.
9210         * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
9211         add_inf_child_target.
9212         * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
9213         add_inf_child_target.
9214         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
9215         add_inf_child_target.
9216         * ravenscar-thread.c (ravenscar_target_info): New.
9217         (ravenscar_thread_target) <shortname, longname, doc>:
9218         Delete.
9219         <info>: New.
9220         * record-btrace.c (record_btrace_target_info):
9221         (record_btrace_target) <shortname, longname, doc>: Delete.
9222         <info>: New.
9223         (record_btrace_target::open): Rename to ...
9224         (record_btrace_target_open): ... this.  Adjust.
9225         * record-full.c (record_longname, record_doc): New.
9226         (record_full_base_target) <shortname, longname, doc>: Delete.
9227         <info>: New.
9228         (record_full_target_info): New.
9229         (record_full_target): <shortname>: Delete.
9230         <info>: New.
9231         (record_full_core_open_1, record_full_open_1): Update comments.
9232         (record_full_base_target::open): Rename to ...
9233         (record_full_open): ... this.
9234         (cmd_record_full_restore): Update.
9235         (_initialize_record_full): Update.
9236         * remote-sim.c (remote_sim_target_info): New.
9237         (gdbsim_target) <shortname, longname, doc>: Delete.
9238         <info>: New.
9239         (gdbsim_target::open): Rename to ...
9240         (gdbsim_target_open): ... this.
9241         (_initialize_remote_sim): Adjust.
9242         * remote.c (remote_doc): New.
9243         (remote_target_info): New.
9244         (remote_target) <shortname, longname, doc>: Delete.
9245         <info>: New.
9246         (extended_remote_target_info): New.
9247         (extended_remote_target) <shortname, longname, doc>: Delete.
9248         <info>: New.
9249         (remote_target::open_1): Make static.  Adjust.
9250         * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
9251         * s390-linux-nat.c (_initialize_s390_nat): Use
9252         add_inf_child_target.
9253         * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
9254         add_inf_child_target.
9255         * sol-thread.c (thread_db_target_info): New.
9256         (sol_thread_target) <shortname, longname, doc>: Delete.
9257         <info>: New.
9258         * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
9259         add_inf_child_target.
9260         * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
9261         add_inf_child_target.
9262         * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
9263         add_inf_child_target.
9264         * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
9265         add_inf_child_target.
9266         * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
9267         add_inf_child_target.
9268         * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
9269         add_inf_child_target.
9270         * spu-linux-nat.c (_initialize_spu_nat): Use
9271         add_inf_child_target.
9272         * spu-multiarch.c (spu_multiarch_target_info): New.
9273         (spu_multiarch_target) <shortname, longname, doc>: Delete.
9274         <info>: New.
9275         * target-delegates.c: Regenerate.
9276         * target.c: Include <unordered_map>.
9277         (target_ops_p): Delete.
9278         (DEF_VEC_P(target_ops_p)): Delete.
9279         (target_factories): New.
9280         (test_target_info): New.
9281         (test_target_ops::info): New.
9282         (open_target): Adjust to use target_factories.
9283         (add_target_with_completer): Rename to ...
9284         (add_target): ... this.  Change prototype.  Register target_info
9285         and open callback in target_factories.  Register target_info in
9286         command context instead of target_ops.
9287         (add_target): Delete old implementation.
9288         (add_deprecated_target_alias): Change prototype.  Adjust.
9289         (the_native_target): New.
9290         (set_native_target, get_native_target): New.
9291         (find_default_run_target): Use the_native_target.
9292         (find_attach_target, find_run_target): Simplify.
9293         (target_ops::open): Delete.
9294         (dummy_target_info): New.
9295         (dummy_target::shortname, dummy_target::longname)
9296         (dummy_target::doc): Delete.
9297         (dummy_target::info): New.
9298         (debug_target::shortname, debug_target::longname)
9299         (debug_target::doc): Delete.
9300         (debug_target::info): New.
9301         * target.h (struct target_info): New.
9302         (target_ops::~target_ops): Add comment.
9303         (target_ops::info): New.
9304         (target_ops::shortname, target_ops::longname, target_ops::doc): No
9305         longer virtual.  Implement in terms of target_info.
9306         (set_native_target, get_native_target): Declare.
9307         (target_open_ftype): New.
9308         (add_target, add_target_with_completer)
9309         (add_deprecated_target_alias): Change prototype.
9310         (test_target) <shortname, longname, doc>: Delete.
9311         <info>: New.
9312         * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
9313         add_inf_child_target.
9314         * tracefile-tfile.c (tfile_target_info): New.
9315         (tfile_target) <shortname, longname, doc>: Delete.
9316         <info>: New.
9317         (tfile_target::open): Rename to ...
9318         (tfile_target_open): ... this.
9319         (_initialize_tracefile_tfile): Adjust.
9320         * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
9321         add_inf_child_target.
9322         * windows-nat.c (_initialize_windows_nat): Use
9323         add_inf_child_target.
9324         * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
9325         add_inf_child_target.
9326
9327 2018-05-02  Pedro Alves  <palves@redhat.com>
9328
9329         * linux-nat.h (linux_nat_target) <low_new_thread,
9330         low_delete_thread, low_new_fork, low_forget_process,
9331         low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
9332         New virtual methods.
9333         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
9334         (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
9335         (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
9336         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
9337         (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
9338         Delete.
9339         * linux-fork.c (delete_fork): Adjust to call low method.
9340         * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
9341         (linux_nat_new_fork, linux_nat_forget_process_hook)
9342         (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
9343         (linux_nat_status_is_event):
9344         (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
9345         (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
9346         to call low method.
9347         (sigtrap_is_event): Rename to ...
9348         (linux_nat_target::low_status_is_event): ... this.
9349         (linux_nat_set_status_is_event): Delete.
9350         (save_stop_reason, linux_nat_wait_1)
9351         (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
9352         low methods.
9353         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
9354         (linux_nat_set_new_fork, linux_nat_set_forget_process)
9355         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
9356         (linux_nat_set_prepare_to_resume): Delete.
9357         * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
9358         low virtual methods.
9359         * amd64-linux-nat.c: Likewise.
9360         * arm-linux-nat.c: Likewise.
9361         * i386-linux-nat.c: Likewise.
9362         * ia64-linux-nat.c: Likewise.
9363         * mips-linux-nat.c: Likewise.
9364         * ppc-linux-nat.c: Likewise.
9365         * s390-linux-nat.c: Likewise.
9366         * sparc64-linux-nat.c: Likewise.
9367         * x86-linux-nat.c: Likewise.
9368         * x86-linux-nat.h: Include "nat/x86-linux.h".
9369         (x86_linux_nat_target) <low_new_fork, low_forget_process,
9370         low_prepare_to_resume, low_new_thread, low_delete_thread>:
9371         Override methods.
9372
9373 2018-05-02  Pedro Alves  <palves@redhat.com>
9374
9375         * target.h (target_ops)
9376         <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
9377         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
9378         stopped_by_watchpoint, have_continuable_watchpoint,
9379         stopped_data_address, watchpoint_addr_within_range,
9380         can_accel_watchpoint_condition, can_run, thread_alive,
9381         has_all_memory, has_memory, has_stack, has_registers,
9382         has_execution, can_async_p, is_async_p, supports_non_stop,
9383         always_non_stop_p, can_execute_reverse, supports_multi_process,
9384         supports_enable_disable_tracepoint,
9385         supports_disable_randomization, supports_string_tracing,
9386         supports_evaluation_of_breakpoint_conditions,
9387         can_run_breakpoint_commands, filesystem_is_local,
9388         can_download_tracepoint, get_trace_state_variable_value,
9389         set_trace_notes, get_tib_address, use_agent, can_use_agent,
9390         record_is_replaying, record_will_replay,
9391         augmented_libraries_svr4_read>: Adjust to return bool.
9392         * aarch64-linux-nat.c: All implementations adjusted.
9393         * aix-thread.c: All implementations adjusted.
9394         * arm-linux-nat.c: All implementations adjusted.
9395         * breakpoint.c: All implementations adjusted.
9396         * bsd-kvm.c: All implementations adjusted.
9397         * bsd-uthread.c: All implementations adjusted.
9398         * corelow.c: All implementations adjusted.
9399         * ctf.c: All implementations adjusted.
9400         * darwin-nat.c: All implementations adjusted.
9401         * darwin-nat.h: All implementations adjusted.
9402         * exec.c: All implementations adjusted.
9403         * fbsd-nat.c: All implementations adjusted.
9404         * fbsd-nat.h: All implementations adjusted.
9405         * gnu-nat.c: All implementations adjusted.
9406         * gnu-nat.h: All implementations adjusted.
9407         * go32-nat.c: All implementations adjusted.
9408         * ia64-linux-nat.c: All implementations adjusted.
9409         * inf-child.c: All implementations adjusted.
9410         * inf-child.h: All implementations adjusted.
9411         * inf-ptrace.c: All implementations adjusted.
9412         * inf-ptrace.h: All implementations adjusted.
9413         * linux-nat.c: All implementations adjusted.
9414         * linux-nat.h: All implementations adjusted.
9415         * mips-linux-nat.c: All implementations adjusted.
9416         * nto-procfs.c: All implementations adjusted.
9417         * ppc-linux-nat.c: All implementations adjusted.
9418         * procfs.c: All implementations adjusted.
9419         * ravenscar-thread.c: All implementations adjusted.
9420         * record-btrace.c: All implementations adjusted.
9421         * record-full.c: All implementations adjusted.
9422         * remote-sim.c: All implementations adjusted.
9423         * remote.c: All implementations adjusted.
9424         * s390-linux-nat.c: All implementations adjusted.
9425         * sol-thread.c: All implementations adjusted.
9426         * spu-multiarch.c: All implementations adjusted.
9427         * target-delegates.c: All implementations adjusted.
9428         * target.c: All implementations adjusted.
9429         * target.h: All implementations adjusted.
9430         * tracefile-tfile.c: All implementations adjusted.
9431         * tracefile.c: All implementations adjusted.
9432         * tracefile.h: All implementations adjusted.
9433         * windows-nat.c: All implementations adjusted.
9434         * x86-linux-nat.h: All implementations adjusted.
9435         * x86-nat.h: All implementations adjusted.
9436
9437 2018-05-02  Pedro Alves  <palves@redhat.com>
9438
9439         * make-target-delegates (scan_target_h): Don't trim lines here.
9440         Replace sequences of tabs and/or whitespace with a single
9441         whitespace.
9442         (top level, parsing methods): Trim each line before processing it
9443         here.
9444
9445 2018-05-02  Pedro Alves  <palves@redhat.com>
9446             John Baldwin  <jhb@freebsd.org>
9447
9448         * target.h (enum strata) <debug_stratum>: New.
9449         (struct target_ops) <all delegation methods>: Replace by C++
9450         virtual methods, and drop "to_" prefix.  All references updated
9451         throughout.
9452         <to_shortname, to_longname, to_doc, to_data,
9453         to_have_steppable_watchpoint, to_have_continuable_watchpoint,
9454         to_has_thread_control, to_attach_no_wait>: Delete, replaced by
9455         virtual methods.  All references updated throughout.
9456         <can_attach, supports_terminal_ours, can_create_inferior,
9457         get_thread_control_capabilities, attach_no_wait>: New
9458         virtual methods.
9459         <insert_breakpoint, remove_breakpoint>: Now
9460         TARGET_DEFAULT_NORETURN methods.
9461         <info_proc>: Now returns bool.
9462         <to_magic>: Delete.
9463         (OPS_MAGIC): Delete.
9464         (current_target): Delete.  All references replaced by references
9465         to ...
9466         (target_stack): ... this.  New.
9467         (target_shortname, target_longname): Adjust.
9468         (target_can_run): Now a function declaration.
9469         (default_child_has_all_memory, default_child_has_memory)
9470         (default_child_has_stack, default_child_has_registers)
9471         (default_child_has_execution): Remove target_ops parameter.
9472         (complete_target_initialization): Delete.
9473         (memory_breakpoint_target): New template class.
9474         (test_target_ops): Refactor as a C++ class with virtual methods.
9475         * make-target-delegates (NAME_PART): Tighten.
9476         (POINTER_PART, CP_SYMBOL): New.
9477         (SIMPLE_RETURN_PART): Reimplement.
9478         (VEC_RETURN_PART): Expect less.
9479         (RETURN_PART, VIRTUAL_PART): New.
9480         (METHOD): Adjust to C++ virtual methods.
9481         (scan_target_h): Remove reference to C99.
9482         (dname): Output "target_ops::" prefix.
9483         (write_function_header): Adjust to output a C++ class method.
9484         (write_declaration): New.
9485         (write_delegator): Adjust to output a C++ class method.
9486         (tdname): Output "dummy_target::" prefix.
9487         (write_tdefault, write_debugmethod): Adjust to output a C++ class
9488         method.
9489         (tdefault_names, debug_names): Delete.
9490         (return_types, tdefaults, styles, argtypes_array): New.
9491         (top level): All methods are delegators.
9492         (print_class): New.
9493         (top level): Print dummy_target and debug_target classes.
9494         * target-delegates.c: Regenerate.
9495         * target-debug.h (target_debug_print_enum_info_proc_what)
9496         (target_debug_print_thread_control_capabilities)
9497         (target_debug_print_thread_info_p): New.
9498         * target.c (dummy_target): Delete.
9499         (the_dummy_target, the_debug_target): New.
9500         (target_stack): Now extern.
9501         (set_targetdebug): Push/unpush debug target.
9502         (default_child_has_all_memory, default_child_has_memory)
9503         (default_child_has_stack, default_child_has_registers)
9504         (default_child_has_execution): Remove target_ops parameter.
9505         (complete_target_initialization): Delete.
9506         (add_target_with_completer): No longer call
9507         complete_target_initialization.
9508         (target_supports_terminal_ours): Use regular delegation.
9509         (update_current_target): Delete.
9510         (push_target): No longer check magic number.  Don't call
9511         update_current_target.
9512         (unpush_target): Don't call update_current_target.
9513         (target_is_pushed): No longer check magic number.
9514         (target_require_runnable): Skip for all stratums over
9515         process_stratum.
9516         (target_ops::info_proc): New.
9517         (target_info_proc): Use find_target_at and
9518         find_default_run_target.
9519         (target_supports_disable_randomization): Use regular delegation.
9520         (target_get_osdata): Use find_target_at.
9521         (target_ops::open, target_ops::close, target_ops::can_attach)
9522         (target_ops::attach, target_ops::can_create_inferior)
9523         (target_ops::create_inferior, target_ops::can_run)
9524         (target_can_run): New.
9525         (default_fileio_target): Use regular delegation.
9526         (target_ops::fileio_open, target_ops::fileio_pwrite)
9527         (target_ops::fileio_pread, target_ops::fileio_fstat)
9528         (target_ops::fileio_close, target_ops::fileio_unlink)
9529         (target_ops::fileio_readlink): New.
9530         (target_fileio_open_1, target_fileio_unlink)
9531         (target_fileio_readlink): Always call the target method.  Handle
9532         FILEIO_ENOSYS.
9533         (return_zero, return_zero_has_execution): Delete.
9534         (init_dummy_target): Delete.
9535         (dummy_target::dummy_target, dummy_target::shortname)
9536         (dummy_target::longname, dummy_target::doc)
9537         (debug_target::debug_target, debug_target::shortname)
9538         (debug_target::longname, debug_target::doc): New.
9539         (target_supports_delete_record): Use regular delegation.
9540         (setup_target_debug): Delete.
9541         (maintenance_print_target_stack): Skip debug_stratum.
9542         (initialize_targets): Instantiate the_dummy_target and
9543         the_debug_target.
9544         * auxv.c (target_auxv_parse): Remove 'ops' parameter.  Adjust to
9545         use target_stack.
9546         (target_auxv_search, fprint_target_auxv): Adjust.
9547         (info_auxv_command): Adjust to use target_stack.
9548         * auxv.h (target_auxv_parse): Remove 'ops' parameter.
9549         * exceptions.c (print_flush): Handle a NULL target_stack.
9550         * regcache.c (target_ops_no_register): Refactor as class with
9551         virtual methods.
9552
9553         * exec.c (exec_target): New class.
9554         (exec_ops): Now an exec_target.
9555         (exec_open, exec_close_1, exec_get_section_table)
9556         (exec_xfer_partial, exec_files_info, exec_has_memory)
9557         (exec_make_note_section): Refactor as exec_target methods.
9558         (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
9559         Delete.
9560         (exec_target::find_memory_regions): New.
9561         (_initialize_exec): Don't call init_exec_ops.
9562         * gdbcore.h (exec_file_clear): Delete.
9563
9564         * corefile.c (core_target): Delete.
9565         (core_file_command): Adjust.
9566         * corelow.c (core_target): New class.
9567         (the_core_target): New.
9568         (core_close): Remove target_ops parameter.
9569         (core_close_cleanup): Adjust.
9570         (core_target::close): New.
9571         (core_open, core_detach, get_core_registers, core_files_info)
9572         (core_xfer_partial, core_thread_alive, core_read_description)
9573         (core_pid_to_str, core_thread_name, core_has_memory)
9574         (core_has_stack, core_has_registers, core_info_proc): Rework as
9575         core_target methods.
9576         (ignore, core_remove_breakpoint, init_core_ops): Delete.
9577         (_initialize_corelow): Initialize the_core_target.
9578         * gdbcore.h (core_target): Delete.
9579         (the_core_target): New.
9580
9581         * ctf.c: (ctf_target): New class.
9582         (ctf_ops): Now a ctf_target.
9583         (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
9584         (ctf_xfer_partial, ctf_get_trace_state_variable_value)
9585         (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
9586         methods.
9587         (init_ctf_ops): Delete.
9588         (_initialize_ctf): Don't call it.
9589         * tracefile-tfile.c (tfile_target): New class.
9590         (tfile_ops): Now a tfile_target.
9591         (tfile_open, tfile_close, tfile_files_info)
9592         (tfile_get_tracepoint_status, tfile_trace_find)
9593         (tfile_fetch_registers, tfile_xfer_partial)
9594         (tfile_get_trace_state_variable_value, tfile_traceframe_info):
9595         Refactor as tfile_target methods.
9596         (tfile_xfer_partial_features): Remove target_ops parameter.
9597         (init_tfile_ops): Delete.
9598         (_initialize_tracefile_tfile): Don't call it.
9599         * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
9600         (tracefile_has_stack, tracefile_has_registers)
9601         (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
9602         tracefile_target methods.
9603         (init_tracefile_ops): Delete.
9604         (tracefile_target::tracefile_target): New.
9605         * tracefile.h: Include "target.h".
9606         (tracefile_target): New class.
9607         (init_tracefile_ops): Delete.
9608
9609         * spu-multiarch.c (spu_multiarch_target): New class.
9610         (spu_ops): Now a spu_multiarch_target.
9611         (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
9612         (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
9613         (spu_search_memory, spu_mourn_inferior): Refactor as
9614         spu_multiarch_target methods.
9615         (init_spu_ops): Delete.
9616         (_initialize_spu_multiarch): Remove references to init_spu_ops,
9617         complete_target_initialization.
9618
9619         * ravenscar-thread.c (ravenscar_thread_target): New class.
9620         (ravenscar_ops): Now a ravenscar_thread_target.
9621         (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
9622         (ravenscar_thread_alive, ravenscar_pid_to_str)
9623         (ravenscar_fetch_registers, ravenscar_store_registers)
9624         (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
9625         (ravenscar_stopped_by_hw_breakpoint)
9626         (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
9627         (ravenscar_mourn_inferior, ravenscar_core_of_thread)
9628         (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
9629         methods.
9630         (init_ravenscar_thread_ops): Delete.
9631         (_initialize_ravenscar): Remove references to
9632         init_ravenscar_thread_ops and complete_target_initialization.
9633
9634         * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
9635         (bsd_uthread_target): New class.
9636         (bsd_uthread_ops): Now a bsd_uthread_target.
9637         (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
9638         (bsd_uthread_close, bsd_uthread_mourn_inferior)
9639         (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
9640         (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
9641         (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
9642         (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
9643         (bsd_uthread_target): Delete function.
9644         (_initialize_bsd_uthread): Remove reference to
9645         complete_target_initialization.
9646
9647         * bfd-target.c (target_bfd_data): Delete.  Fields folded into ...
9648         (target_bfd): ... this new class.
9649         (target_bfd_xfer_partial, target_bfd_get_section_table)
9650         (target_bfd_close): Refactor as target_bfd methods.
9651         (target_bfd::~target_bfd): New.
9652         (target_bfd_reopen): Adjust.
9653         (target_bfd::close): New.
9654
9655         * record-btrace.c (record_btrace_target): New class.
9656         (record_btrace_ops): Now a record_btrace_target.
9657         (record_btrace_open, record_btrace_stop_recording)
9658         (record_btrace_disconnect, record_btrace_close)
9659         (record_btrace_async, record_btrace_info)
9660         (record_btrace_insn_history, record_btrace_insn_history_range)
9661         (record_btrace_insn_history_from, record_btrace_call_history)
9662         (record_btrace_call_history_range)
9663         (record_btrace_call_history_from, record_btrace_record_method)
9664         (record_btrace_is_replaying, record_btrace_will_replay)
9665         (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
9666         (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
9667         (record_btrace_store_registers, record_btrace_prepare_to_store)
9668         (record_btrace_to_get_unwinder)
9669         (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
9670         (record_btrace_commit_resume, record_btrace_wait)
9671         (record_btrace_stop, record_btrace_can_execute_reverse)
9672         (record_btrace_stopped_by_sw_breakpoint)
9673         (record_btrace_supports_stopped_by_sw_breakpoint)
9674         (record_btrace_stopped_by_hw_breakpoint)
9675         (record_btrace_supports_stopped_by_hw_breakpoint)
9676         (record_btrace_update_thread_list, record_btrace_thread_alive)
9677         (record_btrace_goto_begin, record_btrace_goto_end)
9678         (record_btrace_goto, record_btrace_stop_replaying_all)
9679         (record_btrace_execution_direction)
9680         (record_btrace_prepare_to_generate_core)
9681         (record_btrace_done_generating_core): Refactor as
9682         record_btrace_target methods.
9683         (init_record_btrace_ops): Delete.
9684         (_initialize_record_btrace): Remove reference to
9685         init_record_btrace_ops.
9686         * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
9687         the execution_direction global.
9688         (record_full_base_target, record_full_target)
9689         (record_full_core_target): New classes.
9690         (record_full_ops): Now a record_full_target.
9691         (record_full_core_ops): Now a record_full_core_target.
9692         (record_full_target::detach, record_full_target::disconnect)
9693         (record_full_core_target::disconnect)
9694         (record_full_target::mourn_inferior, record_full_target::kill):
9695         New.
9696         (record_full_open, record_full_close, record_full_async): Refactor
9697         as methods of the record_full_base_target class.
9698         (record_full_resume, record_full_commit_resume): Refactor
9699         as methods of the record_full_target class.
9700         (record_full_wait, record_full_stopped_by_watchpoint)
9701         (record_full_stopped_data_address)
9702         (record_full_stopped_by_sw_breakpoint)
9703         (record_full_supports_stopped_by_sw_breakpoint)
9704         (record_full_stopped_by_hw_breakpoint)
9705         (record_full_supports_stopped_by_hw_breakpoint): Refactor as
9706         methods of the record_full_base_target class.
9707         (record_full_store_registers, record_full_xfer_partial)
9708         (record_full_insert_breakpoint, record_full_remove_breakpoint):
9709         Refactor as methods of the record_full_target class.
9710         (record_full_can_execute_reverse, record_full_get_bookmark)
9711         (record_full_goto_bookmark, record_full_execution_direction)
9712         (record_full_record_method, record_full_info, record_full_delete)
9713         (record_full_is_replaying, record_full_will_replay)
9714         (record_full_goto_begin, record_full_goto_end, record_full_goto)
9715         (record_full_stop_replaying): Refactor as methods of the
9716         record_full_base_target class.
9717         (record_full_core_resume, record_full_core_kill)
9718         (record_full_core_fetch_registers)
9719         (record_full_core_prepare_to_store)
9720         (record_full_core_store_registers, record_full_core_xfer_partial)
9721         (record_full_core_insert_breakpoint)
9722         (record_full_core_remove_breakpoint)
9723         (record_full_core_has_execution): Refactor
9724         as methods of the record_full_core_target class.
9725         (record_full_base_target::supports_delete_record): New.
9726         (init_record_full_ops): Delete.
9727         (init_record_full_core_ops): Delete.
9728         (record_full_save): Refactor as method of the
9729         record_full_base_target class.
9730         (_initialize_record_full): Remove references to
9731         init_record_full_ops and init_record_full_core_ops.
9732
9733         * remote.c (remote_target, extended_remote_target): New classes.
9734         (remote_ops): Now a remote_target.
9735         (extended_remote_ops): Now an extended_remote_target.
9736         (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
9737         (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
9738         (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
9739         (remote_pass_signals, remote_set_syscall_catchpoint)
9740         (remote_program_signals, )
9741         (remote_thread_always_alive): Remove target_ops parameter.
9742         (remote_thread_alive, remote_thread_name)
9743         (remote_update_thread_list, remote_threads_extra_info)
9744         (remote_static_tracepoint_marker_at)
9745         (remote_static_tracepoint_markers_by_strid)
9746         (remote_get_ada_task_ptid, remote_close, remote_start_remote)
9747         (remote_open): Refactor as methods of remote_target.
9748         (extended_remote_open, extended_remote_detach)
9749         (extended_remote_attach, extended_remote_post_attach):
9750         (extended_remote_supports_disable_randomization)
9751         (extended_remote_create_inferior): : Refactor as method of
9752         extended_remote_target.
9753         (remote_set_permissions, remote_open_1, remote_detach)
9754         (remote_follow_fork, remote_follow_exec, remote_disconnect)
9755         (remote_resume, remote_commit_resume, remote_stop)
9756         (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
9757         (remote_terminal_ours, remote_wait, remote_fetch_registers)
9758         (remote_prepare_to_store, remote_store_registers)
9759         (remote_flash_erase, remote_flash_done, remote_files_info)
9760         (remote_kill, remote_mourn, remote_insert_breakpoint)
9761         (remote_remove_breakpoint, remote_insert_watchpoint)
9762         (remote_watchpoint_addr_within_range)
9763         (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
9764         (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
9765         (remote_supports_stopped_by_sw_breakpoint)
9766         (remote_stopped_by_hw_breakpoint)
9767         (remote_supports_stopped_by_hw_breakpoint)
9768         (remote_stopped_by_watchpoint, remote_stopped_data_address)
9769         (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
9770         (remote_verify_memory): Refactor as methods of remote_target.
9771         (remote_write_qxfer, remote_read_qxfer): Remove target_ops
9772         parameter.
9773         (remote_xfer_partial, remote_get_memory_xfer_limit)
9774         (remote_search_memory, remote_rcmd, remote_memory_map)
9775         (remote_pid_to_str, remote_get_thread_local_address)
9776         (remote_get_tib_address, remote_read_description): Refactor as
9777         methods of remote_target.
9778         (remote_target::fileio_open, remote_target::fileio_pwrite)
9779         (remote_target::fileio_pread, remote_target::fileio_close): New.
9780         (remote_hostio_readlink, remote_hostio_fstat)
9781         (remote_filesystem_is_local, remote_can_execute_reverse)
9782         (remote_supports_non_stop, remote_supports_disable_randomization)
9783         (remote_supports_multi_process, remote_supports_cond_breakpoints)
9784         (remote_supports_enable_disable_tracepoint)
9785         (remote_supports_string_tracing)
9786         (remote_can_run_breakpoint_commands, remote_trace_init)
9787         (remote_download_tracepoint, remote_can_download_tracepoint)
9788         (remote_download_trace_state_variable, remote_enable_tracepoint)
9789         (remote_disable_tracepoint, remote_trace_set_readonly_regions)
9790         (remote_trace_start, remote_get_trace_status)
9791         (remote_get_tracepoint_status, remote_trace_stop)
9792         (remote_trace_find, remote_get_trace_state_variable_value)
9793         (remote_save_trace_data, remote_get_raw_trace_data)
9794         (remote_set_disconnected_tracing, remote_core_of_thread)
9795         (remote_set_circular_trace_buffer, remote_traceframe_info)
9796         (remote_get_min_fast_tracepoint_insn_len)
9797         (remote_set_trace_buffer_size, remote_set_trace_notes)
9798         (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
9799         (remote_disable_btrace, remote_teardown_btrace)
9800         (remote_read_btrace, remote_btrace_conf)
9801         (remote_augmented_libraries_svr4_read, remote_load)
9802         (remote_pid_to_exec_file, remote_can_do_single_step)
9803         (remote_execution_direction, remote_thread_handle_to_thread_info):
9804         Refactor as methods of remote_target.
9805         (init_remote_ops, init_extended_remote_ops): Delete.
9806         (remote_can_async_p, remote_is_async_p, remote_async)
9807         (remote_thread_events, remote_upload_tracepoints)
9808         (remote_upload_trace_state_variables): Refactor as methods of
9809         remote_target.
9810         (_initialize_remote): Remove references to init_remote_ops and
9811         init_extended_remote_ops.
9812
9813         * remote-sim.c (gdbsim_target): New class.
9814         (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
9815         (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
9816         (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
9817         (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
9818         (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
9819         (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
9820         Refactor as methods of gdbsim_target.
9821         (gdbsim_ops): Now a gdbsim_target.
9822         (init_gdbsim_ops): Delete.
9823         (gdbsim_cntrl_c): Adjust.
9824         (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
9825
9826         * amd64-linux-nat.c (amd64_linux_nat_target): New class.
9827         (the_amd64_linux_nat_target): New.
9828         (amd64_linux_fetch_inferior_registers)
9829         (amd64_linux_store_inferior_registers): Refactor as methods of
9830         amd64_linux_nat_target.
9831         (_initialize_amd64_linux_nat): Adjust.  Set linux_target.
9832         * i386-linux-nat.c: Don't include "linux-nat.h".
9833         (i386_linux_nat_target): New class.
9834         (the_i386_linux_nat_target): New.
9835         (i386_linux_fetch_inferior_registers)
9836         (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
9837         as methods of i386_linux_nat_target.
9838         (_initialize_i386_linux_nat): Adjust.  Set linux_target.
9839         * inf-child.c (inf_child_ops): Delete.
9840         (inf_child_fetch_inferior_registers)
9841         (inf_child_store_inferior_registers): Delete.
9842         (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
9843         methods of inf_child_target.
9844         (inf_child_target::supports_terminal_ours)
9845         (inf_child_target::terminal_init)
9846         (inf_child_target::terminal_inferior)
9847         (inf_child_target::terminal_ours_for_output)
9848         (inf_child_target::terminal_ours, inf_child_target::interrupt)
9849         (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
9850         New.
9851         (inf_child_open, inf_child_disconnect, inf_child_close)
9852         (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
9853         (inf_child_post_startup_inferior, inf_child_can_run)
9854         (inf_child_pid_to_exec_file): Refactor as methods of
9855         inf_child_target.
9856         (inf_child_follow_fork): Delete.
9857         (inf_child_target::can_create_inferior)
9858         (inf_child_target::can_attach): New.
9859         (inf_child_target::has_all_memory, inf_child_target::has_memory)
9860         (inf_child_target::has_stack, inf_child_target::has_registers)
9861         (inf_child_target::has_execution): New.
9862         (inf_child_fileio_open, inf_child_fileio_pwrite)
9863         (inf_child_fileio_pread, inf_child_fileio_fstat)
9864         (inf_child_fileio_close, inf_child_fileio_unlink)
9865         (inf_child_fileio_readlink, inf_child_use_agent)
9866         (inf_child_can_use_agent): Refactor as methods of
9867         inf_child_target.
9868         (return_zero, inf_child_target): Delete.
9869         (inf_child_target::inf_child_target): New.
9870         * inf-child.h: Include "target.h".
9871         (inf_child_target): Delete function prototype.
9872         (inf_child_target): New class.
9873         (inf_child_open_target, inf_child_mourn_inferior)
9874         (inf_child_maybe_unpush_target): Delete.
9875         * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
9876         (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
9877         (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
9878         (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
9879         (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
9880         (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
9881         (inf_ptrace_wait, inf_ptrace_xfer_partial)
9882         (inf_ptrace_thread_alive, inf_ptrace_files_info)
9883         (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
9884         methods of inf_ptrace_target.
9885         (inf_ptrace_target): Delete function.
9886         * inf-ptrace.h: Include "inf-child.h".
9887         (inf_ptrace_target): Delete function declaration.
9888         (inf_ptrace_target): New class.
9889         (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
9890         * linux-nat.c (linux_target): New.
9891         (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
9892         (linux_nat_target::~linux_nat_target): New.
9893         (linux_child_post_attach, linux_child_post_startup_inferior)
9894         (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
9895         (linux_child_remove_fork_catchpoint)
9896         (linux_child_insert_vfork_catchpoint)
9897         (linux_child_remove_vfork_catchpoint)
9898         (linux_child_insert_exec_catchpoint)
9899         (linux_child_remove_exec_catchpoint)
9900         (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
9901         (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
9902         (linux_nat_resume, linux_nat_stopped_by_watchpoint)
9903         (linux_nat_stopped_data_address)
9904         (linux_nat_stopped_by_sw_breakpoint)
9905         (linux_nat_supports_stopped_by_sw_breakpoint)
9906         (linux_nat_stopped_by_hw_breakpoint)
9907         (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
9908         (linux_nat_kill, linux_nat_mourn_inferior)
9909         (linux_nat_xfer_partial, linux_nat_thread_alive)
9910         (linux_nat_update_thread_list, linux_nat_pid_to_str)
9911         (linux_nat_thread_name, linux_child_pid_to_exec_file)
9912         (linux_child_static_tracepoint_markers_by_strid)
9913         (linux_nat_is_async_p, linux_nat_can_async_p)
9914         (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
9915         (linux_nat_supports_multi_process)
9916         (linux_nat_supports_disable_randomization, linux_nat_async)
9917         (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
9918         (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
9919         (linux_nat_fileio_open, linux_nat_fileio_readlink)
9920         (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
9921         methods of linux_nat_target.
9922         (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
9923         (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
9924         parameter.
9925         (check_stopped_by_watchpoint): Adjust.
9926         (linux_xfer_partial): Delete.
9927         (linux_target_install_ops, linux_target, linux_nat_add_target):
9928         Delete.
9929         (linux_nat_target::linux_nat_target): New.
9930         * linux-nat.h: Include "inf-ptrace.h".
9931         (linux_nat_target): New.
9932         (linux_target, linux_target_install_ops, linux_nat_add_target):
9933         Delete function declarations.
9934         (linux_target): Declare global.
9935         * linux-thread-db.c (thread_db_target): New.
9936         (thread_db_target::thread_db_target): New.
9937         (thread_db_ops): Delete.
9938         (the_thread_db_target): New.
9939         (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
9940         (thread_db_update_thread_list, thread_db_pid_to_str)
9941         (thread_db_extra_thread_info)
9942         (thread_db_thread_handle_to_thread_info)
9943         (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
9944         (thread_db_resume): Refactor as methods of thread_db_target.
9945         (init_thread_db_ops): Delete.
9946         (_initialize_thread_db): Remove reference to init_thread_db_ops.
9947         * x86-linux-nat.c: Don't include "linux-nat.h".
9948         (super_post_startup_inferior): Delete.
9949         (x86_linux_nat_target::~x86_linux_nat_target): New.
9950         (x86_linux_child_post_startup_inferior)
9951         (x86_linux_read_description, x86_linux_enable_btrace)
9952         (x86_linux_disable_btrace, x86_linux_teardown_btrace)
9953         (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
9954         methods of x86_linux_nat_target.
9955         (x86_linux_create_target): Delete.  Bits folded ...
9956         (x86_linux_add_target): ... here.  Now takes a linux_nat_target
9957         pointer.
9958         * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
9959         (x86_linux_nat_target): New class.
9960         (x86_linux_create_target): Delete.
9961         (x86_linux_add_target): Now takes a linux_nat_target pointer.
9962         * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
9963         (x86_region_ok_for_watchpoint, x86_stopped_data_address)
9964         (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
9965         (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
9966         (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
9967         make extern.
9968         (x86_use_watchpoints): Delete.
9969         * x86-nat.h: Include "breakpoint.h" and "target.h".
9970         (x86_use_watchpoints): Delete.
9971         (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
9972         (x86_stopped_by_watchpoint, x86_stopped_data_address)
9973         (x86_insert_watchpoint, x86_remove_watchpoint)
9974         (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
9975         (x86_stopped_by_hw_breakpoint): New declarations.
9976         (x86_nat_target): New template class.
9977
9978         * ppc-linux-nat.c (ppc_linux_nat_target): New class.
9979         (the_ppc_linux_nat_target): New.
9980         (ppc_linux_fetch_inferior_registers)
9981         (ppc_linux_can_use_hw_breakpoint)
9982         (ppc_linux_region_ok_for_hw_watchpoint)
9983         (ppc_linux_ranged_break_num_registers)
9984         (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
9985         (ppc_linux_insert_mask_watchpoint)
9986         (ppc_linux_remove_mask_watchpoint)
9987         (ppc_linux_can_accel_watchpoint_condition)
9988         (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
9989         (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
9990         (ppc_linux_watchpoint_addr_within_range)
9991         (ppc_linux_masked_watch_num_registers)
9992         (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
9993         (ppc_linux_read_description): Refactor as methods of
9994         ppc_linux_nat_target.
9995         (_initialize_ppc_linux_nat): Adjust.  Set linux_target.
9996
9997         * procfs.c (procfs_xfer_partial): Delete forward declaration.
9998         (procfs_target): New class.
9999         (the_procfs_target): New.
10000         (procfs_target): Delete function.
10001         (procfs_auxv_parse, procfs_attach, procfs_detach)
10002         (procfs_fetch_registers, procfs_store_registers, procfs_wait)
10003         (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
10004         (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
10005         (procfs_create_inferior, procfs_update_thread_list)
10006         (procfs_thread_alive, procfs_pid_to_str)
10007         (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
10008         (procfs_stopped_data_address, procfs_insert_watchpoint)
10009         (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
10010         (proc_find_memory_regions, procfs_info_proc)
10011         (procfs_make_note_section): Refactor as methods of procfs_target.
10012         (_initialize_procfs): Adjust.
10013         * sol-thread.c (sol_thread_target): New class.
10014         (sol_thread_ops): Now a sol_thread_target.
10015         (sol_thread_detach, sol_thread_resume, sol_thread_wait)
10016         (sol_thread_fetch_registers, sol_thread_store_registers)
10017         (sol_thread_xfer_partial, sol_thread_mourn_inferior)
10018         (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
10019         (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
10020         (init_sol_thread_ops): Delete.
10021         (_initialize_sol_thread): Adjust.  Remove references to
10022         init_sol_thread_ops and complete_target_initialization.
10023
10024         * windows-nat.c (windows_nat_target): New class.
10025         (windows_fetch_inferior_registers)
10026         (windows_store_inferior_registers, windows_resume, windows_wait)
10027         (windows_attach, windows_detach, windows_pid_to_exec_file)
10028         (windows_files_info, windows_create_inferior)
10029         (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
10030         (windows_close, windows_pid_to_str, windows_xfer_partial)
10031         (windows_get_tib_address, windows_get_ada_task_ptid)
10032         (windows_thread_name, windows_thread_alive): Refactor as
10033         windows_nat_target methods.
10034         (do_initial_windows_stuff): Adjust.
10035         (windows_target): Delete function.
10036         (_initialize_windows_nat): Adjust.
10037
10038         * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
10039         (darwin_mourn_inferior, darwin_kill_inferior)
10040         (darwin_create_inferior, darwin_attach, darwin_detach)
10041         (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
10042         (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
10043         (darwin_supports_multi_process): Refactor as darwin_nat_target
10044         methods.
10045         (darwin_resume_to, darwin_files_info): Delete.
10046         (_initialize_darwin_inferior): Rename to ...
10047         (_initialize_darwin_nat): ... this.  Adjust to C++ification.
10048         * darwin-nat.h: Include "inf-child.h".
10049         (darwin_nat_target): New class.
10050         (darwin_complete_target): Delete.
10051         * i386-darwin-nat.c (i386_darwin_nat_target): New class.
10052         (darwin_target): New.
10053         (i386_darwin_fetch_inferior_registers)
10054         (i386_darwin_store_inferior_registers): Refactor as methods of
10055         darwin_nat_target.
10056         (darwin_complete_target): Delete, with ...
10057         (_initialize_i386_darwin_nat): ... bits factored out here.
10058
10059         * alpha-linux-nat.c (alpha_linux_nat_target): New class.
10060         (the_alpha_linux_nat_target): New.
10061         (alpha_linux_register_u_offset): Refactor as
10062         alpha_linux_nat_target method.
10063         (_initialize_alpha_linux_nat): Adjust.
10064         * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
10065         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
10066         (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
10067         methods of linux_nat_trad_target.
10068         (linux_trad_target): Delete.
10069         * linux-nat-trad.h (linux_trad_target): Delete function.
10070         (linux_nat_trad_target): New class.
10071         * mips-linux-nat.c (mips_linux_nat_target): New class.
10072         (super_fetch_registers, super_store_registers, super_close):
10073         Delete.
10074         (the_mips_linux_nat_target): New.
10075         (mips64_linux_regsets_fetch_registers)
10076         (mips64_linux_regsets_store_registers)
10077         (mips64_linux_fetch_registers, mips64_linux_store_registers)
10078         (mips_linux_register_u_offset, mips_linux_read_description)
10079         (mips_linux_can_use_hw_breakpoint)
10080         (mips_linux_stopped_by_watchpoint)
10081         (mips_linux_stopped_data_address)
10082         (mips_linux_region_ok_for_hw_watchpoint)
10083         (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
10084         (mips_linux_close): Refactor as methods of mips_linux_nat.
10085         (_initialize_mips_linux_nat): Adjust to C++ification.
10086
10087         * aix-thread.c (aix_thread_target): New class.
10088         (aix_thread_ops): Now an aix_thread_target.
10089         (aix_thread_detach, aix_thread_resume, aix_thread_wait)
10090         (aix_thread_fetch_registers, aix_thread_store_registers)
10091         (aix_thread_xfer_partial, aix_thread_mourn_inferior)
10092         (aix_thread_thread_alive, aix_thread_pid_to_str)
10093         (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
10094         Refactor as methods of aix_thread_target.
10095         (init_aix_thread_ops): Delete.
10096         (_initialize_aix_thread): Remove references to init_aix_thread_ops
10097         and complete_target_initialization.
10098         * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
10099         (rs6000_nat_target): New class.
10100         (the_rs6000_nat_target): New.
10101         (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
10102         (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
10103         (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
10104         (super_create_inferior): Delete.
10105         (_initialize_rs6000_nat): Adjust to C++ification.
10106
10107         * arm-linux-nat.c (arm_linux_nat_target): New class.
10108         (the_arm_linux_nat_target): New.
10109         (arm_linux_fetch_inferior_registers)
10110         (arm_linux_store_inferior_registers, arm_linux_read_description)
10111         (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
10112         (arm_linux_remove_hw_breakpoint)
10113         (arm_linux_region_ok_for_hw_watchpoint)
10114         (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
10115         (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
10116         (arm_linux_watchpoint_addr_within_range): Refactor as methods of
10117         arm_linux_nat_target.
10118         (_initialize_arm_linux_nat): Adjust to C++ification.
10119
10120         * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
10121         (the_aarch64_linux_nat_target): New.
10122         (aarch64_linux_fetch_inferior_registers)
10123         (aarch64_linux_store_inferior_registers)
10124         (aarch64_linux_child_post_startup_inferior)
10125         (aarch64_linux_read_description)
10126         (aarch64_linux_can_use_hw_breakpoint)
10127         (aarch64_linux_insert_hw_breakpoint)
10128         (aarch64_linux_remove_hw_breakpoint)
10129         (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
10130         (aarch64_linux_region_ok_for_hw_watchpoint)
10131         (aarch64_linux_stopped_data_address)
10132         (aarch64_linux_stopped_by_watchpoint)
10133         (aarch64_linux_watchpoint_addr_within_range)
10134         (aarch64_linux_can_do_single_step): Refactor as methods of
10135         aarch64_linux_nat_target.
10136         (super_post_startup_inferior): Delete.
10137         (_initialize_aarch64_linux_nat): Adjust to C++ification.
10138
10139         * hppa-linux-nat.c (hppa_linux_nat_target): New class.
10140         (the_hppa_linux_nat_target): New.
10141         (hppa_linux_fetch_inferior_registers)
10142         (hppa_linux_store_inferior_registers): Refactor as methods of
10143         hppa_linux_nat_target.
10144         (_initialize_hppa_linux_nat): Adjust to C++ification.
10145
10146         * ia64-linux-nat.c (ia64_linux_nat_target): New class.
10147         (the_ia64_linux_nat_target): New.
10148         (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
10149         (ia64_linux_stopped_data_address)
10150         (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
10151         (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
10152         ia64_linux_nat_target methods.
10153         (super_xfer_partial): Delete.
10154         (_initialize_ia64_linux_nat): Adjust to C++ification.
10155
10156         * m32r-linux-nat.c (m32r_linux_nat_target): New class.
10157         (the_m32r_linux_nat_target): New.
10158         (m32r_linux_fetch_inferior_registers)
10159         (m32r_linux_store_inferior_registers): Refactor as
10160         m32r_linux_nat_target methods.
10161         (_initialize_m32r_linux_nat): Adjust to C++ification.
10162
10163         * m68k-linux-nat.c (m68k_linux_nat_target): New class.
10164         (the_m68k_linux_nat_target): New.
10165         (m68k_linux_fetch_inferior_registers)
10166         (m68k_linux_store_inferior_registers): Refactor as
10167         m68k_linux_nat_target methods.
10168         (_initialize_m68k_linux_nat): Adjust to C++ification.
10169
10170         * s390-linux-nat.c (s390_linux_nat_target): New class.
10171         (the_s390_linux_nat_target): New.
10172         (s390_linux_fetch_inferior_registers)
10173         (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
10174         (s390_insert_watchpoint, s390_remove_watchpoint)
10175         (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
10176         (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
10177         (s390_auxv_parse, s390_read_description): Refactor as methods of
10178         s390_linux_nat_target.
10179         (_initialize_s390_nat): Adjust to C++ification.
10180
10181         * sparc-linux-nat.c (sparc_linux_nat_target): New class.
10182         (the_sparc_linux_nat_target): New.
10183         (_initialize_sparc_linux_nat): Adjust to C++ification.
10184         * sparc-nat.c (sparc_fetch_inferior_registers)
10185         (sparc_store_inferior_registers): Remove target_ops parameter.
10186         * sparc-nat.h (sparc_fetch_inferior_registers)
10187         (sparc_store_inferior_registers): Remove target_ops parameter.
10188         * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
10189         (the_sparc64_linux_nat_target): New.
10190         (_initialize_sparc64_linux_nat): Adjust to C++ification.
10191
10192         * spu-linux-nat.c (spu_linux_nat_target): New class.
10193         (the_spu_linux_nat_target): New.
10194         (spu_child_post_startup_inferior, spu_child_post_attach)
10195         (spu_child_wait, spu_fetch_inferior_registers)
10196         (spu_store_inferior_registers, spu_xfer_partial)
10197         (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
10198         methods.
10199         (_initialize_spu_nat): Adjust to C++ification.
10200
10201         * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
10202         (the_tilegx_linux_nat_target): New.
10203         (fetch_inferior_registers, store_inferior_registers):
10204         Refactor as methods.
10205         (_initialize_tile_linux_nat): Adjust to C++ification.
10206
10207         * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
10208         (the_xtensa_linux_nat_target): New.
10209         (xtensa_linux_fetch_inferior_registers)
10210         (xtensa_linux_store_inferior_registers): Refactor as
10211         xtensa_linux_nat_target methods.
10212         (_initialize_xtensa_linux_nat): Adjust to C++ification.
10213
10214         * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
10215         (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
10216         (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
10217         (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
10218         (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
10219         (fbsd_stopped_by_sw_breakpoint)
10220         (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
10221         (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
10222         (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
10223         (fbsd_post_startup_inferior, fbsd_post_attach)
10224         (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
10225         (fbsd_set_syscall_catchpoint)
10226         (super_xfer_partial, super_resume, super_wait)
10227         (fbsd_supports_stopped_by_hw_breakpoint): Delete.
10228         (fbsd_handle_debug_trap): Remove target_ops parameter.
10229         (fbsd_nat_add_target): Delete.
10230         * fbsd-nat.h: Include "inf-ptrace.h".
10231         (fbsd_nat_add_target): Delete.
10232         (USE_SIGTRAP_SIGINFO): Define.
10233         (fbsd_nat_target): New class.
10234
10235         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
10236         (amd64bsd_store_inferior_registers): Remove target_ops parameter.
10237         (amd64bsd_target): Delete.
10238         * amd64-bsd-nat.h: New file.
10239         * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
10240         "x86-bsd-nat.h".
10241         (amd64_fbsd_nat_target): New class.
10242         (the_amd64_fbsd_nat_target): New.
10243         (amd64fbsd_read_description): Refactor as method of
10244         amd64_fbsd_nat_target.
10245         (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
10246         (_initialize_amd64fbsd_nat): Adjust to C++ification.
10247         * amd64-nat.h (amd64bsd_target): Delete function declaration.
10248         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
10249         (i386bsd_store_inferior_registers): Remove target_ops parameter.
10250         (i386bsd_target): Delete.
10251         * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
10252         (i386bsd_fetch_inferior_registers)
10253         (i386bsd_store_inferior_registers): Declare.
10254         (i386_bsd_nat_target): New class.
10255         * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
10256         (the_i386_fbsd_nat_target): New.
10257         (i386fbsd_resume, i386fbsd_read_description): Refactor as
10258         i386_fbsd_nat_target methods.
10259         (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
10260         (_initialize_i386fbsd_nat): Adjust to C++ification.
10261         * x86-bsd-nat.c (super_mourn_inferior): Delete.
10262         (x86bsd_mourn_inferior, x86bsd_target): Delete.
10263         (_initialize_x86_bsd_nat): Adjust to C++ification.
10264         * x86-bsd-nat.h: Include "x86-nat.h".
10265         (x86bsd_target): Delete declaration.
10266         (x86bsd_nat_target): New class.
10267
10268         * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
10269         (the_aarch64_fbsd_nat_target): New.
10270         (aarch64_fbsd_fetch_inferior_registers)
10271         (aarch64_fbsd_store_inferior_registers): Refactor as methods of
10272         aarch64_fbsd_nat_target.
10273         (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
10274         * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
10275         (the_alpha_bsd_nat_target): New.
10276         (alphabsd_fetch_inferior_registers)
10277         (alphabsd_store_inferior_registers): Refactor as
10278         alpha_bsd_nat_target methods.
10279         (_initialize_alphabsd_nat): Refactor as methods of
10280         alpha_bsd_nat_target.
10281         * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
10282         (the_amd64_nbsd_nat_target): New.
10283         (_initialize_amd64nbsd_nat): Adjust to C++ification.
10284         * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
10285         (the_amd64_obsd_nat_target): New.
10286         (_initialize_amd64obsd_nat): Adjust to C++ification.
10287         * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
10288         (the_arm_fbsd_nat_target): New.
10289         (arm_fbsd_fetch_inferior_registers)
10290         (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
10291         (_initialize_arm_fbsd_nat): Refactor as methods of
10292         arm_fbsd_nat_target.
10293         (_initialize_arm_fbsd_nat): Adjust to C++ification.
10294         * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
10295         (the_arm_netbsd_nat_target): New.
10296         (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
10297         arm_netbsd_nat_target.
10298         (_initialize_arm_netbsd_nat): Adjust to C++ification.
10299         * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
10300         (the_hppa_nbsd_nat_target): New.
10301         (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
10302         hppa_nbsd_nat_target methods.
10303         (_initialize_hppanbsd_nat): Adjust to C++ification.
10304         * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
10305         (the_hppa_obsd_nat_target): New.
10306         (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
10307         methods of hppa_obsd_nat_target.
10308         (_initialize_hppaobsd_nat): Adjust to C++ification.  Use
10309         add_target.
10310         * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
10311         (_initialize_i386nbsd_nat): Adjust to C++ification.  Use
10312         add_target.
10313         * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
10314         (_initialize_i386obsd_nat): Use add_target.
10315         * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
10316         (the_m68k_bsd_nat_target): New.
10317         (m68kbsd_fetch_inferior_registers)
10318         (m68kbsd_store_inferior_registers): Refactor as methods of
10319         m68k_bsd_nat_target.
10320         (_initialize_m68kbsd_nat): Adjust to C++ification.
10321         * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
10322         (the_mips_fbsd_nat_target): New.
10323         (mips_fbsd_fetch_inferior_registers)
10324         (mips_fbsd_store_inferior_registers): Refactor as methods of
10325         mips_fbsd_nat_target.
10326         (_initialize_mips_fbsd_nat): Adjust to C++ification.  Use
10327         add_target.
10328         * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
10329         (the_mips_nbsd_nat_target): New.
10330         (mipsnbsd_fetch_inferior_registers)
10331         (mipsnbsd_store_inferior_registers): Refactor as methods of
10332         mips_nbsd_nat_target.
10333         (_initialize_mipsnbsd_nat): Adjust to C++ification.
10334         * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
10335         (the_mips64_obsd_nat_target): New.
10336         (mips64obsd_fetch_inferior_registers)
10337         (mips64obsd_store_inferior_registers): Refactor as methods of
10338         mips64_obsd_nat_target.
10339         (_initialize_mips64obsd_nat): Adjust to C++ification.  Use
10340         add_target.
10341         * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
10342         nbsd_nat_target.
10343         * nbsd-nat.h: Include "inf-ptrace.h".
10344         (nbsd_nat_target): New class.
10345         * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
10346         (obsd_wait): Refactor as methods of obsd_nat_target.
10347         (obsd_add_target): Delete.
10348         * obsd-nat.h: Include "inf-ptrace.h".
10349         (obsd_nat_target): New class.
10350         * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
10351         (the_ppc_fbsd_nat_target): New.
10352         (ppcfbsd_fetch_inferior_registers)
10353         (ppcfbsd_store_inferior_registers): Refactor as methods of
10354         ppc_fbsd_nat_target.
10355         (_initialize_ppcfbsd_nat): Adjust to C++ification.  Use
10356         add_target.
10357         * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
10358         (the_ppc_nbsd_nat_target): New.
10359         (ppcnbsd_fetch_inferior_registers)
10360         (ppcnbsd_store_inferior_registers): Refactor as methods of
10361         ppc_nbsd_nat_target.
10362         (_initialize_ppcnbsd_nat): Adjust to C++ification.
10363         * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
10364         (the_ppc_obsd_nat_target): New.
10365         (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
10366         methods of ppc_obsd_nat_target.
10367         (_initialize_ppcobsd_nat): Adjust to C++ification.  Use
10368         add_target.
10369         * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
10370         (the_sh_nbsd_nat_target): New.
10371         (shnbsd_fetch_inferior_registers)
10372         (shnbsd_store_inferior_registers): Refactor as methods of
10373         sh_nbsd_nat_target.
10374         (_initialize_shnbsd_nat): Adjust to C++ification.
10375         * sparc-nat.c (sparc_xfer_wcookie): Make extern.
10376         (inf_ptrace_xfer_partial): Delete.
10377         (sparc_xfer_partial, sparc_target): Delete.
10378         * sparc-nat.h (sparc_fetch_inferior_registers)
10379         (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
10380         (sparc_target): Delete function declaration.
10381         (sparc_target): New template class.
10382         * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
10383         (_initialize_sparcnbsd_nat): Adjust to C++ification.
10384         * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
10385         (_initialize_sparc64fbsd_nat): Adjust to C++ification.  Use
10386         add_target.
10387         * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
10388         (_initialize_sparc64nbsd_nat): Adjust to C++ification.
10389         * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
10390         (_initialize_sparc64obsd_nat): Adjust to C++ification.  Use
10391         add_target.
10392         * vax-bsd-nat.c (vax_bsd_nat_target): New class.
10393         (the_vax_bsd_nat_target): New.
10394         (vaxbsd_fetch_inferior_registers)
10395         (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
10396         methods.
10397         (_initialize_vaxbsd_nat): Adjust to C++ification.
10398
10399         * bsd-kvm.c (bsd_kvm_target): New class.
10400         (bsd_kvm_ops): Now a bsd_kvm_target.
10401         (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
10402         (bsd_kvm_files_info, bsd_kvm_fetch_registers)
10403         (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
10404         bsd_kvm_target.
10405         (bsd_kvm_return_one): Delete.
10406         (bsd_kvm_add_target): Adjust to C++ification.
10407
10408         * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
10409         (nto_procfs_target_procfs): New classes.
10410         (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
10411         (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
10412         (procfs_post_attach, procfs_wait, procfs_fetch_registers)
10413         (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
10414         (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
10415         (procfs_remove_hw_breakpoint, procfs_resume)
10416         (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
10417         (procfs_kill_inferior, procfs_store_registers)
10418         (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
10419         as methods of nto_procfs_target.
10420         (nto_procfs_ops): Now an nto_procfs_target_procfs.
10421         (nto_native_ops): Delete.
10422         (procfs_open, procfs_native_open): Delete.
10423         (nto_native_ops): Now an nto_procfs_target_native.
10424         (init_procfs_targets): Adjust to C++ification.
10425         (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
10426         (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
10427         Refactor as methods of nto_procfs_target.
10428
10429         * go32-nat.c (go32_nat_target): New class.
10430         (the_go32_nat_target): New.
10431         (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
10432         (go32_store_registers, go32_xfer_partial, go32_files_info)
10433         (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
10434         (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
10435         (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
10436         (go32_pid_to_str): Refactor as methods of go32_nat_target.
10437         (go32_target): Delete.
10438         (_initialize_go32_nat): Adjust to C++ification.
10439
10440         * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
10441         (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
10442         (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
10443         (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
10444         gnu_nat_target.
10445         (gnu_target): Delete.
10446         * gnu-nat.h (gnu_target): Delete.
10447         (gnu_nat_target): New class.
10448         * i386-gnu-nat.c (gnu_base_target): New.
10449         (i386_gnu_nat_target): New class.
10450         (the_i386_gnu_nat_target): New.
10451         (_initialize_i386gnu_nat): Adjust to C++ification.
10452
10453 2018-05-02  Pedro Alves  <palves@redhat.com>
10454
10455         * bfd-target.c (target_bfd_xclose): Rename to ...
10456         (target_bfd_close): ... this.
10457         (target_bfd_reopen): Adjust.
10458         * target.c (target_close): Remove references to to_xclose.
10459         * target.h (target_ops::to_xclose): Delete.
10460         (target_ops::to_close): Update comments.
10461
10462 2018-05-02  Pedro Alves  <palves@redhat.com>
10463
10464         * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
10465         "linux-nat.h".
10466         * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
10467         * inf-ptrace.c (inf_ptrace_register_u_offset)
10468         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
10469         (inf_ptrace_store_register, inf_ptrace_store_registers)
10470         (inf_ptrace_trad_target): Move to ...
10471         * linux-nat-trad.c: ... this new file.
10472         * linux-nat-trad.h: New file.
10473         * linux-nat.c (linux_target_install_ops): Make extern.
10474         (linux_trad_target): Delete.
10475         * linux-nat.h (linux_trad_target): Delete declaration.
10476         (linux_target_install_ops): Declare.
10477         * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
10478         "linux-nat.h".
10479
10480 2018-05-02  Pedro Alves  <palves@redhat.com>
10481
10482         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
10483         procfs_target/add_target here.
10484         * procfs.c (procfs_target): Make static.
10485         (_initialize_procfs): Call add_target here.
10486         * procfs.h (struct target_ops): Remove forward declaration.
10487         (procfs_target): Remove declaration.
10488         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
10489
10490 2018-05-02  Pedro Alves  <palves@redhat.com>
10491
10492         * procfs.c (procfs_stopped_by_watchpoint)
10493         (procfs_insert_watchpoint, procfs_remove_watchpoint)
10494         (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
10495         Forward declare.
10496         (procfs_use_watchpoints): Delete, move contents...
10497         (procfs_target): ... here.
10498         * procfs.h (procfs_use_watchpoints): Delete declaration.
10499         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
10500         procfs_use_watchpoints.
10501         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
10502         procfs_use_watchpoints.
10503
10504 2018-05-02  Tom Tromey  <tom@tromey.com>
10505
10506         PR python/20084:
10507         * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
10508         and var_zuinteger_unlimited.
10509         * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
10510         and PARAM_ZUINTEGER_UNLIMITED.
10511         (set_parameter_value): Handle var_zuinteger and
10512         var_zuinteger_unlimited.
10513         (add_setshow_generic): Likewise.
10514         (parmpy_init): Likewise.
10515
10516 2018-04-28  Dan Robertson  <danlrobertson89@gmail.com>
10517
10518         PR rust/23124
10519         * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
10520         pointer is not null before dereferencing it.
10521
10522 2018-04-30  Tom Tromey  <tom@tromey.com>
10523
10524         * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
10525         is_mi_like_p.
10526
10527 2018-04-30  Tom Tromey  <tom@tromey.com>
10528
10529         * breakpoint.c (mention): Remove use of is_mi_like_p.
10530         (print_mention_ranged_breakpoint): Likewise.
10531         * break-catch-throw.c (print_it_exception_catchpoint): Remove use
10532         of is_mi_like_p.
10533
10534 2018-04-30  Tom Tromey  <tom@tromey.com>
10535
10536         * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
10537
10538 2018-04-30  Tom Tromey  <tom@tromey.com>
10539
10540         * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
10541         (info_spu_event_command): Remove some uses of is_mi_like_p.
10542
10543 2018-04-30  Tom Tromey  <tom@tromey.com>
10544
10545         * python/py-framefilter.c (py_print_single_arg)
10546         (enumerate_locals, py_print_args, py_print_frame): Remove some
10547         uses of is_mi_like_p.
10548
10549 2018-04-30  Tom Tromey  <tom@tromey.com>
10550
10551         * ui-out.c: Update.
10552         * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
10553         * ui-out.h (ui_out::is_mi_like_p): Now const.
10554         (ui_out::do_is_mi_like_p): Now const.
10555         * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
10556
10557 2018-04-30  Tom Tromey  <tom@tromey.com>
10558
10559         * varobj.c (varobj_set_visualizer): Use new_reference.
10560         * python/python.c (gdbpy_decode_line): Use new_reference.
10561         * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
10562         new_reference.
10563
10564 2018-04-30  Tom Tromey  <tom@tromey.com>
10565
10566         * varobj.c (install_new_value): Use new_reference.
10567         * value.h (value_incref): Return void.  Swap intro comment with
10568         value_decref.
10569         * value.c (set_value_parent): Use new_reference.
10570         (value_incref): Return void.  Update intro comment.
10571         (release_value): Use new_reference.
10572         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
10573
10574 2018-04-30  Tom Tromey  <tom@tromey.com>
10575
10576         * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
10577         * gdb_bfd.h (new_bfd_ref): Remove.
10578         (gdb_bfd_open): Update comment.
10579         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
10580         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
10581         (gdb_bfd_fdopenr): Use new_reference.
10582         * exec.c (exec_file_attach): Use new_reference.
10583
10584 2018-04-30  Tom Tromey  <tom@tromey.com>
10585
10586         * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
10587         method.
10588
10589 2018-04-30  Tom Tromey  <tom@tromey.com>
10590
10591         * jit.c (jit_read_code_entry): Use type_align.
10592         * i386-tdep.c (i386_gdbarch_init): Don't call
10593         set_gdbarch_long_long_align_bit.
10594         * gdbarch.sh: Remove long_long_align_bit.
10595         * gdbarch.c, gdbarch.h: Rebuild.
10596         * arc-tdep.c (arc_type_align): New function.
10597         (arc_gdbarch_init): Use arc_type_align.  Don't call
10598         set_gdbarch_long_long_align_bit.
10599
10600 2018-04-30  Tom Tromey  <tom@tromey.com>
10601
10602         * rust-lang.c (rust_type_alignment): Remove.
10603         (rust_composite_type): Use type_align.
10604
10605 2018-04-30  Tom Tromey  <tom@tromey.com>
10606
10607         * NEWS: Mention Type.align.
10608         * python/py-type.c (typy_get_alignof): New function.
10609         (type_object_getset): Add "alignof".
10610
10611 2018-04-30  Tom Tromey  <tom@tromey.com>
10612
10613         PR exp/17095:
10614         * NEWS: Update.
10615         * std-operator.def (UNOP_ALIGNOF): New operator.
10616         * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
10617         New.
10618         * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
10619         * c-lang.c (c_op_print_tab): Add alignof.
10620         * c-exp.y (ALIGNOF): New token.
10621         (exp): Add "ALIGNOF" production.
10622         (ident_tokens): Add _Alignof and alignof.
10623
10624 2018-04-30  Tom Tromey  <tom@tromey.com>
10625
10626         * i386-tdep.c (i386_type_align): New function.
10627         (i386_gdbarch_init): Update.
10628         * gdbarch.sh (type_align): New method.
10629         * gdbarch.c, gdbarch.h: Rebuild.
10630         * arch-utils.h (default_type_align): Declare.
10631         * arch-utils.c (default_type_align): New function.
10632         * gdbtypes.h (TYPE_ALIGN_BITS): New define.
10633         (struct type) <align_log2>: New field.
10634         <instance_flags>: Now a bitfield.
10635         (TYPE_RAW_ALIGN): New macro.
10636         (type_align, type_raw_align, set_type_align): Declare.
10637         * gdbtypes.c (type_align, type_raw_align, set_type_align): New
10638         functions.
10639         * dwarf2read.c (quirk_rust_enum): Set type alignment.
10640         (get_alignment, maybe_set_alignment): New functions.
10641         (read_structure_type, read_enumeration_type, read_array_type)
10642         (read_set_type, read_tag_pointer_type, read_tag_reference_type)
10643         (read_subrange_type, read_base_type): Set type alignment.
10644
10645 2018-04-30  Simon Marchi  <simon.marchi@ericsson.com>
10646
10647         * dwarf2read.c (read_index_from_section): Use bool.
10648
10649 2018-04-29  Fabian Groffen  <grobian@gentoo.org>
10650
10651         PR gdb/22950
10652         * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
10653         with #ifdef.
10654
10655 2018-04-29  John Reiser  <jreiser@BitWagon.com>
10656
10657         PR build/22873
10658         * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
10659         last step, and do it atomically.
10660
10661 2018-04-27  Alexandre Oliva  <aoliva@redhat.com>
10662
10663         * compile/compile-c-types.c (convert_int, convert_float):
10664         Update for C FE v1.
10665
10666 2018-04-27  Tom Tromey  <tom@tromey.com>
10667
10668         PR rust/22545:
10669         * rust-lang.c (rust_inclusive_range_type_p): New function.
10670         (rust_range): Handle inclusive ranges.
10671         (rust_compute_range): Likewise.
10672         * rust-exp.y (struct rust_op) <inclusive>: New field.
10673         (DOTDOTEQ): New constant.
10674         (range_expr): Add "..=" productions.
10675         (operator_tokens): Add "..=" token.
10676         (ast_range): Add "inclusive" parameter.
10677         (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
10678         ranges.
10679         * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
10680         bounds values.
10681         * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
10682         LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
10683         Update comments.
10684         * expprint.c (print_subexp_standard): Handle new bounds values.
10685         (dump_subexp_body_standard): Likewise.
10686
10687 2018-04-27  Tom Tromey  <tom@tromey.com>
10688
10689         * configure: Rebuild.
10690         * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
10691         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
10692         "OVERRIDE".
10693         (class symbol_needs_eval_context): Likewise.
10694         * dwarf2read.c (mock_mapped_index::symbol_name_count)
10695         (mock_mapped_index::symbol_name_at): Use "override".  Remove
10696         "virtual".
10697         * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
10698         "override".
10699         (class dwarf_expr_executor): Use "override", not "OVERRIDE".
10700         * aarch64-tdep.c (instruction_reader::read): Use "override".
10701         (instruction_reader_test::read): Likewise.
10702         * arm-tdep.c (instruction_reader::read): Use "override".
10703         (instruction_reader_thumb::read): Likewise.
10704
10705 2018-04-26  Andrzej Kaczmarek  <andrzej.kaczmarek@codecoup.pl>
10706
10707         PR remote/9665
10708         * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
10709         instead of remote_send.
10710         (remote_send): Remove.
10711
10712 2018-04-26  Pedro Alves  <palves@redhat.com>
10713
10714         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
10715         find_function_start_sal instead of find_pc_line.
10716
10717 2018-04-26  Pedro Alves  <palves@redhat.com>
10718
10719         * breakpoint.c (set_breakpoint_location_function): Handle
10720         mst_data_gnu_ifunc.
10721         * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
10722         * elfread.c (elf_symtab_read): Give data symbols with
10723         BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
10724         (elf_rel_plt_read): Update comment.
10725         * linespec.c (convert_linespec_to_sals): Handle
10726         mst_data_gnu_ifunc.
10727         (minsym_found): Handle mst_data_gnu_ifunc.
10728         * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
10729         (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
10730         * parse.c (find_minsym_type_and_address): Handle
10731         mst_data_gnu_ifunc.
10732         * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
10733         * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
10734         * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
10735         comment.
10736         <mst_data_gnu_ifunc>: New enumerator.
10737
10738 2018-04-26  Pedro Alves  <palves@redhat.com>
10739
10740         * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
10741         (lookup_minimal_symbol_by_pc_section): ... this.  Replace
10742         'want_trampoline' parameter by a lookup_msym_prefer parameter.
10743         Handle it.
10744         (lookup_minimal_symbol_by_pc_section): Delete old implementation.
10745         (lookup_minimal_symbol_by_pc): Adjust.
10746         (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
10747         (lookup_solib_trampoline_symbol_by_pc): Adjust.
10748         * minsyms.h (lookup_msym_prefer): New enum.
10749         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
10750         parameter by a lookup_msym_prefer parameter.
10751
10752 2018-04-26  Pedro Alves  <palves@redhat.com>
10753
10754         * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
10755         ends in "@plt" instead of looking at the symbol's section.
10756
10757 2018-04-26  Pedro Alves  <palves@redhat.com>
10758
10759         * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete.  Remove
10760         all references.
10761         (find_pc_partial_function_gnu_ifunc): Rename to ...
10762         (find_pc_partial_function): ... this, and remove references to
10763         'is_gnu_ifunc_p'.
10764         (find_pc_partial_function): Delete old implementation.
10765         * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
10766
10767 2018-04-26  Pedro Alves  <palves@redhat.com>
10768
10769         * linespec.c (struct bound_minimal_symbol_search_key): New.
10770         (convert_linespec_to_sals): Sort minimal symbols earlier.  Don't
10771         skip first line if we found a GNU ifunc minimal symbol by name.
10772         (compare_msymbols): Change parameters to work with a destructured
10773         lhs minsym.
10774         (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
10775         functions.
10776
10777 2018-04-26  Pedro Alves  <palves@redhat.com>
10778
10779         * breakpoint.c (set_breakpoint_location_function): Don't resolve
10780         ifunc targets here.  Instead, if we have an ifunc minsym, use its
10781         address/name.
10782         (add_location_to_breakpoint): Store the minsym and the objfile in
10783         the breakpoint location.
10784         * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
10785         * linespec.c (minsym_found): Resolve GNU ifunc targets here.
10786         Record the minsym in the sal.
10787         * symtab.h (symtab_and_line) <msymbol>: New field.
10788
10789 2018-04-26  Pedro Alves  <palves@redhat.com>
10790
10791         * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
10792         unless we actually resolved the ifunc.
10793
10794 2018-04-26  Pedro Alves  <palves@redhat.com>
10795
10796         * c-exp.y (variable production): Prefer ifunc minsyms over
10797         regular function symbols.
10798         * symtab.c (find_gnu_ifunc): New function.
10799         * minsyms.h (lookup_msym_prefer): New enum.
10800         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
10801         parameter by a lookup_msym_prefer parameter.
10802         * symtab.h (find_gnu_ifunc): New declaration.
10803
10804 2018-04-26  Pedro Alves  <palves@redhat.com>
10805
10806         * blockframe.c (find_gnu_ifunc_target_type): New function.
10807         (find_function_type): New.
10808         * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
10809         return a value with a memory address.
10810         (eval_call): For calls to GNU ifunc functions, try to find the
10811         type of the target function from the type that the resolver
10812         returns.
10813         * gdbtypes.c (objfile_type): Don't install a return type for ifunc
10814         symbols.
10815         * infcall.c (find_function_return_type): Delete.
10816         (find_function_addr): Add 'function_type' parameter.  For calls to
10817         GNU ifunc functions, try to find the type of the target function
10818         from the type that the resolver returns, and return it via
10819         FUNCTION_TYPE.
10820         (call_function_by_hand_dummy): Adjust to use the function type
10821         returned by find_function_addr.
10822         (find_function_addr): Add 'function_type' parameter and move
10823         description here.
10824         * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
10825         declarations.
10826
10827 2018-04-26  Pedro Alves  <palves@redhat.com>
10828
10829         * c-exp.y (variable production): Skip finding an alias for ifunc
10830         symbols.
10831
10832 2018-04-26  Pedro Alves  <palves@redhat.com>
10833
10834         * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
10835
10836 2018-04-25  Pedro Alves  <palves@redhat.com>
10837
10838         * infcmd.c (kill_command): Print the pid as string, not the whole
10839         thread's ptid.  Add comment.  s/has been killed/killed/ in output
10840         message.
10841         * remote.c (remote_detach_1): Print the pid as string, not the
10842         whole thread's ptid.
10843
10844 2018-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
10845             Sergio Durigan Junior  <sergiodj@redhat.com>
10846             Pedro Alves  <palves@redhat.com>
10847
10848         * infcmd.c (kill_command): Print message when inferior has
10849         been killed.
10850         * inferior.c (print_inferior_events): Remove 'static'.  Set as
10851         '1'.
10852         (add_inferior): Improve message printed when
10853         'print_inferior_events' is on.
10854         (exit_inferior): Remove message printed when
10855         'print_inferior_events' is on.
10856         (detach_inferior): Improve message printed when
10857         'print_inferior_events' is on.
10858         (initialize_inferiors): Use 'add_inferior_silent' to set
10859         'current_inferior_'.
10860         * inferior.h (print_inferior_events): Declare here as
10861         'extern'.
10862         * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
10863         '[Detaching...]' messages when 'print_inferior_events' is on.
10864         Use 'add_thread_silent' instead of 'add_thread'.  Add '[' and ']'
10865         as prefix/suffix for messages.  Remove periods.  Fix erroneous
10866         'Detaching after fork from child...', replace it by '... from
10867         parent...'.
10868         (handle_vfork_child_exec_or_exit): Add '[' and ']' as
10869         prefix/suffix when printing 'Detaching...' messages.  Print
10870         them when 'print_inferior_events' is on.
10871         * remote.c (remote_detach_1): Print message when detaching
10872         from inferior and '!is_fork_parent'.
10873
10874 2018-04-24  Tom Tromey  <tom@tromey.com>
10875
10876         * cli-out.h: Reindent.
10877
10878 2018-04-24  Tom Tromey  <tom@tromey.com>
10879
10880         * cli-out.c (cli_ui_out::out_field_fmt): Remove.
10881         (cli_ui_out::do_field_string): Use fputs_filtered.
10882         * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
10883
10884 2018-04-23  Tom Tromey  <tom@tromey.com>
10885
10886         * guile/scm-frame.c (gdbscm_frame_read_var): Use
10887         gdb::unique_xmalloc_ptr.
10888
10889 2018-04-23  Tom Tromey  <tom@tromey.com>
10890
10891         * configure: Rebuild.
10892
10893 2018-04-22  Rajendra SY  <rajendra.sy@gmail.com>
10894
10895         PR gdb/23095
10896         * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
10897         prepare_for_testing.  Set normal_bp to r_debug_state if target
10898         is bsd.
10899
10900 2018-04-21  Pedro Alves  <palves@redhat.com>
10901             Rajendra SY  <rajendra.sy@gmail.com>
10902
10903         * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
10904         * remote.c (extended_remote_attach): In all-stop mode, mark the
10905         thread as executing.
10906
10907 2018-04-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
10908
10909         * thread.c (thread_apply_all_command): Fix comment.
10910         (thread_command): Fix comment.
10911
10912 2018-04-10  Alan Hayward  <alan.hayward@arm.com>
10913
10914         * common/tdesc.h (tdesc_create_feature): Remove xml filename
10915         parameter.
10916         * features/aarch64-core.c (create_feature_aarch64_core):
10917         Regenerate.
10918         * features/aarch64-fpu.c (create_feature_aarch64_fpu):
10919         Likewise.
10920         * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
10921         Likewise.
10922         * features/i386/32bit-avx512.c
10923         (create_feature_i386_32bit_avx512): Likewise.
10924         * features/i386/32bit-core.c (create_feature_i386_32bit_core):
10925         Likewise.
10926         * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
10927         Likewise.
10928         * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
10929         Likewise.
10930         * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
10931         Likewise.
10932         * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
10933         Likewise.
10934         * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
10935         Likewise.
10936         * features/i386/64bit-avx512.c
10937         (create_feature_i386_64bit_avx512): Likewise.
10938         * features/i386/64bit-core.c (create_feature_i386_64bit_core):
10939         Likewise.
10940         * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
10941         Likewise.
10942         * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
10943         Likewise.
10944         * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
10945         Likewise.
10946         * features/i386/64bit-segments.c
10947         (create_feature_i386_64bit_segments): Likewise.
10948         * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
10949         Likewise.
10950         * features/i386/x32-core.c
10951         (create_feature_i386_x32_core): Likewise.
10952         * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
10953         * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
10954         * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
10955         * target-descriptions.c: In generated code, don't pass xml
10956         filename.
10957
10958 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
10959
10960         * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
10961         (print_xml_feature::visit_post): Likewise.
10962         (print_xml_feature::visit): Likewise.
10963         * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
10964         (print_xml_feature): Add new class.
10965         * regformats/regdat.sh: Null xmltarget on feature targets.
10966         * target-descriptions.c (struct target_desc): Add xmltarget.
10967         (maintenance_check_tdesc_xml_convert): Add unittest function.
10968         (tdesc_get_features_xml): Add function to get xml.
10969         (maintenance_check_xml_descriptions): Test xml generation.
10970         * xml-tdesc.c (string_read_description_xml): Add function.
10971         * xml-tdesc.h (string_read_description_xml): Add declaration.
10972
10973 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
10974
10975         * features/Makefile: Add feature marker to targets with new style
10976         target descriptions.
10977         * regformats/aarch64.dat: Regenerate.
10978         * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
10979         * regformats/i386/amd64-avx-linux.dat: Likewise.
10980         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
10981         * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
10982         * regformats/i386/amd64-linux.dat: Likewise.
10983         * regformats/i386/amd64-mpx-linux.dat: Likewise.
10984         * regformats/i386/amd64.dat: Likewise.
10985         * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
10986         * regformats/i386/i386-avx-linux.dat: Likewise.
10987         * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
10988         * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
10989         * regformats/i386/i386-linux.dat: Likewise.
10990         * regformats/i386/i386-mmx-linux.dat: Likewise.
10991         * regformats/i386/i386-mpx-linux.dat: Likewise.
10992         * regformats/i386/i386.dat: Likewise.
10993         * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
10994         * regformats/i386/x32-avx-linux.dat: Likewise.
10995         * regformats/i386/x32-linux.dat: Likewise.
10996         * regformats/tic6x-c62x-linux.dat: Likewise.
10997         * regformats/tic6x-c64x-linux.dat: Likewise.
10998         * regformats/tic6x-c64xp-linux.dat: Likewise.
10999         * regformats/regdat.sh: Parse feature marker.
11000
11001 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
11002
11003         * common/tdesc.h (tdesc_architecture_name): Add new declaration.
11004         (tdesc_osabi_name): Likewise.
11005         * target-descriptions.c (tdesc_architecture_name): Add new
11006         function.
11007         (tdesc_osabi_name): Likewise.
11008
11009 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
11010
11011         * common/tdesc.c (tdesc_predefined_type): Move to here.
11012         (tdesc_named_type): Likewise.
11013         (tdesc_create_vector): Likewise.
11014         (tdesc_create_struct): Likewise.
11015         (tdesc_set_struct_size): Likewise.
11016         (tdesc_create_union): Likewise.
11017         (tdesc_create_flags): Likewise.
11018         (tdesc_create_enum): Likewise.
11019         (tdesc_add_field): Likewise.
11020         (tdesc_add_typed_bitfield): Likewise.
11021         (tdesc_add_bitfield): Likewise.
11022         (tdesc_add_flag): Likewise.
11023         (tdesc_add_enum_value): Likewise.
11024         * common/tdesc.h (struct tdesc_type_builtin): Likewise.
11025         (struct tdesc_type_vector): Likewise.
11026         (struct tdesc_type_field): Likewise.
11027         (struct tdesc_type_with_fields): Likewise.
11028         (tdesc_create_enum): Add declaration.
11029         (tdesc_add_typed_bitfield): Likewise.
11030         (tdesc_add_enum_value): Likewise.
11031         * target-descriptions.c (tdesc_type_field): Move from here.
11032         (tdesc_type_builtin): Likewise.
11033         (tdesc_type_vector): Likewise.
11034         (tdesc_type_with_fields): Likewise.
11035         (tdesc_predefined_types): Likewise.
11036         (tdesc_named_type): Likewise.
11037         (tdesc_create_vector): Likewise.
11038         (tdesc_create_struct): Likewise.
11039         (tdesc_set_struct_size): Likewise.
11040         (tdesc_create_union): Likewise.
11041         (tdesc_create_flags): Likewise.
11042         (tdesc_create_enum): Likewise.
11043         (tdesc_add_field): Likewise.
11044         (tdesc_add_typed_bitfield): Likewise.
11045         (tdesc_add_bitfield): Likewise.
11046         (tdesc_add_flag): Likewise.
11047         (tdesc_add_enum_value): Likewise.
11048         * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
11049         (tdesc_add_typed_bitfield): Likewise.
11050         (tdesc_add_enum_value): Likewise.
11051
11052 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
11053
11054         * common/tdesc.c (tdesc_feature::accept): Move to here.
11055         (tdesc_feature::operator==): Likewise.
11056         (tdesc_create_reg): Likewise.
11057         * common/tdesc.h (tdesc_type_kind): Likewise.
11058         (struct tdesc_type): Likewise.
11059         (struct tdesc_feature): Likewise.
11060         * regformats/regdat.sh: Create a feature.
11061         * target-descriptions.c (tdesc_type_kind): Move from here.
11062         (tdesc_type): Likewise.
11063         (tdesc_type_up): Likewise.
11064         (tdesc_feature): Likewise.
11065         (tdesc_create_reg): Likewise.
11066
11067 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
11068
11069         * Makefile.in: Add arch/tdesc.c
11070         * common/tdesc.c: New file.
11071         * common/tdesc.h (tdesc_element_visitor): Move to here.
11072         (tdesc_element): Likewise.
11073         (tdesc_reg): Likewise.
11074         (tdesc_reg_up): Likewise.
11075         * regformats/regdef.h (reg): Add offset to constructors.
11076         * target-descriptions.c (tdesc_element_visitor): Move from here.
11077         (tdesc_element): Likewise.
11078         (tdesc_reg): Likewise.
11079         (tdesc_reg_up): Likewise.
11080
11081 2018-04-17  Tom Tromey  <tom@tromey.com>
11082
11083         * dwarf2read.c (quirk_rust_enum): Conditionally drop the
11084         discriminant field.
11085
11086 2018-04-17  Tom Tromey  <tom@tromey.com>
11087
11088         * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
11089
11090 2018-04-17  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11091
11092         * symtab.c (print_symbol_info): Skip printing filename and line
11093         number when `last' is NULL.
11094         (symtab_symbol_info): Use empty string instead of NULL for first
11095         invocation of print_symbol_info.
11096         (rbreak_command): Pass NULL to `last' parameter of
11097         print_symbol_info.
11098
11099 2018-04-16  Simon Marchi  <simon.marchi@ericsson.com>
11100
11101         * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
11102         instead of nullptr.
11103
11104 2018-04-16  Pedro Alves  <palves@redhat.com>
11105
11106         * MAINTAINERS (sh): Remove.
11107         * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
11108         (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
11109         (ALLDEPFILES): Remove sh64-tdep.c.
11110         * NEWS: Mentions that support for SH-5/SH64 is removed.
11111         * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
11112         (sh*-*-openbsd*): Ditto.
11113         (sh64-*-elf*): Remove.
11114         (sh*): Remove.
11115         * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
11116         * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
11117         * sh-tdep.c: No longer include "sh64-tdep.h".
11118         (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
11119         * sh64-tdep.c, sh64-tdep.h: Remove files.
11120
11121 2018-04-16  Pedro Alves  <palves@redhat.com>
11122
11123         * MAINTAINERS: Remove m88k.
11124         * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
11125         (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
11126         (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
11127         * NEWS: Mention that support for m88k was removed.
11128         * configure.host (m88*-*-*): Remove support.
11129         * configure.nat (m88k-*-*): Remove support.
11130         * configure.tgt (m88*-*-openbsd*): Remove.
11131         * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
11132
11133 2018-04-15  Simon Marchi  <simon.marchi@polymtl.ca>
11134
11135         * configure.tgt (x86_tobjs): New variable.
11136         (amd64_tobjs, i386_tobjs): Use it.
11137
11138 2018-04-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11139
11140         * symtab.c (print_symbol_info): Precede the symbol definition by
11141         the line number when available.
11142         * NEWS: Advertise this enhancement.
11143
11144 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
11145
11146         * NEWS (New options): announce set/show record btrace cpu.
11147         * btrace.c: Include record-btrace.h.
11148         (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
11149         the vendor is unknown.
11150         (btrace_compute_ftrace_1): Add cpu parameter.  Update callers.
11151         Maybe overwrite the btrace configuration's cpu.
11152         (btrace_compute_ftrace): Add cpu parameter.  Update callers.
11153         (btrace_fetch): Add cpu parameter.  Update callers.
11154         (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
11155         Maybe overwrite the btrace configuration's cpu.  Skip enabling
11156         errata workarounds if the vendor is unknown.
11157         * python/py-record-btrace.c: Include record-btrace.h.
11158         (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
11159         (recpy_bt_function_call_history): Call record_btrace_get_cpu.
11160         * record-btrace.c (record_btrace_cpu_state_kind): New.
11161         (record_btrace_cpu): New.
11162         (set_record_btrace_cpu_cmdlist): New.
11163         (record_btrace_get_cpu): New.
11164         (require_btrace_thread, record_btrace_info)
11165         (record_btrace_resume_thread): Call record_btrace_get_cpu.
11166         (cmd_set_record_btrace_cpu_none): New.
11167         (cmd_set_record_btrace_cpu_auto): New.
11168         (cmd_set_record_btrace_cpu): New.
11169         (cmd_show_record_btrace_cpu): New.
11170         (_initialize_record_btrace): Initialize set/show record btrace cpu
11171         commands.
11172         * record-btrace.h (record_btrace_get_cpu): New.
11173
11174 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
11175
11176         * record.c (set_record_command): Fix typo in message.
11177
11178 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
11179
11180         * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
11181
11182 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
11183
11184         * infrun.c (process_event_stop_test): Call
11185         gdbarch_in_indirect_branch_thunk.
11186         * gdbarch.sh (in_indirect_branch_thunk): New.
11187         * gdbarch.c: Regenerated.
11188         * gdbarch.h: Regenerated.
11189         * x86-tdep.h: New.
11190         * x86-tdep.c: New.
11191         * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
11192         (HFILES_NO_SRCDIR): Add x86-tdep.h.
11193         (ALLDEPFILES): Add x86-tdep.c.
11194         * arch-utils.h (default_in_indirect_branch_thunk): New.
11195         * arch-utils.c (default_in_indirect_branch_thunk): New.
11196         * i386-tdep: Include x86-tdep.h.
11197         (i386_in_indirect_branch_thunk): New.
11198         (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
11199         function.
11200         * amd64-tdep: Include x86-tdep.h.
11201         (amd64_in_indirect_branch_thunk): New.
11202         (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
11203
11204 2018-04-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
11205
11206         PR gdb/23053
11207         * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
11208         (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
11209         (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
11210         regression.
11211
11212 2018-04-12  Tom Tromey  <tom@tromey.com>
11213
11214         * rust-lang.c (rust_print_struct_def): Remove univariant code.
11215         (rust_evaluate_subexp): Likewise.
11216
11217 2018-04-12  Pedro Alves  <palves@redhat.com>
11218
11219         * procfs.c (procfs_detach): Make forward declaration's prototype
11220         match definition's protototype.
11221         (proc_get_LDT_entry): Remove stale do_cleanups call.
11222
11223 2018-04-12  Pedro Alves  <palves@redhat.com>
11224
11225         * target.h (target_ops::to_has_exited): Delete.
11226         (target_has_exited): Delete.
11227         * target-delegates.c: Regenerate.
11228
11229 2018-04-11  Pedro Alves  <palves@redhat.com>
11230
11231         * target.c (fileio_fh_t::t): Add comment.
11232         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
11233         (target_fileio_close): Handle a NULL target.
11234         (invalidate_fileio_fh): New.
11235         (target_close): Call it.
11236         * remote.c (remote_hostio_send_command): No longer check whether
11237         remote_desc is open.
11238
11239 2018-04-11  Pedro Alves  <palves@redhat.com>
11240
11241         * target.c (fileio_fh_t): Make it a named struct instead of a
11242         typedef.
11243         (fileio_fh_t::is_closed): New method.
11244         (DEF_VEC_O (fileio_fh_t)): Remove.
11245         (fileio_fhandles): Now a std::vector.
11246         (is_closed_fileio_fh): Delete.
11247         (acquire_fileio_fd): Adjust.  Rename parameters.
11248         (release_fileio_fd): Adjust.
11249         (fileio_fd_to_fh): Reimplement as a function instead of a macro.
11250         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
11251         (target_fileio_close): Adjust.
11252
11253 2018-04-10  Simon Marchi  <simon.marchi@ericsson.com>
11254
11255         * auto-load.c (auto_load_safe_path_vec_update): Iterate by
11256         index.
11257
11258 2018-04-10  Pedro Alves  <palves@redhat.com>
11259
11260         * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
11261         (scoped_finish_thread_state): New class.
11262         * infcmd.c (run_command_1): Use it instead of finish_thread_state
11263         cleanup.
11264         * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
11265         (fetch_inferior_event, normal_stop): Likewise.
11266         * thread.c (finish_thread_state_cleanup): Delete.
11267
11268 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11269             Pedro Alves  <palves@redhat.com>
11270
11271         * value.c: Include "selftest.h" and "common/array-view.h".
11272         (struct range) <operator ==>: New.
11273         (test_ranges_contain): New.
11274         (check_ranges_vector): New.
11275         (test_insert_into_bit_range_vector): New.
11276         (_initialize_values): Register selftests.
11277         * common/array-view.h (operator==, operator!=): New.
11278
11279 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11280
11281         * common/gdb_vecs.h (unordered_remove): Add overload that takes
11282         an iterator.
11283         * inline-frame.c: Include <algorithm>.
11284         (struct inline_state): Add constructor.
11285         (inline_state_s): Remove.
11286         (DEF_VEC_O(inline_state_s)): Remove.
11287         (inline_states): Change type to std::vector.
11288         (find_inline_frame_state): Adjust to std::vector.
11289         (allocate_inline_frame_state): Remove.
11290         (clear_inline_frame_state): Adjust to std::vector.
11291         (skip_inline_frames): Adjust to std::vector.
11292
11293 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11294
11295         * tracepoint.h (struct trace_state_variable): Add constructor.
11296         <name>: Change type to std::string.
11297         * tracepoint.c (tsv_s): Remove.
11298         (DEF_VEC_O(tsv_s)): Remove.
11299         (tvariables): Change to std::vector.
11300         (create_trace_state_variable): Adjust to std::vector.
11301         (find_trace_state_variable): Likewise.
11302         (find_trace_state_variable_by_number): Likewise.
11303         (delete_trace_state_variable): Likewise.
11304         (trace_variable_command): Adjust to std::string.
11305         (delete_trace_variable_command): Likewise.
11306         (tvariables_info_1): Adjust to std::vector.
11307         (save_trace_state_variables): Likewise.
11308         (start_tracing): Likewise.
11309         (merge_uploaded_trace_state_variables): Adjust to std::vector
11310         and std::string.
11311         * target.h (struct target_ops)
11312         <to_download_trace_state_variable>: Pass reference to
11313         trace_state_variable.
11314         * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
11315         * target-delegates.c: Re-generate.
11316         * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
11317         (mi_tsv_deleted): Likewise.
11318         * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
11319         * remote.c (remote_download_trace_state_variable): Change
11320         pointer to reference and adjust.
11321         * make-target-delegates (parse_argtypes): Handle references.
11322         (write_function_header): Likewise.
11323         (munge_type): Likewise.
11324
11325 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11326
11327         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11328         string_view-selftests.c.
11329         * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
11330         testsuite.
11331         * unittests/basic_string_view/cons/char/1.cc: Likewise.
11332         * unittests/basic_string_view/cons/char/2.cc: Likewise.
11333         * unittests/basic_string_view/cons/char/3.cc: Likewise.
11334         * unittests/basic_string_view/element_access/char/1.cc:
11335         Likewise.
11336         * unittests/basic_string_view/element_access/char/empty.cc:
11337         Likewise.
11338         * unittests/basic_string_view/element_access/char/front_back.cc:
11339         Likewise.
11340         * unittests/basic_string_view/inserters/char/2.cc: Likewise.
11341         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
11342         Likewise.
11343         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
11344         Likewise.
11345         * unittests/basic_string_view/modifiers/swap/char/1.cc:
11346         Likewise.
11347         * unittests/basic_string_view/operations/compare/char/1.cc:
11348         Likewise.
11349         * unittests/basic_string_view/operations/compare/char/13650.cc:
11350         Likewise.
11351         * unittests/basic_string_view/operations/copy/char/1.cc:
11352         Likewise.
11353         * unittests/basic_string_view/operations/data/char/1.cc:
11354         Likewise.
11355         * unittests/basic_string_view/operations/find/char/1.cc:
11356         Likewise.
11357         * unittests/basic_string_view/operations/find/char/2.cc:
11358         Likewise.
11359         * unittests/basic_string_view/operations/find/char/3.cc:
11360         Likewise.
11361         * unittests/basic_string_view/operations/find/char/4.cc:
11362         Likewise.
11363         * unittests/basic_string_view/operations/rfind/char/1.cc:
11364         Likewise.
11365         * unittests/basic_string_view/operations/rfind/char/2.cc:
11366         Likewise.
11367         * unittests/basic_string_view/operations/rfind/char/3.cc:
11368         Likewise.
11369         * unittests/basic_string_view/operations/substr/char/1.cc:
11370         Likewise.
11371         * unittests/basic_string_view/operators/char/2.cc: Likewise.
11372         * unittests/string_view-selftests.c: New file.
11373
11374 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11375
11376         * unittests/basic_string_view/capacity/1.cc: New file.
11377         * unittests/basic_string_view/capacity/empty_neg.cc: New file.
11378         * unittests/basic_string_view/cons/char/1.cc: New file.
11379         * unittests/basic_string_view/cons/char/2.cc: New file.
11380         * unittests/basic_string_view/cons/char/3.cc: New file.
11381         * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
11382         * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
11383         * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
11384         * unittests/basic_string_view/element_access/char/1.cc: New file.
11385         * unittests/basic_string_view/element_access/char/2.cc: New file.
11386         * unittests/basic_string_view/element_access/char/empty.cc: New file.
11387         * unittests/basic_string_view/element_access/char/front_back.cc: New file.
11388         * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
11389         * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
11390         * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
11391         * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
11392         * unittests/basic_string_view/include.cc: New file.
11393         * unittests/basic_string_view/inserters/char/1.cc: New file.
11394         * unittests/basic_string_view/inserters/char/2.cc: New file.
11395         * unittests/basic_string_view/inserters/char/3.cc: New file.
11396         * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
11397         * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
11398         * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
11399         * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
11400         * unittests/basic_string_view/literals/types.cc: New file.
11401         * unittests/basic_string_view/literals/values.cc: New file.
11402         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
11403         * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
11404         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
11405         * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
11406         * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
11407         * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
11408         * unittests/basic_string_view/operations/compare/char/1.cc: New file.
11409         * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
11410         * unittests/basic_string_view/operations/compare/char/2.cc: New file.
11411         * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
11412         * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
11413         * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
11414         * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
11415         * unittests/basic_string_view/operations/copy/char/1.cc: New file.
11416         * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
11417         * unittests/basic_string_view/operations/data/char/1.cc: New file.
11418         * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
11419         * unittests/basic_string_view/operations/find/char/1.cc: New file.
11420         * unittests/basic_string_view/operations/find/char/2.cc: New file.
11421         * unittests/basic_string_view/operations/find/char/3.cc: New file.
11422         * unittests/basic_string_view/operations/find/char/4.cc: New file.
11423         * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
11424         * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
11425         * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
11426         * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
11427         * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
11428         * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
11429         * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
11430         * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
11431         * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
11432         * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
11433         * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
11434         * unittests/basic_string_view/operations/substr/char/1.cc: New file.
11435         * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
11436         * unittests/basic_string_view/operators/char/2.cc: New file.
11437         * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
11438         * unittests/basic_string_view/range_access/char/1.cc: New file.
11439         * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
11440         * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
11441         * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
11442         * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
11443         * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
11444         * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
11445         * unittests/basic_string_view/requirements/typedefs.cc: New file.
11446         * unittests/basic_string_view/typedefs.cc: New file.
11447         * unittests/basic_string_view/types/1.cc: New file.
11448
11449 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11450
11451         * common/gdb_string_view.h: Remove libstdc++ implementation
11452         details, adjust to gdb reality.
11453         * common/gdb_string_view.tcc: Likewise.
11454         * cli/cli-script.c (struct string_view): Remove.
11455         (user_args) <m_args>: Change element type to gdb::string_view.
11456         (user_args::insert_args): Adjust.
11457
11458 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11459
11460         * common/gdb_string_view.h: New file.
11461         * common/gdb_string_view.tcc: New file.
11462
11463 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11464
11465         * ax_cxx_compile_stdcxx.m4: Sync with upstream.
11466         * configure: Re-generate.
11467
11468 2018-04-09  Pedro Alves  <palves@redhat.com>
11469
11470         * gdbarch.sh: Include "observable.h" instead of "observer.h".
11471         (set_target_gdbarch): Call
11472         gdb::observers::architecture_changed.notify instead of
11473         observer_notify_architecture_changed.
11474
11475 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11476
11477         * tracepoint.c (struct current_traceframe_cleanup): Remove.
11478         (do_restore_current_traceframe_cleanup): Remove.
11479         (restore_current_traceframe_cleanup_dtor): Remove.
11480         (make_cleanup_restore_current_traceframe): Remove.
11481         (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
11482         New.
11483         * tracepoint.h (struct scoped_restore_current_traceframe): New.
11484         * infrun.c (fetch_inferior_event): Use
11485         scoped_restore_current_traceframe.
11486
11487 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11488
11489         * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
11490         Remove.
11491         <n_allocated_type_units>: Remove.
11492         <all_type_units>: Change to std::vector.
11493         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
11494         to std::vector change.
11495         (dwarf2_per_objfile::get_cutu): Likewise.
11496         (dwarf2_per_objfile::get_tu): Likewise.
11497         (create_signatured_type_table_from_index): Likewise.
11498         (create_signatured_type_table_from_debug_names): Likewise.
11499         (dw2_symtab_iter_next): Likewise.
11500         (dw2_print_stats): Likewise.
11501         (dw2_expand_all_symtabs): Likewise.
11502         (dw2_expand_marked_cus): Likewise.
11503         (dw2_debug_names_iterator::next): Likewise.
11504         (dwarf2_initialize_objfile): Likewise.
11505         (add_signatured_type_cu_to_table): Likewise.
11506         (create_all_type_units): Likewise.
11507         (add_type_unit): Likewise.
11508         (struct tu_abbrev_offset): Add constructor.
11509         (build_type_psymtabs_1): Adjust to std::vector change.
11510         (print_tu_stats): Likewise.
11511         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
11512         (write_debug_names): Likewise.
11513
11514 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11515
11516         * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
11517         Make an std::vector.
11518         <n_comp_units>: Remove.
11519         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
11520         to std::vector change.
11521         (dwarf2_per_objfile::get_cutu): Likewise.
11522         (dwarf2_per_objfile::get_cu): Likewise.
11523         (create_cus_from_index): Likewise.
11524         (create_addrmap_from_index): Likewise.
11525         (create_addrmap_from_aranges): Likewise.
11526         (dwarf2_read_index): Likewise.
11527         (dw2_find_last_source_symtab): Likewise.
11528         (dw2_map_symtabs_matching_filename): Likewise.
11529         (dw2_symtab_iter_next): Likewise.
11530         (dw2_print_stats): Likewise.
11531         (dw2_expand_all_symtabs): Likewise.
11532         (dw2_expand_symtabs_with_fullname): Likewise.
11533         (dw2_expand_marked_cus): Likewise.
11534         (dw2_map_symbol_filenames): Likewise.
11535         (create_cus_from_debug_names): Likewise.
11536         (dwarf2_read_debug_names): Likewise.
11537         (dw2_debug_names_iterator::next): Likewise.
11538         (dwarf2_initialize_objfile): Likewise.
11539         (set_partial_user): Likewise.
11540         (dwarf2_build_psymtabs_hard): Likewise.
11541         (read_comp_units_from_section): Remove arguments, adjust to
11542         std::vector change.
11543         (create_all_comp_units): Adjust to std::vector and
11544         read_comp_units_from_section changes.
11545         (dwarf2_find_containing_comp_unit): Adjust to std::vector
11546         change.
11547         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
11548         (psyms_seen_size): Likewise.
11549         (write_gdbindex): Likewise.
11550         (write_debug_names): Likewise.
11551
11552 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11553
11554         * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
11555         with dwarf2_per_objfile.
11556         (create_cus_from_index): Likewise.
11557         (create_signatured_type_table_from_index): Likewise.
11558         (dwarf2_read_index): Likewise.
11559         (dwarf2_initialize_objfile): Likewise.
11560         (dwarf2_fetch_die_loc_sect_off):  Get dwarf2_per_objfile from
11561         per_cu rather than get_dwarf2_per_objfile.
11562
11563 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11564
11565         * dwarf2read.h (struct signatured_type): Forward declare.
11566         (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
11567         New methods.
11568         * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
11569         (dw2_get_cutu): ...this.
11570         (dwarf2_per_objfile::get_cu): Rename from...
11571         (dw2_get_cu): ...this.
11572         (dwarf2_per_objfile::get_tu): New.
11573         (create_addrmap_from_index): Adjust.
11574         (create_addrmap_from_aranges): Adjust.
11575         (dw2_find_last_source_symtab): Adjust.
11576         (dw2_map_symtabs_matching_filename): Adjust.
11577         (dw2_symtab_iter_next): Adjust.
11578         (dw2_print_stats): Adjust.
11579         (dw2_expand_all_symtabs): Adjust.
11580         (dw2_expand_symtabs_with_fullname): Adjust.
11581         (dw2_expand_marked_cus): Adjust.
11582         (dw_expand_symtabs_matching_file_matcher): Adjust.
11583         (dw2_map_symbol_filenames): Adjust.
11584         (dw2_debug_names_iterator::next): Adjust.
11585         (dwarf2_initialize_objfile): Adjust.
11586         (set_partial_user): Adjust.
11587         (dwarf2_build_psymtabs_hard): Adjust.
11588
11589 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11590
11591         * dwarf2read.c (create_signatured_type_table_from_debug_names):
11592         Remove unused variables.
11593         (dw2_map_symtabs_matching_filename): Likewise.
11594         (dwarf2_record_block_ranges): Likewise.
11595         (dwarf2_read_addr_index): Likewise.
11596         (follow_die_offset): Likewise.
11597
11598 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11599
11600         * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
11601         to symbol_file_add_main.
11602
11603 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11604
11605         PR mi/22299
11606         * mi/mi-console.c (do_fputc_async_safe): New.
11607         (mi_console_file::write_async_safe): New.
11608         (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
11609         * mi/mi-console.h (class mi_console_file) <write_async_safe>:
11610         New.
11611         * ui-file.c (ui_file::putstrn): Adjust call to
11612         fputstrn_unfiltered.
11613         * utils.c (printchar): Replace do_fputs and do_fprintf
11614         parameters by do_fputc.
11615         (fputstr_filtered): Adjust call to printchar.
11616         (fputstr_unfiltered): Likewise.
11617         (fputstrn_filtered): Likewise.
11618         (fputstrn_unfiltered): Add do_fputc parameter, pass to
11619         printchar.
11620         * utils.h (do_fputc_ftype): New typedef.
11621         (fputstrn_unfiltered): Add do_fputc parameter.
11622
11623 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11624
11625         * regformats/i386/i386-avx.dat: Remove.
11626
11627 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
11628
11629         PR gdb/22979
11630         * amd64-tdep.c (amd64_none_init_abi): New function.
11631         (amd64_x32_none_init_abi): New function.
11632         (_initialize_amd64_tdep): Register handlers for x86-64 and
11633         x64_32 with GDB_OSABI_NONE.
11634         * osabi.c (gdbarch_init_osabi): Allow running handlers for the
11635         GDB_OSABI_NONE osabi.
11636
11637 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
11638
11639         PR gdb/22980
11640         * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
11641         GDB_OSABI_NONE.
11642         * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
11643         * osabi.c (gdb_osabi_names): Add "unknown" entry.
11644
11645 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
11646
11647         * common/byte-vector.h (char_vector): New type.
11648         * target.h (target_read_alloc): Return
11649         gdb::optional<byte_vector>.
11650         (target_read_stralloc): Return gdb::optional<char_vector>.
11651         (target_get_osdata): Return gdb::optional<char_vector>.
11652         * target.c (target_read_alloc_1): Templatize.  Replacement
11653         manual memory management with vector.
11654         (target_read_alloc): Change return type, adjust.
11655         (target_read_stralloc): Change return type, adjust.
11656         (target_get_osdata): Change return type, adjust.
11657         * auxv.c (struct auxv_info) <length>: Remove.
11658         <data>: Change type to gdb::optional<byte_vector>.
11659         (auxv_inferior_data_cleanup): Free auxv_info with delete.
11660         (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
11661         (target_auxv_search): Adjust.
11662         (fprint_target_auxv): Adjust.
11663         * avr-tdep.c (avr_io_reg_read_command): Adjust.
11664         * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
11665         (linux_make_corefile_notes): Adjust.
11666         * osdata.c (get_osdata): Adjust.
11667         * remote.c (remote_get_threads_with_qxfer): Adjust.
11668         (remote_memory_map): Adjust.
11669         (remote_traceframe_info): Adjust.
11670         (btrace_read_config): Adjust.
11671         (remote_read_btrace): Adjust.
11672         (remote_pid_to_exec_file): Adjust.
11673         * solib-aix.c (solib_aix_get_library_list): Adjust.
11674         * solib-dsbt.c (decode_loadmap): Don't free buf.
11675         (dsbt_get_initial_loadmaps): Adjust.
11676         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
11677         * solib-target.c (solib_target_current_sos): Adjust.
11678         * tracepoint.c (sdata_make_value): Adjust.
11679         * xml-support.c (xinclude_start_include): Adjust.
11680         (xml_fetch_content_from_file): Adjust.
11681         * xml-support.h (xml_fetch_another): Change return type.
11682         (xml_fetch_content_from_file): Change return type.
11683         * xml-syscall.c (xml_init_syscalls_info): Adjust.
11684         * xml-tdesc.c (file_read_description_xml): Adjust.
11685         (fetch_available_features_from_target): Change return type.
11686         (target_fetch_description_xml): Adjust.
11687         (target_read_description_xml): Adjust.
11688
11689 2018-04-06  Tom Tromey  <tom@tromey.com>
11690
11691         * value.c (~value): Update.
11692         (struct value) <contents>: Now unique_xmalloc_ptr.
11693         (value_contents_bits_eq, allocate_value_contents)
11694         (value_contents_raw, value_contents_all_raw)
11695         (value_contents_for_printing, value_contents_for_printing_const)
11696         (set_value_enclosing_type): Update.
11697
11698 2018-04-06  Tom Tromey  <tom@tromey.com>
11699
11700         * value.c (range_s): Remove typedef, VEC.
11701         (struct range): Add operator<.
11702         (range_lessthan): Remove.
11703         (ranges_contain): Change type.
11704         (~value): Update.
11705         (struct value) <unavailable, optimized_out>: Now std::vector.
11706         (value_entirely_available)
11707         (value_entirely_covered_by_range_vector)
11708         (value_entirely_unavailable, value_entirely_optimized_out):
11709         Update.
11710         (insert_into_bit_range_vector): Change argument type.
11711         (find_first_range_overlap): Likewise.
11712         (struct ranges_and_idx, value_contents_bits_eq)
11713         (require_not_optimized_out, require_available): Update.
11714         (ranges_copy_adjusted): Change argument types.
11715         (value_optimized_out, value_copy, value_fetch_lazy): Update.
11716
11717 2018-04-06  Tom Tromey  <tom@tromey.com>
11718
11719         * value.c (~value): Update.
11720         (struct value) <parent>: Now a value_ref_ptr.
11721         (value_parent, set_value_parent, value_address, value_copy):
11722         Update.
11723
11724 2018-04-06  Tom Tromey  <tom@tromey.com>
11725
11726         * value.c (struct value): Add constructor, destructor, and member
11727         initializers.
11728         (allocate_value_lazy, value_decref): Update.
11729
11730 2018-04-06  Tom Tromey  <tom@tromey.com>
11731
11732         * value.c (struct value) <released, next>: Remove.
11733         (all_values): Now a std::vector.
11734         (allocate_value_lazy): Update.
11735         (value_next): Remove.
11736         (value_mark, value_free_to_mark, release_value)
11737         (value_release_to_mark): Update.
11738
11739 2018-04-06  Tom Tromey  <tom@tromey.com>
11740
11741         * value.h (fetch_subexp_value, value_release_to_mark): Update.
11742         (free_value_chain): Remove.
11743         * value.c (free_value_chain): Remove.
11744         (value_release_to_mark): Return a std::vector.
11745         * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
11746         std::vector.
11747         (check_condition): Update.
11748         * eval.c (fetch_subexp_value): Change "val_chain" to a
11749         std::vector.
11750         * breakpoint.c (update_watchpoint): Update.
11751         (can_use_hardware_watchpoint): Change "vals" to a std::vector.
11752
11753 2018-04-06  Tom Tromey  <tom@tromey.com>
11754
11755         * value.h (free_all_values): Remove.
11756         * value.c (free_all_values): Remove.
11757
11758 2018-04-06  Tom Tromey  <tom@tromey.com>
11759
11760         * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
11761         (value_history_chain, value_history_count): Remove.
11762         (value_history): New global.
11763         (record_latest_value, access_value_history, show_values)
11764         (preserve_values): Update.
11765
11766 2018-04-06  Tom Tromey  <tom@tromey.com>
11767
11768         * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
11769         * varobj.c (varobj_set_display_format, varobj_set_value)
11770         (install_default_visualizer, construct_visualizer)
11771         (install_new_value, ~varobj, varobj_get_value_type)
11772         (my_value_of_variable, varobj_editable_p): Update.
11773         * c-varobj.c (c_describe_child, c_value_of_variable)
11774         (cplus_number_of_children, cplus_describe_child): Update.
11775         * ada-varobj.c (ada_number_of_children, ada_name_of_child)
11776         (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
11777         (ada_value_of_variable, ada_value_is_changeable_p): Update.
11778
11779 2018-04-06  Tom Tromey  <tom@tromey.com>
11780
11781         * printcmd.c (last_examine_address): Change type to
11782         value_ref_ptr.
11783         (do_examine, x_command): Update.
11784
11785 2018-04-06  Tom Tromey  <tom@tromey.com>
11786
11787         * value.c (release_value): Update.
11788         * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
11789         (struct bpstats) <val>: Now a value_ref_ptr.
11790         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
11791         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
11792         (~watchpoint, print_it_watchpoint, watch_command_1)
11793         (invalidate_bp_value_on_memory_change): Update.
11794
11795 2018-04-06  Tom Tromey  <tom@tromey.com>
11796
11797         * varobj.c (varobj_clear_saved_item)
11798         (update_dynamic_varobj_children, install_new_value, ~varobj):
11799         Update.
11800         * value.h (value_incref): Move declaration earlier.
11801         (value_decref): Rename from value_free.
11802         (struct value_ref_policy): New.
11803         (value_ref_ptr): New typedef.
11804         (struct value_deleter): Remove.
11805         (gdb_value_up): Remove typedef.
11806         (release_value): Change return type.
11807         (release_value_or_incref): Remove.
11808         * value.c (set_value_parent): Update.
11809         (value_incref): Change return type.
11810         (value_decref): Rename from value_free.
11811         (value_free_to_mark, free_all_values, free_value_chain): Update.
11812         (release_value): Return value_ref_ptr.
11813         (release_value_or_incref): Remove.
11814         (record_latest_value, set_internalvar, clear_internalvar):
11815         Update.
11816         * stack.c (info_frame_command): Don't call value_free.
11817         * python/py-value.c (valpy_dealloc, valpy_new)
11818         (value_to_value_object): Update.
11819         * printcmd.c (do_examine): Update.
11820         * opencl-lang.c (lval_func_free_closure): Update.
11821         * mi/mi-main.c (register_changed_p): Don't call value_free.
11822         * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
11823         * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
11824         * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
11825         value_free.
11826         * guile/scm-value.c (vlscm_free_value_smob)
11827         (vlscm_scm_from_value): Update.
11828         * frame.c (frame_register_unwind, frame_unwind_register_signed)
11829         (frame_unwind_register_unsigned, get_frame_register_bytes)
11830         (put_frame_register_bytes): Don't call value_free.
11831         * findvar.c (address_from_register): Don't call value_free.
11832         * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
11833         * dwarf2loc.c (entry_data_value_free_closure)
11834         (value_of_dwarf_reg_entry, free_pieced_value_closure)
11835         (dwarf2_evaluate_loc_desc_full): Update.
11836         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
11837         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
11838         (~watchpoint, watch_command_1)
11839         (invalidate_bp_value_on_memory_change): Update.
11840         * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
11841
11842 2018-04-06  Simon Marchi  <simon.marchi@polymtl.ca>
11843
11844         PR gdb/23022
11845         * warning.m4: Add -Wno-error=deprecated-register.
11846         * configure: Re-generate.
11847
11848 2018-04-05  Tom Tromey  <tom@tromey.com>
11849
11850         * linespec.h: Remove include of "vec.h".
11851
11852 2018-04-05  Tom Tromey  <tom@tromey.com>
11853
11854         * linespec.c (typep): Remove typedef.
11855         (find_methods, find_superclass_methods): Take a std::vector.
11856         (find_method): Use std::vector.
11857
11858 2018-04-05  Tom Tromey  <tom@tromey.com>
11859
11860         * utils.c (compare_strings): Remove.
11861         * utils.h (compare_strings): Remove.
11862         * objc-lang.h (find_imps): Update.
11863         * objc-lang.c (find_methods): Take a std::vector.
11864         (uniquify_strings, find_imps): Likewise.
11865         * linespec.c (find_methods): Take a std::vector.
11866         (decode_objc): Use std::vector.
11867         (add_all_symbol_names_from_pspace, find_superclass_methods): Take
11868         a std::vector.
11869         (find_method, find_function_symbols): Use std::vector.
11870
11871 2018-04-05  Tom Tromey  <tom@tromey.com>
11872
11873         * completer.c (completion_tracker::completion_tracker): Remove
11874         cast.
11875         (completion_tracker::discard_completions): Likewise.
11876         * breakpoint.c (ambiguous_names_p): Remove cast.
11877         * ada-lang.c (_initialize_ada_language): Remove cast.
11878         * utils.h (streq): Update.
11879         (streq_hash): Add new declaration.
11880         * utils.c (streq): Return bool.
11881         (streq_hash): New function.
11882
11883 2018-04-05  Tom Tromey  <tom@tromey.com>
11884
11885         * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
11886         Remove a string copy.
11887
11888 2018-04-05  Tom Tromey  <tom@tromey.com>
11889
11890         * linespec.c (filter_results): Use std::vector.
11891         (decode_line_2, decode_line_full): Update.
11892
11893 2018-04-05  Tom Tromey  <tom@tromey.com>
11894
11895         * linespec.c (canonical_to_fullform): Return std::string.
11896         (filter_results): Update.
11897         (struct decode_line_2_item): Add constructor.
11898         <fullform, displayform>: Now std::string.
11899         (decode_line_2_compare_items): Now a std::sort comparator.
11900         (decode_line_2): Update.
11901
11902 2018-04-05  Tom Tromey  <tom@tromey.com>
11903
11904         * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
11905         (unexpected_linespec_error): Update.
11906         (linespec_parse_basic, parse_linespec): Update.
11907
11908 2018-04-05  Tom Tromey  <tom@tromey.com>
11909
11910         * linespec.c (linespec_parse_basic): Reindent.
11911
11912 2018-04-05  Tom Tromey  <tom@tromey.com>
11913
11914         * minsyms.h (iterate_over_minimal_symbols): Update.
11915         * minsyms.c (iterate_over_minimal_symbols): Take a
11916         gdb::function_view.
11917         * linespec.c (struct collect_minsyms): Remove.
11918         (compare_msyms): Now a std::sort comparator.
11919         (add_minsym): Add parameters.
11920         (search_minsyms_for_name): Update.  Use std::vector.
11921
11922 2018-04-03  Tom Tromey  <tom@tromey.com>
11923
11924         * mipsread.c (read_alphacoff_dynamic_symtab): Use
11925         gdb::byte_vector.
11926
11927 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
11928
11929         * MAINTAINERS (Write After Approval): Add Weimin Pan.
11930
11931 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
11932
11933         PR gdb/16959
11934         * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when 
11935         printing static type.
11936
11937 2018-04-01  Tom Tromey  <tom@tromey.com>
11938
11939         * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
11940         (rs6000_xfer_shared_libraries): Update.
11941
11942 2018-04-01  Simon Marchi  <simon.marchi@polymtl.ca>
11943
11944         * common/gdb_vecs.h (char_ptr): Remove.
11945         * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
11946
11947 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
11948
11949         * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
11950         with std::vector.
11951         * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
11952
11953 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
11954
11955         * tracepoint.h (struct uploaded_tp): Initialize fields.
11956         <actions, step_actions, cmd_strings>: Change type to
11957         std::vector<char *>.
11958         * tracepoint.c (get_uploaded_tp): Allocate with new.
11959         (free_uploaded_tps): Free with delete.
11960         (parse_tracepoint_definition): Adjust to std::vector change.
11961         * breakpoint.c (read_uploaded_action): Likewise.
11962         (create_tracepoint_from_upload): Likewise.
11963         * ctf.c (ctf_write_uploaded_tp): Likewise.
11964         (SET_ARRAY_FIELD): Likewise.
11965         * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
11966
11967 2018-03-30  Tom Tromey  <tom@tromey.com>
11968
11969         * solib-svr4.c (lm_info_read): Use gdb::byte_vector.  Return
11970         std::unique_ptr.
11971         (svr4_keep_data_in_core): Update.
11972         (svr4_read_so_list): Update.
11973
11974 2018-03-30  Tom Tromey  <tom@tromey.com>
11975
11976         * windows-nat.c (handle_output_debug_string, handle_exception):
11977         Update.
11978         * target.h (target_read_string): Update.
11979         * target.c (target_read_string): Change "string" to
11980         unique_xmalloc_ptr.
11981         * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
11982         Update.
11983         * solib-frv.c (frv_current_sos): Update.
11984         * solib-dsbt.c (dsbt_current_sos): Update.
11985         * solib-darwin.c (darwin_current_sos): Update.
11986         * linux-thread-db.c (inferior_has_bug): Update.
11987         * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
11988         Update.  Remove alloca.
11989         * ada-lang.c (ada_main_name): Update.
11990
11991 2018-03-30  Tom Tromey  <tom@tromey.com>
11992
11993         * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
11994         (struct dwo_file_deleter): New.
11995         (dwo_file_up): New typedef.
11996         (open_and_init_dwo_file): Use dwo_file_up.
11997         (free_dwo_file_cleanup): Remove.
11998
11999 2018-03-30  Tom Tromey  <tom@tromey.com>
12000
12001         * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
12002         (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
12003
12004 2018-03-30  Tom Tromey  <tom@tromey.com>
12005
12006         * dwarf2read.c (class free_cached_comp_units): New class.
12007         (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
12008         (free_cached_comp_units): Remove function.
12009
12010 2018-03-30  Tom Tromey  <tom@tromey.com>
12011
12012         * utils.h (make_cleanup_unpush_target): Remove.
12013         * inf-ptrace.c (struct target_unpusher): New.
12014         (target_unpush_up) New typedef.
12015         (inf_ptrace_create_inferior, inf_ptrace_attach): Use
12016         target_unpush_up.
12017         * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
12018
12019 2018-03-27  Tom Tromey  <tom@tromey.com>
12020
12021         * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
12022
12023 2018-03-27  Pedro Alves  <palves@redhat.com>
12024             Tom Tromey  <tom@tromey.com>
12025
12026         * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
12027         destructor.  Now a class.
12028         (gdb_readline_wrapper_cleanup): Remove function.
12029         (gdb_readline_wrapper): Remove cleanups.
12030
12031 2018-03-27  Tom Tromey  <tom@tromey.com>
12032
12033         * typeprint.h (struct type_print_options) <local_typedefs,
12034         global_typedefs>: Remove "struct" keyword.
12035         (class typedef_hash_table): New class.
12036         (recursively_update_typedef_hash, add_template_parameters)
12037         (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
12038         (find_typedef_in_hash): Don't declare.
12039         * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
12040         (typedef_hash_table::recursively_update): Rename from
12041         recursively_update_typedef_hash.  Now a member.
12042         (typedef_hash_table::add_template_parameters): Rename from
12043         add_template_parameters.  Now a member.
12044         (typedef_hash_table::typedef_hash_table): Now a constructor;
12045         rename from create_typedef_hash.
12046         (typedef_hash_table::~typedef_hash_table): Now a destructor;
12047         rename from free_typedef_hash.
12048         (do_free_typedef_hash, make_cleanup_free_typedef_hash)
12049         (do_free_global_table): Remove.
12050         (typedef_hash_table::typedef_hash_table): New constructor; renamed
12051         from copy_type_recursive.
12052         (create_global_typedef_table): Remove.
12053         (typedef_hash_table::find_global_typedef): Now a member of
12054         typedef_hash_table.
12055         (typedef_hash_table::find_typedef): Rename from
12056         find_typedef_in_hash; now a member.
12057         (whatis_exp): Update.
12058         * extension.h (struct ext_lang_type_printers): Add constructor and
12059         destructor.
12060         (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
12061         declare.
12062         * extension.c (ext_lang_type_printers::ext_lang_type_printers):
12063         Now a constructor; rename from start_ext_lang_type_printers.
12064         (ext_lang_type_printers): Now a destructor; rename from
12065         free_ext_lang_type_printers.
12066         * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
12067         Update.
12068         (c_type_print_base_struct_union): Update.  Remove cleanups.
12069
12070 2018-03-27  Tom Tromey  <tom@tromey.com>
12071
12072         * dwarf-index-write.c: Include <cmath>.
12073
12074 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
12075
12076         * NEWS: Add entry describing new "set|show varsize-limit" command.
12077         * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
12078         command.
12079         * printcmd.c (_initialize_printcmd): Add "set var" alias of
12080         "set variable".
12081
12082 2018-03-27  Simon Marchi  <simon.marchi@ericsson.com>
12083
12084         * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
12085         dwarf-index-write.c
12086         (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
12087         * dwarf-index-common.c: New file.
12088         * dwarf-index-common.h: New file.
12089         * dwarf-index-write.c: New file.
12090         * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
12091         (struct dwarf2_section_info): Move from here.
12092         (dwarf2_section_info_def): Likewise.
12093         (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
12094         (offset_type): Likewise.
12095         (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
12096         (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
12097         (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
12098         (byte_swap): Likewise.
12099         (MAYBE_SWAP): Likewise.
12100         (dwarf2_per_cu_ptr): Likewise.
12101         (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
12102         (struct tu_stats): Likewise.
12103         (struct dwarf2_per_objfile): Likewise.
12104         (struct dwarf2_per_cu_data): Likewise.
12105         (struct signatured_type): Likewise.
12106         (sig_type_ptr): Likewise.
12107         (DEF_VEC_P (sig_type_ptr)): Likewise.
12108         (INDEX4_SUFFIX): Likewise.
12109         (INDEX5_SUFFIX): Likewise.
12110         (DEBUG_STR_SUFFIX): Likewise.
12111         (dwarf2_read_section): Make non-static.
12112         (mapped_index_string_hash): Move from here.
12113         (dwarf5_djb_hash): Likewise.
12114         (file_write): Likewise.
12115         (class data_buf): Likewise.
12116         (struct symtab_index_entry): Likewise.
12117         (struct mapped_symtab): Likewise.
12118         (find_slot): Likewise.
12119         (hash_expand): Likewise.
12120         (add_index_entry): Likewise.
12121         (uniquify_cu_indices): Likewise.
12122         (class c_str_view): Likewise.
12123         (class c_str_view_hasher): Likewise.
12124         (class vector_hasher): Likewise.
12125         (write_hash_table): Likewise.
12126         (psym_index_map): Likewise.
12127         (struct addrmap_index_data): Likewise.
12128         (add_address_entry): Likewise.
12129         (add_address_entry_worker): Likewise.
12130         (write_address_map): Likewise.
12131         (symbol_kind): Likewise.
12132         (write_psymbols): Likewise.
12133         (struct signatured_type_index_data): Likewise.
12134         (write_one_signatured_type): Likewise.
12135         (recursively_count_psymbols): Likewise.
12136         (recursively_write_psymbols): Likewise.
12137         (class debug_names): Likewise.
12138         (check_dwarf64_offsets): Likewise.
12139         (psyms_seen_size): Likewise.
12140         (write_gdbindex): Likewise.
12141         (write_debug_names): Likewise.
12142         (assert_file_size): Likewise.
12143         (write_psymtabs_to_index): Likewise.
12144         (save_gdb_index_command): Likewise.
12145         (_initialize_dwarf2_read): Don't register the "save gdb-index"
12146         command.
12147         * dwarf2read.h: New file.
12148
12149 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
12150
12151         PR gdb/22670
12152         * dwarf2read.c (dwarf2_physname): Do not return the demangled
12153         symbol name if the CU's language stores symbol names in linkage
12154         format.
12155         * language.h (struct language_defn)
12156         <la_store_sym_names_in_linkage_form_p>: New field.  Adjust
12157         all instances of this struct.
12158
12159 2018-03-26  Tom Tromey  <tom@tromey.com>
12160
12161         * stack.c (backtrace_command_1): Remove verbose code.
12162
12163 2018-03-26  Tom Tromey  <tom@tromey.com>
12164
12165         * python/py-framefilter.c (py_print_type): Don't catch
12166         exceptions.  Return void.
12167         (py_print_value): Likewise.
12168         (py_print_single_arg): Likewise.
12169         (enumerate_args): Don't catch exceptions.
12170         (py_print_args): Likewise.
12171         (py_print_frame): Likewise.
12172         (gdbpy_apply_frame_filter): Catch exceptions here.
12173
12174 2018-03-26  Tom Tromey  <tom@tromey.com>
12175
12176         * stack.c (_initialize_stack): Remove trailing newlines from help
12177         text.  Add "Usage" line to "backtrace" help.
12178
12179 2018-03-26  Tom Tromey  <tom@tromey.com>
12180
12181         PR python/16486:
12182         * python/py-framefilter.c (py_print_args): Call wrap_hint.
12183
12184 2018-03-26  Tom Tromey  <tom@tromey.com>
12185
12186         * python/py-framefilter.c (py_print_single_arg): Return
12187         EXT_LANG_BT_ERROR from catch.
12188
12189 2018-03-26  Tom Tromey  <tom@tromey.com>
12190
12191         PR backtrace/15584:
12192         * stack.c (backtrace_command_1): Move some code into no-filters
12193         "if".
12194
12195 2018-03-26  Tom Tromey  <tom@tromey.com>
12196
12197         * python/py-framefilter.c (throw_quit_or_print_exception): New
12198         function.
12199         (gdbpy_apply_frame_filter): Use it.
12200
12201 2018-03-26  Tom Tromey  <tom@tromey.com>
12202
12203         PR cli/17716:
12204         * python/py-framefilter.c (py_print_type, py_print_value)
12205         (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
12206         RETURN_MASK_ERROR.
12207
12208 2018-03-26  Tom Tromey  <tom@tromey.com>
12209
12210         * python/py-framefilter.c (enumerate_args): Use
12211         gdb::unique_xmalloc_ptr.
12212
12213 2018-03-26  Tom Tromey  <tom@tromey.com>
12214
12215         * python/py-framefilter.c (py_print_frame): Return
12216         EXT_LANG_BT_OK.
12217         (gdbpy_apply_frame_filter): Update comment.
12218         * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
12219         Remove.
12220         <EXT_LANG_BT_NO_FILTERS>: Change value.
12221
12222 2018-03-26  Tom Tromey  <tom@tromey.com>
12223
12224         PR backtrace/15582:
12225         * stack.c (backtrace_command): Parse "hide" argument.
12226         * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
12227         * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
12228         constant.
12229
12230 2018-03-26  Tom Tromey  <tom@tromey.com>
12231
12232         * stack.c (backtrace_command_1): Remove "show_locals" parameter,
12233         add "flags".
12234         (backtrace_command): Remove "fulltrace", add "flags".
12235
12236 2018-03-26  Tom Tromey  <tom@tromey.com>
12237
12238         * stack.c (backtrace_command): Rewrite command line parsing.
12239
12240 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
12241
12242         * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
12243
12244 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
12245
12246         * filename-seen-cache.h: Add include guard.
12247
12248 2018-03-26  Keith Seitz  <keiths@redhat.com>
12249
12250         * symfile.c (place_section): Remove "struct" from section_addr_info
12251         in comment.
12252         * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
12253         "struct" keyword from section_addr_info.
12254
12255 2018-03-26  Alan Hayward  <alan.hayward@arm.com>
12256
12257         * regformats/regdef.h (reg): Add constructors.
12258
12259 2018-03-25  Pedro Alves  <palves@redhat.com>
12260
12261         * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
12262         if then/else bodies in var_func_name extraction.
12263
12264 2018-03-23  Weimin Pan  <weimin.pan@oracle.com>
12265
12266         * minsyms.c (lookup_minimal_symbol_and_objfile): Use
12267         lookup_minimal_symbol() to find symbol entry.
12268         * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
12269
12270 2018-03-23  Keith Seitz  <keiths@redhat.com>
12271
12272         PR c++/22968
12273         * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
12274         nested type definitions for C++, too.
12275
12276 2018-03-23  Tom Tromey  <tom@tromey.com>
12277
12278         * machoread.c (struct oso_el): Add a constructor.  Don't define as
12279         a typedef.
12280         (macho_register_oso): Remove.
12281         (macho_symtab_read): Take a std::vector.
12282         (oso_el_compare_name): Now a std::sort comparator.
12283         (macho_symfile_read_all_oso): Take a std::vector.
12284         (macho_symfile_read): Use std::vector.  Remove cleanups.
12285
12286 2018-03-22  Tom Tromey  <tom@tromey.com>
12287
12288         * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
12289         (record_full_goto_bookmark): Use std::string.
12290
12291 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
12292
12293         PR tdep/18295
12294         * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
12295         a single mask.
12296
12297 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
12298
12299         * rs6000-tdep.c (store_insn_p): New function.
12300         (skip_prologue): New variable alloca_reg_offset. Set lr_reg
12301         and cr_reg to their unshifted values. Use store_insn_p to
12302         match LR saves using either R1 or fdata->alloca_reg. Use
12303         store_insn_p to match CR saves. Set alloca_reg_offset
12304         when alloca_reg and framep are set. Remove lr_reg shift
12305         when assigning to fdata->lr_register.
12306
12307 2018-03-22  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12308
12309         * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
12310         command line args instead of emitting a warning.
12311
12312 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
12313
12314         * tracepoint.h (struct static_tracepoint_marker): Initialize
12315         fields, define default constructor, move constructor and move
12316         assignment, disable the rest.
12317         <str_id, extra>: Make std::string.
12318         (release_static_tracepoint_marker): Remove.
12319         (free_current_marker): Remove.
12320         * tracepoint.c (free_current_marker): Remove.
12321         (parse_static_tracepoint_marker_definition): Adjust to
12322         std::string, use new hex2str overload.
12323         (release_static_tracepoint_marker): Remove.
12324         (print_one_static_tracepoint_marker): Get marker by reference
12325         and adjust to std::string.
12326         (info_static_tracepoint_markers_command): Adjust to std::vector
12327         changes
12328         * target.h (static_tracepoint_marker_p): Remove typedef.
12329         (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
12330         (struct target_ops) <to_static_tracepoint_marker_at>: Return
12331         bool.
12332         <to_static_tracepoint_markers_by_strid>: Return std::vector.
12333         * target-debug.h
12334         (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
12335         (target_debug_print_std_vector_static_tracepoint_marker): New.
12336         (target_debug_print_struct_static_tracepoint_marker_p): Rename
12337         to...
12338         (target_debug_print_static_tracepoint_marker_p): ... this.
12339         * target-delegates.c: Re-generate.
12340         * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
12341         Make std::string.
12342         * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
12343         (decode_static_tracepoint_spec): Adjust to std::vector.
12344         (tracepoint_print_one_detail): Adjust to std::string.
12345         (strace_marker_decode_location): Adjust to std::string.
12346         (update_static_tracepoint): Adjust to std::string, remove call
12347         to release_static_tracepoint_marker.
12348         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
12349         Adjust to std::vector.
12350         * remote.c (remote_static_tracepoint_marker_at): Return bool.
12351         (remote_static_tracepoint_markers_by_strid): Adjust to
12352         std::vector.
12353         * common/rsp-low.h (hex2str): New overload with explicit count
12354         of bytes.
12355         * common/rsp-low.c (hex2str): New overload with explicit count
12356         of bytes.
12357         * unittests/rsp-low-selftests.c (test_hex2str): New function.
12358         (_initialize_rsp_low_selftests): Add test_hex2str test.
12359         * unittests/tracepoint-selftests.c
12360         (test_parse_static_tracepoint_marker_definition): Adjust to
12361         std::string.
12362
12363 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
12364
12365         * tracepoint.c (parse_static_tracepoint_marker_definition):
12366         Consider case where the definition is followed by more
12367         definitions.
12368         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12369         tracepoint-selftests.c.
12370         * unittests/tracepoint-selftests.c: New.
12371
12372 2018-03-21  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
12373
12374         * MAINTAINERS (Write After Approval): Add Pedro Franco de
12375         Carvalho.
12376
12377 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
12378
12379         * symtab.c (find_pc_sect_line): fixed indentation.
12380
12381 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
12382
12383         * symtab.c (find_pc_sect_line): now uses binary search.
12384
12385 2018-03-19  Tom Tromey  <tom@tromey.com>
12386
12387         * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
12388         "IDENT" production.
12389
12390 2018-03-19  Pedro Alves  <palves@redhat.com>
12391             Tom Tromey  <tom@tromey.com>
12392
12393         * unittests/observable-selftests.c: New file.
12394         * common/observable.h: New file.
12395         * observable.h: New file.
12396         * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
12397         arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
12398         breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
12399         corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
12400         extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
12401         infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
12402         linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
12403         mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
12404         ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
12405         python/py-breakpoint.c, python/py-finishbreakpoint.c,
12406         python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
12407         record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
12408         riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
12409         spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
12410         symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
12411         tui/tui-interp.c, valops.c: Update all users.
12412         * tui/tui-hooks.c (tui_bp_created_observer)
12413         (tui_bp_deleted_observer, tui_bp_modified_observer)
12414         (tui_inferior_exit_observer, tui_before_prompt_observer)
12415         (tui_normal_stop_observer, tui_register_changed_observer):
12416         Remove.
12417         (tui_observers_token): New global.
12418         (attach_or_detach, tui_attach_detach_observers): New functions.
12419         (tui_install_hooks, tui_remove_hooks): Use
12420         tui_attach_detach_observers.
12421         * record-btrace.c (record_btrace_thread_observer): Remove.
12422         (record_btrace_thread_observer_token): New global.
12423         * observer.sh: Remove.
12424         * observer.c: Rename to observable.c.
12425         * observable.c (namespace gdb_observers): Define new objects.
12426         (observer_debug): Move into gdb_observers namespace.
12427         (struct observer, struct observer_list, xalloc_observer_list_node)
12428         (xfree_observer_list_node, generic_observer_attach)
12429         (generic_observer_detach, generic_observer_notify): Remove.
12430         (_initialize_observer): Update.
12431         Don't include observer.inc.
12432         * Makefile.in (generated_files): Remove observer.h, observer.inc.
12433         (clean mostlyclean): Likewise.
12434         (observer.h, observer.inc): Remove targets.
12435         (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
12436         (COMMON_SFILES): Use observable.c, not observer.c.
12437         * .gitignore: Remove observer.h.
12438
12439 2018-03-18  Tom Tromey  <tom@tromey.com>
12440
12441         * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
12442         gdb::def_vector.
12443         (bfd_lookup_symbol_from_dyn_symtab): Likewise.
12444
12445 2018-03-17  Tom Tromey  <tom@tromey.com>
12446
12447         * auto-load.c (auto_load_objfile_script_1): Use std::string.
12448
12449 2018-03-17  Tom Tromey  <tom@tromey.com>
12450
12451         * target.c (class scoped_target_fd): New.
12452         (target_fileio_close_cleanup): Remove.
12453         (target_fileio_read_alloc_1): Use scoped_target_fd.
12454
12455 2018-03-16  Simon Marchi  <simon.marchi@polymtl.ca>
12456
12457         * silent-rules.mk: New.
12458         * Makefile.in: Include silent-rules.mk
12459         (srcdir, VPATH, top_srcdir): Move up.
12460         (COMPILE): Add ECHO_CXX.
12461         (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
12462         (init.c): Add ECHO_INIT_C.
12463         (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
12464         (version.c): Add ECHO_GEN.
12465         (printcmd.o): Add ECHO_CXX.
12466         (target-float.o): Add ECHO_CXX.
12467         (ada-exp.o): Add ECHO_CXX.
12468         (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
12469         (insight$(EXEEXT)): Add ECHO_CXXLD.
12470         * gnulib/configure.ac: Add AM_SILENT_RULES.
12471         * gnulib/aclocal.m4: Re-generate.
12472         * gnulib/configure: Re-generate.
12473         * gnulib/import/Makefile.in: Re-generate.
12474
12475 2018-03-16  Tom Tromey  <tom@tromey.com>
12476
12477         * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
12478         * utils.h (make_cleanup_free_section_addr_info): Don't declare.
12479         * utils.c (do_free_section_addr_info)
12480         (make_cleanup_free_section_addr_info): Remove.
12481         * symfile.h (struct other_sections): Add constructor.
12482         (struct section_addr_info): Remove.
12483         (section_addr_info): New typedef.
12484         (struct sym_fns) <sym_offsets>: Change type of parameter.
12485         (build_section_addr_info_from_objfile)
12486         (relative_addr_info_to_section_offsets, addr_info_make_relative)
12487         (default_symfile_offsets, symbol_file_add)
12488         (symbol_file_add_from_bfd)
12489         (build_section_addr_info_from_section_table): Update.
12490         (alloc_section_addr_info, free_section_addr_info): Don't declare.
12491         * symfile.c (alloc_section_addr_info): Remove.
12492         (build_section_addr_info_from_section_table): Change return type.
12493         Update.
12494         (build_section_addr_info_from_bfd)
12495         (build_section_addr_info_from_objfile): Likewise.
12496         (free_section_addr_info): Remove.
12497         (relative_addr_info_to_section_offsets): Change type of "addrs".
12498         (addrs_section_compar): Now a std::sort comparator.
12499         (addrs_section_sort): Change return type.
12500         (addr_info_make_relative): Change type of "addrs".  Update.
12501         (default_symfile_offsets, syms_from_objfile_1)
12502         (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
12503         (symbol_file_add_separate): Update.
12504         (symbol_file_add): Change type of "addrs".  Update.
12505         (add_symbol_file_command): Update.  Remove cleanups.
12506         * symfile-mem.c (symbol_file_add_from_memory): Update.  Remove
12507         cleanups.
12508         * symfile-debug.c (debug_sym_offsets): Change type of "info".
12509         * solib.c (solib_read_symbols): Update.
12510         * objfiles.c (objfile_relocate): Update.  Remove cleanups.
12511         * machoread.c (macho_symfile_offsets): Update.
12512         * jit.c (jit_bfd_try_read_symtab): Update.
12513
12514 2018-03-15  Simon Marchi  <simon.marchi@polymtl.ca>
12515
12516         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12517         unittests/utils-selftests.c.
12518         * unittests/utils-selftests.c: New file.
12519
12520 2018-03-14  Tom Tromey  <tom@tromey.com>
12521
12522         PR cli/14977:
12523         * printcmd.c (printf_c_string, printf_wide_c_string): Special case
12524         for NULL.
12525
12526 2018-03-14  Tom Tromey  <tom@tromey.com>
12527
12528         PR cli/19918:
12529         * printcmd.c (printf_pointer): Allow "-" in format.
12530
12531 2018-03-14  Tom Tromey  <tom@tromey.com>
12532
12533         * printcmd.c (_initialize_printcmd): Add usage to printf.
12534
12535 2018-03-14  Yao Qi  <qiyao@sourceware.org>
12536
12537         * MAINTAINERS: Update my email address.
12538
12539 2018-03-13  Tom Tromey  <tom@tromey.com>
12540
12541         * machoread.c (macho_check_dsym): Change filenamep to a
12542         std::string*.
12543         (macho_symfile_read): Update.
12544         * symfile.c (load_command): Use std::string.
12545
12546 2018-03-12  Andrew Burgess  <andrew.burgess@embecosm.com>
12547
12548         * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
12549         to error message string.
12550         (riscv_register_name): Use xsnprintf instead of sprintf.
12551         (riscv_insn::fetch_instruction): Use gdb_assert instead of
12552         internal_error.
12553         (riscv_print_arg_location): Use gdb_assert_not_reached instead of
12554         error.
12555         (riscv_push_dummy_call): Likewise.
12556
12557 2018-03-12  Tom Tromey  <tom@tromey.com>
12558
12559         * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
12560         Use gdb::byte_vector.
12561         * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
12562
12563 2018-03-12  Yao Qi  <yao.qi@linaro.org>
12564
12565         * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
12566         parameter type to readable_regcache.
12567         * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
12568         the declaration.
12569
12570 2018-03-11  Tom Tromey  <tom@tromey.com>
12571
12572         * dwarf2read.c (struct nextfield): Add initializers.
12573         (struct nextfnfield): Remove.
12574         (struct fnfieldlist): Add initializers.  Remove "length" and
12575         "head", use std::vector.
12576         (struct decl_field_list): Remove.
12577         (struct field_info): Add initializers.
12578         <fields, baseclasses>: Now std::vector.
12579         <nbaseclasses, nfnfields, typedef_field_list_count,
12580         nested_types_list_count>: Remove.
12581         (dwarf2_add_field, dwarf2_add_type_defn)
12582         (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
12583         (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
12584         (process_structure_scope): Update.
12585
12586 2018-03-11  Tom Tromey  <tom@tromey.com>
12587
12588         * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
12589         for use by std::sort.
12590         (build_type_psymtabs_1): Use std::vector.
12591
12592 2018-03-09  Eli Zaretskii  <eliz@gnu.org>
12593
12594         * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
12595         and LIBMPFR in the printed configuration.
12596
12597 2018-03-08  Tom Tromey  <tom@tromey.com>
12598
12599         * source.c (get_filename_and_charpos): Use scoped_fd.
12600         * nto-procfs.c (procfs_open_1): Use scoped_fd.
12601         (procfs_pidlist): Likewise.
12602         * procfs.c (proc_get_LDT_entry): Use scoped_fd.
12603         (iterate_over_mappings): Likewise.
12604
12605 2018-03-08  Tom Tromey  <tom@tromey.com>
12606
12607         * infcall.c (struct call_return_meta_info)
12608         <stack_temporaries_enabled>: Remove.
12609         (get_call_return_value, call_function_by_hand_dummy): Update.
12610         * thread.c (disable_thread_stack_temporaries): Remove.
12611         (enable_thread_stack_temporaries): Remove.
12612         (thread_stack_temporaries_enabled_p): Return bool.
12613         (push_thread_stack_temporary, value_in_thread_stack_temporaries)
12614         (get_last_thread_stack_temporary): Update.
12615         * eval.c (evaluate_subexp): Update.
12616         * gdbthread.h (class enable_thread_stack_temporaries): Now a
12617         class, not a function.
12618         (value_ptr, value_vec): Remove typedefs.
12619         (class thread_info) <stack_temporaries_enabled>: Now bool.
12620         <stack_temporaries>: Now a std::vector.
12621         (thread_stack_temporaries_enabled_p)
12622         (value_in_thread_stack_temporaries): Return bool.
12623
12624 2018-03-08  Simon Marchi  <simon.marchi@ericsson.com>
12625
12626         * remote.c (putpkt_binary): Fix omitted bytes reporting.
12627         (getpkt_or_notif_sane_1): Likewise.
12628
12629 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
12630
12631         * build-id.c (build_id_to_debug_bfd): Use std::string.
12632
12633 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
12634
12635         * build-id.c (find_separate_debug_file_by_buildid): Return
12636         std::string.
12637         * build-id.h (find_separate_debug_file_by_buildid): Return
12638         std::string.
12639         * coffread.c (coff_symfile_read): Adjust to std::string.
12640         * elfread.c (elf_symfile_read): Adjust to std::string.
12641         * symfile.c (separate_debug_file_exists): Change parameter to
12642         std::string.
12643         (find_separate_debug_file): Return std::string.
12644         (find_separate_debug_file_by_debuglink): Return std::string.
12645         * symfile.h (find_separate_debug_file_by_debuglink): Return
12646         std::string.
12647
12648 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
12649
12650         * common/xml-utils.c (xml_escape_text): Move code to...
12651         (xml_escape_text_append): ... this new function.
12652         * common/xml-utils.h (xml_escape_text_append): New declaration.
12653         * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
12654         New function.
12655         (_initialize_xml_utils): register test_xml_escape_text_append as
12656         a selftest.
12657
12658 2018-03-07  Alan Hayward  <alan.hayward@arm.com>
12659
12660         * defs.h: Remove MAX_REGISTER_SIZE.
12661         * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
12662         asserts.
12663         * python/py-unwind.c (pyuw_sniffer): Likewise.
12664
12665 2018-03-07  Tom Tromey  <tom@tromey.com>
12666
12667         * linux-tdep.c (linux_info_proc): Update.
12668         * target.h (struct target_ops) <to_fileio_readlink>: Return
12669         optional<string>.
12670         (target_fileio_readlink): Return optional<string>.
12671         * remote.c (remote_hostio_readlink): Return optional<string>.
12672         * inf-child.c (inf_child_fileio_readlink): Return
12673         optional<string>.
12674         * target.c (target_fileio_readlink): Return optional<string>.
12675
12676 2018-03-07  Andrew Burgess  <andrew.burgess@embecosm.com>
12677
12678         * regcache.c (cooked_read_test): Add riscv to the list of
12679         architectures that have a save_reggroup.
12680
12681 2018-03-07  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12682
12683         * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
12684         value is not a dynamic class object.
12685
12686 2018-03-06  Tom Tromey  <tom@tromey.com>
12687
12688         * rust-exp.y: Formatting fixes.
12689
12690 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12691
12692         * riscv-tdep.c (riscv_register_name): Remove target description
12693         support.
12694         (riscv_gdbarch_init): Remove target description check.
12695
12696 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12697
12698         * riscv-tdep.c: Remove 'Contributed by ...' lines from header
12699         comment.
12700         * riscv-tdep.h: Likewise.
12701
12702 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12703
12704         * riscv-tdep.c (riscv_pseudo_register_read): Delete.
12705         (riscv_pseudo_register_write): Delete.
12706         (riscv_gdbarch_init): Remove all use of pseudo registers.
12707
12708 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
12709
12710         * record-btrace.c (btrace_print_lines): Replace cleanup
12711         parameter with RAII equivalents.
12712         (btrace_insn_history): Replace cleanup with RAII equivalents.
12713         * ui-out.h (make_cleanup_ui_out_list_begin_end,
12714         make_cleanup_ui_out_tuple_begin_end): Remove.
12715         * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
12716         make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
12717         make_cleanup_ui_out_list_begin_end): Remove.
12718
12719 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
12720
12721         * record-btrace.c (record_btrace_maybe_mark_async_event): Change
12722         parameter types to std::vector.  Use bool.
12723         (record_btrace_wait): Replace VEC(tp_t) with
12724         std::vector<thread_info *>.
12725         * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
12726
12727 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
12728
12729         * record-btrace.c (record_btrace_disable_callback): Remove.
12730         (struct scoped_btrace_disable): New.
12731         (record_btrace_open): Use scoped_btrace_disable.
12732
12733 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12734
12735         * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
12736         reading values from registers.
12737
12738 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12739
12740         * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
12741         where appropriate.
12742
12743 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12744
12745         * riscv-tdep.c (riscv_print_arg_location): Add header comment,
12746         change parameter type.  Use GDB's print functions, and use
12747         core_addr_to_string where appropriate.
12748         (riscv_push_dummy_call): Use core_addr_to_string where
12749         appropriate, update call to riscv_print_arg_location, and reindent
12750         a few lines.
12751         (riscv_return_value): Update call to riscv_print_arg_location.
12752
12753 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12754             Tim Newsome <tim@sifive.com>
12755             Albert Ou <a0u@eecs.berkeley.edu>
12756             Darius Rad <darius@bluespec.com>
12757
12758         * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
12759         (HFILES_NO_SRCDIR): Add riscv-tdep.h.
12760         (ALLDEPFILES): Add riscv-tdep.c
12761         * configure.tgt: Add riscv support.
12762         * riscv-tdep.c: New file.
12763         * riscv-tdep.h: New file.
12764         * NEWS: Mention new target.
12765         * MAINTAINERS: Add entry for riscv.
12766
12767 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12768
12769         * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
12770         fields within aggregates.
12771
12772 2018-03-04  Simon Marchi  <simon.marchi@polymtl.ca>
12773
12774         * record-btrace.c (btrace_print_lines): Change type of flags to
12775         gdb_disassembly_flags.
12776
12777 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
12778
12779         * fbsd-nat.c: Include "inf-ptrace.h".
12780         (USE_SIGTRAP_SIGINFO): Conditionally define.
12781         [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
12782         (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
12783         [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
12784         function.
12785         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
12786         Likewise.
12787         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
12788         Likewise.
12789         (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
12790         "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
12791         "supports_stopped_by_hw_breakpoint" target methods.
12792
12793 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
12794
12795         * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
12796         * fbsd-nat.c (debug_fbsd_nat): New variable.
12797         (show_fbsd_nat_debug): New function.
12798         (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
12799         (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
12800
12801 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
12802
12803         * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
12804         * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
12805         prototype.
12806         * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
12807         (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
12808         method.
12809
12810 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
12811
12812         * common/gdb_vecs.c (free_char_ptr_vec): Remove.
12813         * common/gdb_vecs.h (free_char_ptr_vec): Remove.
12814
12815 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
12816
12817         * charset.c (struct charset_vector): New.
12818         (charsets): Change type to charset_vector.
12819         (find_charset_names): Adjust.
12820         (add_one): Adjust.
12821         (_initialize_charset): Adjust.
12822
12823 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
12824
12825         * progspace.h (struct program_space) <deleted_solibs>: Change
12826         type to std::vector<std::string>.
12827         * progspace.c (clear_program_space_solib_cache): Adjust.
12828         * breakpoint.c (print_solib_event): Adjust.
12829         (check_status_catch_solib): Adjust.
12830         * solib.c (update_solib_list): Adjust.
12831         * ui-out.h (class ui_out) <field_string>: New overload.
12832         * ui-out.c (ui_out::field_string): New overload.
12833
12834 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
12835
12836         * progspace.h (struct program_space): Add constructor and
12837         destructor, initialize fields.
12838         (add_program_space): Remove.
12839         * progspace.c (add_program_space): Rename to...
12840         (program_space::program_space): ... this.
12841         (release_program_space): Rename to...
12842         (program_space::~program_space): ... this.
12843         (delete_program_space): Use delete to delete program_space.
12844         (initialize_progspace): Use new to allocate program_space.
12845         * inferior.c (add_inferior_with_spaces): Likewise.
12846         (clone_inferior_command): Likewise.
12847         * infrun.c (follow_fork_inferior): Likewise.
12848         (handle_vfork_child_exec_or_exit): Likewise.
12849
12850 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
12851
12852         * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
12853         (delim_string_to_char_ptr_vec): Return std::vector of
12854         gdb::unique_xmalloc_ptr.
12855         (dirnames_to_char_ptr_vec_append): Take std::vector of
12856         gdb::unique_xmalloc_ptr.
12857         (dirnames_to_char_ptr_vec): Return std::vector of
12858         gdb::unique_xmalloc_ptr.
12859         * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
12860         Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
12861         (delim_string_to_char_ptr_vec): Return an std::vector of
12862         gdb::unique_xmalloc_ptr, adjust the code.
12863         (dirnames_to_char_ptr_vec_append): Take an std::vector of
12864         gdb::unique_xmalloc_ptr, adjust the code.
12865         (dirnames_to_char_ptr_vec): Return an std::vector of
12866         gdb::unique_xmalloc_ptr, adjust the code.
12867         * auto-load.c (auto_load_safe_path_vec): Change type to
12868         std::vector of gdb::unique_xmalloc_ptr.
12869         (auto_load_expand_dir_vars): Return an std::vector of
12870         gdb::unique_xmalloc_ptr, adjust the code.
12871         (auto_load_safe_path_vec_update): Adjust.
12872         (filename_is_in_auto_load_safe_path_vec): Adjust.
12873         (auto_load_objfile_script_1): Adjust.
12874         * build-id.c (build_id_to_debug_bfd): Adjust.
12875         * linux-thread-db.c (thread_db_load_search): Adjust.
12876         * source.c (add_path): Adjust.
12877         (openp): Adjust.
12878         * symfile.c (find_separate_debug_file): Adjust.
12879         * utils.c (do_free_char_ptr_vec): Remove.
12880         (make_cleanup_free_char_ptr_vec): Remove.
12881
12882 2018-03-01  Sergio Durigan Junior  <sergiodj@redhat.com>
12883
12884         PR gdb/22907
12885         * common/pathstuff.c: Conditionally include "<windows.h>".
12886
12887 2018-03-01  Georg Sauthoff  <mail@georg.so>
12888
12889         PR gdb/22888
12890         * gcore.in: Quote variables and switch interpreter to bash.
12891
12892 2018-03-01  Tom Tromey  <tom@tromey.com>
12893
12894         * dwarf2read.c (alloc_discriminant_info): Fix default_index
12895         assertion.  Add assertion for discriminant_index.
12896         (quirk_rust_enum): Use correct base type name in univariant case.
12897
12898 2018-03-01  Simon Marchi  <simon.marchi@ericsson.com>
12899
12900         * record.c (get_call_history_modifiers): Return a
12901         record_print_flags.
12902         (cmd_record_call_history): Adjust.
12903         * record-btrace.c (record_btrace_call_history): Adjust.
12904         (record_btrace_call_history_range): Adjust.
12905         (record_btrace_call_history_from): Adjust.
12906         * target-debug.h (target_debug_print_record_print_flags): New.
12907         * target-delegates.c: Re-generate.
12908         * target.c (target_call_history): Change flags type.
12909         (target_call_history_from): Likewise.
12910         (target_call_history_range): Likewise.
12911         * target.h (struct target_ops) <target_call_history>: Likewise.
12912         (target_call_history_from): Likewise.
12913         (target_call_history_range): Likewise.
12914
12915 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
12916             Simon Marchi  <simon.marchi@polymtl.ca>
12917
12918         * common/common-utils.c: Include "sys/stat.h".
12919         (is_regular_file): Move here from "source.c"; change return
12920         type to "bool".
12921         * common/common-utils.h (is_regular_file): New prototype.
12922         * common/pathstuff.c (contains_dir_separator): New function.
12923         * common/pathstuff.h (contains_dir_separator): New prototype.
12924         * source.c: Don't include "sys/stat.h".
12925         (is_regular_file): Move to "common/common-utils.c".
12926
12927 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
12928
12929         * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
12930         (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
12931         * auto-load.c: Include "common/pathstuff.h".
12932         * common/common-def.h (current_directory): Move here.
12933         * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
12934         function.
12935         * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
12936         prototype.
12937         * common/pathstuff.c: New file.
12938         * common/pathstuff.h: New file.
12939         * compile/compile.c: Include "common/pathstuff.h".
12940         * defs.h (current_directory): Move to "common/common-defs.h".
12941         * dwarf2read.c: Include "common/pathstuff.h".
12942         * exec.c: Likewise.
12943         * guile/scm-safe-call.c: Likewise.
12944         * linux-thread-db.c: Likewise.
12945         * main.c: Likewise.
12946         * nto-tdep.c: Likewise.
12947         * objfiles.c: Likewise.
12948         * source.c: Likewise.
12949         * symtab.c: Likewise.
12950         * utils.c: Include "common/pathstuff.h".
12951         (gdb_realpath): Move to "common/pathstuff.c".
12952         (gdb_realpath_keepfile): Likewise.
12953         (gdb_abspath): Likewise.
12954         * utils.h (gdb_realpath): Move to "common/pathstuff.h".
12955         (gdb_realpath_keepfile): Likewise.
12956         (gdb_abspath): Likewise.
12957
12958 2018-02-28  John Baldwin  <jhb@FreeBSD.org>
12959
12960         * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
12961         wildcard process pid for super_resume for kernels with a
12962         specific bug.
12963
12964 2018-02-27  Phil Muldoon  <pmuldoon@redhat.com>
12965
12966         * compile/compile.c (get_args): Add additional comments
12967         explaining function.
12968
12969 2018-02-27  Simon Marchi  <simon.marchi@polymtl.ca>
12970             Tom Tromey  <tom@tromey.com>
12971
12972         * target.h (memory_write_request_s): Remove typedef.  Don't define
12973         VEC.
12974         (target_write_memory_blocks): Change argument to std::vector.
12975         (struct memory_write_request): Add constructor.
12976         * target-memory.c (compare_block_starting_address): Return bool.
12977         Change argument types.
12978         (claim_memory): Change arguments to use std::vector.
12979         (split_regular_and_flash_blocks, blocks_to_erase)
12980         (compute_garbled_blocks): Likewise.
12981         (cleanup_request_data, cleanup_write_requests_vector): Remove.
12982         (target_write_memory_blocks): Change argument to std::vector.
12983         * symfile.c (struct load_section_data): Add constructor and
12984         destructor.  Use std::vector for "requests".
12985         (struct load_progress_data): Add initializers.
12986         (load_section_callback): Update.  Use "new".
12987         (clear_memory_write_data): Remove.
12988         (generic_load): Update.
12989
12990 2018-02-27  Alan Hayward  <alan.hayward@arm.com>
12991
12992         * arch/aarch64.h: Use common/tdesc.h.
12993
12994 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
12995
12996         * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
12997         architecture with a 64-bit ABI.
12998
12999 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
13000
13001         * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
13002         ahead of target description loading.
13003
13004 2018-02-26  Tom Tromey  <tom@tromey.com>
13005
13006         * stack.c (backtrace_command_1): Update.
13007         * python/python-internal.h (gdbpy_apply_frame_filter): Change type
13008         of "flags".
13009         * python/py-framefilter.c (py_print_frame)
13010         (gdbpy_apply_frame_filter): Change type of "flags".
13011         * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
13012         of "flags".
13013         (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
13014         (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
13015         * extension.h (enum frame_filter_flag): Rename from
13016         frame_filter_flags.
13017         (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
13018         (apply_ext_lang_frame_filter): Change type of "flags".
13019         * extension.c (apply_ext_lang_frame_filter): Change type of
13020         "flags".
13021         * extension-priv.h (struct extension_language_ops)
13022         <apply_frame_filter>: Change type of "flags".
13023
13024 2018-02-26  Tom Tromey  <tom@tromey.com>
13025
13026         PR python/16497:
13027         * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag.  Fix
13028         off-by-one in py_end computation.
13029         * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
13030         PRINT_MORE_FRAMES.
13031         * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
13032         constant.
13033
13034 2018-02-26  Tom Tromey  <tom@tromey.com>
13035
13036         * dwarf2read.c (struct variant_field): New.
13037         (struct nextfield) <variant>: New field.
13038         (dwarf2_add_field): Handle DW_TAG_variant_part.
13039         (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
13040         discriminated union.
13041         (read_structure_type): Handle DW_TAG_variant_part.
13042         (handle_struct_member_die): New function, extracted from
13043         process_structure_scope.  Handle DW_TAG_variant.
13044         (process_structure_scope): Handle discriminated unions.  Call
13045         handle_struct_member_die.
13046
13047 2018-02-26  Tom Tromey  <tom@tromey.com>
13048
13049         * rust-lang.h (rust_last_path_segment): Declare.
13050         * rust-lang.c (rust_last_path_segment): Now public.  Change
13051         contract.
13052         (struct disr_info): Remove.
13053         (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
13054         (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
13055         (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
13056         (rust_enum_p, rust_enum_variant): New function.
13057         (rust_underscore_fields): Remove "offset" parameter.
13058         (rust_print_enum): New function.
13059         (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
13060         <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
13061         (rust_print_struct_def): Add "for_rust_enum" parameter.  Handle
13062         enums.
13063         (rust_internal_print_type): New function, from rust_print_type.
13064         Remove enum code.
13065         (rust_print_type): Call rust_internal_print_type.
13066         (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
13067         Update enum handling.
13068         * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
13069         (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
13070         (rust_union_quirks): New functions.
13071         (process_full_comp_unit, process_full_type_unit): Call
13072         rust_union_quirks.
13073         (process_structure_scope): Update rust_unions if necessary.
13074
13075 2018-02-26  Tom Tromey  <tom@tromey.com>
13076
13077         * value.h (value_union_variant): Declare.
13078         * valops.c (value_union_variant): New function.
13079         * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
13080         (struct discriminant_info): New.
13081         (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
13082         enumerator.
13083         (struct main_type) <flag_discriminated_union>: New field.
13084
13085 2018-02-26  Tom Tromey  <tom@tromey.com>
13086
13087         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13088         unittests/unpack-selftests.c.
13089         * unittests/unpack-selftests.c: New file.
13090         * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
13091
13092 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13093
13094         * dwarf2read.c (struct partial_die_info) <read>: New method.
13095         (read_partial_die): Remove the declaration.
13096         (load_partial_dies): Update.
13097         (partial_die_info::partial_die_info):
13098         (read_partial_die): Change it to partial_die_info::read.
13099
13100 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13101
13102         * dwarf2read.c (struct partial_die_info) <fixup>: New method.
13103         (fixup_partial_die): Remove declaration.
13104         (scan_partial_symbols): Update.
13105         (partial_die_parent_scope): Likewise.
13106         (partial_die_full_name): Likewise.
13107         (fixup_partial_die): Change it to partial_die_info::fixup.
13108
13109 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13110
13111         * dwarf2read.c (read_partial_die): Update the declaration.
13112         (load_partial_dies): Caller update.
13113         (read_partial_die): Remove one argument abbrev_len.
13114
13115 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13116
13117         * dwarf2read.c (struct partial_die_info): Add ctor, delete
13118         assignment operator.
13119         (load_partial_dies): Use ctor and copy ctor.
13120         (read_partial_die): Update.
13121         (dwarf2_cu::find_partial_die): Use ctor.
13122
13123 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13124
13125         * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
13126         (find_partial_die_in_comp_unit): Change it to
13127         dwarf2_cu::find_partial_die.
13128         (find_partial_die): Update.
13129
13130 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13131
13132         * dwarf2read.c (read_partial_die): Remove the code checking abbrev
13133         is NULL.
13134
13135 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13136
13137         * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
13138
13139 2018-02-26  Alan Hayward  <alan.hayward@arm.com>
13140
13141         * arch/amd64.h: Use common/tdesc.h.
13142         * arch/i386.c: Likewise.
13143         * arch/i386.h: Likewise.
13144         * arch/tic6x.c: Likewise.
13145         * arch/tdesc.h: Move file from here...
13146         * common/tdesc.h: ...to here.
13147         * features/aarch64-core.c: Regenerate.
13148         * features/aarch64-fpu.c: Regenerate.
13149         * features/i386/32bit-avx.c: Regenerate.
13150         * features/i386/32bit-avx512.c: Regenerate.
13151         * features/i386/32bit-core.c: Regenerate.
13152         * features/i386/32bit-linux.c: Regenerate.
13153         * features/i386/32bit-mpx.c: Regenerate.
13154         * features/i386/32bit-pkeys.c: Regenerate.
13155         * features/i386/32bit-sse.c: Regenerate.
13156         * features/i386/64bit-avx.c: Regenerate.
13157         * features/i386/64bit-avx512.c: Regenerate.
13158         * features/i386/64bit-core.c: Regenerate.
13159         * features/i386/64bit-linux.c: Regenerate.
13160         * features/i386/64bit-mpx.c: Regenerate.
13161         * features/i386/64bit-pkeys.c: Regenerate.
13162         * features/i386/64bit-segments.c: Regenerate.
13163         * features/i386/64bit-sse.c: Regenerate.
13164         * features/i386/x32-core.c: Regenerate.
13165         * features/tic6x-c6xp.c: Regenerate.
13166         * features/tic6x-core.c: Regenerate.
13167         * features/tic6x-gp.c: Regenerate.
13168         * target-descriptions.c: Use common/tdesc.h.
13169         * target-descriptions.h: Likewise.
13170
13171 2018-02-24  Tom Tromey  <tom@tromey.com>
13172
13173         * linux-thread-db.c (try_thread_db_load_from_pdir_1)
13174         (try_thread_db_load_from_dir, thread_db_load_search): Use
13175         std::string.
13176         (info_auto_load_libthread_db_compare): Return bool.  Change
13177         argument types.
13178         (info_auto_load_libthread_db): Use std::vector, std::string.
13179         Remove cleanups.
13180
13181 2018-02-24  Tom Tromey  <tom@tromey.com>
13182
13183         * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
13184         std::string.
13185         * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
13186         std::string*.
13187         * gdbarch.c: Rebuild.
13188         * gdbarch.h: Rebuild.
13189         * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
13190         * arch-utils.h (default_fast_tracepoint_valid_at): Update.
13191         * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
13192         std::string*.
13193
13194 2018-02-23  Simon Marchi  <simon.marchi@polymtl.ca>
13195
13196         * gdbtypes.h (sect_offset): Change type to uint64_t.
13197         (sect_offset_str): New function.
13198         * dwarf2read.c (create_addrmap_from_aranges): Use
13199         sect_offset_str.
13200         (error_check_comp_unit_head): Likewise.
13201         (create_debug_type_hash_table): Likewise.
13202         (read_cutu_die_from_dwo): Likewise.
13203         (init_cutu_and_read_dies): Likewise.
13204         (init_cutu_and_read_dies_no_follow): Likewise.
13205         (process_psymtab_comp_unit_reader): Likewise.
13206         (partial_die_parent_scope): Likewise.
13207         (peek_die_abbrev): Likewise.
13208         (process_queue): Likewise.
13209         (dwarf2_physname): Likewise.
13210         (read_namespace_alias): Likewise.
13211         (read_import_statement): Likewise.
13212         (create_dwo_cu_reader): Likewise.
13213         (create_cus_hash_table): Likewise.
13214         (lookup_dwo_cutu): Likewise.
13215         (inherit_abstract_dies): Likewise.
13216         (read_func_scope): Likewise.
13217         (read_call_site_scope): Likewise.
13218         (dwarf2_add_member_fn): Likewise.
13219         (read_common_block): Likewise.
13220         (read_module_type): Likewise.
13221         (read_typedef): Likewise.
13222         (read_subrange_type): Likewise.
13223         (load_partial_dies): Likewise.
13224         (read_partial_die): Likewise.
13225         (find_partial_die): Likewise.
13226         (read_str_index): Likewise.
13227         (dwarf2_string_attr): Likewise.
13228         (build_error_marker_type): Likewise.
13229         (lookup_die_type): Likewise.
13230         (dump_die_shallow): Likewise.
13231         (follow_die_ref): Likewise.
13232         (dwarf2_fetch_die_loc_sect_off): Likewise.
13233         (dwarf2_fetch_constant_bytes): Likewise.
13234         (follow_die_sig): Likewise.
13235         (get_signatured_type): Likewise.
13236         (get_DW_AT_signature_type): Likewise.
13237         (dwarf2_find_containing_comp_unit): Likewise.
13238         (set_die_type): Likewise.
13239
13240 2018-02-21  John Baldwin  <jhb@FreeBSD.org>
13241
13242         * arch/aarch64.c: Include "common-defs.h".
13243         * arch/amd64.c: Likewise.
13244         * arch/i386.c: Likewise.
13245
13246 2018-02-21  Tom Tromey  <tom@tromey.com>
13247
13248         * value.h: (extract_field_op): Update.
13249         * eval.c (extract_field_op): Return a const char *.
13250         * expression.h (parse_expression_for_completion): Update.
13251         * completer.c (complete_expression): Update.
13252         (add_struct_fields): Make fieldname const.
13253         * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
13254         (mark_completion_tag, parse_exp_in_context_1): Update.
13255         (parse_expression_for_completion): Change "name" to
13256         unique_xmalloc_ptr*.
13257
13258 2018-02-21  Tom Tromey  <tom@tromey.com>
13259
13260         * infcall.c (call_function_by_hand_dummy): Use std::vector.
13261
13262 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13263
13264         * avr-tdep.c (avr_read_pc): Change parameter type to
13265         readable_regcache.
13266         * gdbarch.sh (read_pc): Likewise.
13267         * gdbarch.c: Re-generated.
13268         * gdbarch.h: Re-generated.
13269         * hppa-tdep.c (hppa_read_pc): Change parameter type to
13270         readable_regcache.
13271         * ia64-tdep.c (ia64_read_pc): Likewise.
13272         * mips-tdep.c (mips_read_pc): Likewise.
13273         * spu-tdep.c (spu_read_pc): Likewise.
13274
13275 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13276
13277         * Makefile.in (COMMON_SFILES): Add regcache-dump.c
13278         * regcache-dump.c: New file.
13279         * regcache.c: Move register_dump to regcache-dump.c.
13280         (maintenance_print_registers): Likewise.
13281         (maintenance_print_raw_registers): Likewise.
13282         (maintenance_print_cooked_registers): Likewise.
13283         (maintenance_print_register_groups): Likewise.
13284         (maintenance_print_remote_registers): Likewise.
13285         (_initialize_regcache): Likewise.
13286         * regcache.h (register_dump): Moved from regcache.c.
13287
13288 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13289
13290         * regcache.c (regcache::regcache): Update.
13291         (regcache::invalidate): Move it to detached_regcache::invalidate.
13292         (get_thread_arch_aspace_regcache): Update.
13293         (regcache::raw_update): Update.
13294         (regcache::cooked_read): Remove some code.
13295         (regcache::cooked_read_value): Likewise.
13296         (regcache::raw_write): Remove assert on m_readonly_p.
13297         (regcache::raw_supply_integer): Move it to
13298         detached_regcache::raw_supply_integer.
13299         (regcache::raw_supply_zeroed): Likewise.
13300         * regcache.h (detached_regcache) <raw_supply_integer>: New
13301         declaration.
13302         <raw_supply_zeroed, invalidate>: Likewise.
13303         (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
13304         <invalidate>: Likewise.
13305         <m_readonly_p>: Removed.
13306
13307 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13308
13309         * infcmd.c (get_return_value): Let stop_regs point to
13310         get_current_regcache.
13311         * regcache.c (regcache::regcache): Remove.
13312         (register_dump_reg_buffer): New class.
13313         (regcache_print): Adjust.
13314         * regcache.h (regcache): Remove constructors.
13315
13316 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13317
13318         * regcache.c (class register_dump): New class.
13319         (register_dump_regcache, register_dump_none): New class.
13320         (register_dump_remote, register_dump_groups): New class.
13321         (regcache_print): Update.
13322         * regcache.h (regcache_dump_what): Move it to regcache.c.
13323         (regcache) <dump>: Remove.
13324
13325 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13326
13327         * jit.c (struct jit_unwind_private) <regcache>: Change its type to
13328          reg_buffer_rw *.
13329         (jit_unwind_reg_set_impl): Call raw_supply.
13330         (jit_frame_sniffer): Use reg_buffer_rw.
13331         * record-full.c (record_full_core_regbuf): Change its type.
13332         (record_full_core_open_1): Use reg_buffer_rw.
13333         (record_full_close): Likewise.
13334         (record_full_core_fetch_registers): Use regcache->raw_supply.
13335         (record_full_core_store_registers): Likewise.
13336         * regcache.c (regcache::get_register_status): Move it to
13337         reg_buffer.
13338         (regcache_raw_set_cached_value): Remove.
13339         (regcache::raw_set_cached_value): Remove.
13340         (regcache::raw_write): Call raw_supply.
13341         (regcache::raw_supply): Move it to reg_buffer_rw.
13342         * regcache.h (regcache_raw_set_cached_value): Remove.
13343         (reg_buffer_rw): New class.
13344
13345 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13346
13347         * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
13348         readonly_detached_regcache.
13349         (dummy_frame_prev_register): Use regcache->cooked_read.
13350         * frame.c (frame_save_as_regcache): Change return type.
13351         (frame_pop): Update.
13352         * frame.h (frame_save_as_regcache): Update declaration.
13353         * inferior.h (get_infcall_suspend_state_regcache): Update
13354         declaration.
13355         * infrun.c (infcall_suspend_state) <registers>: use
13356         readonly_detached_regcache.
13357         (save_infcall_suspend_state): Don't use regcache_dup.
13358         (get_infcall_suspend_state_regcache): Change return type.
13359         * linux-fork.c (struct fork_info) <savedregs>: Change to
13360         readonly_detached_regcache.
13361         <pc>: New field.
13362         (fork_save_infrun_state): Don't use regcache_dup.
13363         (info_checkpoints_command): Adjust.
13364         * mi/mi-main.c (register_changed_p): Update declaration.
13365         (mi_cmd_data_list_changed_registers): Use
13366         readonly_detached_regcache.
13367         (register_changed_p): Change parameter type to
13368         readonly_detached_regcache.
13369         * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
13370         readonly_detached_regcache.
13371         (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
13372         * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
13373         New.
13374         (regcache::save): Move it to reg_buffer.
13375         (regcache::restore): Change parameter type.
13376         (regcache_dup): Remove.
13377         * regcache.h (reg_buffer) <save>: New method.
13378         (readonly_detached_regcache): New class.
13379         * spu-tdep.c (spu2ppu_cache) <regcache>: Use
13380         readonly_detached_regcache.
13381         (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
13382
13383 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13384
13385         * frame.c (frame_save_as_regcache): Use regcache method save.
13386         (frame_pop): Use regcache method restore.
13387         * infrun.c (restore_infcall_suspend_state): Likewise.
13388         * linux-fork.c (fork_load_infrun_state): Likewise.
13389         * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
13390         save.
13391         * regcache.c (regcache_save): Remove.
13392         (regcache::restore): More asserts.
13393         (regcache_cpy): Remove.
13394         * regcache.h (regcache_save): Remove the declaration.
13395         (regcache::restore): Move from private to public.
13396         Remove the friend declaration of regcache_cpy.
13397         (regcache_cpy): Remove declaration.
13398
13399 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13400
13401         * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
13402         parameter type to 'readable_regcache *'.
13403         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
13404         * arm-tdep.c (arm_neon_quad_read): Likewise.
13405         (arm_pseudo_read): Likewise.
13406         * avr-tdep.c (avr_pseudo_register_read): Likewise.
13407         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
13408         * frv-tdep.c (frv_pseudo_register_read): Likewise.
13409         * gdbarch.c: Re-generated.
13410         * gdbarch.h: Re-generated.
13411         * gdbarch.sh (pseudo_register_read): Change parameter type to
13412         'readable_regcache *'.
13413         (pseudo_register_read_value): Likewise.
13414         * h8300-tdep.c (pseudo_from_raw_register): Likewise.
13415         (h8300_pseudo_register_read): Likewise.
13416         * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
13417         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
13418         (i386_pseudo_register_read_into_value): Likewise.
13419         (i386_pseudo_register_read_value): Likewise.
13420         * i386-tdep.h (i386_pseudo_register_read_into_value): Update
13421         declaration.
13422         * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
13423         * m32c-tdep.c (m32c_raw_read): Likewise.
13424         (m32c_read_flg): Likewise.
13425         (m32c_banked_register): Likewise.
13426         (m32c_banked_read): Likewise.
13427         (m32c_sb_read): Likewise.
13428         (m32c_part_read): Likewise.
13429         (m32c_cat_read): Likewise.
13430         (m32c_r3r2r1r0_read): Likewise.
13431         (m32c_pseudo_register_read): Likewise.
13432         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
13433         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
13434         (mep_pseudo_cr64_read): Likewise.
13435         (mep_pseudo_register_read): Likewise.
13436         * mips-tdep.c (mips_pseudo_register_read): Likewise.
13437         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
13438         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
13439         * regcache.c (regcache::raw_read): Move it to readable_regcache.
13440         (regcache::cooked_read): Likewise.
13441         (regcache::cooked_read_value): Likewise.
13442         (regcache_cooked_read_signed):
13443         (regcache::cooked_read): Likewise.
13444         * regcache.h (readable_regcache): New class.
13445         (regcache): Inherit readable_regcache.  Move some methods to
13446         readable_regcache.
13447         * rl78-tdep.c (rl78_pseudo_register_read): Change
13448         parameter type to 'readable_regcache *'.
13449         * rs6000-tdep.c (do_regcache_raw_read): Remove.
13450         (e500_pseudo_register_read): Change parameter type to
13451         'readable_regcache *'.
13452         (dfp_pseudo_register_read): Likewise.
13453         (vsx_pseudo_register_read): Likewise.
13454         (efpr_pseudo_register_read): Likewise.
13455         * s390-tdep.c (s390_pseudo_register_read): Likewise.
13456         * sh-tdep.c (sh_pseudo_register_read): Likewise.
13457         * sh64-tdep.c (pseudo_register_read_portions): Likewise.
13458         (sh64_pseudo_register_read): Likewise.
13459         * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
13460         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
13461         * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
13462         (spu_pseudo_register_read): Likewise.
13463         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
13464         (xtensa_pseudo_register_read): Likewise.
13465
13466 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13467
13468         * regcache.c (regcache::regcache): Call reg_buffer ctor.
13469         (regcache::arch): Move it to reg_buffer::arch.
13470         (regcache::register_buffer): Likewise.
13471         (regcache::assert_regnum): Likewise.
13472         (regcache::num_raw_registers): Likewise.
13473         * regcache.h (reg_buffer): New class.
13474         (regcache): Inherit reg_buffer.
13475
13476 2018-02-20  Simon Marchi  <simon.marchi@ericsson.com>
13477
13478         * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
13479         gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
13480
13481 2018-02-20  Markus Metzger  <markus.t.metzger@intel.com>
13482
13483         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
13484
13485 2018-02-19  Alan Hayward  <alan.hayward@arm.com>
13486
13487         * Makefile.in: (COMMON_SFILES): Add common/*.c files.
13488         (SFILES): Remove common/*.c files.
13489         (COMMON_OBS): Remove some *.o files built from common/*.c files.
13490         * common/common.host: Add common reference.
13491         * configure.ac: Likewise.
13492         * configure: Regenerate.
13493
13494 2018-02-16  Yao Qi  <yao.qi@linaro.org>
13495
13496         * block.c (block_namespace_info): Inherit allocate_on_obstack.
13497         (block_initialize_namespace): Use new.
13498         * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
13499         (dwarf2_free_objfile): Use delete.
13500         * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
13501         (copy_type_recursive): Use new.
13502         * gdb_obstack.h (allocate_on_obstack): New.
13503
13504 2018-02-15  Yao Qi  <yao.qi@linaro.org>
13505
13506         PR gdb/22849
13507         * inferior.c (exit_inferior_1): Reset inf->control.
13508
13509 2018-02-15  Joel Brobecker  <brobecker@adacore.com>
13510
13511         * ada-lang.c (ada_to_fixed_value_create): Delete advance
13512         declaration.
13513
13514 2018-02-14  Pedro Alves  <palves@redhat.com>
13515
13516         * frame-unwind.c (frame_unwind_try_unwinder): Always call
13517         frame_cleanup_after_sniffer on exception.
13518
13519 2018-02-14  Tom Tromey  <tom@tromey.com>
13520
13521         * solist.h (struct target_so_ops) <bfd_open>: Make pathname
13522         const.
13523         (solib_bfd_open): Make pathname const.
13524         * solib.c (solib_bfd_open): Make pathname const.
13525         * solib-spu.c (spu_bfd_fopen): Make name const.
13526         (spu_bfd_open): Make pathname const.
13527         * solib-darwin.c (darwin_bfd_open): Make pathname const.
13528         * solib-aix.c (solib_aix_bfd_open): Make pathname const.
13529
13530 2018-02-14  Tom Tromey  <tom@tromey.com>
13531
13532         * symfile.c (symfile_bfd_open): Update.
13533         * source.h (openp, source_full_path_of, find_and_open_source):
13534         Change argument type to unique_xmalloc_ptr.
13535         * source.c (openp): Take a unique_xmalloc_ptr.
13536         (source_full_path_of, find_and_open_source): Likewise.
13537         (open_source_file, symtab_to_fullname): Update.
13538         * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
13539         unique_xmalloc_ptr.
13540         * solib.c (solib_find_1): Use unique_xmalloc_ptr.
13541         (exec_file_find): Update.
13542         * psymtab.c (psymtab_to_fullname): Update.
13543         * nto-tdep.h (nto_find_and_open_solib): Update.
13544         * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
13545         unique_xmalloc_ptr.
13546         * exec.c (exec_file_attach): Update.
13547         * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
13548         * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
13549
13550 2018-02-14  Tom Tromey  <tom@tromey.com>
13551
13552         * solib.c: Include source.h.
13553         * nto-tdep.c: Include source.h.
13554         * mi/mi-cmd-env.c: Include source.h.
13555         * infcmd.c: Include source.h.
13556         * exec.c: Include source.h.
13557         * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
13558         (add_path, directory_switch, source_path, init_source_path): Move
13559         declarations...
13560         * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
13561         (add_path, directory_switch, source_path, init_source_path):
13562         ...here.
13563
13564 2018-02-14  Tom Tromey  <tom@tromey.com>
13565
13566         * solist.h (exec_file_find, solib_find): Return
13567         unique_xmalloc_ptr.
13568         (solib_bfd_fopen): Take a const char *.
13569         * solib.c (solib_find_1): Return unique_xmalloc_ptr.
13570         (exec_file_find, solib_find): Likewise.
13571         (solib_bfd_fopen): Do not take ownership of "pathname".
13572         (solib_bfd_open): Use unique_xmalloc_ptr.
13573         * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
13574         * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
13575         * infrun.c (follow_exec): Use unique_xmalloc_ptr.
13576         * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
13577
13578 2018-02-14  Joel Brobecker  <brobecker@adacore.com>
13579
13580         * ada-lang.c (name_match_type_from_name): Remove reference to
13581         ada_name_for_lookup in function's documentation.
13582         * ada-lang.h (ada_name_for_lookup): Delete declaration.
13583
13584 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
13585
13586         * defs.h (enum openp_flags): New enum.
13587         (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
13588         Move to enum openp_flags.
13589         (openp_flags): New enum flags.
13590         (openp): Change parameter type to openp_flags.
13591         * source.c (openp): Change parameter type to openp_flags.
13592         * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
13593         * dwarf2read.c (try_open_dwop_file): Use openp_flags.
13594
13595 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
13596
13597         * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
13598         per-command.
13599
13600 2018-02-12  Andrew Burgess  <andrew.burgess@embecosm.com>
13601
13602         * dwarf2read.c (dwarf2_release_queue): Delete function, move body
13603         into...
13604         (class dwarf2_queue_guard): ...the destructor of this new class.
13605         (dw2_do_instantiate_symtab): Create instance of the new class
13606         dwarf2_queue_guard, remove cleanup.
13607
13608 2018-02-09  Tom Tromey  <tom@tromey.com>
13609
13610         * source.c (find_source_lines): Don't reference past the end of
13611         the vector.
13612
13613 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13614
13615         * remote.c (remote_btrace_maybe_reopen): Change error message.
13616         * btrace.c (btrace_enable): Likewise.
13617         (parse_xml_btrace): Likewise.
13618         (parse_xml_btrace_conf): Likewise.
13619
13620 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13621
13622         * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
13623         (linux_enable_pt, linux_enable_bts): Call
13624         diagnose_perf_event_open_fail.
13625
13626 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13627
13628         * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
13629         Remove parameter and change return type.  Update callers.  Move it.
13630         (linux_enable_bts, linux_enable_pt): Improve error message.
13631         (linux_enable_pt): Remove zero buffer size check.
13632         (linux_enable_btrace): Improve error messages.  Remove NULL return
13633         check.
13634
13635 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13636
13637         * btrace.c (btrace_enable): Remove target_supports_btrace call.
13638         * nat/linux-btrace.c (perf_event_pt_event_type): Move.
13639         (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
13640         (linux_supports_pt, linux_supports_btrace): Remove.
13641         (linux_enable_bts): Call cpu_supports_bts.
13642         * nat/linux-btrace.h (linux_supports_btrace): Remove.
13643         * remote.c (remote_supports_btrace): Remove.
13644         (init_remote_ops): Remove remote_supports_btrace.
13645         * target-delegates.c: Regenerated.
13646         * target.c (target_supports_btrace): Remove.
13647         * target.h (target_ops) <to_supports_btrace>: Remove
13648         (target_supports_btrace): Remove.
13649         * x86-linux-nat.c (x86_linux_create_target): Remove
13650         linux_supports_btrace.
13651
13652 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13653
13654         * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
13655         btrace failed.
13656         * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
13657         exception and use message in own exception.
13658
13659 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13660
13661         * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
13662         (perf_event_pt_event_type): Use gdb_file_up.
13663         (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
13664         scoped_fd, and scoped_mmap.
13665
13666 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13667
13668         * common/scoped_mmap.h: New.
13669         * unittests/scoped_mmap-selftest.c: New.
13670         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13671         unittests/scoped_mmap-selftest.c.
13672
13673 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13674
13675         * common/scoped_fd.h: New.
13676         * unittests/scoped_fd-selftest.c: New.
13677         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13678         unittests/scoped_fd-selftest.c.
13679
13680 2018-02-09  Tom Tromey  <tom@tromey.com>
13681
13682         * auto-load.c (auto_load_section_scripts): Use
13683         gdb::unique_xmalloc_ptr.
13684
13685 2018-02-09  Tom Tromey  <tom@tromey.com>
13686
13687         * auto-load.c (execute_script_contents): Use std::string.
13688
13689 2018-02-09  Joel Brobecker  <brobecker@adacore.com>
13690
13691         * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
13692         Python function, rather than a new command.
13693
13694 2018-02-08  Tom Tromey  <tom@tromey.com>
13695
13696         * solib.c (solib_find_1): Use std::string.
13697         (solib_bfd_fopen): Use unique_xmalloc_ptr.
13698
13699 2018-02-08  Tom Tromey  <tom@tromey.com>
13700
13701         * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
13702
13703 2018-02-08  Tom Tromey  <tom@tromey.com>
13704
13705         * source.c (find_source_lines): Use gdb::def_vector.
13706
13707 2018-02-08  Tom Tromey  <tom@tromey.com>
13708
13709         * macrocmd.c (struct temporary_macro_definition): New.
13710         (macro_define_command): Use temporary_macro_definition.  Remove
13711         cleanups.
13712         (free_macro_definition_ptr): Remove.
13713
13714 2018-02-08  Tom Tromey  <tom@tromey.com>
13715
13716         * macroexp.c (maybe_expand): Use std::string.
13717
13718 2018-02-08  Tom Tromey  <tom@tromey.com>
13719
13720         * macroexp.c (struct macro_buffer): Add initializers for some
13721         members.
13722         (init_buffer, init_shared_buffer, free_buffer)
13723         (free_buffer_return_text): Remove.
13724         (macro_buffer): New constructors.
13725         (~macro_buffer): New destructor.
13726         (macro_buffer::set_shared): New method.
13727         (macro_buffer::resize_buffer, macro_buffer::appendc)
13728         (macro_buffer::appendmem): Now methods, not free functions.
13729         (set_token, append_tokens_without_splicing, stringify)
13730         (macro_stringify): Update.
13731         (gather_arguments): Change return type.  Remove argc_p argument,
13732         add args_ptr argument.  Use std::vector.
13733         (substitute_args): Remove argc argument.  Accept std::vector.
13734         (expand): Update.  Use std::vector.
13735         (scan, macro_expand, macro_expand_next): Update.
13736
13737 2018-02-08  Tom Tromey  <tom@tromey.com>
13738
13739         * symtab.c (default_collect_symbol_completion_matches_break_on):
13740         Use unique_xmalloc_ptr.
13741         * macroscope.h: (sal_macro_scope, user_macro_scope)
13742         (default_macro_scope): Return unique_xmalloc_ptr.
13743         * macroscope.c (sal_macro_scope, user_macro_scope)
13744         (default_macro_scope): Return unique_xmalloc_ptr.
13745         * macroexp.h (macro_expand, macro_expand_once): Return
13746         unique_xmalloc_ptr.
13747         * macroexp.c (macro_expand, macro_expand_once): Return
13748         unique_xmalloc_ptr.
13749         * macrocmd.c (macro_expand_command, macro_expand_once_command)
13750         (info_macro_command, info_macros_command): Use
13751         unique_xmalloc_ptr.
13752         * compile/compile-c-support.c (write_macro_definitions): Use
13753         unique_xmalloc_ptr.
13754         * c-exp.y (c_parse): Use unique_xmalloc_ptr.
13755
13756 2018-02-07  Simon Marchi  <simon.marchi@ericsson.com>
13757
13758         * value.c (value_static_field): Assign field type instead of
13759         containing type when returning an optimized out value.
13760
13761 2018-02-06  Yao Qi  <yao.qi@linaro.org>
13762
13763         * ft32-tdep.c (ft32_read_pc): Remove.
13764         (ft32_write_pc): Remove.
13765         (ft32_gdbarch_init): Update.
13766         * m32r-tdep.c (m32r_read_pc): Remove.
13767         (m32r_gdbarch_init): Update.
13768         * mep-tdep.c (mep_read_pc): Remove.
13769         (mep_gdbarch_init): Update.
13770         * microblaze-tdep.c (microblaze_write_pc): Remove.
13771         (microblaze_gdbarch_init): Update.
13772         * mn10300-tdep.c (mn10300_read_pc): Remove.
13773         (mn10300_write_pc): Remove.
13774         (mn10300_gdbarch_init): Update.
13775         * moxie-tdep.c (moxie_read_pc): Remove.
13776         (moxie_write_pc): Remove.
13777         (moxie_gdbarch_init): Update.
13778
13779 2018-02-06  Yao Qi  <yao.qi@linaro.org>
13780
13781         * expprint.c (print_subexp_standard): Handle
13782         OP_F77_UNDETERMINED_ARGLIST.
13783         (dump_subexp_body_standard): Likewise.
13784
13785 2018-02-05  Alan Hayward  <alan.hayward@arm.com>
13786
13787         * target-descriptions.c (tdesc_element_visitor) Add empty
13788         implementations.
13789         (tdesc_type): Move make_gdb_type from here.
13790         (tdesc_type_builtin): Likewise.
13791         (tdesc_type_vector): Likewise.
13792         (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
13793         (make_gdb_type_struct): Move from tdesc_type_with_fields.
13794         (make_gdb_type_union): Likewise.
13795         (make_gdb_type_flags): Likewise.
13796         (make_gdb_type_enum): Likewise.
13797         (make_gdb_type): New function.
13798         (tdesc_register_type): Use static make_gdb_type.
13799
13800 2018-02-05  Ruslan Kabatsayev <b7.10110111@gmail.com>
13801
13802         * infcmd.c (default_print_one_register_info): Align natural-format
13803         column values consistently one under another.
13804         (pad_to_column): New function.
13805
13806 2018-02-05  Joel Brobecker  <brobecker@adacore.com>
13807
13808         * dwarf2read.c (dwarf2_physname): Move commment.
13809
13810 2018-02-01  Leszek Swirski  <leszeks@google.com>
13811
13812         * varobj.c (varobj_formatted_print_options): Allow recursive
13813         pretty printing if pretty printing is enabled.
13814
13815 2018-02-01  Leszek Swirski  <leszeks@google.com>
13816
13817         * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
13818         names after a structop as a filename.
13819
13820 2018-02-01  Yao Qi  <yao.qi@linaro.org>
13821
13822         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
13823         (arm_record_coproc_data_proc): Likewise.
13824
13825 2018-02-01  Yao Qi  <yao.qi@linaro.org>
13826
13827         * arm-tdep.c (arm_record_extension_space): Change ret to signed.
13828
13829 2018-01-31  Nikola Prica  <nikola.prica@rt-rk.com>
13830
13831         * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
13832         assign shifted lr_reg to fdata->lr_register when lr_reg is set.
13833
13834 2018-01-31  Pedro Alves  <palves@redhat.com>
13835
13836         * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
13837         * inflow.c (child_terminal_save_inferior): Wrap reference to
13838         tcgetpgrp in HAVE_TERMIOS_H.
13839         (child_interrupt, child_pass_ctrlc): Wrap references to signal in
13840         _WIN32.
13841         * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
13842         always iterate over all inferiors.
13843         (gdbsim_cntrl_c): Adjust.
13844         * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
13845
13846 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
13847
13848         * gdbtypes.c (lookup_array_range_type): Make sure the array's
13849         index type is objfile-owned if the element type is as well.
13850
13851 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
13852
13853         GDB 8.1 released.
13854
13855 2018-01-30  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13856
13857         * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
13858         "features/s390x-linux64.c".
13859         (_initialize_s390_linux_tdep): Remove initialization of tdescs
13860         s390_linux32 and s390x_linux64.
13861         (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
13862         default tdesc.
13863         * s390-tdep.c: Include "features/s390-linux32.c" and
13864         "features/s390x-linux64.c".
13865         (s390_tdesc_valid): Add check for tdesc_has_registers.
13866         (s390_gdbarch_init): Make sure there is always a valid tdesc.
13867         (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
13868         tdesc_s390x_linux64.
13869         * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
13870         tdesc_s390x_linux64 to...
13871         * s390-tdep.h: ...here.
13872
13873 2018-01-30  Pedro Alves  <palves@redhat.com>
13874
13875         PR gdb/13211
13876         * config.in, configure: Regenerate.
13877         * configure.ac: Check for getpgid.
13878         * go32-nat.c (go32_pass_ctrlc): New.
13879         (go32_target): Install it.
13880         * inf-child.c (inf_child_target): Install
13881         child_terminal_save_inferior, child_pass_ctrlc and
13882         child_interrupt.
13883         * inf-ptrace.c (inf_ptrace_interrupt): Delete.
13884         (inf_ptrace_target): No longer install it.
13885         * infcmd.c (interrupt_target_1): Adjust.
13886         * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
13887         (child_interrupt): Declare.
13888         (inferior::terminal_state): New.
13889         * inflow.c (struct terminal_info): Update comments.
13890         (inferior_process_group): Delete.
13891         (terminal_is_ours): Delete.
13892         (gdb_tty_state): New.
13893         (child_terminal_init): Adjust.
13894         (is_gdb_terminal, sharing_input_terminal_1)
13895         (sharing_input_terminal): New functions.
13896         (child_terminal_inferior): Adjust.  Use sharing_input_terminal.
13897         Set the process's actual process group in the foreground if
13898         possible.  Handle is_ours_for_output/is_ours distinction.  Don't
13899         mark terminal as the inferior's if not sharing GDB's terminal.
13900         Don't check attach_flag.
13901         (child_terminal_ours_for_output, child_terminal_ours): Adjust to
13902         pass down a target_terminal_state.
13903         (child_terminal_save_inferior): New, factored out from ...
13904         (child_terminal_ours_1): ... this.  Handle
13905         target_terminal_state::is_ours_for_output.
13906         (child_interrupt, child_pass_ctrlc): New.
13907         (inflow_inferior_exit): Clear the inferior's terminal_state.
13908         (copy_terminal_info): Copy the inferior's terminal state.
13909         (_initialize_inflow): Remove reference to terminal_is_ours.
13910         * inflow.h (inferior_process_group): Delete.
13911         * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
13912         * procfs.c (procfs_target): Don't install procfs_interrupt.
13913         (procfs_interrupt): Delete.
13914         * remote.c (remote_serial_quit_handler): Adjust.
13915         (remote_interrupt): Remove ptid parameter.  Adjust.
13916         * target-delegates.c: Regenerate.
13917         * target.c: Include "terminal.h".
13918         (target_terminal::terminal_state): Rename to ...
13919         (target_terminal::m_terminal_state): ... this.
13920         (target_terminal::init): Adjust.
13921         (target_terminal::inferior): Adjust to per-inferior
13922         terminal_state.
13923         (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
13924         (target_terminal::ours, target_terminal::ours_for_output): Use
13925         target_terminal_is_ours_kind.
13926         (target_interrupt): Remove ptid parameter.  Adjust.
13927         (default_target_pass_ctrlc): Adjust.
13928         * target.h (target_ops::to_terminal_save_inferior): New field.
13929         (target_ops::to_interrupt): Remove ptid_t parameter.
13930         (target_interrupt): Remove ptid_t parameter.  Update comment.
13931         (target_pass_ctrlc): Update comment.
13932         * target/target.h (target_terminal_state): New scoped enum,
13933         factored out of ...
13934         (target_terminal::terminal_state): ... here.
13935         (target_terminal::inferior): Update comments.
13936         (target_terminal::restore_inferior): New.
13937         (target_terminal::is_inferior, target_terminal::is_ours)
13938         (target_terminal::is_ours_for_output): Adjust.
13939         (target_terminal::scoped_restore_terminal_state): Adjust to
13940         rename, and call restore_inferior() instead of inferior().
13941         (target_terminal::scoped_restore_terminal_state::m_state): Change
13942         type.
13943         (target_terminal::terminal_state): Rename to ...
13944         (target_terminal::m_terminal_state): ... this and change type.
13945
13946 2018-01-30  Pedro Alves  <palves@redhat.com>
13947
13948         * linux-nat.c (wait_for_signal): New function.
13949         (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
13950         directly.
13951         (async_terminal_is_ours)
13952         (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
13953         (linux_nat_add_target): Don't override
13954         to_terminal_inferior/to_terminal_ours.
13955
13956 2018-01-29  Sergio Durigan Junior  <sergiodj@redhat.com>
13957
13958         * remote.c (remote_follow_fork): Don't call "detach_inferior".
13959
13960 2018-01-28  Simon Marchi  <simon.marchi@ericsson.com>
13961
13962         * dwarf2read.c (free_dwo_files): Add forward-declaration.
13963         (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
13964         dwarf2_per_objfile_free here.
13965         (dwarf2_per_objfile_free): Remove.
13966         (_initialize_dwarf2_read): Don't register
13967         dwarf2_per_objfile_free as a registry cleanup.
13968
13969 2018-01-27  Eli Zaretskii  <eliz@gnu.org>
13970
13971         Avoid compilation errors in MinGW native builds
13972
13973         The error is triggered by including python-internal.h, and the
13974         error message is:
13975
13976              In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
13977                       from build-gnulib/import/math.h:27,
13978                       from d:/usr/Python26/include/pyport.h:235,
13979                       from d:/usr/Python26/include/Python.h:58,
13980                       from python/python-internal.h:94,
13981                       from python/py-arch.c:24:
13982              d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
13983         using ::hypot;
13984                 ^~~~~
13985
13986         This happens because Python headers define 'hypot' to expand t
13987         '_hypot' in the Windows builds.
13988         * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
13989         'hypoth'.  This avoids a compilation error.
13990
13991 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
13992
13993         * MAINTAINERS (Write After Approval): Fix ordering.
13994
13995 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
13996
13997         * MAINTAINERS (Write After Approval): Add Alan Hayward.
13998
13999 2018-01-26  Alan Modra  <amodra@gmail.com>
14000
14001         * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
14002         (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
14003         Remove nop.  Make const.  Comment.
14004         (powerpc32_plt_stub_so_2): New.
14005         (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
14006         Correct count.  Update uses.
14007         (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
14008         Move common code reading PLT entry word.  Correct
14009         powerpc32_plt_stub PLT address calculation.
14010         * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
14011         (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
14012         (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
14013         (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
14014         (ppc64_standard_linkage8): Likewise.
14015         * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
14016         Correct insns description.
14017         * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
14018
14019 2018-01-24  Pedro Alves  <palves@redhat.com>
14020
14021         GCC PR libstdc++/83906
14022         * gdbtypes.c (operator==(const dynamic_prop &,
14023         const dynamic_prop &)): New.
14024         (operator==(const range_bounds &, const range_bounds &)): New.
14025         (check_types_equal): Use them instead of memcmp.
14026         * gdbtypes.h (operator==(const dynamic_prop &,
14027         const dynamic_prop &)): Declare.
14028         (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
14029         (operator==(const range_bounds &, const range_bounds &)): Declare.
14030         (operator!=(const range_bounds &, const range_bounds &)): Declare.
14031
14032 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14033
14034         * s390-linux-tdep.c (s390_record_address_mask)
14035         (s390_record_calc_disp_common, s390_record_calc_disp)
14036         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
14037         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
14038         (s390_process_record): Move to s390-tdep.c.
14039         (s390_linux_init_abi_any): Adjust.
14040         * s390-tdep.c (s390_record_address_mask)
14041         (s390_record_calc_disp_common, s390_record_calc_disp)
14042         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
14043         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
14044         (s390_process_record): Moved from s390-linux-tdep.c
14045         (s390_gdbarch_init): Adjust.
14046
14047 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14048
14049         * s390-linux-nat.c (s390-tdep.h): New include.
14050         * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
14051         (HFILES_NO_SRCDIR): Add s390-tdep.h.
14052         (ALLDEPFILES): Add s390-tdep.c.
14053         * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
14054         * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
14055         * s390-tdep.h: ...this.  New file.
14056         * s390-linux-tdep.c (s390-tdep.h): New include.
14057         (_initialize_s390_tdep): Rename to...
14058         (_initialize_s390_linux_tdep): ...this and adjust.
14059         (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
14060         (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
14061         s390-tdep.h.
14062         (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
14063         (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
14064         (s390_is_partial_instruction, s390_software_single_step)
14065         (is_non_branch_ril, s390_displaced_step_copy_insn)
14066         (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
14067         (s390_prologue_data, s390_addr, s390_store, s390_load)
14068         (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
14069         (s390_register_call_saved, s390_guess_tracepoint_registers)
14070         (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
14071         (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
14072         (s390_pseudo_register_name, s390_pseudo_register_type)
14073         (s390_pseudo_register_read, s390_pseudo_register_write)
14074         (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
14075         (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
14076         (s390_addr_bits_remove, s390_address_class_type_flags)
14077         (s390_address_class_type_flags_to_name)
14078         (s390_address_class_name_to_type_flags, s390_effective_inner_type)
14079         (s390_function_arg_float, s390_function_arg_vector)
14080         (is_power_of_two, s390_function_arg_integer, s390_arg_state)
14081         (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
14082         (s390_frame_align, s390_register_return_value, s390_return_value)
14083         (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
14084         (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
14085         (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
14086         (s390_trad_frame_prev_register, s390_unwind_cache)
14087         (s390_prologue_frame_unwind_cache)
14088         (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
14089         (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
14090         (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
14091         (s390_stub_frame_this_id, s390_stub_frame_prev_register)
14092         (s390_stub_frame_sniffer, s390_stub_frame_unwind)
14093         (s390_frame_base_address, s390_local_base_address)
14094         (s390_frame_base, s390_gcc_target_options)
14095         (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
14096         (s390_validate_reg_range, s390_tdesc_valid)
14097         (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
14098         * s390-tdep.c: ...this.  New file.
14099
14100 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14101
14102         * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
14103         (s390_process_record, s390_gdbarch_tdep_alloc)
14104         (s390_linux_init_abi_any): Use/set new hook.
14105
14106 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14107
14108         * s390-linux-tdep.c (osabi.h): New include.
14109         (s390_linux_init_abi_31, s390_linux_init_abi_64)
14110         (s390_linux_init_abi_any): New functions.
14111         (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
14112
14113 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14114
14115         * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
14116         tdesc_has_registers check
14117
14118 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14119
14120         * s390-linux-tdep.c (s390_tdesc_valid): New function.
14121         (s390_validate_reg_range): New macro.
14122         (s390_gdbarch_init): Adjust.
14123
14124 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14125
14126         * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
14127         (s390_gdbarch_tdep_alloc): Adjust.
14128         (s390_gdbarch_init): Adjust.
14129
14130 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14131
14132         * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
14133         <have_tdb>: Change type to bool.
14134         (s390_gdbarch_tdep_alloc): Adjust.
14135         (s390_gdbarch_init): Adjust.
14136
14137 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14138
14139         * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
14140         (gdbarch_tdep) <have_upper, have_vx>: New fields.
14141         (s390_gdbarch_tdep_alloc): New function.
14142         (s390_gdbarch_init): Allocate tdep at start and use its fields
14143         instead of separate variables.
14144
14145 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14146
14147         * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
14148         when looking for cached gdbarch and add comment for remaining.
14149
14150 2018-01-22  Pedro Alves  <palves@redhat.com>
14151             Sergio Durigan Junior  <sergiodj@redhat.com>
14152
14153         * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
14154         case.
14155
14156 2018-01-22  Maciej W. Rozycki  <macro@mips.com>
14157
14158         * MAINTAINERS: Update my company e-mail address.
14159
14160 2018-01-22  Yao Qi  <yao.qi@linaro.org>
14161
14162         * regcache.c (cooked_write_test): New function.
14163         (_initialize_regcache): Register the test.
14164
14165 2018-01-22  Yao Qi  <yao.qi@linaro.org>
14166
14167         * ia64-tdep.c (ia64_pseudo_register_read): Call
14168         regcache->cooked_read instead of regcache_cooked_read_unsigned.
14169         * m32c-tdep.c (m32c_cat_read): Likewise.
14170         (m32c_r3r2r1r0_read): Likewise.
14171         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
14172         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
14173
14174 2018-01-22  Yao Qi  <yao.qi@linaro.org>
14175
14176         * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
14177         method raw_read instead of regcache_raw_read.
14178         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
14179         * arm-tdep.c (arm_neon_quad_read): Likewise.
14180         * avr-tdep.c (avr_pseudo_register_read): Likewise.
14181         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
14182         * frv-tdep.c (frv_pseudo_register_read): Likewise.
14183         * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
14184         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
14185         (i386_pseudo_register_read_into_value): Likewise.
14186         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
14187         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
14188         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
14189         * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
14190         * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
14191         * sparc-tdep.c (sparc32_pseudo_register_read):  Likewise.
14192         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
14193         * spu-tdep.c (spu_pseudo_register_read_spu):  Likewise.
14194         * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
14195
14196 2018-01-22  Yao Qi  <yao.qi@linaro.org>
14197
14198         * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
14199         * configure.tgt: Remove target mt.
14200         * mt-tdep.c: Remove.
14201         * regcache.c (cooked_read_test): Remove the check for mt.
14202
14203 2018-01-22  Yao Qi  <yao.qi@linaro.org>
14204
14205         * jit.c (jit_frame_prev_register): Call regcache::cooked_read
14206         instead of gdbarch_pseudo_register_read_value.
14207
14208 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
14209
14210         * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
14211         language is Ada.
14212
14213 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
14214
14215         * linespec.c (create_sals_line_offset): Remove code that preserved
14216         the symtab_and_line's line number.
14217
14218 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
14219
14220         * varobj.c (varobj_create): Don't set valid_block when creating a
14221         floating varobj.
14222
14223 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
14224
14225         * varobj.c (varobj_create): Remove out of date comment.
14226
14227 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
14228
14229         PR mi/20395
14230         * ada-exp.y (write_var_from_sym): Pass extra parameter when
14231         updating innermost block.
14232         * parse.c (innermost_block_tracker::update): Take extra type
14233         parameter, and check types match before updating innermost block.
14234         (write_dollar_variable): Update innermost block for registers.
14235         * parser-defs.h (enum innermost_block_tracker_type): New enum.
14236         (innermost_block_tracker::innermost_block_tracker): Initialise
14237         m_types member.
14238         (innermost_block_tracker::reset): Take type parameter.
14239         (innermost_block_tracker::update): Take type parameter, and pass
14240         type through as needed.
14241         (innermost_block_tracker::m_types): New member.
14242         * varobj.c (varobj_create): Pass type when reseting innermost
14243         block.
14244
14245 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
14246
14247         * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
14248         * ada-lang.c (resolve_subexp): Likewise.
14249         * breakpoint.c (set_breakpoint_condition) Likewise.
14250         (watch_command_1) Likewise.
14251         * c-exp.y (variable): Likewise.
14252         * d-exp.y (PrimaryExpression): Likewise.
14253         * f-exp.y (variable): Likewise.
14254         * go-exp.y (variable): Likewise.
14255         * m2-exp.y (variable): Likewise.
14256         * objfiles.c (objfile::~objfile): Likewise.
14257         * p-exp.y (variable): Likewise.
14258         * parse.c (innermost_block): Change type.
14259         * parser-defs.h (class innermost_block_tracker): New.
14260         (innermost_block): Change to innermost_block_tracker.
14261         * printcmd.c (display_command): Switch to innermost_block API.
14262         (do_one_display): Likewise.
14263         * rust-exp.y (do_one_display): Likewise.
14264         * symfile.c (clear_symtab_users): Likewise.
14265         * varobj.c (varobj_create): Switch to innermost_block API, replace
14266         use of innermost_block with block stored on varobj object.
14267
14268 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
14269
14270         * expression.h (innermost_block): Remove declaration.
14271         * varobj.c: Add 'parser-defs.h' include.
14272
14273 2018-01-19  Tom Tromey  <tom@tromey.com>
14274
14275         * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
14276         symbols in the static and global blocks.
14277
14278 2018-01-19  James Clarke  <jrtc27@jrtc27.com>
14279
14280         * nat/linux-ptrace.c: Remove unnecessary reinclusion of
14281         gdb_ptrace.h, and move including gdb_wait.h ...
14282         * nat/linux-ptrace.h: ... to here.
14283
14284 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
14285
14286         * inf-ptrace.c (inf_ptrace_detach): Adjust call to
14287         inf_ptrace_detach_success.
14288         (inf_ptrace_detach_success): Add inferior parameter, use it
14289         instead of inferior_ptid, pass it to detach_inferior.
14290         * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
14291         parameter.
14292         * inferior.c (detach_inferior): Add overload that takes an
14293         inferior object.
14294         * inferior.h (detach_inferior): Likewise.
14295         * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
14296         use inferior_ptid, adjust call to inf_ptrace_detach_success.
14297         * linux-thread-db.c (thread_db_detach): Use inf parameter.
14298
14299 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
14300
14301         * target.h (struct target_ops) <to_detach>: Add inferior
14302         parameter.
14303         (target_detach): Likewise.
14304         * target.c (dispose_inferior): Pass inferior down.
14305         (target_detach): Pass inferior down.  Assert that it is equal to
14306         the current inferior.
14307         * aix-thread.c (aix_thread_detach): Pass inferior down.
14308         * corefile.c (core_file_command): Pass current_inferior() down.
14309         * corelow.c (core_detach): Add inferior parameter.
14310         * darwin-nat.c (darwin_detach): Likewise.
14311         * gnu-nat.c (gnu_detach): Likewise.
14312         * inf-ptrace.c (inf_ptrace_detach): Likewise.
14313         * infcmd.c (detach_command): Pass current_inferior() down to
14314         target_detach.
14315         * infrun.c (follow_fork_inferior): Pass parent_inf to
14316         target_detach.
14317         (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
14318         target_detach.
14319         * linux-nat.c (linux_nat_detach): Add inferior parameter.
14320         * linux-thread-db.c (thread_db_detach): Likewise.
14321         * nto-procfs.c (procfs_detach): Likewise.
14322         * procfs.c (procfs_detach): Likewise.
14323         * record.c (record_detach): Likewise.
14324         * record.h (struct inferior): Forward-declare.
14325         (record_detach): Add inferior parameter.
14326         * remote-sim.c (gdbsim_detach): Likewise.
14327         * remote.c (remote_detach_1): Likewise.
14328         (remote_detach): Likewise.
14329         (extended_remote_detach): Likewise.
14330         * sol-thread.c (sol_thread_detach): Likewise.
14331         * target-debug.h (target_debug_print_inferior_p): New macro.
14332         * target-delegates.c: Re-generate.
14333         * top.c (kill_or_detach): Pass inferior down to target_detach.
14334         * windows-nat.c (windows_detach): Add inferior parameter.
14335
14336 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
14337
14338         * target.h (struct target_ops) <to_detach>: Remove args
14339         parameter.
14340         (target_detach): Likewise.
14341         * target.c (dispose_inferior): Adjust.
14342         (target_detach): Remove args parameter, adjust.
14343         * aix-thread.c (aix_thread_detach): Adjust.
14344         * corefile.c (core_file_command): Adjust.
14345         * corelow.c (core_detach): Adjust.
14346         * darwin-nat.c (darwin_detach): Adjust.
14347         * gnu-nat.c (gnu_detach): Adjust.
14348         * inf-ptrace.c (inf_ptrace_detach): Adjust.
14349         * infcmd.c (detach_command): Adjust
14350         * infrun.c (follow_fork_inferior): Adjust.
14351         (handle_vfork_child_exec_or_exit): Adjust.
14352         * linux-fork.c (linux_fork_detach): Remove args parameter.
14353         * linux-fork.h (linux_fork_detach): Likewise.
14354         * linux-nat.c (linux_nat_detach): Likewise, and adjust.
14355         * linux-thread-db.c (thread_db_detach): Likewise.
14356         * nto-procfs.c (procfs_detach): Likewise.
14357         * procfs.c (procfs_detach): Likewise.
14358         (do_detach): Remove signo parameter.
14359         * record.c (record_detach): Remove args parameter.
14360         * record.h (record_detach): Likewise.
14361         * remote-sim.c (gdbsim_detach): Likewise.
14362         * remote.c (remote_detach_1): Likewise.
14363         (remote_detach): Likewise.
14364         (extended_remote_detach): Likewise.
14365         * sol-thread.c (sol_thread_detach): Likewise.
14366         * target-delegates.c: Re-generate.
14367         * top.c (struct qt_args) <args>: Remove field.
14368         (kill_or_detach): Don't pass args.
14369         (quit_force): Don't set args.
14370         * windows-nat.c (windows_detach): Remove args parameter.
14371
14372 2018-01-19  Yao Qi  <yao.qi@linaro.org>
14373
14374         * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
14375         (arm_linux_init_abi): Install it.
14376
14377 2018-01-19  Yao Qi  <yao.qi@linaro.org>
14378
14379         * osabi.c (gdb_osabi_names): Extend the regexp for
14380         arm-linux-gnueabihf.
14381
14382 2018-01-18  Yao Qi  <yao.qi@linaro.org>
14383
14384         * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
14385         m_abbrevs.
14386         (abbrev_table::add_abbrev): Update.
14387         (abbrev_table::lookup_abbrev): Update.
14388
14389 2018-01-18  Yao Qi  <yao.qi@linaro.org>
14390
14391         * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
14392
14393 2018-01-17  Sergio Durigan Junior  <sergiodj@redhat.com>
14394
14395         * compile/compile.c (compile_to_object): Convert "triplet_rx"
14396         to "std::string".
14397
14398 2018-01-17  Tom Tromey  <tom@tromey.com>
14399
14400         * dwarf2read.c (symbolp): Remove typedef.  Don't instantiate VEC.
14401
14402 2018-01-17  Tom Tromey  <tom@tromey.com>
14403
14404         * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
14405         * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
14406         (create_array_type_with_stride): Update.
14407         * dwarf2read.c (set_die_type): Update.
14408
14409 2018-01-17  Tom Tromey  <tom@tromey.com>
14410
14411         * dwarf2read.c (delayed_method_info): Remove typedef.
14412         (dwarf2_cu::method_info): Now a std::vector.
14413         (add_to_method_list): Update.
14414         (free_delayed_list): Remove.
14415         (compute_delayed_physnames): Update.
14416         (process_full_comp_unit, process_full_type_unit): Clear the method
14417         list.  Remove cleanups.
14418         (psymtab_include_file_name): Add name_holder parameter.  Use
14419         unique_xmalloc_ptr.
14420         (dwarf_decode_lines): Update.
14421
14422 2018-01-17  Tom Tromey  <tom@tromey.com>
14423             Simon Marchi  <simon.marchi@ericsson.com>
14424
14425         * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
14426         (dwarf2_per_objfile::free_cached_comp_units)
14427         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
14428         (init_cutu_and_read_dies_no_follow): Update.
14429         (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
14430         (dwarf2_cu::~dwarf2_cu): New.
14431         (free_heap_comp_unit, free_stack_comp_unit): Remove.
14432         (age_cached_comp_units, free_one_cached_comp_unit): Update.
14433
14434 2018-01-17  Tom Tromey  <tom@tromey.com>
14435             Simon Marchi  <simon.marchi@ericsson.com>
14436
14437         * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
14438         (struct die_reader_specs) <abbrev_table>: New member.
14439         (struct abbrev_table): Add constructor.
14440         <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
14441         <abbrev_obstack>: Now an auto_obstack.
14442         (abbrev_table_up): New typedef.
14443         (init_cu_die_reader): Add abbrev_table parameter.
14444         (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
14445         Add result_dwo_abbrev_table.
14446         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
14447         (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
14448         Update.
14449         (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
14450         parameter.
14451         (skip_children): Update.
14452         (abbrev_table::alloc_abbrev): Rename from
14453         abbrev_table_alloc_abbrev.
14454         (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
14455         (abbrev_table::lookup_abbrev): Rename from
14456         abbrev_table_lookup_abbrev.
14457         (abbrev_table_read_table): Return abbrev_table_up.
14458         (abbrev_table_free, abbrev_table_free_cleanup)
14459         (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
14460         (load_partial_dies): Update.
14461
14462 2018-01-17  Tom Tromey  <tom@tromey.com>
14463
14464         * dwarf2read.c (dwarf2_compute_name): Update comment.
14465         (read_func_scope, read_variable): Update.
14466         (new_symbol): Remove.
14467         (new_symbol_full): Rename to new_symbol.
14468
14469 2018-01-17  Mike Gulick  <mgulick@mathworks.com>
14470
14471         PR gdb/16577
14472         * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
14473         a warning instead of throwing an error, set section size to 0 and return
14474         NULL.
14475         * gdb_bfd.h (gdb_bfd_map_section): Update description.
14476
14477 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
14478
14479         * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
14480         std::string.
14481         (linux_ptrace_attach_fail_reason_string): Likewise.
14482         * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
14483         Likewise.
14484         (linux_ptrace_attach_fail_reason_string): Likewise.
14485         * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
14486
14487 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
14488
14489         * linux-nat.c (linux_nat_attach): Remove xstrdup.
14490
14491 2018-01-17  Eldar Abusalimov  <eldar.abusalimov@jetbrains.com>
14492
14493         PR gdb/21559
14494         * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
14495         checking for fs_base/gs_base fields in struct user_regs_struct.
14496         * configure: Regenerate.
14497
14498 2018-01-17  Yao Qi  <yao.qi@linaro.org>
14499
14500         * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
14501         function.
14502         (aarch64_linux_init_abi): Install it to gdbarch hook
14503         gcc_target_options.
14504
14505 2018-01-15  Pedro Alves  <palves@redhat.com>
14506
14507         * common/signals-state-save-restore.c
14508         (save_original_signals_state): Fix typos.
14509
14510 2017-01-12  Tom Tromey  <tom@tromey.com>
14511             Sergio Durigan Junior  <sergiodj@redhat.com>
14512
14513         * Makefile.in (install-only): Install gdb-add-index.
14514
14515 2018-01-12  John Baldwin  <jhb@FreeBSD.org>
14516
14517         * fbsd-tdep.c (KVE_PROTECTION): Correct value.
14518
14519 2018-01-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
14520
14521         * infrun.c (keep_going_pass_signal): Clear step-over info when
14522         insert_breakpoints fails.
14523
14524 2018-01-11  Pedro Alves  <palves@redhat.com>
14525
14526         PR gdb/22583
14527         * infrun.c (resume): Rename to ...
14528         (resume_1): ... this.
14529         (resume): Reimplement as wrapper around resume_1.
14530
14531 2018-01-11  Pedro Alves  <palves@redhat.com>
14532
14533         PR remote/22597
14534         * remote.c (remote_parse_stop_reply): Default to the last-set
14535         general thread instead of to 'magic_null_ptid'.
14536
14537 2018-01-10  Pedro Alves  <palves@redhat.com>
14538
14539         * language.h (language_get_symbol_name_matcher): Rename ...
14540         (get_symbol_name_matcher): ... this.
14541         * language.c (language_get_symbol_name_matcher): Ditto.
14542         * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
14543         callers adjusted.
14544
14545 2018-01-10  Pedro Alves  <palves@redhat.com>
14546
14547         PR gdb/22670
14548         * dwarf2read.c
14549         (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
14550         Adjust to use language_get_symbol_name_matcher instead of
14551         language_defn::la_get_symbol_name_matcher.
14552         * language.c (language_get_symbol_name_matcher): If in Ada mode
14553         and the lookup name is a verbatim match, return Ada's matcher.
14554         * language.h (language_get_symbol_name_matcher): Adjust comment.
14555         (ada_lookup_name_info::verbatim_p):: New method.
14556
14557 2018-01-10  Pedro Alves  <palves@redhat.com>
14558
14559         PR gdb/22670
14560         * ada-lang.c (ada_collect_symbol_completion_matches): If the
14561         minsym's language is language_auto or language_cplus, pass down
14562         language_ada instead.
14563         * symtab.c (compare_symbol_name): Don't frob symbol language here.
14564
14565 2018-01-10  Pedro Alves  <palves@redhat.com>
14566
14567         PR gdb/22670
14568         * minsyms.c (linkage_name_str): New function.
14569         (iterate_over_minimal_symbols): Use it.
14570
14571 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
14572
14573         * NEWS: Document that 'info proc' now works on FreeBSD.
14574
14575 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
14576
14577         * configure.ac: Check for kinfo_getfile in libutil.
14578         * configure: Regenerate.
14579         * config.in: Regenerate.
14580         * fbsd-nat.c: Include "fbsd-tdep.h".
14581         (fbsd_fetch_cmdline): New.
14582         (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
14583         rather than calling error.
14584         (fbsd_info_proc): New.
14585         (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
14586         (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
14587         (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
14588
14589 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
14590
14591         * fbsd-nat.c (struct free_deleter): Remove.
14592         (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
14593
14594 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
14595
14596         * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
14597         NULL for an empty pathname.
14598
14599 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
14600
14601         * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
14602         (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
14603         (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
14604         (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
14605         (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
14606         (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
14607         (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
14608         (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
14609         (kinfo_proc_layout_32, kinfo_proc_layout_i386)
14610         (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
14611         (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
14612         (fbsd_core_fetch_timeval, fbsd_print_sigset)
14613         (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
14614         (fbsd_init_abi):  Install gdbarch "core_info_proc" method.
14615         * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
14616
14617 2018-01-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>
14618
14619         * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
14620         (gnu_xfer_auxv): New function.
14621         (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
14622         TARGET_OBJECT_AUXV.
14623
14624 2018-01-08  Yao Qi  <yao.qi@linaro.org>
14625             Simon Marchi  <simon.marchi@ericsson.com>
14626
14627         * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
14628         common/selftest.c.
14629         (COMMON_OBS): Remove selftest.o.
14630         * configure.ac: Append selftest-arch.c and common/selftest.c to
14631         CONFIG_SRCS.  Append selftest-arch.o and selftest.o to COMMON_OBS.
14632         * configure: Re-generated.
14633         * maint.c (maintenance_selftest): Wrap selftests::run_tests with
14634         GDB_SELF_TEST.
14635         (maintenance_info_selftests): Likewise.
14636
14637 2018-01-08  Xavier Roirand  <roirand@adacore.com>
14638
14639         * ada-valprint.c (val_print_packed_array_elements): Use
14640         proper number of elements when printing an array indexed
14641         by an enumeration type.
14642
14643 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
14644
14645         * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
14646         (dw2_get_file_names_reader): Adjust.
14647         (lookup_dwo_signatured_type): Adjust.
14648         (lookup_dwp_signatured_type): Adjust.
14649         (lookup_signatured_type): Adjust.
14650         (create_type_unit_group): Adjust.
14651         (get_type_unit_group): Adjust.
14652         (process_psymtab_comp_unit_reader): Adjust.
14653         (build_type_psymtabs_reader): Adjust.
14654         (scan_partial_symbols): Adjust.
14655         (add_partial_symbol): Adjust.
14656         (add_partial_subprogram): Adjust.
14657         (peek_die_abbrev): Adjust.
14658         (fixup_go_packaging): Adjust.
14659         (process_imported_unit_die): Adjust.
14660         (dwarf2_compute_name): Adjust.
14661         (dwarf2_physname): Adjust.
14662         (read_import_statement): Adjust.
14663         (handle_DW_AT_stmt_list): Adjust.
14664         (read_file_scope): Adjust.
14665         (read_func_scope): Adjust.
14666         (read_lexical_block_scope): Adjust.
14667         (read_call_site_scope): Adjust.
14668         (read_variable): Adjust.
14669         (dwarf2_rnglists_process): Adjust.
14670         (dwarf2_ranges_process): Adjust.
14671         (dwarf2_ranges_read): Adjust.
14672         (dwarf2_get_pc_bounds): Adjust.
14673         (dwarf2_record_block_ranges): Adjust.
14674         (dwarf2_add_field): Adjust.
14675         (dwarf2_add_member_fn): Adjust.
14676         (read_structure_type): Adjust.
14677         (process_structure_scope): Adjust.
14678         (read_enumeration_type): Adjust.
14679         (read_array_type): Adjust.
14680         (mark_common_block_symbol_computed): Adjust.
14681         (read_common_block): Adjust.
14682         (read_namespace_type): Adjust.
14683         (read_namespace): Adjust.
14684         (read_module_type): Adjust.
14685         (read_tag_pointer_type): Adjust.
14686         (read_tag_ptr_to_member_type): Adjust.
14687         (read_tag_string_type): Adjust.
14688         (read_subroutine_type): Adjust.
14689         (read_typedef): Adjust.
14690         (read_base_type): Adjust.
14691         (attr_to_dynamic_prop): Adjust.
14692         (read_subrange_type): Adjust.
14693         (read_unspecified_type): Adjust.
14694         (dwarf2_read_abbrevs): Adjust.
14695         (load_partial_dies): Adjust.
14696         (read_partial_die): Adjust.
14697         (find_partial_die): Adjust.
14698         (guess_partial_die_structure_name): Adjust.
14699         (fixup_partial_die): Adjust.
14700         (read_attribute_value): Adjust.
14701         (read_addr_index): Adjust.
14702         (read_addr_index_from_leb128): Adjust.
14703         (read_str_index): Adjust.
14704         (dwarf2_string_attr): Adjust.
14705         (get_debug_line_section): Adjust.
14706         (dwarf_decode_line_header): Adjust.
14707         (lnp_state_machine::check_line_address): Adjust.
14708         (dwarf_decode_lines_1): Adjust.
14709         (dwarf_decode_lines): Adjust.
14710         (dwarf2_start_symtab): Adjust.
14711         (var_decode_location): Adjust.
14712         (new_symbol_full): Adjust.
14713         (dwarf2_const_value_data): Adjust.
14714         (dwarf2_const_value_attr): Adjust.
14715         (dwarf2_const_value): Adjust.
14716         (die_type): Adjust.
14717         (die_containing_type): Adjust.
14718         (build_error_marker_type): Adjust.
14719         (lookup_die_type): Adjust.
14720         (guess_full_die_structure_name): Adjust.
14721         (anonymous_struct_prefix): Adjust.
14722         (determine_prefix): Adjust.
14723         (dwarf2_name): Adjust.
14724         (follow_die_ref_or_sig): Adjust.
14725         (follow_die_offset): Adjust.
14726         (follow_die_ref): Adjust.
14727         (follow_die_sig_1): Adjust.
14728         (follow_die_sig): Adjust.
14729         (get_signatured_type): Adjust.
14730         (get_DW_AT_signature_type): Adjust.
14731         (decode_locdesc): Adjust.
14732         (dwarf_decode_macros): Adjust.
14733         (cu_debug_loc_section): Adjust.
14734         (fill_in_loclist_baton): Adjust.
14735         (dwarf2_symbol_mark_computed): Adjust.
14736         (init_one_comp_unit): Don't assign
14737         dwarf2_cu::dwarf2_per_objfile.
14738         (set_die_type): Adjust.
14739
14740 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
14741
14742         * dwarf2read.c (struct mapped_debug_names): Add constructor.
14743         <dwarf2_per_objfile>: New field.
14744         (dwarf2_per_objfile): Remove global.
14745         (get_dwarf2_per_objfile): New function.
14746         (set_dwarf2_per_objfile): New function.
14747         (dwarf2_build_psymtabs_hard): Change objfile parameter to
14748         dwarf2_per_objfile.
14749         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
14750         (read_abbrev_offset): Likewise.
14751         (read_indirect_string): Likewise.
14752         (read_indirect_line_string): Likewise.
14753         (read_indirect_string_at_offset): Likewise.
14754         (read_indirect_string_from_dwz): Likewise.
14755         (dwarf2_find_containing_comp_unit): Change objfile parameter to
14756         dwarf2_per_objfile.
14757         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
14758         (create_all_comp_units): Change objfile parameter to
14759         dwarf2_per_objfile.
14760         (create_all_type_units): Likewise.
14761         (process_queue): Add dwarf2_per_objfile parameter.
14762         (read_and_check_comp_unit_head): Likewise.
14763         (lookup_dwo_unit_in_dwp): Likewise.
14764         (get_dwp_file): Likewise.
14765         (process_cu_includes): Likewise.
14766         (struct free_dwo_file_cleanup_data): New struct.
14767         (dwarf2_has_info): Use get_dwarf2_per_objfile and
14768         set_dwarf2_per_objfile.
14769         (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
14770         (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
14771         context, adjust calls.
14772         (dw2_instantiate_symtab): Likewise.
14773         (dw2_get_cutu): Add dwarf2_per_objfile parameter.
14774         (dw2_get_cu): Likewise.
14775         (create_cu_from_index_list): Change objfile parameter to
14776         dwarf2_per_objfile.
14777         (create_cus_from_index_list): Get dwarf2_per_objfile from
14778         context, adjust calls.
14779         (create_cus_from_index): Likewise.
14780         (create_signatured_type_table_from_index): Change objfile
14781         parameter to dwarf2_per_objfile.
14782         (create_signatured_type_table_from_debug_names): Change objfile
14783         parameter to dwarf2_per_objfile.
14784         (create_addrmap_from_index): Likewise.
14785         (create_addrmap_from_aranges): Likewise.
14786         (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
14787         (dw2_setup): Remove.
14788         (dw2_get_file_names_reader): Get dwarf2_per_objfile from
14789         context.
14790         (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
14791         get_dwarf2_per_objfile.
14792         (dw2_forget_cached_source_info): Likewise.
14793         (dw2_map_symtabs_matching_filename): Likewise.
14794         (struct dw2_symtab_iterator) <index>: Remove.
14795         <dwarf2_per_objfile>: New field.
14796         (dw2_symtab_iter_init): Replace index parameter with
14797         dwarf2_per_objfile.
14798         (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
14799         (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
14800         (dw2_print_stats): Likewise.
14801         (dw2_dump): Likewise.
14802         (dw2_expand_symtabs_for_function): Likewise.
14803         (dw2_expand_all_symtabs): Likewise.
14804         (dw2_expand_symtabs_with_fullname): Likewise.
14805         (dw2_expand_marked_cus): Replace index and objfile parameters
14806         with dwarf2_per_objfile.
14807         (dw_expand_symtabs_matching_file_matcher): Add
14808         dwarf2_per_objfile parameter and adjust calls.
14809         (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
14810         adjust calls.
14811         (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
14812         (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
14813         adjust calls.
14814         (create_cus_from_debug_names_list): Replace objfile parameter
14815         with dwarf2_per_objfile and adjust calls.
14816         (create_cus_from_debug_names): Likewise.
14817         (dwarf2_read_debug_names): Likewise.
14818         (mapped_debug_names::namei_to_name): Adjust call.
14819         (dw2_debug_names_iterator::next): Likewise.
14820         (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
14821         (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
14822         (dw2_debug_names_dump): Likewise.
14823         (dw2_debug_names_expand_symtabs_for_function): Likewise.
14824         (dw2_debug_names_expand_symtabs_matching): Likewise.
14825         (dwarf2_initialize_objfile): Likewise.
14826         (dwarf2_build_psymtabs): Likewise.
14827         (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
14828         this_cu.
14829         (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
14830         (read_and_check_comp_unit_head): Likewise.
14831         (read_abbrev_offset): Likewise.
14832         (create_debug_type_hash_table): Likewise.
14833         (create_debug_types_hash_table): Likewise.
14834         (create_all_type_units): Replace objfile parameter with
14835         dwarf2_per_objfile.
14836         (add_type_unit): Add dwarf2_per_objfile parameter.
14837         (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
14838         with dwarf2_per_objfile.
14839         (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
14840         (lookup_dwp_signatured_type): Likewise.
14841         (lookup_signatured_type): Likewise.
14842         (read_cutu_die_from_dwo): Likewise.
14843         (init_tu_and_read_dwo_dies): Likewise.
14844         (init_cutu_and_read_dies): Likewise.
14845         (init_cutu_and_read_dies_no_follow): Likewise.
14846         (allocate_type_unit_groups_table): Add objfile parameter.
14847         (create_type_unit_group): Use dwarf2_per_objfile from cu.
14848         (get_type_unit_group): Likewise.
14849         (process_psymtab_comp_unit): Update call.
14850         (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
14851         (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
14852         (print_tu_stats): Likewise.
14853         (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
14854         in void* parameter.
14855         (build_type_psymtabs): Change objfile parameter to
14856         dwarf2_per_objfile.
14857         (process_skeletonless_type_unit): Use dwarf2_per_objfile
14858         passed in void* parameter.
14859         (process_skeletonless_type_units): Change objfile parameter to
14860         dwarf2_per_objfile.
14861         (set_partial_user): Likewise.
14862         (dwarf2_build_psymtabs_hard): Likewise.
14863         (read_comp_units_from_section): Likewise.
14864         (create_all_comp_units): Likewise.
14865         (scan_partial_symbols): Update calls.
14866         (add_partial_symbol): Likewise.
14867         (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
14868         (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
14869         (process_queue): Add dwarf2_per_objfile parameter.
14870         (get_compunit_symtab): Use dwarf2_per_objfile from cu.
14871         (compute_compunit_symtab_includes): Likewise.
14872         (process_cu_includes): Add dwarf2_per_objfile parameter.
14873         (process_full_comp_unit): Use dwarf2_per_objfile from cu.
14874         (process_full_type_unit): Likewise.
14875         (process_imported_unit_die): Update call.
14876         (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
14877         (read_file_scope): Likewise.
14878         (allocate_dwo_file_hash_table): Add objfile parameter.
14879         (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
14880         (create_cus_hash_table): Likewise.
14881         (create_dwp_hash_table): Likewise.
14882         (create_dwo_unit_in_dwp_v1): Likewise.
14883         (create_dwp_v2_section): Likewise.
14884         (create_dwo_unit_in_dwp_v2): Likewise.
14885         (lookup_dwo_unit_in_dwp): Likewise.
14886         (try_open_dwop_file): Likewise.
14887         (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
14888         (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
14889         cleanup to include a reference to dwarf2_per_objfile.
14890         (open_dwp_file): Add dwarf2_per_objfile parameter.
14891         (open_and_init_dwp_file): Likewise.
14892         (get_dwp_file): Likewise.
14893         (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
14894         (queue_and_load_all_dwo_tus): Update call.
14895         (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
14896         data.
14897         (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
14898         (dwarf2_ranges_process): Likewise.
14899         (dwarf2_get_pc_bounds): Likewise.
14900         (mark_common_block_symbol_computed): Likewise.
14901         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
14902         (dwarf2_read_abbrevs): Update call.
14903         (read_partial_die): Use dwarf2_per_objfile from cu.
14904         (find_partial_die): Likewise.
14905         (fixup_partial_die): Likewise.
14906         (read_attribute_value): Likewise.
14907         (read_indirect_string_at_offset_from): Add objfile parameter.
14908         (read_indirect_string_at_offset): Add dwarf2_per_objfile
14909         parameter.
14910         (read_indirect_string_from_dwz): Add objfile parameter.
14911         (read_indirect_string): Add objfile parameter.
14912         (read_addr_index_1): Add dwarf2_per_objfile parameter.
14913         (read_addr_index): Use dwarf2_per_objfile from cu.
14914         (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
14915         call dw2_setup.
14916         (read_str_index): Use dwarf2_per_objfile from cu.
14917         (get_debug_line_section): Likewise.
14918         (read_formatted_entries): Add dwarf2_per_objfile parameter.
14919         (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
14920         (new_symbol_full): Use dwarf2_per_objfile from cu.
14921         (build_error_marker_type): Likewise.
14922         (lookup_die_type): Likewise.
14923         (determine_prefix): Likewise.
14924         (follow_die_offset): Likewise.
14925         (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
14926         (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
14927         (dwarf2_fetch_die_type_sect_off): Likewise.
14928         (dwarf2_get_die_type): Likewise.
14929         (follow_die_sig_1): Use dwarf2_per_objfile from cu.
14930         (get_signatured_type): Likewise.
14931         (get_DW_AT_signature_type): Likewise.
14932         (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
14933         (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
14934         (cu_debug_loc_section): Likewise.
14935         (fill_in_loclist_baton): Likewise.
14936         (dwarf2_symbol_mark_computed): Likewise.
14937         (dwarf2_find_containing_comp_unit): Change objfile parameter to
14938         dwarf2_per_objfile.
14939         (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
14940         parameter.
14941         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
14942         (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
14943         (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
14944         (set_die_type): Use dwarf2_free_objfile from cu.
14945         (get_die_type_at_offset): Likewise.
14946         (dwarf2_per_objfile_free): Don't assign global variable.
14947         (debug_names) <constructor>: Add dwarf2_per_objfile
14948         parameter, update m_debugstrlookup construction.
14949         (debug_names::debug_str_lookup): Add dwarf2_per_objfile
14950         parameter.
14951         <m_dwarf2_per_objfile>: New field.
14952         <lookup>: Use m_dwarf2_per_objfile.
14953         (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
14954         (psyms_seen_size): Likewise.
14955         (write_gdbindex): Replace objfile parameter with
14956         dwarf2_per_objfile.
14957         (write_debug_names): Likewise.
14958         (write_psymtabs_to_index): Likewise.
14959         (save_gdb_index_command): Use get_dwarf2_per_objfile, update
14960         calls.
14961
14962 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
14963
14964         * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
14965         <dwarf2_per_objfile>: New field.
14966         (struct dwarf2_per_cu_data) <objfile>: Remove.
14967         <dwarf2_per_objfile>: New field.
14968         (create_cu_from_index_list): Assign dwarf2_per_objfile instead
14969         of objfile.
14970         (create_signatured_type_table_from_index): Likewise.
14971         (create_debug_type_hash_table): Likewise.
14972         (fill_in_sig_entry_from_dwo_entry): Likewise.
14973         (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
14974         (create_type_unit_group): Assign dwarf2_per_objfile instead of
14975         objfile.
14976         (create_partial_symtab): Access objfile through
14977         dwarf2_per_objfile.
14978         (process_psymtab_comp_unit_reader): Likewise.
14979         (read_comp_units_from_section): Likewise.
14980         (scan_partial_symbols): Likewise.
14981         (add_partial_symbol): Likewise.
14982         (add_partial_subprogram): Likewise.
14983         (peek_die_abbrev): Likewise.
14984         (fixup_go_packaging): Likewise.
14985         (process_full_comp_unit): Likewise.
14986         (process_full_type_unit): Likewise.
14987         (process_imported_unit_die): Likewise.
14988         (dwarf2_compute_name): Likewise.
14989         (dwarf2_physname): Likewise.
14990         (read_import_statement): Likewise.
14991         (create_cus_hash_table): Assign dwarf2_physname instead of
14992         objfile.
14993         (read_func_scope): Access objfile through dwarf2_per_objfile.
14994         (read_lexical_block_scope): Likewise.
14995         (read_call_site_scope): Likewise.
14996         (read_variable): Likewise.
14997         (dwarf2_rnglists_process): Likewise.
14998         (dwarf2_ranges_process): Likewise.
14999         (dwarf2_ranges_read): Likewise.
15000         (dwarf2_record_block_ranges): Likewise.
15001         (dwarf2_add_field): Likewise.
15002         (dwarf2_add_member_fn): Likewise.
15003         (read_structure_type): Likewise.
15004         (process_structure_scope): Likewise.
15005         (read_enumeration_type): Likewise.
15006         (read_array_type): Likewise.
15007         (read_common_block): Likewise.
15008         (read_namespace_type): Likewise.
15009         (read_namespace): Likewise.
15010         (read_module_type): Likewise.
15011         (read_tag_pointer_type): Likewise.
15012         (read_tag_ptr_to_member_type): Likewise.
15013         (read_tag_string_type): Likewise.
15014         (read_subroutine_type): Likewise.
15015         (read_typedef): Likewise.
15016         (read_base_type): Likewise.
15017         (attr_to_dynamic_prop): Likewise.
15018         (read_subrange_type): Likewise.
15019         (read_unspecified_type): Likewise.
15020         (load_partial_dies): Likewise.
15021         (read_partial_die): Likewise.
15022         (find_partial_die): Likewise.
15023         (guess_partial_die_structure_name): Likewise.
15024         (fixup_partial_die): Likewise.
15025         (read_attribute_value): Likewise.
15026         (read_addr_index_from_leb128): Likewise.
15027         (dwarf2_read_addr_index): Likewise.
15028         (dwarf2_string_attr): Likewise.
15029         (lnp_state_machine::check_line_address): Likewise.
15030         (dwarf_decode_lines_1): Likewise.
15031         (dwarf_decode_lines): Likewise.
15032         (dwarf2_start_symtab): Likewise.
15033         (var_decode_location): Likewise.
15034         (new_symbol_full): Likewise.
15035         (dwarf2_const_value_data): Likewise.
15036         (dwarf2_const_value_attr): Likewise.
15037         (dwarf2_const_value): Likewise.
15038         (die_type): Likewise.
15039         (die_containing_type): Likewise.
15040         (lookup_die_type): Likewise.
15041         (guess_full_die_structure_name): Likewise.
15042         (anonymous_struct_prefix): Likewise.
15043         (dwarf2_name): Likewise.
15044         (follow_die_ref_or_sig): Likewise.
15045         (follow_die_offset): Likewise.
15046         (follow_die_ref): Likewise.
15047         (dwarf2_fetch_die_loc_sect_off): Likewise.
15048         (dwarf2_fetch_constant_bytes): Likewise.
15049         (dwarf2_fetch_die_type_sect_off): Likewise.
15050         (dwarf2_get_die_type): Likewise.
15051         (follow_die_sig): Likewise.
15052         (decode_locdesc): Likewise.
15053         (dwarf2_per_cu_objfile): Likewise.
15054         (dwarf2_per_cu_text_offset): Likewise.
15055         (init_one_comp_unit): Assign dwarf2_per_objfile instead of
15056         objfile.
15057         (set_die_type): Access objfile through
15058         dwarf2_per_objfile.
15059
15060 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
15061
15062         * valprint.c (converted_character_d): Remove typedef.
15063         (DEF_VEC_O (converted_character_d)): Remove.
15064         (count_next_character): Use std::vector.
15065         (print_converted_chars_to_obstack): Likewise.
15066         (generic_printstr): Likewise.
15067
15068 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
15069
15070         * xml-support.h (struct gdb_xml_value): Add constructor.
15071         <value>: Change type to unique_xmalloc_ptr.
15072         (gdb_xml_value_s): Remove typedef.
15073         (DEF_VEC_O (gdb_xml_value_s)): Remove.
15074         (gdb_xml_element_start_handler): Change parameter type to
15075         std::vector.
15076         (xml_find_attribute): Likewise.
15077         * xml-support.c (xml_find_attribute): Change parameter type to
15078         std::vector and adjust.
15079         (gdb_xml_values_cleanup): Remove.
15080         (gdb_xml_parser::start_element): Adjust to std::vector.
15081         (xinclude_start_include): Change paraeter type to std::vector
15082         and adjust.
15083         * btrace.c (check_xml_btrace_version): Likewise.
15084         (parse_xml_btrace_block): Likewise.
15085         (parse_xml_btrace_pt_config_cpu): Likewise.
15086         (parse_xml_btrace_pt): Likewise.
15087         (parse_xml_btrace_conf_bts): Likewise.
15088         (parse_xml_btrace_conf_pt): Likewise.
15089         * memory-map.c (memory_map_start_memory): Likewise.
15090         (memory_map_start_property): Likewise.
15091         * osdata.c (osdata_start_osdata): Likewise.
15092         (osdata_start_item): Likewise.
15093         (osdata_start_column): Likewise.
15094         * remote.c (start_thread): Likewise.
15095         * solib-aix.c (library_list_start_library): Likewise.
15096         (library_list_start_list): Likewise.
15097         * solib-svr4.c (library_list_start_library): Likewise.
15098         (svr4_library_list_start_list): Likewise.
15099         * solib-target.c (library_list_start_segment): Likewise.
15100         (library_list_start_section): Likewise.
15101         (library_list_start_library): Likewise.
15102         (library_list_start_list): Likewise.
15103         * tracepoint.c (traceframe_info_start_memory): Likewise.
15104         (traceframe_info_start_tvar): Likewise.
15105         * xml-syscall.c (syscall_start_syscall): Likewise.
15106         * xml-tdesc.c (tdesc_start_target): Likewise.
15107         (tdesc_start_feature): Likewise.
15108         (tdesc_start_reg): Likewise.
15109         (tdesc_start_union): Likewise.
15110         (tdesc_start_struct): Likewise.
15111         (tdesc_start_flags): Likewise.
15112         (tdesc_start_enum): Likewise.
15113         (tdesc_start_field): Likewise.
15114         (tdesc_start_enum_value): Likewise.
15115         (tdesc_start_vector): Likewise.
15116
15117 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
15118
15119         * extension.h (struct xmethod_worker) <clone>: Remove.
15120         * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
15121         Remove.
15122         (python_xmethod_worker::clone): Remove.
15123         * valops.c (find_overload_match): Use std::move instead of
15124         clone.
15125
15126 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
15127
15128         * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
15129         (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
15130         <free_xmethod_worker_data>: Remove.
15131         <get_matching_xmethod_workers>: Chance VEC to std::vector.
15132         <get_xmethod_arg_types>: Remove.
15133         <get_xmethod_result_type>: Remove.
15134         <invoke_xmethod>: Remove.
15135         * extension.c (new_xmethod_worker): Remove.
15136         (clone_xmethod_worker): Remove.
15137         (get_matching_xmethod_workers): Return void, pass std::vector by
15138         pointer.
15139         (get_xmethod_arg_types): Rename to...
15140         (xmethod_worker::get_arg_types): ... this, and adjust.
15141         (get_xmethod_result_type): Rename to...
15142         (xmethod_worker::get_result_type): ... this, and adjust.
15143         (invoke_xmethod): Remove.
15144         (free_xmethod_worker): Remove.
15145         (free_xmethod_worker_vec): Remove.
15146         * extension.h (enum ext_lang_rc): Move here from
15147         extension-priv.h.
15148         (struct xmethod_worker): Add constructor and destructor.
15149         <data>: Remove.
15150         <value>: Remove.
15151         <invoke, clone, do_get_result_type, do_get_arg_types>: New
15152         virtual pure methods.
15153         <get_arg_types, get_result_type>: New methods.
15154         (xmethod_worker_ptr): Remove typedef.
15155         (DEF_VEC_P (xmethod_worker_ptr)): Remove.
15156         (xmethod_worker_vec): Remove typedef.
15157         (xmethod_worker_up): New typedef.
15158         (invoke_xmethod): Remove.
15159         (clone_xmethod_worker): Remove.
15160         (free_xmethod_worker): Remove.
15161         (free_xmethod_worker_vec): Remove.
15162         (get_xmethod_arg_types): Remove.
15163         (get_xmethod_result_type): Remove.
15164         * valops.c (find_method_list): Use std::vector, don't use
15165         intermediate vector.
15166         (value_find_oload_method_list): Use std::vector.
15167         (find_overload_match): Use std::vector.
15168         (find_oload_champ): Use std::vector.
15169         * value.c (value_free): Use operator delete.
15170         (value_of_xmethod): Rename to...
15171         (value_from_xmethod): ... this.  Don't assign
15172         xmethod_worker::value, take rvalue-reference.
15173         (result_type_of_xmethod): Adjust.
15174         (call_xmethod): Adjust.
15175         * value.h: Include extension.h.
15176         (struct xmethod_worker): Don't forward-declare.
15177         (value_of_xmethod): Rename to...
15178         (value_from_xmethod): ... this, take rvalue-reference.
15179         * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
15180         (struct python_xmethod_worker): ... this, add constructor and
15181         destructor.
15182         <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
15183         (gdbpy_free_xmethod_worker_data): Rename to...
15184         (python_xmethod_worker::~python_xmethod_worker): ... this and
15185         adjust.
15186         (gdbpy_clone_xmethod_worker_data): Rename to...
15187         (python_xmethod_worker::clone): ... this and adjust.
15188         (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
15189         temporary vector.
15190         (gdbpy_get_xmethod_arg_types): Rename to...
15191         (python_xmethod_worker::do_get_arg_types): ... this and adjust.
15192         (gdbpy_get_xmethod_result_type): Rename to...
15193         (python_xmethod_worker::do_get_result_type): ... this and
15194         adjust.
15195         (gdbpy_invoke_xmethod): Rename to...
15196         (python_xmethod_worker::invoke): ... this and adjust.
15197         (new_python_xmethod_worker): Rename to...
15198         (python_xmethod_worker::python_xmethod_worker): ... this and
15199         adjust.
15200         * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
15201         Remove.
15202         (gdbpy_free_xmethod_worker_data): Remove.
15203         (gdbpy_get_matching_xmethod_workers): Use std::vector.
15204         (gdbpy_get_xmethod_arg_types): Remove.
15205         (gdbpy_get_xmethod_result_type): Remove.
15206         (gdbpy_invoke_xmethod): Remove.
15207         * python/python.c (python_extension_ops): Remove obsolete
15208         callbacks.
15209
15210 2018-01-05  Pedro Alves  <palves@redhat.com>
15211
15212         PR gdb/18653
15213         * common/signals-state-save-restore.c
15214         (save_original_signals_state): New parameter 'quiet'.  Warn if we
15215         find a custom handler preinstalled, instead of internal erroring.
15216         But only warn if !quiet.
15217         * common/signals-state-save-restore.h
15218         (save_original_signals_state): New parameter 'quiet'.
15219         * main.c (captured_main_1): Move save_original_signals_state call
15220         after option handling, and pass QUIET.
15221
15222 2018-01-05  Pedro Alves  <palves@redhat.com>
15223
15224         * spu-tdep.c (spu_catch_start): Pass
15225         symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
15226
15227 2018-01-05  Pedro Alves  <palves@redhat.com>
15228
15229         PR gdb/22670
15230         * ada-lang.c (literal_symbol_name_matcher): New function.
15231         (ada_get_symbol_name_matcher): Use it for
15232         symbol_name_match_type::SEARCH_NAME.
15233         * block.c (block_lookup_symbol): New parameter 'match_type'.  Pass
15234         it down instead of assuming symbol_name_match_type::FULL.
15235         * block.h (block_lookup_symbol): New parameter 'match_type'.
15236         * c-valprint.c (print_unpacked_pointer): Use
15237         lookup_symbol_search_name instead of lookup_symbol.
15238         * compile/compile-object-load.c (get_out_value_type): Pass down
15239         symbol_name_match_type::SEARCH_NAME.
15240         * cp-namespace.c (cp_basic_lookup_symbol): Pass down
15241         symbol_name_match_type::FULL.
15242         * cp-support.c (cp_get_symbol_name_matcher): Handle
15243         symbol_name_match_type::SEARCH_NAME.
15244         * infrun.c (insert_exception_resume_breakpoint): Use
15245         lookup_symbol_search_name.
15246         * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
15247         * psymtab.c (maintenance_check_psymtabs): Use
15248         symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
15249         * stack.c (print_frame_args): Use lookup_symbol_search_name and
15250         SYMBOL_SEARCH_NAME.
15251         * symtab.c (lookup_local_symbol): Don't demangle the lookup name
15252         if symbol_name_match_type::SEARCH_NAME.
15253         (lookup_symbol_in_language): Pass down
15254         symbol_name_match_type::FULL.
15255         (lookup_symbol_search_name): New.
15256         (lookup_language_this): Pass down
15257         symbol_name_match_type::SEARCH_NAME.
15258         (lookup_symbol_aux, lookup_local_symbol): New parameter
15259         'match_type'.  Pass it down.
15260         * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
15261         (lookup_symbol_search_name): New declaration.
15262         (lookup_symbol_in_block): New 'match_type' parameter.
15263
15264 2018-01-05  Pedro Alves  <palves@redhat.com>
15265
15266         PR gdb/22670
15267         * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
15268         ada_lookup_symbol.
15269         (ada_lookup_symbol): Reimplement in terms of
15270         ada_lookup_symbol_list, bits factored out from
15271         ada_lookup_encoded_symbol.
15272
15273 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
15274
15275         * ada-exp.y (write_object_renaming): When subscripting an array
15276         using a symbol as the index, pass the block in call to
15277         ada_lookup_encoded_symbol when looking that symbol up.
15278
15279 2018-01-05  Jerome Guitton  <guitton@adacore.com>
15280
15281         * ada-lang.c (ada_array_length): Use ada_index_type instead of
15282         TYPE_INDEX_TYPE.
15283
15284 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
15285
15286         * ada-lang.c (ada_to_fixed_value_create): Add handling of
15287         the case where VALUE_LVAL (val0) is not lval_memory.
15288
15289 2018-01-05  Xavier Roirand  <roirand@adacore.com>
15290
15291         * ada-valprint.c (print_optional_low_bound): Handle
15292         character-indexed array printing like boolean-indexed array
15293         printing.
15294
15295 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
15296
15297         * NEWS: Create a new section for the next release branch.
15298         Rename the section of the current branch, now that it has
15299         been cut.
15300
15301 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
15302
15303         GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
15304         * version.in: Bump version to 8.1.50.DATE-git.
15305
15306 2018-01-03  Xavier Roirand  <roirand@adacore.com>
15307
15308         * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
15309         Add field.
15310         * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
15311         Add field.
15312         (default_exception_support_info) <catch_handlers_sym>: Add field.
15313         (exception_support_info_fallback) <catch_handlers_sym>: Add field.
15314         (ada_exception_name_addr_1): Add "catch handlers" handling.
15315         (ada_exception_catchpoint_cond_string) <ex>: New parameter.
15316         Update all callers.
15317         (create_excep_cond_exprs) <ex>: Add parameter.
15318         (re_set_exception): Update create_excep_cond_exprs call.
15319         (print_it_exception, print_one_exception, print_mention_exception)
15320         (print_recreate_exception): Add "catch handler" handling.
15321         (allocate_location_catch_handlers, re_set_catch_handlers)
15322         (check_status_catch_handlers, print_it_catch_handlers)
15323         (print_one_catch_handlers, print_mention_catch_handlers)
15324         (print_recreate_catch_handlers): New function.
15325         (catch_handlers_breakpoint_ops): New variable.
15326         (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
15327         Add parameter.  Add "catch handler" handling.
15328         (ada_exception_sym_name, ada_exception_breakpoint_ops):
15329         Add "catch handler" handling.
15330         (ada_exception_catchpoint_cond_string): Add "catch handler"
15331         handling.
15332         (create_ada_exception_catchpoint): Update create_excep_cond_exprs
15333         call.
15334         (catch_ada_handlers_command): New function.
15335         (initialize_ada_catchpoint_ops): Initialize "catch handlers"
15336         operations structure.
15337         (_initialize_ada_language): Add "catch handlers" command entry.
15338         * NEWS: Document "catch handlers" feature.
15339
15340 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
15341
15342         * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
15343         account when creating the array type of the slice.
15344         (ada_value_slice): Likewise.
15345
15346 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
15347
15348         * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
15349         New enum value.
15350         (create_array_type_with_stride): Add byte_stride_prop parameter.
15351         * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
15352         New parameter.  Update all callers in this file.
15353         (array_type_has_dynamic_stride): New function.
15354         (is_dynamic_type_internal, resolve_dynamic_array): Add handling
15355         of arrays with dynamic byte strides.
15356         * dwarf2read.c (read_array_type): Add support for dynamic
15357         DW_AT_byte_stride attributes.
15358
15359 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
15360
15361         * dwarf2read.c (read_unspecified_type): Treat
15362         DW_TAG_enumeration_type DIEs from Ada units as stubs.
15363
15364 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
15365
15366         Update copyright year range in all GDB files.
15367
15368 2018-01-01, 18  Joel Brobecker  <brobecker@adacore.com>
15369
15370         * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
15371         and gdb/testsuite/gdb.base/step-line.c.
15372
15373 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
15374
15375         * copyright.py (main): Dump the contents of
15376         MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
15377         even if BY_HAND is empty.
15378
15379 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
15380
15381         * top.c (print_gdb_version): Update Copyright year in version
15382         message.
15383
15384 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
15385
15386         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
15387
15388 For older changes see ChangeLog-2017.
15389 \f
15390 Local Variables:
15391 mode: change-log
15392 left-margin: 8
15393 fill-column: 74
15394 version-control: never
15395 coding: utf-8
15396 End: