Use mkostemp, not mkstemp
[external/binutils.git] / gdb / ChangeLog
1 2018-10-27  Tom Tromey  <tom@tromey.com>
2
3         * unittests/scoped_mmap-selftests.c (test_normal): Use
4         gdb_mkostemp_cloexec.
5         * unittests/scoped_fd-selftests.c (test_destroy, test_release):
6         Use gdb_mkostemp_cloexec.
7         * gnulib/aclocal-m4-deps.mk, gnulib/aclocal.m4,
8         gnulib/config.in, gnulib/configure,
9         gnulib/import/Makefile.am, gnulib/import/Makefile.in,
10         gnulib/import/m4/gnulib-cache.m4,
11         gnulib/import/m4/gnulib-comp.m4: Update.
12         * gnulib/import/m4/mkostemp.m4: New file.
13         * gnulib/import/m4/mkstemp.m4: Remove.
14         * gnulib/import/mkostemp.c: New file.
15         * gnulib/import/mkstemp.m4: Remove.
16         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Remove
17         mkstemp, add mkostemp.  Apply new patch.
18         * gnulib/import/stdlib.in.h: Apply patch.
19         * gnulib/patches/0002-mkostemp-mkostemps-Fix-compilation-error-in-C-mode-o.patch:
20         New file.
21         * dwarf-index-write.c (write_psymtabs_to_index): Use
22         gdb_mkostemp_cloexec.
23         * common/filestuff.h (gdb_mkostemp_cloexec): New function.
24
25 2018-10-27  Tom Tromey  <tom@tromey.com>
26
27         * unittests/mkdir-recursive-selftests.c: New file.
28         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
29         unittests/mkdir-recursive-selftests.c.
30         * dwarf-index-cache.c (mkdir_recursive): Move to
31         common/filestuff.c.
32         (index_cache::store): Check return value of mkdir_recursive.
33         (create_dir_and_check, test_mkdir_recursive): Move to new file.
34         (_initialize_index_cache): Don't register test.
35         * common/filestuff.h (mkdir_recursive): Declare.
36         * common/filestuff.c (mkdir_recursive): Move from
37         dwarf-index-cache.c.  Return bool.
38
39 2018-10-27  Tom Tromey  <tom@tromey.com>
40
41         * dwarf-index-write.c (write_psymtabs_to_index): Move
42         make_temp_filename to common/pathstuff.c.
43         * common/pathstuff.h (make_temp_filename): Declare.
44         * common/pathstuff.c (make_temp_filename): New function, moved
45         from dwarf-index-write.c.
46
47 2018-10-27  Tom Tromey  <tom@tromey.com>
48
49         * procfs.c (procfs_target::create_inferior): Use get_shell.
50         * cli/cli-cmds.c (shell_escape): Use get_shell.
51         * windows-nat.c (windows_nat_target::create_inferior): Use
52         get_shell.
53         * common/pathstuff.c (get_shell): New function.
54         * nat/fork-inferior.c (SHELL_FILE, get_startup_shell): Remove.
55         (fork_inferior): Use get_shell.
56         * common/pathstuff.h (get_shell): Declare.
57
58 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
59
60         * NEWS: Mention changes to 'info [args|functions|locals|variables]'
61
62 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
63
64         * stack.c (print_variable_and_value_data): Add preg and treg.
65         (print_frame_local_vars): Add quiet, regexp and t_regexp arguments,
66         and update callers.
67         (print_frame_arg_vars): Likewise.
68         (prepare_reg): New function.
69         (info_locals_command): Extract info print args and use them.
70         (info_args_command): Likewise.
71         (_initialize_stack): Modify on-line help.
72         * symtab.c (treg_matches_sym_type_name): New function.
73         (search_symbols): New arg t_regexp.
74         (symtab_symbol_info): New args quiet, regexp, t_regexp.
75         (info_variables_command): Extract info print args and use them.
76         (info_functions_command): Likewise.
77         (info_types_command): Update call to symtab_symbol_info.
78         (_initialize_symtab): Modify on-line help.
79         * symtab.h (treg_matches_sym_type_name): New function.
80         (search_symbols): New t_regexp arg.
81
82 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
83
84         * cli-utils.c (extract_arg_maybe_quoted): New function.
85         (extract_info_print_args): New function.
86         (info_print_args_help): New function.
87         (report_unrecognized_option_error): New function.
88         * cli-utils.h (extract_arg_maybe_quoted): New function.
89         (extract_info_print_args): New function.
90         (info_print_args_help): New function.
91         (report_unrecognized_option_error): New function.
92
93 2018-10-26  Tom Tromey  <tom@tromey.com>
94
95         * dwarf2read.c (recursively_compute_inclusions): Use std::vector.
96         (compute_compunit_symtab_includes): Update.
97         * symtab.h: (symtab_ptr): Remove typedef.  Don't define a VEC.
98         (compunit_symtab_ptr): Likewise.
99
100 2018-10-26  John Baldwin  <jhb@FreeBSD.org>
101
102         * fbsd-tdep.c (fbsd_print_auxv_entry): Only use
103         default_print_auxv_entry for specific tag values.
104
105 2018-10-26  John Baldwin  <jhb@FreeBSD.org>
106
107         * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_FREEBSD_HWCAP2.
108
109 2018-10-26  Jim Wilson  <jimw@sifive.com>
110
111         * riscv-linux-tdep.c: Include tramp-frame.h and trad-frame.h.
112         (riscv_linux_sigframe_init): Declare.
113         (RISCV_INST_LI_A7_SIGRETURN, RISCV_INT_ECALL): New.
114         (riscv_linux_sigframe): New.
115         (SIGFRAME_SIGINFO_SIZE, UCONTEXT_MCONTEXT_OFFSET): New.
116         (riscv_linux_sigframe_init): Define.
117         (riscv_linux_init_abi): Call tramp_frame_prepend_unwinder.
118
119         * riscv-tdep.c (riscv_isa_xlen): Refer to riscv-tdep.h comment.
120         (riscv_isa_flen): Likewise.  Drop static.
121         * riscv-tdep.h (riscv_isa_xlen): Move riscv-tdep.c comment to here.
122         (riscv_isa_flen): Likewise.  Declare.
123
124 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
125             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
126
127         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa207_htm_vsx32l)
128         (tdesc_powerpc_isa207_htm_vsx64l): Declare.
129         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_TM_SPRREGSET)
130         (PPC32_LINUX_SIZEOF_CGPRREGSET, PPC64_LINUX_SIZEOF_CGPRREGSET)
131         (PPC_LINUX_SIZEOF_CFPRREGSET, PPC_LINUX_SIZEOF_CVMXREGSET)
132         (PPC_LINUX_SIZEOF_CVSXREGSET, PPC_LINUX_SIZEOF_CPPRREGSET)
133         (PPC_LINUX_SIZEOF_CDSCRREGSET, PPC_LINUX_SIZEOF_CTARREGSET):
134         Define.
135         (struct ppc_linux_features) <htm>: New field.
136         (ppc_linux_no_features): Add initializer for htm field.
137         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
138         new tdescs.
139         * nat/ppc-linux.h (PPC_FEATURE2_HTM, NT_PPC_TM_CGPR)
140         (NT_PPC_TM_CFPR, NT_PPC_TM_CVMX, NT_PPC_TM_CVSX)
141         (NT_PPC_TM_SPR, NT_PPC_TM_CTAR, NT_PPC_TM_CPPR, NT_PPC_TM_CDSCR):
142         Define if not already defined.
143         * features/Makefile (WHICH): Add rs6000/powerpc-isa207-htm-vsx32l
144         and rs6000/powerpc-isa207-htm-vsx64l.
145         (XMLTOC): Add rs6000/powerpc-isa207-htm-vsx32l.xml and
146         rs6000/powerpc-isa207-htm-vsx64l.xml.
147         * features/rs6000/power-htm-spr.xml: New file.
148         * features/rs6000/power-htm-core.xml: New file.
149         * features/rs6000/power64-htm-core.xml: New file.
150         * features/rs6000/power-htm-fpu.xml: New file.
151         * features/rs6000/power-htm-altivec.xml: New file.
152         * features/rs6000/power-htm-vsx.xml: New file.
153         * features/rs6000/power-htm-ppr.xml: New file.
154         * features/rs6000/power-htm-dscr.xml: New file.
155         * features/rs6000/power-htm-tar.xml: New file.
156         * features/rs6000/powerpc-isa207-htm-vsx32l.xml: New file.
157         * features/rs6000/powerpc-isa207-htm-vsx64l.xml: New file.
158         * features/rs6000/powerpc-isa207-htm-vsx32l.c: Generate.
159         * features/rs6000/powerpc-isa207-htm-vsx64l.c: Generate.
160         * regformats/rs6000/powerpc-isa207-htm-vsx32l.dat: Generate.
161         * regformats/rs6000/powerpc-isa207-htm-vsx64l.dat: Generate.
162         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
163         fetch_regset with HTM regsets.
164         (store_register, store_ppc_registers): Call store_regset with HTM
165         regsets.
166         (ppc_linux_nat_target::read_description): Set htm field in the
167         features struct if needed.
168         * ppc-linux-tdep.c: Include
169         features/rs6000/powerpc-isa207-htm-vsx32l.c and
170         features/rs6000/powerpc-isa207-htm-vsx64l.c.
171         (ppc32_regmap_tm_spr, ppc32_regmap_cgpr, ppc64_le_regmap_cgpr)
172         (ppc64_be_regmap_cgpr, ppc32_regmap_cfpr, ppc32_le_regmap_cvmx)
173         (ppc32_be_regmap_cvmx, ppc32_regmap_cvsx, ppc32_regmap_cppr)
174         (ppc32_regmap_cdscr, ppc32_regmap_ctar): New globals.
175         (ppc32_linux_tm_sprregset, ppc32_linux_cgprregset)
176         (ppc64_be_linux_cgprregset, ppc64_le_linux_cgprregset)
177         (ppc32_linux_cfprregset, ppc32_le_linux_cvmxregset)
178         (ppc32_be_linux_cvmxregset, ppc32_linux_cvsxregset)
179         (ppc32_linux_cpprregset, ppc32_linux_cdscrregset)
180         (ppc32_linux_ctarregset): New globals.
181         (ppc_linux_cgprregset, ppc_linux_cvmxregset): New functions.
182         (ppc_linux_collect_core_cpgrregset): New function.
183         (ppc_linux_iterate_over_regset_sections): Call back with the htm
184         regsets.
185         (ppc_linux_core_read_description): Check if the tm spr section is
186         present and set htm in the features struct.
187         (_initialize_ppc_linux_tdep): Call
188         initialize_tdesc_powerpc_isa207_htm_vsx32l and
189         initialize_tdesc_powerpc_isa207_htm_vsx64l.
190         * ppc-linux-tdep.h (ppc_linux_cgprregset, ppc_linux_cvmxregset):
191         Declare.
192         (ppc32_linux_tm_sprregset, ppc32_linux_cfprregset)
193         (ppc32_linux_cvsxregset, ppc32_linux_cpprregset)
194         (ppc32_linux_cdscrregset, ppc32_linux_ctarregset): Declare.
195         * ppc-tdep.h (struct gdbarch_tdep) <have_htm_spr, have_htm_core>:
196         New fields.
197         <have_htm_fpu, have_htm_altivec, have_htm_vsx>:
198         Likewise.
199         <ppc_cppr_regnum, ppc_cdscr_regnum, ppc_ctar_regnum>: Likewise.
200         <ppc_cdl0_regnum, ppc_cvsr0_regnum, ppc_cefpr0_regnum>: Likewise.
201         (enum) <PPC_TFHAR_REGNUM, PPC_TEXASR_REGNUM, PPC_TFIAR_REGNUM>:
202         New enum fields.
203         <PPC_CR0_REGNUM, PPC_CCR_REGNUM, PPC_CXER_REGNUM>: Likewise.
204         <PPC_CLR_REGNUM, PPC_CCTR_REGNUM, PPC_CF0_REGNUM>: Likewise.
205         <PPC_CFPSCR_REGNUM, PPC_CVR0_REGNUM, PPC_CVSCR_REGNUM>: Likewise.
206         <PPC_CVRSAVE_REGNUM, PPC_CVSR0_UPPER_REGNUM>: Likewise.
207         <PPC_CPPR_REGNUM, PPC_CDSCR_REGNUM>: Likewise.
208         <PPC_CTAR_REGNUM>: Likewise.
209         (PPC_IS_TMSPR_REGNUM, PPC_IS_CKPTGP_REGNUM, PPC_IS_CKPTFP_REGNUM)
210         (PPC_IS_CKPTVMX_REGNUM, PPC_IS_CKPTVSX_REGNUM): Define.
211         * rs6000-tdep.c (IS_CDFP_PSEUDOREG, IS_CVSX_PSEUDOREG)
212         (IS_CEFP_PSEUDOREG): Define.
213         (rs6000_register_name): Hide the upper halves of checkpointed VSX
214         registers.  Return names for the checkpointed DFP, VSX, and EFP
215         pseudo registers.
216         (rs6000_pseudo_register_type): Remove initial assert and raise an
217         internal error in the else clause instead.  Return types for the
218         checkpointed DFP, VSX, and EFP pseudo registers.
219         (dfp_pseudo_register_read, dfp_pseudo_register_write): Handle
220         checkpointed DFP pseudo registers.
221         (vsx_pseudo_register_read, vsx_pseudo_register_write): Handle
222         checkpointed VSX pseudo registers.
223         (efp_pseudo_register_read, efp_pseudo_register_write): Rename
224         from efpr_pseudo_register_read and
225         efpr_pseudo_register_write.  Handle checkpointed EFP pseudo
226         registers.
227         (rs6000_pseudo_register_read, rs6000_pseudo_register_write):
228         Handle checkpointed DFP, VSX, and EFP registers.
229         (dfp_ax_pseudo_register_collect, vsx_ax_pseudo_register_collect)
230         (efp_ax_pseudo_register_collect): New functions.
231         (rs6000_ax_pseudo_register_collect): Move DFP, VSX and EFP pseudo
232         register logic to new functions.  Handle checkpointed DFP, VSX,
233         and EFP pseudo registers.
234         (rs6000_gdbarch_init): Look for and validate the htm features.
235         Include checkpointed DFP, VSX and EFP pseudo-registers.
236         * NEWS: Mention access to PPR, DSCR, TAR, EBB/PMU registers and
237         HTM registers.
238
239 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
240
241         * rs6000-tdep.c (rs6000_gdbarch_init): Reject tdescs with vsx but
242         without altivec or fpu.
243
244 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
245             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
246
247         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_EBBREGSET)
248         (PPC_LINUX_SIZEOF_PMUREGSET): Declare.
249         * nat/ppc-linux.h (PPC_FEATURE2_EBB, NT_PPC_EBB, NT_PPC_PMU):
250         Define if not already defined.
251         * features/rs6000/power-ebb.xml: New file.
252         * features/rs6000/power-linux-pmu.xml: New file.
253         * features/rs6000/powerpc-isa207-vsx32l.xml: Include ebb and pmu
254         features.
255         * features/rs6000/powerpc-isa207-vsx64l.xml: Likewise.
256         * features/rs6000/powerpc-isa207-vsx32l.c: Re-generate.
257         * features/rs6000/powerpc-isa207-vsx64l.c: Re-generate.
258         * regformats/rs6000/powerpc-isa207-vsx32l.dat: Re-generate.
259         * regformats/rs6000/powerpc-isa207-vsx64l.dat: Re-generate.
260         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
261         fetch_regset with ebb and pmu regsets.
262         (store_register, store_ppc_registers): Call store_regset with ebb
263         and pmu regsets.
264         (ppc_linux_nat_target::read_description): Set isa207 field in the
265         features struct if ebb and pmu are avaiable.
266         * ppc-linux-tdep.c (ppc32_regmap_ebb, ppc32_regmap_pmu)
267         (ppc32_linux_ebbregset, ppc32_linux_pmuregset): New globals.
268         (ppc_linux_iterate_over_regset_sections): Call back with the ebb
269         and pmu regsets.
270         (ppc_linux_core_read_description): Check if the pmu section is
271         present and set isa207 in the features struct.
272         * ppc-linux-tdep.h (ppc32_linux_ebbregset)
273         (ppc32_linux_pmuregset): Declare.
274         * ppc-tdep.h (struct gdbarch_tdep) <ppc_mmcr0_regnum>: New field.
275         <ppc_mmcr2_regnum, ppc_siar_regnum, ppc_sdar_regnum>: New fields.
276         <ppc_sier_regnum>: New field.
277         (enum): <PPC_BESCR_REGNUM, PPC_EBBHR_REGNUM, PPC_EBBRR_REGNUM>:
278         New enum values.
279         <PPC_MMCR0_REGNUM, PPC_MMCR2_REGNUM, PPC_SIAR_REGNUM>: New enum
280         values.
281         <PPC_SDAR_REGNUM, PPC_SIER_REGNUM>: New enum values.
282         (PPC_IS_EBB_REGNUM, PPC_IS_PMU_REGNUM): Define.
283         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate the
284         ebb and pmu features.
285
286 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
287             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
288
289         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa207_vsx32l)
290         (tdesc_powerpc_isa207_vsx64l): Declare.
291         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_TARREGSET): Define.
292         (struct ppc_linux_features) <isa207>: New field.
293         (ppc_linux_no_features): Add initializer for isa207 field.
294         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
295         new tdescs.
296         * nat/ppc-linux.h (PPC_FEATURE2_ARCH_2_07, PPC_FEATURE2_TAR)
297         (NT_PPC_TAR): Define if not already defined.
298         * features/Makefile (WHICH): Add rs6000/powerpc-isa207-vsx32l and
299         rs6000/powerpc-isa207-vsx64l.
300         (XMLTOC): Add rs6000/powerpc-isa207-vsx32l.xml and
301         rs6000/powerpc-isa207-vsx64l.xml.
302         * features/rs6000/power-tar.xml: New file.
303         * features/rs6000/powerpc-isa207-vsx32l.xml: New file.
304         * features/rs6000/powerpc-isa207-vsx64l.xml: New file.
305         * features/rs6000/powerpc-isa207-vsx32l.c: Generate.
306         * features/rs6000/powerpc-isa207-vsx64l.c: Generate.
307         * regformats/rs6000/powerpc-isa207-vsx32l.dat: Generate.
308         * regformats/rs6000/powerpc-isa207-vsx64l.dat: Generate.
309         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
310         fetch_regset with the TAR regset.
311         (store_register, store_ppc_registers): Call store_regset with the
312         TAR regset.
313         (ppc_linux_nat_target::read_description): Set isa207 field in the
314         features struct if needed.
315         * ppc-linux-tdep.c: Include
316         features/rs6000/powerpc-isa207-vsx32l.c and
317         features/rs6000/powerpc-isa207-vsx64l.c.
318         (ppc32_regmap_tar, ppc32_linux_tarregset): New globals.
319         (ppc_linux_iterate_over_regset_sections): Call back with the tar
320         regset.
321         (ppc_linux_core_read_description): Check if the tar section is
322         present and set isa207 in the features struct.
323         (_initialize_ppc_linux_tdep): Call
324         initialize_tdesc_powerpc_isa207_vsx32l and
325         initialize_tdesc_powerpc_isa207_vsx64l.
326         * ppc-linux-tdep.h (ppc32_linux_tarregset): Declare.
327         * ppc-tdep.h (gdbarch_tdep) <ppc_tar_regnum>: New field.
328         (enum) <PPC_TAR_REGNUM>: New enum value.
329         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate tar
330         feature.
331         (ppc_process_record_op31): Record changes to TAR.
332
333 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
334             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
335
336         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa205_ppr_dscr_vsx32l)
337         (tdesc_powerpc_isa205_ppr_dscr_vsx64l): Declare.
338         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_PPRREGSET)
339         (PPC_LINUX_SIZEOF_DSCRREGSET): Define.
340         (struct ppc_linux_features) <ppr_dscr>: New field.
341         (ppc_linux_no_features): Add initializer for ppr_dscr field.
342         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
343         new tdescs.
344         * nat/ppc-linux.h (PPC_FEATURE2_DSCR, NT_PPC_PPR, NT_PPC_DSCR):
345         Define if not already defined.
346         * features/Makefile (WHICH): Add
347         rs6000/powerpc-isa205-ppr-dscr-vsx32l and
348         rs6000/powerpc-isa205-ppr-dscr-vsx64l.
349         (XMLTOC): Add rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
350         rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml.
351         * features/rs6000/power-dscr.xml: New file.
352         * features/rs6000/power-ppr.xml: New file.
353         * features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml: New file.
354         * features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml: New file.
355         * features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c: Generate.
356         * features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c: Generate.
357         * regformats/rs6000/powerpc-isa205-ppr-dscr-vsx32l.dat: Generate.
358         * regformats/rs6000/powerpc-isa205-ppr-dscr-vsx64l.dat: Generate.
359         * ppc-linux-nat.c: Include <sys/uio.h>.
360         (fetch_regset, store_regset, check_regset): New functions.
361         (fetch_register, fetch_ppc_registers): Call fetch_regset with
362         DSCR and PPR regsets.
363         (store_register, store_ppc_registers): Call store_regset with
364         DSCR and PPR regsets.
365         (ppc_linux_get_hwcap2): New function.
366         (ppc_linux_nat_target::read_description): Call
367         ppc_linux_get_hwcap2 and check_regset, set ppr_dscr field in the
368         features struct if needed.
369         * ppc-linux-tdep.c: Include
370         features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c and
371         features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c.
372         (ppc32_regmap_ppr, ppc32_regmap_dscr, ppc32_linux_pprregset)
373         (ppc32_linux_dscrregset): New globals.
374         (ppc_linux_iterate_over_regset_sections): Call back with the ppr
375         and dscr regsets.
376         (ppc_linux_core_read_description): Check if the ppr and dscr
377         sections are present and set ppr_dscr in the features struct.
378         (_initialize_ppc_linux_tdep): Call
379         initialize_tdesc_powerpc_isa205_ppr_dscr_vsx32l and
380         initialize_tdesc_powerpc_isa205_ppr_dscr_vsx64l.
381         * ppc-linux-tdep.h (ppc32_linux_pprregset)
382         (ppc32_linux_dscrregset): Declare.
383         * ppc-tdep.h (struct gdbarch_tdep) <ppc_ppr_regnum>: New field.
384         <ppc_dscr_regnum>: New field.
385         (enum) <PPC_PPR_REGNUM, PPC_DSCR_REGNUM>: New enum values.
386         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate ppr
387         and dscr features.
388         (ppc_process_record_op31): Record changes to PPR and DSCR.
389
390 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
391
392         * rs6000-tdep.c (rs6000_gdbarch_init): Replace line wrapping by a
393         second initializer line for the have_* variables.  Initialize
394         have_fpu to 0 instead of 1.
395
396 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
397
398         * arch/ppc-linux-common.c (ppc_linux_match_description):
399         Parenthesize tdesc assignements and indent them properly.
400
401 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
402
403         * ppc-linux-nat.c (fetch_register): Change if statement to else
404         if.
405         (store_register): Likewise.
406
407 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
408
409         * rs6000-tdep.c: Remove reggroups.h include.
410         (rs6000_pseudo_register_reggroup_p): Remove.
411         (rs6000_gdbarch_init): Remove call to
412         set_tdesc_pseudo_register_reggroup_p.
413
414 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
415
416         * reggroups.c (default_register_reggroup_p): Return true for
417         decfloat registers and float_reggroup.
418
419 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
420
421         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): Remove.
422         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): Replace
423         ppc_linux_collect_vrregset by regcache_collect_regset.
424
425 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
426
427         * linux-tdep.c (linux_collect_regset_section_cb): Use
428         std::vector<gdb_byte> instead of char * and malloc for buf.
429         Remove xfree.
430
431 2018-10-26  Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
432
433         * xcoffread.c (read_xcoff_symtab): Pass deduced language to
434         symtab_start instead of always using language_unknown.
435
436 2018-10-26  Andrew Burgess  <andrew.burgess@embecosm.com>
437
438         * riscv-tdep.c (riscv_read_misa_reg): Update comment, remove
439         READ_P parameter, catch and ignore register access errors from
440         either the old or new MISA location.
441         (riscv_has_feature): Update call to riscv_read_misa_reg.
442
443 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
444
445         * python/py-function.c (convert_values_to_python): Return
446         gdbpy_ref<>.  Add header comment.
447         (fnpy_call): Adjust.
448
449 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
450
451         * python/py-cmd.c (cmdpy_completer_helper): Return gdbpy_ref<>.
452         (cmdpy_completer_handle_brkchars): Adjust.
453         (cmdpy_completer): Adjust.
454
455 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
456
457         * riscv-linux-nat.c (riscv_linux_nat_target::fetch_registers):
458         Pass correct regnum to raw_supply_zeroed.
459
460 2018-10-23  Hafiz Abid Qadeer  <abidh@codesourcery.com>
461
462         * regcache.c (cooked_read_test): Add CSKY to the list of
463         architectures with a save_reggroup
464
465 2018-10-23  Simon Marchi  <simon.marchi@polymtl.ca>
466
467         PR gdb/23368
468         * infrun.c (follow_exec): In the follow_exec_mode_new case,
469         transfer terminal state from old new new inferior.
470         * terminal.h (swap_terminal_info): New function.
471         * inflow.c (swap_terminal_info): New function.
472
473 2018-10-23  Tom Tromey  <tom@tromey.com>
474
475         * record-btrace.c (get_thread_current_frame_id): Rename from
476         get_thread_current_frame.  Return a frame_id.
477         (record_btrace_start_replaying): Update.
478
479 2018-10-23  Andrew Burgess  <andrew.burgess@embecosm.com>
480
481         * riscv-tdep.c (riscv_register_name): Use the user-friendly names
482         for CSRs.
483
484 2018-10-23  Joel Brobecker  <brobecker@adacore.com>
485
486         * riscv-tdep.c (riscv_gdbarch_init): Set the gdbarch's
487         have_nonsteppable_watchpoint attribute to 1.
488
489 2018-10-23  Andrew Burgess  <andrew.burgess@embecosm.com>
490
491         * riscv-tdep.c (riscv_gdb_reg_names): Update comment, and all
492         register names.
493         (struct register_alias): Rename to...
494         (struct riscv_register_alias): ...this, and update comment.
495         (riscv_register_aliases): Update type, and alias names.  Remove
496         CSR names from this list.
497         (riscv_register_name): Use riscv_gdb_reg_names for int and float
498         register names.  Add an extra assertion.
499         (riscv_is_regnum_a_named_csr): New function.
500         (riscv_register_reggroup_p): Use riscv_is_regnum_a_named_csr.
501
502 2018-10-22  Jim Wilson  <jimw@sifive.com>
503
504         * riscv-tdep.c (riscv_push_dummy_call) <in_reg>: Check for value in
505         FP reg smaller than FP reg size, and fill with -1 instead of 0.
506
507         * riscv-tdep.c (riscv_fpreg_d_type, riscv_fpreg_q_type): New.
508         (riscv_register_type): Use them.
509         (riscv_print_one_register_info): Handle union of floats same as float.
510         * riscv-tdep.h (struct gdbarch_tdep): Add riscv_fpreg_d_type and
511         riscv_fpreg_q_type fields.
512
513 2018-10-21  Simon Marchi  <simon.marchi@ericsson.com>
514
515         * gdbarch.sh (gdbarch_num_cooked_regs): New.
516         * gdbarch.h: Re-generate.
517         * ax-gdb.c (gen_expr): Use gdbarch_num_cooked_regs.
518         * dwarf2-frame.c (dwarf2_frame_cache): Likewise.
519         * eval.c (evaluate_subexp_standard): Likewise.
520         * findvar.c (value_of_register): Likewise.
521         (value_of_register_lazy): Likewise.
522         (address_from_register): Likewise.
523         * frame.c (get_frame_register_bytes): Likewise.
524         * gdbarch-selftests.c (register_to_value_test): Likewise.
525         * h8300-tdep.c (h8300_register_type): Likewise.
526         * i386-tdep.c (i386_dbx_reg_to_regnum): Likewise.
527         (i386_svr4_reg_to_regnum): Likewise.
528         * infcmd.c (default_print_registers_info): Likewise.
529         (registers_info): Likewise.
530         (print_vector_info): Likewise.
531         (default_print_float_info): Likewise.
532         * m68hc11-tdep.c (m68hc11_frame_unwind_cache): Likewise.
533         * mdebugread.c (mdebug_reg_to_regnum): Likewise.
534         * mi/mi-main.c (mi_cmd_data_list_register_names): Likewise.
535         (mi_cmd_data_list_changed_registers): Likewise.
536         (mi_cmd_data_list_register_values): Likewise.
537         (mi_cmd_data_write_register_values): Likewise.
538         (mi_cmd_trace_frame_collected): Likewise.
539         * mips-tdep.c (print_gp_register_row): Likewise.
540         (mips_print_registers_info): Likewise.
541         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
542         * regcache.c (init_regcache_descr): Likewise.
543         (register_size): Likewise.
544         (register_dump::dump): Likewise.
545         (cooked_read_test): Likewise.
546         (cooked_write_test): Likewise.
547         * rs6000-tdep.c (rs6000_register_sim_regno): Likewise.
548         (rs6000_gdbarch_init): Likewise.
549         * stabsread.c (stab_reg_to_regnum): Likewise.
550         * stack.c (info_frame_command): Likewise.
551         * target-descriptions.c (tdesc_register_name): Likewise.
552         * trad-frame.c (trad_frame_alloc_saved_regs): Likewise.
553         * tui/tui-regs.c (tui_show_register_group): Likewise.
554         * user-regs.c (user_reg_map_name_to_regnum): Likewise.
555         (user_reg_map_regnum_to_name): Likewise.
556         (value_of_user_reg): Likewise.
557         (maintenance_print_user_registers): Likewise.
558         * xtensa-tdep.c (xtensa_find_register_by_name): Likewise.
559         (xtensa_register_name): Likewise.
560         (xtensa_register_type): Likewise.
561         (xtensa_reg_to_regnum): Likewise.
562         (xtensa_pseudo_register_read): Likewise.
563         (xtensa_pseudo_register_write): Likewise.
564
565 2018-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
566
567         * amd64-tdep.c (amd64_pseudo_register_read_value): Use
568         correctly-sized buffer with raw_read.
569         (amd64_pseudo_register_write): Use correctly-sized buffer for
570         raw_read/raw_write.
571
572 2018-10-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
573
574         * typeprint.c (_initialize_typeprint): Fix wrong prefixname arg
575         in add_prefix_cmd of set print type.
576
577 2018-10-19  Tom Tromey  <tom@tromey.com>
578
579         PR tui/18388:
580         * NEWS: Mention tabset deprecation.
581         * tui/tui-win.c (tui_tab_width, internal_tab_width): New globals.
582         (update_tab_width): New function.
583         (tui_set_tab_width, tui_show_tab_width): New functions.
584         (tui_set_tab_width_command): Use update_tab_width.
585         (_initialize_tui_win): Move to end of file.  Deprecate "tabset".
586         Add new "set tui tab-width" command.
587         * tui/tui-source.c (tui_set_source_content): Update.
588         * tui/tui-disasm.c (tui_set_disassem_content): Update.
589         * tui/tui-data.h (tui_default_tab_len, tui_set_default_tab_len):
590         Don't declare.
591         (tui_tab_width): Declare.
592         * tui/tui-data.c (default_tab_len, tui_default_tab_len)
593         (tui_set_default_tab_len): Remove.
594
595 2018-10-19  Tom Tromey  <tom@tromey.com>
596
597         * tui/tui-io.h (key_is_start_sequence, key_is_end_sequence)
598         (key_is_backspace, tui_getc): Don't declare.
599         * tui/tui-io.c (key_is_start_sequence): Now static.
600         (key_is_end_sequence, key_is_backspace): Remove.
601         (tui_getc): Now static.
602
603 2018-10-19  Tom Tromey  <tom@tromey.com>
604
605         * symfile.c (reread_symbols): Clear "static_links".
606
607 2018-10-19  Alan Hayward  <alan.hayward@arm.com>
608
609         * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_SIZE): New
610         define.
611         (aarch64_linux_sigframe_init): Extra boundary checks.
612
613 2018-10-19  Andreas Arnez  <arnez@linux.ibm.com>
614
615         * s390-tdep.c (s390_pseudo_register_type): For v0-v15 don't yield
616         the possibly non-existent tdesc type 'vec128', but the type of raw
617         register v16 instead.
618
619 2018-10-19  Gary Benson <gbenson@redhat.com>
620
621         * cli/cli-interp.c (cli_interp::~cli_interp): New function.
622
623 2018-10-18  Sergio Durigan Junior  <sergiodj@redhat.com>
624
625         PR cli/23785
626         * cli/cli-dump.c (restore_binary_file): Check if "file" is
627         NULL.
628
629 2018-10-17  Paul Koning  <paul_koning@dell.com>
630
631         * charset.c (convert_between_encodings): Fix unsigned overflow.
632
633 2018-10-17  John Baldwin  <jhb@FreeBSD.org>
634
635         * fbsd-nat.c (fbsd_nat_target::info_proc) Use
636         fbsd_info_proc_mappings_header and fbsd_info_proc_mappings_entry.
637         * fbsd-tdep.c (fbsd_vm_map_entry_flags): Mark static.
638         (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
639         New functions.
640         (fbsd_core_info_proc_mappings): Use fbsd_info_proc_mappings_header
641         and fbsd_info_proc_mappings_header.
642         * fbsd-tdep.h (fbsd_vm_map_entry_flags): Remove.
643         (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
644         New.
645
646 2018-10-17  Joel Brobecker  <brobecker@adacore.com>
647
648         * MAINTAINERS (Responsible Maintainers): Add Rainer Orth as
649         Solaris Maintainer.
650
651 2018-10-15  Tom Tromey  <tom@tromey.com>
652
653         * tui/tui.c (strcat_to_buf): Remove casts.
654         * tui/tui-winsource.c (tui_show_source_line)
655         (tui_set_is_exec_point_at, tui_line_is_displayed): Remove casts.
656         * tui/tui-wingeneral.c (tui_refresh_win, box_win): Remove casts.
657         * tui/tui-windata.c (tui_first_data_item_displayed)
658         (tui_delete_data_content_windows, tui_erase_data_content)
659         (tui_display_all_data, tui_display_data_from)
660         (tui_refresh_data_win, tui_vertical_data_scroll): Remove casts.
661         * tui/tui-win.c (tui_set_win_height)
662         (make_invisible_and_set_new_height, parse_scrolling_args): Remove
663         casts.
664         * tui/tui-win.c (tui_resize_all): Remove casts.
665         (tui_scroll_backward_command, tui_set_focus)
666         (tui_set_tab_width_command): Likewise.
667         * tui/tui-source.c (tui_vertical_source_scroll): Remove cast.
668         * tui/tui-regs.c (tui_show_register_group): Remove cast.
669         * tui/tui-layout.c (tui_set_layout_by_name): Remove cast.
670         * tui/tui-disasm.c (tui_vertical_disassem_scroll): Remove cast.
671         * tui/tui-data.c (tui_partial_win_by_name, tui_free_win_content):
672         Remove casts.
673
674 2018-10-15  Simon Marchi  <simon.marchi@ericsson.com>
675
676         * MAINTAINERS (Responsible Maintainers): Add Alan Hayward as
677         AArch64/ARM maintainer.
678
679 2018-10-11  Gary Benson <gbenson@redhat.com>
680
681         * interps.h (interp::m_name): Make private and mutable.
682         * interps.c (interp::~interp): Free m_name.
683
684 2018-10-10  Sergio Durigan Junior  <sergiodj@redhat.com>
685             Simon Marchi <simark@simark.ca>
686
687         * README (`configure' options): Add documentation for new
688         "--enable-unit-tests" option.
689         * acinclude.m4: Include "selftest.m4".
690         * configure: Regenerate.
691         * configure.ac: Use "GDB_AC_SELFTEST".
692         * maint.c (maintenance_selftest): Update message informing
693         that selftests have been disabled.
694         (maintenance_info_selftests): Likewise.
695         * selftest.m4: New file.
696
697 2018-10-10  Gary Benson <gbenson@redhat.com>
698
699         * remote.c (remote_target::remote_send_printf): Add
700         missing va_end found by Coverity.
701
702 2018-10-10  Markus Metzger  <markus.t.metzger@intel.com>
703
704         * btrace.c (ftrace_update_function): Add indirect jump heuristic.
705
706 2018-10-09  Tom Tromey  <tom@tromey.com>
707
708         * configure: Rebuild.
709         * sanitize.m4 (AM_GDB_UBSAN): Default to no.
710         * NEWS: Update --enable-ubsan documentation.
711
712 2018-10-09  Gary Benson <gbenson@redhat.com>
713
714         * dwarf2read.c (create_dwp_hash_table): Fix buffer overrun
715         found by Coverity.
716
717 2018-10-08  Tom Tromey  <tom@tromey.com>
718
719         * riscv-fbsd-tdep.c (riscv_fbsd_sigframe_init): Remove unused
720         variable.
721         (riscv_fbsd_init_abi): Likewise.
722
723 2018-10-08  Weimin Pan  <weimin.pan@oracle.com>
724         * valops.c (value_struct_elt_for_reference): Rename local variable
725         to work around the shadowing a previous local warning.
726
727 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
728
729         * Makefile.in (ALLDEPFILES): Add riscv-fbsd-nat.c.
730         * NEWS: Mention new FreeBSD/riscv native configuration.
731         * configure.host: Add riscv*-*-freebsd*.
732         * configure.nat: Likewise.
733         * riscv-fbsd-nat.c: New file.
734
735 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
736
737         * Makefile.in (ALL_TARGET_OBS): Add riscv-fbsd-tdep.o.
738         (HFILES_NO_SRCDIR): Add riscv-fbsd-tdep.h.
739         (ALLDEPFILES): Add riscv-fbsd-tdep.c.
740         * NEWS: Mention new FreeBSD/riscv target.
741         * configure.tgt: Add riscv*-*-freebsd*.
742         * riscv-fbsd-tdep.c: New file.
743         * riscv-fbsd-tdep.h: New file.
744
745 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
746
747         * regcache.h (struct regcache_map_entry): Note that this type can
748         be used with traditional frame caches.
749         * trad-frame.c (trad_frame_set_reg_regmap): New.
750         * trad-frame.h (trad_frame_set_reg_regmap): New.
751
752 2018-10-08  Weimin Pan  <weimin.pan@oracle.com>
753
754         PR c++/16841
755         * valops.c (get_virtual_base_offset): New function.
756         (value_struct_elt_for_reference): Use it to get virtual base offset
757         and add it in calculating class member address.
758
759 2018-10-08   John Darrington <john@darrington.wattle.id.au>
760
761     * dwarf2read.c (dwarf2_cu) <producer_is_codewarrior>: New field.
762       (check_producer): Check if the producer is codewarrior.
763       (producer_is_codewarrior): New function.
764       (lnp_state_machine::record_line): Ignore is_stmt flag for records
765        produced by codewarrior.
766       (dwarf2_cu::dwarf2_cu): Initialize producer_is_codewarrior.
767
768 2018-10-06  Tom Tromey  <tom@tromey.com>
769
770         PR python/19399:
771         * python/py-inferior.c: Add "architecture" entry.
772         (infpy_architecture): New function.
773
774 2018-10-06  Tom Tromey  <tom@tromey.com>
775
776         PR python/21765:
777         * python/py-symbol.c (gdbpy_initialize_symbols): Redefine
778         SYMBOL_VARIABLES_DOMAIN, SYMBOL_FUNCTIONS_DOMAIN,
779         SYMBOL_TYPES_DOMAIN.  Define SYMBOL_MODULE_DOMAIN,
780         SYMBOL_COMMON_BLOCK_DOMAIN, SYMBOL_LOC_COMMON_BLOCK.
781
782 2018-10-06  Tom Tromey  <tom@tromey.com>
783
784         PR build/17077:
785         * Makefile.in (OPCODES_CFLAGS): Remove "-I$(OPCODES_SRC)/..".
786         * arc-tdep.c, frv-tdep.c, lm32-tdep.c, mep-tdep.c,
787         microblaze-tdep.c, or1k-tdep.h: Use ../opcodes, not opcodes, in
788         #include.
789
790 2018-10-06  Tom Tromey  <tom@tromey.com>
791
792         * python/py-breakpoint.c (bppy_get_location): Handle a
793         bp_breakpoint without a location.
794
795 2018-10-06  Tom Tromey  <tom@tromey.com>
796
797         * python/lib/gdb/function/strfns.py (_MemEq, _StrLen, _StrEq)
798         (_RegEx): Reformat help text.
799         * python/lib/gdb/function/caller_is.py (CallerIs, CallerMatches)
800         (AnyCallerIs, AnyCallerMatches): Reformat help text.
801         * python/lib/gdb/function/as_string.py (_AsString): Reformat help
802         text.
803         * python/lib/gdb/command/xmethods.py (InfoXMethod)
804         (EnableXMethod, DisableXMethod): Remove help indentation.
805         Capitalize meta-syntactic variables.
806         * python/lib/gdb/command/unwinders.py (InfoUnwinder)
807         (EnableUnwinder, DisableUnwinder): Remove help indentation.
808         Capitalize meta-syntactic variables.
809         * python/lib/gdb/command/explore.py (ExploreCommand)
810         (ExploreValueCommand, ExploreTypeCommand): Reformat help text.
811         * python/lib/gdb/command/type_printers.py (InfoTypePrinter)
812         (EnableTypePrinter, DisableTypePrinter): Remove help indentation.
813         * python/lib/gdb/command/pretty_printers.py (InfoPrettyPrinter):
814         Remove help indentation.
815         (EnablePrettyPrinter, DisablePrettyPrinter): Likewise.
816         * python/lib/gdb/command/frame_filters.py (EnableFrameFilter)
817         (DisableFrameFilter, SetFrameFilterPriority)
818         (ShowFrameFilterPriority, InfoFrameFilter): Reword help text.
819
820 2018-10-06  Tom Tromey  <tom@tromey.com>
821
822         PR tui/28819:
823         * tui/tui-io.c (gdb_wgetch): New function.
824         (tui_mld_getc, tui_getc): Use it.
825
826 2018-10-05  Tom Tromey  <tom@tromey.com>
827
828         * sol-thread.c (sol_thread_target::wait): Rename inner
829         "save_ptid".
830
831 2018-10-04  Tom Tromey  <tom@tromey.com>
832
833         * configure: Rebuild.
834         * warning.m4 (AM_GDB_WARNINGS): Add -Wshadow=local.
835
836 2018-10-04  Tom Tromey  <tom@tromey.com>
837
838         * guile/scm-frame.c (gdbscm_frame_read_var): Remove inner
839         declaration of "block".
840
841 2018-10-04  Tom Tromey  <tom@tromey.com>
842
843         * common/filestuff.c (fdwalk): Remove inner declaration of
844         "result".
845
846 2018-10-04  Tom Tromey  <tom@tromey.com>
847
848         * msp430-tdep.c (msp430_push_dummy_call): Rename inner
849         "structs_addr" and hoist declaration.
850
851 2018-10-04  Tom Tromey  <tom@tromey.com>
852
853         * linux-tdep.c (linux_make_mappings_corefile_notes): Introduce new
854         variable "size".
855
856 2018-10-04  Tom Tromey  <tom@tromey.com>
857
858         * mdebugread.c (parse_partial_symbols): Use std::string.
859
860 2018-10-04  Tom Tromey  <tom@tromey.com>
861
862         * ctf.c (SET_ARRAY_FIELD): Rename "u32".
863         * p-valprint.c (pascal_val_print): Split inner "i" variable.
864         * xtensa-tdep.c (xtensa_push_dummy_call): Declare "i" in loop
865         header.
866         * xstormy16-tdep.c (xstormy16_push_dummy_call): Declare "val" in
867         more inner scope.
868         * xcoffread.c (read_xcoff_symtab): Rename inner "symbol".
869         * varobj.c (varobj_update): Rename inner "newobj",
870         "type_changed".
871         * valprint.c (generic_emit_char): Rename inner "buf".
872         * valops.c (find_overload_match): Rename inner "temp".
873         (value_struct_elt_for_reference): Declare "v" in more inner
874         scope.
875         * v850-tdep.c (v850_push_dummy_call): Rename "len".
876         * unittests/array-view-selftests.c (run_tests): Rename inner
877         "vec".
878         * tui/tui-stack.c (tui_show_frame_info): Declare "i" in loop
879         header.
880         * tracepoint.c (merge_uploaded_trace_state_variables): Declare
881         "tsv" in more inner scope.
882         (print_one_static_tracepoint_marker): Rename inner
883         "tuple_emitter".
884         * tic6x-tdep.c (tic6x_analyze_prologue): Declare "inst" lower.
885         (tic6x_push_dummy_call): Don't redeclare "addr".
886         * target-float.c: Declare "dto" lower.
887         * symtab.c (lookup_local_symbol): Rename inner "sym".
888         (find_pc_sect_line): Rename inner "pc".
889         * stack.c (print_frame): Don't redeclare "gdbarch".
890         (return_command): Rename inner "gdbarch".
891         * s390-tdep.c (s390_prologue_frame_unwind_cache): Renam inner
892         "sp".
893         * rust-lang.c (rust_internal_print_type): Declare "i" in loop
894         header.
895         * rs6000-tdep.c (ppc_process_record): Rename inner "addr".
896         * riscv-tdep.c (riscv_push_dummy_call): Declare "info" in inner
897         scope.
898         * remote.c (remote_target::update_thread_list): Don't redeclare
899         "tp".
900         (remote_target::process_initial_stop_replies): Rename inner
901         "thread".
902         (remote_target::remote_parse_stop_reply): Don't redeclare "p".
903         (remote_target::wait_as): Don't redeclare "stop_reply".
904         (remote_target::get_thread_local_address): Rename inner
905         "result".
906         (remote_target::get_tib_address): Likewise.
907
908         * regcache.c (cooked_read_test): Rename "regnum".
909         * record-btrace.c (cmd_record_btrace_start): Rename inner
910         "exception".
911         * ppc-sysv-tdep.c (ppc64_sysv_abi_return_value): Declare "i" in
912         loop header.
913         * ppc-linux-tdep.c (ppc_linux_syscall_record): Declare "i" in loop
914         header.
915         (ppu2spu_sniffer): Rename inner "buf".
916         * parse.c (operator_check_standard): Rename inner "type",
917         "objfile".
918         * p-valprint.c (pascal_val_print): Introduce new scope for
919         "low_bound", "high_bound".
920         * p-exp.y (yylex): Declare "i" in loop header.
921         * objfiles.c (objfile_relocate1): Declare "i" in loop header.
922         Lower declaration of "s".
923         * nios2-tdep.c (nios2_analyze_prologue): Declare "i" in loop
924         header.
925         (nios2_push_dummy_call): Rename "len".
926         * nat/linux-osdata.c (linux_xfer_osdata_cpus): Rename static
927         "buf".
928         (linux_xfer_osdata_fds, linux_xfer_osdata_shm)
929         (linux_xfer_osdata_sem, linux_xfer_osdata_msg)
930         (linux_xfer_osdata_modules): Likewise.
931         * mips-tdep.c (mips_eabi_push_dummy_call): Rename outer "len".
932         (mips_n32n64_push_dummy_call, mips_o32_push_dummy_call)
933         (mips_o64_push_dummy_call): Likewise.
934         * microblaze-tdep.c (microblaze_analyze_prologue): Rename inner
935         "op".
936         * mi/mi-main.c (list_available_thread_groups): Rename inner
937         "tuple_emitter".
938         (mi_cmd_data_read_memory): Rename inner "opts".
939         * mi/mi-cmd-var.c (varobj_update_one): Rename inner
940         "tuple_emitter".
941         * mep-tdep.c (mep_analyze_prologue): Declare "rn" in loop header.
942         * mdebugread.c (parse_symbol): Rename inner "b".  Declare "f" in
943         more inner scope.
944         (parse_partial_symbols): Rename inner "pst", "p", "name"
945         * main.c (captured_main_1): Rename inner "i"s.
946         * machoread.c (macho_symfile_read_all_oso): Don't redeclare
947         "oso2".
948         * linux-tdep.c (linux_info_proc): Rename inner "filename".
949         * linespec.c (linespec_lexer_lex_string): Rename inner "p".
950         * infrun.c (handle_no_resumed): Don't redeclare "thread".
951         (handle_signal_stop): Rename inner "gdbarch".
952         (handle_command): Declare "signum" in loop header.
953         * ia64-tdep.c (ia64_pseudo_register_read): Don't redeclare
954         "status".
955         (examine_prologue): Rename inner "sol" and "sof".
956         (ia64_extract_return_value): Rename inner "val".  Declare another
957         "val" in a more inner scope.
958         * hppa-bsd-tdep.c (hppabsd_find_global_pointer): Declare "buf" in
959         inner scope.
960         * guile/scm-symbol.c (gdbscm_lookup_symbol): Rename inner
961         "except".
962         * findvar.c (default_read_var_value): Don't redeclare "addr".
963         * f-exp.y (yylex): Declare "i" in loop header.
964         * eval.c (evaluate_subexp_standard): Don't redeclare "type".
965         Rename inner "type", "expect_type".
966         (evaluate_subexp_for_sizeof): Rename inner "pc".
967         * elfread.c (elf_symfile_read): Rename inner "abfd".
968         * dwarf2read.c (read_debug_names_from_section): Don't redeclare
969         "bytes_read".
970         (process_psymtab_comp_unit_reader): Don't redeclare "gdbarch".
971         (add_partial_subprogram): Rename inner "lowpc" and "highpc".
972         (dwarf_decode_line_header): Rename inner "lh".
973         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Don't redeclare
974         "offset".  Declare "i" in loop header.
975         (disassemble_dwarf_expression): Rename inner "addr_size".
976         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Rename
977         inner "result".
978         (dwarf_expr_context::execute_stack_op): Rename inner "offset".
979         * dwarf2-frame.c (decode_frame_entry_1): Rename inner "length"s.
980         * disasm.c (do_mixed_source_and_assembly_deprecated): Rename inner
981         "inner_list_emitter".
982         (do_mixed_source_and_assembly): Rename inner "tuple_emitter".
983         * disasm-selftests.c (print_one_insn_test): Wrap "bplen"
984         declaration in a block.
985         * csky-tdep.c (csky_analyze_prologue): Declare "offset" lower.
986         * cp-valprint.c (cp_print_value_fields): Don't redeclare
987         "obstack_final_size".
988         * cp-support.c (inspect_type): Declare "i" in loop header.
989         * compile/compile.c (compile_instance::insert_symbol_error):
990         Rename inner "e".
991         * common/agent.c (agent_run_command): Remove inner "ret"
992         declaration.
993         * coffread.c (coff_symfile_read): Rename inner "name".
994         (coff_symfile_read): Rename inner "abfd".
995         * cli/cli-utils.c (get_number_trailer): Rename inner "val".
996         * cli/cli-cmds.c (print_disassembly): Rename inner "low" and
997         "high".
998         * c-exp.y (lex_one_token): Move "len" declaration lower.
999         * breakpoint.c (create_longjmp_master_breakpoint): Don't redeclare
1000         "gdbarch".
1001         (create_exception_master_breakpoint): Likewise.  Don't redeclare
1002         "b".
1003         (watch_command_1): Declare "mark" later.
1004         (clear_command): Don't shadow "a" or "b".
1005         (delete_command): Rename inner "b".
1006         (delete_trace_command): Likewise.
1007         * arm-tdep.c (thumb_process_displaced_32bit_insn): Rename inner
1008         "op".
1009         (arm_gdbarch_init): Remove inner "e_flags".
1010         * arch/arm-get-next-pcs.c (thumb_get_next_pcs_raw): Declare
1011         "offset" in inner blocks.
1012
1013 2018-10-04  Simon Marchi  <simon.marchi@ericsson.com>
1014
1015         * dwarf-index-write.c (file_write): Don't write if the vector is
1016         empty.
1017
1018 2018-10-05  Tom de Vries  <tdevries@suse.de>
1019
1020         * python/py-progspace.c (pspy_solib_name): Fix type mismatch in
1021         PyArg_ParseTuple call.
1022
1023 2018-10-05  Tom de Vries  <tdevries@suse.de>
1024
1025         * python/py-record-btrace.c (recpy_bt_goto): Fix type mismatch in
1026         PyArg_ParseTuple call.
1027
1028 2018-10-04  Joel Brobecker  <brobecker@adacore.com>
1029
1030         * psymtab.c (recursively_search_psymtabs): Reformat parameters
1031         to avoid exceeding 80 characters per line limit.
1032
1033 2018-10-04  Tom Tromey  <tom@tromey.com>
1034
1035         * symfile.c (syms_from_objfile_1, finish_new_objfile)
1036         (reread_symbols): Update.
1037         * complaints.h (clear_complaints): Remove argument.
1038         * complaints.c (enum complaint_series): Remove.
1039         (series): Remove global.
1040         (complaint_internal): Update.
1041         (clear_complaints): Remove argument.
1042
1043 2018-10-04  Tom Tromey  <tom@tromey.com>
1044
1045         * symfile.c (symbol_file_add_with_addrs): Do not print "no
1046         debugging symbols" message if there is a separate debug objfile.
1047
1048 2018-10-04  Tom Tromey  <tom@tromey.com>
1049
1050         PR cli/19551:
1051         * symfile.c (symbol_file_add_with_addrs): Update output.
1052         * psymtab.c (require_partial_symbols): Update output.
1053
1054 2018-10-04  Tom Tromey  <tom@tromey.com>
1055
1056         PR cli/22234:
1057         * complaints.c: Emit \n.
1058
1059 2018-10-04  Tom Tromey  <tom@tromey.com>
1060
1061         * symfile.c (symbol_file_add_with_addrs, symbol_file_clear)
1062         (separate_debug_file_exists, find_separate_debug_file)
1063         (add_symbol_file_command, reread_symbols, allocate_symtab)
1064         (allocate_compunit_symtab): Use filtered printing, not
1065         unfiltered.
1066         * psymtab.c (require_partial_symbols, dump_psymtab)
1067         (allocate_psymtab): Use filtered printing, not unfiltered.
1068
1069 2018-10-04  Tom Tromey  <tom@tromey.com>
1070
1071         * complaints.c (complaint_internal): Correctly check complaint
1072         count.
1073
1074 2018-10-04  Tom Tromey  <tom@tromey.com>
1075
1076         * complaints.h (struct complaints): Remove declaration.
1077         * complaints.c (clear_complaints): Remove an unused variable.
1078
1079 2018-10-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1080
1081         * MAINTAINERS (Write After Approval): Add self.
1082
1083 2018-10-03  Tom Tromey  <tom@tromey.com>
1084
1085         * guile/scm-value.c (gdbscm_value_to_string): Initialize
1086         "buffer_contents".
1087         * coffread.c (coff_symtab_read): Initialize "newobj".
1088
1089 2018-10-03  Simon Marchi  <simon.marchi@polymtl.ca>
1090
1091         * dwarf2read.c (read_func_scope): Remove struct keyword in
1092         range-based for.
1093
1094 2018-10-03  Tom Tromey  <tom@tromey.com>
1095
1096         * README: Mention --enable-ubsan.
1097         * NEWS: Mention --enable-ubsan.
1098         * acinclude.m4: Include sanitize.m4.
1099         * configure: Rebuild.
1100         * configure.ac: Call AM_GDB_UBSAN.
1101         * sanitize.m4: New file.
1102
1103 2018-10-03  Tom Tromey  <tom@tromey.com>
1104
1105         * expression.h (enum exp_opcode): Use uint8_t as base type.
1106         * expprint.c (op_name): Handle invalid opcodes.
1107
1108 2018-10-03  Tom Tromey  <tom@tromey.com>
1109
1110         * parse.c (prefixify_expression): Add assert.
1111         (parse_exp_in_context_1): Throw exception if the expression is
1112         empty.
1113
1114 2018-10-03  Tom Tromey  <tom@tromey.com>
1115
1116         * dwarf2read.c (read_signed_leb128): Work in ULONGEST.
1117
1118 2018-10-03  Tom Tromey  <tom@tromey.com>
1119
1120         * c-exp.y (parse_number): Work in unsigned.  Remove casts.
1121
1122 2018-10-03  Tom Tromey  <tom@tromey.com>
1123
1124         * dwarf2read.c (read_subrange_type): Make "negative_mask"
1125         unsigned.
1126
1127 2018-10-03  Tom Tromey  <tom@tromey.com>
1128
1129         * findvar.c (extract_integer): Do work in an unsigned type.
1130
1131 2018-10-03  Tom Tromey  <tom@tromey.com>
1132
1133         * common/enum-flags.h (enum_flags::operator~): Add static assert.
1134         * symfile-add-flags.h (enum symfile_add_flag): Use unsigned as
1135         base type.
1136         * objfile-flags.h (enum objfile_flag): Use unsigned as base type.
1137         * gdbtypes.h (enum type_instance_flag_value): Use unsigned as base
1138         type.
1139         * c-lang.h (enum c_string_type_values): Use unsigned as base
1140         type.
1141         * btrace.h (enum btrace_thread_flag): Use unsigned as base type.
1142
1143 2018-10-03  Tom Tromey  <tom@tromey.com>
1144
1145         * dwarf2-frame.h (dwarf2_frame_state_reg_info)
1146         <~dwarf2_frame_state_reg_info>: Update.
1147         <dwarf2_frame_state_reg_info>: Update.
1148         <alloc_regs>: Add assertion.  Update.
1149         <reg>: Now a std::vector.
1150         <num_regs>: Remove.
1151         <swap>: Update.
1152         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
1153         (execute_cfa_program_test, dwarf2_frame_cache): Update.
1154
1155 2018-10-03  Tom Tromey  <tom@tromey.com>
1156
1157         * namespace.c (add_using_directive): Don't pass NULL to memcpy.
1158
1159 2018-10-03  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1160
1161         * tid-parse.c (tid_is_in_list): Fix wrong 'See' comment.
1162
1163 2018-10-02  Tom Tromey  <tom@tromey.com>
1164
1165         * aarch64-linux-tdep.c (aarch64_linux_sigframe_init): Use pulongest.
1166
1167 2018-10-02  John Darrington <john@darrington.wattle.id.au>
1168
1169         * NEWS: Mention changed commands.
1170         * ser-uds.c: New file.
1171         * configure.ac (SER_HARDWIRE): Add ser-uds.o.
1172         * configure: Regenerate.
1173         * Makefile.in: Add new file.
1174         * serial.c (serial_open): Check if filename is a socket
1175           and lookup the appropriate interface accordingly.
1176
1177 2018-10-01  Alan Hayward  <alan.hayward@arm.com>
1178
1179         * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_OFFSET): Add
1180         define.
1181         (AARCH64_EXTRA_MAGIC): Likewise.
1182         (AARCH64_FPSIMD_MAGIC): Likewise.
1183         (AARCH64_SVE_MAGIC): Likewise.
1184         (AARCH64_EXTRA_DATAP_OFFSET): Likewise.
1185         (AARCH64_FPSIMD_FPSR_OFFSET): Likewise.
1186         (AARCH64_FPSIMD_FPCR_OFFSET): Likewise.
1187         (AARCH64_FPSIMD_V0_OFFSET): Likewise.
1188         (AARCH64_FPSIMD_VREG_SIZE): Likewise.
1189         (AARCH64_SVE_CONTEXT_VL_OFFSET): Likewise.
1190         (AARCH64_SVE_CONTEXT_REGS_OFFSET): Likewise.
1191         (AARCH64_SVE_CONTEXT_P_REGS_OFFSET): Likewise.
1192         (AARCH64_SVE_CONTEXT_FFR_OFFSET): Likewise.
1193         (AARCH64_SVE_CONTEXT_SIZE): Likewise.
1194         (read_aarch64_ctx): Add function.
1195         (aarch64_linux_sigframe_init): Detect FP registers.
1196
1197 2018-10-01  Alan Hayward  <alan.hayward@arm.com>
1198
1199         * aarch64-tdep.c (AARCH64_Q0_REGNUM): Move to here.
1200         (AARCH64_D0_REGNUM): Likewise.
1201         (AARCH64_S0_REGNUM): Likewise.
1202         (AARCH64_H0_REGNUM): Likewise.
1203         (AARCH64_B0_REGNUM): Likewise.
1204         (AARCH64_SVE_V0_REGNUM): Likewise.
1205         * arch/aarch64.h (AARCH64_Q0_REGNUM): Move from here.
1206         (AARCH64_D0_REGNUM): Likewise.
1207         (AARCH64_S0_REGNUM): Likewise.
1208         (AARCH64_H0_REGNUM): Likewise.
1209         (AARCH64_B0_REGNUM): Likewise.
1210         (AARCH64_SVE_V0_REGNUM): Likewise.
1211
1212 2018-10-01  Gary Benson <gbenson@redhat.com>
1213
1214         * gdb_proc_service.h (gdb_prfpregset_t): Remove typedef.
1215         * proc-service.c (ps_lgetfpregs, ps_lsetfpregs): Use
1216         prfpregset_t instead of gdb_prfpregset_t.
1217         * configure.ac (PRFPREGSET_T_BROKEN): Remove check.
1218         * configure, config.in: Rebuild.
1219
1220 2018-10-01  Gary Benson <gbenson@redhat.com>
1221
1222         * common/gdb_proc_service.h: New file, factored out from...
1223         * gdb_proc_service.h: Moved common code to the above file.
1224         * Makefile.in (HFILES_NO_SRCDIR): Add the above new file.
1225
1226 2018-10-01  Gary Benson <gbenson@redhat.com>
1227
1228         * gdb_proc_service.h: Use elf_gregset_t if prgregset_t is
1229         undefined.  Use elf_fpregset_t if prfpregset_t is undefined.
1230
1231 2018-10-01  Gary Benson <gbenson@redhat.com>
1232
1233         * configure.ac: Check if sys/procfs.h defines elf_fpregset_t.
1234         (AC_CHECK_HEADERS): Check for linux/elf.h.
1235         * configure, config.in: Rebuild.
1236         * gdb_proc_service.h: Include linux/elf.h if sys/procfs.h
1237         doesn't define elf_fpregset_t.
1238
1239 2018-10-01  Gary Benson <gbenson@redhat.com>
1240
1241         * gdb_proc_service.h: Whitespace change.
1242
1243 2018-10-01  Tom Tromey  <tom@tromey.com>
1244
1245         * unittests/scoped_mmap-selftests.c: Don't check HAVE_UNISTD_H.
1246         * unittests/scoped_fd-selftests.c: Don't check HAVE_UNISTD_H.
1247         * common/scoped_fd.h: Don't check HAVE_UNISTD_H.
1248
1249 2018-10-01  Tom Tromey  <tom@tromey.com>
1250
1251         * README: Minor change.
1252
1253 2018-09-30  Pedro Alves  <palves@redhat.com>
1254
1255         * darwin-nat-info.c (darwin_debug_regions_recurse)
1256         (info_mach_exceptions_command): Remove unused local variables.
1257         * darwin-nat.c (darwin_decode_notify_message)
1258         (darwin_nat_target::resume, darwin_nat_target::mourn_inferior)
1259         (darwin_stop_inferior, darwin_setup_exceptions)
1260         (darwin_nat_target::kill, darwin_attach_pid, darwin_ptrace_him)
1261         (darwin_nat_target::attach, darwin_nat_target::detach)
1262         (darwin_read_write_inferior, darwin_read_dyld_info): Remove unused
1263         local variables.
1264         * i386-darwin-nat.c (i386_darwin_dr_set): Remove unused local
1265         variables.
1266
1267 2018-09-29  Tom Tromey  <tom@tromey.com>
1268
1269         * README: Remove some leftover text.
1270
1271 2018-09-29  Tom Tromey  <tom@tromey.com>
1272
1273         * PROBLEMS: Rewrite.
1274         * README: Update.
1275
1276 2018-09-28  John Baldwin  <jhb@FreeBSD.org>
1277
1278         * disasm-selftests.c (print_one_insn_test): Add bfd_arch_riscv to
1279         case with explicit breakpoint kind.
1280         * riscv-tdep.c (show_use_compressed_breakpoints): Remove
1281         'additional_info' and related logic.
1282         (riscv_debug_breakpoints): New variable.
1283         (riscv_breakpoint_kind_from_pc): Use the length of the existing
1284         instruction to determine the breakpoint kind.
1285         (_initialize_riscv_tdep): Add 'set/show debug riscv breakpoints'
1286         flag.  Update description of 'set/show riscv
1287         use-compressed-breakpoints' flag.
1288
1289 2018-09-28  Andrew Burgess  <andrew.burgess@embecosm.com>
1290
1291         (NEWS): Mention changes to frame related commands.
1292         * cli/cli-decode.c (add_cmd_suppress_notification): New function.
1293         (add_prefix_cmd_suppress_notification): New function.
1294         (add_com_suppress_notification): Call
1295         add_cmd_suppress_notification.
1296         * command.h (add_cmd_suppress_notification): Declare.
1297         (add_prefix_cmd_suppress_notification): Declare.
1298         * mi/mi-cmd-stack.c: Add 'safe-ctype.h' include.
1299         (parse_frame_specification): Moved from stack.c, with
1300         simplification to handle a single argument.
1301         (mi_cmd_stack_select_frame): Use parse_frame_specification, the
1302         switch to the selected frame.  Add a header comment.
1303         * stack.c: Remove 'safe-ctype.h' include.
1304         (find_frame_for_function): Add declaration.
1305         (find_frame_for_address): New function.
1306         (parse_frame_specification): Moved into mi/mi-cmd-stack.c.
1307         (frame_selection_by_function_completer): New function.
1308         (info_frame_command): Rename to...
1309         (info_frame_command_core): ...this, and update parameter types.
1310         (select_frame_command): Rename to...
1311         (select_frame_command_core): ...this, and update parameter types.
1312         (frame_command): Rename to...
1313         (frame_command_core): ...this, and update parameter types.
1314         (class frame_command_helper): New class to wrap implementations of
1315         frame related sub-commands.
1316         (frame_apply_cmd_list): New static global.
1317         (frame_cmd_list): Make static.
1318         (select_frame_cmd_list): New global for sub-commands.
1319         (info_frame_cmd_list): New global for sub-commands.
1320         (_initialize_stack): Register sub-commands for 'frame',
1321         'select-frame', and 'info frame'.  Update 'frame apply' commands
1322         to use frame_apply_cmd_list.  Move function local static
1323         frame_apply_list to file static frame_apply_cmd_list for
1324         consistency.
1325         * stack.h (select_frame_command): Delete declarationn.
1326         (select_frame_for_mi): Declare new function.
1327
1328 2018-09-26  Andrew Burgess  <andrew.burgess@embecosm.com>
1329
1330         * riscv-tdep.c (riscv_insn::decode): Decode c.lui.
1331         (riscv_scan_prologue): Split handling of AUIPC, LUI, ADD, ADDI,
1332         and NOP.
1333
1334 2018-09-26  Simon Marchi  <simon.marchi@ericsson.com>
1335
1336         * elf32-nds32.c (elf32_nds32_allocate_dynrelocs): Remove.
1337
1338 2018-09-26  Tom Tromey  <tom@tromey.com>
1339
1340         * valops.c (auto_abandon): Remove dead code.
1341
1342 2018-09-26  Tom Tromey  <tom@tromey.com>
1343
1344         * tui/tui-win.c (WIN_HEIGHT_USAGE): Remove extra ">"s.
1345
1346 2018-09-24  Tom Tromey  <tom@tromey.com>
1347
1348         * common/pathstuff.c (get_standard_cache_dir): Make
1349         "xdg_cache_home" and "home" const.
1350         * top.c (init_history): Make "tmpenv" const.
1351         * main.c (get_init_files): Make "homedir" const.
1352
1353 2018-09-23  Tom Tromey  <tom@tromey.com>
1354
1355         PR python/18852:
1356         * python/py-param.c (get_set_value): Use gdbpy_handle_exception.
1357
1358 2018-09-23  Tom Tromey  <tom@tromey.com>
1359
1360         * python/py-function.c (fnpy_call): Use gdbpy_handle_exception.
1361         * python/py-cmd.c (cmdpy_function): Use gdbpy_handle_exception.
1362         * python/python-internal.h (gdbpy_handle_exception): Declare.
1363         * python/py-utils.c (gdbpy_handle_exception): New function.
1364
1365 2018-09-23  Tom Tromey  <tom@tromey.com>
1366
1367         PR python/17284:
1368         * python/py-type.c (typy_template_argument): Check for negative
1369         argument number.
1370
1371 2018-09-23  Tom Tromey  <tom@tromey.com>
1372
1373         PR python/14062:
1374         * python/python.c (gdbpy_run_events): Do not ignore exceptions.
1375
1376 2018-09-23  Tom Tromey  <tom@tromey.com>
1377
1378         PR python/18170:
1379         * python/py-value.c (valpy_int): Allow conversion from pointer
1380         type.
1381
1382 2018-09-23  Tom Tromey  <tom@tromey.com>
1383
1384         PR python/20126:
1385         * python/py-value.c (valpy_int): Respect type sign.
1386
1387 2018-09-23  Tom Tromey  <tom@tromey.com>
1388
1389         PR python/18352;
1390         * python/py-value.c (valpy_float): Allow conversions from int or
1391         char.
1392         (valpy_int, valpy_long): Allow conversions from float.
1393
1394 2018-09-23  Tom Tromey  <tom@tromey.com>
1395
1396         * ctf.c (ctf_start): Use gdb_fopen_cloexec.
1397         * common/scoped_mmap.c (mmap_file): Use gdb_open_cloexec.
1398
1399 2018-09-23  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1400
1401         * amd64-sol2-tdep.c (amd64_sol2_sigtramp_p): Also recognize
1402         __sighndlr.
1403         * i386-sol2-tdep.c (i386_sol2_sigtramp_p): Likewise.
1404
1405 2018-08-02  Jon Turney  <jon.turney@dronecode.org.uk>
1406
1407         * windows-nat.c (windows_nat_target::wait): Remove a spurious
1408         target_terminal::ours().
1409
1410 2018-09-23  Simon Marchi  <simon.marchi@ericsson.com>
1411
1412         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): Change type
1413         of vl to ULONGEST.
1414
1415 2018-09-21  Yacov Simhony  <ysimhony@gmail.com>
1416
1417         * breakpoint.c (update_inserted_breakpoint_locations): Remove
1418         redundant condition.
1419
1420 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1421
1422         * proc-utils.h (PROC_CTL_WORD_TYPE): Remove.
1423
1424         * procfs.c: Don't check for PR_MODEL_NATIVE definition.
1425         * sparc-sol2-nat.c: Likewise.  Remove Linux, __arch64__ references.
1426         * sol-thread.c (ps_pdmodel): Don't guard definition.
1427
1428         * procfs.c: Fix formatting.
1429
1430         * procfs.c (sysset_t_alloc): Remove.
1431         (create_procinfo): Use XNEW instead of sysset_t_alloc.
1432         (procfs_debug_inferior): Likewise.
1433         (procfs_set_exec_trap): Likewise.
1434         (proc_set_traced_sysentry): Don't allocate argp dynamically.
1435         (proc_set_traced_sysexit): Likewise.
1436
1437         * procfs.c (create_procinfo): Use xsnprintf to fix ARI warning.
1438         (dead_procinfo): Likewise.
1439         (proc_warn): Likewise.
1440         (proc_error): Likewise.
1441         (proc_get_LDT_entry): Likewise.
1442         (do_attach): Likewise.
1443         (procfs_target::pid_to_str): Likewise.
1444         (iterate_over_mappings): Likewise.
1445
1446         * procfs.c (create_procinfo): Fix ARI warning.
1447         (proc_get_status): Likewise.
1448         (proc_stop_process): Likewise.
1449         (proc_run_process): Likewise.
1450         (proc_kill): Likewise.
1451         (proc_get_LDT_entry): Likewise.
1452         (procfs_find_LDT_entry): Likewise.
1453         (proc_update_threads): Likewise.
1454         (proc_iterate_over_threads): Likewise.
1455         (do_attach): Likewise.
1456         (procfs_xfer_memory): Likewise.
1457         (invalidate_cache): Likewise.
1458         (procfs_target::resume): Likewise.
1459         (procfs_init_inferior): Likewise.
1460         (procfs_set_exec_trap): Likewise.
1461         (procfs_target::thread_alive): Likewise.
1462         (procfs_target::pid_to_exec_file): Likewise.
1463         (iterate_over_mappings): Likewise.
1464         (procfs_target::make_corefile_notes): Likewise.
1465         * sol-thread.c (sol_thread_target::thread_alive): Likewise.
1466
1467         * procfs.c (procfs_find_LDT_entry): Silence ARI warning.
1468         (procfs_find_LDT_entry): Likewise.
1469         * sol-thread.c (ps_lgetLDT): Likewise.
1470
1471 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1472
1473         PR tdep/17903
1474         * procfs.c (procfs_target): Declare pid_to_exec_file.
1475         (procfs_target::pid_to_exec_file): New.
1476
1477 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1478
1479         * auxv.c (default_print_auxv_entry): Reflect AT_SUN_CAP_HW1
1480         renaming.
1481         Handle AT_SUN_EMULATOR, AT_SUN_BRANDNAME, AT_SUN_BRAND_AUX1,
1482         AT_SUN_BRAND_AUX2, AT_SUN_BRAND_AUX3, AT_SUN_CAP_HW2.
1483
1484 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1485
1486         * i386-v4-nat.c (regmap, supply_gregset, fill_gregset)
1487         (supply_fpregset, fill_fpregset): Move ...
1488         * i386-sol2-nat.c [PR_MODEL_NATIVE != PR_MODEL_LP64]: ... here.
1489         Remove HAVE_GREGSET_T, HAVE_FPREGET_T guards.
1490         Remove references to ioctl-based procfs.
1491         Include <sys/reg.h>.
1492         Remove PR_MODEL_NATIVE guards.
1493         * configure.nat <sol2, i386> (NATDEPFILES): Remove i386-v4-nat.o.
1494         * Makefile.in (ALLDEPFILES): Remove i386-v4-nat.c.
1495
1496 2018-09-19  Xavier Roirand  <roirand@adacore.com>
1497
1498         PR gdb/20981:
1499         * solib-darwin.c (darwin_get_dyld_bfd): New function.
1500         (darwin_solib_get_all_image_info_addr_at_init): Update call.
1501         (darwin_solib_create_inferior_hook): Handle unrelocated dyld.
1502
1503 2018-09-19  John Baldwin  <jhb@FreeBSD.org>
1504
1505         * fbsd-tdep.c (fbsd_print_sockaddr_in): Style fix.
1506         (fbsd_print_sockaddr_in6): Likewise.
1507
1508 2018-09-19  Richard Bunt  <richard.bunt@arm.com>
1509             Chris January  <chris.january@arm.com>
1510
1511         * eval.c (skip_undetermined_arglist): Skip argument list helper.
1512         (evaluate_subexp_standard): Return a dummy type when
1513         honoring EVAL_SKIP in OP_VAR_VALUE and handle skipping in the
1514         OP_F77_UNDETERMINED_ARGLIST case.
1515         * expression.h (enum noside): Update comment.
1516
1517 2018-09-19  George Vasick <george.vasick@oracle.com>
1518
1519         * solib-svr4.c (svr4_same_1): Also handle amd64 ld.so.1.
1520
1521 2018-09-19  Stefan Teleman <stefan.teleman@oracle.com>
1522             April Chin <april.chin@oracle.com>
1523             Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1524
1525         * procfs.c (MAX_PROC_NAME_SIZE): Allow for 6-digit PID_MAX and
1526         uint_t lwpid_t.
1527         (create_procinfo): Print pids in /proc without leading zeros.
1528
1529 2018-09-18  Sandra Loosemore  <sandra@codesourcery.com>
1530
1531         * nios2-tdep.c (nios2_gcc_target_options): New.
1532         (nios2_gdb_arch_init): Install new hook.
1533
1534 2018-09-18  Simon Marchi  <simon.marchi@ericsson.com>
1535
1536         * patches/0001-Fix-PR-gdb-23558-Use-system-s-getcwd-when-cross-comp.patch:
1537         New file.
1538         * update-gnulib.sh: Apply patch.
1539         * configure: Re-generate.
1540
1541 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1542
1543         * infcmd.c (_initialize_infcmd): Remove "running" from "info proc"
1544         description.  Make "info proc" command descriptions more
1545         consistent.
1546
1547 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1548
1549         * NEWS: Mention 'info proc files' command.
1550
1551 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1552
1553         * fbsd-nat.c (fbsd_nat_target::info_proc): List open file
1554         descriptors for IP_FILES and IP_ALL.
1555
1556 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1557
1558         * fbsd-tdep.c (KF_FLAGS, KF_OFFSET, KF_VNODE_TYPE, KF_SOCK_DOMAIN)
1559         (KF_SOCK_TYPE, KF_SOCK_PROTOCOL, KF_SA_LOCAL, KF_SA_PEER)
1560         (KINFO_FILE_TYPE_SOCKET, KINFO_FILE_TYPE_PIPE)
1561         (KINFO_FILE_TYPE_FIFO, KINFO_FILE_TYPE_KQUEUE)
1562         (KINFO_FILE_TYPE_CRYPTO, KINFO_FILE_TYPE_MQUEUE)
1563         (KINFO_FILE_TYPE_SHM, KINFO_FILE_TYPE_SEM, KINFO_FILE_TYPE_PTS)
1564         (KINFO_FILE_TYPE_PROCDESC, KINFO_FILE_FD_TYPE_ROOT)
1565         (KINFO_FILE_FD_TYPE_JAIL, KINFO_FILE_FD_TYPE_TRACE)
1566         (KINFO_FILE_FD_TYPE_CTTY, KINFO_FILE_FLAG_READ)
1567         (KINFO_FILE_FLAG_WRITE, KINFO_FILE_FLAG_APPEND)
1568         (KINFO_FILE_FLAG_ASYNC, KINFO_FILE_FLAG_FSYNC)
1569         (KINFO_FILE_FLAG_NONBLOCK, KINFO_FILE_FLAG_DIRECT)
1570         (KINFO_FILE_FLAG_HASLOCK, KINFO_FILE_FLAG_EXEC)
1571         (KINFO_FILE_VTYPE_VREG, KINFO_FILE_VTYPE_VDIR)
1572         (KINFO_FILE_VTYPE_VCHR, KINFO_FILE_VTYPE_VLNK)
1573         (KINFO_FILE_VTYPE_VSOCK, KINFO_FILE_VTYPE_VFIFO, FBSD_AF_UNIX)
1574         (FBSD_AF_INET, FBSD_AF_INET6, FBSD_SOCK_STREAM, FBSD_SOCK_DGRAM)
1575         (FBSD_SOCK_SEQPACKET, FBSD_IPPROTO_ICMP, FBSD_IPPROTO_TCP)
1576         (FBSD_IPPROTO_UDP, FBSD_IPPROTO_SCTP): New defines.
1577         (struct fbsd_sockaddr_in, struct fbsd_sockaddr_in6)
1578         (struct fbsd_sockaddr_un): New types.
1579         (fbsd_file_fd, fbsd_file_type, fbsd_file_flags, fbsd_ipproto)
1580         (fbsd_print_sockaddr_in, fbsd_print_sockaddr_in6)
1581         (fbsd_info_proc_files_header, fbsd_info_proc_files_entry)
1582         (fbsd_core_info_proc_files): New functions.
1583         (fbsd_core_info_proc): List open file descriptors for IP_FILES and
1584         IP_ALL.
1585         * fbsd-tdep.h (fbsd_info_proc_files_header)
1586         (fbsd_info_proc_files_entry): New.
1587
1588 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1589
1590         * defs.h (enum info_proc_what) [IP_FILES]: New value.
1591         * infcmd.c (info_proc_cmd_files): New function.
1592         (_initialize_infcmd): Register 'info proc files' command.
1593
1594 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1595
1596         * gnulib/aclocal-m4-deps.mk: Re-generate.
1597         * gnulib/aclocal.m4: Re-generate.
1598         * gnulib/config.in: Re-generate.
1599         * gnulib/configure: Re-generate.
1600         * gnulib/import/Makefile.am: Re-generate.
1601         * gnulib/import/Makefile.in: Re-generate.
1602         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
1603         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1604         * gnulib/import/arpa_inet.in.h: New file.
1605         * gnulib/import/inet_ntop.c: New file.
1606         * gnulib/import/m4/arpa_inet_h.m4: New file.
1607         * gnulib/import/m4/inet_ntop.m4: New file.
1608         * gnulib/import/m4/netinet_in_h.m4: New file.
1609         * gnulib/import/m4/socklen.m4: New file.
1610         * gnulib/import/m4/sockpfaf.m4: New file.
1611         * gnulib/import/m4/stdalign.m4: New file.
1612         * gnulib/import/m4/sys_uio_h.m4: New file.
1613         * gnulib/import/netinet_in.in.h: New file.
1614         * gnulib/import/stdalign.in.h: New file.
1615         * gnulib/import/sys_socket.c: New file.
1616         * gnulib/import/sys_socket.in.h: New file.
1617         * gnulib/import/sys_uio.in.h: New file.
1618         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add inet_ntop
1619         module.
1620
1621 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1622
1623         * gnulib/aclocal-m4-deps.mk: New file.
1624         * gnulib/update-gnulib.sh: Generate "aclocal-m4-deps.mk"
1625         deterministically.
1626
1627 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1628
1629         * fbsd-tdep.c (fbsd_core_vnode_path): Use KF_PATH instead of
1630         KVE_PATH.
1631
1632 2018-09-18  Tom Tromey  <tom@tromey.com>
1633
1634         * compile/compile-object-load.c (struct
1635         link_hash_table_cleanup_data): Add constructor and destructor.
1636         Use DISABLE_COPY_AND_ASSIGN.
1637         (~link_hash_table_cleanup_data): Rename from
1638         link_hash_table_free.  Now a destructor.
1639         (copy_sections): Use gdb::unique_xmalloc_ptr.  Remove cleanups.
1640
1641 2018-09-18  Tom Tromey  <tom@tromey.com>
1642
1643         * compile/compile-object-run.c (do_module_cleanup): Use delete.
1644         * compile/compile-object-load.c (struct munmap_list): Move to
1645         header file.
1646         (munmap_list::add): Rename from munmap_list_add; rewrite.
1647         (munmap_list::~munmap_list): Rename from munmap_list_free.
1648         (munmap_listp_free_cleanup): Remove.
1649         (compile_object_load): Update.
1650         * compile/compile-object-load.h (struct munmap_list): Move from
1651         compile-object-load.c.  Rewrite.
1652
1653 2018-09-18  Alan Hayward  <alan.hayward@arm.com>
1654
1655         * aarch64-tdep.c (pass_in_v): Use register size.
1656         (aarch64_extract_return_value): Likewise.
1657         (aarch64_store_return_value): Likewise.
1658
1659 2018-09-18  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1660
1661         * utils.c (dump_core) [HAVE_SETRLIMIT]: Cast RLIM_INFINITY to
1662         rlim_t.
1663
1664 2018-09-17  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1665
1666         * python/lib/gdb/command/frame_filters.py (EnableFrameFilter):
1667         Fix short help line.
1668
1669 2018-09-17  Tom Tromey  <tom@tromey.com>
1670
1671         PR python/20445:
1672         * configure: Rebuild.
1673         * configure.ac: Conditionally use -DNDEBUG for Python.
1674
1675 2018-09-17  Tom Tromey  <tom@tromey.com>
1676
1677         * configure: Rebuild.
1678         * configure.ac: Use gmp as a library dependency when checking for
1679         mpfr.
1680
1681 2018-09-17  Pedro Alves  <palves@redhat.com>
1682
1683         * python/py-inferior.c (find_inferior_object): Delete.
1684
1685 2018-09-17  Simon Marchi  <simon.marchi@ericsson.com>
1686
1687         * compile/compile-cplus-types.c
1688         (compile_cplus_instance::enter_scope): Don't use new_scope after
1689         std::move.
1690
1691 2018-09-17  Tom Tromey  <tom@tromey.com>
1692
1693         * common/pathstuff.c (get_standard_cache_dir): Use
1694         ~/Library/Caches on macOS.
1695         * common/pathstuff.h (get_standard_cache_dir): Update comment.
1696
1697 2018-09-17  Simon Marchi  <simon.marchi@polymtl.ca>
1698
1699         PR python/23669
1700         * breakpoint.c (commands_cmd_element): New.
1701         (_initialize_breakpoint): Assign commands_cmd_element.
1702         * breakpoint.h (commands_cmd_element): New.
1703         * cli/cli-script.c (while_cmd_element, if_command,
1704         define_cmd_element): New.
1705         (command_name_equals): Remove.
1706         (process_next_line): Compare commands by pointer, not by name.
1707         (_initialize_cli_script): Assign the various cmd_list_element
1708         variables.
1709         * compile/compile.c (compile_cmd_element): New.
1710         (_initialize_compile): Assign compile_cmd_element.
1711         * compile/compile.h (compile_cmd_element): New.
1712         * guile/guile.c (guile_cmd_element): New.
1713         (install_gdb_commands): Assign guile_cmd_element.
1714         * guile/guile.h (guile_cmd_element): New.
1715         * python/python.c (python_cmd_element): New.
1716         (_initialize_python): Assign python_cmd_element.
1717         * python/python.h (python_cmd_element): New.
1718         * tracepoint.c (while_stepping_cmd_element): New.
1719         (_initialize_tracepoint): Assign while_stepping_cmd_element.
1720         * tracepoint.h (while_stepping_cmd_element): New.
1721
1722 2018-09-17  Tom Tromey  <tom@tromey.com>
1723
1724         * infrun.c (save_infcall_suspend_state): Return
1725         infcall_suspend_state_up.
1726         (save_infcall_control_state): Return infcall_control_state_up.
1727         * inferior.h (save_infcall_suspend_state)
1728         (save_infcall_control_state): Declare later.  Return unique
1729         pointers.
1730
1731 2018-09-17  Tom Tromey  <tom@tromey.com>
1732
1733         * infrun.c (struct stop_context): Declare constructor,
1734         destructor, "changed" method.
1735         (stop_context::stop_context): Rename from save_stop_context.
1736         (stop_context::~stop_context): Rename from
1737         release_stop_context_cleanup.
1738         (normal_stop): Update.
1739         (stop_context::changed): Rename from stop_context_changed.  Return
1740         bool.
1741
1742 2018-09-17  Tom Tromey  <tom@tromey.com>
1743
1744         * inferior.h (struct infcall_suspend_state_deleter): New.
1745         (infcall_suspend_state_up): New typedef.
1746         (struct infcall_control_state_deleter): New.
1747         (infcall_control_state_up): New typedef.
1748         (make_cleanup_restore_infcall_suspend_state)
1749         (make_cleanup_restore_infcall_control_state): Don't declare.
1750         * infcall.c (call_function_by_hand_dummy): Update.
1751         * infrun.c (do_restore_infcall_suspend_state_cleanup)
1752         (make_cleanup_restore_infcall_suspend_state): Remove.
1753         (do_restore_infcall_control_state_cleanup)
1754         (make_cleanup_restore_infcall_control_state): Remove.
1755
1756 2018-09-17  Tom Tromey  <tom@tromey.com>
1757
1758         * gdbthread.h (struct thread_control_state): Add initializer.
1759         (class thread_info) <control>: Remove initializer.
1760         * inferior.h (struct inferior_control_state): Add initializer.
1761         (class inferior) <control>: Remove initializer.
1762         (exit_inferior_1): Update.
1763         * infrun.c (struct infcall_control_state): Add constructors.
1764         (save_infcall_control_state): Use new.
1765         (restore_infcall_control_state, discard_infcall_control_state):
1766         Use delete.
1767
1768 2018-09-17  Tom Tromey  <tom@tromey.com>
1769
1770         * infrun.c (struct infcall_suspend_state) <registers>: Now a
1771         unique_ptr.
1772         <siginfo_data>: Now a unique_xmalloc_ptr.
1773         (save_infcall_suspend_state, restore_infcall_suspend_state)
1774         (discard_infcall_suspend_state)
1775         (get_infcall_suspend_state_regcache): Update.
1776
1777 2018-09-17  Tom Tromey  <tom@tromey.com>
1778
1779         * gdbthread.h (struct thread_suspend_state): Add initializers.
1780         (class thread_info) <suspend>: Remove initializer.
1781         * infrun.c (struct infcall_suspend_state): Add initializers.
1782         (save_infcall_suspend_state): Use new.
1783         (discard_infcall_suspend_state): Use delete.
1784
1785 2018-09-16  Tom Tromey  <tom@tromey.com>
1786
1787         * python/python-internal.h (CPYCHECKER_STEALS_REFERENCE_TO_ARG):
1788         Remove.
1789         * python/py-varobj.c (py_varobj_iter_ctor): Change pyiter to
1790         rvalue reference.  Remove CPYCHECKER_STEALS_REFERENCE_TO_ARG.
1791         (py_varobj_iter_new): Likewise.
1792         (py_varobj_get_iterator): Use gdbpy_ref.
1793
1794 2018-09-16  Tom Tromey  <tom@tromey.com>
1795
1796         * python/py-threadevent.c (py_get_event_thread): Simplify.
1797         * python/py-inferior.c (infpy_thread_from_thread_handle):
1798         Return immediately after calling thread_to_thread_object.  Use
1799         Py_RETURN_NONE.
1800         (thread_to_thread_object): Set the exception on a NULL return.
1801
1802 2018-09-16  Simon Marchi  <simon.marchi@polymtl.ca>
1803
1804         * Makefile.in (LIBGDB_OBS): Sort COMMON_OBS.
1805
1806 2018-09-16  Tom Tromey  <tom@tromey.com>
1807
1808         * python/python-internal.h (CPYCHECKER_RETURNS_BORROWED_REF):
1809         Remove.
1810
1811 2018-09-16  Tom Tromey  <tom@tromey.com>
1812
1813         * python/python-internal.h (thread_to_thread_object): Change
1814         return type.
1815         * python/py-inferior.c (thread_to_thread_object): Return a new
1816         reference.
1817         (infpy_thread_from_thread_handle): Update.
1818         * python/py-infthread.c (gdbpy_selected_thread): Update.
1819         * python/py-stopevent.c (create_stop_event_object): Update.
1820         * python/py-threadevent.c (py_get_event_thread): Return a new
1821         reference.
1822         (py_get_event_thread): Update.
1823         * python/py-event.h (py_get_event_thread): Change return type.
1824         * python/py-continueevent.c (create_continue_event_object):
1825         Update.
1826
1827 2018-09-16  Tom Tromey  <tom@tromey.com>
1828
1829         * python/py-progspace.c (pspy_get_objfiles): Update.
1830         * python/python-internal.h (objfile_to_objfile_object): Change
1831         return type.
1832         * python/py-newobjfileevent.c (create_new_objfile_event_object):
1833         Update.
1834         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
1835         Update.
1836         * python/python.c (gdbpy_get_current_objfile): Update.
1837         (gdbpy_objfiles): Update.
1838         * python/py-objfile.c (objfpy_get_owner, gdbpy_lookup_objfile):
1839         Update.
1840         (objfile_to_objfile_object): Return a new reference.
1841         * python/py-symtab.c (stpy_get_objfile): Update.
1842         * python/py-prettyprint.c (find_pretty_printer_from_objfiles):
1843         Update.
1844
1845 2018-09-16  Tom Tromey  <tom@tromey.com>
1846
1847         * python/py-inferior.c (infpy_get_progspace): Update.
1848         * python/python-internal.h (pspace_to_pspace_object): Change
1849         return type.
1850         * python/py-newobjfileevent.c
1851         (create_clear_objfiles_event_object): Update.
1852         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
1853         Update.
1854         * python/python.c (gdbpy_get_current_progspace): Update.
1855         (gdbpy_progspaces): Update.
1856         * python/py-progspace.c (pspace_to_pspace_object): Return a new
1857         reference.
1858         * python/py-objfile.c (objfpy_get_progspace): Update.
1859         * python/py-prettyprint.c (find_pretty_printer_from_progspace):
1860         Update.
1861
1862 2018-09-16  Tom Tromey  <tom@tromey.com>
1863
1864         * python/lib/gdb/__init__.py (current_progspace, objfiles)
1865         (solib_name, block_for_pc, find_pc_line): New functions.
1866         (execute_unwinders): Update.
1867         * python/py-block.c (gdbpy_block_for_pc): Remove.
1868         * python/py-inferior.c (infpy_get_progspace): New function.
1869         (inferior_object_getset) <progspace>: Add.
1870         * python/py-progspace.c (pspy_objfiles): Rewrite.
1871         (pspy_solib_name, pspy_block_for_pc)
1872         (pspy_find_pc_line, pspy_is_valid): New functions.
1873         (progspace_object_methods): Add entries for solib_name,
1874         block_for_pc, find_pc_line, is_valid.
1875         * python/python-internal.h (gdbpy_block_for_pc)
1876         (build_objfiles_list): Don't declare.
1877         * python/python.c: Don't include solib.h.
1878         (gdbpy_solib_name, gdbpy_find_pc_line)
1879         (gdbpy_get_current_progspace, build_objfiles_list)
1880         (gdbpy_objfiles): Remove.
1881         (GdbMethods) <current_progspace, objfiles, block_for_pc,
1882         solib_name, find_pc_line>: Remove entries.
1883
1884 2018-09-16  Tom Tromey  <tom@tromey.com>
1885
1886         * top.c (new_ui_command): Use GNU style for metasyntactic
1887         variables.
1888         * breakpoint.c (stopat_command): Use GNU style for metasyntactic
1889         variables.
1890         * maint.c (maintenance_translate_address): Remove "<>" around
1891         text.
1892         * interps.c (interpreter_exec_cmd): Use GNU style for
1893         metasyntactic variables.
1894         * nto-procfs.c (nto_procfs_target_info): Use GNU style for
1895         metasyntactic variables.
1896         * tracepoint.c (tfind_range_command): Use GNU style for
1897         metasyntactic variables.
1898         (tfind_outside_command): Likewise.
1899         (_initialize_tracepoint): Likewise.
1900         * remote.c (extended_remote_target::create_inferior): Use GNU
1901         style for metasyntactic variables.
1902         * sparc64-tdep.c (adi_examine_command): Use GNU style for
1903         metasyntactic variables.
1904         (adi_assign_command): Likewise.
1905
1906 2018-09-16  Tom Tromey  <tom@tromey.com>
1907
1908         * disasm.c (show_disassembler_options_sfunc): Use GNU style for
1909         metasyntactic variables.  Print message if no disassembler options
1910         are available.
1911
1912 2018-09-15  Tom Tromey  <tom@tromey.com>
1913
1914         * infcmd.c (get_inferior_args): Return const char *.
1915         * inferior.h (get_inferior_args): Return type now const.
1916         * linux-tdep.c (linux_fill_prpsinfo): Update.
1917         * procfs.c (procfs_target::make_corefile_notes): Update.
1918
1919 2018-09-07  Tom Tromey  <tom@tromey.com>
1920
1921         * python/python.c (execute_gdb_command): Call bpstat_do_actions
1922         inside the TRY.
1923
1924 2018-09-14  Sandra Loosemore  <sandra@codesourcery.com>
1925
1926         * nios2-tdep.c (nios2_type_align): New.
1927         (nios2_gdb_arch_init): Install type_align hook.
1928
1929 2018-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
1930
1931         * eval.c (fake_method::fake_method): Call xzalloc directly for a
1932         type that is neither object file owned, nor gdbarch owned.
1933         * gdbtypes.c (get_type_gdbarch): Add an assert that returned
1934         gdbarch is non-NULL.
1935         (alloc_type_instance): Allocate non-objfile owned types on the
1936         gdbarch obstack.
1937         (copy_type_recursive): Allocate TYPE_FIELDS and TYPE_RANGE_DATA
1938         using TYPE_ALLOC to ensure memory is allocated on the correct
1939         obstack.
1940         * gdbtypes.h (TYPE_ALLOC): Allocate space on either the objfile
1941         obstack, or the gdbarch obstack.
1942         (TYPE_ZALLOC): Rewrite using TYPE_ALLOC.
1943
1944 2018-09-14  Tom Tromey  <tom@tromey.com>
1945
1946         * infcall.c (call_function_by_hand_dummy): Remove unnecessary
1947         block.
1948
1949 2018-09-14  Tom Tromey  <tom@tromey.com>
1950
1951         * nat/fork-inferior.c (get_startup_shell): Remove "static".
1952
1953 2018-09-13  Tom Tromey  <tom@tromey.com>
1954
1955         * python/py-inferior.c (infpy_thread_from_thread_handle): Now
1956         static.
1957
1958 2018-09-13  Tom Tromey  <tom@tromey.com>
1959
1960         * exec.c (try_open_exec_file): Use std::string.
1961
1962 2018-09-13  Tom Tromey  <tom@tromey.com>
1963
1964         * utils.h (gdb_bfd_errmsg): Return std::string.
1965         * exec.c (exec_file_attach): Update.
1966         * compile/compile-object-load.c (compile_object_load): Update.
1967         * utils.c (gdb_bfd_errmsg): Return std::string.
1968
1969 2018-09-13  Tom Tromey  <tom@tromey.com>
1970
1971         * procfs.c (struct procinfo_deleter): New.
1972         (procinfo_up): New typedef.
1973         (do_destroy_procinfo_cleanup): Remove.
1974         (procfs_target::info_proc): Use procinfo_up.  Remove cleanups.
1975
1976 2018-09-13  Tom Tromey  <tom@tromey.com>
1977
1978         * source.c (add_path): Use gdb::unique_xmalloc_ptr.
1979
1980 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
1981 2018-09-13  Tom Tromey  <tom@tromey.com>
1982
1983         * python/py-progspace.c (PSPY_REQUIRE_VALID): New macro.
1984         (pspy_get_objfiles): New function.
1985         (progspace_object_methods): New.
1986         (pspace_object_type): Add tp_methods callback.
1987         * python/python-internal.h (build_objfiles_list): New
1988         declaration.
1989         * python/python.c (build_objfiles_list): New function.
1990         (gdbpy_objfiles): Implement using build_objfiles_list.
1991         * NEWS: Mention the Progspace.objfiles method.
1992
1993 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
1994
1995         * python/py-inferior.c (infpy_get_progspace): New function.
1996         (inferior_object_getset): Add progspace property.
1997         * NEWS: Mention the new property.
1998
1999 2018-09-13  Tom Tromey  <tom@tromey.com>
2000
2001         PR rust/23650:
2002         * rust-lang.c (rust_evaluate_subexp): Use field name, not "foo".
2003
2004 2018-09-13  Tom Tromey  <tom@tromey.com>
2005
2006         PR rust/23626:
2007         * rust-lang.c (rust_enum_variant): Now static.
2008         (rust_empty_enum_p): New function.
2009         (rust_print_enum, rust_evaluate_subexp, rust_print_struct_def):
2010         Handle empty enum.
2011
2012 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
2013
2014         * python/py-inferior.c (infpy_repr): New.
2015         (inferior_object_type): Register infpy_repr.
2016         * python/py-objfile.c (objfpy_repr): New.
2017         (objfile_object_type): Register objfpy_repr.
2018
2019 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
2020
2021         * fbsd-nat.c (fbsd_nat_target::info_proc): Remove unused variable.
2022
2023 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
2024
2025         * aarch64-fbsd-tdep.h (AARCH64_FBSD_SIZEOF_GREGSET): Fix comment
2026         typo.
2027
2028 2018-09-12  Sergio Durigan Junior  <sergiodj@redhat.com>
2029
2030         * common/common-utils.c: Don't include '<sys/stat.h>'.
2031         (is_regular_file): Move to...
2032         * common/filestuff.c (is_regular_file): ... here.
2033         * common/common-utils.h (is_regular_file): Move to...
2034         * common/filestuff.h (is_regular_file): ... here.
2035
2036 2018-09-12  Simon Marchi  <simon.marchi@ericsson.com>
2037
2038         * skip.c (debug_skip): New variable.
2039         (skiplist_entry::do_skip_file_p): Add debug output.
2040         (skiplist_entry::do_skip_gfile_p): Likewise.
2041         (skiplist_entry::skip_function_p): Likewise.
2042         (_initialize_step_skip): Create debug command.
2043         * NEWS: Mention set/show debug skip.
2044
2045 2018-09-11  Xavier Roirand  <roirand@adacore.com>
2046
2047         * darwin-nat.c (should_disable_startup_with_shell):
2048         New function.
2049         (darwin_nat_target::create_inferior): Add call.
2050
2051 2018-09-11  Xavier Roirand  <roirand@adacore.com>
2052
2053         * darwin-nat.h (struct darwin_thread_info) <gdb_port,
2054         inf_port, msg_state>: Initialize.
2055         (struct darwin_thread_info) <signaled, single_step>: Change
2056         type and initialize.
2057         (struct darwin_thread_info) <event>: Initialize.
2058
2059 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
2060
2061         PR gdb/23555
2062         PR gdb/23558
2063         * gnulib/import/m4/getcwd-path-max.m4: Add cross-compilation
2064         guesses.
2065
2066 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
2067
2068         Revert:
2069         2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
2070
2071         PR gdb/23555
2072         PR gdb/23558
2073         * gnulib/aclocal.m4: Regenerate.
2074         * gnulib/config.in: Regenerate.
2075         * gnulib/configure: Regenerate.
2076         * gnulib/import/Makefile.am: Update.
2077         * gnulib/import/Makefile.in: Update.
2078         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
2079         * gnulib/import/_Noreturn.h: ... this.
2080         * gnulib/import/alloca.in.h: Update.
2081         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
2082         * gnulib/import/arg-nonnull.h: ... this.
2083         * gnulib/import/assure.h: Update.
2084         * gnulib/import/at-func.c: Update.
2085         * gnulib/import/basename-lgpl.c: Update.
2086         * gnulib/import/extra/snippet/c++defs.h: Rename to...
2087         * gnulib/import/c++defs.h: ... this.
2088         * gnulib/import/canonicalize-lgpl.c: Update.
2089         * gnulib/import/cdefs.h: Update.
2090         * gnulib/import/chdir-long.c: Update.
2091         * gnulib/import/chdir-long.h: Update.
2092         * gnulib/import/cloexec.c: Update.
2093         * gnulib/import/cloexec.h: Update.
2094         * gnulib/import/close.c: Update.
2095         * gnulib/import/closedir.c: Update.
2096         * gnulib/import/config.charset: Update.
2097         * gnulib/import/dirent-private.h: Update.
2098         * gnulib/import/dirent.in.h: Update.
2099         * gnulib/import/dirfd.c: Update.
2100         * gnulib/import/dirname-lgpl.c: Update.
2101         * gnulib/import/dirname.h: Update.
2102         * gnulib/import/dosname.h: Update.
2103         * gnulib/import/dup-safer-flag.c: Update.
2104         * gnulib/import/dup-safer.c: Update.
2105         * gnulib/import/dup.c: Update.
2106         * gnulib/import/dup2.c: Update.
2107         * gnulib/import/errno.in.h: Update.
2108         * gnulib/import/error.c: Update.
2109         * gnulib/import/error.h: Update.
2110         * gnulib/import/exitfail.c: Update.
2111         * gnulib/import/exitfail.h: Update.
2112         * gnulib/import/extra/update-copyright: Update.
2113         * gnulib/import/fchdir.c: Update.
2114         * gnulib/import/fcntl.c: Update.
2115         * gnulib/import/fcntl.in.h: Update.
2116         * gnulib/import/fd-hook.c: Update.
2117         * gnulib/import/fd-hook.h: Update.
2118         * gnulib/import/fd-safer-flag.c: Update.
2119         * gnulib/import/fd-safer.c: Update.
2120         * gnulib/import/fdopendir.c: Update.
2121         * gnulib/import/filename.h: Update.
2122         * gnulib/import/filenamecat-lgpl.c: Update.
2123         * gnulib/import/filenamecat.h: Update.
2124         * gnulib/import/flexmember.h: Update.
2125         * gnulib/import/float+.h: Update.
2126         * gnulib/import/float.c: Update.
2127         * gnulib/import/float.in.h: Update.
2128         * gnulib/import/fnmatch.c: Update.
2129         * gnulib/import/fnmatch.in.h: Update.
2130         * gnulib/import/fnmatch_loop.c: Update.
2131         * gnulib/import/fpucw.h: Update.
2132         * gnulib/import/frexp.c: Update.
2133         * gnulib/import/frexpl.c: Update.
2134         * gnulib/import/fstat.c: Update.
2135         * gnulib/import/fstatat.c: Update.
2136         * gnulib/import/getcwd-lgpl.c: Update.
2137         * gnulib/import/getcwd.c: Update.
2138         * gnulib/import/getdtablesize.c: Update.
2139         * gnulib/import/getlogin_r.c: Update.
2140         * gnulib/import/getprogname.c: Update.
2141         * gnulib/import/getprogname.h: Update.
2142         * gnulib/import/gettext.h: Update.
2143         * gnulib/import/gettimeofday.c: Update.
2144         * gnulib/import/glob-libc.h: Update.
2145         * gnulib/import/glob.c: Update.
2146         * gnulib/import/glob.in.h: Update.
2147         * gnulib/import/glob_internal.h: Update.
2148         * gnulib/import/glob_pattern_p.c: Update.
2149         * gnulib/import/globfree.c: Update.
2150         * gnulib/import/hard-locale.c: Update.
2151         * gnulib/import/hard-locale.h: Update.
2152         * gnulib/import/intprops.h: Update.
2153         * gnulib/import/inttypes.in.h: Update.
2154         * gnulib/import/isnan.c: Update.
2155         * gnulib/import/isnand-nolibm.h: Update.
2156         * gnulib/import/isnand.c: Update.
2157         * gnulib/import/isnanl-nolibm.h: Update.
2158         * gnulib/import/isnanl.c: Update.
2159         * gnulib/import/itold.c: Update.
2160         * gnulib/import/libc-config.h: Update.
2161         * gnulib/import/limits.in.h: Update.
2162         * gnulib/import/localcharset.c: Update.
2163         * gnulib/import/localcharset.h: Update.
2164         * gnulib/import/localtime-buffer.c: Update.
2165         * gnulib/import/localtime-buffer.h: Update.
2166         * gnulib/import/lstat.c: Update.
2167         * gnulib/import/m4/00gnulib.m4: Update.
2168         * gnulib/import/m4/__inline.m4: Update.
2169         * gnulib/import/m4/absolute-header.m4: Update.
2170         * gnulib/import/m4/alloca.m4: Update.
2171         * gnulib/import/m4/builtin-expect.m4: Update.
2172         * gnulib/import/m4/canonicalize.m4: Update.
2173         * gnulib/import/m4/chdir-long.m4: Update.
2174         * gnulib/import/m4/close.m4: Update.
2175         * gnulib/import/m4/closedir.m4: Update.
2176         * gnulib/import/m4/configmake.m4: Update.
2177         * gnulib/import/m4/d-ino.m4: Update.
2178         * gnulib/import/m4/d-type.m4: Update.
2179         * gnulib/import/m4/dirent_h.m4: Update.
2180         * gnulib/import/m4/dirfd.m4: Update.
2181         * gnulib/import/m4/dirname.m4: Update.
2182         * gnulib/import/m4/double-slash-root.m4: Update.
2183         * gnulib/import/m4/dup.m4: Update.
2184         * gnulib/import/m4/dup2.m4: Update.
2185         * gnulib/import/m4/eealloc.m4: Update.
2186         * gnulib/import/m4/environ.m4: Update.
2187         * gnulib/import/m4/errno_h.m4: Update.
2188         * gnulib/import/m4/error.m4: Update.
2189         * gnulib/import/m4/exponentd.m4: Update.
2190         * gnulib/import/m4/exponentl.m4: Update.
2191         * gnulib/import/m4/extensions.m4: Update.
2192         * gnulib/import/m4/extern-inline.m4: Update.
2193         * gnulib/import/m4/fchdir.m4: Update.
2194         * gnulib/import/m4/fcntl-o.m4: Update.
2195         * gnulib/import/m4/fcntl.m4: Update.
2196         * gnulib/import/m4/fcntl_h.m4: Update.
2197         * gnulib/import/m4/fdopendir.m4: Update.
2198         * gnulib/import/m4/filenamecat.m4: Update.
2199         * gnulib/import/m4/flexmember.m4: Update.
2200         * gnulib/import/m4/float_h.m4: Update.
2201         * gnulib/import/m4/fnmatch.m4: Update.
2202         * gnulib/import/m4/fnmatch_h.m4: Update.
2203         * gnulib/import/m4/fpieee.m4: Update.
2204         * gnulib/import/m4/frexp.m4: Update.
2205         * gnulib/import/m4/frexpl.m4: Update.
2206         * gnulib/import/m4/fstat.m4: Update.
2207         * gnulib/import/m4/fstatat.m4: Update.
2208         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
2209         * gnulib/import/m4/getcwd-path-max.m4: Update.
2210         * gnulib/import/m4/getcwd.m4: Update.
2211         * gnulib/import/m4/getdtablesize.m4: Update.
2212         * gnulib/import/m4/getlogin.m4: Update.
2213         * gnulib/import/m4/getlogin_r.m4: Update.
2214         * gnulib/import/m4/getpagesize.m4: Update.
2215         * gnulib/import/m4/getprogname.m4: Update.
2216         * gnulib/import/m4/gettimeofday.m4: Update.
2217         * gnulib/import/m4/glibc21.m4: Update.
2218         * gnulib/import/m4/glob.m4: Update.
2219         * gnulib/import/m4/glob_h.m4: Update.
2220         * gnulib/import/m4/gnulib-cache.m4: Update.
2221         * gnulib/import/m4/gnulib-common.m4: Update.
2222         * gnulib/import/m4/gnulib-comp.m4: Update.
2223         * gnulib/import/m4/gnulib-tool.m4: Update.
2224         * gnulib/import/m4/hard-locale.m4: Update.
2225         * gnulib/import/m4/include_next.m4: Update.
2226         * gnulib/import/m4/inttypes-pri.m4: Update.
2227         * gnulib/import/m4/inttypes.m4: Update.
2228         * gnulib/import/m4/isnand.m4: Update.
2229         * gnulib/import/m4/isnanl.m4: Update.
2230         * gnulib/import/m4/largefile.m4: Update.
2231         * gnulib/import/m4/limits-h.m4: Update.
2232         * gnulib/import/m4/localcharset.m4: Update.
2233         * gnulib/import/m4/locale-fr.m4: Update.
2234         * gnulib/import/m4/locale-ja.m4: Update.
2235         * gnulib/import/m4/locale-zh.m4: Update.
2236         * gnulib/import/m4/localtime-buffer.m4: Update.
2237         * gnulib/import/m4/longlong.m4: Update.
2238         * gnulib/import/m4/lstat.m4: Update.
2239         * gnulib/import/m4/malloc.m4: Update.
2240         * gnulib/import/m4/malloca.m4: Update.
2241         * gnulib/import/m4/math_h.m4: Update.
2242         * gnulib/import/m4/mbrtowc.m4: Update.
2243         * gnulib/import/m4/mbsinit.m4: Update.
2244         * gnulib/import/m4/mbsrtowcs.m4: Update.
2245         * gnulib/import/m4/mbstate_t.m4: Update.
2246         * gnulib/import/m4/memchr.m4: Update.
2247         * gnulib/import/m4/memmem.m4: Update.
2248         * gnulib/import/m4/mempcpy.m4: Update.
2249         * gnulib/import/m4/memrchr.m4: Update.
2250         * gnulib/import/m4/mkdir.m4: Update.
2251         * gnulib/import/m4/mkstemp.m4: Update.
2252         * gnulib/import/m4/mmap-anon.m4: Update.
2253         * gnulib/import/m4/mode_t.m4: Update.
2254         * gnulib/import/m4/msvc-inval.m4: Update.
2255         * gnulib/import/m4/msvc-nothrow.m4: Update.
2256         * gnulib/import/m4/multiarch.m4: Update.
2257         * gnulib/import/m4/nocrash.m4: Update.
2258         * gnulib/import/m4/off_t.m4: Update.
2259         * gnulib/import/m4/onceonly.m4: Update.
2260         * gnulib/import/m4/open-cloexec.m4: Update.
2261         * gnulib/import/m4/open.m4: Update.
2262         * gnulib/import/m4/openat.m4: Update.
2263         * gnulib/import/m4/opendir.m4: Update.
2264         * gnulib/import/m4/pathmax.m4: Update.
2265         * gnulib/import/m4/rawmemchr.m4: Update.
2266         * gnulib/import/m4/readdir.m4: Update.
2267         * gnulib/import/m4/readlink.m4: Update.
2268         * gnulib/import/m4/realloc.m4: Update.
2269         * gnulib/import/m4/rename.m4: Update.
2270         * gnulib/import/m4/rewinddir.m4: Update.
2271         * gnulib/import/m4/rmdir.m4: Update.
2272         * gnulib/import/m4/save-cwd.m4: Update.
2273         * gnulib/import/m4/secure_getenv.m4: Update.
2274         * gnulib/import/m4/setenv.m4: Update.
2275         * gnulib/import/m4/signal_h.m4: Update.
2276         * gnulib/import/m4/ssize_t.m4: Update.
2277         * gnulib/import/m4/stat-time.m4: Update.
2278         * gnulib/import/m4/stat.m4: Update.
2279         * gnulib/import/m4/std-gnu11.m4: Update.
2280         * gnulib/import/m4/stdbool.m4: Update.
2281         * gnulib/import/m4/stddef_h.m4: Update.
2282         * gnulib/import/m4/stdint.m4: Update.
2283         * gnulib/import/m4/stdio_h.m4: Update.
2284         * gnulib/import/m4/stdlib_h.m4: Update.
2285         * gnulib/import/m4/strchrnul.m4: Update.
2286         * gnulib/import/m4/strdup.m4: Update.
2287         * gnulib/import/m4/strerror.m4: Update.
2288         * gnulib/import/m4/string_h.m4: Update.
2289         * gnulib/import/m4/strstr.m4: Update.
2290         * gnulib/import/m4/strtok_r.m4: Update.
2291         * gnulib/import/m4/sys_socket_h.m4: Update.
2292         * gnulib/import/m4/sys_stat_h.m4: Update.
2293         * gnulib/import/m4/sys_time_h.m4: Update.
2294         * gnulib/import/m4/sys_types_h.m4: Update.
2295         * gnulib/import/m4/tempname.m4: Update.
2296         * gnulib/import/m4/time_h.m4: Update.
2297         * gnulib/import/m4/unistd-safer.m4: Update.
2298         * gnulib/import/m4/unistd_h.m4: Update.
2299         * gnulib/import/m4/warn-on-use.m4: Update.
2300         * gnulib/import/m4/wchar_h.m4: Update.
2301         * gnulib/import/m4/wchar_t.m4: Update.
2302         * gnulib/import/m4/wctype_h.m4: Update.
2303         * gnulib/import/m4/wint_t.m4: Update.
2304         * gnulib/import/malloc.c: Update.
2305         * gnulib/import/malloc/scratch_buffer.h: Update.
2306         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
2307         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
2308         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
2309         * gnulib/import/malloca.c: Update.
2310         * gnulib/import/malloca.h: Update.
2311         * gnulib/import/malloca.valgrind: Update.
2312         * gnulib/import/math.in.h: Update.
2313         * gnulib/import/mbrtowc.c: Update.
2314         * gnulib/import/mbsinit.c: Update.
2315         * gnulib/import/mbsrtowcs-impl.h: Update.
2316         * gnulib/import/mbsrtowcs-state.c: Update.
2317         * gnulib/import/mbsrtowcs.c: Update.
2318         * gnulib/import/memchr.c: Update.
2319         * gnulib/import/memmem.c: Update.
2320         * gnulib/import/mempcpy.c: Update.
2321         * gnulib/import/memrchr.c: Update.
2322         * gnulib/import/mkdir.c: Update.
2323         * gnulib/import/mkstemp.c: Update.
2324         * gnulib/import/msvc-inval.c: Update.
2325         * gnulib/import/msvc-inval.h: Update.
2326         * gnulib/import/msvc-nothrow.c: Update.
2327         * gnulib/import/msvc-nothrow.h: Update.
2328         * gnulib/import/open.c: Update.
2329         * gnulib/import/openat-die.c: Update.
2330         * gnulib/import/openat-priv.h: Update.
2331         * gnulib/import/openat-proc.c: Update.
2332         * gnulib/import/openat.c: Update.
2333         * gnulib/import/openat.h: Update.
2334         * gnulib/import/opendir.c: Update.
2335         * gnulib/import/pathmax.h: Update.
2336         * gnulib/import/pipe-safer.c: Update.
2337         * gnulib/import/rawmemchr.c: Update.
2338         * gnulib/import/readdir.c: Update.
2339         * gnulib/import/readlink.c: Update.
2340         * gnulib/import/realloc.c: Update.
2341         * gnulib/import/ref-add.sin: Update.
2342         * gnulib/import/ref-del.sin: Update.
2343         * gnulib/import/rename.c: Update.
2344         * gnulib/import/rewinddir.c: Update.
2345         * gnulib/import/rmdir.c: Update.
2346         * gnulib/import/same-inode.h: Update.
2347         * gnulib/import/save-cwd.c: Update.
2348         * gnulib/import/save-cwd.h: Update.
2349         * gnulib/import/scratch_buffer.h: Update.
2350         * gnulib/import/secure_getenv.c: Update.
2351         * gnulib/import/setenv.c: Update.
2352         * gnulib/import/signal.in.h: Update.
2353         * gnulib/import/stat-time.c: Update.
2354         * gnulib/import/stat-time.h: Update.
2355         * gnulib/import/stat-w32.c: Update.
2356         * gnulib/import/stat-w32.h: Update.
2357         * gnulib/import/stat.c: Update.
2358         * gnulib/import/stdbool.in.h: Update.
2359         * gnulib/import/stddef.in.h: Update.
2360         * gnulib/import/stdint.in.h: Update.
2361         * gnulib/import/stdio.in.h: Update.
2362         * gnulib/import/stdlib.in.h: Update.
2363         * gnulib/import/str-two-way.h: Update.
2364         * gnulib/import/strchrnul.c: Update.
2365         * gnulib/import/strdup.c: Update.
2366         * gnulib/import/streq.h: Update.
2367         * gnulib/import/strerror-override.c: Update.
2368         * gnulib/import/strerror-override.h: Update.
2369         * gnulib/import/strerror.c: Update.
2370         * gnulib/import/string.in.h: Update.
2371         * gnulib/import/stripslash.c: Update.
2372         * gnulib/import/strnlen1.c: Update.
2373         * gnulib/import/strnlen1.h: Update.
2374         * gnulib/import/strstr.c: Update.
2375         * gnulib/import/strtok_r.c: Update.
2376         * gnulib/import/sys_stat.in.h: Update.
2377         * gnulib/import/sys_time.in.h: Update.
2378         * gnulib/import/sys_types.in.h: Update.
2379         * gnulib/import/tempname.c: Update.
2380         * gnulib/import/tempname.h: Update.
2381         * gnulib/import/time.in.h: Update.
2382         * gnulib/import/unistd--.h: Update.
2383         * gnulib/import/unistd-safer.h: Update.
2384         * gnulib/import/unistd.in.h: Update.
2385         * gnulib/import/unsetenv.c: Update.
2386         * gnulib/import/verify.h: Update.
2387         * gnulib/import/extra/snippet/warn-on-use.h: Update.
2388         * gnulib/import/wchar.in.h: Update.
2389         * gnulib/import/wctype.in.h: Update.
2390         * gnulib/import/xalloc-oversized.h: Update.
2391         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
2392         "53e2c179f26a890fa6685af4b6c1397ee370433b".
2393
2394 2018-09-10  Simon Marchi  <simon.marchi@ericsson.com>
2395
2396         * record-btrace.c (get_thread_current_frame): Remove
2397         old_inferior_ptid.
2398
2399 2018-09-10  Jerome Guitton  <guitton@adacore.com>
2400
2401         * ada-lang.c (ada_value_struct_elt): Call ada_to_fixed_type
2402         with check_tag to 1 if and only if the type is tagged and the
2403         component being searched cannot been found in the current
2404         view. Otherwise, always call ada_to_fixed_type with
2405         check_tag to 0.
2406
2407 2018-09-10  Xavier Roirand  <roirand@adacore.com>
2408
2409         * ada-lang.c (ada_is_access_to_unconstrained_array): Remove static
2410         declaration.
2411         * ada-lang.h: add ada_is_access_to_unconstrained_array prototype.
2412         * ada-varobj.c (ada_varobj_get_number_of_children,
2413         ada_varobj_describe_child, ada_value_is_changeable_p): Cleanup code.
2414
2415 2018-09-10  Xavier Roirand  <roirand@adacore.com>
2416
2417         * ada-valprint.c (ada_value_print): Use type instead of
2418         enclosing type.
2419
2420 2018-09-10  Xavier Roirand  <roirand@adacore.com>
2421
2422         * ada-lang.c (ada_value_subscript): Handle case when parameter is
2423         an array of access to unconstrained array.
2424
2425 2018-09-10  Xavier Roirand  <roirand@adacore.com>
2426
2427         * ada-lang.c (ada_is_access_to_unconstrained_array): New function.
2428         (ada_check_typedef): Use it.
2429
2430 2018-09-10  Xavier Roirand  <roirand@adacore.com>
2431
2432         * ada-varobj.c (ada_varobj_describe_struct_child)
2433         (ada_varobj_describe_child): Handle union case like struct one.
2434
2435 2018-09-10  Tom Tromey  <tom@tromey.com>
2436
2437         PR python/18380:
2438         * python/python.c (_initialize_python): Make example in "python"
2439         help work in Python 3.
2440
2441 2018-09-10  Eli Zaretskii  <eliz@gnu.org>
2442
2443         * Makefile.in (transformed_name): Use INSTALL_SCRIPT instead of
2444         INSTALL_PROGRAM to install gdb-add-index.sh.  Don't append
2445         $(EXEEXT) to the script, as it is not a program.
2446
2447 2018-09-09  Simon Marchi  <simon.marchi@ericsson.com>
2448
2449         * python/py-prettyprint.c (pretty_print_one_value): Return
2450         gdbpy_ref<>.
2451         (print_string_repr): Adjust.
2452         (apply_varobj_pretty_printer): Return gdbpy_ref<>.
2453         * python/python-internal.h (apply_varobj_pretty_printer): Return
2454         gdbpy_ref<>.
2455         * varobj.c (varobj_value_get_print_value): Adjust.
2456
2457 2018-09-08  Tom Tromey  <tom@tromey.com>
2458
2459         PR python/16047:
2460         * python/py-prettyprint.c (pretty_print_one_value): Check for
2461         to_string method.
2462
2463 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2464
2465         * ada-lang.c (resolve_subexp): Pass correct OPLEN in call to
2466         replace_operator_with_call.
2467
2468 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2469
2470         * ada-lang.c (ada_value_cast): Remove unnecessary parentheses.
2471
2472 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2473
2474         * ada-typeprint.c (print_range): Print the bounds using TYPE
2475         rather than its TYPE_TARGET_TYPE.
2476
2477 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2478
2479         * ada-lang.c (ada_to_fixed_value): Minor reformatting in
2480         call to ada_to_fixed_value_create.
2481
2482 2018-09-08  Jerome Guitton  <guitton@adacore.com>
2483
2484         * ada-lang.c (ada_decode): strip dot prefix in symbol name.
2485
2486 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2487
2488         * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
2489         by calls to error.
2490
2491 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2492
2493         * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
2494         Move update of loop variable "fi".
2495
2496 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2497
2498         * ada-lang.c (value_assign_to_component): In the case of
2499         big-endian targets, extract the bits of the given VAL
2500         using an src_offset of zero if container is not a scalar.
2501
2502 2018-09-06  Simon Ser  <contact@emersion.fr>
2503
2504         PR gdb/23105
2505         * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
2506         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
2507         * fbsd-tdep.c (fbsd_make_note_desc): New.
2508         (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
2509         NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
2510         * target.h (enum target_object) Add FreeBSD-specific
2511         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
2512
2513 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
2514
2515         * compile/compile-c.h (generate_c_for_variable_locations):
2516         Change reference to pointer.
2517         * compile/compile-c-support.c (compile_program) <compute>:
2518         Likewise.
2519         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
2520         (generate_c_for_for_one_variable): Likewise
2521         (generate_c_for_variable_locations): Likewise
2522         * compile/compile-c-types.c (compile_c_instance::convert_type):
2523         Likewise
2524         * compile/compile-cplus-symbols.c (convert_one_symbol):
2525         std::move the scope passed to enter_scope.
2526         * compile/compile-cplus-types.c
2527         (compile_cplus_instance::enter_scope): Make parameter
2528         rvalue-reference.
2529         (compile_cplus_instance::new_scope): Change reference to
2530         pointer.
2531         (compile_cplus_instance::convert_type): Likewise
2532         (compile_cplus_convert_typedef): std::move the scope passed to
2533         enter_scope.
2534         (compile_cplus_convert_struct_or_union): Likewise.
2535         (compile_cplus_convert_enum): Likewise.
2536         (compile_cplus_convert_namespace): Likewise.
2537         * compile/compile-cplus.h (compile_cplus_instance)
2538         <enter_scope>: Make parameter rvalue-reference.
2539         * compile/compile-internal.h (compile_instance)
2540         <get_cached_type>: Likewise
2541         * compile/compile-loc2c.c (push): Likewise
2542         (pushf): Likewise
2543         (unary): Likewise
2544         (binary): Likewise
2545         (print_label): Likewise
2546         (pushf_register_address): Likewise
2547         (pushf_register): Likewise
2548         (do_compile_dwarf_expr_to_c): Likewise
2549         (compile_dwarf_expr_to_c): Likewise
2550         (compile_dwarf_bounds_to_c): Likewise
2551         * compile/compile.c (compile_instance::get_cached_type):
2552         Likewise
2553         * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
2554         (compile_dwarf_bounds_to_c): Likewise
2555         * dwarf2loc.c (locexpr_generate_c_location): Likewise.
2556         (dwarf2_compile_property_to_c): Likewise
2557         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
2558         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
2559         Likewise
2560
2561 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
2562
2563         * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
2564         * tui/tui-data.c (init_content_element): Don't initialize it.
2565
2566 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
2567
2568         * tui/tui-data.h (struct tui_win_info)
2569         <detail::opaque>: Remove.
2570         * tui/tui-data.c (init_win_info): Remove assignment.
2571
2572 2018-09-05  Tom Tromey  <tom@tromey.com>
2573
2574         * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
2575         -Wformat-nonliteral.
2576         * target-float.c (host_float_ops<T>::to_string)
2577         (host_float_ops<T>::from_string): Use
2578         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
2579         * configure: Rebuild.
2580
2581 2018-09-05  Simon Marchi  <simon.marchi@ericsson.com>
2582
2583         * printcmd.c (printf_c_string): Use
2584         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
2585         (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
2586
2587 2018-09-05  Tom Tromey  <tom@tromey.com>
2588
2589         * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
2590
2591 2018-09-05  Tom de Vries  <tdevries@suse.de>
2592
2593         * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
2594         with resolve_abstract_p == true.
2595         (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
2596         defaulting to false. Propagate resolve_abstract_p to
2597         dwarf2_fetch_die_loc_sect_off.
2598         * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
2599         parameter, defaulting to false.
2600         * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
2601         (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
2602         parameter.
2603         * dwarf2read.h (struct die_info): Forward-declare.
2604         (die_info_ptr): New typedef.
2605         (struct dwarf2_per_objfile): Add abstract_to_concrete field.
2606
2607 2018-09-05  Joel Brobecker  <brobecker@adacore.com>
2608
2609         GDB 8.2 released.
2610
2611 2018-09-04  Sergio Durigan Junior  <sergiodj@redhat.com>
2612             Pedro Alves  <palves@redhat.com>
2613
2614         * gnulib/Makefile.in (aclocal_m4_deps): Move to
2615         "aclocal-m4-deps.mk".  Include file here.
2616         $(srcdir)/aclocal.m4: Add "configure.ac".
2617         * gnulib/aclocal-m4-deps.mk: New file.
2618         * gnulib/update-gnulib.sh: Automatically update
2619         "aclocal-m4-deps.mk".
2620
2621 2018-09-04  Tom Tromey  <tom@tromey.com>
2622
2623         * configure: Rebuild.
2624         * configure.ac: Remove multi-ice code.
2625
2626 2018-09-04  Tom Tromey  <tom@tromey.com>
2627
2628         * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
2629         (ada-exp.o): Update.
2630
2631 2018-09-04  Tom Tromey  <tom@tromey.com>
2632
2633         * Makefile.in (printcmd.o, target-float.o): Remove.
2634         (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
2635
2636 2018-09-04  Tom Tromey  <tom@tromey.com>
2637
2638         * gnulib/Makefile.in: Remove obsolete comment.
2639         * Makefile.in: Remove obsolete comment.
2640
2641 2018-09-04  Andrew Burgess  <andrew.burgess@embecosm.com>
2642
2643         * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
2644         line with '+'.
2645
2646 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
2647
2648         * riscv-tdep.c: Add 'prologue-value.h' include.
2649         (struct riscv_unwind_cache): New struct.
2650         (riscv_debug_unwinder): New global.
2651         (riscv_scan_prologue): Update arguments, capture register details
2652         from prologue scan.
2653         (riscv_skip_prologue): Reformat arguments line, move end of
2654         prologue calculation into riscv_scan_prologue.
2655         (riscv_frame_cache): Update return type, create
2656         riscv_unwind_cache, scan the prologue, and fill in remaining cache
2657         details.
2658         (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
2659         (riscv_frame_prev_register): Use the trad_frame within the
2660         riscv_unwind_cache.
2661         (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
2662         flag.
2663
2664 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
2665
2666         * trad-frame.h (trad_frame_set_realreg): Declare.
2667         (trad_frame_set_addr): Declare.
2668         * trad-frame.c (trad_frame_set_realreg): Define new function.
2669         (trad_frame_set_addr): Define new function.
2670         (trad_frame_set_reg_realreg): Use new function.
2671         (trad_frame_set_reg_addr): Use new function.
2672
2673 2018-09-01  Keith Seitz  <keiths@redhat.com>
2674
2675         * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
2676         pulongest instead of "%lld".
2677         * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
2678         ATTRIBUTE_UNUSED.
2679
2680 2018-08-31  Tom Tromey  <tom@tromey.com>
2681
2682         * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
2683         variant part type.
2684
2685 2018-08-31  Pedro Alves  <palves@redhat.com>
2686
2687         * gdbarch.h: Regenerate.
2688
2689 2018-08-31  Pedro Alves  <palves@redhat.com>
2690
2691         * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
2692         * target.h (Hardware watchpoint interfaces): Describe
2693         continuable/steppable/non-steppable watchpoints.
2694         * gdbarch.h, gdbarch.c: Regenerate.
2695
2696 2018-08-31  Pedro Alves  <palves@redhat.com>
2697
2698         * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
2699         Delete.
2700         * s390-linux-nat.c
2701         (s390_linux_nat_target::have_continuable_watchpoint): Delete.
2702         * target.h (target_ops::have_continuable_watchpoint): Delete.
2703         (target_have_continuable_watchpoint): Delete.
2704         * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
2705         * target-delegates.c: Regenerate.
2706
2707 2018-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
2708
2709         * gnulib/Makefile.in (aclocal_m4_deps): Update according to
2710         the files present in "gnulib/import/m4/".
2711
2712 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
2713
2714         * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
2715         c.sw, c.swsp, and c.sdsp.
2716
2717 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
2718
2719         * riscv-tdep.c (struct riscv_inferior_data): Delete.
2720         (riscv_read_misa_reg): Don't cache value read into inferior data.
2721         (riscv_new_inferior_data): Delete.
2722         (riscv_inferior_data_cleanup): Delete.
2723         (riscv_inferior_data): Delete.
2724         (riscv_invalidate_inferior_data): Delete.
2725         (_initialize_riscv_tdep): Remove initialisation of inferior data.
2726
2727 2018-08-30  Simon Marchi  <simon.marchi@ericsson.com>
2728
2729         * compile/compile-cplus-types.c
2730         (compile_cplus_instance::leave_scope): Take the address of scope
2731         object.
2732         (compile_cplus_instance::convert_qualified_base): Compare quals
2733         to 0.
2734
2735 2018-08-30  Keith Seitz  <keiths@redhat.com>
2736
2737         * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
2738         Use "%s" and host_address_to_string instead of "%p" in printf.
2739
2740 2018-08-29  Keith Seitz  <keiths@redhat.com>
2741
2742         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
2743         and compile-cplus-types.c.
2744         (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
2745         * c-lang.c (cplus_language_defn): Set C++ compile functions.
2746         * c-lang.h (cplus_get_compile_context, cplus_compute_program):
2747         Declare.
2748         * compile/compile-c-support.c: Include compile-cplus.h.
2749         (load_libcompile): Templatize.
2750         (get_compile_context): "New" function.
2751         (c_get_compile_context): Use get_compile_context.
2752         (cplus_get_compile_context): New function.
2753         (cplus_push_user_expression, cplus_pop_user_expression)
2754         (cplus_add_code_header, cplus_add_input, cplus_compile_program)
2755         (cplus_compute_program): Define new structs/functions.
2756         * compile/compile-cplus-symmbols.c: New file.
2757         * compile/compile-cplus-types.c: New file.
2758         * compile/compile-cplus.h: New file.
2759         * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
2760         Declare.
2761         * compile/compile-object-load.c (get_out_value_type): Use
2762         strncmp_iw when comparing symbol names.
2763         (compile_object_load): Add mst_bss and mst_data.
2764         * compile/compile.c (_initialize_compile): Remove
2765         -Wno-implicit-function-declaration from `compile_args'.
2766         * compile/gcc-cp-plugin.h: New file.
2767         * NEWS: Mention C++ compile support and new debug options.
2768
2769 2018-08-29  Keith Seitz  <keiths@redhat.com>
2770
2771         * linespec.c (collect_info::add_symbol): Make virtual.
2772         (struct symbol_searcher_collect_info): New struct.
2773         (symbol_searcher::find_all_symbols): New method.
2774         * symtab.h (class symbol_searcher): New class.
2775
2776 2018-08-29  Keith Seitz  <keiths@redhat.com>
2777
2778         * linespec.c (struct linespec) <function_symbols, label_symbols>:
2779         Change to vector of block_symbol.  Update all users.
2780         (struct collect_info) <symbols>: Likewise.
2781         (collect_info::add_symbol): Take block_symbol as argument.
2782         Update all callers.
2783         (decode_compound_collector) <m_symbols>: Change type to vector
2784         of block_symbol.  Update all users.
2785         (decode_compound_collector::operator ()): Change parameter type
2786         to block_symbol.
2787         (find_method, find_function_symbols, find_linespec_symbols)
2788         (find_label_symbols_in_block, find_label_symbols): Change symbol
2789         vectors to block_symbol vectors.
2790         * symtab.h (symbol_found_callback_ftype): Change parameter type to
2791         block_symbol.
2792
2793 2018-08-29  Keith Seitz  <keiths@redhat.com>
2794
2795         * linespec.c (symbolp): Remove typedef and VEC definitions.
2796         (bound_minimal_symbol_d): Likewise.
2797
2798 2018-08-29  Keith Seitz  <keiths@redhat.com>
2799
2800         * linespec.c (decode_compound_collector::decode_compound_collector):
2801         Remove initialization for `m_symtabs'.
2802         (decode_compound_collector::release_symbols): Change return type
2803         to std::vector.  Update all callers.
2804         (class decode_compound_collector) <m_symbols>: Change type to
2805         std::vector.
2806         (lookup_prefix_sym): Change return type to std::vector.  Update all
2807         callers.
2808         (compare_symbols): Remove.
2809         (std_compare_symbols): Rename to `compare_symbols'.
2810         (find_method): Change `sym_classes' parameter to std::vector.
2811         Update all callers.  Use std::sort to sort sym_classes.
2812         (find_linespec_symbols): Remove cleanup.
2813
2814 2018-08-29  Keith Seitz  <keiths@redhat.com>
2815
2816         * linespec.c (struct linespec) <minimal_symbols>: Change type to
2817         std::vector.  Update all users.
2818         (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
2819         (struct collect_info) <minimal_symbols>: Likewise.
2820         (compare_msymbols): Return bool.  Change parameters to const
2821         bound_minimal_symbol references.
2822         (find_method, find_function_symbols, find_linespec_symbols): Change
2823         `minsyms' parameter to std::vector.  Update all callers.
2824
2825 2018-08-29  Keith Seitz  <keiths@redhat.com>
2826
2827         * linespec.c (struct linespec) <label_symbols>: Change type to
2828         std::vector.  Update all users.
2829         (find_label_symbols_in_block): Change `result' parameter to
2830         std::vector.  Update all callers.
2831         (find_label_symbols): Return std::vector.  Update all callers.
2832
2833 2018-08-29  Keith Seitz  <keiths@redhat.com>
2834
2835         * linespec.c (struct linespec) <function_symbols>: Change type to
2836         std::vector.  Update all users.
2837         (struct collect_info) <function_symbols>: Likewise.
2838         (convert_linespec_to_sals): Use std::sort to sort function_symbols.
2839         (std_compare_symbols): New function.
2840         (find_method, find_function_symbols, find_linespec_symbols)
2841         (find_label_symbols_in_block): Change `symbols' parameter to
2842         std::vector.  Update all callers.
2843         (find_label_symbols): Likewise for `function_symbols' and
2844         `label_funcs_ret'.
2845
2846 2018-08-29  Keith Seitz  <keiths@redhat.com>
2847
2848         * linespec.c (symtab_vector_up): Define.
2849         (struct linespec) <file_symtabs>: Change type to std::vector *.
2850         Update all uses.
2851         (struct collect_info) <file_symtabs>: Likewise.
2852         (collect_symtabs_from_filename): Return symtab_vector_up.
2853         Update all callers.
2854         (decode_objc): Remove cleanup.
2855         (symtab_collector::symtab_collector): Initialize `m_symtabs'.
2856         (symtab_collector::release_symtabs): Return symtab_vector_up.
2857         Update all callers.
2858         (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
2859         Update all users.
2860         (collect_symtabs_from_filename, symtabs_from_filename): Return
2861         symtab_vector_up.  Update all callers.
2862
2863 2018-08-29  Tom Tromey  <tom@tromey.com>
2864
2865         * csky-tdep.c (csky_analyze_prologue): Use
2866         core_addr_to_string_nz.
2867
2868 2018-08-29  Tom Tromey  <tom@tromey.com>
2869
2870         * windows-nat.c (struct xlate_exception) <them>: Change type to
2871         DWORD.
2872         (xlate): Fix formatting.  Remove last entry.
2873         (struct xlate_exception, xlate): Comment out.
2874         (windows_nat_target::resume): Use ranged for.
2875
2876 2018-08-29  Jim Wilson  <jimw@sifive.com>
2877
2878         * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
2879         (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
2880         of NT_PRFPREG.
2881         (riscv_linux_nat_target::store_registers): Likewise.
2882
2883 2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
2884
2885         PR gdb/23555
2886         PR gdb/23558
2887         * gnulib/aclocal.m4: Regenerate.
2888         * gnulib/config.in: Regenerate.
2889         * gnulib/configure: Regenerate.
2890         * gnulib/import/Makefile.am: Update.
2891         * gnulib/import/Makefile.in: Update.
2892         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
2893         * gnulib/import/_Noreturn.h: ... this.
2894         * gnulib/import/alloca.in.h: Update.
2895         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
2896         * gnulib/import/arg-nonnull.h: ... this.
2897         * gnulib/import/assure.h: Update.
2898         * gnulib/import/at-func.c: Update.
2899         * gnulib/import/basename-lgpl.c: Update.
2900         * gnulib/import/extra/snippet/c++defs.h: Rename to...
2901         * gnulib/import/c++defs.h: ... this.
2902         * gnulib/import/canonicalize-lgpl.c: Update.
2903         * gnulib/import/cdefs.h: Update.
2904         * gnulib/import/chdir-long.c: Update.
2905         * gnulib/import/chdir-long.h: Update.
2906         * gnulib/import/cloexec.c: Update.
2907         * gnulib/import/cloexec.h: Update.
2908         * gnulib/import/close.c: Update.
2909         * gnulib/import/closedir.c: Update.
2910         * gnulib/import/config.charset: Update.
2911         * gnulib/import/dirent-private.h: Update.
2912         * gnulib/import/dirent.in.h: Update.
2913         * gnulib/import/dirfd.c: Update.
2914         * gnulib/import/dirname-lgpl.c: Update.
2915         * gnulib/import/dirname.h: Update.
2916         * gnulib/import/dosname.h: Update.
2917         * gnulib/import/dup-safer-flag.c: Update.
2918         * gnulib/import/dup-safer.c: Update.
2919         * gnulib/import/dup.c: Update.
2920         * gnulib/import/dup2.c: Update.
2921         * gnulib/import/errno.in.h: Update.
2922         * gnulib/import/error.c: Update.
2923         * gnulib/import/error.h: Update.
2924         * gnulib/import/exitfail.c: Update.
2925         * gnulib/import/exitfail.h: Update.
2926         * gnulib/import/extra/update-copyright: Update.
2927         * gnulib/import/fchdir.c: Update.
2928         * gnulib/import/fcntl.c: Update.
2929         * gnulib/import/fcntl.in.h: Update.
2930         * gnulib/import/fd-hook.c: Update.
2931         * gnulib/import/fd-hook.h: Update.
2932         * gnulib/import/fd-safer-flag.c: Update.
2933         * gnulib/import/fd-safer.c: Update.
2934         * gnulib/import/fdopendir.c: Update.
2935         * gnulib/import/filename.h: Update.
2936         * gnulib/import/filenamecat-lgpl.c: Update.
2937         * gnulib/import/filenamecat.h: Update.
2938         * gnulib/import/flexmember.h: Update.
2939         * gnulib/import/float+.h: Update.
2940         * gnulib/import/float.c: Update.
2941         * gnulib/import/float.in.h: Update.
2942         * gnulib/import/fnmatch.c: Update.
2943         * gnulib/import/fnmatch.in.h: Update.
2944         * gnulib/import/fnmatch_loop.c: Update.
2945         * gnulib/import/fpucw.h: Update.
2946         * gnulib/import/frexp.c: Update.
2947         * gnulib/import/frexpl.c: Update.
2948         * gnulib/import/fstat.c: Update.
2949         * gnulib/import/fstatat.c: Update.
2950         * gnulib/import/getcwd-lgpl.c: Update.
2951         * gnulib/import/getcwd.c: Update.
2952         * gnulib/import/getdtablesize.c: Update.
2953         * gnulib/import/getlogin_r.c: Update.
2954         * gnulib/import/getprogname.c: Update.
2955         * gnulib/import/getprogname.h: Update.
2956         * gnulib/import/gettext.h: Update.
2957         * gnulib/import/gettimeofday.c: Update.
2958         * gnulib/import/glob-libc.h: Update.
2959         * gnulib/import/glob.c: Update.
2960         * gnulib/import/glob.in.h: Update.
2961         * gnulib/import/glob_internal.h: Update.
2962         * gnulib/import/glob_pattern_p.c: Update.
2963         * gnulib/import/globfree.c: Update.
2964         * gnulib/import/hard-locale.c: Update.
2965         * gnulib/import/hard-locale.h: Update.
2966         * gnulib/import/intprops.h: Update.
2967         * gnulib/import/inttypes.in.h: Update.
2968         * gnulib/import/isnan.c: Update.
2969         * gnulib/import/isnand-nolibm.h: Update.
2970         * gnulib/import/isnand.c: Update.
2971         * gnulib/import/isnanl-nolibm.h: Update.
2972         * gnulib/import/isnanl.c: Update.
2973         * gnulib/import/itold.c: Update.
2974         * gnulib/import/libc-config.h: Update.
2975         * gnulib/import/limits.in.h: Update.
2976         * gnulib/import/localcharset.c: Update.
2977         * gnulib/import/localcharset.h: Update.
2978         * gnulib/import/localtime-buffer.c: Update.
2979         * gnulib/import/localtime-buffer.h: Update.
2980         * gnulib/import/lstat.c: Update.
2981         * gnulib/import/m4/00gnulib.m4: Update.
2982         * gnulib/import/m4/__inline.m4: Update.
2983         * gnulib/import/m4/absolute-header.m4: Update.
2984         * gnulib/import/m4/alloca.m4: Update.
2985         * gnulib/import/m4/builtin-expect.m4: Update.
2986         * gnulib/import/m4/canonicalize.m4: Update.
2987         * gnulib/import/m4/chdir-long.m4: Update.
2988         * gnulib/import/m4/close.m4: Update.
2989         * gnulib/import/m4/closedir.m4: Update.
2990         * gnulib/import/m4/configmake.m4: Update.
2991         * gnulib/import/m4/d-ino.m4: Update.
2992         * gnulib/import/m4/d-type.m4: Update.
2993         * gnulib/import/m4/dirent_h.m4: Update.
2994         * gnulib/import/m4/dirfd.m4: Update.
2995         * gnulib/import/m4/dirname.m4: Update.
2996         * gnulib/import/m4/double-slash-root.m4: Update.
2997         * gnulib/import/m4/dup.m4: Update.
2998         * gnulib/import/m4/dup2.m4: Update.
2999         * gnulib/import/m4/eealloc.m4: Update.
3000         * gnulib/import/m4/environ.m4: Update.
3001         * gnulib/import/m4/errno_h.m4: Update.
3002         * gnulib/import/m4/error.m4: Update.
3003         * gnulib/import/m4/exponentd.m4: Update.
3004         * gnulib/import/m4/exponentl.m4: Update.
3005         * gnulib/import/m4/extensions.m4: Update.
3006         * gnulib/import/m4/extern-inline.m4: Update.
3007         * gnulib/import/m4/fchdir.m4: Update.
3008         * gnulib/import/m4/fcntl-o.m4: Update.
3009         * gnulib/import/m4/fcntl.m4: Update.
3010         * gnulib/import/m4/fcntl_h.m4: Update.
3011         * gnulib/import/m4/fdopendir.m4: Update.
3012         * gnulib/import/m4/filenamecat.m4: Update.
3013         * gnulib/import/m4/flexmember.m4: Update.
3014         * gnulib/import/m4/float_h.m4: Update.
3015         * gnulib/import/m4/fnmatch.m4: Update.
3016         * gnulib/import/m4/fnmatch_h.m4: Update.
3017         * gnulib/import/m4/fpieee.m4: Update.
3018         * gnulib/import/m4/frexp.m4: Update.
3019         * gnulib/import/m4/frexpl.m4: Update.
3020         * gnulib/import/m4/fstat.m4: Update.
3021         * gnulib/import/m4/fstatat.m4: Update.
3022         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
3023         * gnulib/import/m4/getcwd-path-max.m4: Update.
3024         * gnulib/import/m4/getcwd.m4: Update.
3025         * gnulib/import/m4/getdtablesize.m4: Update.
3026         * gnulib/import/m4/getlogin.m4: Update.
3027         * gnulib/import/m4/getlogin_r.m4: Update.
3028         * gnulib/import/m4/getpagesize.m4: Update.
3029         * gnulib/import/m4/getprogname.m4: Update.
3030         * gnulib/import/m4/gettimeofday.m4: Update.
3031         * gnulib/import/m4/glibc21.m4: Update.
3032         * gnulib/import/m4/glob.m4: Update.
3033         * gnulib/import/m4/glob_h.m4: Update.
3034         * gnulib/import/m4/gnulib-cache.m4: Update.
3035         * gnulib/import/m4/gnulib-common.m4: Update.
3036         * gnulib/import/m4/gnulib-comp.m4: Update.
3037         * gnulib/import/m4/gnulib-tool.m4: Update.
3038         * gnulib/import/m4/hard-locale.m4: Update.
3039         * gnulib/import/m4/include_next.m4: Update.
3040         * gnulib/import/m4/inttypes-pri.m4: Update.
3041         * gnulib/import/m4/inttypes.m4: Update.
3042         * gnulib/import/m4/isnand.m4: Update.
3043         * gnulib/import/m4/isnanl.m4: Update.
3044         * gnulib/import/m4/largefile.m4: Update.
3045         * gnulib/import/m4/limits-h.m4: Update.
3046         * gnulib/import/m4/localcharset.m4: Update.
3047         * gnulib/import/m4/locale-fr.m4: Update.
3048         * gnulib/import/m4/locale-ja.m4: Update.
3049         * gnulib/import/m4/locale-zh.m4: Update.
3050         * gnulib/import/m4/localtime-buffer.m4: Update.
3051         * gnulib/import/m4/longlong.m4: Update.
3052         * gnulib/import/m4/lstat.m4: Update.
3053         * gnulib/import/m4/malloc.m4: Update.
3054         * gnulib/import/m4/malloca.m4: Update.
3055         * gnulib/import/m4/math_h.m4: Update.
3056         * gnulib/import/m4/mbrtowc.m4: Update.
3057         * gnulib/import/m4/mbsinit.m4: Update.
3058         * gnulib/import/m4/mbsrtowcs.m4: Update.
3059         * gnulib/import/m4/mbstate_t.m4: Update.
3060         * gnulib/import/m4/memchr.m4: Update.
3061         * gnulib/import/m4/memmem.m4: Update.
3062         * gnulib/import/m4/mempcpy.m4: Update.
3063         * gnulib/import/m4/memrchr.m4: Update.
3064         * gnulib/import/m4/mkdir.m4: Update.
3065         * gnulib/import/m4/mkstemp.m4: Update.
3066         * gnulib/import/m4/mmap-anon.m4: Update.
3067         * gnulib/import/m4/mode_t.m4: Update.
3068         * gnulib/import/m4/msvc-inval.m4: Update.
3069         * gnulib/import/m4/msvc-nothrow.m4: Update.
3070         * gnulib/import/m4/multiarch.m4: Update.
3071         * gnulib/import/m4/nocrash.m4: Update.
3072         * gnulib/import/m4/off_t.m4: Update.
3073         * gnulib/import/m4/onceonly.m4: Update.
3074         * gnulib/import/m4/open-cloexec.m4: Update.
3075         * gnulib/import/m4/open.m4: Update.
3076         * gnulib/import/m4/openat.m4: Update.
3077         * gnulib/import/m4/opendir.m4: Update.
3078         * gnulib/import/m4/pathmax.m4: Update.
3079         * gnulib/import/m4/rawmemchr.m4: Update.
3080         * gnulib/import/m4/readdir.m4: Update.
3081         * gnulib/import/m4/readlink.m4: Update.
3082         * gnulib/import/m4/realloc.m4: Update.
3083         * gnulib/import/m4/rename.m4: Update.
3084         * gnulib/import/m4/rewinddir.m4: Update.
3085         * gnulib/import/m4/rmdir.m4: Update.
3086         * gnulib/import/m4/save-cwd.m4: Update.
3087         * gnulib/import/m4/secure_getenv.m4: Update.
3088         * gnulib/import/m4/setenv.m4: Update.
3089         * gnulib/import/m4/signal_h.m4: Update.
3090         * gnulib/import/m4/ssize_t.m4: Update.
3091         * gnulib/import/m4/stat-time.m4: Update.
3092         * gnulib/import/m4/stat.m4: Update.
3093         * gnulib/import/m4/std-gnu11.m4: Update.
3094         * gnulib/import/m4/stdbool.m4: Update.
3095         * gnulib/import/m4/stddef_h.m4: Update.
3096         * gnulib/import/m4/stdint.m4: Update.
3097         * gnulib/import/m4/stdio_h.m4: Update.
3098         * gnulib/import/m4/stdlib_h.m4: Update.
3099         * gnulib/import/m4/strchrnul.m4: Update.
3100         * gnulib/import/m4/strdup.m4: Update.
3101         * gnulib/import/m4/strerror.m4: Update.
3102         * gnulib/import/m4/string_h.m4: Update.
3103         * gnulib/import/m4/strstr.m4: Update.
3104         * gnulib/import/m4/strtok_r.m4: Update.
3105         * gnulib/import/m4/sys_socket_h.m4: Update.
3106         * gnulib/import/m4/sys_stat_h.m4: Update.
3107         * gnulib/import/m4/sys_time_h.m4: Update.
3108         * gnulib/import/m4/sys_types_h.m4: Update.
3109         * gnulib/import/m4/tempname.m4: Update.
3110         * gnulib/import/m4/time_h.m4: Update.
3111         * gnulib/import/m4/unistd-safer.m4: Update.
3112         * gnulib/import/m4/unistd_h.m4: Update.
3113         * gnulib/import/m4/warn-on-use.m4: Update.
3114         * gnulib/import/m4/wchar_h.m4: Update.
3115         * gnulib/import/m4/wchar_t.m4: Update.
3116         * gnulib/import/m4/wctype_h.m4: Update.
3117         * gnulib/import/m4/wint_t.m4: Update.
3118         * gnulib/import/malloc.c: Update.
3119         * gnulib/import/malloc/scratch_buffer.h: Update.
3120         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
3121         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
3122         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
3123         * gnulib/import/malloca.c: Update.
3124         * gnulib/import/malloca.h: Update.
3125         * gnulib/import/malloca.valgrind: Update.
3126         * gnulib/import/math.in.h: Update.
3127         * gnulib/import/mbrtowc.c: Update.
3128         * gnulib/import/mbsinit.c: Update.
3129         * gnulib/import/mbsrtowcs-impl.h: Update.
3130         * gnulib/import/mbsrtowcs-state.c: Update.
3131         * gnulib/import/mbsrtowcs.c: Update.
3132         * gnulib/import/memchr.c: Update.
3133         * gnulib/import/memmem.c: Update.
3134         * gnulib/import/mempcpy.c: Update.
3135         * gnulib/import/memrchr.c: Update.
3136         * gnulib/import/mkdir.c: Update.
3137         * gnulib/import/mkstemp.c: Update.
3138         * gnulib/import/msvc-inval.c: Update.
3139         * gnulib/import/msvc-inval.h: Update.
3140         * gnulib/import/msvc-nothrow.c: Update.
3141         * gnulib/import/msvc-nothrow.h: Update.
3142         * gnulib/import/open.c: Update.
3143         * gnulib/import/openat-die.c: Update.
3144         * gnulib/import/openat-priv.h: Update.
3145         * gnulib/import/openat-proc.c: Update.
3146         * gnulib/import/openat.c: Update.
3147         * gnulib/import/openat.h: Update.
3148         * gnulib/import/opendir.c: Update.
3149         * gnulib/import/pathmax.h: Update.
3150         * gnulib/import/pipe-safer.c: Update.
3151         * gnulib/import/rawmemchr.c: Update.
3152         * gnulib/import/readdir.c: Update.
3153         * gnulib/import/readlink.c: Update.
3154         * gnulib/import/realloc.c: Update.
3155         * gnulib/import/ref-add.sin: Update.
3156         * gnulib/import/ref-del.sin: Update.
3157         * gnulib/import/rename.c: Update.
3158         * gnulib/import/rewinddir.c: Update.
3159         * gnulib/import/rmdir.c: Update.
3160         * gnulib/import/same-inode.h: Update.
3161         * gnulib/import/save-cwd.c: Update.
3162         * gnulib/import/save-cwd.h: Update.
3163         * gnulib/import/scratch_buffer.h: Update.
3164         * gnulib/import/secure_getenv.c: Update.
3165         * gnulib/import/setenv.c: Update.
3166         * gnulib/import/signal.in.h: Update.
3167         * gnulib/import/stat-time.c: Update.
3168         * gnulib/import/stat-time.h: Update.
3169         * gnulib/import/stat-w32.c: Update.
3170         * gnulib/import/stat-w32.h: Update.
3171         * gnulib/import/stat.c: Update.
3172         * gnulib/import/stdbool.in.h: Update.
3173         * gnulib/import/stddef.in.h: Update.
3174         * gnulib/import/stdint.in.h: Update.
3175         * gnulib/import/stdio.in.h: Update.
3176         * gnulib/import/stdlib.in.h: Update.
3177         * gnulib/import/str-two-way.h: Update.
3178         * gnulib/import/strchrnul.c: Update.
3179         * gnulib/import/strdup.c: Update.
3180         * gnulib/import/streq.h: Update.
3181         * gnulib/import/strerror-override.c: Update.
3182         * gnulib/import/strerror-override.h: Update.
3183         * gnulib/import/strerror.c: Update.
3184         * gnulib/import/string.in.h: Update.
3185         * gnulib/import/stripslash.c: Update.
3186         * gnulib/import/strnlen1.c: Update.
3187         * gnulib/import/strnlen1.h: Update.
3188         * gnulib/import/strstr.c: Update.
3189         * gnulib/import/strtok_r.c: Update.
3190         * gnulib/import/sys_stat.in.h: Update.
3191         * gnulib/import/sys_time.in.h: Update.
3192         * gnulib/import/sys_types.in.h: Update.
3193         * gnulib/import/tempname.c: Update.
3194         * gnulib/import/tempname.h: Update.
3195         * gnulib/import/time.in.h: Update.
3196         * gnulib/import/unistd--.h: Update.
3197         * gnulib/import/unistd-safer.h: Update.
3198         * gnulib/import/unistd.in.h: Update.
3199         * gnulib/import/unsetenv.c: Update.
3200         * gnulib/import/verify.h: Update.
3201         * gnulib/import/extra/snippet/warn-on-use.h: Update.
3202         * gnulib/import/wchar.in.h: Update.
3203         * gnulib/import/wctype.in.h: Update.
3204         * gnulib/import/xalloc-oversized.h: Update.
3205         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
3206         "53e2c179f26a890fa6685af4b6c1397ee370433b".
3207
3208 2018-08-16  Gary Benson <gbenson@redhat.com>
3209
3210         PR gdb/13000:
3211         * gdb/main.c (captured_main_1): Exit with nonzero status
3212         in batch mode if the last command to be executed failed.
3213         * NEWS: Mention the above.
3214
3215 2018-08-29  Simon Marchi  <simon.marchi@ericsson.com>
3216
3217         * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
3218         end of warning message.
3219
3220 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
3221
3222         PR gdb/22943:
3223         * aarch64-tdep.c (is_hfa_or_hva): Remove function.
3224         (aarch64_extract_return_value): Use
3225         aapcs_is_vfp_call_or_return_candidate.
3226         (aarch64_return_in_memory): Likewise.
3227         (aarch64_store_return_value): Likewise.
3228
3229 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
3230
3231         * aarch64-tdep.c
3232         (aapcs_is_vfp_call_or_return_candidate): Make static
3233         (pass_in_v_or_stack): Remove function.
3234         (pass_in_v_vfp_candidate): New function.
3235         (aarch64_push_dummy_call): Check for float register candidates.
3236
3237 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
3238
3239         * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
3240         (aapcs_is_vfp_call_or_return_candidate_1): New function.
3241         (aapcs_is_vfp_call_or_return_candidate): Likewise.
3242
3243 2018-08-28  Simon Marchi  <simon.marchi@polymtl.ca>
3244
3245         PR build/23399
3246         * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
3247         (struct ipa_sym_addresses): Rename to...
3248         (struct ipa_sym_addresses_common): ... this.
3249         * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
3250
3251 2018-08-28  Tom Tromey  <tom@tromey.com>
3252
3253         * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
3254         (token_fifo): Now a std::vector.
3255         (yylex, c_parse): Update.
3256         * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
3257         (token_fifo): Now a std::vector.
3258         (yylex, d_parse): Update.
3259         * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
3260         (token_fifo): Now a std::vector.
3261         (yylex, go_parse): Update.
3262
3263 2018-08-28  Simon Marchi  <simon.marchi@ericsson.com>
3264
3265         * parser-defs.h (struct type_stack) <elements>: Change type to
3266         std::vector<union type_stack_elt>.
3267         <depth, size>: Remove.
3268         * parse.c (parse_exp_in_context_1): Adjust.
3269         (type_stack_reserve): Remove.
3270         (check_type_stack_depth): Remove.
3271         (insert_into_type_stack): Adjust to std::vector.
3272         (insert_type): Likewise.
3273         (push_type): Likewise.
3274         (push_type_int): Likewise.
3275         (insert_type_address_space): Likewise.
3276         (pop_type): Likewise.
3277         (pop_type_int): Likewise.
3278         (pop_typelist): Likewise.
3279         (pop_type_stack): Likewise.
3280         (append_type_stack): Likewise.
3281         (push_type_stack): Likewise.
3282         (get_type_stack): Likewise.
3283         (type_stack_cleanup): Likewise.
3284         (push_typelist): Likewise.
3285         (follow_types): Likewise.
3286         (_initialize_parse): Likewise.
3287
3288 2018-08-28  Hafiz Abid Qadeer  <abidh@codesourcery.com>
3289
3290         * NEWS: Mention csky target.
3291
3292 2018-08-28  Jiangshuai Li  <jiangshuai_li@c-sky.com>
3293             Hafiz Abid Qadeer  <abidh@codesourcery.com>
3294             Don Breazeal  <donb@codesourcery.com>
3295
3296         * csky-linux-tdep.c: New file.
3297         * csky-tdep.c: Likewise.
3298         * csky-tdep.h: Likewise.
3299         * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
3300         csky-tdep.o.
3301         (HFILES_NO_SRCDIR): Add csky-tdep.h.
3302         (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
3303         * configure.tgt: Add csky support.
3304
3305 2018-08-27  Jan Vrany  <jan.vrany@fit.cvut.cz>
3306
3307         * python/py-framefilter.c (py_print_frame): Print frame architecture
3308         when printing on an MI output.
3309
3310 2018-08-27  Tom Tromey  <tom@tromey.com>
3311
3312         PR build/23087:
3313         * configure: Rebuild.
3314         * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
3315
3316 2018-08-27  Tom Tromey  <tom@tromey.com>
3317
3318         * aarch64-linux-tdep.c
3319         (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
3320         casts to int.
3321
3322 2018-08-27  Tom Tromey  <tom@tromey.com>
3323
3324         * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
3325         unsigned.
3326         (ppc64_standard_linkage1, ppc64_standard_linkage2)
3327         (ppc64_standard_linkage3, ppc64_standard_linkage4)
3328         (ppc64_standard_linkage5, ppc64_standard_linkage6)
3329         (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
3330         unsigned.
3331
3332 2018-08-27  Tom Tromey  <tom@tromey.com>
3333
3334         * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
3335         (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
3336
3337 2018-08-27  Tom Tromey  <tom@tromey.com>
3338
3339         * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
3340         * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
3341         ULONGEST_MAX.
3342         * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
3343         ULONGEST_MAX.
3344         * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
3345         ULONGEST_MAX.
3346         * sparc-linux-tdep.c (sparc32_linux_sigframe)
3347         (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
3348         * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
3349         ULONGEST_MAX.
3350         * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
3351         (ppc64_linux_sigaction_tramp_frame)
3352         (ppc32_linux_sighandler_tramp_frame)
3353         (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
3354         * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
3355         (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
3356         * mn10300-linux-tdep.c (am33_linux_sigframe)
3357         (am33_linux_rt_sigframe): Use ULONGEST_MAX.
3358         * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
3359         * mips-linux-tdep.c (mips_linux_o32_sigframe)
3360         (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
3361         (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
3362         (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
3363         (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
3364         * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
3365         (mips64_fbsd_sigframe): Use ULONGEST_MAX.
3366         * microblaze-linux-tdep.c
3367         (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
3368         * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
3369         (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
3370         (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
3371         * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
3372         * common/common-types.h (ULONGEST_MAX): New define.
3373         (CORE_ADDR_MAX): Fix formatting.
3374         * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
3375         * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
3376         * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
3377         (arm_linux_rt_sigreturn_tramp_frame)
3378         (arm_eabi_linux_sigreturn_tramp_frame)
3379         (arm_eabi_linux_rt_sigreturn_tramp_frame)
3380         (thumb2_eabi_linux_sigreturn_tramp_frame)
3381         (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
3382         (arm_linux_restart_syscall_tramp_frame)
3383         (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
3384         * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
3385         * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
3386         ULONGEST_MAX.
3387         * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
3388
3389 2018-08-27  Tom Tromey  <tom@tromey.com>
3390
3391         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
3392         CORE_ADDR_MAX.
3393         * mips-tdep.c (mips_deal_with_atomic_sequence)
3394         (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
3395         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
3396         (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
3397         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
3398         CORE_ADDR_MAX.
3399         * aarch64-tdep.c (aarch64_software_single_step): Use
3400         CORE_ADDR_MAX.
3401
3402 2018-08-27  Tom Tromey  <tom@tromey.com>
3403
3404         * linespec.c (complete_linespec_component): Add cast to "char".
3405         * completer.c (completion_tracker::build_completion_result): Add
3406         cast to "char".
3407
3408 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
3409
3410         * solist.h (struct solist, struct target_so_ops): Fix
3411         indentation.
3412
3413 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
3414
3415         * ada-tasks.c (ada_task_info_s): Remove typedef.
3416         (DEF_VEC_O(ada_task_info_s)): Remove.
3417         (struct ada_tasks_inferior_data): Initialize fields.
3418         <task_list>: Make an std::vector.
3419         (get_ada_tasks_inferior_data): Allocate with new.
3420         (ada_get_task_number): Adjust.
3421         (get_task_number_from_id): Likewise.
3422         (valid_task_id): Likewise.
3423         (ada_get_task_info_from_ptid): Likewise.
3424         (iterate_over_live_ada_tasks): Likewise.
3425         (add_ada_task): Likewise.
3426         (read_known_tasks): Likewise.
3427         (ada_build_task_list): Likewise.
3428         (print_ada_task_info): Likewise.
3429         (info_task): Likewise.
3430         (task_command_1): Likewise.
3431
3432 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
3433
3434         * ada-lang.c (add_angle_brackets): Return std::string.
3435
3436 2018-08-25  Simon Marchi  <simon.marchi@polymtl.ca>
3437
3438         * python/py-threadevent.c (py_get_event_thread): Initialize
3439         pythread.
3440
3441 2018-08-24  Pedro Alves  <palves@redhat.com>
3442
3443         * python/py-bpevent.c (create_breakpoint_event_object): Use
3444         copy-initialization.
3445         * python/py-continueevent.c (emit_continue_event): Use
3446         copy-initialization.
3447         * python/py-exitedevent.c (create_exited_event_object): Return a
3448         gdbpy_ref<>.
3449         (emit_exited_event): Use copy-initialization.
3450         * python/py-inferior.c (python_new_inferior)
3451         (python_inferior_deleted, add_thread_object): Use
3452         copy-initialization.
3453         * python/py-infevents.c (create_inferior_call_event_object)
3454         (create_register_changed_event_object)
3455         (create_memory_changed_event_object): Return a gdbpy_ref<>.
3456         (emit_inferior_call_event, emit_memory_changed_event)
3457         (emit_register_changed_event): Use copy-initialization.
3458         * python/py-newobjfileevent.c (create_new_objfile_event_object):
3459         Return a gdbpy_ref<>.
3460         (emit_new_objfile_event): Use copy-initialization.
3461         (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
3462         (emit_clear_objfiles_event): Use copy-initialization.
3463         * python/py-signalevent.c (create_signal_event_object): Use
3464         copy-initialization.
3465         * python/py-threadevent.c (create_thread_event_object): Use
3466         copy-initialization.
3467
3468 2018-08-24  Pedro Alves  <palves@redhat.com>
3469             Simon Marchi  <simon.marchi@ericsson.com>
3470
3471         PR gdb/23379
3472         * python/py-continueevent.c: Include "gdbthread.h".
3473         (create_continue_event_object): Add intro comment.  Add 'ptid'
3474         parameter.  Use it to find thread to pass to
3475         create_thread_event_object.
3476         (emit_continue_event): Pass PTID down to
3477         create_continue_event_object.
3478         * python/py-event.h (py_get_event_thread): Declare.
3479         (create_thread_event_object): Remove default from 'thread'
3480         parameter.
3481         * python/py-stopevent.c (create_stop_event_object): Use
3482         py_get_event_thread.
3483         * python/py-threadevent.c (get_event_thread): Rename to ...
3484         (py_get_event_thread): ... this, make extern, add 'ptid' parameter
3485         and use it to find the thread.
3486         (create_thread_event_object): Assert that THREAD isn't null.
3487         Don't find the event thread here.
3488
3489 2018-08-23  Kevin Buettner  <kevinb@redhat.com>
3490
3491         * block.h (blockrange, blockranges): New struct declarations.
3492         (struct block): Add new field named `ranges'.
3493         (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
3494         (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
3495         macros for accessing ranges in struct block.
3496         (make_blockranges): New declaration.
3497         block.c (make_blockranges): New function.
3498         * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
3499         for block.
3500         * symtab.h (find_pc_partial_function): Add new parameter `block'.
3501         * blockframe.c (cache_pc_function_block): New static global.
3502         (clear_pc_function_cache): Clear cache_pc_function_block.
3503         (find_pc_partial_function): Move comment to symtab.h.  Add
3504         support for non-contiguous blocks.
3505         * cli/cli-cmds.c (block.h): Include.
3506         (print_disassembly): Handle printing of non-contiguous blocks.
3507         (disassemble_current_function): Likewise.
3508         (disassemble_command): Likewise.
3509
3510         * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
3511         BLOCK_START.
3512         * blockframe.c (get_pc_function_start): Likewise.
3513         * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
3514         (gcc_symbol_address): Likewise.
3515         * compile/compile-object-run.c (compile_object_run): Likewise.
3516         * compile/compile.c (get_expr_block_and_pc): Likewise.
3517         * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
3518         (func_addr_to_tail_call_list): Likewise.
3519         * findvar.c (default_read_var_value): Likewise.
3520         * inline-frame.c (inline_frame_this_id): Likewise.
3521         (skip-inline_frames): Likewise.
3522         * infcmd.c (until_next_command): Likewise.
3523         * linespec.c (convert_linespec_to_sals): Likewise.
3524         * parse.c (parse_exp_in_context_1): Likewise.
3525         * printcmd.c (build_address_symbolic): likewise.
3526         (info_address_command): Likewise.
3527         symtab.c (find_function_start_sal): Likewise.
3528         (skip_prologue_sal): Likewise.
3529         (find_function_alias_target): Likewise.
3530         (find_gnu_ifunc): Likewise.
3531         * stack.c (find_frame_funname): Likewise.
3532         * symtab.c (fixup_symbol_section): Likewise.
3533         (find_function_start_sal): Likewise.
3534         (skip_prologue_sal): Likewsie.
3535         (find_function_alias_target): Likewise.
3536         (find_gnu_ifunc): Likewise.
3537         * tracepoint.c (info_scope_command): Likewise.
3538         * value.c (value_fn_field): Likewise.
3539
3540         * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
3541         in place of find_pc_partial_function.
3542         * blockframe.c (find_function_entry_range_from_pc): New function.
3543         * symtab.h (find_function_entry_range_from_pc): Declare and document.
3544         * objfiles.c (objfile_relocate1): Relocate start and end addresses
3545         for each range in a block.
3546
3547
3548 2018-08-23  Xavier Roirand  <roirand@adacore.com>
3549
3550         * machoread.c (macho_symfile_read_all_oso): Remove uneeded
3551         incrementation.
3552
3553 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
3554
3555         * solib-svr4.c (read_program_headers_from_bfd): Return
3556         gdb::optional<gdb::byte_vector>.
3557         (svr4_exec_displacement): Adjust.
3558
3559 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
3560
3561         * solib-svr4.c (read_program_header): Return
3562         gdb::optional<gdb::byte_vector>, remove p_sect_size param.
3563         (find_program_interpreter): Return
3564         gdb::optional<gdb::byte_vector>.
3565         (scan_dyntag_auxv): Adjust.
3566         (enable_break): Adjust.
3567         (svr4_exec_displacement): Adjust.
3568
3569 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
3570
3571         * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
3572         * inf-child.c (inf_child_target::terminal_save_inferior): New.
3573
3574 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
3575
3576         * guile/scm-string.c (gdbscm_scm_from_printf): Use
3577         string_vprintf.
3578         * guile/scm-utils.c (gdbscm_printf): Likewise.
3579         * serial.c (serial_printf): Likewise.
3580         * xml-support.c (gdb_xml_parser::vdebug): Likewise.
3581
3582 2018-08-22  Jan Vrany  <jan.vrany@fit.cvut.cz>
3583
3584         * stack.c (print_frame): Print frame architecture when printing on
3585         an MI output.
3586         * NEWS: Mention new "arch" attribute in frame output.
3587
3588 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
3589
3590         * arch/aarch64.h (aarch64_regnum): Update comment.
3591
3592 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
3593
3594         * NEWS: Add SVE to 8.2 section.
3595
3596 2018-08-21  Pedro Alves  <palves@redhat.com>
3597
3598         * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
3599         out from gdbscm_parse_function_args.
3600         (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
3601         gdbscm_parse_function_args_1.
3602
3603 2018-08-21  Simon Marchi  <simon.marchi@ericsson.com>
3604
3605         PR gdb/17816
3606         * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
3607         operator.
3608
3609 2018-08-19  Simon Marchi  <simon.marchi@polymtl.ca>
3610
3611         * solib-svr4.c (svr4_exec_displacement): Fix formatting.
3612
3613 2018-08-19  Michael Spang  <spang@google.com>
3614
3615         PR gdb/11786
3616         * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
3617         for PT_TLS segments.
3618
3619 2018-08-18  Kevin Buettner  <kevinb@redhat.com>
3620
3621         * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
3622         dwarf_variable_value.
3623         * dwarf2-frame.c (class dwarf_expr_executor):
3624         Add override for dwarf_variable_value.
3625         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
3626         (class symbol_needs_eval_context): Likewise.
3627         (indirect_synthetic_pointer): Add forward declaration.
3628         (sect_variable_value): New function.
3629         (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
3630         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
3631         for DW_OP_GNU_variable_value.
3632
3633 2018-08-16  Tom Tromey  <tom@tromey.com>
3634
3635         * top.c (read_command_file): Update.
3636         (command_line_input): Remove "repeat" argument.
3637         * ada-lang.c (get_selections): Update.
3638         * linespec.c (decode_line_2): Update.
3639         * defs.h (command_line_input): Remove argument.
3640         * cli/cli-script.c (read_next_line): Update.
3641         * python/py-gdb-readline.c: Update.
3642
3643 2018-08-17  Tom Tromey  <tom@tromey.com>
3644
3645         * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
3646         command_line_input.
3647
3648 2018-08-15  Tom Tromey  <tom@tromey.com>
3649
3650         * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
3651
3652 2018-08-14  Jan Vrany  <jan.vrany@fit.cvut.cz>
3653
3654         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
3655         If used, use find_pc_partial_function to find address range
3656         to disassemble.
3657         * mi/mi-main.c (mi_cmd_list_features): Report
3658         "data-disassemble-a-option" feature.
3659         * NEWS: Mention new -data-disassemble option -a.
3660
3661 2018-08-13  Tom Tromey  <tom@tromey.com>
3662
3663         * common/common-defs.h (_FORTIFY_SOURCE): Define.
3664
3665 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
3666
3667         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
3668         (aarch64_linux_collect_sve_regset): Likewise.
3669         (aarch64_linux_iterate_over_regset_sections): Check for SVE.
3670         * regcache.h (regcache_map_entry_size): New function.
3671
3672 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
3673
3674         * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
3675         (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
3676         (SVE_HEADER_VL_LENGTH): Likewise.
3677         (SVE_HEADER_MAX_VL_LENGTH): Likewise.
3678         (SVE_HEADER_FLAGS_LENGTH): Likewise.
3679         (SVE_HEADER_RESERVED_LENGTH): Likewise.
3680         (SVE_HEADER_SIZE_OFFSET): Likewise.
3681         (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
3682         (SVE_HEADER_VL_OFFSET): Likewise.
3683         (SVE_HEADER_MAX_VL_OFFSET): Likewise.
3684         (SVE_HEADER_FLAGS_OFFSET): Likewise.
3685         (SVE_HEADER_RESERVED_OFFSET): Likewise.
3686         (SVE_HEADER_SIZE): Likewise.
3687         (aarch64_linux_core_read_vq): Add function.
3688         (aarch64_linux_core_read_description): Check for SVE section.
3689
3690 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
3691
3692         * aarch64-fbsd-tdep.c
3693         (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
3694         collect_size.
3695         * aarch64-linux-tdep.c
3696         (aarch64_linux_iterate_over_regset_sections): Likewise.
3697         * alpha-linux-tdep.c
3698         (alpha_linux_iterate_over_regset_sections):
3699         * alpha-nbsd-tdep.c
3700         (alphanbsd_iterate_over_regset_sections): Likewise.
3701         * amd64-fbsd-tdep.c
3702         (amd64fbsd_iterate_over_regset_sections): Likewise.
3703         * amd64-linux-tdep.c
3704         (amd64_linux_iterate_over_regset_sections): Likewise.
3705         * arm-bsd-tdep.c
3706         (armbsd_iterate_over_regset_sections): Likewise.
3707         * arm-fbsd-tdep.c
3708         (arm_fbsd_iterate_over_regset_sections): Likewise.
3709         * arm-linux-tdep.c
3710         (arm_linux_iterate_over_regset_sections): Likewise.
3711         * corelow.c (get_core_registers_cb): Likewise.
3712         (core_target::fetch_registers): Likewise.
3713         * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
3714         * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
3715         * gdbarch.h (void): Regenerate.
3716         * gdbarch.sh: Add supply_size and collect_size.
3717         * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
3718         * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
3719         * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
3720         * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
3721         * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
3722         * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
3723         * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
3724         * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
3725         * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
3726         * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
3727         * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
3728         * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
3729         * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
3730         * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
3731         * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
3732         * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
3733         * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
3734         * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
3735         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
3736         * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
3737         * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
3738         * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
3739         * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
3740         * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
3741         * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
3742         * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
3743         * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
3744         * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
3745         * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
3746         * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
3747
3748 2018-08-10  Simon Marchi  <simon.marchi@ericsson.com>
3749
3750         * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
3751         with string_printf.
3752
3753 2018-08-10  Keith Seitz  <keiths@redhat.com>
3754
3755         * compile/compile-c-support.c (add_code_header, add_code_footer):
3756         Move into policy class.
3757         (c_push_user_expression, pop_user_expression_nop)
3758         (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
3759         (compile_program): New host class.
3760         (c_compile_program): New typedef.
3761         (c_compute_porgram): Use c_compile_program.
3762
3763 2018-08-10  Keith Seitz  <keiths@redhat.com>
3764
3765         * compile/compile-internal.h (compile_instance::~compile_instance):
3766         Remove calls to htab_delete.
3767         <m_type_map, m_symbol_err_map>: Switch type to htab_up.
3768         * compile.c (compile_instance::compile_instance): Initialize
3769         htab unique pointers.
3770         (compile_instance::get_cached_type, compile_instance::insert_type)
3771         (compile_instance::error_symbol_once): Update for unique_ptr.
3772
3773 2018-08-10  Keith Seitz  <keiths@redhat.com>
3774
3775         * compile/compile-c-symbols.c (struct symbol_error)
3776         (hash_symbol_error, eq_symbol_error, del_symbol_error)
3777         (compile_instance::insert_symbol_error)
3778         (compile_instance::error_symbol_once): Move to ...
3779         * compile/compile.c: ... here.
3780
3781 2018-08-10  Keith Seitz  <keiths@redhat.com>
3782
3783         * compile/compile-c-support.c (c_get_compile_context): Use `new'
3784         instead of `new_compile_instance'.
3785         * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
3786         Update description.
3787         If the symbol error map is not initialized, create it.
3788         (generate_c_for_for_one_symbol): Do not check/initialize
3789         the symbol error map.
3790         * compile/compile-c-types.c (compile_c_instance): Make a class.
3791         Update all callers.
3792         (compile_instance::compile_instance): Initialize the type cache.
3793         (get_cached_type): New function.
3794         (insert_type): Update description.
3795         (compile_c_instance::m_default_cflags): Define.
3796         (convert_type): Update description.  Use get_cached_type.
3797         (delete_instance): Moved to destructor.
3798         (new_compile_instance): Moved to constructor.
3799         * compile/compile-c.h (compile_c_instance): Make class inheriting
3800         from compile_instance.
3801         <base>: Remove field.
3802         <type_map, symbol_err_map>: Move to base class.
3803         <c_plugin>: Rename to `m_plugin' and remove pointer type.
3804         * compile/compile-internal.h (compile_instance): Make class.
3805         <type_map_t, symbol_err_map_t>: Define.
3806         <fe>: Rename to `m_gcc_fe'.
3807         <scope, block, gcc_target_options>: Add `m_' prefix.
3808         <m_type_map, m_symbol_err_map>: New fields, moved from
3809         compile_c_instance.
3810         <destroy>: Remove.
3811         (convert_type, new_compile_instance): Remove.
3812         * compile/compile.c (cleanup_compile_instance): Remove.
3813         (compile_to_object): Use unique_ptr to eliminate cleanups.
3814         (compile_instance::set_print_callback, compile_instance::version)
3815         (compile_instance::set_verbose)
3816         (compile_instance::set_driver_filename)
3817         (compile_instance::set_triplet_regexp)
3818         (compile_instance::set_arguments)
3819         (compile_instance::set_source_file)
3820         (compile_instance::compile): Define.
3821
3822 2018-08-10  Keith Seitz  <keiths@redhat.com>
3823
3824         * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
3825         * compile/compile-c-types.c: Define GCC_METHODN macros and include
3826         gcc-c-fe.def to define C plugin.
3827         (delete_instance): Delete `c_plugin'.
3828         (new_compile_instance): Initialize `c_plugin'.
3829         * compile/compile-c.h: Include gcc_c_plugin.h.
3830         (struct compile_c_instance) <c_plugin>: New member.
3831         * gcc-c-plugin.h: New file.
3832         Update all callers with API change.
3833
3834 2018-08-10  Keith Seitz  <keiths@redhat.com>
3835
3836         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
3837         (HFILES_NO_SRCDIR): ... to here.
3838         Add compile-internal.h and compile-c.h.
3839         * compile/compile-c-support.c: Include compile-c.h.
3840         * compile/compile-c-symbols.c: Include compile-c.h.
3841         (generate_c_for_variable_locations): Update comment.
3842         * compile/compile-c-types.c: Include compile-c.h.
3843         * compile/compile-c.h: New file -- moved C language declarations
3844         from other files here.
3845         * compile/compile-internal.h: Do not include hashtab.h or
3846         common/enum-flags.h.
3847         (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
3848         (gcc_convert_symbol, gcc_symbol_address)
3849         (generate_c_for_variable_locations, c_get_mode_for_size)
3850         (c_get_range_decl_name): Definitions moved to compile-c.h.
3851         * compile/compile-loc2c.c: Include compile-c.h.
3852
3853 2018-08-10  Keith Seitz  <keiths@redhat.com>
3854
3855         * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
3856         (c_symbol_substitution_name): ... this.
3857         Update all callers.
3858
3859 2018-08-10  Keith Seitz  <keiths@redhat.com>
3860
3861         * compile/compile-c-support.c (c_compute_program): Use
3862         unique_xmalloc_ptr to eliminate cleanup.
3863         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
3864         Return a unique_xmalloc_ptr and eliminate cleanup.
3865         * compile/compile-internal.h (generate_c_for_variable_locations):
3866         Return unique_xmalloc_ptr and update description.
3867
3868 2018-08-10  Alan Hayward  <alan.hayward@arm.com>
3869
3870         * corelow.c (core_target::get_core_register_section): Rename
3871         min_size to section_min_size.
3872
3873 2018-08-09  Jim Wilson  <jimw@sifive.com>
3874
3875         * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
3876         (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
3877         * NEWS: Mention new GNU/Linux RISC-V target.
3878         * configure.host: Add riscv*-*-linux*.
3879         * configure.nat: Add riscv*.
3880         * configure.tgt: Add riscv*-*-linux*.
3881         * riscv-linux-nat.c: New file.
3882         * riscv-linux-tdep.c: New file.
3883
3884 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
3885
3886         * infrun.c (resume): Make static, add forward declaration.
3887         (proceed): Update header comment.
3888         * infrun.h (resume): Delete declaration.
3889
3890 2018-08-09  Tom Tromey  <tom@tromey.com>
3891
3892         * riscv-tdep.h: Minor formatting fixes.
3893
3894 2018-08-09  Simon Marchi  <simon.marchi@ericsson.com>
3895
3896         * common/scoped_mmap.c (mmap_file): Silence ARI warning.
3897         * dwarf-index-cache.c (create_dir_and_check): Likewise.
3898         (test_mkdir_recursive): Likewise.
3899         * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
3900
3901 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
3902
3903         * valarith.c (value_subscripted_rvalue): If an array is not in
3904         memory, and we don't know the upper bound, then we can't know that
3905         the requested element exists or not.
3906
3907 2018-08-08  Simon Marchi  <simon.marchi@ericsson.com>
3908
3909         * target.c (str_comma_list_concat_elem): Fix typo in comment.
3910         (target_options_to_string): Add comment.
3911
3912 2018-08-08  Tom Tromey  <tom@tromey.com>
3913
3914         * unittests/scoped_mmap-selftests.c: Check result of "write".
3915
3916 2018-08-08  Jim Wilson  <jimw@sifive.com>
3917
3918         * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
3919         (decode_register_index_short): New.
3920         (decode_j_type_insn, decode_cj_type_insn): New.
3921         (decode_b_type_insn, decode_cb_type_insn): New.
3922         (riscv_insn::decode): Add support for jumps, branches, lr, and sc.  New
3923         local xlen.  Check xlen when decoding ambiguous compressed insns.  In
3924         compressed decode, use is_c_lui_insn instead of is_lui_insn, and
3925         is_c_sw_insn instead of is_sw_insn.
3926         (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
3927         (riscv_software_single_step): New.
3928         * riscv-tdep.h (riscv_software_single_step): Declare.
3929
3930         * riscv-tdep.c (riscv_isa_xlen): Drop static.
3931         * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
3932
3933 2018-08-08  Andrew Burgess  <andrew.burgess@embecosm.com>
3934
3935         PR gdb/18050:
3936         * target.c (dispose_inferior): Don't dispose of inferiors that are
3937         already killed.
3938
3939 2018-08-08  Szabolcs Nagy  <szabolcs.nagy@arm.com>
3940
3941         * remote.c (remote_target::download_tracepoint): Change char* to
3942         const char*.
3943
3944 2018-08-07  Simon Marchi  <simon.marchi@polymtl.ca>
3945
3946         * target.h (target_options_to_string): Return an std::string.
3947         * target.c (str_comma_list_concat_elem): Return void, use
3948         std::string.
3949         (do_option): Likewise.
3950         (target_options_to_string): Return an std::string.
3951         * linux-nat.c (linux_nat_target::wait): Adjust.
3952         * target-debug.h (target_debug_print_options): Adjust.
3953
3954 2018-08-07  Tom Tromey  <tom@tromey.com>
3955
3956         * Makefile.in (CPPFLAGS): New variable.
3957         (INTERNAL_CPPFLAGS): Use it.
3958
3959 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
3960
3961         * NEWS: Mention the index cache.
3962
3963 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
3964
3965         * common/pathstuff.h (get_standard_cache_dir): New.
3966         * common/pathstuff.c (get_standard_cache_dir): New.
3967         * build-id.h (build_id_to_string): New.
3968         * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
3969         DEBUG_STR_SUFFIX): Move to here.
3970         * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
3971         DEBUG_STR_SUFFIX): Move from there.
3972         (write_psymtabs_to_index): Make non-static, add basename
3973         parameter.  Write to temporary files, rename when done.
3974         (save_gdb_index_command): Adjust call to
3975         write_psymtabs_to_index.
3976         * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
3977         field.
3978         * dwarf2read.c (dwz_file) <index_cache_res>: New field.
3979         (get_gdb_index_contents_from_cache): New.
3980         (get_gdb_index_contents_from_cache_dwz): New.
3981         (dwarf2_initialize_objfile): Read index from cache.
3982         (dwarf2_build_psymtabs): Save to index.
3983         * dwarf-index-cache.h: New file.
3984         * dwarf-index-cache.c: New file.
3985         * dwarf-index-write.h: New file.
3986
3987 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
3988
3989         * gnulib/aclocal.m4: Re-generate.
3990         * gnulib/config.in: Re-generate.
3991         * gnulib/configure: Re-generate.
3992         * gnulib/import/Makefile.am: Re-generate.
3993         * gnulib/import/Makefile.in: Re-generate.
3994         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
3995         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
3996         * gnulib/import/m4/mkdir.m4: New file.
3997         * gnulib/import/mkdir.c: New file.
3998         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
3999         module.
4000
4001 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4002
4003         * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
4004         * common/scoped_mmap.c: New file.
4005         * common/scoped_mmap.h (destroy): New method.
4006         (~scoped_mmap, reset): Use destroy.
4007         (scoped_mmap): New move constructor.
4008         (mmap_file): New declaration.
4009         * unittests/scoped_mmap-selftests.c (test_normal,
4010         test_invalid_filename, run_tests): New functions.
4011         (_initialize_scoped_mmap_selftests): Register selftest.
4012
4013 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4014
4015         * dwarf2read.c (read_gdb_index_from_section): Rename to...
4016         (read_gdb_index_from_buffer): ... this.  Remove section
4017         parameter, add buffer parameter.
4018         (get_gdb_index_contents_ftype,
4019         get_gdb_index_contents_dwz_ftype): New typedefs.
4020         (dwarf2_read_gdb_index): Add callback parameters to get the
4021         index contents.
4022         (get_gdb_index_contents_from_section): New.
4023         (dwarf2_initialize_objfile): Update call to
4024         dwarf2_read_gdb_index.
4025
4026 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4027
4028         * common/filestuff.h (gdb_fopen_cloexec): New overload.
4029         (gdb_open_cloexec): Likewise.
4030         * nat/linux-osdata.c (command_from_pid): Use string_printf.
4031         (commandline_from_pid): Likewise.
4032         (linux_xfer_osdata_threads): Likewise.
4033         (linux_xfer_osdata_fds): Likewise.
4034         * ada-lang.c (is_package_name): Likewise.
4035         * auxv.c (procfs_xfer_auxv): Likewise.
4036         * breakpoint.c (print_one_breakpoint_location): Use
4037         uiout::field_fmt.
4038         (print_one_catch_solib): Use string_printf.
4039         * coff-pe-read.c (add_pe_exported_sym): Likewise.
4040         (add_pe_forwarded_sym): Likewise.
4041         * dwarf2read.c (create_type_unit_group): Likewise.
4042         (build_error_marker_type): Likewise.
4043         * infcall.c (get_function_name): Likewise.
4044         * valprint.c (print_converted_chars_to_obstack): Likewise.
4045         * xtensa-tdep.c (xtensa_register_type): Likewise.
4046
4047 2018-08-06  Simon Marchi  <simon.marchi@ericsson.com>
4048
4049         * remote.c (remote_target::download_tracepoint): Fix format
4050         string errors.
4051
4052 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
4053
4054         * tracefile.c: Include common/byte-vector.h.
4055         (trace_save): Change type of buf to gdb::byte_vector.  Initialize
4056         with trace_regblock_size if needed.  Update uses of buf.
4057
4058 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
4059
4060         * tracepoint.h (collection_list) <m_regs_mask>: Change type to
4061         std::vector<unsigned char>.
4062         * tracepoint.c (collection_list::collection_list): Remove
4063         m_regs_mask initializer from initializer list.  Resize
4064         m_regs_mask using the largest remote register number.
4065         (collection_list::add_remote_register): Remove size check on
4066         m_regs_mask.  Use at to access element.
4067         (collection_list::stringify): Change type of temp_buf to
4068         gdb::char_vector.  Update uses of temp_buf.  Resize if needed to
4069         stringify the register mask.  Use pack_hex_byte for the register
4070         mask.
4071
4072 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
4073
4074         * tracepoint.h (class collection_list) <add_register>: Remove.
4075         <add_remote_register, add_ax_registers, add_local_register>:
4076         Declare.
4077         <add_memrange>: Add scope parameter.
4078         * tracepoint.c (encode_actions_1): Likewise.
4079         (collection_list::add_register): Rename to ...
4080         (collection_list::add_remote_register): ... this.  Update
4081         comment.
4082         (collection_list::add_ax_registers, add_local_register): New
4083         methods.
4084         (collection_list::add_memrange): Add scope parameter.  Call
4085         add_local_register instead of add_register.
4086         (finalize_tracepoint_aexpr): New function.
4087         (collection_list::collect_symbol): Update calls to add_memrange.
4088         Call add_local_register instead of add_register.  Call
4089         add_ax_registers.  Call finalize_tracepoint_aexpr.
4090         (encode_actions_1): Get remote regnos for $reg action.  Call
4091         add_remote_register, add_ax_registers, and add_local_register.
4092         Update call to add_memrange.  Call finalize_tracepoint_aexpr.
4093         (validate_actionline): Call finalize_tracepoint_aexpr.
4094
4095 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
4096
4097         * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
4098         Replace array buf with gdb::char_vector buf, of size
4099         get_remote_packet_size ().  Replace references to buf and
4100         BUF_SIZE to buf.data () and buf.size ().  Replace strcpy, strcat
4101         and xsnprintf with snprintf.  Raise errors if the buffer is too
4102         small.
4103
4104 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
4105
4106         * remote.c (remote_target::download_tracepoint): Fix the has_more
4107         predicate in the QTDP action list iteration.
4108
4109 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
4110
4111         * remote.c (remote_target::download_tracepoint): Fix indentation
4112         in for block.
4113
4114 2018-08-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4115
4116         * proc-api.c (_initialize_proc_api): Remove c, unused.
4117         * procfs.c (procfs_init_inferior): Remove signals, unused.
4118         (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
4119         unused.
4120
4121 2018-08-06  Sergey Korolev  <s.korolev@ndmsystems.com>
4122             Andrew Burgess  <andrew.burgess@embecosm.com>
4123
4124         * linux-nat.c (linux_nat_target::follow_fork): Avoid using
4125         'W_STOPCODE (0)' as this could be ambiguous.
4126
4127 2018-08-03  Sergio Durigan Junior  <sergiodj@redhat.com>
4128
4129         * ser-tcp.c (net_open): Fix thinko when deciding whether to
4130         disable TCP's Nagle algorithm (use "ai_protocol" instead of
4131         "ai_socktype").
4132
4133 2018-08-02  Tom Tromey  <tom@tromey.com>
4134
4135         PR symtab/16842.
4136         * dwarf2read.c (read_func_scope): Set symtab on template parameter
4137         symbols.
4138         (process_structure_scope): Likewise.
4139
4140 2018-08-02  Xavier Roirand  <roirand@adacore.com>
4141
4142         PR gdb/22629:
4143         * darwin-nat.c (darwin_kill_inferior): Fix handling of
4144         kill inferior.
4145
4146 2018-08-02  Tom Tromey  <tom@tromey.com>
4147
4148         * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
4149         (darwin_suspend_inferior, darwin_resume_inferior)
4150         (darwin_decode_notify_message, darwin_resume_inferior_threads)
4151         (darwin_check_new_threads): Check result of get_darwin_inferior.
4152
4153 2018-07-31  Joel Brobecker  <brobecker@adacore.com>
4154
4155         GDB 8.1.1 released.
4156
4157 2018-07-31  Jan Vrany  <jan.vrany@fit.cvut.cz>
4158
4159         * varobj.c (varobj_get_path_expr_parent): Report an error if
4160         parent is a dynamic varobj.
4161
4162 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
4163
4164         * gnulib/aclocal.m4: Re-generate.
4165         * gnulib/config.in: Re-generate.
4166         * gnulib/configure: Re-generate.
4167         * gnulib/import/Makefile.in: Re-generate.
4168         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
4169         * gnulib/import/m4/onceonly.m4: Re-generate.
4170
4171 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
4172
4173         * target-descriptions.c (struct xml_test_tdesc): New.
4174         (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
4175         (record_xml_tdesc): Update.
4176         (maintenance_check_xml_descriptions): Update.
4177         * target-descriptions.h (record_xml_tdesc): Update comment.
4178
4179 2018-07-30  Andrew Burgess  <andrew.burgess@embecosm.com>
4180
4181         * eval.c (evaluate_subexp_for_sizeof): Check for array type before
4182         checking array bounds are defined.
4183
4184 2018-07-30  Tom Tromey  <tom@tromey.com>
4185
4186         * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
4187         irreflexivity violation.
4188
4189 2018-07-30  Tom Tromey  <tom@tromey.com>
4190
4191         * cli/cli-decode.c (lookup_cmd): Remove lint code.
4192         * value.c (unpack_long): Remove lint code.
4193         * valops.c (value_ind): Remove lint code.
4194         * valarith.c (value_x_binop, value_x_unop, value_equal)
4195         (value_pos): Remove lint code.
4196
4197 2018-07-28  Tom de Vries  <tdevries@suse.de>
4198
4199         * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
4200         with undefined upper bound as <optimized out>.
4201
4202 2018-07-27  Sergio Durigan Junior  <sergiodj@redhat.com>
4203
4204         * gcore.in: Rename variable "name" to "prefix".  Expand
4205         "usage" text.
4206
4207 2018-07-14  Jon Turney  <jon.turney@dronecode.org.uk>
4208
4209         * windows-nat.c (windows_nat_target::create_inferior): Update to
4210         call close() in global namespace.
4211
4212 2018-07-26  Tom Tromey  <tom@tromey.com>
4213
4214         * dwarf-index-write.c (add_address_entry): Don't add objfile
4215         offsets.
4216         * dbxread.c (find_stab_function): Rename from
4217         find_stab_function_addr.  Return a bound_minimal_symbol.
4218         (read_dbx_symtab): Use raw_text_low, raw_text_high.
4219         Don't add objfile offsets.
4220         (end_psymtab): Use raw_text_low, raw_text_high,
4221         MSYMBOL_VALUE_RAW_ADDRESS.
4222         (read_ofile_symtab): Update.
4223         (process_one_symbol): Update.
4224         * dwarf2read.c (create_addrmap_from_index): Don't add objfile
4225         offsets.
4226         (dw2_relocate): Remove.
4227         (dw2_find_pc_sect_symtab): Bias PC by the text offset before
4228         searching addrmap.
4229         (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
4230         Update.
4231         (process_psymtab_comp_unit_reader, add_partial_symbol)
4232         (add_partial_subprogram, dwarf2_ranges_read): Update.
4233         (load_partial_dies): Update.
4234         (add_address_entry): Don't add objfile offsets.
4235         (dwarf2_build_include_psymtabs): Update.
4236         (create_addrmap_from_aranges): Don't add objfile offsets.
4237         (dw2_find_pc_sect_compunit_symtab): Update.
4238         * mdebugread.c (parse_symbol): Don't add objfile offsets.
4239         (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
4240         Update.
4241         (parse_partial_symbols): Don't add objfile offsets.  Use
4242         raw_text_low, raw_text_high.  Update.
4243         (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
4244         * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
4245         or call 'relocate' quick function.  Clear psymbol_map.
4246         * psympriv.h (struct partial_symbol) <address>: Add section
4247         offset.
4248         <set_unrelocated_address>: Rename from set_address.
4249         <raw_text_low, raw_text_high>: New methods.
4250         <text_low, text_high>: Add objfile parameter.
4251         (add_psymbol_to_bcache): Add 'section' parameter.  Call
4252         set_unrelocated_address.
4253         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
4254         (find_pc_psymbol): Update.
4255         (fixup_psymbol_section, relocate_psymtabs): Remove.
4256         (dump_psymtab, psym_functions): Update.
4257         (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
4258         parameter.
4259         (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
4260         (start_psymtab_common): Update.
4261         * symfile-debug.c (debug_qf_relocate): Remove.
4262         (debug_sym_quick_functions): Update.
4263         * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
4264         * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
4265         Update.
4266
4267 2018-07-26  Tom Tromey  <tromey@redhat.com>
4268
4269         * dbxread.c (end_psymtab): Use text_high_valid and
4270         text_low_valid.
4271         * mdebugread.c (parse_partial_symbols): Use text_low_valid.
4272         (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
4273         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
4274         Update comment.
4275         <text_low_valid, text_high_valid>: New fields.
4276         <set_text_low, set_text_high>: Update.
4277         * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
4278
4279 2018-07-26  Tom Tromey  <tom@tromey.com>
4280
4281         * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
4282         Update.
4283         * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
4284         textlow and texthigh fields.
4285         (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
4286         Update.
4287         * mdebugread.c (parse_lines, parse_partial_symbols)
4288         (psymtab_to_symtab_1): Update.
4289         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
4290         Rename fields.  Update comment.  Now private.
4291         <text_low, text_high, set_text_low, set_text_high>: New methods.
4292         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
4293         (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
4294         (start_psymtab_common, maintenance_info_psymtabs)
4295         (maintenance_check_psymtabs): Update.
4296         * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
4297         texthigh fields.
4298         (scan_xcoff_symtab): Update.
4299
4300 2018-07-26  Tom Tromey  <tromey@redhat.com>
4301
4302         * psympriv.h (struct partial_symbol) <unrelocated_address,
4303         address, set_address>: New methods.
4304         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
4305         (fixup_psymbol_section, relocate_psymtabs): Update.
4306         (print_partial_symbols): Add 'objfile' parameter.  Update.
4307         (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
4308         Update.
4309
4310 2018-07-26  Tom Tromey  <tom@tromey.com>
4311
4312         * dwarf-index-write.c (write_psymbols, debug_names::insert)
4313         (debug_names::write_psymbols): Update.
4314         * psympriv.h (struct partial_symbol): Derive from
4315         general_symbol_info.
4316         <obj_section>: New method.
4317         (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
4318         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
4319         (find_pc_sect_psymbol, fixup_psymbol_section)
4320         (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
4321         (print_partial_symbols, recursively_search_psymtabs)
4322         (compare_psymbols, psymbol_hash, psymbol_compare)
4323         (add_psymbol_to_bcache, maintenance_check_psymtabs)
4324         (psymbol_name_matches, psym_fill_psymbol_map): Update.
4325
4326 2018-07-26  Tom Tromey  <tromey@redhat.com>
4327
4328         * dbxread.c (end_psymtab): Remove dead code.
4329
4330 2018-07-26  Andrew Burgess  <andrew.burgess@embecosm.com>
4331
4332         * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
4333         DWARF unwinders are disabled.
4334         * dwarf2-frame.c: Add dwarf2read.h include.
4335         (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
4336         disabled.
4337         (dwarf2_frame_unwinders_enabled_p): Define.
4338         (show_dwarf_unwinders_enabled_p): New function.
4339         (_initialize_dwarf2_frame): Register switch to control DWARF
4340         unwinder use.
4341         * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
4342         * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
4343         (show_dwarf_cmdlist): Remove static keyword.
4344         * dwarf2read.h (set_dwarf_cmdlist): Declare.
4345         (show_dwarf_cmdlist): Declare.
4346         * NEWS: Document new feature.
4347
4348 2018-07-26  Tom de Vries  <tdevries@suse.de>
4349
4350         PR breakpoints/23366
4351         * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
4352
4353 2018-07-26  Tom de Vries  <tdevries@suse.de>
4354
4355         * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
4356         DW_AT_count can't be translated to a dynamic prop.
4357
4358 2018-07-25  Tom de Vries  <tdevries@suse.de>
4359
4360         * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
4361         try/catch.
4362
4363 2018-07-25  Jan Vrany  <jan.vrany@fit.cvut.cz>
4364
4365         * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
4366
4367 2018-07-25  Joel Brobecker  <brobecker@adacore.com>
4368
4369         * MAINTAINERS (Global Maintainers): Add Tom Tromey.
4370
4371 2018-07-24  Keith Seitz  <keiths@redhat.comt
4372
4373         PR symtab/23010
4374         * dwarf2read.c (dw2_add_symbol_to_list): New function.
4375         (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
4376         instead of add_symbol_to_list.
4377         (read_file_scope): Call prepare_one_comp_unit before reading
4378         any other DIEs.
4379
4380 2018-07-24  Simon Marchi  <simon.marchi@ericsson.com>
4381
4382         * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
4383
4384 2018-07-24  Tom Tromey  <tom@tromey.com>
4385
4386         * utils.c (malloc, realloc, free): Don't declare.
4387         * configure, config.in: Rebuild.
4388         * configure.ac: Don't check for declarations of free, malloc, or
4389         realloc.
4390
4391 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
4392
4393         * aarch64-linux-nat.c
4394         (aarch64_linux_nat_target::stopped_data_address): Remove unused
4395         variable.
4396         * arm-linux-nat.c (fetch_regs): Likewise.
4397         (store_regs): Likewise.
4398         (fetch_vfp_regs): Likewise.
4399         (store_vfp_regs): Likewise.
4400         (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
4401         (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
4402         (arm_linux_nat_target::insert_watchpoint): Likewise.
4403         (arm_linux_nat_target::remove_watchpoint): Likewise.
4404         * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
4405         Likewise.
4406         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
4407         Likewise.
4408         * ppc-linux-nat.c (fetch_register): Likewise.
4409         (fetch_all_gp_regs): Likewise.
4410         (fetch_ppc_registers): Likewise.
4411         (store_all_gp_regs): Likewise.
4412         (store_ppc_registers): Likewise.
4413         (hwdebug_insert_point): Likewise.
4414         (can_use_watchpoint_cond_accel): Likewise.
4415         * remote-sim.c (gdb_os_write_stdout): Likewise.
4416
4417 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
4418             Tom Tromey  <tom@tromey.com>
4419
4420         * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
4421         test for it.
4422         * configure: Rebuild.
4423
4424 2018-07-22  Tom Tromey  <tom@tromey.com>
4425
4426         * regformats/regdat.sh: Define xmltarget_${name} inside
4427         #ifndef IN_PROCESS_AGENT.
4428
4429 2018-07-22  Tom Tromey  <tom@tromey.com>
4430
4431         * value.c (value_fetch_lazy_bitfield): Remove unused variable.
4432
4433 2018-07-22  Tom Tromey  <tom@tromey.com>
4434
4435         * symfile.c (reread_symbols): Notify iter, not objfile.
4436
4437 2018-07-22  Tom Tromey  <tom@tromey.com>
4438
4439         * ravenscar-thread.c (ravenscar_thread_target::store_registers):
4440         Use arch_ops.
4441         (ravenscar_thread_target::prepare_to_store): Likewise.
4442
4443 2018-07-22  Tom Tromey  <tom@tromey.com>
4444
4445         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
4446         unused variable.  Call value_fetch_lazy when needed.
4447         * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
4448         Remove unused variable.  Call value_fetch_lazy when needed.
4449
4450 2018-07-22  Tom Tromey  <tom@tromey.com>
4451
4452         * m32c-tdep.c (mark_dma): Return void.
4453         (make_regs): Remove unused declarations.
4454
4455 2018-07-22  Tom Tromey  <tom@tromey.com>
4456
4457         * guile/scm-cmd.c (gdbscm_dont_repeat): Call
4458         cmdscm_get_valid_command_smob_arg_unsafe for effect.
4459         * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
4460         bkscm_get_valid_block_smob_arg_unsafe for effect.
4461
4462 2018-07-22  Tom Tromey  <tom@tromey.com>
4463
4464         * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
4465         value_type.
4466
4467 2018-07-22  Tom Tromey  <tom@tromey.com>
4468
4469         * windows-nat.c (saved_context): Conditionally define.
4470         * remote.c (remote_target::remote_btrace_maybe_reopen):
4471         Conditionally declare "warned".
4472         * inflow.c (sigquit_ours): Conditionally define.
4473         (new_tty): Move "tty" declaration inside #if.
4474         * guile/guile.c (guile_datadir): Conditionally define.
4475         * charset.c (set_be_le_names): Move some declarations inside #if.
4476         * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
4477         #if.
4478         (parse_xml_btrace_conf): Likewise.
4479
4480 2018-07-22  Tom Tromey  <tom@tromey.com>
4481
4482         * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
4483
4484 2018-07-22  Tom Tromey  <tom@tromey.com>
4485
4486         * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
4487         * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
4488         (vlscm_convert_typed_value_from_scheme): Remove unused variable.
4489         * buildsym-legacy.c (get_macro_table): Remove unused variable.
4490         * stack.c (frame_apply_level_command): Remove unused variable.
4491         * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
4492         * sparc64-tdep.c (adi_examine_command): Remove unused variable.
4493         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
4494         unused variable.
4495         * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
4496         * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
4497         * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
4498         variable.
4499         * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
4500         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
4501         variable.
4502         * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
4503         Remove unused variable.
4504         * cli/cli-script.c (recurse_read_control_structure): Remove unused
4505         variable.
4506         * common/tdesc.c (print_xml_feature::visit): Remove unused
4507         variable.
4508         * compile/compile-object-load.c (store_regs): Remove unused
4509         variables.
4510         * complaints.c (clear_complaints): Remove unused variable.
4511         * corelow.c (core_target_open): Remove unused variable.
4512         * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
4513         variable.
4514         * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
4515         variable.
4516         * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
4517         variable.
4518         * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
4519         variable.
4520         * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
4521         variable.
4522         * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
4523         variable.
4524         * ia64-tdep.c (examine_prologue): Remove unused variable.
4525         * infcall.c (run_inferior_call): Remove unused variable.
4526         * inferior.c (exit_inferior): Remove unused variable.
4527         * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
4528         * linespec.c (decode_line_2): Remove unused variable.
4529         * linux-nat.c (super_close): Remove.
4530         * linux-tdep.c (linux_info_proc): Remove unused variable.
4531         * mi/mi-main.c (mi_execute_command): Remove unused variable.
4532         * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
4533         Remove unused variable.
4534         * parse.c (find_minsym_type_and_address): Remove unused variable.
4535         * printcmd.c (info_symbol_command, printf_floating): Remove unused
4536         variable.
4537         * python/py-breakpoint.c (bppy_set_commands): Remove unused
4538         variable.
4539         * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
4540         variables.
4541         * record-btrace.c (record_btrace_target::store_registers): Remove
4542         unused variable.
4543         (cmd_show_record_btrace_cpu): Remove unused variable.
4544         * riscv-tdep.c (riscv_register_reggroup_p)
4545         (riscv_push_dummy_call, riscv_return_value): Remove unused
4546         variable.
4547         * rust-exp.y (literal): Remove unused variable.
4548         * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
4549         unused variable.
4550         <STRUCTOP_ANONYMOUS>: Likewise.
4551         * s390-linux-tdep.c (s390_linux_init_abi_31)
4552         (s390_linux_init_abi_64): Remove unused variable.
4553         * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
4554         (file_select_thread, net_windows_open, _initialize_ser_windows):
4555         Remove unused variables.
4556         * symtab.c (find_pc_sect_line): Remove unused variable.
4557         * target-memory.c (compute_garbled_blocks): Remove unused
4558         variable.
4559         (target_write_memory_blocks): Remove unused variable.
4560         * target.c (target_stack::unpush): Remove unused variables.
4561         * tracepoint.c (start_tracing, all_tracepoint_actions)
4562         (merge_uploaded_trace_state_variables)
4563         (print_one_static_tracepoint_marker): Remove unused variable.
4564         * unittests/basic_string_view/element_access/char/1.cc (test01):
4565         Remove unused variable.
4566         * windows-nat.c (windows_continue, windows_add_all_dlls)
4567         (do_initial_windows_stuff, windows_nat_target::create_inferior):
4568         Remove unused variables.
4569
4570 2018-07-21  Simon Marchi  <simon.marchi@polymtl.ca>
4571
4572         * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
4573         attr_profile in HAVE_ELF.
4574         * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
4575         HAVE_ELF.
4576
4577 2018-07-20  Simon Marchi  <simon.marchi@polymtl.ca>
4578
4579         * frame.c (frame_register_unwind): Change parameter name.
4580         (frame_unwind_register): Likewise.
4581         (frame_unwind_register_value): Likewise.
4582         (frame_unwind_register_signed): Likewise.
4583         (frame_unwind_register_unsigned): Likewise.
4584         * frame.h (frame_register_unwind): Likewise.
4585         (frame_unwind_register): Likewise.
4586         (frame_unwind_register_value): Likewise.
4587         (frame_unwind_register_signed): Likewise.
4588         (frame_unwind_register_unsigned): Likewise.
4589         (frame_unwind_arch): Likewise.
4590
4591 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
4592
4593         * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
4594         ISA maintenance.
4595
4596 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
4597
4598         * mips-linux-nat.c (mips_linux_nat_target::read_description):
4599         Call `get_ptrace_pid' rather than extracting the ptrace PID by
4600         hand.
4601
4602 2018-07-20  Keith Seitz  <keiths@redhat.com>
4603
4604         * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
4605         m_main_subfile, m_comp_dir, m_producer, m_debugformat,
4606         m_compunit_symtab, m_language>: Add "m_" prefix.
4607         Update all uses.
4608         * buildsym.c: Update all uses.
4609
4610 2018-07-20  Tom Tromey  <tom@tromey.com>
4611
4612         * buildsym-legacy.h (record_line): Don't use record_line_ftype.
4613         * buildsym.h (record_line_ftype): Remove typedef.
4614
4615 2018-07-20  Tom Tromey  <tom@tromey.com>
4616
4617         * buildsym-legacy.h (augment_type_symtab): Don't declare.
4618         (end_expandable_symtab): Likewise.
4619         (end_symtab_get_static_block): Likewise.
4620         (end_symtab_from_static_block): Likewise.
4621         * buildsym-legacy.c (augment_type_symtab): Remove.
4622         (end_expandable_symtab): Remove.
4623         (end_symtab_get_static_block): Remove.
4624         (end_symtab_from_static_block): Remove.
4625
4626 2018-07-20  Tom Tromey  <tom@tromey.com>
4627
4628         * dwarf2read.c: Include buildsym.h.
4629         (struct dwarf2_cu) <builder>: New method.
4630         (fixup_go_packaging): Update.
4631         (process_full_comp_unit, process_full_type_unit): Update.  Don't
4632         use scoped_free_pendings.
4633         (using_directives): Add "cu" parameter, remove "language".
4634         (read_import_statement, setup_type_unit_groups, )
4635         (read_func_scope, read_lexical_block_scope)
4636         (dwarf2_record_block_ranges, read_namespace): Update.
4637         (lnp_state_machine::lnp_state_machine): Add cu parameter.
4638         (lnp_state_machine::handle_end_sequence): Update.
4639         (class lnp_state_machine) <m_cu>: New member.
4640         <m_record_line_callback>: Remove.
4641         <m_currently_recording_lines>: New member.
4642         (lnp_state_machine::handle_set_file): Update.
4643         (noop_record_line): Remove.
4644         (dwarf_record_line_p): Add cu parameter.
4645         (dwarf_record_line_1, dwarf_finish_line): Likewise.
4646         (lnp_state_machine::record_line)
4647         (lnp_state_machine::lnp_state_machine)
4648         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
4649         (dwarf_decode_lines): Update.
4650         (dwarf2_start_subfile): Add cu parameter.
4651         (dwarf2_start_symtab, new_symbol): Update.
4652         (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
4653         Remove dwarf2_per_objfile parameter.
4654         (dwarf_decode_macros): Update.
4655
4656 2018-07-20  Tom Tromey  <tom@tromey.com>
4657
4658         * stabsread.c (define_symbol): Update.
4659         * buildsym-legacy.h (get_buildsym_compunit): Declare.
4660         * dwarf2read.c (new_symbol): Update.
4661         * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
4662         * cp-namespace.c: Include buildsym.h.
4663         (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
4664         * buildsym-legacy.c (get_buildsym_compunit): New function.
4665
4666 2018-07-20  Tom Tromey  <tom@tromey.com>
4667
4668         * xcoffread.c: Include buildsym-legacy.h.
4669         * windows-nat.c: Include buildsym-legacy.h.
4670         * stabsread.c: Include buildsym-legacy.h.
4671         * mdebugread.c: Include buildsym-legacy.h.
4672         * buildsym-legacy.h: New file.
4673         * buildsym-legacy.c: New file, from buildsym.c.
4674         * go32-nat.c: Include buildsym-legacy.h.
4675         * dwarf2read.c: Include buildsym-legacy.h.
4676         * dbxread.c: Include buildsym-legacy.h.
4677         * cp-namespace.c: Include buildsym-legacy.h.
4678         * coffread.c: Include buildsym-legacy.h.
4679         * buildsym.h: Move some contents to buildsym-legacy.h.
4680         * buildsym.c: Include buildsym-legacy.h.  Move many functions to
4681         buildsym-legacy.c.
4682         * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
4683
4684 2018-07-20  Tom Tromey  <tom@tromey.com>
4685
4686         * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
4687         * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
4688         (buildsym_compunit::buildsym_compunit)
4689         (buildsym_compunit::~buildsym_compunit)
4690         (buildsym_compunit::get_macro_table): Define.
4691
4692 2018-07-20  Tom Tromey  <tom@tromey.com>
4693
4694         * buildsym.c (reset_symtab_globals): Remove.
4695         (buildsym_compunit::end_symtab_from_static_block): Update.
4696         (buildsym_compunit::augment_type_symtab): Update.
4697         (end_symtab_from_static_block): Call free_buildsym_compunit.
4698         (augment_type_symtab, end_symtab, end_expandable_symtab):
4699         Likewise.
4700
4701 2018-07-20  Tom Tromey  <tom@tromey.com>
4702
4703         * arch-utils.c: Do not include buildsym.h.
4704         * mipsread.c: Do not include buildsym.h.
4705         * machoread.c: Do not include buildsym.h.
4706         * elfread.c: Do not include buildsym.h.
4707
4708 2018-07-20  Tom Tromey  <tom@tromey.com>
4709
4710         * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
4711         initialization.
4712         (buildsym_compunit): Add new constructor.
4713         (struct buildsym_compunit) <get_last_source_file, finish_block,
4714         record_block_range, start_subfile, patch_subfile_names,
4715         push_subfile, pop_subfile, record_line, get_compunit_symtab,
4716         set_last_source_start_addr, get_last_source_start_addr,
4717         get_local_using_directives, set_local_using_directives,
4718         get_global_using_directives, outermost_context_p,
4719         get_current_context_stack, get_context_stack_depth,
4720         get_current_subfile, get_local_symbols, get_file_symbols,
4721         get_global_symbols, record_debugformat, record_producer,
4722         push_context, pop_context, end_symtab_get_static_block,
4723         end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
4724         New public methods.
4725         <record_pending_block, finish_block_internal, make_blockvector,
4726         watch_main_source_file_lossage, end_symtab_with_blockvector>: New
4727         private methods.
4728         Update all users.
4729
4730 2018-05-22  Tom Tromey  <tom@tromey.com>
4731
4732         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
4733         parameter.
4734         (finish_block_internal): Update.
4735
4736 2018-07-20  Tom Tromey  <tom@tromey.com>
4737
4738         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
4739         parameter.
4740         (finish_block_internal): Update.
4741
4742 2018-07-20  Tom Tromey  <tom@tromey.com>
4743
4744         * buildsym.h (EXTERN): Don't define or undef.
4745         * buildsym.c (EXTERN): Don't define.
4746
4747 2018-07-20  Tom Tromey  <tom@tromey.com>
4748
4749         * buildsym.c: Remove TODO comment.
4750
4751 2018-07-20  Tom Tromey  <tom@tromey.com>
4752
4753         * coffread.c (coff_symtab_read): Update.
4754         * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
4755         (xcoff_new_init): Update.
4756         * mipsread.c (mipscoff_new_init): Update.
4757         * mdebugread.c (mdebug_build_psymtabs): Update.
4758         * elfread.c (elf_new_init): Update.
4759         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
4760         Update.
4761         * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
4762         (coffstab_build_psymtabs, elfstab_build_psymtabs)
4763         (stabsect_build_psymtabs): Update.
4764         * buildsym.h (buildsym_init): Don't declare.
4765         * buildsym.c: Update comment.
4766         (prepare_for_building): Remove.
4767         (start_symtab, restart_symtab): Update.
4768         (reset_symtab_globals): Update comment.
4769         (buildsym_init): Remove.
4770
4771 2018-07-20  Tom Tromey  <tom@tromey.com>
4772
4773         * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
4774         * stabsread.c (patch_block_stabs, define_symbol, read_type)
4775         (read_enum_type, common_block_start, common_block_end)
4776         (cleanup_undefined_types_1, finish_global_stabs): Update.
4777         * mdebugread.c (psymtab_to_symtab_1): Update.
4778         * dwarf2read.c (fixup_go_packaging, read_func_scope)
4779         (read_lexical_block_scope, new_symbol): Update.
4780         * dbxread.c (process_one_symbol): Update.
4781         * coffread.c (coff_symtab_read, process_coff_symbol)
4782         (coff_read_enum_type): Update.
4783         * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
4784         declare.
4785         (get_local_symbols, get_file_symbols, get_global_symbols): New
4786         functions.
4787         * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
4788         m_global_symbols.
4789         <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
4790         (~scoped_free_pendings): Update.
4791         (finish_block, prepare_for_building, reset_symtab_globals)
4792         (end_symtab_get_static_block, end_symtab_with_blockvector)
4793         (augment_type_symtab, push_context): Update.
4794         (get_local_symbols, get_file_symbols, get_global_symbols): New
4795         functions.
4796         (buildsym_init): Update.
4797
4798 2018-07-20  Tom Tromey  <tom@tromey.com>
4799
4800         * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
4801         (process_full_type_unit): Likewise.
4802         (dwarf2_start_symtab): Set list_in_scope.
4803
4804 2018-07-20  Tom Tromey  <tom@tromey.com>
4805
4806         * dwarf2read.c (process_psymtab_comp_unit_reader)
4807         (build_type_psymtabs_reader): Do not set list_in_scope.
4808
4809 2018-07-20  Tom Tromey  <tom@tromey.com>
4810
4811         * buildsym.c (free_pendings): Remove.
4812         (add_symbol_to_list, scoped_free_pendings)
4813         (finish_block_internal, buildsym_init): Update.
4814
4815 2018-07-20  Tom Tromey  <tom@tromey.com>
4816
4817         * xcoffread.c (read_xcoff_symtab): Update.
4818         * dwarf2read.c (read_func_scope, read_lexical_block_scope):
4819         Update.
4820         * dbxread.c (process_one_symbol): Update.
4821         * coffread.c (coff_symtab_read): Update.
4822         * buildsym.h (finish_block): Update.
4823         * buildsym.c (finish_block): Remove "listhead" argument.
4824         (end_symtab_get_static_block): Update.
4825
4826 2018-07-20  Tom Tromey  <tom@tromey.com>
4827
4828         * buildsym.h (class scoped_free_pendings): Remove constructor.
4829         * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
4830         method.
4831         <m_pending_block_obstack, m_pending_blocks>: New members.
4832         (pending_block_obstack, pending_blocks): Remove.
4833         (scoped_free_pendings::scoped_free_pendings): Default.
4834         (~scoped_free_pendings): Update.
4835         (free_pending_blocks): Remove.
4836         (finish_block_internal, record_pending_block, make_blockvector)
4837         (end_symtab_get_static_block, augment_type_symtab, push_context)
4838         (buildsym_init): Update.
4839
4840 2018-07-20  Tom Tromey  <tom@tromey.com>
4841
4842         * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
4843         m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
4844         members.
4845         (pending_addrmap, pending_addrmap_obstack)
4846         (pending_addrmap_interesting): Remove.
4847         (scoped_free_pendings, record_block_range, make_blockvector)
4848         (prepare_for_building, reset_symtab_globals, buildsym_init):
4849         Update.
4850
4851 2018-07-20  Tom Tromey  <tom@tromey.com>
4852
4853         * xcoffread.c (process_linenos): Update.
4854         * stabsread.c (define_symbol, read_type, read_enum_type): Update.
4855         * mdebugread.c (psymtab_to_symtab_1): Update.
4856         * dwarf2read.c (setup_type_unit_groups)
4857         (lnp_state_machine::handle_set_file, dwarf_record_line_p)
4858         (lnp_state_machine::record_line, dwarf_decode_lines): Update.
4859         * dbxread.c (process_one_symbol): Update.
4860         * coffread.c (coff_symtab_read, enter_linenos)
4861         (process_coff_symbol): Update.
4862         * buildsym.h (current_subfile): Don't declare.
4863         (get_current_subfile): Declare.
4864         * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
4865         member.
4866         (start_subfile, free_buildsym_compunit, push_subfile)
4867         (prepare_for_building, start_symtab): Update.
4868         (get_current_subfile): New function.
4869
4870 2018-07-20  Tom Tromey  <tom@tromey.com>
4871
4872         * coffread.c (coff_symtab_read): Update.
4873         * xcoffread.c (read_xcoff_symtab): Update.
4874         * dwarf2read.c (new_symbol): Update.
4875         (read_func_scope, read_lexical_block_scope): Update.
4876         * dbxread.c (process_one_symbol): Update.
4877         * buildsym.h (context_stack, context_stack_depth): Don't declare.
4878         (outermost_context_p): Remove macro.
4879         (outermost_context_p, get_current_context_stack)
4880         (get_context_stack_depth): Declare.
4881         (pop_context): Return struct context_stack.
4882         * buildsym.c (struct buildsym_compunit) <m_context_stack: New
4883         member.
4884         (context_stack_size): Remove.
4885         (INITIAL_CONTEXT_STACK_SIZE): Remove.
4886         (prepare_for_building, end_symtab_get_static_block)
4887         (augment_type_symtab, push_context): Update.
4888         (pop_context): Return struct context_stack.
4889         (outermost_context_p, get_current_context_stack)
4890         (get_context_stack_depth): New functions.
4891         (buildsym_init): Update.
4892
4893 2018-07-20  Tom Tromey  <tom@tromey.com>
4894
4895         * rust-exp.y: Now a pure parser.  Update all rules.
4896         (%union): Move earlier.
4897         (current_parser, work_obstack): Remove globals.
4898         (rust_parser, ~rust_parser): Update.
4899         (class rust_parser) <copy_name, concat3, crate_name, super_name,
4900         lex_character, lex_number, lex_string, lex_identifier,
4901         rust_lookup_type, convert_params_to_types, convert_ast_to_type,
4902         convert_name, convert_params_to_expression,
4903         convert_ast_to_expression, ast_basic_type, ast_operation,
4904         ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
4905         ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
4906         ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
4907         ast_array_type, ast_slice_type, ast_reference_type,
4908         ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
4909         (rust_parse): Update.
4910         (rustyyerror, rustyylex): Add parser parameter.
4911         (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
4912         (rust_lex_stringish_test, rust_lex_test_sequence)
4913         (rust_lex_test_trailing_dot, rust_lex_test_completion)
4914         (rust_lex_test_push_back, rust_lex_tests): Update.
4915
4916 2018-07-19  Pedro Alves  <palves@redhat.com>
4917
4918         * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
4919         gdb::unique_xmalloc_ptr.
4920         * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
4921         Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
4922         * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
4923         copy-initialization.
4924         * guile/scm-pretty-print.c (ppscm_print_children): Use
4925         gdb::unique_xmalloc_ptr instead of cleanups.
4926         (gdbscm_apply_val_pretty_printer): Remove cleanups.
4927         * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
4928         gdb::unique_xmalloc_ptr.
4929         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
4930         Adjust to use gdb::unique_xmalloc_ptr.
4931         * guile/scm-utils.c (extract_arg): Adjust.
4932         * guile/scm-value.c (gdbscm_value_field): Adjust to use
4933         gdb::unique_xmalloc_ptr instead of a cleanup.
4934
4935 2018-07-19  Tom Tromey  <tom@tromey.com>
4936
4937         * utils.c (do_value_free_to_mark)
4938         (make_cleanup_value_free_to_mark): Remove.
4939         * utils.h (make_cleanup_value_free_to_mark): Remove.
4940
4941 2018-07-19  Pedro Alves  <palves@redhat.com>
4942
4943         * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
4944         forwarding reference.
4945
4946 2018-07-18  Pedro Alves  <palves@redhat.com>
4947
4948         * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
4949         gdbscm_wrap.  Use gdb::unique_xmalloc_ptr<char> instead of a
4950         cleanup.
4951
4952 2018-07-18  Pedro Alves  <palves@redhat.com>
4953
4954         * guile/guile-internal.h: Add comment about mixing GDB and Scheme
4955         exceptions.
4956         (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
4957         (gdbscm_wrap): New.
4958         * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
4959         directly instead of a cleanup.
4960         * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
4961         (vlscm_unop): ... this.  Reimplement using gdbscm_wrap.
4962         (vlscm_binop_gdbthrow): New, factored out from ...
4963         (vlscm_binop): ... this.  Reimplement using gdbscm_wrap.
4964         (vlscm_rich_compare): Use gdbscm_wrap.
4965         * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
4966         instead of a cleanup.
4967         (gdbscm_lookup_global_symbol): Use xfree directly instead of a
4968         cleanup.
4969         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
4970         Use xfree directly instead of a cleanup.
4971         * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
4972         Adjust to use gdbscm_wrap and scoped_value_mark.
4973         (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
4974         (gdbscm_value_address, gdbscm_value_dereference)
4975         (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
4976         scoped_value_mark.
4977         (gdbscm_value_dynamic_type): Use scoped_value_mark.
4978         (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
4979         scoped_value_mark.
4980         (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
4981         gdbscm_wrap and scoped_value_mark.
4982         (gdbscm_value_to_string): Use xfree directly instead of a
4983         cleanup.  Move 'buffer' unique_ptr to TRY scope.
4984         (gdbscm_value_to_lazy_string): Use xfree directly instead of a
4985         cleanup.  Move 'buffer' unique_ptr to TRY scope.  Use
4986         scoped_value_mark.
4987         (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
4988         (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
4989         scoped_value_mark.
4990         (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
4991         gdbscm_wrap.
4992
4993 2018-07-18  Tom de Vries  <tdevries@suse.de>
4994
4995         * findvar.c (default_read_var_value): Also resolve dynamic type for
4996         LOC_OPTIMIZED_OUT vars.
4997
4998 2018-07-18  Maciej W. Rozycki  <macro@mips.com>
4999
5000         * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
5001         decoding.
5002
5003 2018-07-17  Tom Tromey  <tom@tromey.com>
5004
5005         * guile/scm-param.c (pascm_set_func, pascm_show_func)
5006         (compute_enum_list, pascm_set_param_value_x)
5007         (gdbscm_parameter_value): Update.
5008         * guile/guile-internal.h (gdbscm_scm_to_string): Update.
5009         (gdbscm_scm_to_host_string): Update.
5010         * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
5011         Update.
5012         * guile/scm-cmd.c (cmdscm_add_completion): Update.
5013         * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
5014         * guile/scm-string.c (gdbscm_scm_to_string): Return
5015         unique_xmalloc_ptr.
5016         (gdbscm_scm_to_host_string): Likewise.
5017
5018 2018-07-17  Tom Tromey  <tom@tromey.com>
5019
5020         * guile/guile.c (gdbscm_eval_from_control_command): Update.
5021         * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
5022         * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
5023         * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
5024         unique_xmalloc_ptr.
5025
5026 2018-07-17  Tom Tromey  <tom@tromey.com>
5027
5028         * guile/scm-param.c (pascm_signal_setshow_error): Update.
5029         * guile/guile-internal.h (gdbscm_exception_message_to_string):
5030         Update.
5031         * guile/scm-cmd.c (cmdscm_function): Update.
5032         * guile/scm-pretty-print.c
5033         (ppscm_print_exception_unless_memory_error): Update.
5034         * guile/scm-exception.c (gdbscm_exception_message_to_string):
5035         Return unique_xmalloc_ptr.
5036
5037 2018-07-17  Tom Tromey  <tom@tromey.com>
5038
5039         * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
5040         Use string_printf.
5041
5042 2018-07-17  Jim Wilson  <jimw@sifive.com>
5043
5044         * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
5045         set_gdbarch_decr_pc_after_break.  Call riscv_read_misa_reg always.
5046         (riscv_gdbarch_init): Delete local has_compressed_isa.  Delete now
5047         unecessary braces after EF_RISCV_RVC test.  Delete call to
5048         set_gdbarch_decr_pc_after_break.
5049
5050         * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
5051         RISCV_LAST_FP_REGNUM + 1.
5052         (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
5053
5054 2018-07-17  Tom Tromey  <tom@tromey.com>
5055
5056         * configure.ac: Remove --disable-gdbcli.
5057         * configure: Rebuild.
5058         * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
5059         (SUBDIR_CLI_CFLAGS): Remove.
5060         (SFILES): Use SUBDIR_CLI_SRCS.
5061         (COMMON_OBS): Use SUBDIR_CLI_OBS.
5062
5063 2018-07-17  Tom Tromey  <tom@tromey.com>
5064
5065         PR gdb/18624:
5066         * coffread.c (coff_symtab_read): Use scoped_free_pendings.
5067
5068 2018-07-16  Jim Wilson  <jimw@sifive.com>
5069
5070         * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
5071
5072 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
5073
5074         * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
5075         variable.
5076         (libunwind_frame_sniffer): Likewise.
5077         (libunwind_frame_prev_register): Likewise.
5078         (libunwind_sigtramp_frame_sniffer): Likewise.
5079         * ia64-tdep.c (ia64_access_reg): Likewise.
5080         (ia64_access_rse_reg): Likewise.
5081         (ia64_libunwind_sigtramp_frame_this_id): Likewise.
5082         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
5083
5084 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
5085
5086         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
5087
5088 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
5089
5090         * remote-sim.c (gdbsim_target::close,
5091         gdbsim_target::mourn_inferior): Remove unused variables.
5092
5093 2018-07-16  Simon Marchi  <simon.marchi@polymtl.ca>
5094
5095         * ia64-tdep.c (ktab_buf): New global.
5096         (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
5097         (get_kernel_table): Adjust.
5098
5099 2018-07-16  Tom Tromey  <tom@tromey.com>
5100
5101         * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
5102         * dwarf2read.c (using_directives, new_symbol): Use
5103         outermost_context_p.
5104         * dbxread.c (process_one_symbol): Use outermost_context_p.
5105         * coffread.c (coff_symtab_read): Use outermost_context_p.
5106
5107 2018-07-16  Tom Tromey  <tom@tromey.com>
5108
5109         * dwarf2read.c (using_directives, read_func_scope)
5110         (read_lexical_block_scope): Update.
5111         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
5112         * buildsym.h (local_using_directives, global_using_directives):
5113         Don't declare.
5114         (get_local_using_directives, set_local_using_directives)
5115         (get_global_using_directives): Declare.
5116         * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
5117         m_global_using_directives>: New members.
5118         (finish_block_internal, prepare_for_building)
5119         (reset_symtab_globals, end_symtab_get_static_block)
5120         (push_context): Update.
5121         (get_local_using_directives, set_local_using_directives)
5122         (get_global_using_directives): New functions.
5123         (buildsym_init): Update.
5124
5125 2018-07-16  Tom Tromey  <tom@tromey.com>
5126
5127         * xcoffread.c (xcoff_initial_scan): Don't call
5128         free_pending_blocks.
5129         * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
5130         * buildsym.h (class scoped_free_pendings): Add constructor.
5131         (free_pending_blocks): Don't declare.
5132         * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
5133         (free_pending_blocks): Now static.
5134
5135 2018-07-16  Tom Tromey  <tom@tromey.com>
5136
5137         * buildsym.h (push_subfile, pop_subfile): Update declarations.
5138         * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
5139         member.
5140         (struct subfile_stack): Remove.
5141         (subfile_stack): Remove.
5142         (push_subfile, pop_subfile, buildsym_init): Update.
5143
5144 2018-07-16  Tom Tromey  <tom@tromey.com>
5145
5146         * buildsym.c (push_subfile): Use gdb_assert.
5147         (pop_subfile): Use gdb_assert.
5148
5149 2018-07-16  Tom Tromey  <tom@tromey.com>
5150
5151         * buildsym.h (merge_symbol_lists): Remove.
5152         * buildsym.c (merge_symbol_lists): Remove.
5153
5154 2018-07-16  Tom Tromey  <tom@tromey.com>
5155
5156         * stabsread.c (scan_file_globals): Update comment.
5157         * stabsread.h (scan_file_globals): Move from buildsym.h.
5158         * buildsym.h (scan_file_globals): Move to stabsread.h.
5159
5160 2018-07-16  Tom Tromey  <tom@tromey.com>
5161
5162         * xcoffread.c (xcoff_new_init): Update.
5163         * mipsread.c (mipscoff_new_init): Update.
5164         * mdebugread.c (mdebug_build_psymtabs): Update.
5165         * elfread.c (elf_new_init): Update.
5166         * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
5167         (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
5168         * buildsym.h (buildsym_new_init): Don't declare.
5169         * buildsym.c (buildsym_new_init): Remove.
5170
5171 2018-07-16  Tom Tromey  <tom@tromey.com>
5172
5173         * stabsread.h (within_function): Move from buildsym.h.
5174         * stabsread.c (start_stabs): Clear within_function.
5175         * coffread.c (coff_start_symtab): Clear within_function.
5176         * buildsym.h (within_function): Move to stabsread.h.
5177         * buildsym.c (prepare_for_building): Update.
5178
5179 2018-07-16  Tom Tromey  <tom@tromey.com>
5180
5181         * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
5182         * dwarf2read.c (dwarf2_start_symtab): Don't set
5183         processing_gcc_compilation.
5184         * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
5185
5186 2018-07-16  Tom Tromey  <tom@tromey.com>
5187
5188         * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
5189         (next_symbol_text_func): Move from buildsym.h.
5190         * stabsread.c (hashname): Move from buildsym.c.
5191         * buildsym.h (HASHSIZE, symnum, next_symbol_text)
5192         (next_symbol_text_func, hashname): Move to stabsread.h.
5193         * buildsym.c: Don't include bcache.h
5194         (hashname): Move to stasbread.c.
5195
5196 2018-07-16  Tom Tromey  <tom@tromey.com>
5197
5198         * buildsym.h (context_stack_size): Don't declare.
5199         * buildsym.c (context_stack_size): New global.
5200
5201 2018-07-16  Tom Tromey  <tom@tromey.com>
5202
5203         * dbxread.c (processing_acc_compilation): New global.
5204         * buildsym.h (processing_acc_compilation): Don't declare.
5205
5206 2018-07-16  Tom Tromey  <tom@tromey.com>
5207
5208         * xcoffread.c (aix_process_linenos, complete_symtab): Update.
5209         * dbxread.c (read_ofile_symtab): Update.
5210         * coffread.c (coff_start_symtab, coff_end_symtab): Update.
5211         * buildsym.h (last_source_start_addr): Remove.
5212         (set_last_source_start_addr, get_last_source_start_addr):
5213         Declare.
5214         * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
5215         parameter.
5216         (struct buildsym_compunit) <m_last_source_start_addr>: New
5217         member.
5218         (prepare_for_building): Remove start_addr parameter.
5219         (start_symtab, restart_symtab, end_symtab_get_static_block)
5220         (end_symtab_with_blockvector): Update.
5221         (set_last_source_start_addr, get_last_source_start_addr): New
5222         functions.
5223
5224 2018-07-16  Tom Tromey  <tom@tromey.com>
5225
5226         * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
5227         member.
5228         (have_line_numbers): Remove.
5229         (record_line, prepare_for_building, end_symtab_get_static_block)
5230         (augment_type_symtab): Update.
5231
5232 2018-07-16  Tom Tromey  <tom@tromey.com>
5233
5234         * buildsym.c (~buildsym_compunit): Free the macro table.
5235         (struct buildsym_compunit) <get_macro_table, release_macros>: New
5236         methods.
5237         <m_pending_macros>: New member.
5238         (pending_macros): Remove.
5239         (~scoped_free_pendings, get_macro_table, prepare_for_building)
5240         (reset_symtab_globals, end_symtab_get_static_block)
5241         (end_symtab_with_blockvector, augment_type_symtab)
5242         (buildsym_init): Update.
5243
5244 2018-07-16  Tom Tromey  <tom@tromey.com>
5245
5246         * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
5247         parameter.
5248         (buildsym_compunit::set_last_source_file): New method.
5249         <m_last_source_file>: New member.
5250         (prepare_for_building): Remove "name" parameter.
5251         (start_symtab, restart_symtab, reset_symtab_globals): Update.
5252         (last_source_file): Remove.
5253         (set_last_source_file, get_last_source_file): Update.
5254
5255 2018-07-16  Tom Tromey  <tom@tromey.com>
5256
5257         * buildsym.c (prepare_for_building): Add assert.
5258
5259 2018-07-16  Tom Tromey  <tom@tromey.com>
5260
5261         * buildsym.c (~buildsym_compunit): Update.
5262         (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
5263         (start_subfile, patch_subfile_names)
5264         (end_symtab_with_blockvector): Update.
5265
5266 2018-07-16  Tom Tromey  <tom@tromey.com>
5267
5268         * buildsym.c (struct buildsym_compunit): Add constructor,
5269         destructor, initializers.
5270         (start_buildsym_compunit): Remove.
5271         (free_buildsym_compunit): Use "delete".
5272         (start_symtab, restart_symtab): Use "new".
5273
5274 2018-07-13  Simon Marchi  <simon.marchi@polymtl.ca>
5275
5276         * symfile.c (set_objfile_default_section_offset): Remove struct
5277         keyword.
5278
5279 2018-07-14  Stafford Horne  <shorne@gmail.com>
5280
5281         * (Responsible Maintainers): Add myself as or1k maintainer.
5282
5283 2018-07-13  Tom Tromey  <tom@tromey.com>
5284
5285         * symfile.c (set_objfile_default_section_offset): Use extra braces
5286         around initializer.
5287
5288 2018-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5289
5290         * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
5291         non-branching basr.
5292
5293 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5294
5295         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5296         unittests/cli-utils-selftests.c
5297         * unittests/cli-utils-selftests.c: New file.
5298
5299 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5300
5301         * NEWS: Mention new commands. Mention change to 'thread apply'.
5302
5303 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5304
5305         * thread.c (thr_try_catch_cmd): New function.
5306         (thread_apply_all_command): Handle qcs flags.
5307         (thread_apply_command): Handle qcs flags.
5308         (taas_command): New function.
5309         (tfaas_command): New function.
5310         (_initialize_thread): Update to setup the new commands 'taas
5311         and 'tfaas'. Change doc string for 'thread apply'.
5312
5313 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5314
5315         * stack.c: (trailing_outermost_frame): New function, mostly
5316         extracted from backtrace_command_1.
5317         (leading_innermost_frame): New function.
5318         (backtrace_command_1): Update to call trailing_outermost_frame.
5319         (frame_apply_command_count): New function.
5320         (frame_apply_level_command): New function.
5321         (frame_apply_all_command): New function.
5322         (frame_apply_command): New function.
5323         (faas_command): New function.
5324         (frame_cmd_list): New variable.
5325         (_initialize_stack): Update to setup the new commands 'frame apply'
5326         and 'faas'.
5327
5328 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5329
5330         * cli-utils.c (number_or_range_parser::get_number): Only handle
5331         numbers or convenience var as numbers.
5332         (parse_flags): New function.
5333         (parse_flags_qcs): New function.
5334         (number_or_range_parser::finished): Ensure parsing end is detected
5335         before end of string.
5336         * cli-utils.h (parse_flags): New function.
5337         (parse_flags_qcs): New function.
5338         (number_or_range_parser): Remove m_finished bool.
5339         (number_or_range_parser::skip_range): Set m_in_range to false.
5340
5341 2018-07-12  Sergio Durigan Junior  <sergiodj@redhat.com>
5342
5343         * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
5344         on Windows.
5345
5346 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
5347             Jan Kratochvil  <jan.kratochvil@redhat.com>
5348             Paul Fertser  <fercerpav@gmail.com>
5349             Tsutomu Seki  <sekiriki@gmail.com>
5350             Pedro Alves  <palves@redhat.com>
5351
5352         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5353         'unittests/parse-connection-spec-selftests.c'.
5354         (COMMON_SFILES): Add 'common/netstuff.c'.
5355         (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
5356         * NEWS (Changes since GDB 8.2): Mention IPv6 support.
5357         * common/netstuff.c: New file.
5358         * common/netstuff.h: New file.
5359         * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
5360         (wait_for_connect): Update comment.  New parameter
5361         'gdb::optional<int> sock' instead of 'struct serial *scb'.
5362         Use 'sock' directly instead of 'scb->fd'.
5363         (try_connect): New function, with code from 'net_open'.
5364         (net_open): Rewrite main loop to deal with multiple
5365         sockets/addresses.  Handle IPv6-style hostnames; implement
5366         support for IPv6 connections.
5367         * unittests/parse-connection-spec-selftests.c: New file.
5368
5369 2018-07-11  Pedro Alves  <palves@redhat.com>
5370
5371         PR gdb/23377
5372         * remote.c (remote_target::remote_detach_pid): Call
5373         set_current_process.
5374
5375 2018-07-11  Pedro Alves  <palves@redhat.com>
5376
5377         * h8300-tdep.c (h8300_gdbarch_init): Remove
5378         set_gdbarch_ecoff_reg_to_regnum calls.
5379
5380 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
5381
5382         PR c++/23373
5383         * c-typeprint.c (c_type_print_base_struct_union): Don't print
5384         offsets/sizes for static members of a class/struct.
5385
5386 2018-07-11  Alan Hayward  <alan.hayward@arm.com>
5387
5388         * target-descriptions.c (tdesc_register_bitsize): Rename.
5389         * target-descriptions.h (tdesc_register_bitsize): Likewise.
5390         * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
5391         * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
5392
5393 2018-07-10  Tom Tromey  <tom@tromey.com>
5394
5395         * breakpoint.c (moribund_locations): Now static and a
5396         std::vector.
5397         (breakpoint_init_inferior, moribund_breakpoint_here_p)
5398         (build_bpstat_chain, update_global_location_list)
5399         (breakpoint_retire_moribund): Update.
5400         * breakpoint.h (bp_location_p): Remove typedef.  Don't declare
5401         VEC.
5402
5403 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
5404
5405         * riscv-tdep.c (riscv_is_fp_regno_p): New function.
5406         (riscv_register_reggroup_p): Use new function, remove unneeded
5407         parenthesis.
5408         (riscv_push_dummy_call): Extend assert to compare against xlen or
5409         flen based on register type.
5410
5411 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
5412
5413         * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
5414
5415 2018-07-09  Andrew Burgess  <andrew.burgess@embecosm.com>
5416
5417         * remote.c (show_hardware_watchpoint_limit): New function.
5418         (show_hardware_watchpoint_length_limit): New function.
5419         (show_hardware_breakpoint_limit): New function.
5420         (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
5421         where appropriate, update help text.
5422
5423 2018-07-09  Tom Tromey  <tom@tromey.com>
5424
5425         * Makefile.in (CDEPS): Don't mention XM_CDEPS.
5426         (CLIBS): Don't mention NAT_CLIBS.
5427
5428 2018-07-09  Tom Tromey  <tom@tromey.com>
5429
5430         * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
5431         (LIBGDB_OBS, clean mostlyclean): Update.
5432         (gdb$(EXEEXT), insight$(EXEEXT)): Update.
5433
5434 2018-07-09  Tom Tromey  <tom@tromey.com>
5435
5436         * Makefile.in (%.c: %.y): Use ECHO_YACC.
5437         (%.c: %.l): Use ECHO_LEX.  Just fail if flex not available.
5438         * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
5439
5440 2018-07-09  Tom Tromey  <tom@tromey.com>
5441
5442         * Makefile.in (ALLDEPFILES): Remove exec.c.
5443         (COMMON_OBS): Remove exec.o.
5444         (COMMON_SFILES): Add exec.c.
5445
5446 2018-07-09  Tom Tromey  <tom@tromey.com>
5447
5448         * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
5449
5450 2018-07-09  Tom Tromey  <tom@tromey.com>
5451
5452         * Makefile.in (clean mostlyclean): Remove stamp-version.
5453         (version.c): Depend on stamp-version.
5454         (stamp-version): New rule, from version.c rule.
5455
5456 2018-07-09  Tom Tromey  <tom@tromey.com>
5457
5458         * Makefile.in (init.c): Depend on stamp-init.
5459         (stamp-init): New rule, from init.c rule.
5460         (clean mostlyclean): Remove stamp-init.
5461
5462 2018-07-09  Tom Tromey  <tom@tromey.com>
5463
5464         * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
5465         SUBDIR_GCC_COMPILE_SRCS.
5466
5467 2018-07-09  Tom Tromey  <tom@tromey.com>
5468
5469         * Makefile.in (init.c): Remove some unused sed rules.
5470
5471 2018-07-09  Tom Tromey  <tom@tromey.com>
5472
5473         * Makefile.in (TSOBS): Remove.
5474         (INIT_FILES): Update.
5475         (LIBGDB_OBS): Update.
5476         (COMMON_SFILES): Add inflow.c.
5477         (SFILES): Remove inflow.c.
5478
5479 2018-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
5480
5481         * contrib/gdb-add-index.sh ($dwarf5): New, use it.
5482
5483 2018-07-07  Simon Marchi  <simon.marchi@polymtl.ca>
5484
5485         * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
5486         get_saveloc_name, is_signal_frame_name, step_name,
5487         init_remote_name, create_addr_space_name,
5488         destroy_addr_space_name, search_unwind_table_name,
5489         find_dyn_list_name): Constify.
5490
5491 2018-07-05  Simon Marchi  <simon.marchi@polymtl.ca>
5492
5493         * darwin-nat.c (darwin_pthread_kill): New function.
5494         (darwin_resume_thread): Use darwin_pthread_kill.
5495
5496 2018-07-05  Tom de Vries  <tdevries@suse.de>
5497
5498         * macroexp.c (macro_buffer) <operator=>: New member function.
5499
5500 2018-07-04  Tom Tromey  <tom@tromey.com>
5501
5502         * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
5503
5504 2018-07-04  Simon Marchi  <simon.marchi@polymtl.ca>
5505
5506         * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
5507         * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
5508         * maint.c: Likewise.
5509         * top.c: Likewise.
5510
5511 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
5512
5513         * NEWS: Create a new section for the next release branch.
5514         Rename the section of the current branch, now that it has
5515         been cut.
5516
5517 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
5518
5519         GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
5520         * version.in: Bump version to 8.2.50.DATE-git.
5521
5522 2018-07-04  Vyacheslav Barinov  <v.barinov@samsung.com>
5523             Pedro Alves  <palves@redhat.com>
5524
5525         * linux-nat.c (linux_init_ptrace): Rename to ...
5526         (linux_init_ptrace_procfs): ... this.  Call
5527         linux_proc_init_warnings.
5528         (linux_nat_target::post_attach)
5529         (linux_nat_target::post_startup_inferior): Adjust.
5530         * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
5531         * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
5532
5533 2018-07-04  Tom de Vries  <tdevries@suse.de>
5534
5535         * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
5536         check ...
5537         (read_comp_unit_head): ... here.
5538
5539 2018-07-03  Tom Tromey  <tom@tromey.com>
5540
5541         * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
5542         (stop_tracing, tstatus_command)
5543         (find_matching_tracepoint_location, merge_uploaded_tracepoints)
5544         (print_one_static_tracepoint_marker): Update.
5545         * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
5546         std::vector.
5547         * breakpoint.h (breakpoint_p): Remove typedef.  Don't declare
5548         VEC.
5549         (all_tracepoints, static_tracepoints_here): Return std::vector.
5550
5551 2018-07-03  Tom Tromey  <tom@tromey.com>
5552
5553         * common/ptid.c (ptid_equal): Remove.
5554         * common/ptid.h (ptid_equal): Don't declare.
5555         * ada-tasks.c: Update.
5556         * breakpoint.c: Update.
5557         * common/agent.c: Update.
5558         * corelow.c: Update.
5559         * darwin-nat-info.c: Update.
5560         * darwin-nat.c: Update.
5561         * dcache.c: Update.
5562         * dtrace-probe.c: Update.
5563         * dummy-frame.c: Update.
5564         * fbsd-nat.c: Update.
5565         * frame.c: Update.
5566         * gdbthread.h: Update.
5567         * gnu-nat.c: Update.
5568         * go32-nat.c: Update.
5569         * inf-loop.c: Update.
5570         * inf-ptrace.c: Update.
5571         * infcall.c: Update.
5572         * infcmd.c: Update.
5573         * inflow.c: Update.
5574         * infrun.c: Update.
5575         * linux-fork.c: Update.
5576         * linux-nat.c: Update.
5577         * linux-thread-db.c: Update.
5578         * mi/mi-cmd-var.c: Update.
5579         * mi/mi-interp.c: Update.
5580         * mi/mi-main.c: Update.
5581         * nto-procfs.c: Update.
5582         * ppc-linux-tdep.c: Update.
5583         * procfs.c: Update.
5584         * python/py-inferior.c: Update.
5585         * python/py-record-btrace.c: Update.
5586         * python/py-record.c: Update.
5587         * ravenscar-thread.c: Update.
5588         * regcache.c: Update.
5589         * remote-sim.c: Update.
5590         * remote.c: Update.
5591         * sol-thread.c: Update.
5592         * solib.c: Update.
5593         * target.c: Update.
5594         * tui/tui-stack.c: Update.
5595         * varobj.c: Update.
5596         * windows-nat.c: Update.
5597         * windows-tdep.c: Update.
5598
5599 2018-07-03  Tom Tromey  <tom@tromey.com>
5600
5601         * common/ptid.c (ptid_match): Remove.
5602         * common/ptid.h (ptid_match): Don't declare.
5603         * fbsd-nat.c: Update.
5604         * infcmd.c: Update.
5605         * infrun.c: Update.
5606         * linux-nat.c: Update.
5607         * record-btrace.c: Update.
5608         * regcache.c: Update.
5609         * remote.c: Update.
5610
5611 2018-07-03  Tom Tromey  <tom@tromey.com>
5612
5613         * common/ptid.c (ptid_tid_p): Remove.
5614         * common/ptid.h (ptid_tid_p): Don't declare.
5615         * sol-thread.c: Update.
5616
5617 2018-07-03  Tom Tromey  <tom@tromey.com>
5618
5619         * common/ptid.c (ptid_lwp_p): Remove.
5620         * common/ptid.h (ptid_lwp_p): Don't declare.
5621         * fbsd-nat.c: Update.
5622         * linux-nat.c: Update.
5623         * nat/linux-procfs.c: Update.
5624         * nat/x86-linux-dregs.c: Update.
5625         * sol-thread.c: Update.
5626
5627 2018-07-03  Tom Tromey  <tom@tromey.com>
5628
5629         * common/ptid.c (ptid_is_pid): Remove.
5630         * common/ptid.h (ptid_is_pid): Don't declare.
5631         * infrun.c: Update.
5632         * linux-nat.c: Update.
5633         * mi/mi-interp.c: Update.
5634         * remote.c: Update.
5635         * thread.c: Update.
5636
5637 2018-07-03  Tom Tromey  <tom@tromey.com>
5638
5639         * common/ptid.c (ptid_get_tid): Remove.
5640         * common/ptid.h (ptid_get_tid): Don't declare.
5641         * ada-tasks.c: Update.
5642         * aix-thread.c: Update.
5643         * bsd-uthread.c: Update.
5644         * darwin-nat.c: Update.
5645         * fbsd-nat.c: Update.
5646         * i386-darwin-nat.c: Update.
5647         * infrun.c: Update.
5648         * linux-tdep.c: Update.
5649         * nto-procfs.c: Update.
5650         * ppc-ravenscar-thread.c: Update.
5651         * python/py-infthread.c: Update.
5652         * ravenscar-thread.c: Update.
5653         * sol-thread.c: Update.
5654         * sparc-ravenscar-thread.c: Update.
5655         * windows-nat.c: Update.
5656
5657 2018-07-03  Tom Tromey  <tom@tromey.com>
5658
5659         * common/ptid.c (ptid_get_lwp): Remove.
5660         * common/ptid.h (ptid_get_lwp): Don't declare.
5661         * aarch64-linux-nat.c: Update.
5662         * ada-tasks.c: Update.
5663         * aix-thread.c: Update.
5664         * amd64-linux-nat.c: Update.
5665         * arm-linux-nat.c: Update.
5666         * corelow.c: Update.
5667         * fbsd-nat.c: Update.
5668         * fbsd-tdep.c: Update.
5669         * gnu-nat.c: Update.
5670         * i386-cygwin-tdep.c: Update.
5671         * i386-gnu-nat.c: Update.
5672         * i386-linux-nat.c: Update.
5673         * ia64-linux-nat.c: Update.
5674         * inf-ptrace.c: Update.
5675         * infrun.c: Update.
5676         * linux-fork.c: Update.
5677         * linux-nat.c: Update.
5678         * linux-tdep.c: Update.
5679         * linux-thread-db.c: Update.
5680         * mips-linux-nat.c: Update.
5681         * nat/aarch64-linux-hw-point.c: Update.
5682         * nat/aarch64-linux.c: Update.
5683         * nat/linux-btrace.c: Update.
5684         * nat/linux-osdata.c: Update.
5685         * nat/linux-procfs.c: Update.
5686         * nat/x86-linux-dregs.c: Update.
5687         * obsd-nat.c: Update.
5688         * ppc-fbsd-nat.c: Update.
5689         * ppc-linux-nat.c: Update.
5690         * procfs.c: Update.
5691         * python/py-infthread.c: Update.
5692         * ravenscar-thread.c: Update.
5693         * remote.c: Update.
5694         * s390-linux-nat.c: Update.
5695         * sol-thread.c: Update.
5696         * sol2-tdep.c: Update.
5697         * spu-linux-nat.c: Update.
5698         * x86-linux-nat.c: Update.
5699         * xtensa-linux-nat.c: Update.
5700
5701 2018-07-03  Tom Tromey  <tom@tromey.com>
5702
5703         * common/ptid.c (ptid_get_pid): Remove.
5704         * common/ptid.h (ptid_get_pid): Don't declare.
5705         * aarch64-linux-nat.c: Update.
5706         * ada-lang.c: Update.
5707         * aix-thread.c: Update.
5708         * alpha-bsd-nat.c: Update.
5709         * amd64-fbsd-nat.c: Update.
5710         * amd64-linux-nat.c: Update.
5711         * arm-linux-nat.c: Update.
5712         * arm-nbsd-nat.c: Update.
5713         * auxv.c: Update.
5714         * break-catch-syscall.c: Update.
5715         * breakpoint.c: Update.
5716         * bsd-uthread.c: Update.
5717         * corelow.c: Update.
5718         * ctf.c: Update.
5719         * darwin-nat.c: Update.
5720         * fbsd-nat.c: Update.
5721         * fbsd-tdep.c: Update.
5722         * gcore.c: Update.
5723         * gnu-nat.c: Update.
5724         * hppa-nbsd-nat.c: Update.
5725         * hppa-obsd-nat.c: Update.
5726         * i386-fbsd-nat.c: Update.
5727         * ia64-linux-nat.c: Update.
5728         * inf-ptrace.c: Update.
5729         * infcmd.c: Update.
5730         * inferior.c: Update.
5731         * inferior.h: Update.
5732         * inflow.c: Update.
5733         * infrun.c: Update.
5734         * linux-fork.c: Update.
5735         * linux-nat.c: Update.
5736         * linux-tdep.c: Update.
5737         * linux-thread-db.c: Update.
5738         * m68k-bsd-nat.c: Update.
5739         * mi/mi-interp.c: Update.
5740         * mi/mi-main.c: Update.
5741         * mips-linux-nat.c: Update.
5742         * mips-nbsd-nat.c: Update.
5743         * mips64-obsd-nat.c: Update.
5744         * nat/aarch64-linux-hw-point.c: Update.
5745         * nat/aarch64-linux.c: Update.
5746         * nat/linux-btrace.c: Update.
5747         * nat/linux-osdata.c: Update.
5748         * nat/linux-procfs.c: Update.
5749         * nat/x86-linux-dregs.c: Update.
5750         * nto-procfs.c: Update.
5751         * obsd-nat.c: Update.
5752         * ppc-linux-nat.c: Update.
5753         * ppc-nbsd-nat.c: Update.
5754         * ppc-obsd-nat.c: Update.
5755         * proc-service.c: Update.
5756         * procfs.c: Update.
5757         * python/py-inferior.c: Update.
5758         * python/py-infthread.c: Update.
5759         * ravenscar-thread.c: Update.
5760         * record.c: Update.
5761         * remote-sim.c: Update.
5762         * remote.c: Update.
5763         * rs6000-nat.c: Update.
5764         * s390-linux-nat.c: Update.
5765         * sh-nbsd-nat.c: Update.
5766         * sol-thread.c: Update.
5767         * sparc-nat.c: Update.
5768         * sparc64-tdep.c: Update.
5769         * spu-linux-nat.c: Update.
5770         * spu-tdep.c: Update.
5771         * target-debug.h: Update.
5772         * target.c: Update.
5773         * thread.c: Update.
5774         * tid-parse.c: Update.
5775         * tracefile-tfile.c: Update.
5776         * vax-bsd-nat.c: Update.
5777         * windows-nat.c: Update.
5778         * x86-linux-nat.c: Update.
5779         * x86-nat.c: Update.
5780
5781 2018-07-03  Tom Tromey  <tom@tromey.com>
5782
5783         * common/ptid.c (pid_to_ptid): Remove.
5784         * common/ptid.h (pid_to_ptid): Don't declare.
5785         * aix-thread.c: Update.
5786         * arm-linux-nat.c: Update.
5787         * common/ptid.c: Update.
5788         * common/ptid.h: Update.
5789         * corelow.c: Update.
5790         * ctf.c: Update.
5791         * darwin-nat.c: Update.
5792         * fbsd-nat.c: Update.
5793         * fork-child.c: Update.
5794         * gnu-nat.c: Update.
5795         * go32-nat.c: Update.
5796         * inf-ptrace.c: Update.
5797         * infcmd.c: Update.
5798         * inferior.c: Update.
5799         * infrun.c: Update.
5800         * linux-fork.c: Update.
5801         * linux-nat.c: Update.
5802         * nat/aarch64-linux-hw-point.c: Update.
5803         * nat/fork-inferior.c: Update.
5804         * nat/x86-linux-dregs.c: Update.
5805         * nto-procfs.c: Update.
5806         * obsd-nat.c: Update.
5807         * procfs.c: Update.
5808         * progspace.c: Update.
5809         * remote.c: Update.
5810         * rs6000-nat.c: Update.
5811         * s390-linux-nat.c: Update.
5812         * sol-thread.c: Update.
5813         * spu-linux-nat.c: Update.
5814         * target.c: Update.
5815         * top.c: Update.
5816         * tracefile-tfile.c: Update.
5817         * windows-nat.c: Update.
5818
5819 2018-07-03  Tom Tromey  <tom@tromey.com>
5820
5821         * common/ptid.h (ptid_build): Don't declare.
5822         * common/ptid.c (ptid_build): Remove.
5823         * aix-thread.c: Update.
5824         * bsd-kvm.c: Update.
5825         * bsd-uthread.c: Update.
5826         * common/agent.c: Update.
5827         * common/ptid.c: Update.
5828         * common/ptid.h: Update.
5829         * corelow.c: Update.
5830         * darwin-nat.c: Update.
5831         * fbsd-nat.c: Update.
5832         * gnu-nat.c: Update.
5833         * linux-fork.c: Update.
5834         * linux-nat.c: Update.
5835         * linux-thread-db.c: Update.
5836         * nat/linux-osdata.c: Update.
5837         * nat/linux-procfs.c: Update.
5838         * nto-procfs.c: Update.
5839         * obsd-nat.c: Update.
5840         * proc-service.c: Update.
5841         * procfs.c: Update.
5842         * ravenscar-thread.c: Update.
5843         * remote-sim.c: Update.
5844         * remote.c: Update.
5845         * sol-thread.c: Update.
5846         * target.c: Update.
5847         * windows-nat.c: Update.
5848
5849 2018-07-03  Tom Tromey  <tom@tromey.com>
5850
5851         * infrun.c (follow_exec): Use exit_inferior_silent.
5852         * inferior.c (exit_inferior_num_silent): Remove.
5853         * inferior.h (exit_inferior_num_silent): Don't declare.
5854
5855 2018-07-03  Tom Tromey  <tom@tromey.com>
5856
5857         PR cli/23340:
5858         * darwin-nat.c (darwin_attach_pid): Reset inferior and
5859         inferior_ptid on error.
5860
5861 2018-07-02  Maciej W. Rozycki  <macro@mips.com>
5862             Simon Marchi  <simon.marchi@polymtl.ca>
5863
5864         PR tdep/8282
5865         * disasm.h (gdb_disassembler): Add
5866         `m_disassembler_options_holder'. member
5867         * disasm.c (get_all_disassembler_options): New function.
5868         (gdb_disassembler::gdb_disassembler): Use it.
5869         (gdb_buffered_insn_length_init_dis): Likewise.
5870         (gdb_buffered_insn_length): Adjust accordingly.
5871         (set_disassembler_options): Handle options with arguments.
5872         (show_disassembler_options_sfunc): Likewise.  Add a leading new
5873         line if showing options with descriptions.
5874         (disassembler_options_completer): Adapt to using the
5875         `disasm_options_and_args_t' structure.
5876         * mips-tdep.c (mips_disassembler_options): New variable.
5877         (mips_disassembler_options_o32): Likewise.
5878         (mips_disassembler_options_n32): Likewise.
5879         (mips_disassembler_options_n64): Likewise.
5880         (gdb_print_insn_mips): Don't set `disassembler_options'.
5881         (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
5882         functions.
5883         (mips_gdbarch_init): Always set `gdbarch_print_insn' to
5884         `gdb_print_insn_mips'.  Set `gdbarch_disassembler_options',
5885         `gdbarch_disassembler_options_implicit' and
5886         `gdbarch_valid_disassembler_options'.
5887         * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
5888         `disasm_options_and_args_t' structure.
5889         * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
5890         method.
5891         (valid_disassembler_options): Switch from `disasm_options_t' to
5892         the `disasm_options_and_args_t' structure.
5893         * NEWS: Document `set disassembler-options' support for the MIPS
5894         target.
5895         * gdbarch.h: Regenerate.
5896         * gdbarch.c: Regenerate.
5897
5898 2018-07-02  Sebastian Huber  <sebastian.huber@embedded-brains.de>
5899
5900         * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
5901
5902 2018-06-29  Joel Brobecker  <brobecker@adacore.com>
5903
5904         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
5905         parameter in call to amd64_target_description.
5906         * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
5907         * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
5908         (amd64fbsd_init_abi): Likewise.
5909         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
5910         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
5911         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
5912         * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
5913
5914 2018-06-29  Pedro Alves  <palves@redhat.com>
5915
5916         * gdb/amd64-tdep.h (amd64_create_target_description): Add
5917         "segments" parameter.
5918         * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
5919         (_initialize_amd64_tdep): Update call to
5920         amd64_create_target_description.
5921         (amd64_target_description): Add "segments" parameter.  Adjust
5922         the implementation to use it.
5923         * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
5924         call to amd64_create_target_description.
5925         * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
5926         * gdb/arch/amd64.h (amd64_create_target_description): Add
5927         "segments" register.
5928         * gdb/arch/amd64.c (amd64_create_target_description): Add
5929         "segments" parameter.  Call create_feature_i386_64bit_segments
5930         only if SEGMENTS is true.
5931         * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
5932         call to amd64_create_target_description.
5933
5934 2018-06-29  Pedro Alves  <palves@redhat.com>
5935
5936         * thread.c (thread_target_id_str): New, factored out from ...
5937         (print_thread_info_1): ... here.  Use it to compute the max
5938         "Target Id" column width.
5939
5940 2018-06-29  Pedro Alves  <palves@redhat.com>
5941
5942         * remote.c (remote_target::extra_thread_info): Delete
5943         'display_buf' and 'n' locals.  from the cache, regardless of
5944         packet mechanims is in use.  Use cache for qThreadExtra and qP
5945         methods too.
5946
5947 2018-06-29  Pedro Alves  <palves@redhat.com>
5948
5949         * blockframe.c (find_pc_sect_containing_function): New function.
5950         * breakpoint.c (print_breakpoint_location): Don't call
5951         find_pc_sect_function.
5952         * linespec.c (create_sals_line_offset): Record the location's
5953         symbol in the sal.
5954         * linespec.c (convert_address_location_to_sals): Fill in sal's
5955         symbol with find_pc_sect_containing_function.
5956         * symtab.c (find_function_start_sal): Rename to ...
5957         (find_function_start_sal_1): ... this.
5958         (find_function_start_sal): Reimplement as wrapper around
5959         find_function_start_sal_1, and use
5960         find_pc_sect_containing_function to fill in the sal's symbol.
5961         (find_function_start_sal(symbol*, bool)): Adjust.
5962         * symtab.h (find_pc_function, find_pc_sect_function): Adjust
5963         comments.
5964         (find_pc_sect_containing_function): Declare.
5965
5966 2018-06-29  Pedro Alves  <palves@redhat.com>
5967
5968         * inline-frame.c (stopped_by_user_bp_inline_frame): Return
5969         true if the the location has no symbol.
5970
5971 2018-06-28  Tom Tromey  <tom@tromey.com>
5972
5973         * NEWS: Mention --enable-codesign.
5974         * silent-rules.mk (ECHO_SIGN): New variable.
5975         * configure.ac: Add --enable-codesign.
5976         * configure: Rebuild.
5977         * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
5978         (gdb$(EXEEXT)): Optionally invoke codesign.
5979
5980 2018-06-28  Pedro Alves  <palves@redhat.com>
5981
5982         * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
5983         comments.
5984         (switch_to_thread_no_regs): Adjust comment.
5985         * infcmd.c (stop_pc): Delete.
5986         (post_create_inferior, info_program_command): Replace references
5987         to stop_pc with references to thread_info->suspend.stop_pc.
5988         * inferior.h (stop_pc): Delete declaration.
5989         * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
5990         (handle_inferior_event_1, handle_signal_stop)
5991         (process_event_stop_test, keep_going_stepped_thread)
5992         (handle_step_into_function, handle_step_into_function_backward)
5993         (print_stop_location): Replace references to stop_pc with
5994         references to thread_info->suspend.stop_pc.
5995         (struct infcall_suspend_state) <stop_pc>: Delete field.
5996         (save_infcall_suspend_state, restore_infcall_suspend_state):
5997         Remove references to inf_stat->stop_pc.
5998         * linux-fork.c (fork_load_infrun_state): Likewise.
5999         * record-btrace.c (record_btrace_set_replay): Likewise.
6000         * record-full.c (record_full_goto_entry): Likewise.
6001         * remote.c (print_one_stopped_thread): Likewise.
6002         * target.c (target_resume): Extend comment.
6003         * thread.c (set_executing_thread): New.
6004         (set_executing): Use it.
6005         (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
6006         Remove references to stop_pc.
6007
6008 2018-06-28  Pedro Alves  <palves@redhat.com>
6009
6010         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
6011         Moving fetching stop_pc until after ecs->event_thread is refreshed.
6012
6013 2018-06-28  Tom Tromey  <tom@tromey.com>
6014
6015         * coffread.c (coff_symfile_finish): Update.
6016         * xcoffread.c (xcoff_symfile_finish): Update.
6017         * elfread.c (elf_symfile_finish): Update.
6018         * symfile.h (dwarf2_free_objfile): Don't declare.
6019         * dwarf2read.c (_initialize_dwarf2_read): Use
6020         register_objfile_data_with_cleanup.
6021         (dwarf2_free_objfile): Now static.  Change signature.
6022
6023 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
6024
6025         * symfile.c (add_symbol_file_command, _initialize_symfile): Add
6026         option "-o" to add-symbol-file-load to add an offset to each
6027         section's load address.
6028         * symfile.c (set_objfile_default_section_offset): New function.
6029
6030 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
6031
6032         * symfile.c (add_symbol_file_command): Make sure that sections
6033         with the same name are sorted in the same order.
6034
6035 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
6036
6037         * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
6038         require the second argument.  If omitted, load sections at the
6039         addresses specified in the file.
6040
6041 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
6042
6043         * symfile.c (symbol_file_command, symbol_file_add_main_1)
6044         (_initialize_symfile): Add option "-o" to symbol-file to add an
6045         offset to each section of the symbol file.
6046
6047 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
6048
6049         * MAINTAINERS (Write After Approval): Add Petr Tesarik.
6050
6051 2018-06-27  Tom Tromey  <tom@tromey.com>
6052
6053         * stack.c (_initialize_stack): Update "func" help text.
6054
6055 2018-06-27  Tom Tromey  <tom@tromey.com>
6056
6057         * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
6058         std::vector.
6059         (unwind_infopy_str, pyuw_create_unwind_info)
6060         (unwind_infopy_add_saved_register, pyuw_sniffer)
6061         (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
6062         Update.
6063         (struct saved_reg): Add constructor.
6064         <value>: Now a gdbpy_ref<>.
6065
6066 2018-06-27  Tom Tromey  <tom@tromey.com>
6067
6068         * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
6069
6070 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6071
6072         * gdb-gdb.py.in: Format using autopep8.
6073
6074 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6075
6076         * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
6077         (type_lookup_function): Recognize CORE_ADDR values.
6078
6079 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6080
6081         * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
6082         print tag_name.
6083
6084 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6085
6086         * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
6087         <__lt__>: Add.
6088
6089 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6090
6091         * gdb-gdb.py: Move to...
6092         * gdb-gdb.py.in: ... here.
6093         * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
6094         * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
6095         dependencies.
6096         (distclean): Remove gdb-gdb.py when cleaning.
6097         (gdb-gdb.py, gdb-gdb.gdb): New rules.
6098         * configure: Re-generate.
6099
6100 2018-06-27  Pedro Alves  <palves@redhat.com>
6101
6102         * proc-service.c (get_ps_regcache): New.
6103         (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
6104         (ps_lsetfpregs): Use it.
6105
6106 2018-06-27  Omair Javaid  <omair.javaid@linaro.org>
6107
6108         PR gdb/21695
6109         * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
6110         (dwarf_decode_lines_1): Adjust.
6111
6112 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6113
6114         * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
6115         override.
6116         <info_proc>: Likewise.
6117
6118 2018-06-26  Joel Brobecker  <brobecker@adacore.com>
6119
6120         * windows-nat.c (do_windows_fetch_inferior_registers): Rename
6121         to windows_fetch_one_register, and only handle the case of
6122         fetching one register.  Move the code that reloads the context
6123         and iterates over all registers if R is negative to...
6124         (windows_nat_target::fetch_registers): ... here.
6125         (do_windows_store_inferior_registers): Rename to
6126         windows_store_one_register, and only handle the case of storing
6127         one register.  Move the code that handles the case where r is
6128         negative to...
6129         (windows_nat_target::store_registers) ... here.
6130
6131 2018-06-26  Tom Tromey  <tom@tromey.com>
6132
6133         PR rust/22574:
6134         * typeprint.c (whatis_exp): Allow ptype/o for Rust.
6135         * rust-lang.c (rust_print_struct_def): Add podata parameter.
6136         Update.
6137         (rust_internal_print_type): Add podata parameter.
6138         (rust_print_type): Update.
6139
6140 2018-06-26  Tom Tromey  <tom@tromey.com>
6141
6142         * typeprint.h (struct print_offset_data) <update, finish,
6143         maybe_print_hole>: New methods.
6144         <indentation>: New constant.
6145         * typeprint.c (print_offset_data::indentation): Define.
6146         (print_offset_data::maybe_print_hole, print_offset_data::update)
6147         (print_offset_data::finish): Move from c-typeprint.c and rename.
6148         * c-typeprint.c (OFFSET_SPC_LEN): Remove.
6149         (print_spaces_filtered_with_print_options): Update.
6150         (c_print_type_union_field_offset, maybe_print_hole)
6151         (c_print_type_struct_field_offset): Move to typeprint.c and
6152         rename.
6153         (c_type_print_base_struct_union): Update.
6154
6155 2018-06-25  Pedro Alves  <palves@redhat.com>
6156
6157         * gdbthread.h (thread_info_ref, delete_thread)
6158         (delete_thread_silent, first_thread_of_inferior)
6159         (any_thread_of_inferior, switch_to_thread)
6160         (enable_thread_stack_temporaries)
6161         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
6162         (get_last_thread_stack_temporary)
6163         (value_in_thread_stack_temporaries, can_access_registers_thread):
6164         Spell out "struct thread_info" instead of just "thread_info".
6165         * inferior.h (notice_new_inferior): Likewise.
6166
6167 2018-06-25  Pedro Alves  <palves@redhat.com>
6168
6169         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
6170         pass thread_info pointer to delete_thread.
6171         (windows_nat_target::detach): Pass inferior pointer to
6172         detach_inferior.
6173         * aix-thread.c (sync_threadlists): Pass thread_info pointer to
6174         delete_thread.
6175         * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
6176         * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
6177         and pass a thread_info pointer to delete_thread.
6178         * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
6179         pass thread_info pointer to delete_thread.
6180         * go32-nat.c (go32_nat_target::mourn_inferior): Remove
6181         delete_thread_silent call.
6182         * procfs.c (procfs_target::detach): Pass inferior pointer to
6183         detach_inferior.
6184         (procfs_target::wait): Pass thread_info pointer to delete_thread.
6185         * remote-sim.c (gdbsim_target::mourn_inferior): Remove
6186         delete_thread_silent call.
6187         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
6188         pass thread_info pointer to delete_thread.
6189         (windows_nat_target::detach): Pass inferior pointer to
6190         delete_inferior.
6191
6192 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
6193
6194         * regcache.c (readable_regcache::read_part): Fix asserts.
6195         (reg_buffer::raw_collect_part): New function.
6196         (regcache::write_part): Fix asserts.
6197         (reg_buffer::raw_supply_part): New function.
6198         (regcache::transfer_regset_register): New helper function.
6199         (regcache::transfer_regset): Call new functions.
6200         (regcache_supply_regset): Use gdb_byte*.
6201         (regcache::supply_regset): Likewise.
6202         (regcache_collect_regset): Likewise.
6203         (regcache::collect_regset): Likewise.
6204         * regcache.h (reg_buffer::raw_collect_part): New declaration.
6205         (reg_buffer::raw_supply_part): Likewise.
6206         (regcache::transfer_regset_register): Likewise.
6207         (regcache::transfer_regset): Use gdb_byte*.
6208
6209 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
6210
6211         * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
6212
6213 2018-06-21  Pedro Alves  <palves@redhat.com>
6214
6215         * ada-lang.h (ada_get_task_number): Take a thread_info pointer
6216         instead of a ptid_t.  All callers adjusted.
6217         * ada-tasks.c (ada_get_task_number): Likewise.  All callers
6218         adjusted.
6219         (print_ada_task_info, display_current_task_id, task_command_1):
6220         Adjust.
6221         * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
6222         inferior_thread.
6223         (breakpoint_kind): Adjust.
6224         (remove_breakpoints_pid): Rename to ...
6225         (remove_breakpoints_inf): ... this.  Adjust to take an inferior
6226         pointer.  All callers adjusted.
6227         (bpstat_clear_actions): Use inferior_thread.
6228         (get_bpstat_thread): New.
6229         (bpstat_do_actions): Use it.
6230         (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
6231         to take a thread_info pointer.  All callers adjusted.
6232         (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
6233         (breakpoint_re_set_thread): Use inferior_thread.
6234         * breakpoint.h (struct inferior): Forward declare.
6235         (bpstat_stop_status): Update.
6236         (remove_breakpoints_pid): Delete.
6237         (remove_breakpoints_inf): New.
6238         * bsd-uthread.c (bsd_uthread_target::wait)
6239         (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
6240         * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
6241         (maint_btrace_packet_history_cmd)
6242         (maint_btrace_clear_packet_history_cmd): Adjust.
6243         (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
6244         inferior_thread.
6245         * cli/cli-interp.c: Include "inferior.h".
6246         * common/refcounted-object.h (struct
6247         refcounted_object_ref_policy): New.
6248         * compile/compile-object-load.c: Include gdbthread.h.
6249         (store_regs): Use inferior_thread.
6250         * corelow.c (core_target::close): Use current_inferior.
6251         (core_target_open): Adjust to use first_thread_of_inferior and use
6252         the current inferior.
6253         * ctf.c (ctf_target::close): Adjust to use current_inferior.
6254         * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
6255         <thread>: ... this new field.  All references adjusted.
6256         (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
6257         Take a thread_info pointer instead of a ptid_t.
6258         * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
6259         (dummy_frame_discard, register_dummy_frame_dtor): Take a
6260         thread_info pointer instead of a ptid_t.
6261         * elfread.c: Include "inferior.h".
6262         (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
6263         Use inferior_thread.
6264         * eval.c (evaluate_subexp): Likewise.
6265         * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
6266         inferior_thread.
6267         * gdb_proc_service.h (struct thread_info): Forward declare.
6268         (struct ps_prochandle) <ptid>: Delete, replaced by ...
6269         <thread>: ... this new field.  All references adjusted.
6270         * gdbarch.h, gdbarch.c: Regenerate.
6271         * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
6272         'thread' parameter.  All implementations and callers adjusted.
6273         * gdbthread.h (thread_info) <set_running>: New method.
6274         (delete_thread, delete_thread_silent): Take a thread_info pointer
6275         instead of a ptid.
6276         (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
6277         (first_thread_of_process): Delete, replaced by ...
6278         (first_thread_of_inferior): ... this new function.  All callers
6279         adjusted.
6280         (any_live_thread_of_process): Delete, replaced by ...
6281         (any_live_thread_of_inferior): ... this new function.  All callers
6282         adjusted.
6283         (switch_to_thread, switch_to_no_thread): Declare.
6284         (is_executing): Delete.
6285         (enable_thread_stack_temporaries): Update comment.
6286         <enable_thread_stack_temporaries>: Take a thread_info pointer
6287         instead of a ptid_t.  Incref the thread.
6288         <~enable_thread_stack_temporaries>: Decref the thread.
6289         <m_ptid>: Delete
6290         <m_thr>: New.
6291         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
6292         (get_last_thread_stack_temporary)
6293         (value_in_thread_stack_temporaries, can_access_registers_thread):
6294         Take a thread_info pointer instead of a ptid_t.  All callers
6295         adjusted.
6296         * infcall.c (get_call_return_value): Use inferior_thread.
6297         (run_inferior_call): Work with thread pointers instead of ptid_t.
6298         (call_function_by_hand_dummy): Work with thread pointers instead
6299         of ptid_t.  Use thread_info_ref.
6300         * infcmd.c (proceed_thread_callback): Access thread's state
6301         directly.
6302         (ensure_valid_thread, ensure_not_running): Use inferior_thread,
6303         access thread's state directly.
6304         (continue_command): Use inferior_thread.
6305         (info_program_command): Use find_thread_ptid and access thread
6306         state directly.
6307         (proceed_after_attach_callback): Use thread state directly.
6308         (notice_new_inferior): Take a thread_info pointer instead of a
6309         ptid_t.  All callers adjusted.
6310         (exit_inferior): Take an inferior pointer instead of a pid.  All
6311         callers adjusted.
6312         (exit_inferior_silent): New.
6313         (detach_inferior): Delete.
6314         (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
6315         (gdb_inferior_id_to_pid, in_inferior_list): Delete.
6316         (detach_inferior_command, kill_inferior_command): Use
6317         find_inferior_id instead of valid_gdb_inferior_id and
6318         gdb_inferior_id_to_pid.
6319         (inferior_command): Use inferior and thread pointers.
6320         * inferior.h (struct thread_info): Forward declare.
6321         (notice_new_inferior): Take a thread_info pointer instead of a
6322         ptid_t.  All callers adjusted.
6323         (detach_inferior): Delete declaration.
6324         (exit_inferior, exit_inferior_silent): Take an inferior pointer
6325         instead of a pid.  All callers adjusted.
6326         (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
6327         (valid_gdb_inferior_id): Delete.
6328         * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
6329         (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
6330         (struct displaced_step_inferior_state) <pid>: Delete, replaced by
6331         ...
6332         <inf>: ... this new field.
6333         <step_ptid>: Delete, replaced by ...
6334         <step_thread>: ... this new field.
6335         (get_displaced_stepping_state): Take an inferior pointer instead
6336         of a pid.  All callers adjusted.
6337         (displaced_step_in_progress_any_inferior): Adjust.
6338         (displaced_step_in_progress_thread): Take a thread pointer instead
6339         of a ptid_t.  All callers adjusted.
6340         (displaced_step_in_progress, add_displaced_stepping_state): Take
6341         an inferior pointer instead of a pid.  All callers adjusted.
6342         (get_displaced_step_closure_by_addr): Adjust.
6343         (remove_displaced_stepping_state): Take an inferior pointer
6344         instead of a pid.  All callers adjusted.
6345         (displaced_step_prepare_throw, displaced_step_prepare)
6346         (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
6347         All callers adjusted.
6348         (start_step_over): Adjust.
6349         (infrun_thread_ptid_changed): Remove bit updating ptids in the
6350         displaced step queue.
6351         (do_target_resume): Adjust.
6352         (fetch_inferior_event): Use inferior_thread.
6353         (context_switch, get_inferior_stop_soon): Take an
6354         execution_control_state pointer instead of a ptid_t.  All callers
6355         adjusted.
6356         (switch_to_thread_cleanup): Delete.
6357         (stop_all_threads): Use scoped_restore_current_thread.
6358         * inline-frame.c: Include "gdbthread.h".
6359         (inline_state) <inline_state>: Take a thread pointer instead of a
6360         ptid_t.  All callers adjusted.
6361         <ptid>: Delete, replaced by ...
6362         <thread>: ... this new field.
6363         (find_inline_frame_state): Take a thread pointer instead of a
6364         ptid_t.  All callers adjusted.
6365         (skip_inline_frames, step_into_inline_frame)
6366         (inline_skipped_frames, inline_skipped_symbol): Take a thread
6367         pointer instead of a ptid_t.  All callers adjusted.
6368         * inline-frame.h (skip_inline_frames, step_into_inline_frame)
6369         (inline_skipped_frames, inline_skipped_symbol): Likewise.
6370         * linux-fork.c (delete_checkpoint_command): Adjust to use thread
6371         pointers directly.
6372         * linux-nat.c (get_detach_signal): Likewise.
6373         * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
6374         (thread_db_notice_clone): Adjust.
6375         (thread_db_find_new_threads_silently)
6376         (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
6377         a thread pointer instead of a ptid_t.  All callers adjusted.
6378         * mi/mi-cmd-var.c: Include "inferior.h".
6379         (mi_cmd_var_update_iter): Update to use thread pointers.
6380         * mi/mi-interp.c (mi_new_thread): Update to use the thread's
6381         inferior directly.
6382         (mi_output_running_pid, mi_inferior_count): Delete, bits factored
6383         out to ...
6384         (mi_output_running): ... this new function.
6385         (mi_on_resume_1): Adjust to use it.
6386         (mi_user_selected_context_changed): Adjust to use inferior_thread.
6387         * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
6388         directly.
6389         (interrupt_thread_callback): : Adjust to use thread and inferior
6390         pointers.
6391         * proc-service.c: Include "gdbthread.h".
6392         (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
6393         * progspace-and-thread.c: Include "inferior.h".
6394         * progspace.c: Include "inferior.h".
6395         * python/py-exitedevent.c (create_exited_event_object): Adjust to
6396         hold a reference to an inferior_object.
6397         * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
6398         inferior_thread.
6399         * python/py-inferior.c (struct inferior_object): Give the type a
6400         tag name instead of a typedef.
6401         (python_on_normal_stop): No need to check if the current thread is
6402         listed.
6403         (inferior_to_inferior_object): Change return type to
6404         inferior_object.  All callers adjusted.
6405         (find_thread_object): Delete, bits factored out to ...
6406         (thread_to_thread_object): ... this new function.
6407         * python/py-infthread.c (create_thread_object): Use
6408         inferior_to_inferior_object.
6409         (thpy_is_stopped): Use thread pointer directly.
6410         (gdbpy_selected_thread): Use inferior_thread.
6411         * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
6412         field, replaced with ...
6413         <thread>: ... this new field.  All users adjusted.
6414         (btpy_insn_or_gap_new): Drop const.
6415         (btpy_list_new): Take a thread pointer instead of a ptid_t.  All
6416         callers adjusted.
6417         * python/py-record.c: Include "gdbthread.h".
6418         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
6419         a ptid_t.  All callers adjusted.
6420         (gdbpy_current_recording): Use inferior_thread.
6421         * python/py-record.h (recpy_record_object) <ptid>: Delete
6422         field, replaced with ...
6423         <thread>: ... this new field.  All users adjusted.
6424         (recpy_element_object) <ptid>: Delete
6425         field, replaced with ...
6426         <thread>: ... this new field.  All users adjusted.
6427         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
6428         a ptid_t.  All callers adjusted.
6429         * python/py-threadevent.c: Include "gdbthread.h".
6430         (get_event_thread): Use thread_to_thread_object.
6431         * python/python-internal.h (struct inferior_object): Forward
6432         declare.
6433         (find_thread_object, find_inferior_object): Delete declarations.
6434         (thread_to_thread_object, inferior_to_inferior_object): New
6435         declarations.
6436         * record-btrace.c: Include "inferior.h".
6437         (require_btrace_thread): Use inferior_thread.
6438         (record_btrace_frame_sniffer)
6439         (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
6440         (get_thread_current_frame): Use scoped_restore_current_thread and
6441         switch_to_thread.
6442         (get_thread_current_frame): Use thread pointer directly.
6443         (record_btrace_replay_at_breakpoint): Use thread's inferior
6444         pointer directly.
6445         * record-full.c: Include "inferior.h".
6446         * regcache.c: Include "gdbthread.h".
6447         (get_thread_arch_regcache): Use the inferior's address space
6448         directly.
6449         (get_thread_regcache, registers_changed_thread): New.
6450         * regcache.h (get_thread_regcache(thread_info *thread)): New
6451         overload.
6452         (registers_changed_thread): New.
6453         (remote_target) <remote_detach_1>: Swap order of parameters.
6454         (remote_add_thread): <remote_add_thread>: Return the new thread.
6455         (get_remote_thread_info(ptid_t)): New overload.
6456         (remote_target::remote_notice_new_inferior): Use thread pointers
6457         directly.
6458         (remote_target::process_initial_stop_replies): Use
6459         thread_info::set_running.
6460         (remote_target::remote_detach_1, remote_target::detach)
6461         (extended_remote_target::detach): Adjust.
6462         * stack.c (frame_show_address): Use inferior_thread.
6463         * target-debug.h (target_debug_print_thread_info_pp): New.
6464         * target-delegates.c: Regenerate.
6465         * target.c (default_thread_address_space): Delete.
6466         (memory_xfer_partial_1): Use current_inferior.
6467         (target_detach): Use current_inferior.
6468         (target_thread_address_space): Delete.
6469         (generic_mourn_inferior): Use current_inferior.
6470         * target.h (struct target_ops) <thread_address_space>: Delete.
6471         (target_thread_address_space): Delete.
6472         * thread.c (init_thread_list): Use ALL_THREADS_SAFE.  Use thread
6473         pointers directly.
6474         (delete_thread_1, delete_thread, delete_thread_silent): Take a
6475         thread pointer instead of a ptid_t.  Adjust all callers.
6476         (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
6477         (first_thread_of_process): Delete, replaced by ...
6478         (first_thread_of_inferior): ... this new function.  All callers
6479         adjusted.
6480         (any_thread_of_process): Rename to ...
6481         (any_thread_of_inferior): ... this, and take an inferior pointer.
6482         (any_live_thread_of_process): Rename to ...
6483         (any_live_thread_of_inferior): ... this, and take an inferior
6484         pointer.
6485         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
6486         (value_in_thread_stack_temporaries)
6487         (get_last_thread_stack_temporary): Take a thread pointer instead
6488         of a ptid_t.  Adjust all callers.
6489         (thread_info::set_running): New.
6490         (validate_registers_access): Use inferior_thread.
6491         (can_access_registers_ptid): Rename to ...
6492         (can_access_registers_thread): ... this, and take a thread
6493         pointer.
6494         (print_thread_info_1): Adjust to compare thread pointers instead
6495         of ptids.
6496         (switch_to_no_thread, switch_to_thread): Make extern.
6497         (scoped_restore_current_thread::~scoped_restore_current_thread):
6498         Use m_thread pointer directly.
6499         (scoped_restore_current_thread::scoped_restore_current_thread):
6500         Use inferior_thread.
6501         (thread_command): Use thread pointer directly.
6502         (thread_num_make_value_helper): Use inferior_thread.
6503         * top.c (execute_command): Use inferior_thread.
6504         * tui/tui-interp.c: Include "inferior.h".
6505         * varobj.c (varobj_create): Use inferior_thread.
6506         (value_of_root_1): Use find_thread_global_id instead of
6507         global_thread_id_to_ptid.
6508
6509 2018-06-21  Alan Hayward  <alan.hayward@arm.com>
6510
6511         * regcache.c (readable_regcache::read_part): Avoid memcpy when
6512         possible.
6513         (regcache::write_part): Likewise.
6514         (readable_regcache::cooked_read_part): Update comment.
6515         (readable_regcache::cooked_write_part): Likewise.
6516         * regcache.h: (readable_regcache::read_part): Likewise.
6517         (regcache::write_part): Likewise.
6518
6519 2018-06-21  Richard Bunt  <richard.bunt@arm.com>
6520             Dirk Schubert  <dirk.schubert@arm.com>
6521
6522         * aarch64-linux-nat.c (post_attach): New.
6523         (aarch64_linux_nat_target::post_attach): Override post_attach to
6524         record the number of hardware debug registers.
6525
6526 2018-06-20  Tom Tromey  <tom@tromey.com>
6527
6528         * python/py-param.c (add_setshow_generic): Make parameters const.
6529         (parmpy_init): Update.
6530
6531 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
6532
6533         * regcache.h (regcache_cooked_read_ftype): Rename to...
6534         (register_read_ftype): ...this, change type to function_view.
6535         (class reg_buffer) <save>: Remove src parameter.
6536         (readonly_detached_regcache) <readonly_detached_regcache>: Make
6537         parameter non-const in first overload.  Remove src parameter in
6538         second overload.
6539         * regcache.c (do_cooked_read): Remove.
6540         (readonly_detached_regcache::readonly_detached_regcache): Make
6541         parameter non-const, adjust call to other constructor.
6542         (reg_buffer::save): Remove src parameter.
6543         * frame.c (do_frame_register_read): Remove.
6544         (frame_save_as_regcache): Use lambda function.
6545         * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
6546         parameter to ppu2spu_data *.
6547         (ppu2spu_sniffer): Use lambda function.
6548
6549 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
6550
6551         * record-full.c (record_full_target::insert_breakpoint): Remove
6552         "struct" keyword, add const.
6553
6554 2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>
6555
6556         * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
6557         PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
6558         * configure.ac: Remove AC_PREREQ, add missing quoting.
6559         * gnulib/configure.ac: Modernize usage of
6560         AC_INIT/AM_INIT_AUTOMAKE.  Remove AC_PREREQ.
6561         * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
6562         (AUTOMAKE_VERSION): Bump to 1.15.1.
6563         * configure: Re-generate.
6564         * config.in: Re-generate.
6565         * aclocal.m4: Re-generate.
6566         * gnulib/aclocal.m4: Re-generate.
6567         * gnulib/config.in: Re-generate.
6568         * gnulib/configure: Re-generate.
6569         * gnulib/import/Makefile.in: Re-generate.
6570
6571 2018-06-19  Pedro Alves  <palves@redhat.com>
6572
6573         * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
6574         (lookup_minimal_symbol_by_pc_section): ... here with
6575         gdb_assert_not_reached added.
6576
6577 2018-06-19  Pedro Alves  <palves@redhat.com>
6578
6579         * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
6580         parameter with a block parameter.  Compare location's block symbol
6581         with the frame's block instead of addresses.
6582         (skip_inline_frames): Pass the current block instead of the
6583         frame's address.  Break out as soon as we determine the frame
6584         should not be skipped.
6585
6586 2018-06-18  Tom Tromey  <tom@tromey.com>
6587
6588         * solib-aix.c (solib_aix_get_section_offsets): Return
6589         unique_xmalloc_ptr.
6590         (solib_aix_solib_create_inferior_hook): Update.
6591
6592 2018-06-18  Tom Tromey  <tom@tromey.com>
6593
6594         * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
6595
6596 2018-06-18  Tom Tromey  <tom@tromey.com>
6597
6598         * solib-frv.c (frv_relocate_main_executable): Use
6599         unique_xmalloc_ptr.
6600         * solib-dsbt.c (dsbt_relocate_main_executable): Use
6601         unique_xmalloc_ptr.
6602
6603 2018-06-18  Tom Tromey  <tom@tromey.com>
6604
6605         * objfiles.h (inhibit_section_map_updates): Update.
6606         (resume_section_map_updates, resume_section_map_updates_cleanup):
6607         Remove.
6608         * solib-svr4.c (svr4_handle_solib_event): Update.
6609         * objfiles.c (inhibit_section_map_updates): Return
6610         scoped_restore_tmpl<int>.
6611         (resume_section_map_updates, resume_section_map_updates_cleanup):
6612         Remove.
6613
6614 2018-06-18  Tom Tromey  <tom@tromey.com>
6615
6616         * valprint.h (read_string): Update.
6617         * valprint.c (read_string): Change type of "buffer".
6618         (val_print_string): Update.
6619         * python/py-value.c (valpy_string): Update.
6620         * language.h (struct language_defn) <la_get_string>: Change
6621         type of "buffer".
6622         (default_get_string, c_get_string): Update.
6623         * language.c (default_get_string): Change type of "buffer".
6624         * guile/scm-value.c (gdbscm_value_to_string): Update.
6625         * c-lang.c (c_get_string): Change type of "buffer".
6626
6627 2018-06-18  Tom Tromey  <tom@tromey.com>
6628
6629         * ser-mingw.c (struct pipe_state_destroyer): New.
6630         (pipe_state_up): New typedef.
6631         (cleanup_pipe_state): Remove.
6632         (pipe_windows_open): Use pipe_state_up.  Don't release argv.
6633
6634 2018-06-18  Tom Tromey  <tom@tromey.com>
6635
6636         * rust-lang.h (rust_yyerror): Don't declare.
6637         * rust-lang.c (rust_language_defn): Update.
6638         * rust-exp.y (yyerror): Now static.
6639         * parse.c (parse_exp_in_context_1): Update.
6640         * p-lang.h (p_yyerror): Don't declare.
6641         * p-lang.c (p_language_defn): Update.
6642         * p-exp.y (yyerror): Now static.
6643         * opencl-lang.c (opencl_language_defn): Update.
6644         * objc-lang.c (objc_language_defn): Update.
6645         * m2-lang.h (m2_yyerror): Don't declare.
6646         * m2-lang.c (m2_language_defn): Update.
6647         * m2-exp.y (yyerror): Now static.
6648         * language.h (struct language_defn) <la_error>: Remove.
6649         * language.c (unk_lang_error): Remove.
6650         (unknown_language_defn, auto_language_defn): Remove.
6651         * go-lang.h (go_yyerror): Don't declare.
6652         * go-lang.c (go_language_defn): Update.
6653         * go-exp.y (yyerror): Now static.
6654         * f-lang.h (f_yyerror): Don't declare.
6655         * f-lang.c (f_language_defn): Update.
6656         * f-exp.y (yyerror): Now static.
6657         * d-lang.h (d_yyerror): Don't declare.
6658         * d-lang.c (d_language_defn): Update.
6659         * d-exp.y (yyerror): Now static.
6660         * c-lang.h (c_yyerror): Don't declare.
6661         * c-lang.c (c_language_defn, cplus_language_defn)
6662         (asm_language_defn, minimal_language_defn): Update.
6663         * c-exp.y (yyerror): Now static.
6664         * ada-lang.h (ada_yyerror): Don't declare.
6665         * ada-lang.c (ada_language_defn): Update.
6666         * ada-exp.y (yyerror): Now static.
6667
6668 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
6669
6670         * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
6671         (store_sveregs_to_thread): Likewise.
6672         (aarch64_linux_fetch_inferior_registers): Check for SVE.
6673         (aarch64_linux_store_inferior_registers): Likewise.
6674         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
6675         function.
6676         (aarch64_sve_regs_copy_to_regcache): Likewise.
6677         (aarch64_sve_regs_copy_from_regcache): Likewise.
6678         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
6679         declaration.
6680         (aarch64_sve_regs_copy_to_regcache): Likewise.
6681         (aarch64_sve_regs_copy_from_regcache): Likewise.
6682         (sve_context): Structure from Linux headers.
6683         (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
6684         (SVE_SIG_ZREG_SIZE): Likewise.
6685         (SVE_SIG_PREG_SIZE): Likewise.
6686         (SVE_SIG_FFR_SIZE): Likewise.
6687         (SVE_SIG_REGS_OFFSET): Likewise.
6688         (SVE_SIG_ZREGS_OFFSET): Likewise.
6689         (SVE_SIG_ZREG_OFFSET): Likewise.
6690         (SVE_SIG_ZREGS_SIZE): Likewise.
6691         (SVE_SIG_PREGS_OFFSET): Likewise.
6692         (SVE_SIG_PREG_OFFSET): Likewise.
6693         (SVE_SIG_PREGS_SIZE): Likewise.
6694         (SVE_SIG_FFR_OFFSET): Likewise.
6695         (SVE_SIG_REGS_SIZE): Likewise.
6696         (SVE_SIG_CONTEXT_SIZE): Likewise.
6697         (SVE_PT_REGS_MASK): Likewise.
6698         (SVE_PT_REGS_FPSIMD): Likewise.
6699         (SVE_PT_REGS_SVE): Likewise.
6700         (SVE_PT_VL_INHERIT): Likewise.
6701         (SVE_PT_VL_ONEXEC): Likewise.
6702         (SVE_PT_REGS_OFFSET): Likewise.
6703         (SVE_PT_FPSIMD_OFFSET): Likewise.
6704         (SVE_PT_FPSIMD_SIZE): Likewise.
6705         (SVE_PT_SVE_ZREG_SIZE): Likewise.
6706         (SVE_PT_SVE_PREG_SIZE): Likewise.
6707         (SVE_PT_SVE_FFR_SIZE): Likewise.
6708         (SVE_PT_SVE_FPSR_SIZE): Likewise.
6709         (SVE_PT_SVE_FPCR_SIZE): Likewise.
6710         (__SVE_SIG_TO_PT): Likewise.
6711         (SVE_PT_SVE_OFFSET): Likewise.
6712         (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
6713         (SVE_PT_SVE_ZREG_OFFSET): Likewise.
6714         (SVE_PT_SVE_ZREGS_SIZE): Likewise.
6715         (SVE_PT_SVE_PREGS_OFFSET): Likewise.
6716         (SVE_PT_SVE_PREG_OFFSET): Likewise.
6717         (SVE_PT_SVE_PREGS_SIZE): Likewise.
6718         (SVE_PT_SVE_FFR_OFFSET): Likewise.
6719         (SVE_PT_SVE_FPSR_OFFSET): Likewise.
6720         (SVE_PT_SVE_FPCR_OFFSET): Likewise.
6721         (SVE_PT_SVE_SIZE): Likewise.
6722         (SVE_PT_SIZE): Likewise.
6723         (HAS_SVE_STATE): New define.
6724
6725 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
6726
6727         * nat/aarch64-sve-linux-sigcontext.h: New file.
6728         * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
6729         new files.
6730         (SVE_VQ_MIN): Likewise.
6731         (SVE_VQ_MAX): Likewise.
6732         (SVE_VL_MIN): Likewise.
6733         (SVE_VL_MAX): Likewise.
6734         (SVE_NUM_ZREGS): Likewise.
6735         (SVE_NUM_PREGS): Likewise.
6736         (sve_vl_valid): Likewise.
6737         (struct user_sve_header): Likewise.
6738
6739 2018-06-16  Andrew Burgess  <andrew.burgess@embecosm.com>
6740             Richard Bunt <Richard.Bunt@arm.com>
6741
6742         * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
6743         was requested by GDB.
6744
6745 2018-06-15  Tom de Vries  <tdevries@suse.de>
6746
6747         * MAINTAINERS (Write After Approval): Add Tom de Vries.
6748
6749 2018-06-14  Simon Marchi  <simon.marchi@polymtl.ca>
6750
6751         * gnulib/update-gnulib.sh: Print expected versions of
6752         autoconf/aclocal.
6753
6754 2018-06-14  Simon Marchi  <simon.marchi@ericsson.com>
6755
6756         * arch-utils.c (default_type_align): Use type_length_units.
6757         * gdbtypes.c (type_align): Use type_length_units.
6758
6759 2018-06-14  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6760
6761         * cli/cli-script.c (_initialize_cli_script): Fix online documentation
6762         of 'define' command.
6763
6764 2018-06-14  Tom de Vries  <tdevries@suse.de>
6765
6766         PR cli/22573
6767         * infcmd.c (print_return_value_1): Use get_user_print_options instead of
6768         get_no_prettyformat_print_options.
6769
6770 2018-06-13  Simon Marchi  <simon.marchi@ericsson.com>
6771
6772         * sparc-nat.h: Include target.h.
6773         * sparc64-linux-nat.c (class sparc64_linux_nat_target)
6774         <fetch_registers>: Remove this argument in function call.
6775         <store_registers>: Remove this argument in function call, remove
6776         extra semicolon.
6777         <low_forget_process>: Call sparc64_forget_process instead of
6778         sparc_forget_process.
6779
6780 2018-06-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
6781
6782         * procfs.c (_initialize_procfs): Use add_inf_child_target.
6783         (procfs_target::make_corefile_notes): Adjust to new
6784         target_read_alloc return type.
6785
6786 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
6787             Stephen Roberts  <stephen.roberts@arm.com>
6788
6789         PR gdb/22882
6790         * infrun.c (fetch_inferior_event): If GDB is not proceeding then
6791         run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
6792         Move should_notify_stop local into more inner scope.
6793
6794 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
6795             Stephen Roberts  <stephen.roberts@arm.com>
6796
6797         PR gdb/22882
6798         * infrun.c (resume_1): Add call to mark_async_event_handler.
6799
6800 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
6801
6802         * infrun.c (do_target_wait): Change old version of $pc printed.
6803
6804 2018-06-11  Simon Marchi  <simon.marchi@ericsson.com>
6805
6806         * dwarf2read.c (read_index_from_section): Rename to...
6807         (read_gdb_index_from_section): ... this, update all callers.
6808         (dwarf2_read_index): Rename to...
6809         (dwarf2_read_gdb_index): ... this, update all callers.
6810
6811 2018-06-11  John David Anglin  <danglin@gcc.gnu.org>
6812
6813         * gdb/hppa-linux-nat.c
6814         (hppa_linux_nat_target::fetch_inferior_registers): Rename to
6815         hppa_linux_nat_target::fetch_registers.
6816
6817 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
6818
6819         * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
6820         * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
6821         (AARCH64_DWARF_SVE_FFR): Likewise.
6822         (AARCH64_DWARF_SVE_P0): Likewise.
6823         (AARCH64_DWARF_SVE_Z0): Likewise.
6824
6825 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
6826
6827         * common/common-regcache.h (raw_compare): New function.
6828         * regcache.c (regcache::raw_compare): Likewise.
6829         * regcache.h (regcache::raw_compare): New declaration.
6830
6831 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
6832
6833         * common/common-regcache.h (reg_buffer_common): New structure.
6834         * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
6835         (reg_buffer::raw_supply): Likewise.
6836         (reg_buffer::raw_supply_integer): Likewise.
6837         (reg_buffer::raw_supply_zeroed): Likewise.
6838         (reg_buffer::raw_collect): Likewise.
6839         (reg_buffer::raw_collect_integer): Likewise.
6840         * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
6841         (reg_buffer::raw_supply): Likewise.
6842         (reg_buffer::raw_supply_integer): Likewise.
6843         (reg_buffer::raw_supply_zeroed): Likewise.
6844         (reg_buffer::raw_collect): Likewise.
6845         (reg_buffer::raw_collect_integer): Likewise.
6846
6847 2018-06-10  Tom Tromey  <tom@tromey.com>
6848
6849         * remote.c (stop_reply_p): Remove typedef.  Don't declare queue.
6850         (class remote_state) <stop_reply_queue>: Now std::vector.
6851         (remote_state::~remote_state)
6852         (remote_target::stop_reply_queue_length): Update.
6853         (struct queue_iter_param, remove_child_of_pending_fork)
6854         (struct check_pending_event_prevents_wildcard_vcont_callback_data)
6855         (check_pending_event_prevents_wildcard_vcont_callback)
6856         (remove_stop_reply_for_inferior)
6857         (remove_stop_reply_of_remote_state)
6858         (remote_notif_remove_once_on_match)
6859         (stop_reply_match_ptid_and_ws)
6860         (remote_kill_child_of_pending_fork): Remove.
6861         (remote_target::remove_new_fork_children)
6862         (remote_target::check_pending_events_prevent_wildcard_vcont)
6863         (remote_target::discard_pending_stop_replies)
6864         (remote_target::discard_pending_stop_replies_in_queue)
6865         (remote_target::remote_notif_remove_queued_reply)
6866         (remote_target::queued_stop_reply)
6867         (remote_target::push_stop_reply, remote_target::peek_stop_reply)
6868         (remote_target::wait, remote_target::kill_new_fork_children)
6869         (remote_target::async): Update.
6870
6871 2018-06-10  Tom Tromey  <tom@tromey.com>
6872
6873         * record-full.c (record_full_arch_list_cleanups): Remove.
6874         (record_full_message): Use try/catch.
6875         (record_full_wait_cleanups): Remove.
6876         (record_full_wait_1): Use try/catch.
6877         (record_full_restore): Likewise.
6878
6879 2018-06-10  Tom Tromey  <tom@tromey.com>
6880
6881         * record-full.c (record_full_breakpoint_p): Remove typedef.  Don't
6882         declare VEC.  Add constructor.
6883         <in_target_beneath>: Now bool.
6884         (record_full_breakpoints): Now a std::vector, static.
6885         (record_full_sync_record_breakpoints)
6886         (record_full_init_record_breakpoints)
6887         (record_full_target::insert_breakpoint)
6888         (record_full_target::remove_breakpoint): Update.  Don't use XNEW.
6889
6890 2018-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
6891
6892         * dwarf2read.c (process_cu_includes): Remove struct keyword.
6893         * serial.c (serial_interface_lookup): Remove struct keyword.
6894
6895 2018-06-10  Tom Tromey  <tom@tromey.com>
6896
6897         * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
6898         method.
6899         * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
6900         a method.
6901         * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
6902         method.
6903         * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
6904         "beneath" as a method.
6905         * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
6906         Use "beneath" as a method.
6907
6908 2018-06-10  Tom Tromey  <tom@tromey.com>
6909
6910         * tracefile.c (struct trace_file_writer_deleter): New.
6911         <operator()>: Rename from trace_file_writer_xfree.
6912         (trace_file_writer_up): New typedef.
6913         (tsave_command, trace_save_tfile, trace_save_ctf): Update.
6914
6915 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
6916
6917         * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
6918         <m_registers, m_register_status>: Change type to
6919         std::unique_ptr.
6920         * regcache.c (reg_buffer::reg_buffer): Use new instead of
6921         XCNEWVEC.
6922
6923 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
6924
6925         * common/common-regcache.h (enum register_status): Add
6926         underlying type "signed char".
6927         * regcache.h (reg_buffer) <m_register_status>: Change type to
6928         register_status *.
6929         * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
6930         register_status instead of signed char.
6931         (reg_buffer::save): Use REG_UNKNOWN instead of 0.
6932         (reg_buffer::get_register_status): Remove cast.
6933         (readable_regcache::raw_read): Remove cast.
6934         (readable_regcache::cooked_read): Remove cast.
6935
6936 2018-06-09  Tom Tromey  <tom@tromey.com>
6937
6938         * source.c (reverse_search_command, forward_search_command): Use
6939         scoped_fd.
6940
6941 2018-06-09  Tom Tromey  <tom@tromey.com>
6942
6943         * serial.c (serial_ops_p): Remove typedef.  Don't declare VEC.
6944         (serial_ops_list): Now static, std::vector.
6945         (serial_interface_lookup, serial_add_interface): Update.
6946
6947 2018-06-09  Tom Tromey  <tom@tromey.com>
6948
6949         * dwarf2read.c (process_cu_includes): Update.
6950         (process_full_comp_unit): Update.
6951         * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
6952         std::vector.
6953
6954 2018-06-08  Paul Koning  <paul_koning@dell.com>
6955
6956         PR gdb/23252
6957
6958         * python/python.c (do_start_initialization):
6959         Avoid call to internal Python API.
6960         (init__gdb_module): New function.
6961
6962 2018-06-08  Gary Benson <gbenson@redhat.com>
6963
6964         * linux-thread-db.c (valprint.h): New include.
6965         (struct check_thread_db_info): New structure.
6966         (check_thread_db_on_load, tdb_testinfo): New static globals.
6967         (check_thread_db, check_thread_db_callback): New functions.
6968         (try_thread_db_load_1): Run integrity checks if requested.
6969         (maintenance_check_libthread_db): New function.
6970         (_initialize_thread_db): Register "maint check libthread-db"
6971         and "maint set/show check-libthread-db".
6972         * NEWS: Mention the above new commands.
6973
6974 2018-06-08  Tom Tromey  <tom@tromey.com>
6975
6976         * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
6977         now a method.
6978
6979 2018-06-08  Tom Tromey  <tom@tromey.com>
6980
6981         * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
6982
6983 2018-06-08  Tom Tromey  <tom@tromey.com>
6984
6985         * common/btrace-common.h (struct btrace_data): Add constructor,
6986         destructor, move assignment operator.
6987         <empty, clear, fini>: New methods.
6988         <format>: Initialize.
6989         (btrace_data_init, btrace_data_fini, btrace_data_clear)
6990         (btrace_data_empty): Don't declare.
6991         * common/btrace-common.c (btrace_data_init): Remove.
6992         (btrace_data::fini): Rename from btrace_data_fini.
6993         (btrace_data::empty): Rename from btrace_data_empty.
6994         (btrace_data::clear): Rename from btrace_data_clear.  Return
6995         bool.
6996         * btrace.h (make_cleanup_btrace_data): Don't declare.
6997         * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
6998         (parse_xml_btrace): Update.
6999         (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
7000         (maint_btrace_clear_packet_history_cmd): Update.
7001
7002 2018-06-07  Pedro Alves  <palves@redhat.com>
7003
7004         * target.h (target_ops) <beneath>: Now a method.  All references
7005         updated.
7006         (class target_stack): New.
7007         * target.c (g_target_stack): New.
7008         (g_current_top_target): Delete.
7009         (current_top_target): Get the top target out of g_target_stack.
7010         (target_stack::push, target_stack::unpush): New.
7011         (push_target, unpush_target): Reimplement.
7012         (target_is_pushed): Reimplement in terms of g_target_stack.
7013         (target_ops::beneath, target_stack::find_beneath): New.
7014
7015 2018-06-07  Pedro Alves  <palves@redhat.com>
7016
7017         * target.h (find_target_beneath): Delete declaration.
7018         * target.c (find_target_beneath): Delete definition.
7019         * aix-thread.c: All callers of find_target_beneath adjusted to
7020         call target_ops::beneath instead.
7021         * bsd-uthread.c: Likewise.
7022         * linux-thread-db.c: Likewise.
7023         * ravenscar-thread.c: Likewise.
7024         * sol-thread.c: Likewise.
7025         * spu-multiarch.c: Likewise.
7026
7027 2018-06-07  Pedro Alves  <palves@redhat.com>
7028
7029         * target.h (target_ops) <beneath>: Now a method.  All references
7030         updated.
7031         (target_ops) <m_beneath>: New.
7032         * target.c (target_ops::beneath): New.
7033         * corelow.c: Adjust all references to target_ops::beneath.
7034         * linux-thread-db.c: Likewise.
7035         * make-target-delegates: Likewise.
7036         * record-btrace.c: Likewise.
7037         * record-full.c: Likewise.
7038         * remote.c: Likewise.
7039         * target.c: Likewise.
7040         * target-delegates.c: Regenerate.
7041
7042 2018-06-07  Pedro Alves  <palves@redhat.com>
7043
7044         * target.h (target_stack): Delete.
7045         (current_top_target): Declare function.
7046         * target.c (target_stack): Delete.
7047         (g_current_top_target): New.
7048         (current_top_target): New function.
7049         * auxv.c: Use current_top_target instead of target_stack
7050         throughout.
7051         * avr-tdep.c: Likewise.
7052         * breakpoint.c: Likewise.
7053         * corefile.c: Likewise.
7054         * elfread.c: Likewise.
7055         * eval.c: Likewise.
7056         * exceptions.c: Likewise.
7057         * frame.c: Likewise.
7058         * gdbarch-selftests.c: Likewise.
7059         * gnu-v3-abi.c: Likewise.
7060         * ia64-tdep.c: Likewise.
7061         * ia64-vms-tdep.c: Likewise.
7062         * infcall.c: Likewise.
7063         * infcmd.c: Likewise.
7064         * infrun.c: Likewise.
7065         * linespec.c: Likewise.
7066         * linux-tdep.c: Likewise.
7067         * minsyms.c: Likewise.
7068         * ppc-linux-nat.c: Likewise.
7069         * ppc-linux-tdep.c: Likewise.
7070         * procfs.c: Likewise.
7071         * regcache.c: Likewise.
7072         * remote.c: Likewise.
7073         * rs6000-tdep.c: Likewise.
7074         * s390-linux-nat.c: Likewise.
7075         * s390-tdep.c: Likewise.
7076         * solib-aix.c: Likewise.
7077         * solib-darwin.c: Likewise.
7078         * solib-dsbt.c: Likewise.
7079         * solib-spu.c: Likewise.
7080         * solib-svr4.c: Likewise.
7081         * solib-target.c: Likewise.
7082         * sparc-tdep.c: Likewise.
7083         * sparc64-tdep.c: Likewise.
7084         * spu-tdep.c: Likewise.
7085         * symfile.c: Likewise.
7086         * symtab.c: Likewise.
7087         * target-descriptions.c: Likewise.
7088         * target-memory.c: Likewise.
7089         * target.c: Likewise.
7090         * target.h: Likewise.
7091         * tracefile-tfile.c: Likewise.
7092         * tracepoint.c: Likewise.
7093         * valops.c: Likewise.
7094         * valprint.c: Likewise.
7095         * value.c: Likewise.
7096         * windows-tdep.c: Likewise.
7097         * mi/mi-main.c: Likewise.
7098
7099 2018-06-07  Tom Tromey  <tom@tromey.com>
7100
7101         * valprint.h (build_address_symbolic): Declare.
7102         * printcmd.c (print_address_symbolic): Update.
7103         (build_address_symbolic): Change "name" and "filename" to
7104         std::string.
7105         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
7106         Update.
7107         * defs.h (build_address_symbolic): Remove declaration.
7108
7109 2018-06-07  Alan Hayward  <alan.hayward@arm.com>
7110
7111         * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
7112         (aarch64_vnv_type): Add function.
7113         (aarch64_pseudo_register_name): Add V regs for SVE.
7114         (aarch64_pseudo_register_type): Likewise.
7115         (aarch64_pseudo_register_reggroup_p): Likewise.
7116         (aarch64_pseudo_read_value_2): Use V0 offset for SVE
7117         (aarch64_pseudo_read_value): Add V regs for SVE.
7118         (aarch64_pseudo_write_2): Use V0 offset for SVE
7119         (aarch64_pseudo_write): Add V regs for SVE.
7120         * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
7121
7122 2018-06-06  Sergio Durigan Junior  <sergiodj@redhat.com>
7123
7124         * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
7125         (sve_vl_from_vq): Likewise.
7126
7127 2018-06-05  Tom Tromey  <tom@tromey.com>
7128
7129         * cli/cli-cmds.c (show_version): Update.
7130         * top.c (print_gdb_version): Add "interactive" parameter.
7131         Update.
7132         * main.c (captured_main_1): Update.
7133         * top.h (print_gdb_version): Add "interactive" parameter and a
7134         comment.
7135
7136 2018-06-05  David Malcolm  <dmalcolm@redhat.com>
7137
7138         * common/enum-flags.h: Add trailing semicolon to example in
7139         comment.
7140
7141 2018-06-05  Tom Tromey  <tom@tromey.com>
7142
7143         PR cli/12326:
7144         * NEWS: Add entry about pager.
7145         * utils.c (pagination_disabled_for_command): New global.
7146         (prompt_for_continue): Allow "c" response to prompt.
7147         (reinitialize_more_filter): Clear
7148         pagination_disabled_for_command.
7149         (fputs_maybe_filtered): Check pagination_disabled_for_command.
7150
7151 2018-06-04  Tom Tromey  <tom@tromey.com>
7152
7153         * ada-lang.h (ada_lookup_symbol_list): Update.
7154         * ada-lang.c (resolve_subexp): Update.
7155         (symbols_are_identical_enums): Change type of syms.  Remove nsyms
7156         parameter.
7157         (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
7158         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
7159         results parameter to std::vector.
7160         (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
7161         Update.
7162         * ada-exp.y (block_lookup): Update.
7163         (select_possible_type_sym): Change type of syms.  Remove nsyms
7164         parameter.
7165         (write_var_or_type, write_name_assoc): Update.
7166
7167 2018-06-04  Joel Brobecker  <brobecker@adacore.com>
7168
7169         * windows-nat.c (windows_nat_target::xfer_partial): Return
7170         TARGET_XFER_E_IO if we need to delegate to the target beneath
7171         but BENEATH is NULL.
7172
7173 2018-06-04  Simon Marchi  <simon.marchi@ericsson.com>
7174
7175         * Makefile.in (config.status): Add configure.nat as a
7176         dependency.
7177
7178 2018-06-04  Tom Tromey  <tom@tromey.com>
7179
7180         * cp-name-parser.y (cpname_state): Add method declarations.
7181         (HANDLE_QUAL): Update.
7182         (cpname_state::d_grab, cpname_state::fill_comp)
7183         (cpname_state::make_operator, cpname_state::make_dtor)
7184         (cpname_state::make_builtin_type, cpname_state::make_name)
7185         (cpname_state::d_qualify, cpname_state::d_int_type)
7186         (cpname_state::d_unary, cpname_state::d_binary): Now methods.
7187         (%union): Move earlier.
7188
7189 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
7190
7191         * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
7192
7193 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
7194
7195         * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
7196         (aarch64_pseudo_write_1): Likewise.
7197         (aarch64_pseudo_read_value): Use helper.
7198         (aarch64_pseudo_write): Likewise.
7199
7200 2018-06-04  Pedro Alves  <palves@redhat.com>
7201
7202         * darwin-nat.c (darwin_ops): Delete.
7203         (darwin_attach_pid): Use get_native_target.
7204
7205 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
7206
7207         * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
7208         * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
7209
7210 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
7211
7212         * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
7213         * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
7214         (aarch64_gdbarch_init): Check for SVE.
7215         * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
7216
7217 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
7218
7219         * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
7220         * aarch64-tdep.h (aarch64_read_description): Likewise.
7221         * arch/aarch64.c (aarch64_create_target_description): Likewise.
7222         * arch/aarch64.h (aarch64_create_target_description): Likewise.
7223         * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
7224         * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
7225         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
7226
7227 2018-06-02  Simon Marchi  <simon.marchi@ericsson.com>
7228
7229         * value.c (value_fetch_lazy_bitfield): New.
7230         (value_fetch_lazy_memory): New.
7231         (value_fetch_lazy_register): New.
7232         (value_fetch_lazy): Factor out to smaller functions.
7233
7234 2018-06-01  Tom Tromey  <tom@tromey.com>
7235
7236         * cp-name-parser.y (backslashable, represented): Now const.
7237
7238 2018-06-01  Tom Tromey  <tom@tromey.com>
7239
7240         * cp-name-parser.y: Include parser-defs.h.
7241         (parser_fprintf): Remove declaration.
7242
7243 2018-06-01  Tom Tromey  <tom@tromey.com>
7244
7245         * cp-name-parser.y: Use %pure-parser, %lex-param, and
7246         %parse-param.
7247         (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
7248         (global_result): Remove globals.
7249         (struct cpname_state): New.
7250         (yyparse): Don't declare.
7251         (yylex, yyerror): Move declarations after %union.
7252         (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
7253         (make_name): Add state parameter.
7254         Update all callers.
7255         (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
7256         parameter.
7257         (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
7258         Update.
7259         (yylex): Add lvalp, state parameters.
7260         (yyerror): Add state parameter.
7261         (cp_demangled_name_to_comp): Update.
7262
7263 2018-06-01  Tom Tromey  <tom@tromey.com>
7264
7265         * cp-name-parser.y (parser_fprintf): Declare.
7266         (GDB_YY_REMAP_PREFIX): Define.
7267         Include yy-remap.h.  Don't redefine yy* identifiers.
7268
7269 2018-06-01  Tom Tromey  <tom@tromey.com>
7270
7271         * python/py-type.c (typy_legacy_template_argument): Update.
7272         * cp-support.h (cp_demangled_name_to_comp): Update.
7273         * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
7274         parameter to be a "std::string *".
7275         (main): Update.
7276
7277 2018-06-01  H.J. Lu  <hongjiu.lu@intel.com>
7278
7279         * ada-lex.l: Include "diagnostics.h" instead of
7280         "common/diagnostics.h".
7281         * unittests/environ-selftests.c: Likewise.
7282         * common/diagnostics.h: Moved to ../include.
7283
7284 2018-06-01  Joel Brobecker  <brobecker@adacore.com>
7285
7286         * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
7287         to language_mode_manual while calling breakpoint_re_set_one.
7288
7289 2018-06-01  Tom Tromey  <tom@tromey.com>
7290
7291         * valops.c (value_cast_structs, destructor_name_p): Update.
7292         * symtab.c (gdb_mangle_name): Update.
7293         * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
7294         Update.
7295         * p-valprint.c (pascal_object_is_vtbl_ptr_type)
7296         (pascal_object_print_value_fields, pascal_object_print_value):
7297         Update.
7298         * p-typeprint.c (pascal_type_print_derivation_info): Update.
7299         * linespec.c (find_methods): Update.
7300         * gdbtypes.h (type_name_no_tag): Remove.
7301         (type_name_or_error): Rename from type_name_no_tag_or_error.
7302         * gdbtypes.c (type_name_no_tag): Remove.
7303         (type_name_or_error): Rename from type_name_no_tag_or_error.
7304         (lookup_struct_elt_type, check_typedef): Update.
7305         * expprint.c (print_subexp_standard): Update.
7306         * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
7307         * d-namespace.c (d_lookup_nested_symbol): Update.
7308         * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
7309         (cp_print_class_member): Update.
7310         * cp-namespace.c (cp_lookup_nested_symbol): Update.
7311         * completer.c (add_struct_fields): Update.
7312         * c-typeprint.c (cp_type_print_derivation_info)
7313         (c_type_print_varspec_prefix, c_type_print_base_struct_union):
7314         Update.
7315         * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
7316         (ada_prefer_type, ada_is_exception_sym): Update.
7317
7318 2018-06-01  Tom Tromey  <tom@tromey.com>
7319
7320         * valops.c (enum_constant_from_type, value_namespace_elt)
7321         (value_maybe_namespace_elt): Update.
7322         * valarith.c (find_size_for_pointer_math): Update.
7323         * target-descriptions.c (make_gdb_type): Update.
7324         * symmisc.c (print_symbol): Update.
7325         * stabsread.c (define_symbol, read_type)
7326         (complain_about_struct_wipeout, add_undefined_type)
7327         (cleanup_undefined_types_1): Update.
7328         * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
7329         (rust_range_type_p, val_print_struct, rust_print_struct_def)
7330         (rust_internal_print_type, rust_composite_type)
7331         (rust_evaluate_funcall, rust_evaluate_subexp)
7332         (rust_inclusive_range_type_p): Update.
7333         * python/py-type.c (typy_get_tag): Update.
7334         * p-typeprint.c (pascal_type_print_base): Update.
7335         * mdebugread.c (parse_symbol, parse_type): Update.
7336         * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
7337         Update.
7338         * guile/scm-type.c (gdbscm_type_tag): Update.
7339         * go-lang.c (sixg_string_p): Update.
7340         * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
7341         Update.
7342         * gdbtypes.h (struct main_type) <tag_name>: Remove.
7343         (TYPE_TAG_NAME): Remove.
7344         * gdbtypes.c (type_name_no_tag): Simplify.
7345         (check_typedef, check_types_equal, recursive_dump_type)
7346         (copy_type_recursive, arch_composite_type): Update.
7347         * f-typeprint.c (f_type_print_base): Update.  Print "Type" prefix
7348         in summary mode when needed.
7349         * eval.c (evaluate_funcall): Update.
7350         * dwarf2read.c (fixup_go_packaging, read_structure_type)
7351         (process_structure_scope, read_enumeration_type)
7352         (read_namespace_type, read_module_type, determine_prefix): Update.
7353         * cp-support.c (inspect_type): Update.
7354         * coffread.c (process_coff_symbol, decode_base_type): Update.
7355         * c-varobj.c (c_is_path_expr_parent): Update.
7356         * c-typeprint.c (c_type_print_base_struct_union): Update.
7357         (c_type_print_base_1): Update.  Print struct/class/union/enum in
7358         summary when using C language.
7359         * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
7360         (gen_maybe_namespace_elt): Update.
7361         * ada-lang.c (ada_type_name): Simplify.
7362         (empty_record, ada_template_to_fixed_record_type_1)
7363         (template_to_static_fixed_type)
7364         (to_record_with_fixed_variant_part, ada_check_typedef): Update.
7365
7366 2018-06-01  Tom Tromey  <tom@tromey.com>
7367
7368         * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
7369         c_print_type.
7370         * c-typeprint.c (c_print_type_1): Add "language" parameter.
7371         (c_print_type): Update.
7372         (c_print_type): New overload.
7373         (c_type_print_varspec_prefix, c_type_print_args)
7374         (c_type_print_varspec_suffix, c_print_type_no_offsets)
7375         (c_type_print_base_struct_union, c_type_print_base_1)
7376         (cp_type_print_method_args): Add "language" parameter.
7377         (c_type_print_base): Update.
7378         * c-lang.h (c_print_type): Add new overload.
7379
7380 2018-06-01  Tom Tromey  <tom@tromey.com>
7381
7382         * typeprint.h (c_type_print_varspec_suffix): Don't declare.
7383         * c-typeprint.c (c_type_print_varspec_suffix): Now static.
7384
7385 2018-06-01  Alan Hayward  <alan.hayward@arm.com>
7386
7387         * aarch64-tdep.c (aarch64_sve_register_names): New const
7388         var.
7389         * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
7390         (AARCH64_SVE_Z_REGS_NUM): New define.
7391         (AARCH64_SVE_P_REGS_NUM): Likewise.
7392         (AARCH64_SVE_NUM_REGS): Likewise.
7393
7394 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
7395
7396         * nat/linux-ptrace.h [__alpha__]
7397         (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
7398         definitions.
7399
7400 2018-05-31  Maciej W. Rozycki  <macro@mips.com>
7401
7402         * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
7403         the endianness selected.
7404         * NEWS: Document `set endian auto' mode operation update.
7405
7406 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
7407
7408         * Makefile.in: Add new header.
7409         * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
7410         (sve_vl_from_vg): Likewise.
7411         (sve_vq_from_vl): Likewise.
7412         (sve_vl_from_vq): Likewise.
7413         (sve_vq_from_vg): Likewise.
7414         (sve_vg_from_vq): Likewise.
7415         * configure.nat: Add new c file.
7416         * nat/aarch64-sve-linux-ptrace.c: New file.
7417         * nat/aarch64-sve-linux-ptrace.h: New file.
7418
7419 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
7420
7421         * aarch64-linux-nat.c (aarch64_linux_read_description):
7422         Add parmeter zero.
7423         * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
7424         Likewise.
7425         * aarch64-tdep.c (tdesc_aarch64_list): Add.
7426         (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
7427         (aarch64_gdbarch_init): Add parmeter zero.
7428         * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
7429         * arch/aarch64.c (aarch64_create_target_description): Check VQ.
7430         * arch/aarch64.h (aarch64_create_target_description): Add VQ.
7431         parmeter.
7432         * doc/gdb.texinfo: Describe SVE feature
7433         * features/aarch64-sve.c: New file.
7434
7435 2018-05-31  Omair Javaid  <omair.javaid@linaro.org>
7436
7437         PR gdb/23210
7438         * gdbarch.sh (significant_addr_bit): Default to zero when
7439         not set by target architecture.
7440         * gdbarch.c: Re-generated.
7441         * utils.c (address_significant): Update.
7442
7443 2018-05-30  Joel Brobecker  <brobecker@adacore.com>
7444
7445         * stack.c (func_command): Remove trailing newline in call to error.
7446
7447 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7448
7449         * regcache.h (regcache_raw_collect): Remove, update callers to
7450         use regcache::raw_collect.
7451         * regcache.c (regcache_raw_collect): Remove.
7452
7453 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7454
7455         * regcache.h (regcache_raw_supply): Remove, update callers to
7456         use detached_regcache::raw_supply.
7457         * regcache.c (regcache_raw_supply): Remove.
7458
7459 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7460
7461         * regcache.h (regcache_cooked_write_part): Remove, update
7462         callers to use regcache::cooked_write_part.
7463         * regcache.c (regcache_cooked_write_part): Remove.
7464
7465 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7466
7467         * regcache.h (regcache_cooked_read_part): Remove, update callers
7468         to use readable_regcache::cooked_read_part.
7469         * regcache.c (regcache_cooked_read_part): Remove.
7470
7471 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7472
7473         * regcache.h (regcache_cooked_read_value): Remove, update
7474         callers to use readable_regcache::cooked_read_value.
7475         * regcache.c (regcache_cooked_read_value): Remove.
7476
7477 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7478
7479         * regcache.h (regcache_cooked_write): Remove, update callers to
7480         use regcache::cooked_write.
7481         * regcache.c (regcache_cooked_write): Remove.
7482
7483 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7484
7485         * regcache.h (regcache_invalidate): Remove, update callers to
7486         use detached_regcache::invalidate instead.
7487         * regcache.c (regcache_invalidate): Remove.
7488
7489 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7490
7491         * regcache.h (regcache_raw_write_part): Remove, update callers
7492         to use regcache::raw_write_part instead.
7493         * regcache.c (regcache_raw_write_part): Remove.
7494
7495 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7496
7497         * regcache.h (regcache_raw_read_part): Remove, update callers to
7498         use readable_regcache::raw_read_part instead.
7499         * regcache.c (regcache_raw_read_part): Remove.
7500
7501 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7502
7503         * regcache.h (regcache_cooked_read): Remove, update callers to
7504         use readable_regcache::cooked_read instead.
7505         * regcache.c (regcache_cooked_read): Remove.
7506
7507 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7508
7509         * regcache.h (regcache_raw_write): Remove, update callers to use
7510         regcache::raw_write instead.
7511         * regcache.c (regcache_raw_write): Remove.
7512
7513 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7514
7515         * regcache.h (regcache_raw_read): Remove, update callers to use
7516         readable_regcache::raw_read instead.
7517         * regcache.c (regcache_raw_read): Remove.
7518
7519 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7520
7521         * regcache.h (regcache_raw_update): Remove, update callers to
7522         use readable_regcache::raw_update instead.
7523         * regcache.c (regcache_raw_update): Remove.
7524
7525 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7526
7527         * regcache.h (regcache_register_status): Remove, update callers
7528         to use reg_buffer::get_register_status directly instead.
7529         * regcache.c (regcache_register_status): Remove.
7530
7531 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7532
7533         * regcache.h (regcache_get_ptid): Remove, update all callers to
7534         call regcache::ptid instead.
7535         * regcache.c (regcache_get_ptid): Remove.
7536
7537 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7538
7539         * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
7540
7541 2018-05-30  Pedro Alves  <palves@redhat.com>
7542
7543         * common/common-exceptions.h (exception_rethrow): Use
7544         ATTRIBUTE_NORETURN.
7545
7546 2018-05-29  Simon Marchi  <simon.marchi@polymtl.ca>
7547
7548         * breakpoint.c (print_solib_event, check_status_catch_solib):
7549         Remove struct keyword in range-based for loops.
7550         * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
7551         * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
7552         Likewise.
7553         * linespec.c (find_superclass_methods, search_minsyms_for_name):
7554         Likewise.
7555         * symfile.c (addr_info_make_relative): Likewise.
7556         * thread.c (value_in_thread_stack_temporaries): Likewise.
7557
7558 2018-06-12  Weimin Pan  <weimin.pan@oracle.com>
7559
7560         PR gdb/16841
7561         * valops.c (value_struct_elt_for_reference): Call check_typedef on
7562         aggregate type to get its real type before accessing it.
7563
7564 2018-05-29  Weimin Pan  <weimin.pan@oracle.com>
7565
7566         * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
7567         * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
7568         * coff-pe-read.c (add_pe_forwarded_sym): Replace
7569         lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
7570         * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
7571         * jit.c (jit_breakpoint_re_set_internal): Likewise.
7572         * printcmd.c (info_address_command): Likewise.
7573
7574 2018-05-29  Tom Tromey  <tom@tromey.com>
7575
7576         * windows-nat.c (handle_exception): Update fall-through comment.
7577
7578 2018-05-29  Tom Tromey  <tom@tromey.com>
7579
7580         * progspace.h (so_list_ptr): Remove typedef.  Don't declare VEC.
7581         (struct program_space) <added_solibs>: Now a std::vector.
7582         * breakpoint.c (print_solib_event): Update.
7583         (check_status_catch_solib): Update.
7584         * progspace.c (clear_program_space_solib_cache): Update.
7585         * solib.c (update_solib_list): Update.
7586
7587 2018-05-29  Tom Tromey  <tom@tromey.com>
7588
7589         * python/py-type.c (typy_richcompare): Update.
7590         * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
7591         * gdbtypes.h (types_deeply_equal): Return bool.
7592         (types_equal): Likewise.
7593         * gdbtypes.c (type_equality_entry_d): Remove typedef.  Don't
7594         declare VEC.
7595         (check_types_equal): Change worklist to std::vector.  Return
7596         bool.
7597         (struct type_equality_entry): Add constructor.
7598         (compare_maybe_null_strings): Return bool.
7599         (check_types_worklist): Return bool.  Change worklist to
7600         std::vector.
7601         (types_deeply_equal): Use std::vector.
7602         (types_equal): Return bool.
7603         (compare_maybe_null_strings): Simplify.
7604
7605 2018-05-29  Tom Tromey  <tom@tromey.com>
7606
7607         * record-btrace.c (tp_t): Remove typedef.  Don't declare VEC.
7608
7609 2018-05-29  Tom Tromey  <tom@tromey.com>
7610
7611         * objc-lang.h: Don't include cp-support.h.
7612         * common/gdb_vecs.h (const_char_ptr): Remove typedef.  Don't
7613         declare VEC.
7614
7615 2018-05-27  Tom Tromey  <tom@tromey.com>
7616
7617         * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
7618
7619 2018-05-25  Tom Tromey  <tom@tromey.com>
7620
7621         * value.c (value::location): Initialize.
7622
7623 2018-05-25  Tom Tromey  <tom@tromey.com>
7624
7625         * dbxread.c (init_bincl_list): Remove.
7626         (bincl_list): Now a std::vector.
7627         (bincls_allocated, next_bincl): Remove.
7628         (free_bincl_list, do_free_bincl_list_cleanup)
7629         (make_cleanup_free_bincl_list): Remove.
7630         (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
7631         unique_xmalloc_ptr.
7632         (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
7633         (struct header_file_location): Add constructor.
7634         (add_bincl_to_list): Remove.
7635
7636 2018-05-25  Tom Tromey  <tom@tromey.com>
7637
7638         * tui/tui.c (tui_enable): Update.
7639         * mi/mi-interp.c (mi_interp::init): Update.
7640         * interps.h (class interp) <name>: New method.
7641         <m_name>: Rename from name.
7642         (~scoped_restore_interp): Update.
7643         * interps.c (interp::interp): Update.
7644         (interp_add, interp_set, interp_lookup_existing)
7645         (current_interp_named_p): Update.
7646
7647 2018-05-25  Tom Tromey  <tom@tromey.com>
7648
7649         * interps.c (interp_name): Remove.
7650         * mi/mi-interp.c (mi_interp::init): Update.
7651         * interps.h (interp_name): Remove.
7652         (~scoped_restore_interp): Update.
7653         * tui/tui.c (tui_enable): Update.
7654
7655 2018-05-25  Tom Tromey  <tom@tromey.com>
7656
7657         * utils.c (fputs_maybe_filtered): Update.
7658         * linespec.c (decode_line_full): Update.
7659         * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
7660         (mi_print_breakpoint_for_event, mi_solib_loaded)
7661         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
7662         (mi_user_selected_context_changed): Update.
7663         * mi/mi-main.c (mi_execute_command): Update.
7664         * cli/cli-script.c (execute_control_command): Update.
7665         * python/python.c (execute_gdb_command): Update.
7666         * solib.c (info_sharedlibrary_command): Update.
7667         * interps.c (interp_ui_out): Remove.
7668         * interps.h (interp_ui_out): Remove.
7669
7670 2018-05-25  Tom Tromey  <tom@tromey.com>
7671
7672         * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
7673         * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
7674         * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
7675
7676 2018-05-25  Tom Tromey  <tom@tromey.com>
7677
7678         * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
7679         * interps.c (interp_exec): Use scoped_restore.
7680
7681 2018-05-25  Tom Tromey  <tom@tromey.com>
7682
7683         * remote.c (remote_target::remote_file_get): Use
7684         gdb::byte_vector.
7685         (remote_target::remote_file_put): Likewise.
7686
7687 2018-05-25  Tom Tromey  <tom@tromey.com>
7688
7689         * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
7690         a std::string.
7691         (get_pe_section_index, add_pe_exported_sym): Update.
7692         (read_pe_exported_syms): Use gdb::def_vector.
7693
7694 2018-05-25  Tom Tromey  <tom@tromey.com>
7695
7696         * frame.c (remove_prev_frame): Remove.
7697         (get_prev_frame_if_no_cycle): Use TRY/CATCH.
7698
7699 2018-05-25  Maciej W. Rozycki  <macro@mips.com>
7700
7701         * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
7702         Remove prototypes.
7703         * mips-linux-nat.c (supply_fpregset): Always call
7704         `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
7705         (fill_fpregset): Always call `mips64_fill_fpregset' rather than
7706         `mips_fill_fpregset'.
7707         * mips-linux-tdep.c (mips_supply_fpregset)
7708         (mips_supply_fpregset_wrapper, mips_fill_fpregset)
7709         (mips_fill_fpregset_wrapper): Remove functions.
7710         (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
7711         (mips_linux_fpregset): Remove variable.
7712         (mips_linux_iterate_over_regset_sections): Use
7713         `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
7714         (mips_linux_o32_sigframe_init): Remove comment.
7715
7716 2018-05-25  Pedro Alves  <palves@redhat.com>
7717
7718         * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
7719         (struct readahead_cache, struct packet_reg, struct
7720         remote_arch_state, class remote_state): Move higher up in the
7721         file.
7722         (remote_target::m_remote_state): Now an object instead of a pointer.
7723         (remote_target::get_remote_state): Adjust.
7724
7725 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
7726
7727         * stack.c (select_and_print_frame): Delete.
7728         (struct function_bounds): Move struct within function.
7729         (func_command): Most content moved into new function
7730         find_frame_for_function, use new function, print result, add
7731         function comment.
7732         (find_frame_for_function): New function, now returns a result.
7733
7734 2018-05-24  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
7735
7736         * stack.c (iterate_over_block_arg_vars): Fix comment.
7737         (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
7738
7739 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
7740
7741         PR gdb/23203
7742         * frame.c
7743         (scoped_restore_selected_frame::scoped_restore_selected_frame):
7744         Define.
7745         (scoped_restore_selected_frame::~scoped_restore_selected_frame):
7746         Define.
7747         * frame.h (class scoped_restore_selected_frame): New class.
7748         * stack.c (print_frame_local_vars): Remove catching and rethrowing
7749         of any exception, use scoped_restore_selected_frame to restore the
7750         frame instead.
7751
7752 2018-05-24  Pedro Alves  <palves@redhat.com>
7753
7754         * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
7755         override.
7756
7757 2018-05-23  Tom Tromey  <tom@tromey.com>
7758
7759         * complaints.c (struct complaints): Remove.
7760         (symfile_complaint_book): Remove.
7761         (series): New global.
7762         (complaint_internal): Update.
7763         (clear_complaints): Update.
7764
7765 2018-05-23  Tom Tromey  <tom@tromey.com>
7766
7767         * complaints.c (counters): New global.
7768         (struct complain): Remove.
7769         (struct complaints) <root>: Remove.
7770         (complaint_sentinel): Remove.
7771         (symfile_complaint_book): Update.
7772         (find_complaint) Remove.
7773         (complaint_internal, clear_complaints): Update.
7774
7775 2018-05-23  Tom Tromey  <tom@tromey.com>
7776
7777         * complaints.c (struct complain) <file, line>: Remove.
7778         (find_complaint): Remove file, line parameters.
7779         (complaint_internal): Update.
7780
7781 2018-05-23  Tom Tromey  <tom@tromey.com>
7782
7783         * complaints.c (vcomplaint): Remove.
7784         (complaint_internal) Merge in contents of vcomplaint.
7785
7786 2018-05-23  Tom Tromey  <tom@tromey.com>
7787
7788         * complaints.c (struct complaints) <explanation>: Remove.
7789         (symfile_explanations): Remove.
7790         (symfile_complaint_book): Update.
7791         (vcomplaint): Update.
7792         (struct explanation): Remove.
7793
7794 2018-05-23  Tom Tromey  <tom@tromey.com>
7795
7796         * complaints.c (symfile_complaints): Remove.
7797         (complaint_internal): Remove "complaints" parameter.
7798         (clear_complaints, vcomplaint): Remove "c" parameter.
7799         (get_complaints): Remove.
7800         * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
7801         (dwarf2_debug_line_missing_file_complaint)
7802         (dwarf2_debug_line_missing_end_sequence_complaint)
7803         (dwarf2_complex_location_expr_complaint)
7804         (dwarf2_const_value_length_mismatch_complaint)
7805         (dwarf2_section_buffer_overflow_complaint)
7806         (dwarf2_macro_malformed_definition_complaint)
7807         (dwarf2_invalid_attrib_class_complaint)
7808         (create_addrmap_from_index, dw2_symtab_iter_next)
7809         (dw2_expand_marked_cus)
7810         (dw2_debug_names_iterator::find_vec_in_debug_names)
7811         (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
7812         (create_debug_type_hash_table, init_cutu_and_read_dies)
7813         (partial_die_parent_scope, add_partial_enumeration)
7814         (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
7815         (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
7816         (read_import_statement, read_file_scope, create_dwo_cu_reader)
7817         (create_cus_hash_table, create_dwp_hash_table)
7818         (inherit_abstract_dies, read_func_scope, read_call_site_scope)
7819         (dwarf2_rnglists_process, dwarf2_ranges_process)
7820         (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
7821         (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
7822         (handle_struct_member_die, process_structure_scope)
7823         (read_array_type, read_common_block, read_module_type)
7824         (read_tag_pointer_type, read_typedef, read_base_type)
7825         (read_subrange_type, load_partial_dies, partial_die_info::read)
7826         (partial_die_info::read, partial_die_info::read)
7827         (partial_die_info::read, read_checked_initial_length_and_offset)
7828         (dwarf2_string_attr, read_formatted_entries)
7829         (dwarf_decode_line_header)
7830         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
7831         (new_symbol, dwarf2_const_value_attr, lookup_die_type)
7832         (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
7833         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
7834         (get_signatured_type, get_DW_AT_signature_type)
7835         (decode_locdesc, file_file_name, consume_improper_spaces)
7836         (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
7837         (dwarf_decode_macro_bytes, dwarf_decode_macros)
7838         (dwarf2_symbol_mark_computed, set_die_type)
7839         (read_attribute_value): Update.
7840         * stap-probe.c (handle_stap_probe, get_stap_base_address):
7841         Update.
7842         * dbxread.c (unknown_symtype_complaint)
7843         (lbrac_mismatch_complaint, repeated_header_complaint)
7844         (set_namestring, function_outside_compilation_unit_complaint)
7845         (read_dbx_symtab, process_one_symbol): Update.
7846         * gdbtypes.c (stub_noname_complaint): Update.
7847         * windows-nat.c (handle_unload_dll): Update.
7848         * coffread.c (coff_symtab_read, enter_linenos, decode_type)
7849         (decode_base_type): Update.
7850         * xcoffread.c (bf_notfound_complaint, ef_complaint)
7851         (eb_complaint, record_include_begin, record_include_end)
7852         (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
7853         (process_xcoff_symbol, read_symbol)
7854         (function_outside_compilation_unit_complaint)
7855         (scan_xcoff_symtab): Update.
7856         * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
7857         * buildsym.c (finish_block_internal, make_blockvector)
7858         (end_symtab_get_static_block, augment_type_symtab): Update.
7859         * dtrace-probe.c (dtrace_process_dof)
7860         (dtrace_static_probe_ops::get_probes): Update.
7861         * complaints.h (struct complaint): Don't declare.
7862         (symfile_complaints): Remove.
7863         (complaint_internal): Remove "complaints" parameter.
7864         (complaint): Likewise.
7865         (clear_complaints): Likewise.
7866         * symfile.c (syms_from_objfile_1, finish_new_objfile)
7867         (reread_symbols): Update.
7868         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
7869         (dwarf2_frame_cache, decode_frame_entry): Update.
7870         * dwarf2loc.c (dwarf_reg_to_regnum): Update.
7871         * objc-lang.c (lookup_objc_class, lookup_child_selector)
7872         (info_selectors_command): Update.
7873         * macrotab.c (macro_include, check_for_redefinition)
7874         (macro_undef): Update.
7875         * objfiles.c (filter_overlapping_sections): Update.
7876         * stabsread.c (invalid_cpp_abbrev_complaint)
7877         (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
7878         (define_symbol, error_type, read_type, rs6000_builtin_type)
7879         (stabs_method_name_from_physname, read_member_functions)
7880         (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
7881         (attach_fields_to_type, complain_about_struct_wipeout)
7882         (read_range_type, read_args, common_block_start)
7883         (common_block_end, cleanup_undefined_types_1, scan_file_globals):
7884         Update.
7885         * mdebugread.c (index_complaint, unknown_ext_complaint)
7886         (basic_type_complaint, bad_tag_guess_complaint)
7887         (bad_rfd_entry_complaint, unexpected_type_code_complaint)
7888         (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
7889         (parse_procedure, parse_lines)
7890         (function_outside_compilation_unit_complaint)
7891         (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
7892         (bad_tag_guess_complaint, reg_value_complaint): Update.
7893         * cp-support.c (demangled_name_complaint): Update.
7894         * macroscope.c (sal_macro_scope): Update.
7895         * dwarf-index-write.c (class debug_names): Update.
7896
7897 2018-05-23  Tom Tromey  <tom@tromey.com>
7898
7899         * complaints.c (clear_complaints): Remove "noisy" parameter.
7900         * complaints.h (clear_complaints): Update.
7901         * symfile.c (syms_from_objfile_1, finish_new_objfile)
7902         (reread_symbols): Update.
7903
7904 2018-05-23  Tom Tromey  <tom@tromey.com>
7905
7906         * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
7907         SUBSEQUENT_MESSAGE.
7908         (vcomplaint, clear_complaints): Update.
7909         (symfile_explanations): Remove some messages.
7910
7911 2018-05-23  Tom Tromey  <tom@tromey.com>
7912
7913         * complaints.c (internal_complaint): Remove.
7914         * complaints.h (internal_complaint): Remove.
7915
7916 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
7917
7918         * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
7919
7920 2018-05-22  Pedro Alves  <palves@redhat.com>
7921
7922         * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
7923         (remote_fileio_badfd, remote_fileio_return_errno)
7924         (remote_fileio_return_success, remote_fileio_func_open)
7925         (remote_fileio_func_open, remote_fileio_func_close)
7926         (remote_fileio_func_read, remote_fileio_func_write)
7927         (remote_fileio_func_lseek, remote_fileio_func_rename)
7928         (remote_fileio_func_unlink, remote_fileio_func_stat)
7929         (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
7930         (remote_fileio_func_isatty, remote_fileio_func_system): Add
7931         remote_target parameter.
7932         (remote_fio_func_map) <func>: Add remote_target parameter.
7933         (do_remote_fileio_request, remote_fileio_request):
7934         * remote-fileio.h (remote_fileio_request):
7935         * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
7936         remote_target parameter.
7937         (remote_notif_process, handle_notification): Adjust to pass down
7938         the remote.
7939         (remote_notif_state_allocate): Add remote_target parameter.  Save
7940         it.
7941         * remote-notif.h (struct remote_target): Forward declare.
7942         (struct notif_client) <parse, ack, can_get_pending_events>: Add
7943         remote_target parameter.
7944         (struct remote_notif_state) <remote>: New field.
7945         (remote_notif_ack, remote_notif_parse): Add remote_target
7946         parameter.
7947         (remote_notif_state_allocate, remote_notif_state_allocate): Add
7948         remote_target parameter.
7949         * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
7950         (threads_listing_context, rmt_thread_action, protocol_feature)
7951         (packet_reg, stop_reply, stop_reply_p, enum packet_support)
7952         (packet_result, struct threads_listing_context, remote_state):
7953         Move definitions and declarations higher up.
7954         (remote_target) <~remote_target>: Declare.
7955         (remote_download_command_source, remote_file_put, remote_file_get)
7956         (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
7957         (remote_hostio_pread_vFile, remote_hostio_send_command)
7958         (remote_hostio_set_filesystem, remote_hostio_open)
7959         (remote_hostio_close, remote_hostio_unlink, remote_state)
7960         (get_remote_state, get_remote_packet_size, get_memory_packet_size)
7961         (get_memory_write_packet_size, get_memory_read_packet_size)
7962         (append_pending_thread_resumptions, remote_detach_1)
7963         (append_resumption, remote_resume_with_vcont)
7964         (add_current_inferior_and_thread, wait_ns, wait_as)
7965         (process_stop_reply, remote_notice_new_inferior)
7966         (process_initial_stop_replies, remote_add_thread)
7967         (btrace_sync_conf, remote_btrace_maybe_reopen)
7968         (remove_new_fork_children, kill_new_fork_children)
7969         (discard_pending_stop_replies, stop_reply_queue_length)
7970         (check_pending_events_prevent_wildcard_vcont)
7971         (discard_pending_stop_replies_in_queue, stop_reply)
7972         (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
7973         (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
7974         (remote_interrupt_as, remote_interrupt_ns)
7975         (remote_get_noisy_reply, remote_query_attached)
7976         (remote_add_inferior, remote_current_thread, get_current_thread)
7977         (set_thread, set_general_thread, set_continue_thread)
7978         (set_general_process, write_ptid)
7979         (remote_unpack_thread_info_response, remote_get_threadinfo)
7980         (parse_threadlist_response, remote_get_threadlist)
7981         (remote_threadlist_iterator, remote_get_threads_with_ql)
7982         (remote_get_threads_with_qxfer)
7983         (remote_get_threads_with_qthreadinfo, extended_remote_restart)
7984         (get_offsets, remote_check_symbols, remote_supported_packet)
7985         (remote_query_supported, remote_packet_size)
7986         (remote_serial_quit_handler, remote_detach_pid)
7987         (remote_vcont_probe, remote_resume_with_hc)
7988         (send_interrupt_sequence, interrupt_query)
7989         (remote_notif_get_pending_events, fetch_register_using_p)
7990         (send_g_packet, process_g_packet, fetch_registers_using_g)
7991         (store_register_using_P, store_registers_using_G)
7992         (set_remote_traceframe, check_binary_download)
7993         (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
7994         (remote_xfer_live_readonly_partial, remote_read_bytes)
7995         (remote_send_printf, remote_flash_write, readchar)
7996         (remote_serial_write, putpkt, putpkt_binary, skip_frame)
7997         (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
7998         (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
7999         (extended_remote_disable_randomization, extended_remote_run)
8000         (send_environment_packet, extended_remote_environment_support)
8001         (extended_remote_set_inferior_cwd, remote_write_qxfer)
8002         (remote_read_qxfer, push_stop_reply, vcont_r_supported)
8003         (packet_command): Now methods of ...
8004         (remote_target): ... this class.
8005         (m_remote_state) <remote_target>: New field.
8006         (struct remote_state) <stop_reply_queue,
8007         remote_async_inferior_event_token, wait_forever_enabled_p>: New
8008         fields.
8009         (remote_state::remote_state): Allocate stop_reply_queue.
8010         (remote_state): Delete global.
8011         (get_remote_state_raw): Delete.
8012         (remote_target::get_remote_state): Allocate m_remote_state on
8013         demand.
8014         (get_current_remote_target): New.
8015         (remote_ops, extended_remote_ops): Delete.
8016         (wait_forever_enabled_p, remote_async_inferior_event_token):
8017         Delete, moved to struct remote_state.
8018         (remote_target::close): Delete self.  Destruction bits split to
8019         ...
8020         (remote_target::~remote_target): ... this.
8021         (show_memory_packet_size): Adjust to use
8022         get_current_remote_target.
8023         (struct protocol_feature) <func>: Add remote_target parameter.
8024         All callers adjusted.
8025         (curr_quit_handler_target): New.
8026         (remote_serial_quit_handler): Reimplement.
8027         (remote_target::open_1): Adjust to use get_current_remote_target.
8028         Heap-allocate remote_target/extended_remote_target instances.
8029         (vcont_builder::vcont_builder): Add remote_target parameter, and
8030         save it in m_remote.  All callers adjusted.
8031         (vcont_builder::m_remote): New field.
8032         (vcont_builder::restart, vcont_builder::flush)
8033         (vcont_builder::push_action): Use it.
8034         (remote_target::commit_resume): Use it.
8035         (struct queue_iter_param) <remote>: New field.
8036         (remote_target::remove_new_fork_children): Fill in 'remote' field.
8037         (check_pending_event_prevents_wildcard_vcont_callback_data): New.
8038         (check_pending_event_prevents_wildcard_vcont_callback)
8039         (remote_target::check_pending_events_prevent_wildcard_vcont)
8040         (remote_target::discard_pending_stop_replies)
8041         (remote_target::discard_pending_stop_replies_in_queue)
8042         (remote_target::remote_notif_remove_queued_reply): Fill in
8043         'remote' field.
8044         (remote_notif_get_pending_events): New.
8045         (remote_target::readchar, remote_target::remote_serial_write):
8046         Save/restore curr_quit_handler_target.
8047         (putpkt): New.
8048         (kill_new_fork_children): Fill in 'remote' field.
8049         (packet_command): Use get_current_remote_target, defer to
8050         remote_target method of same name.
8051         (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
8052         parameter, and save it in m_remote.  All callers adjusted.
8053         (scoped_remote_fd::release): Use m_remote.
8054         (scoped_remote_fd::m_remote): New field.
8055         (remote_file_put, remote_file_get, remote_file_delete): Use
8056         get_current_remote_target, defer to remote_target method of same
8057         name.
8058         (remote_btrace_reset): Add remote_state paremeter.  Update all
8059         callers.
8060         (remote_async_inferior_event_handler). Pass down 'data'.
8061         (remote_new_objfile): Use get_current_remote_target.
8062         (remote_target::vcont_r_supported): New.
8063         (set_range_stepping): Use get_current_remote_target and
8064         remote_target::vcont_r_supported.
8065         (_initialize_remote): Don't allocate 'remote_state' and
8066         'stop_reply_queue' globals.
8067         * remote.h (struct remote_target): Forward declare.
8068         (getpkt, putpkt, remote_notif_get_pending_events): Add
8069         'remote_target' parameter.
8070
8071 2018-05-22  Pedro Alves  <palves@redhat.com>
8072
8073         * remote.c (vcont_builder): Now a class.  Make all data members
8074         private.
8075         (vcont_builder) <vcont_builder, restart, flush, push_action>:
8076         Declare methods.
8077         (vcont_builder_restart): Rename to ...
8078         (vcont_builder::restart): ... this.
8079         (vcont_builder_flush): Rename to ...
8080         (vcont_builder::flush): ... this.
8081         (vcont_builder_push_action): Rename to ...
8082         (vcont_builder::push_action): ... this.
8083         (remote_target::commit_resume): Adjust.
8084
8085 2018-05-22  Pedro Alves  <palves@redhat.com>
8086
8087         * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
8088         (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
8089         (get_fixed_memory_packet_size): New.
8090         (get_memory_packet_size): Use it.
8091         (set_memory_packet_size): Don't override the config size with
8092         DEFAULT_MAX_MEMORY_PACKET_SIZE.
8093         (show_memory_packet_size): Use get_fixed_memory_packet_size.
8094         Don't refer to get_memory_packet_size if not connected to a remote
8095         target.  Show "(default)" if configured size is 0.
8096
8097 2018-05-22  Pedro Alves  <palves@redhat.com>
8098
8099         * remote.c (remote_target::mourn_inferior): Move
8100         discard_pending_stop_replies call here from ...
8101         (_initialize_remote): ... here.
8102
8103 2018-05-22  Pedro Alves  <palves@redhat.com>
8104
8105         * remote.c (compare_section_command): Remove set_general_process
8106         call.
8107
8108 2018-05-22  Pedro Alves  <palves@redhat.com>
8109
8110         * remote.c (struct packet_reg, struct remote_arch_state):
8111         Move higher up in the file.
8112         (remote_state) <m_arch_states>: Store remote_arch_state values
8113         instead of remote_arch_state pointers.
8114         (remote_state::get_remote_arch_state): Adjust.
8115
8116 2018-05-22  Pedro Alves  <palves@redhat.com>
8117
8118         * remote.c: Include <unordered_map>.
8119         (remote_state): Now a class.
8120         (remote_state) <get_remote_arch_state>: Declare method.
8121         <get_remote_arch_state>: New field.
8122         (remote_arch_state) <remote_arch_state>: Declare ctor.
8123         <regs>: Now a unique_ptr.
8124         (remote_gdbarch_data_handle): Delete.
8125         (get_remote_arch_state): Delete.
8126         (remote_state::get_remote_arch_state): New.
8127         (get_remote_state): Adjust to call remote_state's
8128         get_remote_arch_state method.
8129         (init_remote_state): Delete, bits factored out to ...
8130         (remote_arch_state::remote_arch_state): ... this new method.
8131         (get_remote_packet_size, get_memory_packet_size)
8132         (process_g_packet, remote_target::fetch_registers)
8133         (remote_target::prepare_to_store, store_registers_using_G)
8134         (remote_target::store_registers, remote_target::get_trace_status):
8135         Adjust to call remote_state's method.
8136         (_initialize_remote): Remove reference to
8137         remote_gdbarch_data_handle.
8138
8139 2018-05-22  Pedro Alves  <palves@redhat.com>
8140
8141         * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
8142         pread>: New method declarations.
8143         (remote_target::open_1): Adjust.
8144         (readahead_cache_invalidate): Rename to ...
8145         (readahead_cache::invalidate): ... this, and adjust to be a class
8146         method.
8147         (readahead_cache_invalidate_fd): Rename to ...
8148         (readahead_cache::invalidate_fd): ... this, and adjust to be a
8149         class method.
8150         (remote_hostio_pwrite): Adjust.
8151         (remote_hostio_pread_from_cache): Rename to ...
8152         (readahead_cache::pread): ... this, and adjust to be a class
8153         method.
8154         (remote_hostio_close): Adjust.
8155
8156 2018-05-22  Pedro Alves  <palves@redhat.com>
8157
8158         * remote.c (remote_hostio_close_cleanup): Delete.
8159         (class scoped_remote_fd): New.
8160         (remote_file_put, remote_file_get): Use it.
8161
8162 2018-05-22  Pedro Alves  <palves@redhat.com>
8163
8164         (struct vCont_action_support): Use bool and initialize all fields.
8165         (struct readahead_cache): Initialize all fields.
8166         (remote_state): Use bool and initialize all fields.
8167         (remote_state::remote_state, remote_state::~remote_state): New.
8168         (new_remote_state): Delete.
8169         (_initialize_remote): Use new to allocate remote_state.
8170
8171 2018-05-22  Pedro Alves  <palves@redhat.com>
8172             張俊芝  <zjz@zjz.name>
8173
8174         PR gdb/22973
8175         * c-exp.y: Include "c-support.h".
8176         (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
8177         of tolower.  Use c_ident_is_alpha to scan names.
8178         * c-lang.c: Include "c-support.h".
8179         (convert_ucn, convert_octal, convert_hex, convert_escape): Use
8180         ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
8181         * c-support.h: New file, with bits factored out from ...
8182         * cp-name-parser.y: ... this file.
8183         Include "c-support.h".
8184         (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
8185         c-support.h and renamed.
8186         (symbol_end, yylex): Adjust.
8187
8188 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8189
8190         * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
8191         parameter type to CORE_ADDR.
8192         * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
8193         parameter type in declaration to CORE_ADDR.
8194         * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
8195         target_auxv_search to get AT_HWCAP and use the result to get the
8196         target description.
8197         * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
8198         to CORE_ADDR. Remove the cast of the return value to unsigned
8199         long. Fix error predicate of target_auxv_search.
8200         (ppc_linux_nat_target::read_description): Change the type of the
8201         hwcap variable to CORE_ADDR.
8202
8203 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8204
8205         * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
8206         if the size of fpscr is larger than 32 bits.
8207
8208 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8209
8210         * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
8211         (ppc32_linux_vsxregmap): New global.
8212         (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
8213         regcache_supply_regset, and regcache_collect_regset.
8214         * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
8215         * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
8216         (fetch_vsx_register, store_vsx_register): Remove.
8217         (fetch_vsx_registers): Add regno parameter. Get regset using
8218         ppc_linux_vsxregset. Use regset to supply registers.
8219         (store_vsx_registers): Add regno parameter. Get regset using
8220         ppc_linux_vsxregset. Use regset to collect registers.
8221         (fetch_register): Call fetch_vsx_registers instead of
8222         fetch_vsx_register.
8223         (store_register): Call store_vsx_registers instead of
8224         store_vsx_register.
8225         (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
8226         new regno parameter.
8227         (store_ppc_registers): Call store_vsx_registers with -1 for the
8228         new regno parameter.
8229         * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
8230         (ppc_collect_vsxregset): Remove.
8231
8232 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8233
8234         * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
8235         offset fields.
8236         * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
8237         for vector register offset fields.
8238         (ppc64_fbsd_reg_offsets): Likewise.
8239         * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
8240         to vector register offset fields.
8241         * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
8242         to vector register offset fields.
8243         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
8244         vector register offset fields.
8245         * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
8246         initializers for vector register offset fields.
8247         (rs6000_aix64_reg_offsets): Likewise.
8248         * rs6000-tdep.c (ppc_vrreg_offset): Remove.
8249         (ppc_supply_vrregset): Remove.
8250         (ppc_collect_vrregset): Remove.
8251         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
8252         (ppc_linux_vrregset) : New function.
8253         (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
8254         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
8255         (ppc32_linux_vrregset): Remove.
8256         (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
8257         and use result instead of ppc32_linux_vrregset.
8258         (ppc32_linux_reg_offsets): Remove initializers for vector register
8259         offset fields.
8260         (ppc64_linux_reg_offsets): Likewise.
8261         * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
8262         * ppc-linux-nat.c: Include regset.h.
8263         (gdb_vrregset_t): Adjust comment to account for little-endian
8264         mode.
8265         (supply_vrregset, fill_vrregset): Remove.
8266         (fetch_altivec_register, store_altivec_register): Remove.
8267         (fetch_altivec_registers): Add regno parameter. Get regset using
8268         ppc_linux_vrregset. Use regset to supply registers.
8269         (store_altivec_registers): Add regno parameter. Get regset using
8270         ppc_linux_vrregset. Use regset to collect registers.
8271         (fetch_register): Call fetch_altivec_registers instead of
8272         fetch_altivec_register.
8273         (store_register): Call store_altivec_registers instead of
8274         store_altivec_register.
8275         (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
8276         the new regno parameter.
8277         (store_ppc_registers): Call store_altivec_registers with -1 for
8278         the new regno parameter.
8279
8280 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8281
8282         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
8283         (PPC_LINUX_SIZEOF_VSXREGSET): Define.
8284         * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
8285         (gdb_vrregset_t): Change array type size to
8286         PPC_LINUX_SIZEOF_VRREGSET.
8287         (gdb_vsxregset_t): Change array type size to
8288         PPC_LINUX_SIZEOF_VSXREGSET.
8289         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
8290         Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
8291         PPC_LINUX_SIZEOF_VSXREGSET.
8292
8293 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8294
8295         * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
8296         * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
8297         nat/ppc-linux.c.
8298         (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
8299         ppc_linux_target_wordsize with tid.
8300         (ppc_linux_nat_target::read_description): Call ppc_linux_target
8301         wordsize with tid.
8302         * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
8303         (ppc64_64bit_inferior_p): Add static and inline specifiers.
8304         (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
8305         tid parameter. Remove static specifier.
8306         * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
8307         (ppc_linux_target_wordsize): New declaration.
8308
8309 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8310
8311         * arch/ppc-linux-common.c: New file.
8312         * arch/ppc-linux-common.h: New file.
8313         * arch/ppc-linux-tdesc.h: New file.
8314         * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
8315         * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
8316         (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
8317         arch/ppc-linux-tdesc.h.
8318         * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
8319         arch/ppc-linux-tdesc.h.
8320         (ppc_linux_nat_target::read_description): Remove target
8321         description matching code. Fill a ppc_linux_features struct and
8322         call ppc_linux_match_description with it. Move comment about ISA
8323         2.05 to ppc-linux-common.c.
8324         * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
8325         arch/ppc-linux-tdesc.h.
8326         (ppc_linux_core_read_description): Remove target description
8327         matching code. Fill a ppc_linux_features struct and call
8328         ppc_linux_match_description with it.
8329         * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
8330         (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
8331         (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
8332         (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
8333         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
8334         (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
8335         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
8336         (tdesc_powerpc_e500l): Remove.
8337
8338 2018-05-22  Joel Brobecker  <brobecker@adacore.com>
8339
8340         * ada-lang.c (catch_assert_command): Pass empty string instead
8341         of NULL for excep_string argument.
8342
8343 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
8344
8345         * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
8346         the width of the requested register exceeds the width of the
8347         `ptrace' data type.
8348
8349 2018-05-21  Tom Tromey  <tom@tromey.com>
8350
8351         * printcmd.c (output_command): Remove.
8352         (output_command_const): Rename to output_command.
8353         * valprint.h (output_command): Rename from output_command_const.
8354         * tracepoint.c (trace_dump_actions): Call output_command.
8355
8356 2018-05-21  Tom Tromey  <tom@tromey.com>
8357
8358         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
8359         (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
8360         * ada-lang.h (create_ada_exception_catchpoint): Update.
8361         * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
8362         std::string.
8363         (create_excep_cond_exprs, ~ada_catchpoint)
8364         (should_stop_exception, print_one_exception)
8365         (print_mention_exception, print_recreate_exception): Update.
8366         (ada_get_next_arg): Remove.
8367         (catch_ada_exception_command_split): Use std::string.  Change type
8368         of "excep_string", "cond_string".
8369         (catch_ada_exception_command): Update.
8370         (create_ada_exception_catchpoint): Change type of excep_string.
8371         (ada_exception_sal): Remove excep_string parameter.
8372         (~ada_catchpoint): Remove.
8373
8374 2018-05-21  Tom Tromey  <tom@tromey.com>
8375
8376         * ada-lang.c (ada_collect_symbol_completion_matches): Remove
8377         cleanup.
8378
8379 2018-05-21  Tom Tromey  <tom@tromey.com>
8380
8381         * ada-lang.c (ada_exception_message_1, ada_exception_message):
8382         Return unique_xmalloc_ptr.
8383         (print_it_exception): Update.
8384
8385 2018-05-21  Tom Tromey  <tom@tromey.com>
8386
8387         * tracepoint.c (trace_dump_actions): Use std::string.
8388
8389 2018-05-21  Tom Tromey  <tom@tromey.com>
8390
8391         * symfile.c (reread_symbols): Use std::string for original_name.
8392
8393 2018-05-21  Tom Tromey  <tom@tromey.com>
8394
8395         * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
8396         (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN.  Default
8397         constructor.
8398
8399 2018-05-20  Simon Marchi  <simon.marchi@polymtl.ca>
8400
8401         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
8402         instance to...
8403         (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
8404         * objfiles.c (get_objfile_bfd_data): Allocate
8405         objfile_per_bfd_storage with obstack_new when allocating on
8406         obstack.
8407
8408 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
8409
8410         * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
8411         OBSTACK_ZALLOC.
8412         * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
8413         * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
8414         * mdebugread.c (mdebug_build_psymtabs): Likewise.
8415         (add_pending): Likewise.
8416         (parse_symbol): Likewise.
8417         (parse_partial_symbols): Likewise.
8418         (psymtab_to_symtab_1): Likewise.
8419         (new_psymtab): Likewise.
8420         (elfmdebug_build_psymtabs): Likewise.
8421         * minsyms.c (terminate_minimal_symbol_table): Likewise.
8422         * objfiles.c (get_objfile_bfd_data): Likewise.
8423         (objfile_register_static_link): Likewise.
8424         * psymtab.c (allocate_psymtab): Likewise.
8425         * stabsread.c (read_member_functions): Likewise.
8426         * xcoffread.c (xcoff_end_psymtab): Likewise.
8427
8428 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
8429
8430         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
8431         compiler supports std::is_trivially_constructible.
8432         * common/poison.h: Include obstack.h.
8433         (IsMallocable): Define to is_trivially_constructible if the
8434         compiler supports it, define to true_type otherwise.
8435         (xobnew): New.
8436         (XOBNEW): Redefine.
8437         (xobnewvec): New.
8438         (XOBNEWVEC): Redefine.
8439         * gdb_obstack.h (obstack_zalloc): New.
8440         (OBSTACK_ZALLOC): Redefine.
8441         (obstack_calloc): New.
8442         (OBSTACK_CALLOC): Redefine.
8443         (obstack_new): New.
8444         * gdbarch.sh: Include gdb_obstack in gdbarch.h.
8445         (gdbarch_obstack): New declaration in gdbarch.h, definition in
8446         gdbarch.c.
8447         (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
8448         obstack_calloc/obstack_zalloc.
8449         (gdbarch_obstack_zalloc): Remove.
8450         * target-descriptions.c (tdesc_data_init): Use obstack_new.
8451
8452 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
8453
8454         * stack.c (backtrace_command_1): Remove useless variable int i.
8455
8456 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
8457
8458         * stack.c (print_frame_info): Fix comment.
8459
8460 2018-05-18  Tom Tromey  <tom@tromey.com>
8461
8462         * dwarf2read.c (struct dwz_file): Add constructor, initializers.
8463         <dwz_bfd>: Now a gdb_bfd_ref_ptr.
8464         (~dwarf2_per_objfile): Update
8465         (dwarf2_get_dwz_file): Use new.
8466         * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
8467         unique_ptr.
8468
8469 2018-05-18  Tom Tromey  <tom@tromey.com>
8470
8471         * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
8472         unique_ptr.
8473         * dwarf2read.c (struct dwp_file): Add constructor and
8474         initializers.
8475         (open_and_init_dwp_file): Return a unique_ptr.
8476         (dwarf2_per_objfile, create_dwp_hash_table)
8477         (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
8478         (lookup_dwo_unit_in_dwp): Update.
8479         (open_and_init_dwp_file, get_dwp_file): Update.
8480
8481 2018-05-18  Tom Tromey  <tom@tromey.com>
8482
8483         * dwarf2read.c (dwarf2_per_objfile): Update.
8484         (struct mapped_index): Add initializers.
8485         (dwarf2_read_index): Use new.
8486         (dw2_symtab_iter_init): Update.
8487         * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
8488         unique_ptr.
8489
8490 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
8491
8492         * dwarf2read.c (mapped_index) <total_size>: Remove.
8493
8494 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
8495
8496         * unittests/format_pieces-selftests.c (test_format_specifier):
8497         Add ARI comments.
8498
8499 2018-05-18  Tom Tromey  <tom@tromey.com>
8500
8501         * c-typeprint.c (maybe_print_hole): New function.
8502         (c_print_type_struct_field_offset): Update.
8503         (c_type_print_base_struct_union): Call maybe_print_hole.
8504
8505 2018-05-17  Keith Seitz  <keiths@redhat.com>
8506
8507         * breakpoint.c (build_bpstat_chain): New function, moved from
8508         bpstat_stop_status.
8509         (bpstat_stop_status): Add optional parameter, `stop_chain'.
8510         If no stop chain is passed, call build_bpstat_chain to build it.
8511         * breakpoint.h (build_bpstat_chain): Declare.
8512         (bpstat_stop_status): Move documentation here from breakpoint.c.
8513         * infrun.c (handle_signal_stop): Before eliding inlined frames,
8514         build the stop chain and pass it to skip_inline_frames.
8515         Pass this stop chain to bpstat_stop_status.
8516         * inline-frame.c: Include breakpoint.h.
8517         (stopped_by_user_bp_inline_frame): New function.
8518         (skip_inline_frames): Add parameter `stop_chain'.
8519         Move documention to inline-frame.h.
8520         If non-NULL, use stopped_by_user_bp_inline_frame to determine
8521         whether the frame should be elided.
8522         * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
8523         Add moved documentation and update for new parameter.
8524
8525 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
8526
8527         PR cli/14975
8528         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8529         unittests/format_pieces-selftests.c.
8530         * common/format.h (format_piece) <operator==>: New.
8531         (format_pieces) <operator[]>: Remove.
8532         * common/format.c (format_pieces::format_pieces): Handle \e.
8533         * unittests/format_pieces-selftests.c: New.
8534
8535 2018-05-17  Tom Tromey  <tom@tromey.com>
8536
8537         PR symtab/23010:
8538         * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
8539         (dw2_instantiate_symtab): Add skip_partial parameter.
8540         (dw2_find_last_source_symtab, dw2_map_expand_apply)
8541         (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
8542         (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
8543         (dw2_expand_symtabs_matching_one)
8544         (dw2_find_pc_sect_compunit_symtab)
8545         (dw2_debug_names_lookup_symbol)
8546         (dw2_debug_names_expand_symtabs_for_function): Update.
8547         (init_cutu_and_read_dies): Add skip_partial parameter.
8548         (process_psymtab_comp_unit, build_type_psymtabs_1)
8549         (process_skeletonless_type_unit, load_partial_comp_unit)
8550         (psymtab_to_symtab_1): Update.
8551         (load_full_comp_unit): Add skip_partial parameter.
8552         (process_imported_unit_die, dwarf2_read_addr_index)
8553         (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
8554         (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
8555         (read_signatured_type): Update.
8556
8557 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
8558
8559         * value.c (release_value): Remove unused variable.
8560         (record_latest_value): Likewise.
8561         (access_value_history): Likewise.
8562         (preserve_values): Likewise.
8563
8564 2018-05-17  Tom Tromey  <tom@tromey.com>
8565
8566         * extension.h (struct ext_lang_type_printers) <py_type_printers>:
8567         Initialize.
8568
8569 2018-05-16  Maciej W. Rozycki  <macro@mips.com>
8570
8571         PR gdb/22286
8572         * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
8573         Also handle registers whose width is not a multiple of
8574         PTRACE_TYPE_RET.
8575         (linux_nat_trad_target::store_register): Likewise.
8576
8577 2018-05-16  Tom Tromey  <tom@tromey.com>
8578
8579         * gdbcore.h (core_bfd): Redefine.
8580         * corelow.c (core_target::close): Update.
8581         (core_target_open): Update.
8582         * progspace.h (struct program_space) <cbfd>: Now a
8583         gdb_bfd_ref_ptr.
8584
8585 2018-05-16  Tom Tromey  <tom@tromey.com>
8586
8587         PR cli/19551:
8588         * symfile-add-flags.h (enum symfile_add_flags)
8589         <SYMFILE_NOT_FILENAME>: New constant.
8590         * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME.  Get
8591         objfile name from BFD.
8592         (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
8593         * minidebug.c (find_separate_debug_file_in_section): Put
8594         ".gnu_debugdata" into BFD's file name.
8595
8596 2018-05-16  Simon Marchi  <simon.marchi@ericsson.com>
8597
8598         * regcache.c (regcache_read_ftype, regcache_write_ftype):
8599         Remove.
8600
8601 2018-05-15  Tamar Christina  <tamar.christina@arm.com>
8602
8603         PR binutils/21446
8604         * aarch64-tdep.c (aarch64_analyze_prologue,
8605         aarch64_software_single_step, aarch64_displaced_step_copy_insn):
8606         Indicate not interested in errors.
8607
8608 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
8609
8610         * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
8611         Supply the MIPS_ZERO_REGNUM register.
8612
8613 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
8614
8615         * mips-tdep.c (mask_address_var): Make variable static.
8616
8617 2018-05-14  Tom Tromey  <tom@tromey.com>
8618
8619         * dwarf2read.c (rust_union_quirks): Clear rust_unions.
8620
8621 2018-05-11  Andrew Burgess  <andrew.burgess@embecosm.com>
8622
8623         * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
8624         FXSAVE_ADDR for the mxcsr register.
8625
8626 2018-05-11  Max Filippov  <jcmvbkbc@gmail.com>
8627
8628         * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
8629
8630 2018-05-11  Pedro Alves  <palves@redhat.com>
8631
8632         * corelow.c (core_target) <core_target>: No longer inline.
8633         Initialize m_core_gdbarch, m_core_vec and build the section table
8634         here.
8635         <~core_target>: New.
8636         <core_gdbarch, get_core_register_section>: New methods.
8637         <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
8638         factored out from ...
8639         <core_data, core_vec, core_gdbarch>: ... these deleted globals.
8640         (core_ops): Delete.
8641         (sniff_core_bfd): Add gdbarch parameter.
8642         (core_close): Delete, merged into ...
8643         (core_target::close): ... here.  Delete self.
8644         (core_close_cleanup): Delete.
8645         (core_target_open): Allocate a core_target on the heap.  Use a
8646         unique_ptr instead of a cleanup.  Bits moved into the core_target
8647         ctor.  Adjust to use core_target methods instead of globals.
8648         (get_core_register_section): Rename to ...
8649         (core_target::get_core_register_section): ... this and adjust.
8650         (struct get_core_registers_cb_data): New.
8651         (get_core_registers_cb): Use it.  Use bool.
8652         (core_target::fetch_registers, core_target::files_info)
8653         (core_target::xfer_partial, core_target::read_description)
8654         (core_target::pid_to, core_target::thread_name): Adjust to
8655         reference class fields instead of globals.
8656         * target.h (struct target_ops_deleter, target_ops_up): New.
8657
8658 2018-05-11  Pedro Alves  <palves@redhat.com>
8659
8660         * corefile.c (core_file_command): Move to corelow.c.
8661         * corelow.c (the_core_target): Delete.
8662         (core_file_command): Moved from corefile.c.  Check exec_bfd
8663         instead of the_core_target.  Use target_detach instead of calling
8664         into the_core_target directly.
8665         (maybe_say_no_core_file_now): New.
8666         (core_target::detach): Use it.
8667         (_initialize_corelow): Remove references to the_core_target.
8668         * gdbcore.h (the_core_target): Delete.
8669
8670 2018-05-11  Tom Tromey  <tromey@redhat.com>
8671             Pedro Alves  <palves@redhat.com>
8672
8673         * corefile.c (core_bfd): Remove.
8674         * gdbcore.h (core_bfd): Now a macro.
8675         * progspace.h (struct program_space) <cbfd>: New field.
8676
8677 2018-05-11  Tom Tromey  <tom@tromey.com>
8678
8679         * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
8680         gdb::def_vector.
8681
8682 2018-05-10  Tom Tromey  <tom@tromey.com>
8683
8684         * configure: Rebuild.
8685         * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
8686
8687 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
8688
8689         PR server/23158:
8690         * regformats/regdat.sh: Adjust script, following the addition
8691         of the new expedite_regs parameter to init_target_desc.
8692
8693 2018-05-10  Omair Javaid  <omair.javaid@linaro.org>
8694     
8695         PR gdb/23127
8696         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
8697         set_gdbarch_significant_addr_bit.
8698         * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
8699         set_gdbarch_significant_addr_bit.
8700         * utils.c (address_significant): Update to sign extend addr.
8701
8702 2018-05-09  Max Filippov  <jcmvbkbc@gmail.com>
8703
8704         * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
8705         (xtensa_linux_init_abi): Limit tdep->num_regs by
8706         tdep->num_nopriv_regs.
8707         * xtensa-tdep.c (xtensa_derive_tdep): Calculate
8708         tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
8709         not initialized.
8710
8711 2018-05-08  Simon Marchi  <simon.marchi@ericsson.com>
8712
8713         * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
8714
8715 2018-05-08  Andrew Burgess  <andrew.burgess@embecosm.com>
8716
8717         * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
8718         (I387_MXCSR_INIT_VAL): New constant.
8719         * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
8720         buffer if it was supplied by the inferior.
8721         * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
8722         (i387_xsave_get_clear_bv): New function.
8723         (i387_supply_xsave): Only read x87 control registers from the
8724         xsave buffer if the feature is enabled, and the state will have
8725         been written, otherwise, provide a suitable default.
8726         (i387_collect_xsave): Pre-clear all registers in xsave buffer,
8727         including x87 control registers.  Update control registers if they
8728         have changed from the default value, and mark features as enabled
8729         as required.
8730         * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
8731
8732 2018-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
8733
8734         * spu-tdep.c (info_spu_event_command): Fix output formatting.
8735
8736 2018-05-07  Tom Tromey  <tom@tromey.com>
8737
8738         * configure: Rebuild.
8739         * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
8740
8741 2018-05-07  Tom Tromey  <tom@tromey.com>
8742
8743         PR tdep/20362:
8744         * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
8745         bit.  Use correct value for VDIV.
8746
8747 2018-05-04  Tom Tromey  <tom@tromey.com>
8748
8749         * configure: Rebuild.
8750         * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
8751
8752 2018-05-04  Tom Tromey  <tom@tromey.com>
8753
8754         * linux-record.c (record_linux_system_call) <case
8755         RECORD_SYS_RECVFROM>: Add "break".
8756
8757 2018-05-04  Tom Tromey  <tom@tromey.com>
8758
8759         * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
8760         Add missing "break".
8761         * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
8762         Add missing "break".
8763
8764 2018-05-04  Tom Tromey  <tom@tromey.com>
8765
8766         * rs6000-tdep.c (ppc_process_record_op4)
8767         (ppc_process_record_op63): Add fall-through comment.
8768
8769 2018-05-04  Tom Tromey  <tom@tromey.com>
8770
8771         * i386-tdep.c (i386_process_record): Add fall-through comment.
8772
8773 2018-05-04  Tom Tromey  <tom@tromey.com>
8774
8775         * stabsread.c (define_symbol) <case 'p'>: Add fall-through
8776         comment.
8777
8778 2018-05-04  Tom Tromey  <tom@tromey.com>
8779
8780         * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
8781         * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
8782         * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
8783         comment.
8784         * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
8785         comment.
8786         * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
8787         comment.
8788
8789 2018-05-04  Tom Tromey  <tom@tromey.com>
8790
8791         * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
8792
8793 2018-05-04  Tom Tromey  <tom@tromey.com>
8794
8795         * s390-tdep.c (s390_process_record): Fix fall-through comments.
8796         * xcoffread.c (scan_xcoff_symtab): Move comment later.
8797         * symfile.c (section_is_mapped): Fix fall-through comment.
8798         * stabsread.c (define_symbol, read_member_functions): Fix
8799         fall-through comment.
8800         * s390-linux-tdep.c (s390_process_record): Fix fall-through
8801         comment.
8802         * remote.c (remote_wait_as): Fix fall-through comment.
8803         * p-exp.y (yylex): Fix fall-through comment.
8804         * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
8805         comment.
8806         * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
8807         * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
8808         * jv-exp.y (yylex): Fix fall-through comment.
8809         * go-exp.y (lex_one_token): Fix fall-through comment.
8810         * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
8811         fall-through comment.
8812         * f-exp.y (yylex): Fix fall-through comment.
8813         * dwarf2read.c (process_die): Fix fall-through comments.
8814         * dbxread.c (process_one_symbol): Fix fall-through comment.
8815         * d-exp.y (lex_one_token): Fix fall-through comment.
8816         * cp-name-parser.y (yylex): Fix fall-through comment.
8817         * coffread.c (coff_symtab_read): Fix fall-through comment.
8818         * c-exp.y (lex_one_token): Fix fall-through comment.
8819         * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
8820         comment.
8821         * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
8822         comment.
8823
8824 2018-05-04  Tom Tromey  <tom@tromey.com>
8825
8826         PR python/22730:
8827         * NEWS: Mention gdb.execute change.
8828         * gdbcmd.h (execute_control_command): Don't declare.
8829         * python/python.c (execute_gdb_command): Use read_command_lines_1,
8830         execute_control_commands, execute_control_commands_to_string.
8831         * cli/cli-script.h (execute_control_commands)
8832         (execute_control_commands_to_string): Declare.
8833         (execute_control_command): Add from_tty parameter.
8834         * cli/cli-script.c (execute_control_commands)
8835         (execute_control_commands_to_string): New functions.
8836         (execute_user_command): Use execute_control_commands.
8837         (execute_control_command_1): Add "from_tty" parameter.  Update.
8838         (execute_control_command): Likewise.
8839
8840 2018-05-04  Tom Tromey  <tom@tromey.com>
8841
8842         PR python/22731:
8843         * NEWS: Mention that breakpoint commands are writable.
8844         * python/py-breakpoint.c (bppy_set_commands): New function.
8845         (breakpoint_object_getset) <"commands">: Use it.
8846
8847 2018-05-04  Tom Tromey  <tom@tromey.com>
8848
8849         * tracepoint.c (actions_command): Update.
8850         * mi/mi-cmd-break.c (mi_command_line_array)
8851         (mi_command_line_array_cnt, mi_command_line_array_ptr)
8852         (mi_read_next_line): Remove.
8853         (mi_cmd_break_commands): Update.
8854         * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
8855         function_view.
8856         * cli/cli-script.c (get_command_line): Update.
8857         (process_next_line): Use function_view.  Constify.
8858         (recurse_read_control_structure, read_command_lines)
8859         (read_command_lines_1): Change argument types to function_view.
8860         (do_define_command, document_command): Update.
8861         * breakpoint.h (check_tracepoint_command): Don't declare.
8862         * breakpoint.c (check_tracepoint_command): Remove.
8863         (commands_command_1, create_tracepoint_from_upload): Update.
8864
8865 2018-05-04  Tom Tromey  <tom@tromey.com>
8866
8867         PR gdb/11750:
8868         * cli/cli-script.h (enum command_control_type) <define_control>:
8869         New constant.
8870         * cli/cli-script.c (multi_line_command_p): Handle define_control.
8871         (build_command_line, execute_control_command_1)
8872         (process_next_line): Likewise.
8873         (do_define_command): New function, extracted from define_command.
8874         (define_command): Use it.
8875
8876 2018-05-04  Tom Tromey  <tom@tromey.com>
8877
8878         * tracepoint.c (actions_command): Update.
8879         * cli/cli-script.h (read_command_lines): Update.
8880         * cli/cli-script.c (read_command_lines): Constify prompt_arg.
8881         (MAX_TMPBUF): Remove define.
8882         (define_command): Use string_printf.
8883         (document_command): Likewise.
8884         * breakpoint.c (commands_command_1): Update.
8885
8886 2018-05-04  Tom Tromey  <tom@tromey.com>
8887
8888         * top.c (execute_command): Update.
8889         * cli/cli-script.h (print_command_lines): Now varargs.
8890         * cli/cli-script.c (print_command_lines): Now varargs.
8891         (execute_control_command_1) <case while_control, case if_control>:
8892         Update.
8893
8894 2018-05-04  Tom Tromey  <tom@tromey.com>
8895
8896         * tracepoint.c (all_tracepoint_actions): Rename from
8897         all_tracepoint_actions_and_cleanup.  Change return type.
8898         (actions_command, encode_actions_1, encode_actions)
8899         (trace_dump_actions, tdump_command): Update.
8900         * remote.c (remote_download_command_source): Update.
8901         * python/python.c (gdbpy_eval_from_control_command)
8902         (python_command, python_interactive_command): Update.
8903         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
8904         * guile/guile.c (guile_command)
8905         (gdbscm_eval_from_control_command, guile_command): Update.
8906         * compile/compile.c (compile_code_command)
8907         (compile_print_command, compile_to_object): Update.
8908         * cli/cli-script.h (struct command_lines_deleter): New.
8909         (counted_command_line): New typedef.
8910         (struct command_line): Add constructor, destructor.
8911         <body_list>: Remove.
8912         <body_list_0, body_list_1>: New members.
8913         (command_line_up): Remove typedef.
8914         (read_command_lines, read_command_lines_1, get_command_line):
8915         Update.
8916         (copy_command_lines): Don't declare.
8917         * cli/cli-script.c (build_command_line): Use "new".
8918         (get_command_line): Return counted_command_line.
8919         (print_command_lines, execute_user_command)
8920         (execute_control_command_1, while_command, if_command): Update.
8921         (realloc_body_list): Remove.
8922         (process_next_line, recurse_read_control_structure): Update.
8923         (read_command_lines, read_command_lines_1): Return counted_command_line.
8924         (free_command_lines): Use "delete".
8925         (copy_command_lines): Remove.
8926         (define_command, document_command, show_user_1): Update.
8927         * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
8928         a counted_command_line.
8929         * breakpoint.h (counted_command_line): Remove typedef.
8930         (breakpoint_set_commands): Update.
8931         * breakpoint.c (check_no_tracepoint_commands)
8932         (validate_commands_for_breakpoint): Update.
8933         (breakpoint_set_commands): Change commands to be a
8934         counted_command_line.
8935         (commands_command_1, update_dprintf_command_list)
8936         (create_tracepoint_from_upload): Update.
8937
8938 2018-05-04  Tom Tromey  <tom@tromey.com>
8939
8940         * cli/cli-decode.h (cmd_list_element): New constructor.
8941         (~cmd_list_element): New destructor.
8942         (struct cmd_list_element): Add initializers.
8943         * cli/cli-decode.c (do_add_cmd): Use "new".
8944         (delete_cmd): Use "delete".
8945
8946 2018-05-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
8947             Pedro Alves <palves@redhat.com>
8948
8949         PR breakpoints/19806 and support for PR external/20207.
8950         * NEWS: Mention Aarch64 watchpoint improvements.
8951         * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
8952         watchpoints and PR external/20207 watchpoints.
8953         * nat/aarch64-linux-hw-point.c
8954         (kernel_supports_any_contiguous_range): New.
8955         (aarch64_watchpoint_offset): New.
8956         (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
8957         (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
8958         (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
8959         (aarch64_align_watchpoint): New parameters aligned_offset_p and
8960         next_addr_orig_p.  Support PR external/20207 watchpoints.
8961         (aarch64_downgrade_regs): New.
8962         (aarch64_dr_state_insert_one_point): New parameters offset and
8963         addr_orig.
8964         (aarch64_dr_state_remove_one_point): Likewise.
8965         (aarch64_handle_breakpoint): Update caller.
8966         (aarch64_handle_aligned_watchpoint): Likewise.
8967         (aarch64_handle_unaligned_watchpoint): Support addr_orig and
8968         aligned_offset.
8969         (aarch64_linux_set_debug_regs): Remove const from state.  Call
8970         aarch64_downgrade_regs.
8971         (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
8972         * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
8973         (DR_CONTROL_MASK): ... this.
8974         (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
8975         (unsigned int aarch64_watchpoint_offset): New prototype.
8976         (aarch64_linux_set_debug_regs): Remove const from state.
8977         * utils.c (align_up, align_down): Move to ...
8978         * common/common-utils.c (align_up, align_down): ... here.
8979         * utils.h (align_up, align_down): Move to ...
8980         * common/common-utils.h (align_up, align_down): ... here.
8981
8982 2018-05-04  Joel Brobecker  <brobecker@adacore.com>
8983
8984         * sparc-tdep.c (sparc_structure_return_p): Re-implement to
8985         match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
8986         (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
8987         Re-implement to match the ABI as summarized in GCC's
8988         gcc/config/sparc/sparc.c.  All callers updated.
8989         (sparc32_store_arguments): Remove assertion.
8990
8991 2018-05-04  Tom Tromey  <tom@tromey.com>
8992
8993         * printcmd.c: Don't include tui.h.
8994         (decode_format): Use skip_spaces.
8995
8996 2018-05-04  Tom Tromey  <tom@tromey.com>
8997
8998         PR gdb/22619:
8999         * printcmd.c (last_count): New global.
9000         (x_command): Use saved count when repeating.
9001
9002 2018-05-04  Tom Tromey  <tom@tromey.com>
9003
9004         * nto-procfs.c (do_closedir_cleanup): Remove.
9005         (procfs_pidlist): Use gdb_dir_up.
9006         * procfs.c (do_closedir_cleanup): Remove.
9007         (proc_update_threads): Use gdb_dir_up.
9008         * common/filestuff.h (struct gdb_dir_deleter): New.
9009         (gdb_dir_up): New typedef.
9010
9011 2018-05-04  Tom Tromey  <tom@tromey.com>
9012
9013         * ada-lang.c (print_mention_exception): Use std::string.
9014
9015 2018-05-04  Tom Tromey  <tom@tromey.com>
9016
9017         * ada-lang.c (create_excep_cond_exprs): Update.
9018         (ada_exception_catchpoint_cond_string): Use std::string.
9019
9020 2018-05-04  Tom Tromey  <tom@tromey.com>
9021
9022         * ada-lang.c (xget_renaming_scope): Return std::string.
9023         (old_renaming_is_invisible): Update.
9024
9025 2018-05-04  Tom Tromey  <tom@tromey.com>
9026
9027         * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
9028         (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
9029
9030 2018-05-04  Ulrich Weigand  <uweigand@de.ibm.com>
9031
9032         * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
9033
9034 2018-05-04  Tom Tromey  <tom@tromey.com>
9035
9036         * remote.c (remote_query_supported_append): Change type.
9037         (remote_check_symbols): Update.
9038
9039 2018-05-04  Paul Pluzhnikov  <ppluzhnikov@google.com>
9040
9041         PR gdb/11420
9042         * configure.ac: Prepend libpython.
9043         * python/python-config.py: Likewise.
9044         * configure: Regenerate.
9045
9046 2018-05-03  Simon Marchi  <simon.marchi@ericsson.com>
9047
9048         * Makefile.in (%.c: %.l): Use -t instead of --stdout.
9049
9050 2018-05-03  Pedro Alves  <palves@redhat.com>
9051
9052         * s390-linux-nat.c
9053         (s390_linux_nat_target::have_continuable_watchpoint): Mark with
9054         override.  Write 'true' instead of '1'.
9055         (s390_linux_nat_target::watchpoint_addr_within_range): Remove
9056         declaration.
9057
9058 2018-05-02  Pedro Alves  <palves@redhat.com>
9059
9060         * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
9061         add_inf_child_target.
9062         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
9063         add_inf_child_target.
9064         * aix-thread.c (aix_thread_target_info): New.
9065         (aix_thread_target) <shortname, longname, doc>: Delete.
9066         <info>: New.
9067         * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
9068         add_inf_child_target.
9069         * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
9070         add_inf_child_target.
9071         * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
9072         add_inf_child_target.
9073         * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
9074         add_inf_child_target.
9075         * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
9076         add_inf_child_target.
9077         * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
9078         add_inf_child_target.
9079         * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
9080         add_inf_child_target.
9081         * arm-linux-nat.c (_initialize_arm_linux_nat): Use
9082         add_inf_child_target.
9083         * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
9084         add_inf_child_target.
9085         * bfd-target.c (target_bfd_target_info): New.
9086         (target_bfd) <shortname, longname, doc>: Delete.
9087         <info>: New.
9088         * bsd-kvm.c (bsd_kvm_target_info): New.
9089         (bsd_kvm_target) <shortname, longname, doc>: Delete.
9090         <info>: New.
9091         (bsd_kvm_target::open): Rename to ...
9092         (bsd_kvm_target_open): ... this.  Adjust.
9093         * bsd-uthread.c (bsd_uthread_target_info): New.
9094         (bsd_uthread_target) <shortname, longname, doc>: Delete.
9095         <info>: New.
9096         * corefile.c (core_file_command): Adjust.
9097         * corelow.c (core_target_info): New.
9098         (core_target) <shortname, longname, doc>: Delete.
9099         <info>: New.
9100         (core_target::open): Rename to ...
9101         (core_target_open): ... this.  Adjust.
9102         * ctf.c (ctf_target_info): New.
9103         (ctf_target) <shortname, longname, doc>: Delete.
9104         <info>: New.
9105         (ctf_target::open): Rename to ...
9106         (ctf_target_open): ... this.
9107         (_initialize_ctf): Adjust.
9108         * exec.c (exec_target_info): New.
9109         (exec_target) <shortname, longname, doc>: Delete.
9110         <info>: New.
9111         (exec_target::open): Rename to ...
9112         (exec_target_open): ... this.
9113         * gdbcore.h (core_target_open): Declare.
9114         * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
9115         * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
9116         add_inf_child_target.
9117         * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
9118         add_inf_child_target.
9119         * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
9120         add_inf_child_target.
9121         * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
9122         add_inf_child_target.
9123         * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
9124         add_inf_child_target.
9125         * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
9126         add_inf_child_target.
9127         * i386-linux-nat.c (_initialize_i386_linux_nat): Use
9128         add_inf_child_target.
9129         * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
9130         add_inf_child_target.
9131         * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
9132         add_inf_child_target.
9133         * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
9134         add_inf_child_target.
9135         * inf-child.c (inf_child_target_info): New.
9136         (inf_child_target::info): New.
9137         (inf_child_open_target): Remove 'target' parameter.  Use
9138         get_native_target instead.
9139         (inf_child_target::open): Delete.
9140         (add_inf_child_target): New.
9141         * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
9142         Delete.
9143         <info>: New.
9144         (add_inf_child_target): Declare.
9145         (inf_child_open_target): Declare.
9146         * linux-thread-db.c (thread_db_target_info): New.
9147         (thread_db_target) <shortname, longname, doc>: Delete.
9148         <info>: New.
9149         * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
9150         add_inf_child_target.
9151         * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
9152         add_inf_child_target.
9153         * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
9154         add_inf_child_target.
9155         * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
9156         add_inf_child_target.
9157         * make-target-delegates (print_class): Adjust.
9158         * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
9159         add_inf_child_target.
9160         * mips-linux-nat.c (_initialize_mips_linux_nat): Use
9161         add_inf_child_target.
9162         * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
9163         add_inf_child_target.
9164         * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
9165         add_inf_child_target.
9166         * nto-procfs.c (nto_native_target_info): New.
9167         (nto_procfs_target_native) <shortname, longname, doc>:
9168         Delete.
9169         <info>: New.
9170         (nto_procfs_target_info): New.
9171         (nto_procfs_target_procfs) <shortname, longname, doc>:
9172         Delete.
9173         <info>: New.
9174         (init_procfs_targets): Adjust.
9175         * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
9176         add_inf_child_target.
9177         * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
9178         add_inf_child_target.
9179         * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
9180         add_inf_child_target.
9181         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
9182         add_inf_child_target.
9183         * ravenscar-thread.c (ravenscar_target_info): New.
9184         (ravenscar_thread_target) <shortname, longname, doc>:
9185         Delete.
9186         <info>: New.
9187         * record-btrace.c (record_btrace_target_info):
9188         (record_btrace_target) <shortname, longname, doc>: Delete.
9189         <info>: New.
9190         (record_btrace_target::open): Rename to ...
9191         (record_btrace_target_open): ... this.  Adjust.
9192         * record-full.c (record_longname, record_doc): New.
9193         (record_full_base_target) <shortname, longname, doc>: Delete.
9194         <info>: New.
9195         (record_full_target_info): New.
9196         (record_full_target): <shortname>: Delete.
9197         <info>: New.
9198         (record_full_core_open_1, record_full_open_1): Update comments.
9199         (record_full_base_target::open): Rename to ...
9200         (record_full_open): ... this.
9201         (cmd_record_full_restore): Update.
9202         (_initialize_record_full): Update.
9203         * remote-sim.c (remote_sim_target_info): New.
9204         (gdbsim_target) <shortname, longname, doc>: Delete.
9205         <info>: New.
9206         (gdbsim_target::open): Rename to ...
9207         (gdbsim_target_open): ... this.
9208         (_initialize_remote_sim): Adjust.
9209         * remote.c (remote_doc): New.
9210         (remote_target_info): New.
9211         (remote_target) <shortname, longname, doc>: Delete.
9212         <info>: New.
9213         (extended_remote_target_info): New.
9214         (extended_remote_target) <shortname, longname, doc>: Delete.
9215         <info>: New.
9216         (remote_target::open_1): Make static.  Adjust.
9217         * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
9218         * s390-linux-nat.c (_initialize_s390_nat): Use
9219         add_inf_child_target.
9220         * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
9221         add_inf_child_target.
9222         * sol-thread.c (thread_db_target_info): New.
9223         (sol_thread_target) <shortname, longname, doc>: Delete.
9224         <info>: New.
9225         * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
9226         add_inf_child_target.
9227         * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
9228         add_inf_child_target.
9229         * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
9230         add_inf_child_target.
9231         * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
9232         add_inf_child_target.
9233         * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
9234         add_inf_child_target.
9235         * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
9236         add_inf_child_target.
9237         * spu-linux-nat.c (_initialize_spu_nat): Use
9238         add_inf_child_target.
9239         * spu-multiarch.c (spu_multiarch_target_info): New.
9240         (spu_multiarch_target) <shortname, longname, doc>: Delete.
9241         <info>: New.
9242         * target-delegates.c: Regenerate.
9243         * target.c: Include <unordered_map>.
9244         (target_ops_p): Delete.
9245         (DEF_VEC_P(target_ops_p)): Delete.
9246         (target_factories): New.
9247         (test_target_info): New.
9248         (test_target_ops::info): New.
9249         (open_target): Adjust to use target_factories.
9250         (add_target_with_completer): Rename to ...
9251         (add_target): ... this.  Change prototype.  Register target_info
9252         and open callback in target_factories.  Register target_info in
9253         command context instead of target_ops.
9254         (add_target): Delete old implementation.
9255         (add_deprecated_target_alias): Change prototype.  Adjust.
9256         (the_native_target): New.
9257         (set_native_target, get_native_target): New.
9258         (find_default_run_target): Use the_native_target.
9259         (find_attach_target, find_run_target): Simplify.
9260         (target_ops::open): Delete.
9261         (dummy_target_info): New.
9262         (dummy_target::shortname, dummy_target::longname)
9263         (dummy_target::doc): Delete.
9264         (dummy_target::info): New.
9265         (debug_target::shortname, debug_target::longname)
9266         (debug_target::doc): Delete.
9267         (debug_target::info): New.
9268         * target.h (struct target_info): New.
9269         (target_ops::~target_ops): Add comment.
9270         (target_ops::info): New.
9271         (target_ops::shortname, target_ops::longname, target_ops::doc): No
9272         longer virtual.  Implement in terms of target_info.
9273         (set_native_target, get_native_target): Declare.
9274         (target_open_ftype): New.
9275         (add_target, add_target_with_completer)
9276         (add_deprecated_target_alias): Change prototype.
9277         (test_target) <shortname, longname, doc>: Delete.
9278         <info>: New.
9279         * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
9280         add_inf_child_target.
9281         * tracefile-tfile.c (tfile_target_info): New.
9282         (tfile_target) <shortname, longname, doc>: Delete.
9283         <info>: New.
9284         (tfile_target::open): Rename to ...
9285         (tfile_target_open): ... this.
9286         (_initialize_tracefile_tfile): Adjust.
9287         * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
9288         add_inf_child_target.
9289         * windows-nat.c (_initialize_windows_nat): Use
9290         add_inf_child_target.
9291         * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
9292         add_inf_child_target.
9293
9294 2018-05-02  Pedro Alves  <palves@redhat.com>
9295
9296         * linux-nat.h (linux_nat_target) <low_new_thread,
9297         low_delete_thread, low_new_fork, low_forget_process,
9298         low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
9299         New virtual methods.
9300         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
9301         (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
9302         (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
9303         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
9304         (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
9305         Delete.
9306         * linux-fork.c (delete_fork): Adjust to call low method.
9307         * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
9308         (linux_nat_new_fork, linux_nat_forget_process_hook)
9309         (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
9310         (linux_nat_status_is_event):
9311         (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
9312         (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
9313         to call low method.
9314         (sigtrap_is_event): Rename to ...
9315         (linux_nat_target::low_status_is_event): ... this.
9316         (linux_nat_set_status_is_event): Delete.
9317         (save_stop_reason, linux_nat_wait_1)
9318         (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
9319         low methods.
9320         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
9321         (linux_nat_set_new_fork, linux_nat_set_forget_process)
9322         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
9323         (linux_nat_set_prepare_to_resume): Delete.
9324         * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
9325         low virtual methods.
9326         * amd64-linux-nat.c: Likewise.
9327         * arm-linux-nat.c: Likewise.
9328         * i386-linux-nat.c: Likewise.
9329         * ia64-linux-nat.c: Likewise.
9330         * mips-linux-nat.c: Likewise.
9331         * ppc-linux-nat.c: Likewise.
9332         * s390-linux-nat.c: Likewise.
9333         * sparc64-linux-nat.c: Likewise.
9334         * x86-linux-nat.c: Likewise.
9335         * x86-linux-nat.h: Include "nat/x86-linux.h".
9336         (x86_linux_nat_target) <low_new_fork, low_forget_process,
9337         low_prepare_to_resume, low_new_thread, low_delete_thread>:
9338         Override methods.
9339
9340 2018-05-02  Pedro Alves  <palves@redhat.com>
9341
9342         * target.h (target_ops)
9343         <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
9344         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
9345         stopped_by_watchpoint, have_continuable_watchpoint,
9346         stopped_data_address, watchpoint_addr_within_range,
9347         can_accel_watchpoint_condition, can_run, thread_alive,
9348         has_all_memory, has_memory, has_stack, has_registers,
9349         has_execution, can_async_p, is_async_p, supports_non_stop,
9350         always_non_stop_p, can_execute_reverse, supports_multi_process,
9351         supports_enable_disable_tracepoint,
9352         supports_disable_randomization, supports_string_tracing,
9353         supports_evaluation_of_breakpoint_conditions,
9354         can_run_breakpoint_commands, filesystem_is_local,
9355         can_download_tracepoint, get_trace_state_variable_value,
9356         set_trace_notes, get_tib_address, use_agent, can_use_agent,
9357         record_is_replaying, record_will_replay,
9358         augmented_libraries_svr4_read>: Adjust to return bool.
9359         * aarch64-linux-nat.c: All implementations adjusted.
9360         * aix-thread.c: All implementations adjusted.
9361         * arm-linux-nat.c: All implementations adjusted.
9362         * breakpoint.c: All implementations adjusted.
9363         * bsd-kvm.c: All implementations adjusted.
9364         * bsd-uthread.c: All implementations adjusted.
9365         * corelow.c: All implementations adjusted.
9366         * ctf.c: All implementations adjusted.
9367         * darwin-nat.c: All implementations adjusted.
9368         * darwin-nat.h: All implementations adjusted.
9369         * exec.c: All implementations adjusted.
9370         * fbsd-nat.c: All implementations adjusted.
9371         * fbsd-nat.h: All implementations adjusted.
9372         * gnu-nat.c: All implementations adjusted.
9373         * gnu-nat.h: All implementations adjusted.
9374         * go32-nat.c: All implementations adjusted.
9375         * ia64-linux-nat.c: All implementations adjusted.
9376         * inf-child.c: All implementations adjusted.
9377         * inf-child.h: All implementations adjusted.
9378         * inf-ptrace.c: All implementations adjusted.
9379         * inf-ptrace.h: All implementations adjusted.
9380         * linux-nat.c: All implementations adjusted.
9381         * linux-nat.h: All implementations adjusted.
9382         * mips-linux-nat.c: All implementations adjusted.
9383         * nto-procfs.c: All implementations adjusted.
9384         * ppc-linux-nat.c: All implementations adjusted.
9385         * procfs.c: All implementations adjusted.
9386         * ravenscar-thread.c: All implementations adjusted.
9387         * record-btrace.c: All implementations adjusted.
9388         * record-full.c: All implementations adjusted.
9389         * remote-sim.c: All implementations adjusted.
9390         * remote.c: All implementations adjusted.
9391         * s390-linux-nat.c: All implementations adjusted.
9392         * sol-thread.c: All implementations adjusted.
9393         * spu-multiarch.c: All implementations adjusted.
9394         * target-delegates.c: All implementations adjusted.
9395         * target.c: All implementations adjusted.
9396         * target.h: All implementations adjusted.
9397         * tracefile-tfile.c: All implementations adjusted.
9398         * tracefile.c: All implementations adjusted.
9399         * tracefile.h: All implementations adjusted.
9400         * windows-nat.c: All implementations adjusted.
9401         * x86-linux-nat.h: All implementations adjusted.
9402         * x86-nat.h: All implementations adjusted.
9403
9404 2018-05-02  Pedro Alves  <palves@redhat.com>
9405
9406         * make-target-delegates (scan_target_h): Don't trim lines here.
9407         Replace sequences of tabs and/or whitespace with a single
9408         whitespace.
9409         (top level, parsing methods): Trim each line before processing it
9410         here.
9411
9412 2018-05-02  Pedro Alves  <palves@redhat.com>
9413             John Baldwin  <jhb@freebsd.org>
9414
9415         * target.h (enum strata) <debug_stratum>: New.
9416         (struct target_ops) <all delegation methods>: Replace by C++
9417         virtual methods, and drop "to_" prefix.  All references updated
9418         throughout.
9419         <to_shortname, to_longname, to_doc, to_data,
9420         to_have_steppable_watchpoint, to_have_continuable_watchpoint,
9421         to_has_thread_control, to_attach_no_wait>: Delete, replaced by
9422         virtual methods.  All references updated throughout.
9423         <can_attach, supports_terminal_ours, can_create_inferior,
9424         get_thread_control_capabilities, attach_no_wait>: New
9425         virtual methods.
9426         <insert_breakpoint, remove_breakpoint>: Now
9427         TARGET_DEFAULT_NORETURN methods.
9428         <info_proc>: Now returns bool.
9429         <to_magic>: Delete.
9430         (OPS_MAGIC): Delete.
9431         (current_target): Delete.  All references replaced by references
9432         to ...
9433         (target_stack): ... this.  New.
9434         (target_shortname, target_longname): Adjust.
9435         (target_can_run): Now a function declaration.
9436         (default_child_has_all_memory, default_child_has_memory)
9437         (default_child_has_stack, default_child_has_registers)
9438         (default_child_has_execution): Remove target_ops parameter.
9439         (complete_target_initialization): Delete.
9440         (memory_breakpoint_target): New template class.
9441         (test_target_ops): Refactor as a C++ class with virtual methods.
9442         * make-target-delegates (NAME_PART): Tighten.
9443         (POINTER_PART, CP_SYMBOL): New.
9444         (SIMPLE_RETURN_PART): Reimplement.
9445         (VEC_RETURN_PART): Expect less.
9446         (RETURN_PART, VIRTUAL_PART): New.
9447         (METHOD): Adjust to C++ virtual methods.
9448         (scan_target_h): Remove reference to C99.
9449         (dname): Output "target_ops::" prefix.
9450         (write_function_header): Adjust to output a C++ class method.
9451         (write_declaration): New.
9452         (write_delegator): Adjust to output a C++ class method.
9453         (tdname): Output "dummy_target::" prefix.
9454         (write_tdefault, write_debugmethod): Adjust to output a C++ class
9455         method.
9456         (tdefault_names, debug_names): Delete.
9457         (return_types, tdefaults, styles, argtypes_array): New.
9458         (top level): All methods are delegators.
9459         (print_class): New.
9460         (top level): Print dummy_target and debug_target classes.
9461         * target-delegates.c: Regenerate.
9462         * target-debug.h (target_debug_print_enum_info_proc_what)
9463         (target_debug_print_thread_control_capabilities)
9464         (target_debug_print_thread_info_p): New.
9465         * target.c (dummy_target): Delete.
9466         (the_dummy_target, the_debug_target): New.
9467         (target_stack): Now extern.
9468         (set_targetdebug): Push/unpush debug target.
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         (add_target_with_completer): No longer call
9474         complete_target_initialization.
9475         (target_supports_terminal_ours): Use regular delegation.
9476         (update_current_target): Delete.
9477         (push_target): No longer check magic number.  Don't call
9478         update_current_target.
9479         (unpush_target): Don't call update_current_target.
9480         (target_is_pushed): No longer check magic number.
9481         (target_require_runnable): Skip for all stratums over
9482         process_stratum.
9483         (target_ops::info_proc): New.
9484         (target_info_proc): Use find_target_at and
9485         find_default_run_target.
9486         (target_supports_disable_randomization): Use regular delegation.
9487         (target_get_osdata): Use find_target_at.
9488         (target_ops::open, target_ops::close, target_ops::can_attach)
9489         (target_ops::attach, target_ops::can_create_inferior)
9490         (target_ops::create_inferior, target_ops::can_run)
9491         (target_can_run): New.
9492         (default_fileio_target): Use regular delegation.
9493         (target_ops::fileio_open, target_ops::fileio_pwrite)
9494         (target_ops::fileio_pread, target_ops::fileio_fstat)
9495         (target_ops::fileio_close, target_ops::fileio_unlink)
9496         (target_ops::fileio_readlink): New.
9497         (target_fileio_open_1, target_fileio_unlink)
9498         (target_fileio_readlink): Always call the target method.  Handle
9499         FILEIO_ENOSYS.
9500         (return_zero, return_zero_has_execution): Delete.
9501         (init_dummy_target): Delete.
9502         (dummy_target::dummy_target, dummy_target::shortname)
9503         (dummy_target::longname, dummy_target::doc)
9504         (debug_target::debug_target, debug_target::shortname)
9505         (debug_target::longname, debug_target::doc): New.
9506         (target_supports_delete_record): Use regular delegation.
9507         (setup_target_debug): Delete.
9508         (maintenance_print_target_stack): Skip debug_stratum.
9509         (initialize_targets): Instantiate the_dummy_target and
9510         the_debug_target.
9511         * auxv.c (target_auxv_parse): Remove 'ops' parameter.  Adjust to
9512         use target_stack.
9513         (target_auxv_search, fprint_target_auxv): Adjust.
9514         (info_auxv_command): Adjust to use target_stack.
9515         * auxv.h (target_auxv_parse): Remove 'ops' parameter.
9516         * exceptions.c (print_flush): Handle a NULL target_stack.
9517         * regcache.c (target_ops_no_register): Refactor as class with
9518         virtual methods.
9519
9520         * exec.c (exec_target): New class.
9521         (exec_ops): Now an exec_target.
9522         (exec_open, exec_close_1, exec_get_section_table)
9523         (exec_xfer_partial, exec_files_info, exec_has_memory)
9524         (exec_make_note_section): Refactor as exec_target methods.
9525         (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
9526         Delete.
9527         (exec_target::find_memory_regions): New.
9528         (_initialize_exec): Don't call init_exec_ops.
9529         * gdbcore.h (exec_file_clear): Delete.
9530
9531         * corefile.c (core_target): Delete.
9532         (core_file_command): Adjust.
9533         * corelow.c (core_target): New class.
9534         (the_core_target): New.
9535         (core_close): Remove target_ops parameter.
9536         (core_close_cleanup): Adjust.
9537         (core_target::close): New.
9538         (core_open, core_detach, get_core_registers, core_files_info)
9539         (core_xfer_partial, core_thread_alive, core_read_description)
9540         (core_pid_to_str, core_thread_name, core_has_memory)
9541         (core_has_stack, core_has_registers, core_info_proc): Rework as
9542         core_target methods.
9543         (ignore, core_remove_breakpoint, init_core_ops): Delete.
9544         (_initialize_corelow): Initialize the_core_target.
9545         * gdbcore.h (core_target): Delete.
9546         (the_core_target): New.
9547
9548         * ctf.c: (ctf_target): New class.
9549         (ctf_ops): Now a ctf_target.
9550         (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
9551         (ctf_xfer_partial, ctf_get_trace_state_variable_value)
9552         (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
9553         methods.
9554         (init_ctf_ops): Delete.
9555         (_initialize_ctf): Don't call it.
9556         * tracefile-tfile.c (tfile_target): New class.
9557         (tfile_ops): Now a tfile_target.
9558         (tfile_open, tfile_close, tfile_files_info)
9559         (tfile_get_tracepoint_status, tfile_trace_find)
9560         (tfile_fetch_registers, tfile_xfer_partial)
9561         (tfile_get_trace_state_variable_value, tfile_traceframe_info):
9562         Refactor as tfile_target methods.
9563         (tfile_xfer_partial_features): Remove target_ops parameter.
9564         (init_tfile_ops): Delete.
9565         (_initialize_tracefile_tfile): Don't call it.
9566         * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
9567         (tracefile_has_stack, tracefile_has_registers)
9568         (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
9569         tracefile_target methods.
9570         (init_tracefile_ops): Delete.
9571         (tracefile_target::tracefile_target): New.
9572         * tracefile.h: Include "target.h".
9573         (tracefile_target): New class.
9574         (init_tracefile_ops): Delete.
9575
9576         * spu-multiarch.c (spu_multiarch_target): New class.
9577         (spu_ops): Now a spu_multiarch_target.
9578         (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
9579         (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
9580         (spu_search_memory, spu_mourn_inferior): Refactor as
9581         spu_multiarch_target methods.
9582         (init_spu_ops): Delete.
9583         (_initialize_spu_multiarch): Remove references to init_spu_ops,
9584         complete_target_initialization.
9585
9586         * ravenscar-thread.c (ravenscar_thread_target): New class.
9587         (ravenscar_ops): Now a ravenscar_thread_target.
9588         (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
9589         (ravenscar_thread_alive, ravenscar_pid_to_str)
9590         (ravenscar_fetch_registers, ravenscar_store_registers)
9591         (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
9592         (ravenscar_stopped_by_hw_breakpoint)
9593         (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
9594         (ravenscar_mourn_inferior, ravenscar_core_of_thread)
9595         (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
9596         methods.
9597         (init_ravenscar_thread_ops): Delete.
9598         (_initialize_ravenscar): Remove references to
9599         init_ravenscar_thread_ops and complete_target_initialization.
9600
9601         * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
9602         (bsd_uthread_target): New class.
9603         (bsd_uthread_ops): Now a bsd_uthread_target.
9604         (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
9605         (bsd_uthread_close, bsd_uthread_mourn_inferior)
9606         (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
9607         (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
9608         (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
9609         (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
9610         (bsd_uthread_target): Delete function.
9611         (_initialize_bsd_uthread): Remove reference to
9612         complete_target_initialization.
9613
9614         * bfd-target.c (target_bfd_data): Delete.  Fields folded into ...
9615         (target_bfd): ... this new class.
9616         (target_bfd_xfer_partial, target_bfd_get_section_table)
9617         (target_bfd_close): Refactor as target_bfd methods.
9618         (target_bfd::~target_bfd): New.
9619         (target_bfd_reopen): Adjust.
9620         (target_bfd::close): New.
9621
9622         * record-btrace.c (record_btrace_target): New class.
9623         (record_btrace_ops): Now a record_btrace_target.
9624         (record_btrace_open, record_btrace_stop_recording)
9625         (record_btrace_disconnect, record_btrace_close)
9626         (record_btrace_async, record_btrace_info)
9627         (record_btrace_insn_history, record_btrace_insn_history_range)
9628         (record_btrace_insn_history_from, record_btrace_call_history)
9629         (record_btrace_call_history_range)
9630         (record_btrace_call_history_from, record_btrace_record_method)
9631         (record_btrace_is_replaying, record_btrace_will_replay)
9632         (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
9633         (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
9634         (record_btrace_store_registers, record_btrace_prepare_to_store)
9635         (record_btrace_to_get_unwinder)
9636         (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
9637         (record_btrace_commit_resume, record_btrace_wait)
9638         (record_btrace_stop, record_btrace_can_execute_reverse)
9639         (record_btrace_stopped_by_sw_breakpoint)
9640         (record_btrace_supports_stopped_by_sw_breakpoint)
9641         (record_btrace_stopped_by_hw_breakpoint)
9642         (record_btrace_supports_stopped_by_hw_breakpoint)
9643         (record_btrace_update_thread_list, record_btrace_thread_alive)
9644         (record_btrace_goto_begin, record_btrace_goto_end)
9645         (record_btrace_goto, record_btrace_stop_replaying_all)
9646         (record_btrace_execution_direction)
9647         (record_btrace_prepare_to_generate_core)
9648         (record_btrace_done_generating_core): Refactor as
9649         record_btrace_target methods.
9650         (init_record_btrace_ops): Delete.
9651         (_initialize_record_btrace): Remove reference to
9652         init_record_btrace_ops.
9653         * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
9654         the execution_direction global.
9655         (record_full_base_target, record_full_target)
9656         (record_full_core_target): New classes.
9657         (record_full_ops): Now a record_full_target.
9658         (record_full_core_ops): Now a record_full_core_target.
9659         (record_full_target::detach, record_full_target::disconnect)
9660         (record_full_core_target::disconnect)
9661         (record_full_target::mourn_inferior, record_full_target::kill):
9662         New.
9663         (record_full_open, record_full_close, record_full_async): Refactor
9664         as methods of the record_full_base_target class.
9665         (record_full_resume, record_full_commit_resume): Refactor
9666         as methods of the record_full_target class.
9667         (record_full_wait, record_full_stopped_by_watchpoint)
9668         (record_full_stopped_data_address)
9669         (record_full_stopped_by_sw_breakpoint)
9670         (record_full_supports_stopped_by_sw_breakpoint)
9671         (record_full_stopped_by_hw_breakpoint)
9672         (record_full_supports_stopped_by_hw_breakpoint): Refactor as
9673         methods of the record_full_base_target class.
9674         (record_full_store_registers, record_full_xfer_partial)
9675         (record_full_insert_breakpoint, record_full_remove_breakpoint):
9676         Refactor as methods of the record_full_target class.
9677         (record_full_can_execute_reverse, record_full_get_bookmark)
9678         (record_full_goto_bookmark, record_full_execution_direction)
9679         (record_full_record_method, record_full_info, record_full_delete)
9680         (record_full_is_replaying, record_full_will_replay)
9681         (record_full_goto_begin, record_full_goto_end, record_full_goto)
9682         (record_full_stop_replaying): Refactor as methods of the
9683         record_full_base_target class.
9684         (record_full_core_resume, record_full_core_kill)
9685         (record_full_core_fetch_registers)
9686         (record_full_core_prepare_to_store)
9687         (record_full_core_store_registers, record_full_core_xfer_partial)
9688         (record_full_core_insert_breakpoint)
9689         (record_full_core_remove_breakpoint)
9690         (record_full_core_has_execution): Refactor
9691         as methods of the record_full_core_target class.
9692         (record_full_base_target::supports_delete_record): New.
9693         (init_record_full_ops): Delete.
9694         (init_record_full_core_ops): Delete.
9695         (record_full_save): Refactor as method of the
9696         record_full_base_target class.
9697         (_initialize_record_full): Remove references to
9698         init_record_full_ops and init_record_full_core_ops.
9699
9700         * remote.c (remote_target, extended_remote_target): New classes.
9701         (remote_ops): Now a remote_target.
9702         (extended_remote_ops): Now an extended_remote_target.
9703         (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
9704         (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
9705         (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
9706         (remote_pass_signals, remote_set_syscall_catchpoint)
9707         (remote_program_signals, )
9708         (remote_thread_always_alive): Remove target_ops parameter.
9709         (remote_thread_alive, remote_thread_name)
9710         (remote_update_thread_list, remote_threads_extra_info)
9711         (remote_static_tracepoint_marker_at)
9712         (remote_static_tracepoint_markers_by_strid)
9713         (remote_get_ada_task_ptid, remote_close, remote_start_remote)
9714         (remote_open): Refactor as methods of remote_target.
9715         (extended_remote_open, extended_remote_detach)
9716         (extended_remote_attach, extended_remote_post_attach):
9717         (extended_remote_supports_disable_randomization)
9718         (extended_remote_create_inferior): : Refactor as method of
9719         extended_remote_target.
9720         (remote_set_permissions, remote_open_1, remote_detach)
9721         (remote_follow_fork, remote_follow_exec, remote_disconnect)
9722         (remote_resume, remote_commit_resume, remote_stop)
9723         (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
9724         (remote_terminal_ours, remote_wait, remote_fetch_registers)
9725         (remote_prepare_to_store, remote_store_registers)
9726         (remote_flash_erase, remote_flash_done, remote_files_info)
9727         (remote_kill, remote_mourn, remote_insert_breakpoint)
9728         (remote_remove_breakpoint, remote_insert_watchpoint)
9729         (remote_watchpoint_addr_within_range)
9730         (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
9731         (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
9732         (remote_supports_stopped_by_sw_breakpoint)
9733         (remote_stopped_by_hw_breakpoint)
9734         (remote_supports_stopped_by_hw_breakpoint)
9735         (remote_stopped_by_watchpoint, remote_stopped_data_address)
9736         (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
9737         (remote_verify_memory): Refactor as methods of remote_target.
9738         (remote_write_qxfer, remote_read_qxfer): Remove target_ops
9739         parameter.
9740         (remote_xfer_partial, remote_get_memory_xfer_limit)
9741         (remote_search_memory, remote_rcmd, remote_memory_map)
9742         (remote_pid_to_str, remote_get_thread_local_address)
9743         (remote_get_tib_address, remote_read_description): Refactor as
9744         methods of remote_target.
9745         (remote_target::fileio_open, remote_target::fileio_pwrite)
9746         (remote_target::fileio_pread, remote_target::fileio_close): New.
9747         (remote_hostio_readlink, remote_hostio_fstat)
9748         (remote_filesystem_is_local, remote_can_execute_reverse)
9749         (remote_supports_non_stop, remote_supports_disable_randomization)
9750         (remote_supports_multi_process, remote_supports_cond_breakpoints)
9751         (remote_supports_enable_disable_tracepoint)
9752         (remote_supports_string_tracing)
9753         (remote_can_run_breakpoint_commands, remote_trace_init)
9754         (remote_download_tracepoint, remote_can_download_tracepoint)
9755         (remote_download_trace_state_variable, remote_enable_tracepoint)
9756         (remote_disable_tracepoint, remote_trace_set_readonly_regions)
9757         (remote_trace_start, remote_get_trace_status)
9758         (remote_get_tracepoint_status, remote_trace_stop)
9759         (remote_trace_find, remote_get_trace_state_variable_value)
9760         (remote_save_trace_data, remote_get_raw_trace_data)
9761         (remote_set_disconnected_tracing, remote_core_of_thread)
9762         (remote_set_circular_trace_buffer, remote_traceframe_info)
9763         (remote_get_min_fast_tracepoint_insn_len)
9764         (remote_set_trace_buffer_size, remote_set_trace_notes)
9765         (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
9766         (remote_disable_btrace, remote_teardown_btrace)
9767         (remote_read_btrace, remote_btrace_conf)
9768         (remote_augmented_libraries_svr4_read, remote_load)
9769         (remote_pid_to_exec_file, remote_can_do_single_step)
9770         (remote_execution_direction, remote_thread_handle_to_thread_info):
9771         Refactor as methods of remote_target.
9772         (init_remote_ops, init_extended_remote_ops): Delete.
9773         (remote_can_async_p, remote_is_async_p, remote_async)
9774         (remote_thread_events, remote_upload_tracepoints)
9775         (remote_upload_trace_state_variables): Refactor as methods of
9776         remote_target.
9777         (_initialize_remote): Remove references to init_remote_ops and
9778         init_extended_remote_ops.
9779
9780         * remote-sim.c (gdbsim_target): New class.
9781         (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
9782         (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
9783         (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
9784         (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
9785         (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
9786         (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
9787         Refactor as methods of gdbsim_target.
9788         (gdbsim_ops): Now a gdbsim_target.
9789         (init_gdbsim_ops): Delete.
9790         (gdbsim_cntrl_c): Adjust.
9791         (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
9792
9793         * amd64-linux-nat.c (amd64_linux_nat_target): New class.
9794         (the_amd64_linux_nat_target): New.
9795         (amd64_linux_fetch_inferior_registers)
9796         (amd64_linux_store_inferior_registers): Refactor as methods of
9797         amd64_linux_nat_target.
9798         (_initialize_amd64_linux_nat): Adjust.  Set linux_target.
9799         * i386-linux-nat.c: Don't include "linux-nat.h".
9800         (i386_linux_nat_target): New class.
9801         (the_i386_linux_nat_target): New.
9802         (i386_linux_fetch_inferior_registers)
9803         (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
9804         as methods of i386_linux_nat_target.
9805         (_initialize_i386_linux_nat): Adjust.  Set linux_target.
9806         * inf-child.c (inf_child_ops): Delete.
9807         (inf_child_fetch_inferior_registers)
9808         (inf_child_store_inferior_registers): Delete.
9809         (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
9810         methods of inf_child_target.
9811         (inf_child_target::supports_terminal_ours)
9812         (inf_child_target::terminal_init)
9813         (inf_child_target::terminal_inferior)
9814         (inf_child_target::terminal_ours_for_output)
9815         (inf_child_target::terminal_ours, inf_child_target::interrupt)
9816         (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
9817         New.
9818         (inf_child_open, inf_child_disconnect, inf_child_close)
9819         (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
9820         (inf_child_post_startup_inferior, inf_child_can_run)
9821         (inf_child_pid_to_exec_file): Refactor as methods of
9822         inf_child_target.
9823         (inf_child_follow_fork): Delete.
9824         (inf_child_target::can_create_inferior)
9825         (inf_child_target::can_attach): New.
9826         (inf_child_target::has_all_memory, inf_child_target::has_memory)
9827         (inf_child_target::has_stack, inf_child_target::has_registers)
9828         (inf_child_target::has_execution): New.
9829         (inf_child_fileio_open, inf_child_fileio_pwrite)
9830         (inf_child_fileio_pread, inf_child_fileio_fstat)
9831         (inf_child_fileio_close, inf_child_fileio_unlink)
9832         (inf_child_fileio_readlink, inf_child_use_agent)
9833         (inf_child_can_use_agent): Refactor as methods of
9834         inf_child_target.
9835         (return_zero, inf_child_target): Delete.
9836         (inf_child_target::inf_child_target): New.
9837         * inf-child.h: Include "target.h".
9838         (inf_child_target): Delete function prototype.
9839         (inf_child_target): New class.
9840         (inf_child_open_target, inf_child_mourn_inferior)
9841         (inf_child_maybe_unpush_target): Delete.
9842         * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
9843         (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
9844         (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
9845         (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
9846         (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
9847         (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
9848         (inf_ptrace_wait, inf_ptrace_xfer_partial)
9849         (inf_ptrace_thread_alive, inf_ptrace_files_info)
9850         (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
9851         methods of inf_ptrace_target.
9852         (inf_ptrace_target): Delete function.
9853         * inf-ptrace.h: Include "inf-child.h".
9854         (inf_ptrace_target): Delete function declaration.
9855         (inf_ptrace_target): New class.
9856         (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
9857         * linux-nat.c (linux_target): New.
9858         (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
9859         (linux_nat_target::~linux_nat_target): New.
9860         (linux_child_post_attach, linux_child_post_startup_inferior)
9861         (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
9862         (linux_child_remove_fork_catchpoint)
9863         (linux_child_insert_vfork_catchpoint)
9864         (linux_child_remove_vfork_catchpoint)
9865         (linux_child_insert_exec_catchpoint)
9866         (linux_child_remove_exec_catchpoint)
9867         (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
9868         (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
9869         (linux_nat_resume, linux_nat_stopped_by_watchpoint)
9870         (linux_nat_stopped_data_address)
9871         (linux_nat_stopped_by_sw_breakpoint)
9872         (linux_nat_supports_stopped_by_sw_breakpoint)
9873         (linux_nat_stopped_by_hw_breakpoint)
9874         (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
9875         (linux_nat_kill, linux_nat_mourn_inferior)
9876         (linux_nat_xfer_partial, linux_nat_thread_alive)
9877         (linux_nat_update_thread_list, linux_nat_pid_to_str)
9878         (linux_nat_thread_name, linux_child_pid_to_exec_file)
9879         (linux_child_static_tracepoint_markers_by_strid)
9880         (linux_nat_is_async_p, linux_nat_can_async_p)
9881         (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
9882         (linux_nat_supports_multi_process)
9883         (linux_nat_supports_disable_randomization, linux_nat_async)
9884         (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
9885         (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
9886         (linux_nat_fileio_open, linux_nat_fileio_readlink)
9887         (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
9888         methods of linux_nat_target.
9889         (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
9890         (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
9891         parameter.
9892         (check_stopped_by_watchpoint): Adjust.
9893         (linux_xfer_partial): Delete.
9894         (linux_target_install_ops, linux_target, linux_nat_add_target):
9895         Delete.
9896         (linux_nat_target::linux_nat_target): New.
9897         * linux-nat.h: Include "inf-ptrace.h".
9898         (linux_nat_target): New.
9899         (linux_target, linux_target_install_ops, linux_nat_add_target):
9900         Delete function declarations.
9901         (linux_target): Declare global.
9902         * linux-thread-db.c (thread_db_target): New.
9903         (thread_db_target::thread_db_target): New.
9904         (thread_db_ops): Delete.
9905         (the_thread_db_target): New.
9906         (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
9907         (thread_db_update_thread_list, thread_db_pid_to_str)
9908         (thread_db_extra_thread_info)
9909         (thread_db_thread_handle_to_thread_info)
9910         (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
9911         (thread_db_resume): Refactor as methods of thread_db_target.
9912         (init_thread_db_ops): Delete.
9913         (_initialize_thread_db): Remove reference to init_thread_db_ops.
9914         * x86-linux-nat.c: Don't include "linux-nat.h".
9915         (super_post_startup_inferior): Delete.
9916         (x86_linux_nat_target::~x86_linux_nat_target): New.
9917         (x86_linux_child_post_startup_inferior)
9918         (x86_linux_read_description, x86_linux_enable_btrace)
9919         (x86_linux_disable_btrace, x86_linux_teardown_btrace)
9920         (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
9921         methods of x86_linux_nat_target.
9922         (x86_linux_create_target): Delete.  Bits folded ...
9923         (x86_linux_add_target): ... here.  Now takes a linux_nat_target
9924         pointer.
9925         * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
9926         (x86_linux_nat_target): New class.
9927         (x86_linux_create_target): Delete.
9928         (x86_linux_add_target): Now takes a linux_nat_target pointer.
9929         * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
9930         (x86_region_ok_for_watchpoint, x86_stopped_data_address)
9931         (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
9932         (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
9933         (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
9934         make extern.
9935         (x86_use_watchpoints): Delete.
9936         * x86-nat.h: Include "breakpoint.h" and "target.h".
9937         (x86_use_watchpoints): Delete.
9938         (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
9939         (x86_stopped_by_watchpoint, x86_stopped_data_address)
9940         (x86_insert_watchpoint, x86_remove_watchpoint)
9941         (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
9942         (x86_stopped_by_hw_breakpoint): New declarations.
9943         (x86_nat_target): New template class.
9944
9945         * ppc-linux-nat.c (ppc_linux_nat_target): New class.
9946         (the_ppc_linux_nat_target): New.
9947         (ppc_linux_fetch_inferior_registers)
9948         (ppc_linux_can_use_hw_breakpoint)
9949         (ppc_linux_region_ok_for_hw_watchpoint)
9950         (ppc_linux_ranged_break_num_registers)
9951         (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
9952         (ppc_linux_insert_mask_watchpoint)
9953         (ppc_linux_remove_mask_watchpoint)
9954         (ppc_linux_can_accel_watchpoint_condition)
9955         (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
9956         (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
9957         (ppc_linux_watchpoint_addr_within_range)
9958         (ppc_linux_masked_watch_num_registers)
9959         (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
9960         (ppc_linux_read_description): Refactor as methods of
9961         ppc_linux_nat_target.
9962         (_initialize_ppc_linux_nat): Adjust.  Set linux_target.
9963
9964         * procfs.c (procfs_xfer_partial): Delete forward declaration.
9965         (procfs_target): New class.
9966         (the_procfs_target): New.
9967         (procfs_target): Delete function.
9968         (procfs_auxv_parse, procfs_attach, procfs_detach)
9969         (procfs_fetch_registers, procfs_store_registers, procfs_wait)
9970         (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
9971         (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
9972         (procfs_create_inferior, procfs_update_thread_list)
9973         (procfs_thread_alive, procfs_pid_to_str)
9974         (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
9975         (procfs_stopped_data_address, procfs_insert_watchpoint)
9976         (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
9977         (proc_find_memory_regions, procfs_info_proc)
9978         (procfs_make_note_section): Refactor as methods of procfs_target.
9979         (_initialize_procfs): Adjust.
9980         * sol-thread.c (sol_thread_target): New class.
9981         (sol_thread_ops): Now a sol_thread_target.
9982         (sol_thread_detach, sol_thread_resume, sol_thread_wait)
9983         (sol_thread_fetch_registers, sol_thread_store_registers)
9984         (sol_thread_xfer_partial, sol_thread_mourn_inferior)
9985         (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
9986         (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
9987         (init_sol_thread_ops): Delete.
9988         (_initialize_sol_thread): Adjust.  Remove references to
9989         init_sol_thread_ops and complete_target_initialization.
9990
9991         * windows-nat.c (windows_nat_target): New class.
9992         (windows_fetch_inferior_registers)
9993         (windows_store_inferior_registers, windows_resume, windows_wait)
9994         (windows_attach, windows_detach, windows_pid_to_exec_file)
9995         (windows_files_info, windows_create_inferior)
9996         (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
9997         (windows_close, windows_pid_to_str, windows_xfer_partial)
9998         (windows_get_tib_address, windows_get_ada_task_ptid)
9999         (windows_thread_name, windows_thread_alive): Refactor as
10000         windows_nat_target methods.
10001         (do_initial_windows_stuff): Adjust.
10002         (windows_target): Delete function.
10003         (_initialize_windows_nat): Adjust.
10004
10005         * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
10006         (darwin_mourn_inferior, darwin_kill_inferior)
10007         (darwin_create_inferior, darwin_attach, darwin_detach)
10008         (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
10009         (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
10010         (darwin_supports_multi_process): Refactor as darwin_nat_target
10011         methods.
10012         (darwin_resume_to, darwin_files_info): Delete.
10013         (_initialize_darwin_inferior): Rename to ...
10014         (_initialize_darwin_nat): ... this.  Adjust to C++ification.
10015         * darwin-nat.h: Include "inf-child.h".
10016         (darwin_nat_target): New class.
10017         (darwin_complete_target): Delete.
10018         * i386-darwin-nat.c (i386_darwin_nat_target): New class.
10019         (darwin_target): New.
10020         (i386_darwin_fetch_inferior_registers)
10021         (i386_darwin_store_inferior_registers): Refactor as methods of
10022         darwin_nat_target.
10023         (darwin_complete_target): Delete, with ...
10024         (_initialize_i386_darwin_nat): ... bits factored out here.
10025
10026         * alpha-linux-nat.c (alpha_linux_nat_target): New class.
10027         (the_alpha_linux_nat_target): New.
10028         (alpha_linux_register_u_offset): Refactor as
10029         alpha_linux_nat_target method.
10030         (_initialize_alpha_linux_nat): Adjust.
10031         * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
10032         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
10033         (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
10034         methods of linux_nat_trad_target.
10035         (linux_trad_target): Delete.
10036         * linux-nat-trad.h (linux_trad_target): Delete function.
10037         (linux_nat_trad_target): New class.
10038         * mips-linux-nat.c (mips_linux_nat_target): New class.
10039         (super_fetch_registers, super_store_registers, super_close):
10040         Delete.
10041         (the_mips_linux_nat_target): New.
10042         (mips64_linux_regsets_fetch_registers)
10043         (mips64_linux_regsets_store_registers)
10044         (mips64_linux_fetch_registers, mips64_linux_store_registers)
10045         (mips_linux_register_u_offset, mips_linux_read_description)
10046         (mips_linux_can_use_hw_breakpoint)
10047         (mips_linux_stopped_by_watchpoint)
10048         (mips_linux_stopped_data_address)
10049         (mips_linux_region_ok_for_hw_watchpoint)
10050         (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
10051         (mips_linux_close): Refactor as methods of mips_linux_nat.
10052         (_initialize_mips_linux_nat): Adjust to C++ification.
10053
10054         * aix-thread.c (aix_thread_target): New class.
10055         (aix_thread_ops): Now an aix_thread_target.
10056         (aix_thread_detach, aix_thread_resume, aix_thread_wait)
10057         (aix_thread_fetch_registers, aix_thread_store_registers)
10058         (aix_thread_xfer_partial, aix_thread_mourn_inferior)
10059         (aix_thread_thread_alive, aix_thread_pid_to_str)
10060         (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
10061         Refactor as methods of aix_thread_target.
10062         (init_aix_thread_ops): Delete.
10063         (_initialize_aix_thread): Remove references to init_aix_thread_ops
10064         and complete_target_initialization.
10065         * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
10066         (rs6000_nat_target): New class.
10067         (the_rs6000_nat_target): New.
10068         (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
10069         (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
10070         (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
10071         (super_create_inferior): Delete.
10072         (_initialize_rs6000_nat): Adjust to C++ification.
10073
10074         * arm-linux-nat.c (arm_linux_nat_target): New class.
10075         (the_arm_linux_nat_target): New.
10076         (arm_linux_fetch_inferior_registers)
10077         (arm_linux_store_inferior_registers, arm_linux_read_description)
10078         (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
10079         (arm_linux_remove_hw_breakpoint)
10080         (arm_linux_region_ok_for_hw_watchpoint)
10081         (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
10082         (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
10083         (arm_linux_watchpoint_addr_within_range): Refactor as methods of
10084         arm_linux_nat_target.
10085         (_initialize_arm_linux_nat): Adjust to C++ification.
10086
10087         * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
10088         (the_aarch64_linux_nat_target): New.
10089         (aarch64_linux_fetch_inferior_registers)
10090         (aarch64_linux_store_inferior_registers)
10091         (aarch64_linux_child_post_startup_inferior)
10092         (aarch64_linux_read_description)
10093         (aarch64_linux_can_use_hw_breakpoint)
10094         (aarch64_linux_insert_hw_breakpoint)
10095         (aarch64_linux_remove_hw_breakpoint)
10096         (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
10097         (aarch64_linux_region_ok_for_hw_watchpoint)
10098         (aarch64_linux_stopped_data_address)
10099         (aarch64_linux_stopped_by_watchpoint)
10100         (aarch64_linux_watchpoint_addr_within_range)
10101         (aarch64_linux_can_do_single_step): Refactor as methods of
10102         aarch64_linux_nat_target.
10103         (super_post_startup_inferior): Delete.
10104         (_initialize_aarch64_linux_nat): Adjust to C++ification.
10105
10106         * hppa-linux-nat.c (hppa_linux_nat_target): New class.
10107         (the_hppa_linux_nat_target): New.
10108         (hppa_linux_fetch_inferior_registers)
10109         (hppa_linux_store_inferior_registers): Refactor as methods of
10110         hppa_linux_nat_target.
10111         (_initialize_hppa_linux_nat): Adjust to C++ification.
10112
10113         * ia64-linux-nat.c (ia64_linux_nat_target): New class.
10114         (the_ia64_linux_nat_target): New.
10115         (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
10116         (ia64_linux_stopped_data_address)
10117         (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
10118         (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
10119         ia64_linux_nat_target methods.
10120         (super_xfer_partial): Delete.
10121         (_initialize_ia64_linux_nat): Adjust to C++ification.
10122
10123         * m32r-linux-nat.c (m32r_linux_nat_target): New class.
10124         (the_m32r_linux_nat_target): New.
10125         (m32r_linux_fetch_inferior_registers)
10126         (m32r_linux_store_inferior_registers): Refactor as
10127         m32r_linux_nat_target methods.
10128         (_initialize_m32r_linux_nat): Adjust to C++ification.
10129
10130         * m68k-linux-nat.c (m68k_linux_nat_target): New class.
10131         (the_m68k_linux_nat_target): New.
10132         (m68k_linux_fetch_inferior_registers)
10133         (m68k_linux_store_inferior_registers): Refactor as
10134         m68k_linux_nat_target methods.
10135         (_initialize_m68k_linux_nat): Adjust to C++ification.
10136
10137         * s390-linux-nat.c (s390_linux_nat_target): New class.
10138         (the_s390_linux_nat_target): New.
10139         (s390_linux_fetch_inferior_registers)
10140         (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
10141         (s390_insert_watchpoint, s390_remove_watchpoint)
10142         (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
10143         (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
10144         (s390_auxv_parse, s390_read_description): Refactor as methods of
10145         s390_linux_nat_target.
10146         (_initialize_s390_nat): Adjust to C++ification.
10147
10148         * sparc-linux-nat.c (sparc_linux_nat_target): New class.
10149         (the_sparc_linux_nat_target): New.
10150         (_initialize_sparc_linux_nat): Adjust to C++ification.
10151         * sparc-nat.c (sparc_fetch_inferior_registers)
10152         (sparc_store_inferior_registers): Remove target_ops parameter.
10153         * sparc-nat.h (sparc_fetch_inferior_registers)
10154         (sparc_store_inferior_registers): Remove target_ops parameter.
10155         * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
10156         (the_sparc64_linux_nat_target): New.
10157         (_initialize_sparc64_linux_nat): Adjust to C++ification.
10158
10159         * spu-linux-nat.c (spu_linux_nat_target): New class.
10160         (the_spu_linux_nat_target): New.
10161         (spu_child_post_startup_inferior, spu_child_post_attach)
10162         (spu_child_wait, spu_fetch_inferior_registers)
10163         (spu_store_inferior_registers, spu_xfer_partial)
10164         (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
10165         methods.
10166         (_initialize_spu_nat): Adjust to C++ification.
10167
10168         * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
10169         (the_tilegx_linux_nat_target): New.
10170         (fetch_inferior_registers, store_inferior_registers):
10171         Refactor as methods.
10172         (_initialize_tile_linux_nat): Adjust to C++ification.
10173
10174         * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
10175         (the_xtensa_linux_nat_target): New.
10176         (xtensa_linux_fetch_inferior_registers)
10177         (xtensa_linux_store_inferior_registers): Refactor as
10178         xtensa_linux_nat_target methods.
10179         (_initialize_xtensa_linux_nat): Adjust to C++ification.
10180
10181         * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
10182         (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
10183         (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
10184         (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
10185         (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
10186         (fbsd_stopped_by_sw_breakpoint)
10187         (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
10188         (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
10189         (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
10190         (fbsd_post_startup_inferior, fbsd_post_attach)
10191         (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
10192         (fbsd_set_syscall_catchpoint)
10193         (super_xfer_partial, super_resume, super_wait)
10194         (fbsd_supports_stopped_by_hw_breakpoint): Delete.
10195         (fbsd_handle_debug_trap): Remove target_ops parameter.
10196         (fbsd_nat_add_target): Delete.
10197         * fbsd-nat.h: Include "inf-ptrace.h".
10198         (fbsd_nat_add_target): Delete.
10199         (USE_SIGTRAP_SIGINFO): Define.
10200         (fbsd_nat_target): New class.
10201
10202         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
10203         (amd64bsd_store_inferior_registers): Remove target_ops parameter.
10204         (amd64bsd_target): Delete.
10205         * amd64-bsd-nat.h: New file.
10206         * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
10207         "x86-bsd-nat.h".
10208         (amd64_fbsd_nat_target): New class.
10209         (the_amd64_fbsd_nat_target): New.
10210         (amd64fbsd_read_description): Refactor as method of
10211         amd64_fbsd_nat_target.
10212         (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
10213         (_initialize_amd64fbsd_nat): Adjust to C++ification.
10214         * amd64-nat.h (amd64bsd_target): Delete function declaration.
10215         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
10216         (i386bsd_store_inferior_registers): Remove target_ops parameter.
10217         (i386bsd_target): Delete.
10218         * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
10219         (i386bsd_fetch_inferior_registers)
10220         (i386bsd_store_inferior_registers): Declare.
10221         (i386_bsd_nat_target): New class.
10222         * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
10223         (the_i386_fbsd_nat_target): New.
10224         (i386fbsd_resume, i386fbsd_read_description): Refactor as
10225         i386_fbsd_nat_target methods.
10226         (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
10227         (_initialize_i386fbsd_nat): Adjust to C++ification.
10228         * x86-bsd-nat.c (super_mourn_inferior): Delete.
10229         (x86bsd_mourn_inferior, x86bsd_target): Delete.
10230         (_initialize_x86_bsd_nat): Adjust to C++ification.
10231         * x86-bsd-nat.h: Include "x86-nat.h".
10232         (x86bsd_target): Delete declaration.
10233         (x86bsd_nat_target): New class.
10234
10235         * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
10236         (the_aarch64_fbsd_nat_target): New.
10237         (aarch64_fbsd_fetch_inferior_registers)
10238         (aarch64_fbsd_store_inferior_registers): Refactor as methods of
10239         aarch64_fbsd_nat_target.
10240         (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
10241         * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
10242         (the_alpha_bsd_nat_target): New.
10243         (alphabsd_fetch_inferior_registers)
10244         (alphabsd_store_inferior_registers): Refactor as
10245         alpha_bsd_nat_target methods.
10246         (_initialize_alphabsd_nat): Refactor as methods of
10247         alpha_bsd_nat_target.
10248         * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
10249         (the_amd64_nbsd_nat_target): New.
10250         (_initialize_amd64nbsd_nat): Adjust to C++ification.
10251         * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
10252         (the_amd64_obsd_nat_target): New.
10253         (_initialize_amd64obsd_nat): Adjust to C++ification.
10254         * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
10255         (the_arm_fbsd_nat_target): New.
10256         (arm_fbsd_fetch_inferior_registers)
10257         (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
10258         (_initialize_arm_fbsd_nat): Refactor as methods of
10259         arm_fbsd_nat_target.
10260         (_initialize_arm_fbsd_nat): Adjust to C++ification.
10261         * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
10262         (the_arm_netbsd_nat_target): New.
10263         (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
10264         arm_netbsd_nat_target.
10265         (_initialize_arm_netbsd_nat): Adjust to C++ification.
10266         * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
10267         (the_hppa_nbsd_nat_target): New.
10268         (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
10269         hppa_nbsd_nat_target methods.
10270         (_initialize_hppanbsd_nat): Adjust to C++ification.
10271         * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
10272         (the_hppa_obsd_nat_target): New.
10273         (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
10274         methods of hppa_obsd_nat_target.
10275         (_initialize_hppaobsd_nat): Adjust to C++ification.  Use
10276         add_target.
10277         * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
10278         (_initialize_i386nbsd_nat): Adjust to C++ification.  Use
10279         add_target.
10280         * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
10281         (_initialize_i386obsd_nat): Use add_target.
10282         * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
10283         (the_m68k_bsd_nat_target): New.
10284         (m68kbsd_fetch_inferior_registers)
10285         (m68kbsd_store_inferior_registers): Refactor as methods of
10286         m68k_bsd_nat_target.
10287         (_initialize_m68kbsd_nat): Adjust to C++ification.
10288         * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
10289         (the_mips_fbsd_nat_target): New.
10290         (mips_fbsd_fetch_inferior_registers)
10291         (mips_fbsd_store_inferior_registers): Refactor as methods of
10292         mips_fbsd_nat_target.
10293         (_initialize_mips_fbsd_nat): Adjust to C++ification.  Use
10294         add_target.
10295         * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
10296         (the_mips_nbsd_nat_target): New.
10297         (mipsnbsd_fetch_inferior_registers)
10298         (mipsnbsd_store_inferior_registers): Refactor as methods of
10299         mips_nbsd_nat_target.
10300         (_initialize_mipsnbsd_nat): Adjust to C++ification.
10301         * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
10302         (the_mips64_obsd_nat_target): New.
10303         (mips64obsd_fetch_inferior_registers)
10304         (mips64obsd_store_inferior_registers): Refactor as methods of
10305         mips64_obsd_nat_target.
10306         (_initialize_mips64obsd_nat): Adjust to C++ification.  Use
10307         add_target.
10308         * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
10309         nbsd_nat_target.
10310         * nbsd-nat.h: Include "inf-ptrace.h".
10311         (nbsd_nat_target): New class.
10312         * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
10313         (obsd_wait): Refactor as methods of obsd_nat_target.
10314         (obsd_add_target): Delete.
10315         * obsd-nat.h: Include "inf-ptrace.h".
10316         (obsd_nat_target): New class.
10317         * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
10318         (the_ppc_fbsd_nat_target): New.
10319         (ppcfbsd_fetch_inferior_registers)
10320         (ppcfbsd_store_inferior_registers): Refactor as methods of
10321         ppc_fbsd_nat_target.
10322         (_initialize_ppcfbsd_nat): Adjust to C++ification.  Use
10323         add_target.
10324         * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
10325         (the_ppc_nbsd_nat_target): New.
10326         (ppcnbsd_fetch_inferior_registers)
10327         (ppcnbsd_store_inferior_registers): Refactor as methods of
10328         ppc_nbsd_nat_target.
10329         (_initialize_ppcnbsd_nat): Adjust to C++ification.
10330         * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
10331         (the_ppc_obsd_nat_target): New.
10332         (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
10333         methods of ppc_obsd_nat_target.
10334         (_initialize_ppcobsd_nat): Adjust to C++ification.  Use
10335         add_target.
10336         * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
10337         (the_sh_nbsd_nat_target): New.
10338         (shnbsd_fetch_inferior_registers)
10339         (shnbsd_store_inferior_registers): Refactor as methods of
10340         sh_nbsd_nat_target.
10341         (_initialize_shnbsd_nat): Adjust to C++ification.
10342         * sparc-nat.c (sparc_xfer_wcookie): Make extern.
10343         (inf_ptrace_xfer_partial): Delete.
10344         (sparc_xfer_partial, sparc_target): Delete.
10345         * sparc-nat.h (sparc_fetch_inferior_registers)
10346         (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
10347         (sparc_target): Delete function declaration.
10348         (sparc_target): New template class.
10349         * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
10350         (_initialize_sparcnbsd_nat): Adjust to C++ification.
10351         * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
10352         (_initialize_sparc64fbsd_nat): Adjust to C++ification.  Use
10353         add_target.
10354         * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
10355         (_initialize_sparc64nbsd_nat): Adjust to C++ification.
10356         * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
10357         (_initialize_sparc64obsd_nat): Adjust to C++ification.  Use
10358         add_target.
10359         * vax-bsd-nat.c (vax_bsd_nat_target): New class.
10360         (the_vax_bsd_nat_target): New.
10361         (vaxbsd_fetch_inferior_registers)
10362         (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
10363         methods.
10364         (_initialize_vaxbsd_nat): Adjust to C++ification.
10365
10366         * bsd-kvm.c (bsd_kvm_target): New class.
10367         (bsd_kvm_ops): Now a bsd_kvm_target.
10368         (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
10369         (bsd_kvm_files_info, bsd_kvm_fetch_registers)
10370         (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
10371         bsd_kvm_target.
10372         (bsd_kvm_return_one): Delete.
10373         (bsd_kvm_add_target): Adjust to C++ification.
10374
10375         * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
10376         (nto_procfs_target_procfs): New classes.
10377         (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
10378         (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
10379         (procfs_post_attach, procfs_wait, procfs_fetch_registers)
10380         (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
10381         (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
10382         (procfs_remove_hw_breakpoint, procfs_resume)
10383         (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
10384         (procfs_kill_inferior, procfs_store_registers)
10385         (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
10386         as methods of nto_procfs_target.
10387         (nto_procfs_ops): Now an nto_procfs_target_procfs.
10388         (nto_native_ops): Delete.
10389         (procfs_open, procfs_native_open): Delete.
10390         (nto_native_ops): Now an nto_procfs_target_native.
10391         (init_procfs_targets): Adjust to C++ification.
10392         (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
10393         (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
10394         Refactor as methods of nto_procfs_target.
10395
10396         * go32-nat.c (go32_nat_target): New class.
10397         (the_go32_nat_target): New.
10398         (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
10399         (go32_store_registers, go32_xfer_partial, go32_files_info)
10400         (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
10401         (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
10402         (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
10403         (go32_pid_to_str): Refactor as methods of go32_nat_target.
10404         (go32_target): Delete.
10405         (_initialize_go32_nat): Adjust to C++ification.
10406
10407         * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
10408         (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
10409         (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
10410         (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
10411         gnu_nat_target.
10412         (gnu_target): Delete.
10413         * gnu-nat.h (gnu_target): Delete.
10414         (gnu_nat_target): New class.
10415         * i386-gnu-nat.c (gnu_base_target): New.
10416         (i386_gnu_nat_target): New class.
10417         (the_i386_gnu_nat_target): New.
10418         (_initialize_i386gnu_nat): Adjust to C++ification.
10419
10420 2018-05-02  Pedro Alves  <palves@redhat.com>
10421
10422         * bfd-target.c (target_bfd_xclose): Rename to ...
10423         (target_bfd_close): ... this.
10424         (target_bfd_reopen): Adjust.
10425         * target.c (target_close): Remove references to to_xclose.
10426         * target.h (target_ops::to_xclose): Delete.
10427         (target_ops::to_close): Update comments.
10428
10429 2018-05-02  Pedro Alves  <palves@redhat.com>
10430
10431         * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
10432         "linux-nat.h".
10433         * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
10434         * inf-ptrace.c (inf_ptrace_register_u_offset)
10435         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
10436         (inf_ptrace_store_register, inf_ptrace_store_registers)
10437         (inf_ptrace_trad_target): Move to ...
10438         * linux-nat-trad.c: ... this new file.
10439         * linux-nat-trad.h: New file.
10440         * linux-nat.c (linux_target_install_ops): Make extern.
10441         (linux_trad_target): Delete.
10442         * linux-nat.h (linux_trad_target): Delete declaration.
10443         (linux_target_install_ops): Declare.
10444         * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
10445         "linux-nat.h".
10446
10447 2018-05-02  Pedro Alves  <palves@redhat.com>
10448
10449         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
10450         procfs_target/add_target here.
10451         * procfs.c (procfs_target): Make static.
10452         (_initialize_procfs): Call add_target here.
10453         * procfs.h (struct target_ops): Remove forward declaration.
10454         (procfs_target): Remove declaration.
10455         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
10456
10457 2018-05-02  Pedro Alves  <palves@redhat.com>
10458
10459         * procfs.c (procfs_stopped_by_watchpoint)
10460         (procfs_insert_watchpoint, procfs_remove_watchpoint)
10461         (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
10462         Forward declare.
10463         (procfs_use_watchpoints): Delete, move contents...
10464         (procfs_target): ... here.
10465         * procfs.h (procfs_use_watchpoints): Delete declaration.
10466         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
10467         procfs_use_watchpoints.
10468         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
10469         procfs_use_watchpoints.
10470
10471 2018-05-02  Tom Tromey  <tom@tromey.com>
10472
10473         PR python/20084:
10474         * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
10475         and var_zuinteger_unlimited.
10476         * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
10477         and PARAM_ZUINTEGER_UNLIMITED.
10478         (set_parameter_value): Handle var_zuinteger and
10479         var_zuinteger_unlimited.
10480         (add_setshow_generic): Likewise.
10481         (parmpy_init): Likewise.
10482
10483 2018-04-28  Dan Robertson  <danlrobertson89@gmail.com>
10484
10485         PR rust/23124
10486         * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
10487         pointer is not null before dereferencing it.
10488
10489 2018-04-30  Tom Tromey  <tom@tromey.com>
10490
10491         * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
10492         is_mi_like_p.
10493
10494 2018-04-30  Tom Tromey  <tom@tromey.com>
10495
10496         * breakpoint.c (mention): Remove use of is_mi_like_p.
10497         (print_mention_ranged_breakpoint): Likewise.
10498         * break-catch-throw.c (print_it_exception_catchpoint): Remove use
10499         of is_mi_like_p.
10500
10501 2018-04-30  Tom Tromey  <tom@tromey.com>
10502
10503         * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
10504
10505 2018-04-30  Tom Tromey  <tom@tromey.com>
10506
10507         * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
10508         (info_spu_event_command): Remove some uses of is_mi_like_p.
10509
10510 2018-04-30  Tom Tromey  <tom@tromey.com>
10511
10512         * python/py-framefilter.c (py_print_single_arg)
10513         (enumerate_locals, py_print_args, py_print_frame): Remove some
10514         uses of is_mi_like_p.
10515
10516 2018-04-30  Tom Tromey  <tom@tromey.com>
10517
10518         * ui-out.c: Update.
10519         * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
10520         * ui-out.h (ui_out::is_mi_like_p): Now const.
10521         (ui_out::do_is_mi_like_p): Now const.
10522         * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
10523
10524 2018-04-30  Tom Tromey  <tom@tromey.com>
10525
10526         * varobj.c (varobj_set_visualizer): Use new_reference.
10527         * python/python.c (gdbpy_decode_line): Use new_reference.
10528         * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
10529         new_reference.
10530
10531 2018-04-30  Tom Tromey  <tom@tromey.com>
10532
10533         * varobj.c (install_new_value): Use new_reference.
10534         * value.h (value_incref): Return void.  Swap intro comment with
10535         value_decref.
10536         * value.c (set_value_parent): Use new_reference.
10537         (value_incref): Return void.  Update intro comment.
10538         (release_value): Use new_reference.
10539         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
10540
10541 2018-04-30  Tom Tromey  <tom@tromey.com>
10542
10543         * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
10544         * gdb_bfd.h (new_bfd_ref): Remove.
10545         (gdb_bfd_open): Update comment.
10546         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
10547         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
10548         (gdb_bfd_fdopenr): Use new_reference.
10549         * exec.c (exec_file_attach): Use new_reference.
10550
10551 2018-04-30  Tom Tromey  <tom@tromey.com>
10552
10553         * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
10554         method.
10555
10556 2018-04-30  Tom Tromey  <tom@tromey.com>
10557
10558         * jit.c (jit_read_code_entry): Use type_align.
10559         * i386-tdep.c (i386_gdbarch_init): Don't call
10560         set_gdbarch_long_long_align_bit.
10561         * gdbarch.sh: Remove long_long_align_bit.
10562         * gdbarch.c, gdbarch.h: Rebuild.
10563         * arc-tdep.c (arc_type_align): New function.
10564         (arc_gdbarch_init): Use arc_type_align.  Don't call
10565         set_gdbarch_long_long_align_bit.
10566
10567 2018-04-30  Tom Tromey  <tom@tromey.com>
10568
10569         * rust-lang.c (rust_type_alignment): Remove.
10570         (rust_composite_type): Use type_align.
10571
10572 2018-04-30  Tom Tromey  <tom@tromey.com>
10573
10574         * NEWS: Mention Type.align.
10575         * python/py-type.c (typy_get_alignof): New function.
10576         (type_object_getset): Add "alignof".
10577
10578 2018-04-30  Tom Tromey  <tom@tromey.com>
10579
10580         PR exp/17095:
10581         * NEWS: Update.
10582         * std-operator.def (UNOP_ALIGNOF): New operator.
10583         * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
10584         New.
10585         * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
10586         * c-lang.c (c_op_print_tab): Add alignof.
10587         * c-exp.y (ALIGNOF): New token.
10588         (exp): Add "ALIGNOF" production.
10589         (ident_tokens): Add _Alignof and alignof.
10590
10591 2018-04-30  Tom Tromey  <tom@tromey.com>
10592
10593         * i386-tdep.c (i386_type_align): New function.
10594         (i386_gdbarch_init): Update.
10595         * gdbarch.sh (type_align): New method.
10596         * gdbarch.c, gdbarch.h: Rebuild.
10597         * arch-utils.h (default_type_align): Declare.
10598         * arch-utils.c (default_type_align): New function.
10599         * gdbtypes.h (TYPE_ALIGN_BITS): New define.
10600         (struct type) <align_log2>: New field.
10601         <instance_flags>: Now a bitfield.
10602         (TYPE_RAW_ALIGN): New macro.
10603         (type_align, type_raw_align, set_type_align): Declare.
10604         * gdbtypes.c (type_align, type_raw_align, set_type_align): New
10605         functions.
10606         * dwarf2read.c (quirk_rust_enum): Set type alignment.
10607         (get_alignment, maybe_set_alignment): New functions.
10608         (read_structure_type, read_enumeration_type, read_array_type)
10609         (read_set_type, read_tag_pointer_type, read_tag_reference_type)
10610         (read_subrange_type, read_base_type): Set type alignment.
10611
10612 2018-04-30  Simon Marchi  <simon.marchi@ericsson.com>
10613
10614         * dwarf2read.c (read_index_from_section): Use bool.
10615
10616 2018-04-29  Fabian Groffen  <grobian@gentoo.org>
10617
10618         PR gdb/22950
10619         * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
10620         with #ifdef.
10621
10622 2018-04-29  John Reiser  <jreiser@BitWagon.com>
10623
10624         PR build/22873
10625         * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
10626         last step, and do it atomically.
10627
10628 2018-04-27  Alexandre Oliva  <aoliva@redhat.com>
10629
10630         * compile/compile-c-types.c (convert_int, convert_float):
10631         Update for C FE v1.
10632
10633 2018-04-27  Tom Tromey  <tom@tromey.com>
10634
10635         PR rust/22545:
10636         * rust-lang.c (rust_inclusive_range_type_p): New function.
10637         (rust_range): Handle inclusive ranges.
10638         (rust_compute_range): Likewise.
10639         * rust-exp.y (struct rust_op) <inclusive>: New field.
10640         (DOTDOTEQ): New constant.
10641         (range_expr): Add "..=" productions.
10642         (operator_tokens): Add "..=" token.
10643         (ast_range): Add "inclusive" parameter.
10644         (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
10645         ranges.
10646         * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
10647         bounds values.
10648         * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
10649         LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
10650         Update comments.
10651         * expprint.c (print_subexp_standard): Handle new bounds values.
10652         (dump_subexp_body_standard): Likewise.
10653
10654 2018-04-27  Tom Tromey  <tom@tromey.com>
10655
10656         * configure: Rebuild.
10657         * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
10658         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
10659         "OVERRIDE".
10660         (class symbol_needs_eval_context): Likewise.
10661         * dwarf2read.c (mock_mapped_index::symbol_name_count)
10662         (mock_mapped_index::symbol_name_at): Use "override".  Remove
10663         "virtual".
10664         * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
10665         "override".
10666         (class dwarf_expr_executor): Use "override", not "OVERRIDE".
10667         * aarch64-tdep.c (instruction_reader::read): Use "override".
10668         (instruction_reader_test::read): Likewise.
10669         * arm-tdep.c (instruction_reader::read): Use "override".
10670         (instruction_reader_thumb::read): Likewise.
10671
10672 2018-04-26  Andrzej Kaczmarek  <andrzej.kaczmarek@codecoup.pl>
10673
10674         PR remote/9665
10675         * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
10676         instead of remote_send.
10677         (remote_send): Remove.
10678
10679 2018-04-26  Pedro Alves  <palves@redhat.com>
10680
10681         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
10682         find_function_start_sal instead of find_pc_line.
10683
10684 2018-04-26  Pedro Alves  <palves@redhat.com>
10685
10686         * breakpoint.c (set_breakpoint_location_function): Handle
10687         mst_data_gnu_ifunc.
10688         * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
10689         * elfread.c (elf_symtab_read): Give data symbols with
10690         BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
10691         (elf_rel_plt_read): Update comment.
10692         * linespec.c (convert_linespec_to_sals): Handle
10693         mst_data_gnu_ifunc.
10694         (minsym_found): Handle mst_data_gnu_ifunc.
10695         * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
10696         (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
10697         * parse.c (find_minsym_type_and_address): Handle
10698         mst_data_gnu_ifunc.
10699         * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
10700         * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
10701         * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
10702         comment.
10703         <mst_data_gnu_ifunc>: New enumerator.
10704
10705 2018-04-26  Pedro Alves  <palves@redhat.com>
10706
10707         * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
10708         (lookup_minimal_symbol_by_pc_section): ... this.  Replace
10709         'want_trampoline' parameter by a lookup_msym_prefer parameter.
10710         Handle it.
10711         (lookup_minimal_symbol_by_pc_section): Delete old implementation.
10712         (lookup_minimal_symbol_by_pc): Adjust.
10713         (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
10714         (lookup_solib_trampoline_symbol_by_pc): Adjust.
10715         * minsyms.h (lookup_msym_prefer): New enum.
10716         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
10717         parameter by a lookup_msym_prefer parameter.
10718
10719 2018-04-26  Pedro Alves  <palves@redhat.com>
10720
10721         * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
10722         ends in "@plt" instead of looking at the symbol's section.
10723
10724 2018-04-26  Pedro Alves  <palves@redhat.com>
10725
10726         * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete.  Remove
10727         all references.
10728         (find_pc_partial_function_gnu_ifunc): Rename to ...
10729         (find_pc_partial_function): ... this, and remove references to
10730         'is_gnu_ifunc_p'.
10731         (find_pc_partial_function): Delete old implementation.
10732         * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
10733
10734 2018-04-26  Pedro Alves  <palves@redhat.com>
10735
10736         * linespec.c (struct bound_minimal_symbol_search_key): New.
10737         (convert_linespec_to_sals): Sort minimal symbols earlier.  Don't
10738         skip first line if we found a GNU ifunc minimal symbol by name.
10739         (compare_msymbols): Change parameters to work with a destructured
10740         lhs minsym.
10741         (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
10742         functions.
10743
10744 2018-04-26  Pedro Alves  <palves@redhat.com>
10745
10746         * breakpoint.c (set_breakpoint_location_function): Don't resolve
10747         ifunc targets here.  Instead, if we have an ifunc minsym, use its
10748         address/name.
10749         (add_location_to_breakpoint): Store the minsym and the objfile in
10750         the breakpoint location.
10751         * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
10752         * linespec.c (minsym_found): Resolve GNU ifunc targets here.
10753         Record the minsym in the sal.
10754         * symtab.h (symtab_and_line) <msymbol>: New field.
10755
10756 2018-04-26  Pedro Alves  <palves@redhat.com>
10757
10758         * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
10759         unless we actually resolved the ifunc.
10760
10761 2018-04-26  Pedro Alves  <palves@redhat.com>
10762
10763         * c-exp.y (variable production): Prefer ifunc minsyms over
10764         regular function symbols.
10765         * symtab.c (find_gnu_ifunc): New function.
10766         * minsyms.h (lookup_msym_prefer): New enum.
10767         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
10768         parameter by a lookup_msym_prefer parameter.
10769         * symtab.h (find_gnu_ifunc): New declaration.
10770
10771 2018-04-26  Pedro Alves  <palves@redhat.com>
10772
10773         * blockframe.c (find_gnu_ifunc_target_type): New function.
10774         (find_function_type): New.
10775         * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
10776         return a value with a memory address.
10777         (eval_call): For calls to GNU ifunc functions, try to find the
10778         type of the target function from the type that the resolver
10779         returns.
10780         * gdbtypes.c (objfile_type): Don't install a return type for ifunc
10781         symbols.
10782         * infcall.c (find_function_return_type): Delete.
10783         (find_function_addr): Add 'function_type' parameter.  For calls to
10784         GNU ifunc functions, try to find the type of the target function
10785         from the type that the resolver returns, and return it via
10786         FUNCTION_TYPE.
10787         (call_function_by_hand_dummy): Adjust to use the function type
10788         returned by find_function_addr.
10789         (find_function_addr): Add 'function_type' parameter and move
10790         description here.
10791         * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
10792         declarations.
10793
10794 2018-04-26  Pedro Alves  <palves@redhat.com>
10795
10796         * c-exp.y (variable production): Skip finding an alias for ifunc
10797         symbols.
10798
10799 2018-04-26  Pedro Alves  <palves@redhat.com>
10800
10801         * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
10802
10803 2018-04-25  Pedro Alves  <palves@redhat.com>
10804
10805         * infcmd.c (kill_command): Print the pid as string, not the whole
10806         thread's ptid.  Add comment.  s/has been killed/killed/ in output
10807         message.
10808         * remote.c (remote_detach_1): Print the pid as string, not the
10809         whole thread's ptid.
10810
10811 2018-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
10812             Sergio Durigan Junior  <sergiodj@redhat.com>
10813             Pedro Alves  <palves@redhat.com>
10814
10815         * infcmd.c (kill_command): Print message when inferior has
10816         been killed.
10817         * inferior.c (print_inferior_events): Remove 'static'.  Set as
10818         '1'.
10819         (add_inferior): Improve message printed when
10820         'print_inferior_events' is on.
10821         (exit_inferior): Remove message printed when
10822         'print_inferior_events' is on.
10823         (detach_inferior): Improve message printed when
10824         'print_inferior_events' is on.
10825         (initialize_inferiors): Use 'add_inferior_silent' to set
10826         'current_inferior_'.
10827         * inferior.h (print_inferior_events): Declare here as
10828         'extern'.
10829         * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
10830         '[Detaching...]' messages when 'print_inferior_events' is on.
10831         Use 'add_thread_silent' instead of 'add_thread'.  Add '[' and ']'
10832         as prefix/suffix for messages.  Remove periods.  Fix erroneous
10833         'Detaching after fork from child...', replace it by '... from
10834         parent...'.
10835         (handle_vfork_child_exec_or_exit): Add '[' and ']' as
10836         prefix/suffix when printing 'Detaching...' messages.  Print
10837         them when 'print_inferior_events' is on.
10838         * remote.c (remote_detach_1): Print message when detaching
10839         from inferior and '!is_fork_parent'.
10840
10841 2018-04-24  Tom Tromey  <tom@tromey.com>
10842
10843         * cli-out.h: Reindent.
10844
10845 2018-04-24  Tom Tromey  <tom@tromey.com>
10846
10847         * cli-out.c (cli_ui_out::out_field_fmt): Remove.
10848         (cli_ui_out::do_field_string): Use fputs_filtered.
10849         * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
10850
10851 2018-04-23  Tom Tromey  <tom@tromey.com>
10852
10853         * guile/scm-frame.c (gdbscm_frame_read_var): Use
10854         gdb::unique_xmalloc_ptr.
10855
10856 2018-04-23  Tom Tromey  <tom@tromey.com>
10857
10858         * configure: Rebuild.
10859
10860 2018-04-22  Rajendra SY  <rajendra.sy@gmail.com>
10861
10862         PR gdb/23095
10863         * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
10864         prepare_for_testing.  Set normal_bp to r_debug_state if target
10865         is bsd.
10866
10867 2018-04-21  Pedro Alves  <palves@redhat.com>
10868             Rajendra SY  <rajendra.sy@gmail.com>
10869
10870         * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
10871         * remote.c (extended_remote_attach): In all-stop mode, mark the
10872         thread as executing.
10873
10874 2018-04-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
10875
10876         * thread.c (thread_apply_all_command): Fix comment.
10877         (thread_command): Fix comment.
10878
10879 2018-04-10  Alan Hayward  <alan.hayward@arm.com>
10880
10881         * common/tdesc.h (tdesc_create_feature): Remove xml filename
10882         parameter.
10883         * features/aarch64-core.c (create_feature_aarch64_core):
10884         Regenerate.
10885         * features/aarch64-fpu.c (create_feature_aarch64_fpu):
10886         Likewise.
10887         * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
10888         Likewise.
10889         * features/i386/32bit-avx512.c
10890         (create_feature_i386_32bit_avx512): Likewise.
10891         * features/i386/32bit-core.c (create_feature_i386_32bit_core):
10892         Likewise.
10893         * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
10894         Likewise.
10895         * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
10896         Likewise.
10897         * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
10898         Likewise.
10899         * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
10900         Likewise.
10901         * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
10902         Likewise.
10903         * features/i386/64bit-avx512.c
10904         (create_feature_i386_64bit_avx512): Likewise.
10905         * features/i386/64bit-core.c (create_feature_i386_64bit_core):
10906         Likewise.
10907         * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
10908         Likewise.
10909         * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
10910         Likewise.
10911         * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
10912         Likewise.
10913         * features/i386/64bit-segments.c
10914         (create_feature_i386_64bit_segments): Likewise.
10915         * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
10916         Likewise.
10917         * features/i386/x32-core.c
10918         (create_feature_i386_x32_core): Likewise.
10919         * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
10920         * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
10921         * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
10922         * target-descriptions.c: In generated code, don't pass xml
10923         filename.
10924
10925 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
10926
10927         * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
10928         (print_xml_feature::visit_post): Likewise.
10929         (print_xml_feature::visit): Likewise.
10930         * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
10931         (print_xml_feature): Add new class.
10932         * regformats/regdat.sh: Null xmltarget on feature targets.
10933         * target-descriptions.c (struct target_desc): Add xmltarget.
10934         (maintenance_check_tdesc_xml_convert): Add unittest function.
10935         (tdesc_get_features_xml): Add function to get xml.
10936         (maintenance_check_xml_descriptions): Test xml generation.
10937         * xml-tdesc.c (string_read_description_xml): Add function.
10938         * xml-tdesc.h (string_read_description_xml): Add declaration.
10939
10940 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
10941
10942         * features/Makefile: Add feature marker to targets with new style
10943         target descriptions.
10944         * regformats/aarch64.dat: Regenerate.
10945         * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
10946         * regformats/i386/amd64-avx-linux.dat: Likewise.
10947         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
10948         * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
10949         * regformats/i386/amd64-linux.dat: Likewise.
10950         * regformats/i386/amd64-mpx-linux.dat: Likewise.
10951         * regformats/i386/amd64.dat: Likewise.
10952         * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
10953         * regformats/i386/i386-avx-linux.dat: Likewise.
10954         * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
10955         * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
10956         * regformats/i386/i386-linux.dat: Likewise.
10957         * regformats/i386/i386-mmx-linux.dat: Likewise.
10958         * regformats/i386/i386-mpx-linux.dat: Likewise.
10959         * regformats/i386/i386.dat: Likewise.
10960         * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
10961         * regformats/i386/x32-avx-linux.dat: Likewise.
10962         * regformats/i386/x32-linux.dat: Likewise.
10963         * regformats/tic6x-c62x-linux.dat: Likewise.
10964         * regformats/tic6x-c64x-linux.dat: Likewise.
10965         * regformats/tic6x-c64xp-linux.dat: Likewise.
10966         * regformats/regdat.sh: Parse feature marker.
10967
10968 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
10969
10970         * common/tdesc.h (tdesc_architecture_name): Add new declaration.
10971         (tdesc_osabi_name): Likewise.
10972         * target-descriptions.c (tdesc_architecture_name): Add new
10973         function.
10974         (tdesc_osabi_name): Likewise.
10975
10976 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
10977
10978         * common/tdesc.c (tdesc_predefined_type): Move to here.
10979         (tdesc_named_type): Likewise.
10980         (tdesc_create_vector): Likewise.
10981         (tdesc_create_struct): Likewise.
10982         (tdesc_set_struct_size): Likewise.
10983         (tdesc_create_union): Likewise.
10984         (tdesc_create_flags): Likewise.
10985         (tdesc_create_enum): Likewise.
10986         (tdesc_add_field): Likewise.
10987         (tdesc_add_typed_bitfield): Likewise.
10988         (tdesc_add_bitfield): Likewise.
10989         (tdesc_add_flag): Likewise.
10990         (tdesc_add_enum_value): Likewise.
10991         * common/tdesc.h (struct tdesc_type_builtin): Likewise.
10992         (struct tdesc_type_vector): Likewise.
10993         (struct tdesc_type_field): Likewise.
10994         (struct tdesc_type_with_fields): Likewise.
10995         (tdesc_create_enum): Add declaration.
10996         (tdesc_add_typed_bitfield): Likewise.
10997         (tdesc_add_enum_value): Likewise.
10998         * target-descriptions.c (tdesc_type_field): Move from here.
10999         (tdesc_type_builtin): Likewise.
11000         (tdesc_type_vector): Likewise.
11001         (tdesc_type_with_fields): Likewise.
11002         (tdesc_predefined_types): Likewise.
11003         (tdesc_named_type): Likewise.
11004         (tdesc_create_vector): Likewise.
11005         (tdesc_create_struct): Likewise.
11006         (tdesc_set_struct_size): Likewise.
11007         (tdesc_create_union): Likewise.
11008         (tdesc_create_flags): Likewise.
11009         (tdesc_create_enum): Likewise.
11010         (tdesc_add_field): Likewise.
11011         (tdesc_add_typed_bitfield): Likewise.
11012         (tdesc_add_bitfield): Likewise.
11013         (tdesc_add_flag): Likewise.
11014         (tdesc_add_enum_value): Likewise.
11015         * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
11016         (tdesc_add_typed_bitfield): Likewise.
11017         (tdesc_add_enum_value): Likewise.
11018
11019 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
11020
11021         * common/tdesc.c (tdesc_feature::accept): Move to here.
11022         (tdesc_feature::operator==): Likewise.
11023         (tdesc_create_reg): Likewise.
11024         * common/tdesc.h (tdesc_type_kind): Likewise.
11025         (struct tdesc_type): Likewise.
11026         (struct tdesc_feature): Likewise.
11027         * regformats/regdat.sh: Create a feature.
11028         * target-descriptions.c (tdesc_type_kind): Move from here.
11029         (tdesc_type): Likewise.
11030         (tdesc_type_up): Likewise.
11031         (tdesc_feature): Likewise.
11032         (tdesc_create_reg): Likewise.
11033
11034 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
11035
11036         * Makefile.in: Add arch/tdesc.c
11037         * common/tdesc.c: New file.
11038         * common/tdesc.h (tdesc_element_visitor): Move to here.
11039         (tdesc_element): Likewise.
11040         (tdesc_reg): Likewise.
11041         (tdesc_reg_up): Likewise.
11042         * regformats/regdef.h (reg): Add offset to constructors.
11043         * target-descriptions.c (tdesc_element_visitor): Move from here.
11044         (tdesc_element): Likewise.
11045         (tdesc_reg): Likewise.
11046         (tdesc_reg_up): Likewise.
11047
11048 2018-04-17  Tom Tromey  <tom@tromey.com>
11049
11050         * dwarf2read.c (quirk_rust_enum): Conditionally drop the
11051         discriminant field.
11052
11053 2018-04-17  Tom Tromey  <tom@tromey.com>
11054
11055         * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
11056
11057 2018-04-17  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11058
11059         * symtab.c (print_symbol_info): Skip printing filename and line
11060         number when `last' is NULL.
11061         (symtab_symbol_info): Use empty string instead of NULL for first
11062         invocation of print_symbol_info.
11063         (rbreak_command): Pass NULL to `last' parameter of
11064         print_symbol_info.
11065
11066 2018-04-16  Simon Marchi  <simon.marchi@ericsson.com>
11067
11068         * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
11069         instead of nullptr.
11070
11071 2018-04-16  Pedro Alves  <palves@redhat.com>
11072
11073         * MAINTAINERS (sh): Remove.
11074         * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
11075         (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
11076         (ALLDEPFILES): Remove sh64-tdep.c.
11077         * NEWS: Mentions that support for SH-5/SH64 is removed.
11078         * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
11079         (sh*-*-openbsd*): Ditto.
11080         (sh64-*-elf*): Remove.
11081         (sh*): Remove.
11082         * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
11083         * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
11084         * sh-tdep.c: No longer include "sh64-tdep.h".
11085         (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
11086         * sh64-tdep.c, sh64-tdep.h: Remove files.
11087
11088 2018-04-16  Pedro Alves  <palves@redhat.com>
11089
11090         * MAINTAINERS: Remove m88k.
11091         * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
11092         (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
11093         (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
11094         * NEWS: Mention that support for m88k was removed.
11095         * configure.host (m88*-*-*): Remove support.
11096         * configure.nat (m88k-*-*): Remove support.
11097         * configure.tgt (m88*-*-openbsd*): Remove.
11098         * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
11099
11100 2018-04-15  Simon Marchi  <simon.marchi@polymtl.ca>
11101
11102         * configure.tgt (x86_tobjs): New variable.
11103         (amd64_tobjs, i386_tobjs): Use it.
11104
11105 2018-04-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11106
11107         * symtab.c (print_symbol_info): Precede the symbol definition by
11108         the line number when available.
11109         * NEWS: Advertise this enhancement.
11110
11111 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
11112
11113         * NEWS (New options): announce set/show record btrace cpu.
11114         * btrace.c: Include record-btrace.h.
11115         (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
11116         the vendor is unknown.
11117         (btrace_compute_ftrace_1): Add cpu parameter.  Update callers.
11118         Maybe overwrite the btrace configuration's cpu.
11119         (btrace_compute_ftrace): Add cpu parameter.  Update callers.
11120         (btrace_fetch): Add cpu parameter.  Update callers.
11121         (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
11122         Maybe overwrite the btrace configuration's cpu.  Skip enabling
11123         errata workarounds if the vendor is unknown.
11124         * python/py-record-btrace.c: Include record-btrace.h.
11125         (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
11126         (recpy_bt_function_call_history): Call record_btrace_get_cpu.
11127         * record-btrace.c (record_btrace_cpu_state_kind): New.
11128         (record_btrace_cpu): New.
11129         (set_record_btrace_cpu_cmdlist): New.
11130         (record_btrace_get_cpu): New.
11131         (require_btrace_thread, record_btrace_info)
11132         (record_btrace_resume_thread): Call record_btrace_get_cpu.
11133         (cmd_set_record_btrace_cpu_none): New.
11134         (cmd_set_record_btrace_cpu_auto): New.
11135         (cmd_set_record_btrace_cpu): New.
11136         (cmd_show_record_btrace_cpu): New.
11137         (_initialize_record_btrace): Initialize set/show record btrace cpu
11138         commands.
11139         * record-btrace.h (record_btrace_get_cpu): New.
11140
11141 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
11142
11143         * record.c (set_record_command): Fix typo in message.
11144
11145 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
11146
11147         * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
11148
11149 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
11150
11151         * infrun.c (process_event_stop_test): Call
11152         gdbarch_in_indirect_branch_thunk.
11153         * gdbarch.sh (in_indirect_branch_thunk): New.
11154         * gdbarch.c: Regenerated.
11155         * gdbarch.h: Regenerated.
11156         * x86-tdep.h: New.
11157         * x86-tdep.c: New.
11158         * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
11159         (HFILES_NO_SRCDIR): Add x86-tdep.h.
11160         (ALLDEPFILES): Add x86-tdep.c.
11161         * arch-utils.h (default_in_indirect_branch_thunk): New.
11162         * arch-utils.c (default_in_indirect_branch_thunk): New.
11163         * i386-tdep: Include x86-tdep.h.
11164         (i386_in_indirect_branch_thunk): New.
11165         (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
11166         function.
11167         * amd64-tdep: Include x86-tdep.h.
11168         (amd64_in_indirect_branch_thunk): New.
11169         (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
11170
11171 2018-04-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
11172
11173         PR gdb/23053
11174         * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
11175         (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
11176         (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
11177         regression.
11178
11179 2018-04-12  Tom Tromey  <tom@tromey.com>
11180
11181         * rust-lang.c (rust_print_struct_def): Remove univariant code.
11182         (rust_evaluate_subexp): Likewise.
11183
11184 2018-04-12  Pedro Alves  <palves@redhat.com>
11185
11186         * procfs.c (procfs_detach): Make forward declaration's prototype
11187         match definition's protototype.
11188         (proc_get_LDT_entry): Remove stale do_cleanups call.
11189
11190 2018-04-12  Pedro Alves  <palves@redhat.com>
11191
11192         * target.h (target_ops::to_has_exited): Delete.
11193         (target_has_exited): Delete.
11194         * target-delegates.c: Regenerate.
11195
11196 2018-04-11  Pedro Alves  <palves@redhat.com>
11197
11198         * target.c (fileio_fh_t::t): Add comment.
11199         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
11200         (target_fileio_close): Handle a NULL target.
11201         (invalidate_fileio_fh): New.
11202         (target_close): Call it.
11203         * remote.c (remote_hostio_send_command): No longer check whether
11204         remote_desc is open.
11205
11206 2018-04-11  Pedro Alves  <palves@redhat.com>
11207
11208         * target.c (fileio_fh_t): Make it a named struct instead of a
11209         typedef.
11210         (fileio_fh_t::is_closed): New method.
11211         (DEF_VEC_O (fileio_fh_t)): Remove.
11212         (fileio_fhandles): Now a std::vector.
11213         (is_closed_fileio_fh): Delete.
11214         (acquire_fileio_fd): Adjust.  Rename parameters.
11215         (release_fileio_fd): Adjust.
11216         (fileio_fd_to_fh): Reimplement as a function instead of a macro.
11217         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
11218         (target_fileio_close): Adjust.
11219
11220 2018-04-10  Simon Marchi  <simon.marchi@ericsson.com>
11221
11222         * auto-load.c (auto_load_safe_path_vec_update): Iterate by
11223         index.
11224
11225 2018-04-10  Pedro Alves  <palves@redhat.com>
11226
11227         * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
11228         (scoped_finish_thread_state): New class.
11229         * infcmd.c (run_command_1): Use it instead of finish_thread_state
11230         cleanup.
11231         * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
11232         (fetch_inferior_event, normal_stop): Likewise.
11233         * thread.c (finish_thread_state_cleanup): Delete.
11234
11235 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11236             Pedro Alves  <palves@redhat.com>
11237
11238         * value.c: Include "selftest.h" and "common/array-view.h".
11239         (struct range) <operator ==>: New.
11240         (test_ranges_contain): New.
11241         (check_ranges_vector): New.
11242         (test_insert_into_bit_range_vector): New.
11243         (_initialize_values): Register selftests.
11244         * common/array-view.h (operator==, operator!=): New.
11245
11246 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11247
11248         * common/gdb_vecs.h (unordered_remove): Add overload that takes
11249         an iterator.
11250         * inline-frame.c: Include <algorithm>.
11251         (struct inline_state): Add constructor.
11252         (inline_state_s): Remove.
11253         (DEF_VEC_O(inline_state_s)): Remove.
11254         (inline_states): Change type to std::vector.
11255         (find_inline_frame_state): Adjust to std::vector.
11256         (allocate_inline_frame_state): Remove.
11257         (clear_inline_frame_state): Adjust to std::vector.
11258         (skip_inline_frames): Adjust to std::vector.
11259
11260 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11261
11262         * tracepoint.h (struct trace_state_variable): Add constructor.
11263         <name>: Change type to std::string.
11264         * tracepoint.c (tsv_s): Remove.
11265         (DEF_VEC_O(tsv_s)): Remove.
11266         (tvariables): Change to std::vector.
11267         (create_trace_state_variable): Adjust to std::vector.
11268         (find_trace_state_variable): Likewise.
11269         (find_trace_state_variable_by_number): Likewise.
11270         (delete_trace_state_variable): Likewise.
11271         (trace_variable_command): Adjust to std::string.
11272         (delete_trace_variable_command): Likewise.
11273         (tvariables_info_1): Adjust to std::vector.
11274         (save_trace_state_variables): Likewise.
11275         (start_tracing): Likewise.
11276         (merge_uploaded_trace_state_variables): Adjust to std::vector
11277         and std::string.
11278         * target.h (struct target_ops)
11279         <to_download_trace_state_variable>: Pass reference to
11280         trace_state_variable.
11281         * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
11282         * target-delegates.c: Re-generate.
11283         * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
11284         (mi_tsv_deleted): Likewise.
11285         * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
11286         * remote.c (remote_download_trace_state_variable): Change
11287         pointer to reference and adjust.
11288         * make-target-delegates (parse_argtypes): Handle references.
11289         (write_function_header): Likewise.
11290         (munge_type): Likewise.
11291
11292 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11293
11294         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11295         string_view-selftests.c.
11296         * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
11297         testsuite.
11298         * unittests/basic_string_view/cons/char/1.cc: Likewise.
11299         * unittests/basic_string_view/cons/char/2.cc: Likewise.
11300         * unittests/basic_string_view/cons/char/3.cc: Likewise.
11301         * unittests/basic_string_view/element_access/char/1.cc:
11302         Likewise.
11303         * unittests/basic_string_view/element_access/char/empty.cc:
11304         Likewise.
11305         * unittests/basic_string_view/element_access/char/front_back.cc:
11306         Likewise.
11307         * unittests/basic_string_view/inserters/char/2.cc: Likewise.
11308         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
11309         Likewise.
11310         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
11311         Likewise.
11312         * unittests/basic_string_view/modifiers/swap/char/1.cc:
11313         Likewise.
11314         * unittests/basic_string_view/operations/compare/char/1.cc:
11315         Likewise.
11316         * unittests/basic_string_view/operations/compare/char/13650.cc:
11317         Likewise.
11318         * unittests/basic_string_view/operations/copy/char/1.cc:
11319         Likewise.
11320         * unittests/basic_string_view/operations/data/char/1.cc:
11321         Likewise.
11322         * unittests/basic_string_view/operations/find/char/1.cc:
11323         Likewise.
11324         * unittests/basic_string_view/operations/find/char/2.cc:
11325         Likewise.
11326         * unittests/basic_string_view/operations/find/char/3.cc:
11327         Likewise.
11328         * unittests/basic_string_view/operations/find/char/4.cc:
11329         Likewise.
11330         * unittests/basic_string_view/operations/rfind/char/1.cc:
11331         Likewise.
11332         * unittests/basic_string_view/operations/rfind/char/2.cc:
11333         Likewise.
11334         * unittests/basic_string_view/operations/rfind/char/3.cc:
11335         Likewise.
11336         * unittests/basic_string_view/operations/substr/char/1.cc:
11337         Likewise.
11338         * unittests/basic_string_view/operators/char/2.cc: Likewise.
11339         * unittests/string_view-selftests.c: New file.
11340
11341 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11342
11343         * unittests/basic_string_view/capacity/1.cc: New file.
11344         * unittests/basic_string_view/capacity/empty_neg.cc: New file.
11345         * unittests/basic_string_view/cons/char/1.cc: New file.
11346         * unittests/basic_string_view/cons/char/2.cc: New file.
11347         * unittests/basic_string_view/cons/char/3.cc: New file.
11348         * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
11349         * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
11350         * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
11351         * unittests/basic_string_view/element_access/char/1.cc: New file.
11352         * unittests/basic_string_view/element_access/char/2.cc: New file.
11353         * unittests/basic_string_view/element_access/char/empty.cc: New file.
11354         * unittests/basic_string_view/element_access/char/front_back.cc: New file.
11355         * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
11356         * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
11357         * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
11358         * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
11359         * unittests/basic_string_view/include.cc: New file.
11360         * unittests/basic_string_view/inserters/char/1.cc: New file.
11361         * unittests/basic_string_view/inserters/char/2.cc: New file.
11362         * unittests/basic_string_view/inserters/char/3.cc: New file.
11363         * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
11364         * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
11365         * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
11366         * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
11367         * unittests/basic_string_view/literals/types.cc: New file.
11368         * unittests/basic_string_view/literals/values.cc: New file.
11369         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
11370         * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
11371         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
11372         * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
11373         * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
11374         * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
11375         * unittests/basic_string_view/operations/compare/char/1.cc: New file.
11376         * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
11377         * unittests/basic_string_view/operations/compare/char/2.cc: New file.
11378         * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
11379         * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
11380         * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
11381         * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
11382         * unittests/basic_string_view/operations/copy/char/1.cc: New file.
11383         * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
11384         * unittests/basic_string_view/operations/data/char/1.cc: New file.
11385         * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
11386         * unittests/basic_string_view/operations/find/char/1.cc: New file.
11387         * unittests/basic_string_view/operations/find/char/2.cc: New file.
11388         * unittests/basic_string_view/operations/find/char/3.cc: New file.
11389         * unittests/basic_string_view/operations/find/char/4.cc: New file.
11390         * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
11391         * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
11392         * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
11393         * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
11394         * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
11395         * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
11396         * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
11397         * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
11398         * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
11399         * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
11400         * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
11401         * unittests/basic_string_view/operations/substr/char/1.cc: New file.
11402         * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
11403         * unittests/basic_string_view/operators/char/2.cc: New file.
11404         * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
11405         * unittests/basic_string_view/range_access/char/1.cc: New file.
11406         * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
11407         * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
11408         * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
11409         * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
11410         * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
11411         * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
11412         * unittests/basic_string_view/requirements/typedefs.cc: New file.
11413         * unittests/basic_string_view/typedefs.cc: New file.
11414         * unittests/basic_string_view/types/1.cc: New file.
11415
11416 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11417
11418         * common/gdb_string_view.h: Remove libstdc++ implementation
11419         details, adjust to gdb reality.
11420         * common/gdb_string_view.tcc: Likewise.
11421         * cli/cli-script.c (struct string_view): Remove.
11422         (user_args) <m_args>: Change element type to gdb::string_view.
11423         (user_args::insert_args): Adjust.
11424
11425 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11426
11427         * common/gdb_string_view.h: New file.
11428         * common/gdb_string_view.tcc: New file.
11429
11430 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11431
11432         * ax_cxx_compile_stdcxx.m4: Sync with upstream.
11433         * configure: Re-generate.
11434
11435 2018-04-09  Pedro Alves  <palves@redhat.com>
11436
11437         * gdbarch.sh: Include "observable.h" instead of "observer.h".
11438         (set_target_gdbarch): Call
11439         gdb::observers::architecture_changed.notify instead of
11440         observer_notify_architecture_changed.
11441
11442 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11443
11444         * tracepoint.c (struct current_traceframe_cleanup): Remove.
11445         (do_restore_current_traceframe_cleanup): Remove.
11446         (restore_current_traceframe_cleanup_dtor): Remove.
11447         (make_cleanup_restore_current_traceframe): Remove.
11448         (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
11449         New.
11450         * tracepoint.h (struct scoped_restore_current_traceframe): New.
11451         * infrun.c (fetch_inferior_event): Use
11452         scoped_restore_current_traceframe.
11453
11454 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11455
11456         * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
11457         Remove.
11458         <n_allocated_type_units>: Remove.
11459         <all_type_units>: Change to std::vector.
11460         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
11461         to std::vector change.
11462         (dwarf2_per_objfile::get_cutu): Likewise.
11463         (dwarf2_per_objfile::get_tu): Likewise.
11464         (create_signatured_type_table_from_index): Likewise.
11465         (create_signatured_type_table_from_debug_names): Likewise.
11466         (dw2_symtab_iter_next): Likewise.
11467         (dw2_print_stats): Likewise.
11468         (dw2_expand_all_symtabs): Likewise.
11469         (dw2_expand_marked_cus): Likewise.
11470         (dw2_debug_names_iterator::next): Likewise.
11471         (dwarf2_initialize_objfile): Likewise.
11472         (add_signatured_type_cu_to_table): Likewise.
11473         (create_all_type_units): Likewise.
11474         (add_type_unit): Likewise.
11475         (struct tu_abbrev_offset): Add constructor.
11476         (build_type_psymtabs_1): Adjust to std::vector change.
11477         (print_tu_stats): Likewise.
11478         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
11479         (write_debug_names): Likewise.
11480
11481 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11482
11483         * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
11484         Make an std::vector.
11485         <n_comp_units>: Remove.
11486         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
11487         to std::vector change.
11488         (dwarf2_per_objfile::get_cutu): Likewise.
11489         (dwarf2_per_objfile::get_cu): Likewise.
11490         (create_cus_from_index): Likewise.
11491         (create_addrmap_from_index): Likewise.
11492         (create_addrmap_from_aranges): Likewise.
11493         (dwarf2_read_index): Likewise.
11494         (dw2_find_last_source_symtab): Likewise.
11495         (dw2_map_symtabs_matching_filename): Likewise.
11496         (dw2_symtab_iter_next): Likewise.
11497         (dw2_print_stats): Likewise.
11498         (dw2_expand_all_symtabs): Likewise.
11499         (dw2_expand_symtabs_with_fullname): Likewise.
11500         (dw2_expand_marked_cus): Likewise.
11501         (dw2_map_symbol_filenames): Likewise.
11502         (create_cus_from_debug_names): Likewise.
11503         (dwarf2_read_debug_names): Likewise.
11504         (dw2_debug_names_iterator::next): Likewise.
11505         (dwarf2_initialize_objfile): Likewise.
11506         (set_partial_user): Likewise.
11507         (dwarf2_build_psymtabs_hard): Likewise.
11508         (read_comp_units_from_section): Remove arguments, adjust to
11509         std::vector change.
11510         (create_all_comp_units): Adjust to std::vector and
11511         read_comp_units_from_section changes.
11512         (dwarf2_find_containing_comp_unit): Adjust to std::vector
11513         change.
11514         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
11515         (psyms_seen_size): Likewise.
11516         (write_gdbindex): Likewise.
11517         (write_debug_names): Likewise.
11518
11519 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11520
11521         * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
11522         with dwarf2_per_objfile.
11523         (create_cus_from_index): Likewise.
11524         (create_signatured_type_table_from_index): Likewise.
11525         (dwarf2_read_index): Likewise.
11526         (dwarf2_initialize_objfile): Likewise.
11527         (dwarf2_fetch_die_loc_sect_off):  Get dwarf2_per_objfile from
11528         per_cu rather than get_dwarf2_per_objfile.
11529
11530 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11531
11532         * dwarf2read.h (struct signatured_type): Forward declare.
11533         (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
11534         New methods.
11535         * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
11536         (dw2_get_cutu): ...this.
11537         (dwarf2_per_objfile::get_cu): Rename from...
11538         (dw2_get_cu): ...this.
11539         (dwarf2_per_objfile::get_tu): New.
11540         (create_addrmap_from_index): Adjust.
11541         (create_addrmap_from_aranges): Adjust.
11542         (dw2_find_last_source_symtab): Adjust.
11543         (dw2_map_symtabs_matching_filename): Adjust.
11544         (dw2_symtab_iter_next): Adjust.
11545         (dw2_print_stats): Adjust.
11546         (dw2_expand_all_symtabs): Adjust.
11547         (dw2_expand_symtabs_with_fullname): Adjust.
11548         (dw2_expand_marked_cus): Adjust.
11549         (dw_expand_symtabs_matching_file_matcher): Adjust.
11550         (dw2_map_symbol_filenames): Adjust.
11551         (dw2_debug_names_iterator::next): Adjust.
11552         (dwarf2_initialize_objfile): Adjust.
11553         (set_partial_user): Adjust.
11554         (dwarf2_build_psymtabs_hard): Adjust.
11555
11556 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11557
11558         * dwarf2read.c (create_signatured_type_table_from_debug_names):
11559         Remove unused variables.
11560         (dw2_map_symtabs_matching_filename): Likewise.
11561         (dwarf2_record_block_ranges): Likewise.
11562         (dwarf2_read_addr_index): Likewise.
11563         (follow_die_offset): Likewise.
11564
11565 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11566
11567         * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
11568         to symbol_file_add_main.
11569
11570 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11571
11572         PR mi/22299
11573         * mi/mi-console.c (do_fputc_async_safe): New.
11574         (mi_console_file::write_async_safe): New.
11575         (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
11576         * mi/mi-console.h (class mi_console_file) <write_async_safe>:
11577         New.
11578         * ui-file.c (ui_file::putstrn): Adjust call to
11579         fputstrn_unfiltered.
11580         * utils.c (printchar): Replace do_fputs and do_fprintf
11581         parameters by do_fputc.
11582         (fputstr_filtered): Adjust call to printchar.
11583         (fputstr_unfiltered): Likewise.
11584         (fputstrn_filtered): Likewise.
11585         (fputstrn_unfiltered): Add do_fputc parameter, pass to
11586         printchar.
11587         * utils.h (do_fputc_ftype): New typedef.
11588         (fputstrn_unfiltered): Add do_fputc parameter.
11589
11590 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11591
11592         * regformats/i386/i386-avx.dat: Remove.
11593
11594 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
11595
11596         PR gdb/22979
11597         * amd64-tdep.c (amd64_none_init_abi): New function.
11598         (amd64_x32_none_init_abi): New function.
11599         (_initialize_amd64_tdep): Register handlers for x86-64 and
11600         x64_32 with GDB_OSABI_NONE.
11601         * osabi.c (gdbarch_init_osabi): Allow running handlers for the
11602         GDB_OSABI_NONE osabi.
11603
11604 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
11605
11606         PR gdb/22980
11607         * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
11608         GDB_OSABI_NONE.
11609         * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
11610         * osabi.c (gdb_osabi_names): Add "unknown" entry.
11611
11612 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
11613
11614         * common/byte-vector.h (char_vector): New type.
11615         * target.h (target_read_alloc): Return
11616         gdb::optional<byte_vector>.
11617         (target_read_stralloc): Return gdb::optional<char_vector>.
11618         (target_get_osdata): Return gdb::optional<char_vector>.
11619         * target.c (target_read_alloc_1): Templatize.  Replacement
11620         manual memory management with vector.
11621         (target_read_alloc): Change return type, adjust.
11622         (target_read_stralloc): Change return type, adjust.
11623         (target_get_osdata): Change return type, adjust.
11624         * auxv.c (struct auxv_info) <length>: Remove.
11625         <data>: Change type to gdb::optional<byte_vector>.
11626         (auxv_inferior_data_cleanup): Free auxv_info with delete.
11627         (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
11628         (target_auxv_search): Adjust.
11629         (fprint_target_auxv): Adjust.
11630         * avr-tdep.c (avr_io_reg_read_command): Adjust.
11631         * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
11632         (linux_make_corefile_notes): Adjust.
11633         * osdata.c (get_osdata): Adjust.
11634         * remote.c (remote_get_threads_with_qxfer): Adjust.
11635         (remote_memory_map): Adjust.
11636         (remote_traceframe_info): Adjust.
11637         (btrace_read_config): Adjust.
11638         (remote_read_btrace): Adjust.
11639         (remote_pid_to_exec_file): Adjust.
11640         * solib-aix.c (solib_aix_get_library_list): Adjust.
11641         * solib-dsbt.c (decode_loadmap): Don't free buf.
11642         (dsbt_get_initial_loadmaps): Adjust.
11643         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
11644         * solib-target.c (solib_target_current_sos): Adjust.
11645         * tracepoint.c (sdata_make_value): Adjust.
11646         * xml-support.c (xinclude_start_include): Adjust.
11647         (xml_fetch_content_from_file): Adjust.
11648         * xml-support.h (xml_fetch_another): Change return type.
11649         (xml_fetch_content_from_file): Change return type.
11650         * xml-syscall.c (xml_init_syscalls_info): Adjust.
11651         * xml-tdesc.c (file_read_description_xml): Adjust.
11652         (fetch_available_features_from_target): Change return type.
11653         (target_fetch_description_xml): Adjust.
11654         (target_read_description_xml): Adjust.
11655
11656 2018-04-06  Tom Tromey  <tom@tromey.com>
11657
11658         * value.c (~value): Update.
11659         (struct value) <contents>: Now unique_xmalloc_ptr.
11660         (value_contents_bits_eq, allocate_value_contents)
11661         (value_contents_raw, value_contents_all_raw)
11662         (value_contents_for_printing, value_contents_for_printing_const)
11663         (set_value_enclosing_type): Update.
11664
11665 2018-04-06  Tom Tromey  <tom@tromey.com>
11666
11667         * value.c (range_s): Remove typedef, VEC.
11668         (struct range): Add operator<.
11669         (range_lessthan): Remove.
11670         (ranges_contain): Change type.
11671         (~value): Update.
11672         (struct value) <unavailable, optimized_out>: Now std::vector.
11673         (value_entirely_available)
11674         (value_entirely_covered_by_range_vector)
11675         (value_entirely_unavailable, value_entirely_optimized_out):
11676         Update.
11677         (insert_into_bit_range_vector): Change argument type.
11678         (find_first_range_overlap): Likewise.
11679         (struct ranges_and_idx, value_contents_bits_eq)
11680         (require_not_optimized_out, require_available): Update.
11681         (ranges_copy_adjusted): Change argument types.
11682         (value_optimized_out, value_copy, value_fetch_lazy): Update.
11683
11684 2018-04-06  Tom Tromey  <tom@tromey.com>
11685
11686         * value.c (~value): Update.
11687         (struct value) <parent>: Now a value_ref_ptr.
11688         (value_parent, set_value_parent, value_address, value_copy):
11689         Update.
11690
11691 2018-04-06  Tom Tromey  <tom@tromey.com>
11692
11693         * value.c (struct value): Add constructor, destructor, and member
11694         initializers.
11695         (allocate_value_lazy, value_decref): Update.
11696
11697 2018-04-06  Tom Tromey  <tom@tromey.com>
11698
11699         * value.c (struct value) <released, next>: Remove.
11700         (all_values): Now a std::vector.
11701         (allocate_value_lazy): Update.
11702         (value_next): Remove.
11703         (value_mark, value_free_to_mark, release_value)
11704         (value_release_to_mark): Update.
11705
11706 2018-04-06  Tom Tromey  <tom@tromey.com>
11707
11708         * value.h (fetch_subexp_value, value_release_to_mark): Update.
11709         (free_value_chain): Remove.
11710         * value.c (free_value_chain): Remove.
11711         (value_release_to_mark): Return a std::vector.
11712         * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
11713         std::vector.
11714         (check_condition): Update.
11715         * eval.c (fetch_subexp_value): Change "val_chain" to a
11716         std::vector.
11717         * breakpoint.c (update_watchpoint): Update.
11718         (can_use_hardware_watchpoint): Change "vals" to a std::vector.
11719
11720 2018-04-06  Tom Tromey  <tom@tromey.com>
11721
11722         * value.h (free_all_values): Remove.
11723         * value.c (free_all_values): Remove.
11724
11725 2018-04-06  Tom Tromey  <tom@tromey.com>
11726
11727         * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
11728         (value_history_chain, value_history_count): Remove.
11729         (value_history): New global.
11730         (record_latest_value, access_value_history, show_values)
11731         (preserve_values): Update.
11732
11733 2018-04-06  Tom Tromey  <tom@tromey.com>
11734
11735         * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
11736         * varobj.c (varobj_set_display_format, varobj_set_value)
11737         (install_default_visualizer, construct_visualizer)
11738         (install_new_value, ~varobj, varobj_get_value_type)
11739         (my_value_of_variable, varobj_editable_p): Update.
11740         * c-varobj.c (c_describe_child, c_value_of_variable)
11741         (cplus_number_of_children, cplus_describe_child): Update.
11742         * ada-varobj.c (ada_number_of_children, ada_name_of_child)
11743         (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
11744         (ada_value_of_variable, ada_value_is_changeable_p): Update.
11745
11746 2018-04-06  Tom Tromey  <tom@tromey.com>
11747
11748         * printcmd.c (last_examine_address): Change type to
11749         value_ref_ptr.
11750         (do_examine, x_command): Update.
11751
11752 2018-04-06  Tom Tromey  <tom@tromey.com>
11753
11754         * value.c (release_value): Update.
11755         * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
11756         (struct bpstats) <val>: Now a value_ref_ptr.
11757         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
11758         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
11759         (~watchpoint, print_it_watchpoint, watch_command_1)
11760         (invalidate_bp_value_on_memory_change): Update.
11761
11762 2018-04-06  Tom Tromey  <tom@tromey.com>
11763
11764         * varobj.c (varobj_clear_saved_item)
11765         (update_dynamic_varobj_children, install_new_value, ~varobj):
11766         Update.
11767         * value.h (value_incref): Move declaration earlier.
11768         (value_decref): Rename from value_free.
11769         (struct value_ref_policy): New.
11770         (value_ref_ptr): New typedef.
11771         (struct value_deleter): Remove.
11772         (gdb_value_up): Remove typedef.
11773         (release_value): Change return type.
11774         (release_value_or_incref): Remove.
11775         * value.c (set_value_parent): Update.
11776         (value_incref): Change return type.
11777         (value_decref): Rename from value_free.
11778         (value_free_to_mark, free_all_values, free_value_chain): Update.
11779         (release_value): Return value_ref_ptr.
11780         (release_value_or_incref): Remove.
11781         (record_latest_value, set_internalvar, clear_internalvar):
11782         Update.
11783         * stack.c (info_frame_command): Don't call value_free.
11784         * python/py-value.c (valpy_dealloc, valpy_new)
11785         (value_to_value_object): Update.
11786         * printcmd.c (do_examine): Update.
11787         * opencl-lang.c (lval_func_free_closure): Update.
11788         * mi/mi-main.c (register_changed_p): Don't call value_free.
11789         * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
11790         * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
11791         * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
11792         value_free.
11793         * guile/scm-value.c (vlscm_free_value_smob)
11794         (vlscm_scm_from_value): Update.
11795         * frame.c (frame_register_unwind, frame_unwind_register_signed)
11796         (frame_unwind_register_unsigned, get_frame_register_bytes)
11797         (put_frame_register_bytes): Don't call value_free.
11798         * findvar.c (address_from_register): Don't call value_free.
11799         * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
11800         * dwarf2loc.c (entry_data_value_free_closure)
11801         (value_of_dwarf_reg_entry, free_pieced_value_closure)
11802         (dwarf2_evaluate_loc_desc_full): Update.
11803         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
11804         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
11805         (~watchpoint, watch_command_1)
11806         (invalidate_bp_value_on_memory_change): Update.
11807         * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
11808
11809 2018-04-06  Simon Marchi  <simon.marchi@polymtl.ca>
11810
11811         PR gdb/23022
11812         * warning.m4: Add -Wno-error=deprecated-register.
11813         * configure: Re-generate.
11814
11815 2018-04-05  Tom Tromey  <tom@tromey.com>
11816
11817         * linespec.h: Remove include of "vec.h".
11818
11819 2018-04-05  Tom Tromey  <tom@tromey.com>
11820
11821         * linespec.c (typep): Remove typedef.
11822         (find_methods, find_superclass_methods): Take a std::vector.
11823         (find_method): Use std::vector.
11824
11825 2018-04-05  Tom Tromey  <tom@tromey.com>
11826
11827         * utils.c (compare_strings): Remove.
11828         * utils.h (compare_strings): Remove.
11829         * objc-lang.h (find_imps): Update.
11830         * objc-lang.c (find_methods): Take a std::vector.
11831         (uniquify_strings, find_imps): Likewise.
11832         * linespec.c (find_methods): Take a std::vector.
11833         (decode_objc): Use std::vector.
11834         (add_all_symbol_names_from_pspace, find_superclass_methods): Take
11835         a std::vector.
11836         (find_method, find_function_symbols): Use std::vector.
11837
11838 2018-04-05  Tom Tromey  <tom@tromey.com>
11839
11840         * completer.c (completion_tracker::completion_tracker): Remove
11841         cast.
11842         (completion_tracker::discard_completions): Likewise.
11843         * breakpoint.c (ambiguous_names_p): Remove cast.
11844         * ada-lang.c (_initialize_ada_language): Remove cast.
11845         * utils.h (streq): Update.
11846         (streq_hash): Add new declaration.
11847         * utils.c (streq): Return bool.
11848         (streq_hash): New function.
11849
11850 2018-04-05  Tom Tromey  <tom@tromey.com>
11851
11852         * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
11853         Remove a string copy.
11854
11855 2018-04-05  Tom Tromey  <tom@tromey.com>
11856
11857         * linespec.c (filter_results): Use std::vector.
11858         (decode_line_2, decode_line_full): Update.
11859
11860 2018-04-05  Tom Tromey  <tom@tromey.com>
11861
11862         * linespec.c (canonical_to_fullform): Return std::string.
11863         (filter_results): Update.
11864         (struct decode_line_2_item): Add constructor.
11865         <fullform, displayform>: Now std::string.
11866         (decode_line_2_compare_items): Now a std::sort comparator.
11867         (decode_line_2): Update.
11868
11869 2018-04-05  Tom Tromey  <tom@tromey.com>
11870
11871         * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
11872         (unexpected_linespec_error): Update.
11873         (linespec_parse_basic, parse_linespec): Update.
11874
11875 2018-04-05  Tom Tromey  <tom@tromey.com>
11876
11877         * linespec.c (linespec_parse_basic): Reindent.
11878
11879 2018-04-05  Tom Tromey  <tom@tromey.com>
11880
11881         * minsyms.h (iterate_over_minimal_symbols): Update.
11882         * minsyms.c (iterate_over_minimal_symbols): Take a
11883         gdb::function_view.
11884         * linespec.c (struct collect_minsyms): Remove.
11885         (compare_msyms): Now a std::sort comparator.
11886         (add_minsym): Add parameters.
11887         (search_minsyms_for_name): Update.  Use std::vector.
11888
11889 2018-04-03  Tom Tromey  <tom@tromey.com>
11890
11891         * mipsread.c (read_alphacoff_dynamic_symtab): Use
11892         gdb::byte_vector.
11893
11894 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
11895
11896         * MAINTAINERS (Write After Approval): Add Weimin Pan.
11897
11898 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
11899
11900         PR gdb/16959
11901         * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when 
11902         printing static type.
11903
11904 2018-04-01  Tom Tromey  <tom@tromey.com>
11905
11906         * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
11907         (rs6000_xfer_shared_libraries): Update.
11908
11909 2018-04-01  Simon Marchi  <simon.marchi@polymtl.ca>
11910
11911         * common/gdb_vecs.h (char_ptr): Remove.
11912         * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
11913
11914 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
11915
11916         * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
11917         with std::vector.
11918         * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
11919
11920 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
11921
11922         * tracepoint.h (struct uploaded_tp): Initialize fields.
11923         <actions, step_actions, cmd_strings>: Change type to
11924         std::vector<char *>.
11925         * tracepoint.c (get_uploaded_tp): Allocate with new.
11926         (free_uploaded_tps): Free with delete.
11927         (parse_tracepoint_definition): Adjust to std::vector change.
11928         * breakpoint.c (read_uploaded_action): Likewise.
11929         (create_tracepoint_from_upload): Likewise.
11930         * ctf.c (ctf_write_uploaded_tp): Likewise.
11931         (SET_ARRAY_FIELD): Likewise.
11932         * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
11933
11934 2018-03-30  Tom Tromey  <tom@tromey.com>
11935
11936         * solib-svr4.c (lm_info_read): Use gdb::byte_vector.  Return
11937         std::unique_ptr.
11938         (svr4_keep_data_in_core): Update.
11939         (svr4_read_so_list): Update.
11940
11941 2018-03-30  Tom Tromey  <tom@tromey.com>
11942
11943         * windows-nat.c (handle_output_debug_string, handle_exception):
11944         Update.
11945         * target.h (target_read_string): Update.
11946         * target.c (target_read_string): Change "string" to
11947         unique_xmalloc_ptr.
11948         * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
11949         Update.
11950         * solib-frv.c (frv_current_sos): Update.
11951         * solib-dsbt.c (dsbt_current_sos): Update.
11952         * solib-darwin.c (darwin_current_sos): Update.
11953         * linux-thread-db.c (inferior_has_bug): Update.
11954         * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
11955         Update.  Remove alloca.
11956         * ada-lang.c (ada_main_name): Update.
11957
11958 2018-03-30  Tom Tromey  <tom@tromey.com>
11959
11960         * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
11961         (struct dwo_file_deleter): New.
11962         (dwo_file_up): New typedef.
11963         (open_and_init_dwo_file): Use dwo_file_up.
11964         (free_dwo_file_cleanup): Remove.
11965
11966 2018-03-30  Tom Tromey  <tom@tromey.com>
11967
11968         * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
11969         (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
11970
11971 2018-03-30  Tom Tromey  <tom@tromey.com>
11972
11973         * dwarf2read.c (class free_cached_comp_units): New class.
11974         (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
11975         (free_cached_comp_units): Remove function.
11976
11977 2018-03-30  Tom Tromey  <tom@tromey.com>
11978
11979         * utils.h (make_cleanup_unpush_target): Remove.
11980         * inf-ptrace.c (struct target_unpusher): New.
11981         (target_unpush_up) New typedef.
11982         (inf_ptrace_create_inferior, inf_ptrace_attach): Use
11983         target_unpush_up.
11984         * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
11985
11986 2018-03-27  Tom Tromey  <tom@tromey.com>
11987
11988         * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
11989
11990 2018-03-27  Pedro Alves  <palves@redhat.com>
11991             Tom Tromey  <tom@tromey.com>
11992
11993         * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
11994         destructor.  Now a class.
11995         (gdb_readline_wrapper_cleanup): Remove function.
11996         (gdb_readline_wrapper): Remove cleanups.
11997
11998 2018-03-27  Tom Tromey  <tom@tromey.com>
11999
12000         * typeprint.h (struct type_print_options) <local_typedefs,
12001         global_typedefs>: Remove "struct" keyword.
12002         (class typedef_hash_table): New class.
12003         (recursively_update_typedef_hash, add_template_parameters)
12004         (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
12005         (find_typedef_in_hash): Don't declare.
12006         * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
12007         (typedef_hash_table::recursively_update): Rename from
12008         recursively_update_typedef_hash.  Now a member.
12009         (typedef_hash_table::add_template_parameters): Rename from
12010         add_template_parameters.  Now a member.
12011         (typedef_hash_table::typedef_hash_table): Now a constructor;
12012         rename from create_typedef_hash.
12013         (typedef_hash_table::~typedef_hash_table): Now a destructor;
12014         rename from free_typedef_hash.
12015         (do_free_typedef_hash, make_cleanup_free_typedef_hash)
12016         (do_free_global_table): Remove.
12017         (typedef_hash_table::typedef_hash_table): New constructor; renamed
12018         from copy_type_recursive.
12019         (create_global_typedef_table): Remove.
12020         (typedef_hash_table::find_global_typedef): Now a member of
12021         typedef_hash_table.
12022         (typedef_hash_table::find_typedef): Rename from
12023         find_typedef_in_hash; now a member.
12024         (whatis_exp): Update.
12025         * extension.h (struct ext_lang_type_printers): Add constructor and
12026         destructor.
12027         (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
12028         declare.
12029         * extension.c (ext_lang_type_printers::ext_lang_type_printers):
12030         Now a constructor; rename from start_ext_lang_type_printers.
12031         (ext_lang_type_printers): Now a destructor; rename from
12032         free_ext_lang_type_printers.
12033         * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
12034         Update.
12035         (c_type_print_base_struct_union): Update.  Remove cleanups.
12036
12037 2018-03-27  Tom Tromey  <tom@tromey.com>
12038
12039         * dwarf-index-write.c: Include <cmath>.
12040
12041 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
12042
12043         * NEWS: Add entry describing new "set|show varsize-limit" command.
12044         * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
12045         command.
12046         * printcmd.c (_initialize_printcmd): Add "set var" alias of
12047         "set variable".
12048
12049 2018-03-27  Simon Marchi  <simon.marchi@ericsson.com>
12050
12051         * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
12052         dwarf-index-write.c
12053         (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
12054         * dwarf-index-common.c: New file.
12055         * dwarf-index-common.h: New file.
12056         * dwarf-index-write.c: New file.
12057         * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
12058         (struct dwarf2_section_info): Move from here.
12059         (dwarf2_section_info_def): Likewise.
12060         (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
12061         (offset_type): Likewise.
12062         (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
12063         (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
12064         (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
12065         (byte_swap): Likewise.
12066         (MAYBE_SWAP): Likewise.
12067         (dwarf2_per_cu_ptr): Likewise.
12068         (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
12069         (struct tu_stats): Likewise.
12070         (struct dwarf2_per_objfile): Likewise.
12071         (struct dwarf2_per_cu_data): Likewise.
12072         (struct signatured_type): Likewise.
12073         (sig_type_ptr): Likewise.
12074         (DEF_VEC_P (sig_type_ptr)): Likewise.
12075         (INDEX4_SUFFIX): Likewise.
12076         (INDEX5_SUFFIX): Likewise.
12077         (DEBUG_STR_SUFFIX): Likewise.
12078         (dwarf2_read_section): Make non-static.
12079         (mapped_index_string_hash): Move from here.
12080         (dwarf5_djb_hash): Likewise.
12081         (file_write): Likewise.
12082         (class data_buf): Likewise.
12083         (struct symtab_index_entry): Likewise.
12084         (struct mapped_symtab): Likewise.
12085         (find_slot): Likewise.
12086         (hash_expand): Likewise.
12087         (add_index_entry): Likewise.
12088         (uniquify_cu_indices): Likewise.
12089         (class c_str_view): Likewise.
12090         (class c_str_view_hasher): Likewise.
12091         (class vector_hasher): Likewise.
12092         (write_hash_table): Likewise.
12093         (psym_index_map): Likewise.
12094         (struct addrmap_index_data): Likewise.
12095         (add_address_entry): Likewise.
12096         (add_address_entry_worker): Likewise.
12097         (write_address_map): Likewise.
12098         (symbol_kind): Likewise.
12099         (write_psymbols): Likewise.
12100         (struct signatured_type_index_data): Likewise.
12101         (write_one_signatured_type): Likewise.
12102         (recursively_count_psymbols): Likewise.
12103         (recursively_write_psymbols): Likewise.
12104         (class debug_names): Likewise.
12105         (check_dwarf64_offsets): Likewise.
12106         (psyms_seen_size): Likewise.
12107         (write_gdbindex): Likewise.
12108         (write_debug_names): Likewise.
12109         (assert_file_size): Likewise.
12110         (write_psymtabs_to_index): Likewise.
12111         (save_gdb_index_command): Likewise.
12112         (_initialize_dwarf2_read): Don't register the "save gdb-index"
12113         command.
12114         * dwarf2read.h: New file.
12115
12116 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
12117
12118         PR gdb/22670
12119         * dwarf2read.c (dwarf2_physname): Do not return the demangled
12120         symbol name if the CU's language stores symbol names in linkage
12121         format.
12122         * language.h (struct language_defn)
12123         <la_store_sym_names_in_linkage_form_p>: New field.  Adjust
12124         all instances of this struct.
12125
12126 2018-03-26  Tom Tromey  <tom@tromey.com>
12127
12128         * stack.c (backtrace_command_1): Remove verbose code.
12129
12130 2018-03-26  Tom Tromey  <tom@tromey.com>
12131
12132         * python/py-framefilter.c (py_print_type): Don't catch
12133         exceptions.  Return void.
12134         (py_print_value): Likewise.
12135         (py_print_single_arg): Likewise.
12136         (enumerate_args): Don't catch exceptions.
12137         (py_print_args): Likewise.
12138         (py_print_frame): Likewise.
12139         (gdbpy_apply_frame_filter): Catch exceptions here.
12140
12141 2018-03-26  Tom Tromey  <tom@tromey.com>
12142
12143         * stack.c (_initialize_stack): Remove trailing newlines from help
12144         text.  Add "Usage" line to "backtrace" help.
12145
12146 2018-03-26  Tom Tromey  <tom@tromey.com>
12147
12148         PR python/16486:
12149         * python/py-framefilter.c (py_print_args): Call wrap_hint.
12150
12151 2018-03-26  Tom Tromey  <tom@tromey.com>
12152
12153         * python/py-framefilter.c (py_print_single_arg): Return
12154         EXT_LANG_BT_ERROR from catch.
12155
12156 2018-03-26  Tom Tromey  <tom@tromey.com>
12157
12158         PR backtrace/15584:
12159         * stack.c (backtrace_command_1): Move some code into no-filters
12160         "if".
12161
12162 2018-03-26  Tom Tromey  <tom@tromey.com>
12163
12164         * python/py-framefilter.c (throw_quit_or_print_exception): New
12165         function.
12166         (gdbpy_apply_frame_filter): Use it.
12167
12168 2018-03-26  Tom Tromey  <tom@tromey.com>
12169
12170         PR cli/17716:
12171         * python/py-framefilter.c (py_print_type, py_print_value)
12172         (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
12173         RETURN_MASK_ERROR.
12174
12175 2018-03-26  Tom Tromey  <tom@tromey.com>
12176
12177         * python/py-framefilter.c (enumerate_args): Use
12178         gdb::unique_xmalloc_ptr.
12179
12180 2018-03-26  Tom Tromey  <tom@tromey.com>
12181
12182         * python/py-framefilter.c (py_print_frame): Return
12183         EXT_LANG_BT_OK.
12184         (gdbpy_apply_frame_filter): Update comment.
12185         * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
12186         Remove.
12187         <EXT_LANG_BT_NO_FILTERS>: Change value.
12188
12189 2018-03-26  Tom Tromey  <tom@tromey.com>
12190
12191         PR backtrace/15582:
12192         * stack.c (backtrace_command): Parse "hide" argument.
12193         * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
12194         * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
12195         constant.
12196
12197 2018-03-26  Tom Tromey  <tom@tromey.com>
12198
12199         * stack.c (backtrace_command_1): Remove "show_locals" parameter,
12200         add "flags".
12201         (backtrace_command): Remove "fulltrace", add "flags".
12202
12203 2018-03-26  Tom Tromey  <tom@tromey.com>
12204
12205         * stack.c (backtrace_command): Rewrite command line parsing.
12206
12207 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
12208
12209         * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
12210
12211 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
12212
12213         * filename-seen-cache.h: Add include guard.
12214
12215 2018-03-26  Keith Seitz  <keiths@redhat.com>
12216
12217         * symfile.c (place_section): Remove "struct" from section_addr_info
12218         in comment.
12219         * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
12220         "struct" keyword from section_addr_info.
12221
12222 2018-03-26  Alan Hayward  <alan.hayward@arm.com>
12223
12224         * regformats/regdef.h (reg): Add constructors.
12225
12226 2018-03-25  Pedro Alves  <palves@redhat.com>
12227
12228         * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
12229         if then/else bodies in var_func_name extraction.
12230
12231 2018-03-23  Weimin Pan  <weimin.pan@oracle.com>
12232
12233         * minsyms.c (lookup_minimal_symbol_and_objfile): Use
12234         lookup_minimal_symbol() to find symbol entry.
12235         * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
12236
12237 2018-03-23  Keith Seitz  <keiths@redhat.com>
12238
12239         PR c++/22968
12240         * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
12241         nested type definitions for C++, too.
12242
12243 2018-03-23  Tom Tromey  <tom@tromey.com>
12244
12245         * machoread.c (struct oso_el): Add a constructor.  Don't define as
12246         a typedef.
12247         (macho_register_oso): Remove.
12248         (macho_symtab_read): Take a std::vector.
12249         (oso_el_compare_name): Now a std::sort comparator.
12250         (macho_symfile_read_all_oso): Take a std::vector.
12251         (macho_symfile_read): Use std::vector.  Remove cleanups.
12252
12253 2018-03-22  Tom Tromey  <tom@tromey.com>
12254
12255         * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
12256         (record_full_goto_bookmark): Use std::string.
12257
12258 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
12259
12260         PR tdep/18295
12261         * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
12262         a single mask.
12263
12264 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
12265
12266         * rs6000-tdep.c (store_insn_p): New function.
12267         (skip_prologue): New variable alloca_reg_offset. Set lr_reg
12268         and cr_reg to their unshifted values. Use store_insn_p to
12269         match LR saves using either R1 or fdata->alloca_reg. Use
12270         store_insn_p to match CR saves. Set alloca_reg_offset
12271         when alloca_reg and framep are set. Remove lr_reg shift
12272         when assigning to fdata->lr_register.
12273
12274 2018-03-22  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12275
12276         * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
12277         command line args instead of emitting a warning.
12278
12279 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
12280
12281         * tracepoint.h (struct static_tracepoint_marker): Initialize
12282         fields, define default constructor, move constructor and move
12283         assignment, disable the rest.
12284         <str_id, extra>: Make std::string.
12285         (release_static_tracepoint_marker): Remove.
12286         (free_current_marker): Remove.
12287         * tracepoint.c (free_current_marker): Remove.
12288         (parse_static_tracepoint_marker_definition): Adjust to
12289         std::string, use new hex2str overload.
12290         (release_static_tracepoint_marker): Remove.
12291         (print_one_static_tracepoint_marker): Get marker by reference
12292         and adjust to std::string.
12293         (info_static_tracepoint_markers_command): Adjust to std::vector
12294         changes
12295         * target.h (static_tracepoint_marker_p): Remove typedef.
12296         (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
12297         (struct target_ops) <to_static_tracepoint_marker_at>: Return
12298         bool.
12299         <to_static_tracepoint_markers_by_strid>: Return std::vector.
12300         * target-debug.h
12301         (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
12302         (target_debug_print_std_vector_static_tracepoint_marker): New.
12303         (target_debug_print_struct_static_tracepoint_marker_p): Rename
12304         to...
12305         (target_debug_print_static_tracepoint_marker_p): ... this.
12306         * target-delegates.c: Re-generate.
12307         * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
12308         Make std::string.
12309         * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
12310         (decode_static_tracepoint_spec): Adjust to std::vector.
12311         (tracepoint_print_one_detail): Adjust to std::string.
12312         (strace_marker_decode_location): Adjust to std::string.
12313         (update_static_tracepoint): Adjust to std::string, remove call
12314         to release_static_tracepoint_marker.
12315         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
12316         Adjust to std::vector.
12317         * remote.c (remote_static_tracepoint_marker_at): Return bool.
12318         (remote_static_tracepoint_markers_by_strid): Adjust to
12319         std::vector.
12320         * common/rsp-low.h (hex2str): New overload with explicit count
12321         of bytes.
12322         * common/rsp-low.c (hex2str): New overload with explicit count
12323         of bytes.
12324         * unittests/rsp-low-selftests.c (test_hex2str): New function.
12325         (_initialize_rsp_low_selftests): Add test_hex2str test.
12326         * unittests/tracepoint-selftests.c
12327         (test_parse_static_tracepoint_marker_definition): Adjust to
12328         std::string.
12329
12330 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
12331
12332         * tracepoint.c (parse_static_tracepoint_marker_definition):
12333         Consider case where the definition is followed by more
12334         definitions.
12335         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12336         tracepoint-selftests.c.
12337         * unittests/tracepoint-selftests.c: New.
12338
12339 2018-03-21  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
12340
12341         * MAINTAINERS (Write After Approval): Add Pedro Franco de
12342         Carvalho.
12343
12344 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
12345
12346         * symtab.c (find_pc_sect_line): fixed indentation.
12347
12348 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
12349
12350         * symtab.c (find_pc_sect_line): now uses binary search.
12351
12352 2018-03-19  Tom Tromey  <tom@tromey.com>
12353
12354         * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
12355         "IDENT" production.
12356
12357 2018-03-19  Pedro Alves  <palves@redhat.com>
12358             Tom Tromey  <tom@tromey.com>
12359
12360         * unittests/observable-selftests.c: New file.
12361         * common/observable.h: New file.
12362         * observable.h: New file.
12363         * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
12364         arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
12365         breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
12366         corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
12367         extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
12368         infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
12369         linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
12370         mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
12371         ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
12372         python/py-breakpoint.c, python/py-finishbreakpoint.c,
12373         python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
12374         record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
12375         riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
12376         spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
12377         symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
12378         tui/tui-interp.c, valops.c: Update all users.
12379         * tui/tui-hooks.c (tui_bp_created_observer)
12380         (tui_bp_deleted_observer, tui_bp_modified_observer)
12381         (tui_inferior_exit_observer, tui_before_prompt_observer)
12382         (tui_normal_stop_observer, tui_register_changed_observer):
12383         Remove.
12384         (tui_observers_token): New global.
12385         (attach_or_detach, tui_attach_detach_observers): New functions.
12386         (tui_install_hooks, tui_remove_hooks): Use
12387         tui_attach_detach_observers.
12388         * record-btrace.c (record_btrace_thread_observer): Remove.
12389         (record_btrace_thread_observer_token): New global.
12390         * observer.sh: Remove.
12391         * observer.c: Rename to observable.c.
12392         * observable.c (namespace gdb_observers): Define new objects.
12393         (observer_debug): Move into gdb_observers namespace.
12394         (struct observer, struct observer_list, xalloc_observer_list_node)
12395         (xfree_observer_list_node, generic_observer_attach)
12396         (generic_observer_detach, generic_observer_notify): Remove.
12397         (_initialize_observer): Update.
12398         Don't include observer.inc.
12399         * Makefile.in (generated_files): Remove observer.h, observer.inc.
12400         (clean mostlyclean): Likewise.
12401         (observer.h, observer.inc): Remove targets.
12402         (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
12403         (COMMON_SFILES): Use observable.c, not observer.c.
12404         * .gitignore: Remove observer.h.
12405
12406 2018-03-18  Tom Tromey  <tom@tromey.com>
12407
12408         * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
12409         gdb::def_vector.
12410         (bfd_lookup_symbol_from_dyn_symtab): Likewise.
12411
12412 2018-03-17  Tom Tromey  <tom@tromey.com>
12413
12414         * auto-load.c (auto_load_objfile_script_1): Use std::string.
12415
12416 2018-03-17  Tom Tromey  <tom@tromey.com>
12417
12418         * target.c (class scoped_target_fd): New.
12419         (target_fileio_close_cleanup): Remove.
12420         (target_fileio_read_alloc_1): Use scoped_target_fd.
12421
12422 2018-03-16  Simon Marchi  <simon.marchi@polymtl.ca>
12423
12424         * silent-rules.mk: New.
12425         * Makefile.in: Include silent-rules.mk
12426         (srcdir, VPATH, top_srcdir): Move up.
12427         (COMPILE): Add ECHO_CXX.
12428         (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
12429         (init.c): Add ECHO_INIT_C.
12430         (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
12431         (version.c): Add ECHO_GEN.
12432         (printcmd.o): Add ECHO_CXX.
12433         (target-float.o): Add ECHO_CXX.
12434         (ada-exp.o): Add ECHO_CXX.
12435         (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
12436         (insight$(EXEEXT)): Add ECHO_CXXLD.
12437         * gnulib/configure.ac: Add AM_SILENT_RULES.
12438         * gnulib/aclocal.m4: Re-generate.
12439         * gnulib/configure: Re-generate.
12440         * gnulib/import/Makefile.in: Re-generate.
12441
12442 2018-03-16  Tom Tromey  <tom@tromey.com>
12443
12444         * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
12445         * utils.h (make_cleanup_free_section_addr_info): Don't declare.
12446         * utils.c (do_free_section_addr_info)
12447         (make_cleanup_free_section_addr_info): Remove.
12448         * symfile.h (struct other_sections): Add constructor.
12449         (struct section_addr_info): Remove.
12450         (section_addr_info): New typedef.
12451         (struct sym_fns) <sym_offsets>: Change type of parameter.
12452         (build_section_addr_info_from_objfile)
12453         (relative_addr_info_to_section_offsets, addr_info_make_relative)
12454         (default_symfile_offsets, symbol_file_add)
12455         (symbol_file_add_from_bfd)
12456         (build_section_addr_info_from_section_table): Update.
12457         (alloc_section_addr_info, free_section_addr_info): Don't declare.
12458         * symfile.c (alloc_section_addr_info): Remove.
12459         (build_section_addr_info_from_section_table): Change return type.
12460         Update.
12461         (build_section_addr_info_from_bfd)
12462         (build_section_addr_info_from_objfile): Likewise.
12463         (free_section_addr_info): Remove.
12464         (relative_addr_info_to_section_offsets): Change type of "addrs".
12465         (addrs_section_compar): Now a std::sort comparator.
12466         (addrs_section_sort): Change return type.
12467         (addr_info_make_relative): Change type of "addrs".  Update.
12468         (default_symfile_offsets, syms_from_objfile_1)
12469         (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
12470         (symbol_file_add_separate): Update.
12471         (symbol_file_add): Change type of "addrs".  Update.
12472         (add_symbol_file_command): Update.  Remove cleanups.
12473         * symfile-mem.c (symbol_file_add_from_memory): Update.  Remove
12474         cleanups.
12475         * symfile-debug.c (debug_sym_offsets): Change type of "info".
12476         * solib.c (solib_read_symbols): Update.
12477         * objfiles.c (objfile_relocate): Update.  Remove cleanups.
12478         * machoread.c (macho_symfile_offsets): Update.
12479         * jit.c (jit_bfd_try_read_symtab): Update.
12480
12481 2018-03-15  Simon Marchi  <simon.marchi@polymtl.ca>
12482
12483         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12484         unittests/utils-selftests.c.
12485         * unittests/utils-selftests.c: New file.
12486
12487 2018-03-14  Tom Tromey  <tom@tromey.com>
12488
12489         PR cli/14977:
12490         * printcmd.c (printf_c_string, printf_wide_c_string): Special case
12491         for NULL.
12492
12493 2018-03-14  Tom Tromey  <tom@tromey.com>
12494
12495         PR cli/19918:
12496         * printcmd.c (printf_pointer): Allow "-" in format.
12497
12498 2018-03-14  Tom Tromey  <tom@tromey.com>
12499
12500         * printcmd.c (_initialize_printcmd): Add usage to printf.
12501
12502 2018-03-14  Yao Qi  <qiyao@sourceware.org>
12503
12504         * MAINTAINERS: Update my email address.
12505
12506 2018-03-13  Tom Tromey  <tom@tromey.com>
12507
12508         * machoread.c (macho_check_dsym): Change filenamep to a
12509         std::string*.
12510         (macho_symfile_read): Update.
12511         * symfile.c (load_command): Use std::string.
12512
12513 2018-03-12  Andrew Burgess  <andrew.burgess@embecosm.com>
12514
12515         * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
12516         to error message string.
12517         (riscv_register_name): Use xsnprintf instead of sprintf.
12518         (riscv_insn::fetch_instruction): Use gdb_assert instead of
12519         internal_error.
12520         (riscv_print_arg_location): Use gdb_assert_not_reached instead of
12521         error.
12522         (riscv_push_dummy_call): Likewise.
12523
12524 2018-03-12  Tom Tromey  <tom@tromey.com>
12525
12526         * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
12527         Use gdb::byte_vector.
12528         * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
12529
12530 2018-03-12  Yao Qi  <yao.qi@linaro.org>
12531
12532         * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
12533         parameter type to readable_regcache.
12534         * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
12535         the declaration.
12536
12537 2018-03-11  Tom Tromey  <tom@tromey.com>
12538
12539         * dwarf2read.c (struct nextfield): Add initializers.
12540         (struct nextfnfield): Remove.
12541         (struct fnfieldlist): Add initializers.  Remove "length" and
12542         "head", use std::vector.
12543         (struct decl_field_list): Remove.
12544         (struct field_info): Add initializers.
12545         <fields, baseclasses>: Now std::vector.
12546         <nbaseclasses, nfnfields, typedef_field_list_count,
12547         nested_types_list_count>: Remove.
12548         (dwarf2_add_field, dwarf2_add_type_defn)
12549         (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
12550         (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
12551         (process_structure_scope): Update.
12552
12553 2018-03-11  Tom Tromey  <tom@tromey.com>
12554
12555         * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
12556         for use by std::sort.
12557         (build_type_psymtabs_1): Use std::vector.
12558
12559 2018-03-09  Eli Zaretskii  <eliz@gnu.org>
12560
12561         * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
12562         and LIBMPFR in the printed configuration.
12563
12564 2018-03-08  Tom Tromey  <tom@tromey.com>
12565
12566         * source.c (get_filename_and_charpos): Use scoped_fd.
12567         * nto-procfs.c (procfs_open_1): Use scoped_fd.
12568         (procfs_pidlist): Likewise.
12569         * procfs.c (proc_get_LDT_entry): Use scoped_fd.
12570         (iterate_over_mappings): Likewise.
12571
12572 2018-03-08  Tom Tromey  <tom@tromey.com>
12573
12574         * infcall.c (struct call_return_meta_info)
12575         <stack_temporaries_enabled>: Remove.
12576         (get_call_return_value, call_function_by_hand_dummy): Update.
12577         * thread.c (disable_thread_stack_temporaries): Remove.
12578         (enable_thread_stack_temporaries): Remove.
12579         (thread_stack_temporaries_enabled_p): Return bool.
12580         (push_thread_stack_temporary, value_in_thread_stack_temporaries)
12581         (get_last_thread_stack_temporary): Update.
12582         * eval.c (evaluate_subexp): Update.
12583         * gdbthread.h (class enable_thread_stack_temporaries): Now a
12584         class, not a function.
12585         (value_ptr, value_vec): Remove typedefs.
12586         (class thread_info) <stack_temporaries_enabled>: Now bool.
12587         <stack_temporaries>: Now a std::vector.
12588         (thread_stack_temporaries_enabled_p)
12589         (value_in_thread_stack_temporaries): Return bool.
12590
12591 2018-03-08  Simon Marchi  <simon.marchi@ericsson.com>
12592
12593         * remote.c (putpkt_binary): Fix omitted bytes reporting.
12594         (getpkt_or_notif_sane_1): Likewise.
12595
12596 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
12597
12598         * build-id.c (build_id_to_debug_bfd): Use std::string.
12599
12600 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
12601
12602         * build-id.c (find_separate_debug_file_by_buildid): Return
12603         std::string.
12604         * build-id.h (find_separate_debug_file_by_buildid): Return
12605         std::string.
12606         * coffread.c (coff_symfile_read): Adjust to std::string.
12607         * elfread.c (elf_symfile_read): Adjust to std::string.
12608         * symfile.c (separate_debug_file_exists): Change parameter to
12609         std::string.
12610         (find_separate_debug_file): Return std::string.
12611         (find_separate_debug_file_by_debuglink): Return std::string.
12612         * symfile.h (find_separate_debug_file_by_debuglink): Return
12613         std::string.
12614
12615 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
12616
12617         * common/xml-utils.c (xml_escape_text): Move code to...
12618         (xml_escape_text_append): ... this new function.
12619         * common/xml-utils.h (xml_escape_text_append): New declaration.
12620         * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
12621         New function.
12622         (_initialize_xml_utils): register test_xml_escape_text_append as
12623         a selftest.
12624
12625 2018-03-07  Alan Hayward  <alan.hayward@arm.com>
12626
12627         * defs.h: Remove MAX_REGISTER_SIZE.
12628         * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
12629         asserts.
12630         * python/py-unwind.c (pyuw_sniffer): Likewise.
12631
12632 2018-03-07  Tom Tromey  <tom@tromey.com>
12633
12634         * linux-tdep.c (linux_info_proc): Update.
12635         * target.h (struct target_ops) <to_fileio_readlink>: Return
12636         optional<string>.
12637         (target_fileio_readlink): Return optional<string>.
12638         * remote.c (remote_hostio_readlink): Return optional<string>.
12639         * inf-child.c (inf_child_fileio_readlink): Return
12640         optional<string>.
12641         * target.c (target_fileio_readlink): Return optional<string>.
12642
12643 2018-03-07  Andrew Burgess  <andrew.burgess@embecosm.com>
12644
12645         * regcache.c (cooked_read_test): Add riscv to the list of
12646         architectures that have a save_reggroup.
12647
12648 2018-03-07  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12649
12650         * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
12651         value is not a dynamic class object.
12652
12653 2018-03-06  Tom Tromey  <tom@tromey.com>
12654
12655         * rust-exp.y: Formatting fixes.
12656
12657 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12658
12659         * riscv-tdep.c (riscv_register_name): Remove target description
12660         support.
12661         (riscv_gdbarch_init): Remove target description check.
12662
12663 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12664
12665         * riscv-tdep.c: Remove 'Contributed by ...' lines from header
12666         comment.
12667         * riscv-tdep.h: Likewise.
12668
12669 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12670
12671         * riscv-tdep.c (riscv_pseudo_register_read): Delete.
12672         (riscv_pseudo_register_write): Delete.
12673         (riscv_gdbarch_init): Remove all use of pseudo registers.
12674
12675 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
12676
12677         * record-btrace.c (btrace_print_lines): Replace cleanup
12678         parameter with RAII equivalents.
12679         (btrace_insn_history): Replace cleanup with RAII equivalents.
12680         * ui-out.h (make_cleanup_ui_out_list_begin_end,
12681         make_cleanup_ui_out_tuple_begin_end): Remove.
12682         * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
12683         make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
12684         make_cleanup_ui_out_list_begin_end): Remove.
12685
12686 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
12687
12688         * record-btrace.c (record_btrace_maybe_mark_async_event): Change
12689         parameter types to std::vector.  Use bool.
12690         (record_btrace_wait): Replace VEC(tp_t) with
12691         std::vector<thread_info *>.
12692         * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
12693
12694 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
12695
12696         * record-btrace.c (record_btrace_disable_callback): Remove.
12697         (struct scoped_btrace_disable): New.
12698         (record_btrace_open): Use scoped_btrace_disable.
12699
12700 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12701
12702         * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
12703         reading values from registers.
12704
12705 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12706
12707         * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
12708         where appropriate.
12709
12710 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12711
12712         * riscv-tdep.c (riscv_print_arg_location): Add header comment,
12713         change parameter type.  Use GDB's print functions, and use
12714         core_addr_to_string where appropriate.
12715         (riscv_push_dummy_call): Use core_addr_to_string where
12716         appropriate, update call to riscv_print_arg_location, and reindent
12717         a few lines.
12718         (riscv_return_value): Update call to riscv_print_arg_location.
12719
12720 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12721             Tim Newsome <tim@sifive.com>
12722             Albert Ou <a0u@eecs.berkeley.edu>
12723             Darius Rad <darius@bluespec.com>
12724
12725         * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
12726         (HFILES_NO_SRCDIR): Add riscv-tdep.h.
12727         (ALLDEPFILES): Add riscv-tdep.c
12728         * configure.tgt: Add riscv support.
12729         * riscv-tdep.c: New file.
12730         * riscv-tdep.h: New file.
12731         * NEWS: Mention new target.
12732         * MAINTAINERS: Add entry for riscv.
12733
12734 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12735
12736         * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
12737         fields within aggregates.
12738
12739 2018-03-04  Simon Marchi  <simon.marchi@polymtl.ca>
12740
12741         * record-btrace.c (btrace_print_lines): Change type of flags to
12742         gdb_disassembly_flags.
12743
12744 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
12745
12746         * fbsd-nat.c: Include "inf-ptrace.h".
12747         (USE_SIGTRAP_SIGINFO): Conditionally define.
12748         [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
12749         (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
12750         [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
12751         function.
12752         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
12753         Likewise.
12754         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
12755         Likewise.
12756         (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
12757         "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
12758         "supports_stopped_by_hw_breakpoint" target methods.
12759
12760 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
12761
12762         * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
12763         * fbsd-nat.c (debug_fbsd_nat): New variable.
12764         (show_fbsd_nat_debug): New function.
12765         (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
12766         (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
12767
12768 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
12769
12770         * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
12771         * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
12772         prototype.
12773         * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
12774         (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
12775         method.
12776
12777 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
12778
12779         * common/gdb_vecs.c (free_char_ptr_vec): Remove.
12780         * common/gdb_vecs.h (free_char_ptr_vec): Remove.
12781
12782 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
12783
12784         * charset.c (struct charset_vector): New.
12785         (charsets): Change type to charset_vector.
12786         (find_charset_names): Adjust.
12787         (add_one): Adjust.
12788         (_initialize_charset): Adjust.
12789
12790 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
12791
12792         * progspace.h (struct program_space) <deleted_solibs>: Change
12793         type to std::vector<std::string>.
12794         * progspace.c (clear_program_space_solib_cache): Adjust.
12795         * breakpoint.c (print_solib_event): Adjust.
12796         (check_status_catch_solib): Adjust.
12797         * solib.c (update_solib_list): Adjust.
12798         * ui-out.h (class ui_out) <field_string>: New overload.
12799         * ui-out.c (ui_out::field_string): New overload.
12800
12801 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
12802
12803         * progspace.h (struct program_space): Add constructor and
12804         destructor, initialize fields.
12805         (add_program_space): Remove.
12806         * progspace.c (add_program_space): Rename to...
12807         (program_space::program_space): ... this.
12808         (release_program_space): Rename to...
12809         (program_space::~program_space): ... this.
12810         (delete_program_space): Use delete to delete program_space.
12811         (initialize_progspace): Use new to allocate program_space.
12812         * inferior.c (add_inferior_with_spaces): Likewise.
12813         (clone_inferior_command): Likewise.
12814         * infrun.c (follow_fork_inferior): Likewise.
12815         (handle_vfork_child_exec_or_exit): Likewise.
12816
12817 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
12818
12819         * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
12820         (delim_string_to_char_ptr_vec): Return std::vector of
12821         gdb::unique_xmalloc_ptr.
12822         (dirnames_to_char_ptr_vec_append): Take std::vector of
12823         gdb::unique_xmalloc_ptr.
12824         (dirnames_to_char_ptr_vec): Return std::vector of
12825         gdb::unique_xmalloc_ptr.
12826         * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
12827         Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
12828         (delim_string_to_char_ptr_vec): Return an std::vector of
12829         gdb::unique_xmalloc_ptr, adjust the code.
12830         (dirnames_to_char_ptr_vec_append): Take an std::vector of
12831         gdb::unique_xmalloc_ptr, adjust the code.
12832         (dirnames_to_char_ptr_vec): Return an std::vector of
12833         gdb::unique_xmalloc_ptr, adjust the code.
12834         * auto-load.c (auto_load_safe_path_vec): Change type to
12835         std::vector of gdb::unique_xmalloc_ptr.
12836         (auto_load_expand_dir_vars): Return an std::vector of
12837         gdb::unique_xmalloc_ptr, adjust the code.
12838         (auto_load_safe_path_vec_update): Adjust.
12839         (filename_is_in_auto_load_safe_path_vec): Adjust.
12840         (auto_load_objfile_script_1): Adjust.
12841         * build-id.c (build_id_to_debug_bfd): Adjust.
12842         * linux-thread-db.c (thread_db_load_search): Adjust.
12843         * source.c (add_path): Adjust.
12844         (openp): Adjust.
12845         * symfile.c (find_separate_debug_file): Adjust.
12846         * utils.c (do_free_char_ptr_vec): Remove.
12847         (make_cleanup_free_char_ptr_vec): Remove.
12848
12849 2018-03-01  Sergio Durigan Junior  <sergiodj@redhat.com>
12850
12851         PR gdb/22907
12852         * common/pathstuff.c: Conditionally include "<windows.h>".
12853
12854 2018-03-01  Georg Sauthoff  <mail@georg.so>
12855
12856         PR gdb/22888
12857         * gcore.in: Quote variables and switch interpreter to bash.
12858
12859 2018-03-01  Tom Tromey  <tom@tromey.com>
12860
12861         * dwarf2read.c (alloc_discriminant_info): Fix default_index
12862         assertion.  Add assertion for discriminant_index.
12863         (quirk_rust_enum): Use correct base type name in univariant case.
12864
12865 2018-03-01  Simon Marchi  <simon.marchi@ericsson.com>
12866
12867         * record.c (get_call_history_modifiers): Return a
12868         record_print_flags.
12869         (cmd_record_call_history): Adjust.
12870         * record-btrace.c (record_btrace_call_history): Adjust.
12871         (record_btrace_call_history_range): Adjust.
12872         (record_btrace_call_history_from): Adjust.
12873         * target-debug.h (target_debug_print_record_print_flags): New.
12874         * target-delegates.c: Re-generate.
12875         * target.c (target_call_history): Change flags type.
12876         (target_call_history_from): Likewise.
12877         (target_call_history_range): Likewise.
12878         * target.h (struct target_ops) <target_call_history>: Likewise.
12879         (target_call_history_from): Likewise.
12880         (target_call_history_range): Likewise.
12881
12882 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
12883             Simon Marchi  <simon.marchi@polymtl.ca>
12884
12885         * common/common-utils.c: Include "sys/stat.h".
12886         (is_regular_file): Move here from "source.c"; change return
12887         type to "bool".
12888         * common/common-utils.h (is_regular_file): New prototype.
12889         * common/pathstuff.c (contains_dir_separator): New function.
12890         * common/pathstuff.h (contains_dir_separator): New prototype.
12891         * source.c: Don't include "sys/stat.h".
12892         (is_regular_file): Move to "common/common-utils.c".
12893
12894 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
12895
12896         * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
12897         (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
12898         * auto-load.c: Include "common/pathstuff.h".
12899         * common/common-def.h (current_directory): Move here.
12900         * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
12901         function.
12902         * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
12903         prototype.
12904         * common/pathstuff.c: New file.
12905         * common/pathstuff.h: New file.
12906         * compile/compile.c: Include "common/pathstuff.h".
12907         * defs.h (current_directory): Move to "common/common-defs.h".
12908         * dwarf2read.c: Include "common/pathstuff.h".
12909         * exec.c: Likewise.
12910         * guile/scm-safe-call.c: Likewise.
12911         * linux-thread-db.c: Likewise.
12912         * main.c: Likewise.
12913         * nto-tdep.c: Likewise.
12914         * objfiles.c: Likewise.
12915         * source.c: Likewise.
12916         * symtab.c: Likewise.
12917         * utils.c: Include "common/pathstuff.h".
12918         (gdb_realpath): Move to "common/pathstuff.c".
12919         (gdb_realpath_keepfile): Likewise.
12920         (gdb_abspath): Likewise.
12921         * utils.h (gdb_realpath): Move to "common/pathstuff.h".
12922         (gdb_realpath_keepfile): Likewise.
12923         (gdb_abspath): Likewise.
12924
12925 2018-02-28  John Baldwin  <jhb@FreeBSD.org>
12926
12927         * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
12928         wildcard process pid for super_resume for kernels with a
12929         specific bug.
12930
12931 2018-02-27  Phil Muldoon  <pmuldoon@redhat.com>
12932
12933         * compile/compile.c (get_args): Add additional comments
12934         explaining function.
12935
12936 2018-02-27  Simon Marchi  <simon.marchi@polymtl.ca>
12937             Tom Tromey  <tom@tromey.com>
12938
12939         * target.h (memory_write_request_s): Remove typedef.  Don't define
12940         VEC.
12941         (target_write_memory_blocks): Change argument to std::vector.
12942         (struct memory_write_request): Add constructor.
12943         * target-memory.c (compare_block_starting_address): Return bool.
12944         Change argument types.
12945         (claim_memory): Change arguments to use std::vector.
12946         (split_regular_and_flash_blocks, blocks_to_erase)
12947         (compute_garbled_blocks): Likewise.
12948         (cleanup_request_data, cleanup_write_requests_vector): Remove.
12949         (target_write_memory_blocks): Change argument to std::vector.
12950         * symfile.c (struct load_section_data): Add constructor and
12951         destructor.  Use std::vector for "requests".
12952         (struct load_progress_data): Add initializers.
12953         (load_section_callback): Update.  Use "new".
12954         (clear_memory_write_data): Remove.
12955         (generic_load): Update.
12956
12957 2018-02-27  Alan Hayward  <alan.hayward@arm.com>
12958
12959         * arch/aarch64.h: Use common/tdesc.h.
12960
12961 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
12962
12963         * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
12964         architecture with a 64-bit ABI.
12965
12966 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
12967
12968         * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
12969         ahead of target description loading.
12970
12971 2018-02-26  Tom Tromey  <tom@tromey.com>
12972
12973         * stack.c (backtrace_command_1): Update.
12974         * python/python-internal.h (gdbpy_apply_frame_filter): Change type
12975         of "flags".
12976         * python/py-framefilter.c (py_print_frame)
12977         (gdbpy_apply_frame_filter): Change type of "flags".
12978         * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
12979         of "flags".
12980         (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
12981         (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
12982         * extension.h (enum frame_filter_flag): Rename from
12983         frame_filter_flags.
12984         (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
12985         (apply_ext_lang_frame_filter): Change type of "flags".
12986         * extension.c (apply_ext_lang_frame_filter): Change type of
12987         "flags".
12988         * extension-priv.h (struct extension_language_ops)
12989         <apply_frame_filter>: Change type of "flags".
12990
12991 2018-02-26  Tom Tromey  <tom@tromey.com>
12992
12993         PR python/16497:
12994         * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag.  Fix
12995         off-by-one in py_end computation.
12996         * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
12997         PRINT_MORE_FRAMES.
12998         * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
12999         constant.
13000
13001 2018-02-26  Tom Tromey  <tom@tromey.com>
13002
13003         * dwarf2read.c (struct variant_field): New.
13004         (struct nextfield) <variant>: New field.
13005         (dwarf2_add_field): Handle DW_TAG_variant_part.
13006         (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
13007         discriminated union.
13008         (read_structure_type): Handle DW_TAG_variant_part.
13009         (handle_struct_member_die): New function, extracted from
13010         process_structure_scope.  Handle DW_TAG_variant.
13011         (process_structure_scope): Handle discriminated unions.  Call
13012         handle_struct_member_die.
13013
13014 2018-02-26  Tom Tromey  <tom@tromey.com>
13015
13016         * rust-lang.h (rust_last_path_segment): Declare.
13017         * rust-lang.c (rust_last_path_segment): Now public.  Change
13018         contract.
13019         (struct disr_info): Remove.
13020         (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
13021         (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
13022         (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
13023         (rust_enum_p, rust_enum_variant): New function.
13024         (rust_underscore_fields): Remove "offset" parameter.
13025         (rust_print_enum): New function.
13026         (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
13027         <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
13028         (rust_print_struct_def): Add "for_rust_enum" parameter.  Handle
13029         enums.
13030         (rust_internal_print_type): New function, from rust_print_type.
13031         Remove enum code.
13032         (rust_print_type): Call rust_internal_print_type.
13033         (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
13034         Update enum handling.
13035         * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
13036         (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
13037         (rust_union_quirks): New functions.
13038         (process_full_comp_unit, process_full_type_unit): Call
13039         rust_union_quirks.
13040         (process_structure_scope): Update rust_unions if necessary.
13041
13042 2018-02-26  Tom Tromey  <tom@tromey.com>
13043
13044         * value.h (value_union_variant): Declare.
13045         * valops.c (value_union_variant): New function.
13046         * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
13047         (struct discriminant_info): New.
13048         (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
13049         enumerator.
13050         (struct main_type) <flag_discriminated_union>: New field.
13051
13052 2018-02-26  Tom Tromey  <tom@tromey.com>
13053
13054         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13055         unittests/unpack-selftests.c.
13056         * unittests/unpack-selftests.c: New file.
13057         * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
13058
13059 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13060
13061         * dwarf2read.c (struct partial_die_info) <read>: New method.
13062         (read_partial_die): Remove the declaration.
13063         (load_partial_dies): Update.
13064         (partial_die_info::partial_die_info):
13065         (read_partial_die): Change it to partial_die_info::read.
13066
13067 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13068
13069         * dwarf2read.c (struct partial_die_info) <fixup>: New method.
13070         (fixup_partial_die): Remove declaration.
13071         (scan_partial_symbols): Update.
13072         (partial_die_parent_scope): Likewise.
13073         (partial_die_full_name): Likewise.
13074         (fixup_partial_die): Change it to partial_die_info::fixup.
13075
13076 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13077
13078         * dwarf2read.c (read_partial_die): Update the declaration.
13079         (load_partial_dies): Caller update.
13080         (read_partial_die): Remove one argument abbrev_len.
13081
13082 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13083
13084         * dwarf2read.c (struct partial_die_info): Add ctor, delete
13085         assignment operator.
13086         (load_partial_dies): Use ctor and copy ctor.
13087         (read_partial_die): Update.
13088         (dwarf2_cu::find_partial_die): Use ctor.
13089
13090 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13091
13092         * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
13093         (find_partial_die_in_comp_unit): Change it to
13094         dwarf2_cu::find_partial_die.
13095         (find_partial_die): Update.
13096
13097 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13098
13099         * dwarf2read.c (read_partial_die): Remove the code checking abbrev
13100         is NULL.
13101
13102 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13103
13104         * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
13105
13106 2018-02-26  Alan Hayward  <alan.hayward@arm.com>
13107
13108         * arch/amd64.h: Use common/tdesc.h.
13109         * arch/i386.c: Likewise.
13110         * arch/i386.h: Likewise.
13111         * arch/tic6x.c: Likewise.
13112         * arch/tdesc.h: Move file from here...
13113         * common/tdesc.h: ...to here.
13114         * features/aarch64-core.c: Regenerate.
13115         * features/aarch64-fpu.c: Regenerate.
13116         * features/i386/32bit-avx.c: Regenerate.
13117         * features/i386/32bit-avx512.c: Regenerate.
13118         * features/i386/32bit-core.c: Regenerate.
13119         * features/i386/32bit-linux.c: Regenerate.
13120         * features/i386/32bit-mpx.c: Regenerate.
13121         * features/i386/32bit-pkeys.c: Regenerate.
13122         * features/i386/32bit-sse.c: Regenerate.
13123         * features/i386/64bit-avx.c: Regenerate.
13124         * features/i386/64bit-avx512.c: Regenerate.
13125         * features/i386/64bit-core.c: Regenerate.
13126         * features/i386/64bit-linux.c: Regenerate.
13127         * features/i386/64bit-mpx.c: Regenerate.
13128         * features/i386/64bit-pkeys.c: Regenerate.
13129         * features/i386/64bit-segments.c: Regenerate.
13130         * features/i386/64bit-sse.c: Regenerate.
13131         * features/i386/x32-core.c: Regenerate.
13132         * features/tic6x-c6xp.c: Regenerate.
13133         * features/tic6x-core.c: Regenerate.
13134         * features/tic6x-gp.c: Regenerate.
13135         * target-descriptions.c: Use common/tdesc.h.
13136         * target-descriptions.h: Likewise.
13137
13138 2018-02-24  Tom Tromey  <tom@tromey.com>
13139
13140         * linux-thread-db.c (try_thread_db_load_from_pdir_1)
13141         (try_thread_db_load_from_dir, thread_db_load_search): Use
13142         std::string.
13143         (info_auto_load_libthread_db_compare): Return bool.  Change
13144         argument types.
13145         (info_auto_load_libthread_db): Use std::vector, std::string.
13146         Remove cleanups.
13147
13148 2018-02-24  Tom Tromey  <tom@tromey.com>
13149
13150         * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
13151         std::string.
13152         * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
13153         std::string*.
13154         * gdbarch.c: Rebuild.
13155         * gdbarch.h: Rebuild.
13156         * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
13157         * arch-utils.h (default_fast_tracepoint_valid_at): Update.
13158         * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
13159         std::string*.
13160
13161 2018-02-23  Simon Marchi  <simon.marchi@polymtl.ca>
13162
13163         * gdbtypes.h (sect_offset): Change type to uint64_t.
13164         (sect_offset_str): New function.
13165         * dwarf2read.c (create_addrmap_from_aranges): Use
13166         sect_offset_str.
13167         (error_check_comp_unit_head): Likewise.
13168         (create_debug_type_hash_table): Likewise.
13169         (read_cutu_die_from_dwo): Likewise.
13170         (init_cutu_and_read_dies): Likewise.
13171         (init_cutu_and_read_dies_no_follow): Likewise.
13172         (process_psymtab_comp_unit_reader): Likewise.
13173         (partial_die_parent_scope): Likewise.
13174         (peek_die_abbrev): Likewise.
13175         (process_queue): Likewise.
13176         (dwarf2_physname): Likewise.
13177         (read_namespace_alias): Likewise.
13178         (read_import_statement): Likewise.
13179         (create_dwo_cu_reader): Likewise.
13180         (create_cus_hash_table): Likewise.
13181         (lookup_dwo_cutu): Likewise.
13182         (inherit_abstract_dies): Likewise.
13183         (read_func_scope): Likewise.
13184         (read_call_site_scope): Likewise.
13185         (dwarf2_add_member_fn): Likewise.
13186         (read_common_block): Likewise.
13187         (read_module_type): Likewise.
13188         (read_typedef): Likewise.
13189         (read_subrange_type): Likewise.
13190         (load_partial_dies): Likewise.
13191         (read_partial_die): Likewise.
13192         (find_partial_die): Likewise.
13193         (read_str_index): Likewise.
13194         (dwarf2_string_attr): Likewise.
13195         (build_error_marker_type): Likewise.
13196         (lookup_die_type): Likewise.
13197         (dump_die_shallow): Likewise.
13198         (follow_die_ref): Likewise.
13199         (dwarf2_fetch_die_loc_sect_off): Likewise.
13200         (dwarf2_fetch_constant_bytes): Likewise.
13201         (follow_die_sig): Likewise.
13202         (get_signatured_type): Likewise.
13203         (get_DW_AT_signature_type): Likewise.
13204         (dwarf2_find_containing_comp_unit): Likewise.
13205         (set_die_type): Likewise.
13206
13207 2018-02-21  John Baldwin  <jhb@FreeBSD.org>
13208
13209         * arch/aarch64.c: Include "common-defs.h".
13210         * arch/amd64.c: Likewise.
13211         * arch/i386.c: Likewise.
13212
13213 2018-02-21  Tom Tromey  <tom@tromey.com>
13214
13215         * value.h: (extract_field_op): Update.
13216         * eval.c (extract_field_op): Return a const char *.
13217         * expression.h (parse_expression_for_completion): Update.
13218         * completer.c (complete_expression): Update.
13219         (add_struct_fields): Make fieldname const.
13220         * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
13221         (mark_completion_tag, parse_exp_in_context_1): Update.
13222         (parse_expression_for_completion): Change "name" to
13223         unique_xmalloc_ptr*.
13224
13225 2018-02-21  Tom Tromey  <tom@tromey.com>
13226
13227         * infcall.c (call_function_by_hand_dummy): Use std::vector.
13228
13229 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13230
13231         * avr-tdep.c (avr_read_pc): Change parameter type to
13232         readable_regcache.
13233         * gdbarch.sh (read_pc): Likewise.
13234         * gdbarch.c: Re-generated.
13235         * gdbarch.h: Re-generated.
13236         * hppa-tdep.c (hppa_read_pc): Change parameter type to
13237         readable_regcache.
13238         * ia64-tdep.c (ia64_read_pc): Likewise.
13239         * mips-tdep.c (mips_read_pc): Likewise.
13240         * spu-tdep.c (spu_read_pc): Likewise.
13241
13242 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13243
13244         * Makefile.in (COMMON_SFILES): Add regcache-dump.c
13245         * regcache-dump.c: New file.
13246         * regcache.c: Move register_dump to regcache-dump.c.
13247         (maintenance_print_registers): Likewise.
13248         (maintenance_print_raw_registers): Likewise.
13249         (maintenance_print_cooked_registers): Likewise.
13250         (maintenance_print_register_groups): Likewise.
13251         (maintenance_print_remote_registers): Likewise.
13252         (_initialize_regcache): Likewise.
13253         * regcache.h (register_dump): Moved from regcache.c.
13254
13255 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13256
13257         * regcache.c (regcache::regcache): Update.
13258         (regcache::invalidate): Move it to detached_regcache::invalidate.
13259         (get_thread_arch_aspace_regcache): Update.
13260         (regcache::raw_update): Update.
13261         (regcache::cooked_read): Remove some code.
13262         (regcache::cooked_read_value): Likewise.
13263         (regcache::raw_write): Remove assert on m_readonly_p.
13264         (regcache::raw_supply_integer): Move it to
13265         detached_regcache::raw_supply_integer.
13266         (regcache::raw_supply_zeroed): Likewise.
13267         * regcache.h (detached_regcache) <raw_supply_integer>: New
13268         declaration.
13269         <raw_supply_zeroed, invalidate>: Likewise.
13270         (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
13271         <invalidate>: Likewise.
13272         <m_readonly_p>: Removed.
13273
13274 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13275
13276         * infcmd.c (get_return_value): Let stop_regs point to
13277         get_current_regcache.
13278         * regcache.c (regcache::regcache): Remove.
13279         (register_dump_reg_buffer): New class.
13280         (regcache_print): Adjust.
13281         * regcache.h (regcache): Remove constructors.
13282
13283 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13284
13285         * regcache.c (class register_dump): New class.
13286         (register_dump_regcache, register_dump_none): New class.
13287         (register_dump_remote, register_dump_groups): New class.
13288         (regcache_print): Update.
13289         * regcache.h (regcache_dump_what): Move it to regcache.c.
13290         (regcache) <dump>: Remove.
13291
13292 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13293
13294         * jit.c (struct jit_unwind_private) <regcache>: Change its type to
13295          reg_buffer_rw *.
13296         (jit_unwind_reg_set_impl): Call raw_supply.
13297         (jit_frame_sniffer): Use reg_buffer_rw.
13298         * record-full.c (record_full_core_regbuf): Change its type.
13299         (record_full_core_open_1): Use reg_buffer_rw.
13300         (record_full_close): Likewise.
13301         (record_full_core_fetch_registers): Use regcache->raw_supply.
13302         (record_full_core_store_registers): Likewise.
13303         * regcache.c (regcache::get_register_status): Move it to
13304         reg_buffer.
13305         (regcache_raw_set_cached_value): Remove.
13306         (regcache::raw_set_cached_value): Remove.
13307         (regcache::raw_write): Call raw_supply.
13308         (regcache::raw_supply): Move it to reg_buffer_rw.
13309         * regcache.h (regcache_raw_set_cached_value): Remove.
13310         (reg_buffer_rw): New class.
13311
13312 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13313
13314         * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
13315         readonly_detached_regcache.
13316         (dummy_frame_prev_register): Use regcache->cooked_read.
13317         * frame.c (frame_save_as_regcache): Change return type.
13318         (frame_pop): Update.
13319         * frame.h (frame_save_as_regcache): Update declaration.
13320         * inferior.h (get_infcall_suspend_state_regcache): Update
13321         declaration.
13322         * infrun.c (infcall_suspend_state) <registers>: use
13323         readonly_detached_regcache.
13324         (save_infcall_suspend_state): Don't use regcache_dup.
13325         (get_infcall_suspend_state_regcache): Change return type.
13326         * linux-fork.c (struct fork_info) <savedregs>: Change to
13327         readonly_detached_regcache.
13328         <pc>: New field.
13329         (fork_save_infrun_state): Don't use regcache_dup.
13330         (info_checkpoints_command): Adjust.
13331         * mi/mi-main.c (register_changed_p): Update declaration.
13332         (mi_cmd_data_list_changed_registers): Use
13333         readonly_detached_regcache.
13334         (register_changed_p): Change parameter type to
13335         readonly_detached_regcache.
13336         * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
13337         readonly_detached_regcache.
13338         (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
13339         * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
13340         New.
13341         (regcache::save): Move it to reg_buffer.
13342         (regcache::restore): Change parameter type.
13343         (regcache_dup): Remove.
13344         * regcache.h (reg_buffer) <save>: New method.
13345         (readonly_detached_regcache): New class.
13346         * spu-tdep.c (spu2ppu_cache) <regcache>: Use
13347         readonly_detached_regcache.
13348         (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
13349
13350 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13351
13352         * frame.c (frame_save_as_regcache): Use regcache method save.
13353         (frame_pop): Use regcache method restore.
13354         * infrun.c (restore_infcall_suspend_state): Likewise.
13355         * linux-fork.c (fork_load_infrun_state): Likewise.
13356         * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
13357         save.
13358         * regcache.c (regcache_save): Remove.
13359         (regcache::restore): More asserts.
13360         (regcache_cpy): Remove.
13361         * regcache.h (regcache_save): Remove the declaration.
13362         (regcache::restore): Move from private to public.
13363         Remove the friend declaration of regcache_cpy.
13364         (regcache_cpy): Remove declaration.
13365
13366 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13367
13368         * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
13369         parameter type to 'readable_regcache *'.
13370         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
13371         * arm-tdep.c (arm_neon_quad_read): Likewise.
13372         (arm_pseudo_read): Likewise.
13373         * avr-tdep.c (avr_pseudo_register_read): Likewise.
13374         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
13375         * frv-tdep.c (frv_pseudo_register_read): Likewise.
13376         * gdbarch.c: Re-generated.
13377         * gdbarch.h: Re-generated.
13378         * gdbarch.sh (pseudo_register_read): Change parameter type to
13379         'readable_regcache *'.
13380         (pseudo_register_read_value): Likewise.
13381         * h8300-tdep.c (pseudo_from_raw_register): Likewise.
13382         (h8300_pseudo_register_read): Likewise.
13383         * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
13384         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
13385         (i386_pseudo_register_read_into_value): Likewise.
13386         (i386_pseudo_register_read_value): Likewise.
13387         * i386-tdep.h (i386_pseudo_register_read_into_value): Update
13388         declaration.
13389         * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
13390         * m32c-tdep.c (m32c_raw_read): Likewise.
13391         (m32c_read_flg): Likewise.
13392         (m32c_banked_register): Likewise.
13393         (m32c_banked_read): Likewise.
13394         (m32c_sb_read): Likewise.
13395         (m32c_part_read): Likewise.
13396         (m32c_cat_read): Likewise.
13397         (m32c_r3r2r1r0_read): Likewise.
13398         (m32c_pseudo_register_read): Likewise.
13399         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
13400         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
13401         (mep_pseudo_cr64_read): Likewise.
13402         (mep_pseudo_register_read): Likewise.
13403         * mips-tdep.c (mips_pseudo_register_read): Likewise.
13404         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
13405         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
13406         * regcache.c (regcache::raw_read): Move it to readable_regcache.
13407         (regcache::cooked_read): Likewise.
13408         (regcache::cooked_read_value): Likewise.
13409         (regcache_cooked_read_signed):
13410         (regcache::cooked_read): Likewise.
13411         * regcache.h (readable_regcache): New class.
13412         (regcache): Inherit readable_regcache.  Move some methods to
13413         readable_regcache.
13414         * rl78-tdep.c (rl78_pseudo_register_read): Change
13415         parameter type to 'readable_regcache *'.
13416         * rs6000-tdep.c (do_regcache_raw_read): Remove.
13417         (e500_pseudo_register_read): Change parameter type to
13418         'readable_regcache *'.
13419         (dfp_pseudo_register_read): Likewise.
13420         (vsx_pseudo_register_read): Likewise.
13421         (efpr_pseudo_register_read): Likewise.
13422         * s390-tdep.c (s390_pseudo_register_read): Likewise.
13423         * sh-tdep.c (sh_pseudo_register_read): Likewise.
13424         * sh64-tdep.c (pseudo_register_read_portions): Likewise.
13425         (sh64_pseudo_register_read): Likewise.
13426         * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
13427         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
13428         * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
13429         (spu_pseudo_register_read): Likewise.
13430         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
13431         (xtensa_pseudo_register_read): Likewise.
13432
13433 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13434
13435         * regcache.c (regcache::regcache): Call reg_buffer ctor.
13436         (regcache::arch): Move it to reg_buffer::arch.
13437         (regcache::register_buffer): Likewise.
13438         (regcache::assert_regnum): Likewise.
13439         (regcache::num_raw_registers): Likewise.
13440         * regcache.h (reg_buffer): New class.
13441         (regcache): Inherit reg_buffer.
13442
13443 2018-02-20  Simon Marchi  <simon.marchi@ericsson.com>
13444
13445         * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
13446         gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
13447
13448 2018-02-20  Markus Metzger  <markus.t.metzger@intel.com>
13449
13450         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
13451
13452 2018-02-19  Alan Hayward  <alan.hayward@arm.com>
13453
13454         * Makefile.in: (COMMON_SFILES): Add common/*.c files.
13455         (SFILES): Remove common/*.c files.
13456         (COMMON_OBS): Remove some *.o files built from common/*.c files.
13457         * common/common.host: Add common reference.
13458         * configure.ac: Likewise.
13459         * configure: Regenerate.
13460
13461 2018-02-16  Yao Qi  <yao.qi@linaro.org>
13462
13463         * block.c (block_namespace_info): Inherit allocate_on_obstack.
13464         (block_initialize_namespace): Use new.
13465         * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
13466         (dwarf2_free_objfile): Use delete.
13467         * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
13468         (copy_type_recursive): Use new.
13469         * gdb_obstack.h (allocate_on_obstack): New.
13470
13471 2018-02-15  Yao Qi  <yao.qi@linaro.org>
13472
13473         PR gdb/22849
13474         * inferior.c (exit_inferior_1): Reset inf->control.
13475
13476 2018-02-15  Joel Brobecker  <brobecker@adacore.com>
13477
13478         * ada-lang.c (ada_to_fixed_value_create): Delete advance
13479         declaration.
13480
13481 2018-02-14  Pedro Alves  <palves@redhat.com>
13482
13483         * frame-unwind.c (frame_unwind_try_unwinder): Always call
13484         frame_cleanup_after_sniffer on exception.
13485
13486 2018-02-14  Tom Tromey  <tom@tromey.com>
13487
13488         * solist.h (struct target_so_ops) <bfd_open>: Make pathname
13489         const.
13490         (solib_bfd_open): Make pathname const.
13491         * solib.c (solib_bfd_open): Make pathname const.
13492         * solib-spu.c (spu_bfd_fopen): Make name const.
13493         (spu_bfd_open): Make pathname const.
13494         * solib-darwin.c (darwin_bfd_open): Make pathname const.
13495         * solib-aix.c (solib_aix_bfd_open): Make pathname const.
13496
13497 2018-02-14  Tom Tromey  <tom@tromey.com>
13498
13499         * symfile.c (symfile_bfd_open): Update.
13500         * source.h (openp, source_full_path_of, find_and_open_source):
13501         Change argument type to unique_xmalloc_ptr.
13502         * source.c (openp): Take a unique_xmalloc_ptr.
13503         (source_full_path_of, find_and_open_source): Likewise.
13504         (open_source_file, symtab_to_fullname): Update.
13505         * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
13506         unique_xmalloc_ptr.
13507         * solib.c (solib_find_1): Use unique_xmalloc_ptr.
13508         (exec_file_find): Update.
13509         * psymtab.c (psymtab_to_fullname): Update.
13510         * nto-tdep.h (nto_find_and_open_solib): Update.
13511         * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
13512         unique_xmalloc_ptr.
13513         * exec.c (exec_file_attach): Update.
13514         * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
13515         * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
13516
13517 2018-02-14  Tom Tromey  <tom@tromey.com>
13518
13519         * solib.c: Include source.h.
13520         * nto-tdep.c: Include source.h.
13521         * mi/mi-cmd-env.c: Include source.h.
13522         * infcmd.c: Include source.h.
13523         * exec.c: Include source.h.
13524         * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
13525         (add_path, directory_switch, source_path, init_source_path): Move
13526         declarations...
13527         * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
13528         (add_path, directory_switch, source_path, init_source_path):
13529         ...here.
13530
13531 2018-02-14  Tom Tromey  <tom@tromey.com>
13532
13533         * solist.h (exec_file_find, solib_find): Return
13534         unique_xmalloc_ptr.
13535         (solib_bfd_fopen): Take a const char *.
13536         * solib.c (solib_find_1): Return unique_xmalloc_ptr.
13537         (exec_file_find, solib_find): Likewise.
13538         (solib_bfd_fopen): Do not take ownership of "pathname".
13539         (solib_bfd_open): Use unique_xmalloc_ptr.
13540         * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
13541         * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
13542         * infrun.c (follow_exec): Use unique_xmalloc_ptr.
13543         * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
13544
13545 2018-02-14  Joel Brobecker  <brobecker@adacore.com>
13546
13547         * ada-lang.c (name_match_type_from_name): Remove reference to
13548         ada_name_for_lookup in function's documentation.
13549         * ada-lang.h (ada_name_for_lookup): Delete declaration.
13550
13551 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
13552
13553         * defs.h (enum openp_flags): New enum.
13554         (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
13555         Move to enum openp_flags.
13556         (openp_flags): New enum flags.
13557         (openp): Change parameter type to openp_flags.
13558         * source.c (openp): Change parameter type to openp_flags.
13559         * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
13560         * dwarf2read.c (try_open_dwop_file): Use openp_flags.
13561
13562 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
13563
13564         * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
13565         per-command.
13566
13567 2018-02-12  Andrew Burgess  <andrew.burgess@embecosm.com>
13568
13569         * dwarf2read.c (dwarf2_release_queue): Delete function, move body
13570         into...
13571         (class dwarf2_queue_guard): ...the destructor of this new class.
13572         (dw2_do_instantiate_symtab): Create instance of the new class
13573         dwarf2_queue_guard, remove cleanup.
13574
13575 2018-02-09  Tom Tromey  <tom@tromey.com>
13576
13577         * source.c (find_source_lines): Don't reference past the end of
13578         the vector.
13579
13580 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13581
13582         * remote.c (remote_btrace_maybe_reopen): Change error message.
13583         * btrace.c (btrace_enable): Likewise.
13584         (parse_xml_btrace): Likewise.
13585         (parse_xml_btrace_conf): Likewise.
13586
13587 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13588
13589         * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
13590         (linux_enable_pt, linux_enable_bts): Call
13591         diagnose_perf_event_open_fail.
13592
13593 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13594
13595         * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
13596         Remove parameter and change return type.  Update callers.  Move it.
13597         (linux_enable_bts, linux_enable_pt): Improve error message.
13598         (linux_enable_pt): Remove zero buffer size check.
13599         (linux_enable_btrace): Improve error messages.  Remove NULL return
13600         check.
13601
13602 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13603
13604         * btrace.c (btrace_enable): Remove target_supports_btrace call.
13605         * nat/linux-btrace.c (perf_event_pt_event_type): Move.
13606         (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
13607         (linux_supports_pt, linux_supports_btrace): Remove.
13608         (linux_enable_bts): Call cpu_supports_bts.
13609         * nat/linux-btrace.h (linux_supports_btrace): Remove.
13610         * remote.c (remote_supports_btrace): Remove.
13611         (init_remote_ops): Remove remote_supports_btrace.
13612         * target-delegates.c: Regenerated.
13613         * target.c (target_supports_btrace): Remove.
13614         * target.h (target_ops) <to_supports_btrace>: Remove
13615         (target_supports_btrace): Remove.
13616         * x86-linux-nat.c (x86_linux_create_target): Remove
13617         linux_supports_btrace.
13618
13619 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13620
13621         * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
13622         btrace failed.
13623         * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
13624         exception and use message in own exception.
13625
13626 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13627
13628         * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
13629         (perf_event_pt_event_type): Use gdb_file_up.
13630         (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
13631         scoped_fd, and scoped_mmap.
13632
13633 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13634
13635         * common/scoped_mmap.h: New.
13636         * unittests/scoped_mmap-selftest.c: New.
13637         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13638         unittests/scoped_mmap-selftest.c.
13639
13640 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13641
13642         * common/scoped_fd.h: New.
13643         * unittests/scoped_fd-selftest.c: New.
13644         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13645         unittests/scoped_fd-selftest.c.
13646
13647 2018-02-09  Tom Tromey  <tom@tromey.com>
13648
13649         * auto-load.c (auto_load_section_scripts): Use
13650         gdb::unique_xmalloc_ptr.
13651
13652 2018-02-09  Tom Tromey  <tom@tromey.com>
13653
13654         * auto-load.c (execute_script_contents): Use std::string.
13655
13656 2018-02-09  Joel Brobecker  <brobecker@adacore.com>
13657
13658         * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
13659         Python function, rather than a new command.
13660
13661 2018-02-08  Tom Tromey  <tom@tromey.com>
13662
13663         * solib.c (solib_find_1): Use std::string.
13664         (solib_bfd_fopen): Use unique_xmalloc_ptr.
13665
13666 2018-02-08  Tom Tromey  <tom@tromey.com>
13667
13668         * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
13669
13670 2018-02-08  Tom Tromey  <tom@tromey.com>
13671
13672         * source.c (find_source_lines): Use gdb::def_vector.
13673
13674 2018-02-08  Tom Tromey  <tom@tromey.com>
13675
13676         * macrocmd.c (struct temporary_macro_definition): New.
13677         (macro_define_command): Use temporary_macro_definition.  Remove
13678         cleanups.
13679         (free_macro_definition_ptr): Remove.
13680
13681 2018-02-08  Tom Tromey  <tom@tromey.com>
13682
13683         * macroexp.c (maybe_expand): Use std::string.
13684
13685 2018-02-08  Tom Tromey  <tom@tromey.com>
13686
13687         * macroexp.c (struct macro_buffer): Add initializers for some
13688         members.
13689         (init_buffer, init_shared_buffer, free_buffer)
13690         (free_buffer_return_text): Remove.
13691         (macro_buffer): New constructors.
13692         (~macro_buffer): New destructor.
13693         (macro_buffer::set_shared): New method.
13694         (macro_buffer::resize_buffer, macro_buffer::appendc)
13695         (macro_buffer::appendmem): Now methods, not free functions.
13696         (set_token, append_tokens_without_splicing, stringify)
13697         (macro_stringify): Update.
13698         (gather_arguments): Change return type.  Remove argc_p argument,
13699         add args_ptr argument.  Use std::vector.
13700         (substitute_args): Remove argc argument.  Accept std::vector.
13701         (expand): Update.  Use std::vector.
13702         (scan, macro_expand, macro_expand_next): Update.
13703
13704 2018-02-08  Tom Tromey  <tom@tromey.com>
13705
13706         * symtab.c (default_collect_symbol_completion_matches_break_on):
13707         Use unique_xmalloc_ptr.
13708         * macroscope.h: (sal_macro_scope, user_macro_scope)
13709         (default_macro_scope): Return unique_xmalloc_ptr.
13710         * macroscope.c (sal_macro_scope, user_macro_scope)
13711         (default_macro_scope): Return unique_xmalloc_ptr.
13712         * macroexp.h (macro_expand, macro_expand_once): Return
13713         unique_xmalloc_ptr.
13714         * macroexp.c (macro_expand, macro_expand_once): Return
13715         unique_xmalloc_ptr.
13716         * macrocmd.c (macro_expand_command, macro_expand_once_command)
13717         (info_macro_command, info_macros_command): Use
13718         unique_xmalloc_ptr.
13719         * compile/compile-c-support.c (write_macro_definitions): Use
13720         unique_xmalloc_ptr.
13721         * c-exp.y (c_parse): Use unique_xmalloc_ptr.
13722
13723 2018-02-07  Simon Marchi  <simon.marchi@ericsson.com>
13724
13725         * value.c (value_static_field): Assign field type instead of
13726         containing type when returning an optimized out value.
13727
13728 2018-02-06  Yao Qi  <yao.qi@linaro.org>
13729
13730         * ft32-tdep.c (ft32_read_pc): Remove.
13731         (ft32_write_pc): Remove.
13732         (ft32_gdbarch_init): Update.
13733         * m32r-tdep.c (m32r_read_pc): Remove.
13734         (m32r_gdbarch_init): Update.
13735         * mep-tdep.c (mep_read_pc): Remove.
13736         (mep_gdbarch_init): Update.
13737         * microblaze-tdep.c (microblaze_write_pc): Remove.
13738         (microblaze_gdbarch_init): Update.
13739         * mn10300-tdep.c (mn10300_read_pc): Remove.
13740         (mn10300_write_pc): Remove.
13741         (mn10300_gdbarch_init): Update.
13742         * moxie-tdep.c (moxie_read_pc): Remove.
13743         (moxie_write_pc): Remove.
13744         (moxie_gdbarch_init): Update.
13745
13746 2018-02-06  Yao Qi  <yao.qi@linaro.org>
13747
13748         * expprint.c (print_subexp_standard): Handle
13749         OP_F77_UNDETERMINED_ARGLIST.
13750         (dump_subexp_body_standard): Likewise.
13751
13752 2018-02-05  Alan Hayward  <alan.hayward@arm.com>
13753
13754         * target-descriptions.c (tdesc_element_visitor) Add empty
13755         implementations.
13756         (tdesc_type): Move make_gdb_type from here.
13757         (tdesc_type_builtin): Likewise.
13758         (tdesc_type_vector): Likewise.
13759         (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
13760         (make_gdb_type_struct): Move from tdesc_type_with_fields.
13761         (make_gdb_type_union): Likewise.
13762         (make_gdb_type_flags): Likewise.
13763         (make_gdb_type_enum): Likewise.
13764         (make_gdb_type): New function.
13765         (tdesc_register_type): Use static make_gdb_type.
13766
13767 2018-02-05  Ruslan Kabatsayev <b7.10110111@gmail.com>
13768
13769         * infcmd.c (default_print_one_register_info): Align natural-format
13770         column values consistently one under another.
13771         (pad_to_column): New function.
13772
13773 2018-02-05  Joel Brobecker  <brobecker@adacore.com>
13774
13775         * dwarf2read.c (dwarf2_physname): Move commment.
13776
13777 2018-02-01  Leszek Swirski  <leszeks@google.com>
13778
13779         * varobj.c (varobj_formatted_print_options): Allow recursive
13780         pretty printing if pretty printing is enabled.
13781
13782 2018-02-01  Leszek Swirski  <leszeks@google.com>
13783
13784         * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
13785         names after a structop as a filename.
13786
13787 2018-02-01  Yao Qi  <yao.qi@linaro.org>
13788
13789         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
13790         (arm_record_coproc_data_proc): Likewise.
13791
13792 2018-02-01  Yao Qi  <yao.qi@linaro.org>
13793
13794         * arm-tdep.c (arm_record_extension_space): Change ret to signed.
13795
13796 2018-01-31  Nikola Prica  <nikola.prica@rt-rk.com>
13797
13798         * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
13799         assign shifted lr_reg to fdata->lr_register when lr_reg is set.
13800
13801 2018-01-31  Pedro Alves  <palves@redhat.com>
13802
13803         * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
13804         * inflow.c (child_terminal_save_inferior): Wrap reference to
13805         tcgetpgrp in HAVE_TERMIOS_H.
13806         (child_interrupt, child_pass_ctrlc): Wrap references to signal in
13807         _WIN32.
13808         * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
13809         always iterate over all inferiors.
13810         (gdbsim_cntrl_c): Adjust.
13811         * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
13812
13813 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
13814
13815         * gdbtypes.c (lookup_array_range_type): Make sure the array's
13816         index type is objfile-owned if the element type is as well.
13817
13818 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
13819
13820         GDB 8.1 released.
13821
13822 2018-01-30  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13823
13824         * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
13825         "features/s390x-linux64.c".
13826         (_initialize_s390_linux_tdep): Remove initialization of tdescs
13827         s390_linux32 and s390x_linux64.
13828         (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
13829         default tdesc.
13830         * s390-tdep.c: Include "features/s390-linux32.c" and
13831         "features/s390x-linux64.c".
13832         (s390_tdesc_valid): Add check for tdesc_has_registers.
13833         (s390_gdbarch_init): Make sure there is always a valid tdesc.
13834         (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
13835         tdesc_s390x_linux64.
13836         * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
13837         tdesc_s390x_linux64 to...
13838         * s390-tdep.h: ...here.
13839
13840 2018-01-30  Pedro Alves  <palves@redhat.com>
13841
13842         PR gdb/13211
13843         * config.in, configure: Regenerate.
13844         * configure.ac: Check for getpgid.
13845         * go32-nat.c (go32_pass_ctrlc): New.
13846         (go32_target): Install it.
13847         * inf-child.c (inf_child_target): Install
13848         child_terminal_save_inferior, child_pass_ctrlc and
13849         child_interrupt.
13850         * inf-ptrace.c (inf_ptrace_interrupt): Delete.
13851         (inf_ptrace_target): No longer install it.
13852         * infcmd.c (interrupt_target_1): Adjust.
13853         * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
13854         (child_interrupt): Declare.
13855         (inferior::terminal_state): New.
13856         * inflow.c (struct terminal_info): Update comments.
13857         (inferior_process_group): Delete.
13858         (terminal_is_ours): Delete.
13859         (gdb_tty_state): New.
13860         (child_terminal_init): Adjust.
13861         (is_gdb_terminal, sharing_input_terminal_1)
13862         (sharing_input_terminal): New functions.
13863         (child_terminal_inferior): Adjust.  Use sharing_input_terminal.
13864         Set the process's actual process group in the foreground if
13865         possible.  Handle is_ours_for_output/is_ours distinction.  Don't
13866         mark terminal as the inferior's if not sharing GDB's terminal.
13867         Don't check attach_flag.
13868         (child_terminal_ours_for_output, child_terminal_ours): Adjust to
13869         pass down a target_terminal_state.
13870         (child_terminal_save_inferior): New, factored out from ...
13871         (child_terminal_ours_1): ... this.  Handle
13872         target_terminal_state::is_ours_for_output.
13873         (child_interrupt, child_pass_ctrlc): New.
13874         (inflow_inferior_exit): Clear the inferior's terminal_state.
13875         (copy_terminal_info): Copy the inferior's terminal state.
13876         (_initialize_inflow): Remove reference to terminal_is_ours.
13877         * inflow.h (inferior_process_group): Delete.
13878         * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
13879         * procfs.c (procfs_target): Don't install procfs_interrupt.
13880         (procfs_interrupt): Delete.
13881         * remote.c (remote_serial_quit_handler): Adjust.
13882         (remote_interrupt): Remove ptid parameter.  Adjust.
13883         * target-delegates.c: Regenerate.
13884         * target.c: Include "terminal.h".
13885         (target_terminal::terminal_state): Rename to ...
13886         (target_terminal::m_terminal_state): ... this.
13887         (target_terminal::init): Adjust.
13888         (target_terminal::inferior): Adjust to per-inferior
13889         terminal_state.
13890         (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
13891         (target_terminal::ours, target_terminal::ours_for_output): Use
13892         target_terminal_is_ours_kind.
13893         (target_interrupt): Remove ptid parameter.  Adjust.
13894         (default_target_pass_ctrlc): Adjust.
13895         * target.h (target_ops::to_terminal_save_inferior): New field.
13896         (target_ops::to_interrupt): Remove ptid_t parameter.
13897         (target_interrupt): Remove ptid_t parameter.  Update comment.
13898         (target_pass_ctrlc): Update comment.
13899         * target/target.h (target_terminal_state): New scoped enum,
13900         factored out of ...
13901         (target_terminal::terminal_state): ... here.
13902         (target_terminal::inferior): Update comments.
13903         (target_terminal::restore_inferior): New.
13904         (target_terminal::is_inferior, target_terminal::is_ours)
13905         (target_terminal::is_ours_for_output): Adjust.
13906         (target_terminal::scoped_restore_terminal_state): Adjust to
13907         rename, and call restore_inferior() instead of inferior().
13908         (target_terminal::scoped_restore_terminal_state::m_state): Change
13909         type.
13910         (target_terminal::terminal_state): Rename to ...
13911         (target_terminal::m_terminal_state): ... this and change type.
13912
13913 2018-01-30  Pedro Alves  <palves@redhat.com>
13914
13915         * linux-nat.c (wait_for_signal): New function.
13916         (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
13917         directly.
13918         (async_terminal_is_ours)
13919         (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
13920         (linux_nat_add_target): Don't override
13921         to_terminal_inferior/to_terminal_ours.
13922
13923 2018-01-29  Sergio Durigan Junior  <sergiodj@redhat.com>
13924
13925         * remote.c (remote_follow_fork): Don't call "detach_inferior".
13926
13927 2018-01-28  Simon Marchi  <simon.marchi@ericsson.com>
13928
13929         * dwarf2read.c (free_dwo_files): Add forward-declaration.
13930         (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
13931         dwarf2_per_objfile_free here.
13932         (dwarf2_per_objfile_free): Remove.
13933         (_initialize_dwarf2_read): Don't register
13934         dwarf2_per_objfile_free as a registry cleanup.
13935
13936 2018-01-27  Eli Zaretskii  <eliz@gnu.org>
13937
13938         Avoid compilation errors in MinGW native builds
13939
13940         The error is triggered by including python-internal.h, and the
13941         error message is:
13942
13943              In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
13944                       from build-gnulib/import/math.h:27,
13945                       from d:/usr/Python26/include/pyport.h:235,
13946                       from d:/usr/Python26/include/Python.h:58,
13947                       from python/python-internal.h:94,
13948                       from python/py-arch.c:24:
13949              d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
13950         using ::hypot;
13951                 ^~~~~
13952
13953         This happens because Python headers define 'hypot' to expand t
13954         '_hypot' in the Windows builds.
13955         * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
13956         'hypoth'.  This avoids a compilation error.
13957
13958 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
13959
13960         * MAINTAINERS (Write After Approval): Fix ordering.
13961
13962 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
13963
13964         * MAINTAINERS (Write After Approval): Add Alan Hayward.
13965
13966 2018-01-26  Alan Modra  <amodra@gmail.com>
13967
13968         * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
13969         (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
13970         Remove nop.  Make const.  Comment.
13971         (powerpc32_plt_stub_so_2): New.
13972         (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
13973         Correct count.  Update uses.
13974         (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
13975         Move common code reading PLT entry word.  Correct
13976         powerpc32_plt_stub PLT address calculation.
13977         * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
13978         (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
13979         (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
13980         (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
13981         (ppc64_standard_linkage8): Likewise.
13982         * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
13983         Correct insns description.
13984         * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
13985
13986 2018-01-24  Pedro Alves  <palves@redhat.com>
13987
13988         GCC PR libstdc++/83906
13989         * gdbtypes.c (operator==(const dynamic_prop &,
13990         const dynamic_prop &)): New.
13991         (operator==(const range_bounds &, const range_bounds &)): New.
13992         (check_types_equal): Use them instead of memcmp.
13993         * gdbtypes.h (operator==(const dynamic_prop &,
13994         const dynamic_prop &)): Declare.
13995         (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
13996         (operator==(const range_bounds &, const range_bounds &)): Declare.
13997         (operator!=(const range_bounds &, const range_bounds &)): Declare.
13998
13999 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14000
14001         * s390-linux-tdep.c (s390_record_address_mask)
14002         (s390_record_calc_disp_common, s390_record_calc_disp)
14003         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
14004         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
14005         (s390_process_record): Move to s390-tdep.c.
14006         (s390_linux_init_abi_any): Adjust.
14007         * s390-tdep.c (s390_record_address_mask)
14008         (s390_record_calc_disp_common, s390_record_calc_disp)
14009         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
14010         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
14011         (s390_process_record): Moved from s390-linux-tdep.c
14012         (s390_gdbarch_init): Adjust.
14013
14014 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14015
14016         * s390-linux-nat.c (s390-tdep.h): New include.
14017         * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
14018         (HFILES_NO_SRCDIR): Add s390-tdep.h.
14019         (ALLDEPFILES): Add s390-tdep.c.
14020         * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
14021         * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
14022         * s390-tdep.h: ...this.  New file.
14023         * s390-linux-tdep.c (s390-tdep.h): New include.
14024         (_initialize_s390_tdep): Rename to...
14025         (_initialize_s390_linux_tdep): ...this and adjust.
14026         (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
14027         (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
14028         s390-tdep.h.
14029         (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
14030         (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
14031         (s390_is_partial_instruction, s390_software_single_step)
14032         (is_non_branch_ril, s390_displaced_step_copy_insn)
14033         (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
14034         (s390_prologue_data, s390_addr, s390_store, s390_load)
14035         (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
14036         (s390_register_call_saved, s390_guess_tracepoint_registers)
14037         (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
14038         (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
14039         (s390_pseudo_register_name, s390_pseudo_register_type)
14040         (s390_pseudo_register_read, s390_pseudo_register_write)
14041         (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
14042         (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
14043         (s390_addr_bits_remove, s390_address_class_type_flags)
14044         (s390_address_class_type_flags_to_name)
14045         (s390_address_class_name_to_type_flags, s390_effective_inner_type)
14046         (s390_function_arg_float, s390_function_arg_vector)
14047         (is_power_of_two, s390_function_arg_integer, s390_arg_state)
14048         (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
14049         (s390_frame_align, s390_register_return_value, s390_return_value)
14050         (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
14051         (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
14052         (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
14053         (s390_trad_frame_prev_register, s390_unwind_cache)
14054         (s390_prologue_frame_unwind_cache)
14055         (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
14056         (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
14057         (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
14058         (s390_stub_frame_this_id, s390_stub_frame_prev_register)
14059         (s390_stub_frame_sniffer, s390_stub_frame_unwind)
14060         (s390_frame_base_address, s390_local_base_address)
14061         (s390_frame_base, s390_gcc_target_options)
14062         (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
14063         (s390_validate_reg_range, s390_tdesc_valid)
14064         (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
14065         * s390-tdep.c: ...this.  New file.
14066
14067 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14068
14069         * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
14070         (s390_process_record, s390_gdbarch_tdep_alloc)
14071         (s390_linux_init_abi_any): Use/set new hook.
14072
14073 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14074
14075         * s390-linux-tdep.c (osabi.h): New include.
14076         (s390_linux_init_abi_31, s390_linux_init_abi_64)
14077         (s390_linux_init_abi_any): New functions.
14078         (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
14079
14080 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14081
14082         * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
14083         tdesc_has_registers check
14084
14085 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14086
14087         * s390-linux-tdep.c (s390_tdesc_valid): New function.
14088         (s390_validate_reg_range): New macro.
14089         (s390_gdbarch_init): Adjust.
14090
14091 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14092
14093         * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
14094         (s390_gdbarch_tdep_alloc): Adjust.
14095         (s390_gdbarch_init): Adjust.
14096
14097 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14098
14099         * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
14100         <have_tdb>: Change type to bool.
14101         (s390_gdbarch_tdep_alloc): Adjust.
14102         (s390_gdbarch_init): Adjust.
14103
14104 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14105
14106         * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
14107         (gdbarch_tdep) <have_upper, have_vx>: New fields.
14108         (s390_gdbarch_tdep_alloc): New function.
14109         (s390_gdbarch_init): Allocate tdep at start and use its fields
14110         instead of separate variables.
14111
14112 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14113
14114         * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
14115         when looking for cached gdbarch and add comment for remaining.
14116
14117 2018-01-22  Pedro Alves  <palves@redhat.com>
14118             Sergio Durigan Junior  <sergiodj@redhat.com>
14119
14120         * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
14121         case.
14122
14123 2018-01-22  Maciej W. Rozycki  <macro@mips.com>
14124
14125         * MAINTAINERS: Update my company e-mail address.
14126
14127 2018-01-22  Yao Qi  <yao.qi@linaro.org>
14128
14129         * regcache.c (cooked_write_test): New function.
14130         (_initialize_regcache): Register the test.
14131
14132 2018-01-22  Yao Qi  <yao.qi@linaro.org>
14133
14134         * ia64-tdep.c (ia64_pseudo_register_read): Call
14135         regcache->cooked_read instead of regcache_cooked_read_unsigned.
14136         * m32c-tdep.c (m32c_cat_read): Likewise.
14137         (m32c_r3r2r1r0_read): Likewise.
14138         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
14139         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
14140
14141 2018-01-22  Yao Qi  <yao.qi@linaro.org>
14142
14143         * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
14144         method raw_read instead of regcache_raw_read.
14145         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
14146         * arm-tdep.c (arm_neon_quad_read): Likewise.
14147         * avr-tdep.c (avr_pseudo_register_read): Likewise.
14148         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
14149         * frv-tdep.c (frv_pseudo_register_read): Likewise.
14150         * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
14151         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
14152         (i386_pseudo_register_read_into_value): Likewise.
14153         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
14154         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
14155         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
14156         * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
14157         * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
14158         * sparc-tdep.c (sparc32_pseudo_register_read):  Likewise.
14159         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
14160         * spu-tdep.c (spu_pseudo_register_read_spu):  Likewise.
14161         * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
14162
14163 2018-01-22  Yao Qi  <yao.qi@linaro.org>
14164
14165         * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
14166         * configure.tgt: Remove target mt.
14167         * mt-tdep.c: Remove.
14168         * regcache.c (cooked_read_test): Remove the check for mt.
14169
14170 2018-01-22  Yao Qi  <yao.qi@linaro.org>
14171
14172         * jit.c (jit_frame_prev_register): Call regcache::cooked_read
14173         instead of gdbarch_pseudo_register_read_value.
14174
14175 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
14176
14177         * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
14178         language is Ada.
14179
14180 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
14181
14182         * linespec.c (create_sals_line_offset): Remove code that preserved
14183         the symtab_and_line's line number.
14184
14185 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
14186
14187         * varobj.c (varobj_create): Don't set valid_block when creating a
14188         floating varobj.
14189
14190 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
14191
14192         * varobj.c (varobj_create): Remove out of date comment.
14193
14194 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
14195
14196         PR mi/20395
14197         * ada-exp.y (write_var_from_sym): Pass extra parameter when
14198         updating innermost block.
14199         * parse.c (innermost_block_tracker::update): Take extra type
14200         parameter, and check types match before updating innermost block.
14201         (write_dollar_variable): Update innermost block for registers.
14202         * parser-defs.h (enum innermost_block_tracker_type): New enum.
14203         (innermost_block_tracker::innermost_block_tracker): Initialise
14204         m_types member.
14205         (innermost_block_tracker::reset): Take type parameter.
14206         (innermost_block_tracker::update): Take type parameter, and pass
14207         type through as needed.
14208         (innermost_block_tracker::m_types): New member.
14209         * varobj.c (varobj_create): Pass type when reseting innermost
14210         block.
14211
14212 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
14213
14214         * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
14215         * ada-lang.c (resolve_subexp): Likewise.
14216         * breakpoint.c (set_breakpoint_condition) Likewise.
14217         (watch_command_1) Likewise.
14218         * c-exp.y (variable): Likewise.
14219         * d-exp.y (PrimaryExpression): Likewise.
14220         * f-exp.y (variable): Likewise.
14221         * go-exp.y (variable): Likewise.
14222         * m2-exp.y (variable): Likewise.
14223         * objfiles.c (objfile::~objfile): Likewise.
14224         * p-exp.y (variable): Likewise.
14225         * parse.c (innermost_block): Change type.
14226         * parser-defs.h (class innermost_block_tracker): New.
14227         (innermost_block): Change to innermost_block_tracker.
14228         * printcmd.c (display_command): Switch to innermost_block API.
14229         (do_one_display): Likewise.
14230         * rust-exp.y (do_one_display): Likewise.
14231         * symfile.c (clear_symtab_users): Likewise.
14232         * varobj.c (varobj_create): Switch to innermost_block API, replace
14233         use of innermost_block with block stored on varobj object.
14234
14235 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
14236
14237         * expression.h (innermost_block): Remove declaration.
14238         * varobj.c: Add 'parser-defs.h' include.
14239
14240 2018-01-19  Tom Tromey  <tom@tromey.com>
14241
14242         * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
14243         symbols in the static and global blocks.
14244
14245 2018-01-19  James Clarke  <jrtc27@jrtc27.com>
14246
14247         * nat/linux-ptrace.c: Remove unnecessary reinclusion of
14248         gdb_ptrace.h, and move including gdb_wait.h ...
14249         * nat/linux-ptrace.h: ... to here.
14250
14251 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
14252
14253         * inf-ptrace.c (inf_ptrace_detach): Adjust call to
14254         inf_ptrace_detach_success.
14255         (inf_ptrace_detach_success): Add inferior parameter, use it
14256         instead of inferior_ptid, pass it to detach_inferior.
14257         * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
14258         parameter.
14259         * inferior.c (detach_inferior): Add overload that takes an
14260         inferior object.
14261         * inferior.h (detach_inferior): Likewise.
14262         * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
14263         use inferior_ptid, adjust call to inf_ptrace_detach_success.
14264         * linux-thread-db.c (thread_db_detach): Use inf parameter.
14265
14266 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
14267
14268         * target.h (struct target_ops) <to_detach>: Add inferior
14269         parameter.
14270         (target_detach): Likewise.
14271         * target.c (dispose_inferior): Pass inferior down.
14272         (target_detach): Pass inferior down.  Assert that it is equal to
14273         the current inferior.
14274         * aix-thread.c (aix_thread_detach): Pass inferior down.
14275         * corefile.c (core_file_command): Pass current_inferior() down.
14276         * corelow.c (core_detach): Add inferior parameter.
14277         * darwin-nat.c (darwin_detach): Likewise.
14278         * gnu-nat.c (gnu_detach): Likewise.
14279         * inf-ptrace.c (inf_ptrace_detach): Likewise.
14280         * infcmd.c (detach_command): Pass current_inferior() down to
14281         target_detach.
14282         * infrun.c (follow_fork_inferior): Pass parent_inf to
14283         target_detach.
14284         (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
14285         target_detach.
14286         * linux-nat.c (linux_nat_detach): Add inferior parameter.
14287         * linux-thread-db.c (thread_db_detach): Likewise.
14288         * nto-procfs.c (procfs_detach): Likewise.
14289         * procfs.c (procfs_detach): Likewise.
14290         * record.c (record_detach): Likewise.
14291         * record.h (struct inferior): Forward-declare.
14292         (record_detach): Add inferior parameter.
14293         * remote-sim.c (gdbsim_detach): Likewise.
14294         * remote.c (remote_detach_1): Likewise.
14295         (remote_detach): Likewise.
14296         (extended_remote_detach): Likewise.
14297         * sol-thread.c (sol_thread_detach): Likewise.
14298         * target-debug.h (target_debug_print_inferior_p): New macro.
14299         * target-delegates.c: Re-generate.
14300         * top.c (kill_or_detach): Pass inferior down to target_detach.
14301         * windows-nat.c (windows_detach): Add inferior parameter.
14302
14303 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
14304
14305         * target.h (struct target_ops) <to_detach>: Remove args
14306         parameter.
14307         (target_detach): Likewise.
14308         * target.c (dispose_inferior): Adjust.
14309         (target_detach): Remove args parameter, adjust.
14310         * aix-thread.c (aix_thread_detach): Adjust.
14311         * corefile.c (core_file_command): Adjust.
14312         * corelow.c (core_detach): Adjust.
14313         * darwin-nat.c (darwin_detach): Adjust.
14314         * gnu-nat.c (gnu_detach): Adjust.
14315         * inf-ptrace.c (inf_ptrace_detach): Adjust.
14316         * infcmd.c (detach_command): Adjust
14317         * infrun.c (follow_fork_inferior): Adjust.
14318         (handle_vfork_child_exec_or_exit): Adjust.
14319         * linux-fork.c (linux_fork_detach): Remove args parameter.
14320         * linux-fork.h (linux_fork_detach): Likewise.
14321         * linux-nat.c (linux_nat_detach): Likewise, and adjust.
14322         * linux-thread-db.c (thread_db_detach): Likewise.
14323         * nto-procfs.c (procfs_detach): Likewise.
14324         * procfs.c (procfs_detach): Likewise.
14325         (do_detach): Remove signo parameter.
14326         * record.c (record_detach): Remove args parameter.
14327         * record.h (record_detach): Likewise.
14328         * remote-sim.c (gdbsim_detach): Likewise.
14329         * remote.c (remote_detach_1): Likewise.
14330         (remote_detach): Likewise.
14331         (extended_remote_detach): Likewise.
14332         * sol-thread.c (sol_thread_detach): Likewise.
14333         * target-delegates.c: Re-generate.
14334         * top.c (struct qt_args) <args>: Remove field.
14335         (kill_or_detach): Don't pass args.
14336         (quit_force): Don't set args.
14337         * windows-nat.c (windows_detach): Remove args parameter.
14338
14339 2018-01-19  Yao Qi  <yao.qi@linaro.org>
14340
14341         * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
14342         (arm_linux_init_abi): Install it.
14343
14344 2018-01-19  Yao Qi  <yao.qi@linaro.org>
14345
14346         * osabi.c (gdb_osabi_names): Extend the regexp for
14347         arm-linux-gnueabihf.
14348
14349 2018-01-18  Yao Qi  <yao.qi@linaro.org>
14350
14351         * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
14352         m_abbrevs.
14353         (abbrev_table::add_abbrev): Update.
14354         (abbrev_table::lookup_abbrev): Update.
14355
14356 2018-01-18  Yao Qi  <yao.qi@linaro.org>
14357
14358         * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
14359
14360 2018-01-17  Sergio Durigan Junior  <sergiodj@redhat.com>
14361
14362         * compile/compile.c (compile_to_object): Convert "triplet_rx"
14363         to "std::string".
14364
14365 2018-01-17  Tom Tromey  <tom@tromey.com>
14366
14367         * dwarf2read.c (symbolp): Remove typedef.  Don't instantiate VEC.
14368
14369 2018-01-17  Tom Tromey  <tom@tromey.com>
14370
14371         * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
14372         * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
14373         (create_array_type_with_stride): Update.
14374         * dwarf2read.c (set_die_type): Update.
14375
14376 2018-01-17  Tom Tromey  <tom@tromey.com>
14377
14378         * dwarf2read.c (delayed_method_info): Remove typedef.
14379         (dwarf2_cu::method_info): Now a std::vector.
14380         (add_to_method_list): Update.
14381         (free_delayed_list): Remove.
14382         (compute_delayed_physnames): Update.
14383         (process_full_comp_unit, process_full_type_unit): Clear the method
14384         list.  Remove cleanups.
14385         (psymtab_include_file_name): Add name_holder parameter.  Use
14386         unique_xmalloc_ptr.
14387         (dwarf_decode_lines): Update.
14388
14389 2018-01-17  Tom Tromey  <tom@tromey.com>
14390             Simon Marchi  <simon.marchi@ericsson.com>
14391
14392         * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
14393         (dwarf2_per_objfile::free_cached_comp_units)
14394         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
14395         (init_cutu_and_read_dies_no_follow): Update.
14396         (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
14397         (dwarf2_cu::~dwarf2_cu): New.
14398         (free_heap_comp_unit, free_stack_comp_unit): Remove.
14399         (age_cached_comp_units, free_one_cached_comp_unit): Update.
14400
14401 2018-01-17  Tom Tromey  <tom@tromey.com>
14402             Simon Marchi  <simon.marchi@ericsson.com>
14403
14404         * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
14405         (struct die_reader_specs) <abbrev_table>: New member.
14406         (struct abbrev_table): Add constructor.
14407         <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
14408         <abbrev_obstack>: Now an auto_obstack.
14409         (abbrev_table_up): New typedef.
14410         (init_cu_die_reader): Add abbrev_table parameter.
14411         (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
14412         Add result_dwo_abbrev_table.
14413         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
14414         (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
14415         Update.
14416         (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
14417         parameter.
14418         (skip_children): Update.
14419         (abbrev_table::alloc_abbrev): Rename from
14420         abbrev_table_alloc_abbrev.
14421         (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
14422         (abbrev_table::lookup_abbrev): Rename from
14423         abbrev_table_lookup_abbrev.
14424         (abbrev_table_read_table): Return abbrev_table_up.
14425         (abbrev_table_free, abbrev_table_free_cleanup)
14426         (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
14427         (load_partial_dies): Update.
14428
14429 2018-01-17  Tom Tromey  <tom@tromey.com>
14430
14431         * dwarf2read.c (dwarf2_compute_name): Update comment.
14432         (read_func_scope, read_variable): Update.
14433         (new_symbol): Remove.
14434         (new_symbol_full): Rename to new_symbol.
14435
14436 2018-01-17  Mike Gulick  <mgulick@mathworks.com>
14437
14438         PR gdb/16577
14439         * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
14440         a warning instead of throwing an error, set section size to 0 and return
14441         NULL.
14442         * gdb_bfd.h (gdb_bfd_map_section): Update description.
14443
14444 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
14445
14446         * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
14447         std::string.
14448         (linux_ptrace_attach_fail_reason_string): Likewise.
14449         * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
14450         Likewise.
14451         (linux_ptrace_attach_fail_reason_string): Likewise.
14452         * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
14453
14454 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
14455
14456         * linux-nat.c (linux_nat_attach): Remove xstrdup.
14457
14458 2018-01-17  Eldar Abusalimov  <eldar.abusalimov@jetbrains.com>
14459
14460         PR gdb/21559
14461         * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
14462         checking for fs_base/gs_base fields in struct user_regs_struct.
14463         * configure: Regenerate.
14464
14465 2018-01-17  Yao Qi  <yao.qi@linaro.org>
14466
14467         * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
14468         function.
14469         (aarch64_linux_init_abi): Install it to gdbarch hook
14470         gcc_target_options.
14471
14472 2018-01-15  Pedro Alves  <palves@redhat.com>
14473
14474         * common/signals-state-save-restore.c
14475         (save_original_signals_state): Fix typos.
14476
14477 2017-01-12  Tom Tromey  <tom@tromey.com>
14478             Sergio Durigan Junior  <sergiodj@redhat.com>
14479
14480         * Makefile.in (install-only): Install gdb-add-index.
14481
14482 2018-01-12  John Baldwin  <jhb@FreeBSD.org>
14483
14484         * fbsd-tdep.c (KVE_PROTECTION): Correct value.
14485
14486 2018-01-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
14487
14488         * infrun.c (keep_going_pass_signal): Clear step-over info when
14489         insert_breakpoints fails.
14490
14491 2018-01-11  Pedro Alves  <palves@redhat.com>
14492
14493         PR gdb/22583
14494         * infrun.c (resume): Rename to ...
14495         (resume_1): ... this.
14496         (resume): Reimplement as wrapper around resume_1.
14497
14498 2018-01-11  Pedro Alves  <palves@redhat.com>
14499
14500         PR remote/22597
14501         * remote.c (remote_parse_stop_reply): Default to the last-set
14502         general thread instead of to 'magic_null_ptid'.
14503
14504 2018-01-10  Pedro Alves  <palves@redhat.com>
14505
14506         * language.h (language_get_symbol_name_matcher): Rename ...
14507         (get_symbol_name_matcher): ... this.
14508         * language.c (language_get_symbol_name_matcher): Ditto.
14509         * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
14510         callers adjusted.
14511
14512 2018-01-10  Pedro Alves  <palves@redhat.com>
14513
14514         PR gdb/22670
14515         * dwarf2read.c
14516         (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
14517         Adjust to use language_get_symbol_name_matcher instead of
14518         language_defn::la_get_symbol_name_matcher.
14519         * language.c (language_get_symbol_name_matcher): If in Ada mode
14520         and the lookup name is a verbatim match, return Ada's matcher.
14521         * language.h (language_get_symbol_name_matcher): Adjust comment.
14522         (ada_lookup_name_info::verbatim_p):: New method.
14523
14524 2018-01-10  Pedro Alves  <palves@redhat.com>
14525
14526         PR gdb/22670
14527         * ada-lang.c (ada_collect_symbol_completion_matches): If the
14528         minsym's language is language_auto or language_cplus, pass down
14529         language_ada instead.
14530         * symtab.c (compare_symbol_name): Don't frob symbol language here.
14531
14532 2018-01-10  Pedro Alves  <palves@redhat.com>
14533
14534         PR gdb/22670
14535         * minsyms.c (linkage_name_str): New function.
14536         (iterate_over_minimal_symbols): Use it.
14537
14538 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
14539
14540         * NEWS: Document that 'info proc' now works on FreeBSD.
14541
14542 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
14543
14544         * configure.ac: Check for kinfo_getfile in libutil.
14545         * configure: Regenerate.
14546         * config.in: Regenerate.
14547         * fbsd-nat.c: Include "fbsd-tdep.h".
14548         (fbsd_fetch_cmdline): New.
14549         (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
14550         rather than calling error.
14551         (fbsd_info_proc): New.
14552         (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
14553         (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
14554         (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
14555
14556 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
14557
14558         * fbsd-nat.c (struct free_deleter): Remove.
14559         (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
14560
14561 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
14562
14563         * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
14564         NULL for an empty pathname.
14565
14566 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
14567
14568         * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
14569         (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
14570         (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
14571         (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
14572         (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
14573         (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
14574         (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
14575         (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
14576         (kinfo_proc_layout_32, kinfo_proc_layout_i386)
14577         (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
14578         (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
14579         (fbsd_core_fetch_timeval, fbsd_print_sigset)
14580         (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
14581         (fbsd_init_abi):  Install gdbarch "core_info_proc" method.
14582         * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
14583
14584 2018-01-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>
14585
14586         * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
14587         (gnu_xfer_auxv): New function.
14588         (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
14589         TARGET_OBJECT_AUXV.
14590
14591 2018-01-08  Yao Qi  <yao.qi@linaro.org>
14592             Simon Marchi  <simon.marchi@ericsson.com>
14593
14594         * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
14595         common/selftest.c.
14596         (COMMON_OBS): Remove selftest.o.
14597         * configure.ac: Append selftest-arch.c and common/selftest.c to
14598         CONFIG_SRCS.  Append selftest-arch.o and selftest.o to COMMON_OBS.
14599         * configure: Re-generated.
14600         * maint.c (maintenance_selftest): Wrap selftests::run_tests with
14601         GDB_SELF_TEST.
14602         (maintenance_info_selftests): Likewise.
14603
14604 2018-01-08  Xavier Roirand  <roirand@adacore.com>
14605
14606         * ada-valprint.c (val_print_packed_array_elements): Use
14607         proper number of elements when printing an array indexed
14608         by an enumeration type.
14609
14610 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
14611
14612         * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
14613         (dw2_get_file_names_reader): Adjust.
14614         (lookup_dwo_signatured_type): Adjust.
14615         (lookup_dwp_signatured_type): Adjust.
14616         (lookup_signatured_type): Adjust.
14617         (create_type_unit_group): Adjust.
14618         (get_type_unit_group): Adjust.
14619         (process_psymtab_comp_unit_reader): Adjust.
14620         (build_type_psymtabs_reader): Adjust.
14621         (scan_partial_symbols): Adjust.
14622         (add_partial_symbol): Adjust.
14623         (add_partial_subprogram): Adjust.
14624         (peek_die_abbrev): Adjust.
14625         (fixup_go_packaging): Adjust.
14626         (process_imported_unit_die): Adjust.
14627         (dwarf2_compute_name): Adjust.
14628         (dwarf2_physname): Adjust.
14629         (read_import_statement): Adjust.
14630         (handle_DW_AT_stmt_list): Adjust.
14631         (read_file_scope): Adjust.
14632         (read_func_scope): Adjust.
14633         (read_lexical_block_scope): Adjust.
14634         (read_call_site_scope): Adjust.
14635         (read_variable): Adjust.
14636         (dwarf2_rnglists_process): Adjust.
14637         (dwarf2_ranges_process): Adjust.
14638         (dwarf2_ranges_read): Adjust.
14639         (dwarf2_get_pc_bounds): Adjust.
14640         (dwarf2_record_block_ranges): Adjust.
14641         (dwarf2_add_field): Adjust.
14642         (dwarf2_add_member_fn): Adjust.
14643         (read_structure_type): Adjust.
14644         (process_structure_scope): Adjust.
14645         (read_enumeration_type): Adjust.
14646         (read_array_type): Adjust.
14647         (mark_common_block_symbol_computed): Adjust.
14648         (read_common_block): Adjust.
14649         (read_namespace_type): Adjust.
14650         (read_namespace): Adjust.
14651         (read_module_type): Adjust.
14652         (read_tag_pointer_type): Adjust.
14653         (read_tag_ptr_to_member_type): Adjust.
14654         (read_tag_string_type): Adjust.
14655         (read_subroutine_type): Adjust.
14656         (read_typedef): Adjust.
14657         (read_base_type): Adjust.
14658         (attr_to_dynamic_prop): Adjust.
14659         (read_subrange_type): Adjust.
14660         (read_unspecified_type): Adjust.
14661         (dwarf2_read_abbrevs): Adjust.
14662         (load_partial_dies): Adjust.
14663         (read_partial_die): Adjust.
14664         (find_partial_die): Adjust.
14665         (guess_partial_die_structure_name): Adjust.
14666         (fixup_partial_die): Adjust.
14667         (read_attribute_value): Adjust.
14668         (read_addr_index): Adjust.
14669         (read_addr_index_from_leb128): Adjust.
14670         (read_str_index): Adjust.
14671         (dwarf2_string_attr): Adjust.
14672         (get_debug_line_section): Adjust.
14673         (dwarf_decode_line_header): Adjust.
14674         (lnp_state_machine::check_line_address): Adjust.
14675         (dwarf_decode_lines_1): Adjust.
14676         (dwarf_decode_lines): Adjust.
14677         (dwarf2_start_symtab): Adjust.
14678         (var_decode_location): Adjust.
14679         (new_symbol_full): Adjust.
14680         (dwarf2_const_value_data): Adjust.
14681         (dwarf2_const_value_attr): Adjust.
14682         (dwarf2_const_value): Adjust.
14683         (die_type): Adjust.
14684         (die_containing_type): Adjust.
14685         (build_error_marker_type): Adjust.
14686         (lookup_die_type): Adjust.
14687         (guess_full_die_structure_name): Adjust.
14688         (anonymous_struct_prefix): Adjust.
14689         (determine_prefix): Adjust.
14690         (dwarf2_name): Adjust.
14691         (follow_die_ref_or_sig): Adjust.
14692         (follow_die_offset): Adjust.
14693         (follow_die_ref): Adjust.
14694         (follow_die_sig_1): Adjust.
14695         (follow_die_sig): Adjust.
14696         (get_signatured_type): Adjust.
14697         (get_DW_AT_signature_type): Adjust.
14698         (decode_locdesc): Adjust.
14699         (dwarf_decode_macros): Adjust.
14700         (cu_debug_loc_section): Adjust.
14701         (fill_in_loclist_baton): Adjust.
14702         (dwarf2_symbol_mark_computed): Adjust.
14703         (init_one_comp_unit): Don't assign
14704         dwarf2_cu::dwarf2_per_objfile.
14705         (set_die_type): Adjust.
14706
14707 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
14708
14709         * dwarf2read.c (struct mapped_debug_names): Add constructor.
14710         <dwarf2_per_objfile>: New field.
14711         (dwarf2_per_objfile): Remove global.
14712         (get_dwarf2_per_objfile): New function.
14713         (set_dwarf2_per_objfile): New function.
14714         (dwarf2_build_psymtabs_hard): Change objfile parameter to
14715         dwarf2_per_objfile.
14716         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
14717         (read_abbrev_offset): Likewise.
14718         (read_indirect_string): Likewise.
14719         (read_indirect_line_string): Likewise.
14720         (read_indirect_string_at_offset): Likewise.
14721         (read_indirect_string_from_dwz): Likewise.
14722         (dwarf2_find_containing_comp_unit): Change objfile parameter to
14723         dwarf2_per_objfile.
14724         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
14725         (create_all_comp_units): Change objfile parameter to
14726         dwarf2_per_objfile.
14727         (create_all_type_units): Likewise.
14728         (process_queue): Add dwarf2_per_objfile parameter.
14729         (read_and_check_comp_unit_head): Likewise.
14730         (lookup_dwo_unit_in_dwp): Likewise.
14731         (get_dwp_file): Likewise.
14732         (process_cu_includes): Likewise.
14733         (struct free_dwo_file_cleanup_data): New struct.
14734         (dwarf2_has_info): Use get_dwarf2_per_objfile and
14735         set_dwarf2_per_objfile.
14736         (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
14737         (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
14738         context, adjust calls.
14739         (dw2_instantiate_symtab): Likewise.
14740         (dw2_get_cutu): Add dwarf2_per_objfile parameter.
14741         (dw2_get_cu): Likewise.
14742         (create_cu_from_index_list): Change objfile parameter to
14743         dwarf2_per_objfile.
14744         (create_cus_from_index_list): Get dwarf2_per_objfile from
14745         context, adjust calls.
14746         (create_cus_from_index): Likewise.
14747         (create_signatured_type_table_from_index): Change objfile
14748         parameter to dwarf2_per_objfile.
14749         (create_signatured_type_table_from_debug_names): Change objfile
14750         parameter to dwarf2_per_objfile.
14751         (create_addrmap_from_index): Likewise.
14752         (create_addrmap_from_aranges): Likewise.
14753         (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
14754         (dw2_setup): Remove.
14755         (dw2_get_file_names_reader): Get dwarf2_per_objfile from
14756         context.
14757         (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
14758         get_dwarf2_per_objfile.
14759         (dw2_forget_cached_source_info): Likewise.
14760         (dw2_map_symtabs_matching_filename): Likewise.
14761         (struct dw2_symtab_iterator) <index>: Remove.
14762         <dwarf2_per_objfile>: New field.
14763         (dw2_symtab_iter_init): Replace index parameter with
14764         dwarf2_per_objfile.
14765         (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
14766         (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
14767         (dw2_print_stats): Likewise.
14768         (dw2_dump): Likewise.
14769         (dw2_expand_symtabs_for_function): Likewise.
14770         (dw2_expand_all_symtabs): Likewise.
14771         (dw2_expand_symtabs_with_fullname): Likewise.
14772         (dw2_expand_marked_cus): Replace index and objfile parameters
14773         with dwarf2_per_objfile.
14774         (dw_expand_symtabs_matching_file_matcher): Add
14775         dwarf2_per_objfile parameter and adjust calls.
14776         (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
14777         adjust calls.
14778         (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
14779         (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
14780         adjust calls.
14781         (create_cus_from_debug_names_list): Replace objfile parameter
14782         with dwarf2_per_objfile and adjust calls.
14783         (create_cus_from_debug_names): Likewise.
14784         (dwarf2_read_debug_names): Likewise.
14785         (mapped_debug_names::namei_to_name): Adjust call.
14786         (dw2_debug_names_iterator::next): Likewise.
14787         (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
14788         (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
14789         (dw2_debug_names_dump): Likewise.
14790         (dw2_debug_names_expand_symtabs_for_function): Likewise.
14791         (dw2_debug_names_expand_symtabs_matching): Likewise.
14792         (dwarf2_initialize_objfile): Likewise.
14793         (dwarf2_build_psymtabs): Likewise.
14794         (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
14795         this_cu.
14796         (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
14797         (read_and_check_comp_unit_head): Likewise.
14798         (read_abbrev_offset): Likewise.
14799         (create_debug_type_hash_table): Likewise.
14800         (create_debug_types_hash_table): Likewise.
14801         (create_all_type_units): Replace objfile parameter with
14802         dwarf2_per_objfile.
14803         (add_type_unit): Add dwarf2_per_objfile parameter.
14804         (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
14805         with dwarf2_per_objfile.
14806         (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
14807         (lookup_dwp_signatured_type): Likewise.
14808         (lookup_signatured_type): Likewise.
14809         (read_cutu_die_from_dwo): Likewise.
14810         (init_tu_and_read_dwo_dies): Likewise.
14811         (init_cutu_and_read_dies): Likewise.
14812         (init_cutu_and_read_dies_no_follow): Likewise.
14813         (allocate_type_unit_groups_table): Add objfile parameter.
14814         (create_type_unit_group): Use dwarf2_per_objfile from cu.
14815         (get_type_unit_group): Likewise.
14816         (process_psymtab_comp_unit): Update call.
14817         (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
14818         (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
14819         (print_tu_stats): Likewise.
14820         (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
14821         in void* parameter.
14822         (build_type_psymtabs): Change objfile parameter to
14823         dwarf2_per_objfile.
14824         (process_skeletonless_type_unit): Use dwarf2_per_objfile
14825         passed in void* parameter.
14826         (process_skeletonless_type_units): Change objfile parameter to
14827         dwarf2_per_objfile.
14828         (set_partial_user): Likewise.
14829         (dwarf2_build_psymtabs_hard): Likewise.
14830         (read_comp_units_from_section): Likewise.
14831         (create_all_comp_units): Likewise.
14832         (scan_partial_symbols): Update calls.
14833         (add_partial_symbol): Likewise.
14834         (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
14835         (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
14836         (process_queue): Add dwarf2_per_objfile parameter.
14837         (get_compunit_symtab): Use dwarf2_per_objfile from cu.
14838         (compute_compunit_symtab_includes): Likewise.
14839         (process_cu_includes): Add dwarf2_per_objfile parameter.
14840         (process_full_comp_unit): Use dwarf2_per_objfile from cu.
14841         (process_full_type_unit): Likewise.
14842         (process_imported_unit_die): Update call.
14843         (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
14844         (read_file_scope): Likewise.
14845         (allocate_dwo_file_hash_table): Add objfile parameter.
14846         (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
14847         (create_cus_hash_table): Likewise.
14848         (create_dwp_hash_table): Likewise.
14849         (create_dwo_unit_in_dwp_v1): Likewise.
14850         (create_dwp_v2_section): Likewise.
14851         (create_dwo_unit_in_dwp_v2): Likewise.
14852         (lookup_dwo_unit_in_dwp): Likewise.
14853         (try_open_dwop_file): Likewise.
14854         (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
14855         (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
14856         cleanup to include a reference to dwarf2_per_objfile.
14857         (open_dwp_file): Add dwarf2_per_objfile parameter.
14858         (open_and_init_dwp_file): Likewise.
14859         (get_dwp_file): Likewise.
14860         (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
14861         (queue_and_load_all_dwo_tus): Update call.
14862         (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
14863         data.
14864         (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
14865         (dwarf2_ranges_process): Likewise.
14866         (dwarf2_get_pc_bounds): Likewise.
14867         (mark_common_block_symbol_computed): Likewise.
14868         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
14869         (dwarf2_read_abbrevs): Update call.
14870         (read_partial_die): Use dwarf2_per_objfile from cu.
14871         (find_partial_die): Likewise.
14872         (fixup_partial_die): Likewise.
14873         (read_attribute_value): Likewise.
14874         (read_indirect_string_at_offset_from): Add objfile parameter.
14875         (read_indirect_string_at_offset): Add dwarf2_per_objfile
14876         parameter.
14877         (read_indirect_string_from_dwz): Add objfile parameter.
14878         (read_indirect_string): Add objfile parameter.
14879         (read_addr_index_1): Add dwarf2_per_objfile parameter.
14880         (read_addr_index): Use dwarf2_per_objfile from cu.
14881         (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
14882         call dw2_setup.
14883         (read_str_index): Use dwarf2_per_objfile from cu.
14884         (get_debug_line_section): Likewise.
14885         (read_formatted_entries): Add dwarf2_per_objfile parameter.
14886         (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
14887         (new_symbol_full): Use dwarf2_per_objfile from cu.
14888         (build_error_marker_type): Likewise.
14889         (lookup_die_type): Likewise.
14890         (determine_prefix): Likewise.
14891         (follow_die_offset): Likewise.
14892         (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
14893         (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
14894         (dwarf2_fetch_die_type_sect_off): Likewise.
14895         (dwarf2_get_die_type): Likewise.
14896         (follow_die_sig_1): Use dwarf2_per_objfile from cu.
14897         (get_signatured_type): Likewise.
14898         (get_DW_AT_signature_type): Likewise.
14899         (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
14900         (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
14901         (cu_debug_loc_section): Likewise.
14902         (fill_in_loclist_baton): Likewise.
14903         (dwarf2_symbol_mark_computed): Likewise.
14904         (dwarf2_find_containing_comp_unit): Change objfile parameter to
14905         dwarf2_per_objfile.
14906         (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
14907         parameter.
14908         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
14909         (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
14910         (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
14911         (set_die_type): Use dwarf2_free_objfile from cu.
14912         (get_die_type_at_offset): Likewise.
14913         (dwarf2_per_objfile_free): Don't assign global variable.
14914         (debug_names) <constructor>: Add dwarf2_per_objfile
14915         parameter, update m_debugstrlookup construction.
14916         (debug_names::debug_str_lookup): Add dwarf2_per_objfile
14917         parameter.
14918         <m_dwarf2_per_objfile>: New field.
14919         <lookup>: Use m_dwarf2_per_objfile.
14920         (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
14921         (psyms_seen_size): Likewise.
14922         (write_gdbindex): Replace objfile parameter with
14923         dwarf2_per_objfile.
14924         (write_debug_names): Likewise.
14925         (write_psymtabs_to_index): Likewise.
14926         (save_gdb_index_command): Use get_dwarf2_per_objfile, update
14927         calls.
14928
14929 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
14930
14931         * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
14932         <dwarf2_per_objfile>: New field.
14933         (struct dwarf2_per_cu_data) <objfile>: Remove.
14934         <dwarf2_per_objfile>: New field.
14935         (create_cu_from_index_list): Assign dwarf2_per_objfile instead
14936         of objfile.
14937         (create_signatured_type_table_from_index): Likewise.
14938         (create_debug_type_hash_table): Likewise.
14939         (fill_in_sig_entry_from_dwo_entry): Likewise.
14940         (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
14941         (create_type_unit_group): Assign dwarf2_per_objfile instead of
14942         objfile.
14943         (create_partial_symtab): Access objfile through
14944         dwarf2_per_objfile.
14945         (process_psymtab_comp_unit_reader): Likewise.
14946         (read_comp_units_from_section): Likewise.
14947         (scan_partial_symbols): Likewise.
14948         (add_partial_symbol): Likewise.
14949         (add_partial_subprogram): Likewise.
14950         (peek_die_abbrev): Likewise.
14951         (fixup_go_packaging): Likewise.
14952         (process_full_comp_unit): Likewise.
14953         (process_full_type_unit): Likewise.
14954         (process_imported_unit_die): Likewise.
14955         (dwarf2_compute_name): Likewise.
14956         (dwarf2_physname): Likewise.
14957         (read_import_statement): Likewise.
14958         (create_cus_hash_table): Assign dwarf2_physname instead of
14959         objfile.
14960         (read_func_scope): Access objfile through dwarf2_per_objfile.
14961         (read_lexical_block_scope): Likewise.
14962         (read_call_site_scope): Likewise.
14963         (read_variable): Likewise.
14964         (dwarf2_rnglists_process): Likewise.
14965         (dwarf2_ranges_process): Likewise.
14966         (dwarf2_ranges_read): Likewise.
14967         (dwarf2_record_block_ranges): Likewise.
14968         (dwarf2_add_field): Likewise.
14969         (dwarf2_add_member_fn): Likewise.
14970         (read_structure_type): Likewise.
14971         (process_structure_scope): Likewise.
14972         (read_enumeration_type): Likewise.
14973         (read_array_type): Likewise.
14974         (read_common_block): Likewise.
14975         (read_namespace_type): Likewise.
14976         (read_namespace): Likewise.
14977         (read_module_type): Likewise.
14978         (read_tag_pointer_type): Likewise.
14979         (read_tag_ptr_to_member_type): Likewise.
14980         (read_tag_string_type): Likewise.
14981         (read_subroutine_type): Likewise.
14982         (read_typedef): Likewise.
14983         (read_base_type): Likewise.
14984         (attr_to_dynamic_prop): Likewise.
14985         (read_subrange_type): Likewise.
14986         (read_unspecified_type): Likewise.
14987         (load_partial_dies): Likewise.
14988         (read_partial_die): Likewise.
14989         (find_partial_die): Likewise.
14990         (guess_partial_die_structure_name): Likewise.
14991         (fixup_partial_die): Likewise.
14992         (read_attribute_value): Likewise.
14993         (read_addr_index_from_leb128): Likewise.
14994         (dwarf2_read_addr_index): Likewise.
14995         (dwarf2_string_attr): Likewise.
14996         (lnp_state_machine::check_line_address): Likewise.
14997         (dwarf_decode_lines_1): Likewise.
14998         (dwarf_decode_lines): Likewise.
14999         (dwarf2_start_symtab): Likewise.
15000         (var_decode_location): Likewise.
15001         (new_symbol_full): Likewise.
15002         (dwarf2_const_value_data): Likewise.
15003         (dwarf2_const_value_attr): Likewise.
15004         (dwarf2_const_value): Likewise.
15005         (die_type): Likewise.
15006         (die_containing_type): Likewise.
15007         (lookup_die_type): Likewise.
15008         (guess_full_die_structure_name): Likewise.
15009         (anonymous_struct_prefix): Likewise.
15010         (dwarf2_name): Likewise.
15011         (follow_die_ref_or_sig): Likewise.
15012         (follow_die_offset): Likewise.
15013         (follow_die_ref): Likewise.
15014         (dwarf2_fetch_die_loc_sect_off): Likewise.
15015         (dwarf2_fetch_constant_bytes): Likewise.
15016         (dwarf2_fetch_die_type_sect_off): Likewise.
15017         (dwarf2_get_die_type): Likewise.
15018         (follow_die_sig): Likewise.
15019         (decode_locdesc): Likewise.
15020         (dwarf2_per_cu_objfile): Likewise.
15021         (dwarf2_per_cu_text_offset): Likewise.
15022         (init_one_comp_unit): Assign dwarf2_per_objfile instead of
15023         objfile.
15024         (set_die_type): Access objfile through
15025         dwarf2_per_objfile.
15026
15027 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
15028
15029         * valprint.c (converted_character_d): Remove typedef.
15030         (DEF_VEC_O (converted_character_d)): Remove.
15031         (count_next_character): Use std::vector.
15032         (print_converted_chars_to_obstack): Likewise.
15033         (generic_printstr): Likewise.
15034
15035 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
15036
15037         * xml-support.h (struct gdb_xml_value): Add constructor.
15038         <value>: Change type to unique_xmalloc_ptr.
15039         (gdb_xml_value_s): Remove typedef.
15040         (DEF_VEC_O (gdb_xml_value_s)): Remove.
15041         (gdb_xml_element_start_handler): Change parameter type to
15042         std::vector.
15043         (xml_find_attribute): Likewise.
15044         * xml-support.c (xml_find_attribute): Change parameter type to
15045         std::vector and adjust.
15046         (gdb_xml_values_cleanup): Remove.
15047         (gdb_xml_parser::start_element): Adjust to std::vector.
15048         (xinclude_start_include): Change paraeter type to std::vector
15049         and adjust.
15050         * btrace.c (check_xml_btrace_version): Likewise.
15051         (parse_xml_btrace_block): Likewise.
15052         (parse_xml_btrace_pt_config_cpu): Likewise.
15053         (parse_xml_btrace_pt): Likewise.
15054         (parse_xml_btrace_conf_bts): Likewise.
15055         (parse_xml_btrace_conf_pt): Likewise.
15056         * memory-map.c (memory_map_start_memory): Likewise.
15057         (memory_map_start_property): Likewise.
15058         * osdata.c (osdata_start_osdata): Likewise.
15059         (osdata_start_item): Likewise.
15060         (osdata_start_column): Likewise.
15061         * remote.c (start_thread): Likewise.
15062         * solib-aix.c (library_list_start_library): Likewise.
15063         (library_list_start_list): Likewise.
15064         * solib-svr4.c (library_list_start_library): Likewise.
15065         (svr4_library_list_start_list): Likewise.
15066         * solib-target.c (library_list_start_segment): Likewise.
15067         (library_list_start_section): Likewise.
15068         (library_list_start_library): Likewise.
15069         (library_list_start_list): Likewise.
15070         * tracepoint.c (traceframe_info_start_memory): Likewise.
15071         (traceframe_info_start_tvar): Likewise.
15072         * xml-syscall.c (syscall_start_syscall): Likewise.
15073         * xml-tdesc.c (tdesc_start_target): Likewise.
15074         (tdesc_start_feature): Likewise.
15075         (tdesc_start_reg): Likewise.
15076         (tdesc_start_union): Likewise.
15077         (tdesc_start_struct): Likewise.
15078         (tdesc_start_flags): Likewise.
15079         (tdesc_start_enum): Likewise.
15080         (tdesc_start_field): Likewise.
15081         (tdesc_start_enum_value): Likewise.
15082         (tdesc_start_vector): Likewise.
15083
15084 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
15085
15086         * extension.h (struct xmethod_worker) <clone>: Remove.
15087         * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
15088         Remove.
15089         (python_xmethod_worker::clone): Remove.
15090         * valops.c (find_overload_match): Use std::move instead of
15091         clone.
15092
15093 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
15094
15095         * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
15096         (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
15097         <free_xmethod_worker_data>: Remove.
15098         <get_matching_xmethod_workers>: Chance VEC to std::vector.
15099         <get_xmethod_arg_types>: Remove.
15100         <get_xmethod_result_type>: Remove.
15101         <invoke_xmethod>: Remove.
15102         * extension.c (new_xmethod_worker): Remove.
15103         (clone_xmethod_worker): Remove.
15104         (get_matching_xmethod_workers): Return void, pass std::vector by
15105         pointer.
15106         (get_xmethod_arg_types): Rename to...
15107         (xmethod_worker::get_arg_types): ... this, and adjust.
15108         (get_xmethod_result_type): Rename to...
15109         (xmethod_worker::get_result_type): ... this, and adjust.
15110         (invoke_xmethod): Remove.
15111         (free_xmethod_worker): Remove.
15112         (free_xmethod_worker_vec): Remove.
15113         * extension.h (enum ext_lang_rc): Move here from
15114         extension-priv.h.
15115         (struct xmethod_worker): Add constructor and destructor.
15116         <data>: Remove.
15117         <value>: Remove.
15118         <invoke, clone, do_get_result_type, do_get_arg_types>: New
15119         virtual pure methods.
15120         <get_arg_types, get_result_type>: New methods.
15121         (xmethod_worker_ptr): Remove typedef.
15122         (DEF_VEC_P (xmethod_worker_ptr)): Remove.
15123         (xmethod_worker_vec): Remove typedef.
15124         (xmethod_worker_up): New typedef.
15125         (invoke_xmethod): Remove.
15126         (clone_xmethod_worker): Remove.
15127         (free_xmethod_worker): Remove.
15128         (free_xmethod_worker_vec): Remove.
15129         (get_xmethod_arg_types): Remove.
15130         (get_xmethod_result_type): Remove.
15131         * valops.c (find_method_list): Use std::vector, don't use
15132         intermediate vector.
15133         (value_find_oload_method_list): Use std::vector.
15134         (find_overload_match): Use std::vector.
15135         (find_oload_champ): Use std::vector.
15136         * value.c (value_free): Use operator delete.
15137         (value_of_xmethod): Rename to...
15138         (value_from_xmethod): ... this.  Don't assign
15139         xmethod_worker::value, take rvalue-reference.
15140         (result_type_of_xmethod): Adjust.
15141         (call_xmethod): Adjust.
15142         * value.h: Include extension.h.
15143         (struct xmethod_worker): Don't forward-declare.
15144         (value_of_xmethod): Rename to...
15145         (value_from_xmethod): ... this, take rvalue-reference.
15146         * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
15147         (struct python_xmethod_worker): ... this, add constructor and
15148         destructor.
15149         <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
15150         (gdbpy_free_xmethod_worker_data): Rename to...
15151         (python_xmethod_worker::~python_xmethod_worker): ... this and
15152         adjust.
15153         (gdbpy_clone_xmethod_worker_data): Rename to...
15154         (python_xmethod_worker::clone): ... this and adjust.
15155         (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
15156         temporary vector.
15157         (gdbpy_get_xmethod_arg_types): Rename to...
15158         (python_xmethod_worker::do_get_arg_types): ... this and adjust.
15159         (gdbpy_get_xmethod_result_type): Rename to...
15160         (python_xmethod_worker::do_get_result_type): ... this and
15161         adjust.
15162         (gdbpy_invoke_xmethod): Rename to...
15163         (python_xmethod_worker::invoke): ... this and adjust.
15164         (new_python_xmethod_worker): Rename to...
15165         (python_xmethod_worker::python_xmethod_worker): ... this and
15166         adjust.
15167         * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
15168         Remove.
15169         (gdbpy_free_xmethod_worker_data): Remove.
15170         (gdbpy_get_matching_xmethod_workers): Use std::vector.
15171         (gdbpy_get_xmethod_arg_types): Remove.
15172         (gdbpy_get_xmethod_result_type): Remove.
15173         (gdbpy_invoke_xmethod): Remove.
15174         * python/python.c (python_extension_ops): Remove obsolete
15175         callbacks.
15176
15177 2018-01-05  Pedro Alves  <palves@redhat.com>
15178
15179         PR gdb/18653
15180         * common/signals-state-save-restore.c
15181         (save_original_signals_state): New parameter 'quiet'.  Warn if we
15182         find a custom handler preinstalled, instead of internal erroring.
15183         But only warn if !quiet.
15184         * common/signals-state-save-restore.h
15185         (save_original_signals_state): New parameter 'quiet'.
15186         * main.c (captured_main_1): Move save_original_signals_state call
15187         after option handling, and pass QUIET.
15188
15189 2018-01-05  Pedro Alves  <palves@redhat.com>
15190
15191         * spu-tdep.c (spu_catch_start): Pass
15192         symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
15193
15194 2018-01-05  Pedro Alves  <palves@redhat.com>
15195
15196         PR gdb/22670
15197         * ada-lang.c (literal_symbol_name_matcher): New function.
15198         (ada_get_symbol_name_matcher): Use it for
15199         symbol_name_match_type::SEARCH_NAME.
15200         * block.c (block_lookup_symbol): New parameter 'match_type'.  Pass
15201         it down instead of assuming symbol_name_match_type::FULL.
15202         * block.h (block_lookup_symbol): New parameter 'match_type'.
15203         * c-valprint.c (print_unpacked_pointer): Use
15204         lookup_symbol_search_name instead of lookup_symbol.
15205         * compile/compile-object-load.c (get_out_value_type): Pass down
15206         symbol_name_match_type::SEARCH_NAME.
15207         * cp-namespace.c (cp_basic_lookup_symbol): Pass down
15208         symbol_name_match_type::FULL.
15209         * cp-support.c (cp_get_symbol_name_matcher): Handle
15210         symbol_name_match_type::SEARCH_NAME.
15211         * infrun.c (insert_exception_resume_breakpoint): Use
15212         lookup_symbol_search_name.
15213         * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
15214         * psymtab.c (maintenance_check_psymtabs): Use
15215         symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
15216         * stack.c (print_frame_args): Use lookup_symbol_search_name and
15217         SYMBOL_SEARCH_NAME.
15218         * symtab.c (lookup_local_symbol): Don't demangle the lookup name
15219         if symbol_name_match_type::SEARCH_NAME.
15220         (lookup_symbol_in_language): Pass down
15221         symbol_name_match_type::FULL.
15222         (lookup_symbol_search_name): New.
15223         (lookup_language_this): Pass down
15224         symbol_name_match_type::SEARCH_NAME.
15225         (lookup_symbol_aux, lookup_local_symbol): New parameter
15226         'match_type'.  Pass it down.
15227         * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
15228         (lookup_symbol_search_name): New declaration.
15229         (lookup_symbol_in_block): New 'match_type' parameter.
15230
15231 2018-01-05  Pedro Alves  <palves@redhat.com>
15232
15233         PR gdb/22670
15234         * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
15235         ada_lookup_symbol.
15236         (ada_lookup_symbol): Reimplement in terms of
15237         ada_lookup_symbol_list, bits factored out from
15238         ada_lookup_encoded_symbol.
15239
15240 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
15241
15242         * ada-exp.y (write_object_renaming): When subscripting an array
15243         using a symbol as the index, pass the block in call to
15244         ada_lookup_encoded_symbol when looking that symbol up.
15245
15246 2018-01-05  Jerome Guitton  <guitton@adacore.com>
15247
15248         * ada-lang.c (ada_array_length): Use ada_index_type instead of
15249         TYPE_INDEX_TYPE.
15250
15251 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
15252
15253         * ada-lang.c (ada_to_fixed_value_create): Add handling of
15254         the case where VALUE_LVAL (val0) is not lval_memory.
15255
15256 2018-01-05  Xavier Roirand  <roirand@adacore.com>
15257
15258         * ada-valprint.c (print_optional_low_bound): Handle
15259         character-indexed array printing like boolean-indexed array
15260         printing.
15261
15262 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
15263
15264         * NEWS: Create a new section for the next release branch.
15265         Rename the section of the current branch, now that it has
15266         been cut.
15267
15268 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
15269
15270         GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
15271         * version.in: Bump version to 8.1.50.DATE-git.
15272
15273 2018-01-03  Xavier Roirand  <roirand@adacore.com>
15274
15275         * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
15276         Add field.
15277         * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
15278         Add field.
15279         (default_exception_support_info) <catch_handlers_sym>: Add field.
15280         (exception_support_info_fallback) <catch_handlers_sym>: Add field.
15281         (ada_exception_name_addr_1): Add "catch handlers" handling.
15282         (ada_exception_catchpoint_cond_string) <ex>: New parameter.
15283         Update all callers.
15284         (create_excep_cond_exprs) <ex>: Add parameter.
15285         (re_set_exception): Update create_excep_cond_exprs call.
15286         (print_it_exception, print_one_exception, print_mention_exception)
15287         (print_recreate_exception): Add "catch handler" handling.
15288         (allocate_location_catch_handlers, re_set_catch_handlers)
15289         (check_status_catch_handlers, print_it_catch_handlers)
15290         (print_one_catch_handlers, print_mention_catch_handlers)
15291         (print_recreate_catch_handlers): New function.
15292         (catch_handlers_breakpoint_ops): New variable.
15293         (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
15294         Add parameter.  Add "catch handler" handling.
15295         (ada_exception_sym_name, ada_exception_breakpoint_ops):
15296         Add "catch handler" handling.
15297         (ada_exception_catchpoint_cond_string): Add "catch handler"
15298         handling.
15299         (create_ada_exception_catchpoint): Update create_excep_cond_exprs
15300         call.
15301         (catch_ada_handlers_command): New function.
15302         (initialize_ada_catchpoint_ops): Initialize "catch handlers"
15303         operations structure.
15304         (_initialize_ada_language): Add "catch handlers" command entry.
15305         * NEWS: Document "catch handlers" feature.
15306
15307 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
15308
15309         * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
15310         account when creating the array type of the slice.
15311         (ada_value_slice): Likewise.
15312
15313 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
15314
15315         * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
15316         New enum value.
15317         (create_array_type_with_stride): Add byte_stride_prop parameter.
15318         * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
15319         New parameter.  Update all callers in this file.
15320         (array_type_has_dynamic_stride): New function.
15321         (is_dynamic_type_internal, resolve_dynamic_array): Add handling
15322         of arrays with dynamic byte strides.
15323         * dwarf2read.c (read_array_type): Add support for dynamic
15324         DW_AT_byte_stride attributes.
15325
15326 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
15327
15328         * dwarf2read.c (read_unspecified_type): Treat
15329         DW_TAG_enumeration_type DIEs from Ada units as stubs.
15330
15331 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
15332
15333         Update copyright year range in all GDB files.
15334
15335 2018-01-01, 18  Joel Brobecker  <brobecker@adacore.com>
15336
15337         * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
15338         and gdb/testsuite/gdb.base/step-line.c.
15339
15340 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
15341
15342         * copyright.py (main): Dump the contents of
15343         MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
15344         even if BY_HAND is empty.
15345
15346 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
15347
15348         * top.c (print_gdb_version): Update Copyright year in version
15349         message.
15350
15351 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
15352
15353         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
15354
15355 For older changes see ChangeLog-2017.
15356 \f
15357 Local Variables:
15358 mode: change-log
15359 left-margin: 8
15360 fill-column: 74
15361 version-control: never
15362 coding: utf-8
15363 End: